« first day (2716 days earlier)      last day (2456 days later) » 
00:00 - 21:0021:00 - 00:00

00:17
Am I dumb, forgot how to yield properly in Amp's Loop::run
00:46
Nvm, got it!
Still the same today as when Terry said it #GrumpyConf
@PeeHaa pinghaa
01:05
ponghaa?
@Alesana didn't get the nap, but getting the nachos :)
napchos.
#yNotBoth
@Tiffany And I'm still stuck here with neither
That job never responded to me, but I swear my assessment was done perfectly :/. Maybe someone else with more experience than me also did it perfectly
@FélixGagnon-Grenier I was kinda hoping that if I napped, I'd dream about myself eating nachos and wake up not craving them. Or, it would probably deepen the craving when I woke up.
@Alesana how long has it been?
4 days
hit them up
send em another email, be polite, ask what the status is or if they know anything
01:21
I'll do that :B
is there a community college near you?
Yeah, why do you ask?
find out if they have a career services department
in our case, you don't have to be a student
it's open to anyone
$request->withHeader('Accept', 'application/xml');
var_dump($request->getHeaders()); // array(0) {}
Wut (Artax)
Hmm I will try that! Do you enjoy working for one?
01:25
ours will help with resume, cover letter, mock interview, and will help with job searches
Oh request is immutable
it has its perks
mmmmm these nachos are amazing
@Sean requests are immutable
Yup, got it :D
I will definitely check that out
01:27
@Tiffany are nachos one of the perks?
the money to buy nachos :P
@Alesana I met with a colleague in our career services regarding a job I applied to, he helped me out quite a bit, gave me a little booklet going over job interviews
@Tiffany So you work for the college, but the college had a department that helped you get the job working for the college? I'm a bit confused :P
@Alesana no, I was applying at another place
he was discrete about meeting with me
said I wasn't the first employee he's helped look for another job
Ohh that's really cool
Are you still looking to leave the college?
so they put their nachos in a styrofoam container, but it's not the greated to eat out of... but they put it on wax paper first, so I dumped my nachos on a plate... they're upside down
yes and no. I think I'm going to end up waiting until my boyfriend graduates college before I start seriously looking. For now, I'm trying to acquire more skills.
since I can't really market myself as a developer right now
01:35
@Tiffany Why not?
well, junior developer maybe, but I don't want to suffer junior developer wages
:P I am at that point too. Well, I think you have a bit more experience than I, so maybe I haven't gotten to that point yet
my programming ability isn't as strong
I think you're selling yourself a bit short :P
 
1 hour later…
03:00
@pmmaga Hello @pmmaga, Thank you very much for finding out. Sorry for the late reply, I didn't knew you have replied.
 
1 hour later…
04:17
How can I get the value ?
object(DOMNodeList)#5 (1) { ["length"]=> int(1) }
I tried to get the value of buyingPrice
$classname="buyingPrice";
$finder = new DomXPath($doc);
$spaner = $finder->query("//span[contains(@class, '$classname')]");
var_dump($spaner);
?>
Here is the source code : <span aria-label="rupees 760" class="buyingPrice" role="spinbutton"> 760</span>
Pls help in getting the value 760
05:17
posted on March 24, 2018

New Cyanide and Happiness Comic

06:09
morning
07:02
morning room.
07:14
is there any profiling tool for docker containers? any tool you all refer?
08:00
oriflamme any flag, banner, or standard, especially one that serves as a rallying point or symbol.
!!dad
What do you call a snake that's 3.14159 meters long? A πthon
 
1 hour later…
09:19
@Wes any chance of finishing those doc changes today ?
Wes
Wes
yes, between today and tomorrow
Wes
Wes
i am trying to finish some parser thingy. i am like a monkey trying to use tools
i have no idea what i am doing wrong and i feel so stupid
i am trying to parse kind of a boolean expression, with matching parentheses, etc, but something is going wrong and i have no idea what
I'm not great with parsers either, they are one of those things that gets me stuck in a loop when it won't work ...
Wes
Wes
09:42
i am awful
user9098366
09:58
hi
user9098366
echo addcslashes('testing\n', '\n');
//Outputs: testi\ng\\\n
echo addcslashes('tresting\r', '\r');
//Outputs: t\resting\\\r
user9098366
php.net/manual/en/function.addcslashes.php - " If charlist contains characters \n, \r etc., they are converted in C-like style"
@DaveRandom @JoeWatkins it's your wife's birthday tomorrow
user9098366
adding "\\" is the c-like style? And also should the backslash be getting added in front of the "n" and "r"? Or a php language bug?
Wes
Wes
what are you trying to do?
user9098366
10:07
me?
user9098366
I am just studying, I am trying to understand why adding "\\" is a c-style. It adds a backslash and it escapes it, but is this c-style? What does the c-style mean?
user9098366
"c-like style"
user9098366
addcslashes() - converting "\n" to "\\\n" is c-like style, basically
Escape sequences are used in the programming languages C and C++, and also in many more languages (with some variations) like Java and C#. An escape sequence is a sequence of characters that does not represent itself when used inside a character or string literal, but is translated into another character or a sequence of characters that may be difficult or impossible to represent directly. In C, all escape sequences consist of two or more characters, the first of which is the backslash, \ (called the "Escape character"); the remaining characters determine the interpretation of the escape sequence...
user9098366
so basically adding a backslash is the "c-like style"?
user9098366
10:14
so the addcslashes() ads the backslash as it should and then this gets escaped with another backslash and this is the "c-like style"
user9098366
"\" -> c-like style - more or less?
user9098366
I may be too particular, but I am trying to understand what is meant
user9098366
"If charlist contains characters \n, \r etc., they are converted in C-like style"
user9098366
echo addcslashes('testing\n', '\n');
//Outputs: testi\ng\\\n
user9098366
and also it seems like a bug that it adds a backslash in front of the "n"
10:21
@ThomasMorgan no. you told it to escape the \ and the n. if you want it to escape \n you need to put it into double quotes instead of single quotes.
user9098366
ok, thanks
"\n" is a newline character (1 char)
'\n' is a backslash and an n (2 chars)
user9098366
ok
user9098366
echo addcslashes('testing\n', "\n");
//Outputs: testing\n
user9098366
"If charlist contains characters \n, \r etc., they are converted in C-like style"
user9098366
10:26
"\n" remains "\n" - so they are converted c-like style like the php.net page says, or they just stay the same?
user9098366
so basically what the php.net page says is not correct?
user9098366
again, a little too particular, but I have time to learn
user9098366
I am not skipping things
user9098366
"\n" gets converted c-like style to "\n"? Can I say that what the page says is not correct?
user9098366
it should say, they stay the same?
user9098366
Wes
Wes
ahhh now i remember of you, the guy that is approaching programming backwards :P
@ThomasMorgan 3v4l.org/Lb7Aa
11:15
what do you call =<<< operator?
Wes
Wes
the doesn't exist operator
what language?
it's php
it's an string assignment operator. What's it particularly called?
There is no such operator. You are mistaken. If you were to share the code where you saw this, we might be able to explain better.
Wes
Wes
11:36
$template = <<<HTML
        content to echo
HTML;
it's separated. it's called heredoc/nowdoc
= assignment
<<<NAME heredoc/nowdoc start
Ok thanks for the info. :)
/me facepalm
ThW
ThW
12:02
80% of the time you want nowdoc
Wes
Wes
/me still waiting for preg_match(<<<RE/[\"$x]/RE, $s) :P
ThW
ThW
12:22
The need for that is not large enough, just use single quotes and the x modifier
Is there any nice injection-based way to fetch a new artax request object in a method without creating it in the method? Maybe a factory in the ctor? Guess it probably doesn't matter
12:46
PHP Fatal error: Cannot resume an already running generator in Unknown on line 0 Okay then
@Sean if you are low enough in your app stages, you can execute functions from Auryn. Arguments will be resolved as they would in a constructor.
pong @PaulCrovella
Morngins all
o/
my life is in pieces. there's no more coffee in my appartment, and it's cold outside. and it's 8:49 am. send help.
user9098366
@Gordon Thanks a lot for the info. This will enable me to move forward with this.
@FélixGagnon-Grenier What about sending nudes instead?
12:50
well, you know, I'm open-minded.
but not Dave's nudes, I already have plenty of those
Who doesn't :D
Should I be using yield or yield from in Amp\Call callbacks?
In aerys yielding works no problem, but just using amp, the script ends after the first yield
Depends
You use yield from on generators
You use yield on promises
But I mostly opt for the promise interface
Aha!
13:02
I tend to do 2 a lot of times because it makes a bit of a nicer api
Yeah, I was kind of doing a bit of both weirdly. I had the call wrapped around the outside and was doing a couple of other janky things
That's helped a lot :D, thanks!
\o/
np
13:15
Huh, well that's a nice API. Supports creating a dry-run deployment but you can't query the identifier to get the results
:P
That's weird
I need to parse command line options. Any sane lib I should be using?
cc @Wes?
lol roll ur own
- famous last words
Wes
Wes
symfony console is ok ish
Yeah kinda don't want to unless I really have to. I am in the middle of a application rewrite. Don't want even more work right now :P
@Wes k
Wes
Wes
no actually scratch that. it's a fucking mess, but it works
i am already imagining your face in about 20 minutes
there are no type hints, casts all over the place
:B
13:29
Holy fuck that library O.o
Am I naive when I think it's just simple string parsing?
Wes
Wes
it's not just parameters
I believe uncle bob has a talk about writing a command line arguments parser, with some caveats
well, no, the talk is about how to clean code and refactor, and example is a command line arguments parser
Wes
Wes
i always realize too late that i never express myself clearly
it does not just string parsing, it does all things console
like even progress bars, wrapping text, colors
Why don't keyboards sleep? Because they have two shifts
Yeah
I see tables, logging, fucking markdown formatters and a fucking kitchensink
Wes
Wes
13:34
and coffeemaker yes
!!dad add keyboard / Why don't keyboards sleep? / Because they have two shifts
@mega6382 Ha ha ha! Brilliant! I'll save that one about keyboard for later!
evening room
Hola
\o
Wes
Wes
speaking of parsing.......... FFFFFFFFFFFFFFFFFFFFFFFFFFFFFUUUUUUUUUUUUUUUUUUUUU
i am awful at it
and i know nothing about it
well, you can always start by googling parsing, that'll fix that "nothing" ;)
Wes
Wes
13:58
have you tried, smartass :P
it's like a completely different gigantic field
not related at all to programming
@Wes yes, I have :) lately I've been implementing a todotxt parser with regexes
and, parsing strings is something that's been necessary at various steps in various pieces of software in the past
unless you mean something else by "parsing"?
Wes
Wes
good luck parsing stuff like html with regexps..
? I don't understand from where you draw your interventions sometimes. nobody spoke of parsing html.
@Wes H̸̡̪̯ͨ͊̽̅̾̎Ȩ̬̩̾͛ͪ̈́̀́͘ ̶̧̨̱̹̭̯ͧ̾ͬC̷̙̲̝͖ͭ̏ͥͮ͟Oͮ͏̮̪̝͍M̲̖͊̒ͪͩͬ̚̚͜Ȇ̴̟̟͙̞ͩ͌͝S̨̥̫͎̭ͯ̿̔̀ͅ
Wes
Wes
@FélixGagnon-Grenier i didn't even speak of not-parsing html
14:03
2 mins ago, by Wes
good luck parsing stuff like html with regexps..
why did you even mention this^? (honest question, I try to understand you)
Wes
Wes
because that's almost what i am doing
you probably did something trivial and thought you mastered the art of parsing :P
Wes
Wes
the basic concept is simple but in practice it's hard to organize yourself well
imagine writing a parser that is capable of telling you what it wasn't unable to parse
like expecting token1, token2, got token3, at line y column x
it's... quite a lot of complicated work
on google you find either very basic tutorial and theory or super high level stuff with which programming languages are made
there's nothing in the middle
but feel free to prove me wrong...
for example i was going with tokenization at first... realized it was quite a pain in the butt after i wrote a lot of code... nobody warned me about that
and now i wonder why tokenization is even a thing
i am not being polemic, just saying that i am not not-trying as you said
it could be that i am just stupid though
@Wes ... when did I ever said that?
Wes
Wes
16 mins ago, by Félix Gagnon-Grenier
well, you can always start by googling parsing, that'll fix that "nothing" ;)
14:14
that was a joke answer to you, just before, saying that you literally know "nothing" about parsing
and even there, there is not a single interpretation of that sentence that means "you are not trying"
Wes
Wes
okay :B i got it wrong then
I mean, you say something false about you, then pick on me when I go along with that falseness you say
either don't say false stuff, or assume people will take what you say for what you say
Calm down guys, here enjoy a dad joke.
!!dad
Why don't keyboards sleep? Because they have two shifts
Wes
Wes
that's old
14:21
then lets do another 1
!!dad
Wes
Wes
what false stuff?
I was unable to repair the installation of a PDF reader on my computer. I am now officially of no fixed adobe.
Wes
Wes
i don't know why you think i am angered but i am not
i mean, i know why you would think that :B but i am not really
@Wes You said "I know nothing about parsing" so @FélixGagnon-Grenier replied, that if you were to google "parsing" that would be resolved as a joke. So, the false stuff was that you know nothing about parsing.
Wes
Wes
14:23
i basically don't know nothing about parsing is what i was saying
i was exaggerating
i've been searching for quite a while and reading "google it" pissed me off a bit...
@FélixGagnon-Grenier <3
Wes
Wes
@JoeWatkins lol, did i?
@FélixGagnon-Grenier you don't love me anymore is it
oh, no worries, I was just working on something else a bit
Wes
Wes
:B
:P
... damn. after all these years, now that I try to unit test entity persistence, search behaviour and stuff, I start to hate auto increment fields for unique ids.
I have to either manage creating entities with or without unique ids (++boilerplate) or just remove all auto increments (+boilerplate, refactoring)
is it sane to do a query each time you create an entity to get the next id? do people use guids and add a second integer id field to facilitate stuff?
14:46
hi everyone, i was hopping someone could help me on this, i´m posting multiple input files, and then rename them and move_uploaded_file to a specific directory, but it´s not working, could someone tell me what it is wrong on my code:
$count = count($_FILES['files']['name']);
for ($i = 0; $i < $count; $i++) {
//echo 'Name: '.$_FILES['files']['name'][$i].'<br/>';
$temp = explode(".", $_FILES["files"]["name"][$i]);
$newfilename = round(microtime(true)) . '.' . end($temp);
move_uploaded_file($_FILES["files"]["tmp_name"][$i], "projetos/" . $newfilename)[$i];
$ficheiro = $newfilename;
}
if i echo the $newFilename i can see the two files renamed, but the rest of the code doesn´t work, what am i missing here? thanks
@FélixGagnon-Grenier Probably not unless you can mutex the table (or a future row slot?) :V Not ideal
One of our systems is being redone from scratch and the devs agreed on auto incremented IDs, I did cry a little inside.
Well I actually voiced my disagreement on it but they did it anyway :<
:(
the problem I am having, is with unit testing (I'd like to generate a set of entities without having to get the id assigned by the db each time). it might be a bit thin, but I kinda dislike not being able to create an entity with a specified id, or having to support both cases (create with id, create without id)
15:27
@FélixGagnon-Grenier is the id of any importance?
apart from identifying uniquely the entities?
I don't use it in urls really
there's a lot of foreign keys however (not sure if that has any performance / usability impact)
there's a tricky thing however, that the master database is actually a tentacular filemaker application
and filemaker guy really does not want to hear about uuids, so I need some way to make the top level parent entity retain a integer identifier
master database?
You sure you are doing unit tests and not something else?
oh, I am not interacting with that "database" (as far as we can call however fm stores stuff a database)
at least, not directly, there are synchronization operations that happen from time to time, mostly done by humans
lol
I like that human factor in there :)
they are, as you'd say, old school ;)
having a human reading every user modification to their profile, is a requirement
15:32
ah moderation
they're some kind of movie director union
I have a project like that too
so they make sure that people that can't write still get contracts
Yeah makes sense
Well it doesn't, but I see the need :P
15:33
In my case it's children being assholes on a public site
So basically the exact same thing :D
but yeah. I'm creating dummy user entities in a test database, and the auto increment behaviour is crapping everything. I've also ran into the issue a few times in the past, enough that I'm now considering switching to uuids without telling anyone.
If somebody asks just say it's always been like that :P
16:03
@Wes no, no you didn't ...
Wes
Wes
MUST.         RESIST.              IMPLEMENTING.            FLUENT.           INTERFACE.
nah
everything has it's place, and fluent interfaces have their place here ... I admit they have very few places, but one of them is here ...
Wes
Wes
MUST.       RESIST.
16:18
nah
Wes
Wes
MUST.
ecig tastes like poo, need to replace wicks
Wes
Wes
MUST.
stahp
@mega6382 HAMMERTIME!
Wes
Wes
16:44
@PeeHaa @FélixGagnon-Grenier they hired brian tyler for writing the formula 1 theme music youtu.be/52khlKOl1do
i bet i could do better than that with a stick and a frying pan
lol nice
it's funny, I'll be playing in an orchestral movie music concert tomorrow. star wars, ET, superman and a few others.
funny that you'd mention that now
... what's up with all these drivers crying?
morning
for ten more minutes
Wes
Wes
hence my comment @FélixGagnon-Grenier "so it seems that all they do in #Formula1 is crashing cars"
it's a video made by someone that never watched a f1 race probably
Wes
Wes
or a nascar fan
they needed increased drama, because the music sucks
in reality crashes almost never happen in f1...
my apartment is finally starting to resemble clean...ish
17:25
@JoeWatkins You wanted to look at Windows stuff, right? :P
Hello, I want to make a subscriber page to my website. I have a page connection.php with the connection form and a controller check_connection.php. When the controller says that this is not the good couple id/password, he sets a GET parameter with the number of the error (e.g. ?page=connection&err=1). Is it the good way to go? Isn't it dangerous to let the user change the error in the URL? Is there a way to check in the database if the couple id/password is good without having to change page?
Wes
Wes
> makes the code remarkably simple
Wes
Wes
17:52
finally found the bug
it was a incorrectly escaped regexp -__-
18:06
/me facepalm
Wes
Wes
'/^&|\|/'
i want to match & or | as first char of a string
what's wrong with that?
@Wes Why is it not working?
@Wes Also this can do the same thing '/^[&|]/'
That is because the ^ is with & and not |
Wes
Wes
-__-
Wes
Wes
i hate regexps
yes now i get it
thanks
@Wes BTW this can do the just just as well and is probably more readable regex101.com/r/1NrAoU/3
Wes
Wes
yeah i usually do that because i hate escaping shit
regex is just crazy
hey guys im working to put my login page into a modal using bs4 and I am using php 7 no pdo do i have to put it in an include and include it on every page? or can i just call the page what would be best?
18:19
We should at least be thankful that PHP has PCRE, cause if it was just regular old regex, oh, you don't wanna know. )))))
Should I use AJAX to check the id and password for my connection form?
What is a connection form?
Well if you connect yourself to stackoverflow you need to write your username and your password
this is what I call a connection form
log in*
not connect
I conflate with my mother tongue
Wes
Wes
@mega6382 nah, clearly that's only the way it could work
except i didn't realize it :P
@JacopoStanchi It should be OK to do a login request with ajax, if it is over POST and you have a way of preventing XSRF attacks.
18:29
@mega6382 Is AJAX the best method? Of course my form is in POST.
@JacopoStanchi Best is irrelevant here, it only depends on how you want it to be, you can do it via submitting the form directly or via AJAX, as long as you can address and take care of the security concerns, it should be ok
@mega6382 What I do currently is my form action leads to a controller which checks if the username and the password are correct. If not, I want to send an error, but if it is synchronous I would need to send another HTTP request with the error number (for instance 1 if the password/id don't match) in GET or POST.
In this case I'm wondering if it wouldnt be best to use AJAX.
@mega6382 If I check in my controller if the username and the password both match their respective pattern, is it enough to avoid XSFR attacks?
No, for that you will have to send a CSRF token. Google it to get a better idea.
ThW
ThW
@mega6382 implementing the same stuff with just string functions can get really crazy as well.
18:45
@ThW But regex give you the impression that you are going one way, but you are going entirely another.
ThW
ThW
@mega6382 how?
Just look at Wes's regex ^&|\| he thought it will check weather the 1st char in string is & or |, but it wasn't. There are countless other examples.
With Regex you can easily skim over some very important expressions and not know it
ThW
ThW
@mega6382 missing knowledge how | works, but try implementing something like eval.in/977983 in string functions.
@ThW Yeah, I get your point. That is why I said we should be thankful we have PCRE in php.
19:02
@Codi look into namespaces and autoloading
Wes
Wes
namespaces probably won't help with that
nor autoloading
maybe a template engine like twig
depends entirely how it's built though
Wes
Wes
i wouldn't use autoloading to load bootstrap stuff, but i suppose you could do that :B
I believe his website might be setup like "index.php, about-us.php and contact.php" and he just want to know, if he has to add the modal script on every page separately.
Wes
Wes
i am still freaking out for DST
19:18
@kelunik you on linux right now?
@Ekin always.
curl parrot.live :D
I lol'd
Wes
Wes
19:36
@kelunik got time for an update on daas?
19:51
@Wes Not before mid april
Wes
Wes
i meant an update on my side, on what i am doing etc :P
20:20
Oh, sure. But going off now, so maybe better tomorrow. You can also write it and I read it tomorrow if you don't need direct input.
Wes
Wes
k
I'm trying to decide what naming convention I should use with Windows forms
for GUI elements
In high school, we used to abbreviate the element's type and use it as a prefix, then name it whatever we were going to. I'm not sure if that's the convention anymore.
People still use Windows Forms?
it was suggested I use it for what I wanted to build for my first project
Anyway, back then I used to use things like FirstNameTxt for Text boxes, SaveUserBtn Button etc
But, you can just use the same conventions you'll normally use for ids in webpages.
Wes
Wes
20:39
what are you building?
a calculator
and why would you do that?
I've just realised there's no reliable way to tell if a dynamic property (ie; handled by __get) exists or not since __isset is invoked for isset() and in fact property_exists() doesn't check at all.
Wes
Wes
@Christian example?
@mega6382 practice?
ThW
ThW
20:55
@Christian property_exists() should always be false for dynamic properties
that's not the way I read the code ...
@ThW, yes that's what I've just said.
yeah, it's not false ... read
So my question would be, how would you tell between test2 (exists, but is null) and testX (does not exist)?
00:00 - 21:0021:00 - 00:00

« first day (2716 days earlier)      last day (2456 days later) »