Gen-lang/Gen

Make another gen implementation(Optional)

Closed this issue · 24 comments

I think it will be good to have another gen implementation in other languages since the pygen implementation can be slow and it is also memory inefficient. I do think it needs to have a VM(virtual machine, python, java and other more languages use this), JIT(just in time) compiler or other more like AOT compiler(ahead of time). I think a VM is enough for portability since JIT compilers can compile to the target architectures that they only can support. This is only optional since performance and memory usage sometimes don't matter. Please correct me if I'm wrong.

I'm thinking of that. But I don't know how to create a virtual machine and JIT.
I'm still a newbie in creating languages.

Or maybe I can convert it to a faster language, but I'm also not good at lower languages like C++, Rust, etc.

It's ok though. I think gen has good performance when running a repl or maybe executing a .gen file?

I think you could implement this in C. The thing is that memory handling, node structures and other more are hard to implement.

I'm thinking of that. But I don't know how to create a virtual machine and JIT. I'm still a newbie in creating languages.

Virtual machine is a machine inside a physical machine that can execute a series of bytes or bytecode.
JIT compiling is compiling bytecode to the host architecture's machine code.

The thing that you use is an AST evaluator or tree-walk interpreter

If you want to learn more about creating a virtual machine in your language in C here or creating a language in general:
https://craftinginterpreters.com/contents.html

Or maybe I can convert it to a faster language, but I'm also not good at lower languages like C++, Rust, etc.

That could make it faster. Maybe?

I'm not good at lower-level languages. I just started coding a couple of years ago :(
What languages can you use? If you can, maybe you can convert some of the pygen source code.

BTW, thanks for the resource.

Umm. I use C(I use this often), C++(I dont really know), Python(a bit), C#(dont remember anything now), JS(just the basics)

I also started coding 1 year ago or 2 years?

I think I add a new directory to this repo and create the language from scratch again because it's getting messy.

That would take longer. In python?

Maybe in another language.

Is it midnight in chicago?

It's 10pm

I think I will take some time to read the resource you gave me.

Oh my. Its still afternoon for me.

12:10 pm to be exact.

I might not be able to answer.

It's ok.

That's because I'm taking AP classes which are hard (for me, at least).

Focus on your AP classes, don't worry about another implementation for gen. I might make one.

Thanks!!

Heres the implementation that has nothing:
https://github.com/Gen-Lang/CGen

Thanks for inviting me to Gen-Lang btw.