Skip to content

Repository files navigation

I CAN'T BELIEVE ITS NOT FORTH!

I CAN'T BELIEVE ITS NOT FORTH! is a forth-like stack-based language, with a web UI and a goal of being used to make little widgets everywhere.

Currently, it isn't well documented, but look at all the builtin.ts files to see the avaliable builtin functions.

Examples

Loop

( start stop )
0 10 do 
    i . ( print index )
loop

Word definition

: addone ( n - n+1 )
    1 + ;

1 addone .

If Statement

1 1 = if "one and one are equal" else "never reached" then .
1 2 = if "true (never reached)" else "false" then .

Key/Value store

"Arcade" #name #set kv

"Hello " #name #get kv  ( "Hello " "Arcade" )
concat .
: setText #innerText #readout #set-prop ui ;
: onUpdate 100 * setText ;

"p" "INITIAL" Element #readout id
Slider #Slider id 
2 VStack ( Stack all of the elements vertically )
render ( render the elements to the DOM )

#onUpdate #Slider #attach ui

About

I CANT BELIEVE ITS NOT FORTH

Resources

Security policy

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages