Skip to content
0:00 / 0:00

#porth#forth#compilerbootstrapping

Making Programming Language in Python -- Porth Ep.01

Tsoding Daily

222K subscribers • 11 videos on Hallway

YouTube
  • Recommended by 2 people: 2 in engineering communities.
  • Presented by Alexey Kutepov, Tsoding
  • Linked in the descriptiontsoding/porth

Intermediate. Assumes working knowledge.

175K views5 years ago2 recommendations

Programming languagesSystems programmingPythonCompilers and interpretersLanguage design and type systems

Alexey Kutepov builds Porth, a stack-based programming language, starting with a Python interpreter and x86_64 assembly generator.

References: - Source Code: github.com/tsoding/porth

Why it's here

2 people recommend this

What people say. Recommended as an entertaining and educational series on language design and compiler bootstrapping.

u/McGeekinin r/ProgrammingLanguages • Recommends

On “Creating a language with Python.”

Good recommendations in this thread. I'd like to add Tsoding's Porth programming language. He made a stack based Forth-inspired programming language in Python with both an interpreter and x86_64 assembly generation. Definitely less traditional but still a fun watch.

u/settrbrgin r/rust • Recommends

On “If the first rust compiler was written in c would rustc compile faster?”

For people interested in bootstrapping I think this youtuber (Tsoding) explains it well. It's not an educational playlist really, more entertainment. They are writing their own language (porth) and build the compiler in python first, then later in the series they will rewrite the Porth compiler in Porth. It's also very interesting just to listen to the design choices and so on. link to this video I wish they would continue the series.

u/18gatenmaker6in r/rust • Mentions

On “Rust can be good for less experienced programmers”

My problem is python's weird (albeit backwards compatible, at least syntactically) `dataclass` and `enum` implementations. Rust's way of doing these things is baked into the type system, where python uses magic modules (which define in their turn weird classes and functions). Python's data class features are mostly described using traits, and enumerations are just a language feature. Python's way of doing these things is just confusing. I even saw Tsoding create his own enum implementation, using a iota function. Edit: timestamp is 14:43