haskell oneliner with programming ligatures
authorMischa POSLAWSKY <perl@shiar.org>
Mon, 9 Mar 2020 22:41:25 +0000 (23:41 +0100)
committerMischa POSLAWSKY <perl@shiar.org>
Sat, 7 Nov 2020 17:57:08 +0000 (18:57 +0100)
Some obfuscated code (not particularly typical) as found and explained on
<https://stackoverflow.com/questions/12659951/-obfuscated-haskell-code-work>
featuring multi-character combinations <$>, <*>, =<<, >>= substituted by
"modern" coding fonts such as <https://github.com/tonsky/FiraCode>.

This whole practice seems like an awful idea to me, but regardless needs to
be represented for font comparison.

unicode.txt

index 184fb34f0e8d8eecadd96253d340848865e319e2..9e63c876cc6a81c2eaecbb3dd7d44e5aecd6cc4e 100644 (file)
@@ -20,10 +20,12 @@ Code:
 
   Hash[ :nbsp => 0O2_40 ].each {|name, cp| puts "#{name} is '#{cp.chr}'" }
 
-  while ((c = *l++) != '\0') { m->stat[2] = IO | (~OK & X_8); }
+  while ((c = *l++) != '\0') { m->stat[2] = IO | (~OK & X_8); } /* C */
 
   perl -pe's/\w/$^ =~ $& > chop($^ = $& . $^) ? "@-" : $&/ge'
 
+  fix$(<$>)<$>(:)<*>((<$>((:[{- hs -}])<$>))(=<<)<$>(*)<$>(>>=)(+)($))$1
+
   ↑1 ⍵∨.∧3 4=+/,¯1 0 1∘.⊖¯1 0 1⌽¨⊂⍵ ⍝ game of life
 
 Mathematics and sciences: