Archive for the ‘Uncategorized’ Category

Kazanov’s fifth World’s Simplest Bytecode Intepreter (see the Fourth Simplest) isn’t quite so simple: it is an implementation of Thompson’s most basic regular expression table-driven DFA handler. It handles a complete set of Kleene’s Regular Expressions without the closure operator (no * operator), and it does so by exploiting the host language stack to handle […]

For the fourth World’s Simplest Bytecode Interpreter, Kazanov goes into a bit of esoterica without discussing why: he has “authentic bytecode”; he’s doing C programming and he dense-packs his instructions into a single 16-bit instruction. That’s fine if you’re emulating a real chunk of hardware, but for our purposes… I really don’t care. With that […]

For the previous step of Implementing The World’s Simplest Bytecode Interpreter in Rust, I followed Vladimir Kazanov as he added larger opcodes to his bytecode. In the third variant, he adds a stack, pushing values on as needed and allowing the operations to pop values off the stack as needed. My variant of this operation […]

In my last post, Implementing The World’s Simplest Bytecode Interpreter in Rust, I did exactly that, following Vladimir Kazanov’s World’s Simplest Bytecode Interpreter. His first interpreter was basically dumb as a rock: starting from an integer value of zero it allowed only increment and decrement. His second variant adds two new instructions which allow for […]

Because I feel woefully out of practice with parts of Rust that aren’t related to my current project, I decided to try a couple of on-line exercises, mostly written in other languages, and see what sort of effort it would take to do the exercises in rust. Vladimir Kazanov’s World’s Simplest Bytecode Interpreter was my […]

As I’ve been working my way through this project of mine, I’ve come to respect exactly why Haskell is so mind-bendingly different from other programming languages. It has to do with the level of abstraction you’re expected to track in your head. In the classic "Object Oriented Programming Language" tutorial, when inheritence is usually introduced, […]

So, to muse on about regular expressions… I was genuinely pleased to post Rigged Brzozowski Regular Expressions in Rust (Experiment No. 08), once that completely supports all of the operations in Haskell and one that completely supports the same semantics as the Glushkov Heavyweights in Rust (Experiment No. 07), which makes me mindbogglingly happy. Now, […]

I went to the HackerX recruitment event this week and, while it was interesting, the event was awkward. It’s a bit like speed-dating: 36 companies show up and you have five minutes per company to hear their pitch and make your own, and then time is called and you move on to the next company. […]


Current Bibliography

Posted by Elf Sternberg as Uncategorized

I’m just keeping this here, to keep me honest about what I’m reading. A Play on Regular Expressions: A Functional Pearl. Sebastian Fischer, Frank Huch, Thomas Wilke. Solid introduction to parsing with semirings in Haskell Haskell is straightforward and accessible Readable, breezy style Semirings covered: Recognition, Counting, Viterbi-Best (Maxlong, Firstlong) Algebraic Foundations of Semiring Parsing. […]

Denis Kyashif recently wrote a piece called "Implementing a Regular Expression Engine," and showed how to do it in Javascript. It’s a good piece, and I recommend it. Kyashif does a very good job of describing regular expressions from a Turing-theoretic approach using finite automata, but there’s another way to think about regular expressions, and […]

Subscribe to Feed



April 2019
« Mar