Re: Future

2018-05-19 Thread Moe Aboulkheir
(doall (pmap (range ...))) may be a viable approach also, depending on the behaviour you want. On Sat, May 19, 2018 at 11:42 PM, Renata Soares wrote: > It worked, thanks! > > Em sábado, 19 de maio de 2018 19:38:28 UTC-3, Alex Engelberg escreveu: >> >> Not sure what's going on with shutdown-agen

Re: Future

2018-05-19 Thread Renata Soares
It worked, thanks! Em sábado, 19 de maio de 2018 19:38:28 UTC-3, Alex Engelberg escreveu: > > Not sure what's going on with shutdown-agents, but you could call (run! > deref ...) to wait for all the futures to complete. > > On Sat, May 19, 2018 at 3:29 PM Renata Soares > wrote: > >> Hello, >> >>

Re: Future

2018-05-19 Thread Alex Engelberg
Not sure what's going on with shutdown-agents, but you could call (run! deref ...) to wait for all the futures to complete. On Sat, May 19, 2018 at 3:29 PM Renata Soares wrote: > Hello, > > I am using future this way: > > (doall (map #(future () (range 1 max-size)) > > When the max-size is

Re: Future of spec/explain-data, spec/and, etc.

2016-07-25 Thread Mars0i
On Monday, July 25, 2016 at 10:56:09 AM UTC-5, Mars0i wrote: > > just noticed this morning that :path is explained in "clojure.spec - > Rationale and Overview". > There's also material about :path in your Spec Guide, but I had not fully understood it. I get it now--at least up to the level of

Re: Future of spec/explain-data, spec/and, etc.

2016-07-25 Thread Mars0i
Alex, thanks very much. That's all very helpful. Just what I needed. I hadn't seen an explanation of the meaning of :path, :via, and :in, and was guessing about them from experiments.:via and :in aren't mentioned in the docstring, so I wasn't sure whether to depend on them. (The source

Re: Future of spec/explain-data, spec/and, etc.

2016-07-24 Thread Alex Miller
On Sunday, July 24, 2016 at 10:40:41 PM UTC-5, Mars0i wrote: > > spec/explain-data seems very important. It allows programmatic responses > to spec failures. Maybe explain-data's behavior hasn't yet stabilized, > though? The structure of the return value has changed between 1.9.0-alpha7 > t

Re: Future termination

2014-08-20 Thread Serzh Nechyporchuk
Sorry for my delayed answer. I've tried examples with only futures that you give and they works really fine, all agent were closed. And I figured out that this problem arises only when I using datomic.api. > java -version java version "1.7.0_55" OpenJDK Runtime Environment (IcedTea 2.4.7) (7u55-

Re: Future termination

2014-07-31 Thread Andy Fingerhut
Serzh: Could you give a few details about the software machine where you saw it not terminate, even after an hour? I may try collecting some info like this to add to the Clojure ticket. In particular, the outputs of the following commands. java -version uname -a lsb_release -d time java -jar cl

Re: Future termination

2014-07-31 Thread Serzh Nechyporchuk
On my Ubuntu 14.04 laptop process doesn't terminates at all. I was waiting about an hour. Also this issue affects code which uses datomic.api, which, I think, uses futures too. Середа, 30 липня 2014 р. 22:50:11 UTC+3 користувач Andy Fingerhut написав: > > Never is an awfully long time :-) If yo

Re: Future termination

2014-07-30 Thread Andy Fingerhut
Never is an awfully long time :-) If you wait about 60 seconds, the command you gave calling (future 1) does terminate, at least on Mac OS X 10.8.5 where I tested it, and I have seen the same behavior on Linux and I think Windows. This version terminates much more quickly: java -jar clojure-1.6.

Re: Future of performant software: cores or memory?

2014-07-17 Thread Mark Phillips
Hi Gary, I wrote my initial post in January, but I just wanted to say... Thanks for taking the time to write your reply - I very much appreciated it. I suspect I will be writing algorithms in C++ for a while to come, but at some point I hope to do comparisons with Clojure versions. Regards,

Re: Future of performant software: cores or memory?

2014-01-01 Thread Gary Trakhman
It depends on your workload and use-cases, and you could fill many textbooks with a discussion of the tradeoffs, but I can think of some rules of thumb that point in clojure's favor. The most essential metric for me to see has been Amdahl's Law: http://en.wikipedia.org/wiki/File:AmdahlsLaw.svg To

Re: Future of clojure.contrib.core/-?> macro

2013-06-10 Thread Shlomi Vaknin
oh thats a much better option! thanks! On Mon, Jun 10, 2013 at 4:30 PM, James Reeves wrote: > On 10 June 2013 13:59, Nicola Mometto wrote: > >> >> They're in the core.incubator contrib repository >> https://github.com/clojure/core.incubator > > > They're also in the clojure.core namespace for

Re: Future of clojure.contrib.core/-?> macro

2013-06-10 Thread James Reeves
On 10 June 2013 13:59, Nicola Mometto wrote: > > They're in the core.incubator contrib repository > https://github.com/clojure/core.incubator They're also in the clojure.core namespace for Clojure 1.5 onward, but renamed to some-> and some->>. - James -- -- You received this message because

Re: Future of clojure.contrib.core/-?> macro

2013-06-10 Thread Shlomi Vaknin
great, thanks! On Mon, Jun 10, 2013 at 3:59 PM, Nicola Mometto wrote: > > They're in the core.incubator contrib repository > https://github.com/clojure/core.incubator > > shlomivak...@gmail.com writes: > > > Hey, its been a while since this discussion ended.. > > > > I read through it and now i

Re: Future of clojure.contrib.core/-?> macro

2013-06-10 Thread Nicola Mometto
They're in the core.incubator contrib repository https://github.com/clojure/core.incubator shlomivak...@gmail.com writes: > Hey, its been a while since this discussion ended.. > > I read through it and now i am fully confused, where did -?> and -?>> end > up being in? > > Thanks, > Shlomi > > On

Re: Future of clojure.contrib.core/-?> macro

2013-06-10 Thread shlomivaknin
Hey, its been a while since this discussion ended.. I read through it and now i am fully confused, where did -?> and -?>> end up being in? Thanks, Shlomi On Thursday, April 21, 2011 5:51:59 PM UTC+3, Ivan Koblik wrote: > > Hi Paul, > > Thanks, good to know. Sorry for the misleading email. > >

Re: Future/Promise and not using threads

2013-05-30 Thread David Pollak
Paul, Thanks... but I want the opposite of delay. Basically, I do not want to consume a thread waiting for a Future to be satisfied. I want to continue a computation on a different thread once the Future/Promise is satisfied. Why? Think of a web app that's serving either a long poll or a web soc

Re: Future/Promise and not using threads

2013-05-30 Thread Paul deGrandis
Oh! I see, you want promises with callbacks (which you want to be futures). Once a promise is delivered, you want to kick off a future (in Clojure, futures consume a thread from the thread pool to do their work). It's been discussed before: https://groups.google.com/forum/?fromgroups=#!topic/cl

Re: Future/Promise and not using threads

2013-05-30 Thread David Nolen
You might find this work in progress interesting then: http://github.com/clojure/core.async On Thu, May 30, 2013 at 3:46 PM, David Pollak wrote: > Paul, > > Thanks... but I want the opposite of delay. > > Basically, I do not want to consume a thread waiting for a Future to be > satisfied. I wan

Re: Future/Promise and not using threads

2013-05-30 Thread Paul deGrandis
I'm not entirely sure what you're trying to accomplish in a larger context, but perhaps you're looking for something like this? (delay (deref (future (and (Thread/sleep 2000) (+ 1 2) ... or maybe you want just `delay` Cheers, Paul On Thursday, May 30, 2013 6:09:02 AM UTC-7, David Pollak w

Re: Future/Promise and not using threads

2013-05-30 Thread David Pollak
Okay... I wrote my own: https://github.com/projectplugh/plugh/blob/master/src/plugh/util/misc.clj#L51 One can register for on-done and on-fail. I'll work on adding fail-fast and also map (so one can transform the future and execute code when the transformed future has been realized/delivered/fini

Re: Future/Promise and not using threads

2013-05-30 Thread Gary Trakhman
by the second future, I mean an instance of http://docs.oracle.com/javase/6/docs/api/java/util/concurrent/Future.html , which just has to conform to the interface, and doesn't actually have to execute on a different thread. Clojure's 'future' function returns an instance of one of these that uses

Re: Future/Promise and not using threads

2013-05-30 Thread Gary Trakhman
Maybe an easy solution: wrap the first future in another future that blocking-derefs, then performs your extra computation? Do an extra 'realized?' check for the optimization you mention. That would still consume threads in the case that it's not realized, but I think it gets you what you want.

Re: Future/Promise and not using threads

2013-05-30 Thread Mark Engelberg
According to this article, Clojure does not yet have this facility: http://java.dzone.com/articles/promises-and-futures-clojure This is something that is being worked on and discussed, though: http://dev.clojure.org/display/design/Promises https://groups.google.com/forum/#!topic/clojure-dev/7BKQi9

Re: future with user specified ExecutorService

2012-10-27 Thread Max Penet
Yes I know, but my membership approval is still pending on clojure-dev (CA on the way), and from what I have read, I am supposed to ask first on the ML before creating a JIRA ticket. http://dev.clojure.org/display/design/JIRA+workflow Slow process... Max On Saturday, October 27, 2012 1:02:4

Re: future with user specified ExecutorService

2012-10-27 Thread Casper Clausen
+1 That would be nice. This may not be the right place for the suggestion though. On Thursday, October 25, 2012 2:43:58 PM UTC+2, Max Penet wrote: > > wrong commit: > https://github.com/mpenet/clojure/commit/9c6e47524dc21c6bdfaa9d0cc2a69377cc69cbf3 > > > On Thursday, October 25, 2012 2:35:01 P

Re: future with user specified ExecutorService

2012-10-25 Thread Max Penet
wrong commit: https://github.com/mpenet/clojure/commit/9c6e47524dc21c6bdfaa9d0cc2a69377cc69cbf3 On Thursday, October 25, 2012 2:35:01 PM UTC+2, Max Penet wrote: > > Another enhancement proposal, would it be possible to have a future-call > arity with an additional argument as the ExecutorServi

Re: Future milestones of ClojurescriptOne ?

2012-06-08 Thread Brenton
There will be further releases of ClojureScript One. As we work on ClojureScript projects for clients, we are learning a lot about what works well and what doesn't. In the future, we will use what we have learned to make improvements to ClojureScript One. We also plan to move some of the includ

Re: Future of clojure.contrib.core/-?> macro

2011-04-21 Thread Ivan Koblik
Hi Paul, Thanks, good to know. Sorry for the misleading email. Cheers, Ivan. On 21 April 2011 08:47, pmbauer wrote: > Ivan, > clojure/core use a different workflow than is typical for github > projects. > The github readme doesn't indicate, but you may find the process here: > > http://clojur

Re: Future of clojure.contrib.core/-?> macro

2011-04-21 Thread pmbauer
Ivan, clojure/core use a different workflow than is typical for github projects. The github readme doesn't indicate, but you may find the process here: http://clojure.org/contributing http://clojure.org/patches Cheers, pm On Apr 20, 1:44 am, Ivan Koblik wrote: > Hello Konrad, > > Git workflow i

Re: Future of clojure.contrib.core/-?> macro

2011-04-21 Thread pmbauer
clojure/core use an alternative workflow to typical OSS on github, so the eqqon link is not apropos. The clojure github readme doesn't advertise the workflow, but you can find it here: http://clojure.org/contributing http://clojure.org/patches On Apr 20, 1:44 am, Ivan Koblik wrote: > Hello Konra

Re: Future of clojure.contrib.core/-?> macro

2011-04-21 Thread Konrad Hinsen
On 20 Apr 2011, at 13:58, Stuart Halloway wrote: There are several new top-level projects at https://github.com/ clojure to cover the various contrib libraries people have asked for. Thanks! I just pushed tools.macro to github. I'll wait a while to see if this causes any catastrophes. If no

Re: Future of clojure.contrib.core/-?> macro

2011-04-20 Thread Chas Emerick
I'll bring over c.c.strint. - Chas On Apr 20, 2011, at 7:58 AM, Stuart Halloway wrote: > There are several new top-level projects at https://github.com/clojure to > cover the various contrib libraries people have asked for. > > Mapping to old contrib names is shown at > http://dev.clojure.org

Re: Future of clojure.contrib.core/-?> macro

2011-04-20 Thread Stuart Halloway
There are several new top-level projects at https://github.com/clojure to cover the various contrib libraries people have asked for. Mapping to old contrib names is shown at http://dev.clojure.org/display/design/Contrib+Library+Names. Stu -- You received this message because you are subscribe

Re: Future of clojure.contrib.core/-?> macro

2011-04-20 Thread Ivan Koblik
Hello Konrad, Git workflow is a little bit different. You don't really need commit rights to contribute. I found a rather nice explanation of Git workflow here: http://www.eqqon.com/index.php/Collaborative_Github_Workflow Hope it helps. Cheers, Ivan. On 19 April 2011 16:40, Konrad Hinsen wrot

Re: Future of clojure.contrib.core/-?> macro

2011-04-19 Thread Konrad Hinsen
On 19 Apr, 2011, at 13:56 , Stuart Halloway wrote: >> Concerning my own modules in old contrib, there are three that I use myself >> and that I am planning to maintain, independently of where they will end up: >> - clojure.contrib.monads >> - clojure.contrib.macro-utils >> - clojure.contrib.gener

Re: Future of clojure.contrib.core/-?> macro

2011-04-19 Thread Laurent PETIT
2011/4/19 Stuart Halloway : > 2011/4/19 Stuart Halloway : > > Concerning my own modules in old contrib, there are three that I use myself > and that I am planning to maintain, independently of where they will end up: > > - clojure.contrib.monads > > - clojure.contrib.macro-utils > > - clojure.contr

Re: Future of clojure.contrib.core/-?> macro

2011-04-19 Thread Stuart Halloway
> 2011/4/19 Stuart Halloway : >>> Concerning my own modules in old contrib, there are three that I use myself >>> and that I am planning to maintain, independently of where they will end up: >>> - clojure.contrib.monads >>> - clojure.contrib.macro-utils >>> - clojure.contrib.generic >> >> There i

Re: Future of clojure.contrib.core/-?> macro

2011-04-19 Thread Laurent PETIT
2011/4/19 Stuart Halloway : >> Concerning my own modules in old contrib, there are three that I use myself >> and that I am planning to maintain, independently of where they will end up: >> - clojure.contrib.monads >> - clojure.contrib.macro-utils >> - clojure.contrib.generic > > There is an empty

Re: Future of clojure.contrib.core/-?> macro

2011-04-19 Thread Stuart Halloway
> Concerning my own modules in old contrib, there are three that I use myself > and that I am planning to maintain, independently of where they will end up: > - clojure.contrib.monads > - clojure.contrib.macro-utils > - clojure.contrib.generic There is an empty repos already waiting for your macr

Re: Future of clojure.contrib.core/-?> macro

2011-04-18 Thread Michael Wood
On 19 April 2011 08:25, Konrad Hinsen wrote: > On 19 Apr 2011, at 03:02, Sean Corfield wrote: > >>> On Apr 18, 2011, at 2:49 PM, Konrad Hinsen wrote: If nothing else is decided collectively, I'll maintain them as private projects on Google Codes or Bitbucket. >> >> If they don't end

Re: Future of clojure.contrib.core/-?> macro

2011-04-18 Thread Sean Corfield
On Mon, Apr 18, 2011 at 11:25 PM, Konrad Hinsen wrote: > I'll try to see if I can manage to migrate to new contrib (I am not exactly > looking forward to all those new tools to learn) I hadn't needed to deal with maven until I tried to set up clojure.java.jdbc - but that was the only piece I was

Re: Future of clojure.contrib.core/-?> macro

2011-04-18 Thread Konrad Hinsen
On 19 Apr 2011, at 02:15, Rich Hickey wrote: The only criterion for migrating into new contrib is someone willing to do the work of moving, and, subsequently, maintaining. OK, thanks for the clarification! Stuart Sierra has documented the process here: http://dev.clojure.org/display/design

Re: Future of clojure.contrib.core/-?> macro

2011-04-18 Thread Konrad Hinsen
On 19 Apr 2011, at 03:02, Sean Corfield wrote: On Apr 18, 2011, at 2:49 PM, Konrad Hinsen wrote: If nothing else is decided collectively, I'll maintain them as private projects on Google Codes or Bitbucket. If they don't end up as part of the new lineup of contrib libraries, would you at le

Re: Future of clojure.contrib.core/-?> macro

2011-04-18 Thread Laurent PETIT
2011/4/19 Rich Hickey : > > On Apr 18, 2011, at 2:49 PM, Konrad Hinsen wrote: > >> On 18 Apr 2011, at 17:47, Laurent PETIT wrote: >> >>> The -?> and -?>> macros are currently inside "old", "soon to be >>> deprecated" clojure contrib. >> >> I must confess that I don't even know what those macros do,

Re: Future of clojure.contrib.core/-?> macro

2011-04-18 Thread Paul deGrandis
Rich, Thanks for the feedback and righting some things for me. Can you speak to the -?> and -?>> macros, specifically if you think nil should be handled differently, or if these macros code find a new home in core? That said, I'd happily pitch in and help maintain a handful of the contrib libs f

Re: Future of clojure.contrib.core/-?> macro

2011-04-18 Thread Sean Corfield
> On Apr 18, 2011, at 2:49 PM, Konrad Hinsen wrote: >> If nothing else is decided collectively, I'll maintain them as private >> projects on Google Codes or Bitbucket. If they don't end up as part of the new lineup of contrib libraries, would you at least keep them on github.com? On Mon, Apr 18,

Re: Future of clojure.contrib.core/-?> macro

2011-04-18 Thread Rich Hickey
On Apr 18, 2011, at 2:49 PM, Konrad Hinsen wrote: On 18 Apr 2011, at 17:47, Laurent PETIT wrote: The -?> and -?>> macros are currently inside "old", "soon to be deprecated" clojure contrib. I must confess that I don't even know what those macros do, so I have no opinion. However, I thin

Re: Future of clojure.contrib.core/-?> macro

2011-04-18 Thread László Török
+1 for Konrad's Monad library sent from my mobile device On Apr 18, 2011 9:19 PM, "Paul deGrandis" wrote: > I very much like the -?> and -?>> macros and fine them pretty useful. > I'd support their addition into core. > > Also, regarding Konrad's comment: > I also find a lot of random one-off th

Re: Future of clojure.contrib.core/-?> macro

2011-04-18 Thread Paul deGrandis
I very much like the -?> and -?>> macros and fine them pretty useful. I'd support their addition into core. Also, regarding Konrad's comment: I also find a lot of random one-off things in old contrib that I think are useful to use as well as to read through some of the source. I think something l

Re: Future of clojure.contrib.core/-?> macro

2011-04-18 Thread Konrad Hinsen
On 18 Apr 2011, at 17:47, Laurent PETIT wrote: The -?> and -?>> macros are currently inside "old", "soon to be deprecated" clojure contrib. I must confess that I don't even know what those macros do, so I have no opinion. However, I think the question of "what will happen to module cloju

Re: Future of clojure.contrib.core/-?> macro

2011-04-18 Thread Sean Corfield
On Mon, Apr 18, 2011 at 9:33 AM, James Reeves wrote: > I use it, and I think more people would use it if this were in core. I only discovered them recently - they would certainly be more discoverable in core and that would lead to greater use (so the question then will be whether Clojure/core con

Re: Future of clojure.contrib.core/-?> macro

2011-04-18 Thread Wilson MacGyver
I use -?> quite often. On Mon, Apr 18, 2011 at 11:47 AM, Laurent PETIT wrote: > Hello, > > The -?> and -?>> macros are currently inside "old", "soon to be > deprecated" clojure contrib. > > They have proven useful to me a number of times, and I personnally > wouldn't see them stay in the soon "de

Re: Future of clojure.contrib.core/-?> macro

2011-04-18 Thread Zach Tellman
I definitely find them useful. On Apr 18, 8:47 am, Laurent PETIT wrote: > Hello, > > The -?> and -?>> macros are currently inside "old", "soon to be > deprecated" clojure contrib. > > They have proven useful to me a number of times, and I personnally > wouldn't see them stay in the soon "deprecat

Re: Future of clojure.contrib.core/-?> macro

2011-04-18 Thread James Reeves
On 18 April 2011 16:47, Laurent PETIT wrote: > So the question is: do a sufficiently important number of other people > use and want them as well  ? If so, I may ask to the clojure-dev ml if > and how and/or where we could move this macro so that it is still > visible and `usable`. I use it, and

Re: Future and current thread bindings

2010-06-01 Thread Meikel Brandmeyer
Hi, On Jun 1, 4:22 pm, Michael Jaaka wrote: > Shouldn't the future block inherit by default the bindings of calling > thread? Asides from the question whether bindings should be inherited or not, you can work around your trouble via bound-fn and future-call. (future-call (bound-fn [] (do-stuff