Re: Type hinting inconsistencies in 1.3.0

2011-05-12 Thread Ken Wesson
On Thu, May 12, 2011 at 1:04 AM, David Nolen dnolen.li...@gmail.com wrote: On Wed, May 11, 2011 at 11:58 PM, Ken Wesson kwess...@gmail.com wrote: On Wed, May 11, 2011 at 9:04 PM, David Nolen dnolen.li...@gmail.com wrote: On Wed, May 11, 2011 at 7:43 PM, Chas Emerick cemer...@snowtide.com

Import other .clj files

2011-05-12 Thread MohanR
Hi, I am trying to import .clj files. What is the variable( load- path/swank-clojure-classpath) that should point to the directory containing other .clj files with their own namespaces ? I use ClojureBox. I am loading the file using C-c C-l but I see this error Could not locate

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 aroh...@gmail.com 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

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: sandbox= (defn bar [] foo)

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 cemer...@snowtide.com 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

Re: Type hinting inconsistencies in 1.3.0

2011-05-12 Thread Juha Arpiainen
On May 12, 1:18 pm, Ken Wesson kwess...@gmail.com 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

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

2011-05-12 Thread James Reeves
On 12 May 2011 04:49, Shree Mulay shreemu...@gmail.com 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))

Re: Learning Idiomatic Clojure

2011-05-12 Thread Mike Meyer
On Wed, 11 May 2011 19:10:13 -0700 (PDT) J.R. Garcia mrjohngar...@gmail.com 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

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. If

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:

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 m...@mired.org 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

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 m...@mired.org wrote: On Wed, 11 May 2011 19:10:13 -0700 (PDT) J.R. Garcia

Re: Small issue with swank-cdt on Windows

2011-05-12 Thread George Jahad
On May 11, 8:12 am, Aravindh Johendran ajohend...@gmail.com 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

Re: Learning Idiomatic Clojure

2011-05-12 Thread Mike Meyer
On Thu, 12 May 2011 07:45:50 -0700 (PDT) Adam Burry abu...@gmail.com wrote: On May 12, 11:54 am, Mike Meyer m...@mired.org 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

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 m...@mired.org wrote: On Thu, 12 May 2011 07:45:50 -0700 (PDT) Adam Burry abu...@gmail.com wrote: On May 12, 11:54 am, Mike Meyer m...@mired.org wrote: As others have said, this

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 from

Re: lein-daemon 0.3

2011-05-12 Thread Alfredo
Very useful indeed :) On May 12, 5:54 pm, Allen Rohner aroh...@gmail.com 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

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

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 jarpi...@gmail.com wrote: On May 12, 1:18 pm, Ken Wesson kwess...@gmail.com 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

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

2011-05-12 Thread James Reeves
On 12 May 2011 20:37, Shree Mulay shreemu...@gmail.com 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

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 islonsche...@gmail.com wrote: Read the joy of clojure, it's an amazing book that will teach you the

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

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 seancorfi...@gmail.com wrote: I'll +1

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 my

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 dnolen.li...@gmail.comwrote: 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

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 Dispatchinghttp://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.47.4553 Good place to start, covers why the feature I'm proposing would be useful. The algorithms

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 shreemu...@gmail.com 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

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 dnolen.li...@gmail.com wrote: On Thu, May 12, 2011 at

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 jarpi...@gmail.com wrote: On May 12, 1:18 pm, Ken Wesson kwess...@gmail.com wrote: This reads to me as implying that hinting (defn ^String foo [] ...) is hinting that foo references a String

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 cemer...@snowtide.com 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

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

Re: Learning Idiomatic Clojure

2011-05-12 Thread Ken Wesson
On Fri, May 13, 2011 at 12:29 AM, Gregg Williams greg...@innerpaths.net 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

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 brent.mill...@gmail.comwrote: 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