« first day (3901 days earlier)      last day (1030 days later) » 

3:33 AM
@beberlei At the moment, I don't let those parts interact.
@Crell Why do you want to pull it?
 
Spammers now commenting on bugs. ・ Website problem ・ #81183
 
 
2 hours later…
6:08 AM
good mornings
 
Good morning.
 
 
1 hour later…
7:35 AM
Incident with GitHub Actions ・ GitHub Pages has Partial Outage
 
8:12 AM
All issues have been resolved!
 
 
1 hour later…
9:15 AM
\o
 
9:40 AM
o/
 
9:59 AM
ICU has no default value support ・ *Languages/Translation ・ #81184
 
HRM
10:14 AM
Hello everyone.
 
10:28 AM
Hello mojtaba
 
Morning
 
 
1 hour later…
11:33 AM
Morning
 
preg_match fails to match while it seemingly should ・ PCRE related ・ #81185
 
11:45 AM
@cmb at least in some sense we are in a catch 22 situation. Any discussion on internals about moderating user comments or other activity is likely to turn into a shitshow because of the shitweasels who object to any limit on their abusive behaviour.
As well the "well meaning, but overwhelming" activity of people who don't know better, the actual assholes seem feel free to act like assholes on github issues because it's "neutral" territory rather than something owned by the PHP project. I think Github need to implement something like this: github.com/AlwaysSeptember/AccessControl before it's going to be a great long term solution.
But they aren't going to as that's contrary to their strategic goal of making github be the single developer platform that people use.
 
krakjoe@Fiji:/opt/src/php-src$ cat test.php
<?php
function gen() : Generator<int> {
    yield "string";
}

try {
    foreach (gen() as $int) {
        var_dump($int);
    }
} catch (Error $ex) {
    echo $ex->getMessage() . PHP_EOL;
}

function gen2() : Generator<string> {
    yield "string";
}

foreach (gen2() as $int) {
        var_dump($int);
}

?>
krakjoe@Fiji:/opt/src/php-src$ sapi/cli/php test.php
gen(): Return value must be of type int, string returned
string(6) "string"
 
cmb
I have never tried, but I think GH allows to report abusive comments.
 
what if we started there ...
 
@JoeWatkins giving a shot at generics? :-D
 
not full generics, more like typed generators
 
11:49 AM
@cmb they do....but it's not close to being adequate....github support are getting overwhelmed with moderation requests.
 
@JoeWatkins Generators have three types though, a) what they receive, b) what they send and c) what they return
 
we'll chat in a while, gotta go afk an hour now, but I think what we're interested in is the yielded (generated) type
 
cmb
@Danack probably, we'll have a moderation issue with bugnet as well, if we queue up comments for moderation :(
 
The Jeeves posting of bugs works reasonably well. I've made a webpage that displays that info also, and was planning to add a similar feed for comments waiting moderation.
 
@JoeWatkins we are also interested in knowing/restricting what type can be sent in, but for sure the primary type is the yielded type (out)
 
11:54 AM
@bwoebi 4 actually, because key types :P
 
does anyone use generator key types meaningfully? :-P
 
amongst the many types are a) what they receive, b) what they send and c) what they return d) the key types, e) such elements as fear, surprise.... I'll come in again.
 
I remember some code doing that, but ultimately doing away with it in later versions
 
cmb
@Danack there is also news-web.php.net/php.bugs
 
@cmb One of the major downsides of an email list for anything that needs moderation is that you can't recall emails easily.....but still not hot-linking links (other than whitelisted domains) would probably be a good idea for that list also.
 
11:59 AM
o/
 
@Danack docs mailing list is less of a shitshow
 
@Tiffany but maybe spammers still think getting links in there is a 'prize' to be won. Even if the link is removed from bugs.php.net it still persists in the email list archive.
 
@Danack I mean presenting a topic to docs mailing list may be more productive than what you're used to on internals
 
cmb
@Danack Ah, I meant that we already have that list, so we already have a feed for moderation. But yeah, spam on that ML is bad.
 
the converse problem is you may not get many responses
 
cmb
12:04 PM
webmaster ML seems to be more on topic than docs
 
In other news, bugger:
England played against Scotland last friday....and all the pubs were packed.....so there's going to another couple of weeks of huge increases....
 
Morning
 
hi
i want to know for laravel developer angualar or react or vue js
which is best ?
hello any one tell me ?
 
@RakeshkumarOad I'd suggest going with what the rest of the Laravel community uses, which I believe is vue.js.
Also, waiting more than 4 seconds for a response to a random question.
 
thanks @Danack
but in the markeet react is more popular ?
 
12:18 PM
Yes, and I prefer it myself. But you asked for a laravel developer. And most laravel projects are (probably) going to be using vue.
For the record, I think the decision to choose vue was because it makes it harder to move away from Laravel.....rather than it being a great choice. But that's a different topic.
 
@Danack thanks for sugestion now i will leran vue js i am laravel developer .
 
React is a pretty solid platform too.
 
thanks i am laravel developer and vue is best for me ?
 
I don't know if there's something about Vue which makes it more suited to laravel.
 
@Danack what is this ?
 
12:23 PM
COVID
 
ok thanks
 
@bwoebi I don't know what the hint for return or input looks like
key and value is easy enough ...
also, I'm not sure if separate issue
 
@RakeshkumarOad if there's something you want to discuss, you can talk about it in here
I don't accept blind invitations
 
hi i am looking for job or freelancing work
 
12:41 PM
@JoeWatkins what do you mean with "hint for return or input"? the defaults would be mixed
and mirrored in the signature of send() and getReturn()
just like yield should be mirrored in the return type of getCurrent()
 
12:53 PM
morns
 
hello guys
I wanted to ask a question about Apache web server
I have an app where instead of getting host:port/staticfile I want to have all the URLs as host:port/app_name/staticfile,
how can I add "app_name" in all the app URLs by default?
 
1:15 PM
Im having trouble inserting a variable or function name inside a HTTP POST Header
ie:
$headerValues = [
			'X-EBAY-API-CALL-NAME: GetSingleItem',
			'X-EBAY-API-SITE-ID: 0',
			'X-EBAY-API-IAF-TOKEN: '$var
			'X-EBAY-API-VERSION: 515'
			"X-EBAY-API-REQUEST-ENCODING: XML",
			'Content-Type: text/xml; charset=utf-8'
		];
$var breaks it
and not sure how to remedy
 
because it's just some random bit of syntax hanging out in the middle of nowhere, you need to put a . before it..
'X-EBAY-API-IAF-TOKEN: ' . $var, (edit: added the trailing , too)
The same goes for the api version, it needs to be followed by a comma
 
Hi Mark, Thanks for the tip. My bad on the API Version this was accidently done while removing sensitive fields
Lemme try this
brb
Cant believe I missed the . It looks so obvious now that you pointed that out but still having problems
THANK YOU @MarkR
 
1:34 PM
:-)
 
During a scramble I was forgetting the trailing comma
as it doesnt even look right with the comma after a var like that but it works and I learned some new basic PHP, Thanks again
 
get a proper IDE if you don't already have one, it will flag up things like that immediately
 
Will look into it. Thanks again
 
1:48 PM
@cmb worth to notice, libzip 1.8.0 is released, new dependency on libzstd (and PHP already aware of this feature and offer it if available: PHP --ri zip => ZSTD compression => Yes)
)
 
cmb
@RemiCollet yep, already seen this; need more free time to work on that ;)
 
@cmb btw, this is only a notice, for your Windows users ;)
RPM users already have benefit to this new feature :p
 
cmb
ah, now the are my users ;)
 
@cmb also notice libzstd >= 1.3.6 needed (not properly described in the libzip archive) but you probably already have something newer
 
cmb
yes, there is libzstd 1.4.5
 
2:25 PM
RobertKaf ・ *General Issues ・ #81186
 
2:56 PM
@LeviMorrison I don't want to pull it, really. But Joe had suggested doing so at the start of the conversation.
 
@Crell Sorry, what conversation?
 
I'm debating if I should try and make a stronger case on list or blog for making function composition easier, which is ultimately what partials and pipes are about.
PFA.
 
@Crell That can't hurt, but I don't think you should stop the vote because of that unless the RFC changes significantly. You can certainly write a blog post and share it on the mailing list.
If people are convinced they can still change their vote.
 
Will Internals voters actually read a blog post link, or do I just double-post it? :-)
 
I'm pretty close on writing a rant and sending it to that thread....
 
3:10 PM
@Crell Double-posting can't hurt but still doesn't guarantee they will actually read it.
@Girgias What thread?
 
PFA
 
What kind of rant? :-)
 
@Girgias What happened?
 
In favour, but main points are "if we shouldn't implement things that are not used currently" then why the fuck did we add a JIT, Fibers and Intersection types, if I would have known people would use short functions as an argument against partials, I would go back in time and change my reluctant yes to a solid no, and Pipes are the proper solution to code like this:

$o->method1()
->method2()
->method3();

Which apparently no one has an issue with that you change the return type to make it more convenient.
 
That's the more ranty version of what I'm thinking of, basically. :-) I by chance watched a superb YouTube video on composition in FP last night that makes me want to try again to make the case for it.
 
3:16 PM
Also I can "kinda", understand what's going on in the partial code, I can't say the same about the variance code I wrote for intersection types
 
"No, we don't usually write code this way right now. That's the problem."
 
Oh and also the edge cases, PHP has a shit ton of them, and nobody gave a flying fuck in trying to fix them during the PHP 7 release
We could have addressed whacky implicit conversions, the mess that are our offsets, etc. but nah
 
@Girgias To be fair, I think lots of people changed their minds on JIT. Partials are not hard to understand on the surface but there are quite a few edge cases that make the implementation more complex than I thought it would be. I just don't see them having the same potential as other people do, which is why I voted no. I think the issue partials and pipes are trying to solve are better solved with scalar methods.
@Girgias Sure, PHP has edge cases. But we don't need to add to them of course. You've worked hard to reduce them in the last few releases.
 
Whereas at this point, I think scalar methods are better solved with pipes. :-)
 
And although the current strict_type behaviour is subpar, that just reinforces my idea that it was a mistakes
 
3:20 PM
@Crell Hence the voting system, people don't always agree :) Some things are not objectively right or wrong.
 
Scalar methods only work for functions that are going to be added to them, they are not general.
And the technical complexity aspect, is a valid one and a *good* reason to vote against it
But that same complexity exists for intersection types IMHO and that feature isn't really even complete
But minus the edge cases (although not being able to mix and match could be considered and edge case...)
 
@Girgias Yes, but scalar methods also likely cover 80% of the cases. For the rest, I don't think pipes add a whole lot of value. Having a few temp variables variables is not harder to read IMO.
@Girgias True, which is also why I didn't vote on that one :)
 
It's not just about avoiding temp variables. I am perhaps under-selling it if that's what people go back to all the time.
 
For github pages, if I can't enable https because:
> Enforce HTTPS — Unavailable for your site because a certificate has not yet been issued for your domain
 
@Crell That's exactly what it does though. a() |> b(?) is just another way to write b(a()) or $tmp = a(); b($tmp). I'm less convinced by pipes than partials.
 
3:26 PM
do .....I just wait?
 
There's what it does on a technical level, and what it enables as a conceptual level.

Both partials an pipes are about small technical changes that enable huge conceptual improvements.
 
@Crell I can see that with partials, but I'm not sure I'm convinced pipes can change anything on a conceptual level when it's just a simple syntactic change. Maybe you can change my mind in your blog post :)
 
@IluTov For a single usage of pipes, probably not much advantage. It's when you have multiple chained together because now you can see the dataflow is trivial. If you used variables for those intermediates you have to actually read the code, rather than just the syntax, to see the dataflow. This allows you to focus on the behavior, instead of both behavior and data.
 
Challenge Accepted! (Now to find better, non-contrived examples... That's the hardest part, frankly.)
Honestly, that's why I used the PSR-7 example initially. Because piping a bunch of things together is 100x easier to read than the double-nesting of a bunch of PSR-15 middlewares. Seriously, that thing is a mess in comparison. :-)
 
@Crell Double nesting isn't necessary though with variables :)
 
3:33 PM
@IluTov You still have to read the code to see the dataflow, although perhaps in that specific case it would be obvious, due to the nature of middleware.
 
But that's my point. It enables different architectures if you think about it in pipe terms.
 
@Danack apparently visiting the site via https triggers the certificate request....
 
I think there are a few reasons why scalar methods are objectively better than pipes for arrays/strings (better IDE support, shorter names due to contextual namespaces, opportunity to introduce better API). Since I believe that covers around 80% of the use cases for pipes (no evidence for this number) I'm not sure partials/pipes are worth it. But anyway, I'll check out your blog post.
I'd also add to that list: * More natural syntax (-> vs |>) * Simpler (no need for PFA for simple things like array_map)
 
"Scalar" methods requires extension methods. I haven't seen any proposed viable way to do them...
 
@LeviMorrison I suggested extension methods in R11 a while ago but I think the general consensus was that we want a fixed internal API for arrays and strings.
 
3:41 PM
Iterables are important. Arrays are common, yes, but eventually Traversables slip in there and you need to idiomatically handle either case.
 
we do, otherwise, libraries can't rely on the API if it's changing.

or we do both, have a `AbstractArrayScalarMethodHandler` that others can extend. this way it's guaranteed that some methods will always be defined.
 
I disagree that's a consensus. I actually think it's a very bad idea.
 
@IluTov oh, first time seeing this, i think it's great!
 
We're up to 30 total votes, at least. Was a bit nervous about the lowish turnout.
 
That's bad for me, if I want to try and convince people. :-) If they've already voted they're more likely to have checked out.
 
3:54 PM
Another point: * Avoids the the needle/haystack problem
 
So do pipes if you use them correctly. (They do that without needing partials, in fact.)
 
@IluTov For some cases, perhaps. I'm pretty sure named parameters are the way to avoid the haystack needle problem...
 
@LeviMorrison True, but makes the code yet again longer and involves more language features.
 
"Make the code as short as possible while still as clear as possible" is a tricky dance, and the obvious approach is rarely the correct one.
 
How would we make extension methods work for arrays and iterables? Say map exists on both. What does $array->map(...$args) do?
 
3:59 PM
@LeviMorrison I'm not necessarily suggesting extension methods. A fixed scalar method API would also make me happy.
 
If it doesn't work for all types then I'd vote no.
Or at least all builtin non-necessarily-object types like iterable.
 
@LeviMorrison In an optimal world we'd have Swift protocols which allow extending arbitrary types. I don't see that working for PHP in a way that doesn't completely kill performance.
 
Presumably it only has bad performance if the method is an extension method; regular methods wouldn't be affected, I think?
 
Also, people were scared that userland would come up with shitty userland extensions and thought it would be better to create a fixed API instead.
 
I have the same worry about internals, so there's no winning that.
 
4:02 PM
@LeviMorrison Yes. But I think array/string manipulation is very common and should be performant.
 
LOL.
 
@LeviMorrison I don't necessarily agree with that point. If it lives in userland it's also much much easier to evolve than if it's baked into PHP.
 
@IluTov I would focus on opcache/JIT optimizations for it then.
 
@LeviMorrison I think caching can help. It's enough to resolve each method for each type in each file for the first call and then cache that. But it's still not simple.
 
4:28 PM
o/
 
\o/
 
Rlipdak ・ *General Issues ・ #81187
 
4:43 PM
Oh crap, Tony is back.
 
@IluTov I think we're far from consensus here, because I want them too :-D
Just that I'd like a generally applicable version of this, not specifically designed around scalars, but also objects
 
Heh. Tony is against PFA. Surprise surprise. If anything that's an argument in its favor. :-)
 
The main issue is how will that look like @IluTov - and by the way, I think traits are more natural than classes with static methods.
 
5:01 PM
@Crell just for your personal 'pleasure' presumably? aka can't see it on list.
 
Oh! Looks like he did just email a couple of us directly, not the list. Ha. Good, easier to ignore.
I was wondering how he even got on the list at all.
 
if you feel like it, ask him if he's got his OAP bus pass yet....
 
/me doesn't get the reference.
 
oap = old age pensioner....yes I'm being age-ist.
 
BrE "OAP" == AmE "senior"
 
5:08 PM
At some point younger people need to proactively tell older people that although they might not like change, they aren't allowed to stop progress.
/hoisting on petards intensifies.
 
Technically one is hoist by a petard, not on a petard. A petard is a kind of land mind or grenade, so you're being blown sky high by your own explosives.
 
Oh dear, Tony responded on list. Edit; apparently privately
Isn't he banned?
 
yes.
5 hours ago, by Danack
@cmb One of the major downsides of an email list for anything that needs moderation is that you can't recall emails easily.....but still not hot-linking links (other than whitelisted domains) would probably be a good idea for that list also.
 
5:27 PM
@Crell having no idea what a petard is, isn't the expression "foisted on one's own petard"?
I am wrong.
> Hoist with his own petard
 
"hoisted" being "thrown upward", I think
and a "petard", as Crell says, being like a hand grenade
 
5:48 PM
I like this extension methods idea ... it looks interesting ... this probably means we shouldn't do it ...
 
anyone know where github.com/Homebrew/homebrew-php has gone, or where to look for the homebrew imagick 'recipe'?
 
@SaifEddinGmati while there's enough time left for me to write sealed classes, I'm still working on literals right now, and may have to go back to pfa (assuming a miracle happens during voting) ... I think we ought to target 8.2 at this point, because even if I got the implementation ready, I don't think people would be prepared to vote it in in the final hour ... sorry about that, I really thought we could get it done ...
 
@JoeWatkins not a problem!
 
I've sat down in the last couple of days to do it, and been distracted by other things, and I'm sitting here thinking I might have time tonight, but now it feels like I'd be rushing, and I don't want that ... I'll still do it though, don't worry about it, just a little later ...
gives us time to get it properly right, go back and forth a little with internals ...
 
Not a problem, take your time 👍

I'll wait for 8.1 to be released, then i will move it into discussion targeting 8.2
 
5:57 PM
oh maybe even earlier than that, I won't need until november :)
once features are stable in 8.1, sometime after freeze, shortly after I would hope ... I guess realistically I'll be quite busy until freeze ...
 
Maybe I can just see into the future:
yesterday, by Girgias
@NikiC Didn't Tyson bring this up on the list recently?
 
You can only see into the past.
Because light needs time to reach your eyes.
 
stop being pedantic Derick, what are you, Reddit?
 
What's a Reddit?
 
A social disorder
 
6:05 PM
@Derick quite a lot of gypsies would disagree with you
 
@JoeWatkins Not even gypsies can counter the effect of physics.
... also, another syntax to do arrays?
 
@Derick yeah, me too ... I'm not really understanding the motivation for that ...
 
@bwoebi That's good ^^ I think extending the RFC to support arbitrary types is possible but I'm not sure if it's feasible in a performant and memory efficient manner. Also, references can't work (as Nikita explained on the list recently).
 
it's been a while since I saw a programmer typing on a keyboard ... do any of them type with one finger ?
I can't really tell the difference between "this" and that:
they seem to happen in about the same time ...
 
@bwoebi What I do really like about Swift is that they share a lot of methods for different data types through protocol extensions. This means they only have to be implemented once and work for all things that meet certain criteria. Also means API will be automatically consistent across the board. Our disadvantage is that we can't do these things at compile time.
 
6:19 PM
@JoeWatkins Don't think so … with one hand, sure … but a single finger? nah
@IluTov yeah, sadly a complicated lookup for PHP :-/
obviously you can cache the polymorphic ptr, but still.
 
6:39 PM
@JoeWatkins I interviewed one who did a bit ago. It was excruciating.
 
hahaha, it sounds it, I was trying to be funny .... if you type with one finger, it might be reasonable to talk about saving a few chars, but if you type like a ... typist, which we all should be, I think, it's pretty core stuff ... it's not much of an argument ...
 
if I import nodes from an XML file into a new DOM Document via importNode(), will there be a root node in this DOM Document? I tried writing a script to check 3v4l.org/KcQfj but it doesn't appear the nodes append to a root node
(sample XML is simple, and doesn't really need to be appended to a separate root node, it's just that... a sample... I'm working with a bunch of other nodes that need to be separated)
next generation of programmers may be learning from phones/tablets, which may increase the amount of programmers who type with one finger :S
 
oh my god, that's a horrible thought
 
Too busy watching clips on tiktok to learn to program
 
6:55 PM
my niece is interested in learning to program but she doesn't have a laptop (and yes, I plan to resolve that eventually...), but she does have a wifi phone (no cell plan)
 
how old are they ?
 
13, I think?
 
can't they go and steal a laptop like a normal teenager ?
:D
I ask because I tried at several ages with my eldest, it started to work at about teenage ...
 
... you tried to teach your eldest to steal laptops? :O
 
haha
 
7:42 PM
@Tiffany as I understand it, importNode doesn't put the node anywhere, it just sets its "owner" to the new document
so presumably the target document doesn't actually change
 
 
2 hours later…
9:24 PM
One problem of being an advanced developer: I have a hard time developing examples of bad code to fix, because my brain naturally refactors it to be less bad before it reaches my fingers...
(How's that for egotistical?)
 
9:55 PM
@Crell Do you need access to my companies GitLab for inspiration?
 
@Crell I'll share some code with you :P
 
hehehehe.
 
just wait for some question links to be posted in here
 
10:54 PM
OK, looking for friendly reviewers for this blog post. :-)
 
11:10 PM
What is it on @Crell?
 
Trying to make a stronger case for partials and pipes.
I'm still working on one example, but the rest is ready for someone to tell me if it's even slightly convincing. :-)
 
I'm sceptical. I don't think FP has a place in PHP.
Maybe when it's a more appreciated and used paradigm.
 
Chicken and egg problem, which is exactly what I'm trying to break through.
As long as doing things in a functional way is clunky, why would you?
If you're skeptical, are you willing to read an article to try and convince you? :-)
 
Maybe, but it might back fire.
... like I was sort of OK with is_literal, but calling it is_trusted is a mahoosive mistake.
FWIW, I also think it was a mistake to tie pipe operators with partials. It's a push to far to start with.
Feel free to email me a link to the post for me to look at though, if you dare ;-). I'm off to bed.
 
In my mind, they are most useful in combination. Most of the use cases for partials, for me, involve pipes.
And the main pushback against pipe was "we want partials first", so they were already linked. I originally was totally fine with just pipes and calling it a day.
 
11:37 PM
C14N wrong namespace order ・ *XML functions ・ #81188
 

« first day (3901 days earlier)      last day (1030 days later) »