サクサク読めて、アプリ限定の機能も多数!
トップへ戻る
ノーベル賞
bernsteinbear.com
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. fenster, a tiny 2D canvas library by Serge Zaitsev, does just that. It’s a tiny drop-in header-only C/C++ file that weighs no more than 400 LOC of pretty readable code. It works with WinAPI, Cocoa, and X11. And it handles keyboard and mouse input, to
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. In this blog post, I’m going to write a small abtract interpreter for the Toy IR and then show how we can use it to do some simple optimizations. It assumes that you are familiar with the
Scrapscript is a small, pure, functional, content-addressable, network-first programming language. fact 5 . fact = | 0 -> 1 | n -> n * fact (n - 1) My previous post introduced the language a bit and then talked about the interpreter that Chris and I built. This post is about the compiler that Chris and I built. In the beginning, there was an interpreter Writing a simple tree-walking interpreter is
It’s been nine whole years since PEP 484 landed and brought us types from on high. This has made a lot of people very angry and been widely regarded as a bad move1. Since then, people on the internet have been clamoring to find out: does this mean we can now compile Python to native code for more speed? It’s a totally reasonable question. It was one of my first questions when I first started worki
first – previous Welcome back to the “Compiling a Lisp” series. Last time, we finished adding the rest of the constants as tagged pointer immediates. Since it’s not very useful to have only values (no way to operate on them), we’re going to add some primitive unary functions. “Primitive” means here that they are built into the compiler, so we won’t actually compile the call to an assembly procedur
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
Many thanks to Kartik Agaram and Leonard Schütz for proofreading these posts. In my last series, I wrote about building a Lisp interpreter. This time, we’re going to write a Lisp compiler. This series is an adaptation of Abdulaziz Ghuloum’s excellent paper An Incremental Approach to Compiler Construction, with several key differences: Our implementation is in C, instead of Scheme Our implementatio
Two fun things happened recently and the proximity of the two made something go click in my head and now I think I understand how bytecode interpreters work. I went to a class at work called “Interpreters 101” or something of the sort. In it, the presenter walked through creating a dead-simple tree-walking Lisp interpreter. Then he ended by suggesting we go out and re-implement it as a bytecode in
このページを最初にブックマークしてみませんか?
『bernsteinbear.com』の新着エントリーを見る
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く