Writing a paper with Scribble
This post explains how to get started using Scribble to write a research paper.
This post explains how to get started using Scribble to write a research paper.
In Racket, programmers can create powerful abstractions by bundling together a family of values, functions, and syntax extensions in the form of a new language. These languages, however, are typically untyped. Turnstile is a new Racket {library,language} for creating typed languages by integrating type checking with Racket’s existing tools for describing languages. The technique is described by fellow PRL’ers in the paper Type Systems as Macros.
Racket encourages language developers to take full advantage of linguistic reuse by defining new language forms in terms of existing constructs. Unsurprisingly, language extensions often retain some of the Racket-y flavor from the underlying constructs. Implementors save time and energy while users of the language benefit from the familiarity they already have with the Racket ecosystem.
Unfortunately, Turnstile does not lend itself to expressing one of Racket’s most ubiquitous idioms: naming local bindings with define
. Early experience reports from Turnstile, including my own, suggest that language implementors very much desire to include define
-like binding forms in their languages.
This blog post provides a brief overview of what Turnstile is and how it works, an introduction to defining typed language forms, and how to equip these languages with a define
binding form.
A short guide to Redex concepts, conventions, and common mistakes.
The source code for the PRL website is written using Scribble, the Racket documentation tool. I am very happy with this choice, and you should be too!
If you are interested in learning about the internals of the CompCert C compiler but would rather not read its source code, this post is for you.
Racket is excellent for incrementally growing scripts into full-fledged programs. This post steps through the evolution of one small program and highlights the Racket tools that enable incremental advances.
This is part 3 of my tutorial for using the Racket FFI. You can find part 1 here and part 2 here.
In this post, we will experiment with some low-level operations with pointers, union types, and custom C types. The main takeaway will be the custom C types, which let you define abstractions that hide the details of the C representation when manipulating data in Racket.
This is part 2 of my tutorial on using the Racket FFI. If you haven’t read part 1 yet, you can find it here. Update: part 3 is also now available here.
Part 2 will continue with more Cairo examples. In this installment, I plan to go over some more advanced FFI hacking such as handling computed argument values, custom return arguments, and using C structs.
Update: this post is now part of a series. Part 2 is here and part 3 is here.
I’ve seen several people ask for a tutorial on Racket’s foreign function interface (FFI), which allows you to dynamically load C libraries for use in Racket code. While I think the documentation for the FFI is quite good, it is a lot of information to process and the overview examples may be tricky to run for a beginner.
With that in mind, this blog post will provide a step-by-step tutorial for Racket’s FFI that requires minimal setup. All that you will need to follow along is a copy of Racket and ideally a DrRacket window.