Fun is an experiment, just for fun, but Fun works!
Fun is a highly strict programming language, but also highly simple. It looks like Python (My favorite language), but there are differences.
Influenced by Bash, C, Lua, PHP, Python, and a little Rust.
Fun is written in C(C99) and many libs are implemented in pure Fun. Smartcard(PCSC) is available as extension written in C while sha256 or sha512 are implemented in Fun.
Would love to get some feedback (hanez@fun-lang.xyz), but please read the content on https://fun-lang.xyz first.
Have fun! hanez
• Yes: shared‑memory primitives are the “escape hatch” for when copying/serialization is too expensive, but they should be very carefully constrained.
• GC: If you design shared regions to be untraced (no VM heap pointers inside), each VM’s GC can remain independent and never stop other VMs. If you allow GC’d objects to be shared across VMs, you either need a global safepoint (stop‑the‑world across participants) or a more complex concurrent/barriered scheme.
I added some more information about this to the internals document.
• Zero‑copy sharing is done with fun_shared_buffer, an off‑heap, GC‑untracked, pointer‑free block that’s immutable from the VM’s point of view.
• Lifetime is managed with plain reference counting (retain/release).
• For hot paths, we also support an adoption (ownership‑transfer) pattern during message passing so the sender can drop its ref without copying.