i've just finished 3 body problem (netflix adaption) and as someone who read the original novel series in chinese, i enjoy most parts of the show. a few scenes that i like or dislike (spoiler alert)
for the past few days i've been adding asan support to #ghc rts. motivation: the rts is a c monolith that does complex memory management, segfaults are very rare but they do occur sometimes as people reach for help in issue tracker and matrix channel. so i'm really hoping the rts development workflow can be backed by sanitizers and fuzzers to make this monolith more rock solid than it currently is.
have been discussing game engine and server and ecs stuff with homie after our self hosted palserver crashed for a second time in a day. and then he showed me a siggraph23 paper that implements an ecs in a gpu for a game backend...with a repo i starred long ago but never bothered to take a closer look
configuring nixos-wsl from a fresh install to my desired state is like playing dark souls. a bit harder admittedly, but it's for work and done in my working hour so i'm fine with that
one aspect #haskell still sucks is build parallelism:
vanilla cabal builds are coarse grained and have component level build dependency
cabal/ghc has multiple home units now but that's only for repl for the time being
cabal/ghc has semaphores now so multiple ghc --make -jsem processes can share cpu cores without oversubscribing. which is nicer, but not nice enough
semaphore format is home brew and not something more standard like make jobserver. hard to fit in external build systems
external build systems resort to using oneshot mode instead of make mode, so one ghc invocation produces one .hi .o pair, and a fair amount of cpu cycles is wasted compared to make mode due to repeatedly building context that could have been shared
more importantly, once .hi of upstream module is emitted, before ghc -c exits, downstream module should queue for compilation immediately. but this is tricky to implement and often omitted
ironically the wasted cpu cycles in ghc oneshot mode is often compensated by increased parallelism. because external build systems parse cabal metadata but breaks cabal component level dependency wall
but now there's a thing called cabal custom setup and now you need to resort to actually respecting Setup.hs for those packages and they can easily become bottlenecks of a build
the people equipped with knowledge to fix the situation thoroughly have tons of more important issues on their plate
ok. sparks is indeed a nice way to get work stealing nested parallelism for free in #haskell, as long as you work with spark# directly and don't use par, pseq or anything built upon these combinators
#agda seems to compile with ghc wasm backend with just a bit of modification (remove custom setup & gitrev)! i'm not familiar with agda internals, but as long as it only involves file i/o and doesn't need to spawn processes to do real work, then in principle it shouldn't be hard to get a fully functional agda in browser working :)
motivated by fosdem rr & gdb talks: my personal guess is they snapshot process state pre/post syscalls so to handle side effects. if this is true, this kind of reverse debugging should ideally be implemented for wasm32-wasi instead, because with wasi you have a really small set of well-defined side effects, and you can also snapshot the vfs in addition to linear memory
evil little trick learned from fosdem: to debug systemd, you could use a shell script as stub init script that spawns gdb server to debug itself, then execs into systemd
after landing jsffi for ghc wasm backend, next thing i'll work on is template haskell support. and after that, threaded rts. yes, it'll be possible to run a haskell app in your browser that eats all your cpu cores (for a better purpose than crypto stuff, i personally hope)
if people want "apt install" experience with nix, instead of trying to force feed "declarative" or "reproducible" down their throat, how about giving them an actual cli that they can do "nix install" in the same nix shell and have the changes reflected in the nix file. and nope, you know i'm not talking about "nix profile install"
i thought the anime/game industry is big enough for jobs that specialize in designing non-existent uis to exist? will i starve if i start a consultancy that design non existent cool programming languages that's never meant to be run
my ai-dar beeps more and more frequently these days when browsing content in chinese internet walled gardens. in the past the main source of fun is guessing what snake oil are they trying to sell (insurance? financial product? etc). that fun has declined quite a bit and finding interesting content is now like mining gold in a copper mine
it's funny to ask chatgpt a question and watch it spit out a latex formula, "analyzing" for a while, and "oops why it output 100% probability, doesn't make sense, let's try another formula" (it's 0 according to common sense), repeat a few times and then give up