| Bluesky | @cfi.bsky.social |
| Bluesky | @cfi.bsky.social |
@whitequark @cliffle with statement expressions, you can mix in UB from indefinite argument evaluation order and construct Duff's Russian Roulette
switch (rand())
foo(({ case 0: a; }), ({ case 1: b; }), ({ case 2: c; }), ...);
@cliffle that's my favorite way to print a comma-separated list
switch (i = 0, count) for (; i < count; ++i) {
printf(", ");
default:
printf("%d", elements[i]);
case 0:;
}
since NYT games has revealed people like constraint solving, i figured i'd pitch them a struct packing game
it'll just cost them a copy of libclang - a measly half a gigabyte of text
Build your compiler upside down. Have objects demand codegen demand sema demand parse.
AOT is a compiler demanding object files
A JIT is a compiler demanding codegen
An IDE is a compiler demanding sema
An indexer is a compiler demanding parse
Establish stable identities for your intermediates; your compiler is a database engine. Its demands are the queries.
Build something like it’s 2025.
https://mastodon.social/@cfi/115209288255249990
Google’s AI has credulously reported an April Fools YouTube video as fact.
Do not eat rosin. Do not make rosin from maple tree sap. Do not eat rosin made from maple tree sap.