Programming Leftovers
-
Cloud Four Inc ☛ Why I Like Designing in the Browser
For balance, I’ll include a few reasons why I enjoy dedicated design software, too.
Sound good? Let’s dive in!
-
Facundo Olano ☛ Gleam, coming from Erlang
I spent most of my career working with dynamic languages: Python, JavaScript, Clojure, finally Erlang. I don’t claim to be an expert but the Erlang VM is the piece of technology I’ve become most intimately familiar with. There is no way around it, I think: if you’re running Erlang in production sooner or later you’ll be thinking in terms of processes, scheduling, failure modules, resource utilisation1.
After Erlang, I dabbled in Rust, both professionally and on personal projects, and I was very impressed by its type system, its error handling, and the developer experience it enabled. The thing is: Rust comes with all the systems programming overhead, which in my opinion is not a good bargain if you are not, you know, programming systems. Alas, I’m too old to pick up my own garbage. And, coming from Erlang, Rust’s async concurrency (like JavaScript’s, like Python’s) just makes me very sad inside.
By now you may imagine why Gleam looks interesting to me: [...]
-
Rlang ☛ Scaling Decision Support Systems: When to Use React, Python, and R
There are multiple problems with static reports – they are error-prone, allow accidental changes, and quickly become messy.
An alternative that organizations apply for business-critical systems allows them to make decisions based on the most recent data but also to integrate with other systems directly from the app, so no external communication is needed.
-
Bertrand Meyer ☛ Blog Archive New preprint: Programming Really Is Simple Mathematics
This approach was started in a 2015 article (cited in the new publication) but now, thanks to Reto Weber (a PhD student at CIT), it has the benefit of extensive proofs all checked by Isabelle/HOL; the corresponding files are publicly available.
The article covers the general framework, including the mathematical background (basically high-school-level elementary set theory with a few convenient notations for things like domain of a relation), basic constructs, control structures (sequence, conditional, loops of various kinds), refinement (treated as “subset”), specification vs. implementation, contracts, invariants, and concurrency.
The ambition is to reconstruct all of programming in this spirit.
-
Suricrasia Online ☛ Inline CSS Puzzle Box: Technical Breakdown
Back in 2022, I posted a puzzle box to cohost.org that was made entirely using HTML and inline CSS. Now that cohost.org is shuttered, I thought it best to re-release it with added features and bugfixes. Gone are the random Sudoku puzzles, now replaced with actual games! Click here to play.
For those just tuning in, you read all that right. This fully-featured puzzle box uses no JavaScript or CSS selectors in the HTML, just copious amounts of style attributes. In this article I'll walk through how I misused HTML/CSS to achieve this. There's spoilers ahead for what the puzzle box contains, so go and play it if you haven't!
-
Shell/Bash/Zsh/Ksh
-
Olaf Alders ☛ Debounce All of the Things
The problem arises when a task in an installer script takes too long. For instance, I may have a build step that installs the nightly neovim build. If the script fails after this point and requires multiple runs to fix, I have to wait for the nightly build install to happen over and over. That wastes time and network resources. I can do better.
-
-
Golang
-
University of Toronto ☛ Go's behavior for zero value channels and maps is partly a choice
How Go behaves if you have a zero value channel or map (a 'nil' channel or map) is somewhat confusing (cf, via). When we talk about it, it's worth remembering that this behavior is a somewhat arbitrary choice on Go's part, not a fundamental set of requirements that stems from, for example, other language semantics. Go has reasons to have channels and maps behave as they do, but some those reasons have to do with how channel and map values are implemented and some are about what's convenient for programming.
-
-
Rust
-
Niko Matsakis: View types redux and abstract fields
A few years back I proposed view types as an extension to Rust’s type system to let us address the problem of (false) inter-procedural borrow conflicts. The basic idea is to introduce a “view type”
{f1, f2} Type
1, meaning “an instance ofType
where you can only access the fieldsf1
orf2
”. The main purpose is to let you write function signatures like& {f1, f2} self
or&mut {f1, f2} self
that define what fields a given type might access. I was thinking about this idea again and I wanted to try and explore it a bit more deeply, to see how it could actually work, and to address the common question of how to have places in types without exposing the names of private fields.
-