Skip to content

raventid/bebe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bebe

My own LISP dialect, crafted with love.

Inspired by Scheme and SICP. Simple, fast, extensible, it requires less code to complete simple task or computation.

Now language support only basic arithmetic operations.

See wiki for installation instructions.

Enjoy!

Installation

At the moment Bebe available and well tested at Debian based linux machines.

To compile Bebe from source you have to clone this repo, and then run make, from project folder.

If you are not sure how to do it, well, on Debian or Ubuntu try:

$ cd /path/to/downloaded/file/bebe
$ ./make

After compilation you should run bebe repl as ./repl from source folder or you might create a link to this file and put it into /usr/bin/

Good luck!

Operators

+ 4 5  #=> 9
- 2 1  #=> 1
* 2 2  #=> 4
/ 4 2  #=> 2
% 10 6 #=> 4
^ 2 3  #=> 8

You can easily nest any number of operations using parenthesis. And pay some attention to the fact that first action do not require you to use parenthesis like + 3 4 and (+ 3 4) is wrong, that makes language less nested.

+ (/ 
     (/ 4 2) 
     (+ 1 1) 
  )
  (- 
     (/ 8 2) 
     (- 3 2) 
  )