til 0.2.2

Yet another programming language


To use this package, run the following command in your project's root directory:

Manual usage
Put the following dependency into your project's dependences section:

Til

Just another programming language.

Example

# You can import things manually but most of the time the
# auto-import feature works just fine...
# import std.io as io
# import std.math as math

# Most of the syntax is the same as Tcl, except
# we have "simple lists" using "()":
set x [math (1 + 2 + 3 + 1)]
io.out $x
# → 7

# Contrary to Tcl, "{}" enclosed things are
# NOT strings, but simply a "SubProgram".
# They are parsed as any other part
# of the language, just not
# immediately run.
if ($x > 6) {
    io.out "Great!"
}

# Til implements the concept of "streams", almost
# like stdin/stdout in shell script.
range 0 5 | foreach x { io.out $x }

# We also have dictionaries!
set d [dict (a 1) (b 2) (c 3)]

# Values can be extracted using Til extraction syntax:
io.out <$d a>  # prints "1"

# Extraction syntax is used to get values from lists, too:
set lista (a b c d e)
io.out <$lista 0>    # prints "a"
io.out <$lista 1 5>  # prints "(b c d e)"
Authors:
  • Cléber Zavadniak
Sub packages:
til:run, til:hellomodule
Dependencies:
none
Versions:
0.2.2 2021-Jun-07
0.2.1 2021-Jun-06
0.2.0 2021-May-30
0.1.3 2021-May-22
0.1.2 2021-May-21
Show all 10 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 9 downloads this month

  • 16 downloads total

Score:
1.1
Short URL:
til.dub.pm