Elektrine lite

← Feed

@wrog@mastodon.murkworks.net

Post #515038

2026-03-04 07:24 UTC

@kentpitman@climatejustice.social @screwlisp@gamerplus.org @cdegroot@mstdn.ca @ramin_hal9001@fe.disroot.org There were other weirdnesses as well. Even if GC saves you the horror of referencing freed storage, or freeing stuff twice, you still have to worry about memory leaks and moreover, dropping references as fast as you can matters With copying GC, leaks are useless shit that has to be copied -- yes it eventually ends up in an old generation but until then it's getting copied -- and copying is where generational GC is doing work, and it's stuff unnecessarily surviving to the medium term that hurts you the most (generational GC *relies* on stuff becoming garbage as quickly as possible) And so, tracking down leaks and finding places to put in weak pointers started mattering more... 4/3

Replies (1)

  • @wrog@mastodon.murkworks.net 2026-03-10 23:50

    @kentpitman@climatejustice.social @screwlisp@gamerplus.org @cdegroot@mstdn.ca @ramin_hal9001@fe.disroot.org @JamesGosling@universeodon.com I should note that seeing this https://universeodon.com/@JamesGosling/116173132555028212 reminded me that I didn't actually totally understand this https://mastodon.murkworks.net/@wrog/116169652684073570 until it came time for me to implement my own garbage collector for ASTLOG, and I'm definitely **not** any kind of GC expert. I used a dirt-simple 2-space copying collector that Appel published in the 80s that somebody pointed me to. it ran every bit as fast as promised. (and debugging a GC is such an acid trip. Stuff just **disappears**; you have to figure out how (who'd've guessed this would happen?). I now think that writing a GC, like dissecting frogs in 9th grade, is something that **everybody** should do at least once.

    Open ##619780