Tyray: a ray tracer in Rust

Over the holidays I wrote a tiny ray tracer in Rust. A ray tracer is a program that renders a 3D image by simulating the way light travels between light sources and a camera. Advanced versions of ray tracing techniques are used to render 3D movies such as the famous …

Catena: SQL on a blockchain

A blockchain allows different entities share a database without having to entrust that database to a single entity. Catena provides an SQL database on top of a blockchain, providing all the benefits of blockchains (resiliency, distributed operation, openness) while providing a familiar interface to its users.

DHToT: storing IoT sensor data in the BitTorrent peer-to-peer network

The Internet of Things promises to connect virtually all devices and make sensor data ubiquitously available. Instead of storing all this data in a central location, you can use a peer-to-peer network to store sensor data. Using a peer-to-peer network has several advantages. First of all, the infrastructure is ‘free’ (although in …

Chartly: build data visualisations in the browsers using puzzle pieces

Chartly.js is a web component that allows end users to create (‘program’) a chart using the Blockly visual programming environment. Charts are ‘compiled’ to a JSON specification for the chart. At run time, Chartly interprets the JSON and draws the chart using d3.js. Chartly is open-source under the MIT license. …

Prevent form spam using in-browser proof-of-work

Automated bots abuse comment forms to put advertisements on websites. Traditional CAPTCHAs prevent spam by exploiting the fact that computers cannot solve a particular problem easily, and that humans that can solve them are scarce/expensive/slow (but available in the regular use case). Proof of work, by contrast, exploits the fact that …

A recursive descent parser generator in JS

Ll.js provides a simple way of parsing about anything using a recursive-descent algorithm. The grammar to be parsed is written in a friendly DSL (domain specific language) in JavaScript itself that resembles EBNF. Each parser term can be annotated with a function; when the final parse tree includes the term, …