« first day (1720 days earlier)      last day (3225 days later) » 

9:00 PM
@Ocramius That sounds nasty
 
Wow i just unlocked the chat :)
is that chat with php + MySql + AJAX ?
 
Even better! ASP, SQL server and unicorns!
BTW the unicorns part is actually not true
 
lol i just learned php + mysql + a little bit of js this month i dont know any languages beside the sql :D but i created an ajax chat :)
and why is that better than php mysql and ajax ?
 
I didn't say it was better ;)
But it seems to work for SO
 
you said "Even better!":D
 
9:08 PM
Although chat is the retarded little brother of the main site
@DiyarBaban ok ok I lied :)
 
lol no prob :)
why there is no smilie ?
 
@NikiC just fyi: Dmitry verified that the temporaries patch now is officially working with opcache ^^
 
@DiyarBaban You mean like actualy gifs?
 
no pngs
smilies must be gifs ? :D
oh i think non gif are called emoticons ? (i am not english)
hmm do you have any idea to create online users system ? i really try to figure it out but i cant :D
 
That is a rather broad topic :)\
 
9:13 PM
@bwoebi everything looks more complicated now ^^
 
@NikiC opcache makes everything more complicated^^
needing extra cases because temp var reuse etc.
e.g. only with temp var reuse temp vars which were assigned via Z_CE_P() need now extra attention…
 
@NikiC @bwoebi Specifying an int as the default for a float parameter isn't allowed. Any particular reason for this? Otherwise I was thinking of allowing it.
 
@Trowski just put a dot behind the number
 
I know you can do that, but it seems odd that I can pass the function 0, but I can't make 0 the default.
That's a wtf to me.
 
@Trowski hmm, well
feel free to I think.
 
9:23 PM
@Trowski Yeah, that's totally true, it's pretty annoying. Go fot it. :)
 
@Trowski Do you want to change this for int->float coercion specifically or generally for coercions under the weak casting rules?
 
int->float obviously.
everything else is IMO nonsense
 
So no bool $b = 1?
 
it's just ugly to always put a dot behind your number for floats
@NikiC nah
 
okay
I'm okay with int->float as it's also allowed under strict type rules
Though I'd prefer to just keep it as is
 
9:25 PM
@NikiC most probably the traversables stuff I was mentioning
 
Yeah, just int->float, no int->bool or float->bool
 
@NikiC you seriously prefer function(float $f = 0.) instead of function(float $f = 0) ?
 
@bwoebi I prefer 0.0
 
Trailing . is just weird to me, honestly.
 
@NikiC you do that in C because you really care about the type
 
9:27 PM
0.0 for me.
 
Yea, the trailing . looks out of place imo
 
(I'd even be okay with dropping trailing .)
 
0
Q: Image gallery with php password protected upload: some issues

LuigiI made a simple image gallery, I'm adding a password protected upload. With some help I'm using this php (thanks to sulthan-allaudeen). Attached the code I'm using. The problem is that I can't find a way to have on the left side the thumbnails of all the images in the folder, but with this code ...

 
because it actually makes 1.$var parse error...
 
@bwoebi If you change this, then the actual default value of a parameter will no longer be the specified default value
 
9:29 PM
1 concat with $var.
 
@LeviMorrison that's what one would expect, but it's parsed as a double and then $var
 
@bwoebi Well, think of it as getting what you deserve, for writing that ;)
 
@NikiC o_O
 
@bwoebi I assume I have to push to git.php.net/push/php-src.git?
 
@Trowski yeah
git remote set-url origin --push git.php.net/push/php-src.git
 
Oh, now I got to "Process finished with exit code 255"
 
@Ocramius You didn't before?
 
Nope, now it crashed the debugger somewhere <_<
 
I thought the 255 is simply for the catchable fatal at the end
 
yeah, I'll look more into it :P
 
9:53 PM
@Ja͢ck @RonaldUlyssesSwanson Good news - Gary Hockin is going to be working for JetBrains as PHPstorm developer relations. He is within driving distance of me, and I bump into him sometimes, so may be able to bribe with beer.
 
uhhh, does anyone else find this extremely strange?
I can't replicate with 3v4l.org, probably due to the way that it evaluates the input:
http://3v4l.org/9FSUq
 
I would say rather a problem with that phpshell thing?
Although it is DateTime
 
someone could give me some hints about the question?
 
@PeeHaa lulz
@Rican7 What PHP version are you running?
 
:)
 
10:01 PM
@cspray it says it right in the screenshot: PHP 5.4(.37)
 
Wtf, I have an array_map() call that returns completely different results on subsequent calls
 
@Rican7 Sorry missed that
My eyes ain't good and dark blue on black is awful contrast ;)
 
ha, its all good
Oh, I'm a jackass. I never use `eval()`....
http://3v4l.org/mOdJk
 
@NikiC it looks like the entire array_map stuff was indeed screwing with the test state
I now got a
 
Anonymous
@Luigi I don't know if i'm reading the question wrong but couldn't that be solved with mainly HTML/CSS + a bit of php? Stick them in an array and for loop the div displaying each thumb?
 
10:11 PM
So PhpParser\Node\Expr\New_ is simply called with the wrong parameter
 
@Jay Are you speaking of JavaScript Arrays?
(sorry I'm not very familiar with .js and php)
 
Anonymous
:24237606 That's ok. Scandir() puts your files into an array (php), well technically just the file names. If you want to display thumbnails of those pictures you need to mock up the HTML to display one of those images and then use a for loop which ++ on the array each time thus displaying a list of thumbnails. If that doesn't make sense, look up arrays, for loop and scandir :) If you want to paste your code somewhere externally and give me the link, i can try and give you an example.
 
@Ocramius But the parameter is right ... or is it not?
 
Anonymous
@Luigi Just realised you have pasted your code on your question - I'll answer
 
@Jay ok! I was asking myself which kind of code I had to have! Thank you very much!
 
Anonymous
10:30 PM
@PeeHaa you there?
 
Anonymous
@Luigi I've replied, I can't test the code right now so let me know if it doesn't work
 
thanks a lot! I'm going to try, but (sorry for the stupid question) have I to replace the php in the code I already have with the new one you provided or simply add it to the cose?
 
Anonymous
@Luigi Don't apologise, it's completely fine :) You see in your code where you close your first bit of php? it's the ?> just above <div style="clear:left">&nbsp;</div>, stick the code under that ?> :)
 
@Ocramius Ha, I got it!
It's happily running tests now, albeit very very slowly
 
@Jay I've added a comment
 
Anonymous
10:45 PM
@Luigi What's the error you're getting?
 
Anonymous
@Luigi My bad! Just realised what I did
 
10:57 PM
@NikiC cool @ the fix
btw, I'll kick out array_map
I'll write my own no_shit_array_map() instead
 
@Ocramius why?
 
@bwoebi throws warnings and misbehaves brutally in some cases that I didn't manage to isolate
 
@Ocramius when does it throw warnings… except when your arg isn't an array?
 
@bwoebi when something throws an exception inside it
Hmm... Rasmus just released this, but I can't read it :-\ github.com/rlerdorf/phan
 
@Ocramius ah, crappy pre-7.0 code^^
nobody likes PHP 5.
 
11:01 PM
@bwoebi didn't try with PHP7, but mainly because I don't want to adapt all the error message assertions XD
 
@Ocramius pffff
 
@Ocramius Now it fails with "file_get_contents(): Name cannot be empty" in the ContextFactory :)
 
@Ocramius why can't you?
@NikiC that's what you deserve, when you try voodoo.
 
@NikiC oooh... eval'd code?
yeah, I'll have to fix that in phpDocumentor then
 
@Ocramius Yeah, thinking that as well. Though not sure where it found eval() code at that point
 
@bwoebi my ADHD prevents me from understanding more than 4 lines of code above or below the line I'm looking at
That's why I can't read phan
 
Wow, I've forgotten what such ugly PHP code Rasmus writes
 
@Ocramius well, actually… then I wonder why you even understand the code you write yourself? :-P
 
@bwoebi because every method is 5 LoC on average
 
ah, the craziness of distributing code over that many methods that you loose control over them.
 
11:08 PM
@bwoebi or the bliss of ignorance :)
I prefer being ignorant of two stack frames below me
 
inorite
 
@Ocramius not sure how to interpret that.
 
It is doing it purely at the ast level, meaning it cannot understand type changes over time in a function body.
 
@bwoebi it's demeter basics, applied to runtime scopes
 
11:11 PM
@ircmaxell how does it fair against your stuff?
 
 * Is this function's cyclomatic complexity off the charts? Yes. Is this also an extremely
 * hot code path requiring maximum optimization? Yes. This is why it looks like the ninth
 * circle of npath hell ... #DealWithIt
^ @Ocramius will be your most-loved function of Aerys.
 
@BenjaminGruenbaum today, I am sure it does more. But he is fundamentally andhicapping himself in his approach.
 
@ircmaxell does it find mysql bad usage :D ?
 
@bwoebi well, you gotta make tradeoffs when the language isn't fast enough for a > O(log(n)) operation:
that said, all the rest should really be chopped into little pieces and made simple to understand rather than fast to execute.
 
@Ocramius how can you even read that code? It's longer than 10 lines!
 
11:14 PM
@bwoebi indeed I do take Adderall if I need to code on that
 
@Ocramius What's adderall?
 
Wait, why the heck does he code looks like this? Is it for optimisation or something?
 
@BenjaminGruenbaum mine, rasmus' or Aerys'?
 
Rasmus's
 
no, that's his general style of code.
 
11:15 PM
@bwoebi It's surprising how quickly people jump down your throat for methods that are more than a few lines long.
 
@BenjaminGruenbaum did you miss my ping yesterday?
 
Or if you use a goto... lol
 
@ircmaxell probably, I had a busy week :S
 
Check out demo.PHP in my php-cfg githuv project
 
11:17 PM
Tbh, I don't care if Rasmus or God himself wrote that stuff: it's really not good code that way.
 
@Trowski No occurrences of 'goto' found … :-P [Aerys.]
 
@bwoebi Amp used to have one huge switch method based on yielded keys with goto sprinkled throughout, right?
 
It'd be cool if it was made into a usable tool by developers :)
 
@Trowski yeah, past tense is appropriate here…
 
11:18 PM
@Ocramius my code is rough on my project, but at least there is some organization to it... This is just holy hell...
 
We learned our lesson that actually code was cleaner without goto, lol @Trowski
 
@ircmaxell yeah. It may be cool, but this is the best way to keep it a one-man-band forever
 
@bwoebi Look at the madness for a simple goto :) github.com/igorw/retry/issues/3
 
wtf did I just write… that makes no sense.
 
@Ocramius Looks more like internal class than eval
 
11:21 PM
@NikiC specifically, Exception
 
@Ocramius yep
 
It probably simply needs to skip those
 
@Ocramius To be fair, looks a bit like Rasmus were writing C with PHPisms mixed in...
 
If that is how modern C code looks like, then I need some Xanax now.
 
@Ocramius not quite. But it's not that far from it.
 
11:23 PM
@Ocramius Nah, we usually split methods after only 300 lines of code
 
hrhr
 
@NikiC oh, that often?
 
iirc the largest function in PHP has more then 1kloc. Something dealing with http requests...
 
I hope my next car runs java code. I prefer dying because of the garbage collector hanging rather than due to infinite CCLoC
 
@NikiC opcache/Optimizer functions tend to have up to 500-600 loc
Two days ago, I tried changing something in block pass… I horribly failed and I have no idea why.
 
11:29 PM
nite
 
@NikiC the built in server code.....?
 
@Danack no, client code
 
Alright, I'm off
@NikiC I'll let you know about further findings. So far, it seems like most issues are due to the code generator and & __get() missing
 
@Danack I was hoping to sleep tonight...
 
11:33 PM
@Ocramius hehe
 
You'll sleep.....you'll just have strange dreams....
 
hand-written state machines ftw.
 
@Danack Doesn't count, that's not our code :P
 
@NikiC So, having this here should be fine, right? :D
 
11:35 PM
@Ja͢ck yep
 
\o/ cool
 
@Ja͢ck often it's enough to add it and try if it doesn't crash.
 
@bwoebi Don't let @Ocramius hear that
 
crashes are a way of debugging too!
 
well, i won't deny that hehe
It's more like "if i remove it, will it leak?" kind of question :)
 
11:39 PM
@Ja͢ck probably yes
 
when i want to pass an array as argument to a callback function, should i use ZVAL_COPY()?
that doesn't copy the whole array, right?
 
@Trowski 1460 loc? yup^^
 
@ircmaxell you'll like keybase.io/triplesec - pretty intensive read, but you probably already saw it
 
11:49 PM
@Trowski in PHP you get away with like five times less code…
(obviously single-method, but still)
but you end up being 5 times slower than in C or so^^
 
@bwoebi what's the php-src idiom for passing an array by ref?
 
@Ja͢ck with zpp?
 
via zend_call_function
 
@Ocramius interesting. I do question their use of ctr for both block mode ciphers (I would have switched modes as well). But overall not bad.
 
@Ja͢ck I just see the fci->no_separation field which must be set to 0.
 

« first day (1720 days earlier)      last day (3225 days later) »