Category: Uncategorized
-
Mini-rust in Rust 016: Tidying our parser
We left our parser in an awful mess after the last video, so we’re going to tidy it up a bit and make it easier to understand. You can find the source code at codeberg.org/andybalaam/milk and more of my stuff at artificialworlds.net
-
Mini-rust in Rust 014: Evaluating an assignment
Finally, we are going to execute a real piece of code that actually looks like a programming language! We are setting a variable to a value, and then using that variable later on… You can find the source code at codeberg.org/andybalaam/milk and more…
-
Mini-rust in Rust 012: Parsing with backtracking
We’ve built a toy parser, but it’s not going to last us. We need to make it a bit more proper. Specifically, we need to be able to look ahead, and then backtrack. You can find the source code at codeberg.org/andybalaam/milk and more of my stuff at art…
-
Mini-rust in Rust 011: Parsing an assignment plus expression
Last time we lexed an assignment statement. This time: parsing it, so we’re ready to execute it! You can find the source code at codeberg.org/andybalaam/milk and more of my stuff at artificialworlds.net
-
Mini-rust in Rust 010: Lexing an assignment
We’re ready to lex a proper statement: specifically a “let” statement that will give a variable its value. You can find the source code at codeberg.org/andybalaam/milk and more of my stuff at artificialworlds.net
-
Mini-rust in Rust 009: Handling parsing errors
Our parser kinda works, but it needs some work to be less terrible. We’ve realised we did a few things in awkward or wrong ways, so let’s fix them before they get out of hand. You can find the source code at codeberg.org/andybalaam/milk and more of my…
-
Mini-rust in Rust 007: Evaluating an operation
Now that we can parse things, let’s evaluate them. By the end of this, we should be able to use our little language as a mini-calculator (only for adding up so far though). You can find the source code at codeberg.org/andybalaam/milk and more of my st…
-
Mini-rust in Rust 006: Parsing an operation
We’re finally ready to parse things! Our lexer can do almost enough to allow us to handle “3 + 5”, so we’ll make that ready, and then parse that expression into a syntax tree. You can find the source code at codeberg.org/andybalaam/milk and more of my…
-
Mini-rust in Rust 005: Making our lexer an iterator
Our lex function returns an iterator, but in the implementation we were faking it. Let’s do it properly. You can find the source code at codeberg.org/andybalaam/milk and more of my stuff at artificialworlds.net
-
Mini-rust in Rust 003: Much prettier errors
More of the very basic structure of our interpreter: making the error messages from the lexer point at the exact line of code, in a pretty way. You can find the source code at codeberg.org/andybalaam/milk and more of my stuff at artificialworlds.net
-
Mini-rust in Rust 002: Errors while lexing
Continuing writing our mini-rust in Rust. Figuring out how to throw an error when lexing goes wrong. You can find the source code at codeberg.org/andybalaam/milk and more of my stuff at artificialworlds.net
-
Deployment is important
I just evaluated and installed software for providing comments and statistics for this blog. Here are my experiences of the deployment process: A Python comment system. Uses one of the 17 outdated installer/packaging systems for Python (none of which…
-
Rust 101 – 47: Exercises for module F (q2)
Wrapping a C function with safe Rust code. Series: Language basics, More syntax, Traits and generics, Building applications, Concurrency and parallelism, Trait objects, Async, Unsafe This section (Async): 42: Why unsafe?, 43: Meaning of unsafe, 44: Un…