Re: Introducing Boot v2 with a streamlined CLJS workflow

2014-11-06 Thread Laurent PETIT
yes, it's working now, thanks 2014-11-06 0:28 GMT+01:00 Alan Dipert : > Hi Laurent, > The boot-cljs-example has started to move ahead of the blog post, and > includes an optional 'serve' task. > > There was a bug in the boot-cljs task that was deleting index.html > erroneously; I pushed a new ver

Re: how clojure infers types.

2014-11-06 Thread Gary Verhaegen
First of all, remember that Clojure usually assumes that the programmer is right and the program is correct, especially when not doing so would incur a performance penalty. It's important to remember what we are doing here. The Clojure compiler wants to emit the correct method call, and lets the J

Re: Dependency problem between clj-http and com.cemerick/friend

2014-11-06 Thread Christian Egli
Andy Fingerhut writes: > Try running 'lein deps :tree >& deps.txt' in each of those projects, > and diff them. I can't explain why the differences are there that > exist, but there are significant differences, including in version > numbers of some of the dependencies brought in. > > Asking on th

Re: Dependency problem between clj-http and com.cemerick/friend

2014-11-06 Thread Plínio Balduino
Christian I just forked friend, updated the library versions and opened a pull request. If you want to try and see if the problem still happens, please check https://github.com/pbalduino/friend Please note that it's not the official Friend repository, it's not intended to be a replacement and I'

Re: Dependency problem between clj-http and com.cemerick/friend

2014-11-06 Thread Christian Egli
Hi Plínio Plínio Balduino writes: > I just forked friend, updated the library versions and opened a pull > request. > > If you want to try and see if the problem still happens, please check > https://github.com/pbalduino/friend AFAIK the problem I have with friends dependencies is not the fact

Re: Dependency problem between clj-http and com.cemerick/friend

2014-11-06 Thread Plínio Balduino
I noticed that. You're correct. I updated my local copy of httpclient to 4.3.5 Plínio On Thu, Nov 6, 2014 at 11:23 AM, Christian Egli wrote: > Hi Plínio > > Plínio Balduino writes: > > > I just forked friend, updated the library versions and opened a pull > > request. > > > > If you want to t

Clojure User Group Mannheim zweites Treffen 12.11.2014 ab 19:00 Uhr im RaumZeitLabor

2014-11-06 Thread Andreas Klein
Liebe Clojurianer, wir möchten unser nächstes User Group Meeting für Mannheim und die Umgebung ankündigen. Das nächste Treffen findet am Mittwoch den 12.11.2014 ab 19:00 Uhr im Raumzeitlabor Mannheim statt. https://raumzeitlabor.de/kontakt/anfahrt/

Re: Dependency problem between clj-http and com.cemerick/friend

2014-11-06 Thread casphas
Hi Christian, Friend (at least in this version) and clj-http depend on different versions of org.apache.httpcomponents/httpclient. If the version friend wants wins (friend first in dependencies), clj-http gets an earlier version than it wants and fails because the earlier version does not provide

[ANN] Suricatta: 0.1.0-alpha - high level sql toolkit for clojure (backed by jooq)

2014-11-06 Thread Andrey Antukh
Hello everybody. I wanted to announce the first alpha release of suricatta, a high level sql toolkit for clojure (backed by fantastic jooq library) Main features: - Clear and simple sql executing api. - Asynchronous query execution api. - Lightweight sql dsl. You might be wondering: Yet an othe

Re: Introducing Boot v2 with a streamlined CLJS workflow

2014-11-06 Thread Henrik Eneroth
Hello Micha! I'm trying to tuck Reagent in there to take it for a spin, and it seems reluctant to comply: boot -d reagent/reagent:0.4.3 java.lang.NullPointerException: boot.main/dep-ns-decls main.clj: 36 boot.main/export-task-namespaces/fn main.clj: 49 clojure

Re: Introducing Boot v2 with a streamlined CLJS workflow

2014-11-06 Thread Micha Niskin
Hi Henrik, You found a bug! We just fixed it though. Boot was confused by `reagent/reagent` when it tried to match that against the artifact ids returned by Pomegranate, because Pomegranate collapses it to just `reagent` in that case. If you do `boot -u` you should be updated to boot version `

Re: clojure.test.check with fixtures

2014-11-06 Thread Sven Richter
Hi, thank you, I just wanted to make sure I am not missing some functionality. Best Regards, Sven Am Mittwoch, 5. November 2014 23:29:54 UTC+1 schrieb Ashton Kemerling: > > You can use fixtures from Clojure.test, but each spec from the perspective > of clojure.test includes multiple runs. So I

better way to group consecutive numbers in a vector?

2014-11-06 Thread John Gabriele
Hi all, I've got this: `[1 3 4 5 7 9 10 11 12]` and I'd like to turn it into this: `[[1] [3 4 5] [7] [9 10 11 12]]`. That is, I'd like to group consecutive numbers together (the final goal being to produce something like `["1" "3-5" "7" "9-12"]`, but that's the easy part). I haven't found an e

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

2014-11-06 Thread Ashton Kemerling
Consider using partition-by. I can't type clojure on my phone, but the following link might help. https://clojuredocs.org/clojure.core/partition-by --Ashton Sent from my iPhone > On Nov 6, 2014, at 3:22 PM, John Gabriele wrote: > > Hi all, > > I've got this: `[1 3 4 5 7 9 10 11 12]` > and I'

Re: Introducing Boot v2 with a streamlined CLJS workflow

2014-11-06 Thread Henrik Eneroth
Thanks for looking into it, Micha! I'm getting -pre19 with boot -u, though. Did you forget to cut a release or should I set BOOT_CHANNEL to dev? On Thursday, November 6, 2014 8:30:55 PM UTC+1, Micha Niskin wrote: > > Hi Henrik, > > You found a bug! We just fixed it though. Boot was confused b

Re: Introducing Boot v2 with a streamlined CLJS workflow

2014-11-06 Thread Micha Niskin
I don’t understand why Aether isn’t finding -pre20 via the coordinates [boot "RELEASE"]. I can see the jar file and pom in the repo: https://clojars.org/repo/boot/boot/2.0.0-pre20/. Do you have any idea why Pomegranate wouldn’t be fetching that? Is there some subtlety of the sorting order tha

Re: Introducing Boot v2 with a streamlined CLJS workflow

2014-11-06 Thread Micha Niskin
Does adding BOOT_CHANNEL=DEV boot -u do the trick? (We aren’t pushing snapshots currently so it should be the same…in theory.) On Thursday, November 6, 2014 5:50:14 PM UTC-5, Henrik Eneroth wrote: Thanks for looking into it, Micha! > > > I'm getting -pre19 with boot -u, though. Did you forget

Re: Introducing Boot v2 with a streamlined CLJS workflow

2014-11-06 Thread Micha Niskin
It looks like Clojars is doing what I thought it would do: https://clojars.org/repo/boot/boot/maven-metadata.xml 2.0.0-pre20 On Thursday, November 6, 2014 5:50:14 PM UTC-5, Henrik Eneroth wrote: Thanks for looking into it, Micha! > > > I'm getting -pre19 with boot -u, though. Did you forget

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

2014-11-06 Thread Steve Miner
I would try to avoid last and but-last as they work in linear time. How about something like this? (defn congeal-consecutives [coll] (when (seq coll) (let [[_ group res] (reduce (fn [[succ group res] n] (if (== succ n)

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

2014-11-06 Thread john walker
Hi John, As miner mentioned, peek is preferable to last for vectors. Here is an implementation based on the observation that consecutive increasing numbers are equivalent when you subtract their indices. Maybe it is more clever than simple. (ns experimental-clojure.congeal-consecutives) (def

Re: [ANN] Suricatta: 0.1.0-alpha - high level sql toolkit for clojure (backed by jooq)

2014-11-06 Thread john walker
Cool! I can see myself using this in an upcoming project. Thanks as usual for your work :) On Thursday, November 6, 2014 9:23:53 AM UTC-8, Andrey Antukh wrote: > > Hello everybody. > > I wanted to announce the first alpha release of suricatta, a high level > sql toolkit for clojure (backed by fa

Re: ClojureScript and development workflow

2014-11-06 Thread Asim Jalis
Hi Laurent, For refreshing the browser, I call (.reload js/location) from the browser REPL. So this is the workflow: Terminal 1: lein cljsbuild auto dev Terminal 2: lein trampoline cljsbuild repl-listen Browser: localhost:9000/myapp.html 1. I make change to the CLJS file. 2. cljsbuild auto dev

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

2014-11-06 Thread Gordon Stratton
On Thu, Nov 6, 2014 at 10:22 PM, John Gabriele wrote: > Hi all, > > I've got this: `[1 3 4 5 7 9 10 11 12]` > and I'd like to turn it into this: `[[1] [3 4 5] [7] [9 10 11 12]]`. > > That is, I'd like to group consecutive numbers together (the final goal > being to produce something like `["1" "3-

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

2014-11-06 Thread blake
I wanted to put the delimiters in one step and then split in a different one, so I did this: (defn delimit[v] (reduce #(if (= (last %) (dec %2)) (conj % %2) (conj % :split %2)) [(first v)] (rest v))) (delimit [1 3 4 5 7 9 10 11 12]) => [1 :split 3 4 5 :split 7 :s

Re: ClojureScript and development workflow

2014-11-06 Thread Chris Sims
I’m not sure that the original question is still valid, as it’s over 2 years old now. I’ve had success using figwheel[1] to automatically recompile Clojurescript and send the updated js to the browser, sans reloading. [1] https://github.com/bhauman/lein-figwheel > On Nov 6, 2014, at 4:57 PM, A

Re: ClojureScript and development workflow

2014-11-06 Thread Daniel Szmulewicz
My experience has been that the promise of hot reloadable code in the browser was fulfilled most reliably by lein-figwheel. I have relinquished all other solutions (which gave me trouble), and I am a happy with my newfound cljs workflow. https://github.com/bhauman/lein-figwheel On Monday, Septem

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

2014-11-06 Thread John Gabriele
On Thursday, November 6, 2014 8:48:07 PM UTC-5, blake wrote: > > I wanted to put the delimiters in one step and then split in a different > one, so I did this: > > (defn delimit[v] > (reduce #(if (= (last %) (dec %2)) > (conj % %2) > (conj % :split %2)) > [(first

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

2014-11-06 Thread Ben Wolfson
I don't know if this is *clearer* than the reduce version ... user> (def xs [1 3 4 5 7 9 10 11 12 ]) #'user/xs user> (defn consecutivizer [] (let [prev (atom nil) last-returned (atom (gensym))] (fn [cur] (when-not (or (nil? @prev)