#rust Page 1 of 1 (2 posts) — ArchiveFeed

Blogging is low on the priority list at the moment, thanks to school. The preliminary classes for the master’s degree are going well. I’m writing assembly for my computer systems class, and I have to say, I really like assembly. (No sarcasm.) It’s beautiful and simple in a way I didn’t expect. I don’t see myself using it much, but it’s a good tool for the belt.

Unrelated to school, I’ve been dabbling more with Rust and Go. I’m not a huge fan of Go’s syntax, but I’m going to write a few web services in it — maybe a replacement engine for this blog — and see if my opinion changes. (The goal is to see if single-binary deployment is worth it, as an alternative to Python and Django for small web things.)

Rust, on the other hand, hits a sweet spot for me with general syntax and with language features (pattern matching, particularly). I can easily see myself using it for anything where I would have used C or C++. (And it has more promise than D or Nim.) The plan is still to use Rust when I finally get around to writing Ink and related tools.

(I should probably add that I still plan to keep using Python, though perhaps not as often. We’ll see.)

Oh, one last thing: with Press, I realized a few days ago that it’s a good candidate for the first implementation of Low Ink (a JSON-based page description language that compiles to PDF). I’ll be re-architecting that part of Press so that it uses Low Ink. Also hoping to finish up the text part of Press (HarfBuzz, etc.) soon so that it’s usable for more than just basic drawing. (I’m dealing with font subsetting and encoding stuff at the moment.)


As mentioned on Twitter, I’ve decided to write my own typesetting engine, called Ink. Apparently I’m crazy.

The details are still very much in the air, but here are some quick notes:

  • Written in Rust (for speed)
  • Programmatic (sort of like TeX)
  • Scripting language for extensibility (JavaScript or Lua or Python)
  • Intended for use in typesetting book interiors, covers, and charts
  • Possibly some kind of template/data division
  • Full OpenType feature support (shaping via HarfBuzz)
  • Custom PDF generation library (inkpdf)

Reasons for doing this insane thing:

  • PlotDevice only runs on OS X and I want the source of my language charts to be usable on other platforms.
  • I’d like to open source the books I typeset, so InDesign isn’t a great solution.
  • TeX is powerful and well-seasoned and all, but it’s not exactly pleasant or easy to work with, especially for the kind of stuff I do.
  • I’ll learn a lot and have fun while I’m at it.

The initial roadmap, not necessarily in order:

  • Write inkpdf in Python (which I think will be a better fit for the charts anyway)
  • Get familiar with HarfBuzz
  • Learn Rust
  • Port inkpdf to Rust
  • Plan out the Ink language (I’ve started on this and it’s looking promising)
  • Figure out how scripting is going to work and embed the interpreter

I’ll document the process on this blog, of course. First steps: reading the PDF spec and figuring out how to make PDFs by hand.

(For those who’ve been reading for a while, Ink was also the name of my static blog engine. That’s now ink-static, and at some point I’ll either retire it completely or change the name to something unrelated.)