« first day (5406 days earlier)      last day (113 days later) » 

05:01
After actually going through all the logs from the build process I've found one warning, the same for 8.0 and 8.1 build:

wasm-ld: warning: function signature mismatch: php_module_startup
 
1 hour later…
06:07
I just opened my eyes, but that's quite baffling:

https://heap.space/search?project=PHP-8.0&project=PHP-8.1&project=PHP-8.2&project=PHP-8.3&project=PHP-8.4&full=&defs=php_module_startup&refs=&path=&hist=&type=&xrd=&nn=5
static int em_sapi_startup(sapi_module_struct *sapi_module)
{
#if PHP_VERSION_ID < 80200
    return php_module_startup(sapi_module, NULL, 0);
#else
    return php_module_startup(sapi_module, NULL);
#endif
}
I make no other call to that function
06:35
I am looking, building with sanitizers and using different browsers trying to make it trip up, but its not working ... well, the javascript is crap and breaks, but the modue responds when I send it code no matter what state the ui is in ... still I keep looking
07:14
I'm getting somewhere now ...
@Ekin the heap.space site is really struggling, is it because of a lack of resources, because the foundation has access to aws (for free) ? if there's bugs in the setup, can I take a look ? it's still my most useful tool
08:03
I am able to load a sanitized build now, there might still be problems ... you can increase the resolution of information when those problems come with sanitizers/debug - do clean, then with-sanitizers and with-debug, the build will be absolutely huge and slow, but if you can reproduce a thing reliably it can normally give you enough information to find out what the problem is ...

I don't know of a good way to test this code, I came up with a test suite/runner ... but it can't actually be tested in browsers without humans I don't think ... loading in node tells us something, but not every
 
2 hours later…
10:00
how do JavaScript developers debug code, in the real world I mean, I can go ask an AI, but it will just tell me about policy ... I'd like to hear from someone that deploys JavaScript in production, how they actually test it, specifically how they test how it interacts with the dom/browser engine directly ... because you can run any js in node, but things are too different there ... so how do you release code knowing it will be okay in real browsers, is there a kit a don't know about maybe ?
10:31
@Joe Watkins @JoeWatkins It's possible to use something like Selenium to write browser-based unit tests to run in CI, however, nowadays the industry has mainly moved towards frameworks like React/Angular that abstract away the DOM, and Typescript for additional validation
Also it's less like it used to be, the vast majority of browsers are much more standards compliant. Safari has the most quirks.
 
5 hours later…
15:50
@Girgias Q about thephp.foundation/blog/2025/08/05/compile-generics - Any options for pre-parsing looking for Foo<X> and creating a precompiled version then and there and then mangling the names for both? I'm assuming that runtime-resolution of the class would mean it would need to be absolutely specified either with \ or with use
Nevermind, I just realised the obvious flaw :D
16:12
I'd think something similar to anonymous classes could work. Create another class definition dynamically at runtime which extends the class using generics.
The class definition would not appear abstract, but it would be in practical terms.
new Collection<string>() could be sugar for new class extends Collection<string>. I have no idea if that's possible or not.
16:53
@Joe Watkins @JoeWatkins I normally use Karma with jasmine and headless chrome. I have few projects that have extensive use of canvas and with that I am able to easily test the image generation (and can even see the output in browser if I wish).
17:34
@Joe Watkins: I make no other call to that function
@JoeWatkins I've finally found a way to fix the issue! I just have to rebuild everything 12th times until it starts working! Great stuff :D
now every version works
and I can reproduce the issue with zip upload! Seems to be exact like the one on the actual service
@Mortimer @Mortimer yes it should ... I will make local builds less painful, you'll probably still use docker, but there should be a sensible "make install" ...
what's the issue with zip upload ?
17:51
index out of bounds! Could you teach me how to retrieve a stack trace of an error in C? Seems like a great knowledge to have right now
not in the browser, there is only the javascript stacktrace and webasm disassembly, which you're free to send me ... teaching you how to read disassembly in general is probably ... not doable, not without several years :) ... but I can help you understand the relevant parts when we have a concrete bug to look at
build with-sanitizers and with-debug and the trace will be m,uch more useful
you may also create test file, you can use a debugger that way, but dude, this is not easy to do ... most javascript debugging happens in the browser, and the disassembly is not terrible, in gdb you'd be reading a disassembly of the compiled source (not a disassembly of the IR, which is webasm), it's going to be pretty hard to map that onto javascript with accuracy and speed ... but you may ... the node stacktraces might be easier to copy possibly ...
hm my main trouble is to set up a try catch to get the error :/ I google and google but I don't see any way to do it in C? Or am I missing something
c doesn't have try/catch
18:09
then how do you debug? I've been educated in a spoiled languages like PHP and my main goto is try/catch to get the actual error. Should I go line through line with logs and check what fails? Or is there a better method?
 
2 hours later…
20:33
@Mortimer @Mortimer essentially you have to know by looiking at the disassembly what's going on

« first day (5406 days earlier)      last day (113 days later) »