GitHub - aki237/ligo: scheme like language interpreter
source link: https://github.com/aki237/ligo
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
ligo - scheme like language interpreter in golang
Introduction
ligo is implemented as a subset of lisp language with some changes in
syntax. The syntax and usage is described in the documentation included
in the doc
folder.
Building
- First of all fetch all the packages without installing.
go get -d github.com/aki237/ligo
cd
into the project directorycd $GOPATH/src/github.com/aki237/ligo
- Build the interpreter
go install ./cmd/ligo
- Build the ligo plugin packages
This installs the ligo plugins in
cd $GOPATH/src/github.com/aki237/ligo/packages/ ./build.sh
$HOME/ligo
The ligo interpreter is installed in your $GOPATH/bin
.
Usage
A commandline call without any arguments starts a interactive interpreter session.
In that process it also initializes a interpreter by running a start script from the file
$HOME/.ligorc
(like .bashrc
, in case of bash
). Any argument passed is treated
as a file and executes the contents in the file.
Simple Example
Simple example to get an input from the shell and
;; include all the required libraries
(require "base")
(printf "Hello %s!!" (input "Enter your name :"))
The bare interpreter has no functionalities (not even basic functionalities).
The "base"
package includes all the bare minimum functionality.
Extending the interpreter
Writing packages for the interpreter in Go is very simple and is discussed
in this file
.
Contributing
Please refer CONTRIBUTING.md for guidelines.
Recommend
-
104
LIGO 和 Virgo 探测到黑洞合并产生的引力波
-
34
-
4
How The LIGO Observatory Detects Gravitational Waves Gravity is one of the more obvious forces in the universe, generally regarded as easily noticeable by the way apples fall from trees. However, the...
-
6
Powerful Scheme based lisp interpreter in JavaScript Powerful Sch...
-
5
Keith Thorne, Engineer At LIGO, To Deliver Remoticon Keynote It is my pleasure to announce that Keith Thorne has graciously agreed to deliver a keynote take at Hackaday Remoticon 2.
-
4
Abstract Gravitational waves from binary black hole and neutron star mergers are being regularly detected. As of 2021, ninety confident gravitational wave detections have been made by the LIGO and Virgo detectors. Work is ongoing...
-
6
Abstract The field of gravitational-wave astronomy has been opened up by gravitational-wave observations made with interferometric detectors. This review surveys the current state-of-the-art in gravitational-wave detectors and da...
-
4
LIGO resumes work in 2023 with gravitational wave upgrades
-
3
Gravitational-wave detector LIGO is back — and can now spot more colliding black holes than ever The twi...
-
5
Gravitational-Wave Detector LIGO Is Back Slashdot is powered by your submissions
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK