Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/idorobots/cl-goodies
A heretical attempt at bringing some of the Lisp goodies to D. Greenspun's tenth rule included!
https://github.com/idorobots/cl-goodies
algorithms common-lisp d
Last synced: 3 days ago
JSON representation
A heretical attempt at bringing some of the Lisp goodies to D. Greenspun's tenth rule included!
- Host: GitHub
- URL: https://github.com/idorobots/cl-goodies
- Owner: Idorobots
- Created: 2012-07-17T06:37:37.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2012-08-24T21:27:06.000Z (about 12 years ago)
- Last Synced: 2024-10-11T01:18:55.956Z (25 days ago)
- Topics: algorithms, common-lisp, d
- Language: D
- Size: 668 KB
- Stars: 0
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.org
Awesome Lists containing this project
README
* CL goodies
My heretical fun with D's CTFE...How to get CL goodies:
: $ git clone https://github.com/Idorobots/cl-goodies cl-goodies
: $ cd cl-goodies
: $ git submodule init
: $ git submodule update
: $ makeContents:
** cl.loop
An implementation of Common Lisp' [[http://www.gigamonkeys.com/book/loop-for-black-belts.html][LOOP macro]] using [[https://github.com/PhilippeSigaud/Pegged][Pegged]].
Example usage:: import std.stdio;
: import cl.loop;
:
: void main(string[] args) {
: mixin(Loop!q{
: for arg in args
: print "Hello ", arg, "!"
: });
:
: auto result = mixin(Loope!q{
: for i from 0 to 50
: when $$ i & 1 $$
: collect i
: });
: writeln(result);
: }Prints:
: $ ./loop Common Lisp
: Hello ./loop!
: Hello Common!
: Hello Lisp!
: [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49]** cl.quote
A stub of Lisp-eque quasiquote. WIP** Stuff possibly comming in the future:
- *cl.format* - an implementation of Common Lisp' FORMAT macro.
- *cl.html* - a bunch of classic convinience macros for outputting HTML.