Re: slicing multidimensional vectors (vectors of vectors of vectors ...)

2010-01-10 Thread Konrad Hinsen
On 09.01.2010, at 21:22, Rock wrote: I'm working on implementing a solution for extracting slices of multidimensional vectors, in the sense of vectors of vectors. I'm taking the recursive route. I have some code for working with nested vectors here: http://code.google.com/p/clj-multi

Re: How do I extend an existing function to take different number of params?

2010-01-10 Thread Amit Rathore
Here's some (simpler?) code that will work for adding arity to existing functions - http://gist.github.com/273401 It doesn't handle adding variable-arity (ie multiple arity using &) to existing functions, but can add specific arity to existing varibale- arity functions It also doesn't handle addin

Re: slicing multidimensional vectors (vectors of vectors of vectors ...)

2010-01-10 Thread Rock
Great Konrad! Thank you. My code is similar to yours. I think I will put what you've just shown me to good use. There are a few good points I hadn't thought about. I'm so happy that you are working on this as well. I think Clojure has immense potential for scientific and mathematical computing, bu

Re: slicing multidimensional vectors (vectors of vectors of vectors ...)

2010-01-10 Thread Konrad Hinsen
On 10.01.2010, at 10:35, Rock wrote: I hadn't thought about. I'm so happy that you are working on this as well. I think Clojure has immense potential for scientific and mathematical computing, but this aspect has been somewhat neglected until now for some reason. Let's hope for a big change in

Re: slicing multidimensional vectors (vectors of vectors of vectors ...)

2010-01-10 Thread Rock
An ambitious project indeed! As for the Java libraries, have you had a look at JScience? From what I've seen, it's not at all bad. However, I do believe that, as far as Clojure is concerned, it should have its own scientific libraries and infrastructure. So I'm really glad that you've started this

Re: C interop lib (JNA wrapper)

2010-01-10 Thread xster
On Jan 8, 8:08 am, mac wrote: > Hello all. > I've started work on a clojure library for interoperating with C. It's > always been a pain to do in Java but recentlyJNA(java native access) > has taken away most of that pain. This is great. I think it'll be very valuable to call out to a bunch of

newbie swank clojure emacs

2010-01-10 Thread brian
Hi, I'm trying to follow the directions at: http://riddell.us/tutorial/slime_swank/slime_swank.html I'm doing this under cygwin. I think I did everything correctly, but it seems not to find the clojure.jar file although I have it and the clojure-contrib.jar in my home directory as configure

Re: newbie swank clojure emacs

2010-01-10 Thread Eric Lavigne
Since you are using Windows, you may find Clojure Box easier to install. http://clojure.bighugh.com/ I followed the riddell.us/.../slime_swank.html tutorial yesterday, and can confirm that it works well for Ubuntu. On Sun, Jan 10, 2010 at 5:58 AM, brian wrote: > > Hi, > > I'm trying to follow

Re: newbie swank clojure emacs

2010-01-10 Thread Rob Wolfe
brian writes: > Hi, > > I'm trying to follow the directions at: > > http://riddell.us/tutorial/slime_swank/slime_swank.html > > I'm doing this under cygwin. > > I think I did everything correctly, but it seems not to find the > clojure.jar file although I have it and the clojure-contrib.jar in my

Refs, UUID and DB persistence

2010-01-10 Thread Dragan Djuric
I've just found in another discussion thar Rich mentioned that "As mentioned by Phil, the refs are still correct. The UUID is some unfinished work on ref persistence (of the db kind). Don't look behind the curtain :) " Can somebody who is involved tell a bit more: 1. Is there a work in progress to

Re: newbie swank clojure emacs

2010-01-10 Thread Phil Hagelberg
brian writes: > I'm trying to follow the directions at: > > http://riddell.us/tutorial/slime_swank/slime_swank.html The directions on that site are rather out of date. Try following the ones from the swank-clojure readme; they should cover you. I will contact the author of the tutorial to ask hi

Ref history

2010-01-10 Thread Dragan Djuric
I am aware that there are functions for seeing history count, min count etc. Why is the actual history hidden? For example, if there is a ref: (def a (ref 1)) (dosync (alter a 2)) (dosync (alter a 3)) (ref-history-ocunt a) =>2 a =>3 Why this is not allowed?: (ref-history a) => (2 1) If I am right

Trouble with running in jline editor. (newbie question)

2010-01-10 Thread piscesboy
I placed clojure.jar, jline.jar and jline-0.9.94.jar all in the same directory. I started the default clojure editor using: java -cp clojure.jar clojure.main, and recieved the standard user=> prompt. However, when using: java -cp jline-0.9.94.jar:clojure.jar jline.ConsoleRunner clojure.main I

Re: Has anyone got the Enclojure NetBeans plugin working with clojure 1.1?

2010-01-10 Thread nwalex
Since I couldn't get Enclojure working I decided to man up and dive into the world of Emacs. After a bit of a struggle I got a working development environment set up, incorporating Emacs, NetBeans, and Maven. See http://www.maybetechnology.com/2010/01/configuring-my-development-environment.html fo

Re: Ref history

2010-01-10 Thread ataggart
On Jan 10, 9:21 am, Dragan Djuric wrote: > I am aware that there are functions for seeing history count, min > count etc. > Why is the actual history hidden? > For example, if there is a ref: > (def a (ref 1)) > (dosync (alter a 2)) > (dosync (alter a 3)) > (ref-history-ocunt a) > =>2 > a > =>3

Re: Ref history

2010-01-10 Thread Krukow
On Jan 10, 6:21 pm, Dragan Djuric wrote: > Is this on purpose (and what is the reason), or it's just that nobody > thought that would be useful? > > Of course, I am talking about the read-only access to the history. [snip...] To minimize memory consumption, refs only keep history if it is neede

Re: slicing multidimensional vectors (vectors of vectors of vectors ...)

2010-01-10 Thread Konrad Hinsen
On 10.01.2010, at 13:55, Rock wrote: As for the Java libraries, have you had a look at JScience? From what I've seen, it's not at all bad. It's an interesting library, but it lives clearly in the Java universe of strict typing. Moreover, it doesn't really have arrays, just vectors and matr

Re: parallel vs serial iteration in a "for" loop

2010-01-10 Thread Sean Devlin
Conrad, What's your use case that requires for and not map? I haven't seen something like this yet, and you've got my curious. Sean On Jan 8, 4:41 pm, Conrad wrote: > Thanks again Sean/Chouser- Sounds like there isn't any easy way to do > in-step iteration using the "for" construct, as I suspec

Re: C interop lib (JNA wrapper)

2010-01-10 Thread mac
> This is great. I think it'll be very valuable to call out to a bunch > of useful C library functions. Thank you > Can this approach also provide a bridge > to Objective-C? > > I'm very interested in using Cocoa to design GUIs for the Mac.  I'd > really like to be able to have all the business l

Re: clj-peg v0.6 released

2010-01-10 Thread Richard Lyman
On Fri, Jan 8, 2010 at 11:07 AM, Paul Mooser wrote: > At some point, hopefully someone will write an open-source parsing > library with liberal licensing terms for clojure. > Would you mind elaborating on your definitions for the terms "open-source" and "liberal licensing"? I'm not sure I like

Re: Trouble with running in jline editor. (newbie question)

2010-01-10 Thread Mark Rathwell
your syntax looks fine. are you running on unix or windows? what java version? what clojure version? On Sun, Jan 10, 2010 at 11:54 AM, piscesboy wrote: > I placed clojure.jar, jline.jar and jline-0.9.94.jar all in the same > directory. I started the default clojure editor using: > > java -cp

Re: Has anyone got the Enclojure NetBeans plugin working with clojure 1.1?

2010-01-10 Thread Marmaduke
I did a fresh install of Netbeans, added the enclojure plugin, and then added the clojure 1.1 jar, and it worked just fine. I have, however, switched back to Emacs because Netbeans is too slow on my computer. On Jan 10, 6:45 pm, nwalex wrote: > Since I couldn't get Enclojure working I decided to

Re: Trouble with running in jline editor. (newbie question)

2010-01-10 Thread Chris Jenkins
Quick question: what operating system are you using? I would expect your command line to work fine on any *NIX platform. On Windows, you would need to replace the colon : with a semi colon ; 2010/1/10 piscesboy > I placed clojure.jar, jline.jar and jline-0.9.94.jar all in the same > directory.

Re: slicing multidimensional vectors (vectors of vectors of vectors ...)

2010-01-10 Thread extrackc
Have you looked into Incanter project? I just found out about it recently. "Incanter is a Clojure-based, R-like platform for statistical computing and graphics." http://incanter.org/ In particular, maybe this is useful: http://liebke.github.com/incanter/core-api.html#incanter.core/sel Carson

Re: Strange problem when adding type to a var defined by a macro.

2010-01-10 Thread Nicolas Buduroi
> So I think the source of the exception is clear, but have you found a > solution to your original problem? Maybe if you expand on that someone > can describe a good technique. I'm using clojure-contrib's ns-utils/ns-vars and find-namespaces/find- namespaces-on-classpath to discover namespaces a

Re: Has anyone got the Enclojure NetBeans plugin working with clojure 1.1?

2010-01-10 Thread Eric Thorsen
I use several different builds (clojure platforms for the plugin) and do not have any problems. I'd be happy to get you past any issues if you want to give it another shot in the future. Eric On Sun, Jan 10, 2010 at 2:55 PM, Marmaduke wrote: > I did a fresh install of Netbeans, added the encl

Re: How do I extend an existing function to take different number of params?

2010-01-10 Thread Tom Faulhaber
Yup, this version would cover most cases in a simpler way. My goal (for no particular reason except it entertained me) was to make something that worked as much like defn as possible. Most of the complexity is because of handling the possible combinations of arities that we might see as a result: I

Re: Trouble with running in jline editor. (newbie question)

2010-01-10 Thread piscesboy
java version "1.6.0_17" clojure 1.1.0 Running on Mac OS X. On Jan 10, 2:46 pm, Mark Rathwell wrote: > your syntax looks fine.  are you running on unix or windows?  what java > version?  what clojure version? > > On Sun, Jan 10, 2010 at 11:54 AM, piscesboy wrote: > > I placed clojure.jar, jline.

Re: slicing multidimensional vectors (vectors of vectors of vectors ...)

2010-01-10 Thread Konrad Hinsen
On 10 Jan 2010, at 21:39, extrackc wrote: Have you looked into Incanter project? I just found out about it recently. "Incanter is a Clojure-based, R-like platform for statistical computing and graphics." http://incanter.org/ Incanter uses ParallelColt as its underlying matrix library. While