« first day (1436 days earlier)      last day (3512 days later) » 

2:00 PM
@Leigh why?
 
@FlorianMargaine Most of the time.
 
@FlorianMargaine In English the opposite of "benevolent" is "malevolent" (think BDFL)
 
@bwoebi because it always enters the loop, doesn't make sense to have a "when you haven't entered the loop" block
 
Yeah I was looking for m... Dictator for life... Couldn't see what the m was for
 
2:01 PM
Do you think it should run the or {} block if the loop executes only once?
 
> your compiler is pure and utter shit.
^ sounds like criticising people, not code
 
@Leigh for me it was like the first condition check fails
 
He talks about the compiler
 
@DaveRandom Was he talking to a compiler? :P
 
@Leigh yup, I do.
 
2:01 PM
You guys...
 
yeah?
 
I was originally going to include it. Nikita convinced me it didn't make sense, now you agree with my original feelings :p
 
... lol ^^
 
s/Norwegian/Finnish
 
@Leigh ftr I agree with NikiC
 
2:03 PM
Same ^
 
@Leigh Don't expect that we always have the same opinions^^
 
I don't expect it, but I would like a sane decision on what is best for the language
It's also more difficult to efficiently add it to do/while
 
I'd actually prefer the python behaviour @Leigh
 
Well, it depends on the definition of the feature if it makes sense. It it is "if loop statements aren't executed at least once", I agree with Nikita. If it is "if the first condition check fails", I'd rather add do {} while () or {}.
 
as in, runs if didn't break
Maybe we could have a finally block for that?
 
2:05 PM
do {} while() or {} and {} with and executing if the while block doesn't break
 
/hides
 
@DaveRandom I've promised to do a python-style RFC after this one is complete. It will require a new keyword, or, we can use something like "and"
 
@Leigh Well I think finally makes sense for that
 
I don't :)
 
fair enough :-P
Suppose and also makes sense
and would fit nicely with or
 
2:07 PM
The main difficulty I'm having conceiving for python style is when you break > 1
 
Don't see why that would be an issue? You still broke out of the current layer
 
urgh, yea, thinking backwards, I was thinking i'd have to execute each block going up the chain
 
Well, I already felt some need for foreach/else, but what is the use case of python-style?
 
oh, and do {} while () would end up as do {} or {} while()
 
Should I do Authenticator::login() and Authenticator::logout() *or * Authenticator::login() and Authenticator::logoff()?
 
2:09 PM
Logout
 
out
 
but with the condition at the end of the loop, it's not very easy to implement with some simple jumps, like I did with other users
 
@bwoebi O(n) searches. I've written $found = 0; foreach ($thing as $stuff) { /* look for a specific value of $stuff */ } if (!$found) { /* default actions */ } many times
 
@PeeHaa translog() and make it remember if you're in or out nods
 
@DaveRandom looks like you want array_every to be an expression
 
2:10 PM
@PeeHaa out
 
And it would have to be in/out, or on/off, I've always preferred in/out, because it's like when you sign a visitor in/out of a building
 
tenks sirs
 
@Leigh Unless they are going to the roof
 
@DaveRandom that I'd just write like do { foreach ($thing as $stuff) { if (validStuff($stuff)) { /* do stuff */ break 2; } /* do default stuff */ } while (0);
 
dear
 
2:12 PM
@bwoebi Works, but no likey
 
I wonder... can I modify JMP locations at runtime...
 
Probably.
 
@Leigh you can. I just don't know how nicely it plays with opcache.
 
.@swannodette Wait! So my favorite childhood game, Crash Bandicoot, was written in a LISP? Mind blowing.
 
I'll have a think about how to arrange the opcodes for efficient do or while, if I can come up with something sane I'll ask the lists opinion
 
2:17 PM
@Leigh I think your best bet will be a temporary variable you manipulate after the condition.
 
@bwoebi If I can do it without touching the variable every iteration, that's fine..
 
you'll have to check for it every iteration actually.
or… well. you can manipulate the jumps.
then you just need before the do { an opcode to reset the jump.
that should also work with opcache.
 
what opcode could I even use to do that...
sounds like a bad idea, but I'm curious about self-modifying code
I'd really like some kind of opcache load/save functions, might have a play later
 
@Leigh a new one.
 
:D
 
2:28 PM
you basically need two opcodes: an opcode to reset and an opcode which changes itself into a ZEND_JMPNZ if true and jumps — or jumps to the or branch.
 
hm, yea, could make it more generic, JMPRST takes an opnum to reset JMPCNT takes a location and a count, with current count in extended_value
when the count is 0 it falls through
 
in that case you have to check the extended_value on each iteration… that's no gain.
then you also just can add one more opline.
 
the other way to do this for do/while, is instead of duplicating the loop condition like I did for while, I could duplicate the loop body...
then it's just simple with a JMPZNZ at the first one, and the normal JMPZ at the end of the second one
 
just fyi: you could reuse this mechanism I just described for the while and then not need to duplicate the condition.
 
with the duplicate condition, there's no extra opcode every iteration though
so it's faster for big loops
 
2:34 PM
I don't really like that part of the implementation. I'd rather not have a duplicated while condition.
@Leigh with my proposal neither.
 
Maybe I don't understand your proposal fully then..
Can you put your new opcodes in here: gist.github.com/lt/aa88207a2db08415b3f8 so I can see what they would do
 
@Leigh going through one of your PRs... lol :D github.com/php/php-src/pull/109#discussion_r2419634
 
:P
I had no idea who I was talking to :D
 
2:54 PM
Good afternoon (well it is here :P)
Can some people save this question from some clueless downvoters? (Or: there must be a duplicate somewhere I haven't found yet): stackoverflow.com/questions/25960169/…
 
@Wrikken Edit the question to clarify it for them.
 
Ah, thank you derp.
Salman found a duplicate however, so ... closing ;)
 
@DaveRandom going through old bugs, I saw this PR... just needs a line to be merged in github.com/php/php-src/pull/778
"old"...
 
3:17 PM
@bwoebi looks good to me, great stuff by the way ... what you need to do now is writeup a document to describe behaviour
(sorry it took all day, fell asleep)
 
@JoeWatkins you're right… but I hate documenting stuff ^^
 
inorite but you're best to do that and might spot stuff while doing it that you need to change
did phpstorm guys see it yet ?
 
3:32 PM
see what?
 
@JoeWatkins no
 
@Leigh bob is working on phpdbg, an xml interface for better remote operation ...
 
It's Sunday… ;-)
 
cool
 
@JoeWatkins ah nice, shame about XML though ;)
 
3:34 PM
looks pretty light really
storm is java so xml is easy for them I guess ...
 
I like binary protocols, but I guess I'm a little odd
 
yes, yes you are ...
 
I'm going crazy... why does my customers server not show changes
 
@Leigh oh. I definitely like binary protocols too. But they have limited use cases. Especially not if you have a multitude of combinations of states and data which needs to be sent…
 
@bwoebi not sure what you had in mind for additional opcodes, but the only thing I've been able to come up is gist.github.com/lt/aa88207a2db08415b3f8
I tried to make one that was resettable, but it needed 4 things, tmp var for comparison, dest1, dest2, and state
which goes beyond op1, op2, and extended_value
 
3:43 PM
It doesn't need state, it's determined by the current jmp dest.
 
would need to touch extended_value every time then
jmp and mov ev -> op2
which I guess is no real different to checking the state each time
lets see what @JoeWatkins thinks: Runtime manipulation of JMP targets :)
off to the shop, back in 15
 
I have no idea whats being discussed, fill me in ?
you can't manipulate a jump target at runtime
 
resetjmpz (in) - start: post_dec - in: switchjmpz (or, out) - print - free - jmp (start) - or: print - free - out: return

where switchjmpz is a new opcode which either: jumps to `or` or changes itself to jmpz (with second param ignored by jmpz then).
and resetjmpz changes the targetted jmpz to a switchjmpz
@JoeWatkins ah, no?
 
well, what would opcache do ?
 
@JoeWatkins as long as the code works in either state, no problem.
e.g. when opcodes are reverted back at run-time too by some other opcode.
 
3:54 PM
I'm not sure why you're looking at doing it this way in the first place ?
 
perf reasons, saving ops (in the sense of not copying whole conditions or bodies).
 
saving ops where/how ?
 
in the loop/or impl
 
I mean compilation time or runtime savings ?
 
runtime and op_array size
 
3:59 PM
only been awake half hour, so nothing really making good sense yet ...
is vld working on master then ?
 
I think it's rather hand-crafted output
 
@JoeWatkins Fell asleep again, eh?
 
yeah :(
 
Bob was saying he doesn't like the part of my implementation where I duplicate the loop condition and create (basically) a pair of interlocking loops (picture a venn diagram)

So we were discussing the possibility of a pair of opcodes that act as a latch + reset. On the first pass through, the latching jump would change it's target, and it's reset again in the prologue to the loop.
This would create a much cleaner flow, especially for complex conditions
 
<jeopardy>What are things that sound like they're going to be full of bugs?</jeopardy>
 
4:11 PM
The other way to do it is with a tracking var, but I didn't really want to add something else to the loop that has to be done on every iteration
 
@Danack Things full of bugs for $500, Alex.
 
@Danack BBOM
big ball of mud
 
@bwoebi Yes. However that changes the ABI
@FlorianMargaine wiki.php.net/rfc/abstract_syntax_tree#implementation may help - however it's not up to date anymore. some things changed afterwards
 
@NikiC so, I have two choices: breaking ABI (though it's a part which really shouldn't be touched by 99.9-100% of the extensions) or showing an error. I think that minor ABI breakage is acceptable, I just don't know if it's okay for others too.
 
It's OK for me ;D
 
4:23 PM
@bwoebi It means that you can't update php independently of opcache, for example
at least technically that is forbidden by the release process
 
eih, opcache is bundled or not?
@NikiC technically yes. But in case of a real bug/regression?
 
you should ask an rm about it
 
@NikiC will do.
 
@bwoebi we have left bugs unfixed in the past when it was not possible to do it without abi break. abi compat is taken a lot more seriously than userland compat :D
 
@NikiC really. wtf....
 
4:26 PM
> to make good people do evil things, it takes PHP
to paraphrase some guy ....
 
e.g. I think that 5.5 has a partially broken finally implementation ;) i.e. it will throw an error in some cases, which couldn't be fixed due to abi restrictions
 
Anyone here know anything about server cache..
 
@Karem probably everybody
 
@FlorianMargaine can you take a look at the php config myfirstdeal.dk/info.php
Why does it still cache, i disabled apc (which was there before)
My changes does not show
 
what about apache's cache?
or browser cache?
 
4:38 PM
It's not something to do with the browser cache
 
E_TOO_MUCH_5_3
 
Apache cache?
 
@JoeWatkins ugh
php7 is a long way...
 
By the way.
I will be at PHPNW14.
 
I'll try to be there at phpnw15
 
4:40 PM
@FlorianMargaine I hear there are other options ...
@AndreaFaulds cool
 
@JoeWatkins ?
 
Thanks to some very kind people
 
5.4 5.5 are good, 5.6 will soon be good ...
 
@FlorianMargaine pastebin.com/a4mJ0y12 the .htaccess
 
@JoeWatkins oh
I thought you meant like other stacks
 
4:41 PM
actually we're using 5.6 already ... because why not ...
 
well if the codebase works...
 
How can i see if the apache cache is active?
 
and, well, I guess you have someone who can support if php goes wrong ;P
 
5.3 is eol, not even security fixes ...
 
yup
5.4 will be so in a year too
I found that surprising
 
4:43 PM
I like it ... we have to push harder for hosts to upgrade, or else they just won't bother, for 5 years at a time ...
 
yeah... from a dev pov I like it... from a sysadmin pov... I hate it that it's so short
hmf
there's no date on php release annoucements
 
/downloads.php has dates too
 
hah, ty
so... 5.4 will have 3 years of support
quite short imho
 
Yeah
I think our release schedule is actually unrealistic
Forcing people to change version in just three years just won't work
 
it doesn't take 35 months to build php ... not sure what the problem is ...
 
4:51 PM
But upgrading versions is as simple as install + run tests... ;D
 
we're not forcing anyone, those people who like to setup servers and leave them go stale use LTS distros anyway, they don't have to care about our release cycle ...
 
well, LTS distros still have security fixes
I'd like security fixes to be handled for 5 years, regardless of the release cycle
 
we have limited resources, our release cycle has to acknowledge that, think it does ...
 
I've found RC period more than enough time to make necessary adjustments, tbh all I had to do from 5.5 to 5.6 was fix some shoddy json
 
we had one failed test, don't even know what it was, someone fixed it in ten seconds ...
 
4:54 PM
@Leigh you haven't been in a corporate environment, have you...
 
@FlorianMargaine I work for a company with around 50 permanent staff, our products are exclusively PHP based
 
@JoeWatkins see, you had tests. That's a big difference :P
@Leigh I don't think 50 is much tbh
 
my last company still uses java 1.4 for some really critical applications
 
@FlorianMargaine The company before this was tens of thousands, but I wasn't a PHP dev, and it took 3 months to get bug fixes into production ;)
 
4:56 PM
financial company, so everything bubbled up through like 20 different environments
 
imagine that I work at a big contractor company for other big companies....
 
heh, just looked it up, my last company had 56k employees
 
@PeeHaa When you're asking for close votes, do additional flags from us low-rep plebeians help in any way?
 
Good morning/afternoon
 
5:08 PM
Hi
 
ahoy
 
was up?
 
@ircmaxell How's your keynote going?
 
so far so good, but a lot of work
 
Well, you know we expect a lot from you these days ;)
now you've gone and created a reputation for yourself
 
5:13 PM
:-/
 
Have you done a keynote before at other conferences?
 
yes, but not in a very long time
 
it'll be fine, we'll all be there watching closely :)
hmmm - i know most here aren't really into games, but this one piques my interest - store.steampowered.com/app/246070
 
that trailer is painful
 
skip the first video, the 2nd one shows what it's all about :D
 
5:28 PM
I won't see it :(
 
@JoeWatkins how come?
arriving late?
 
ticket for saturday evening and sunday
 
erm
 
that first video is painful
 
how do you even get a saturday evening + sunday ticket
 
5:31 PM
he's Joe
he gets whatever he wants
 
sure, but that's like, a custom ticket nobody else has :p
 
he's Joe.
 
might want to double check it Joe, wouldn't want you to miss out...
 
optional = in addition to
 
5:33 PM
so it's sunday (day 2) + alcohol for saturday night
 
let me see what mine is
 
couldn't miss getting drunk with room11 heh
:P
 
my ticket covers Friday
but I won't be there on Friday
 
why is phpnw better than other conferences btw?
it doesn't seem so just from the name...
is it because 3/4 of the people here are in UK?
 
Because @ircmaxell likes it
Therefore it's better
 
5:35 PM
Also, I'm going all day saturday ;)
 
@LeviMorrison huh?
 
Did you not buy your own ticket Joe? (i.e. your company bought it and didn't forward the proper details)
check your printable PDF, that'll have everything on it
 
@JoeWatkins My bad, that was a mistake. I did indeed close it 24h early, contrary to what I said on the list (I realised my mistake after sending that email). But what's done is done.
 
It will be quite entertaining if somebody digs that out and reverts your changes ;)
 
@JoeWatkins add a hackathon ticket ;-)
 
5:39 PM
@Leigh was given to me yeah
 
@JoeWatkins Try and get the PDF, 99.99% certain you'll have an all day saturday pass
 
@NikiC Yep :/
Especially since I just handled the merge conflicts with the bigint branch now
 
(because there was never an option to buy what you think you have :P)
 
While the changes in that RFC are also in the bigint branch, they are implemented differently (bigint branch has a type matrix for bitwise ops for example)
I'm still not sure how to go forward with the bigint RFC
 
added hackthon thing ... the ticket does include friday on the pdf but is that not just a summary of schedule ?
 
5:42 PM
Should I just put it under discussion despite being unfinished? Because it'll never be finished by my efforts alone...
 
@JoeWatkins In the top part "Ticket Information", what does it say under "Sessions", under name and price
Should be, Conference + Social + Conference day 2, if you have Conference, that's day 1
 
there you go :)
if you're still in doubt, give them a call, say you were given a ticket and you want to confirm what it includes.
they'll do it all over twitter if you don't actually want to call them
 
yeah I will contact someone, not sure ... it's going to take 5 and a half hours to drive, don't want to show up at wrong time ...
 
5:48 PM
@AndreaFaulds for the first point, you likely don't need special handling, apart from some typedefs maybe. on windows mpir is used instead of gmp, which will use int64 on win64
 
@JoeWatkins thats a bit nuts, and also why we go the night before
 
@NikiC Oh, that's awesome. I didn't know about that. That's a relief.
 
and linux has sane longs usually and if it doesn't we don't care ;)
 
5:51 PM
@NikiC That means I don't have to do anything, I think
The zend_bigint_* API just takes zend_long and zend_ulong and passes it to the gmp functions untouched. On Windows, they'd be the right size
It might be a problem on something obscure though.
 
yes
then on something obscure it will clip ^^
 
wouldn't it overflow?
Er, truncate.
 
clip as in just use the lower four bytes
 
don't know what the right term for that is
 
5:54 PM
@NikiC The Mill CPU people say "saturating" (for capping at _MAX) and "modulo" (for wrapping around), I'm starting to use those terms
The main things I need to do are fix a ton of 32-bit tests
Like, tons. There are way too many tests for things which there shouldn't be tests for
It seems a lot of widely-used functions have a test suite which basically just checks if zpp is doing its job
There are tests to ensure that floats overflow on 64-bit to the right values when using str_pad
There are even more of the same kind that apply exclusively to 32-bit
 
have fun :)
 
@AndreaFaulds Just pull a DateTime, XFAIL various bugs exist
 
or write a script that automatically updates the assertions to match your current output :D
 
6:09 PM
@Danack :D
@derp I have a Python script to verify my arithmetic
I assume Python is correct
 
D-:
 
Very helpful for checking I didn't screw stuff up
 
Vague question of the day - does anyone have a link to a decent guide of moving an application from a monolithic app to an 2 or n-tier architecture?
i.e. how to separate DB calls to be api calls without fucking everything up.
 
Step 1: Fuck everything up. Step 2: Fix it.
 
no link, but done something similar before, started by factoring everything out into components in their own repos
 
6:16 PM
Do you mean code repos or data repositories?
 
code, every large functional component was turned into a reusable component with an API
 
oa-res-27-90:php-src ajf$ sapi/cli/php -r '$x = 2 ** 64 + 2 ** 32; $y = (float)$x; var_dump(intval($x), intval($y));'
int(4294967296)
int(4294967296)
I FINALLY IMPLEMENTED IT
FINALLY
 
what are we looking at, because that's clearly not the answer to 2 ** 64 + 2 ** 32
 
@Leigh Integer wraparound
That's a bigint there
But I kept intval naïve for the time being so I could test bigint-to-long casting
 
6:23 PM
I thought ints already weapped
 
Converting from float? Yes.
I just finally implemented it for bigints in my bigint branch
 
@AndreaFaulds doesn't look big enough to me ;D
did you get bigints to automatically demote to ints yet?
 
@ircmaxell base64_encode wut
 
Yup
 
@Leigh Nah, I can do that later. It's a free performance gain
Actually, maybe we should deliberately not implement it now
And add it in 7.1
"Bigints now 250% faster!"
"Suck that HHVM!"
 
6:26 PM
How fast are they currently?
 
@bwoebi Absolutely no idea.
 
how can I stop ints being promoted to bigint?
 
@Leigh You can't and wouldn't really need to worry about it
From userland perspective, bigints would not exist
 
@AndreaFaulds what happens with bitshifts and bigints?
 
because if I want to do 128 bit arithmetic it's obviously faster to use a couple small ints than offload to GMP
 
6:27 PM
There's just "integer" which has unlimited range
@bwoebi They have unlimited range
It's like my Integer Semantics patch, except left shifts stretch forever
you can do 2 << 128 if you want.
 
and (1 << 67) >> 66 works too?
 
@bwoebi Yes. It switches to a bigint internally much like any other operation
oa-res-27-90:php-src ajf$ sapi/cli/php -r 'var_dump((1 << 67) >> 66);'
int(2)
Of course, you might want it to be fixed-size and actually 64-bit instead. We could add some math functions for those who need that.
 
but 1 << 63 then will change.
currently it's negative.
what'll happen with bigints now?
 
they break your expectations ;D
 
@bwoebi "Aktuell" becomes "current(ly)" in English... "actual(ly)" in English is more like "tatsächlich"
oa-res-27-90:php-src ajf$ php -r 'var_dump(1 << 63);'
int(-9223372036854775808)
oa-res-27-90:php-src ajf$ sapi/cli/php -r 'var_dump(1 << 63);'
int(9223372036854775808)
 
6:32 PM
jup, that. What about it?
@AndreaFaulds okay, thank you.
 
So basically, 1 << would now act like 2 **, as a convenient shortcut.
It's just safe beyond 63 now
>> is basically the same as ever
 
Yeah, then add a note about that in the RFC, it's not mentioned there.
 
It is.
" Left shifts will promote to bigints rather than overflowing."
It's nice being able to finally remove some bits from the TODO and remove the changes that the integer semantics RFC handled
 
Oh, I understood overflowing in the sense of mod sizeof(long) in this case.
 
The less this RFC changes, the better
 
6:43 PM
yep
It's already relatively complex
 
And the more stuff I backport, the more benefit PHP will get if this RFC fails
 
I think this is your first major RFC with real chances.
 
Yeah
It's my first major RFC
The longest one I've written and the one with the biggest patch
 
@AndreaFaulds eih… the casting one was also major… but withdrawn.
 
6:58 PM
Oh, true
But that's really Anthony's RFC
Even if I did change it quite a bit
 

« first day (1436 days earlier)      last day (3512 days later) »