« first day (4241 days earlier)      last day (690 days later) » 

10:14 AM
@MarkR notably, WSL1 is the opposite: it has fast access to the host drive, and a slow internal file system; so if you want to freely mix Linux and Windows tools, that can be a viable optin
 
10:25 AM
@Crell I'm not sure which changes you're referring to specifically, because that RFC is currently quite hard to follow. The "Background" needs to be moved out of the "Proposal", I think. There's also an element of "burying the lede": the section "Why add another function mechanism?") should be the Introduction, followed by concrete examples where explicit capture is "entirely redundant and pointless".
I say this every time people bring up auto-capture: sell it to me. The current feature set is the result of previous discussion, and if we're going to change those design decisions, the justification for that change needs to be front and centre.
the "background" is also lacking the historical background, some of which I outlined here: externals.io/message/113740#113833
 
 
2 hours later…
12:35 PM
morns
 
12:52 PM
@cmb You won't believe it
You cannot even set the READ_AHEAD flag, because the setFlags() methods does nothing
 
wiki.php.net/rfc/fetch_property_in_const_expressions Anybody wanna proof read before I announce it in the mailing list?
 
God do I hate SPL
 
1:07 PM
@IluTov sure
@IluTov How is " $b = (new C)->d->e" a constant expression? the d/e values can change, not?
(as a side effect by using __get(), I suppose)
 
@Derick Constant expression in the technical sense (constant AST). Since adding new to constant expressions they are not pure anymore (as new allows arbitrary code through __construct)
 
ah, ok - maybe make that clear?
@IluTov Also, perhaps you can clarify why this is useful with new? I get the enum case.
 
> (new C)->d->e
 
@Derick It's mostly about consistency, but I'll clarify my viewpoint.
 
What happens if d isn't a property on C?
I mean - it errors but doesn't that take what is normally a runtime error and convert it to a compile error?
 
1:17 PM
you mean a declared property?
 
cmb
@Girgias Well, it parses the parameter into intern->flags right away. ;)
 
@cmb Yeah is aw that just after I sent you this )>.<(
 
@Danack The same as outside of constant expressions: Warning with coercion to null, then the ->e will once again warn because of -> on non-object with coercion to null. 3v4l.org/2DJVm
I'll add at least an example or two.
 
it's just a bit hinkey when including/requiring a file that only defines functions can make
errors that currently occur when code is run. I mean, it won't matter for anyone using static analysis, just a weird error case for people who aren't.
 
@Danack Not all constant expressions are immediately evaluated on file inclusion. E.g. function param default expressions are evaluated once per call, class constants are evaluated once the class is instantiated or used in other ways, etc.
 
1:27 PM
Sounds complicated.
 
2:09 PM
is some1 working with php 8.1.6 on alpine fpm image?
 
> Don't ask to ask, just ask.
 
The output on this code on 3v4l is correct: https://3v4l.org/B8leF
on my local php fpm alpine 8.1.6 image with intl extension and icu version 7.1 I got this output: 05/27/2022

i don't know why. Any suggestions I can check?
 
I bet alpine has modified ICU to have the least amount of data in ICU - perhaps there is a package to install data for all the locales.
 
@Carpenter can you run locale -a on the alpine box.
to see what locales are installed.
 
@Danack ICU doesn't use locales
 
2:20 PM
oh.
 
@Carpenter It looks like you need to install the icu-data-full package, I think by default it only does icu-data-en, which wouldn't have the German locale data
 
hmm okay, how do i install icu-data-full on alpine?
 
like you would install any other package, idk, I don't use alpine
 
@Carpenter I don't use alpine either, because of stuff like this - but the instructions for the package manager appear to be here - docs.alpinelinux.org/user-handbook/0.1a/Working/apk.html
 
okay thank you. i will google that.
 
2:27 PM
considering that the package manage is call apk, I guess apk add icu-data-full, but your Dockerfile should already have some lines to install packages anyway
 
yes this is the way.. "apk add icu-data-full" but before that you need to del icu-data-en with "apk del icu-data-en"
thank you
 
2:55 PM
glad it worked
 
3:12 PM
@IMSoP Does this read better to you? wiki.php.net/rfc/auto-capture-closure
 
3:27 PM
@samayo I have a system76 laptop now... it has solved basically all of the conflicts I had doing dev on Windows with Linux somewhere...my Windows machine is now basically dedicated to gaming and nothing else
 
I got really excited for the phpstorm remote IDE but it still lacks a bit of core functionality... like being able to move files
 
cmb
@Derick, it seems that the new bug78139.phpt fails on master (and maybe on other branches): github.com/php/php-src/actions/runs/2397213357. Can you please have a look?
 
@cmb I'll have a look.
 
cmb
ta
 
3:45 PM
@cm
@cmb I see why - the API in master had been changed from "return FAILURE" to "return false";
@cmb Should be fixed now
 
cmb
4:04 PM
:54648522, isn't there are way to trigger a compile time warning? MSVC apparently only does that for C++, but not C. :(
 
4:49 PM
@Crell yes, that's a lot better; I may disagree with some of the arguments it's making, but at least now it's making some concrete arguments to discuss
 
What do you disagree with?
 
I'd have to spend more time thinking, but the array_filter example in particular isn't particular convincing to me
and as I've said previously, the transaction-wrapping type examples feel like they're calling out for some other feature, not closures
there's also this bold assertion, with no citation:
> The majority of closures users fall into these type of categories.
 
Should read "use cases", I think.
 
yes, but "majority" of what sample? and how were they categorised?
 
That is admittedly anecdotal. But I can't recall seeing the kind of 30-line behemoth closures people tend to be concerned about.
 
4:53 PM
I'm also still very unsure that "fn means capture, function means don't" is a good distinction
just as with strict_types, people will see "shorter is better", and simply not learn the difference
 
Nuno and I dug into that last year. It's the only consistent pattern we could come up with given the syntax that already exists, and dovetails nicely with other constructs both existing and proposed. (Some of that was covered in the background parts I removed at your suggestion.)
 
nonsense; use(*) has been suggested multiple times, and is 100% consistent with existing syntax
 
And is still extra typing that just adds noise; that's exactly what we're trying to avoid.
 
that's where I disagree
PHP has explicit scope; "I'm using implicit scope imports" is something that should be positively asserted
that's where comparisons to other languages fall down: they all have completely different scoping rules from PHP
like I say, this is mostly gut reaction, and maybe I'll be won over; I just haven't been quite yet
the arguments made for limiting the short closures in PHP 7.4 still make sense to me
 
5:13 PM
@Crell an example where longer closures would be likely is when using them as middleware or request callbacks in a micro-framework like Slim
 
5:24 PM
Have an example?
 
I'd be perfectly happy with use (*) or use (...) etc. Multiline arrow would also be fine, either or
 
5:44 PM
I don't understand the problem space all that much; on a purely aesthetical level I'd like multiline shorthand functions. I find them neat. auryn declarations would look lovely with that. it would also perhaps be possible to write absolutely cursed code by stacking match and shorthand functions
 
You can stack multiple closures inside each other now if you wanted to. Please don't. :-)
Well, except for chaining short-lambdas. That has valid uses.
 
 
1 hour later…
6:59 PM
@Tiffany I heard about those laptops, what more do you get out of compared to a dual boot with Linux though?
One of my colleagues has system76 and it's not very portable laptop
 
7:14 PM
@samayo I have a lemur, it's smaller and is portable
17" laptop isn't going to be portable...I think mine is 14"
@samayo not much, honestly, I'm happy with mine though
 
8:15 PM
Fatal error: 'goto' into loop or switch statement is disallowed … grumble a bit … why exactly is this the case, apart from foreach loops obviously?
 
goto in PHP isn't a generic goto. It's more of a named break.
 
clearly someone hated Duff's device
 
You can go "up" but not "down".
 
@FélixAdriyelGagnon-Grenier duffs device is more than just that - in C cases can be put anywhere in a switch.
@Crell that'd be true if only forward gotos were allowed… but it allows you to jump everywhere, but into a loop or switch
 
That's what I recall from the original RFC discussion, anyway. I have never used it myself. :-)
 
8:19 PM
@Crell why are you so old? goto exists in PHP since 5.3…
 
5.4.
 
@Crell docs say otherwise
 
My first PHP was 3.0. I've been on the Internals list since 5.2 was new.
 
(I started with PHP 5.3 and I remember goto being a thing when I started)
 
Hm.
I can't find an RFC page for it, actually.
 
8:21 PM
yes, rfc process is 5.4 onwards :-)
 
But there are RFCs for 5.3 on the wiki.
 
@FélixAdriyelGagnon-Grenier but yeah… I'm trying to transpile duffs device to php and wondering what the best way to solve that is
 
@Crell actually, voting on rfcs is since 5.4. But yes, the first rfcs appeared with php 5.3
 
I used PHP 4 but didn't know it well, then took a two year break from it. So thankfully I mostly used PHP 5.3+.
 
8:29 PM
I am morbidly curious about that mention in the duff's device mail:
> (Actually, I have another revolting way to use switches to implement interrupt driven state machines but it's too horrid to go into.)
 
@FélixAdriyelGagnon-Grenier this just means generators implemented in C as switches (that's just my first guess, from reading this)
I'm suspecting to compile a goto into a loop (i.e. goto foo; /* ... */ while ($cond) { bla(); foo: moreCode(); } I need to generate code akin to $gotoFoo = true; goto foo_loop; /* .. */ foo_loop: while ($gotoFoo || $cond) { if ($gotoFoo) { $gotoFoo = false; goto foo; } bla(); foo: moreCode(); } … blehrgs.
 
9:23 PM
le such friday
 
 
2 hours later…
11:15 PM
@FélixAdriyelGagnon-Grenier I think you will either like this, or perhaps want to stab me:
porque_no_los_dos.jpg
 

« first day (4241 days earlier)      last day (690 days later) »