Re: [ANN] spec.alpha 0.1.109

2017-05-26 Thread Sean Corfield
I’ve mentioned this on Slack and IRC and I’ll just highlight it again here… If you’re doing programmatic decoding of explain-data to produce “friendly” messages and you currently do anything with the :pred value in the returned map, then this change will affect you: · CLJ-2059 -

ANN: ClojureScript 1.9.562 - Clojure 1.9.0-alpha17 parity

2017-05-26 Thread David Nolen
ClojureScript, the Clojure compiler that emits JavaScript source code. README and source code: https://github.com/clojure/clojurescript Leiningen dependency information: [org.clojure/clojurescript "1.9.562"] This release coincides with Clojure 1.9.0-alpha17, includes a variety of fixes, and

regarding writing unit tests in clojure for existing java code

2017-05-26 Thread manas . marthi
Hello All,. We have a large java code base. Junits are not keeping in pace with the code base changes and quite a number are outdated. I was wondering if I can use clojure to write unit tests and run them using Junit Runner so that the unit tests pass inside eclipse as part of compilation

[ANN] Clojure 1.9.0-alpha17

2017-05-26 Thread Alex Miller
Clojure 1.9.0-alpha17 is now available. Try it via - Download: https://repo1.maven.org/maven2/org/clojure/clojure/1.9.0-alpha17 - Leiningen: [org.clojure/clojure "1.9.0-alpha17"] 1.9.0-alpha17 includes the following changes since 1.9.0-alpha16: - CLJ-1793 Clear 'this' before calls in tail

Re: pmap: transducer & chunking

2017-05-26 Thread Timothy Dean
I have used pipeline before, and when working with channels it is quite convenient. But transducers are useful for many cases outside the use of channels and core.async. And pipeline cannot compose with transducers, afaik. So for the situation I describe, it seems to me that using pipeline would

Re: pmap: transducer & chunking

2017-05-26 Thread Gary Trakhman
Have you looked into core.async's 'pipeline' function for parallelism? That was my first question when I saw this post. I'm not sure why there's a need for pmap. On Fri, May 26, 2017 at 12:29 PM Timothy Dean wrote: > You can also get an indication this way, I think: > >

Re: pmap: transducer & chunking

2017-05-26 Thread Timothy Dean
You can also get an indication this way, I think: user=> (defn f [x] (Thread/sleep 100) x) #'user/f user=> (time (doall (pmap f (range 32 "Elapsed time: 128.383719 msecs" user=> (time (doall (pmap f (range 33 "Elapsed time: 201.462131 msecs" user=> (time (doall (pmap f (range 64

Re: Beginner: let with Java object

2017-05-26 Thread Christopher Howard
I restarted the Emacs CIDER REPL, and now it seems to work fine. Maybe I just don't understand how to use this CIDER REPL properly. On 05/26/2017 07:58 AM, Gary Trakhman wrote: > There shouldn't be a difference, I would suspect a typo in your file. > > The error 'ClassCastException

Re: [ANN] spec.alpha 0.1.109

2017-05-26 Thread Alex Miller
There was a build snafu with the version number so we have re-released this as [org.clojure/spec.alpha "0.1.123"]. No code changes, so effectively the same content. On Friday, May 26, 2017 at 10:16:57 AM UTC-5, Alex Miller wrote: > > spec.alpha 0.1.109 is now available. > > Try it via:

Re: Beginner: let with Java object

2017-05-26 Thread Gary Trakhman
There shouldn't be a difference, I would suspect a typo in your file. The error 'ClassCastException java.awt.image.BufferedImage cannot be cast to clojure.lang.IFn tutorial.core/-main (core.clj:11)' would lead me to look for things like '(img)' where the object ends up in call position of the

Beginner: let with Java object

2017-05-26 Thread Christopher Howard
When I run tutorial.core> (let [img (new-image 32 32)] (set-pixel img 10 10 cyan) (show img)) from the REPL, this returns a javax.swing.JFrame object, and displays the frame and image as expected. However, if put the same in (defn -main "Generates image." [& args] (let [img (new-image 32

[ANN] spec.alpha 0.1.109

2017-05-26 Thread Alex Miller
spec.alpha 0.1.109 is now available. Try it via: [org.clojure/spec.alpha "0.1.109"] 0.1.109 includes the following changes: - CLJ-2153 - Docstring for int-in-range? and int-in now mention fixed precision constraint - CLJ-2085

Re: [ANN] com.walmartlabs/lacinia 0.17.0

2017-05-26 Thread Antoine Chesnais
Awesome! Thank you so much On Wednesday, 24 May 2017 17:58:35 UTC+2, Howard M. Lewis Ship wrote: > > Lacinia is an open-source implementation of Facebook's GraphQL > specification, in Clojure. > > GraphQL is an outstanding approach to getting diverse clients and servers > exchanging data

Re: Able to consume some nom modules, not others

2017-05-26 Thread Christian Johansen
I suspect that the problem is that the library I'm looking to fetch does not actually export anything. It only defines a polyfill. If there's any way to make that work I'd like to know. Christian fredag 26. mai 2017 10.59.20 UTC+2 skrev Christian Johansen følgende: > > I'm in need of an

Re: pmap: transducer & chunking

2017-05-26 Thread Matching Socks
With the overhead of threading, isn't the triumph of a transducer (no seq allocations) rather subtle in the case of pmap? At any rate!, as a point of interest, since you mentioned a quirk of pmap's thread usage: It apparently has to do with whether the input sequence is a chunked sequence or

Able to consume some nom modules, not others

2017-05-26 Thread Christian Johansen
I'm in need of an EventSource polyfill for my app to work in IE/Edge. So I figured I'd take a look at the new npm support. I can get the left-pad example from this post to work: https://anmonteiro.com/2017/03/requiring-node-js-modules-from-clojurescript-namespaces/ However, trying to build

pmap: transducer & chunking

2017-05-26 Thread Timothy Dean
Good evening all, I have wondered for some time why pmap did not have a transducer form analogous to map's. Today I took a shot at writing such a transducer form. The result seems to work correctly and the implementation behaves as I would expect a pmap transducer to behave, so I thought I would