Re: transducer (+ closures) efficiency question

2015-06-24 Thread Alan Shaw
As with all discussions involving interoperability, I'd love to see the same questions answered for the JS target too. (This would of course apply to books such as the new Clojure Applied. ) On Jun 24, 2015 9:48 AM, "Herwig Hochleitner" wrote: > > > 2015-06-24 18:19 GMT+02:00 Ben Wolfson : > >> >

Re: complex numbers in clojure

2015-04-29 Thread Alan Shaw
Ideally math APIs would be cross-platform #ClojureScript -- 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 your first

ANN: Cordova-Om Leiningen template

2015-04-16 Thread Alan Shaw
I've created a Leiningen template for Om projects with support for building with Cordova (alias PhoneGap). Core.async and Sablono are included. The template generates a small Hello World app (from a gist by Keith Irwin) which can be built upon. Documenting my process and hoping it's of use to oth

Question: Sente and WebSockets and access from external domains

2014-06-26 Thread Alan Shaw
I was hoping to use sente https://github.com/ptaoussanis/sente to provide access to a server endpoint from clients in arbitrary domains, but the sente client explicity prepends its own host to the user-provided endpoint: https://github.com/ptaoussanis/sente/blob/master/src/taoensso/sente.cljx#L764

Re: [ANN] Clojure cheat sheet (v13)

2014-03-30 Thread Alan Shaw
Thanks Andy! -- 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 your first post. To unsubscribe from this group, send e

Re: Recruiter claims to be Rick Hickey's sister

2013-12-02 Thread Alan Shaw
Great, thanks a lot Robert! On Mon, Dec 2, 2013 at 3:06 PM, Robert Levy wrote: > Yes Alan, Jenn Hillner is Rich Hickey's sister. I've worked with her on > finding a job before, and highly recommend. > > -Rob > > > On Mon, Dec 2, 2013 at 2:18 PM, Alan Shaw wrote:

Recruiter claims to be Rich Hickey's sister

2013-12-02 Thread Alan Shaw
Can I get a quick reality check on this? Thanks! -A -- -- 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 your first

Recruiter claims to be Rick Hickey's sister

2013-12-02 Thread Alan Shaw
Can I get a quick reality check on this? Thanks! -A -- -- 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 your first

Re: How does "

2013-09-14 Thread Alan Shaw
For "this value" please read "the value taken from this channel". On Sep 14, 2013 12:21 AM, "Alan Shaw" wrote: > The go block itself (and thus any call to walker) returns a channel. This > value is indeed thrown away; its utility lies entirely in the fact

Re: How does "

2013-09-14 Thread Alan Shaw
The go block itself (and thus any call to walker) returns a channel. This value is indeed thrown away; its utility lies entirely in the fact that the caller had to wait for it. All of the actual values from the tree are written to the supplied channel 'ch', and the ultimate caller of this function

Putting in alts! - haven't seen it used

2013-09-08 Thread Alan Shaw
I'm accustomed to using alts! to allow taking from a collection of core.async ports, but haven't come up with a use case for a put in alts!, either with or without takes. Have you? -A -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to thi

Another step towards the Connection Machine in Clojure

2013-08-20 Thread Alan Shaw
A core.async implementation of Per Brinch Hansen, "Parallel Cellular Automata" (1992): https://github.com/nodename/async-plgd#cellular -- -- 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 N

Re: What's your preference, partial or closures?

2013-08-19 Thread Alan Shaw
I read those. Now I'm screaming :) On Aug 18, 2013 11:40 PM, "Ben Wolfson" wrote: > Counterpoint! He's not crazy: > https://github.com/bwo/monads/blob/master/src/monads/util.clj#L8-43 > > > On Sun, Aug 18, 2013 at 9:20 PM, Sean Corfield wrote: > >> You're crazy :) >> >> On Sun, Aug 18, 2013 at 9:

What's your preference, partial or closures?

2013-08-16 Thread Alan Shaw
(defn newgrid [m initialize qi qj]... and then (let [init (partial newgrid m initialize)]... Or else: (defn newgrid [m initialize] (fn [qi qj]... and then (let [init (newgrid m initialize)]... -- -- You received this message because you are subscribed to the Google Groups "Cloju

At Long Last Hoare

2013-08-05 Thread Alan Shaw
The "Misc" section, containing the Sieve of Eratosthenes and a highly concurrent (and interesting) matrix multiplier, completes my Clojure core.async port of the examples from Hoare's 1978 Communicating Sequential Pr

Yet Moare Hoare

2013-07-28 Thread Alan Shaw
The Philosophers are Dining at https://github.com/nodename/async-plgd/blob/master/src/hoare/monitors.clj Comments, criticisms, corrections are appreciated. -A -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to c

Confused again by core.async

2013-07-23 Thread Alan Shaw
Hi, I hope I can get a lightbulb on what's happening here: https://github.com/nodename/async-plgd/blob/master/src/hoare/problem.clj Testing fan-in on a pair of processes and getting nutty results. Thanks, -A -- -- You received this message because you are subscribed to the Google Groups "Clo

core.async: Hoare's coroutine examples in Clojure

2013-07-18 Thread Alan Shaw
These are now working properly and ought to be readable by core.async beginners (I hope). https://github.com/nodename/async-plgd -A -- -- 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 No

Re: core.async: close! and control channels

2013-07-17 Thread Alan Shaw
e error is about. > > Timothy > > > On Wed, Jul 17, 2013 at 11:02 AM, Alan Shaw wrote: > >> The problem I am having is in the function at line 41 of >> >> https://github.com/nodename/async-plgd/blob/master/src/hoare/coroutines.clj. >> Any insight into this

Re: core.async: close! and control channels

2013-07-17 Thread Alan Shaw
The problem I am having is in the function at line 41 of https://github.com/nodename/async-plgd/blob/master/src/hoare/coroutines.clj. Any insight into this is appreciated. -A On Wed, Jul 17, 2013 at 7:23 AM, Timothy Baldridge wrote: > True, but I'll mention the semantics of channels once again

Re: core.async: close! and control channels

2013-07-16 Thread Alan Shaw
My code is at https://github.com/nodename/async-plgd . Here I reproduce Hoare's coroutines from the CSP paper, and find that none of the examples with pipelined coroutines work reliably. I'd appreciate any advice. On Tue, Jul 16, 2013 at 4:34 PM, Alan Shaw wrote: > It appears th

core.async: close! and control channels

2013-07-16 Thread Alan Shaw
It appears that you cannot call close! within a go block and so to signal the end of input to a channel you have to use another channel upon which the receiver can alt!. Some channels that are not stateful, such as a plain copier, would need no such mechanism. Or would it be good to use such a thi

Re: Some docs on comparators, including mistakes to avoid, & Clojure "extended doc strings"

2013-04-04 Thread Alan Shaw
Thumbs up on the comparators doc! On Apr 4, 2013 12:49 PM, "Andy Fingerhut" wrote: > I am seriously considering the idea of working on some "extended doc > strings" for Clojure functions. Having only scratched the surface so far, > I have learned that it could take a *lot* of hours to write such

Re: Improving visibility of clojure-doc.org

2013-02-28 Thread Alan Shaw
The ordinary visitor might be forgiven for expecting that both would be found under someplace like Clojure.org... just a thought. -A On Feb 28, 2013 2:04 AM, "Michael Klishin" wrote: > > 2013/2/28 xavriley > >> On another note, I wonder whether it's worth clarifying the position of >> the site

Re: Support for pmap?

2013-02-26 Thread Alan Shaw
Could parallel.js and web workers help? On Feb 25, 2013 6:12 PM, "David Nolen" wrote: > Not sure how we could given JS is single threaded. > > On Monday, February 25, 2013, MC Andre wrote: > >> Does ClojureScript support pmap? >> >> -- >> -- >> You received this message because you are subscribed

Re: Why is this so difficult?

2013-02-15 Thread Alan Shaw
Leiningen works on Windows. On Feb 15, 2013 8:32 AM, "Phil Hagelberg" wrote: > > So for the record, the reason Leiningen doesn't work on Windows is > primarily that Windows users spend a lot more time talking about how it > doesn't work on Windows, and very little time actually making it work on

Re: ANN: Clevolution, evolutionary art in Clojure

2013-01-02 Thread Alan Shaw
There is one thing that puzzles me: user=> (clisk-eval "(vround (vround x))") Error: java.lang.IllegalArgumentException: No matching method found: round Could be I'm just holding it wrong. -A On Wed, Jan 2, 2013 at 7:15 PM, Mikera wrote: > Cool project! I was hoping someone would manage to

ANN: Clevolution, evolutionary art in Clojure

2013-01-02 Thread Alan Shaw
Hi folks, My Clevolution project has been reimplemented using clisk, Mike Anderson's Clojure Image Synthesis Kit, greatly improving its speed and range of image-processing operations: http://nodename.github.com/clevolution/ -A -- You received this message because you are subscribed to the Googl

Re: Little namespace question

2012-12-19 Thread Alan Shaw
Oh! yes it does! -A On Wed, Dec 19, 2012 at 6:39 PM, Dave Ray wrote: > It does, right? > > > On Wednesday, December 19, 2012, Alan Shaw wrote: > >> But returning the evaluation was a requirement... >> >> >> On Wed, Dec 19, 2012 at 2:58 PM, Alan Shaw wr

Re: Little namespace question

2012-12-19 Thread Alan Shaw
; > On Wednesday, December 19, 2012 4:22:58 AM UTC-3, nodename wrote: > >> As an aside, I'm curious about whether this could have been implemented >> without a macro. >> >> -A >> On Dec 18, 2012 11:06 PM, "Alan Shaw" wrote: >> >>>

Re: Little namespace question

2012-12-18 Thread Alan Shaw
As an aside, I'm curious about whether this could have been implemented without a macro. -A On Dec 18, 2012 11:06 PM, "Alan Shaw" wrote: > Thanks very much Juan, that's some good study material for me. > > -A > On Dec 18, 2012 10:45 PM, "juan.facorro"

Re: Little namespace question

2012-12-18 Thread Alan Shaw
ret#))) >> >> >> >> user=> (def generator "(X 400 400)") >> #'user/generator >> user=> (def image (eval-in generator "clevolution.version.version0-** >> 1-1")) >> CompilerException java.lang.ClassCastException: clo

Re: Little namespace question

2012-12-18 Thread Alan Shaw
e.lang.Symbol cannot be cast to java.lang.String, compiling:(NO_SOURCE_PATH:1) user=> (def image (eval-in "(X 400 400)" "clevolution.version.version0-1-1")) #'user/image So it's OK to pass the explicit string but not the symbol. What am I not getting here? -A On Tue, Dec 18,

Re: Little namespace question

2012-12-18 Thread Alan Shaw
> > On Tue, Dec 18, 2012 at 1:38 PM, Alan Shaw wrote: > > BG, > > The macro doesn't seem to do the trick. The function X is interned in the > > target namespace, but: > > > > user=> (def image (eval-in "(X 400 400)" > > "clevolution

Re: Little namespace question

2012-12-18 Thread Alan Shaw
compiling:(NO_SOURCE_PATH:1) On Mon, Dec 17, 2012 at 11:53 PM, Alan Shaw wrote: > Oh yes, the something.something is fixed so I can just prepend it, thanks. > (Hadn't noticed your macro takes the ns as a string!) > > -A > > > > On Mon, Dec 17, 2012 at 11:47 P

Re: Little namespace question

2012-12-17 Thread Alan Shaw
ng.version-0-1-1" and not just > "version-0-1-1" [unless of course you have some other way of deriving > it from info that's embedded in _your_ code or structure thereof]. > > > -BG > > On Tue, Dec 18, 2012 at 1:10 PM, Alan Shaw wrote: > > Thanks BG,

Re: Little namespace question

2012-12-17 Thread Alan Shaw
; (in-ns '~(symbol ns)) > (let [ret# (eval '~(read-string code))] >(in-ns '~(ns-name *ns*)) >ret#))) > > Warning - I haven't really tested this code. > > -BG > > On Tue, Dec 18, 2012 at 12:37 PM, Alan Shaw wrote: > > Thanks, La

Re: Little namespace question

2012-12-17 Thread Alan Shaw
you could post a simple example for the second part of your question I > maybe able to help. > > Las > > Alan Shaw 2012. december 18., kedd napon a következőt írta: > > Ah no, that puts me in a new user-ns namespace! Not what I wanted! >> >> >> On Mon, Dec 1

Re: Little namespace question

2012-12-17 Thread Alan Shaw
Ah no, that puts me in a new user-ns namespace! Not what I wanted! On Mon, Dec 17, 2012 at 10:51 PM, László Török wrote: > Try (in-ns 'user-ns) > > Las > On Dec 18, 2012 7:50 AM, "Alan Shaw" wrote: > >> user=> *ns* >> # >> user=>

Little namespace question

2012-12-17 Thread Alan Shaw
which that string should be (read and) eval'ed so that the names will resolve to the appropriate functions. Advice on managing this would be appreciated. -Alan Shaw -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, s

Can't start Rhino repl for ClojureScript

2012-09-08 Thread Alan Shaw
Hi, Any help wd be appreciated; this is what happened (environment is Cygwin on win7): $ lein2 trampoline cljsbuild repl-rhino Running Rhino-based ClojureScript REPL. "(do (require (quote cljsbuild.repl.rhino)) (do (clojure.core/ns leiningen.core.injected) (defn- compose-hooks [f1 f2] (fn [& args

Re: Leiningen 2.0.0-preview4

2012-05-14 Thread Alan Shaw
Opened issues for both failures, thanks -A On Mon, May 14, 2012 at 2:02 PM, Phil Hagelberg wrote: > On Sat, May 12, 2012 at 3:22 PM, Alan Shaw wrote: > > In cygwin on win7 I get this: > > Could you open an issue on Github for this? > > I don't know enough about Wind

Re: Leiningen 2.0.0-preview4

2012-05-14 Thread Alan Shaw
Hi, In cygwin on win7 I get this: _ $ lein2 upgrade The script at /cygdrive/c/Users/alan/bin/lein2 will be upgraded to the latest preview version. Do you want to continue [Y/n]? Y Upgrading... % Total % Received % Xferd Average Speed Time Time Time Current Dload Uploa

Re: Leiningen 2.0.0-preview4

2012-05-14 Thread Alan Shaw
Having another little problem, any help appreciated: alan@shotwell /cygdrive/c/Workspaces/Clojure-lein $ lein2 new startingclojure Generating a project called startingclojure based on the 'default' template. java.lang.IllegalArgumentException: No implementation of method: :make-reader of protoc