Racket News - Issue 47

Permalink: https://racket-news.com/2021/03/racket-news-issue-47.html

Welcome to the forty-seventh issue of Racket News.

Here’s another issue of Racket News full of goodness. There’s quite a bit of WebAssembly this issue but also crazy Discord bots and quite a few package releases. On the other hand, we are missing blog posts on Racket. To spice things up, we also have a new experimental section on DrRacket Quickscripts, which you can use to enhance your favourite Racket editor.

Grab a coffee and lets dive in!

Table of Contents

  1. What’s New?
  2. Racket Around the Web
  3. New Releases
  4. Call to Racket!
  5. DrRacket Quickscript of the day
  6. Project in the Spotlight
  7. Featured Racket Paper
  8. Upcoming Meetups
  9. Racket Project Statistics
  10. Sponsors

What’s New?

  • Jesse has posted a first draft of the lineup for RacketFest. Make sure to check it out and register while there are still places left.
  • I have released an initial version of racket-binaryen. This is a set of experimental but complete bindings for binaryen in Racket. Why experimental? Well, it’s lacking safe bindings and documentation but that will come next. Binaryen is a compiler and toolchain infrastructure library for WebAssembly and bringing it to Racket will hopefully satisfy all your WebAssembly needs. I shall create a proper package once the initial set of safe bindings are implemented and documented.
  • Still on WebAssembly, there is a large effort to model the WebAssembly language syntax, semantics, and validation rules in Redex. This feels like an extension to work done by Asumu Takikawa a few years ago on the same topic.
  • I also recently learned Jay McCarthy gave a presentation in Strange Loop on Continuations on the Web and in your OS - time to grab some popcorn!
  • Racket Discord goes bot crazy! An example bot for Discord R16 by Alwinfy, Vincent Lee @williewillus and Benedek Szilvasy @eutro allows users to register and execute short code snippets in a sandbox from Discord commands. Join the Racket discord and try it on the #bots channel:
> !rkt eval (require math/number-theory) (factorize 120)
((2 3) (3 1) (5 1))
> !!instant-tshirt (cons

Racket around the web

Do you blog about Racket? Let me know!

Sad… Nothing this week!

New Releases

If you know of library releases or maybe your own libraries and you want them to be featured, please let me know.

  • contract-parameter (pkg/src) is a package that implements contract parameters that allow for dynamically bound contracts, by Cameron Moy.
  • stream-etc (pkg/src) is a package with miscellaneous stream operations, by Cameron Moy.
  • contract-etc (pkg/src) is a package with miscellaneous contract operations, by Cameron Moy.
  • logic-programming (pkg/src) is a library that provides a prolog-like language that can be used within racket programs, by silver-ag.
  • dollar (pkg/src) is an example #lang extension which uses $ instead of , for unquote, by Roger Keays.
  • qweather (pkg/src) is a Racket wrapper for Qweather, by Yanying Wang.
  • r16 (pkg/src) is a trick bot for Discord, by Vincent Lee.
  • wavenet (pkg/src) is a Racket interface for the Google Cloud text-to-speech API, by Joel Dueck.

Call to Racket!

Want to contribute to Racket? Don’t know where to start? Each RN issue I choose an easy issue to fix to get you started contributing to Racket. Come, give it a go.

There has been no attempts on issue 2883 of Racket. For the last time, and your change to shine, the call is still on. Who’s going to have a go at this one? It can be you! If you are interested in fixing this but need some guidance, feel free to comment on the issue page. Will you be our next Champion?

Good luck!

DrRacket Quickscript of the day

Quickscript (featured project of issue 38) provides an easy way to extend DrRacket with small Racket scripts to automate some actions in the editor, while avoiding the need to restart DrRacket. In this new section, contributed by Stephen De Gabrielle, we will be highlighting some of the most interesting scripts out there.

Don’t wait for Jack Firth’s resyntax, fix your #t and #f today!

(resyntax is an experimental refactoring tool built on top of syntax-parse.)

#lang racket/base
;;; License: [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0) or
;;;          [MIT license](http://opensource.org/licenses/MIT) at your option.
(require quickscript)
 "Replaces all occurrences of #t and #f with #true and #false 
  in the selected text (warning: in strings too!)")
(define-script fix-true-false
  #:label "fix-true-false"
  (λ (selection)
    (regexp-replaces selection '([#px"#t\\b" "#true"] 
                                 [#px"#f\\b" "#false"]))))

Quickscript is included in DrRacket, and scripts are managed by the Script menu. See the documentation at https://docs.racket-lang.org/quickscript/

Project in the Spotlight

This week’s project in the spotlight is molis-hai by John Clements.

From the website:

This collection produces passwords using models built on a corpus of source text. It manages to guarantee generation of passwords with known entropy by building markov models whose transitions are guided by huffman trees, allowing the use of variable numbers of bits of entropy for each transition.

Featured Racket Paper

This issue’s featured paper is Gradual typing for first-class classes by Asumu Takikawa, T. Stephen Strickland, Christos Dimoulas, Sam Tobin-Hochstadt, and Matthias Felleisen.


Dynamic type-checking and object-oriented programming often go hand-in-hand; scripting languages such as Python, Ruby, and JavaScript all embrace object-oriented (OO) programming. When scripts written in such languages grow and evolve into large programs, the lack of a static type discipline reduces maintainability. A programmer may thus wish to migrate parts of such scripts to a sister language with a static type system. Unfortunately, existing type systems neither support the flexible OO composition mechanisms found in scripting languages nor accommodate sound interoperation with untyped code. In this paper, we present the design of a gradual typing system that supports sound interaction between statically and dynamically-typed units of class-based code. The type system uses row polymorphism for classes and thus supports mixin-based OO composition. To protect migration of mixins from typed to untyped components, the system employs a novel form of contracts that partially seal classes. The design comes with a theorem that guarantees the soundness of the type system even in the presence of untyped components.

Upcoming Meetups

Do you know of any upcoming meetups I can advertise? Let me know.

Racket Project Statistics

Some data about the activity in the Racket et al. repositories, for the month of February, 2021.

# commits Issues (new/closed/open) PRs (new/closed/open)
racket 93 15/14/424 16/15/82
drracket 14 6/5/196 5/5/3
typed-racket 14 5/8/241 7/8/21
scribble 3 1/1/70 5/5/17
redex 1 1/1/42 0/0/7
plot 0 2/0/9 0/0/0

Contributions by (19):

  • Anish Athalye
  • Ben Greenman
  • Bogdan Popa
  • Cameron Moy
  • David Van Horn
  • Fred Fu
  • Jack Firth
  • Matthew Flatt
  • Matthias Felleisen
  • Mike Sperber
  • Patrick McCarty
  • Robby Findler
  • Ryan Culpepper
  • Ryan Kramer
  • Sam Tobin-Hochstadt
  • bdeket
  • shuhung
  • sorawee
  • yjqww6

Of these, 7 are new contributors for 2021:

  • Anish Athalye
  • Ben Greenman
  • Cameron Moy
  • David Van Horn
  • Matthias Felleisen
  • Patrick McCarty
  • Ryan Kramer

Repositories included above are: racket, ChezScheme, redex, typed-racket, drracket, scribble, plot.


Many thanks to my sponsors:

  • Jesse Alama. Jesse is a Racketeer, mathematician, and writer based in Main, Germany. He is the organizer of RacketFest, and writer of various Racket books and libraries.
  • John Clements. John is a researcher and professor at Cal Poly, a member of the core Racket, and Racket release manager.
  • Sam Tobin-Hochstadt. Sam is a researcher and associate professor at Indiana University, a member of the core Racket team, and the brains behind Typed Racket and Pycket.
  • Stephen De Gabrielle. Stephen is a product manager at epro. He is a long time Racket community contributor, moderating r/racket, editing the Racket wiki, running many community competitions and events, among many other things.
  • and my private sponsors, who shall remain anonymous.

If you wish to sponsor me and my work on Racket and Racket News - feel free to visit my GitHub Sponsors webpage. All sponsorship levels are welcome.


Thanks to

  • Sam Phillips
  • Stephen De Gabrielle

for their contributions to this issue.

The next issue is planned for publication during week 11, specifically March 15. Contributions welcome - deadline for next issue: Sunday, March 14, 2021.


This issue is brought to you by Paulo Matos. Any mistakes or inaccuracies are solely mine and they do not represent the views of the PLT Team, who develop Racket.

I have also tried to survey the most relevant things that happened in Racket lang recently. If you have done something awesome, wrote a blog post or seen something that I missed - my apologies. Let me know so I can rectify it in the next issue.


Have you seen something cool related Racket? Send it in and we will feature it in the next issue.