« first day (1468 days earlier)      last day (3463 days later) » 

11:03 PM
just clicked through daveys internals presentation and at one point got a "wait a minute, that code looks familiar" feeling
 
lol
 
turns out the examples were copy-pasted from the internals book ^^
 
drafting the DMCA takedown notice
:-P
getting a segfault when trying to alloc a new page
 
I think watchpoints are the hardest and most complex code I've ever written… And just as hard to debug :x
 
Hello is this the official circlejerk club
 
11:09 PM
Welcome!
 
It is obligatory to say how much PHP sucks first before circling commences.
 
No but it gets me off quicker
 
user895378
:)
 
@rdlowrey Thanks for the offer - I'm going to stick with 5.4 for the time being....not only do I want to ship this without re-writing chunks of it first, I'd like it to be available for as many people as possible. People are going to stay on 5.4 for aaaaages. The reasons to upgrade are quite minimal until you start using generators.
 
user895378
11:14 PM
@Danack Understandable.
 
Today at work I committed my first Ruby project that didn't use Rails. It felt good.
And before you bash me for using Rails remember that a man's gotta eat.
 
user895378
Nice.
 
I actually like some Ruby things
I don't know about duck typing in general though. I get the usefulness but there's just something about seeing an interface typehint and being able to know what I need to implement.
 
Yep.
 
user895378
Also, @Danack, with the issue you're seeing ... are you by any chance just throwing tons of requests at the same host(s) without waiting for some to finish before piling more on?
 
11:21 PM
@rdlowrey Yep.
A lot.
 
user895378
Okay, then that's likely not a bug, but I've been thinking about why that happens and can implement some things to mitigate the scenario.
 
@cspray The monkey patching also scares the crap out of me. I heard a story about a team of people working on a big project and they were never able to use a debugger for one bit of code because of unknown reasons. It turns out that some monkey patching was interfering with the debugger causing it to crash...and it had taken them years to find out, because the debugger wasn't working.
 
@Danack Yea, I could definitely see that.
 
@rdlowrey slightly odd that it didn't happen in the earlier versions?
 
I'm definitely not a fan of monkey patching
 
user895378
11:23 PM
@Danack well, maybe :)
 
@rdlowrey It's always a bug or a feature.
 
Computers 'eh?
 
user895378
Have you tried upping or eliminating the Client::OP_HOST_CONNECTION_LIMIT option?
 
user895378
Because, for example, if you are retrieving a ton of stuff from github.com it will only use 8 connections at a time by default.
 
user895378
So if you're retrieving a lot of stuff then your requests can really get backed up waiting.
 
user895378
11:25 PM
$client->setOption(Client::OP_HOST_CONNECTION_LIMIT, -1); // no limit, probably not advisable
 
user895378
^ hosts tend to frown on you opening hundreds of simultaneous connections and DoS'ing them :)
 
user895378
But you might try upping it from the default of 8.
 
That would almost certainly crash my router....I can give it a go.
 
user895378
I probably need to have some sort of configurable limit on the number of queued requests and fail new request promises with a TooBusyException or something.
 
user895378
That way you can avoid the WTF scenario of memory spiraling out of control and queuing new requests forever behind slow retrievals.
 
user895378
11:28 PM
@Danack well it doesn't have to be unlimited, but doubling it to 16 or so might make a big difference.
 
Hey, hey @rdlowrey.
Guess what.
 
user895378
what?
 
user895378
woah dang!
 
user895378
reading now ...
 
11:40 PM
RFC could do with some improvement.
 
Is there a technical restriction on private properties being readonly?
 
@cspray Yes.
Well, it's a practical restriction. The semantics would make no sense. To quote the RFC:
>Properties cannot be both private and readonly, since there is no more restrictive scope than private.
 
Why not have it only allowed to be set in the constructor?
 
That'd be inconsistent. Ew.
 
user895378
Several people have suggested this, but for my use cases I actually want to have the ability to modify the property any time as it might persist for the life of very long running scripts.
 
user895378
11:44 PM
Value objects are one use-case but they aren't the only one.
 
Right
 
user895378
And the current RFC allows value objects and the other cases.
 
It's also that, with this behaviour, you can get rid of lots of get functions only there to stop people monkeying with variable values
@rdlowrey And makes value objects FASTER! :D
 
user895378
@AndreaFaulds yupppppppppp
 
Oh, I'm definitely on board
I don't think the lack of private support is enough to stop it from going through
But I don't think like internals
 
user895378
11:45 PM
@AndreaFaulds I'm sure people probably think I'm a broken record but really these kinds of perf enhancements are the most useful things to me :)
 
user895378
I get it; this is PHP. If you need more speed use C. But still ...
 
See, in PHP 7, instance properties get allocated their own slot so there's no indirection.
 
yay to zend_mm_heap corrupted
 
This means you get to take advantage of that at access-time, instead of having a dynamically-allocated property you made, or having to go through __get.
@ircmaxell :<
 
trying on a different machine
works on the other machine
 
user895378
11:52 PM
@AndreaFaulds After the first example in the "Proposal" section you have the following line:
 
user895378
> However, calling push would not error, as it changes $size from inside the class, which falls within the protected scope.
 
user895378
^ You might want to change "protected" scope to something like "guarded" to avoid confusion.
 
user895378
(because protected actually has meaning in the conversation)
 
user895378
And my first thought upon reading it was, "Wait, what? Protected?"
 
It means protected
 
user895378
11:54 PM
Oh wait, I did misunderstand.
 
user895378
duh. Nevermind :)
 
@AndreaFaulds size vs length in the example
 
user895378
How likely is it that accessor method overhead could be optimized away by compilers in the future? Is that a consideration?
 
@ircmaxell Argh, the fact I edited it is obvious, isn't it? Lemme fix that. (fixed)
 
:-P
also, not sure I like the public/protected mix being forced. what if I want a public/private (which I often do)
 
11:59 PM
Also, that's a poor example of the use of this attribute as it could be better done with __get or a get/set. I just had a hard time thinking of a good example on the spot :/
 
yay! the segfault on the other machine in GC is fixed :-)
or not triggered anymore, which is fixed to me
 
user895378
(because it might not make sense to implement this directly for performance if there exists the possibility that function getFoo() { return $this->foo } could be optimized in the future)
 
@ircmaxell Yeah, I'm not sure there. The problem is only having one keyword means I can either make it be public/private or public/protected but not allow both
 

« first day (1468 days earlier)      last day (3463 days later) »