Re: Where are the videos for Clojure Conj 2013

2013-12-31 Thread Richard Cole
Nice to see them coming through on ClojureTV channel on youtube. I'm very much enjoying the presentations. Thankyou. regards, Richard. -- -- 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

Re: case/java interop weirdness

2013-12-31 Thread Paul Butcher
On 30 Dec 2013, at 16:34, Cedric Greevey cgree...@gmail.com wrote: To do it with case, you'd need to wrap case in a macro that expanded to `(case ~thingy ~(eval case1) ...) or something along those lines Thanks, but I suspect that that might be another way of saying use condp :-) Cheers,

Re: bug in clojure.zip when calling next on empty list node?

2013-12-31 Thread John Mastro
Hi Lee, Can anyone tell if I'm right that this is a bug in clojure.zip? If so, then is the right thing to do to post an issue on JIRA? I don't have any insight regarding whether this is a bug (haven't yet had an opportunity to dig into clojure.zip or zippers in general). However, I think

Parallel http requests

2013-12-31 Thread chinmoy debnath
I am a newbie in clojure. I need to send multiple http requests in parallel and need to have a call back when response for each request come back. What will be the idiomatic way of doing it in clojure? Thanks in advacne -- -- You received this message because you are subscribed to the Google

Deploying Caribou on Openshift

2013-12-31 Thread Leon Talbot
What would be the simplest way to deploy a Caribou app on openshift? -- -- 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

Re: Parallel http requests

2013-12-31 Thread Mikera
I'd suggest taking a look at the http-kit client library: http://http-kit.org/client.html On Tuesday, 31 December 2013 08:46:53 UTC, chinmoy debnath wrote: I am a newbie in clojure. I need to send multiple http requests in parallel and need to have a call back when response for each request

Re: Recommendations for a project with learning-friendly bugs and devs?

2013-12-31 Thread Jakub Holy
Thanks a lot, Mikera and Tim! I have started looking into Incanter but especially Leiningen sounds as something that is good to know better. Happy new year! On Sunday, December 29, 2013 3:53:44 AM UTC+1, Tim Visher wrote: Leiningen as well. :) On Fri, Dec 27, 2013 at 1:53 PM, Jakub Holy

Re: Akka-like framework in Clojure ?

2013-12-31 Thread Jakub Holy
I too have heard that using Akka from Clojure is not so easy, see Distributed Actors in Clojurehttp://martinsprogrammingblog.blogspot.no/2012/05/distributed-actors-in-clojure.html(5/2012) – a discussion of options for Akka-like stuff in Clojure. Akka is great but “interfacing to Akka from

Migrating from nrepl.el to cider

2013-12-31 Thread mwillson
Folks, I've recently migrated to cider on two platforms, Mac OS X (Mavericks) and Debian Wheezy. With each, I encountered one issue, but different in each case. If these are worth reporting formally, I'd be happy to do so. 1. Mac OS X Once cider was installed, I was unable to use

Re: Parallel http requests

2013-12-31 Thread Timothy Baldridge
http-kit is great, and here's an example of using it with core.async to manage the callbacks: https://github.com/halgari/clojure-conj-2013-core.async-examples/blob/master/src/clojure_conj_talk/core.clj#L361 Timothy On Tue, Dec 31, 2013 at 7:10 AM, Mikera mike.r.anderson...@gmail.comwrote: I'd

Re: Parallel http requests

2013-12-31 Thread Jan Herich
Maybe it's not exactly what you need, but i did similar thing once - i needed to scrape many linked html resources to extract tree data structure, each request/parse operation took considerable time - around 2 seconds - i was using clj-http/enlive combo (which is actualy Apache HttpClient/

Re: Migrating from nrepl.el to cider

2013-12-31 Thread Gary Trakhman
I've seen the pprint error on startup often. On Tue, Dec 31, 2013 at 9:47 AM, mwillson cdr@gmail.com wrote: Folks, I've recently migrated to cider on two platforms, Mac OS X (Mavericks) and Debian Wheezy. With each, I encountered one issue, but different in each case. If these are

Re: case/java interop weirdness

2013-12-31 Thread Cedric Greevey
Not really, as the lookups will happen at macroexpansion time and not at runtime. It should be as efficient as a normal (case ...). On Tue, Dec 31, 2013 at 7:00 AM, Paul Butcher p...@paulbutcher.com wrote: On 30 Dec 2013, at 16:34, Cedric Greevey cgree...@gmail.com wrote: To do it with case,

Re: Akka-like framework in Clojure ?

2013-12-31 Thread Cedric Greevey
On Tue, Dec 31, 2013 at 9:26 AM, Jakub Holy jakub.h...@iterate.no wrote: I also believe that Rich Hickey has some good reasons for why / when not to use actor-based concurrency. I cannot find the reference now, perhaps it is mentioned (also) in the StrangeLoop 2013 Clojure core.async

Re: bug in clojure.zip when calling next on empty list node?

2013-12-31 Thread Armando Blancas
The implementation of seq-zip uses seq? as its branching predicate. As a result the zipper goes down on () thinking it can have children: user= (seq? ()) true user= (seq? {}) false user= (seq? #{}) false user= (seq? []) false On Sunday, December 29, 2013 10:14:23 AM UTC-8, Lee wrote: I

some clojure experience

2013-12-31 Thread Dennis Haupt
i solved a few little thingy with clojure now, including some euler problems, java interop and an asteroids clone. my summary would be: * very nice to write +1. i used clojure's collections for a lot of things, and they made a good impression * you need to plan far ahead compared to java. in

Re: some clojure experience

2013-12-31 Thread Gary Trakhman
hallucinated interfaces : I like it :-). I think of it as 'data shapes', or implicit contracts. The added value/cost over explicit types is it's open to interpretation and the reader's subjectivity. Let me tell you, when you work with large amounts of uncommented clojure code, the flexibility

Re: bug in clojure.zip when calling next on empty list node?

2013-12-31 Thread Lee Spector
On Dec 31, 2013, at 5:08 PM, Armando Blancas wrote: The implementation of seq-zip uses seq? as its branching predicate. As a result the zipper goes down on () thinking it can have children: user= (seq? ()) true user= (seq? {}) false user= (seq? #{}) false user= (seq? []) false Does

Re: bug in clojure.zip when calling next on empty list node?

2013-12-31 Thread Michał Marczyk
Ticket with patch at http://dev.clojure.org/jira/browse/CLJ-1317 The problem is that seq-zip uses clojure.core/identity as the children argument to zipper. Applied to (), this returns (), but clojure.zip expects the children function to return nil when there are no children. The patch attached

Re: bug in clojure.zip when calling next on empty list node?

2013-12-31 Thread Michał Marczyk
Oh, and of course you can use the amended version now to obtain the expected results: (defn seq-zip Returns a zipper for nested sequences, given a root sequence {:added 1.0} [root] (zipper seq? seq (fn [node children] (with-meta children (meta node)))

Re: bug in clojure.zip when calling next on empty list node?

2013-12-31 Thread Lee Spector
On Dec 31, 2013, at 6:53 PM, Michał Marczyk wrote: Ticket with patch at http://dev.clojure.org/jira/browse/CLJ-1317 [and] Oh, and of course you can use the amended version now to obtain the expected results: /// Thank you so much Michał! -Lee -- -- You received this message because

Re: bug in clojure.zip when calling next on empty list node?

2013-12-31 Thread Michał Marczyk
No worries. Incidentally, akhudek's fast-zip seems to have the same issue. Here's a PR fixing it: https://github.com/akhudek/fast-zip/pull/3 Cheers, Michał On 1 January 2014 02:12, Lee Spector lspec...@hampshire.edu wrote: On Dec 31, 2013, at 6:53 PM, Michał Marczyk wrote: Ticket with

core.async - extracting code from a go block

2013-12-31 Thread Paul Butcher
I recently discovered that parking calls only work if they're directly contained within a go block. So this works fine: (defn foo [ch] (go (! ch))) But this: (defn bar [ch] (! ch)) (defn foo [ch] (go (bar ch))) Results in Assert failed: ! used not in (go ...) block Is there

Re: core.async - extracting code from a go block

2013-12-31 Thread Luc Prefontaine
I would say use macros to avoid hiding calls from the go macro scope. Luc P. I recently discovered that parking calls only work if they're directly contained within a go block. So this works fine: (defn foo [ch] (go (! ch))) But this: (defn bar [ch] (! ch)) (defn foo

Re: core.async - extracting code from a go block

2013-12-31 Thread Cedric Greevey
It should work if it's inlined or a macro. It won't shrink foo's generated code size any if bar is a macro, but it will split up the source code into smaller pieces if that's all you're concerned about. On Tue, Dec 31, 2013 at 8:50 PM, Paul Butcher p...@paulbutcher.com wrote: I recently

ANN - [vinyasa 0.1.0] - Give your clojure workflow more flow

2013-12-31 Thread zcaudate
I've been rethinking my clojure workflow and came up with this little library, allowing sweet customisations of the clojure.core namespace for development purposes: https://github.com/zcaudate/vinyasa It has three functions - pull, lein, inject - and their uses are described below. Chris.

Re: ANN - [vinyasa 0.1.0] - Give your clojure workflow more flow

2013-12-31 Thread zcaudate
I've done a write up of my workflow here: http://z.caudate.me/give-your-clojure-workflow-more-flow/ -- -- 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

Re: core.async - extracting code from a go block

2013-12-31 Thread Timothy Baldridge
A few other things that might help: 1) you can use (put! c val) from inside any function. Sometimes if you want to fire and forget a send, that might be the best option 2) you can wrap the code inside the sub fns inside another go. This isn't as slow as you might think 3) think about using