« first day (3246 days earlier)      last day (1693 days later) » 

1:00 PM
@Girgias You should reply to it saying I hit the issue and cc me in. levim@php.net
 
@beberlei indeed
And @Derick and @Ocramius will also be there
 
@JayIsTooCommon when? #lazyweb
 
@DaveRandom early november
 
@beberlei You do a lot of marketing, or just to engage?
 
@DaveRandom 12th - 13th November 2019
 
1:01 PM
I mean, nothing of note on either of those days
 
@Gordon ugh, you're not going are you?
@DaveRandom even more reason
 
@Gordon WHAT?
WHEN?!
 
@DaveRandom you got birthday on two days?
 
WHERE?!
 
@Ocramius Laravel
@Ocramius forever
 
1:01 PM
Oh noes!
 
@Ocramius in your head
 
hmmm
 
do ittttt
 
dunno if I can afford it
will look into it
 
google.co.uk/flights#flt=/m/052bw.BCN.2019-11-11*BCN./m/052bw.2019-11-14;c:GBP;e:1;sd:1;t:f
wtf
 
1:03 PM
flights aren't what concerns me
 
i haven't looked at hotels to be fair
 
also that
but ticket for conf isn't exactly free
anyway, it's not a hard no
what's PeeHee saying?
 
@PeeHaa oi fatty, what u sayin?
 
@PeeHaa @PeeHaa @PeeHaa @PeeHaa @PeeHaa @PeeHaa @PeeHaa @PeeHaa @PeeHaa @PeeHaa @PeeHaa @PeeHaa @PeeHaa @PeeHaa @PeeHaa @PeeHaa @PeeHaa @PeeHaa @PeeHaa @PeeHaa @PeeHaa @PeeHaa @PeeHaa @PeeHaa @PeeHaa @PeeHaa @PeeHaa @PeeHaa @PeeHaa @PeeHaa @PeeHaa @PeeHaa hi
 
@LeviMorrison sent and CCed you
 
1:06 PM
+ @Jimbo ^^
 
And Sean (who is not pingable :-/) and @pmmaga
and @Danack
I basically will end up doing it
 
reunion <3
 
@DaveRandom yeah, I can probably make it happen. :)
 
@DaveRandom I have his number somewhere, i'll ask
@DaveRandom where's Liam nowadays?
*Leigh even
 
1:22 PM
wut
 
@JayIsTooCommon Nope. Bad timing for me :(
 
Reunion? So one big pissup basically
Can't make 12th - 13th of November. I'm in the Philippines
with @PeeHaa's mom
 
Do they even have older version like that in the Philippines?
 
@PeeHaa you suck.
@Jimbo you suck.
 
I concur
 
1:25 PM
Any idea where Sean and Leigh are nowadays?
 
I'd be a PHP Bulgaria otherwise :( I really wanted to go there
 
@Jimbo the line up for Barcelona is impressive
 
@JayIsTooCommon I have seen sean in here a while back I think
 
@JayIsTooCommon so does she
 
uncomfortable silence
 
1:33 PM
That's usually what happens
 
I’ve missed this smut
 
<3
 
Morning!
 
... all is quiet on internals, time to drop an RFC about requiring a top level script to have a function main(): int { ... }....
 
@beberlei yes there's a lot of that with @PeeHaa's mother as well
 
1:38 PM
@PeeHaa is that the same for @Ekin?
 
What is the difference between sortBy(collection) and orderBy(mysql) in LARAVEL?
 
@MarkR Now is the time for attack
 
@MarkR that would be... sensible :P
please refrain from proposing sensible stuff :D
 
Just wait till someone accepts my PR called "Free cake" but actually #defines php_error_docref to zend_throw_error ;O
 
@MarkR they are distracted with whether GitHub is usable for open source: quick, merge everything!
(also: what the flying ...)
 
1:51 PM
s/open source/open source build systems that are reliable and secure/
 
shhh :P
 
I'm mixed... I personally refused to use github for my mission critical stuff when setting up ci/cd... it was shortly after Github had been DDoS'd off the face of the internet and didn't want our container build process to be dependent on anything external
 
My take: if it doesn't depend on anything external, you need to staff your internal systems as well as the external systems would be
 
i can relate only 50% though, how is it that anything external is assumed to be automatically unreliable vs self hosted stuff? i've been to companies that bodged their gitlab updates for days of git outage
 
@Danack You completely misunderstood that mail?
 
1:56 PM
Which means, if you don't want PHP.net to use any external service, that's okay, you just need to either step up to build and maintain the internal service, or fund others to do so
 
It's not taking about build systems anywhere, it's specifically about where projects have their RFC discussions
 
@NikiC I possible misread it - I was replying to this part: "On the topic of self hosted GitLab: let's not reinvent the wheel." - the idea of using gitlab was for the build stuff.... right?
 
I don't think so, that was just in response to the knee-jerk reaction of hosting discussions on 3rd party services
 
16 hours ago, by Girgias
However wouldn't it be better to have a gitlab instance for the PHP.net project if we move forwards with the idea of RFC on GitHub or similar?
/the ironing of having conversations in multiple places be hard to track....
 
It happens... discussion goes on in here, Twitter, mail list, private emails etc.
 
2:00 PM
this is why threaded conversations are important ;)
 
wave
Should I send an email to the GitLab folks and see if maybe there is way for the Karma system to be implemented and/or they have a better system in place. This would still need to be used for the docs and the PECL repos still on SVN (or we could just move them all to git)
 
@DaveRandom you know, if we get enough R11s we could hire a self catering place / villa. Probs be cheaper than a hotel
 
var_dump(ftell(STDIN)); // bool(false)
var_dump(ftell(fopen('php://stdin', 'rb'))); // int(0)
God fucking dammit php
 
Because there are a lot of parts of the PHP infra, bugs, wiki, etc.
 
@ircmaxell @NikiC I assume the conf sort your accommodation for you?
 
2:07 PM
what karma system is needed? With getting rid of /Zend karma, isn't the remaining just down to individual repos?
 
And docs
 
and pecl extensions.
 
@JayIsTooCommon yeah, they are booking a hotel for us
@Danack but those are individual repos, no?
 
Every language has it's own karma
 
@ircmaxell uploading releases to pecl is the main thing.
which is not the biggest technical challenge in the history of mankind.
 
cmb
2:08 PM
@NikiC, int(0) int(0) on Windows. Doesn't look like a general PHP problem. :)
 
@Danack but that isn't git specific, is it? Meaning, karma can remain for non-VC things like infrastructure and release parts. But repo access wouldn't need karma, it could be managed separately (especially if the wiki goes away and is replaced by a repo)
 
@cmb ooh, then maybe I'm allowed to fix it
 
@Girgias I really don't have time to investigate myself, and I hate it when people volunteer other people for a whole load of work..... However, it might make more sense working to containerise everything that is part of infrastructure. The real problem right now is that trying to make changes involves people logging into machines to poke stuff. Containerising everything could get rid of that, which would make it easier to manage.
 
Sadly I have no idea how Docker works :D
 
The thing is that the first stdin that is opened is a FILE, while the second is an FD and apparently those have different seek behavior?
 
2:10 PM
@ircmaxell yes.
 
Gitlab has an existing dockerised version
 
@Girgias you sound old.
 
I know I just turned 21
But it's more that I never looked into Docker
 
@cmb github.com/php/php-src/blob/… I stand by "god dammit php"
 
@Girgias fyi, imo, containers, programming languages that manage memory for you, and autocomplete in IDEs are the main improvements that have happened in say, the past 30 years.
 
2:15 PM
Oh for sure
I just never really needed to look deep into it
 
I use Docker kinda with GitlabCI
 
Yup. Docker in Docker especially is sweet, even if it has its security issues
 
I just have no idea how Docker works but that's something I really should look into
But never had any need sooo
Throwing stuff on a server via SFTP still works :D
 
Docker is really great. It will open up a whole new world of problems you didn't have before.
11
 
cmb
2:16 PM
@NikiC, I don't understand why it fails with ESPIPE
 
@cmb because you can't seek/tell on a pipe?
 
@Girgias fyi - I have an example project (that might work) here github.com/danack/example + some lessons learned here docs.basereality.com/DockerMistakes/#
 
I think that the behavior of "false" is actually the right one here...
not clear why it sets the position to 0 instead.
And people apparently do use ftell to distinguish between stdin being a pipe and a file: github.com/symfony/symfony/pull/33446/…
I guess that code is just broken on windows?
 
@Gordon and those problems are now webscale.
 
indeed :D
 
cmb
2:20 PM
yes, but why it's a pipe? How did you run the script?
 
@cmb php foo.php
from a console
 
@Girgias A few months ago I gave a talk about how containers work. They cut off the demo part where I explained a lot more in depth, but maybe you'll find it interesting: youtube.com/watch?v=XYnyV0P-IY8
 
@Danack thanks will have a read
@pmmage will have a look at it
 
cmb
@NikiC, so why would STDIN be a pipe?
 
@cmb isn't it a pipe if it's connected to a tty?
as it's not redirected
I have no idea how this works / is supposed to work on windows though
 
cmb
2:28 PM
Oh, just found "On devices incapable of seeking (such as terminals and printers), or when stream does not refer to an open file, the return value is undefined." Will check that.
 
2:41 PM
@cmb What does github.com/php/php-src/pull/4684/… give you on windows?
 
cmb
6 times int(0)
 
@MarkR Docker has security issues, full stop. It's fine for things like CI, but running it on any system with any untrusted users is a big nono.
 
Well CI is running code from third party people, things like phpunit etc
I keep my gitlab runners on a separate server
 
@cmb Okay, I think I'm starting to get this ... pipe detection on linux uses S_ISFIFO, which only detects the case of using |, while just having a terminal attached falls into S_ISCHR
While on Windows we probably are already correctly detecting pipes and it takes a different codepath
 
fread() on a blocking socket is sort-of-stupid ... I either want stream_get_contents() on a blocking socket - or fread() on a non-blocking socket
wasted 10 min debugging because fread's $len param is just a maximum (on open sockets)
 
3:03 PM
@cmb Can you check the new patch in github.com/php/php-src/pull/4684?
I think it should now consistently give all false for everything on linux & windows
 
cmb
3:14 PM
@NikiC, the test fails; need something like gist.github.com/cmb69/697190ceb936f89d271eab3b77bb79a8
 
@cmb thanks!
with that additional patch it works?
 
cmb
yes, test succeeds then
fstat(STDIN)['mode'] gives 0x2000 on Windows (regardless of patch); looks very wrong
 
what is 0x2000 in that case?
 
cmb
I don't know. Would have expected S_IFCHR (== 0x20000)
 
3:44 PM
@LeviMorrison rsa, hadn't updated master turned out to be the problem ...
 
4:00 PM
date_create rolls a day back on year 0000 timestamp – #78496
 
@JoeWatkins are you going to php Barca?
 
it's a possibility
 
@JoeWatkins Well I’m down as is Pedroth. Chris can be convinced. A few more and we have a reunion <3
 
yeah would be cool
 
@FélixGagnon-Grenier animal control used a bucket with a lid and a towel or blanket or something with gloves. Made it look ridiculous simple, but I don't have the guts to grab it while it's screeching repeatedly. At least with animal control, they'll hopefully release it somewhere safe.
Now I have bat guano to clean up in places -_-
 
4:09 PM
I'm currently writing a service that polls a GCloud storage bucket for conversion jobs rather than writing an API. I feel the RESTful gods are going to smite me.
 
@Tiffany It's mostly dried bug shells, it's not too gross. A little Windex or 409 should take care of it.
I have bats that live in my yard. I actually encourage it because they keep the bugs down.
They often will overnight on parts of the house and their droppings gather on the front porch or sidewalk. I usually can just sweep them off.
 
@NikiC So, what's your experience with the union types RFC being on github so far? :-)
 
Wouldn't be better to fix PHP stdlib instead of providing bogus types like false or true?
 
Add exceptions to literally everything ;-)
 
4:16 PM
if by fix you mean break, then no
 
@brzuchal no. that'll break loads of code …
 
It would be a HUGE BC break.
New functions should not perpetuate this mistake, though. We should be very diligent about this.
 
Personal opinion, but IMO sooner or later PHP is going to need to effectively depreciate the stdlib and re-create all of the functions in a /php namespace, probably using static class functions (to allow easy polyfill) and mandate exceptions
 
Building a stdlib is an enormous amount of work.
 
@MarkR I don't see this coming.
 
4:18 PM
I agree with the sentiment, but I do not propose such a task lightly, and definitely think we should not do it until we get more features.
 
@MarkR It's a feature to have a stdlib in an easily accessible namespace (namely top-level)
 
Yes, however you can't really use that without nuking BC unless you prefix every command.
 
Notably, if we get generics we'll want a new stdlib at that stage...
 
@MarkR hm?
 
Other notable features such as union types and type-safe callables would be influential in such a design as well.
 
4:20 PM
Well if we (collective we) wanted to change the output error conditions, either it would need to be something like null, or mandate failure = exceptions.
 
@LeviMorrison eih, why? Most code will stay unchanged, and I guess we'll just be able to add generics with defaults so that BC stays ensured
 
Naturally that's entirely incompatible with existing code, so the obvious solution is to put the new behaviour in its own namespace and over time, depreciate the old stuff.
 
Meh
I think before we do that fixing the callable issue and getting generics would be better imho
Moreover for string/array we could try to get String/Array like objects with methods
 
Yup. Scalar object types would be huge.
But there's a pesky multibyte issue to deal with on that front
 
@MarkR why would you change that? not everything "failing" is exceptional. And there is a difference between null (not found/not available) and false (failure).
 
4:22 PM
Basing ourselfs on Nikita's scalar object extension
 
@bwoebi An exception is simply a condition to be handled IMO. Nothing more really.
 
@MarkR Then go write python, pretty please :-D
I just flat out disagree with that
 
@bwoebi I don't think we'll even want the design of much what exists today, even if generics are technically compat.
 
an exception is an exceptional condition which should be handled at a higher level.
 
A "higher level" can be one call up
 
4:25 PM
@LeviMorrison possibly, but that's orthogonal to generics.
@MarkR yes, but usually not.
 
I was checking how Rust handled them last night, pretty interesting style, doesn't unwind but requires you to handle them.
 
I don't think "not found" in strpos should return an exception
 
@bwoebi Kind of. If we go through the work of adding a new stdlib I wouldn't want to make another one after we get generics...
 
Return null yes but an exception, meh :/
 
@LeviMorrison that I can agree with
 
4:29 PM
Girgias, that's why almost every other library in existence uses -1 :)
 
Sure, but I'd say null is better in that case IMHO
 
@Girgias you know that it's a common pitfall to use == instead of === ? (That's why -1.)
 
@LeviMorrison when we get generics?
 
I think generics are going to impact string handling the most in any future stdlib. I'd expect a encoding to be part of them... string<utf8>
 
wtf?
 
4:31 PM
Yeah? That's why I don't use ==
 
I believe nikic's scalar object extension returns -1, let me go check
 
It doesn't
it returns false
 
Ah yes so I see.
 
Wouldn't then proposing for eg new namespace or I a self package or whatever it can be what differentiate from current global stdlib function names be a good idea with depreciation if all old functions.
 
I'd say abolish == :D
It's just clutter at that point
 
4:33 PM
Realistically if a new stdlib namespace is proposed, someone is going to polyfil 90% of it in userland for BC
 
Except if you alias them and deprecate them immediately such that people use the clean api you're going to get both used
 
string<utf8> $input = $_GET['something'];
if ($input.length() > 5) {
// more than 5 multibyte characters
}

Wishful thinking maybe.
 
@MarkR you are entitled to your opinion ...
however batshit crazy they are ...
 
@MarkR Oh, and I don't think that will ever deprecate. We'll just support both forever.
 
@LeviMorrison I suspect you're right.
 
4:40 PM
@MarkR Suggestion on this idea: create a new OSS stdlib which basically proxies to internal functions. Ship it via composer, and get adoption for it. If you can do that, then that makes a case for the design and implementation...
 
but before you do that, question if these things are really problems that need solving, and if they are problems that need solving then why has no framework attempted to solve them ?
(hint: they aren't real problems)
 
We were discussing return types and error conditions @JoeWatkins. If they want to be changed without huge BC, there's only a limited number of ways to go about it.
 
myself and anthony both referenced the same comment
26 mins ago, by Mark R
Personal opinion, but IMO sooner or later PHP is going to need to effectively depreciate the stdlib and re-create all of the functions in a /php namespace, probably using static class functions (to allow easy polyfill) and mandate exceptions
 
Honestly, I think that more stdlib work should follow that model, prototype in PHP, get adoption, then solidify in core. Basically what @LeviMorrison tried with Ardent, etc
 
let's ignore the bit about mandated exceptions which you surely realise is a mistake, why is it that this stdlib you imagine doesn't already exist ?
 
4:47 PM
@JoeWatkins it could be because nobody's sat down and actually tried to design it... And that's a valid criticism. Or it could be because people have only taken stabs at corners of it. Or it could be that it's easy to talk about but hard to actually pull off in a meaningful way without huge other changes (like boxed primitives, etc)
though, to be honest, making a new stdlib is something I would try to do :P
 
well this won't be a popular thing to say ... but, I view the standard library of PHP as I view the standard library of C, not because it's based on that, but because it's unchangable to exactly the same degree, it's not practical to talk about changing either standard library of C or PHP ... I don't get this conversation at all ...
 
(and the reason is because I am obviously batshit crazy)
 
@JoeWatkins because I tried to build one and was unhappy with the features I had available to me :D It's one large reason I started contributing to PHP.
 
Because it's the opposite way of why you would write a polyfill. You take an existing API and make it available to older versions. As PHP has no namespaced standard library, doing so would be futile, as you'd be trying to get PHP internals to copy userland code, rather than in reverse
 
@MarkR except in this case, you are proposing a new API. So building a prototype that can be used and deliberated is a good design process, no?
 
4:49 PM
the thing you are talking about is not a standard library, it's what boost is to stdc++, which is fine, and a nice idea ... but talking about it as if it can replace what we have today is a nonsense ...
 
agree, just trying to redirect the energy into producing code
 
My point was Joe, that you can't really change any underlying behaviour of the standard library without having a way to differentiate existing behaviour, from whatever you might want in the future... be that null on error, exceptions, slightly less messed up function overloading (a-la setcookie)
 
Sometime in PHP 8's lifetime I'd like to see:
- partial function application
- type-safe callables with variance support
 
talking about changing the behaviour of the standard library is not practical, I don't know another way to say it ...
 
These are important building blocks for building type-safe lower level algorithms like map, filter, etc.
 
4:55 PM
@JoeWatkins also, function autoloading doesn't exist. Which means pulling in 'just' functions is a bit harder than pulling in classes.
 
@Tiffany ah you did (: glad it's taken care of.
 
@Danack I had it all implemented at one point ;)
 
@ircmaxell I have a lot of very hacky use-cases for that...
 
I still think we need to merge symbol tables and just have regular ol' autoloading. No special casing anything. It does not seem to be popular.
In PHP 8, I'd like to see a warning of some sort about defining the same symbol name in different tables.
 
mmmm functions as first class symbols, yes please.
 
4:57 PM
make a note about it and/or an RFC
 
> It does not seem to be popular.
 
In 9 we can finally build functionality on that. Function autoloading, function names can be used directly as callbacks, and so on.
 
And I'm probably going to be on my way to PHP London
 
That's a really good example of a couple of people shouting down an RFC by being noisy.
 
have you ever written a patch that attempts to merge tables ?
 
4:59 PM
@LeviMorrison I think merging symbol tables will be quite difficult, but that's anicdotal
 
because I don't see a way to do that without reducing perf looking up symbols, what you're really talking about is merging symbols, not just the table, so we'd need a zend_symbol_t or whatever, and when you perform a lookup, you have to execute additional instructions to check the zend_symbol_t is the type being requested, I don't see a way around that, and I do see it making a difference ...
well of course, the obvious way around it ... is separate symbol tables :)
 
Function names would presumably clash with class names / types, constants and defines. Anything else?
 
@JoeWatkins Actually, by "merge" I only mean "appear to be" .
Internally we can keep them separate.
 
now I can't make sense of what you want to do
 
map(func, $array)
Today, this issues an opcode for fetching a constant named func.
 
5:03 PM
urm ...
map(func::function, $array)
simpler, no ?
 
No, pls no, that's horrible garbage.
In what I am proposing, we issue an opcode for fetching a symbol, but the opcode knows to start looking in the constant table because syntactically we already separate these in the grammar.
 
@LeviMorrison wait wait, why ?
 
What would you expose the function as @LeviMorrison. Immutable closure, something like that?
 
Something like that, yes.
@JoeWatkins 1. functions aren't even something that can logically have constants 2. What do you propose for $class->method? $class->method::function? :cryingblood: 3. Why do you want me to type so many characters?
 
I very much like the idea of being able to do $class->method and bypass the accessor restrictions
Specifically $this->method. Anything that gets rid of [ $this, 'method' ]
 
5:09 PM
@MarkR With partial function application you might be able to do $this->method(...) or $this->method(?) or such, but the UX is much better if you can just use the name.
 
1. we call that "scope resolution operator", functions have scope
2. I'm not sure what is wrong with that, it looks better than [$, "method"]
3. ...
 
4. It's a special case. We have too many of these already. I want features that work generically, and not special case functions and classes differently every time we want some feature.
5. We still have to fix autoloading, which we can do if we also merge the tables.
Again, "merge". At a technical level, they can be kept separately. The only language level constraint needs to be that a symbol is defined at most one time no matter its type.
 
4. you can view it as a completion of ::class, and compliment it with ::const, then it's no a special case but a completion of an existing thing
5. I've seen that work with separate tables
 
5. This grows the engine. My suggestion shrinks it, while simultaneously adding features. This is almost always a sign of good design.
 
you haven't actually reduced net complexity, you've placed some restrictions on the compiler ...
and moved complexity around in the vm, but sum is same
 
5:13 PM
We might even be able to do better meta programming by having symbols like this, e.g. reflect(symbol).
@JoeWatkins I disagree; I think the sum is smaller.
Plus, even if it was the same, the VM handling it instead of programmer is a net UX improvement.
 
that depends, if the intent behind $-> is lost, and it looks like it is, then how is that an improvement ?
 
I didn't follow that one. Could you state it differently?
 
@LeviMorrison uuuu, like that
 
@LeviMorrison you are assuming that $object->symbol is somehow obviously better, and I'm saying I don't think it is, because now $object->symbol means $object->property, the intent is clear ... the intent is clear with scope resolution too ...
 
How many other languages allow properties to conflict with method names?
 
5:18 PM
let's say I'm not calling map, let's say I'm just reading unknown code and come across call($object->symbol), how do I know what that means ?
 
Right now it's annoying that ($this->object)(...$args) is different from $this->object(...$args). I definitely have hit this. Seriously, why should there be a difference between a property that happens to be a closure vs a method? Forcing the programmer to distinguish is a bother.
@JoeWatkins If all symbols are unambiguous, it doesn't matter. Just look it up.
 
Very much agree with @LeviMorrison on that one. I hit that case thousands of times when dealing with thinning out some entity models and moving to services.
The services all use __invoke, and it's not immediately obvious why the () are needed.
 
I think partial function application can ease some of this pain, but I'd still like it "properly" fixed at some point.
 
@LeviMorrison but I don't have too today, and you want to take that way, and I'm not really sure of the justification ...
@LeviMorrison if you were new here, I'd have sympathy ... you know how the language works so it's hard to believe you've really hit this in production code that you wrote, but whatever ... is this not solvable in a simpler way ?
 
I think a key functionality could be added too; if $somefunc($this->method) makes a closure out of $this->method, we can use the accessibility of the scope it is made in, not the scope it is called in. This is another sucky UX point we have today.
 
5:23 PM
The question I'd have about $this->method() would be if method() would mandate being bound to the $this it was called upon.
 
@JoeWatkins In my opinion, we have multiple issues that stem from the same root: we have separate tables. If we fix the tables, the issues go away. Sure, we can keep fixing all those issues independently, but that's folly.
Simpler is not always the best.
In the meantime, partial function application can hopefully ease this pain, doing something like $somefunc($this->method(...)) or $somefunc($this->method(?))
That's better than ::function, imo, and has more features, e.g. $somefunc($this->method($arg1, ...))
 
I was playing about with the ? injection after it was mentioned a year or so back on internals. I ended up wrapping a callable in an object with __invoke, and checking the arguments for a unique class instance, using that to replace the value and passing everything else through
 
And also people can stop using [$this, 'method'], which I still can't believe ever made it into the language. I don't know how anyone ever even thought of it in the first place.
 
[ ] was before objects wasn't it? Closure classes I mean.
 
@LeviMorrison meh it leaves other problems unsolved that other approaches may not ...
you should probably write the rfc and lay out all these reasons in one place ...
 
5:33 PM
Maybe. I think the first step is to put in partial function application, as it is useful outside of the symbol table issue. Hopefully we can get something in.
 
@LeviMorrison At least now we can write fn() => $this->method() :-P
 
It looks okay to me, except for func_get_args() handling.
Which may be a result of optional parameters, which may need changed.
 
Well this was a spirited discussion, I'm off to dream of namespaced libs and roll about in bat droppings :-)
 
Would it be possible for that to work with object methods?
@MarkR Staying at @Tiffany's house?
 
Nah, gotta keep up my quota of being batshit crazy. Don't want to let Joe down ;D
 
5:40 PM
@Trowski Sorry, what is "it"?
 
@LeviMorrison Partial function application. After asking I see that methods are mentioned right away. There weren't any examples though so I overlooked that.
 
cmb
@ircmaxell, @MarkR, if you really take a stab at a stdlib, consider to employ FFI. :)
 
cmb
6:01 PM
@NikiC, fstat() issue was PEBCAC (confused hex and octal).
 
6:12 PM
Is there any elegant way to return an object from an entity when one has an array of arrays, eg [ 0 => ['id' => 12, 'name' => 'sally'], 1 => ['id' => 22, 'name' => 'john'] ]. Or am I pretty much stuck returning an array of objects? I guess it doesn't make sense to have an object of arrays of objects?
 
straw poll: given the RFCs of late, and Nikita's comments about 'holes' in the type system, what % chance do we have of seeing generics in php8?
 
o/
@LeviMorrison I'm making good progress on my finger tree. Should have a working php prototype in the coming weeks. Will be an interesting showdown vs array vs rrb.
@NikiC I apologize if I've asked this before but I want to confirm.. is the get_gc handler called when the object is about to be destroyed, or is there a chance that the object is still referenced after that call? I'm re-evaluating stacking 12-byte zval's without u2, but the only exposure that expected 16-byte zval's is get_gc.
 
6:31 PM
@cmb I'd bet a php-layer proxy to the existing stdlib to be way faster than to FFI, at least for non-major behavior change items
@Stephen I hope high, because that would solve 93% of the problems that people (Laravel authors) tend to bitch about why they don't want to use PHP's type system
 
cmb
@ircmaxell, I won't bet against you on this. :)
Could still be interesting to actually see the perf difference, particularly with jit (which I still haven't looked into).
 
honestly, FFI is pretty slow. for simple functions (a few inexpensive opcodes) it is around 2x faster to call PHP than a C function pointer. For math instructions, I think the breakeven was somewhere around 10 to 20 operations inside the function. Not nothing, but definitely not huge.
it's definitely useful for linking in external libraries (the cost of writing and maintainingn a PECL extension for it is way higher), and if you're not calling into FFI in a hot loop the performance difference likely won't matter. But for stdlib and performance sensitive implementations, I don't think it'll be that useful
 
Who knows, a long, long time into the future, most of the stdlib might have been removed from PHP. Replaced with official signed FFI scripts in the install directory.
 
why FFI? why not the way HHVM did it and just ship it in native PHP and let the JIT compiler do its thing
 
writing code in FFI is ugly as hell and essentially stops short before totally unreadable :) that is from everything anthony did with it and i saw generated from his tooling in my experiments :)
 
6:40 PM
Would still need FFI to access the library functions for the most part no? Even if all your functions, casting and manipulation was in PHP
 
@MarkR for the components of stdlib that call external libraries, sure. But for the string functions, array functions, etc nah
and those are the more interesting ones to me to be honest. Oh, and the thought of doing filesystem lib with ffi makes me shutter...
 
Ah, sure. bad choice of language on my part, I meant the standard extensions
 
Those I think you have a better chance of migrating over time. I'm more talking about /ext/standard, which I think trying to deprecate/rewrite is as @JoeWatkins put it, a non-starter
 
I also think a lot of things could probably benefit from being classified and objectified... no pun intended
Wasn't there some long term goal of removing the resource type?
 
I think Elizabeth Smith at one point had a plan (and IIRC a patch) to convert all core resources to objects. Though not sure if that went anywhere. The streams layer is basically a shitshow so may have run into issues there
 
6:48 PM
redesigning the stdlib seems to me like this "the grass is always greener on the other side" dream that easily comes up when working wit hlegacy software. HOWEVER most rewrite projects fail, and i don't see how a diverse community like php would even start to agree on new APIs
 
Step 1: Agree on underscores ;)
 
example: PSRs. these are a few interfaces each, nothing much. Yet it takes about 5 years to agree on one that defines request and response
 
@beberlei that's why I suggested starting out by building a prototype, that way it could be used and iterated on. And would require solving a lot of the issues up front that are easy to talk about but hard to implement
 
I'm trying to remember the name of the composer package I saw a while ago which had redefined all the string functions to have consistent names, no overloading etc. Pretty hard sell to get anyone to use it mind, natural for the extra calls to have performance overhead
 
@MarkR if the DX is that much better (as is often the justification provided for rewriting the stdlib), then the performance shouldn't matter that much. If it's that much better to work with, then it should be adopted pretty well, no?
(the answer is no, it isn't adopted, because the DX isn't really that bad, and the win from any of the rewrites is marginal at best)
 
6:53 PM
Personally I'll wait and see what happens with scalar objects or whatever they're called.
 
@rtheunissen It will still be referenced after the get_gc call
 
import "strings" into php ;-)
 
Wishful thinking. That's why I mentioned static class methods, as simple as a use statement. Autoloadable etc.
 
7:55 PM
Woot! Got my 2070 Super in yesterday! Just waiting on my mobo and Ryzen 9 3900X to come in by tomorrow and I will be gaming all weekend!
 
Lucky bugger, still completely sold out in the UK
 
I used NowInStock.net to be alerted.
Had to be quick though.
 
SQLite3 version regression – #78497
 
I want to see what they're going to do re: boost clocks
 
Whats for lunch?
 
8:08 PM
@Stephen It's a lot of work. I think this is an important reason it hasn't even been attempted.
 
God feature.
 
What is the best way to implement a notification system?
 
Hire a town crier.
 
8:33 PM
@Danack ping
 
Warning: A non-numeric value encountered in C:\php\ppt_converter\application\lib\vendor\symfony\console\Output\Out
put.php on line 145

Well thanks, Warning. How about a god damn stack trace.... this rant was brought to you by... exceptions 4 all, a non-for-profit group.
 
You really love exceptions don't you
 
Yup. I mean, I love not having errors in the first place. But sadly mankind has not evolved to such a degree that it is capable of producing coders who never make them.
 
Request backport cURL change. – #78498
 
In that case, i'd put a , instead of a . and the value was out of an array, so naturally no type information, so it didn't show on static analysis.
 
9:05 PM
@beberlei Step 1: build something of value that people might actually want.
:)
 
9:25 PM
@JayIsTooCommon pong
 
9:42 PM
@Danack heyo o/ wondering if you fancied php Barcelona this year?
 
@JayIsTooCommon are you on mobile?
 

« first day (3246 days earlier)      last day (1693 days later) »