TypeScript: Live Coding a Lisp Interpreter from scratch (Part 1)

preview_player
Показать описание
In this series I am creating an interpreter that can take a subset of Lisp code as input and run it in an interpreter, all in TypeScript. Learning to write an interpreter is a great way to understand data structures and recursion. Without going deep into compiler theory I will show you how easy it is to create a compiler/interpreter that can parse and run Lisp in our own Evaluator (VM) we create. I use Test Driven Development to improve and grow the code without being dogmatic. Understanding data structures is essential to master Computer Science. Learning to use TDD is a great way to understand Software Engineering. To become a good programmer, you need to master both these aspects.

Lisp is a simple yet powerful programming language.

In this first video, it's all about parsing the code and creating data structures that makes it easier to parse further.

code can be found here:
Рекомендации по теме
Комментарии
Автор

Why don't you use


For the array comparison

xerxius
Автор

Why so much code to do things that bare JS can do itself?
I mean JS internally works closer to the Lisp, at least it already provides runtime off the shelf.
So, to make JS/TS to be Lisp, is not enought just to write two functuons: eval() and apply() ?

dmitryponyatov
welcome to shbcf.ru