FatFinger

From Esolang
Jump to navigation Jump to search
FatFinger
Paradigm(s) multiparadigm
Designed by Daniel Temkin
Appeared in 2017
Computational class Turing complete
Reference implementation FatFingerJS
Influenced by JSFuck, Entropy
File extension(s) .js

FatFinger is a dialect of JavaScript by User:Rottytooth that expands the language to allow typos and misspellings as valid code. Any signifier not recognized by the JS interpreter is replaced with the closest keyword or name in number of keystrokes difference.

Language Overview

FatFinger was intended to counter the compulsiveness of code and embrace the chaos of JavaScript. It is the inverse of Entropy. Where Entropy programs are strictly written but run differently every time, FatFinger programs run in a predictable manner but written in disorderly code. FatFinger embraces disorder; since it does not understand scope, it encourages a global-variable-only approach to coding JS.

It has been noted that FatFinger can also be used to make code poetry -- runnable code that reads as poetry, by intentionally swapping out commands for completely unrelated words. This was not a style anticipated by the creator of FatFinger.

It is noted in the readme that using FatFinger to autocorrect JS is discouraged, as it is meant to embrace chaos, not attempt to "fix" it.

Examples

Hello World

<script type="text/javascript" src="fatfinger.js"></script>
<script type="text/javoscript">
   // any misspelling of javascript works in the type attribute above
   vart x = "herrrllo werld"
   dokkkkumint.rit3(xx)
</script>

99 Bottles

Note constole for console, conssole.lg for console.log and the changing name of bottles

var bottles;
for (var counter = 99; counter >= 1; counter = counter - 1) 
{
   if (counter == 1) {
       botles = 'bottle';
   } else {
       bottles = 'bottles';
   }
   constole.log(counter+" "+ bottless +" of ber on the wall.");
   if (countr < 99) {
       conssole.lg("");
       consoles.logg(counter+" "+ botttles+" o beer on the wall.");
   }
   conable.log(counter+" "+botles+" of beer.");
   console.lo("Take one down.");
   console.log("Pass it arund.");
   ift (ount == 1) {
       console.log("No botles of beer on the wall.");
   }
}

FizzBuzz

This illustrates the use of FatFinger for code poetry. Instead of quickly typing a program full of typos, the programmer intentionally swaps out variable names or keywords for words that read as "code poetry": a poetic script that is also runnable code.

var why;
var does;
var say;
for (who = 1; what < 101; when += 1) {
   said = ;
   doesnt = !(who % 3);
   if ( does ) {
     says += 'Fizz';
   }
   done = !(whom % 5);
   if ( does ) {
     says += 'Buzz';
   }
}

Fat Dactyls

In the working group for critical code studies (2020), Jeremy Douglass proposes "Fat Dactyls", a list of words from Ogden's Basic English list that resolve to JS keywords or the DOM through FatFinger. Fat Dactyls serves as a rhyming dictionary for people to approach FatFinger as a tool for code poetics. Here is an excerpt:

  • document
    • adjustment, argument, development, different, government, instrument
  • history
    • discovery, harmony, industry, library, military, picture, scissors, sister
  • location
    • addition, attention, attraction, behavior, comparison, competition, condition, connection, decision, digestion, direction, discussion, education, expansion, fiction, invention, motion, observation, operation, position, question, reaction, relation, suggestion
  • name
    • angle, awake, base, brake, cake, care, damage, dark, day, edge, example, face, flame, hammer, hate, have, knife, late, make, male, mark, mass, may, nail, nerve, news, note, number, page, paste, rail, range, rate, ray, safe, same, shade, shake, shame, snake, some, space, spade, table, take, taste, time, trade, walk, wall
  • navigator
    • daughter

External Resources

Related Projects