J

From Esolang
Jump to navigation Jump to search
Not to be confused with wikipedia:J (programming language).

J is a very simple esolang made for no reason at all. It was invented by User:Yayimhere

Syntax

J stores memory in variables. Variables are created like this:

* A B

Where A is the name and B is the string. There are 5 operators:

  • J Will take the input string and will “pop” the start of the string and “push” it to the front(so using this operator on the string AB it will become BA and using it on the string YUYT it will become UYTY)
  • λ will go through the string and will then if it encounters a * it will replace the next char with a *
  • Π Go through the string and replace each char with its corresponding digit in pi
  • F Add a * To the end if the string
  • P Print the inputted string to STDIN

To pass a string ti any if these function:

F*U

This will pass the string U to the function F. To do it with a variable:

F*U:

To pass the result back ti the function until the firs char in the string is a * you add a \ To the end. And last but not least to create a function:

X$Y(…)

This will create the function Y with input X and will do the code in the brackets but with every X replaced with function input. Brackets can also be used to group an expression. Also if the program is looping it will check each line if theres something that will not evaluate to the same as before

examples

Hello world:

P*Hello, world!