Strang
Jump to navigation
Jump to search
Strang is an esoteric programming language by User:FluixMakesEsolangs, the offical interpreter is made in Python. The name is a mixture of strange and string but it sounds weird.
Functions
The language has 8 functions:
- '?' - Replaces string such as
?::Foo|F|B
would turn "Foo" into "Boo"! - '!' - Prints argument such as
!::$1
would print what is the output of line 1. - '+' - Concats 2 strings like
+::$$| Concat
would concat the thing on the previous line if it has an output - '-' - removes instance from string so
-::FooBar|Bar
becomes "Foo"! - '--' counts the number of a sub-string in a string
--::***|*
becomes 3, this function is to turn unary numbers into base-10. - '*' - replaces an existing instance of all strings that include a keyword like
*::Foo|Keyword
- '~' - loops until A is NOT in B
- '@' - ends a loop
Syntax
# Comment (Comments are still counted as lines so if you have a line dedicated to a comment you must account for it) foo:: # this is a function f::this|is|how|you|get|multiple|arguments !::%% # this is input !::$$ # this grabs from the last line and errors out if the last line didint produce a string !::$line number # this is like $$ but $??? grabs from a specified line !::Hello\nNewlines! # Newlines are supported
Examples
Hello, world! - Just a basic hello world program.
!::Hello, world!
Cat Program - Prints users input!
!::%%
Rule 110 - A basic Rule 110 interpreter, this interpreter MIGHT be wrong.
+::0001000| ~::0|$1 ?::$1|111|1110 ?::$$|110|1101 ?::$$|101|1011 ?::$$|100|1000 ?::$$|011|0111 ?::$$|010|0101 ?::$$|001|0011 ?::$$|000|0000 *::$$|$1 ?::$1|0|. ?::$$|1|# !::$1 @::
Known Interpreters
Official Interpreter:
I will include a link soon! :-p