Re: ClojureScript vs. Elm for Multiplayer Web Game

2015-09-21 Thread JvJ
Wow! An unexpected number of resources on exactly what I'm looking for! Thanks! ... but I am somehow surprised that someone could mention both Clojure and the Undead without using term "Macronomicon". On Monday, 21 September 2015 06:52:24 UTC-7, Gijs S. wrote: > > I have no experience with El

Re: pairwise?

2015-09-21 Thread juan.facorro
Hi J, I don't think there is a specific function in Clojure equivalent to *pairwise?* but I it might be more idiomatic to use the functions available in clojure.core to manipulate collections. I would implement *pairwise?* in the following way, others might suggest better/simpler ways though:

Re: clojure.core/run! doc string is incorrect

2015-09-21 Thread Mike Rodriguez
Thanks for the info! I should have searched for that on Jira first. I actually wasn't sure if doc changes typically warrant a Jira , but it looks like it ended up being more than a doc fix! -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to

Re: clojure.core/run! doc string is incorrect

2015-09-21 Thread Andy Fingerhut
Should be fixed in Clojure 1.8.0-alpha2 and later, due to this ticket and its attached patch: http://dev.clojure.org/jira/browse/CLJ-1761 Change was to force run! to return nil always. Andy On Mon, Sep 21, 2015 at 2:36 PM, Mike Rodriguez wrote: > The doc string for clojure.core/run! is: > "R

Re: Primitive pseudocode parser in Clojure

2015-09-21 Thread Matching Socks
Vitaliy Akimov described an approach to a similar problem here recently... https://groups.google.com/d/msg/clojure/HNH66_KNaNM/BjpJGnl7AgAJ -- 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

[ANN] Leiningen 2.5.3

2015-09-21 Thread Jean Niklas L'orange
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 variables were not propagated down to GPG. This caused `lein deploy` and similar commands to fail if you set up GPG with the `GPG_A

clojure.core/run! doc string is incorrect

2015-09-21 Thread Mike Rodriguez
The doc string for clojure.core/run! is: "Runs the supplied procedure (via reduce), for purposes of side effects, on successive items in the collection. Returns nil" However, it does not necessarily return nil. e.g. (run! #(do (println %) %) [1 2]) 1 2 ;= 2 It just returns whatever the give

Onyx Platform Release Digest

2015-09-21 Thread Lucas Bradstreet
The Onyx team is proud to announce some releases of Onyx Platform projects. Michael Drogalis (https://twitter.com/michaeldrogalis) and myself (https://twitter.com/ghaz) will both be at Strange Loop this week. If you're interested in Onyx come find us to have a chat! == Onyx Redis == https

pairwise?

2015-09-21 Thread jnape09
Hey all -- I recently found myself needing to check for pairwise property consistency across a sequence of elements, similar in spirit to inequality checking (in this case, date comparisons using clj-time *t/before?*). What I wanted was to do something like: (if (t/before? date-a date-b date-c

Re: Primitive pseudocode parser in Clojure

2015-09-21 Thread adrian . medina
I recommend Instaparse (https://github.com/Engelberg/instaparse) for all of your parsing needs. On Monday, September 21, 2015 at 12:29:16 PM UTC-4, Vitaliy Vlasov wrote: > > Hi all, > > I'm happy to write my first post here:) I am writing a mathematical > formula parser in Clojure. The formulas

[ANN] Release of pulley.cps 0.2.0

2015-09-21 Thread Nathan Davis
I'm pleased to annouce the release of verion 0.2.0 of pulley.cps . pulley.cps is a macro-based source-to-source transforming compiler that transforms Clojure code into Continuation Passing Style (CPS), as well as a supporting run-time libra

Primitive pseudocode parser in Clojure

2015-09-21 Thread Vitaliy Vlasov
Hi all, I'm happy to write my first post here:) I am writing a mathematical formula parser in Clojure. The formulas need to be written in infix notation and also support some primitive conditional statements (e.g. if-else and case), so that for instance this string would be parsed into a valid

Re: Question on clojure.test thrown? and clojure.lang.ArityException

2015-09-21 Thread Stuart Sierra
I think this might be a special case related to inlining in the Clojure compiler. It has nothing to do with clojure.test. The hint is the name of the function in the error message: core/quot--inliner--4345 The "inlined" version of `quot` is defined for two arguments: https://github.com/clojure

Re: Question on clojure.test thrown? and clojure.lang.ArityException

2015-09-21 Thread Nicolás Berger
I'd say there's nothing wrong with your second assertion but you were just lucky enough to try it with a function defined as :inline, which is caught by the compiler as being called with the wrong arity. The quot definition: https://github.com/clojure/clojure/blob/clojure-1.7.0/src/clj/clojure/cor

Question on clojure.test thrown? and clojure.lang.ArityException

2015-09-21 Thread Lance Campbell
Familiarizing myself with detecting exceptions with clojure.test. Purely for my own education. This assertion works: (is (thrown? clojure.lang.ArityException (/))) This assertions does not: (is (thrown? clojure.lang.ArityException (quot))) Caused by: clojure.lang.ArityException: Wrong number

Re: ClojureScript vs. Elm for Multiplayer Web Game

2015-09-21 Thread Gijs S.
I have no experience with Elm, but I have made a card game with ClojureScript: http://thegeez.net/2012/03/20/racket_gin_clojurescript.html As well as a version with a Datomic back-end: http://thegeez.net/2014/06/12/gin_datomic.html -- You received this message because you are subscribed to the

Re: To supply callback function from clojure to java method expecting a lambda with interop

2015-09-21 Thread Nagarajan
Noted . Thank you very much On 21-Sep-2015 1:00 pm, "Gary Verhaegen" wrote: > Note that you have to implement the one method of the functional > interface. It may not always be called "run", as Java 8 places no > restriction on the method name. > > On Sunday, 20 September 2015, Nagarajan wrote:

Re: To supply callback function from clojure to java method expecting a lambda with interop

2015-09-21 Thread Gary Verhaegen
Note that you have to implement the one method of the functional interface. It may not always be called "run", as Java 8 places no restriction on the method name. On Sunday, 20 September 2015, Nagarajan wrote: > Thank you everyone for clearing this up. Since my case is for a specific > java libr

Re: ClojureScript vs. Elm for Multiplayer Web Game

2015-09-21 Thread Mikera
I would definitely consider ClojureScript on the client plus Clojure on the server side. It's great to be able to build full-stack solutions using Clojure and share code across both the server and the browser, escpecially with the new .cljc support in Clojure 1.7 If you want an example of 2D ga