3 ms·
I wrote a few of these due to an interest in compilers and hardware. The easiest syntax to copy if you’re looking for a high level language is Smalltalk. But
by true_religion 5mo ago
I wrote a few of these due to an interest in compilers and hardware.
The easiest syntax to copy if you’re looking for a high level language is Smalltalk.
But most of the time, I wouldn’t even use that. Simple imperative languages that look like BASIC works pretty well in most domains. If you simplify the syntax a little, it’s very easy to understand the compiler and use it for say when you want users to input code into existing systems.
- sieve 5mo agoI have written compilers for two families over the years: C and ML. My current preference is Python. I am currently working on a statically typed language that is inspired by Python (minus objects and OOP) that runs on a register VM. Syntax is a minor issue but something that people are very opinionated about. You could technically build multiple front ends that share the typechecking, CFG validation, optimization, register allocation and byte code emission phases. But it is too much work for what is presently a personal project.
- FattiMei 5mo agoAre they public? Can we study from them? Got later into compilers and I'm trying a little bit of everything
- fuzztester 5mo agoThere are many open source compiler and interpreter projects on github. also: https://github.com/BaseMax/AwesomeInterpreter https://github.com/BaseMax/AwesomeInterpreter and probably there is one for compilers too.
- sieve 5mo agoThe older ones, no. The current project will be. I am developing in private and occasionally rewriting the jj tree to make each commit self-contained. So it won't contain all the false-starts and bad code, only the cleaned up version. "ut" (https://github.com/s-i-e-v-e/ut https://github.com/s-i-e-v-e/ut) exists, but it is more of a POC for the syntax more than anything. So lexer+parser+typechecker. Did this during COVID in TypeScript but did not finish.