STRTRAN
- This is still a work in progress. It may be changed in the future.
Paradigm(s) | imperative String-Rewriting |
---|---|
Designed by | User:Froginstarch |
Appeared in | 2024 |
Computational class | Unknown |
Reference implementation | Unimplemented |
Influenced by | thue |
File extension(s) | .st |
STRTRAN '(string transformer)' is an esolang thought up by User: Froginstarch it is a String Rewriting language like thue, but made by an idiot
In this programming language, you manipulate a string with comparisons, concatenation, and replacements
Comparisons
The comparison of 2 strings is done by the compare -> statment This takes 2 strings and compares them. If equal then run True, if not equal then run False
comp stringA -> stringB true /- something -/ etrue efalse /- something else idk -/ efalse ecomp
Concatenation
Concatenation is done with the ++ operator, this takes 2 strings and concatenation them into one string
"Hello " ++ "World!" /- "Hello world" -/
Replacing
You can replace specific characters in a string using the replace in with statement
replace "h" in "hi" with "b" /- hi -> bi -/
Templates
templates are this programming languages equivalent of functions, its also how you can do looping through the most optimal looping method, recursion. (note to reader: this was a mistake)
temp goobIt {a, b} do a ++ b ++ "goob" etemp
IO
- idk why this is a separate section but idk so suck it up nerd :)
IO in this language is made to be mighty simple.
they are done with the readstdin and outstdout instruction an example of IO is the coveted TRUTH MACHINE
temp loop{} do comp readstdin -> "1" true outstdout "1" loop{} etrue false outstdout "0" efalse ecomp etemp loop{}
More Examples
Hey unsuspecting Esolanger! If you want to add some examples that you might have thought up. Thanks in advance :)
Computing class
as the writer as of now hasn't written an interpreter, so he isn't entirely sure. so yeah :p