summaryrefslogtreecommitdiff
path: root/antiformatter/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'antiformatter/README.md')
-rw-r--r--antiformatter/README.md38
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 ] ]
+]
+
+)
+
+]
+]
+```