« first day (1947 days earlier)      last day (3007 days later) » 

12:00 AM
(that'd be pretty insane, but PHP.)
 
@FlorianMargaine That sounds more like JavaScript than PHP ^^
 
Ahh, you're right. I overlooked the fact that it's a closure.
 
@FlorianMargaine is there actually a non "deliberately rebinding closures to achieve that" way of doing it? 3v4l.org/kM6iD
The thing I'm concerned about is someone accidentally doing that, not concerned with people deliberately rebinding.
 
@NikiC yeah, but JS has a spec, not PHP :P
@Danack I don't know, my gut would tell me no... but PHP :P
 
oh god
my fix for opcache didn't work
fuck
I hate opcache
 
12:09 AM
I'll just wait for someone to mess it up and complain.
 
Also, sadly, I can actually reproduce my opcache issues now
oh god
I'm going to have to export this compiler function so opcache can use it
I
opcache makes me want to cry
zend optimizer is an abomination
if only because of the duplication of what zend_compile.c does
omfg optimizer contains two implementations of THE SAME OPTIMISATION
said optimisation is also in zend_compile.c
THE HELL OF ZEND NEVER ENDS
oh and only two of these instances are commented
HOORAY
no no no no why is opcache breaking unary minus, it doesn't even exist at the time opcache runs
oh god no it must contain another implementation
oh god opcache has commented-out blocks
that's against PHP's own style guide...
 
12:40 AM
NO NO NO NO NO
I'm scared now
 
Oh, you found my issues with opcache.
 
@bwoebi :'(
 
Also … disabling hyperthreading is a nice way to boost benchmarks…
 
oh thank God this piece of code actually checks the operand's type
anyway I want Optimizer moved into /Zend yesterday
 
Me too.
Please complain to Dmitry about it.
 
12:47 AM
I want it always-on, too
why? because it will BREAK THINGS
and that will force someone to maintain it
 
@Andrea yes, sure.
 
I still have no idea where opcache is breaking my code
I've fixed THREE different "optimisations" (numeric string -> number conversion, constant operation evaluation, and constant operation evaluation - note the latter is implemented twice in different files with almost-identical code)
I still need to find the fourth. Or fifth.
 
Come back here when you'll have rewritten Optimizer from scratch (j/k)
 
@bwoebi throw away the entire thing
 
it's not that bad, just sometimes awfully redundant…
 
12:54 AM
screw it, printf debugging
 
:D
 
no wait, breakpoints
I need a stack trace
oh, I could use phpdbg, but idk if opcache affects that
 
yes it does
 
stop pretending, you are a PHP developer, simply printing variables is your default debugging tool :D
 
aha... opcache is doing ahead-of-time evaluation
I thought so
 
12:56 AM
@tereško right… I'm going to just dump all the executed opcodes live.
 
the question is... where
 
@Andrea what transformation exactly?
 
I can show you!
L1-3 {main}() /Users/ajf/Projects/2014/PHP/php-src/foobar.php - 0x1080690c0 + 5 ops
 L3    #0     INIT_FCALL              112                  "var_dump"
 L3    #1     ADD                     "123abc"             "123xyz"             ~0
 L3    #2     SEND_VAL                ~0                   1
 L3    #3     DO_ICALL
 L3    #4     RETURN                  1
L1-3 {main}() /Users/ajf/Projects/2014/PHP/php-src/foobar.php - 0x1028b5a70 + 4 ops
 L3    #0     INIT_FCALL              112                  "var_dump"
 L3    #1     SEND_VAL                246                  1
 L3    #2     DO_ICALL
 L3    #3     RETURN                  1
before opcrash, after opcrash
 
yep
constant operation evaluation
in pass1
 
I already fixed that
And the other, almost-identical implementation of it
which means most of my test now passes
 
1:00 AM
the other is pass2 I guess?
 
except for addition and subtraction, because opcrash
and maybe multiplication, I can't remember
do not attempt to comprehend opcache, it is impossible
only realise that there should be no opcache
 
Did you also fix it in block_pass?
 
@bwoebi that's the other implementation I speak of
and both of them apply to all the arithmetic operations
but mysteriously + and - are still broken
 
so, you fixed pass1, pass2 and block_pass?
 
I fixed pass1's numeric string replacement, pass2 and block_pass's CT evaluation
I still have + and - broken
ah, thank you gdb. the problem is zend_optimize_block
but I thought I already fixed this code path
hey wait this is probably broken for the ZEND_ASSIGN_ variants
maybe that's the problem
but + and - wouldn't be special under that criteria
okay yes the problem is my function
thank you printf debugging
 
@tereško it's not Rebecca Black? wow
 
whoa...
 
right… Barack to appoint a new one.
@Andrea btw. don't forget to cose a ceratin vote ;-)
 
that means SCOTUS might be a bit more liberal soon, woop
though only a bit
 
that guy actually was the most famous judge ... kinda in the world
 
1:13 AM
@bwoebi I doubt this congress will confirm anyone he puts up
 
@PaulCrovella This has to go through congress? That's fun.
 
@PaulCrovella isn't it just the Senate?
 
does it even matter?
 
though that might just be circuit judges
@tereško yes, Senate is Democrat-controlled
 
both are controlled by republicans (IIRC)
 
1:14 AM
oh wait you're right
when did that happen
 
rofl
 
@Andrea mid-term elections
 
@bwoebi yeah probably
 
@Andrea I believe so, yes.
 
1:16 AM
@bwoebi aha
 
obama could resurrect scalia from the dead, nominate him, and republicans would still block it
6
 
why is this code broken why is this code broken why is this code broken
$ sapi/cli/php foobar.php
Valid str1?
Valid str1?
Default?
1
int(246)
this is really weird
 
I just hope that you didn't forget to enable notices
 
@bwoebi I did earlier but that's no longer the issue
my function is being called THREE TIMES?
 
dump the opcodes…
 
1:19 AM
so indeed opcache is trying to optimise this instruction in THREE places
@bwoebi I know what the opcodes are, I need a breakpoint
 
oh ok
 
I was breakpointing on the wrong function I think
hey don't we have GDB macros or something
 
@Andrea it wants to make sure it really really optimizes it
 
@PaulCrovella this is after zend_compile.c has already tried. so it's really really really really trying to optimise it
 
@Andrea we have a .gdbinit
 
1:23 AM
oh.
@bwoebi yeah I found it now :)
 
but I doubt it'll help you much
 
the problem is not where I thought
(gdb) printzv op2
[0x100e5b320] long: 123
 
also… you're using gdb on OS X?
 
@bwoebi ...yes?
 
no love for lldb? ^^
 
1:24 AM
it does work...
@bwoebi oh, I suppose I ought to use that
:p
 
@Andrea ...except when it doesn't.
 
works well enough for me
so the problem is that opcache is converting my strings to longs
...which I thought I fixed already
 
for me too usually … but I had some time where it didn't (SIGSEGV signal handlers …)
and then I used lldb and sticked with it locally
 
jesus fucking christ... the senate majority leader is already calling for any nomination to be blocked
 
@PaulCrovella oh, that's going to be fun when Trump nominates a new Judge :-D
 
1:26 AM
@PaulCrovella that's not necessarily bad
can SCOTUS vote with a member missing?
 
I think they have to be able…
 
yes, they can
 
if so, then Scalia's death is immediately beneficial
though that makes me wonder what SCOTUS's tie-breaking rule is
 
@Andrea why? He had some too conservative views, but others were pretty liberal though…
 
um, which were liberal exactly?
 
1:29 AM
I've read about him, but I don't remember concrete … will have to reread…
 
@bwoebi keep in mind those are the same people who ruled on Citizens United case
 
@tereško Scalia was indeed in the majority there
 
I find it a bit worrying that know that much about US politics
 
it's inevitable
they're the largest country that is English-speaking, so inevitably you hear a lot about it in English-speaking circles
furthermore, they are the world's only superpower
 
and we thoroughly export our culture through tv and movies
 
1:34 AM
largest english-speaking country is India or Australia
 
@Andrea what do you mean with superpower?
 
Superpower is a word used to describe a state with a dominant position in international relations and which is characterised by its unparalleled ability to exert influence or project power on a global scale. This is done through the combined-means of technological, cultural, military and economic strength, as well as diplomatic and soft power influence. Traditionally, superpowers are preeminent among the great powers (e.g., as the United States is today). The term first applied to the British Empire, the United States, and the Soviet Union. However, following World War II and the Suez Crisis in...
@tereško India uses English as a lingua franca but not as a native language, and Australia is tiny
 
I am not entirely sure about size
 
@Andrea I'd say Russia is a superpower too by that definition…
 
@bwoebi they're a great power but I'm not sure about superpower
@tereško they have >300 million people
 
1:36 AM
not much more than the US…
 
@bwoebi ?
 
.. I picked AU in terms of "size" and India in terms of "population"
 
@Andrea they don't really have a much smaller influence than the US on the political level…
 
@tereško ah, the inconsistency in terms of size was what confused me
@bwoebi Realpolitik, though
America controls the world's oceans
if (!is_numeric_string(Z_STRVAL(ZEND_OP1_LITERAL(opline)), Z_STRLEN(ZEND_OP1_LITERAL(opline)), NULL, NULL, 0)) {
    convert_scalar_to_number(&ZEND_OP1_LITERAL(opline));
}
FOUND THE BUG
goddamnit
 
@Andrea no .,.. that's Moon
:P
 
1:39 AM
point is though that it also is much less known what the forces of Russia really are…
 
@bwoebi Russia is powerful but they are not quite on the level of the US
 
as far as size goes, autralia is about the size of the contiguous US states ... but we also have alaska
 
nor is China
 
@Andrea China is making itself bigger than it is…
 
it's known that Russia has extremely advanced in "electronic warfare" and it has the largest standing army in terms of manpower
 
1:40 AM
And Russia is trying to make itself smaller than it is…
 
@bwoebi china is an economic power
but geopolitically not as important as the US
Russia is big in Asia
 
@Andrea China is an economic power by its sheer size
 
@bwoebi sure
 
Russia is half of Asia :)
 
and the US is a superpower by geography and economic force
 
1:42 AM
it not really is an economic power by size or population.
 
@bwoebi size and population don't matter as much as you think
 
size matters when it comes to natural resources
 
the US has a third of China's population yet an economy the same size
 
that's what I'm saying.
though the EU has a larger economic power than the US or China
 
I'm not sure about that
 
1:43 AM
@bwoebi yes and no: EU is not a monolith
 
I am. Just read it yesterday again.
@tereško yeah, the EU needs to have more paneuropean power
 
EU has a huge GDP for sure
 
it's slowly getting there but it's taking its time…
 
the problem with both US and China is that their economics are "stretched thin"
 
@tereško US not so much, but China definitely.
 
1:47 AM
actually, looking at it from this point, the migrant crisis in EU is really benefiting US
 
it's not longer-term
the migrant crisis is killing the EU and that is not something the US wants
 
it is also benefiting EU, but most countries aren't realizing this.
more show-drama than needed
 
@bwoebi how?
 
the EU might die this year
 
migrants turn into very cheap labor
 
1:48 AM
the EU has been at the "might die this year" state since 2005ish
 
oh no
it's serious this year
 
@PaulCrovella those migrants are completely unskilled according to DE surveys
 
@tereško that's news to me … AFAIK there are large portions of well-schooled migrants
 
1. migrant crisis has meant countries have literally rebuilt the old walls across Europe, and it's testing the Schengen agreement
2. UK's referendum on the EU
 
UK referendum is only next year?
 
1:50 AM
hah, no
 
or did I miss something?
 
they said that, but it'd going to be this year sometime
I don't remember when they announced it
 
actually, "nuke the Greece" might be a good option
 
I don't know if it was even announced
 
@tereško they don't have to be skilled to haul bricks or pick crops
 
1:50 AM
it would solve majority of both economic and migration problems
 
@tereško wouldn't fix anything
 
@tereško it doesn't. If we nuke the Greece, we'll get many new migration problems on the south border…
 
@Andrea true, but Greecs seems to be the sore point of EU
 
Greece is a symptom, not a cause
 
Greece needs to solve the problem and it only will be able to as long as it's in the EU.
When we nuke Greece it will only get worse, I guess.
 
1:52 AM
@PaulCrovella true. But you also need two things: willingness to work and reputation of being willing to work
 
@tereško they have willingness, … just in many countries no reputation to.
 
while refugees might have the former, the worse elements of said refugees are certainly damaging the latter
 
that's the actual problem … and also why no other countries will accept many refugees except Germany who recognized that
 
... dan DE government is about to fall because of that
 
That's totally insane what e.g. France is doing there when only wanting to accept 30k migrants
 
1:54 AM
// prevents CT eval
function foxcache($string) {
    return substr($string, 0);
}
PHPT is such a horrible hack
 
here, particularly in southern border states, there's the weird bipolar stereotypes that immigrants are both "lazy" and yet also "trying to steal our jobs"
 
oh wait this won't work for what I need
no wait it will
...no wait it won't
uh
 
@tereško the DE government is just working. It's not like there ever was very much agreement between coalition partners over the whole field.
Seehofer is just playing games on a high level…
 
@tereško yeah, we do that with our migrant workers too... farm laborers get seriously shafted here
 
1:58 AM
@tereško what doesn't work though is some countries just not accepting the migrants …
 
@PaulCrovella yeah, well, Latvia signed up to accept only ~1000 refugees ... because we are fucking poor and none of them actually want to come here
(LV is just an inch above Romania in GDP per capita)
 
what does latvia have going for it? I know basically nothing about the place
 
@PaulCrovella we have a lot of forests and russians .. and that's about it
 
forests are good. I dig forests.
 
there are also swamps
 
2:02 AM
@tereško nobody complains about the poor states…
 
...not that I have anything against russians in particular, just not a people person
swamps are neat, but mosquitoes annoy the hell outta me
 
@PaulCrovella its not the russians that are the problem. Only a specific subculture: encrypted.google.com/…
 
do they own stock in adidas?
 
I really dont know.
 
@tereško what's these caricatures of humans?
 
2:07 AM
it's like they took track-suit mannequins and force fed them homemade drugs for a few years
 
the type of russians I knew/met since I was 7 is basically this encrypted.google.com/…
 
somehow…
 
@bwoebi it's a small minority of ethnic russians who idolize gang culture from Russia and usually have only elementary-school education
 
vacation in antalya added to my list
 
@tereško ugh :-/
 
2:10 AM
try visiting after late july... unless you want to join people cooking eggs on asphalt
 
;D
note to self: dont sit on asphalt in july
 
:D
 
@bwoebi there is actually a similar subculture available in UK too: encrypted.google.com/search?q=chav
only in UK people are a bit more wealthy
 
@tereško the poor people are still poor…
they're just a bit more wealthy compared to your poors…
but they're just equally poor when comparing to the normal people
 
on this sad note I think I will go sleep now
 
2:16 AM
I'll go watch the ergo proxy
night all
 
Going to bed too … night
 
nite
 
at long last, numeric strings RFC is opcache-compatible
now I can finally open the vote on it again...
 
first close the other :-D
 
Fu** man i was sleeping and when i woke up there were 970 messeges... :O :o
 
2:21 AM
@GourabNag yeah, this chat is not very active
only like a 5-8 people contributing most content in the last hours
 
is 970 not a big number for you ??
 
no
 
i see....
 
better scroll up and start reading, it was all very important
 
It's someone else's turn to reply to Yasuo with 'wth'.
 
2:29 AM
@Danack I'd feel obligated to read the rfc first, which ain't gonna happen.
 
I want to put the invalid numeric strings RFC to a vote again, but it doesn't have a language spec patch yet
I want to be thorough
@GourabNag congrats you only managed a C
 
Man I managed a A+ ! @Andrea
 
@GourabNag that's not what I'm seeing
 
me either
 
2:32 AM
clear the cache ....
 
ah, there it is.. gj ssllabs on fucking up cache invalidation
 
meanwhile my site is only a B grade, out of necessity
 
Alrighty, problem. I have a regular expression that gets matches (just some text) and I am getting the first one with $matches[0] and I can echo it. However, I want to write it to a file with file_put_contents('current.txt', $matches[0]); but it doesn't print anything (it's just empty)
 
man i was tearing my hair yesterday for doing everything i could to get a A+ but when i woke up today, i saw there was a tiny link named clear cache... And boom !! I get a A+ !!
 
2:36 AM
Yay!
 
@TristanWiley you should put example code on 3v4l.org with the file_put_contents commented out - but you're probably just running the wrong code
 
Well if I write echo($matches[0]); it prints perfectly. But it won't write to a file.
 
> you should put example code on 3v4l.org
or on pastebin.
or even here.
 
Yeah, sorry. Was debugging one last thing
 
2:40 AM
The code, I made a gist.
(It basically reads gets XML from a feedburner and then finds the line that says "Last Modified" and I want to save that line to a file.
 
@TristanWiley is that code you posted meant to be run-able?
 
oh....curl callback.
 
@TristanWiley have you tried using var_dump to check the content of $matches?
 
I did consider it a bit back after reading up some docs, but then I went for a walk and completely thought.
(I'm not really a PHP developer, just using it to implement notifications in my app)
 
2:43 AM
@TristanWiley it runs - but gives a large number of error warnings - do you not have any error notices enabled?
 
hmm
 
I'm coding this in Cloud9. What errors?
 
You ought to turn the error notices on. The actual problem is that the file is getting over-written constantly.
 
oh by the way, $headers should be a global, @Tristan
 
Oh, that makes sense... Actually, idea. Thanks guys
 
2:45 AM
otherwise you're not appending to anything as it only exists within the function
 
Well... This is the last one..... How could I redirect my users, connecting to port 80 to the https port ie 443 any ideas??
 
I strongly recommend running PHP locally through jetbrains.com/phpstorm if cloud9 doesn't show you errors.
 
@Danack stack trace on an error?! is that an xdebug thing?
 
Oh boy
 
2:47 AM
@GourabNag I'd recommend using web server configuration for that, not PHP
 
alright !!
 
I got it, I just checked to see if $matches is empty before I run it since it ran a bunch of times and overwrote and it works. Although I'm going to enable errors.
Thanks yall
 
ooh ajf.me is now A+
yay
 
3:05 AM
nice!
 
 
1 hour later…
4:29 AM
morning
 
5:03 AM
hey!! @*
 
5:18 AM
well its... its sooooo.... quite......
 
quiet
 
Wes
mornings
 
so... according to my cost model computation, the code I wrote in the last 3 days is equivalent to what a waterfall-estimation system would rate as 4.5 man months
...
Something smells like companies over-estimating
 
or you're under-charging
 
No, this is man-months, not actual price
or otherwise, it means that the greater amount of developers is really doing a shitty job
 
5:28 AM
the code I wrote in the last 3 days is probably worth a day and a half so... yay me for lowering the bar
 
How many CLOC?
 
Good evening/morning, my name is Tom, this is my first time on SO chat
 
Ohai @TomChadaravicius
 
700ish maybe
 
Yeah, according to COCOMO, you still worked half a month :|
/me trashes this silly model
 
5:32 AM
Brothers in code, can somebody help get a project or even a job? I am in US, here's my CV, stackoverflow.com/cv/tomchadar
 
@TomChadaravicius you posted it on careers, should be fine, no?
 
Three months, two interviews, no job. Could it be because I am old? I am 46
 
could be, age bias in tech hiring isn't a myth
 
What area?
 
Near Chicago
 
5:38 AM
as in commutable? Did you try visiting the PHP user group there?
 
As in "remote", yes. As for PHP user group in Chicago, no.
 
you may want to crash an UG meeting and ask around. Fairly sure that anyone there would help you
 
I am fluent both in php and .NET; here's myownapplication, postbrain.com
 
5:56 AM
Excuse me, brb
 
6:09 AM
@tereško I think you suggested ergo proxy to me.. do you know any other to watch after.. what I just binge-watched?
 
moin
 
moin'
 
6:56 AM
moin Joe
 

« first day (1947 days earlier)      last day (3007 days later) »