H2CO3's tech rants

The implementation of Sparkling, vol. 2: the JavaScript API

As you might have noticed,  Sparkling has recently got a new, entirely re-designed and re-engineered JavaScript API. My primary goal with making JS bindings for Sparkling is to make it more accessible to programmers not familiar with C. For the same reason, I’ve set up an in-browser demo on the...

Read more

This is why we can’t have nice things

Question on Stack Overflow: “How do I replace all occurrences of a substring within another string”? And the usual bullshit instantly arises: “just use regular expressions”. Regular expressions! For plaintext replacement! Not only that, but the answer promoting regular expressions is upvoted, whereas the answer that actually uses naive...

Read more

The implementation of Sparkling, vol. 1: Closures

This is a starting post in a series of articles I will be writing about the most interesting — and perhaps most difficult to understand — implementation details of the Sparkling engine. I hope you will get some useful ideas, algorithms or just random thoughts out of these posts. If...

Read more

Adventures in lexing

At my company, I am responsible for the integration of various popular scripting languages with our product; this includes writing parsers and code generators for these languages. We have quite special needs regarding the architecture and output of the parsers, so that’s why we decided to roll our own in-house parsing infrastructure. Using a parser library...

Read more