Re: Clojure vectors

2009-07-13 Thread stephaner
Hi Instead of: (conj (drop-last 1 [1 2 3]) 4) You could use into []: (conj (into [] (drop-last 1 [1 2 3])) 4) [1 2 4] Stephane _/) On Jul 13, 11:15 am, Jan Rychter wrote: > I've been trying to implement stacks using vectors in Clojure. In case > you wonder why, it's because I need stacks w

Re: Got a Clojure library?

2009-07-09 Thread stephaner
Name: com.konato.ode URL: http://www.konato.com/2009/07/08/com-konato-ode/ Author: Stephane Rousseau Categories: Scientific computing, Simulation, ODE License: EPL Dependencies: clojure.contrib.test-is for unit testing Description: This is an ordinary differentials equation

Re: Clojure goes Git!

2009-06-17 Thread stephaner
Hi, I like this introductory tutorial on git : http://www.kernel.org/pub/software/scm/git/docs/gittutorial.html It doesn't show working with github, some tutorials are availables on github site. But it dit help me to get started. Bye, Stephane _/) On Jun 17, 2:11 am, Tassilo Horn wrote: >

Re: unit testing private methods?

2009-06-03 Thread stephaner
Hi everyone, I agree with Stuart, this would be very helpfull. Thank you, Stephan On Jun 3, 12:36 am, Stuart Halloway wrote: > Hi Allen, > > You could write a function that uses the clojure.contrib.with-ns/with- > ns macro to dip into the namespace being tested and return the private   > func

Re: clojure.contrib.test-is/run-tests throws Wrong number of args passed to: test-is$report

2009-05-07 Thread stephaner
server:anonymous:anonym...@common-lisp.net:/project/slime/ cvsroot co slime cd clojure ant cd - cd clojure-contrib ant -Dclojure.jar=/home/stephane/src/clojure/clojure.jar Now, I have a little problem with the eval line but will continue my research. Thank you very much, Stephane __/) On May 7, 12

Re: clojure.contrib.test-is/run-tests throws Wrong number of args passed to: test-is$report

2009-05-07 Thread stephaner
Current finding, run-tests works in a shell with a REPL and in vim- clojure: Testing konato.ode.tests.test-ode Ran 9 tests containing 21 assertions. 0 failures, 0 errors. nil But still doesn't work on Emacs. Thank you, Stephane On May 7, 11:20 am, stephaner wrote: >  Now I'

Re: clojure.contrib.test-is/run-tests throws Wrong number of args passed to: test-is$report

2009-05-07 Thread stephaner
a:402) 34: clojure.lang.AFn.run(AFn.java:37) 35: java.lang.Thread.run(Thread.java:619) On May 7, 10:57 am, stephaner wrote: > Hi Mr. Sierra, > > I still have the same error after rebuild. Here is my clj-build > script: > #!/bin/sh -e > CLJ_ROOT=/home/stephane/src > > exp

Re: clojure.contrib.test-is/run-tests throws Wrong number of args passed to: test-is$report

2009-05-07 Thread stephaner
ther component for emacs slime, swank? Thank you, Stephane __/) On May 7, 10:01 am, Stuart Sierra wrote: > Hi Stephane, > Sorry about this; it was my fault.  Should be fixed now, contrib SVN > rev. 773. > -Stuart Sierra > > On May 7, 8:27 am, stephaner wrote: > >

clojure.contrib.test-is/run-tests throws Wrong number of args passed to: test-is$report

2009-05-07 Thread stephaner
Hi everyone, I've upgrade to the lastest release, i'm trying under Emacs to run- tests and now I receive the following error: We evaluating: (run-tests 'konato.ode.tests.test-ode) I receive: java.lang.RuntimeException: java.lang.IllegalArgumentException: Wrong number of args passed to: test-is

Re: March 20th 2009 Rich Hickey Appreciation Day!

2009-03-22 Thread stephaner
I join the crowd too, I was looking for a language to develop some projects. Then Clojure appeared, the light was there. Thank you Rich Hickey Stephane On Mar 20, 2:26 pm, Rayne wrote: > I Anthony Simpson, with the support of fellow Clojurists hereby > declare March 20th, the first day of spr

Re: I need help tracking down a performance problem.

2009-03-19 Thread stephaner
Hi Mr Foley, Running your code on my machine give the following result: (load-file "slow.clj") "Elapsed time: 1736.034068 msecs" nil user> (load-file "slow.clj") "Elapsed time: 678.850779 msecs" nil I'm on Ubuntu 8.10 on a Hp dv6700 with 2gig RAM. Stephane On Mar 19, 8:12 pm, Vincent Foley wr

Re: Loading a self-defined lib

2009-03-15 Thread stephaner
Hi Tassilo, Did you include your jar name into you classpath on your REPL starting script? Stephane On Mar 15, 11:53 am, Tassilo Horn wrote: > Hi, > > when I write a lib with this header > > --8<---cut here---start->8--- > (ns de.tsdh.math.primes >   (:use [

Re: VimClojure 2.0.0 Exception while reading a .clj

2009-03-14 Thread stephaner
Hi I did get it working, I had to pull out of svn and rebuild clojure and clojure-contrib. Thank you everyone for your help, Stéphane On Mar 14, 11:53 am, stephaner wrote: > Hi again, > > There are some errors in the build process. First here is my > local.properties > >

Re: VimClojure 2.0.0 Exception while reading a .clj

2009-03-14 Thread stephaner
, Meikel Brandmeyer wrote: > Hi, > > Am 14.03.2009 um 16:16 schrieb stephaner: > > > de/kotka/vimclojure/backend.clj > > de/kotka/vimclojure/nails.clj > > de/kotka/vimclojure/repl.clj > > These don't get compiled. There is definitively > an error in the ant bu

Re: VimClojure 2.0.0 Exception while reading a .clj

2009-03-14 Thread stephaner
Hi again, I did try using your install script, build with ant seems ok, but still get the same error: ./ng de.kotka.vimclojure.nails.NamespaceOfFile < /home/steph/testsrc/ test.clj java.lang.ClassNotFoundException: de.kotka.vimclojure.nails.NamespaceOfFile at java.net.URLClassLoader$1.r

Re: VimClojure 2.0.0 Exception while reading a .clj

2009-03-14 Thread stephaner
> > Am 14.03.2009 um 13:33 schrieb stephaner: > > > > > When I try to read a clojure source file, I have the following > > exception: > > > Error detected while processing function > > vimclojure#ExecuteNailWithInput: > > line   23: > > E605:

VimClojure 2.0.0 Exception while reading a .clj

2009-03-14 Thread stephaner
When I try to read a clojure source file, I have the following exception: Error detected while processing function vimclojure#ExecuteNailWithInput: line 23: E605: Exception not caught: Couldn't execute Nail! /home/steph/src/ vimclojure -2.0.0/ng de.kotka.vimclojure.nails.NamespaceOfFile 5_LoadF

Re: Enjoying test-is

2009-03-11 Thread stephaner
I use test-is too, this is a very usefull test framework. The framework is very easy to use and provide nice output when tests fail. Since I'm still learning Clojure, I do enjoy using the actual versus expected output of a failed test. Thanks again Mr. Sierra, --~--~-~--~~--

Re: conj questions

2009-03-06 Thread stephaner
Hi Mr Volkmann, Here are my result: user=> (println "\nconj list") conj list nil user=> ; Adds to front. user=> (build-coll '() (fn [coll i] (conj coll i)) size) "Elapsed time: 28.09443 msecs" nil user=> user=> (println "\ncons list") cons list nil user=> ; Adds to front. user=> (build-coll '(