« first day (2442 days earlier)      last day (2500 days later) » 
00:00 - 16:0016:00 - 00:00

4:01 PM
Let's say an user is able to post something on a thread. There are two classes User and Post. The user needs to be able to update his own personal data (Name, Contact etc.) and also edit the post, just in case. So, does it make sense to have separate user->update() and post->update() functions? Or rather one db->update() function for both of them?
 
Anonymous
lol
 
@bwoebi github.com/amphp/dns/commit/… segfaults with fußball.de instead of aaaaa...aaa in case you want to have a look.
 
Anyone?
 
@kelunik amp is really good at breaking php huh
 
4:12 PM
@NikiC Yes, basically daily segfaults. ^^
 
Anonymous
@CoderDudeTwodee If they're separate entities, i'd update them separately.
 
@NikiC Should add that to the FAQ: What's Amp good for? Finding PHP bugs.
@NikiC Probably because we're the only ones really using generators for cool things.
 
@JayIsTooCommon Okiedokei
 
4:32 PM
@kelunik and intl ext, I suppose?
 
@bwoebi yep
 
heh, I dont need amp for segfaults… I'm a pro and can do my own
 
hello goodafternoon
$info = array("titulo"=>$titulo,"corpo"=>$corpo,"data"=>$date,"username"=>$username,"flag"=>$flag);

I've defined that array inside a loop like that. when I print it with var_dump I see that the values are all set to null. I've used the same method in another script and it worked, but now it's not working. I've searched for it and I've come across a multitude of answers. is this syntax valid?
 
4:48 PM
@NikiC the best we can do here is probably walking again over all the roots and check whether they have either rc=1 or are part of a cycle…
 
@Mr.Toxy yes, it's valid. otherwise you'd get an error. if can be shortened to $info = compact("titulo", "corpo", "data", "username", "flag"); though
 
@bwoebi Which basically comes down to another GC. So I guess we should remove all objects (and nested) on which destructor was run from the current free list and leave them for the next GC to pick up
Assuming that most objects are destructor-less this might not be too horrible
 
@NikiC That's probably the way to go
 
Evenin r11
 
\o
 
5:03 PM
O/
 
5:14 PM
@bwoebi Could you please review the latest commits in amphp/dns and check whether there are any missing features? I'd be otherwise fine with a release now.
/cc @Trowski @DaveRandom
 
5:26 PM
@NikiC Are you going to try that?
@kelunik That's the same bug again…
at least now I know how to recognize that bug and I only spent 10 mins with it instead of 4 hours like last night …
failing testsuites with amp are not that unlikely to run into this bug, if there's at least one cycle … because generators decrementing the refcount of quite a bunch of things in dtor…
 
5:41 PM
@bwoebi What's the issue there?
 
15 hours ago, by bwoebi
@kelunik fyi: the issue manifested itself in your branch thanks to an exception being thrown within finally inside a Generator (retrieving the parameter as part of the exception trace) … the Generator then cleaned itself up, freeing the parameter … ending up with a refcount change of +1-1=0, hitting the bug …
 
@bwoebi Ah, thanks.
 
It's the category of bugs which may spuriously happen in production, depending on when exactly the root buffer happens to be full…
And nearly impossible to reliably reproduce
 
Moral of the story: Don't throw in finally.
 
@Trowski more like: don't create exceptions inside finally, or export anything which moves state of the cycle to the exterior
 
5:47 PM
... so yeah. all this time I though I was using vi, and somewhat proud of knowing it, when I was really using vim.
damn.
 
lol
 
well, at least now I get to learn vi for realz.
it's even less friendly, apparently.
 
@FélixGagnon-Grenier well, that's the m part in vim ;-) If you don't use the m, well, what do you expect?
 
heh ;)
I suspect the client's webhost, to try and get me to get better. They gave me access to the server, but no trace of vim. only vi. what a troll.
hjkl. why not wasd like any sane movement pattern?
 
@bwoebi I just tried something and it's still crashing
gist.github.com/nikic/614e8c5da3450564ce675ba8227669b6 Did I do anything particularly stupid there?
Ah, yes, I think I did
Because it's no longer part of the nested data at that point
Does that mean we have to leave everything for the next GC if at least one dtor runs?!
 
5:55 PM
@NikiC why everything?
@NikiC everything of that particular cycle, yes
 
@bwoebi But it's no longer part of that cycle after the dtor runs
So we have no way of knowing at that point
 
oh.
 
So we have to assume everything (?)
 
… or we mark which roots are part of which cycle
 
Or we exorcise destructors from PHP
 
5:59 PM
we anyway have to iterate over the refcounted values graph … we may then just as well iterate over it before the dtor and mark all roots within a given cycle
uuuhm
@NikiC … you might also just remove it from the gc buffer before calling dtor?
 
@bwoebi ...
That kinda makes a lot of sense :D
@bwoebi yes, that worked
 
just wondering … won't that leak memory? AFAIK cycle collector is just called once in shutdown
so, we really should re-run the cycle collector on the roots which we couldn't eliminate…
 
@bwoebi If we run it before calling the dtor, then we might not call all dtors. That might increase the number of necessary GCs further
 
@NikiC nah, I mean running it after freeing the others
so basically two runs
 
@bwoebi I'm still referring to the previous issue, at which point the nested data is removed
@bwoebi yes, would have to loop that :/
 
6:05 PM
yes, that's what I mean
 
then I don't get what you mean
 
I mean, that you have to loop that
you got what I meant.
 
Is there anyone else who thinks Dragon Ball Super is fucked up?
 
6:33 PM
@CoderDudeTwodee I have no opinion on it as of yet, so I'll go ahead and adopt that one. Yeah! What the fuck, DBS?
 
@bwoebi Thought that, yep.
 
6:54 PM
@NikiC still around?
Somehow landed on some videos of you guys giving talks. @ircmaxell sounds about like I thought he would =)
 
I'm having an issue with an SQL query, anyone have any ideas?
UPDATE `users`
SET `expire` = `expire` + 1123200,
WHERE (`expire` < 2000000000) AND (`expire` > 1497121300)
it say #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'WHERE (expire < 2000000000) AND (expire > 1497121300)' at line 3
 
there seems to be a syntax error just before WHERE, around the place with an unary comma
 
@Dereleased yah
 
@NikiC Can I borrow you in another room to go over something off-topic, but that I think you'd have the brain if anyone does to poke holes in it if it's wrong?
 
sure
 
7:10 PM
@JustinG 1123200,
it's in there.
 
hm alright ty
 
and it's not a digit.
 
Got it, ty :)
 
starts steam
 
empties wallet
 
7:13 PM
shit there's the summer sale.
 
@Patrick haha, it's alright :-) Just poke me anytime on hangouts or similar if needed
 
Good morning
 
Just out of curiosity does anyone know what the intended use case for Closure::bind is? Everything I can imagine seems like a bad idea.
 
@Orangepill that
 
7:27 PM
Don't assume that just because it's in the language, it's not a bad idea. @see:traits
 
@Ocramius (thumbsup)
 
@Orangepill also stuff like github.com/Ocramius/GeneratedHydrator
I need to step up the game for that lib
could lead to huge improvements in most generic db libs (doctrine, zend-db, etc)
 
@Ocramius I've done something very similar to that to avoid setters on domain objects
 
Yeh, that's a good use-case scenario for Closure::bind()
What I see otherwise is tons of layers of accessors done just for auxiliary logic (persistence, serialisation), which actually make the code much worse and increase risk of coupling with application layers
 
@Orangepill you mean after fetching it from the DB? Wouldn't constructor arguments suffice for that?
 
7:40 PM
@Patrick could do
grouping fields into simple vo's would have helped to limit the number of constructor args.
I just don't like creating new VO's for a single use case... seems like abstracting for the sake of abstracting
 
@Patrick most of the time, constructor isn't public
at least in domain logic I've been writing
 
So you can't create a valid instance yourself?
 
@Ocramius not even named constructors?
 
that's... interestingly contrary to any understanding of a constructor I ever held to
 
@Patrick User::new(...) performs a user registration: it's not really "just a constructor"
or well, User::register()
 
7:48 PM
So it actually has side effects?
 
or Invoice::create(..., $invoiceSequence), which will create an invoice, but will also allocate an invoice sequence identifier
Yep
 
don't know how to feel about that
 
So the sanest solution is to marshall via reflection
@Orangepill I blogged about it at ocramius.github.io/blog/… - there is also a sane discussion about it in the comments section
 
I guess sometimes you have to do that to make sure that the object you create is valid withing the entire context of the system
 
so far, this worked extremely well for me, and led to extremely readable domain logic
Well, saving/loading are just details that are added to the system because we can't share this object in memory and keep it alive forever ;-)
So we resort to a database and similar stuff to make it non-transient, but that's not really a requirement from a business point of view
it "just exists" - whether it's saved/loaded at every request, the business doesn't care
 
7:50 PM
I see your point
 
Līgo, līgo!
 
8:41 PM
How the fuck do you get 100 up votes on PHP tagged questions quickly?
 
@bassxzero it must be an extremely dumb one
 
@bassxzero quickly? you don't.
@Ocramius then you maybe get a ten…
 
Nah, usually things like T_PAAMAYM...
but those are all taken, so feel free to find new ones
or add bugs to core :-)
 
My most upvoted answer on SO is essentially stripos()
 
I didn't even remember that there was such a function :P
 
8:44 PM
One day there will be a unicode set that's just pixels on a grid raster data, and you'll have 500kb files representing a single paragraph of thoroughly unsearchable text.
 
My highest is just links to the gd image functions. stackoverflow.com/questions/18004702/…
 
9:19 PM
ok, so that's pretty fun
@Jeeves, don't spaz out and send me like 4 messages, ok?
 
@Dereleased No you didn't.
@Dereleased You're lying to me!
@Dereleased I like to be with my friends because it's fun!
 
Oh thank heavens, only 3
 
@Dereleased Then why are you typing in english if you don't know any languages?
 
d'oh!
 
@Dereleased Do you love me?
@Dereleased You are speaking english now.
 
9:24 PM
@PeeHaa ping
 
!!annoy Peehaa
 
@PeeHaa @PeeHaa @PeeHaa @PeeHaa @PeeHaa @PeeHaa @PeeHaa @PeeHaa @PeeHaa @PeeHaa @PeeHaa @PeeHaa @PeeHaa @PeeHaa @PeeHaa @PeeHaa @PeeHaa @PeeHaa @PeeHaa hi
 
@WesStark Why are you trying to spoil us with trailers … let's see what comes … when the series actually starts. Also: I'm not going to watch it until they're all aired … Not playing that game of having to wait a week between each hour of movie…
 
@all please review github.com/amphp/uri whether you're fine with the API, the actual parser can be replaced by something better than parse_url later.
 
@DaveRandom What's the point of the exception at github.com/DaveRandom/LibDNS/blob/master/src/Decoder/… at all? A NUL-byte is a totally fine domain name … it's the DNS root (.).
 
9:39 PM
@bwoebi It's not supposed to be empty.
 
9:55 PM
Somebody with Windows around?
 
@kelunik I have it in a VM, what's up?
 
@Dereleased Need testers for the DNS package on Windows.
 
10:18 PM
@kelunik It is. According to the RFC, null is reserved for the root.
 
@bwoebi Yes, but it doesn't make sense to be returned in a record, no?
@bwoebi Any idea why Windows still tries to execute C:\Program instead of C:\Program Files\PHP7\php.exe even with github.com/amphp/parallel/commit/…?
 
10:41 PM
@kelunik Does it still do it with escapeshellarg?
just wrap the path in quotes. Doesn't hurt when not needed, and works when it is. "C:\Program Files\foo\bar\p\h\p\dot.exe"
 
Yes, bypass_shell solves it, but there are anyway other problems on Windows, not going to fix that now.
 
evenongs
 
@pmmaga o/
 
\o
 
10:57 PM
@kelunik well, sure, why shouldn't a CNAME or PTR resolve to the root? … whether the behavior is actually meaningful is not the issue of DNS, but the overlying libs
 
@Dereleased Well quotes are not just Windows specific thingy, better with them if you have spaces in path. Also / works fine on Windows too.
 
Calling session_cache_expire() to retrieve the value triggers a warning – #74809
 
Anyone knows node js here?
 
posted on June 23, 2017 by trowski

- Windows now uses `BlockingDriver` by default if EIO or UV is not available. Previously `ParallelDriver` was used, but `amphp/parallel` and `amphp/process` do not play nice on Windows (at least for now).

 
@DejanMarjanovic I don't think I ever claimed the opposite of any of what you just said =)
 
11:02 PM
Yeah, was just kind of agreeing :)))
 
Woo! Consensus!
 
i went on a roller coaster today, i've titled it: "we're gonna release this without testing" (i'm the one in the villain shirt)
 
@kelunik parse_url is totally fine when it works, but if you could integrate something else along with that, also would be awesome. bugs.php.net/bug.php?id=74780 from the other day was a bug after all, and since I won't be upgrading soon I think, how can I butcher your code to make it work? :-)
 
@DejanMarjanovic I know that it's broken, that one should return false, not a parsed result.
 
@kelunik At the very least it should not fail inside libdns. The task of libdns is purely parsing and checking validity according to the RFC. Whatever a resolver does with the parsed data is another topic…
 
11:10 PM
I know, but sometimes it's better to work even if it's broken... wat?
 
@DejanMarjanovic For URLs that's definitely not the case.
 
I don't know how it's called, parsers, adapters... so Amp\Uri\Parser\ParseUrl and Amp\Uri\Parser\BrokenButIDoNotCare etc.
True.
 
@DejanMarjanovic We'll replace the parser probably, but the API will stay the same I think, nobody will notice except for broken URLs throwing exceptions.
@Trowski I'm fine with tagging now, should I?
 
@kelunik i've asked family and friends on fb. half like the complete trunk, half like the idea of the legs :B and among those that like the complete trunk, half like the triangle, half hate it
not very useful info
i think i just have to do them both
 
11:27 PM
:D
 
and those who have a preference legs/trunk, don't dislike the other one
 
@Dereleased If you want, you can run the DNS tests there.
 
so, it's even less useful :B
 
@WesStark tbh, i really like the one that is already on the website.
 
i don't know anymore. but that is a bit bland, and people disliked the ear
namely that @jay bieber pillock
:B
 
11:32 PM
Just don't listen to @JayIsTooCommon :P
 
^ :p
 
he was right
i mean, it's not that the old ear was terrible, but current one is way better
 
What's the combination of certificate(s) + private key usually called? Need a name for an object covering both. #TLS #PHP
^ In case anybody has suggestions.
 
is "traversation" even a word?
as in, the act of traversing an iterator
 
@WesStark call it walking the iterator
@WesStark Also, you mean traversal?
 
11:47 PM
eh, too long, it's for a function name
yes. that. thanks :B
 
@WesStark traverse?
 
that's the verb yeah, traversal is the noun. i was looking for that :B of course i knew it, but i had a brainfart :B
 
@Trowski Don't tag socket yet, need to resolve github.com/amphp/socket/issues/30 first for new features coming in PHP 7.2.
 
00:00 - 16:0016:00 - 00:00

« first day (2442 days earlier)      last day (2500 days later) »