Re: ?: create static inner Java class with constructor argument

2010-04-14 Thread alux
Thank you verec, I hadn't been aware of this. Kind regards, alux On 13 Apr., 00:08, verec wrote: > You may also want to browse this thread: > > http://groups.google.com/group/clojure/browse_frm/thread/a80e07675663... -- You received this message because you are subscribed to the Google Groups

Re: multi project / multi library simultaneous development - best practice?

2010-04-14 Thread Meikel Brandmeyer
Hi, I have to live with some proxy restrictions at work which are serious pain. So I had to recreate several dependencies locally (via git checkout). I non-intrusively switched all builds to gradle using clojuresque Clojure plugin. I can update a dependency by simply doing a new checkout in the r

Re: Clojure.contrib.sql example code link is broken

2010-04-14 Thread Michael Wood
On 14 April 2010 22:18, John Cromartie wrote: > The link to the example code for clojure.contrib.sql is broken. It was > very helpful to me, and it might be useful to other people new to both > Clojure and JDBC. > > http://code.google.com/p/clojure-contrib/source/browse/trunk/src/clojure/contrib/s

Re: Erlang like environment

2010-04-14 Thread Wilson MacGyver
the closest thing I know is the remote REPL for clojure. but if you are looking for erlang's style of distributed environment, it doesn't exist as far as I know. clojure was designed to solve single machine many-core problems. while erlang is designed to solved distributed system problems. On We

Re: Erlang like environment

2010-04-14 Thread Jose A. Ortega Ruiz
gary ng writes: > Hi, > > I just start to learn about clojure and is wondering if there is any > erlang like environment for clojure ? I don't know whether such an environment already exists, but, if not, one could hack one based on Kilim (http://www.malhar.net/sriram/kilim/)... klijim anyone? :

help wanted: tests for c.c.io

2010-04-14 Thread Stuart Halloway
clojure.contrib.io is one of the most used libraries in contrib, and it has few automated tests. I have created a ticket for this [1]. If you haven't contributed to Clojure before, this is a gentle place to get started. You don't need to know Clojure deeply, and there are already some tests

Erlang like environment

2010-04-14 Thread gary ng
Hi, I just start to learn about clojure and is wondering if there is any erlang like environment for clojure ? By that, I mean not just the messaging passing(which as far as I can tell for clojure is within the same process) but its live update and sending symbols(and as far as I know functions as

Dead easy start with Clojure on windows

2010-04-14 Thread Kasim
Hi Guys, I created a project called ClojureW that makes it super easy to start with Clojure in Windows. I would be happy to add it to "Getting Started with Clojure" on assamla but I do not know how. It is just another effort to make Clojure easily accessible for Windows user. Here is the link: ht

Re: multi project / multi library simultaneous development - best practice?

2010-04-14 Thread Kevin Livingston
I'm operating in a medium to large academic environment... maybe 10 to 20 people interacting with a half dozen or more in-house libraries and dozens of projects. All core/common code (currently) is Java: many internal libraries and wrappers for external code. There are numerous projects with only

Clojure.contrib.sql example code link is broken

2010-04-14 Thread John Cromartie
The link to the example code for clojure.contrib.sql is broken. It was very helpful to me, and it might be useful to other people new to both Clojure and JDBC. http://code.google.com/p/clojure-contrib/source/browse/trunk/src/clojure/contrib/sql/test.clj (Linked from http://richhickey.github.com/cl

Re: requesting help from any IBM JVM users out there

2010-04-14 Thread Josh Arnold
According to both the JLS [1] and the JVM Spec [2], neither '>' or '<' are legal within an identifier; The various Character.isJava***() methods return false for those characters. As for the original problem, I was able to reproduce it on some Windows IBM JVMs [3] and I verified that applying the

Re: Communication: How to model it?

2010-04-14 Thread Anniepoo
what you want is just a stream in each direction. Bob: So, how do you feel about the Smith contract? Fred: It's not a good deal for us Fred: Do you think we'll have 4 engineers working on it? Bob: Turn left here Bob: No, more like 5 Fred: at the light? Bob: Yes I'd make a wrapper around a sock

Communication: How to model it?

2010-04-14 Thread alux
Hello, I want to think loudly today, may be you have suggestions, or the problemm has been solved already. I want to do some finite but long two-sided communication, that takes some time - so like some hundred of strings passing in both directions. Often alternating, but not always, and not nesse

Re: multi project / multi library simultaneous development - best practice?

2010-04-14 Thread Phil Hagelberg
On Wed, Apr 14, 2010 at 11:46 AM, Kevin Livingston wrote: > My concern with the Maven and Leiningen approaches for active > development is that they don't seem to allow for trivial co- > development of libraries and projects.  With ASDF (in Lisp) I could > say that one project had build dependenci

Re: multi project / multi library simultaneous development - best practice?

2010-04-14 Thread Sean Devlin
How many developers do you need to coordinate with? On Apr 14, 2:46 pm, Kevin Livingston wrote: > I have been reading through the newsgroup on how to set up and > maintain a build/development environment for a large set of projects. > Coming from a CommonLisp world of maintaining/developing multi

Problem: Multimethod Dispatch Function

2010-04-14 Thread Eduardo Julian
I'm working on an object system called Fenrir, and one of the functions in my library, called new-obj, is used to make instances of classes: (defmulti new-obj #(:_fenrir_class-name %)) (defmethod new-obj ::fObject [fclass & kvals] (with-meta (apply struct-map (conj kvals (:_fenrir_struct f

multi project / multi library simultaneous development - best practice?

2010-04-14 Thread Kevin Livingston
I have been reading through the newsgroup on how to set up and maintain a build/development environment for a large set of projects. Coming from a CommonLisp world of maintaining/developing multiple projects and libraries concurrently, the approach put forward in this post resonates well. http://g

Re: newbie hiccup with hiccup

2010-04-14 Thread Micah Martin
Yup. 0.2.3 solves the problem. Thanks. Micah On Apr 13, 2010, at 8:38 AM, James Reeves wrote: > On 13 April 2010 14:13, Nurullah Akkaya wrote: >> 0.2.2 fixes this issue. > > Yes, and currently Hiccup 0.2.3 is the latest version. I'd recommend > using 0.2.3, as it has no known bugs as of this

Re: Haskell-style list functions

2010-04-14 Thread hayamiz
> user> (use '[clojure.contrib.seq-utils :only (reductions)]) > nil > user> (reductions + [1 2 3 4 5]) > (1 3 6 10 15) Yeah, I think it 'smart'. Thanks for a nice solution. Yuto HAYAMIZU On 4月11日, 午後11:48, Steve Purcell wrote: > On 10 Apr 2010, at 08:46, Yuto Hayamizu wrote: > > > > > Hi,

Translation from CL - "On Lisp" program

2010-04-14 Thread Aravindh Johendran
Is there a way to write this in clojure without java's hashmaps or clojure's atom/ref/var-binding/etc? The program doesn't have to be an exact translation. I just want similar functionality. -- >From chapte

Conflicting definition for IPersistentVector

2010-04-14 Thread Dan
I'm a Java developer; I work on a project that has adopted Clojure's data structures as a convenient implementation of immutable sets, maps, etc. In attempting to add type parameters to the Clojure interfaces, I noticed a conflict in the definition of IPersistentVector. I assume the problem exist

Re: Forms to strings

2010-04-14 Thread Sean Devlin
Happens to all of us :) On Apr 14, 12:03 pm, Nicolas Buduroi wrote: > On Apr 14, 11:44 am, Sean Devlin wrote: > > > Why are you using quasi-quote? > > D'oh! For no reason at all, damn I feel stupid, lol! Thanks -- You received this message because you are subscribed to the Google Groups "Cloju

Re: requesting help from any IBM JVM users out there

2010-04-14 Thread Stuart Halloway
If you apply the patch I have added at https://www.assembla.com/spaces/clojure/tickets/104-gc-issue-100--gen-class-creating-non-compliant-field-names- you should be able to tell pretty quickly. If you aren't comfortable with git patches, building clojure, etc. ping me offline and I can just s

Re: Forms to strings

2010-04-14 Thread Nicolas Buduroi
On Apr 14, 11:44 am, Sean Devlin wrote: > Why are you using quasi-quote? D'oh! For no reason at all, damn I feel stupid, lol! Thanks -- 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

Re: requesting help from any IBM JVM users out there

2010-04-14 Thread David Andrews
I've fallen victim to #104 in an IBM zSeries environment. I can't offer much in the way of Java literacy, but I can certainly test anything you'd care to toss my way. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email t

Re: Forms to strings

2010-04-14 Thread Sean Devlin
Why are you using quasi-quote? On Apr 14, 11:23 am, Nicolas Buduroi wrote: > On Apr 14, 11:12 am, Sean Devlin wrote: > > > user=> (str '(is this what you mean?)) > > "(is this what you mean?)" > > No, more like this: > > user=> (str `(str "foo")) > "(clojure.core/str \"foo\")" > > I would like t

Re: Forms to strings

2010-04-14 Thread Meikel Brandmeyer
Hi, On Apr 14, 5:23 pm, Nicolas Buduroi wrote: > No, more like this: > > user=> (str `(str "foo")) > "(clojure.core/str \"foo\")" > > I would like to get: "(str \"foo\")" > > BTW, I'm not asking for code to do that, just if there's some options > or hidden functionality that would switch off ful

Re: Forms to strings

2010-04-14 Thread Nicolas Buduroi
On Apr 14, 11:12 am, Sean Devlin wrote: > user=> (str '(is this what you mean?)) > "(is this what you mean?)" No, more like this: user=> (str `(str "foo")) "(clojure.core/str \"foo\")" I would like to get: "(str \"foo\")" BTW, I'm not asking for code to do that, just if there's some options or

Re: Forms to strings

2010-04-14 Thread Sean Devlin
user=> (str '(is this what you mean?)) "(is this what you mean?)" On Apr 14, 11:08 am, Nicolas Buduroi wrote: > Hi, I've got a simple question: When converting a form to a string the > resolved symbols are fully qualified, is there a way to get the string > with just the symbols? > > Thanks > > -

Forms to strings

2010-04-14 Thread Nicolas Buduroi
Hi, I've got a simple question: When converting a form to a string the resolved symbols are fully qualified, is there a way to get the string with just the symbols? Thanks - budu -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group,

requesting help from any IBM JVM users out there

2010-04-14 Thread Stuart Halloway
I am preparing a patch to fix issue #104 [1], a.k.a. "IBM JVM rejects member names with dashes (-) that Sun JVMs like just fine." The original thread [2] included a patch that uses $ as a delimiter, e.g. "who$likes$reading$this". My preference is to use underscores, e.g. "isnt_this_much_bet

Re: CSV Lib

2010-04-14 Thread Meikel Brandmeyer
Hi, On Apr 14, 3:53 pm, Chris Perkins wrote: > I'll counter with a challenge to you, Stuart - explain what the heck > you just said in a way that a dummy like me can understand :)  Really, > I have so far been unable to wrap my head around the whole defprotocol > thing - I just don't get what th

Re: CSV Lib

2010-04-14 Thread Chris Perkins
On Apr 13, 10:33 am, Stuart Halloway wrote: > And here's a challenge for you: Use protocols to describe a minimal   > contract for CSV parsing, then show how protocols solve the expression   > problem by letting you backfit to existing Java libs without wrappers   > or adapters. It would make the

Re: matching symbols in a dictionary

2010-04-14 Thread Christophe Grand
On Wed, Apr 14, 2010 at 9:33 AM, Jeff Rose wrote: > I recently discovered condp, which is good for doing the equivalent of > a switch statement and more: > > (map > (fn [[k v]] >(condp = k > :a (* 2 v) > :b (* 3 v))) > {:a "foo" :b "bar"}) > for true switch statements (with c

Re: matching symbols in a dictionary

2010-04-14 Thread Jeff Rose
On Apr 13, 11:34 pm, strattonbrazil wrote: > I want to map a dictionary and do different things depending on the > key.  I was planning on using an if-clause, but I'm not sure how to > compare symbols to strings. > > Something like > > (map (fn [k v] (if (== k "hello") ... ...) {:hello 1 :goodbye

Re: Java interop question: proxy or gen-class?

2010-04-14 Thread Meikel Brandmeyer
Hi, My try. Not tested, though... (defn create-toggle-shape "Creates an ellipse that changes shape when it is clicked." [] (let [fIsPressed? (atom false) shape (proxy [PPath] [] (paint [#^PPaintContext paintContext]