Blogs / Personal blogs

Eli Bendersky

eli.thegreenplace.net

One of the most wonderful aspects of math is how deep we can get by studying seemingly trivial questions. Consider the roots of unity, where "unity" simply means the number 1.

Popular posts
57
Total points
8,409
HN comments
3,873
Rank
#106 personal

Visit eli.thegreenplace.net → RSS feedOn Hacker News Apr 2008 – Oct 2026

Software Engineering 51Programming Languages 23Systems & Performance 17Math & Algorithms 9Web & Frontend 3Life, Learning & Writing 3

3

Go hits the concurrency nail on the head

More than thirteen years have passed since Herb Sutter declared that the free lunch is over and concurrency is upon us , and yet it's hard to claim that most mainstream languages have made a strong shift towards concurrent modes of programming. We have to admit that concurrency is just hard , and the struggles of some…

6

To ORM or Not to ORM

I've been enjoying using Go's database/sql package for working with databases. Recently, some mentions of gorm piqued my curiosity about using ORMs in Go vs. using database/sql directly. Having had some mixed experiences with ORMs in the past, I decided to start with a practical experiment by writing the same simple…

9

My favorite prime number generator

Many years ago I've re-posted a Stack Overflow answer with Python code for a terse prime sieve function that generates a potentially infinite sequence of prime numbers ("potentially" because it will run out of memory eventually). Since then, I've used this code many times - mostly because it's short and clear. In this…

12

Monte-Carlo Simulations

Monte Carlo simulations (or methods ) is the technique of applying randomness and the Law of large numbers to the solution of various scientific and engineering problems. One of its first documented uses was by Stanislaw Ulam and John von Neumann for nuclear weapon simulations after WWII [1] .

13

Twenty years of blogging

Twenty years... a significant chunk of a human's adult life; while so many things in my life have changed since May 2003, the blog has remained a constant companion. This milestone inspired me to do some archaeology using the amazing Wayback Machine . It didn't have the very first post, but I dug up one from just a…

16

Implementing Forth in Go and C

I first ran into Forth about 20 years ago when reading a book about designing embedded hardware . The reason I got the book back then was to actually learn more about the HW aspects, so having skimmed the Forth chapter I just registered an "oh, this is neat" mental note and moved on with my life. Over the last two…

17

Hilbert space: Treating functions as vectors

The tools of linear algebra are extremely useful when working in Euclidean space (e.g. \mathbb{R}^3 ). Wouldn’t it be great if we could apply these tools to additional mathematical constructs, such as functions and sequences? Hilbert space allows us to do exactly this - apply linear algebra to functions.

18

Type inference

Type inference is a major feature of several programming languages, most notably languages from the ML family like Haskell. In this post I want to provide a brief overview of type inference, along with a simple Python implementation for a toy ML-like language.

19

How statically linked programs run on Linux

In this article I want to explore what happens when a statically linked program gets executed on Linux. By statically linked I mean a program that does not require any shared objects to run, even the ubiquitous libc . In reality, most programs one encounters on Linux aren't statically linked, and do require one or…

20

How to JIT – An Introduction

When I wrote the introductory article for libjit , I aimed it at programmers who know what JITs are, at least to some extent. I did mention what a JIT is, but only very briefly. The purpose of this article is to provide a better introductory overview of JITing, with code samples that don't rely on any libraries.

22

C++11 threads, affinity and hyperthreading

For decades, the C and C++ standards treated multi-threading and concurrency as something existing outside the standard sphere - in that "target-dependent" world of shades which the "abstract machine" targeted by the standards doesn't cover. The immediate, cold-blooded replies of "C++ doesn't know what a thread is" in…

26

Demystifying Tupper's Formula

A book I was recently reading mentioned a mathematical curiosity I haven't seen before - Tupper's self-referential formula . There are some resources about it online, but this post is my attempt to explain how it works - along with an interactive implementation you can try in the browser.

27

A polyglot's guide to multiple dispatch

This is the first article in a series dedicated to multiple dispatch - an advanced abstraction technique available to programmers out-of-the-box in some languages, and implementable in others. This first post in the series presents the technique and explains the problem it intends to solve. It uses C++ as the…

28

Life of an instruction in LLVM

LLVM is a complex piece of software. There are several paths one may take on the quest of understanding how it works, none of which is simple. I recently had to dig in some areas of LLVM I was not previously familiar with, and this article is one of the outcomes of this quest.

30

Faster Sorting with Go Generics

Recently, a new set of sorting functions has landed in Go's golang.org/x/exp/slices package [1] . These functions leverage Go generics to provide a more ergonomic API for sorting (without requiring users to implement sort.Interface ), and also deliver a nice performance improvement, as the CL demonstrates.