diff options
author | Pierre Neidhardt <mail@ambrevar.xyz> | 2018-10-05 16:14:30 +0200 |
---|---|---|
committer | Pierre Neidhardt <mail@ambrevar.xyz> | 2018-10-19 17:56:36 +0200 |
commit | 4624d2e2b446d7b2ad663e6cd377314cefe0776d (patch) | |
tree | 0fbbe5e166cf729d1b73e02eddcd1fe313e82978 /gnu | |
parent | 8f065b47c7b8db82544e85fd26c833ef01e0f036 (diff) | |
download | guix-4624d2e2b446d7b2ad663e6cd377314cefe0776d.tar.gz |
gnu: Add parenscript.
* gnu/packages/lisp.scm (cl-parenscript, ecl-parenscript, sbcl-parenscript): New variables.
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/packages/lisp.scm | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm index c83348d902..1315edc39f 100644 --- a/gnu/packages/lisp.scm +++ b/gnu/packages/lisp.scm @@ -3068,3 +3068,63 @@ package.") "The @command{cl-sqlite} package is an interface to the SQLite embedded relational database engine.") (license license:public-domain)))) + +(define-public sbcl-parenscript + (let ((commit "061d8e286c81c3f45c84fb2b11ee7d83f590a8f8")) + (package + (name "sbcl-parenscript") + (version (git-version "2.6" "1" commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://gitlab.common-lisp.net/parenscript/parenscript") + (commit commit))) + (file-name (git-file-name "parenscript" version)) + (sha256 + (base32 + "1kbhgsjbikc73m5cwdp4d4fdafyqcr1b7b630qjrziql0nh6mi3k")))) + (build-system asdf-build-system/sbcl) + (inputs + `(("cl-ppcre" ,sbcl-cl-ppcre) + ("anaphora" ,sbcl-anaphora) + ("named-readtables" ,sbcl-named-readtables))) + (home-page "https://common-lisp.net/project/parenscript/") + (synopsis "Translator from a subset of Common Lisp to JavaScript") + (description + "Parenscript is a translator from an extended subset of Common Lisp to +JavaScript. Parenscript code can run almost identically on both the +browser (as JavaScript) and server (as Common Lisp). + +Parenscript code is treated the same way as Common Lisp code, making the full +power of Lisp macros available for JavaScript. This provides a web +development environment that is unmatched in its ability to reduce code +duplication and provide advanced meta-programming facilities to web +developers. + +At the same time, Parenscript is different from almost all other \"language +X\" to JavaScript translators in that it imposes almost no overhead: + +@itemize +@item No run-time dependencies: Any piece of Parenscript code is runnable +as-is. There are no JavaScript files to include. +@item Native types: Parenscript works entirely with native JavaScript data +types. There are no new types introduced, and object prototypes are not +touched. +@item Native calling convention: Any JavaScript code can be called without the +need for bindings. Likewise, Parenscript can be used to make efficient, +self-contained JavaScript libraries. +@item Readable code: Parenscript generates concise, formatted, idiomatic +JavaScript code. Identifier names are preserved. This enables seamless +debugging in tools like Firebug. +@item Efficiency: Parenscript introduces minimal overhead for advanced Common +Lisp features. The generated code is almost as fast as hand-written +JavaScript. +@end itemize\n") + (license license:bsd-3)))) + +(define-public cl-parenscript + (sbcl-package->cl-source-package sbcl-parenscript)) + +(define-public ecl-parenscript + (sbcl-package->ecl-package sbcl-parenscript)) |