Documentation for toy language called Babble https://felix.plesoianu.ro/languages/babble/
Go to file
LeBiterino d0117ffa84 Update 'readme.md' 2023-03-11 12:39:29 +00:00
COPYING Initial commit 2023-03-11 09:51:20 +01:00
readme.md Update 'readme.md' 2023-03-11 12:39:29 +00:00

readme.md

Biterr's Babble beginner guide

What's Babble?

Babble is a toy programming language created by Felix, with Lisp-like syntax and dynamic types it makes it perfect for newcomers in tech.

What's purpose of Babble?

Babble is just a toy language. It dosen't have real purpose tho it cloud be used for embedded devices.

I. Hello World!

Like in every programming language, you would first like to write Hello World! in Babble you do it with a command (print), it's very simple, you just write text in quotation marks next to command under brace

(print "Hello World!")

And you get Hello World program!

II. Input

Lorem Ipsum

III. Variables

Variables in Babble are declared with (var) by writting name of variable next to it

(var variablename)

And then by adding variable content next to it

(var variablename "Some String")

It also can be integer

(var variablename 9)

And float

(var variablename 9.10)

PRO TIP

A dollar sign sigil denotes variable lookup. Internally, $a is expanded to (get a). Otherwise a is just a literal string (with the exception shown above). As a consequence, this works too, it's just kinda silly:

('print' 'Hello, world\n')

IV. Lists

To make a list just add square brackets under variable and inside square brackets add values that you want to hold in list

(var variablename [value1 value2 value3])

It can be integer or string or float and you call it by specifing a variable name and then choosing value position by order

(variablename 2)

2 is value position by order. For example

(var variablename [value1 value2 value3])

and if I choose 2

(variablename 2)

It will pull up value2.