Showing posts with label programming. Show all posts
Showing posts with label programming. Show all posts

Saturday, March 1, 2025

Reflections on my time working with Lilypond

Recently, I saw a post from a music student mentioning that they were thinking of writing up some stuff on the techniques they'd learned while using GNU Lilypond - i.e. a LaTeX-like "music typesetter" with its own custom input/programming language (doused / polluted with a heavy dose of Guile-Scheme).

This post gathers up some of my own notes on my own journey with these tools, and how this has tied into where I am today. Come to think of it, this year actually marks something like "just over two decades ago" that I was doing this shit (since IIRC, I probably started doing all this back in 2004!) - jeez... time flies and makes you feel old when put like that!

Thursday, December 26, 2024

UI / App Toolkits + Frameworks - The "Missing Middle-Layer"

Over the past decade and a bit, on almost every project I've worked on, I've come to realise that there is often quite a massive gulf between what the Standard Library + UI Toolkits typically offer, and what it is that you really typically require when building anything of consequence for the real world. The problem is such that really, you end up needing to spend quite a bit of time re-inventing the following sub-systems for each project OR end up paying the tax of not having these for each and every feature you add (by effectively reimplementing them *per feature* instead, but without the benefits that having the standardised system brings).

While the initial seeds of what I'm about to discuss date back to around 2010, things really started to take shape around 2018/2019, when I first seriously started mooting the idea of maybe creating my own Programming Language / Environment someday (i.e. "Kea"), a batteries-included environment for doing everything "my way"...

One of the key aspects of that language would be that the following functionality / capabilities would end up being "baked" into the language as first-class citizens. Before fully embarking on that journey again, I thought it would be good to first prototype these systems in other environments where they may help advance the overall state of the software industry. Hence this blog post.

 

The Short List - Core Functionality:

* 1) Property Metadata System  (i.e. something like Blender's "RNA" system)

* 2a) Bidirectional Property Binding (Data Objects <-> UI Widgets)

* 2b) Widget / Factory that creates standard auto-bound widgets, given only the Property ID + host object reference  (i.e. something like Blender's UI widgets)

* 3) Automatic hierarchical property serialisation system  (i.e. something like Skyline-X's Preference Sets)

* 4) Version patching  (i.e. something like what is used for Blender's SDNA system)

   * Includes utilities related to version number management and/or Git branch/revision info

* 5) System for Physically-Based Unit Handling and/or Unit Conversions

 

The Short List - Extended Functionality:

* 6) Static/Dynamic Expressions / Drivers, Expression-Evaluation, and/or String Template Substitutions

* 7) A "Datablocks" System + CRUD API's for managing those

* 8) "User Preferences" system

* 9) "Operator"-like system (for standardised logging / error handling, undo/redo, and background-exec of expensive long-running-processes) - inspired by what Blender uses since 2.5

* 10) Basic Extendable Templates/Base-Implementations for Handling the Following Functionality (Optional)

   * Standard logic for New / Load Project/ Save Project stuff

   * Standard logic for handling cache files / support data files

   * Built-in screenshot per-viewport/view-angle screenshot functionality (with repeatable / savable parametric configuration)

   * Grease Pencil / Built-in Freehand Annotation Tools

   * Node-editor 

* 11) UI Toolkit Extensions + Features

   * Collapsible Panel implementation   (Note: This is surprisingly absent from most UI toolkits in practice)

   * Control-Gain Ladders / Input Convenience mechanisms

   * Popup panels templates

   * "Overlay toolbar / interactive viewport tools" system 

   * Popup info panels / extended menus for Unit Conversions + String Templating functionality

 

Saturday, November 16, 2024

Thoughts on Rust - 2024 Edition

Here are some of my current thoughts on Rust, as initially prompted by a thread I saw this morning asking: "What features of Rust are most appealing to you?"

My reply follows.

~~~

Originally, what drew me most to Rust I guess were (in following order)


1) Complex compiled language with momentum that was not C++ 

This was by far the biggest motivation, back when I was still mostly a C/Python dev. Having spent a few years working professionally as a C++11 software engineer now (having learned on the job, thanks to working during code reviews with a bunch of top-notch Modern C++ gurus), it now just looks like Haskell-lite for Modern C++ devs  (which enforces all the best practices we generally do, *by default*).

 

2) Claims of speed + memory safety (esp around multithread type stuff - This was a big one coming from several bad Python codebases that struggled with really bad concurrency issues (i.e. random deadlocks on machines with different processor numbers than the original dev machines used), but also because Rust first started rising in prominence as I was looking into the Depsgraph stuff (which would have really benefited from being able to evaluate multiple things in parallel, to do background recalcs + caching of your scene)


3) Didn't have "cuddled else" / "caterpillar ifs" hard coded into the syntax (*cough* Go *cough*)

To this day, it still really annoys me running across code written that way. Like, really twitchy annoyed.

It's a real pity that there are a bunch of languages that hard enshrined it in their syntax (due to design decisions), and also that increasingly many examples across other C-like languages also do it. Ugh!


Thursday, November 14, 2024

Blasts from the Past - Reminders and Remnants of Different Times

Sometimes you just cannot make these things up!  Either that, or "The Algorithms" pervading our lives these days are getting much better at juxtapositioning contrasting but related things together. Anyway, I digress.  Tonight's impromptu post is inspired by the following 2 snippets that popped up across my various feeds this evening:

   1)  Local newspaper had an article saying that a *third* building at my former High School had just been deemed "quake prone" - with all three buildings having been built either shortly before my time there, or during my time there, and all having been places I'd spent a bit of time in.


   2)  An old clip of Bill Gates giving a demo of Visual Basic back in 1991


 It's funny how these things go sometimes, isn't it...