« first day (1939 days earlier)      last day (3013 days later) » 
00:00 - 11:0011:00 - 00:00

11:04 AM
@PaulCrovella what's a laptopish task?
 
@bwoebi not gaming, not regularly compiling hhvm
 
so … what "normal" people use laptops for? k…
 
Wes
@bwoebi use facebook?
:P
 
@Wes ^^
 
oh @bwoebi, about aerys - #1 thing that would help drive adoption/participation would be to get the official docs polished up
some of the english is rather difficult to parse
 
11:20 AM
@PaulCrovella feel free to do a PR, I'm not an excellent prose writer, sadly.
Also, needs more [complete & detailed] docs
That's really something I need help with as I'm myself not a great doc writer :-(
 
hello
 
hi
 
why is that program called instruments :-/ Each time I google, I get music related results :-(
 
what program?
 
Instruments.app for profiling
 
11:56 AM
use xdebug
or blackfire
 
these are for profiling PHP code, not the PHP binary … I need counters for instructions, cycles, cache misses, mispredicted branches etc.
 
hm
never heard about such tools
 
the average PHP developer also never will.
 
any links?
 
seriously, you don't need that low-level profiling … at least not as long you don't write C
 
12:09 PM
@Ekin commodore 64 tape drive
:)
 
oh that's a good one :)
 
That was a proper time waster :P
Also paperboy was awesome back then :P
 
12:49 PM
Oh. I see my latest RFC is somewhat controversial. 2 No votes!
 
@Andrea the list() one? it has three
 
:P
 
1:05 PM
@Gordon er, yes
 
@Andrea Well, stas voted in your favor, so it'll pass.
 
1:29 PM
hmm, to apt-get dist-upgrade or not to apt-get dist-upgrade on a production server, this is the question
 
ThW
@PaulCrovella Skylake got a lot better stepping down if the power is not needed. I get 5 to 10 hours from my i7.
 
@Gordon Just do it tm
 
1:48 PM
@PeeHaa nah, not in the mood to rescue it when it goes wrong
 
VMs are cattle, not pets. When they get sick you don't rescue them, you shoot 'em and buy another cow.
 
ahoyhoy
 
2:25 PM
hahaha
@JoeWatkins ohai
 
TFW someone you don't generally get along with says something you absolutely have to quote in your talk. On the day of your talk. On Reddit.
talking about me, I think ...
 
Now I'm curious what you said :-)
 
wasn't aware we didn't get along ... because I'm not good at humans, I would never have known if he hadn't said ...
 
Hi people, can someone explain this for me?
0
Q: Equal spread using text-align: justify not working properly for Safari

Gjert Ingar GjersundI have this strange problem that I can't properly reproduce using jsfiddle. For some reason Safari does not correctly align the second element. However, in Firefox this works perfectly fine. I have correct usage of spaces after each element. This is what it looks like in Safari And this is in...

Somehow its not being formatted correctly when using PHP echo...
but works fine if I just write it in HTML...
 
Did you check the source?
because you should
 
2:29 PM
I have
Looks the same..
 
You probably have some extra space character i nthere somewhere
 
Could HTML code make extra spaces because of newlines which echo removes?
 
echo doesnt remove newlines
 
whitespaces* sorry
Its weird because it formats correctly when written just in HTML, but the second I use echo it fails...
 
Nor does it remove whitespaces
 
2:33 PM
echo doesn't remove whitespace
 
You are getting confused about how your html is rendered
Did you really check the actual html source?
 
Yes, looks exactly the same...
 
How are you checking it?
 
Using edit as HTML in the browser
It shows the format..
and whitespace etc.
 
The code in your question doesn't match the supplied link...
 
2:37 PM
The one on top doesn't work
The one in the bottom does
 
That is not the raw html
 
I change it to try out
 
Well if you don't provide correct information in your question it's pretty much impossible to make guesses about a moving target
 
The code supplied is what doesn't work. I'll remove the link
See update, added the code that works
 
.... MOAR COFFEEE
 
2:43 PM
always nice to catch it within the edit window
 
Wes
2:56 PM
afternoon
 
 
1 hour later…
4:00 PM
evening
 
whats up
 
nothing new you tell,ain't you partying :p today is Saturday
 
4:37 PM
I almost never party =) spend most of the time in front of the cpu
 
Guys, in this equation HP = (Disp/1000) * [kts / (Cw * HL^½)]^3. Do you know what ^½ and ^3 mean?
 
@phcm ^ 0.5 is the square-root. and ^ 3 means 'raised to the 3rd power' aka cubed.
Exponentiation is a mathematical operation, written as bn, involving two numbers, the base b and the exponent n. When n is a positive integer, exponentiation corresponds to repeated multiplication of the base: that is, bn is the product of multiplying n bases: In that case, bn is called the n-th power of b, or b raised to the power n. The exponent is usually shown as a superscript to the right of the base. Some common exponents have their own names: the exponent 2 (or 2nd power) is called the square of b (b2) or b squared; the exponent 3 (or 3rd power) is called the cube of b (b3) or b cubed....
 
:)
 
@Danack Thanks a lot :)
 
How am I supposed to seriously profile things when CPU is throttling all the time and thus less work is done in a single timeslice causing kernel to switch more often in the total of a run causing more L3 misses as it needs to reload data each time after a switch -.-
I definitely need some liquid helium to spill over my laptop <.<
 
4:47 PM
put it in your freezer
 
That'd be quite uncomfortable ^^
 
sleep 10 && run/your/profiling/job - toss it in and close the door
I mean you don't have to join it in there
 
I just doubt it'll have much effect
 
Wes
5:31 PM
evenin
 
lol, wasting 8% of time in a small array_shift … probably shouldn't use it then...
 
@bwoebi array_shift is terribad
 
@NikiC yeah, it is… but I didn't expect it to be 8% of total execution time
@NikiC what's the best way to do a FIFO queue in PHP?
 
Wes
linked list?
 
@Wes a custom linked list is going to waste a lot of time in allocation of classes though
 
5:40 PM
@bwoebi Circular buffer probably
If only SplQueue hadn't extended SplDoublyLinkedList... now it's become useless because of that
 
@NikiC ugh :-/
circular buffer is going to waste a lot of memory though?
 
@bwoebi I know, can't do that very elegantly in php
 
hello good people :) anyone feel like helping with a bit of script?
 
@bwoebi Well, you can try SplQueue, maybe it's performance is less horrible than one would expect?
though I doubt it, especially if you are working on small arrays
 
Typical case is: many small queues of about a hundred entries.
yea
 
5:43 PM
@bwoebi Is there an upper bound on the number of elements?
 
no
 
try array_reverse and array_pop
yes I know that sounds ridiculous
 
Wes
lol
 
Or; try non-numeric keys
 
@CiaranMcNulty yes it is … especially because I'm constantly adding
 
5:44 PM
@bwoebi Actually, maybe a non-circular buffer might work
 
@NikiC … like?
 
the performance hit with array_shift is mostly the reindexing
 
i.e. just keep top and bot and unset elements at bot
It might work well due to rehashing
Though the factors are likely pretty bad
 
array_pop and array_reverse are both constant time operations
 
@CiaranMcNulty array_pop is, array_reverse isn't.
 
5:45 PM
@CiaranMcNulty array_reverse is linear
@bwoebi Yes, I think a simple non-circular buffer should do in first approximation
 
but is it when you pass preserve_keys = true?
 
@bwoebi So the main problem is with func arg fetches right?
 
well, that I was thinking of too, but it means I'll be unable to use packed hashtables ^^ (@NikiC you wanted to allow offsets to the first element in packed hashes? :-P)
 
If it weren't for that we could just early evaluate args if they contain yield
 
Wes
@bwoebi is it actually that slow? i benchmarked spl's dll and it's quite fast (unless your array is really small)
 
5:48 PM
@bwoebi Yes, but it shouldn't be a big diff. Still much better than array_shift
 
@NikiC regarding generator main stack reusage? yes
@CiaranMcNulty no, it still does a full rewrite of the array
 
@bwoebi It's so close, and yet so far away...
 
@NikiC I can just hint at the vm_stack_restructuring patch again and again :-D
 
heh
 
hm? :-D
 
5:56 PM
@Andrea I'm a bit skeptical about your RFC. On the one hand it is a perfectly reasonable extension. On the other hand in PHP the syntax simply ends up being so damn unreadable
 
@NikiC I don't think so, especially if you span it over multiple lines
list("foo" => $foo,
     "bar" => $bar,
) = $myArray;
When you are going to put it in one single big line, that's fine for maybe up to three keys, but not in general.
 
@bwoebi but ... but, that formatting is wrong!
 
@NikiC How would you format it?
 
@bwoebi If like that, then with list( on a separate line
It has asymmetry now ^^
 
There's beautifulness in that!
 
5:59 PM
@bwoebi Btw, another bug that's going to be ugly: bugs.php.net/bug.php?id=71539&edit=1
 
Symmetry is boring :-D
 
list("foo" => $foo,
     "bar" => $bar) = $myArray;
 
Also possible.
 
(This is how the PSR recommendation would look like :P)
 
I think this is even better as it makes better visible what's being assigned.
 
6:02 PM
list
     (
  "foo"
      => $foo,
  "bar"
      => $bar,
     )=
  $myArray
;
You're welcome.
 
LOL
 
Wes
list(
    "foo" => $foo,
    "bar" => $bar
) = $myArray;
 
@NikiC that's a general issue when the array gets expanded too, I guess?
 
@bwoebi yes
 
@bwoebi mirror symmetry is boring. Rotational symmetry ftw.
 
6:11 PM
It's one of a number of issues we had with indirection
This one is fixable (unlike the ASSIGN_CONCAT etc issue), but I think it will require new opcodes and some trickery
 
we need a list of pointers to the indirects to update when the array gets rehashed. (j/k)
I wish unset() would return the value it unsets in a temporary…
I find it annoying to write:
            $key = key($client->writeDataQueue);
            $client->writeBuffer .= $client->writeDataQueue[$key];
            unset($client->writeDataQueue[$key]);
instead of just a simple $client->writeBuffer .= unset($client->writeDataQueue[key($client->writeDataQueue)])
… or can we just add an optional boolean $preserve_keys to array_shift? :x
 
6:43 PM
@NikiC fine, now it's more like 0.1% of time wasted there =D
@NikiC what was the reason we had EXT_TYPE_UNUSED in the first place? Just a microoptimization of these few icalls?
Ugh, it actually is faster to do if ($obj != null) than just if ($obj) due to the slow cast_obj dispatch to zend_object_is_true ....
(just minimally, but still wtf ^^)
Also… can we please get a faster allocator…? over 14% of time is inside zend_mm_alloc_pages :-/
 
o/
 
8:24 PM
user image
2
 
@Ekin would be easier to serve it directly from firmware, absolutely true.
 
8:41 PM
where would reside a repository of sql equivalence for search criteria (eg. search by title means table.title=:title)
not exactly a mapper
maybe a search query builder
 
@NikiC it'd be better if we had [] syntax
why did I write my own framework
hey, at least it's adapted specifically to my requirements
$app = new App;
$app->post('/users/create', function (array $pieces, array $postData) use ($db): Response {
    if (!isset($postData["email"], $postData["password"])) {
        return Response::newWithError(400, "E_MISSING_FIELDS", "Request is missing required fields");
    }

    $userManager = new UserManager($db);

    try {
        $userId = $userManager->register($postData["email"], $postData["password"]);
    } catch (EmailAddressConflictException $e) {
        return Response::newWithError(409, "E_EMAIL_IN_USE", $e->getMessage());
 
@Andrea For the fourth time now … just use Aerys directly from beginning :-P
 
Eventually. :)
 
9:07 PM
@Andrea Given the topics here, it's because someday someone will want you to present your framework at a conference
 
@Machavity heh
 
hah
 
I give them credit for creative elephpants tho
 
8% of the whole time is in substr() … 88% of that in stupid slow allocator.
 
@bwoebi But maybe it is a stupid substr usage?
Maybe the context allows keeping offsets instead?
 
9:21 PM
@NikiC No, it doesn't. The strings are anyway just 65536 bytes maximum
 
@Machavity can you fix PHP with that?
 
and that's input to fwrite()
(which typically has a buffer of 2^16)
the problem isn't copying, but really just the allocating
 
@Ocramius There was a whole panel on how to fix Laravel using nothing but Legos (hint: replacing your keyboard with Legos will prevent you from installing it)
 
@NikiC I have like one million substr calls in the run though ;-)
 
@Machavity you mean duplo?
 
9:25 PM
@Ocramius Well, if you wanna dumb it down sure
 
@bwoebi the alternative is of course to support string views
 
okay, I admit, I could use a few offsets more…
let me try what difference it makes
 
@NikiC not sure if that'd be worth it.
It's a lot of work for little gain I guess
 
yeah
 
10:07 PM
Okay, eliminated nearly all substr()'s, and the ones left now usually return strings smaller than 10 bytes ^^
(at least in my test cases ^^)
 
Bob, what are you working on?
 
Optimizing Aerys Websockets ^^
 
Ah nice, guessed it would be something like that
 
The two single biggest bottlenecks are Gc with 10% and allocator with 11% … not much I can do about.
All these array allocations go through allocator :-/
1.3% of total time is spent in ZEND_JMP(NZ|Z) ^^
 
@bwoebi maybe get rid of cyclic references, if there are any obvious ones?
 
10:16 PM
@NikiC I try hard to not introduce any, but it's hard to find them
but yeah, there are obvious ones...
but not sure how to avoid these ^^
there is no magic tool to debug gc :-(
 
@NikiC if I'm not using the get_gc handler at all, is there anything I can expect to be broken as a result?
 
@rtheunissen nothing will break, it just will not find cyclic references and thus leak (if you allow custom zvals to be stored inside your objects)
 
Joe mentioned cyclic references, like a.add(b), b.add(a)
Hmm I don't disallow them but I'm also not using any.
I'll just implement it anyway
@bwoebi I'd consider a leak broken.
Also, how is safe_erealloc different, ie when would I use it over erealloc?
 
@rtheunissen If your allocation size is calculated based on a multiplication and/or addition
 
@rtheunissen it has overflow protection
 
10:32 PM
tfw you accidentally reinvent PSR-7
 
@Andrea only the good parts of it I hope? =D
 
@bwoebi heh
my responses have immutability
is that good or bad?
 
@Andrea I'm not sure. You can either inject a response object (which is useful if you want to stream the response to stdout) or return an immutable one
 
user1648409
Hi, someone here has any experience with PHPStorm and SMARTY Syntaxhighlighting? My highlighting doesn't work in SMARTY templates and i don't find anything in google other than: stackoverflow.com/questions/32628337/…
 
Or just return a body with a few headers attached, and don't pass around response objects to things that don't actually need it.
@Shiuyin The highlighting is working in half the file......which seems weird.
 
user1648409
10:44 PM
@Danack Thats an old question i found with a similar problem. In my case: Some files work half (like in the link), some don't work at all. All have *.tpl as a suffix and are assigned to .php in PHPStorm...
 
user1648409
It really sucks to develop with a plain white font on black screen with no highlighting at all
 
....kids these days....tbh I don't know what is wrong. If half of the files are working, I would try finding a file that doesn't have highlighting working, and delete lines until it starts working.
It could be that PhpStorm isn't able to understand some parts of the templates, and so is giving up highlighting them.
 
user1648409
Well, if i remove it to just "<div class="form-group"></div>" it still won't work. There isn't much to remove more
 
Try copying a file that works, to be in the same directory as one that doesn't work, and keep changing it until it breaks?
tbh you might just need to raise an bug on the jetbains bug tracker.
> Finally why in a lot of the Imagick examples is Imagick written with a backslash in front of it? I've never found it necessary to escape "i" and "\i" has no particular significance. It just makes the examples harder to follow.
....that's my user-base.
 
nice
very tempted to raise such important issues on imagick right now
 
10:52 PM
Hey. So. Could we optimise clone to not actually clone within an immutable class whose only reference will be replaced by the result of clone?
 
user1648409
Hm. Thanks anyway Danack
 
i.e. optimise PSR-7-like immutable objects
I think it'd be possible, I'm just wondering how difficult it would be, whether it'd be worth the cost
class Foo
{
    public withBar($bar) {
        $newFoo = clone $this;
        $newFoo->bar = $bar;
        return $newFoo;
    }
}

$foo = new Foo;
$foo->withBar(2);
^ this is what I'm wondering about optimising
There'd be a bunch of conditions you'd have to fullfill:
• The result of this method call will replace the *only* reference to this instance outside of this call
• `__clone` has no side effects
• Something about references probably
There'd be two pieces needed for this at the opcode level. ZEND_CLONE needs to check if $this's refcount is 2, if some flag on the opcode is set, and if a flag on the stack frame is set.
The stack frame flag tells us that the class's only instance is being replaced with the result of this method call
The flag on the opcode tells us that the result of that clone will be returned by this method call
The refcount... hey, that doesn't actually matter if we have that stack frame flag
 
@Andrea That will not have a good ending...
 
11:08 PM
@NikiC yeahhhh
I'm thinking that, while this is possible, it'll definitely mess everything up for some edge-case
 
11:25 PM
The right way process JavaScript exception. https://t.co/sMXqHICudI
you could do this for PHP too
 
@Andrea could probably be added to filp/whoops
 
00:00 - 11:0011:00 - 00:00

« first day (1939 days earlier)      last day (3013 days later) »