• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

bin/H31-Jul-2020-275220

c/H31-Jul-2020-1,4901,389

doc/H31-Jul-2020-258223

fasl/H03-May-2022-

owl/H31-Jul-2020-22,23717,088

scheme/H31-Jul-2020-663575

tests/H07-May-2022-5,3983,941

.gitignoreH A D31-Jul-2020145 1615

.gitlab-ci.ymlH A D31-Jul-202073 96

LICENCEH A D31-Jul-20201 KiB2016

MakefileH A D31-Jul-20203.9 KiB15087

README.mdH A D31-Jul-20202.5 KiB9067

THANKSH A D31-Jul-20201,013 2117

README.md

1# Owl Lisp
2
3Builds:
4[![pipeline status](https://gitlab.com/owl-lisp/owl/badges/develop/pipeline.svg)](https://gitlab.com/owl-lisp/owl/commits/develop)
5
6## Overview
7
8Owl Lisp is a functional dialect of the Scheme programming language. It
9is mainly based on the applicative subset of the R7RS standard.
10
11
12## Requirements
13
14You should have make and gcc or clang installed.
15
16
17## Installation
18
19To install system-wide to /usr
20```
21   $ make
22   $ sudo make install
23```
24
25Alternatively you can try it out with
26```
27   $ make
28   $ cp bin/ol /somewhere/convenient
29   $ /somewhere/convenient/ol
30   You see a prompt
31   >
32```
33
34## Files
35
36```
37   bin/ol      - the owl interpreter/compiler
38   c/ovm.c     - the virtual machine / shared owl lisp runtime
39   owl/*.scm   - implementation of owl repl and compiler
40   fasl/*.fasl - bytecode images for bin/vm used during boot
41   bin/vm      - plain VM used during boot
42   c/ol.c      - combined VM and REPL heap image
43```
44
45## Usage
46
47Owl can be used either interactively, or to interpret code from files,
48or compile programs to fasl-images or c-files. The difference between
49an owl program and a plain script is that the program should just have
50a function of one argument as the last value, which will be called with
51the command line argument list when the program is executed.
52
53In addition to being a regular interpreter, owl also tries to make it
54easy to compile programs for different platforms. Owl programs can be
55compiled with ol to C-files, which can be compiled to standalone binaries
56without needing any owl-specific support files or libraries. The C files
57also work on 32- and 64-bit systems, and compile as such at least on
58Linux, OpenBSD, and macOS or can be cross-compiled to Windows executables
59with MinGW.
60
61For example, to build a hello world program:
62```
63  $ echo '(lambda (args) (print "Hello, world!"))' > hello.scm
64  $ ol -o hello.c hello.scm
65  $ gcc -o hello hello.c
66  $ ./hello
67  Hello, world!
68```
69
70Or simply:
71```
72  $ echo '(λ (args) (print "Hello, world!"))' \
73     | ol -x c | gcc -x c -o hello - && ./hello
74```
75
76Parts of the compiled programs can be translated to C, instead of being
77simply fasl-encoded, to increase speed. Using the --native flag compiles
78most of the bytecode to C, and --usual-suspects compiles typically used
79functions. To make programs run faster, one can use for example:
80
81```
82  $ ol -O2 -o test.c test.scm && gcc -O2 -o test test.c
83```
84
85## Updates and Documentation
86
87For further documentation and updates, see:
88
89  https://gitlab.com/owl-lisp/owl
90