Lazyfuck

From Esolang
Jump to navigation Jump to search
Lazyfuck
Designed by User:D
Appeared in 2023
Memory system Cell-based
Computational class Turing Complete
Reference implementation see below
Influenced by Alphuck
File extension(s)

Lazyfuck is a trivial brainfuck substitution that requires the least possible effort to type on an ergonomic keyboard. (All keys used in lazyfuck are highly frequent letters in English, so they have been optimized by the keyboard to require the least force to press.)

Furthermore, the brainfuck commands have been ordered by frequency of appearance, according to the frequency of English letters. Therefore, if you're using a highly frequent brainfuck command (mapped to lazyfuck), it's a lot easier to press on the keyboard than a less frequent command. This makes full use of the ergonomic design of the MacBook Pro keyboard.

Commands

Lazyfuck brainfuck Description
e > Move pointer east
t < Move pointer west
a + add 1
o [ open a loop
i ] close ("blizu") a loop
n - subtract ("levon") 1
s . display a character
r , read a character

Example programs

Hello, World!

aaaaaaaaoeaaaaoeaaeaaaeaaaeattttnieaeaeneeaotitnieesennnsaaaaaaassaaaseestnstsaaasnnnnnnsnnnnnnnnseeaseaas

The same in brainfuck:

++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.

Implementations

Implementation in sed (transpiles to brainfuck; requires -E flag):

y/etaoinsr/><+[]-.,/

See Also

  • Alphuck, which inspired this language