Rust 101 – 47: Exercises for module F (q2)

October 21, 2024 [Programming, Programming Languages, Rust, Tech, Videos] Wrapping C functions in safe Rust code. Series: Language basics, More syntax, Traits and generics, Building applications, Concurrency and parallelism, Trait objects, Async, Not safe This section (Async): 42: Why is it unsafe?, 43: Meaning of unsafe, 44: Undefined behavior, 45: Types of unsafe, 46: Exercise…

Rust 101 – 48: Exercises for module F (q3)

October 21, 2024 [Programming, Programming Languages, Rust, Tech, Videos] Implemented our own Result type that has a specific memory layout, so it can be used by Roc code. Series: Language basics, More syntax, Traits and generics, Building applications, Concurrency and parallelism, Trait objects, Async, Not safe This section (Async): 42: Why is it unsafe?, 43:…

Mini-rust in Rust 004: Refactoring our lexer

Refactoring our lexer, so that all the bad things we did to make tests pass are behind us. You can find the source code at codeberg.org/andybalaam/milk and more of my stuff at artificialworlds.net Game Online Gaming Hub

19 years of blogging – Andy Balaam’s blog

October 22, 2024 [Writing] As you may know, I recently upgraded my blog from WordPress to Zola. This means my home computer does the work of rendering the page to HTML once, and my web server only has to provide the rendered HTML to your browser. This means pages appear faster on your screen, and…

Mini-rust in Rust 003: A much more beautiful glitch

More about the basic structure of our interpreter: making error messages from the lexer point to the right lines 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 Game Online Gaming Hub

Rust 101 – 49: Foreign function interfaces (interacting with other languages)

October 23, 2024 [Programming, Programming Languages, Rust, Tech, Videos] Calling C code from Rust, Rust code from C family languages, using cargo-bindgen, and creating Python extensions. Series: Language basics, More syntax, Traits and generics, Building applications, Concurrency and parallelism, Trait objects, Asynchronous, Unsafe, FFI This section (FFI): 49: FFI50: Exercise 1, 51: Exercise 2, 52:…

Mini-rust in Rust 002: Error while lexing

Continuing to write our mini-rust in Rust. Figure out how to make mistakes when lexing is wrong. You can find the source code at codeberg.org/andybalaam/milk and more of my stuff at artificialworlds.net Game Online Gaming Hub

Rust 101 – 50: Practice for module G (q1)

October 23, 2024 [Programming, Programming Languages, Rust, Tech, Videos] Calling C code from Rust, Rust code from C family languages, using cargo-bindgen, and creating Python extensions. Series: Language basics, More syntax, Traits and generics, Building applications, Concurrency and parallelism, Trait objects, Asynchronous, Unsafe, FFI This section (FFI): 49: FFI, 50: Exercise 151: Exercise 2, 52:…

Mini rust in Rust 001: Lexing and int

October 31, 2024 [Programming, Programming Languages, Rust, Tech, Videos] #mini-rust Introducing my new series: writing a bit of a Rust-like language in Rust. It will be an interpreted language, and (at least for now) it will try to work as much as real Rust. Maybe someday it will be a useful language, but for now…