We are currently working on new rules for what content should and shouldn't be allowed on this website, and are looking for feedback! See Esolang:2026 topicality proposal to view and give feedback on the current draft.
Lingua Indeterminatum/STL
← Back to Lingua Indeterminatum
The STL of Lingua Indeterminatum will be documented here and implemented at Lingua Indeterminatum/Impl/STL.py after the design of the syntax.
For Reference: Septem Lingua's STL
math
math.sin(x) math.cos(x) math.tan(x) math.cot(x) math.sec(x) math.csc(x) math.sinh(x) math.cosh(x) math.tanh(x)
Returns the result of the corresponding trigonometry functions applied to x where sinh(x)=(ex-e-x)/2, cosh(x)=(ex+e-x)/2, tanh(x)=sinh(x)/cosh(x)=(ex-e-x)/(ex+e-x)
Note: The cotangent, secant, and cosecant functions are not recommended for use, because cotangent is the reciprocal of tangent, secant is the reciprocal of cosine, and cosecant is the reciprocal of sine.
math.arcsin(x) math.arccos(x) math.arctan(x) math.arsinh(x) math.arcosh(x) math.artanh(x)
Returns arcsin(x),arccos(x),arctan(x),arcsinh(x),arccosh(x),arctanh(x) respectively
math.atan2(x, y)
Returns arctan(x/y), π/2 if x>0 and y==0, -π/2 if x<0 and y==0, throws ValueError on x=y=0
math.exp(x)
returns ex
math.sqrt(x) math.cbrt(x)
returns x^(1/2) and x^(1/3) respectively
math.floor(x) math.ceil(x) math.round(x)
returns floor(x) (towards 0), ceil(x) (away from 0) and the closest integer to x (tie-break towards 0) respectively
math.log(x[, y]) math.ln(x) math.lg(x)
the first funtion return logy(x). Leave y blank means return ln(x). the 2nd and 3rd functions are self-explanatory
math.pi
Return π
math.tau
Return τ(also know as 2π)
math.phi
Return ϕ (=(1+sqrt(5))/2)
math.euler ~?/deprecated, kept for historical reasons\?# math.E
Return e
math.cgamma
returns the euler-mascheroni constant γ≈0.577215664901532860606512090082402431042159335939923598805767234884867726777664670936947063...
math.degree(x)
Convert x to degrees.
math.radius(x)
Convert x to radians.
math.sgn(x)
If x is greater than 0, return 1. If x is less than 0, return -1. If x is 0, return 0.
math.abs(x)
Return |x|
math.copysign(x, y)
Multiply |x| by sgn(y) and output the result. For systems that support signed zero, copysign(0, -1) returns negative zero.
math.gamma(x)
Return Γ(x). For x∈Z, Γ(x+1)=x!. (Note that the ! operator don't work on floats)
math.beta(x,y)
Returns the beta function B(x,y)=Γ(x)Γ(y)/Γ(x+y)
math.lngamma(x)
returns ln(Γ(x))
math.erf(x) math.erfc(x)
calculates the (complementary) error function of x. erf(x)=(2/sqrt(π))ʃ0xexp(-t2)dt, erfc(x)=1-erf(x) without precission loss.
math.nPr(x, y)
Return x! / (x - y)!
math.nCr(x, y)
return x! / (y!(x-y)!)
math.frexp(x)
Return the mantissa and exponent of x, as a list of [m, e] where x = m × 2e and 0.5 ≤ |m| < 1.
math.hypot(x, y[, z])
Return sqrt(x2 + y2[+z2]).
math.infinity
Return +∞. Behaves like in IEEE 754 STD.
math.NaN
Return "Not a Number". Behaves like in IEEE 754 STD.
math.ldexp(m, e)
Return m × 2e. That's simply an inverse of frexp.
math.isclose(a, b, abs_tol, rel_tol)
Return whether a is close to b. Two floating numbers are considered as close if |a-b| < abs_tol or |a-b|/max(a,b) < rel_tol. ±∞ are only close to themselves, and NaN does not close to anything, even including NaN itself.
math.googology (This library is not neccessarily to be implemented)
in remberance of the deleted math.tree function
math.googology.FGH(x,y) math.googology.FGH(x,y,mode)
returns fx(y) where f is the fast-growing hierachy. when x is a string, interpret it as a ordinal in mode mode where + is addition, * is multiplication (must be explicit), and
| mode | interpretation |
|---|---|
| 0 (default) | cantor normal form; use ω(x) or w(x) for ωx
shorthands: |
| 1 | veblen phi function; use φ(a,b,c,...,z) or p(a,b,c,...,z) for the phi function.
shorthands: everything in mode 0 and
place-value notation is supported and use the symbol |
| 2 | Buchholz OCF; use ψ(x,t) or P(x,t) for ψt(x) where t defaults to zero and is less than ω
shorthands: everything in mode 1 except phi function and |
| 3 | extented buchholz OCF: mode 2, but the restrictions of t<ω in ψt(x) and x<ω in Ωx are removed, |
| 4 | BMS (bashicu matrix system); x must be a valid expression in BM4 like this: (0,0,0)(1,1,1)(2,1,0)(1,1,1).
trailing 0's can be omitted: expression must be normal; non-normal expressions are a ValueError. to use any version other than BM4, specify the version like this: |
| 6+y | (y)-Y sequence; if y == -1, then it represents ω-Y. x should be like this: 1,3,4,2,5,7,5.
|
anything that can't be parsed into the mode above is a TypeError. mode<=0 or x isn't a natural number is a ValueError.
math.googology.hyper(x,z,y)
returns x^^...^^y with z arrows. For the convenience of recording later, in documents that support formatting (especially those that support HTML), x^^y (which equivalents into math.googology.hyper(x,2,y)) will be written as yx.
math.googology.graham(x)
returns G(x) where G is the graham's function. non-(natural number)s are a ValueError and G(0)=4.
math.googology.tree(x) math.googology.TREE(x) math.googology.scg(x)
returns tree(x),TREE(x),SCG(x) respectively, where tree is weak tree function, TREE is strong tree function and SCG is subcubic graph function
math.googology.evaluateBAN(str)
returns str evaluated as bird's array notation. str is a Bird's Array Notation string, such as "{10, 100(1)2}", which means {10, 10, 10, ..., 10, 10, 10}(100 tens). Evaluate it into the actual number.
for the subscripts XY, use "X(Y)". (eg. /3 => /(3))
math.googology.countableInf
Aleph-naught. Allowed to participate in mathematical calculations and equals math.inf.
math.googology.absInf
This constant can't be used in math calculations (if you stubbornly try to put Cantor's absolute infinity into a math formula, it'll trigger a ValueError). It's bigger than any numeric literal (but equal to itself), and comparing it with a complex number will cause a TypeError. It's not close to any numeric literal, only close to itself, kind of like a low-end version of NaN.
math.googology.sscg(x)
This function shouldn't be confused with the scg function, because it grows much slower than scg. It returns SSCG(x), where x has to be a positive integer.
math.googology.sgh(x, y)
Slow-growing hierarchy.
math.googology.mgh(x, y)
Mid-growing hierarchy.
math.googology.hh(x, y)
Hardy hierarchy.
math.googology.tar(x)
Literally Tar(x). It might exceed the limit of FGH quickly when x is a very big number.
random
random.int(x,y)
Return a random int from x to y. x and y must be int.
random.float(x,y) random.float(x,y,z)
Return a random float number from x to y with z decimal places. x and y can be int or float, but z must be a non-negative int. with z omitted, the function will not round the generated number.
random.item(x) random.item(x,m) random.item(x,1,f) random.item(x,m,f)
Return m random distinct elements from x in a list. x must be a list. with m omitted, return a random item from x. if f=1, then allows the elements to be same.
random.shuffle(x)
Shuffles x, returns the shuffled array. x must be a list and will not be changed.
random.unicode() random.unicode(flag)
Returns a random Unicode character. It will not return C0 control characters, C1 control characters, non-characters, or private areas. if flag is set, remove the restriction.
random.seed(x)
Seeds the internal RNG with x's string representation.
random.getseed(x)
Returns the seed used to seed the internal RNG.
string
string.atob(x)
Turns a base64-encoded string x into binary data and return that
string.btoa(x)
Base64 encode a string and return the encoded string
string.escape(x)
returns x, but escaped
string.unescape(x)
unescapes x and returns it. the escape/unescape behave as in node.js v20.16.0
string.hash(x,h) ~?/h=<num>|md5|sha265|sha512|crc32\?#
Returns x hashed with algorithm h which have to be in "md5","sha256","sha512","crc32", or a number. When x is a number, we calculate the hash with base x, modulo 2^64
string.match(x,y) string.match_re(x,y)
Returns the position 1st match of y in list x (0-indexed) or string x. string.match treats y as a normal string but string.match_retreats y as a regular expression.
If x is a string, the returned result will be a list containing:
[the first character containing y, the last character containing y, another character containing y's first character, another character containing y's last character,...]
If not found, a ValueError will be thrown.
time
time.time()
Returns current unix timestamp in milliseconds
time.wait(x)
Waits x milliseconds
time.tocomponents(x,t)
Convert milliseconds since the Epoch to a time list [year,month,day,hour,minute,second,weekday,julian day,is_DST,t] expressing local time and returns that. if t==1, uses GMT time instead
time.fromcomponents(x)
the inverse of time.tocomponents
time.strftime(format,x)
this is a bit complex:
- first, it turns x into a time list if it isn't
- then, it formats the time list by format
formatas follows:
| formatting signs | meaning |
|---|---|
| %Y | Year with century as a decimal number. |
| %m | Month as a decimal number [01,12]. |
| %d | Day of the month as a decimal number [01,31]. |
| %H | Hour (24-hour clock) as a decimal number [00,23]. |
| %M | Minute as a decimal number [00,59]. |
| %S | Second as a decimal number [00,61]. |
| %z | Time zone offset from UTC. |
| %a | Locale's abbreviated weekday name. |
| %A | Locale's full weekday name. |
| %b | Locale's abbreviated month name. |
| %B | Locale's full month name. |
| %c | Locale's appropriate date and time representation. |
| %I | Hour (12-hour clock) as a decimal number [01,12]. |
| %p | Locale's equivalent of either AM or PM. |
| %% | a literal %
|
time.strptime(format,str)
Basicly the inverse of time.strftime, but this function always return a time list
time.asctime(x)
Shorthand for time.strftime("%a %b %d %Y %H:%M:%S %z",x)
statistics
statistics.mean(x) statistics.mean(...x)
returns the arithmetic mean of x. (here, ...x means a variadic argument, just like in node.js)
statistics.quartile(q,x) statistics.quartile(q,...x)
calculate the q-quartile of x. eg. statistics.quartile(1/4,x) returns the lower quartile of x.
statistics.median(x) statistics.median(...x)
shorthand for statistics.quartile(0.5,x)
statistics.mode(x) statistics.mode(...x) statistics.sum(x) statistics.sum(...x) statistics.product(x) statistics.product(...x) statistics.max(x) statistics.max(...x) statistics.min(x) statistics.min(...x)
these functions are pretty self-explanitory.
statistics.stdevs(...x) statistics.stdevs(x)
calculated the sample (corrected) standard deviation of x.
statistics.stdevp(x) statistics.stdevp(...x)
calculate the population (uncorrected) standard deviation of x.
process
process.stdin.read(z)
reads at most z bytes from stdin, reads until EOF if z is omitted
process.stdout.write(z)
writes z to the stdout, unbuffered and with no trailing newline. If z is a list treat it as a list ob bytes
process.argv
returns the commald-line arguments as a list.
process.eval(x)
evaluates x as a septem lingua expression. (also see this to know how it this work)
process.exec(x)
edecutes x as a septem lingua code in current scope. (also see this to know how it this work)
process.getenv(x)
Gets the environment variable named x
process.setenv(x,y)
Sets the environment variable named x to y.
extr
extr.open(f,flags) extr.read(handle,...args) extr.write(handle,...args)
works as in python 3.12; extr.read(h,...s) is same as h.read(...s); same for extr.write
extr.fetch(uri,...args)
same as JavaScript's fetch
extr.llm(prompt) extr.llm(prompt,llm)
feeds prompt into the LLM named llm and return the result. llm defaults to "Gemini 3.1 pro" but it is blocked by the great firewall of china, so in china you use qianwen instead, and using any LLMs from foreigners in china throws a ValueError because you can not access it. (this command isn't uncomputable)
extr.system(x)
execute x as a system command
extr.fork()
forks this whole program into a different thread.
media
media.media(x)
If x is a text string, it is used as a path to retrieve the file. ".." can return to the previous level. The retrieved file is then returned. This file can only be an image, video, or audio file. Currently supported file extensions include "jpg, png, gif, jpeg, mp2, mp3, ogg, wav, bmp, svg" (this is not currently working because to make it work, we must first create six standard libraries, guess why?).
media.play(x)
If x is a sound file, play this sound.
media.run(x)
If x is an video file, play this video.
media.watch(x)
If x is a photo file or GIF, create a new page and play the photo on that page.
media.type(x)
Analyze x as a type of media, supporting photo, video, and sound.
data
data.create(x,<name>)
If x is a string, treat it as a path, and then create a file at that location based on the name.
data.folder(x,<name>)
If x is a string, treat it as a path, and then create a folder at that location based on the name.
data.delete(x,<name>)
If x is a string, treat it as a path, and then delete a file at that location based on the name.
data.delete_folder(x,<name>)
If x is a string, treat it as a path, and then delete a folder at that location based on the name.
data.zip(x,<name>)
If x is a string, use it as a path, then compress it into a zip archive within that path. If name is a folder or a normal file, compress it into a zip archive. If name is a zip archive, decompress it.
data.clone(x,<name>)
If x is a string, treat it as a path, and then copy a file named name to that path.
data.move(x,y,<name>)
If x and y are a string, then x is treated as a path. Then, a file named name is moved to y from this path.