Email or username:

Password:

Forgot your password?
Devil Lu Linvega

"I'm off to bed"
"Wait, before you go, if you HAD to make a garbage collected language, what would it look like"
"uhhh"
*twists and turns all night*
"uhhh"

14 comments
Leonard Ritter

@neauoire my present approach: just don't ever collect anything in RAM. when you run out of RAM, you swap it to disk. diskwise (a) you have hundreds of gigabytes available to fill (b) your I/O is synched, so you can naturally use those syncpoints to collect garbage on disk

Douglas Creager

@neauoire Does it have to be _garbage collected_ specifically, or just have some kind of automatic memory management?

Devil Lu Linvega

@dcreager my friend said "garbage collected", but yeah, I think anything goes. I'm trying to push this all at the back of my mind right now

Douglas Creager

@neauoire haha roger that! It's probably best as a pub conversation anyway 😀

Farbs

@neauoire It turns out it'd look like embedding Lua or something similarly small and putting it in charge of any allocations & lifecycle management.

Source:
That's what I did.

daj

@neauoire I wrote a garbage language once so I'm halfway there!

tinspin

@neauoire No matter how long language designers twist and turn they will always end up with Java. Go is just Java without VM. WASM is just Java without GC (soon with GC at which point the circle is complete and we reinvented the Applet). GC is just a symptom of dynamic memory allocation. I would make a VM that only executes Java bytecode with statically allocated arrays. Avoid cache-misses and guarantee atomic parallelism by removing the GC!? Use dynamic libs and/or some classloader instead.

Kiëd Llaentenn

@neauoire what would a stack-based GC/RC language for uxn be like 🤔

cancel

@neauoire If the runtime detects data the program didn’t deallocate itself correctly and needs to garbage collect, it does it, but then also deletes the offending source code that caused the allocation and leaves a passive aggressive note about it in a notes.txt

Fred Moyer

@neauoire push all the struct addresses into a queue, have a cron job free() them

Go Up