150 bookmarks

Place where goldstein dumps his links so she doesn’t have 500 tabs ever again.

Tags are structured like this:

  • is- tags are about medium. Books, papers, blog posts, interactive explanations etc.

  • about- tags are about about. What’s this post topic or what’s this project is/for.

  • to- tags are about reason. Why did I even save this?

  • for- tags are about connections. Where can I use it?

2023-12-02

86.

nix-std: no-nixpkgs standard library for the nix expression language

github.com/chessai/nix-std

2023-11-30

85.

Semantic fuzzing of the Rust compiler and interpreter

ethz.ch/content/dam/ethz/special-interest/infk/inst-pls/plf-dam/documents/StudentProjects/MasterTheses/2023-Andy-Thesis.pdf

A very nice paper about fuzzing Rust compiler by generating custom MIR. Found some bugs in both rustc and LLVM, but notably not in Cranelift.

84.

jaq: A jq clone focussed on correctness, speed, and simplicity

github.com/01mf02/jaq

2023-11-28

83.

Friends don't let friends make certain types of data visualization

github.com/cxli233/FriendsDontLetFriends

This is an opinionated essay about good and bad practices in data visualization. Examples and explanations are below.

82.

Linus Torvalds about spinlocks and locking in general

www.realworldtech.com/forum?threadid=189711&curpostid=189723
81.

Efficient Userspace Optimistic Spinning Locks

lpc.events/event/4/contributions/286/attachments/225/398/LPC-2019-OptSpin-Locks.pdf

How to spin before sleeping so that it actually helps and not harms?

80.

Mutexes Are Faster Than Spinlocks

matklad.github.io/2020/01/04/mutexes-are-faster-than-spinlocks.html

Microbenchmark for futexes + spinlocks and some useful links at the bottom.

79.

Spinlocks Considered Harmful

matklad.github.io/2020/01/02/spinlocks-considered-harmful.html

Because spin locks are so simple and fast, it seems to be a good idea to use them for short-lived critical sections. For example, if you only need to increment a couple of integers, should you really bother with complicated syscalls? In the worst case, the other thread will spin just for a couple of iterations…
Unfortunately, this logic is flawed! A thread can be preempted at any time, including during a short critical section. If it is preempted, that means that all other threads will need to spin until the original thread gets its share of CPU again. And, because a spinning thread looks like a good, busy thread to the OS, the other threads will spin until they exhaust their quants, preventing the unlucky thread from getting back on the processor!

2023-11-27

78.

Lambda calculus - Combinatory Logic

theory.stanford.edu/~blynn/lambda/cl.html

Variables are the trickiest part of lambda calculus. And naming is the trickiest part of variables: the most complex code in our lambda evaluator is the part that renames variables to perform capture-avoiding substitutions.
Names are artificial tedious tags whose sole purpose is to aid human comprehension. Can we get rid of them? There ought to be a way to study computation without naming names.

77.

Surprisingly Slow

gregoryszorc.com/blog/2021/04/06/surprisingly-slow

This is the closing-file-handles-on-Windows post.

I'm titling this post Surprisingly Slow because the slowness was either surprising to me or the sub-optimal practices leading to slowness are prevalent enough that I think many programmers would be surprised by their existence.

2023-11-26

76.

netaddr.IP: a new IP address type for Go

tailscale.com/blog/netaddr-new-ip-type-for-go

The Go standard library’s net.IP type is problematic for a number of reasons. We wrote a new one.

This post explores some problems with Go’s “simplicity by design”: introducing a better IP type that’s also interoperable with the language proves to be a non-trivial challenge.

75.

Distributed Proofreaders

www.pgdp.net/c

Distributed Proofreaders provides a web-based method to ease the conversion of Public Domain books into e-books. By dividing the workload into individual pages, many volunteers can work on a book at the same time.

74.

Game: OVERFLOW

punkx.org/overflow

The [board] game is about creating a small shellcode in memory by copying existing instructions and then exploiting a buffer overflow to jump into it, so that you can overwrite your opponent’s return address to force them to go to the game_over() function.There are other mechanics as well and more layers of strategy (like setting the exception handler or monkeypatching).

73.

Sapiens: A Brief History of Humankind

en.wikipedia.org/wiki/Sapiens:_A_Brief_History_of_Humankind

The book, focusing on Homo sapiens, surveys the history of humankind, starting from the Stone Age and going up to the twenty-first century. The account is situated within a framework that intersects the natural sciences with the social sciences.

72.

git-revise

git-revise.readthedocs.io/en/latest

Faster and simpler git rebase.

71.

Calculus Made Easy

calculusmadeeasy.org
70.

Measuring Mutexes, Spinlocks and how Bad the Linux Scheduler Really is

probablydance.com/2019/12/30/measuring-mutexes-spinlocks-and-how-bad-the-linux-scheduler-really-is

This blog post is one of those things that just blew up. From a tiny observation at work about odd behaviors of spinlocks I spent months trying to find good benchmarks, (still not entirely successful) writing my own spinlocks, mutexes and condition variables and even contributing a patch to the Linux kernel. The main thing I’ll try to answer is to give some more informed guidance on the endless discussion of mutex vs spinlock. Besides that I found that most mutex implementations are really good, that most spinlock implementations are pretty bad, and that the Linux scheduler is OK but far from ideal. The most popular replacement, the MuQSS scheduler has other problems instead. (the Windows scheduler is pretty good though)

69.

nand2tetris

www.nand2tetris.org

The site contains all the lectures, project materials and tools necessary for building a general-purpose computer system and a modern software hierarchy from the ground up.

68.

how I think when I think about programming

www.alicemaz.com/writing/program.html

a whirlwind tour through the guts of the system

67.

Dungeons and Discourse Third Edition: The dialectic continues

slatestarcodex.com/2013/02/22/dungeons-and-discourse-third-edition-the-dialectic-continues

Dungeons and Dragons, but about philosophy.

66.

Let's Build a Cargo Compatible Build Tool

ductile.systems/freight-part-1

Tutorial about building a self-hosting cargo-compatible build tool. I have many problems with cargo and was interested in nixifying our job builds for eternity, so maybe there’s something useful there.

65.

Bootstrapping with FORTH

compilercrim.es/bootstrap

What if all software suddenly disappeared? What's the minimum you'd need to bootstrap a practical system? I decided to start with a one sector (512-byte) seed and find out how far I can get.

64.

The myrmics memory allocator

citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.1074.2437&rep=rep1&type=pdf

A paper about message-passing memory allocator: could be useful for actor systems.

63.

Toy Tutorial - MLIR

mlir.llvm.org/docs/Tutorials/Toy

MLIR is an interesting LLVM compiler framework thingy that uses LLVM for multiple representations instead of just high-level assembly.

This tutorial runs through the implementation of a basic toy language on top of MLIR. The goal of this tutorial is to introduce the concepts of MLIR; in particular, how dialects can help easily support language specific constructs and transformations while still offering an easy path to lower to LLVM or other codegen infrastructure. This tutorial is based on the model of the LLVM Kaleidoscope Tutorial.

62.

Futexes Are Tricky

dept-info.labri.fr/~denis/Enseignement/2008-IR/Articles/01-futex.pdf

Detailed explanation of futexes, including some possible pitfalls.

61.

Why's (Poignant) Guide to Ruby

poignant.guide

Ruby tutorial with very unusual and interesting writing style.

60.

Category Theory Illustrated

abuseofnotation.github.io/category-theory-illustrated

Category Theory Illustrated is a primer in category theory and other mathematical theories that is made to be really accessible to people with no prior exposure to the subject, without being dumbed down, by utilizing visual explanations.

59.

Bots Are Stupid

www.gamingonlinux.com/2022/12/bots-are-stupid-is-an-ultra-precise-programming-platformer

Up for a challenge and love programming? Well it seems that Bots Are Stupid might be a good fit for you. An ultra-precise platformer where you don't directly control things — what could possibly go wrong?

58.

The Hitchhiker's Guide to Logical Verification

browncs1951x.github.io/static/files/hitchhikersguide.pdf

Book about proofs with Lean.

57.

Workarounds to Computer Access in Healthcare Organizations: You Want My Password or a Dead Patient?

www.cs.dartmouth.edu/~sws/pubs/ksbk15-draft.pdf

Paper about how IT in healthcare in general and IT security in particular is done by people who don’t actually use it, listing different problems and workarounds that end up being used in the field.

Sacrificing convenience for security leads you to having neither security nor convenience.

56.

Modeling graphs in Rust using vector indices

smallcultfollowing.com/babysteps/blog/2015/04/06/modeling-graphs-in-rust-using-vector-indices

Niko’s post about using vectors (≈ arenas) instead of reference counters to model graphs. Explains how it relates to ownership and borrowing.

See also: Handles are the better pointers.

55.

Handles are the better pointers

floooh.github.io/2018/06/17/handles-vs-pointers.html

A blog post explaining the “single owner of data, everyone has indices instead of pointers” model. Not actually about Rust per se, just happens to be really useful for Rust.

See also: Modeling graphs in Rust using vector indices.

54.

No Sane Compiler Would Optimize Atomics

www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4455.html

The paper’s claim:

False.

Compilers do optimize atomics, memory accesses around atomics, and utilize architecture-specific knowledge. This paper illustrates a few such optimizations, and discusses their implications.

Interestingly, none of the optimizations proposed in the paper actually work on GCC or Clang.

53.

Game: Out of Ctrl

miknugget.itch.io/out-of-ctrl

Push key blocks into their slots to gain control of the qwert. Regain Ctrl (and possible other keys) to get to the get through to the end. There are fourteen levels total. Can you get through them all?

52.

Game: Wayfarer

idrellegames.itch.io/wayfarer

You are a Wayfarer. Marked by a complete immunity to magic, Wayfarers travel the world, breaking curses, hunting monsters, and fighting magic when it spins out of control. Their Order, once a powerful presence in the world, is broken, leaving behind only a handful of warriors still bound by their creed.

51.

Game: Manifold Garden by William Chyr

williamchyr.itch.io/manifoldgarden

Rediscover gravity and explore a beautiful Escher-esque world of impossible architecture. Geometry repeats infinitely in every direction, and falling down leads you back to where you started. Manipulate gravity to change your perspective and see the world in new ways. Master the rules of the universe and restore a barren world with vegetation and life.

50.

The Magic Ring Buffer

fgiesen.wordpress.com/2012/07/21/the-magic-ring-buffer

A first (as far as I know) description of ringbuffer based on two mmaps. I hope to make a better one sometime, but for now this’ll the best explanation I have.

2023-11-25

Reposted 49.

Nota Language

nota-lang.org

A fresh take on typesetting

48.

Nutshell: make expandable, embeddable explanations

ncase.me/nutshell
47.

Implementing truly safe semaphores in rust

neosmart.net/blog/implementing-truly-safe-semaphores-in-rust
46.

Shufflecake: plausible deniability for multiple hidden filesystems on Linux

shufflecake.net
45.

tips for systemd services management and hardening in NixOS

git.selfprivacy.org/alexoundos/articles/src/branch/master/systemd-hardening-in-NixOS/article.md

When it comes to security, we care about limiting access of each entity of a system to as few other entities as possible. Network input, executables and users must be able to reach only those resources, which are necessary to perform the defined server tasks. Principle of least priviledge.

Generally, it's better to implement as many layers of security as possible. Although, there is no way to make a server 100% bullet proof - it's a huge endless topic, this article covers some feasible essential systemd tunables that give us a layer of protection.

44.

Optimizing Dynamically-Typed Object-Oriented Languages With Polymorphic Inline Caches

bibliography.selflanguage.org/_static/pics.pdf

Abstract: Polymorphic inline caches (PICs) provide a new way to reduce the overhead of polymorphic message sends by extending inline caches to include more than one cached lookup result per call site. For a set of typical object-oriented SELF programs, PICs achieve a median speedup of 11%.

43.

Laurence Tratt: Why Aren't Programming Language Specifications Comprehensive?

tratt.net/laurie/blog/2023/why_arent_programming_language_specifications_comprehensive.html
42.

Laurence Tratt: How Hard is it to Adapt a Memory Allocator to CHERI?

tratt.net/laurie/blog/2023/how_hard_is_it_to_adapt_a_memory_allocator_to_cheri.html
41.

Chapel: Productive Parallel Programming

chapel-lang.org
40.

Cranelift's Instruction Selector DSL, ISLE: Term-Rewriting Made Practical

cfallin.org/blog/2023/01/20/cranelift-isle
39.

A New Backend for Cranelift

cfallin.org/blog/2020/09/18/cranelift-isel-1
Reposted 38.

erikbern/git-of-theseus

github.com/erikbern/git-of-theseus
37.

Codebase as Database: Turning the IDE Inside Out with Datalog

petevilter.me/post/datalog-typechecking

Introspectable and extensible IDEs with logic programming

36.

RefinedC: Automating the Foundational Verification of C Code with Refined Ownership Types

plv.mpi-sws.org/refinedc/paper.pdf
35.

A non-overlapping type level contains operation for heterogeneous lists

blog.weiznich.de/blog/eurorust-non-overlapping-contains-for-hlists

In this blog post we explore how to write a type level contains operation for HList inspired type lists without running into overlapping trait implementations

34.

Pointers Are Complicated, or: What's in a Byte?

www.ralfj.de/blog/2018/07/24/pointers-and-bytes.html

Explanation of provenance, uninitialized memory and stuff like that. Useful as an entry point into realization that we don’t live in PDP-11 world anymore.

33.

Text Rendering Hates You

faultlore.com/blah/text-hates-you
32.

Breaking Our Latin-1 Assumptions

manishearth.github.io/blog/2017/01/15/breaking-our-latin-1-assumptions
31.

Let's Stop Ascribing Meaning to Code Points

manishearth.github.io/blog/2017/01/14/stop-ascribing-meaning-to-unicode-code-points
30.

It’s not wrong that "🤦🏼‍♂️".length == 7

hsivonen.fi/string-length
29.

To Mock a Mockingbird

en.wikipedia.org/wiki/To_Mock_a_Mockingbird

To Mock a Mockingbird and Other Logic Puzzles: Including an Amazing Adventure in Combinatory Logic is a book by the mathematician and logician Raymond Smullyan. It contains many nontrivial recreational puzzles of the sort for which Smullyan is well known. It is also a gentle and humorous introduction to combinatory logic and the associated metamathematics, built on an elaborate ornithological metaphor.

28.

The Sad Bastard Cookbook

nightbeatseu.ca/works/the-sad-bastard-cookbook

Life is hard. Some days are at the absolute limit of what we can manage. Some days are worse than that. Eating—picking a meal, making it, putting it into your facehole—can feel like an insurmountable challenge. We wrote this cookbook to share our coping strategies. It has recipes to make when you’ve worked a 16-hour day, when you can’t stop crying and you don’t know why, when you accidentally woke up an Eldritch abomination at the bottom of the ocean. But most of all, this cookbook exists to help Sad Bastards like us feel a little less alone at mealtimes.

27.

Myths about /dev/urandom

www.2uo.de/myths-about-urandom

tl;dr: /dev/random is obsolete and /dev/urandom is strictly better except in early boot.

26.

Quantum computing for the very curious

quantum.country/qcvc

Presented in an experimental mnemonic medium that makes it almost effortless to remember what you read

25.

Colmena

colmena.cli.rs/unstable

Colmena is a simple, stateless NixOS deployment tool modeled after NixOps and morph, written in Rust. It's a thin wrapper over Nix commands like nix-instantiate and nix-copy-closure, and supports parallel deployment.

24.

garnix | the nix CI

garnix.io

Simple, fast, and green CI and caching for nix projects

23.

Index 1,600,000,000 Keys with Automata and Rust

blog.burntsushi.net/transducers

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.

2