@terrorjack@functional.cafe avatar

terrorjack

@terrorjack@functional.cafe

This profile is from a federated server and may be incomplete. Browse more on the original instance.

terrorjack, to random
@terrorjack@functional.cafe avatar

sysadmins: do you use btrfs/zfs snapshots as another line of defense in addition to nixos's own system generations? if so, why?

terrorjack, to random
@terrorjack@functional.cafe avatar

i can fuzz haskell programs with afl++ now, let's see how well it works

terrorjack, to haskell
@terrorjack@functional.cafe avatar

ok. sparks is indeed a nice way to get work stealing nested parallelism for free in , as long as you work with spark# directly and don't use par, pseq or anything built upon these combinators

terrorjack, to random
@terrorjack@functional.cafe avatar

i guess formally breaking up with only real friend irl on a sleep deprived day might not be the best way to celebrate a birthday

terrorjack, to random
@terrorjack@functional.cafe avatar

til nix builds started as root does not go to nix-daemon...which means i also need to lower the nixos-upgrade.service nice level on my vps to prevent the builds from impacting the responsiveness. hmm

terrorjack, to random
@terrorjack@functional.cafe avatar

削足就履,aka "cutting foot to fit in the shoe", aka "fitting your green thread system into wasm as shipped in browsers today, no asyncify cheat no worker thread cheat, oh btw your implementation must support async exceptions to the extent that a message passing agent system can live on top of it, literally"

terrorjack, to random
@terrorjack@functional.cafe avatar

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

terrorjack, to random
@terrorjack@functional.cafe avatar

postgres, redis, elasticsearch, need to go over these quests before the final quest: mastodon. oh and i didn't even mention smtp or any self hosted email stuff. not worth spending any time on that front!

terrorjack, to random
@terrorjack@functional.cafe avatar

hmm, someone worked on a parallel quickcheck (paper accepted for ifl): https://github.com/Rewbert/quickcheck

terrorjack, to random
@terrorjack@functional.cafe avatar

poor man's cmm debugger is compiling via c and passing "stage1..ghc..opts += -keep-tmp-files -optc-g3" to hadrian (-optc-g3 is required even with debug_info flavour transformer). this way you don't need to scratch your hair against a bunch of x64 assembly when debugging cmm segfault with gdb

terrorjack, to random
@terrorjack@functional.cafe avatar

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)

terrorjack, to random
@terrorjack@functional.cafe avatar

spj moving away from comic sans!?

terrorjack, to random
@terrorjack@functional.cafe avatar

you seem to be shaking the phone in frustration. would you like to open the bug report screen?

terrorjack, to random
@terrorjack@functional.cafe avatar

need an sncf ticket price scraper, no kidding

terrorjack, to random
@terrorjack@functional.cafe avatar

jira is finally happening yay i will agile and 10x

terrorjack, to random
@terrorjack@functional.cafe avatar

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"

terrorjack, to random
@terrorjack@functional.cafe avatar

32gb of ram is definitely not enough if your company's business logic has 6k modules or so

terrorjack, to random
@terrorjack@functional.cafe avatar

wut? if i redirect stdout to a file then it works, otherwise it doesn't?

terrorjack, to random
@terrorjack@functional.cafe avatar

ah, so with memfd_create+mmap you can have multiple virtual address ranges alias to the same physical memory range, and it's useful for gc implementation (azul's c4 paper mentions its usage)

terrorjack, to random
@terrorjack@functional.cafe avatar

> 2028: humans are the currency used by robots, they treat us nicely so we don't deprecate in value. Human capital has a new meaning.

excellent writing prompt in a /r/singularity comment

terrorjack, to random
@terrorjack@functional.cafe avatar

my next c project will be clang exclusive, solely for the musttail attribute

terrorjack, to random
@terrorjack@functional.cafe avatar

join the petition to tax higher order functions from programming! don't let devs get away without paying maintenance tax when they casually add a continuation parameter and pass a function defined 100k lines away in the codebase

terrorjack, to haskell
@terrorjack@functional.cafe avatar

ghc wasm backend jsffi has finally been implemented! the rest is source notes as well as user-facing documentation. not sending a discourse thread yet, but for the curious eyes, here's what's supported so far (and also an ama thread):

  1. calling sync js function

foreign import javascript unsafe "console.log($1)" js_log :: JSVal -> IO ()

js src text can be any valid js expr or statements, using $1 etc to refer to the haskell arguments. JSVals are first class haskell values and garbage collected.

  1. calling async js function

foreign import javascript "fetch($1)" js_fetch :: JSString -> IO JSVal

await is supported in js src text. calling it initiates the side effect immediately, and returns a thunk that only blocks on promise resolution when forced, allowing concurrency without even needing to fork haskell threads. promise rejections are captured as haskell exceptions.

  1. js callback -> haskell function

foreign import javascript "dynamic" js2hs :: JSVal -> Arg1 -> Arg2 -> Result

pretty much same thing like "dynamic" ccalls, though we use JSVal to represent a js callback instead of FunPtr.

  1. hs function -> js callback

foreign import javascript "wrapper" hs2hs :: (Arg1 -> Arg2 -> Result) -> IO JSVal

yup, this converts any haskell function closure to a js callback that you can pass to 3rd party frameworks. it's garbage collected on the js side as well, the haskell closure will be dropped if the callback is unreachable in js later.

  1. foreign exports

foreign export javascript "js_func_name" hs_func_name :: Arg1 -> Arg2 -> Result

this will end up as a wasm export named "js_func_name" directly callable in js, and it returns a promise of the final result that can be awaited.

the hardest part of all the above work is concurrency & re-entrancy: calling async js should be cheap, should not block the runtime, should play well with existing threading model in haskell. and hs can call into js that calls back into hs, indefinitely. i'll write up more detailed explanation on how this is delivered

terrorjack, to random
@terrorjack@functional.cafe avatar

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

terrorjack, to NixOS
@terrorjack@functional.cafe avatar

ah another 23.11 footgun: i lost my previous systemd lingering and i was scratching my head why my services kept exiting...the good news is, "users.users.<name>.linger" is now a thing

  • All
  • Subscribed
  • Moderated
  • Favorites
  • anitta
  • thenastyranch
  • rosin
  • GTA5RPClips
  • osvaldo12
  • love
  • Youngstown
  • slotface
  • khanakhh
  • everett
  • kavyap
  • mdbf
  • DreamBathrooms
  • ngwrru68w68
  • megavids
  • magazineikmin
  • InstantRegret
  • normalnudes
  • tacticalgear
  • cubers
  • ethstaker
  • modclub
  • cisconetworking
  • Durango
  • provamag3
  • tester
  • Leos
  • JUstTest
  • All magazines