First time showing something here, but I've been furiously working over the holidays on Feather, a from scratch reimplementation of TCL designed for embedding in modern applications.
It's starting out as a faithful reimplementation of TCL without I/O, OOP features, or coroutines.
TCL has a special place in my heart because the syntax is so elegant for interactive use, and defining domain specific languages.
My motiviation is twofold: faster feedback loops for AI, and moldable software for users.
It turns out giving AI agents access to the runtime state of your program makes for really fast feedback loops, but embedding existing options in a world where shipping binaries for each platform is commonplace is tricky.
Embedding the real TCL is tricky because it comes with its own event loop (in 2025 you alreay have one), a GUI framework (you have a web framework already, or develop on mobile), and has access to the filesystem (don't forget to delete all commands with file system access!).
Feather just doesn't ship with those - expose only what you need from your application.
A WASM build comes out of the box and clocks in at ~120kb plus 70kb for connecting it to the browser or node.js.
And if embedding becomes easy, you can put a REPL everywhere: in mobile apps, in desktop software, as a control plane into web servers.
I want to imagine a world where all software is scriptable just like Emacs and nvim, with agents doing the actual work.
smj-edison•1mo ago
dhamidi•1mo ago
> Are you doing a mostly one-to-one port, or something more novel?
Step 1 is a one-to-one port of all the non-I/O, non-OO stuff. I've got it down to a single skill for Opus 4.5 and now it's just a matter of turning the crank and keeping an eye on it.
Step 2: add more functionality for interactive use for humans/agents. Things like defining the syntax of commands, a completion engine, a help system. Essentially all the things you'd expect from a modern shell experience, but with a bring-your-own-UI approach.
> but man is reference counting a pain in the neck or what.
Maybe this is a bit more novel: since the only use case is embedding, and the host language already has dicts, lists, and other data structures, I'm just leveraging those. In the Go version of Feather, dicts are Go maps; in the JavaScript version they are backed by lists of pairs (to preserve insertion order)
smj-edison•1mo ago
Wrt step 2, that's really interesting, are you thinking of it as almost a modern bash in that way? It reminds me a little bit of Jimtcl, though I think Jim only has simple autocomplete.
Also, what was the rationale for a pound before an upvar amount?