pilisp_native 1.0.0-alpha.13
pilisp_native: ^1.0.0-alpha.13 copied to clipboard
An interpreted Lisp inspired by Clojure. Extension to PiLisp targeting native platform facilities.
PiLisp—An interpreted Lisp inspired by Clojure.
Alpha. Much works, much may change.
The PiLisp Native project is an extension of [core PiLisp][pilisp] that takes advantage of features and packages available only for Dart's native compilation target.
This is the pilisp_native
package on pub.flutter-io.cn.
Features #
See the definitions in the [pilisp_native_pilisp.dart
][pilisp-native-pilisp]
for core PiLisp definitions that are (re)defined in this package.
This is the pilisp
package on pub.flutter-io.cn.
Usage #
- Download a release for standalone CLI usage.
dart pub add pilisp
to add as a library to your Dart project.
For CLI use, download the latest release for your platform and run the pl
executable.
$ pl
pl>
Run the help
command for all options:
$ pl help
Run a PiLisp REPL, or try the subcommands for more options.
Usage: pl <command> [arguments]
Global options:
-h, --help Print this usage information.
Available commands:
eval Evaluate PiLisp code passed as arguments.
load Load PiLisp code saved in files.
repl Start a PiLisp REPL.
Run "pl help <command>" for more information about a command.
For use in your Dart programs, PiLisp.loadString
will read and evaluate
program source:
PiLisp.loadString('(+ 1 2 3 4)');
Additional information #
- TODO PiLisp Language Tour
- PiLisp Core Implementation
- PiLisp Core Tests
- TODO Embedding PiLisp in Dart Programs
- pilisp-native that takes advantage of host facilities (e.g.,
dart:io
) - pilisp-web that compiles to JavaScript targeting the Web
The name "PiLisp" was originally a shortened form of "Piped Lisp," because a
first prototype of this language was developed while building a REPL
for the Shortcut project management
SaaS product that included a rudimentary Lisp whose defining feature was use of
the pipe character |
as an equivalent of Clojure's thread-first macro ->
.
Build #
- Clone this repository
- Run
dart pub get
- Run
./script/compile
Acknowledgements #
Initial implementation of the reader was based on ClojureDart's reader.cljd licensed under the Eclipse Public License (EPL-1.0).
A rewrite of the reader was adapted from dlox's scanner.dart licensed under the MIT License.
Much of PiLisp's implementation (both Dart and PiLisp code) was copied and adapted directly from the Java and Clojure source code in the Clojure project licensed under the Eclipse Public License (EPL-1.0).
License #
Copyright © Daniel Gregoire 2022–2023
Eclipse Public License - v 2.0
THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION
OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.