Re: Clojure-in-CommonLisp?
On 15 nov. 2011, at 17:00, David Nolen wrote: Integrating with C / C++ is also possible with ClojureScript + (V8 or Node.js) as well. I never looked at those options. Is it possible to manipulate C/C++ data directly from ClojureScript, without bulky wrapper objects? That's what I care most about. I'd have to be able to iterate over a huge C array (say, 500 MB of floats) without converting that array to some high-level sequence object first, and ideally feeding each float to a Clojure function compiled to something that processes C floats, rather than converting each float to some high-level object. Konrad. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Clojure-in-CommonLisp?
On 15 nov. 2011, at 18:21, Marshall T. Vandegrift wrote: Integrating the JVM with C via JNA [1] is pretty straightforward. I've been doing all my JNA glue in Java so far because JNA depends on a few features which aren't available / convenient use in Clojure [2], but a decent Clojure wrapper API probably wouldn't be too difficult. It's not too hard for the programmer, but 1) it is often impossible to avoid copying data and 2) deployment for the user becomes much more difficult than pure JVM or pure native code. Konrad. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Clojure-in-CommonLisp?
On 15 nov. 2011, at 17:17, Roy Lowrance wrote: What not create a C implementation in which the hosted language is dynamic link libraries? Fine with me, but that sounds like a huge effort. Konrad. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Clojure-in-CommonLisp?
On 15 Nov, 16:58, Konrad Hinsen googlegro...@khinsen.fastmail.net wrote: On 15 Nov, 2011, at 15:46 , Doug South wrote: I know a little CL and even less of Clojure, but wouldn't Clojure in CL be fairly trivial? Just a DSL in CL? All of Clojure's persistent data structures would have to be implemented in CL. Plus multimethods, protocols, and deftype, which are a bit different from their closest equivalents in CL. For some of the data structures, it might be possible to leverage the FSet library by Scott Burson, which provides persistent seqs, sets, and maps. The closest way to multimethods requires hacking the CLOS implementation, but in my opinion it's not hard to do (I know I'll write a blog post someday about my thoughts on this...), though maintaining all the caches that are in effect for class-based dispatch is not feasible in general for other types of dispatch. Certainly, though, this would step out of portable Common Lisp. The alternative is to effectively reimplement a part of CLOS in an incompatible way... Protocols and deftype I do not know... also there's the issue of arithmetic in 1.3+ which has different semantics than CL, different calling conventions... it would be more than just a DSL over CL, I fear. Alessio -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Clojure-in-CommonLisp?
http://riddell.us/ClojureWithEmacsSlimeSwankOnUbuntu.html -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Clojure-in-CommonLisp?
I haven't dealt with CL in quite a while, but there is this (which I was involved with in my undergrad at CofC): http://clforjava.org/ CLforJava may be helpful since it is, a totally new version of the Common Lisp language that runs on the Java Virtual Machine and is intertwined with the Java language in such a way that users of Lisp can directly access Java libraries and vice versa. Sounds familliar? :) Clojure - Java - CLforJava -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Clojure-in-CommonLisp?
On 15 Nov, 2011, at 6:51 , Cyrus Harmon wrote: I've been wanting this for some time. Obviously the java interop stuff poses challenges, but the clojure data types, protocols, immutable objects, clojure syntax, etc... would make for a nice dialect of lisp to be used alongside other CL code. (I guess I'm in the small minority of folks that is much more interested in interacting with existing Common Lisp code than with existing Java libraries.) That may be a minority, but an implementation based on Common Lisp could also open the way to an integration with the world of C, via a Common Lisp implementation with a decent C interface. Konrad. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Clojure-in-CommonLisp?
With my limited theoretical understanding of Clojure, I would expect the language to interop with the platform it was implemented on. Therefore I would expect Clojure in CL to interop with CL and not the JVM. I know a little CL and even less of Clojure, but wouldn't Clojure in CL be fairly trivial? Just a DSL in CL? Sent from my iPhone On 15/11/2011, at 12:51 AM, Cyrus Harmon cyrushar...@gmail.com wrote: Tim, I've been wanting this for some time. Obviously the java interop stuff poses challenges, but the clojure data types, protocols, immutable objects, clojure syntax, etc... would make for a nice dialect of lisp to be used alongside other CL code. (I guess I'm in the small minority of folks that is much more interested in interacting with existing Common Lisp code than with existing Java libraries.) Cyrus On Nov 14, 2011, at 4:18 PM, daly wrote: It seems to me that a Clojure in Common Lisp might be the easiest non-JVM port. It would be a DSL within Common Lisp. A CL implementation would even allow rewriting the normal COND syntax. Is there an obvious reason why this would be a bad idea? Heck, it might even be possible to make the port literate :-) Tim Daly -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Clojure-in-CommonLisp?
On Tue, Nov 15, 2011 at 4:53 AM, Konrad Hinsen googlegro...@khinsen.fastmail.net wrote: On 15 Nov, 2011, at 6:51 , Cyrus Harmon wrote: I've been wanting this for some time. Obviously the java interop stuff poses challenges, but the clojure data types, protocols, immutable objects, clojure syntax, etc... would make for a nice dialect of lisp to be used alongside other CL code. (I guess I'm in the small minority of folks that is much more interested in interacting with existing Common Lisp code than with existing Java libraries.) That may be a minority, but an implementation based on Common Lisp could also open the way to an integration with the world of C, via a Common Lisp implementation with a decent C interface. Konrad. Integrating with C / C++ is also possible with ClojureScript + (V8 or Node.js) as well. David -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Clojure-in-CommonLisp?
There's also ABCL, the Common Lisp implementation that maintains the inalienable right to arm bears, written in Java and supporting interop between both Java and Lisp. http://common-lisp.net/project/armedbear/doc/abcl-user.html On 11/15/2011 09:13 AM, Dennis Crenshaw wrote: I haven't dealt with CL in quite a while, but there is this (which I was involved with in my undergrad at CofC): http://clforjava.org/ CLforJava may be helpful since it is, a totally new version of the Common Lisp language that runs on the Java Virtual Machine and is intertwined with the Java language in such a way that users of Lisp can directly access Java libraries and vice versa. Sounds familliar? :) Clojure - Java - CLforJava -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Clojure-in-CommonLisp?
Konrad Hinsen googlegro...@khinsen.fastmail.net writes: That may be a minority, but an implementation based on Common Lisp could also open the way to an integration with the world of C, via a Common Lisp implementation with a decent C interface. Integrating the JVM with C via JNA [1] is pretty straightforward. I've been doing all my JNA glue in Java so far because JNA depends on a few features which aren't available / convenient use in Clojure [2], but a decent Clojure wrapper API probably wouldn't be too difficult. [1] https://github.com/twall/jna [2] Structures involve definition of concrete types inheriting from other concrete types; direct method mapping requires tagging methods as `native' and providing a class-level static initializer. -Marshall -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Clojure-in-CommonLisp?
Right, but what I have in mind is clojure-sitting-on-top-of-SBCL so that one can (with a suitable reimplementation thereof) use clojure's persistent data structures, protocols, deftype, etc... on top of a (somewhat more traditional?) native code-generating backend like SBCL's. There's a lot of machinery in there that solves problems that the JVM solves (in completely different ways, of course). One approach is the clojure-as-DSL such that this could work on any suitable CL system. An alternative approach would be to hack SBCL's compiler directly such that we're using the SBCL runtime and code generation bits more directly. This would be a lot of work, but might be interesting if the resulting product could have natively-compiled CL and clojure playing nicely with each other. Just a thought... Cyrus On Nov 15, 2011, at 9:09 AM, Nate Young wrote: There's also ABCL, the Common Lisp implementation that maintains the inalienable right to arm bears, written in Java and supporting interop between both Java and Lisp. http://common-lisp.net/project/armedbear/doc/abcl-user.html On 11/15/2011 09:13 AM, Dennis Crenshaw wrote: I haven't dealt with CL in quite a while, but there is this (which I was involved with in my undergrad at CofC): http://clforjava.org/ CLforJava may be helpful since it is, a totally new version of the Common Lisp language that runs on the Java Virtual Machine and is intertwined with the Java language in such a way that users of Lisp can directly access Java libraries and vice versa. Sounds familliar? :) Clojure - Java - CLforJava -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Clojure-in-CommonLisp?
FYI: https://github.com/bagucode/clj-native uses bytecode generation to create the glue classes on the fly. On Tue, Nov 15, 2011 at 12:21 PM, Marshall T. Vandegrift llas...@gmail.comwrote: Integrating the JVM with C via JNA [1] is pretty straightforward. I've been doing all my JNA glue in Java so far because JNA depends on a few features which aren't available / convenient use in Clojure [2], but a decent Clojure wrapper API probably wouldn't be too difficult. [1] https://github.com/twall/jna [2] Structures involve definition of concrete types inheriting from other concrete types; direct method mapping requires tagging methods as `native' and providing a class-level static initializer. -Marshall -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Clojure-in-CommonLisp?
Another option for JNA is: https://github.com/chouser/clojure-jna On Nov 15, 2011, at 9:34 AM, Aaron Cohen aa...@assonance.org wrote: FYI: https://github.com/bagucode/clj-native uses bytecode generation to create the glue classes on the fly. On Tue, Nov 15, 2011 at 12:21 PM, Marshall T. Vandegrift llas...@gmail.com wrote: Integrating the JVM with C via JNA [1] is pretty straightforward. I've been doing all my JNA glue in Java so far because JNA depends on a few features which aren't available / convenient use in Clojure [2], but a decent Clojure wrapper API probably wouldn't be too difficult. [1] https://github.com/twall/jna [2] Structures involve definition of concrete types inheriting from other concrete types; direct method mapping requires tagging methods as `native' and providing a class-level static initializer. -Marshall -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Clojure-in-CommonLisp?
What not create a C implementation in which the hosted language is dynamic link libraries? Roy On Tue, Nov 15, 2011 at 4:53 AM, Konrad Hinsen googlegro...@khinsen.fastmail.net wrote: On 15 Nov, 2011, at 6:51 , Cyrus Harmon wrote: I've been wanting this for some time. Obviously the java interop stuff poses challenges, but the clojure data types, protocols, immutable objects, clojure syntax, etc... would make for a nice dialect of lisp to be used alongside other CL code. (I guess I'm in the small minority of folks that is much more interested in interacting with existing Common Lisp code than with existing Java libraries.) That may be a minority, but an implementation based on Common Lisp could also open the way to an integration with the world of C, via a Common Lisp implementation with a decent C interface. Konrad. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -- Roy Lowrance tel: 347 255 2544 -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Clojure-in-CommonLisp?
On Mon, Nov 14, 2011 at 4:18 PM, daly d...@axiom-developer.org wrote: It seems to me that a Clojure in Common Lisp might be the easiest non-JVM port. It would be a DSL within Common Lisp. A CL implementation would even allow rewriting the normal COND syntax. Is there an obvious reason why this would be a bad idea? The biggest problem I can see is that if you do this I will be tempted to port it to Emacs Lisp as well, the thought of which is slightly disturbing. -Phil -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Clojure-in-CommonLisp?
On Mon, 2011-11-14 at 16:26 -0800, Phil Hagelberg wrote: On Mon, Nov 14, 2011 at 4:18 PM, daly d...@axiom-developer.org wrote: It seems to me that a Clojure in Common Lisp might be the easiest non-JVM port. It would be a DSL within Common Lisp. A CL implementation would even allow rewriting the normal COND syntax. Is there an obvious reason why this would be a bad idea? The biggest problem I can see is that if you do this I will be tempted to port it to Emacs Lisp as well, the thought of which is slightly disturbing. -Phil I knocked together a REPL in its own package. Is there a spec somewhere of the exact syntax accepted by the Clojure reader? Tim Daly -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Clojure-in-CommonLisp?
Tim, I've been wanting this for some time. Obviously the java interop stuff poses challenges, but the clojure data types, protocols, immutable objects, clojure syntax, etc... would make for a nice dialect of lisp to be used alongside other CL code. (I guess I'm in the small minority of folks that is much more interested in interacting with existing Common Lisp code than with existing Java libraries.) Cyrus On Nov 14, 2011, at 4:18 PM, daly wrote: It seems to me that a Clojure in Common Lisp might be the easiest non-JVM port. It would be a DSL within Common Lisp. A CL implementation would even allow rewriting the normal COND syntax. Is there an obvious reason why this would be a bad idea? Heck, it might even be possible to make the port literate :-) Tim Daly -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en