Errors in Weave

Weave is the Programming Language I’ve been developing in my spare time. …If you’ve been reading my blog at all, you’ll know that already. As I’ve been working on making Weave more of a “Real” language I realized I needed to provide some sort of error handling mechanism. While functions are pure and beautiful, we live in a world where side effects and muck are not only expected, but often required to Get Things Done. [Read More]
weave 

Weave Performance

Last night, I decided to spend some time working on Weave’s performance. It was… fine for a toy project, but I was a little disappointed in how slow my interpreter ran. Fast enough to show promise, but too slow to use for Real work, basically. Sitting down with Claude I began refactoring portions of the VM. replaced name-based lookups of global variables with slots using compiler-inserted ints for O(1) lookup optimized the Container type with internal hashmaps for key-value lookups* micro-optimized the function call semantics to reduce / remove memory cloning operations Everything helped… a bit. [Read More]

It Lives

At last, I have “finished” the Weave interpreter. I spent last few evenings playing with the fruits of my labor. And I think it’s pretty damn cool - even if I do say so myself. Check this out! One line convert from CSV to JSON read("input.csv", :csv) |> ^(rows) { write("output.json", rows, :json) } First class Lambdas & pipe operations make for easy function composition We can put generically useful logic inside reusable module, not reinvented for each script. [Read More]
weave 

Memory Management in Weave

I recently re-read my original post about Weave - the data-pipeline language I’ve been developing in my spare time. That post ended with the words “Weave is nearly fully implemented - and I’m nearly through the book! Another few weeks and I believe I’ll have Weave ready[…]” Oh the Hubris of my youth. In reality, it has taken me another seven months since those words were typed before I could consder Weave to be even remotely “ready” for “anything”. [Read More]

Weave Syntax

I wanted a language for writing simple, data-oriented shell scripts. …So I decided to make my own! Goals Clean syntax; Composable functionality Pipelines of data transformations should be trivial to express and compose First-class function support Make common data types trivial to work with Plain text Common data formats: CSV,JSON,INI,TOML,YAML Pipes Must be callable without interfering with the shell environment. e.g. the current Python/Ruby interpreter should not be a factor Anti-Goals Weave is not an all-purpose programming language. [Read More]
weave 

A (Programming) Language of My Own

(Pssst - wanna jump to the Syntax?) I’ve long enjoyed learning programming languages and I try to learn at least one new language every year. Past years have seen mainstream choices like Kotlin or Rust, or just playing around with something esoteric like Rockstar. This year I was going to (re)learn Lisp. It’s long held a fascination for me, with its legendary expressive flexibility and unusual syntax (at least, by C-family standards)! [Read More]
weave 

Iffy_code

Ah, Null. Infamously referred to as the billion-dollar mistake. As software engineers, we likely spend a quarter of our careers managing Null. Checking for it. Returning it. Trying to figure out WTF returned Null somewhere down there that caused an invalid de-reference here… No getting around it. Development in languages with Null can be Iffy. I’m a Ruby dev in my day job and after writing some variant of if ! [Read More]

The Best Thanksgiving Turkey

It’s almost Thanksgiving again, which means it’s time for my personal tradition - convincing people to try boiling their Thanksgiving bird. Why Boiling? I spent ten years in search of a recipe that made turkey taste good. I tried dry brining, wet brining, smoking, roasting, bbq, rubs and injections… In fairness, I never tried deep-frying, but when the list of possible side effects includes explosions and house fires… well, I just don’t need that much excitement in my life. [Read More]

Decker

This is Decker: Not me, nor the facemask - which was a Covid Thing (more about that another time) - but that little collection of electronics and wires strapped to the side of my head. Decker is my longest-lived project by a mile. I started it in the fall of 2017 and I still tinker with it in an on-again, off-again fashion. It consists of a Raspberry Pi Zero W literally taped to a Vufine+ display and wired together with ribbon cable and a few thousand lines of Rust code. [Read More]
decker 

Lego Sorter Build Log 1: Neural Networking

My current project is an automated Lego sorting machine. I’ve seen a few other blogs showing off their Lego sorters. They’re super cool! But they usually show off the completed final result and skip all the interesting learning that happened along the way. This series is going to be the build log of the process of designing, building and programming this thing. So far, the sorter does… well, nothing. But that’s getting a bit ahead of the story. [Read More]