Aw: Re: eval and load-string behavior

2011-06-21 Thread Meikel Brandmeyer
Hi, note that this breaks down as soon as you don't provide a literal string. And if you provide a literal string, you can provide the form directly anyway... Sincerely Meikel -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group,

Re: Generating API docs for clojure 1.3 projects

2011-06-21 Thread Tassilo Horn
Tom Faulhaber writes: Hi Tom, > Autodoc is usually the tool you want, I think. I'm the author of that > tool and I've been very busy on other stuff lately, so I haven't but > together a 1.3 release. That would be awesome. > I'll try to get to that pretty soon so that you'll have something to >

Re: porting an old project - where to begin?

2011-06-21 Thread Daniel
https://gist.github.com/1008742 This is a poor solution to the panning problem. I think that once I demonstrate this with multiple cards and translucent select boxes I'll be ready to drop processing. On Jun 21, 1:16 am, Daniel wrote: > http://forum.processing.org/topic/fix-my-program#2508

Re: Screencast: Clojure + Emacs + slime + swank + cake + Overtone

2011-06-21 Thread Lee Spector
On Jun 16, 2011, at 11:16 AM, Sam Aaron wrote: > I just finished making a screencast primarily for new Overtone users on how > to get set up with Emacs as a primary editor: > > http://vimeo.com/25190186 > > It turns out that this should be pretty useful for Clojure hackers in general > as it's

Re: cannot use swig native shared libraries

2011-06-21 Thread Aaron Cohen
Sorry to perform thread necromancy, but I believe that this problem is the same that I found a workaround for in a recent thread, and would love if you could confirm that a similar solution fixes this for you? The thread is: https://groups.google.com/d/topic/clojure/br_sTSuWBJ8/discussion For me,

Re: Aw: Re: How to convert a VTK example from java to clojure?

2011-06-21 Thread Antonio Recio
Aaron Cohen, thank you! It works !!! -- 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

Re: Generating API docs for clojure 1.3 projects

2011-06-21 Thread Tom Faulhaber
Hi Tassilo, Autodoc is usually the tool you want, I think. I'm the author of that tool and I've been very busy on other stuff lately, so I haven't but together a 1.3 release. I'll try to get to that pretty soon so that you'll have something to use. I don't know why one you built should fail, but

Re: Aw: Re: How to convert a VTK example from java to clojure?

2011-06-21 Thread Aaron Cohen
On Tue, Jun 21, 2011 at 8:00 PM, Antonio Recio wrote: > I have tried to use wall-hack-method but I still obtain the > error: UnsatisfiedLinkError vtk.vtkConeSource.VTKInit()J >  vtk.vtkConeSource.VTKInit (vtkConeSource.java:-2). What I am doing wrong? > (ns project.core >   (:import (javax.swing J

Re: Aw: Re: How to convert a VTK example from java to clojure?

2011-06-21 Thread Antonio Recio
I have tried to use wall-hack-method but I still obtain the error: UnsatisfiedLinkError vtk.vtkConeSource.VTKInit()J vtk.vtkConeSource.VTKInit (vtkConeSource.java:-2). What I am doing wrong? (ns project.core (:import (javax.swing JButton JFrame JPanel) (vtk vtkConeSource vtkPolyDat

Re: eval and load-string behavior

2011-06-21 Thread David Nolen
If Clojure was interpreted this behavior would be simple to support. It seems like you'd have to complicate the compiler for little benefit. On Tuesday, June 21, 2011, Jonathan Fischer Friberg wrote: > Thanks, but I think I'll simply input the let in the string, i.e > > (load-string "(let [a (fn

Re: eval and load-string behavior

2011-06-21 Thread Jonathan Fischer Friberg
It seems like the following macro would work as well: (defmacro load-string-here [string] (read-string string)) => (let [a (fn [] "inside fn")] (load-string-here "(a)")) "inside fn" Jonathan On Tue, Jun 21, 2011 at 12:51 PM, Jonathan Fischer Friberg < odysso...@gmail.com> wrote: > Thanks, but

Re: Aw: Re: How to convert a VTK example from java to clojure?

2011-06-21 Thread Aaron Cohen
OK, I've gotten it working on my computer, and it turns out to be a slightly complicated problem. What is happening is that the vtk java files and your clojure code are using different classloaders (clojure uses its own classloader). System/loadLibrary is kind of crippled in that it always loads

Re: Aw: Re: How to convert a VTK example from java to clojure?

2011-06-21 Thread Antonio Recio
All the vtk libraries that I need are in /usr/local/lib/vtk-5.9/ and are executable. Java and c++ examples work fine. -- 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 n

Re: hammock driven development...

2011-06-21 Thread James Keats
On Jun 21, 6:54 pm, miner wrote: > Here's some more support for the hammock: > > http://www.npr.org/blogs/health/2011/06/20/137300311/why-hammocks-mak... > If this is going to be anything like those ambient orbs, then I better hurry up and invest in hammocks. -- You received this message bec

Re: hammock driven development...

2011-06-21 Thread miner
Here's some more support for the hammock: http://www.npr.org/blogs/health/2011/06/20/137300311/why-hammocks-make-sleep-easier-deeper > Rocking increased the length of N2 sleep, a form of non-REM sleep that takes > up about half of a good night's rest. It also increased slow oscillations and > "

Re: Aw: Re: How to convert a VTK example from java to clojure?

2011-06-21 Thread Aaron Cohen
On Tue, Jun 21, 2011 at 12:38 PM, Antonio Recio wrote: > java -Djava.library.path=/usr/local/lib/vtk-5.9/ This is the directory that contains: libvtkCommonJava.so, libvtkFilteringJava.so, libvtkIOJava.so, libvtkImagingJava.so, libvtkGraphicsJava.so, and libvtkRenderingJava.so ? They all are exec

Re: Aw: Re: How to convert a VTK example from java to clojure?

2011-06-21 Thread Antonio Recio
java -Djava.library.path=/usr/local/lib/vtk-5.9/ -cp /usr/share/java/clojure.jar:/usr/local/lib/vtk-5.9/java/vtk.jar clojure.main main.clj Exception in thread "main" java.lang.RuntimeException: java.lang.UnsatisfiedLinkError: vtk.vtkConeSource.VTKInit()J at clojure.lang.Util.runtimeExce

Re: Aw: Re: How to convert a VTK example from java to clojure?

2011-06-21 Thread Aaron Cohen
Your LD_LIBRARY_PATH is quite extensive there, is that all required or is this just a bunch of stuff you've been trying? I usually just use -Djava.library.path=. On linux you also may have to be sure that your shared libraries are +x for your user. --Aaron On Tue, Jun 21, 2011 at 12:17 PM, Anton

Re: Aw: Re: How to convert a VTK example from java to clojure?

2011-06-21 Thread Antonio Recio
Aaron, thanks. You are right I had forgotten the vtk.jar, but I still obtain errors: *My /usr/local/bin/clojure:* #!/bin/sh export JAVA_HOME=/usr/lib/jvm/java-6-sun/ export LD_LIBRARY_PATH=/usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/amd64/:/usr/local/lib/:/usr/local/lib/vtk-5.9/:/usr/local/lib/cma

Re: Integrating jline

2011-06-21 Thread octopusgrabbus
Had a bad jar and the wrong version. It works now. Thanks. On Jun 21, 10:49 am, ".Bill Smith" wrote: > Just to be sure, have you checked that jline. is defined in > /usr/share/java/jline-0_9_5.jar? > ConsoleRunner -- You received this message because you are subscribed to the Google Groups "Clo

Re: Aw: Re: How to convert a VTK example from java to clojure?

2011-06-21 Thread Aaron Cohen
It appears that you need to have the VTK *.class or *.jar files on you classpath as well. Add the path to your VTK java files to the "cp" parameter you are invoking clojure with. On Tue, Jun 21, 2011 at 11:26 AM, Antonio Recio wrote: > I have tried also this: > > $ java -Djava.library.path=/usr/

Re: Aw: Re: How to convert a VTK example from java to clojure?

2011-06-21 Thread Antonio Recio
I have tried also this: $ java -Djava.library.path=/usr/local/lib/vtk-5.9/ -Djava.ext.dirs=/usr/share/java -cp clojure.jar:src clojure.main main.clj Exception in thread "main" java.lang.ClassNotFoundException: vtk.vtkConeSource (main.clj:1) at clojure.lang.Compiler.eval(Compiler.java:54

Re: Aw: Re: How to convert a VTK example from java to clojure?

2011-06-21 Thread Antonio Recio
I have tried with ... but I get the same error: (System/setProperty "java.library.path" "/usr/local/lib/vtk-5.9/") -- 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

Re: Aw: Re: How to convert a VTK example from java to clojure?

2011-06-21 Thread Antonio Recio
I have added the static libraries in the clojure file: (ns project.core (:import (javax.swing JButton JFrame JPanel) (vtk vtkConeSource vtkPolyDataMapper vtkRenderWindow vtkRenderWindowInteractor vtkCamera vtkActor vtkRenderer vtkInteractorStyleTrackbal

Re: Integrating jline

2011-06-21 Thread .Bill Smith
Just to be sure, have you checked that jline. is defined in /usr/share/java/jline-0_9_5.jar? ConsoleRunner -- 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

Re: Integrating jline

2011-06-21 Thread octopusgrabbus
Actually, still getting error using: exec java -cp /usr/share/java/jline-0_9_5.jar:/usr/share/java/ clojure.jar:/usr/share/java/clojure-contrib.jar"$extra_classpath" jline.ConsoleRunner clojure.main "$@" Exception in thread "main" java.lang.NoClassDefFoundError: jline/ ConsoleRunner On Jun 21,

Re: Integrating jline

2011-06-21 Thread octopusgrabbus
D'Oh. Thanks. I forgot the path. On Jun 21, 9:41 am, ".Bill Smith" wrote: > Is the jline jar in the current directory? -- 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

Re: Integrating jline

2011-06-21 Thread .Bill Smith
Is the jline jar in the current directory? -- 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 unsub

Aw: Re: How to convert a VTK example from java to clojure?

2011-06-21 Thread Meikel Brandmeyer
Hi, you are missing the static part from the Java source. Add the (System/loadLibrary "vtkCommonJava") etc. between the ns clause and the definition of main. Sincerely Meikel -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, s

Integrating jline

2011-06-21 Thread octopusgrabbus
I'm running Clojure 1.2.1 and trying to integrate with jline Here's my CLASSPATH: echo $CLASSPATH /usr/share/java:/home/cnorton/git_build/clojure: Clojure invoked with this script. #!/bin/sh if [ "x$CLASSPATH" = "x" ] ; then extra_classpath="" else extra_classpath=":$CLASSPATH" fi whil

Re: labrepl trouble

2011-06-21 Thread Stuart Halloway
> Hi, > > I'm a Clojure newbie and I'm having trouble running labrepl on Eclipse > (so I can eventually use it with Incanter). I get the following error > when I try to run the REPL on labrepl: > > Exception in thread "main" java.lang.IllegalStateException: Pop > without matching push > at

Re: How to convert a VTK example from java to clojure?

2011-06-21 Thread Antonio Recio
*After the corrections I have this: * (ns project.core (:import (vtk vtkConeSource vtkPolyDataMapper vtkRenderWindow vtkRenderWindowInteractor vtkCamera vtkActor vtkRenderer vtkInteractorStyleTrackballCamera))) (defn main [] (let [cone (doto (vtkConeSource.)

Re: How to convert a VTK example from java to clojure?

2011-06-21 Thread Tassilo Horn
Antonio Recio writes: Hi Antonio, > My modified version in clojure with errors:* The errors would be interesting as well. But I found at least two obvious glitches. > (defn main [] > (let [cone (doto (vtkConeSource.) >(.SetHeight 3.0) >(.SetRadius 1.0) >

Re: clojure.contrib.sql and multiple connections

2011-06-21 Thread Shantanu Kumar
The canonical way to use databases with JDBC is to have connection- pooled DataSource (instead of Connection) instances. That will make sure connections are not created unnecessarily are are re-used across operations. This may help create those: https://bitbucket.org/kumarshantanu/clj-dbcp/src/tip

How to convert a VTK example from java to clojure?

2011-06-21 Thread Antonio Recio
I have tried to convert the example Cone5.java from VTK to clojure. I have write this ... but it doesn't work. Do you have any suggestion? *The original java:* import vtk.*; public class Cone5 { static { System.loadLibrary("vtkCommonJava"); System.loadLibrary("vtkFilteringJava");

labrepl trouble

2011-06-21 Thread Dylan
Hi, I'm a Clojure newbie and I'm having trouble running labrepl on Eclipse (so I can eventually use it with Incanter). I get the following error when I try to run the REPL on labrepl: Exception in thread "main" java.lang.IllegalStateException: Pop without matching push at clojure.lang.Va

Re: eval and load-string behavior

2011-06-21 Thread Jonathan Fischer Friberg
Thanks, but I think I'll simply input the let in the string, i.e (load-string "(let [a (fn [] "inside fn")] (a))") But I still think it's odd behavior. I've always thought of eval as equal to putting that code there. (eval '(a)) is equal to (a) Which I think would be much more intuitive. Jonat

Re: clojure.contrib.sql and multiple connections

2011-06-21 Thread Matthias Cords
thank you, this sounds very reasonable. very often there is more than one piece of data to copy back and forth. so typically i do a sql select, then put that to destination data store, do another sql select and put to destination, ... and so forth. from my understanding (sql/with-connection ...)

Re: #= reader macro

2011-06-21 Thread Ralph
I realized that I got the anaphora idiom wrong after I posted. I changed it in my test code. Thanks. On Jun 20, 6:31 am, Jonathan Fischer Friberg wrote: > You should use ~' for anaphora. > > If for example `~this is used, 'this' is going to be unquoted, and the > content of "this" will be backqu