« first day (3678 days earlier)      last day (1286 days later) » 
00:00 - 19:0019:00 - 00:00

7:00 PM
@Danack @cmb wasn't pecl suppose to come along with docker images? its not in 8. fpm
 
@bwoebi I think I want to keep a reference to $this to prevent release of the result object, so yield from is probably the correct way to go.
 
cmb
just download pear.php.net/go-pear.phar and run it php go-pear.phar
don't know about the docker images
 
@Trowski that's a good point … because of the destructor - then yeah
but I'm confused why you've put github.com/amphp/amp/commit/… back after our discussion right now … just make it all return \Traversable instead and we're good?
 
@bwoebi Yeah, I just pulled it back out.
 
ah okay
I see you're hideously force pushing :-P
 
7:07 PM
Didn't actually mean to push it, was in wrong repo.
I'm surprised you noticed, it wasn't there that long.
I usually don't in master, but I have been in branches if it's not there for very long.
 
@Trowski yeah it's fine, just ":-P"
and I noticed because this bumps the repo in the org-view with "last updated blahblah ago"
 
@bwoebi I'm not proud when I do it, so yes :-P
Ah yes. A lot of things do that I noticed, even someone opening an issue.
 
cmb
@Ghostff wget https://pear.php.net/go-pear.phar
Does anybody know why the php-src Travis builds take so long to start for a while now?
 
7:32 PM
@cmb Other projects have been seing this..... twitter.com/geerlingguy/status/1324480667984498689
 
cmb
Thanks! Somewhat bad news.
 
December 31, 2020: Travis-ci.org will be put into read-only mode.
yep.
 
Wes
youtrack.jetbrains.com/issue/WI-35691 @Derick apparently you can't skip prefixes, only exact matches
 
7:50 PM
What's that @Wes ? You want people to go here and upvote the issue?
5
 
Wes
lol, yeah maybe? :D
derick mentioned the feature to me
the reason it doesn't work is because it can only exclude exact files
 
Nov 2 at 12:37, by Danack
@Wes probably need to talk to phpstorm people and ask for a "add all vendors" option.
yeah, that's what I thought.
 
Wes
missed that :B
 
@bwoebi I'm working on an is pattern for match (gist.github.com/iluuu1994/6060cebdeead01a0bd515935862c2de3). I'll need to create a new opcode for type checking, because ZEND_TYPE_CHECK/ZEND_INSTANCEOF free op1 but also because they don't support union types. Any idea how I can store arbitrarily complex types in an opcode? We could also achieve the same with some jmps and a ZEND_TYPE_CHECK/ZEND_INSTANCEOF (without freeing op1) for each type. Would that be the better approach?
 
8:08 PM
@IluTov I think compiling the type expression to opcodes would be the best approach
 
@bwoebi So, something like this? github.com/php/php-src/compare/… (except again, we'll need new opcodes that don't free op1).
 
@IluTov I think we could just have an extra specialization for that, but yes
 
@bwoebi Ok. I'll try that approach then. Thank you :)
 
Good evening all you lovely people. Question regarding Symfony 5 API. I'm trying to create a React frontend, using encore. But the documentation is non-existent. Do you know of any decent tutorial on this? I have searched a lot but found very little.
 
@Wes oh boo, I've upvoted it.
 
8:21 PM
The questions is, should we even try to be subtle about the brigading?
behold_my_field.jpg
 
I don't think it matters
It's not Reddit/SO
 
Wes
thanks for the pin :D
 
@Wes you're an RO also :P
 
Wes
i am not worthy :B
 
8:44 PM
@Danack In your closure reference RFC, I think you use $closure instead of $lambda in the "why not" section.
Also, none of your code samples are tagged for PHP. :-(
 
Wes
9:10 PM
any reason why i shouldn't use async code in __destruct?
 
@Crell I don't know what you mean by the first bit, and feel free to edit the code samples.
 
```
$closure = function () { echo "Hello.";};
// Fatal error: Using $closure when not in closure context in %s
// Whoever wrote this code is likely to be confused.
```
But the whole rest of the document says that $lambda is the magic word, not $closure.
Fixed highlighting syntax.
 
@Wes Async how?
 
Added:
> Using $closure would likely be more likely to lead to confusion.
 
Lol, fun, __destruct can be a generator :D 3v4l.org/kEplk
(But it will not actually be called properly)
Same with construct: 3v4l.org/eRLjc
 
9:19 PM
TFW a ticket I've been working on for about a month passes code review and finally merged into main branch. YAAAAAAAAY
Slowly bringing the code base under namespaces :)
 
@Tiffany toot.gif
@IluTov PHP is silly.
@IluTov Also, random aside: Can you listen to Derick's latest podcast and tell me if I pronounced your name correctly? :-)
 
devblogs.microsoft.com/dotnet/announcing-net-5-0 … can we have these nice things in PHP too? :-D
 
I recall talk about making constructors/destructors required to be void. That would stop such things.
 
@bwoebi Which in particular? :P
 
9:37 PM
@Crell Your pronunciation is pretty on point :) The transcript though, Ilya Tovolo :D
I mean, it's a Croatian name, any pronunciation will sound wrong in English ^^
 
I was wondering where it was from. You mentioned before you were in Switzerland but it didn't sound like a Swiss name.
 
@Crell Yeah my fathers side is Croatian. People have quite a bit of trouble with my name here too so I'm used to it ^^
@bwoebi Hm, using is to match patterns, that's actually very interesting. Might give that some consideration.
 
/me snickers.
 
if (element is not NoteElement noteElement)
Wow, that looks quite unorthodox :D
 
The `is not` is something we should include.

The confusing example is not.
 
9:49 PM
if ($foo is Option::Some($bar)) {}

echo match ($foo) {
	is Option::Some($bar) => ...
};
I like this :)
I wonder if an unprefixed type pattern ($foo is Foo) would conflict with other patterns. @Crell We should compile a list of future possible patterns to make sure. I'd like to avoid something like is type Foo, is Foo looks way nicer.
 
Patterns against objects are going to be the tricky one, since there's no rule that the constructor has to match the properties.
Patterns against arrays are easy.
 
@Crell Yeah, I wouldn't match against constructor params. I'd just look up the properties by name.
 
So that limits it to public properties. Which... is probably fine.
 
$foo is Foo { bar: $bar }
@Crell Yeah. My prototype also allowed getBar() but meh, I'd rather we implement accessors :)
 
Or, I suppose, scope-available properties, so you could match($this) against private props.
 
9:58 PM
@Crell Yeah that should work too.
 
Named props like that are more verbose than what we're hoping for with enums, though.
Or are enums just Special That Way(tm)?
 
@Crell We could also allow shortcutting like js if the property and variable have the same name.
$foo is Foo { $bar }
 
I learned about that feature of JS literally yesterday.
 
@Crell Right, for enums we would probably want to allow positional matching. Misunderstood you there.
 
Do we need positional matching though if Foo{$bar} works?
 
10:02 PM
@Crell Maybe not :)
That would be one less thing that makes enums special, which I'm in favor of.
 
Wes
> Process finished with exit code 0
finally managed to close the program gracefully
 
This would be more verbose though when not directly binding a variable but matching a pattern.
$foo is Some::Option { value: >= 100 }
vs
$foo is Some::Option(>= 100)
On the other hand, it's probably more readable with explicit property names.
 
if ($foo is Foo) // equivalent to instanceof.
if ($foo is Foo{bar: $bar}) // equivalent to instanceof && $bar = $foo->bar
if ($foo is Foo{$bar}) // shorthand for previous
if ($foo is Foo(baz: 5, bar: $bar} // equivalent to intanceof && $foo->baz == 5 && $bar = $foo->bar
 
Maybe not for Option::Some, but possibly for other enums.
 
I'm fine with requiring the parameter to be named if not doing an identical-name equality check.
Short-circuting when there's only one in-scope property can be a follow up for someone else to do in 8.3. :-)
 
10:06 PM
@Crell $bar in this case is a variable binding, not an equality check.
In other words, you're binding the value inside Option::Some to the variable $bar.
 
Fixed.
So it just extracts the value into the current scope, kthxbye?
 
@Crell Yep
 
if ($foo is ['x' => 5, 'y' => $y]) // is_array && $foo['x'] == 5 && $y = $foo['y']
... Do we even need the % sigil then?
 
@Crell No, with is we need no other prefix :)
 
thinking_face.gif.
Can this be implemented in such a way that is is a available as an internal API as well?
 
10:09 PM
@Crell Can you elaborate?
 
Like, make it a single opcode or function call so that we can easily do an is style check in C code.
 
@Crell I don't think so. Matching a pattern will result in many opcodes. You could still probably reuse that through some AST desugaring if you really had to.
 
Hm, OK. (Yes, I have a specific far-future use in mind but I don't want to get too distracted.)
 
I cant really get pass this error
### INSTALLING PECL MODULE swoole ###

In Loader.php line 141:

  Version mismatch - 'SWOOLE_VERSION' != '4.5.3' in source vs. XML
 
@Crell You can't just not tell me now ^^
 
10:13 PM
I could see that same logical check being useful for some possible generics implementations.
 
@Crell I don't understand, do you have an example?
 
function foo<T>(T $a, T $b) { ... }
foo<int>($a, $b);

Desugars to:
foo(typeFlag = 'int', $a, $b) { assert($a is $typeFlag, $b is $typeFlag); ... }

Or something vaguely along those lines.
But that's where the "is" would be useful to have internally, mainly for the more robust type matching.
 
@Crell I see. Note that is will not actually accept dynamic expressions. So you can't pass a class name by string for example.
 
Idle thought, not really related to the pattern match design itself.
Annoying. :-) Although I presume internally you'd have more flexibility, and it wouldn't be an actual variable.
Could it be made dynamic, or is that just too damned complicated?
 
@Crell Not sure, how would you even store a pattern as data in the first place?
 
10:24 PM
That might be where the % comes in?
 
@Crell Note sure ^^ I think that would be too complicated. Patterns would have to become a new zval type just for this case, I don't think that's worth it. Or we'd do something abominable like store it in a string and then parse it at runtime.
 
Hm. OK, I'm good with punting to Later(tm).
When I get to writing the RFC should I include just the type match or the full thing? Or second RFC at the same time for the full thing?
 
@Crell Which RFC?
 
Wes
this code is giving me daily headaches. keep trying to read the intentions of the person that wrote it, but apparently this is just an abstract class with one descendant only, probably because it felt good to have 2 smaller classes than a big single class
 
pattern match / is.
 
Wes
10:30 PM
i am not complaining, this guy put together something usable. it would be great to improve it tho
maybe with amphp
 
@Crell I say we focus just on the is pattern for now. We just have to make sure it doesn't conflict with any other patterns we might want to introduce in the future.
Sorry, the type pattern is what I meant to say.
 
Er. Yes, that's what I mean. One RFC for the basic type match or... right that thing.
So, detailed future scope or minimalist future scope?
 
@Crell I'd say exhaustive patterns, detailed syntax, but no semantics.
 
So "here's the RFC for is type, and here's the patterns we expect to support in the future if someone gets around to them but we'll not go into detail"?
/me really needs to knuckle-down and get better at hacking internals himself. sigh
 
@Crell That sounds sensible.
Should we introduce is for match and outside match at the same time?
 
10:33 PM
Same time.
 
Ok. That works for me.
Great! I think we made some mental progress tonight. I'm off to bed now, sleep well! 👋
 
/me tucks Ilija in.
 
@Crell xD wow we're really bonding I guess
 
I'm a friendly guy.
 
@NikiC It seems that when you were accepting my PR you accidentally introduced a regression. I only noticed now that a certain scenario fails. Should I open a bug report or submit a PR tomorrow to revert your change?
I am not sure if revert would be the right action
 
10:36 PM
@Crell Are you involved in ranked choice voting? Something in the back of my head says you are part of a committee or lobby or something for it.
 
I am talking about this commit github.com/php/php-src/pull/6203/commits/…
 
@LeviMorrison I'm on the board for Fair Vote Illinois, which is pushing for RCV in this state.
 
@Dharman Which part of it?
 
The error in fetch part. mysqli_stmt_fetch_mysqlnd cannot report an error
Ideally it would, but with the current design throwing an error is a breaking change
 
Why?
 
10:41 PM
@Crell I like ranked choice for certain things, but for something like distributing a state's electors in the presidential election I'm not sure it would interact well with proportional voting. Anyone ever discussed that as far as you are aware?
 
Otherwise we will miss an error during fetch_row
 
Execute this pre/post change 3v4l.org/RLrge
In my opinion this is a valid code, but after your change it throws an error
If I am talking nonsense, then please forgive me becuase it is very late now
 
If candidate A gets 38% of a state's popular vote and the state has with 6 electors, then candidate A would get floor(.38 * 6) = 2 votes. Person with the most votes gets any remainder.
I'm not exactly sure that ranked choice would work well with such systems if their #1 candidate gets at least 1 elector, but their #2 gets a larger number of electors.
 
There's 3 ways RCV could be used presidentally:

1) RCV in each state to determine which candidate gets all the state's electoral votes.
2) RCV in each state district to determine which candidate gets that district's electoral vote. (Only applies in Maine and Nebraska right now.)
3) National Popular Vote via RCV.

Option 3 is the Correct(tm) solution, but also the biggest lift without a constitutional amendment.
 
No, #3 is definitely the worst choice.
^_^
 
10:44 PM
Porque?
 
A state's choice to apportion their electors should be their choice, and based off how their citizens voted. It does not matter how some other state votes.
Let me pick a (definitely not) random state like Utah.
 
Then we're debating the electoral college, not RCV. And I'm not going to get into that here other than to say "F* the electoral college."
But option 1 could be done now, and nearly was in Maine this year. (GOP fussiness blocked it for this year, I think? I know they tried; I forget if they were successful in delaying it.)
 
Why should a state which voted only 38% for Biden send 100% of their electors because he won the national vote? I don't think the citizens of Utah would be very happy about that.
 
As I said, the electoral college is a different debate, and the answer is "we should eliminate it entirely because in the 21st century it's dumb."
 
I like ranked choice voting, and I like proportional voting. I just don't know if they can mix well.
 
Proportional voting by party, not really. However, RCV can easily be used to elect multiple-candidate districts. That's what FIG does now, for instance.
 
By the way, I can see how you think the electoral college is "dumb", but I assure you that abolishing it will skew things, just the other direction. Instead of favoring rural areas like it does now, it will favor cities.
 
Given that the population is predominantly urban...
 
I say choose your national leader by lethal combat
 
@Crell No, I mean it will disproportionally favor urban places.
Once every vote is the same "value" no matter which state it is in, it's simply economics: fight for votes where you can get them the cheapest.
 
10:52 PM
@Sara That would favor violent people, which may not work out so well for us.
 
It already does favor the violent. Have you see the impacts of imperialism?
It's.... not great.
 
Granted, but let's not make it worse.
 
There are definite flaws, but I would rather tweak it that abolish it. Increasing the size of the house of representatives would correct some of the imbalance, and doesn't require an entire constitutional overhaul.
There are other examples too.
 
Also this stuff like this happens, which favors the violent: twitter.com/eji_org/status/1326162700620214286
 
PRESIDENT CAMACHO 2504!!!
 
10:54 PM
I'm truly independent and non-partisan, but I can definitely see why rural people tend to hate democratic policies: democratic leaders do not seem to understand rural life at all.
 
Truth.
And they're showing no sign of trying to.
Which is why the right remains disenfranchised
BUT, that's no excuse for voting for Trump.
 
Ranked choice would be an improvement on what we are doing now, and is applicable to many different forms of elections. I'd like to see it gain traction. Hence why I asked ^_^
 
That's just saying, "I don't mind racism and $REFER_TO_EXTENSIVE_LIST_OF_GRIEVANCES so long as I democrats lose."
I think if a major state adopted it, we could see it gain traction.
 
I'm not sure it's the best system, though. For a president, I mean.
 
Fuck I'll settle for an informational only field, "I would have voted for ______ but I selected the above instead because....sigh..."
 
10:58 PM
lol
 
@Dharman No idea whether that is correct (it involved stored procedures) but it does look fishy
 
@LeviMorrison Oh, I absolutely agree that the activist left/Dems fail miserably at understanding/caring about rural working class people, and it hurts them. But the EC is not the solution to it. It never was; it was created to prop up racism. It's a tool whose time has passed.
 
However, what code is at fault there? If that's supposed to work, why is the out of sync error being produced?
 
@LeviMorrison Where do you live?
 
@NikiC I copied that example from PHP manual
 
10:59 PM
@Crell Utah.
 
@Dharman I mean, the error looks fishy ^^
 
Is there an RCV group there?
 
Not that I am aware of.
 
Hmm, should there be no out of sync error produced by mysqlnd then?
 
<CalEvans> Congratulations, you're now leading it! </CalEvans>
 
11:00 PM
@Dharman Well either it should or it shouldn't be
 
There's a place with a website, but I've literally never seen it unless I directly search for it.
> Ranked choice voting ensures a true majority winner. The candidate with the fewest number of votes is eliminated in each round. When a voter's candidate is eliminated, second choice votes are included in the next round. This continues until the final round. By the final round, votes are distributed between the final two candidates resulting in a clear majority winner.
 
If I understand right, previously it was produced but ignored, right?
 
I agree RCV is good if the plan is "winner takes all", but I'm beginning to believe "winner takes all" is a bigger problem than how the winner is chosen.
 
As I said, it's entirely compatible with multi-member districts.
 
@Dharman tl;dr I have no idea what I'm doing :P
 
11:03 PM
Proportional representation requires party-based voting rather than individual rep, which is a WHOLE other ball of wax.
 
Ok, let me debug this properly tomorrow after work. Maybe there's a problem somewhere else. Yes, it was ignored.
Now, that you made me think of it, your fix can't be blamed because it only showed the problem. The cause must be somewhere else
 
In any case, in recent presidential primaries Utah has not supported the candidates that have gone on to the national ballot. We're not very satisfied with our D and R choices, but in practice that's all that matters. I want something that feels better as a voter, you know?
 
What do you mean "gone on to the national ballot"?
 
We didn't vote for Clinton, Trump, nor Biden in the primaries.
 
Oh. That's yet another problem, and that is the asinine primary system.
Illinois doesn't even get a say in the presidential primaries given how late we vote.
It was already "over" by the time it got to us this year.
 
11:06 PM
Utah didn't either, so we moved our date up this time.
Super Tuesday.
 
The solution there is regional mega-primaries that rotate around. Or, you you know, getting rid of primaries entirely and just having a single RCV election.
And forbidding campaigning more than 60 days before the election.
(A guy can dream.)
 
Yeah, a national RCV would work much better if multiple people from the major parties were on the ballot.
 
I need a chrome plugin that can show warning signs or change the address bar red or something when I'm on urls because two days in a row now I've done things on the environment due to lack of sleep
 
Put Donny, Romney, Warren, Sanders, and Biden on a single national RCV ballot and let the chips fall where they may.
 
It would be more interesting for people in the middle, like me.
Might rank a D, R, D, R sort of pattern.
 
11:11 PM
Which is totally a legit thing to do.
 
I'm probably going to vote D more than R for a while simply because the environment is an important issue for me, and R leaders... well, they rape and pillage the environment.
 
@Crell Try living in California. :p
 
My experience is that many rural republicans actually care quite a bit about the environment. They love hunting, fishing, hiking, camping, etc. It doesn't make it to leadership, for some reason.
 
Montana!
 
Because "environment" gets twisted into "global warming, that great liberal hoax" and "eeew, government overreach, how dare the gob'ment tell mega-corporations they're not allowed to dump poison into my drinking water!"
 
11:28 PM
It's insane to me that the environment has become a partisan issue
It's hard not to have certain opinions about certain political parties when it seems like the only explanation for some of their stances is... self gain
I would love to hear an alternative, though
 
I want an honest conservative party in the US. The GOP is not it. It hasn't been for 40 years.
 
@Crell can you really be that conservative appealing to a broad range of conservatives without being ultra-conservative or just conservative and lying?
 
@Crell if you manage that can you get them to open a branch office in the UK
 
@Crell because not everyone is conservative on the same topics … and if you have only conservative points, you're ultraconservative, which is not good either
 
This is why I want RCV. :-) Let the GOP fracture into multiple parties, push the racists and fascists into one, and let them get destroyed. Let the real conservatives have a proper party without the power mongers.
Certainly. And not everyone is liberal on the same topics; there's topics where I'm disturbingly far left, and others where I'm moderate-right, frankly.
 
11:39 PM
> Fighting For A Brighter Yesterday
 
@Crell Yeah, you want progressive people who are each conservative on some (different) points, so that the average is slightly progressive
which is what you basically end up having with a multi-party system
 
In some respects we'd be better off without a President. No One Man Should Have All That Power, sort of thinking.
Better to fight with multiple representatives where diversity can be better represented.
 
@LeviMorrison Well, the underlying problem really is that there were not many checks to the Trump presidency due to the extreme partisanship
I mean, the dems tried, but they had no power…
 
McConnell does a fine job of ruining an entire branch of government.
 
@Crell I'm not sure how much is McConnell (the media seems to focus on the single person), and how much is GOP agenda, executed by McConnell, the fraction leader
I suppose it's much more a systemic problem of a large part of the GOP than the media portrays
he surely has his fair contribution to it, but largely he also is the poster child of that
Pretty sure the senate GOP people are not dumb and know where this goes to … it'd taken just like 3 senators to side with the dems on a couple topics to effectively block that agenda
instead of just voting strictly along party lines
 
00:00 - 19:0019:00 - 00:00

« first day (3678 days earlier)      last day (1286 days later) »