Re: scheduling with core.async?

2015-09-23 Thread bahadir cambel
Hi Leon, you may check http://www.clojure-toolbox.com/ and see the schedule section. Here are the suggestions; https://github.com/jarohen/chime (has core.async examples) https://github.com/overtone/at-at https://github.com/zcaudate/cronj Also, if you're using HTTP-Kit

Re: Boxed math in transducers

2015-09-23 Thread Peter Taoussanis
Sorry- that should read "a little better", not "little better" ;-) -- 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

Re: Using metadata to specify how calls to a macro should be indented

2015-09-23 Thread Artur Malabarba
2015-09-23 10:32 GMT+01:00 Phillip Lord : > Specifically wrt to CIDER, the easier solution is the cache the metadata > map each time it is used. I suspect that CIDER would need this for > performance -- I mean indentation requiring ongoing evaluation in > Clojure is

Re: Boxed math in transducers

2015-09-23 Thread Peter Taoussanis
Hey Alex, Not sure I follow. If we deref (volatile! 5), the dereffed val is a number. `(inc @(volatile! 5))` will involve boxed math but `(inc ^long @(volatile! 5))` won't. So, for example: (defn core-take ; As in clojure.core ([n] (fn [rf] (let [nv (volatile! n)] (fn

Re: Boxed math in transducers

2015-09-23 Thread Alex Miller
Given that the counter is held in a volatile (boxed) object, I don't think a hint would help. On Wednesday, September 23, 2015 at 1:14:39 AM UTC-5, Peter Taoussanis wrote: > > Hi all, > > Just noticed some use of boxed math in a couple of the Clojure 1.7 > transducers (e.g. `take`). Would

Re: Using metadata to specify how calls to a macro should be indented

2015-09-23 Thread Phillip Lord
Artur Malabarba writes: >> > Yes, that's what the current (but unmerged) implementation does. :) > >> If this cache were persisted between Emacs sessions then the problem >> largely goes away. >> > Yes, that's very plausible to do. I am happy to do the implementation

Re: scheduling with core.async?

2015-09-23 Thread Thomas Heller
To be honest I see no point in using core.async or any other library for that matter. Java already solves this problem very well. (ns ... (:import [java.util.concurrent TimeUnit Executors])) (def scheduler (doto (Executors/newSingleThreadScheduledExecutor) (.scheduleAtFixedRate

Re: Clojure performance on Android

2015-09-23 Thread Roger Keays
Okay, thanks. Looks like I will have to do some experimenting to get the setup I want... On Wednesday, September 23, 2015 at 3:02:01 AM UTC+2, Ben Brinckerhoff wrote: > > On my team, we tried using RoboVM to compile Clojure to iOS. It worked > fine once it booted, but startup time was a

Re: Using metadata to specify how calls to a macro should be indented

2015-09-23 Thread Artur Malabarba
Great! ☺ Bring it up on the cider gitter room. On 23 Sep 2015 3:55 pm, "Phillip Lord" wrote: > Artur Malabarba writes: > >> > > Yes, that's what the current (but unmerged) implementation does. :) > > > >> If this cache were persisted between

Re: A generalization of iterate

2015-09-23 Thread nchurch
Yeah, it consumes stack just like the Clojurescript version of Iterate. I'm curious if anyone knows how to avoid this. The Clojure version of Iterate is Java; and for some reason 'recur' can't be used inside of lazy-cat (not really documented, but apparently true). On Tuesday, September 22,

Boxed math in transducers

2015-09-23 Thread Peter Taoussanis
Hi all, Just noticed some use of boxed math in a couple of the Clojure 1.7 transducers (e.g. `take`). Would there be interest in a PR to add some numerical type hints? Cheers :-) -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this

Re: scheduling with core.async?

2015-09-23 Thread Gerrit Jansen van Vuuren
from my own experience with core async I;d say yes I've made two macros https://github.com/gerritjvv/fun-utils/blob/master/src/fun_utils/core.clj#L208 and https://github.com/gerritjvv/fun-utils/blob/master/src/fun_utils/core.clj#L220 that does exactly what you're referring to. Remember if

Re: [ANN] Leiningen 2.5.3

2015-09-23 Thread Ning Sun
Thanks for the release! I confirm the GPG issue is fixed in 2.5.3. On 09/22/2015 06:04 AM, Jean Niklas L'orange wrote: > Greetings, Clojurians. > > I am happy to announce the release of Leiningen version 2.5.3. This > version > contains mostly bugfixes, most notably an issue where environment >

Re: A generalization of iterate

2015-09-23 Thread nchurch
A, right. Silly me. This is something I have trouble remembering. For some reason when you use regular concat, the error message is helpful (can't recur from non-tail position); with lazy-cat it shows a mismatch of argument numbers. On Wednesday, September 23, 2015 at 2:10:47 PM UTC-7, Max

Re: A generalization of iterate

2015-09-23 Thread Max Countryman
Your problem with recur is because you can only recur from the tail position. > On Sep 23, 2015, at 12:28, nchurch wrote: > > Yeah, it consumes stack just like the Clojurescript version of Iterate. I'm > curious if anyone knows how to avoid this. The Clojure version of

Re: Using metadata to specify how calls to a macro should be indented

2015-09-23 Thread Phillip Lord
Artur Malabarba writes: > You're right about indentation depending on the code being evaluated, but > that's still better than nothing. ☺ > > People who do a significant amount of coding without a live session can > still manually configure indentation like they

Lazy Sequence Results in Stack Overflow

2015-09-23 Thread Charles Reese
I want to compute a lazy sequence of primes. Here is the interface: user=> (take 10 primes) (2 3 5 7 11 13 17 19 23 29) So far, so good. However, when I take 500 primes, this results in a stack overflow. core.clj: 133 clojure.core/seq

Re: Lazy Sequence Results in Stack Overflow

2015-09-23 Thread Colin Yates
This might help: http://stuartsierra.com/2015/08/25/clojure-donts-lazy-effects On 24 Sep 2015 01:14, "Charles Reese" wrote: > I want to compute a lazy sequence of primes. > > Here is the interface: > > user=> (take 10 primes) > (2 3 5 7 11 13 17 19 23 29) > > So

Re: Primitive pseudocode parser in Clojure

2015-09-23 Thread Vitaliy Vlasov
This looks awesome! Thanks so much! I'm actually extending it with some additional statements of my own (Instaparse would be perhaps too general in my case) On Tuesday, September 22, 2015 at 2:08:03 AM UTC+3, Matching Socks wrote: > > Vitaliy Akimov described an approach to a similar problem