Re: Sequential conditional transforms of an argument

2013-07-07 Thread Laurent PETIT
thank you all for your answer. So to go back to my original concern, there does not seem to be a way to do this as I intended by just combining the existing features in core. Cheers, -- Laurent 2013/7/8 Yoshinori Kohyama : > Hi Laurent, > > How about a macro like below? > > (defmacro tt >

Don't understand why this core.async code fails

2013-07-07 Thread vemv
As you can read here: http://martintrojer.github.io/clojure/2013/07/07/coreasync-and-blocking-io doing blocking IO in a go block should be avoided. So I was thinking that an alternative to non-blocking IO APIs is using agents and channels. The following sample program intends to illustrate the

Re: Sequential conditional transforms of an argument

2013-07-07 Thread Yoshinori Kohyama
Hi Laurent, How about a macro like below? (defmacro tt ([x] x) ([x ts tr & more] `(tt (if (~ts ~x) (~tr ~x) ~x) ~@more))) To use this, (tt x test1 transform1 test2 transform2 test3 transform3) This doesn't work even number of arguments as you see. HTH, Y.Kohyama -- -- You recei

Re: ClojureScript browser REPL goes bonkers after it evals

2013-07-07 Thread James MacAulay
I was consistently experiencing this issue, and upgrading to leiningen 2.2.0 fixed it for me. The root issue was in nrepl: http://dev.clojure.org/jira/browse/NREPL-39 It was fixed in nrepl-0.2.3, which got into leiningen-2.2.0 via reply-0.2.0. On Tuesday, 26 February 2013 07:55:01 UTC-5, David

ANN: codn, clojure source code as EDN data

2013-07-07 Thread kovas boguta
Codn parses clojure source code into pure EDN structures. github: https://github.com/kovasb/codn clojars: [codn/codn "0.1.0-SNAPSHOT"] The main use case I have in mind is doing source code analysis, but there are others. The clojure reader (and clojure.tools.reader) interpret reader macros, thus

Overflowing (count ...)

2013-07-07 Thread John Jacobsen
Was unsure whether to post to clojure or clojure-dev, but here goes. I was surprised to learn today that count silently overflows to negative numbers: jenome.core> (time (count (range (*' 1000 1000 1000 3 "Elapsed time: 375225.663 msecs" -1294967296 jenome.core> I can easily get around thi

ANN: conditions 0.1.0, a simple resumable exceptions library

2013-07-07 Thread Ben Wolfson
Hello all, I'm releasing a small library for using resumable exceptions, aka conditions, in Clojure. Resumable exceptions allow the decision about what kind of response to take to an exception to be made in a separate place (higher up the call stack) from where the actual response itself is taken

core.async & ring middleware vs pedestal interceptors

2013-07-07 Thread bernardH
Dear clojurians, Like many others here, I'm thrilled by the new core.async and wondering about all the goodies that we will be able to reap from it. Thinking about how it decouples the abstracts "threads" of execution with the concrete implementation thread(s) especially in the context of non-blo

Re: Contrib libs where the name starts with "core."

2013-07-07 Thread John Gabriele
Thanks, Jeremy, and thanks also for the additional info. :) On Sunday, July 7, 2013 12:12:05 PM UTC-4, Jeremy Heiler wrote: > > The "core" contribs are basically language extensions that don't need to > be shipped in the Clojure jar. In some case, they're better off being on > their own because

Re: Most idiomatic way to split a string into sentences by punctuation?

2013-07-07 Thread Cedric Greevey
On Sun, Jul 7, 2013 at 12:29 PM, Denis Papathanasiou < denis.papathanas...@gmail.com> wrote: > > > On Sunday, July 7, 2013 6:06:06 AM UTC-4, Jim foo.bar wrote: >> >> I'm not sure I follow what you mean...both regexes posted here preserve >> the punctuation...here is mine (ignore the names - it is

Re: Most idiomatic way to split a string into sentences by punctuation?

2013-07-07 Thread Denis Papathanasiou
On Sunday, July 7, 2013 6:06:06 AM UTC-4, Jim foo.bar wrote: > > I'm not sure I follow what you mean...both regexes posted here preserve > the punctuation...here is mine (ignore the names - it is in fact the same > regex): > You're right; I was actually referring to the suggestions Lars had m

Re: Contrib libs where the name starts with "core."

2013-07-07 Thread Jeremy Heiler
The "core" contribs are basically language extensions that don't need to be shipped in the Clojure jar. In some case, they're better off being on their own because then their release cycles are independent from the core language. The other prefixes are used when it makes sense to use something m

Re: New CSS library - Garden

2013-07-07 Thread Steven Degutis
> > The beautiful thing about programming stylesheets in Clojure is that we > can come up with whatever abstractions/techniques we like without being > tied down by syntax. There's a lot of potential there for some interesting > ideas. In the past I've been bitten hard because the wrong

Re: Most idiomatic way to split a string into sentences by punctuation?

2013-07-07 Thread Jim - FooBar();
I'm not sure I follow what you mean...both regexes posted here preserve the punctuation...here is mine (ignore the names - it is in fact the same regex): hotel_nlp.concretions.artefacts=> (pprint (hotel_nlp.protocols/run reg-seg /"Statistics is closely related to probability theory, with which

Contrib libs where the name starts with "core."

2013-07-07 Thread John Gabriele
Why do some of the contrib library names begin with "core."? What's the difference between these and the other contrib libs (ex. java.jdbc or tools.reader)? -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clo

Re: core.async

2013-07-07 Thread Devin Walters
Interesting post. Thanks Cedric. '(Devin Walters) On Jul 6, 2013, at 6:59 PM, Cedric Greevey wrote: > The obvious approach is to use a future or other thread as an intermediary > between the blocking I/O read and a channel, then use !< on the channel in a > go; something like: > > (go > (l

[ANN] Instaparse 1.2.0

2013-07-07 Thread Mark Engelberg
Instaparse is an easy-to-use, feature-rich parser library. The big idea behind instaparse is to make it simple to convert grammars to parsers without needing to know the idiosyncrasies of LL1, LALR, and other esoteric grammar restrictions imposed by most