diff options
author | JJ | 2023-05-02 20:13:08 +0000 |
---|---|---|
committer | JJ | 2023-05-02 20:13:08 +0000 |
commit | f0f5c29ec7ff009100e063f38bebf613054f44d7 (patch) | |
tree | 320d822f1faad4f3bc2d5760c4a0ac4ebe5beb26 /antiformatter/README.md | |
parent | ab451b3466b7f5151db9556fdf326934f86bd246 (diff) |
Add the antiformatter
Diffstat (limited to 'antiformatter/README.md')
-rw-r--r-- | antiformatter/README.md | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/antiformatter/README.md b/antiformatter/README.md new file mode 100644 index 0000000..1eac8b1 --- /dev/null +++ b/antiformatter/README.md @@ -0,0 +1,38 @@ +# antiformatter: attempting to make the worst possible passable racket code + +usage: `racket antifmt.rkt <file>` + +regular racket code. boring to read, easy on the eyes. booooooo +```rkt +(define (mangle sexp) + (if (not (list? sexp)) (error 'mangle "not an s-exp") + (if (empty? sexp) "" + (let ((paren (random-paren))) + (string-append + (first paren) + (mangle-params sexp) + (random-newline) + (last paren)))))) +``` + +anti-formatted racket code. exciting! an adventure to understand! still compiles (usually) +```rkt +[define [mangle sexp + +] [if (not [list? sexp +] ) [error {quote mangle } "not an s-exp" +] (if {empty? sexp + +} "" [let {{paren {random-paren +} +} +} [string-append {first paren } (mangle-params sexp + +) {random-newline } [last paren ] ] +] + +) + +] +] +``` |