NOTE: THIS DOCUMENT HAS BEEN SUPERSEDED BY RRFI [Draft]: Two-level Universal Scheme for Equality
NOTE: THIS DOCUMENT IS NOW MAINTAINED AT RRFI [Draft]: Two-level Universal Scheme for Equality. The present Gist will not receive further updates.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env racket | |
| #lang cli | |
| (require racket/port | |
| racket/format) | |
| #| | |
| This works by: | |
| 1. Running `racket -l <module_name>` and `racket -l racket/base` independently | |
| 2. Subtracting the latter from the former. |
This uses the codeloader tool to generate lots of dummy code. The same aggregate generated code is either contained in a single module or distributed across N=500 modules, and there are two client modules, main-combined.rkt and main-separate.rkt that require either the former or the (myriad) latter. The tests below are run on these "main" modules.
$ ./filecreator 500
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -(Written for the Racket community for Day 8 of the Racket Advent Calendar) | |
| +This post was written for Day 8 of the Racket Advent Calendar. “#lang” is a Racket term referring to declaring the programming language in use, and this post uses Racket as a platform to discuss one approach to writing good programming languages. I’ve made an effort to explain the Racket-specific ideas as they are introduced, so if you are interested in language design but aren’t a Racketeer, I hope you’ll still read it and that you’ll find it interesting. | |
| When a way of expressing a complex idea becomes small enough to fit in your head and doesn’t require special effort on your part to remember, it has, in a useful sense, become a language. | |
| -Take Racket's module system, for example. By just writing "require," which is of course what we mean to do, we gain the ability to describe with great and effortless nuance in just what manner we mean to include those modules -- whether to retain the names of the included definitions or change |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;; Emacs Lisp | |
| ;; This uses a slightly modified version of Racket Mode's | |
| ;; `racket-xp-rename' to rename an identifier in a project *by | |
| ;; binding* rather than just textually by regex. The Racket Mode | |
| ;; function only works within a single module and doesn't have a | |
| ;; notion of a "project." So, the search and replace function below | |
| ;; uses Projectile's definition of a project --- i.e., the files | |
| ;; listed in the Git index for the current repo via | |
| ;; `projectile-project-files' --- to apply `racket-xp-rename' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #lang racket/base | |
| (module mac-module racket/base | |
| (provide mac) | |
| (require syntax-spec-v3 | |
| qi | |
| syntax/parse/define | |
| syntax/parse | |
| (for-syntax racket/base |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #lang racket/base | |
| (provide list→stream | |
| stream→list | |
| map | |
| filter | |
| foldl | |
| foldr | |
| take | |
| range |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #lang scribble/manual | |
| @require[scribble-math/dollar | |
| srfi/19 | |
| vlibench | |
| (for-syntax racket/base) | |
| racket/cmdline | |
| racket/string | |
| racket/function] |
OlderNewer