REPO MOVED TO: new link
RPN but better, or worse. Who knows?
Here is hello world:
#lang barrel
; this is hello world in barrel
"hello world"
; pushes () onto the stack
~
; outputs:
; hello world
; ()
You need to have racket
and raco
installed on your system, also preferably DrRacket
.
DrRacket:
- Open DrRacket, and under
File
, clickInstall Package
. - A text window will pop up. Type in
barrel
and then pressInstall
. - There you go, now you have
barrel
installed!
Terminal + Package Server:
- Open your terminal.
- Since
barrel
is on the package server, you can just runraco pkg install barrel
. - Once it finishes, make a file called
helloworld.brl
(.brl
is the file extension for barrel code). - There you go, now you have
barrel
installed!
Building from Source:
- Open your terminal.
- In your terminal type in these two commands:
$ git clone https://github.com/crabbo-rave/barrel.git
$ cd barrel\barrel
$ raco pkg install
- There you go, now you have
barrel
installed!
- Create a file called
helloworld.brl
(.brl
is the file extension for barrel code). - In the file, then paste this code below:
#lang barrel
"hello world"
~
- Now you can run it by pressing the
Run
button in DrRacket, or by runningracket helloworld.brl
in the terminal.