Molt 0.1.1 Published to Crates.IO
I’ve just published Molt 0.1.1 to Crates.IO. The system includes:
Tcl, Rust, and the Death of Rube Goldberg
I’ve just published Molt 0.1.1 to Crates.IO. The system includes:
Updated 8/23/19: Chad Dougherty found a bug in my example code under “The Better Way”, below; I’ve modified and extended the post to discuss the issue and added another way to solve it.
Rust provides the standard Result<T,E>
type for returning values from functions or methods
that might need to include error info or the like. C has no such thing; and so the C
implementation of Tcl has to jump through some hoops. I’m going to describe how Standard Tcl
does it, and then how I’ve implemented the same pattern in Rust.
The Molt Book is now on-line. The Book is (in proper Rust fashion) the user’s guide for Molt and its related crates. It describes both the Molt command-line tools and the language itself, including all differences from Standard Tcl.
Tcl is a sort of a cross between shell languages and LISP, with pretensions to C syntax. As such,
the language consists of a collection of commands. A statement in the language is also called
a command, and consists of one or more white-space delimited words. For example, the following
command appends the string "Some more text"
to the variable buffer
:
I began learning the Rust programming language late in 2018, and as an old C
programmer I was immediately impressed by how much simpler and easier it is to configure and
build a cross-platform project in Rust than it is in C. I called this post
“The Death of Rube Goldberg” because tools like cargo
, the Rust build
manager, are ultimately going to kill the old C ecosystem of autoconf
, configure
, make
,
et al.