Re: Past and future of data.generators

2014-06-08 Thread Mars0i
For the record, after doing some simple speed comparisons of ampling functions from Incanter, data.generators, and bigml/sampling (using Criterium, and making sure to doall lazy sequences), it appears that data.generators performs very well in some situations. -- You received this message

Re: Past and future of data.generators

2014-06-08 Thread Mars0i
For the record, I just did some simple speed comparisons of sampling functions from Incanter, data.generators, and bigml/sampling, and data.generators performs very well. It was fastest in some tests. -- You received this message because you are subscribed to the Google Groups Clojure group.

ANN Cassaforte 2.0.0-beta1 is released

2014-06-08 Thread Michael Klishin
Cassaforte [1] is a Clojure Cassandra client built around CQL 3. 2.0 is a major release that introduces breaking public API changes announced earlier [2]. Release notes: http://blog.clojurewerkz.org/blog/2014/06/07/cassaforte-2-dot-0-0-beta1-is-released/ 1. http://clojurecassandra.info 2.

[ANN] clecs 0.2.1

2014-06-08 Thread Atamert Ölçgen
clecs is an entity-component-system written in clojure. It is not production ready but it is complete in the sense you can use it for your hobby projects. It is available in clojars. The repo is here: https://github.com/muhuk/clecs I have written a rant about it[1] but I won't crosspost it

Re: Search seqs in seqs

2014-06-08 Thread Alex Walker
Err, this was bugging me all day when I went afk. I wrote it too quickly and am missing the case where the sub-seq starts right after seeing the first val, [:b :b :c]. Will fix it if I have time today, but may need to take a slightly different approach. Fun problem, btw. :) On Saturday,

Re: [ANN] clecs 0.2.1

2014-06-08 Thread James Reeves
I think you're reaching for mutability a little too soon. You could aim to be more functional, then leave the mutation up to atoms or megarefs. For example: (def empty-system {:entities {}, :components {}}) (let [i (java.lang.concurrent.atomic.AtomicInteger. 1) (defn new-id

Re: ClojureScript Clojure 1.6.0

2014-06-08 Thread David Nolen
I don't think we want cut such a release just yet. I think it would be more informative to understand what's holding people off of 1.6.0. David On Sat, Jun 7, 2014 at 4:42 PM, Joshua Ballanco jball...@circleci.com wrote: At the risk of suggesting something completely heretical… Would it be

Re: Search seqs in seqs

2014-06-08 Thread Alex Walker
https://gist.github.com/alexpw/f20c7b3ac858003e07e2 This version supports the missing case: ;; Case: false match :b, followed by true match :b :c (= (partition-by-seq [:b :c] [:a :b :b :c :e :d :a :b :c :d :a :b :c]) '((:a :b) (:b :c) (:e :d :a) (:b :c) (:d :a) (:b :c))) On Sunday, June 8,

Re: ClojureScript Clojure 1.6.0

2014-06-08 Thread David Nolen
1.6.0 branch is ready to be tested http://github.com/clojure/clojurescript/tree/1.6.0, please give it a try in your projects. You can install this version of ClojureScript by * checking out the repo * git checkout 1.6.0 * ./script/install Take note of the version number that gets installed into

[ANN] dar.async - lighter, faster alternative to core.async

2014-06-08 Thread Эльдар Габдуллин
https://github.com/dar-clojure/async core.async is heavily focused on CSP. While CSP itself might be a good idea, it's certainly not the case that every async problem is a CSP problem. For example, you often use go block just because it allows to write non-blocking code in a regular linear

Re: How to debug this trace involving Korma

2014-06-08 Thread Leon Talbot
Thank you Sean and Zeynel! This has been really useful: lein repl = (in-ns 'guestbook.db.schema) = (require :reload 'guestbook.db.schema) = (create-tables) Le dimanche 29 décembre 2013 18:43:34 UTC-5, Zeynel a écrit : Yes, I was having problems with the emacs repl

a data conversion question

2014-06-08 Thread boz
Is there a better way to take this... [[:a [1 2]] [:b [3 4]]] and convert it to this... [[:a 1] [:a 2] [:b 3] [:b 4]] than using a loop like this... (defn doit [id v] (loop [a (first v) r (rest v) result []] (if a (recur (first r) (rest r) (conj result [id a]))

Re: a data conversion question

2014-06-08 Thread François Rey
(for[[k v] [[:a [1 2]] [:b [3 4]]] n v] [k n]) -- 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 with your

Re: a data conversion question

2014-06-08 Thread Alex Walker
(mapcat (fn [[k coll]] (map vector (repeat k) coll)) [[:a [1 2]] [:b [3 4]]]) = '([:a 1] [:a 2] [:b 3] [:b 4]) On Sunday, June 8, 2014 2:12:19 PM UTC-5, boz wrote: Is there a better way to take this... [[:a [1 2]] [:b [3 4]]] and convert it to this... [[:a 1] [:a 2]

Re: a data conversion question

2014-06-08 Thread Lee Spector
On Jun 8, 2014, at 3:12 PM, boz b...@cox.net wrote: Is there a better way to take this... [[:a [1 2]] [:b [3 4]]] and convert it to this... [[:a 1] [:a 2] [:b 3] [:b 4]] than using a loop like this... (defn doit [id v]

Re: a data conversion question

2014-06-08 Thread François Rey
If you really want a vector, just wrap my answer with (into [] ...): (into[] (for[[k v] [[:a [1 2]] [:b [3 4]]] n v] [k n])) = [[:a 1] [:a 2] [:b 3] [:b 4]] -- You received this message because you are subscribed to the Google Groups Clojure group. To

Re: a data conversion question

2014-06-08 Thread boz
Thanks for the replies!! I goofed and only gave part of my loopy solution ... here's the whole thing (defn do-one [id v] (loop [a (first v) r (rest v) result []] (if a (recur (first r) (rest r) (conj result [id a])) result))) (defn do-all [x] (loop [a (first x) b (rest x)

Re: Extend-protocol to numbers fails with zero in CLJS

2014-06-08 Thread Karsten Schmidt
Thanks, Logan - that helped indeed! I also saw the compiler warning about that, but wasn't quite sure what to make of it and my solution seemed to work, at least until I tested with zero... Having said this, I've never seen or heard of a `number` type and found the lowercase naming very

Re: a data conversion question

2014-06-08 Thread boz
Wow! 'for' is a powerful thing!! This is perfect! On Sunday, June 8, 2014 12:32:44 PM UTC-7, François Rey wrote: (for [[k v] [[:a [1 2]] [:b [3 4]]] n v] [k n]) -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group,

Re: Search seqs in seqs

2014-06-08 Thread Ulrich Küttler
This is sweet. Thanks a lot Linus and Alex. So there is no function to do it, you just have to build it yourself. I was not sure of that. I like Alex's solution. This is something I can read and understand. Also, it would be nice to compare and split in one loop. This is what I came up with,

Re: a data conversion question

2014-06-08 Thread Shahrdad Shadab
Yet another way: (reduce #(let [[k [v1 v2]] %2] (vec (concat % [[k v1]] [[k v2]]))) [] [[:a [1 2]] [:b [3 4]]]) On Jun 8, 2014, at 3:43 PM, boz b...@cox.net wrote: Thanks for the replies!! I goofed and only gave part of my loopy solution ... here's the whole thing (defn do-one

Is there a zero-to-hero guide regarding clj-http (or its alternatives) and making API calls with google apps?

2014-06-08 Thread Henry Ventura
Hi! Using gcal https://github.com/owainlewis/gcal, I have been able to authenticate with OAuth2 (for my first time!) and use it's provided function to create a quick-event. I'd like to extend the functionality to create a more complicated event, but I get an API parse error from Google when

clj-commons-exec/sh adding newline to command

2014-06-08 Thread gvim
(ns gh1.tmp (:require [clj-commons-exec :as exec] [clj-time.core :as t])) (defn calc [day month year hour min sec zone] (let [bin /Users/zephyr/html/astro/bin/swetest data (str -p0123456789t -fPZl -b day . month . year -ut hour : min) flags