Stillbrithiarngialpielroinuslislislislislisquattostamiswackilduasliesfris

From Esolang
Jump to navigation Jump to search

Stillbrithiarngialpielroinuslislislislislisquattostamiswackilduasliesfris (or Stilbrith if you can't pronounce this, or even Stilllbrillbritillbrithithiarithiarngiarngiarngialbrithiarngialpialpielpielrngialpielroielroingialpielroinuslroinuslinuslislislislislislislislislislislislislis
lislislislislisquslislislislislisqualpielroinuslislislislislisquathiarngialpielroinuslislislislislisquatttoinuslislislislislisquattosquattostostattostam
isquattostamistamiswamiswackiswackilisquattostamiswackilduattostamiswackilduackilduaswackilduaslduaslilduaslielroinuslislislis
lislisquattostamiswackilduasliesliesfroinuslislislislislisquattostamiswackilduasliesfriesfrisfris) is designed by PSTF.

For ease of use, I'll use Stilbrith from this.

Language Overview

Stilbrith is Turing-Complete, variable-based language that uses a BASIC-like syntax. It is easy to learn.

Basic Syntax

Comment

` One line comment.
`` Comment block. ``
`` Can't be `` nested. `` ``

Command block

We use brace to quote up a command block. Commands are seperated with semicolons.

Type

  1. Numbers(num). Every valid real number is num type, such as 3, -7, 69.69696969, 234.138561930659740856293748923659, 3/7, 5/193, 114514/221 and so on.
  2. String(str). Quote by "" or ''. \Q for " and \q for '.
    • Document string. Quote by "'' and ''".\\Q\ for "'' and \\P\ ''".
    • HTML string. Quote by h"".
    • Format string. Quote by f"", and works in Python.
    • Regular Expression string. Quote by r"", and most of escape didn't work, such as \\ is two backslashes instead of one backslash.
  3. Lambda. A function.
  4. Array. Literally an array, quote by brackets.
  5. Matrix. Literally a matrix of number, express like an array.
  6. Type. A type keyword.
  7. Nonetype. Every invalid things(including NULL) are belong to this.

Identifier

Every identifier that work in Python also work in Stilbrith.

Variable

Unlike most esolangs, <- is assignment, and = is equality.

var type name <- value

Assign with new value needn't the type keyword and var keyword.

name <- new_value

Assign with type converts that variable to that type.

name <- new_type

Assign with nothing will delete that variable.

name <-

Replace var with const will define a constant. Constants can only initialize, and can be deleted but not modified.

const type name <- value

I/O

Standard output

print(*args, **kwargs, sep <- ' ', end <- '\n', file <- sys.stdout, flush <- False)

This function outputs a specified set of contents. SEP is a separator that separates two elements and defaults to a space. end is the terminator, which is the element after the last element, and defaults to a carriage return. file represents the file to be output to, and the default is the standard output stream. flush specifies whether you want to force a flush of the buffer after each output.

Standard input

input(prompt <- NULL, file <- sys.stdin)

This function asks the user to enter a string of strings. The result must be a string. This function outputs the contents of the prompt before input. If you accidentally enter a file terminator (Ctrl+D on *nix, Ctrl+Z and Enter on Windows), an EOF error is thrown. file, which defaults to the standard input stream, means the things are received from where.

Evaluated input

getexpr(prompt <- NULL, file <- sys.stdin)

Ditto. However, this function will parse into an expression after accepting a string, so don't enter an illegal expression, or the program will explode.

Control flow

If-elif-else

if condition {code} elif condition {code} elif... else {code}

elif and else can be omitted.

Loops

while condition {code}

There is no iterative loops. break can break current loop, and continue jumps to next round of loop.

Functions

Functions are lambdas.

function args_list{code}

You can also assign a lambda to a variable. Rec&Reg are supported.

var lambda greet <- function username{print(f"Hello, {username}!")}
greet("islptng") ` 又来了

Class

Class can be expressed as user-defined type.

class YourClassName ` Hump nomenclature
{
    attributes
    const lambda __init__ <- function self, *args{initialization}
    methods
}

Examples

This section is still a work in progress. It may be changed in the future.

Categories and References