The Incredible Holk
blog.theincredibleholk.org · Personal blog · on HN since 2012
Eric Holk, a programming languages researcher, writes about Rust, GPU compilers, the Harlan language, and Scheme.
What HN saysHN commenters cite it as an early source on compiling Rust for GPUs, booting to Rust, and understanding continuations through a Scheme interpreter.
23HN people shared it
10linked it in comments
20stories submitted
891story points
4 years agolast shared
2012people per year2026
Most-shared posts
- 1Compiling Rust for GPUs4 people · 79 points · first shared 2013 · 39 comments on HN
- 2Booting to Rust3 people · 369 points · first shared 2013 · 40 comments on HN
- 3A Look at Dyn* Code Generation3 people · 3 points · first shared 2022 · discussion on HN
- 4Harlan, new Lispy language for GPU programming2 people · 201 points · first shared 2013 · 39 comments on HN
- 5How Async Functions in Traits Could Work in Rustc2 people · 3 points · first shared 2022 · discussion on HN
- 6Some simple gpu optimizations2 people · first shared 2013
- 7How do we read code?1 people · 214 points · first shared 2012 · 77 comments on HN
- 8Why the Harlan compiler was written in Scheme1 people · 6 points · first shared 2013 · discussion on HN
- 9Beware the Logarithms1 people · 3 points · first shared 2013 · discussion on HN
- 10Monads as a Design Pattern1 people · 3 points · first shared 2017 · discussion on HN
- 11Why is Harlan called Harlan?1 people · 2 points · first shared 2013 · discussion on HN
- 12Access patterns matter for GPU Programming1 people · 2 points · first shared 2012 · discussion on HN
- 13Some Picky Presentation Tips1 people · 1 points · first shared 2013 · discussion on HN
- 14When Slow Algorithms Are Faster1 people · 1 points · first shared 2021 · discussion on HN
- 15Should You Go to Grad School? Or, Why I'm Glad I Went to Grad School1 people · 1 points · first shared 2017 · discussion on HN
What HN people wrote when they linked it
thom · 2015-01-12
Also worth checking out:
http://rust-class.org/
Or maybe this, if UEFI is palatable to you:
http://blog.theincredibleholk.org/blog/2013/11/18/booting-to-rust/
groovy2shoes · 2017-10-04
You may find this paper helpful [1]. As noted there, syntax-rules consists really of two different parts: (1) the hygiene-preserving macro expander and (2) the pattern-matching facility. Once you wrap your head around the two pieces, it's actually pretty straightforward to implement them both. It's very common to write some "low-level" macro facility as a stepping-stone to syntax-rules (such as explicit-renaming macros or syntactic closures): the implementation of syntax-rules then becomes a composition of the pattern-matcher and the low-level facility. A tutorial implementation of an appropriate pattern-matcher can be found at [2],[3].
There's lots of good reading to be found at the ReadScheme Library [4]. Most if not all of the references in [1] can be found there.
Tangentially: yeah, syntax-rules kinda flies in the face of the oft-mentioned minimalism of Scheme, but there's a reason for it: at the time syntax-rules was standardized, there was no consensus on which (if any) low-level facility should be standardized (and, really, there still isn't any such consensus). The reason syntax-rules operates as a pattern-template rewriting system rather than as a procedural system is that such a system is able to guarantee that the macros it produces are hygienic in a (comparably) simple and intuitive way. The idea was to standardize on a high-level system so that Scheme could have a standard macro facility, whilst leaving the low-level systems open for further…
steveklabnik · 2019-05-21
Sort of; it's not trivial, but some people have done it. See https://bheisler.github.io/post/rust-on-the-gpu-with-accel/ for example. I think https://blog.theincredibleholk.org/blog/2012/12/05/compiling-rust-for-… is the earliest one I know of; two and a half years before Rust 1.0!
ehaliewicz2 · 2017-05-19
I think a good way to understand how they work is by implementing a simple Scheme interpreter that explicitly passes around the continuations of the guest language.
This page helped me quite a bit a few years ago
http://blog.theincredibleholk.org/blog/2013/11/27/continuation-passing…
shmerl · 2016-08-07
> Despite my strong attachment to the Rust community and Rust’s perfect suitability for kernels1, I’ll be writing the kernel in C. Mostly because it is unlikely people inside the university will be familiar with Rust, but also because GNU-EFI is a C library and I cannot be bothered to bind it. I’d surely be writing it in Rust were I more serious about the project.
I saw an example of booting from UEFI in Rust: http://blog.theincredibleholk.org/blog/2013/11/18/booting-to-rust/
mrec · 2016-05-03
Is eholk no longer active in Rust-land? I remember reading his post [1] about compiling Rust for GPUs (i.e. app code + OpenCL kernels from a single source) back in 2012 and getting quite excited. Presumably generating SPIR-V wouldn't be vastly different in principle.
[1] http://blog.theincredibleholk.org/blog/2012/12/05/compiling-rust-for-g…
sklogic · 2015-10-13
Language development have not been "stalled", it's just mainly under the radar.
Some nice designs are out there, see Vobla and Pencil [1] for example, or Harlan [2] as another extreme.
[1] http://carp.doc.ic.ac.uk/external/dissemination.php
[2] http://blog.theincredibleholk.org/blog/2013/06/28/announcing-the-relea…
dbaupp · 2014-09-16
Rust is a low-level language so everything user-space can be implemented, and the main (and only) compiler rustc uses an industrial strength optimiser (LLVM) which has support for automatic vectorisation.
Furthermore, the type system is designed to be very good for high-performance concurrency.
See http://blog.theincredibleholk.org/blog/2012/12/05/compiling-rust-for-g… for an example of using Rust on a GPU, and I can only imagine that it has become easier since then.
BruceIV · 2013-07-01
I found a couple relevant links - a blog post of the author's about GPU optimizations [1], and an early paper on this work [2].
[1] http://blog.theincredibleholk.org/blog/2013/06/10/some-simple-gpu-opti…
[2] http://www.cs.indiana.edu/~eholk/papers/parco2011.pdf
eholk · 2013-07-01
I really should update the user guide, since the language has changed a lot in the last year.
I have an earlier post that discusses a couple of the optimizations that Harlan does: http://blog.theincredibleholk.org/blog/2013/06/10/some-simple-gpu-opti…
To me the win for Harlan over CUDA is its region system, which lets you work with more intricate pointer structures in the GPU. For example, there is an interpreter for the Lambda Calculus as one of the test cases, which would be much harder to do in straight CUDA: https://github.com/eholk/harlan/blob/master/test/lambda3.kfc
Very soon, Harlan will have support for higher order procedures, which is also not available in CUDA.