(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
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
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
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...
(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
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
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
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
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
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
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
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
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
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
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]
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
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
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/
--
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
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
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
21 matches
Mail list logo