Re: ANN: ClojureScript 1.9.456, Externs Inference & Comprehensive JS Modules Support

2017-03-08 Thread Colin Fleming
I believe that dependency is because Google Closure requires it. On 9 March 2017 at 16:45, Mike Rodriguez wrote: > Guava is often a dependency conflict when trying to put libs together that > use it. I'm surprised cljs has dependencies like this. I'd think a language > would

Re: Navigators and lenses

2017-03-08 Thread Brandon Bloom
A big one I forgot: RDF's query language SPARQL: https://www.w3.org/TR/rdf-sparql-query/ On Wednesday, March 8, 2017 at 5:35:42 PM UTC-8, Brandon Bloom wrote: > > Responsible adults sometimes needs to access and modify deeply nested data >> structures > > > So far, my experience has been that

Re: ANN: ClojureScript 1.9.456, Externs Inference & Comprehensive JS Modules Support

2017-03-08 Thread Mike Rodriguez
Guava is often a dependency conflict when trying to put libs together that use it. I'm surprised cljs has dependencies like this. I'd think a language would try to avoid having any deps at all or repackage them or something. For example, Clojure only has ASM. -- You received this message

Navigators and lenses

2017-03-08 Thread Alex Miller
Edwin, we can have technical discussions about this topic without comparing Nathan to Rich or making comments about Nathan that may feel like a personal attack. Thanks -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send

Re: Navigators and lenses

2017-03-08 Thread Gregg Reynolds
On Mar 8, 2017 5:44 PM, "Edwin Watkeys" wrote: Hey, The recent heat about Specter got me thinking. There's legitimate pain that Spectre solves: Responsible adults sometimes needs to access and modify deeply nested data structures, and Clojure's batteries-included facilities for

Re: Navigators and lenses

2017-03-08 Thread Brandon Bloom
> > Responsible adults sometimes needs to access and modify deeply nested data > structures So far, my experience has been that it is almost always better to build a pair of flattening and unflattening transforms on the data. Especially since you frequently want only one flattening, but

Navigators and lenses

2017-03-08 Thread Edwin Watkeys
Hey, The recent heat about Specter got me thinking. There's legitimate pain that Spectre solves: Responsible adults sometimes needs to access and modify deeply nested data structures, and Clojure's batteries-included facilities for doing so can be tedious. But Specter is deeply un-Clojure-y,

Re: How to transform deeply nested map into a series of arrays?

2017-03-08 Thread Alex Miller
walk is a generic function that recursively walks a tree, rebuilding it. prewalk and postwalk are built on walk. postwalk is typically best for rewriting the tree, which is the most common thing I use it for. On Wednesday, March 8, 2017 at 2:48:32 PM UTC-6, piastkra...@gmail.com wrote: > >

Re: How to transform deeply nested map into a series of arrays?

2017-03-08 Thread piastkrakow
That is a great article. Possibly there is a solution to this using tree-seq. I hope to explore that at some point. On Wednesday, March 8, 2017 at 3:50:02 PM UTC-5, Erik Assum wrote: > > You've already gotten your answer, but since Alex mentioned postwalk, and > the problem looks like a

Re: How to transform deeply nested map into a series of arrays?

2017-03-08 Thread Erik Assum
You've already gotten your answer, but since Alex mentioned postwalk, and the problem looks like a flattening problem, I thought the following post might be of interest: https://mwfogleman.github.io/posts/20-12-2014-flatcat.html Erik. -- i farta > Den 8. mar. 2017 kl. 18.38 skrev

Re: How to transform deeply nested map into a series of arrays?

2017-03-08 Thread piastkrakow
Thank you, Alex. That makes sense. What is the main use case for walk? On Wednesday, March 8, 2017 at 3:16:42 PM UTC-5, Alex Miller wrote: > > Usually the walk solution for transformation is easiest with postwalk: > > (require '[clojure.walk :refer [postwalk]]) > > (defn m-to-v [m] > (if (map?

Re: How to transform deeply nested map into a series of arrays?

2017-03-08 Thread Alex Miller
Usually the walk solution for transformation is easiest with postwalk: (require '[clojure.walk :refer [postwalk]]) (defn m-to-v [m] (if (map? m) (mapcat (fn [[k v :as e]] (if (coll? v) (mapv #(into [k] %1) v) [e])) m) m)) (postwalk m-to-v data)

Re: How to transform deeply nested map into a series of arrays?

2017-03-08 Thread piastkrakow
Thank you so much! Your solution was almost perfect. It gave me: #{[[:positive :false 30 8 9090] 1] [[:negative :true 30 4 50] 43] [[:positive :false 30 4 1000] 32] [[:positive :true 30 8 9090] 1] [[:positive :false 30 4 50] 43] [[:negative :true 30 8 9090] 1] [[:negative :false 30 4 50] 43]

Re: How to transform deeply nested map into a series of arrays?

2017-03-08 Thread lvh
Hi! Suggested recursive impl: (defn path-entries ([obj] (path-entries [] obj)) ([prefix obj] (into #{} (mapcat (fn [[k v]] (let [path (conj prefix k)] (if (map? v) (entries path v) [[path v]]

How to transform deeply nested map into a series of arrays?

2017-03-08 Thread piastkrakow
Given this: {:positive :true {30 {4 {50 43, 1000 32}, 6 {40 12, 90 2}, 8 {777 23, 9090 1}}} I'd like a series of arrays that I can feed into (reduce) so I can easily sum them: [ 30 4 50 43 ] [ 30 4 1000 32 ] [ 30 6 40 12 ] [ 30 6 90 2 ] [ 30 8 777 23 ] [ 30 8 9090 1 ] I've been trying

Re: What is wrong with this simple Regex?

2017-03-08 Thread piastkrakow
Thank you. On Wednesday, March 8, 2017 at 12:11:26 PM UTC-5, Sean Corfield wrote: > > Because you have a space in your regex, it is treated as a range, from > space to underscore which matches a lot of characters. Move the – to the > start: > > > > (clojure.string/replace

Re: What is wrong with this simple Regex?

2017-03-08 Thread Sean Corfield
Because you have a space in your regex, it is treated as a range, from space to underscore which matches a lot of characters. Move the – to the start:     (clojure.string/replace phone #"[- _]" garbage) Sean Corfield -- (970) FOR-SEAN -- (904) 302-SEAN An Architect's

What is wrong with this simple Regex?

2017-03-08 Thread piastkrakow
I built a string matching system, so when we get new records, from crawling the web, we can find out if we already have the same information in the database. There are many parameters to tune, and so I wanted to generate the F1 score for the different parameters. I can easily test True

Re: clj-bigml

2017-03-08 Thread Herwig Hochleitner
2017-03-08 3:30 GMT+01:00 Myriam Abramson : > > Is this project still maintained? Does anyone want to fork it to bring > it up-to-date? Do you have a reason to believe it's unmaintained? Doesn't it work against the latest BigML API? A good way to learn about questions like

Re: Ensure more concurrency

2017-03-08 Thread Herwig Hochleitner
2017-03-06 12:06 GMT+01:00 'bertschi' via Clojure : > From the docs it says "Allows for more concurrency than (ref-set ref @ref)". > I would read that as "runs at least as fast as (ref-set ref @ref)", but > using (ref-set dogs @dogs) instead of (ensure dogs) and the same

Re: Application silently shuts down by itself after running for some hours

2017-03-08 Thread Herwig Hochleitner
2017-03-08 9:00 GMT+01:00 JokkeB : > Now tracking down if I'm simply too low on memory or if the app has a > memory leak, but that's a different topic. > Your app may well be fine. The OOM killer removes processes in descending order of memory usage, when RAM runs out. As

Re: Application silently shuts down by itself after running for some hours

2017-03-08 Thread JokkeB
Thanks to all the replies. Yes, the reason indeed was linux killing the process. cat /var/log/kern.log verified this. There was no exception logged because there was no exception/error. Now tracking down if I'm simply too low on memory or if the app has a memory leak, but that's a different