isomorpheme / vonlang

The first count-based programming language, ah, ah, ah!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

vonlang

The first count-based programming language, ah, ah, ah!

Quick Tour

Program Structure

Every Von program starts with an introduction:

Ah hello there, it is I, the Count!

This is followed by zero or more statements, each on a separate line. The program then ends with the block-end marker *thunder*.

For example, this program prints the number 42:

Ah hello there, it is I, the Count!
42! 42 bats, ah, ah, ah!
I love to count bats!
*thunder*

Single-line comments use the πŸ¦‡ emoji (U+1F987 BAT).

πŸ¦‡ This is a single-line comment.

Registers

In Von, counting is done using registers. There are two kinds of registers: mutable and constant.

πŸ¦‡ Mutable
2 Apples, ah, ah, ah!

πŸ¦‡ Constant
2! 2 Apples, ah, ah, ah!

Mutable registers may be assigned a new value, but it is an error to assign to or redefine a constant register.

Registers are plurality sensitive. That is, if a register is assigned the value 1, the actual register referred to has an 's' appended to it.

1 apple, ah, ah, ah! πŸ¦‡ 'apples' is now 1

To circumvent this, one may use an exclamation mark, like so:

1 sheep! Ah, ah, ah! πŸ¦‡ 'sheep' is now 1

Printing

One may print the contents of a register either numerically, or interpreted as an ASCII character.

65! 65 apples, ah, ah, ah!

πŸ¦‡ Numeric
I love to count apples! πŸ¦‡ Prints '65'.

πŸ¦‡ ASCII
I love to count apples, ah, ah, ah! πŸ¦‡ Prints 'A'.

To print multiple registers on one line, use semicolons.

72! 72 horses, ah, ah, ah!
73! 73 images, ah, ah, ah!
I love to count horses; images, ah, ah, ah! πŸ¦‡ Prints 'HI'.

Loops

This piece of code will print 'SPAM' 10 times.

10! 10 loops, ah, ah, ah!
83! 83 sticks, ah, ah, ah!
80! 80 parrots, ah, ah, ah!
65! 65 apples, ah, ah, ah!
77! 77 monkeys, ah, ah, ah!

I count loops:
    I love to count sticks; parrots; apples; monkeys, ah, ah, ah!
*thunder*

Not Yet Implemented

The following language constructs are not implemented yet. In fact, the designs are not final at all.

Increment

1 bat, ah, ah, ah!
1 more bat, ah, ah, ah!
πŸ¦‡ 'bats' is now 2.
2 more bats, ah, ah, ah!
πŸ¦‡ 'bats' is now 4.

If-else

1! 1 bat, ah, ah, ah!

Are there any bats?
    89! 89 yes, ah, ah, ah!
    I love to count yes, ah, ah, ah!
*organ music*
    78! 78 no, ah, ah, ah!
    I love to count no, ah, ah, ah!
*thunder*

About

The first count-based programming language, ah, ah, ah!

License:GNU General Public License v3.0


Languages

Language:Haskell 100.0%