Here is a non-exhaustive list of features i would love to have it included: - separate effect full code from pure logic - separate state and code - ai native debugger - native deterministic simulation testing - coding proofs - explicit type system - repl - wasm target
I have no background in compiler building or similar. I would just like to spend some weeks reading the best resource about this topic.
Please share any resource you recommend reading.
The challenge isn't really in building a decent implementation or adopting useful features. There are plenty of languages with decent implementations and features that are on display in Github graveyard.
The challenge is to deeply understand what THE PROBLEM is. Books won't help you with that at all. Long walks, drinking fresh water, meditation, prayer. It may take years.
And once you understood the problem, the path is clear: research and studying prototypes of other people helps greatly.
What is the problem that you're trying to solve? You listed the features, not the issue you're aiming at.
If you find it a bit hard to chew, there is a simpler book using Python: https://www.amazon.ca/Anthony-J-Dos-Reis/e/B001KE4SU8/ref=dp...
Another book: Game Scripting Mastery.
A lot of the complexity and front-work of these kinda things is the parsing step though, so you can follow MAL (or any other make a lisp tutorial) though that won't necessarily help with other languages it frees you to jump to the interesting parts.
FORTH, mentioned in another comment, has that same appeal. I wrote a quick tutorial here, back in the day:
I'd recommend starting with implementing a forth since it's the easiest language to write an interpreter/compiler for. From there you'll have enough experience to go for something bigger.
Making your own bytecode is really fun.
Ultimately you'll probably want your compiler to target llvm bytecode so that it works on every target automatically.
That’s a feature of the abstract machine. TM and Von Neuman is very reliant on a global (and locals) state. Lambda calculus does not and instead requires evaluation (or reduction in symbolic terms).
Best bet for this is some book on computation theory, but as the name says, they’re full of theory, but it’s kinda the foundation of everything.
> separate state and code
Not really possible. The name “code” cames from the fact that you’re encoding logic and data to represent a process. It’s a closed system and the above books explain how and why it works.
> ai native debugger
What does that mean? A debugger is mostly the capability to stop a process and inspect the current state. How does AI helps?
> native deterministic simulation testing
What does that means?
> coding proofs
Again, the books on computation theory will helps. Most of them will only explain the context free grammars (tightly coupled to TM). There’s a bunch of abstraction on top of that that leads to C, JavaScript and Python. There’s also the various other systems like Horn clauses, lambda calculus, and relational algebra. All have mathematical models that are the basics of such proofs.
> explicit type system
The main book I can recommend is Types and Programming Languages by Pierce. It also requires a good knowledge of basic computation theory. Quick note: Computation does data transformation, types helps with proving that.
> repl
While not impossible, it clashes with the above. Explicit typing is cumbersome to write while REPL is all about quick iteration. Some simple software like ed and ksh can help there.
> wasm target
Going from assembly to C is about design abstractions, compiling C to assembly is building those abstractions. Targeting wasm is about design what would take you to go from wasm to you abstract machine that is capable of executing your language and then starting to build it.