Re: [ANN] Clojure 1.8.0-RC3

2015-12-07 Thread Alex Miller
Given how long clojure-contrib has been deprecated, I'm not going to prioritize this unless there is a specific reproducible issue that is related to 1.7 vs 1.8. On Monday, December 7, 2015 at 11:46:30 PM UTC-6, Sean Grove wrote: > > It's not super compelling for us (we can upgrade with some

Re: How to avaoid regresssions in Clojure Applications

2015-12-07 Thread Timur
Thank you for your answers. Especially, thanks to Colin for such a detailed answer. Regards, Timur On Saturday, December 5, 2015 at 5:52:35 PM UTC+1, Magnus Therning wrote: > > > Timur writes: > > > Hi all, > > > > I'm using Clojure to build a set of services. > > > > Development with

Re: mexpand on macrolet

2015-12-07 Thread retnuH
This worked for me (after some experimentation): (pprint (mexpand-1 '(symbol-macrolet [b (+ 1 2)] b))) ;; (do (+ 1 2)) ;; nil Cheers, H On Saturday, 5 December 2015 07:45:38 UTC, Ritchie Cai wrote: > > I'm not sure how to print a macroexpand on macros that defined in macrolet > or

Re: Guidance on modelling listeners

2015-12-07 Thread Colin Yates
Thanks Jason, I don’t particularly want dynamic registration; when the ‘world’ is instantiated it can now about the observers. I could do this but it is missing the ‘filter out uninteresting events’ bit. I want each observer to declare its interest. Your ‘middleware pattern’ however is

Re: Guidance on modelling listeners

2015-12-07 Thread Jason Felice
It looks like you want dynamic registration of event handlers, which is not something I've done. If you *didn't* want that, then this the middleware pattern: (defn null-processor [world event] world) (defn some-other-middleware [handler] (fn [world event] ... (handler world

New Functional Programming Job Opportunities

2015-12-07 Thread Functional Jobs
Here are some functional programming job opportunities that were posted recently: Haskell Engineer at Wagon https://functionaljobs.com/jobs/8868-haskell-engineer-at-wagon Cheers, Sean Murphy FunctionalJobs.com -- You received this message because you are subscribed to the Google

Re: Naming convention for atoms, refs, etc.?

2015-12-07 Thread Daniel Kersten
Good point, Colin, about mixed refs and atoms. That might change things a little (although in my years of Clojure, I have never needed to mix them to the point of needing to clarify). I would still prefer a textually descriptive name over a symbolic prefix or suffix in this case though. At the

Clojure eXchange 2015

2015-12-07 Thread Eric Le Goff
Just found that talks are available on Skills Matter https://skillsmatter.com/conferences/6861-clojure-exchange-2015#skillscasts Eric -- 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

Re: Naming convention for atoms, refs, etc.?

2015-12-07 Thread Mark Engelberg
On the contrary, I find that when I have something in my app like a shopping-cart, there are usually two flavors of functions. On the one hand, there will be helper functions that take an immutable shopping-cart and return a new immutable shopping-cart. But on the other hand, there will also be

Re: Naming convention for atoms, refs, etc.?

2015-12-07 Thread Daniel Kersten
I personally don't like this. An atom won't suddenly change value without your knowledge because to get its value, you must use @ or deref (which should be a big warning that, yes, this value might change between calls to deref). Adding sigils, in my opinion, adds to the noise and makes it

Re: Naming convention for atoms, refs, etc.?

2015-12-07 Thread Colin Yates
+1. I haven’t done an extensive study, but I am sure all of my atoms’s stand out from other fns/vars because the name makes it obvious. For example, ‘shopping-cart’ can _only_ sensibly be state which can only be an atom. Having said that, if I had mixed refs and atoms then I might consider

Re: Naming convention for atoms, refs, etc.?

2015-12-07 Thread Colin Yates
Sure - but if I saw a reference (no pun intended) to ‘shopping-cart’ I would expect that to be stateful. Fns which take something and return something else I tend to name `something->something-else`. In other words, I am unlikely to have a var whose name is a lower-case noun that isn’t state.

Guidance on modelling listeners

2015-12-07 Thread Colin Yates
Hi all, (apologies for the wall of text but I think the context might be useful) I am using event sourcing so the world, at any given point in time is simply a `reduce` over those events. Throughout the application different things are interested in different events. A design that is

Re: mexpand on macrolet

2015-12-07 Thread Hunter Kelly
True! But from what I understand of the way symbol-macrolet works, it's not possible to do one without the other. symbol-macrolet actually looks for only symbols in the forms you pass it after the let bindings; it won't traverse inside any quoted forms. It also takes care not to override the

Re: [ANN] Clojure 1.8.0-RC3

2015-12-07 Thread Alex Miller
Just a reminder that this is a release candidate - that means that if we don't hear any issues, we will release it as 1.8.0. If you haven't yet, please give it a try Thanks, Alex On Wednesday, December 2, 2015 at 10:03:31 AM UTC-6, Alex Miller wrote: > > Clojure 1.8.0-RC3 is now

[ANN] io.aviso/pretty 0.1.20 -- pretty printing of Clojure exceptions

2015-12-07 Thread Howard Lewis Ship
Library for helping print things prettily, in Clojure - ANSI fonts, formatted exceptions This release improves Leiningen integration; when Pretty is used as a plugin, it is enabled for both REPL and for tests. Pretty has been updated for Clojure 1.8, specifically, to recognize direct linked

Re: mexpand on macrolet

2015-12-07 Thread gianluca torta
Hi Hunter, however, in this way you are expanding the application of the macro "symbol-macrolet" (which is itself a macro), not just the symbol macro "b": (pprint (mexpand-1 '(symbol-macrolet [b (+ 1 2)] b ["something" "else"]))) ;; (do (+ 1 2) ["something" "else"]) ;; nil cheers, Gianluca On

Re: [ANN] Clojure 1.8.0-RC3

2015-12-07 Thread Alex Miller
Happy to consider stuff like that, sooner better than later though. The only var in core that has been marked ^:redef so far is clojure.core/load. On Monday, December 7, 2015 at 7:47:15 PM UTC-6, Howard M. Lewis Ship wrote: > > I suspect there's a few cases where we would like to use direct

Re: [ANN] Clojure 1.8.0-RC3

2015-12-07 Thread Alex Miller
Re CLJ-1863, this was already problematic before 1.8 in some contexts. I would say it's undecided. -- 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: [ANN] Clojure 1.8.0-RC3

2015-12-07 Thread Sean Corfield
We’ve had it in QA since 12/2 but it hasn’t had much of a work out yet due to various staff vacations etc. This build is our first with direct linking enabled for our whole code base. I don’t know when we’ll get it into production. We’ve had RC2 in production since 11/24 with no issues. That

Re: Guidance on modelling listeners

2015-12-07 Thread Colin Yates
Hiya, I did consider (and have used) guarded visitors before but I discounted them because ‘action!’ ended up having the `case` statement when that visitor was interested in multiple events. I guess I could have one visitor per event …. To be specific, these visitors are pure, read-only

Re: [ANN] Clojure 1.8.0-RC3

2015-12-07 Thread Andy Fingerhut
I have done my usual 'mvn clean test' on multiple OS/JDK combos not tested on build.clojure.org, and found nothing amiss with 1.8.0-RC3. Is http://dev.clojure.org/jira/browse/CLJ-1863 considered problematic enough to fix before 1.8.0 goes out? Andy On Mon, Dec 7, 2015 at 1:36 PM, Alex Miller

Re: Guidance on modelling listeners

2015-12-07 Thread Aaron D. Valade
What I’ve done in a similar situation is having a protocol defined like so: (defprotocol Transition (valid? [this world input] “Checks if the transition is valid for this input given the state of the world”) (action! [this world input] “Changes the state of the world based

Re: [ANN] Clojure 1.8.0-RC3

2015-12-07 Thread Howard Lewis Ship
I suspect there's a few cases where we would like to use direct linking, but will not be able to, because it will disrupt a 3rd party library we use. This is hypothetical, so I'll keep you posted ... I may run some experiments in the next couple of days. Certainly, the use of alter-var-root by,

Re: [ANN] Clojure 1.8.0-RC3

2015-12-07 Thread Sean Grove
It's not super compelling for us (we can upgrade with some work), but we've run into an issue with [org.clojure/clojure-contrib "1.2.0"] when requiring clojure.contrib.math: Exception in thread "main" java.lang.RuntimeException: Unable to resolve symbol: remainder in this context,

Re: [ANN] Clojure 1.8.0-RC3

2015-12-07 Thread Shantanu Kumar
On Tuesday, 8 December 2015 07:17:15 UTC+5:30, Howard M. Lewis Ship wrote: > > I suspect there's a few cases where we would like to use direct linking, > but will not be able to, because it will disrupt a 3rd party library we > use. This is hypothetical, so I'll keep you posted ... I may run