- macro and accessing context

2013-07-02 Thread pmf
Hi, I sometimes (in fact quite often) want to use the - macro like this: (- {} (assoc :a a) (assoc :b (some-fn CTX))) where CTX should be the current value of the threaded element. Currently, I'm forced to write a helper function (defn add-some-fn [ctx] (assoc ctx :b (some-fn ctx)))

Re: - macro and accessing context

2013-07-02 Thread Meikel Brandmeyer (kotarak)
Hi, since 1.5 there is as-http://clojure.github.io/clojure/clojure.core-api.html#clojure.core/as- : (as- {} ctx (assoc ctx :a a) (assoc ctx :b (some-fn ctx))) Kind regards Meikel -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to

Re: - macro and accessing context

2013-07-02 Thread pmf
That looks like it can do the job; thanks! On Tuesday, July 2, 2013 8:12:04 AM UTC+2, Meikel Brandmeyer (kotarak) wrote: Hi, since 1.5 there is as-http://clojure.github.io/clojure/clojure.core-api.html#clojure.core/as-%3E : (as- {} ctx (assoc ctx :a a) (assoc ctx :b (some-fn

Re: clojure.set/union bug?

2013-07-02 Thread Ray Miller
On 1 July 2013 21:39, Cedric Greevey cgree...@gmail.com wrote: What bugs me is that sorted-set-by needs apply to convert a coll into a sorted set; there's no short-and-pithy into for that case, and no coll-taking and varargs version pair like vec/vector either. (into (sorted-set) coll) --

Re: clojure.set/union bug?

2013-07-02 Thread Cedric Greevey
Er...that won't use my custom comparator. :) On Tue, Jul 2, 2013 at 2:40 AM, Ray Miller r...@1729.org.uk wrote: On 1 July 2013 21:39, Cedric Greevey cgree...@gmail.com wrote: What bugs me is that sorted-set-by needs apply to convert a coll into a sorted set; there's no short-and-pithy into

How to get value which been created in java from cli file

2013-07-02 Thread stream
Hi all my english poor i hope someone could know what i said. i create Var in Java such as RT(mysapce xv object); and then i load a clj file RT.loadResourceScript(xx.clj); the question is how to get Value of xv in xx.clj and could reload it in nrepl. i try to do something like (use

Re: clojure.set/union bug?

2013-07-02 Thread Ray Miller
On 2 July 2013 08:10, Cedric Greevey cgree...@gmail.com wrote: Er...that won't use my custom comparator. :) Sorry, I thought it was clear how to generalize from my previous example. Here it is with a custom comparator: (into (sorted-set-by ) [1 2 4 2 1 2 3]) ;; = #{4 3 2 1} On Tue, Jul 2,

Functions that return seqs

2013-07-02 Thread Islon Scherer
One things that always bugged me about clojure is that most functions that work on collections return seqs and not the original data structure type: (= [2 4 6] (- [2 [4]] flatten (conj 6))) = false Every time I transform collections I need to be aware of this. My questions is: is there a

Re: clojure.set/union bug?

2013-07-02 Thread Cedric Greevey
Still seems verbose compared to (into #{}) ... On Tue, Jul 2, 2013 at 4:41 AM, Ray Miller r...@1729.org.uk wrote: On 2 July 2013 08:10, Cedric Greevey cgree...@gmail.com wrote: Er...that won't use my custom comparator. :) Sorry, I thought it was clear how to generalize from my previous

Re: Functions that return seqs

2013-07-02 Thread Jim
On 02/07/13 09:45, Islon Scherer wrote: My questions is: is there a philosophical reason for that or it was implement this way because it's easier? the reason is that there is a common underlying abstraction tying all these data-structures together and that is the 'Seq' abstraction. conj is

Re: Functions that return seqs

2013-07-02 Thread Mikera
It's not really breaking principle of least surprise if you expect such functions to return sequences. A lot of people do expect this after a little bit of Lisp experience (Clojure or otherwise) I can see two advantages to having many functions return seqs: - It's a shared abstraction, which

Re: [ANN] byte-streams: a rosetta stone for all the byte representations the jvm has to offer

2013-07-02 Thread Mikera
This is cool, thanks Zach! Another set of mostly-isomporphic types that this could be applied to is different matrix/array types in core.matrix. core.matrix already has generic conversion mechanisms but they probably aren't as efficient as they could be. I'll take a look and see if the same

reset! and merge for (transient {})

2013-07-02 Thread Amir Wasim
Is there reset! and merge a possibility for (transient {}) sometimes we have a doseq and it might be requirement sometime. -- -- 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

reset! and merge for (transient {})

2013-07-02 Thread Amir Wasim
Hi, how we can achieve reset! and merge for (transient {}) e.g. when we have a doseq thanks. -- -- 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

Re: reset! and merge for (transient {})

2013-07-02 Thread Jim
No merge will not work with transients because it uses conj instead of conj! If you absolutely have to do this define your own 'merge!' that uses conj!. I'm not sure what you mean by reset! for transients...reset! is an operation on reference types (atom, ref, agent etc) Jim On 02/07/13

Re: Functions that return seqs

2013-07-02 Thread David Powell
If you really need to write functions that are polymorphic on collections type, then you can use the idiom: (defn some-fn [xs] (into (empty xs) ... )) But there is value in having the return type of a function to be predictable. -- Dave -- -- You received this message because you

Re: Functions that return seqs

2013-07-02 Thread Jim
On 02/07/13 11:48, David Powell wrote: If you really need to write functions that are polymorphic on collections type, then you can use the idiom: (defn some-fn [xs] (into (empty xs) ... )) hehe :) good one! ...in other words you can piggyback 'conj'... Jim -- -- You received

Re: reset! and merge for (transient {})

2013-07-02 Thread dennis zhuang
Maybe he means clear? 2013/7/2 Jim jimpil1...@gmail.com No merge will not work with transients because it uses conj instead of conj! If you absolutely have to do this define your own 'merge!' that uses conj!. I'm not sure what you mean by reset! for transients...reset! is an operation on

Re: reset! and merge for (transient {})

2013-07-02 Thread Jim
what is 'clear' ? cannot find it anywhere... Jim On 02/07/13 12:03, dennis zhuang wrote: Maybe he means clear? 2013/7/2 Jim jimpil1...@gmail.com mailto:jimpil1...@gmail.com No merge will not work with transients because it uses conj instead of conj! If you absolutely have to do

Re: reset! and merge for (transient {})

2013-07-02 Thread dennis zhuang
Clear the collection. user= (doc empty) - clojure.core/empty ([coll]) Returns an empty collection of the same category as coll, or nil nil 2013/7/2 Jim jimpil1...@gmail.com what is 'clear' ? cannot find it anywhere... Jim On 02/07/13 12:03, dennis zhuang wrote:

Re: Functions that return seqs

2013-07-02 Thread Islon Scherer
Thanks for all the answers. Agreed that sequences are a great abstraction (100 functions in 1 data structure instead of 10 to 10) and, as David said, there's value in having the return type to be predictable. I think a 'generics collection functions' library would be nice for those edge cases

Re: Functions that return seqs

2013-07-02 Thread Jim
On 02/07/13 12:42, Islon Scherer wrote: Well, maybe most of the time, but there's cases where the concrete type semantics matters a lot, specially with sets but sometimes with vectors too, right now i'm using into or just calling vec|set or reducers library but maybe I'll try to implement this

Re: [ANN] byte-streams: a rosetta stone for all the byte representations the jvm has to offer

2013-07-02 Thread Thomas
I have already used this library and it is really really useful. Thanks Zach. Thomas -- -- 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 -

Re: - macro and accessing context

2013-07-02 Thread John D. Hume
I believe the intended idiom for as- (and the reason it doesn't take a binding vector, like other forms that create locals) is (- {} (assoc :a a) (as- ctx (assoc ctx :b (some-fn ctx On Jul 2, 2013 1:12 AM, Meikel Brandmeyer (kotarak) m...@kotka.de wrote: Hi, since 1.5 there is

Re: reset! and merge for (transient {})

2013-07-02 Thread John D. Hume
Note that `merge` is basically just `conj` plus nil-checking, so there's a good chance `conj!` already does what you need. On Jul 2, 2013 5:33 AM, Amir Wasim amir.wa...@gmail.com wrote: Is there reset! and merge a possibility for (transient {}) sometimes we have a doseq and it might be

[ANN] lein-spell: Spell check your clojure docstrings and library docs

2013-07-02 Thread Gabriel Horner
Introducing lein-spell, https://github.com/cldwalker/lein-spell - a library to quickly and easily spell check your clojure libraries. Usage - lein-spell prints misspelled words, one per line to STDOUT. By default your library's docstrings and markdown/txt docs are searched: $ lein-spell

Re: Functions that return seqs

2013-07-02 Thread Tim Visher
On Tue, Jul 2, 2013 at 4:45 AM, Islon Scherer islonsche...@gmail.com wrote: One things that always bugged me about clojure is that most functions that work on collections return seqs and not the original data structure type: (= [2 4 6] (- [2 [4]] flatten (conj 6))) = false Every time I

Re: [ANN] byte-streams: a rosetta stone for all the byte representations the jvm has to offer

2013-07-02 Thread Ben Smith-Mannschott
Ropes? http://en.m.wikipedia.org/wiki/Rope_(data_structure) Ben -- This message was sent via electromagnetism. On 02.07.2013, at 12:19, Mikera mike.r.anderson...@gmail.com wrote: This is cool, thanks Zach! Another set of mostly-isomporphic types that this could be applied to is different

Casting to Object[]

2013-07-02 Thread Dmitry Groshev
Hello all. I have a following deftype: (deftype NDArray [^objects data ^long ndims ^longs shape ^longs strides]) ( https://github.com/si14/matrix-api/blob/70b376f58ec3846df6622b971001c3ade32d0725/src/main/clojure/clojure/core/matrix/impl/ndarray.clj#L30 ) Then, when I use

Re: Casting to Object[]

2013-07-02 Thread Jim
On 02/07/13 15:41, Dmitry Groshev wrote: (let [… #^[Ljava.lang.Object; data (.data m) …] (aset data idx v that is exactly how you type-hint non-primitive arrays...agreed it's ugly but there is no other way :) Jim -- -- You received this message because you are

Re: Clojure generates unnecessary and slow type-checks

2013-07-02 Thread Dmitry Groshev
Jason, can you please help me with this: I'm not sure if the protocol-based implementation can give users any help writing new core operations efficiently (say, making a new array with c[i] = a[i] + b[i]^2 / 2) -- unless there's some clever way of combining protocols with macros (hmmm).

Re: Casting to Object[]

2013-07-02 Thread Mikera
I think that is the only way. The good news is that this is Clojure, so you can easily wrap it in an object-array-cast macro On Tuesday, 2 July 2013 15:41:02 UTC+1, Dmitry Groshev wrote: Hello all. I have a following deftype: (deftype NDArray [^objects data ^long ndims

Re: Casting to Object[]

2013-07-02 Thread Christophe Grand
= (def a (object-array 1)) #'user/a = (set! *warn-on-reflection* true) true = (aset a 0 nil) Reflection warning, NO_SOURCE_PATH:1:1 - call to aset can't be resolved. nil = (aset ^objects a 0 nil) nil hth, Christophe On Tue, Jul 2, 2013 at 5:13 PM, Mikera mike.r.anderson...@gmail.com wrote:

Bounded futures

2013-07-02 Thread Brian Kirkbride
Hi all, I'd like to get some feedback on an approach I took to limit the concurrency of parallel processing in some of my Clojure codebase. I've often found that I want to split work over some number of threads greater than CPUs + 2, but less than infinity. In the past I had used promises

Re: Casting to Object[]

2013-07-02 Thread Dmitry Groshev
Thank you, works like a charm and makes my code smell better. On Tuesday, July 2, 2013 8:48:14 PM UTC+4, Christophe Grand wrote: = (def a (object-array 1)) #'user/a = (set! *warn-on-reflection* true) true = (aset a 0 nil) Reflection warning, NO_SOURCE_PATH:1:1 - call to aset can't be

Re: Clojure generates unnecessary and slow type-checks

2013-07-02 Thread Jim - FooBar();
I'm really sorry for coming back to this but even after everything we learned I'm still not able to get performance equal to java in a simple factorial benchmark. I'd like to think that I'm doing all the correct things to keep the comparison fair...observe this: benchmarks.core= (crit/bench (jf!

[ANN] Fluokitten - Category theory concepts in Clojure - Functors, Applicatives, Monads, Monoids and more

2013-07-02 Thread Dragan Djuric
I am pleased to announce a first public release of new (and different) monads and friends library for Clojure. Extensive *documentation* is at http://fluokitten.uncomplicate.org Fluokitten is a Clojure library that implements category theory concepts, such as functors, applicative functors,

Re: Clojure generates unnecessary and slow type-checks

2013-07-02 Thread Leon Barrett
Try longs instead of ints? Clojure doesn't support local ints, so you may be casting longs to ints a lot. On Tue, Jul 2, 2013 at 11:05 AM, Jim - FooBar(); jimpil1...@gmail.comwrote: I'm really sorry for coming back to this but even after everything we learned I'm still not able to get

Re: [ANN] Fluokitten - Category theory concepts in Clojure - Functors, Applicatives, Monads, Monoids and more

2013-07-02 Thread Michael Klishin
2013/7/2 Dragan Djuric draga...@gmail.com I am pleased to announce a first public release of new (and different) monads and friends library for Clojure. Extensive *documentation* is at http://fluokitten.uncomplicate.org Good job, Dragan! -- MK http://github.com/michaelklishin

Re: Clojure generates unnecessary and slow type-checks

2013-07-02 Thread Jim - FooBar();
with a long counter it needs slightly longer (216 microseconds in average instead of 196)! any other ideas? On 02/07/13 19:11, Leon Barrett wrote: Try longs instead of ints? Clojure doesn't support local ints, so you may be casting longs to ints a lot. On Tue, Jul 2, 2013 at 11:05 AM, Jim -

Re: New CSS library - Garden

2013-07-02 Thread Joel Holdbrooks
Rob, Sorry for the late reply. I've been a bit distracted the past few days. I'll try to address your thoughts as best I can. *There could even be a grid protocol and fluid, responsive, fixed, mobile, etc be implementations of it, or multi-methods, or maybe its an overkill.* I don't think this

Re: Bounded futures

2013-07-02 Thread Jim - FooBar();
a purely stylistic comment... you may want to consider 'with-resources' to get rid of all the try/finally clutter. I'd write your let statement like this: (let [step (fn [x] (with-resources [sem (Semaphore. limit true)] #(.release ^Semaphore %) (.acquire

Re: Bounded futures

2013-07-02 Thread Jim - FooBar();
On 02/07/13 18:30, Brian Kirkbride wrote: In the past I had used promises that were fulfilled by a FixedThreadPool. But that's a lot of setup and teardown that distracts from what you're actually trying to achieve. no it's not...you define it once you use it forever! :) (defn pool-map A

Re: Bounded futures

2013-07-02 Thread Brian Kirkbride
On Tuesday, July 2, 2013 1:37:20 PM UTC-5, Jim foo.bar wrote: a purely stylistic comment... you may want to consider 'with-resources' to get rid of all the try/finally clutter. I'd write your let statement like this: (let [step (fn [x] (with-resources [sem (Semaphore.

Re: Clojure generates unnecessary and slow type-checks

2013-07-02 Thread Leon Barrett
I got nothin'. Stare at the bytecode? On Tue, Jul 2, 2013 at 11:21 AM, Jim - FooBar(); jimpil1...@gmail.comwrote: with a long counter it needs slightly longer (216 microseconds in average instead of 196)! any other ideas? On 02/07/13 19:11, Leon Barrett wrote: Try longs instead of

Re: Bounded futures

2013-07-02 Thread Jim - FooBar();
On 02/07/13 19:49, Brian Kirkbride wrote: Interesting, I hadn't considered with-resources. I don't think your code does the same thing, since the release happens in the calling thread, not inside the future. Right? oops! you're right...I rushed and I apologise...with-resources won't work

Re: Bounded futures

2013-07-02 Thread Jim - FooBar();
On 02/07/13 19:49, Brian Kirkbride wrote: In my case, processing each item can take a while, is not CPU intensive and their aren't too many items. so in your case you need an unbounded-pool...my work involves cpu-intensive tasks and haven't written a version of pool-map that uses an

Re: Bounded futures

2013-07-02 Thread Brian Kirkbride
On Tuesday, July 2, 2013 1:41:14 PM UTC-5, Jim foo.bar wrote: On 02/07/13 18:30, Brian Kirkbride wrote: In the past I had used promises that were fulfilled by a FixedThreadPool. But that's a lot of setup and teardown that distracts from what you're actually trying to achieve. no

Using core.async to port Clojure to Go

2013-07-02 Thread Robert
Are all Clojure concurrency primitives efficiently implementable on top of core.async? If so, could this be used to port Clojure from the JVM/CLR/JS to Go? -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to

Re: Bounded futures

2013-07-02 Thread Jim - FooBar();
On 02/07/13 20:05, Brian Kirkbride wrote: One thing that I really like about blocking in acquire vs submitting everything to an ExecutorService/CompletionService right off the bat: you can bail out of the remainder of the computation when one part fails. I've got a function that creates a

Re: Using core.async to port Clojure to Go

2013-07-02 Thread Jim - FooBar();
I've not looked at core.async yet but I'd expect it to build on top of the built-in concurrency primitives and not the other way around... Jim On 02/07/13 20:12, Robert wrote: Are all Clojure concurrency primitives efficiently implementable on top of core.async? If so, could this be used

Re: [ANN] Fluokitten - Category theory concepts in Clojure - Functors, Applicatives, Monads, Monoids and more

2013-07-02 Thread Ben Wolfson
I haven't played around with this but it looks as if the second argument to bind needs to know what kind of monad it's operating in, is that right? Would it be possible to write agnostic functions like this in this lib? monads.core (defn tst-reader [f] (mdo env - ask

Re: Using core.async to port Clojure to Go

2013-07-02 Thread Jim - FooBar();
also what you're asking doesn't really make sensehow would you implement synchronisation primitives (stm atoms promises) on top of asynchronous infrastructure? agents are asynchronous but I haven't got a clue about the potential benefits (or not) of implementing them on top of core.async.

Re: core.async implemented on top of Pulsar

2013-07-02 Thread pron
I had some time to play with core.async further today, and I learned some more about it. First let me say that I've completed the implementation of core.async on top of Pulsar (I've copied the alt! macro from the core.async repository and placed a copyright notice around it). I ran some of

Re: Clojure generates unnecessary and slow type-checks

2013-07-02 Thread Jason Wolfe
I guess this is not connected to our issue. You're using Clojure's BigInt, which is probably a bit slower than BigInteger if you know you want it to be big: user (class 1N) clojure.lang.BigInt Have you tried translating your Java code directly to see if that helps? On Tue, Jul 2, 2013 at

ANN Elastisch 1.1.1 is released

2013-07-02 Thread Michael Klishin
Elastisch [1] is a minimalistic, feature rich, well documented Clojure client for ElasticSearch. 1.1.1 is a bug fix release. Release notes: http://blog.clojurewerkz.org/blog/2013/07/02/elastisch-1-dot-1-1-is-released/ 1. http://clojureelasticsearch.info -- MK http://github.com/michaelklishin

ANN Pantomime 1.8.0 is released

2013-07-02 Thread Michael Klishin
Pantomime [1] is a tiny Clojure library that deals with MIME types. Release notes: http://blog.clojurewerkz.org/blog/2013/07/02/pantomime-1-dot-8-0-is-released/ 1. https://github.com/michaelklishin/pantomime -- MK http://github.com/michaelklishin http://twitter.com/michaelklishin -- -- You

Re: Bounded futures

2013-07-02 Thread Brian Kirkbride
On Tuesday, July 2, 2013 2:13:04 PM UTC-5, Jim foo.bar wrote: On 02/07/13 20:05, Brian Kirkbride wrote: One thing that I really like about blocking in acquire vs submitting everything to an ExecutorService/CompletionService right off the bat: you can bail out of the remainder of the

Re: [ANN] Fluokitten - Category theory concepts in Clojure - Functors, Applicatives, Monads, Monoids and more

2013-07-02 Thread Dragan Djuric
No, the second argument to bind only needs to be a function that takes a plain value and return a monadic value; you do not need to specify anything explicitly and it does not need to know what kind of monad it is operating on. Whatever that function returns will be a monad that the eventual

Re: [ANN] Fluokitten - Category theory concepts in Clojure - Functors, Applicatives, Monads, Monoids and more

2013-07-02 Thread Ben Wolfson
I did look at the docs and I don't really get how to return a monadic value in the right monad, the way return does automatically. All the examples I saw have something like vector or atom or what-have-you. On Tue, Jul 2, 2013 at 2:41 PM, Dragan Djuric draga...@gmail.com wrote: No, the second

Re: [ANN] Fluokitten - Category theory concepts in Clojure - Functors, Applicatives, Monads, Monoids and more

2013-07-02 Thread Ben Wolfson
e.g., I'm not sure how to define the function f here: $ ghci GHCi, version 7.4.1: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer-gmp ... linking ... done. Loading package base ... linking ... done. Prelude let f :: (Monad m) = (a -

Re: Microsoft Rx -style operations with core.async

2013-07-02 Thread Brandon Bloom
When I first wrote this code, I intentionally avoided any custom syntactical sugar and worked as closely with the primitives as I could. After a few days away, I've used fresh eyes to abstract and revamp. The new code is *dramatically* cleaner and I only needed to introduce a few simple and

Re: Microsoft Rx -style operations with core.async

2013-07-02 Thread Timothy Baldridge
These look great! I would, however, avoid using go-as. In the JCSP example a style such as this is prefered most of the time: (defn inc-all increments every int received in the input channel ([in] (let [out (chan)] (inc-all in out) out)) ([in out] (go (while true (! out

Re: [ANN] Fluokitten - Category theory concepts in Clojure - Functors, Applicatives, Monads, Monoids and more

2013-07-02 Thread Dragan Djuric
pure function, defined in applicative, is equivalent to return (In Haskell, in Fluokitten there is only pure). I think I understand what is your question now. Since Clojure does not support polymorphysm based on the returning argument you cannot translate that Haskell code exactly. For such a

Re: [ANN] Fluokitten - Category theory concepts in Clojure - Functors, Applicatives, Monads, Monoids and more

2013-07-02 Thread Dragan Djuric
I wanted to say THE pure function. Now I realize that pure function is ambiguous :) On Wednesday, July 3, 2013 1:03:26 AM UTC+2, Dragan Djuric wrote: pure function, defined in applicative, is equivalent to return (In Haskell, in Fluokitten there is only pure). I think I understand what is

Re: [ANN] Fluokitten - Category theory concepts in Clojure - Functors, Applicatives, Monads, Monoids and more

2013-07-02 Thread Ben Wolfson
IMO you *always* want the monad to stay the same---the laws describing monadic computations don't account for swapping the things out midstream, at any rate. And it pays to be able to define monadic computations without having to explicitly pass around a token to serve as the current monad. FWIW,

Re: [ANN] Fluokitten - Category theory concepts in Clojure - Functors, Applicatives, Monads, Monoids and more

2013-07-02 Thread Dragan Djuric
And in this case you have to explicitly specify which monad you want to use, every time you call bind. I understand that in some case it might be a preferred way, but in my opinion for most cases that I care about I prefer it the other way. Regarding monadic laws, which one exactly demands

Re: [ANN] byte-streams: a rosetta stone for all the byte representations the jvm has to offer

2013-07-02 Thread Zach Tellman
Hey Mike, Please feel free to appropriate or adapt any code you think might be useful. I've signed a CA, it should all be kosher. As far as an immutable byte-data type, I'm a little skeptical it would be useful in a wide variety of situations, since a dense array/matrix is going to be much

Re: [ANN] Fluokitten - Category theory concepts in Clojure - Functors, Applicatives, Monads, Monoids and more

2013-07-02 Thread Ben Wolfson
On Tue, Jul 2, 2013 at 4:33 PM, Dragan Djuric draga...@gmail.com wrote: And in this case you have to explicitly specify which monad you want to use, every time you call bind. I understand that in some case it might be a preferred way, but in my opinion for most cases that I care about I prefer

Re: [ANN] Fluokitten - Category theory concepts in Clojure - Functors, Applicatives, Monads, Monoids and more

2013-07-02 Thread Ben Wolfson
On Tue, Jul 2, 2013 at 5:06 PM, Ben Wolfson wolf...@gmail.com wrote: On Tue, Jul 2, 2013 at 4:33 PM, Dragan Djuric draga...@gmail.com wrote: Regarding monadic laws, which one exactly demands that you cannot change the monad (not counting the fact that haskell's implementation does it that

Re: Clojure generates unnecessary and slow type-checks

2013-07-02 Thread Stuart Sierra
Hi Jim, I cannot reproduce your results. I see Clojure and Java with similar performance when they are both using java.lang.BigInteger. Clojure's arbitrary-precision integer defaults to clojure.lang.BigInt, which in my test is about 12% slower than java.lang.BigInteger. See

Puppet Labs needs a Clojure developer

2013-07-02 Thread Deepak Giridharagopal
Puppet Labs [0] [1] builds open source and commercial systems automation tools. We're in every major linux distribution, and we're managing literally millions of systems at wide variety of shops (from Google to GitHub to Spotify to CERN to Pinterest to NYSE ...). Even if you've not heard of us

Re: Using core.async to port Clojure to Go

2013-07-02 Thread Cedric Greevey
Promises and agents are both fairly straightforward. It's STM and atoms that wouldn't be. But delivering things to blocking channel-gets could be used as a latch to control access to critical sections, so you could probably implement ordinary locks on top of core.async, and locks can then be used

Re: core.async implemented on top of Pulsar

2013-07-02 Thread Cedric Greevey
On Tue, Jul 2, 2013 at 3:27 PM, pron ron.press...@gmail.com wrote: I do forget the meaning of ! and !; I mean, which is send and which is receive? then I remember, oh, the ! stands for the channel, but again I forget which side of the bang the arrow goes). Bang's always on the right, and the