Re: Clojure CEDET?

2011-03-08 Thread Baishampayan Ghose
Just wondering if anybody uses CEDET with clojure or anybody would be interested in clojure language support for smart code completion. I use Clojure, and I use CEDET (not just for Clojure), and I'd certainly like to have code completion for Clojure in CEDET. +1 Regards, BG --

Re: Are there sets that keep the insertion order?

2011-03-08 Thread Tassilo Horn
Justin Kramer jkkra...@gmail.com writes: Hi Justin, https://github.com/ninjudd/ordered-set Oh, yes, that looks exactly as what I was looking for. And judging from the implementation, it looks promising performance-wise for my usecase. And it seems to be equivalent to Ken's deftype. Thanks a

Re: Are there sets that keep the insertion order?

2011-03-08 Thread Tassilo Horn
Tassilo Horn tass...@member.fsf.org writes: Hi Justin, https://github.com/ninjudd/ordered-set Oh, yes, that looks exactly as what I was looking for. And judging from the implementation, it looks promising performance-wise for my usecase. I've now switched to that, and I get some slight

arithmetic progression

2011-03-08 Thread Fred Concklin
Tests whether list is arithmetic progression. Thoughts, feedback: (defn arithmetic-progression? [intlist] tests if list is arithmetic progression. (apply = (map #(apply - %) (partition 2 1 (reverse intlist) fpc -- You received this message because you are subscribed to the

Re: arithmetic progression

2011-03-08 Thread Chris Perkins
On Mar 8, 10:26 am, Fred Concklin fredconck...@gmail.com wrote: Tests whether list is arithmetic progression. Thoughts, feedback: (defn arithmetic-progression? [intlist]   tests if list is arithmetic progression.   (apply =    (map     #(apply - %)     (partition 2 1 (reverse

Re: arithmetic progression

2011-03-08 Thread Brian Martin
Depending on your use, you may want to deal with a sequence that is empty or is length 1. Right now there's an uncaught exception in that case: user= (arithmetic-progression? [1]) java.lang.IllegalArgumentException: Wrong number of args (0) passed to: core$-EQ- (NO_SOURCE_FILE:0) Brian On

Discount for 2-Day public course on Clojure in Chicago in April

2011-03-08 Thread Doug Bradbury
Save $50 this week on Clojure: Functional Programming on the JVM a 2- day course in Chicago with Colin Jones with discount code CLJ50. In this 2-Day course, you'll grow your knowledge and skill to the point where you're ready to embark on your first Clojure project. With numerous hands-on

Re: arithmetic progression

2011-03-08 Thread Ken Wesson
On Tue, Mar 8, 2011 at 10:42 AM, Chris Perkins chrisperkin...@gmail.com wrote: You'll probably want to add checks for special cases, like an empty or one-element sequence, too. Better yet, clojure.core should amend = so that (=) and (= x) return true instead of throwing an arity exception. That

Re: Are there sets that keep the insertion order?

2011-03-08 Thread Tassilo Horn
Tassilo Horn tass...@member.fsf.org writes: Hi again, https://github.com/ninjudd/ordered-set Oh, yes, that looks exactly as what I was looking for. And judging from the implementation, it looks promising performance-wise for my usecase. I've now switched to that, and I get some slight

Issue with lein-ring...

2011-03-08 Thread John Szakmeister
I've been working on a web app, and it was using leiningen-war. The author of that suggest moving to the lein-ring plugin on his github site... so, I did that. However, when I run lein ring server I get a traceback, which I show below. Two lines stand out to me: at

Lift and Clojure

2011-03-08 Thread Fred Concklin
I'm looking for examples and resources about using Lift (Scala Web Framework) and clojure together. Anybody know of anything good? fpc -- 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: having trouble with http.async.client

2011-03-08 Thread Rob Wolfe
Kevin Archie karc...@wustl.edu writes: I'm trying to use http.async.client to do a PUT request (where I don't care about the response) and my code is hanging -- apparently after succesfully completing the PUT, from the server's perspective. This isn't quite what I'm doing, but exhibits the

Re: arithmetic progression

2011-03-08 Thread Ken Wesson
On Tue, Mar 8, 2011 at 2:28 PM, Alan a...@malloys.org wrote: On Mar 8, 10:27 am, Ken Wesson kwess...@gmail.com wrote: On Tue, Mar 8, 2011 at 10:42 AM, Chris Perkins chrisperkin...@gmail.com wrote: You'll probably want to add checks for special cases, like an empty or one-element sequence,

Re: Issue with lein-ring...

2011-03-08 Thread Michael Ossareh
On Tue, Mar 8, 2011 at 11:31, John Szakmeister j...@szakmeister.net wrote: I've been working on a web app, and it was using leiningen-war. The author of that suggest moving to the lein-ring plugin on his github site... so, I did that. However, when I run lein ring server I get a traceback,

Re: overriding keyword behavior?

2011-03-08 Thread Stuart Sierra
Oh yeah, you can't extend an interface to a new class. So it won't work. This is why protocols exist, in fact. Silly me. -S -- 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 that

Re: arithmetic progression

2011-03-08 Thread Fred Concklin
Thanks! fpc -- 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 that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send

Re: Clojure CEDET?

2011-03-08 Thread Phil Hagelberg
On Mar 7, 5:44 pm, Fred Concklin fredconck...@gmail.com wrote: Just wondering if anybody uses CEDET with clojure or anybody would be interested in clojure language support for smart code completion. http://cedet.sourceforge.net/ I'm curious because I've never seen Cedet in action: what does

Rebinding Defs

2011-03-08 Thread Timothy Baldridge
If in a namespace I bind a var: (def foo 3) And then later on in my program re-bind that var: (def foo 1) Will all parts of my program instantly see that update? How is it possible to have any sort performance when we're basically having a namespace function lookup for every single function

Re: Rebinding Defs

2011-03-08 Thread Alan
On Mar 8, 3:59 pm, Timothy Baldridge tbaldri...@gmail.com wrote: If in a namespace I bind a var: (def foo 3) And then later on in my program re-bind that var: (def foo 1) Will all parts of my program instantly see that update? How is it possible to have any sort performance when we're

Re: Rebinding Defs

2011-03-08 Thread James Reeves
Typically an atom or a ref is used when you want a variable On 8 March 2011 23:59, Timothy Baldridge tbaldri...@gmail.com wrote: If in a namespace I bind a var: (def foo 3) And then later on in my program re-bind that var: (def foo 1) Will all parts of my program instantly see that

Re: Rebinding Defs

2011-03-08 Thread Timothy Baldridge
Is there a reason you're using a var rather than an atom or a ref? I think I over-simplified what I'm doing a bit. What I'm really doing is writing a prototype port of Clojure to PyPy. I'm planning to make symbols resolvable at compile-time. It sounds like in most cases, like for defs, I should

Macros, macros, macros

2011-03-08 Thread Andreas Kostler
Hi all, I need a macro to basically outputs this: (macroexpand '(chain-field-queries record location name country)) (. (. (. record (field location)) (field name)) (field country)) Which chains method calls on a java object. e.g. record.field(location).field(name).field(country). etc... so far

Re: Macros, macros, macros

2011-03-08 Thread Daniel Solano Gomez
On Wed Mar 9 11:16 2011, Andreas Kostler wrote: Hi all, I need a macro to basically outputs this: (macroexpand '(chain-field-queries record location name country)) (. (. (. record (field location)) (field name)) (field country)) Which chains method calls on a java object. e.g.

Re: Macros, macros, macros

2011-03-08 Thread Andreas Kostler
Hi Daniel, Thanks for your reply. On 09/03/2011, at 11:57 AM, Daniel Solano Gomez wrote: On Wed Mar 9 11:16 2011, Andreas Kostler wrote: Hi all, I need a macro to basically outputs this: (macroexpand '(chain-field-queries record location name country)) (. (. (. record (field location))

Re: Macros, macros, macros

2011-03-08 Thread Alan
On Mar 8, 9:14 pm, Andreas Kostler andreas.koestler.le...@gmail.com wrote: Hi Daniel, Thanks for your reply. On 09/03/2011, at 11:57 AM, Daniel Solano Gomez wrote: On Wed Mar  9 11:16 2011, Andreas Kostler wrote: Hi all, I need a macro to basically outputs this: (macroexpand

Re: Macros, macros, macros

2011-03-08 Thread Andreas Kostler
On 09/03/2011, at 4:24 PM, Alan wrote: On Mar 8, 9:14 pm, Andreas Kostler andreas.koestler.le...@gmail.com wrote: Hi Daniel, Thanks for your reply. On 09/03/2011, at 11:57 AM, Daniel Solano Gomez wrote: On Wed Mar 9 11:16 2011, Andreas Kostler wrote: Hi all, I need a macro to