« first day (3805 days earlier)      last day (1150 days later) » 
00:00 - 18:0018:00 - 00:00

6:00 PM
I have the 2970WX
and yes, I do, but mostly because I run compilation runs in parallel too
 
How many minutes does it take to compile PHP?
 
let's find out
 
compile, or also configure?
configure is sloooow
 
Just compile
 
2 minutes exactly with the base configure
 
6:05 PM
unlike hphp, which causes an integer overflow if you try to measure it
 
it's 42 seconds, but I have a fairly long configure line
 
I think it took me about 45 minutes using -j3... I was afraid of using all four cores.
 
@Tiffany ew no hyperthreading x_x
 
Can't remember if my configure was convoluted or not. I think someone helped me tweak it a little and improved the performance, but it was still like 10-15 minutes
 
@Tiffany pyrinaphobia
 
6:08 PM
Pyrophobia ?
 
eugh; I'd be able to do so much more internals stuff if I didn't waste a day fighting the build process every time I tried :(
 
@DaveRandom fear of cores?
 
yeh though it's kind of a stretch :-P
 
@ln-s pyrina = core in Greek, which I'm assuming is close enough in Latin
 
@Tiffany Document the debug_get_type page for me and i'll buy you a 6800k off newegg :P
 
6:10 PM
@Tiffany phobia is greek
(right?)
 
@cmb `zend_error()` is indeed what I noticed.

From your comment about memory allocators, I assumed there were more. Reading more carefully, I see what you mean: PHP defines macros for that purpose.

Hopefully later this week I'll get a chance to work on porting over the AVIF PR, and then I'll understand this better :)
 
for some reason, my builds just segfault every time right now
 
Phobia is latin
 
@DaveRandom I think they're originally Latin, but Greek precedes Latin, and Latin stole a lot of Greek words... I think
 
I think
and the only thing I know in greek is Kalimera
 
6:11 PM
anyone have any tips on how to nuke whatever I've done to make that happen?
 
cmb
@IMSoP make clean ?
 
@IMSoP ah yeh that happens, you have ghosts. you have to throw out your PC and buy a new house.
 
Is someone who debugs well a ghost buster
stoner question of the day
 
"via latin from greek"
 
Surely they're more of a code raider.
 
6:12 PM
@cmb I did a make distclean and re-ran buildconf and configure and make both say they succeed, but the resulting binary is br0k :(
 
I have an inkling that the prefix of a -phobia should be greek rather than latin but maybe I invented that
 
The word phobia comes from the Greek: φόβος (phóbos), meaning "aversion", "fear" or "morbid fear". The regular system for naming specific phobias to use prefix based on a Greek word for the object of the fear, plus the suffix -phobia
 
cmb
@IMSoP consider to try with git clean -fdx
 
make clean seems to fix like 95% of PHP compilation problems...
 
turn it off and turn it on again works for programming too
 
6:14 PM
@ln-s the"ph" I think is the giveaway, those letters making that noise
 
@MarkR I mean... it's a basic troubleshooting step, and sometimes debugging is troubleshooting :P
@DaveRandom something something ghoti
 
make reallyclean --no-cleaner-than-that --you-missed-a-bit
 
sounds like my mom
 
--dontforgetbehindtheears
 
Damn, of course I remember to edit UPGRADING and then forget to actually add it :D
 
6:17 PM
emptiness is loneliness and loneliness is cleanliness and cleanliness is godliness and god is empty...
just like me!
 
Anyway, enums are finally merged!
11
 
if anyone wants a laugh, check out the examples in this PHP book: books.google.co.uk/…
 
@IluTov 🎉✨🎊
 
@IMSoP That has to be a troll
 
@IluTov awesome, and thanks a lot for your efforts, they are much appreciated <3
 
6:18 PM
@IluTov nice :-)
 
@IMSoP this is amazing
 
"Steve Prettyman"
xD
 
@DaveRandom You're welcome, glad it happened :)
 
@IMSoP cringe is the correct word
not a laugh
 
I dunno when I got to the <=> I fully lol'd
 
6:26 PM
@DaveRandom We get a quaternary operator? Guess I missed that…
 
starwars operator
 
@Trowski the $a = $b ternary is particularly evil though, if I read it right it will still produce the expected result but for a very different reason
 
Wow, it's like if someone who learned PHP a week ago decided to write a book.
@DaveRandom Oh, wow, I didn't see that one!
 
yeh it's really subtle, almost could get shit like that int foss if there is no code sniffer
reminiscent of the linux kernel hack of the mid 00s
(something that did if (uid = 0), i.e. promote current user to root)
 
oh wow, there's downloadable code examples; check out this PHP 8 code example referencing get_magic_quotes_gpc() github.com/Apress/learn-php-8/blob/main/Chapter%205/…
 
6:34 PM
@IMSoP disappointing, Apress usually publishes great stuff :(
 
I was wondering if they were reputable
 
I agree with @MarkR that has to be a troll, maybe it was supposed to be published on April 1st
 
maybe somebody should drop them a line and suggest they withdraw that from sale ASAP
 
at least, I've bought several Apress books in the past, and I've learned a lot from them... their books tend to read more like books than computer books, which is why I'm fond of them
 
@DaveRandom And above that example he uses a non-existent NOT.
 
6:36 PM
there's too many well-crafted subtly evil things in there for it not to be on purpose
 
this is from about five or six years ago though, so maybe they've changed :/
 
apparently you can buy the whole thing for £24, or pick chapters for the bargain price of £20 each!
 
Reads through replies regarding str_contains(). Eh, well, you're all wrong. Enjoy being wrnog.
 
it refers to function params as attributes
 
More like a nursery rhyme... Mr $a was always comparing himself to Mr $b, wanting to be more like him. Then one evening, a clueless idiot forgot an = in a comparison statement, and suddenly Mr $a was just like Mr $b.
 
6:38 PM
that's beautiful
 
dunno how that wasn't already a thing
 
@Sara str_contains($sara, "salt")
 
@DaveRandom right?
 
6:39 PM
<3
 
@Sara bandaids because we are resistant to just a proper ->scalarMethods() API
@MarkR I'd like to see the string serialized form of @Sara
 
@bwoebi ...like...DNA?
 
@NikiC Assuming disk and memory can keep up, yes.
 
@Tiffany dna won't store brain contents
 
@bwoebi it has to be represented in base-Π or your eyes will melt
 
6:41 PM
@MarkR I ain't salty, fam. Y'all just wrong. It's okay to be wrong.
I have a copy of my DNA around here somewhere. At least some of it, anyway.
 
really? that's so cool!
 
If it's wrong to not want to deal with !== false every time in case it starts at 0, then I don't want to be right <3
 
((not making joke about cells, like... I have a thumb drive with GATACA symbols and shit))
 
how does one come into possession of their DNA?!!
 
Spit in the right tube.
It may not be a complete archive, it might be a selection of segments.
 
6:43 PM
@FélixGagnon-Grenier ugh, again. when a mummy and a daddy love each other very much, they give each other a special hug.
 
@IMSoP one comment I'll make is their Pro CSS Techniques taught me a lot ~8-10 years ago, but it did also suggest using the 62.5% font-size gimmick to "normalize" ems into "easier" to use numbers. It was a technique that had...mixed results, and I tend to see the idea laughed at now.
 
cmb
bugs.php.net/80874#1616005648 : "how do I detect a warning?" – one of these days, sigh
 
or maybe it was rem units, I don't remember anymore
 
I give up, this source tree is haunted :(
 
6:45 PM
@cmb Been a while since I saw Tony
 
34 mins ago, by DaveRandom
@IMSoP ah yeh that happens, you have ghosts. you have to throw out your PC and buy a new house.
I did say @IMSoP ^
 
indeed
 
cmb
@PeeHaa lucky you :p
 
:D
 
@cmb I want to make a mean joke about how he's such an expert programmer and blah blah blah...
🙄
 
6:48 PM
@IMSoP ./buildconf --force
 
The dude who used to tell people they need to be smarter and to "get on his level"
 
we still haven't put the effort in tho, tbf
slackers that we are
 
oh I vaguely remember something like that level thing
 
I don't think he ever said to get on his level, but it was heavily implied
 
oh. I guess that was a constructed memory then :P
oh btw @PeeHaa, I think I remember seeing you play Ark some time ago. Ever tried Valheim? It's very similar but the early solo game is like about 10000% nicer
 
6:55 PM
Nope haven't tried it
Does it do lan multiplayer in a non mongolian way (ark wtf)
 
@PeeHaa I hear it's made by a team based in Australia I think it should be fine
 
omg, I've just wasted like two hours chasing a red herring - the segfault is only for interactive CLI mode; the rest of the build is fine, it must just be readline that's panicking :(
 
@PeeHaa more seriously, I haven't tried any of multiplayer yet but from how the game seems to be made with attention, I would hazard it to be comfortable
 
I should really learn how to debug what's causing a segfault
 
In ARK LAN games you are tethered to the host
If you move too far away from the host you are teleported to the host
like WTF
 
7:07 PM
@FélixGagnon-Grenier Congrats! Now you can kick Dave :P
 
@IMSoP valgrind? (I'm not sure if valgrind would help at all with that...)
 
@Machavity hahahaha can't wait for that. thanks!
 
@Machavity only for the mods to come in and chastise us? :P
 
@PeeHaa that is surprising indeed...
 
@Machavity won't let me do it
 
7:09 PM
@Tiffany I never said nobody would complain :P
 
In the code class Entry<KeyType, ValueType> { ... } what are 'KeyType' and 'ValueType' normally called?
 
I forget where the RO powers stop and mod powers start. I want to say a RO can kick another RO
 
it's the ability to annoy every mod everywhere.....
think it pings all mods online instantly.
 
Autoflags, yeah
Mod flags look like the 10k flag review, just orange and in a different corner
 
7:12 PM
@Danack generic / template parameters
 
I mean, I rarely flag stuff but I'll keep this in mind
 
Chat flags are weird anyways. Need a mod in chat to see them
 
I thought it was for >10k ers
 
The rude/abuse flags, yeah. Mod flags are separate. Kick autoflag is for mods
Had to chat ban someone one day when they wouldn't leave a room alone. 2x kicks is noticable
 
/me tries to flag @Machavity
 
7:15 PM
@FélixGagnon-Grenier ta
 
declines Peehaa
 
If we flag 5 different messages for 5 different reasons, do 5 mods show up and by their powers combined summon Captain Sysops?
 
If you tried, you'd probably summon Taryn. She's got blue feet like Captain Planet, but she wouldn't be terribly amused
 
7:33 PM
so taylor apparently has some new thing octane that does laravel with roadrunner (that seems fair) and with swoole: reddit.com/r/laravel/comments/m778x5/laravel_octane - i wonder how laravel even works with swoole given all its global state.
will be fascinating to see the code once its out :)
 
If swoole could figure a way around swapping statics it would be incredibly formidable.
 
7:52 PM
It's not polished, but here's a modified version of the websocket broadcast chat server from amphp/websocket-server running on the fiber version of Amp: asyncphp.org
 
@Trowski source code available?
 
@MarkR github.com/trowski/asyncphp.org Was meant to be a playground we never really got around to setting up.
 
Where would I go to see the fiber version? Not seeing it in the server.php but it's possible im just blind
 
That is the fiber version.
Updated it so it makes you select a username.
Really rudimentary, but still kind of neat.
@MarkR The more interesting code is in github.com/amphp/websocket-server/tree/v3
The readme there hasn't been updated for fibers.
 
8:07 PM
Warning, I am testing my new powers
 
Well no-one seems to be complaining, so did your new powers fail you? :P
 
yeah
one sec, I got stuck
There, did it
 
8:34 PM
Now just hope you didn't break the build :P
 
Why did I get an email from Reindl Harald?
Is this like something that happens everytime I push a change?
I feel like that review is unnecessary and rude
 
@Dharman he is an abusive troll, ignore
 
He's a complete arsehole. You could forward his email to me, just for posterity, but until someone can make a complaint in Austria, there's not that much can be done.
 
Does he have something automated set up that emails after a push to php-src?
 
i didn't get emails from him when i pushed, so i would say no
 
8:48 PM
Sounds like you have a fanboi @Dharman.
 
I imagine he is subscribed to ML
 
Talking of crazy things..... so if generics are a bit hard to implement internally, would splitting half the problem off, and delegating it to userland people to solve, be completely crazy, or just only a little bit crazy.
 
@Danack IMO the first step would be us being comfortable adding a feature that serves no direct language purpose, which would be adding support for < > at code level, then completely ignoring them.
Let the psalm folks go at it... and maybe it would incentivise PHPStorm to get their act in order
 
is the idea that the autoloading code would just generate a specialised class, with a mangled name like Entry__int__string or something?
 
@IMSoP something like that. Or stored in a new structure specifically for implementations of generics.
 
8:52 PM
I remember a while ago someone did something similar in... i'm going to say Go? They used some odd greek < and > and then did a pre-compiler
 
I know someone who tried to do it in pure PHP
 
It presumably wouldn't be that hard, cache the token stream for the base class, replace the symbols and go
 
@MarkR yeah, but then someone copied that code into a project that didn't have precompiler setup, and they spent two days trying to figure out why there code wasn't compiling....
 
he got quite a way into it, but I think the problem comes when you want to define relationships between different instantiations of the same generic: given B extends A, what is the relationship between Entry<A,A>, Entry<A,B>, Entry<B,A> and Entry<B,B>?
there isn't a straight-forward inheritance hierarchy, but variance checks need to work, or the whole thing is significantly less useful
 
IMHO it would be more useful than we've got now even if it could be embedded into code and then erased.
psalm offers them but they're disconnected from the rest of the declarations which makes them a hassle to use.
 
9:00 PM
here's Nikita saying the same thing is cleverer words: github.com/PHPGenerics/php-generics-rfc/issues/44
 
I seem to remember he got pretty far with that, I at least think I remember a branch where all the class entries had been changed
 
yeah, that page is linked to from this one: github.com/PHPGenerics/php-generics-rfc/issues/45
 
This is probably just flawed thinking, but Entry<A,B> isn't that the same as having a protected A $__a;
protected B $__b; in the class?
 
which I in turn found from this mailing list discussion advocating the "transpiling" route: externals.io/message/111875
@MarkR no, because the type parameter can be used anywhere a full type name would be; so public function foo(A $in): B needs to be specialised to become public function foo(int $in): string or whatever
 
Hmmm does Reflection have a way to generate the token string for a class?
Wouldn't mind a play but writing a full tokenizer is moretime than i've got
 
9:07 PM
if we had types as first-class things you could pass around, then you could maybe twist that into generics with something like protected type $A; protected type $B; and function foo($this->A $in): $this->B
 
I'm just wondering what we'd need to do to get an instanceof check to work legit
 
I think that's the fundamentally hard part
 
We would need to create a base class which replaced all the parameters as mixed, then one for each one with the given types
 
no, that's not enough; have a look at Nikita's example
 
which one?
 
9:10 PM
> Here, the monomorphized class entry for Traversable<B> must be a child of Traversable<A>. More problematically, Traversable<X> must be a subtype of Traversable<X|anything_else_here>,
and as soon as you have more than one type parameter, it becomes even more confusing - both Foo<mixed, string> and Foo<string, mixed> might be valid parents for Foo<string, string>
depending on the definition of Foo, because covariance in generics is super-confusing regardless of implementation
 
So I'm just trying to work this in my head based on the traversable example.

Traversable<B> instance Traversable<A>

So Traversable<B> would go up the hierarchy and create TraversableB Interface and TraversableA Interface, and would extend them (because interfaces).

Traversable<B> would expose the surface of traversable, but would also pass Traversable<A>, because it would effectively have a parent interface... I think
 
it's a slightly confusing example, because they're already interfaces
 
I was just thinking of interfaces because that gets around the multiple inheritance issue
 
yeah; but in the general case, you've then got to have both a class and an interface for each specialisation
 
Right, that's where my mind was going.
 
9:25 PM
I guess that could kind of work, if you could identify which to use for each reference
 
as long as instanceof and type checks always used the interface and not the compiled class....?
 
well, yes, but also everywhere else that's doing type checks
I'm trying to think if there are any contexts where it would be ambiguous, or at least complicated to determine which is relevant
you'd also have to add interfaces on the fly, I think - as soon as someone wrote $foo instanceof Foo<A|B|int>, you'd need to figure out which classes implemented that interface
because you wouldn't know to pre-compile that combination
 
I think that brings us back to the age old problem of having multiple ways of defining a class. Honestly that should be binned.
 
huh?
 
It can't be determined at compile time because it doesn't know which A and B will be until execution. If we had early binding and said to hell with changing classes based on logic, that could be pre-calculated... I think
 
9:32 PM
no, I just meant that you would never have pre-computed it when Foo was defined
 
that would become $foo instanceof FooAInterface|FooBInterface|FooIntInterface
 
that's not the same thing - you might have a concrete instance of Foo<A|B>
 
Then is Foo<A> an instance of Foo<A|B>?
 
it depends on the variance defined in Foo
 
How would you get a concrete instance of Foo<A|B>? It's a generic, there can't be a concrete instance until it's got its params
 
9:35 PM
Well, if Foo<A|B> is valid, then it should be true.
 
actually nm im thinking of the template params
 
Right, I assume the definition here is Foo<typename>.
 
it matters whether Foo declares its type parameter as covariant or contravariant
 
Not supporting union types in generics would probably not be a deal-breaker. It would seem incomplete however.
@IMSoP Is that explicit or implicit depending on where the type is used?
 
that would be an implementation choice
but I think most languages make it explicit
Hack uses +T and -T; Java I think has out T and in T
a quick example of co- and contravariance: gist.github.com/IMSoP/bec95b177e8ae297983984db94ba99ef
that's the simplest case; once you have two type parameters, or something like class Foo<out T> extends Bar<out T> things get really messy
 
9:47 PM
Have an example?
 
honestly, I find it hard to follow myself
 
Coupled with some profiling (or attributes) for automatically building concrete versions at compile time
 
10:02 PM
here, I think, is what happens when you have one co- and one contravariant parameter: gist.github.com/IMSoP/…
 
10:30 PM
@Trowski I dunno, I "understand" generics but I am finding it really hard to think about, I think it might be too complicated
the two concepts are not incompatible, but it makes a logic tree that is too big to hold in your head all at once (at least for me)
I am a stoner tho so...
 
I think if you define the variance rules, rather than trying to create special classes and interfaces, the work for union types is already done
 
definitely on board with rules instead of magic types
 
as in, comparing Foo<int|string> to Foo<int> first asks "is int|string a sub-type or super-type of int?" and then asks if that's a good thing or a bad thing
as far as that particular check is concerned, int|string is just the name of a type
 
if it is an option I would vote for the closure-$this precedent, i.e. add the feature without the decoration and the correct implementation of the complicated bit will emerge from real-world usage of the simple(ish) bit
I understand generics because they have well-defined rules that come from other languages, I want that bit first before we start sprinkling PHP snowflakes all over it
 
@IMSoP Seems reasonable. Most of the generics rules should emerge from the existing co/contravariance rules.
 
10:44 PM
@DaveRandom it's the well-defined rules that are hard, though, that's the problem
we could release a version without any co- and contravariance, but as Nikita mentions that makes it really hard to migrate non-generic code to be generic
 
invariant generics are unambiguous afaik
 
you've still got to implement them somehow
and how you do that makes a difference to what you can do next
 
it gives you a tool to use to build new stuff, which can later be expanded?
 
expanded from a user API, but possibly completely thrown away and rewritten internally
 
So long as interface -> concrete type covariance works, most would probably be satisfied, yes?
 
10:47 PM
@IMSoP yeh that's valid
I do feel like union types are trying to do wheelies before you even took the stablisers off tho
 
sure, if they were a blocker, I'd be fine with dropping them
but I don't think they particularly are
they're just one example of a whole class of problems around handling variance
 
it's not so much that, the fact that I find it so hard to think out makes me worried that rushing it will result it some nuance that is really annoying an unchangeable forever
 
like I say, all you have to know is that int is a sub-type of int|string
 
I really like the idea of people writing real world code with the base model before we try putting a V16 and 22" spinners on it
I have not even had a drink this eve and the colourful hyperbole is as strong as ever
 
think of it this way: if I write abstract class A {} class B extends A {} class C extends A {} then any time I write A as a constraint, I'm actually constraining it to "either B or C"
 
10:53 PM
@IMSoP no that is not all I have to know when it comes to thinking about generics withing generics within generics
 
why not?
 
s/know/think about/ I guess
 
all the variance rules say is "a sub-type is allowed / not allowed here"
so you need to know if something is a sub-type of something else
it's possible I'm wrong, and there is some nuance somewhere, but I don't think it's this huge elephant in the room
 
I am gonna have to go dig out some of the evil code I wrote when I didn't understand generics
I am struggling to put into coherent sentences just how uncomfortable this makes me feel
 
oh, generics in general are scary, scary, things
 
10:57 PM
and also I am well aware the reality is probably somewhere between our two positions :-P
 
@IMSoP Some should be "is this a super-type."
 
@IMSoP I think my general worry is basically this, and it feels like a really bad idea to hand that particular loaded gun over to the general public with no firearms training at all
 
@Trowski that's just the same question with the operands swapped; I think
 
@IMSoP Yeah, good point
 
I do think a release where no variance was allowed might be reasonable; but only if there was a plan for how variance would be added, without throwing it all away
 
11:01 PM
^ that is exactly what I am advocating, with a clear path for moving forward
just a little more cautious than trying to do it all at once
 
there's a temptation to have a release where the syntax does nothing, but that leads to a horrible upgrade path when you realise you've sprinkled it all through your app in a way that's not actually compatible with the new implementation
I do think PHP needs an official static analyser, though
at which point you could maybe have an official version that wasn't the real syntax, but was attributes used by an optional analyser flag or something
that may be bollocks; I'm supposed to be doing the washing up and going to bed :P
 
save time by washing your bollocks in bed
 
no comment
 
I also need to sleep tbf, will apply more brainpower over the coming weeks and bring more shit opinions no-one asked for at random (y)
 
good plan haha
 
00:00 - 18:0018:00 - 00:00

« first day (3805 days earlier)      last day (1150 days later) »