Calling Clojure from ABCL

It may be completely useless, but its funny:

$ rlwrap java -cp $CLASSPATH org.armedbear.lisp.Main "$@"
Armed Bear Common Lisp 0.13.0-dev
Java 1.6.0_10 Sun Microsystems Inc.
Java HotSpot(TM) Client VM
Low-level initialization completed in 1.023 seconds.
Startup completed in 3.284 seconds.
Type ":help" for a list of available commands.
CL-USER(1): (jstatic "main" "clojure.lang.Repl" (jnew-array-from-array "java.lang.String" (make-array 0)))
Clojure
user=> (import '(org.armedbear.lisp Main))
nil
user=> (. org.armedbear.lisp.Main main (make-array java.lang.String 0))
nil
user=>

For some reason, calling the ABCL-Repl from inside the Clojure-Repl, being inside the ABCL-Repl, doesnt work. Maybe I did something wrong. The other way around:

$ rlwrap java -cp $CLASSPATH clojure.main
Clojure
user=> (import '(org.armedbear.lisp Main))
nil
user=> (. org.armedbear.lisp.Main main (make-array java.lang.String 0))
nil
user=> Armed Bear Common Lisp 0.13.0-dev
Java 1.6.0_10 Sun Microsystems Inc.
Java HotSpot(TM) Client VM
Low-level initialization completed in 5.277 seconds.

Startup completed in 7.55 seconds.
Type ":help" for a list of available commands.
CL-USER(1): (jstatic "main" "clojure.lang.Repl"
  (jnew-array-from-array "java.lang.String" (make-array 0)))
Clojure
user=>

Strange, but works…

Eine Antwort zu Calling Clojure from ABCL

Schreibe einen Kommentar

Trage deine Daten unten ein oder klicke ein Icon um dich einzuloggen:

WordPress.com-Logo

Du kommentierst mit Deinem WordPress.com-Konto. Abmelden / Ändern )

Twitter-Bild

Du kommentierst mit Deinem Twitter-Konto. Abmelden / Ändern )

Facebook-Foto

Du kommentierst mit Deinem Facebook-Konto. Abmelden / Ändern )

Google+ Foto

Du kommentierst mit Deinem Google+-Konto. Abmelden / Ändern )

Verbinde mit %s

%d Bloggern gefällt das: