vonuvoli Scheme -- 一个以 Rust 编写的 R7RS 解释器,专注于系统编程和脚本编写(即进程、文件系统等),具有高性能和安全性
vonuvoli Scheme -- 一个以 Rust 编写的 R7RS 解释器,专注于系统编程和脚本编写(即进程、文件系统等),具有高性能和安全性
.. image:: ./documentation/assets/github-banner.png
############### vonuvoli Scheme ###############
.. highlights::
Table of contents:
* `Documentation `__
* `Installation `__
* `About `__, `Copyright and licensing `__, `SBOM `__, and `References `__
* `chat on Discord `__, `discuss on GitHub `__, or `email author `__As the about _ says it, vonuvoli is a Scheme_ based programming language implemented in Rust_, which supports most of the R7RS_ standard.
Although the actual usage documentation (API, internals, etc.) is at the moment quite scarce, the about _ section is quite extensive in explaining what vonuvoli Scheme actually is all about, what is the current implementation status, how it differs from other Scheme implementations, and why it is written in Rust.
For the moment the implemented functionality (syntaxes, procedures, etc.) are listed at:
all available functionality _;only R7RS compliant functionality _ (including clear markings for those currently unsupported or unimplemented);.. contents:: :depth: 1 :backlinks: top :local:
.. contents:: :depth: 2 :backlinks: top :local:
vonuvoli is a Scheme R7RS-based programming language with focus on systems programming, extensibility and deployability.
Currently it runs only on UNIX-like operating systems, like Linux / OSX / BSD's / etc. Porting it on Windows should be trivial, but is not currently a priority.
.. epigraph:: A.K.A. That moment when everyone wonders about "another case of not-invented-here-syndrome"?
F.A.Q. Why not reuse existing Scheme implementations? ......................................................
I have investigated reusing Chibi_ (a Scheme R7RS implementation) written in C, however it failed some primary requirements for the intended use-case.
Because many other C-based Scheme implementations seem to have the same issues, I'll quickly list Chibi's shortcomings bellow as highlights of what problems we are trying to avoid:
sexp_gc_var*, sexp_gc_preserve*, sexp_gc_release* which are so easy to miss-use;Granted that Chibi (and other C-based Scheme implementations) are quite performant, feature-full, and more mature.
F.A.Q. Why isn't Python / Ruby / Lua enough? .............................................
Mainly because:
F.A.Q. Aren't there enough Scheme / Lisp? ..........................................
Apparently not. Someone wrote somewhere that in the Scheme / Lisp world the norm is for more implementations per author than authors per implementation. :)
vonuvoli's primary focus areas?..
tar-based deployments (i.e. the runtime deployment should resume to mkdir /.../any-folder && cd /.../any-folder && curl http://.../vonuvoli.tar.gz | tar -xz) and relocatable deployments (i.e. mv /.../old-folder /.../new-folder);reference borrowing rules _ and smart pointers _, and in general favoring correctness over performance;vonuvoli's non-focus areas?..
dmenu or rofi;this report _;).. epigraph:: A.K.A. That section about "what features are currently missing, some of which are quite important and useful, but unfortunately of which 50% will be delayed forever --- unless someone steps-up, or even better pays the authors, to implement them"...
Scheme / Lisp related functionalities:
defmacro-like macros --- like tail recursion is at the top of the TODO list;syntax-rules macros --- still a top TODO task, but much more involved than the simpler defmacro-like counterparts;define-record-type;error and related --- which is a low-hanging fruit in terms of implementation ease;parametrized and related --- similar to error it should be trivial to implement;dynamic-wind and related;define-library and related;eval and related;delay and related;this report _;)Other builtin functionalities:
.. epigraph:: A.K.A. That section about "what features are currently missing, will be missing for the foreseeable future, and of which 100% will never be implemented"...
..
call/cc and related);this report _;)Rust_ is a modern programming language, focusing on performance, safety and systems programming; compiled via LLVM_ into native executables; similar to C/C++ and Go; actively developed by Mozilla and used in many mission-critical tools and software.
Writing the interpreter and builtins in Rust proved to be quite easy (compared to C/C++), most builtins being almost as concise as if written in Scheme.
Moreover given the plethora of Rust libraries available one can easily extend the interpreter with additional builtins.
Simply put:
autoconf-and-company anyone? perhaps CMake?)rpm / apt / brew / latest-craze-package-manager anyone?)enum data-type, which is priceless in writing the interpreter; in C one has to rely on union with an enum discriminator and hope no-one miss-types anything; in C++ one has to rely on dynamic-casts, etc.;NULL), and returning errno-style values (which hopefully are checked and acted upon);NULL-pointer segmentation faults, double free's, \0-terminated strings, uninitialized pointers, header files? have I missed something?No tie-breaking advantage / disadvantage over Rust for this use-case.
Have I mentioned yet Rust's proper generics, proper macro system, enum data-type, proper dependency management, and native performance?
vonuvoli stand for?Nothing. It's just a made-up word that has the following properties:
0 exact matches, and only a 10 "similar word" results;.. contents:: :depth: 2 :backlinks: top :local:
vonuvoli Scheme interpreterUnfortunately currently there is no documentation about the interpreter invocation. Basically the interpreter takes a proper Scheme source file and executes it.
However at the moment it doesn't support any flags, therefore its invocation is quite simple:
::
vonuvoli-scheme-interpreter /.../script.ssFor example, executing all benchmark scripts:
::
find ./examples -type f -name 'benchmark--*.ss' -print -exec ./target/debug/vonuvoli-scheme-interpreter '{}' \;vonuvoli Scheme compilerLike with the interpreter, currently there is no documentation about the compiler invocation.
Basically the compiler takes a proper Scheme source file then compiles it and dumps the resulting Expression.
However, just like with the interpreter, the invocation is quite simple:
::
vonuvoli-scheme-compiler /.../script.ssFor example, compiling all benchmark scripts:
::
find ./examples -type f -name 'benchmark--*.ss' -print -exec ./target/debug/vonuvoli-scheme-compiler '{}' \;vonuvoli Scheme tester and bencherLike with the interpreter, currently there is no documentation about the compiler invocation.
Basically the tester and bencher take a proper Scheme test file and executes it.
(A "test" Scheme file is a simple syntax extension over "plain" Scheme: statement => expected-output.)
However, just like with the interpreter, the invocation is quite simple:
::
vonuvoli-scheme-tester /.../script.sst
vonu暂无开放 Issues,或尚未同步最近议题。