[ANN] ClojureCL now supports Linux, Windows and OS X (GPGPU and high performance parallel computing)

2016-05-17 Thread Dragan Djuric
http://clojurecl.uncomplicate.org https://www.reddit.com/r/Clojure/comments/4jtqhm/clojurecl_gpu_programming_now_works_on_linux/ ClojureCL is a library for OpenCL high-performance numerical computing that supports GPU and CPU optimizations. ClojureCL supports OpenCL 2.0 and 1.2 standards.

It's Alive! answers the question "What's alive?"

2016-05-17 Thread hiskennyness
Ok, the Clojure port of my Cells library now has models aka objects, pretty much just maps of Cells with an option of typing them, but arranged in a tree so we can implement a universe of interdependent objects (kinda like the real world):

[ANN] es-boat - expert system for coastal navigation. New functionality

2016-05-17 Thread ru
Hi, A prototype of an expert system for coastal navigation - test example for the rete4frames expert system shell - complex Clojure-ClojureScript client-server application. Project page: http://github.com/rururu/es-boat It uses: Protege-3.5 ontology

Re: Removing duplicates from a series

2016-05-17 Thread 'Simon Brooke' via Clojure
Thank you everyone who responded. After looking over the ideas I chose a variant on Thomas Mulvaney's suggestion: (defn consolidate-events "Return a time series like this `series`, but without those events whose value is identical to the value of the preceding event." [series] (map

Re: Removing duplicates from a series

2016-05-17 Thread 'Simon Brooke' via Clojure
Oooh, that one is neat. On Tuesday, 17 May 2016 12:27:29 UTC+1, Thomas Mulvaney wrote: > > Rather than writing a new function you could always use something like > (map first (partition-by :value events)). partition-by will create lists of > events where consecutive values have not changed. You

Re: Removing duplicates from a series

2016-05-17 Thread Fluid Dynamics
On Tuesday, May 17, 2016 at 5:47:06 AM UTC-4, Simon Brooke wrote: > > I'm having trouble with writing a function > >1. in idiomatic clojure >2. which doesn't blow the stack > > The problem is I have a time series of events e.g. > > ({:idhistory 78758272, :timestamp #inst >

Re: Removing duplicates from a series

2016-05-17 Thread Thomas Mulvaney
Rather than writing a new function you could always use something like (map first (partition-by :value events)). partition-by will create lists of events where consecutive values have not changed. You could also assemble a transducer pipeline using the transducer arities of the functions: `(into

Re: Removing duplicates from a series

2016-05-17 Thread room center
Test passed code, but I don't know about performance. (defn consolidate-events [series] (reduce (fn [result cur] (let [prev (last result)] (cond (nil? prev) (conj result cur) (= (:value prev) (:value cur))

Re: Removing duplicates from a series

2016-05-17 Thread Andy-
Hi, dedupe is almost what you need, but you can just copy the source and modify it slightly: (defn dedupe-by "Similar to dedupe but allows applying a function to the element by which to dedupe." ([f] (fn [rf] (let [pv (volatile! ::none)] (fn ([] (rf))

Re: Removing duplicates from a series

2016-05-17 Thread 'Alan Forrester' via Clojure
On 17 May 2016, at 10:47, 'Simon Brooke' via Clojure wrote: > I'm having trouble with writing a function > in idiomatic clojure > which doesn't blow the stack > The problem is I have a time series of events e.g. > > ({:idhistory 78758272, :timestamp #inst >

Removing duplicates from a series

2016-05-17 Thread 'Simon Brooke' via Clojure
I'm having trouble with writing a function 1. in idiomatic clojure 2. which doesn't blow the stack The problem is I have a time series of events e.g. ({:idhistory 78758272, :timestamp #inst "2016-03-31T19:34:27.31300-00:00", :nameid 5637, :stringvalue nil, :value 8000.0}

Re: Validation of prismatic schema

2016-05-17 Thread Jason Wolfe
Hi! Can you please elaborate on the problem you are trying to solve? I notice a couple potential problems in your post, but it's difficult to provide helpful suggestions because you don't show the actual code you're running (for instance, the data you show appears to be in JSON and not