Re: Clojure-in-CommonLisp?

2011-11-16 Thread Konrad Hinsen
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

Re: Clojure-in-CommonLisp?

2011-11-16 Thread Konrad Hinsen
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 wrap

Re: Clojure-in-CommonLisp?

2011-11-16 Thread Konrad Hinsen
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

Re: Overused phrases in the Clojure community

2011-11-16 Thread Colin Yates
I am not sure if the OP was serious or not, but I think the desire to do things idiomatically is just one indicator of the quality of this community. I am encouraged, and challenged to learn how to use Clojure rather than bash Clojure to fit the holes/shapes I think I have. Too many times I see (

clj-time and clojure 1.3

2011-11-16 Thread Brad
Just curious what happened with getwoven and clj-time. It seems that Sean has updated clj-time over on Clojars and this version works fine under 1.3. If you search on clj-time though you get links to a getwoven project. https://github.com/getwoven/clj-time/ with 404s. This is the one I originally

Re: Clojure-in-CommonLisp?

2011-11-16 Thread Alessio Stalla
On 15 Nov, 16:58, Konrad Hinsen 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

adding metadata to java objects

2011-11-16 Thread Ben Mabey
Hi, I would like to be able to add metadata to arbitrary java objects that have already been instantiated. I know that you can use proxy to add metadata to objects that you create but in my case the object already exists (i.e. it is returned from another method call outside of my control). I

Incanter Hack Day, London, Sunday

2011-11-16 Thread Ben Evans
Hi, There is an Incanter Hack Day taking place on Sunday at the Royal Festival Hall in London. We'll be on the 5th floor, Green side. The group will begin turning up at 1000, but feel free to come a bit later if that's too early. We'll go for some lunch somewhere close by on Southbank when everyo

Using clojure.java.shell for long running tasks

2011-11-16 Thread Matthew Boston
How can I get clojure.java.shell/sh to print to stdout while running? Currently, it waits until `sh` returns before I can access :out and println it. (:use clojure.java.shell) (defn call-maven [& args] (apply sh "mvn" args)) (defn maven-version [] (-> "-v" call-maven :out println)) Thanks f

Re: adding metadata to java objects

2011-11-16 Thread Ben Smith-Mannschott
On Wed, Nov 16, 2011 at 17:28, Ben Mabey wrote: > Hi, > I would like to be able to add metadata to arbitrary java objects that have > already been instantiated.  I know that you can use proxy to add metadata to > objects that you create but in my case the object already exists (i.e. it is > return

Re: Using clojure.java.shell for long running tasks

2011-11-16 Thread Phil Hagelberg
On Wed, Nov 16, 2011 at 11:48 AM, Matthew Boston wrote: > How can I get clojure.java.shell/sh to print to stdout while running? > Currently, it waits until `sh` returns before I can access :out and > println it. I actually had to stop using clojure.java.shell/sh for this and just used Runtime/exe

start-process-shell-command: Spawning child process: invalid argument

2011-11-16 Thread Andrew
Having trouble setting up Clojure/Emacs on Windows again. Earlier Mark Rathwell helped meby pointing out a recipe for Windows

Re: adding metadata to java objects

2011-11-16 Thread Alan Malloy
On Nov 16, 11:53 am, Ben Smith-Mannschott wrote: > On Wed, Nov 16, 2011 at 17:28, Ben Mabey wrote: > > Hi, > > I would like to be able to add metadata to arbitrary java objects that have > > already been instantiated.  I know that you can use proxy to add metadata to > > objects that you create b

Re: Using clojure.java.shell for long running tasks

2011-11-16 Thread Matthew Boston
Thanks, Phil. Works like a charm! BTW, I'm working on the lein-mvn plugin which allows the use of maven plugins inside leiningen projects. On Nov 16, 2:53 pm, Phil Hagelberg wrote: > On Wed, Nov 16, 2011 at 11:48 AM, Matthew Boston > > wrote: > > How can I get clojure.java.shell/sh to print to

Re: Using clojure.java.shell for long running tasks

2011-11-16 Thread Phil Hagelberg
On Wed, Nov 16, 2011 at 1:59 PM, Matthew Boston wrote: > Thanks, Phil. Works like a charm! > > BTW, I'm working on the lein-mvn plugin which allows the use of maven > plugins inside leiningen projects. Great; looking forward to it! -Phil -- You received this message because you are subscribed

Re: Incanter Hack Day, London, Sunday

2011-11-16 Thread Bruce Durling
Looking forward to it. I'll be there. On Wed, Nov 16, 2011 at 18:39, Ben Evans wrote: > Hi, > > There is an Incanter Hack Day taking place on Sunday at the Royal > Festival Hall in London. We'll be on the 5th floor, Green side. -- You received this message because you are subscribed to the Goog

Re: Using clojure.java.shell for long running tasks

2011-11-16 Thread Hugo Duncan
I took a slightly different approach to this, in pallet.shell, and added an :async flag that returns the streams and the process https://github.com/pallet/pallet/blob/master/src/pallet/shell.clj -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post

Re: Overused phrases in the Clojure community

2011-11-16 Thread Paul Dorman
While I hope this thread dies a quick death, I'd like to offer the words 'properly' and 'well' as sometimes effective substitutes for 'idiomatically'. I am always interested in understanding how programming challenges can be addressed idiomatically, properly, and well, though I'm unlikely to have a

Re: start-process-shell-command: Spawning child process: invalid argument

2011-11-16 Thread Mark Rathwell
Andrew, I don't have access to a Windows machine at the moment, but sidestepping clojure-jack-in for a minute, does using 'lein swank' and M-x slime-connect work? (in an eshell buffer that is in the project directory, run 'lein swank', that should start a swank server on port 4005, then M-x slime

Re: Overused phrases in the Clojure community

2011-11-16 Thread Mark Hamstra
"Clojed-form" implementations (vs. "cludged-form") is probably too cute by half -- 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

Re: Overused phrases in the Clojure community

2011-11-16 Thread Carl Cotner
In general, I agree that it's annoying to continue seeing certain words used over and over. But the use of the word "idiomatic" in particular seems to be very idiomatic in the Clojure community, so I don't mind it. :-) On Tue, Nov 15, 2011 at 8:16 PM, thenwithexpandedwingshesteershisflight < mat

Non Dev Builds

2011-11-16 Thread Andres Gomez
Inspired by Hickey's keynote at the conj, I built a proof of concept for a program to make non dev builds (remove comments, docstrings, line breaks) https://github.com/fractalmedia/prod-build It is very simple, its most important function is: (defn read-file [name] (eval (read-string (str "'(" (s

Clojure on PyPy

2011-11-16 Thread Dax Fohl
Would Clojure have anything to gain by having something like PyPy's JIT-generator create a custom JIT for it, a'la http://morepypy.blogspot.com/2011/04/tutorial-part-2-adding-jit.html? Or does the JVM already do the stuff that is mentioned in that article? (Or does none of that stuff apply to Cloj

Re: Clojure-in-CommonLisp?

2011-11-16 Thread NGUYEN Vu Ngoc Tung
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

Re: Non Dev Builds

2011-11-16 Thread Meikel Brandmeyer
Hi, Am 16.11.2011 um 17:17 schrieb Andres Gomez: > It is very simple, its most important function is: (defn read-file > [name] (eval (read-string (str "'(" (slurp name) ")" As a minor nitpick to promote robust code… Please use something like this for reading: (let [eof (Object.)] (take-whi

Re: swank, clojure.repl and my fading sanity

2011-11-16 Thread Matthew Boston
Hey, that looks eerily similar to my gist! :) https://gist.github.com/1324048 On Nov 15, 2:06 am, Sean Corfield wrote: > Add the following to your ~/.lein/user.clj: > > ;; ~/.lein/user.clj > (if (>= (.compareTo (clojure-version) "1.3.0") 0) >   (do (use 'clojure.repl) >       (use 'clojure.java.

Re: Clojure on PyPy

2011-11-16 Thread Brent Millare
The JVM is an advanced, mature JIT compiler. PyPy's generated JIT compilers are not as mature. As a result, the JVM does many of the things in the article and more. From what I see, the benefits of Clojure targetting PyPy would be exploring the performance advantages of very experimental work.

Re: Overused phrases in the Clojure community

2011-11-16 Thread Larry Johnson
On Tue, Nov 15, 2011 at 11:05 PM, Carl Cotner wrote: > In general, I agree that it's annoying to continue seeing certain words > used over and over. But the use of the word "idiomatic" in particularseems to > be very idiomatic in the Clojure community, so I don't mind it. > > :-) > > > On Tue, N

Re: swank, clojure.repl and my fading sanity

2011-11-16 Thread Sean Corfield
On Wed, Nov 16, 2011 at 3:57 PM, Matthew Boston wrote: > Hey, that looks eerily similar to my gist! :) https://twitter.com/#!/seancorfield/status/130136793210298368 Yup, again, thank you! -- Sean A Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org/ World Singles, LLC. -- htt

Re: clj-time and clojure 1.3

2011-11-16 Thread Sean Corfield
On Wed, Nov 16, 2011 at 6:47 AM, Brad wrote: > Just curious what happened with getwoven and clj-time. > > It seems that Sean has updated clj-time over on Clojars and this > version works fine under 1.3. I have taken over clj-time from Mark McGranahan: https://github.com/seancorfield/clj-time (a

Re: start-process-shell-command: Spawning child process: invalid argument

2011-11-16 Thread Andrew
The attempt revealed the need to install the slime package. After that, the two commands succeed. However, M-x clojure-jack-in still fails in a fresh emacs session with the same error. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this

Re: Clojure on PyPy

2011-11-16 Thread Timothy Baldridge
I actually started on this at one point. I ended up scrapping the project for several reasons. But first, I think we must clarify what we mean by "runs on pypy". There's two ways of attacking such a project: 1) writing a Clojure interpreter in RPython, and then having PyPy generate a JIT for you.

Re: start-process-shell-command: Spawning child process: invalid argument

2011-11-16 Thread Mark Rathwell
I think there is some path issue in your setup between Cygwin and Windows that will take some work to diagnose. You might try installing everything from scratch, or maybe try a Linux vm with VirtualBox (free) or VMWare. Either way, you can use lein swank and slime-connect in the meantime. On Wed

Re: Non Dev Builds

2011-11-16 Thread Andres Gomez
Thanks for the robustness tip, Meikel. Just a question, i dont understand what you state, i dont think it needs to end in a newline in order to work. On Nov 16, 5:17 pm, Meikel Brandmeyer wrote: > Hi, > > Am 16.11.2011 um 17:17 schrieb Andres Gomez: > > > It is very simple, its most important fu

Re: adding metadata to java objects

2011-11-16 Thread Ben Smith-Mannschott
On Wed, Nov 16, 2011 at 22:32, Alan Malloy wrote: > On Nov 16, 11:53 am, Ben Smith-Mannschott > wrote: >> On Wed, Nov 16, 2011 at 17:28, Ben Mabey wrote: >> > Hi, >> > I would like to be able to add metadata to arbitrary java objects that have >> > already been instantiated.  I know that you can

Re: Non Dev Builds

2011-11-16 Thread Ben Smith-Mannschott
== FILE == (def x 1) ; my comment == (str "'(" (slurp "FILE") ")" ) produces: == '((def x 1) ; my comment) == oops. On Thu, Nov 17, 2011 at 05:32, Andres Gomez wrote: > Thanks for the robustness tip, Meikel. > > Just a question, i dont understand what you state, i dont think it > needs to

Re: Non Dev Builds

2011-11-16 Thread Meikel Brandmeyer (kotarak)
Hi, Consider this file. The * marks the not there \n. Foo ; Bar* And slurp and the str call, you get a string which looks like this "(Foo\n;Bar)". And this gives an error because the closing ) is in the comment. Here you see the effect: user=> (with-open [w (writer "x")] (binding [*out* w] (