« first day (3834 days earlier)      last day (1105 days later) » 
00:00 - 22:0022:00 - 00:00

10:00 PM
@kelunik yes. it's funny: I wrote a wrapper to turn that 1 into a 0 because the earlier behaviour bugged me. Now after they changed it, the wrapper returns fine but this came unexpected as the test was for the error.
 
Inquiry. Does anyone see value in a ReflectionPartial->originalCallable() method, or similar?
 
what is a ReflectionPartial first of all?
 
The reflection class for a partialed function. Viz, $p = volume(3, 5, ?); print $p(9);
 
then I see some value in that, yes.
 
what would the use case of that be ?
 
10:07 PM
@JoeWatkins reflection?
 
the use case for originalCallable I mean ...
 
I'm not sure. :-) In case you wanted to see "through" the partial to the original function for some reason?
 
@JoeWatkins yes, me too.
 
well yeah, but I can't think of a reason you would want to do that ...
 
Do we want to be able to tell what values were partialed?
Or closed over, or whatever the verb is...
 
10:08 PM
I would say yes. otherwise you can't go deeper via reflection.
 
@JoeWatkins I added an implementation for ReflectionPartial::__toString (by which I mean I copied and pasted from ReflectionFunction), and discovered that Closure::fromCallable() almost works but not quite.
 
well, that makes a use case for a relation to getParameters
 
Not sure I follow.
 
maybe this: the partial $p = volume(3, 5, ?); has three parameters. #1 and #2 are fixed, #3 can be passed.
the partial is the original callable, it's just which parameters you can pass. was not thinking about it this way earlier.
 
@Crell Go for it.
 
10:18 PM
<?php
$vol = fn ($a, $b, $c) => $a * $b * $c;

$partial = $vol(1, 2, ?);

$reflector = new ReflectionPartial($partial);

var_dump($reflector->getParameters());
?>
array(1) {
  [0]=>
  object(ReflectionParameter)#4 (1) {
    ["name"]=>
    string(1) "c"
  }
}
the related function might tell you which parameters are fixed
 
@Crell I believe it's "bound".
It's been a while since I studied it though ^_^
 
I've read "fixed" ....
 
I'm really stoked you guys are picking it up, and once again Joe shows just how awesome he is a prototyping these things.
@JoeWatkins A quick glance suggests "fixed" and "bound" are both common.
 
Partialed functions unlock so much coolness. :-)
 
@LeviMorrison /me flexes muscles
 
10:25 PM
@JoeWatkins I still don't follow. getParameters() gives you 1 item, because there's one un-bound parameter. The question is whether we want to allow people to get at the 1 and 2, and if so, what the API for it is.
 
@Crell I'm agreeing with that ... but I don't think wanting access to the bound/fixed params should be a reason to leak any more information (like the original function) ...
 
I suggest getBoundParameters or getFixedParameters if you go that route. "bound" matches the SQL bound parameters terminology to a degree.
 
if we use bound in closure terminology, I'd used fixed ... although words aren't my area ...
I know we bound internally, but I dunno if that's leaked anywhere into api/docs
 
@JoeWatkins How would it make sense to allow bound arguments to be reflected but not the underlying function? It's kind of useless to know only one half of that information, no?
 
I'm not sure any of it makes sense, I can't think of a reason for either to be honest, other than testing, and getParameters works for free ...
 
10:28 PM
null dereference in setlocale ・ Reproducible crash ・ #80958
 
@JoeWatkins So getParameters() is the ones that are still unbound, right? Makes sense.
Also, the func_num_args and extra args behavior I think are right in the RFC, but it's the kind of detail that might be wrong :)
 
yeah
yeah implementation wise I'm sure there are edges I don't see ... that's how this works, I spew out a bunch of code and then someone else makes it good (and optionally argues for several years about it)
 
s/optionally//
 
RFC needs new text for named parameters too.
 
Will add that. I just added reflection.
 
10:33 PM
infinite loop in building cfg during JIT compilation ・ JIT ・ #80959
 
idk if this is possible from the PoV of the parser, but ftr I would prefer $ over ? in the context of PHP
as a single-char token for this purpose, I mean
also how does it play with variadics?
oh no sorry that's irrelevant, ignore me
 
@DaveRandom like a crazy fox
 
"partially applied splat" sounds like a really bad time
and also a good night in
 
Sounds like an awesome band name.
 
Splat Operator & the Partially Applied Functions
they would definitely have to do a cover of Make The Logo Bigger
 
10:38 PM
@DaveRandom I really prefer _ but it's not available >.<
 
@LeviMorrison not for the first time, I wish that … was ascii :-P
 
partially applied function doesn't make sense ... it's not a verb ... you get back a partial (noun) function having applied the call frame (bound the args), the action and verb, are apply ...
 
/me votes we bring back the thorn character in English.
 
I do think that $ is the best choice for any usage of "unnamed placeholder token" in PHP, but I can imagine it would create all sorts of edge cases
? is definitely acceptable and reads sensibly
@JoeWatkins "partial application of function" definitely makes more sense than "partial function application" though... a "partial function" does not sound like a thing I want
though "application" is really the wrong word here as well, it really feels like Sales people have got involved in programming again
"stateful function proxy" is what it actually is, which sounds wordy and complicated but it's a complicated idea
 
but you don't apply the function, you apply the call frame and produce a simpler function (in terms of it's prototype) ...
 
10:46 PM
herein lies the problem - "call frame" sounds complicated, it's easier to get people to use your framework if you make it sound shinier and more salesy
though tbf "call frame" is totally a phrase that could easily be made meaningless by marketing
I remember when "cloud" used to have any meaning at all
 
oh oh, we're being hip ... in that case we return a 20 second viral tiktok video, which gives you chlamydia ...
 
no it's fine we just pipe the input to ruby
 
> In mathematics, function application is the act of applying a function to an argument from its domain so as to obtain the corresponding value from its range.
Or, you know, you call a function with args and return value.Partial functions don't evaluate to a "corresponding value from its range", because it's not finished yet.
 
@JoeWatkins Just pushed my current status. Added more named arg tests and reflection tests. Found bugs in reflection for you. :-)
 
yes but that actually does touch on a conceptual thing I had actually forgotten, you don't pass things in to functions, you apply functions to values
you do stuff to things, you don't things stuff to do
 
10:53 PM
@Crell cool
 
I'm sure by now you've partially applied a partial, right?
 
Yep, that's in here.
 
function f($a = 0, $b = 0, $c = 0, $d = 0) {
    echo func_num_args();
}

$f = f(?, 1, ?, ?);
$g = $f(0, ?);
$g(2); // prints 3
 
not 2?
 
10:57 PM
oh the skipped arg becomes explicit
@Crell test that require mental arithmetic is uncool :-P
 
They all use the exact same numbers. :-)
 
sorry facetiousness does not work well in text... though also I would argue there is the potential for something more visually obvious in test output
 
What does it do with functions like implode? I assume it mirrors the one that is supported for named arguments?
 
@Crell the Closure::fromCallable tests are wrong and strange
you are reflecting on the signature to Partial::__invoke
 
@LeviMorrison Didn't implode stop taking arguments in any order sometime?
 
11:02 PM
It's still a franken-function.
implode ( array $array ) : string
implode ( string $separator , array $array ) : string
^ Both of those still work.
But, the top one doesn't work with named parameters, so I assume there's one that is the "main" one?
 
Oy.
 
Having to deal with this stuff is why we get paid the big bucks ... wait, why do we do this again?
 
@Jeeves can reproduce: Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)
 
Because we're masochistic nerds.
And I just checked, implode() assumes the 2-arg version and works fine.
 
"Jeeves can reproduce" looks at pipe
you wat mate?
 
11:06 PM
The bots are taking over!
 
run for your lives!
 
robots, robots, robots everywhere.
 
I gotta do sleep ... I'll pick it up tomorrow sometime ...
nn all
 
@FélixGagnon-Grenier yeh literally just git clone mate :-P
 
nn
@DaveRandom lmao
 
11:11 PM
 
I thought @hakre was already a room owner.
 
yeah that too was one that was long due :)
 
same
there are still some old-timers who have fallen through that net so I will just remind everyone who is a room owner that they are also free to add/remove anyone as they see fit :-)
 
[] add one old-timer to the room's owers
also hockey
 
I would suggest there could be a hat for it but I Hate Hats
open.spotify.com/album/… I cannot recommend this album highly enough (City and Colour/The HUrry and the Harm)
 
11:20 PM
@DaveRandom I was about to ironically ask "why" but then I realized that I do indeed have no idea; unironically why?
 
because "hats" always draws a bunch people to "post 10 posts in chat"
the Haternal September
this would make more sense to bitch about in December tbf
 
that's literally how I got here in the first place, which I agree is an argument against the hats ;-)
I think that's also how @PeeHaa banned me like, two minutes after I got here lmao
I think I was starring shit left and right
 
you are like the 0.0000000001% who posted an 11th message
 
and, tbf, presumably 10 earlier non-bollocks messages
 
11:26 PM
hehehehe :P <3
 
<3
it's a like a 0th world problem
and also not even the right time of year
"oh no, this free platform is occasionally used by others in a way I mildly dislike"
 
in a total unrelated topic, and mostly because it just appeared into my mind; today is the first time I've rewritten a complete git history (2000+ commits) to remove all traces of three files. It kinda felt dangerous while doing it it went surprisingly well?
 
so I don't have direct experience but I do remember this being discussed in here at length once, because of some test fixture that was committed and removed in php-src that added 100s of MB to a clone for nothing
it was a looooooong time ago but there it a shitload of relevant transcript the a cursory search did not find, but if you can be bothered it might be worth it
it's hard to find sensible keywords
@DaveRandom srsly
 
aww man I was very close to actually logging in to listen but then I remembered I hate that
I think it is time humanity reclaimed the hardware in our devices and the social media storage of our lives.
like, a phone should be a augmented reality overlay annotated with our notes, stored locally
looks at the other kites flying around
 
11:46 PM
@FélixGagnon-Grenier tbf I feel like he would be OK with minor piracy over feeding corporations
I pay spotify and netflix money every month and I am a bad person for doing it, but omfg do I not have time for any of the alternatives
I still torrent stuff occasionally, but also (and much more importantly) I make a big effort to spend money on physical/live media in a way that money goes to artists and proper producers
pay netflix and spotify and get your money's worth from the service but also make sure you keep people able to feed them with the content you like :-)
don't feed the Amazon Prime machine if poss probably (tho I do)
 
I have a friend, working in music distribution, who has very strong opinions about streaming, and its place in the global bandwith. I've had some pretty challenging and interesting discussions about it, and I can't say I am any closer to decide whether I'm against streaming services or not.
 
streaming services are The Way from a technical standpoint
 
like... in regard to being distributed to humans through cable?
 
I know that a more direct artist -> consumer medium is the fair way to do it
 
@DaveRandom Fuck you
 
11:52 PM
I mean, unless that technical ignores climate change, I don't think it's The Way, is it?
ohai PeeHaa o/
 
@FélixGagnon-Grenier democratisation of the internet without any technological or specific political change is possible
tho not a topic for either here or now
 
I mean I was pretty good with now on my end, making that pint last and listening to that music you linked :)
which is pretty good now that I think about it
 
the nerds currently rule the world, what we decide goes. just the people in this rooms could seriously fuck some shit up if we decided to, I know how to break into al sorts of stuff and so do you :-P
vive la revolution!
 
00:00 - 22:0022:00 - 00:00

« first day (3834 days earlier)      last day (1105 days later) »