I'm sure I've mentioned it plenty of times on this blog over the years, but I like to dabble with programming languages. For some people, writing code is purely a job; they concentrate on one language, do it well, and that's enough for them. I can respect that. For me, though, writing code started as a hobby, long before I ever did it as a living, and it continues to be a hobby.

A consequence of this is that I like to try to wrap my head around a new language every so often. Over the years, I've written code with:

  • Assembler
  • BASIC
  • C
  • C++
  • Clipper
  • COBOL
  • Common Lisp
  • Emacs Lisp
  • JavaScript
  • Julia
  • OCaml
  • Pascal
  • Perl
  • PHP
  • Python
  • Ruby
  • Scheme
  • TypeScript

and probably some others I've forgotten to add to this list. One or two I like to think I've (mostly) mastered (at least at one point in my cycle of use); others I've dabbled with to the point of having some fun and nothing more.

This last week, I've started to add another language to the list: Rust. I don't know where on the usage scale it will end up yet (either quick dabble or the walk to attempting to master), but I'm finally getting to grips with it and the urge to do so is sticking.

I've had a couple of goes before now, both times making an effort to work through the book. For some reason, both those times in the past, I lost interest. I think it's because -- as I've often said -- I'm the sort of person who needs a purpose when it comes to learning a language. So, to this end, I'm working on the problem I've used for this so many times before: I'm writing a Norton Guide reading library.

As always, for me, this is a great project to work on: it's a problem I know well, it's an outcome I know well, and it's a requirement that touches on all sorts of issues that you want to be thinking about when learning a language. Already, while working on this, I've had to learn something about how to build a library package, how to lay the code out, what Rust does for the obvious bits of syntax you tend to go looking for, how to do memory management, how to do file IO, and so on.

I won't claim that what I've got written so far is good Rust. I suspect that much of it isn't even idiomatic Rust (yet). What I do know is, so far, the code is working, and in getting it to work, I've started to understand some core concepts of writing Rust.

I now want to see it through to the finish. Heck, who knows, perhaps I'll eventually take it further and build a Rust-based sibling application for AgiNG so I can see how working with Ratatui compares with all my experience with Textual.