Rendered at 05:48:07 GMT+0000 (Coordinated Universal Time) with Cloudflare Workers.
jbloggs777 2 days ago [-]
> I get restless now and then and I want to implement a programming language. Then after mustering the resolve, I stew, for there is no good implementation language.
Really a reply to the article, not the comment - but I sort of read the article, because I saw the quote and thought: "wait a minute, isn't racket made for that?"
Then I searched, and apparently accidentally implemented a Forth (caveat: no idea if it works):
there's a footnote about how the author didn't want to implement atop racket. no reason given but at least it was considered.
mathisfun123 1 days ago [-]
Do people have a fetish for recommending things on hn they just learned about on hn? I'm surprised this isn't a recommendation for mojo...
corv 1 days ago [-]
Their comment is relevant because Nim 3.0 uses a bespoke IR, NIF.
mathisfun123 1 days ago [-]
What exactly does that have to do with the blog post?
jbloggs777 10 hours ago [-]
If you are the kind of person who likes implementing programming languages (as stated in the post), then a language like Nim is interesting, and Nimony brings it to a new level with NIF and native compilation.
jbloggs777 1 days ago [-]
I'm a long time Nim user, albeit just for hobby projects.
cowlevel 1 days ago [-]
Note that if you want to write a programming language, it's not too hard, even doing it from scratch in C without any specific helper libraries. You should try it over a week, it's great fun (the first time). Either make an interpreter or a compiler to another language you're very familiar with - you do not need to understand how to make an executable file.
The main technique you probably won't figure out by yourself is called "recursive descent parsing". You can also use a parser generator if you like one.
kccqzy 1 days ago [-]
Recursive descent is something you can figure out without having heard of it. What you can’t easily figure out is what to do when the grammar is inherently left-recursive. Or limit the amount of lookahead. Or any fancier algorithm like the Earley algorithm.
Have you seen Nimony (Nim 3.0)? https://nimony.org/
Then I searched, and apparently accidentally implemented a Forth (caveat: no idea if it works):
https://share.google/aimode/fkVZsfLxoaayEBQSJ
The main technique you probably won't figure out by yourself is called "recursive descent parsing". You can also use a parser generator if you like one.