Re: better way to group consecutive numbers in a vector?

2014-11-07 Thread vvedee
(let [data [1 3 4 5 7 9 10 11 12] seen (atom (first data))] (partition-by #(if ( (- % @seen) 2) (do (reset! seen %) true) (do (reset! seen %) false)) data)) ((1) (3 4 5) (7) (9 10 11 12)) On Thursday, November 6, 2014 11:22:14 PM

Re: Introducing Boot v2 with a streamlined CLJS workflow

2014-11-07 Thread Henrik Eneroth
I tried now, just running boot -u, and it worked perfectly. It's was probably some caching thing with Clojars. Currently at pre21 Now the command runs without errors, but it also doesn't seem to do all that much. Running boot -d reagent/reagent:0.4.3 gives the exact same output as running

Re: Introducing Boot v2 with a streamlined CLJS workflow

2014-11-07 Thread Laurent PETIT
Really looking forward to a couple more blog posts: - an instructive / provocative one which could be named after how to replace leiningen with boot 2. Would be very practical, showing how all major usecases done with lein translate to boot. - an tutorial / documenting one on how to write new

Re: Introducing Boot v2 with a streamlined CLJS workflow

2014-11-07 Thread Henrik Eneroth
Agreed, because it seems like a good tool. :-) On that vein; what's the syntax for add-src? I'm trying to include helper.cljs in the project, a file with a bunch of convenience functions that I use. However, I get the following error: stopping Jetty...

Re: better way to group consecutive numbers in a vector?

2014-11-07 Thread Paweł Rozynek
(def data '(1 3 4 5 7 9 10 11 12)) (map #(map last %) (partition-by #(apply - %) (map-indexed vector data))) = ((1) (3 4 5) (7) (9 10 11 12)) regards PR -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to

Re: Introducing Boot v2 with a streamlined CLJS workflow

2014-11-07 Thread Micha Niskin
Henrik, the -d option simply adds dependencies to the project. The main use case for this option is to pull in dependencies when you have no formal “project” and no build.boot file. Mainly it’s used in concert with the repl task so you can quickly and easily try something out: $ boot -d

Re: Introducing Boot v2 with a streamlined CLJS workflow

2014-11-07 Thread Micha Niskin
Oh, I forgot to say, the ^:boot/export-tasks convention makes boot into a sort of application container. You can use boot to pull code from the internet and run it. This is really nice when combined with Docker, for example, but I’m sure we haven’t even found the coolest uses for this yet. We’re

Re: Introducing Boot v2 with a streamlined CLJS workflow

2014-11-07 Thread Henrik Eneroth
Gotcha! Thanks! On Friday, November 7, 2014 4:22:35 PM UTC+1, Micha Niskin wrote: Henrik, the -d option simply adds dependencies to the project. The main use case for this option is to pull in dependencies when you have no formal “project” and no build.boot file. Mainly it’s used in concert

Re: Introducing Boot v2 with a streamlined CLJS workflow

2014-11-07 Thread Micha Niskin
Henrik, can you make a github repo with what you were trying to do in your second question? It would help to be able to see your whole setup. The add-src task is perhaps confusingly named (Names Are Hard). Its purpose is to shuffle files around in the file set, moving files that would normally be

[JOB] Full Time Clojure Remote Pair Programming (North America only)

2014-11-07 Thread 'Carin Meier' via Clojure
Join a top-notch development team at Outpace! We deliver great software to happy customers using cutting-edge technologies and practices. We live in Clojure and love it. Outpace offers a unique development environment: - You’ll find programmers that love Clojure as much as you

Re: Introducing Boot v2 with a streamlined CLJS workflow

2014-11-07 Thread Laurent PETIT
Just to check that I correctly understood the concepts : - it's upfront, in the task itself, that the decision of whether what the task produces is of type input or output. - flagging part of its output as input type is a way to declare to boot that the files there MUST be processed further, at

Re: Introducing Boot v2 with a streamlined CLJS workflow

2014-11-07 Thread Micha Niskin
I'll answer inline below: On Friday, November 7, 2014 12:15:55 PM UTC-5, Laurent PETIT wrote: Just to check that I correctly understood the concepts : - it's upfront, in the task itself, that the decision of whether what the task produces is of type input or output. - flagging part of

Re: Introducing Boot v2 with a streamlined CLJS workflow

2014-11-07 Thread Micha Niskin
One thing I forgot to mention is that tasks all agree to not know or care about where any of these directories are actually located on the filesystem. Boot provides functions by which the set of files (input or output) can be obtained. The tasks, when they operate on these files, pay attention

Re: better way to group consecutive numbers in a vector?

2014-11-07 Thread Alex Hammel
Here's my take on the 'add delimiters and split' approach. Bonus `congeal function, which chunks collections on any condition you like: (defn- insert-gaps [coll pred gap-symbol] (reduce (fn [acc x] (if (pred (peek acc) x) (conj acc x) (conj acc

Re: better way to group consecutive numbers in a vector?

2014-11-07 Thread Jan-Paul Bultmann
I think what you want is `partition-between` as implemented by amalloys useful lib (https://github.com/amalloy/useful/blob/develop/src/flatland/useful/seq.clj#L224 https://github.com/amalloy/useful/blob/develop/src/flatland/useful/seq.clj#L224). `(partition-between (fn [x y]

updated web server benchmarks

2014-11-07 Thread Zach Tellman
New benchmarks have been run for a variety of Clojure web servers, and the results can be found at https://github.com/ptaoussanis/clojure-web-server-benchmarks#ubuntu-1404--2x-xeon-x5650. The top-performing servers are based on Undertow (ring-undertow, Immutant v2), Netty (Aleph), and nginx

Re: Potential improvement to select-keys ?

2014-11-07 Thread Kendall Buchanan
I'll attempt an argument for returning the record's type in another way: I can always get a PersistentArrayMap from select-keys, if I want. Just add (into {} ...) to the chain. I cannot, however, retain the record type because select-keys *makes the decision for me*. In other words, letting

ANN ClojureWerkz Money 1.7.0 is released

2014-11-07 Thread Michael Klishin
Money [1] a tiny Clojure library that deals with monetary amounts and currencies. It is built on top of Joda Money [2]. Release notes: http://blog.clojurewerkz.org/blog/2014/11/07/money-1-dot-7-0-is-released/ 1. https://github.com/clojurewerkz/money/ 2. http://joda-money.sourceforge.net/ --

ANN metrics-clojure 2.4.0 is released

2014-11-07 Thread Michael Klishin
metrics-clojure [1] is a Clojure interface to the Metrics library [2],    originally by Steve Losh [3].   Release notes:  http://blog.clojurewerkz.org/blog/2014/11/08/metrics-clojure-2-dot-4-0-is-released/ If you're new to metrics and not sure why collecting them is a good idea,   take a moment

Clojure - Java

2014-11-07 Thread Blake McBride
Greetings, I am an old lisp guy that is new to Clojure. At one time I wanted to use ABCL as a scripting language for a large, web-based Java app. (ABCL is Common Lisp written in for the JVM.) The integration and operation of it was easy and nice. I did, however, run into an insurmountable

Re: Clojure - Java

2014-11-07 Thread Timothy Washington
Hey Blake, Yeah, Clojure sits atop the JVM and has access to all its core classes. So just fire up a repl and evaluate *java.io.File/pathSeparator* or *(java.lang.Math/abs -37)* or something. You can get those Java Interop http://clojure.org/java_interop details here. As for the Clojure / Java