Re: Using a monad's m-plus function inside a macro

2009-05-10 Thread Konrad Hinsen
On 11.05.2009, at 03:00, Rich Hickey wrote: > Could you explain a bit why you needed to do this? I'm a bit concerned > about libraries requiring symbol-macros. Here is a simplified view of how my monad library works. Each monad is an object that contains the definition of a few functions. Othe

Re: stumped by class not found (vista)

2009-05-10 Thread tarvydas
On May 10, 9:38 pm, Victor Rodriguez wrote: > On Sun, May 10, 2009 at 1:32 PM, tarvydas > > wrote: > ... Thanks for your reply (sorry about posting this question twice - after waiting 3 hours and not seeing my question appear in the group, I re- posted it, assuming that I'd done something wro

Re: stumped by class not found (vista)

2009-05-10 Thread Victor Rodriguez
On Sun, May 10, 2009 at 1:32 PM, tarvydas wrote: > > I'm a CL oldie and a Java newbie (mostly because I never make it past > CLASSPATH problems before giving up :-).  This is probably an simple > question, but I'm stumped. > > I've managed to get emacs + slime + ants.clj to run on Windows Vista.

Re: Using a monad's m-plus function inside a macro

2009-05-10 Thread Rich Hickey
On May 10, 12:21 pm, Konrad Hinsen wrote: > On 09.05.2009, at 20:33, samppi wrote: > > > Wow, I've never seen ~' before. But it works great. Thanks a lot. > > It's not a special syntax, it's just ~ (insert value of the following > expression) with (quote symbol) as the expression. > > >> Now th

stumped by class not found (vista)

2009-05-10 Thread tarvydas
I'm a CL oldie and a Java newbie (mostly because I never make it past CLASSPATH problems before giving up :-). This is probably an simple question, but I'm stumped. I've managed to get emacs + slime + ants.clj to run on Windows Vista. I'm trying to get Vladimir Konrad's Clojure, GUI and NetBean

NetBeans + clojure stumped about class not found exception

2009-05-10 Thread tarvydas
I'm a java newbie (but a CL oldie). I'm trying to run Vladimir Konrad's Clojure, GUI and NetBeans example on Vista. I've got emacs + slime + ants.clj running. "." is in my CLASSPATH and the "gui" subdirectory (containing MainFrame.class, created by the NetBeans project) is in "." (i.e. ./gui/Ma

Re: CL libraries - Newbie question

2009-05-10 Thread Daniel E. Renfer
> Myriam Abramson wrote: >> Is there something to do that easily? After all the syntax is not that >> much different and that's what lisp do well. Stuart Sierra writes: > I'd never say this out loud on comp.lang.lisp, but I can't think of > any CL libraries for which there is not a functionally

Composing functions with or

2009-05-10 Thread samppi
Is there a core Clojure function that does this: (fn mystery [& subfunctions] (fn [& args] (some #(apply % args) subfunctions))) ...in other words, composing the functions with or. (mystery nil? (partial = "the")) would be equivalent to #(or (nil? %) (= "the" %)). --~--~-~--~

Re: Concerns About Pushing Clojure 1.0.0 to Maven Central Repo?

2009-05-10 Thread Daniel E. Renfer
Phil Hagelberg writes: > Howard Lewis Ship writes: > >> clojure-lang because there will be a clojure-contrib artifact for the >> same group. > > And this is ... a bad thing? I'm lost. > > -Phil Good, at least I'm not the only one. Why can't we have both clojure and clojure-contrib as Id's? D

Re: cloggle: OpenGL library for Clojure

2009-05-10 Thread philip.hazel...@gmail.com
On May 10, 6:41 pm, David Nolen wrote: > You'll need to have a similar folder structure in all of your libraries if > you want it to be easy for other people. > > Stack trace > = > > INIT GL IS: com.

Re: CL libraries - Newbie question

2009-05-10 Thread Stuart Sierra
melipone wrote: > I understand that you can use Java libraries with Clojure but can you > use Common Lisp libraries for example CXML? David Nolen writes: > Not unless you port it ;) Myriam Abramson wrote: > Is there something to do that easily? After all the syntax is not that > much differen

Re: contrib javalog depends on Java 6

2009-05-10 Thread Stuart Sierra
I'll remove it. -SS On May 10, 1:56 pm, miner wrote: > I'm just getting started with Clojure.  I had a small issue trying to > build the clojure-contrib project.  I'm on an old PPC Mac with only > Java 5.  The javalog.clj file requires Java 6. > > There's an easy fix for javalog.clj.  GLOBAL_LOG

A-Star working with PersistentHeap

2009-05-10 Thread e
For those tracking, ... thanks to help from you all, I've now implemented a demo showing the PersistentHeap in action for a-star search, instantiated for the 15-puzzle: http://code.google.com/p/jc-pheap/source/browse/#svn/trunk/jc-pheap/src/clj_algorithms . I hope to tackle an efficient Dijkstra

contrib javalog depends on Java 6

2009-05-10 Thread miner
I'm just getting started with Clojure. I had a small issue trying to build the clojure-contrib project. I'm on an old PPC Mac with only Java 5. The javalog.clj file requires Java 6. There's an easy fix for javalog.clj. GLOBAL_LOGGER_NAME is always just "global", so you can use the literal val

Re: cloggle: OpenGL library for Clojure

2009-05-10 Thread David Nolen
You'll need to have a similar folder structure in all of your libraries if you want it to be easy for other people. Stack trace = INIT GL IS: com.sun.opengl.impl.GLImpl Chosen GLCapabilities: GLCapabil

Re: java faster than clojure?(probably not)

2009-05-10 Thread David Nolen
This particular case also looks easy parallelize. Using agents you can divide the execution time by number of available CPUs. On Sun, May 10, 2009 at 9:35 AM, Julien wrote: > > here's a improved version of the byte-array-sound function which is > probably easier to understand. based upon a real

Re: Using a monad's m-plus function inside a macro

2009-05-10 Thread Konrad Hinsen
On 09.05.2009, at 20:33, samppi wrote: > Wow, I've never seen ~' before. But it works great. Thanks a lot. It's not a special syntax, it's just ~ (insert value of the following expression) with (quote symbol) as the expression. >> Now that monads use symbol macros (a change that's a few days

Re: java faster than clojure?(probably not)

2009-05-10 Thread Vincent Foley
Hello Julien, I am in a similar situation to yours: I am writing a Clojure library to parse Starcraft replay files, but my Clojure code is very far from nearly equivalent Java code. Currently, on my home PC, parsing 1,050 files takes ~70 seconds with Clojure and about 12 with Java. The code is

Re: Concerns About Pushing Clojure 1.0.0 to Maven Central Repo?

2009-05-10 Thread Phil Hagelberg
Howard Lewis Ship writes: > clojure-lang because there will be a clojure-contrib artifact for the > same group. And this is ... a bad thing? I'm lost. -Phil --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojur

Re: CL libraries - Newbie question

2009-05-10 Thread Myriam Abramson
David Nolen writes: > Not unless you port it ;) > Is there something to do that easily? After all the syntax is not that much different and that's what lisp do well. On May 8, 7:17 pm, André Thieme wrote: > In principle you could run Clojure and ABCL inside the same VM. > http://common-li

Re: java faster than clojure?(probably not)

2009-05-10 Thread Julien
here's a improved version of the byte-array-sound function which is probably easier to understand. based upon a real mathematical formula. (defn byte-array-sound-2 [frequency sample-rate nb-frame] (let [sample-array (make-array (. Byte TYPE) (* nb-frame 2)) sample-interval (/ 1 (double

Re: java faster than clojure?(probably not)

2009-05-10 Thread Julien
On May 10, 2:08 am, David Nolen wrote: > What's a sample set of values you would pass to this function? (byte-array-sound 2000 44100 10) here frequency would be the pitch of the sound generated 2000Hz, sample-rate set to 44100Hz. Thank you David, it does work faster now. I uploaded the

Re: Can "for" be enhanced to not have to take a binding?

2009-05-10 Thread Laurent PETIT
2009/5/10 Meikel Brandmeyer > Hi Laurent, > > Am 10.05.2009 um 07:19 schrieb Laurent PETIT: > > No problem, but you can still consider (for the definition of the >> function) the equivalent higher-order version I provided later in the my >> post (you didn't answer to this one): >> >> (defn repea