Re: newbie question regarding maps

2012-09-26 Thread George Oliver
On Monday, September 24, 2012 3:04:42 AM UTC-7, Mond Ray wrote: As you can see the REPL gives me an error stating that the keys must be Integers. Is that right? Or is my call process faulty? I think the problem is that wish-lists is a vector, so you need a key for the vector first (e.g.

Re: Clojure : a good start for non-programmers?

2012-09-26 Thread nicolas.o...@gmail.com
Clojure is a good language to start. The only thing is that there are more ressource for beginners in other languages. For Racket (another Lisp), you have the very good: How to design programs. http://www.ccs.neu.edu/home/matthias/HtDP2e/ (this is the second edition, you might have to peak in

clojure - diff of sequence's

2012-09-26 Thread Alex Shabanov
Good day, There is a function FOO that receives two sequences: say, A and B. There is an absolute guarantee that sequence B is received from sequence A by applying next to it N times, e.g. B == (next (next (next... A) | A. What is the fastest way to return sequence C from the function FOO that

Re: Does Clojure support efficient coroutines?

2012-09-26 Thread nicolas.o...@gmail.com
No continuations or coroutines support on the JVM, as far as I know. However, there are a few monad libraries for clojure with which you would probably be able to do what you want. (Using the continuation monad...) http://www.intensivesystems.net/tutorials/monads_101.html , for example.

Re: clojure - diff of sequence's

2012-09-26 Thread Alex Shabanov
I found the following: (letfn [(foo [a b] (subvec a (count b)))] (foo [1 2 3 4] [1 2])) but is it the best one? Good day, There is a function FOO that receives two sequences: say, A and B. There is an absolute guarantee that sequence B is received from sequence A by applying next to it N

comp inside macro

2012-09-26 Thread sailormoo...@gmail.com
Hi : I would like to create a macro as follows. Note : the prinln function actually is something more sophisticated, but I would like to evaluate the composition of one predefined function and the other from the input argument. And I got some errors, why? Thanks user= (defmacro asdf [

Re: comp inside macro

2012-09-26 Thread Alan Malloy
(a) There's no reason for this to be a macro at all: you don't need to prevent evaluation of anything, and you don't need to transform any syntax. Just write a function: (defn asdf [ {:keys [a]}] (println (comp (partial + 1) a))) (b) To make this a macro, just be more careful about what you

Re: Clojure : a good start for non-programmers?

2012-09-26 Thread Takahiro Hozumi
Hi Gregorius, I recommend for you to watch Brian Will channel on youtube. http://www.youtube.com/user/briantwill/videos?flow=gridview=1 There are several introduction of programming language: Clojure, Java, Python, JavaScript, C etc.. After watching all part.1 of each introduction, then you may

Re: clojure - diff of sequence's

2012-09-26 Thread Niels van Klaveren
There's several different options, best read up on the differences between these differences in the docstrings: (remove (set b) a) (clojure.set/difference (set b) (set a)) (last (clojure.data/diff a b)) On Wednesday, September 26, 2012 10:46:57 AM UTC+2, Alex Shabanov wrote: Good day,

Re: Clojure : a good start for non-programmers?

2012-09-26 Thread Jay Fields
On Mon, Sep 24, 2012 at 2:11 AM, Gregorius R. gzym...@gmail.com wrote: Hello Clojurists! is clojure a good start to learn programming? It depends what your goal is. If you were planning a long career in the software development industry, then I think it's a great place to start. As other's

Re: newbie question regarding maps

2012-09-26 Thread vxm
(defn new-item-ks [wlists wlist-name] (first (keep-indexed #(when (= (:name %2) wlist-name) [%1 :items (count (:items %2))]) wlists))) (assoc-in wish-lists (new-item-ks wish-lists WL2) {:name Item 3 :cost 10.0}) On Monday, September 24, 2012

Re: ANN Ritz 0.5.0

2012-09-26 Thread Timothy Washington
Sweet. I'll try to pull the latest from the git repo. Cheers Tim Washington Interruptsoftware.ca On Mon, Sep 24, 2012 at 10:49 PM, Hugo Duncan duncan.h...@gmail.com wrote: Tim, Timothy Washington twash...@gmail.com writes: I was following the instructions on the ritz-nrepl

Re: Clojure : a good start for non-programmers?

2012-09-26 Thread Softaddicts
Like others answered, any Lisp is a good start, mainly because the syntax is terse. Here, people learn Java or similar first like they were learning Pascal in the 80s to learn problem analysis. That's too much luggage to carry, it's more important to learn how to express the problem to solve

Re: Clojure : a good start for non-programmers?

2012-09-26 Thread Lee Spector
Having taught Clojure as a first language I'd second Luc's suggestion to avoid Java interop for as long as possible. The other thing that I think is crucial is to work in a simple, beginner-friendly environment (no complicated installation procedures or exotic UI conventions) that supports a

Re: Clojure : a good start for non-programmers?

2012-09-26 Thread Jim foo.bar
On 26/09/12 14:04, Lee Spector wrote: Having taught Clojure as a first language so, reading the above statement, can I infer that Hampshire college offers a Clojure course to 1st year undergrads? I'm trying to promote the same concept for Manchester University (UK) but all the 'important'

Re: ANN Ritz 0.5.0

2012-09-26 Thread Stefan Hübner
Hugo Duncan duncan.h...@gmail.com writes: sthueb...@googlemail.com (Stefan Hübner) writes: b) How can ritz-nrepl or (preferably) ritz-swank be embedded in an application? I just added instructions [1] to the ritz-swank README. I've not actually tried this yet, but this is essentially how

Re: Clojure : a good start for non-programmers?

2012-09-26 Thread Tom Maynard
On 09/26/2012 08:04 AM, Lee Spector wrote: Having taught Clojure as a first language I'd second Luc's suggestion to avoid Java interop for as long as possible. This is good advice regardless of which alternative JVM language one chooses. Just cracking the covers on the Java runtime

Re: Clojure : a good start for non-programmers?

2012-09-26 Thread Jim foo.bar
aaa ok I can see from the website that you're not exactly teaching Clojure as 1st programming language but rather genetic programming with Clojure. This certainly makes more sense than what I originally understood... It just seems impossible to convince academics that 1st years should become

Re: Clojure : a good start for non-programmers?

2012-09-26 Thread Lee Spector
You're right that my current course using Clojure (genetic programming) isn't a first programming course, but where I teach we change our courses all the time and the decisions are made by professors quite freely (after discussion among related faculty). I've taught Lisp/Scheme as a first

Re: clojure.lang.Keyword.hashCode is a hotspot in my app

2012-09-26 Thread Ben Mabey
On 9/25/12 11:37 PM, Ben Smith-Mannschott wrote: On Tue, Sep 25, 2012 at 1:53 AM, James Hess james.hes...@gmail.com wrote: Hi experienced clojure gurus, According to VisualVM 24% of my time is spent in clojure.lang.Keyword.hashCode. I'm sure I am doing something wrong (i.e. I'm not blaming

ANN Elastisch 1.0 (final)

2012-09-26 Thread Michael Klishin
## TL;DR Elastisch is a minimalistic client for ElasticSearch. It supports virtually every Elastic Search feature and has solid documentation [1] that covers Elastic Search and Lucene concepts and terminology as well as the actual library. After 10 months of work, several alphas, betas and two

Re: newbie question regarding maps

2012-09-26 Thread Timo Mihaljov
On 24.09.2012 13:04, Mond Ray wrote: user= wish-lists [{:name WL1, :items [{:name Item 1, :cost 20.0} {:name Item 2, :cost 40.0}]} {:name WL2, :items [{:name Wiggle 1, :cost 20.0} {:name Wiggle 2, :cost 40.0} [:name Item 3 :cost 10.0]]}] user= (assoc-in wish-lists [:name WL1] [:name WL1

Re: Clojure Programming is a great book

2012-09-26 Thread Chas Emerick
On Sep 24, 2012, at 7:13 AM, Manuel Rotter wrote: Anyway, is there a dedicated mailing list to discuss this book? See the homepage: http://www.clojurebook.com/ Note that the email list mentioned there is not a discussion list; it's (under) used for sending out news about the book and

Re: Clojure : a good start for non-programmers?

2012-09-26 Thread Grant Rettke
It is never too late to learn something new. If you start with Scheme then you will find loads of excellent pedagogical material that has been heavily vetted over the years, and you are bound to find that one of them will speak to you. The excellent thing about starting is that you can leverage

Core.logic performance of looping over a list with tabling

2012-09-26 Thread Reinout Stevens
Hi, I'm the author of a DSL that allows reasoning over paths throughout graphs using core.logic ( https://github.com/ReinoutStevens/damp.qwal ). We noticed that for larger graphs performance became horribly slow, even though there is no apparent reason why it should be. First investigations

JSON serialization with unknown types

2012-09-26 Thread Robert Beaupre
Hi there, I am wondering what the best/recommended way to deal with serialization of unknown types to JSON with clojure.data.json. For things like UUIDs and SQL Dates, I get errors like this: java.lang.Exception: Don't know how to write JSON of class java.util.UUID With Clojure 1.4 is there an

Re: ANN Ritz 0.5.0

2012-09-26 Thread Chris Jeris
I am also having trouble getting the nrepl-ritz debugger to start. I am able to start a repl with M-x nrepl-ritz-jack-in. Then when I do M-x nrepl-ritz-break-on-exception and type '(throw (Exception. OHAI))' into the repl, what happens is that I see nrepl-dbg-setup 1 in the minibuffer and the

Re: Clojure : a good start for non-programmers?

2012-09-26 Thread Ian
Hi Greg, If you want to start with a functional language, then I would start with Erlang or Haskell, rather than Closure. Closure is a great language, but it runs on the Java VM, and you are expected to know and understand Java data structures. I found learning both Closure and Java

Re: clojurescript: *ns*, all-ns, ns-map, ns-publics, ns-* ?

2012-09-26 Thread Stuart Sierra
Some of this information exists in the CLJS compiler, although it's not documented. For example, the cljs.analyzer namespace has *cljs-ns* and `namespaces`. You could examine these Vars at the Clojure (not ClojureScript) REPL. Vars and namespaces do not exist at all in compiled CLJS code, so

Re: how do we go about promoting new clojure libraries?

2012-09-26 Thread Stuart Sierra
http://dev.clojure.org/display/community/Libraries is unorganized and out of date - volunteers welcome. James Reeves created http://www.clojure-toolbox.com/ -S -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to

Re: Clojure : a good start for non-programmers?

2012-09-26 Thread Jim - FooBar();
On 26/09/12 17:10, Ian wrote: If you want to start with a functional language, then I would start with Erlang or Haskell, rather than Closure. Closure is a great language, but it runs on the Java VM, and you are expected to know and understand Java data structures. I found learning both

Re: how do we go about promoting new clojure libraries?

2012-09-26 Thread Mayank Jain
On Thu, Sep 27, 2012 at 12:31 AM, Stuart Sierra the.stuart.sie...@gmail.com wrote: http://dev.clojure.org/display/community/Libraries is unorganized and out of date - volunteers welcome. I am interested in keeping the clojure libraries up to date. Can you give me some ideas what are the

Re: JSON serialization with unknown types

2012-09-26 Thread gaz jones
you might find this useful: https://github.com/dakrone/cheshire you can pretty much swap it in for data.json IIRC and it has nice support for custom encodings, amongst other things. On Wed, Sep 26, 2012 at 12:39 PM, Robert Beaupre codewise.rob...@gmail.com wrote: Hi there, I am wondering what

Re: how do we go about promoting new clojure libraries?

2012-09-26 Thread Stuart Sierra
On Wednesday, September 26, 2012 3:05:08 PM UTC-4, Mayank Jain wrote: I am interested in keeping the clojure libraries up to date. Can you give me some ideas what are the tasks that needs to be done? So that I have some idea about it. 1. Send in a signed Clojure Contributor Agreement:

Re: JSON serialization with unknown types

2012-09-26 Thread Stuart Sierra
I'm working on a new version of data.json that supports conversions: https://github.com/clojure/data.json/tree/transform Feedback welcome on the API. -S -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to

Re: how do we go about promoting new clojure libraries?

2012-09-26 Thread Mayank Jain
@Stuart Thanks. But it says Send your signed agreement via postal mail to: Do I need to send it via postal mail? (I stay in India) On Thu, Sep 27, 2012 at 12:38 AM, Stuart Sierra the.stuart.sie...@gmail.com wrote: On Wednesday, September 26, 2012 3:05:08 PM UTC-4, Mayank Jain wrote: I am

Re: how do we go about promoting new clojure libraries?

2012-09-26 Thread Michael Klishin
2012/9/26 Mayank Jain firesof...@gmail.com Thanks. But it says Send your signed agreement via postal mail to: Do I need to send it via postal mail? (I stay in India) Unfortunately, yes. Clojure uses a fine crafted 16th century contributor agreement process that does not take into account that

Re: how do we go about promoting new clojure libraries?

2012-09-26 Thread Michael Klishin
2012/9/26 Stuart Sierra the.stuart.sie...@gmail.com http://dev.clojure.org/display/community/Libraries is unorganized and out of date - volunteers welcome. Stuart, No, that's not how it works. You *first* make contribution process easy, *then* ask people to volunteer. Not the other way

Re: how do we go about promoting new clojure libraries?

2012-09-26 Thread Baishampayan Ghose
On Wed, Sep 26, 2012 at 12:35 PM, Michael Klishin michael.s.klis...@gmail.com wrote: Unfortunately, yes. Clojure uses a fine crafted 16th century contributor agreement process that does not take into account that there may be potential contributors outside of North America and western Europe.

Re: how do we go about promoting new clojure libraries?

2012-09-26 Thread Baishampayan Ghose
On Wed, Sep 26, 2012 at 12:40 PM, Michael Klishin michael.s.klis...@gmail.com wrote: No, that's not how it works. You *first* make contribution process easy, *then* ask people to volunteer. Michael, Don't want to sound snarky here, but as we all know, easy != simple :) Regards, BG --

Re: how do we go about promoting new clojure libraries?

2012-09-26 Thread Michael Klishin
2012/9/26 Baishampayan Ghose b.gh...@gmail.com IMHO it's not that archaic. There are _many_ FOSS projects which mandate a CLA of some sort (even the hippest projects like Node.js have this http://nodejs.org/cla.html). The only contention is the snail-mailing part, which I understand is

Re: how do we go about promoting new clojure libraries?

2012-09-26 Thread Baishampayan Ghose
On Wed, Sep 26, 2012 at 12:44 PM, Michael Klishin michael.s.klis...@gmail.com wrote: I am only talking about the snail mail part. I have no problem with CAs, legal aspects of OSS project governance or anything like that. It took me a few hours to pass through the Neo4J contributor agreement

Re: Clojure : a good start for non-programmers?

2012-09-26 Thread Softaddicts
If you use something like lein or clooj you can push back most of the Java stuff for a significant chunk of the learning curve. Using Java libs does not imply that you must be well versed in Java. That can come later. Obviously if you jump into both of them upfront, it will be quite confusing,

Re: how do we go about promoting new clojure libraries?

2012-09-26 Thread John Gabriele
On Sunday, September 23, 2012 4:00:28 PM UTC-4, zcaudate wrote: is there some sort of categorised list/wiki that we can add to for new libraries? I've started the [Clojure Dining Car](http://www.unexpected-vortices.com/clojure/dining-car.html), but haven't announced it yet because I still

Re: how do we go about promoting new clojure libraries?

2012-09-26 Thread Aaron Cohen
On Wed, Sep 26, 2012 at 3:40 PM, Michael Klishin michael.s.klis...@gmail.com wrote: 2012/9/26 Stuart Sierra the.stuart.sie...@gmail.com http://dev.clojure.org/display/community/Libraries is unorganized and out of date - volunteers welcome. Stuart, No, that's not how it works. You *first*

Re: Evolving the Clojure contribution process and goals

2012-09-26 Thread Max Penet
+1 Accepting CAs by mail would be very welcome. The impact of this until now is something quite difficult to measure, since potential contributors maybe never voiced their interest and just quit when they get to know the effort (or cost) required. But it probably makes a difference when a

Re: how do we go about promoting new clojure libraries?

2012-09-26 Thread Michael Klishin
zcaudate: is there some sort of categorised list/wiki that we can add to for new libraries? There are clojuresphere.com, clojure-toolbox.com and some groups of people have their own sites for their stuff: clojurewerkz.org, http://flatland.org. If you want to make your library more visible,

Re: how do we go about promoting new clojure libraries?

2012-09-26 Thread Tamreen Khan
I think the consensus is that an electronic way to send the CA is just the right amount of effort required. You stil have to take the time to fill out a legally binding agreement but it also doesn't rule out those for whom snail mail is just too unpractical because they live outside the US or

Re: how do we go about promoting new clojure libraries?

2012-09-26 Thread Michael Klishin
2012/9/26 Aaron Cohen aa...@assonance.org No, only if you want an unfiltered stream of absolutely anyone to contribute is that true. If you're ok with restricting volunteers to the subset who are actually willing show a little effort, making the process slightly cumbersome might even be a net

Re: how do we go about promoting new clojure libraries?

2012-09-26 Thread Wes Freeman
For what it's worth, I've organically discovered several of Clojurewerkz's projects just via google search, so I think Michael's methods work, although there is indeed a fair amount of effort involved in maintaining the promotion. I like the https://twitter.com/nodenpm for node.js npm package

Re: how do we go about promoting new clojure libraries?

2012-09-26 Thread John Gabriele
On Wednesday, September 26, 2012 3:48:27 PM UTC-4, John Gabriele wrote: On Sunday, September 23, 2012 4:00:28 PM UTC-4, zcaudate wrote: is there some sort of categorised list/wiki that we can add to for new libraries? I've started the Clojure Dining Car ... Oh, sorry. You were

Re: how do we go about promoting new clojure libraries?

2012-09-26 Thread Mayank Jain
While I don't mind sending a document via mail, but saying, Pay 50$ (Approx 2500 Indian Rupees) for Hi, I want to help organize the library documentation for clojure sounds unreasonable to me. This maybe valid for US citizens, But you can't ask people who don't stay in US for such a procedure.

Re: Core.logic performance of looping over a list with tabling

2012-09-26 Thread David Nolen
On Wed, Sep 26, 2012 at 8:20 AM, Reinout Stevens reste...@vub.ac.be wrote: Hi, I'm the author of a DSL that allows reasoning over paths throughout graphs using core.logic ( https://github.com/ReinoutStevens/damp.qwal ). We noticed that for larger graphs performance became horribly slow,

Re: how do we go about promoting new clojure libraries?

2012-09-26 Thread Michael Klishin
2012/9/27 Wes Freeman freeman@gmail.com For what it's worth, I've organically discovered several of Clojurewerkz's projects just via google search, so I think Michael's methods work, although there is indeed a fair amount of effort involved in maintaining the promotion. It's not that

Re: Clojure : a good start for non-programmers?

2012-09-26 Thread greg r
I would go with the book Simply Scheme, Introducing Computer Science by Harvey and Wright. Install the Racket system on your computer, and have at it. http://racket-lang.org/ Once you come up to speed on Scheme, you will have no trouble with core Clojure. But if you venture in the the Java

Re: Clojure : a good start for non-programmers?

2012-09-26 Thread Alexey Petrushin
I believe the only question You should be considering - is it interesting to You? I should say - giving up because of Your age or Your self-esteem of Yourself is a bad idea. Clojure is complex language - but it doesn't really matter, the key point - if it's interesting to You and You are ready

Re: Does Clojure support efficient coroutines?

2012-09-26 Thread Warren
All I need is some sort of threads that can handle 1000 simultaneous threads and 300,000 context switches per second. I don't actually need the coroutine value-passing feature; they are just one thing that lightweight threads can be built on top of. Regular OS threads (via java.lang.Thread)