T-Wand: beating Lucene in less than 600 lines of code
The design of Datalevin's compact Clojure search engine, its T-Wand algorithm, and the full-text search benchmarks comparing it with Apache Lucene.
The design of Datalevin's compact Clojure search engine, its T-Wand algorithm, and the full-text search benchmarks comparing it with Apache Lucene.
The division instruction is one of the most expensive instruction in your CPU. Thus optimizing compilers often compile divisions by known constants down to a multiplication followed by a shift. However, in some lucky cases, the compiler does not even need a shift. I call the corresponding divisors ideal. For the math…
I’d like to share my experience of encountering Hotwire from the team at Basecamp which was extracted from the tooling used to build their…
Tokenizing the source code input is a great start for our compiler. Now let's turn our attention to parsing the PL/0 grammar. Once we have finished with the parser, the front end of our compiler will be finished and we will have a PL/0 validator. This is a program that can read in PL/0 source code and inform the user…
This post is the second in a three-part series about Cranelift . In the first post , I described the context around Cranelift and our project to replace its backend code-generation infrastructure, and detailed the instruction-selection problem and how we solve it. The remaining two posts will be deep-dives into some…
Suppose you need to create a function for adding two numbers together in plain C. How would you write it? What sort of an API would it have?...
In this post, I'd like to describe how you can track your personal finances using a workflow that is highly focused on data privacy, is 100% self-hosted, and uses only the Python ecosystem.
Quick edit: While I work on a proper update, I'll note here that several posters on reddit and hackernews have pointed out ways to bring the total size of the program down to 105 bytes while still printing the full "Hello, world!" Much credit goes to Josh Triplett , who produced the 105-byte version which you can find…
The job of a software engineer is not to produce code, but to solve problems; we just happen to solve most of those problems by producing code. Ultimately, producing code is hard, and we need help. That's why GitHub's Copilot is exciting, but it's far from ideal, and it's the tip of the iceberg of what's been done and…
The setup.py interface is an old convention from distutils, one that has bugs that cannot be fixed to bring it into line with modern Python packaging approaches. As a result, all direct...
This is not a tutorial. If you're looking for a quick, easy, "how to use git" kind of post, look elsewhere.The goal of this post is to give you just enough understanding of the git internals that you can build up a correct intuition of what various git commands actually do under the hood.
To implement its safety guarantees, the Rust compiler keeps careful track of ownership and references throughout a program. This makes writing certain kinds of data structures challenging; in particular, data structures that have circular references.
Welcome to part 1 of Modern C++ for C Programmers, please see the introduction for the goals and context of this series. In this part we start with C++ features that you can use to spice up your code ’line by line’, without immediately having to use all 1400 pages of ‘The C++ Programming Language’. Various code…
A professional programmer delivers value through the authoring and maintaining of software that solves problems. (There are other important ways for professional programmers to deliver value but this post is about programming.)
Parenthetically Speaking: Articles by Shriram Krishnamurthi
There now is a Winboard version that can handle bigger boards, and a Fairy-Max engine that can run under it ( download )
My list of “Probably Are Gonna Need It” security features for your web app – things that you should build up-front, not wait until you need them (when it’s already too late).
An edge case in integer safety.
m4 is a macro processor, in the sense that it copies its input to the output, expanding macros as it goes
Let’s try a new format – “shorts”; small blog posts where I elaborate on ideas that I’d discuss at my twitter, but they either come back over and over, or the short form doesn’t convey all th…
What is it about voxels that makes people go crazy? Throughout the past decade, there have been SO many developers obsessed with shrinking them down to have as many as possible ( 1 , 2 , 3 , 4 , 5 ), admittedly including myself. It’s exciting both as a developer and to the gaming community to see amazing algorithms…
“JPEG” or the image encoding specification by the “Joint Photographic Experts Group” (JPEG) is a truly universal format at this stage. You really cannot go very far on the internet without seeing a JPEG file. The amount of content encoded in JPEGs must be surely biblical by now. If there is one thing that is going to…
A blog about game engines, graphics, C++, and more.
A small, cool fact about SQLite is that its columns are flexibly typed. You can store any value in any column! Try it out: sqlite> create table t1 (v1 int, v2 varchar(10)); sqlite> insert into t1 values ("abc", "this string is longer than 10 characters!"); sqlite> select * from t1; abc|this string is longer than 10…
A little context: I got introduced to UML in around 2008, at an employer who had a site licence for Enterprise Architect. I was sent on a training course run by a company that no longer exists called Sun Microsystems: every day for a week I would get on a coach to Marble Arch, then...
Since I first started working on my website at age fourteen, the site has gone through many revisions, and hopefully changed for the better. This blog was originally dynamically served using a Python/Flask backend, having a custom login system and post “editor” (just an input box). One of the more strange things about…