Re: lein-daemon 0.3

2011-05-12 Thread Alfredo
Good job :) Can I use this in order to run, for examples, a lein ring session as a deamon? :) Bye, Alfredo On May 12, 6:18 am, Allen Rohner wrote: > I've released a new version of lein-daemon. daemon is like 'lein run', > only it runs the process in the background rather than blocking. > > 0.3 an

Re: Type hinting inconsistencies in 1.3.0

2011-05-12 Thread Chas Emerick
On May 12, 2011, at 2:09 AM, Ken Wesson wrote: The real problem is that first case was never actually specifying a return type - it is a type hint on the var that happened to store an fn. The fn itself can only return Object (<=1.2.0). >>> >>> ?? >>> >>> Using 1.2: >>> >>>

Re: Type hinting inconsistencies in 1.3.0

2011-05-12 Thread Ken Wesson
On Thu, May 12, 2011 at 6:01 AM, Chas Emerick wrote: > What David is getting at is that Object-based hints (as we've had all along) > don't impact the signature of the generated function's invoke method -- their > return types are always Object, and the hint is "just" used to determine > which

Re: Type hinting inconsistencies in 1.3.0

2011-05-12 Thread Juha Arpiainen
On May 12, 1:18 pm, Ken Wesson wrote: > This reads to me > as implying that hinting (defn ^String foo [] ...) is hinting that foo > references a String rather than an IFn that returns a String It is if you use 'foo in argument position. That is, if Foo/bar is overloaded for String and IFn, then (

Re: sessions in Ring, Sandbar, Compojure, etc...

2011-05-12 Thread James Reeves
On 12 May 2011 04:49, Shree Mulay wrote: > But for WHATEVER reason, the sessions are NOT getting stored? Have you added the session middleware? e.g. (def app (-> main-routes wrap-params wrap-session)) Or more succinctly: (def app (handler/site main-routes)) - James -- You re

Re: Learning Idiomatic Clojure

2011-05-12 Thread Mike Meyer
On Wed, 11 May 2011 19:10:13 -0700 (PDT) "J.R. Garcia" wrote: > I'm wondering what resources would be best to learn how Clojurians > write their code. > > I've been developing for about 4 years in several object-oriented > languages (mostly C# and Ruby). I understand Clojure's syntax well and >

Re: Learning Idiomatic Clojure

2011-05-12 Thread Stuart Halloway
> This, no the other hands, is a little bit contradictory. The example > about syntax and white space than writing code "the Clojure way", > though you explicitly say that's not what you're interested in. Seems > like you're asking for a community style guide. Again, I don't know > that such exists

Speakers for NYC Clojure Users Group needed!

2011-05-12 Thread Eric Thorsen
We had a really interesting and thought provoking presentation on Logic Programming in Clojure, predicate dispatch and some other topics given by David Nolan last month who stepped up at the last minute (thanks Dave!). His project is now part of clojure contrib: https://github.com/clojure/core.lo

Re: Learning Idiomatic Clojure

2011-05-12 Thread Islon Scherer
Read the joy of clojure, it's an amazing book that will teach you the way of clojure. Islon -- 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 -

Re: Learning Idiomatic Clojure

2011-05-12 Thread Adam Burry
On May 12, 11:54 am, Mike Meyer wrote: > As others have said, this sounds like you need a book on > functional/LISP programming. There are some excellent books for other > LISP dialects. "Structure and Interpretation of Computer Programs" > (aka SICP) would be my recommendations, but "Practical

Re: Learning Idiomatic Clojure

2011-05-12 Thread Sam Ritchie
Here's a style guide for Scheme, another dialect of Lisp: http://mumble.net/~campbell/scheme/style.txt It's a fun read, and mostly applicable to Clojure. On Thu, May 12, 2011 at 6:54 AM, Mike Meyer wrote: > On Wed, 11 May 2011 19:10:13 -0700 (PDT) > "J.R. Garcia" wrote: > > > I'm wondering wh

Re: Small issue with swank-cdt on Windows

2011-05-12 Thread George Jahad
On May 11, 8:12 am, Aravindh Johendran wrote: > Can we just use the forward slashes in the method source-location-for- > frame? Seems reasonable. Thanks for pointing it out. I'll fix it in the next snapshot. g -- You received this message because you are subscribed to the Google Groups "Clo

Re: Learning Idiomatic Clojure

2011-05-12 Thread Mike Meyer
On Thu, 12 May 2011 07:45:50 -0700 (PDT) Adam Burry wrote: > On May 12, 11:54 am, Mike Meyer wrote: > > As others have said, this sounds like you need a book on > > functional/LISP programming. There are some excellent books for other > > LISP dialects. "Structure and Interpretation of Computer P

Re: Learning Idiomatic Clojure

2011-05-12 Thread J.R. Garcia
Thanks for the recommendations, guys! I'll be checking those resources out. On May 12, 10:25 am, Mike Meyer wrote: > On Thu, 12 May 2011 07:45:50 -0700 (PDT) > > Adam Burry wrote: > > On May 12, 11:54 am, Mike Meyer wrote: > > > As others have said, this sounds like you need a book on > > > fun

Re: lein-daemon 0.3

2011-05-12 Thread Allen Rohner
> Can I use this in order to run, for examples, a lein ring session as a > deamon? :) > Yes, that exactly its intention. -- 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 f

Re: lein-daemon 0.3

2011-05-12 Thread Alfredo
Very useful indeed :) On May 12, 5:54 pm, Allen Rohner wrote: > > Can I use this in order to run, for examples, a lein ring session as a > > deamon? :) > > Yes, that exactly its intention. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to t

Re: sessions in Ring, Sandbar, Compojure, etc...

2011-05-12 Thread Shree Mulay
@ James, yes. (def app (-> #'main-routes (wrap-reload '(SocialNetworkCore.core)) ;;remove wrap-reload from production code (wrap-params) ;; wraps params (inputs from forms) - makes 'em available ;(wrap-flash);; (wrap-session)

Re: sessions in Ring, Sandbar, Compojure, etc...

2011-05-12 Thread Shree Mulay
James, et al., WHOA! I got it to work! After I commented out ;(wrap-reload '(SocialNetworkCore.core))  ;;remove wrap-reload it started behaving. Is the "wrap-reload" functionality not compatible with Ring Sessions??? Have I implemented it the wrong way? Only thing is, when I goto http://127

Re: Type hinting inconsistencies in 1.3.0

2011-05-12 Thread Ken Wesson
On Thu, May 12, 2011 at 6:44 AM, Juha Arpiainen wrote: > On May 12, 1:18 pm, Ken Wesson wrote: >> This reads to me >> as implying that hinting (defn ^String foo [] ...) is hinting that foo >> references a String rather than an IFn that returns a String > > It is if you use 'foo in argument positi

Re: sessions in Ring, Sandbar, Compojure, etc...

2011-05-12 Thread James Reeves
On 12 May 2011 20:37, Shree Mulay wrote: >  ;(wrap-reload '(SocialNetworkCore.core))  ;;remove wrap-reload > > it started behaving. Is the "wrap-reload" functionality not compatible > with Ring Sessions??? Have I implemented it the wrong way? I'm not sure. There exist better alternatives to the `

Re: Learning Idiomatic Clojure

2011-05-12 Thread Sean Corfield
I'll +1 on The Joy of Clojure. I have the PDF on my iPhone and dip into it early and often. Probably on my fourth full read of it now on my iPad too. On Thu, May 12, 2011 at 9:31 AM, Islon Scherer wrote: > Read the joy of clojure, it's an amazing book that will teach you the > way of clojure. --

Collaboration Proposal: Beyond CLOS Generic Methods, Predicate Dispatch, and Pattern Matching

2011-05-12 Thread David Nolen
Hello fellow Clojurians, As some of you may know I've been doing a bit of research into efficient predicate dispatch, generic methods, and state-of-the-art implementations of pattern-matching in OCaml. After a bit of reading and prototyping, I'm quite confident that it's possible to build somethin

Re: Learning Idiomatic Clojure

2011-05-12 Thread Paul deGrandis
I'll also jump on that, I'm on my second or third full read of Joy of Clojure. Just a great book about the why and when of the language features ("why does feature X exist, when should I use it, when am I abusing it"). Paul On May 12, 2:55 pm, Sean Corfield wrote: > I'll +1 on The Joy of Clojur

Re: sessions in Ring, Sandbar, Compojure, etc...

2011-05-12 Thread Shree Mulay
James, et al., > I'm not sure. There exist better alternatives to the `wrap-reload` > middleware anyway, such as the lein-ring plugin. > I didn't know there was? What I understood of wrap-reload is that I didn't have to restart "lein ring server" at the command line everytime I made a change to m

Re: Collaboration Proposal: Beyond CLOS Generic Methods, Predicate Dispatch, and Pattern Matching

2011-05-12 Thread Jonathan Fischer Friberg
I'd like to help, if I can. Jonathan On Fri, May 13, 2011 at 12:03 AM, David Nolen wrote: > Hello fellow Clojurians, > > As some of you may know I've been doing a bit of research into efficient > predicate dispatch, generic methods, and state-of-the-art implementations of > pattern-matching in O

Re: Collaboration Proposal: Beyond CLOS Generic Methods, Predicate Dispatch, and Pattern Matching

2011-05-12 Thread David Nolen
The following are what I would consider helpful reading and some advice about their content: - CiteSeerX — Efficient Predicate Dispatching Good place to start, covers why the feature I'm proposing would be useful. The algorithms de

Re: Collaboration Proposal: Beyond CLOS Generic Methods, Predicate Dispatch, and Pattern Matching

2011-05-12 Thread David Nolen
On Thu, May 12, 2011 at 7:30 PM, Jonathan Fischer Friberg < odysso...@gmail.com> wrote: > I'd like to help, if I can. > > Jonathan I'm sure you can :) Give those papers a looksee and let me know what you think. David -- You received this message because you are subscribed to the Google Groups

Re: sessions in Ring, Sandbar, Compojure, etc...

2011-05-12 Thread James Reeves
On 13 May 2011 00:23, Shree Mulay wrote: > I didn't know there was? What I understood of wrap-reload is that I > didn't have to restart "lein ring server" at the command line > everytime I made a change to my core.clj file??? > > How do I set up lein-ring to give me the same functionality? lein-r

Re: Collaboration Proposal: Beyond CLOS Generic Methods, Predicate Dispatch, and Pattern Matching

2011-05-12 Thread Brent Millare
Hey, Can you give a simple explanation how your methods would be faster than multimethods. Does this mean your implementation uses protocols underneath? How does multimethods work? How many branches? -Brent On May 12, 7:57 pm, David Nolen wrote: > On Thu, May 12, 2011 at 7:30 PM, Jonathan Fische

Re: Type hinting inconsistencies in 1.3.0

2011-05-12 Thread Chas Emerick
On May 12, 2011, at 3:53 PM, Ken Wesson wrote: > On Thu, May 12, 2011 at 6:44 AM, Juha Arpiainen wrote: >> On May 12, 1:18 pm, Ken Wesson wrote: >>> This reads to me >>> as implying that hinting (defn ^String foo [] ...) is hinting that foo >>> references a String rather than an IFn that return

Re: Type hinting inconsistencies in 1.3.0

2011-05-12 Thread Ken Wesson
On Thu, May 12, 2011 at 11:32 PM, Chas Emerick wrote: > Object-based hints are not new, and haven't changed in 1.3.0 as far as I can > tell.  Such hints are _hints_, not type declarations (in the case of a var's > value) or return type declarations (in the case of a fn held by a var). I never s

Re: Learning Idiomatic Clojure

2011-05-12 Thread Gregg Williams
This is good advice, but I can't parse 1a after the phrase "or maybe", and I'm not sure about 1b. Can you reword them, making it clearer when you're using a Clojure keyword? I want to be sure I understand what you're saying--it sounds insightful! Thanks. On May 11, 9:09 pm, Ken Wesson wrote: > On

Re: Learning Idiomatic Clojure

2011-05-12 Thread Ken Wesson
On Fri, May 13, 2011 at 12:29 AM, Gregg Williams wrote: > This is good advice, but I can't parse 1a after the phrase "or maybe", > and I'm not sure about 1b. Can you reword them, making it clearer when > you're using a Clojure keyword? I want to be sure I understand what > you're saying--it sounds

Re: Collaboration Proposal: Beyond CLOS Generic Methods, Predicate Dispatch, and Pattern Matching

2011-05-12 Thread David Nolen
On Thu, May 12, 2011 at 10:26 PM, Brent Millare wrote: > Hey, > > Can you give a simple explanation how your methods would be faster > than multimethods. Does this mean your implementation uses protocols > underneath? How does multimethods work? How many branches? > > -Brent > There's quite a bit

Re: Collaboration Proposal: Beyond CLOS Generic Methods, Predicate Dispatch, and Pattern Matching

2011-05-12 Thread Heinz N. Gies
Hearing Pattern Matching, do you mean Erlang like Pattern matching? Regards, Heinz smime.p7s Description: S/MIME cryptographic signature

Re: Import other .clj files

2011-05-12 Thread MohanR
I am able to set the swank-clojure-classpath and also verify it using C-h v. It has the current directory "." and also other directories where .clj files are located If a .clj file has a namespace I ensure the classpath points to the root of the namespace folder structure like I do with Java. Wh