After briefly discussing it with the other day, I'm becoming convinced that it might just maybe be possible to make a usable functional lambda-calculus-like language interpreter ROM for the BBC Micro/6502. The hard part is obviously memory management and closures.
Conversation
Ideally we would have a small one-pass compiler into some kind of compact bytecode that can then be interpreted.
1
1
At no point should we have a syntax tree, due to memory constraints. Might make it hard to do the analysis for closure captures.
1
1
Memory management would be done via refcounting, I guess, but not sure how best to make the allocator in the first place in such a memory constrained scenario. How to keep track of free memory? Hmm
4
Would something like Perceus work I wonder? microsoft.com/en-us/research
2
1
Oh I guess your comment is more to do with the allocator itself?
Replying to
Yeah, I also have very little experience implementing memory management in general, let alone for the 6502.
2
Yeah, likewise! 😅

