Thursday , April 22 2021

ruricolist / cloture, Hacker News



Cloture is an implementation of Clojure in Common Lisp. It is designed above all to interoperate well with Common Lisp; Clojure is read by the Lisp reader and Clojure namespaces are Lisp packages.

Cloture is in very early (pre-alpha) stages, but it has progressed far enough to load a (lightly edited) version of clojure.test , allowing the test suite to actually be written in Clojure.

Work so far has been focused on the critical path to get real Clojure code working in CL. But if there is interest from Clojurists I may work toward making it a more complete Clojure implementation.

FSet seqs, maps, and sets to implement Clojure vectors, maps, and sets, respectively. This involves a few hacks to FSet that might possibly affect other programs using FSet.

Starting a REPL

Use .

Note that not much work has been done yet on Clojure-style printing, so the “Print” in REPL is still mostly the Common Lisp printer.

Using Clojure from Lisp

The design goal of Cloture is to keep things as close to Common Lisp as possible: Clojure is read by the Lisp reader and Clojure namespaces are just packages. But of course Clojure is case sensitive, so you will need to use pipe characters to call, for example, | clojure.core | : | cons |

Lisp’s nil is used only as the empty list; Clojure nil, true, and false are singletons. Use cloture: truthy? with Clojure predicates.

Clojure files can be integrated into Lisp systems by making the system definition depend on Cloture (: defsystem -depends-on (“cloture”)

  Using Lisp from Clojure  

Since Clojure uses the Lisp reader, you can call Lisp functions just by uppercasing them.




Reader conditionals

In reader conditionals in . Cljc (files) and at the REPL), Cloture looks for a : cl



Why “Cloture”?

cloture is a parliamentary procedure to end debate on a subject, and I would like to end certain debates. Yes, Common Lisp is “modern.” Yes, Clojure is a Lisp.

(Read More )

About admin

Leave a Reply

Your email address will not be published. Required fields are marked *