« first day (4366 days earlier)      last day (573 days later) » 

cmb
9:05 AM
@jmikola Not that I'm aware of. In my opinion, it doesn't make much sense to recreate the old build environment, especially as temporary solution. A lot needs to be done, and since there is neither a backup of the old machine nor documentation, it would take a lot of time. Probably much better to move to some sustainable build environment/CI (e.g. github.com/cmb69/php-ftw/actions/workflows/pecl.yml should already work for exts which do not require PECL dependencies).
 
How would I get the current time in ticks? Do I add the current UNIX timestamp to the result of microtime() * 10000000 or is there a more efficient approach?
 
9:23 AM
@cmb hrtime(true) returns a different value seen on this site datetimetoticks-converter.com.
 
cmb
Oh, "A single tick represents one hundred nanoseconds or one ten-millionth of a second.". Never heard of this use of ticks before. Anyway, I don't think there is anything available in PHP; microtime() starts at the Unix epoch, but these ticks start at January 1, 0001 of the proleptic Gregorian calendar. You would need to calculate the difference. php.net/calendar might help with that.
 
9:51 AM
ticks is a MSFT thing - not something that is portable
 
cmb
@Derick JFYI: I've been told that the 7.4.32 Windows builds will be uploaded tomorrow morning.
 
OK - thanks
 
 
2 hours later…
11:36 AM
Isn't there a use-case for an `array|ArrayAccess` alias? Like
use array|ArrayAccess as arrayish;
 
... There is a use case for loads of aliases
 
@Girgias Name your top three :D
Need it for the RFC
 
@OlleHärstedt If the RFC is not about generalized type aliases then no thank you
 
D:
@Girgias Generalized how?
 
It's something that I plan working on at one point, as the need for type aliases is obviously apparent
 
11:47 AM
@Girgias Alias per file or global?
 
@OlleHärstedt That a library can define a type alias and that you can use it in other files
 
Ah. Nope, that's not what I want.
Or need.
@Girgias Did you also consider the use-case for e.g. that the alias meter for int will not accept int?
 
That's a type def and not a type alias IMHO
But yes
 
Alright :)
 
gosh the design of ext-session is hurting me
 
12:09 PM
moinsen
 
cmb
@Girgias better focus on SPL instead :p
 
@cmb So I figured out the issue with the bug
 
cmb
which one?
 
The problem is that PS(mod)->s_validate_sid is always defined, thus the check is useless, and the naming of it is shit as it should be called "doesIdExist(): bool"
@cmb github.com/php/php-src/issues/9583 as the test case he sent is broken
And the dummy handler should not exist
Because it is arguably wrong
Also I don't know why the fuck the validateId method is part of SessionUpdateTimestampHandlerInterface
It has nothing to do with it
I think I'm going to propose some massive cleanup for PHP 8.3
For ext-session because holy shit this is such whacky design
 
With massive cleanup you mean removal, right?
 
12:21 PM
To some extent
But it will mostly affect extensions which register a session module (something which should be rare IMHO) so that should be fine...
But will need some userland deprecations like... actually needing to implement the interfaces on the class
 
cmb
note there is also php.net/session_set_save_handler, so no class needed so far
And yup, ext/session is a big mess, and it got worse when a lot of stuff was introduced/changed some years ago. wiki.php.net/rfc/strict_sessions was done as security fix …
 
github.com/php/php-src/issues/9637 ... don't know, but I feel like that footgun should be removed from existence.
Probably some people will have opinions on that, but ... something which we can change and is a repeated source of complaints should maybe be changed.
 
@cmb Yeah I know this mess, so the RFC would be deprecating just passing in callables (as that's also easy to mess up although we do have named arguments now) with the other stuff
I suppose I've got something to work on in October...
 
cmb
12:53 PM
@RemiCollet Thoughts about news-web.php.net/php.pecl.dev/17505?
 
@cmb I'm fine with having another lead on this ext, but we should wait a "few" days to see if Omars answer
 
cmb
Yes, fully agree. :)
@bwoebi I just saw a PECL account request by Pierre Bonet; is that legit?
 
1:31 PM
@Girgias That stuff is also really sensitive to breaking, so I doubt you'll get very far redoing things.
 
cmb
1:51 PM
I'm afraid Derick is right.
 
2:30 PM
@cmb it is
 
cmb
request granted
 
thanks :-)
 
I have a curious issue here. If I call make test from a clean slate (e.g. after running make clean), tests run just fine. However, changing whitespace in any file and running make test again makes every test fail with "Termsig=9". Has anybody seen something like that before?
 
@alcaeus uh, no
 
 
1 hour later…
cmb
3:55 PM
@Girgias Why do we loop to create an "invalid" session ID in session_create_id(), but not elsewhere?
 
@cmb Let me look into the matrix to go back in time to understand the mind of the dev
swoooooosh
tun tun tun
I'm back, and I have no idea
 
 
2 hours later…
5:59 PM
@cmb I've no idea what is wrong with this person's email: github.com/php/php-src/issues/9216
 
JRL
6:31 PM
huh. it seems like the binary op for integer arithmetic in php-src is significantly slower than the binary op for float arithmetic
i don't have opcache or JIT on, but i still wouldn't expect a 66% slower execution for 3 + 2 over 1.5 + 2.6
fascinating
GMP seems to be nearly twice as fast in my benchmark as simple native int ops, even with the overhead of the function calls and object creation. this smells of a bad test, but i don't see how based on the code.
maybe it's the string -> int type conversion that i'm forcing that's the slow thing
though i would expect that to affect floats equally
 
cmb
6:51 PM
@Derick Me neither. Although "I'm sending emails from postfix on an AWS EC2 instance using sendinblue.com SMTP relay," sounds somewhat unusual.
@JRL What are you testing exactly? Just the addition, or output, or function call etc.
 
JRL
it's not a perfect test, as it's the 'native mode' of my fermat library, which involve a lot of wrapping a dispatching before and after for the library structure
 
cmb
Then profiling might help. See e.g. xdebug.org/docs/profiler.
 
JRL
however the two tests only differ in that one is dispatching to something like bcadd($var1, $var2) and the other is dispatching to something like $var1 + $var2
yeah, for sure. im actually doing the benchmarking with phpbench which integrates with the xdebug profiler
which i might do to look at the cachegrind for it
 
cmb
Really bcadd(), or do you mean gmp_add(). The latter might be relatively fast, but the former should be slow as hell. Or, well, maybe not if you pass strings to the functions.
 
JRL
it's... complicated. the library uses native binary ops, ext-gmp, ext-decimal, and ext-bc depending on the values, the requested precision, the expect precision of the various methods for the given inputs, and which extensions are installed
so i have a large test matrix
in 'auto mode' if it sees that both values are integers and that the gmp extension is installed, it will use GMP. 'precision mode' will use ext-decimal if it's installed, and 'ext-bc' if it's not. 'native mode' will cast the stored string values to int or float, depending on if they have a decimal part, and then use a native binary op that it casts back to a string.
(auto mode also uses native binary ops if it expects that the float value density for the result is high enough to meet the requested precision without error in any of the required digits, but only if the input values are unsuitable for gmp)
in practice, that means simply that both inputs are less than about 10,000
and that the requested scale is 10 digits or less
on a side note, a fast algorithm for natural log when you want 50+ digits of accuracy is an absolute pain
 
cmb
7:16 PM
That is really complicated. :) But anyway, make sure that there is no OPcache pre-calculation happening (doesn't look like it is, but that might explain the strange performance).
 
JRL
that massive complication has allowed me to provide up 1000x faster calculation in some cases though, so its been worth it :)
 
cmb
7:30 PM
Oh, I don't doubt that, but it's hard to measure precisely.
 
"If it doesn't crash on your machine - try in another time of the day, because it crashes for me in the morning and in the evening, but not in the middle of the day, and I'm not joking." Oh my. github.com/php/php-src/issues/7817#issuecomment-1262690371
5
 
That reminds me that I also have a completely unreproducible SEGV with PHP 8.2 RC 2 (I believe) when testing a Symfony example for the unserialize() ML thread.
The only thing I have is the dmesg output from that crash. Wasn't able to find out what function or instruction was at fault, possibly due to ASLR.
Of course, no coredump either :-(
 
cmb
7:48 PM
Maybe it doesn't dare to crash when Will Kane is around. :p
 
@TimWolla Have you tried ASAN/UBSAN/MSAN?
 
I didn't. This was using the php:8.2-rc Docker image on amd64 with the internal web server (php -S) and I'm not even sure what I did to trigger the crash.
After testing the Symfony code I've written I looked in my terminal and seen that the server crashed. Must've been some background request.
[38504.776761] php[125093]: segfault at 7f2b9a58d097 ip 0000559ef55d9ad5 sp 00007fff3f5476d0 error 4 in php[559ef5216000+446000]
[38504.776771] Code: 63 7f 08 4d 89 3e 4c 01 f7 0f b6 47 08 3c 08 0f 85 f8 2e 00 00 4c 8b 27 4c 89 64 24 30 41 8b 47 10 49 8b 56 40 49 8b 5c 24 10 <48> 3b 1c 02 0f 85 45 2e 00 00 48 8b 6c 02 08 f6 45 04 10 0f 85 66
That is what was logged into my dmesg, if someone can make sense of that. The binary should still be available on Docker Hub.
 
 
2 hours later…
9:52 PM
@Girgias I'm going to leave this here hacklewayne.com/dependent-types-in-typescript-seriously and walk away as it seems quite peculiar.
 
 
2 hours later…
11:51 PM
@Danack PTSD
I did a whole term of dependent type theory, and yes it's pretty cool and powerful, but brain fry
@Danack Holy shit, this is even more bonkers, wtf
 

« first day (4366 days earlier)      last day (573 days later) »