esolang

La Weá

Brainfuck in Chilean slang, with sixteen words where brainfuck has eight characters.

Rodrigo Pelissier, 2018 · Turing complete: yes · ●○○ easy · esolangs.org

Tested with 3 known programs · Test method

Run it

Expected: Hello, World!

The idea

Rodrigo Pelissier released La Weá on September 18, 2018, after COW and brainfuck. Every command is a highly colloquial word of Chilean Spanish. Beside brainfuck's eight there are steps of two, a reset to 0, a way out of a loop, copy and paste, numbers in and out, and an end.

Read the story

The specification has a short Ruby interpreter, and this implementation follows it. That interpreter turns each word into a piece of Ruby and drops every other character. So a word counts wherever it stands, even inside another word, and the program is lowercased first.

The machine

WordDoes
weón aweonaoAdd 1 or 2
maricón maracoTake away 1 or 2
maracaSet the cell to 0
puta chuchaMove right or left
pichula tulaLoop while the cell is not 0, like [ and ]
picoLeave the innermost loop
ctm chúpalaPrint the cell as a byte or as a number
quéweá brígidoRead a byte, or a line with an integer on it
perkinCopy the cell, or paste the copy and forget it
mierdaEnd the program

Cells hold whole numbers without bound. At the end of the input quéweá leaves the cell as it is and brígido gives 0. One quirk comes from the Ruby. The first perkin in the text stops the program when its turn to paste comes, because Ruby meets its variable before any assignment to it. Later perkins paste as they should.

Example

Hello World.

Hello World.

A countdown from 6, and a number read with brígido, copied one cell to the right and raised by 2.

Expected: 654321
Expected: 42

Factorial asks Ingresa un número, reads the number with brígido and multiplies by counting, so 5 takes 4,605 steps and prints El factorial de 5 es 120. It prints the ú as the single byte 250, which a UTF-8 terminal does not show as ú. The Fibonacci program prints 1, 1, 2, 3, 5 and on without end.

Patterns it teaches

  • Turing tarpit: brainfuck underneath, with a few comforts added.
  • Camouflage: a program reads as a string of Chilean swear words.

Further

Pseudonatural

Write your own in Run Convert a program from La Weá

Implementation

JavaScript interpreter, source and command line

A JavaScript interpreter, used in the browser and on the command line. Id: la-wea.

Command line

shib run la-wea program.txt

The program is long; save it as program.txt first.

shib manual la-wea

Source

Module
langs/wiki/ports.js
Interpreter
langs/wiki/la-wea.js

Docs: Kernel instructions · The .shib format · Command line · Adding a language

Source esolangs.org (CC0) · Edit on esolangs.org