From bernsteinbear.com
0 15
CPS, or continuation-passing style, is an intermediate representation for programs, particularly functional programs. It’s used in compilers for languages such as SML and Scheme.
on Wed, 8PM
From bernsteinbear.com
A multi-emulator Gameboy tracer
0 0
I’ve been developing Gameboy emulators off and on for some years. They’re all broken in one way or another. Part of my debugging process is to run a test ROM like the blargg suite. That gives me some positive signal—if the tests pass, I’ve done something right—but it doesn’t help me narrow down...
on Nov 21
From bernsteinbear.com
You can use C-Reduce for any language
0 0
C-Reduce is a tool by Regehr and friends for minimizing C compiler bug reproducers. Imagine if you had a 10,000 line long C file that triggered a Clang bug. You don’t want to send a massive blob to the compiler developers because that’s unhelpful, but you also don’t want to cut it down to size...
on Nov 15
From bernsteinbear.com
0 0
I took a databases class last year. In it, we learned about some theory and some practice and one of the most oft-cited papers was “On the Universal Relation” (1980) by Marc H. Graham. It’s apparently a classic. It’s got some foundational work in databases. It’s also nowhere to be found online,...
on Oct 27
From bernsteinbear.com
Damas-Hindley-Milner inference two ways
0 0
What is Damas-Hindley-Milner?
on Oct 17
From bernsteinbear.com
0 0
This post follows from several conversations with CF Bolz-Tereick, Philip Zucker, Chris Fallin, and Max Willsey.
on Sep 11
From bernsteinbear.com
0 0
Sometimes I just want to put pixels on a screen. I don’t want to think about SDL this or OpenGL that—I just want to draw my pixel buffer and be done.
on Sep 7
From bernsteinbear.com
Precedence-aware pretty printing
0 2
This post follows from a conversation with Chris Gregory about parsing and pretty printing. We might integrate some or all of it into Scrapscript!
on Aug 25
From bernsteinbear.com
Abstract interpretation in the Toy Optimizer
0 0
CF Bolz-Tereick wrote some excellent posts in which they introduce a small IR and optimizer and extend it with allocation removal. We also did a live stream together in which we did some more heap optimizations.
on Jul 24
From bernsteinbear.com
Some tricks from the Scrapscript compiler
0 0
Scrapscript is a small, pure, functional, content-addressable, network-first programming language.
on Jul 10
From bernsteinbear.com
TCC does support attribute(section(…)), actually
0 0
If you are using TCC/TinyCC and you are trying to get it to place code or data in a specific section with __attribute__((section("..."))) and it is not creating the section, or if you are trying to get the start/end of the section with __start_SECTION and __stop_SECTION and you are getting...
on Jun 26
From bernsteinbear.com
Introduction to Software Development Tooling
0 0
Learn the command line, version control, build systems, and correctness in NEU’s CS 4973: ISDT.
on Jun 26
From bernsteinbear.com
A baseline scrapscript compiler
0 0
Scrapscript is a small, pure, functional, content-addressable, network-first programming language. fact 5 . fact = | 0 -> 1 | n -> n * fact (n - 1)
on Jun 2
From bernsteinbear.com
0 1
With some partial evaluation and specialization hints, it is possible to get pretty decent speedups on interpreters by turning them into compilers.
on May 19
From bernsteinbear.com
0 0
Tiger got to hunt, Bird got to fly; Lisper got to sit and wonder, (Y (Y Y))? Tiger got to sleep, Bird got to land; Lisper got to tell himself he understand. -- Kurt Vonnegut, modified by Darius Bacon
on Apr 30
From bernsteinbear.com
How to mess with your roommate
0 0
Before I explain what I did to hurt poor Logan, I must explain our apartment’s media setup. You will see why shortly.
on Mar 17
From bernsteinbear.com
0 0
I write a small web application on a small device to remotely wake up my desktop computer.
on Mar 16
From bernsteinbear.com
Neat parallel output in Python
0 0
Make parallel tasks print nicely with zero dependencies.
on Mar 1
From bernsteinbear.com
Type information for faster Python C extensions
0 0
PyPy is an alternative implementation of the Python language. PyPy’s C API compatibility layer has some performance issues. Carl Friedrich Bolz-Tereick and I are working on a way to make PyPy’s C API interactions much faster. It’s looking very promising. Here’s a sketch of how it works.
on Feb 1
From bernsteinbear.com
0 1
Scrapscript is a small, pure, functional, content-addressable, network-first programming language. It’s designed to allow creating small, simply shareable programs. The language was created by Taylor Troesh and the main implementation was created by me and Chris.
on Jan 24
From bernsteinbear.com
Building a small REPL in Python
0 0
Don’t go it alone. Take this!
on Nov 28, 2023
From bernsteinbear.com
A quick look at destination-driven code generation
0 0
Picture this: you’re sitting there, writing a compiler, when all of a sudden you have to generate assembly. You have some intermediate representation (IR) but now you have to turn virtual registers into machine registers. This is called register allocation.
on Nov 10, 2023
From bernsteinbear.com
0 0
For small projects, you can DIY Ninja files instead of using CMake or Meson!
on Nov 5, 2023