« first day (5046 days earlier)      last day (33 days later) » 

9:47 AM
o/
 
2 hours later…
12:04 PM
\o
o/
12:36 PM
@LeviMorrison I'm curious, did my reply on the exit() RFC vote resolve your concerns?
And is there really no way other than github.com/php/php-src/blob/… to match up the INIT_FCALL with the corresponding DO_FCALL opcode / get the name of the function for a DO_FCALL?
I've seen a pattern like that multiple times in php-src, perhaps it should be provided as a reusable function?
 
3 hours later…
3:50 PM
@TimWolla Could you send me a link to your reply?
@TimWolla I'm not aware of a function for it, I was experimenting with it for something recently and did not find one. In fact, I quit my experiment because I wasn't confident enough in the time I had that it would be stable enough to build on ^_^
If there was a function, that would be quite nice.
@LeviMorrison I assume it's this reply: externals.io/message/124683#124782
I think if there are API functions for 1) getting the init opcode of an fcall opcode and 2) getting the function name of the init opcode, then removing DO_EXIT and replacing it with a function call which returns never, would make control flow analysis simpler. You don't have to handle exit, since it gets covered by functions which never return, which is another case which should be handled.
4:24 PM
If I need to work with a 72-bit integer, I guess my only options are bcmath and gmp?
(but not gmp because my company has only installed bcmath)
4:41 PM
@QuolonelQuestions I believe so yes
Such is life
But bcmath is really borderline useless and I need to convert to base 29 LUL
I imagine there's a smart way to do it by chopping it up into two distinct integers, or something, but I'm not smart
Why is it useless? Maybe it's fixable, and if you don't ask for a feature you won't get it ;)
also rip base 29 lol
@QuolonelQuestions well if you are on a 64-bit non-windows platform your ints are 64-bits, and so you can split them quite easily
I meet those conditions
What operations do you need on the 72-bit ints?
Just pack other smaller numbers into them (bit shifting) and the aforementioned base conversion
I don't know why non-Windows would be a predicate though
4:48 PM
hm yeah the base conversion is certainly going to be the most painful of the 2, packing them is doable though
AFAIK ints behave the same cross-platform in PHP
@QuolonelQuestions I'm almost certain that ints are always 32-bit on Windows, because a long is 32-bit on both x86 and x64 windows
They're not
As a Windows lifer I can say with absolute certainty that 64-bit builds work as expected on Windows :^)
Okay then it was probably the case in the PHP 5.x days
This clown code allegedly supports arbitrary precision base conversion php.net/manual/en/function.base-convert.php#106546
And it even works without gmp
(if it works)
4:51 PM
only uses bcmath indeed
 
3 hours later…
7:23 PM
Today I learned Python has unbounded integer precision since Python 3. Why can't PHP have that? :^)
And also, or at the very least, why can't PHP have unsigned integers?
7:56 PM
@QuolonelQuestions Changing int to be unbounded would be a big BC break, but I guess nothing is stopping you from making a new type ig
@QuolonelQuestions ditto :p
but I bet such RFCs would be potentially controversial
Why is everything that is obviously good always controversial?
I have no idea how an unbounded integer would work. I've never seen a language that had that before. That's some pretty impressive wizardry as far as I'm concerned. But uint is supported by C so I would imagine it's not that difficult to forward to PHP
@QuolonelQuestions Not everything that is obviously good is controversial, there are obviously good ideas that are (almost) unanimously accepted as an RFC.
A recurring "problem" however is that there are many different groups of people that vote in the RFC and that have their own preferences and point of view, so some things are practically impossible to pass
So it would seem, though it wouldn't surprise me if there were still a storm of naysayers on the ML
@QuolonelQuestions uint would be much simpler indeed. Arbitrary precision integers would be via a hidden heap allocated object.
What would be the argument against uint?
8:00 PM
I don't know
@QuolonelQuestions Code churn (internally), mostly.
It would radically complicate the engine?
@QuolonelQuestions Not necessarily complicate, but yes, every path that accepts arbitrary values would now have to handle unsigned integers. If the goal is to provide a wider range of numbers, then big int would be a better approach IMO.
Not radically, but everywhere where IS_LONG / an int is used you also have to now think about UINT. And then there's VM changes and JIT changes etc etc
How big would big int be?
Arbitrary?
8:04 PM
Arbitrary I'd say, that's what people generally understand under "big int"
@TheodoreBrown And also this one: externals.io/message/124683#124832 (cc @LeviMorrison)
Well that sure would be pretty neat
My second message was specifically about the second patch I attached to that email.
@QuolonelQuestions There was some discussion about arbitrary precision integers in the mailing list some time ago if you're interested.
8:10 PM
Huh that's longer ago than I had thought it was
The first reply mentions Python ints heh
It's like everything I think of for PHP someone has already thought of
Well there's 8 billion people on the world, so...
Internals is not that big
Not that having "bigger ints" is a particularly novel idea, but someone even PRed my idea of passing default to function parameters years ago
And it's still a good idea in spite of named parameters
I can see why it is useful. I never had a need for it, although I don't really program in PHP so it's one of those RFCs that I would skip voting for.
8:26 PM
Y- you... don't?
I feel like a majority of the folks contributing to php-src don't actually write PHP (any longer).
I programmed in PHP a bit during the 5.3.x days when I first learned about web development, must've been 2009 or so.
Then I did some in 2018 for a group project in uni and some other small project, but I haven't really programmed meaningfully in it since then.
And the fact that I'm a bit out of touch with what people actually write makes me only vote for RFCs that I feel 100% sure about, and skip voting for the rest.
@TimWolla That's my impression too
@TimWolla That would explain why many PHP library maintainers voted for static class and everyone else didn't xD
@nielsdos What do you code in now then?
@QuolonelQuestions My day job is in C++ and Rust. If I have to write small scripts to process some data quick&dirty I tend to use either Bash or Python or NodeJS
Mostly C++ though
What motivates you to contribute to PHP then?
8:35 PM
I got into it by "accident" and then stuck with it
My day job is about static analysis for large code bases. At one point in December '22 I choose to include PHP as a benchmark, but I wanted to get familiar with the code first. So I submitted a bunch of patches and started doing that in my free time because I enjoyed improving things and fixing bugs.
Then I saw the state that some components were in and I started doing RFCs.
Generally I just enjoy improving things
So, php-src gave Niels nightmares and he hasn't been able to break free since.
That's one way of putting it :P
Caught in an endless whack-a-mole.
@QuolonelQuestions Tbh, my work on PHP also involves very little work in PHP. It's a double edged sword. More time to improve it, but less personal incentive.
@IluTov At least you get paid lol
@nielsdos I would like to improve things but I think internals will always be against me
@QuolonelQuestions Right, I'm not complaining. But payment doesn't stop you from wanting to avoid uncomfortable work, let's say the mailing list. :P
8:43 PM
@QuolonelQuestions For arbitrary precision integers, I think it's very important to have a working implementation to show that it's feasible when you create an RFC. That would significantly raise the chances of getting accepted.
@IluTov No job is without its pain points
@nielsdos Right. We've had a few of those lately (the endless modules discussion, sandbox, etc.).
@nielsdos I'm definitely not tackling that. I don't have the chops for it. I am not a C programmer like yourselves
Right, that's the problem then, either you have to find a person who does the implementation for you, or the chances of getting it accepted without an implementation is very very low
There's probably many people who would like to improve PHP but don't know (enough) C to be able to do it, and they're basically locked out
The people who program in PHP usually don't do C.
Different field
Right. I think PHP is a fantastic language for the field it's used for, but it's not a field I want to work in anymore. So it kind of goes both ways.
8:50 PM
I have plenty of ideas that I can probably muddle my way through.
If you have multiple ideas you should start with the simple ones first before investing too much time in complex stuff like arbitrary ints

« first day (5046 days earlier)      last day (33 days later) »