Elf M. Sternberg

Full Stack Web Developer

Where one teaches, two learn.

Tag: #Rust

To all tags

Working on Scarlett 2.0, and the SQL is fun!

I’ve been hacking on a secret project that I’ve had in the works since, oh grief, the first check-in was:

<code>commit ccb93ca5f2b256babfa0f2ef9110ac0ac4019527
Author: Elf M. Sternberg <elf.sternberg@gmail.com>
Date:   Mon Feb 4 23:03:01 2013 -0800

Initial check-in for Scarlett.</code>

The original project (yes, it’s named “scarlett”, deal with it) was in a combination of Python and Javascript, with Backbone as the front-end. It was, quite frankly, a terrible project, but it did what I wanted it to: it kept track of my notes. I have a directory named “Wiki” into which I dump markdown files, and have for years, and all it does is give me a slightly better UI for ‘grep,’ but it’s better than nothing.

Lab Notes, First Two Weeks of January: Pamseam w/Lattice Experiments

Lab notes for the first two weeks of January.

I’ve been fiddling with a branch of the PamSeam project named Lattice in an effort to streamline the base and speed up the runtime. There are three algorithms enabled and all of them have similar processes. The basic engine is also very slow, with lots of large allocations and copying the image over and over.

Hitting the math-vs-engineering speedbump with the Regex project

A Play on Regular Expressions Part 4: Are We Done Here?

A Play on Regular Expressions, Part 3: The First Haskell-to-Rust Port

Today's Lesson in Implementing Theoretical CS: Divide And Conquer

Thinking about refactoring Barre, and what to do next

Rust Macros, and how they're used in Barre.

Notes on using the Rust image library

The Death's Head Semantic In Python: Is It Really Necessary?

How do you know what to do when you're down in the weeds?

Understanding Continuations: JavaScript Try/Catch and Rust Result

"You are responsible for explicitly understanding the rest of the program." A sentence like this appears in every tutorial explaining first-class continuations, a programming language construct that appears in Lisp, Scheme, and Haskell, and if you look at people discussing them they find such constructs "scary."

One of the things I did many, many moons ago was write a couple of small Lisp interpreters. (It was long enough ago that I'm sorry to say they were written in CoffeeScript.) One thing that I did finally understand while building these was how continuations could be used to replace almost all flow control, that if, while, and even function calls were all just specialized versions of continuations.

The problem with continuations is that they do look scary. But while watching Alexis King's awesome presentation Demystifying Delimited Continuations, I'm glad to say that I finally wrapped my head around the notation for continuations in a way that clarifies that terrifying sentence you find in every explanation of continuations, "A continuation is the code you write that will handle the rest of the program."