$_$

From Esolang
Jump to: navigation, search
This is still a work in progress. It may be changed in the future.

$_$ (pronounced sus) is an esolang by Cortex where strings of a certain character are commands. It was named after the first two characters added, _ and $. Newlines are optional.

A new, 1.5-dimensional (you'll see what that is when I finish the new version) version of $_$, Sus++ is currently being worked on. This page describes the old version. Sus++ will most likely be finished by January 20th. If it is, in fact, finished, click here. (nevermind)

Constants

Name Default value
s Empty string. See _ and $
Example Example
Example Example
Example Example

Commands

In this table, N represents the number of characters. (for the call ____________, N would equal 12)

Character What it does Category
_ Append the character with the ASCII value N to s. I/O
- Like _, but prepend the character to s instead. I/O
$ Print the value of s, and reset it to an empty string if N is odd. I/O
& Separate calls of the same character. Control
@ Create label N. Labels
! Assign the most recently created label to the N'th character call. Labels
# Go to label N. Labels
. Stop executing. Control
% Begin or end a comment. Control
? Ask the user for input and append it to s. I/O
+ Append the source of the (N-1)th call in the program to s. If N is 1, the entire source code is stored in s. I/O
1 Begin defining a new miniprogram N. Miniprograms
2 Stop defining miniprogram N. Miniprograms
3 Add the Nth character in this list to the miniprogram. Followed by a 4 call. Miniprograms
4 Determines N for the character added in the previous 3 call as the N of this 4 call. Miniprograms
5 Run miniprogram N. Miniprograms
z Wait N seconds. Control
; Print the lyrics to All Star by Smash Mouth N times. I/O
* Interpret s as source code. Inspired by InterpretMe I/O

Examples

These examples might not work due to there being no interpreter to write or test programs in.

Hello, World!

________________________________________________________________________&_____________________________________________________________________________________________________&____________________________________________________________________________________________________________&____________________________________________________________________________________________________________&_______________________________________________________________________________________________________________&____________________________________________&________________________________&_______________________________________________________________________________________&_______________________________________________________________________________________________________________&__________________________________________________________________________________________________________________&____________________________________________________________________________________________________________&____________________________________________________________________________________________________&_________________________________$.

Cat program

?$.

Quine

+$. % Technically this gets the entire source code, making it a [[cheating quine|List of quines#Cheating quines]] %

Skip the first . call and become a cat program

@!!!!!#.?$.

Define a miniprogram containing the cat program, and run it

133333333343343333333425

Self-interpreter

?*.