Announcing #junelang, an experimental safe systems language with a focus on being readable, learnable, and teach-able.
https://www.sophiajt.com/search-for-easier-safe-systems-programming/
Announcing #junelang, an experimental safe systems language with a focus on being readable, learnable, and teach-able.
https://www.sophiajt.com/search-for-easier-safe-systems-programming/
@sophiajt looks awesome! 😄 Looking forward to following the developments.
Quick question, how will `recycle` work on cyclic linked lists? Panic, keep the memory bloat (every pointer is still technically in use once), or somehow detect that the entire cycle can be recycled at once?
it does a trace and then matches the trace count to the copy count. That works for structures with cycles, at least in theory.
@sophiajt nice! 😊
I can see the similarities with a GC. The fine grain control is very cool!
Another quick question, for the free lists to be efficient, I imagine you only store objects of the same size in a given allocation pool, is that right? So it's a bit like you have a ref pool for each type? Or maybe there's some sharing if different types have the same size?
perhaps, but I see this is a tooling challenge. We teach the developer about iterative improvement, we enable tracing in debug builds, and we light it up in CI. That way you can still get something to work quickly, and then iterate towards something that's good.
hence the need for tooling
some of the folks I showed do believe that there's a lot of space for static analysis we could explore. Definitely something to look into
@sophiajt @basilehenry Then again, feels like if you do static analysis, you can insert the recycles automatically and you end up with something very similar to Swift’s refcounting.
Sorry to be so critical. I really liked everything in the post except for the manual recycle calls. But if the automatic grouping is good enough that e.g. everything in a web server request gets auto-collected and you never really need the recycles, that would be awesome.
We wouldn't insert them automatically unless the user asks us to update the code. They need to be visible because they're a linear time operation, so the maintainers/reviewers need to see when the recycle happens.
@sophiajt Congrats!
The ideas and axioms are definitely worthwhile to explore, even if the language itself is not my jam.
yes, very likely it will support changing out the program allocator (and maybe even fancier allocator configurations)
haven't heard of that one. someone else mentioned another crate that did some similar things. Would be nice to have Rust let you do some of these things more easily.
@sophiajt we quit rust development but, yeah, it really would.
we made "selfref" as part of trying to rewrite hexchat in rust. we never finished that, but for the parts we did do, it worked really well. we never used its theoretical ability to have cyclic linked lists and whatnot tho.