Hi all folks!
I'm writing this because I'm looking for collaborators for one of my side projects, it's a bytecode virtual machine for a (currently) toy language that I've been developing lately following an amazing book available for free at craftinginterpreters.com, you may find more technical information about the project at https://github.com/nocturn9x/japl (the name might need improvements). I'm currently seeking for people to help me because I'm not as good as some members of this forum with the language (Nim) and because I'm sure it will boost my motivation as well as skills to collaborate with someone else, so feel free to apply!
Thanks in advance for having took your time to read this far and sorry for the wall of text, I hope this doesn't bother anyone
If you're interested you can contact me via email at hackhab@gmail.com or via Telegram using either @GiambyBot or my direct account @nocturn9x
Even though the project is not as big as it seems, you're definitely right. If I had to pick one thing thta I desperately need help with I'd surely choose the VM. The compiler and lexer are just fine.
Would you be interested in collaborating?
I can review PRs of VM implementation, for VM design (as in what opcodes to choose and what do they do) I'm probably not experienced enough compared to people who worked on Nim VM.
For implementation if that can help:
Unfortunately I don't even have enough time for my personal projects so I can realistically only do reviews and obvious fixes.
If I had to pick one thing that I desperately need help with I'd surely choose the VM.
I've implemented two bytecode-based VMs. (Once ages ago in Pascal, and then this year in C++.) They're not as intimidating as they seem, especially if you've got a good book like the one you're using.
The basic steps are:
(I know this must sound kind of like that Monty Python "how to play the flute" sketch, but hopefully this shows how to start breaking it down into smaller problems!)
Well, since you are interested in VMs and programming languages development, let me point you to my own programming language (Rebol-inspired + stack-based VM) - also written in VM, with a solid system library included.
The project is not huge (roughly 7-8k lines), but growing. Also, the language is 100% working (I've already been using it for personal projects, although I doubt it if anybody else has used it at all... lol)
So, if you're interested in having a look, here you are: https://github.com/arturo-lang/arturo
@drkameleon glad to see you're back!
So VM channel on discord? So many people doing VM, custom languages, interpreters in Nim :).
but otherwise virtual-machines or interpreters might be the best.
Well, count me in!
I guess there are many people far more knowledgeable than me in this field, but given that I've been playing with interpreters/compilers/grammars/etc for the past 15 years, I hope there is something that I can contribute. :)
And, yes, in that aspect, Nim seems like a perfect choice. I had initially written Arturo in D, then I switched to C, and then I started looking for an alternative: basically, something that would keep C's strengths, but rid me of C's headaches. And here Nim definitely shines. ((I then made another attempt to switch back to C, but that's another story... haha I guess I'll stick with Nim)
This also might help to offload some of the compiler-related discussions from #main in separate channel so things won't get mixed so much (i.e. beginner questions together with RFC/issue discussion and so on).
As a sidenote, there are already a number of Lox implementations written in nim. A quick search:
https://github.com/Yardanico/nim-lox https://github.com/cabhishek/nimlox
I'm sure there are more.
Perhaps these can inspire and motivate you.
Also, you might be interested in:
https://www.objectpascalinterpreter.com/home
Which walks you through the same process, but using object pascal. Book #2 goes through implementing the bytecode VM.