Re: Emacs font and theme for clojure

2013-09-28 Thread John Gabriele
On Thursday, September 26, 2013 10:51:44 AM UTC-4, Murtaza Husain wrote: > > Hi, > > I was just cycling through the different themes in emacs. I was wondering > what font and theme combination others are using ? > I like Inconsolata and Zenburn. -- -- You received this message because you are

Re: [ANN] cljsfiddle.net

2013-09-28 Thread Jonas
Hi I updated the clojurescript version and core.async seems to work fine now: http://cljsfiddle.net/fiddle/jonase.async Jonas On Saturday, September 28, 2013 7:31:55 PM UTC+3, David Nolen wrote: > > Wow, awesome. Yes to core.async support, there was a release yesterday > with new goodies for

Re: Doubt about "Destructuring rest sequences as map key/value pairs"

2013-09-28 Thread Ambrose Bonnaire-Sergeant
The or syntax should be {lastname "Meneses"} Thanks, Ambrose On Sun, Sep 29, 2013 at 8:54 AM, Daniel Meneses Báez wrote: > I think that the second and third lines in the following example should > yield the same output... > > *user=> (defn my-name [& {:keys [name lastname] :or {:lastname > "Men

Doubt about "Destructuring rest sequences as map key/value pairs"

2013-09-28 Thread Daniel Meneses Báez
I think that the second and third lines in the following example should yield the same output... *user=> (defn my-name [& {:keys [name lastname] :or {:lastname "Meneses"}}] (str name " " lastname))* *#'user/my-name* *user=> (my-name :name "Daniel" :lastname "Meneses")* *"Daniel Meneses"* *user=> (

Re: Crowdfunding for full-time core.typed development

2013-09-28 Thread Rich Morin
The CircleCI folks have posted a nice write-up of Typed Clojure (and the campaign) here: tl;dr Typed Clojure is an important step for not just Clojure, but all dynamic languages. CircleCI is supporting it, and you should too. Typed Clojure is one of the biggest advancements to dynamic p

Re: Parallelising over a lazy sequence - request for help

2013-09-28 Thread Paul Butcher
On 28 Sep 2013, at 22:00, Alex Miller wrote: > Reducers (and fork/join in general) are best suited for fine-grained > computational parallelism on in-memory data. The problem in question involves > processing more data than will fit in memory. > > So the question is then what is the best way t

Re: Parallelising over a lazy sequence - request for help

2013-09-28 Thread Paul Butcher
Thanks Alex - I've made both of these changes. The shutdown-agents did get rid of the pause at the end of the pmap solution, and the -server argument made a very slight across-the-board performance improvement. But neither of them fundamentally change the basic result (that the implementation th

Re: Parallelising over a lazy sequence - request for help

2013-09-28 Thread Jozef Wagner
Can't your last possible solution rather be implemented on top of f/j pool? Is it possible to beat f/j pool performance with ad-hoc thread-pool in situations where there are thousands of tasks? JW On Sat, Sep 28, 2013 at 11:00 PM, Alex Miller wrote: > Reducers (and fork/join in general) are be

Re: Parallelising over a lazy sequence - request for help

2013-09-28 Thread Alex Miller
I am hoping that this will be fixed for 1.6 but no one is actually "working" on it afaik. If someone wants to take it on, I would GREATLY appreciate a patch on this ticket (must be a contributor of course). On Saturday, September 28, 2013 11:24:18 AM UTC-5, Paul Butcher wrote: > > On 28 Sep 2013

Re: Parallelising over a lazy sequence - request for help

2013-09-28 Thread Alex Miller
Reducers (and fork/join in general) are best suited for fine-grained computational parallelism on in-memory data. The problem in question involves processing more data than will fit in memory. So the question is then what is the best way to parallelize computation over the stream. There are man

Re: Parallelising over a lazy sequence - request for help

2013-09-28 Thread Alex Miller
For your timings, I would also strongly recommend altering your project.clj to force the -server hotspot: :jvm-opts ^:replace ["-Xmx1g" "-server" ... and whatever else you want here ... ] By default lein will use tiered compilation to optimize repl startup, which is not what you want for ti

Re: Parallelising over a lazy sequence - request for help

2013-09-28 Thread Paul Butcher
On 28 Sep 2013, at 19:51, Jozef Wagner wrote: > Anyway, I think the bottleneck in your code is at > https://github.com/paulbutcher/parallel-word-count/blob/master/src/wordcount/core.clj#L9 > Instead of creating new persistent map for each word, you should use a > transient here. I would love

Re: Type hints for clojure.set functions

2013-09-28 Thread John D. Hume
On Sep 28, 2013 1:47 PM, "splondike" wrote: > > Can anyone else think of a reason why we should not add type hints to the functions, or why coercing the arguments to sets is better (or something else I haven't thought of)? IIRC, type hints are only used by the compiler to generate non-reflective

Re: Parallelising over a lazy sequence - request for help

2013-09-28 Thread Andy Fingerhut
If a Clojure ticket is triaged, it means that one of the Clojure screeners believe the ticket's description describes a real issue with Clojure that ought to be changed in some way, and would like Rich Hickey to look at it and see whether he agress. If he does, it becomes vetted. A diagram of the

Re: Parallelising over a lazy sequence - request for help

2013-09-28 Thread Jozef Wagner
Or even better, use guava's Multiset there... On Saturday, September 28, 2013 8:51:56 PM UTC+2, Jozef Wagner wrote: > > Well it should be possible to implement a foldseq variant which takes a > reducible collection as an input. This would speed things, as you don't > create so much garbage with

Re: Parallelising over a lazy sequence - request for help

2013-09-28 Thread Jozef Wagner
Well it should be possible to implement a foldseq variant which takes a reducible collection as an input. This would speed things, as you don't create so much garbage with reducers. XML parser which produces reducible collection will be a bit harder :). Anyway, I think the bottleneck in your c

Re: [ANN] cljsfiddle.net

2013-09-28 Thread Ian Bishop
These are pretty great for writing Clojure in CodeMirror: http://codemirror.net//addon/edit/matchbrackets.js http://codemirror.net//addon/edit/closebrackets.js On Saturday, 28 September 2013 14:27:28 UTC-3, David Nolen wrote: > > Just gave it a spin http://cljsfiddle.net/fiddle/swannodette.test-l

Type hints for clojure.set functions

2013-09-28 Thread splondike
I just got burned by the clojure.set/difference function (v 1.5.1) wherein I had in error passed a vector for the second argument. This causes inconsistent results depending on the relative lengths of the arguments. That is, as soon as the second argument becomes longer than the first we get a

Re: why does "ps aux" show a dump of my whole app?

2013-09-28 Thread Softaddicts
Simply because you get the full command line that started each of these processes... mongod is the mongo db server to which you connect, the other process is most probably your Clojure project that happens to refer to mongo libs in its classpatch which happens to appear on the command line. Luc

Re: [ANN] cljsfiddle.net

2013-09-28 Thread David Nolen
Just gave it a spin http://cljsfiddle.net/fiddle/swannodette.test-logic Great work. Is there anyway to turn on parentheses matching on in CodeMirror? Even better if Code Mirror can highlight unbalanced parens. (Using it also makes me realize that ClojureScript should really provide a way to colle

Re: Parallelising over a lazy sequence - request for help

2013-09-28 Thread Paul Butcher
On 28 Sep 2013, at 17:42, Jozef Wagner wrote: > I mean that you should forgot about lazy sequences and sequences in general, > if you want to have a cutting edge performance with reducers. Example of > reducible slurp, https://gist.github.com/wagjo/6743885 , does not hold into > the head. OK

Re: Parallelising over a lazy sequence - request for help

2013-09-28 Thread Jozef Wagner
I mean that you should forgot about lazy sequences and sequences in general, if you want to have a cutting edge performance with reducers. Example of reducible slurp, https://gist.github.com/wagjo/6743885 , does not hold into the head. JW On Sat, Sep 28, 2013 at 6:24 PM, Paul Butcher wrote: >

Re: [ANN] cljsfiddle.net

2013-09-28 Thread David Nolen
Wow, awesome. Yes to core.async support, there was a release yesterday with new goodies for Clojure and ClojureScript. David On Sat, Sep 28, 2013 at 6:24 AM, Jonas wrote: > Hi > > I’m working on a ClojureScript playground application ( > http://cljsfiddle.net) similar to jsfiddle[1], jsbin[2]

Re: Parallelising over a lazy sequence - request for help

2013-09-28 Thread Paul Butcher
On 28 Sep 2013, at 17:14, Jozef Wagner wrote: > I would go a bit more further and suggest that you do not use sequences at > all and work only with reducible/foldable collections. Make an input reader > which returns a foldable collection and you will have the most performant > solution. The t

Re: Parallelising over a lazy sequence - request for help

2013-09-28 Thread Paul Butcher
Ah - one mystery down. Thanks Andy! -- paul.butcher->msgCount++ Snetterton, Castle Combe, Cadwell Park... Who says I have a one track mind? http://www.paulbutcher.com/ LinkedIn: http://www.linkedin.com/in/paulbutcher MSN: p...@paulbutcher.com AIM: paulrabutcher Skype: paulrabutcher On 28 Sep 20

Re: Parallelising over a lazy sequence - request for help

2013-09-28 Thread Jozef Wagner
I would go a bit more further and suggest that you do not use sequences at all and work only with reducible/foldable collections. Make an input reader which returns a foldable collection and you will have the most performant solution. The thing about holding into the head is being worked on righ

Re: Parallelising over a lazy sequence - request for help

2013-09-28 Thread Andy Fingerhut
I do not know about the most important parts of your performance difficulties, but on a more trivial point I might be able to shed some light. See the ClojureDocs page for pmap, which refers to the page for future, linked below. If you call (shutdown-agents) the 60-second wait to exit should go

Re: Parallelising over a lazy sequence - request for help

2013-09-28 Thread Paul Butcher
On 28 Sep 2013, at 01:22, Rich Morin wrote: >> On Sat, May 25, 2013 at 12:34 PM, Paul Butcher wrote: >> I'm currently working on a book on concurrent/parallel development for The >> Pragmatic Programmers. ... > > Ordered; PDF just arrived (:-). Cool - very interested to hear your feedback onc

random name generator using adjective-animal combinations

2013-09-28 Thread Waldemar
Hi, I just wrote a tiny function that combines a list of adjectives and animals to a lazyseq, from which I can take x combinations and use them to name clients or machines[1]. It's not a big thing, the main effort was to find nice lists. I always liked the naming on heroku, thats why I wanted s

Re: [ANN] cljsfiddle.net

2013-09-28 Thread Korny Sietsma
Nice - this would have been handy this morning for clojure cup hacking! (Though core.async support would have made it even better) - Korny On 28 September 2013 20:24, Jonas wrote: > Hi > > I’m working on a ClojureScript playground application ( > http://cljsfiddle.net) similar to jsfiddle[1],

[ANN] cljsfiddle.net

2013-09-28 Thread Jonas
Hi I’m working on a ClojureScript playground application (http://cljsfiddle.net) similar to jsfiddle[1], jsbin[2] etc. The app has now reached a point where I’m happy to show it to a wider audience. I’m hoping cljsfiddle.net will be used for: * Personal/collaborative experiments * ClojureScript

(Clojure-related book) Seven Concurrency Models in Seven Weeks

2013-09-28 Thread Jaley
Hey all, I was asked to review this book [1], which was recently announced. I thought it may be of interest to the Clojure community in particular, as despite being generally language-agnostic in theme, many of the examples given are in Clojure, and indeed some of Clojure's bigger ideas about

Re: ANN: Pulsar 0.2.0 Released

2013-09-28 Thread Hank
Ok I just discovered there's a separate Google Group for this so I'll be re-posting there: https://groups.google.com/forum/?fromgroups#!forum/quasar-pulsar-user Anyone wanting to reply, please don't reply to this here, reply in the other group instead. On Friday, September 27, 2013 8:38:28 PM

Re: Parallelising over a lazy sequence - request for help

2013-09-28 Thread Paul Butcher
On 28 Sep 2013, at 00:27, Stuart Halloway wrote: > I have posted an example that shows partition-then-fold at > https://github.com/stuarthalloway/exploring-clojure/blob/master/examples/exploring/reducing_apple_pie.clj. > > I would be curious to know how this approach performs with your data. W

Re: Could not find artifact org.clojure:clojure:pom:1.2.0-master-SNAPSHOT in central

2013-09-28 Thread James Reeves
The 4clojure 1.3.0.1 version is very old, and it looks like you're trying to use a modern dependency (compojure 1.1.5) with many old dependencies, which probably isn't going to go well even if you fix the deps problem. Why not update the repository to the latest 2.0.0-rc2 version and work off that