I was recently diagnosed with anti-NMDA receptor encephalitis . It is an autoimmune disorder where your body’s normally helpful antibodies start acting strangely . This leads to inflammation in the brain. This blog briefly discusses some of my experience and prognosis. Target audience : Anyone relying on my work for their own projects.
Over the last several years, I’ve rewritten Rust’s regex crate to enable better internal composition, and to make it easier to add optimizations while maintaining correctness. In the course of this rewrite I created a new crate, regex-automata , which exposes much of the regex crate internals as their own APIs for others to use. To my knowledge, this is the first regex library to…
bstr is a byte string library for Rust and its 1.0 version has just been released ! It provides string oriented operations on arbitrary sequences of bytes, but is most useful when those bytes are UTF-8. In other words, it provides a string type that is UTF-8 by convention , where as Rust’s built-in string types are guaranteed to be UTF-8. This blog will briefly describe the API, do a deep…
One day before Rust 1.0 was released, I published a blog post covering the fundamentals of error handling . A particularly important but small section buried in the middle of the article is named “ unwrapping isn’t evil ”. That section briefly described that, broadly speaking, using unwrap() is okay if it’s in test/example code or when panicking indicates a bug. I generally…
This is a quick post reviewing my Archlinux setup on a System76 Darter Pro (model: darp6) with Coreboot, along with some thoughts about the laptop in general. This is my first laptop upgrade since I purchased a ThinkPad T430 in July 2012 Target audience: Archlinux users looking for a compatible Linux laptop.
I’d like to break from my normal tradition of focusing almost strictly on technical content and share a bit of my own personal relationship with Free and Open Source Software (FOSS). While everyone is different, my hope is that sharing my perspective will help build understanding, empathy and trust. This is not meant to be a direct response to the behavior of any other maintainer. Nor should…
With csv 1.0 just released, the time is ripe for a tutorial on how to read and write CSV data in Rust. This tutorial is targeted toward beginning Rust programmers, and is therefore full of examples and spends some time on basic concepts. Experienced Rust programmers may find parts of this useful, but would probably be happier with a quick skim. For an introduction to Rust, please see the official…
In this article I will introduce a new command line search tool, ripgrep , that combines the usability of The Silver Searcher (an ack clone) with the raw performance of GNU grep. ripgrep is fast, cross platform (with binaries available for Linux, Mac and Windows) and written in Rust . ripgrep is available on Github . We will attempt to do the impossible: a fair benchmark comparison between several…
It turns out that finite state machines are useful for things other than expressing computation. Finite state machines can also be used to compactly represent ordered sets or maps of strings that can be searched very quickly. In this article, I will teach you about finite state machines as a data structure for representing ordered sets and maps. This includes introducing an implementation written…
Like most programming languages, Rust encourages the programmer to handle errors in a particular way. Generally speaking, error handling is divided into two broad categories: exceptions and return values. Rust opts for return values. In this article, I intend to provide a comprehensive treatment of how to deal with errors in Rust. More than that, I will attempt to introduce error handling one…
WARNING: 2018-04-12 : The code snippets for this post are no longer available. This is just as well anyway, since they all depended on an unstable internal compiler interface, which hasn’t existed for years. A few weeks ago, I set out to add regular expressions to the Rust distribution with an implementation and feature set heavily inspired by Russ Cox’s RE2 . It was just recently…
Go’s only method of compile time safe polymorphism is structural subtyping, and this article will do nothing to change that. Instead, I’m going to present a package ty with facilities to write type parametric functions in Go that maintain run time type safety, while also being convenient for the caller to use.
As a programmer and a fantasy football addict, I am embarassed by the means through which we must expend ourselves to get data in a machine readable form. This lack of open source software cripples the community with sub-standard tools, and most importantly, detracts from some really cool and fun things that could be done with easily available statistics. Many tools are either out-dated or broken,…
In sum, Archlinux is working beautifully. What follows is a rough run down of my notes while installing, configuring, tuning and using Archlinux on the Lenovo Thinkpad T430.
Go, by its very nature, is multithreaded. This makes a traditional approach of daemonizing Go programs by forking a bit difficult. To get around this, you could try something as simple as backgrounding your Go program and instructing it to ignore the HUP signal :