Archive


Category: architecture

  • Two approaches to the two-stage table implementation, benchmark results

    On my first pass on implementing a two-stage table for the Unicode functionality that I’m writing for finl, I had the first table consist of entries like this: Code(0x91), Page(1), Page(2), … Where an entry of Code indicated that everything in that 256-byte range had the same code, and an entry of Page was a pointer […]

  • Revised definition of commands/environments

    From the readme for finl_parse, some thoughts on how commands and environments are defined. Input text Input text is assumed to be in NFD normalized format. Commands You indicate a command with \ followed by either a named command or a command symbol. Named commands consist of one or more letters. Letters are defined to include […]

  • At long last code

    The first piece of code (something relatively trivial) for finl is now on crates.io: finl-charsub is the character substitution module for finl. It may have use outside of finl when fixed character sequence replacements are needed in a text stream. Future enhancements: I’m pretty sure that there’s room to optimize the hash map implementation that’s currently […]

  • Building a trie in Rust—optimizations

    A trie is a variation on a tree whose purpose is to show the result of a sequence of values, something that I’ll be using a lot in finl. For example, TeX has a number of input conventions implemented via ligatures (plus an active character) that I’ll be making optionally available through a character substitution […]

  • A current status on finl

    This site got submitted to Hacker News (a lot sooner than I would have chosen), so a few notes on where things are and where they’re going. I’m definitely writing in Rust. Much like I expect finl to remove pain points around LaTeX, Rust removes a lot of pain points around code that I would […]

  • Looking at rust is already beneficial

    In addition to programming, I’m also a minor writer of fiction. One thing that I often do while working on a novel is write a short story to develop some aspect of craft. For example, part of the motivation for writing my story, Saint Jude’s Medallion was to work out how to tell a story through […]

  • Choosing a programming language revisited

    A comment from someone on Hacker News who happened to stumble across this site, inspired me to give another look at rust as a programming language. Having spent a few months digging into C++, my initial thoughts are that as pros: ICU for Unicode support harfbuzz for text rendering within the limits of compiler support […]

  • Character substitutions in text

    TeX handles some character sequence substitutions by (ab)using the ligature mechanism, e.g., “→“. This works reasonably well for Computer Modern which defines these in its ligature table, but falls apart once we start trying to use non-TeX fonts. Furthermore, there’s the added complication that most fonts put the characters ‘ and ` in character positions […]

  • Mistakes of LaTeX: the tabular environment

    One constant annoyance that I’ve encountered when people learn LaTeX is the default behavior of the tabular environment. Rather than presenting itself as a separate paragraph block, it is instead automatically in TeX’s horizontal mode. This means that if, for example, a user writes: some text\begin{tabular}{…}…\end{tabular}more text the tabular will be presented left-ish aligned (actually, […]

  • Defining a document markup language for finl

    The markup language for finl will be based on LaTeX, but many of the pain points of LaTeX come from the macro-expansion approach that Knuth’s TeX takes towards parsing the document. I can remember being a teenager reading The TeXbook and puzzling over the whole mouth-gullet-stomach description and finding that challenging to follow.  LaTeX attempts to […]