←back to thread

429 points rui314 | 1 comments | | HN request time: 0s | source
Show context
sdegutis ◴[] No.10731279[source]
Thought this was going to be an inspiration to me to continue with my pet project of writing my own little programming language. But it starts off on day 8 with him already having written a basic compiler, with no explanation of how he did any of the basics. Still interesting, just not what I thought it was.
replies(5): >>10731293 #>>10731295 #>>10731322 #>>10731384 #>>10731600 #
c4n4rd ◴[] No.10731322[source]
Same here. I have been trying the same project as you... and get stuck on the grammar, every.single.time.

Are you done with that part yet?

replies(6): >>10731391 #>>10731413 #>>10731690 #>>10731969 #>>10733429 #>>10736115 #
1. sdegutis ◴[] No.10733429[source]
I haven't finished any part of it yet. My goal is to write a small language entirely in C. It would have a lexer, parser, bytecode compiler, stack based bytecode VM, and GC. It would only have numbers, strings, and functions to start with. That would be my "hello world" that I can build on to add new features. And since it would all be written in C, it could be easily embeddable. So my goal is to make it similar to Lua, except with a nicer API for embedding. I've got some vacation days coming up and hope to make some progress on this during that time.