Re: Clojure Literature

2013-01-19 Thread Tim Cross
I started clojure right at the point where contrib changed. I think I had a lot less problems than did many who had already started and were use to the old setup. I didn't mention the contrib change because it was long before the dates the OP was talking about, because none of the books I

Re: a question about running embedded jetty

2013-01-19 Thread faenvie
https://github.com/ring-clojure/ring/wiki/Interactive-Development Ensure that: - Your Ring adapter is running in a background thread so it doesn't block your REPL. - Your handler function is wrapped in a var, so it will be updated when you reload the namespace. aha ...

Re: a question about running embedded jetty

2013-01-19 Thread Baishampayan Ghose
On Sat, Jan 19, 2013 at 5:24 AM, faenvie fanny.aen...@gmx.de wrote: i have learned that for a ring/compojure-app the embedded jetty service can be started like this: (def app (handler/site routes)) (defn start [port] (ring/run-jetty (var app) {:port (or port 8080)

Re: [ANN] Schejulure 0.1.1

2013-01-19 Thread Marko Topolnik
There is no need to wrap the Executor Service in a* delay* because it already implements lazy-start semantics. From the *ThreadPoolExecutor* Javadoc: On-demand constructionBy default, even core threads are initially created and started only when new tasks arrive, but this can be overridden

Re: a question about running embedded jetty

2013-01-19 Thread faenvie
very helpful answer. thank you Baishampayan. On Saturday, January 19, 2013 10:26:06 AM UTC+1, Baishampayan Ghose wrote: On Sat, Jan 19, 2013 at 5:24 AM, faenvie fanny@gmx.de javascript: wrote: i have learned that for a ring/compojure-app the embedded jetty service can be started

Re: ClojureScript + Jayq Resulting in Error

2013-01-19 Thread Max Penet
You need to use a more recent clojurescript version (you are missing clj-js from cljs.core). see https://github.com/ibdknox/jayq/blob/master/CHANGELOG.md#200-breaking-changes On Saturday, January 19, 2013 4:02:29 AM UTC+1, Ari wrote: I also noticed that when I compile the cljs code I get:

Re: [ANN] Schejulure 0.1.1

2013-01-19 Thread Adam Clements
Ah, thanks for the tip. I have now released 0.1.2 which is unchanged apart from this fix (not leaking ExecutorServices) and improved documentation. For the single threaded point, I have added in to the documentation that tasks with a non-trivial running time should fire futures in order to avoid

Re: [ANN] Schejulure 0.1.1

2013-01-19 Thread Marko Topolnik
For the single threaded point, I have added in to the documentation that tasks with a non-trivial running time should fire futures in order to avoid affecting subsequent scheduled tasks, which I think is a reasonable restriction to make given the resulting simplicity. I agree, this is a

Re: Get digits of a number

2013-01-19 Thread Qiu Xiafei
(defn num-digits [num] (loop [n num res []] (if (zero? n) res (recur (long (/ n 10)) (cons (mod n 10) res) 在 2011年2月17日星期四UTC+8下午1时29分10秒,Andreas Kostler写道: Is there an easy and idiomatic way of getting the digits of a number in clojure? (defn explode-to-digits

11th modern-cljs tutorial on clojurescript

2013-01-19 Thread Mimmo Cosenza
Hi all, here is the latest modern-cljs tutorial on clojurescript. It talks a little biro more about dom event and domina library. HIH, best mimmo https://github.com/magomimmo/modern-cljs/blob/master/doc/tutorial-11.md -- You received this message because you are subscribed to the Google

Re: Clojure Literature

2013-01-19 Thread Mimmo Cosenza
Hi, wherever you start from (all the cited books are from good to very good), I think that one day you could take you're time to read a couple amazing books. SICP: http://mitpress.mit.edu/sicp/ and Onlisp: http://www.paulgraham.com/onlisp.html I studied the first one (written for scheme)

Re: Clojure Literature

2013-01-19 Thread AtKaaZ
your* bG9sLCBzb3JyeS4gSSB0aG91Z2h0IGl0IHdhcyBmdW5ueSBtZS1jb3JyZWN0aW5nLXlvdSBhdCB0aGlzIHBvaW50IGFuZCBzZWVtaW5nIGFsbCBzZXJpb3VzOykgSSBob3BlIHlvdSBzbWlsZWQgYmVmb3JlIHJlYWRpbmcgdGhpcw== On Sat, Jan 19, 2013 at 5:33 PM, Mimmo Cosenza mimmo.cose...@gmail.comwrote: Hi, wherever you start from

Re: Clojure Literature

2013-01-19 Thread Charlie Griefer
On Jan 19, 2013, at 9:33 AM, Mimmo Cosenza mimmo.cose...@gmail.com wrote: Hi, wherever you start from (all the cited books are from good to very good), I think that one day you could take you're time to read a couple amazing books. SICP: http://mitpress.mit.edu/sicp/ SiCP also available

(newbie) function return results

2013-01-19 Thread Colin Yates
I am struggling to understand what Clojure is doing. This is definitely a newbie question but I cannot figure it out :). The question is best asked via a repl session: [code]user= (defn create-user [] {:id 1}) #'user/create-user user= (create-user) {:id 1} user= (take 10 (repeatedly

[ANN] clj-squash 0.1.0

2013-01-19 Thread Ragnar Dahlén
Hi, I did some work to enable Clojure applications to use Squash, an exception reporting and bug analysis tool recently released by Square (see http://www.square.io). This resulted in clj-squash (apologies for the lack of fantasy), which I think is now usable enough to warrant an offical

Re: Is contributing to clojurescript is intentionally made hard ?

2013-01-19 Thread Brandon Bloom
For what it's worth, I've submitted 20+ patches to ClojureScript and one or two to Clojure proper. I still find the process to be extremely unpleasant. I consistently avoid interacting with JIRA until the last possible minute: That software is actively user-hostile. Without naming names, I've

ANN ide-files--Leiningen template to generate IDE files for existing projects

2013-01-19 Thread Shantanu Kumar
Hi, I am happy to announce `ide-files` (version 0.1.0), a Leiningen template for generating Eclipse and IDEA files for existing Clojure projects. Leiningen issue #933[1] was the primary motivation. You can find the template here: https://github.com/kumarshantanu/ide-files Currently the template

Re: (newbie) function return results

2013-01-19 Thread Baishampayan Ghose
On Sat, Jan 19, 2013 at 11:32 PM, Colin Yates colin.ya...@gmail.com wrote: I am struggling to understand what Clojure is doing. This is definitely a newbie question but I cannot figure it out :). The question is best asked via a repl session: [code]user= (defn create-user [] {:id 1})

Re: (newbie) function return results

2013-01-19 Thread Sven Johansson
On Sat, Jan 19, 2013 at 7:02 PM, Colin Yates colin.ya...@gmail.com wrote: user= (defn stream1 [] repeatedly create-user) This function invokes neither repeatedly nor create-user. It pointlessly refers to repeatedly and then returns a reference to the create-user function. Which is function and

Re: Is contributing to clojurescript is intentionally made hard ?

2013-01-19 Thread Irakli Gozalishvili
On Friday, 2013-01-18 at 18:03 , Sean Corfield wrote: Because by submitting a JIRA patch explicitly, you are taking the legal responsibility for the contents of the patch as being a change that you are authorized to submit under the CA... You can in fact do similar with contributing

Re: (newbie) function return results

2013-01-19 Thread Colin Yates
Thanks both - (and yes I did mean brackets - oops). On 19 Jan 2013, at 18:26, Sven Johansson johansson.s...@gmail.com wrote: On Sat, Jan 19, 2013 at 7:02 PM, Colin Yates colin.ya...@gmail.com wrote: user= (defn stream1 [] repeatedly create-user) This function invokes neither repeatedly nor

Re: Get digits of a number

2013-01-19 Thread David Brown
Qiu Xiafei qiuxia...@gmail.com writes: (defn num-digits   [num]   (loop [n num res []]     (if (zero? n)       res       (recur (long (/ n 10)) (cons (mod n 10) res) How about (quot n 10) instead of (long (/ n 10))? No sense in the extra step. David -- You received this message

Re: Is contributing to clojurescript is intentionally made hard ?

2013-01-19 Thread Irakli Gozalishvili
As a matter of fact I have abandoned clojurescript once before and just wrote my own implementation of JVM free clojurescript subset: https://github.com/Gozala/wisp http://jeditoolkit.com/wisp/ But kanaka's clojurescript in clojurescript https://github.com/kanaka/clojurescript/ got me excited

Re: Is contributing to clojurescript is intentionally made hard ?

2013-01-19 Thread Irakli Gozalishvili
BTW also as hugo pointed out with http://www.clahub.com/ one could just reject pull requests if any of the commit included is from author who have not signed CLA yet. So looks like CLA problem can be also easily solved. Regards -- Irakli Gozalishvili Web: http://www.jeditoolkit.com/ On

Re: Clojure Literature

2013-01-19 Thread Marko Topolnik
I wouldn't worry too much about differences because a book was written for clojure 1.2 or 1.3 even though 1.5 is only just around the corner. The differences are minor and tend to be most directly related to more advanced topics that are unlikely to be of critical importance to begin

Re: Associative extends Seqable?

2013-01-19 Thread Ben Wolfson
On Fri, Jan 18, 2013 at 10:31 PM, Stephen Compall stephen.comp...@gmail.com wrote: First, I have a suggestion for your associative: make `seq' return (map vector (iterate inc' 0) (constantly the-const-value)). This would be a correct result, as far as it's possible to observe. True, but it

Re: Is contributing to clojurescript is intentionally made hard ?

2013-01-19 Thread Andy Fingerhut
On Jan 18, 2013, at 3:52 PM, Sean Corfield wrote: On Fri, Jan 18, 2013 at 1:33 PM, Andy Fingerhut andy.finger...@gmail.com wrote: The issue that Clojure, its contrib libraries, and ClojureScript do not accept github pull requests has been brought up several times before on this email list

Re: Is contributing to clojurescript is intentionally made hard ?

2013-01-19 Thread Andy Fingerhut
Irakli: I am curious about the possibility of auto-creating patches from git pull requests, in case that would bridge the divide between people that would prefer submitting pull requests, and Clojure screeners that would prefer evaluating patches and JIRA tickets. Causing a new git pull

Proposal: Suppressing tracebacks from clojure.core

2013-01-19 Thread me
Hi all I've been thinking about how long tracebacks get for pure Clojure errors, and it would be really nice if we could hide the Java traceback from the compiler when it's not relevant. When there's no Java interop, it's not useful. I can't see any case where we want the tracebacks from the

Re: Is contributing to clojurescript is intentionally made hard ?

2013-01-19 Thread Michael Klishin
Irakli Gozalishvili: If these things are intentionally made hard to stop new people with more clojurescipt interests then please make it more clear, cause otherwise it just a motivation killer. Irakli, Over the years, many people have tried raising the question of why contributing to

Re: Clojure Literature

2013-01-19 Thread Reginald Choudari
Wow, I did not expect the wide range of responses and opinions. A lot of valuable information here for a beginner like myself... Thanks to everyone who contributed.. Reginald On Friday, January 18, 2013 9:46:14 AM UTC-5, Reginald Choudari wrote: I am looking for a new Clojure book to get me

Re: Is contributing to clojurescript is intentionally made hard ?

2013-01-19 Thread Alexey Petrushin
+1 On Saturday, January 19, 2013 11:47:56 PM UTC+4, Andy Fingerhut wrote: On Jan 18, 2013, at 3:52 PM, Sean Corfield wrote: On Fri, Jan 18, 2013 at 1:33 PM, Andy Fingerhut andy.fi...@gmail.com javascript: wrote: The issue that Clojure, its contrib libraries, and ClojureScript do not

Re: A Working nrepl-ritz Setup?

2013-01-19 Thread fb
On Windows, I had to put the profiles.clj in the Windows home directory C:\Users\%user name%\AppData\Roaming, where also .emacs.d reesides (see also https://github.com/pallet/ritz/issues/28#issuecomment-12460118). -fb Am Mittwoch, 5. Dezember 2012 18:24:20 UTC+1 schrieb Hugo Duncan: Timothy

Re: How to (easily) show the advantages of Clojure

2013-01-19 Thread Denis Labaye
On Wed, Jan 16, 2013 at 4:08 PM, Thomas th.vanderv...@gmail.com wrote: Hi All, Something that came up last night in the blank? thread. What is a good way to show someone the advantages of Clojure. Something that is simple, not too complicated, easily understood, shows a (significant)

Re: Associative extends Seqable?

2013-01-19 Thread Stephen Compall
On Sat, 2013-01-19 at 11:39 -0800, Ben Wolfson wrote: You couldn't observe the breakage, but it would still the case that for many elements of the domain no finite subsequence of the seq contains those elements. Indeed, it would merely be observably correct, not actually correct. What do you

Re: ClojureScript + Jayq Resulting in Error

2013-01-19 Thread Evan Mezeske
A simple observation: Ari, you are using [lein-cljsbuild 0.2.9] while Ilia is using version 0.2.10. Also, you are using [org.clojure/clojurescript 0.0-1450]. I generally do not recommend specifying a clojurescript version explicitly -- the version that lein-cljsbuild defaults to is the one

Re: Is contributing to clojurescript is intentionally made hard ?

2013-01-19 Thread Aaron Cohen
Being the maintainer of an open source problem is a hard task. Contributing to a project is not a process that begins and ends with code submissions. In fact, it's often more work for a maintainer to accept a patch or pull request than it is for him or her to write the equivalent code himself.

Re: Is contributing to clojurescript is intentionally made hard ?

2013-01-19 Thread Aaron Cohen
Also, another blog post dealing with the open source code contribution issue: http://www.igvita.com/2011/12/19/dont-push-your-pull-requests/ On Sat, Jan 19, 2013 at 5:38 PM, Aaron Cohen aa...@assonance.org wrote: Being the maintainer of an open source problem is a hard task. Contributing to

Re: Associative extends Seqable?

2013-01-19 Thread Ben Wolfson
On Sat, Jan 19, 2013 at 1:26 PM, Stephen Compall stephen.comp...@gmail.com wrote: What do you return for count, though? I don't currently implement count. There are other ways to make trouble anyway: it's perfectly possible to define infinite sets that support conjoining, disjoining, union,

Re: Is contributing to clojurescript is intentionally made hard ?

2013-01-19 Thread Brandon Bloom
contributions to clojure are definitely less easy to make than to projects that willy-nilly accept any pull request. False dichotomy. Accepting pull requests does not mean you need to be willy-nilly about it. You know how people carefully optimize their signup forms and checkout flows? They

Re: Is contributing to clojurescript is intentionally made hard ?

2013-01-19 Thread Brandon Bloom
Aaron, please forgive my failure at formalities: Allow me to add that I agree with the rest of your post. The Linux kernel and Guava guys are absolutely right about patches defaulting to the rejected state. I'm a big believer in the minus 100 points philosophy. It's just that I just really

Re: Is contributing to clojurescript is intentionally made hard ?

2013-01-19 Thread Softaddicts
Yep, tools to maintain tickets suck, Jira, Mantis,... However, having Clojure code in production 24/7 and ClojureScript code reaching production status in a month or so, I feel reassured that a maintenance process is in place and that patch screening is tight. We have enough doing the same

Re: a question about running embedded jetty

2013-01-19 Thread Feng Shen
I did not know #'app is for reload. It's very helpful. Thanks. On Saturday, January 19, 2013 5:26:06 PM UTC+8, Baishampayan Ghose wrote: On Sat, Jan 19, 2013 at 5:24 AM, faenvie fanny@gmx.de javascript: wrote: i have learned that for a ring/compojure-app the embedded jetty service

Re: How to (easily) show the advantages of Clojure

2013-01-19 Thread Tim Cross
I think it depends a lot on your audience. For example, java spring programmers are likely going to be impressed by the simplicity and speed at which you can get a project started, especially when using lein and being able to avoid the common load of bolerplate java, xml, etc. Programmers

Re: Associative extends Seqable?

2013-01-19 Thread Stephen Compall
On Sat, 2013-01-19 at 14:56 -0800, Ben Wolfson wrote: Such sets couldn't support forward domain transformation, though, because membership testing could then fail to terminate. Given the definition of seq you suggested above, membership testing for a transformed map will also be in danger

[ANN] Leiningen 2.0.0 released

2013-01-19 Thread Phil Hagelberg
Greetings fellow Clojure people. I've just pushed out the final release of Leiningen 2.0.0. The changes since the last release candidate have mostly been minor bugfixes. Highlights since 1.x include profiles, a much-improved REPL, signature support, partial application of aliases, offline mode,

Re: Is contributing to clojurescript is intentionally made hard ?

2013-01-19 Thread Irakli Gozalishvili
I think Brandon, in fact I discovered bunch of clojurescript bugs while working on my wisp project but since submitting and fixing them felt like too much work I just ignored them. Unfortunately I keep looking into my fixes now to back port them to cljs_in_cljs. I also absolutely agree if

Re: Is contributing to clojurescript is intentionally made hard ?

2013-01-19 Thread Irakli Gozalishvili
As of comments related to projects that also make contributions hard that's their choice, and I really hope clojure community will do better than that. I also know that sometimes rewriting patch is a lot less work than making someones contribution acceptable, my day job involves all of that,

Re: Is contributing to clojurescript is intentionally made hard ?

2013-01-19 Thread Irakli Gozalishvili
On Saturday, 2013-01-19 at 11:56 , Andy Fingerhut wrote: Irakli: I am curious about the possibility of auto-creating patches from git pull requests, in case that would bridge the divide between people that would prefer submitting pull requests, and Clojure screeners that would prefer

Re: Is contributing to clojurescript is intentionally made hard ?

2013-01-19 Thread Irakli Gozalishvili
Than Sean for pointing to that thread that's helpful although that got me wondering if Rich is only one doing the reviews ? If that's not the case maybe there at least on maintainer that is willing to bridge the gap here ? I really hope someone will step up to bridge the gap, maybe setup a fork

Re: Is contributing to clojurescript is intentionally made hard ?

2013-01-19 Thread Irakli Gozalishvili
I would be curious to also see number of lost contributors. Regards -- Irakli Gozalishvili Web: http://www.jeditoolkit.com/ On Saturday, 2013-01-19 at 22:00 , David Nolen wrote: I have nothing to add to this thread beyond pointing out that ClojureScript has had _51_ contributors in the

Re: Is contributing to clojurescript is intentionally made hard ?

2013-01-19 Thread Irakli Gozalishvili
Anyway it's seems to me that message in this thread is pretty clear: We're just doing fine without people like you It's a shame, but whatever I'll just shut up and let you guys roll as you pleased Regards -- Irakli Gozalishvili Web: http://www.jeditoolkit.com/ On Saturday, 2013-01-19 at

Re: [ANN] Leiningen 2.0.0 released

2013-01-19 Thread Peter Taoussanis
Hey, congratulations! Thank you so much Phil and everyone else for making this happen. I still remember the pre-Leiningen 1 days with the occasional dependency-script PTSD flashback. Lein 2 is a great big step up from 1. All kinds of awesome. Well done! -- You received this message because

Re: Is contributing to clojurescript is intentionally made hard ?

2013-01-19 Thread Dave Sann
It is great that questions are being asked about how things do, might or should work - but tone of the original question and the ensuing discussion, in my view, unfortunate. On Sunday, 20 January 2013 17:36:11 UTC+11, Irakli Gozalishvili wrote: Anyway it's seems to me that message in this