Re: [ANN] Clojure 1.7.0-RC1 now available

2015-05-26 Thread Julien
My bad I was using an older beta. With latest RC1 the issue goes away. Julien Le mardi 26 mai 2015 23:24:41 UTC-3, Alex Miller a écrit : > > No, please report if so. > > On Tuesday, May 26, 2015 at 8:39:32 PM UTC-5, Julien wrote: >> >> I just ported an app with significant CLJX usage (55 files) t

Re: [ANN] Clojure 1.7.0-RC1 now available

2015-05-26 Thread Alex Miller
On Tuesday, May 26, 2015 at 8:45:25 PM UTC-5, Marshall Bockrath-Vandegrift wrote: > > Ugh -- looks like the iterator value re-use behavior for EnumMap entrySet > was "fixed" post Java 1.6 (my example was under Java 1.6, which I believe > is still a Clojure-supported version of Java?). > Java

Re: [ANN] Clojure 1.7.0-RC1 now available

2015-05-26 Thread Alex Miller
No, please report if so. On Tuesday, May 26, 2015 at 8:39:32 PM UTC-5, Julien wrote: > > I just ported an app with significant CLJX usage (55 files) to reader > conditionals and it works perfectly! > > It looks like there is a small issue related to map literal containing > comments but I am not

Re: [ANN] Clojure 1.7.0-RC1 now available

2015-05-26 Thread Mike Rodriguez
Seems like this could certainly be an issue with any interaction with Hadoop's infamous reduce-side iterable object reuse. I will have to test further where I may be affected similarly. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to thi

Re: Managing database schema

2015-05-26 Thread andy . chambers
One problem we found with ragtime is that if multiple developers are working on a schema simultaneously, it's quite easy to get into a state where `lein ragtime migrate` will complain about finding a migration it doesn't expect. I think you can work around this by rolling back to the nearest co

Education on Dynamic Binding

2015-05-26 Thread andy . chambers
This page on Jira says that dynamic binding should be documented as "The Clojure Way" to do error handling. Was this ever done? I managed to find a few blog posts discussing approach but nothing official. http://dev.clojure.org/display/design/Error+Handling Cheers, Andy -- You received this m

[ANN] Clojure 1.7.0-RC1 now available

2015-05-26 Thread Mike Rodriguez
I can see in Git several areas where the compiler now catches exceptions thrown and re throws them wrapped in this exception type. I've been out of town and unable to make a small example yet. I will soon. -- You received this message because you are subscribed to the Google Groups "Clojure" gr

Re: [ANN] Clojure 1.7.0-RC1 now available

2015-05-26 Thread Marshall Bockrath-Vandegrift
And to further explicate "bewildering" -- I mean that I only figured out what was happening because I was explicitly testing a library against 1.7.0-RC1 and even then had to `git bisect` *Clojure* to find the offending commit. Otherwise the resulting behavior is just that values generated via the

Re: [ANN] Clojure 1.7.0-RC1 now available

2015-05-26 Thread Leif
Object Pooling Considered Harmful? I'd be willing to bet more libraries than just Hadoop are using object pooling like this, especially older libraries written before object instantiation was as fast as it is now. So, if you are doing a lot of Java interop with libraries using object pooling,

Re: [ANN] Clojure 1.7.0-RC1 now available

2015-05-26 Thread Marshall Bockrath-Vandegrift
Ugh -- looks like the iterator value re-use behavior for EnumMap entrySet was "fixed" post Java 1.6 (my example was under Java 1.6, which I believe is still a Clojure-supported version of Java?). I can throw together a synthetic example, but I think the people following this thread get what's happ

Re: [ANN] Clojure 1.7.0-RC1 now available

2015-05-26 Thread Julien
I just ported an app with significant CLJX usage (55 files) to reader conditionals and it works perfectly! It looks like there is a small issue related to map literal containing comments but I am not sure if it has been reported yet. Julien Le jeudi 21 mai 2015 13:31:16 UTC-3, Alex Miller a éc

Re: [ANN] Clojure 1.7.0-RC1 now available

2015-05-26 Thread Alex Miller
That's not what I see with 1.7.0-RC1 (or any of the betas). I tried with both Java 1.7.0_25 and 1.8.0-b132. user=> *clojure-version* {:major 1, :minor 7, :incremental 0, :qualifier "RC1"} user=> (->> (map vector (java.util.EnumSet/allOf java.util.concurrent.TimeUnit) (range)) (into {}) (java.uti

Re: [ANN] Clojure 1.7.0-RC1 now available

2015-05-26 Thread Leif
Problem only arises with Clojure 1.7 + Java 1.6. /usr/lib/jvm/*java-8-oracle*/jre/bin/java -jar ~/.m2/repository/org/clojure/clojure/1.7.0-beta3/*clojure-1.7.0-beta3*.jar Clojure 1.7.0-beta3 user=> (->> (map vector (java.util.EnumSet/allOf java.util.concurrent.TimeUnit) (range)) (into {}) (java.

Re: [ANN] Clojure 1.7.0-RC1 now available

2015-05-26 Thread Daniel
Got where I could try it and instantly became very confused. Just...take a look. http://imgur.com/4LgBdCY On Tuesday, May 26, 2015 at 6:25:04 PM UTC-5, Marshall Bockrath-Vandegrift wrote: > > The difference is that the original behavior allowed room to transform the > mutated object into an ob

Re: [ANN] Clojure 1.7.0-RC1 now available

2015-05-26 Thread Daniel
Marshall, I'm unable to test at the moment, but if you replace (java.util.EnumSet/allOf java.util.concurrent.TimeUnit) with (iterator-seq (.iterator (java.util.EnumSet/allOf java.util.concurrent.TimeUnit))) will it work then? On Tuesday, May 26, 2015 at 6:25:04 PM UTC-5, Marshall Bockrath-Van

Re: [ANN]: Matcha, a library for composable test assertions with human readable error messages

2015-05-26 Thread James Elliott
The API docs need a little love too... It seems that the examples for has-nth are actually for has-count; the second example for both has-denominator and has-numerator are actually about nil?, the examples for has-key appear to actually be testing the values, not the keys, the examples for not

Re: [ANN] Clojure 1.7.0-RC1 now available

2015-05-26 Thread Marshall Bockrath-Vandegrift
The difference is that the original behavior allowed room to transform the mutated object into an object which *could* be safely cached in a "downstream" seq, while the new behavior pumps the iterator through 32 mutations before user-level code has a chance to see it. Contrived example using the J

Re: [ANN]: Matcha, a library for composable test assertions with human readable error messages

2015-05-26 Thread James Elliott
Oh, sorry, here is my actual test: (m/is (m/has-entry-that :status (m/= 200)) (http/get "http://localhost:12081/idp/status";)) -- 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 po

Re: [ANN]: Matcha, a library for composable test assertions with human readable error messages

2015-05-26 Thread James Elliott
This looks pretty cool! One thing I wonder, though, why am I seeing all these \n values rather than actual newlines in the "actual" value, which would make the output so much easier to read? Is there any way to configure or use it differently that would avoid this issue? (This is with lein test

Re: [ANN] Clojure 1.7.0-RC1 now available

2015-05-26 Thread Alex Miller
In what way is it broken? Both before and after wrapped a mutable iterator into a caching seq. The new one is different in that it chunks so reads 32 at a time instead of 1. However combining either with other chunking sequence operations would have the same effect which is to say that using tha

Re: [ANN] Clojure 1.7.0-RC1 now available

2015-05-26 Thread Marshall Bockrath-Vandegrift
Some of my code is broken by commit c47e1bbcfa227723df28d1c9e0a6df2bcb0fecc1, which landed in 1.7.0-alpha6 (I lasted tested with -alpha5 and have been unfortunately busy since). The culprit is the switch to producing seqs over iterators as chunked iterators. This would appear to break seq-based t

Re: prose - a minimal language, inspired by Io/Ioke, that compiles to Clojure and ClojureScript

2015-05-26 Thread Aaron Lebo
It isn't Google, I just don't use mailing lists often. I gave a bad URL and I figured deleted the original messages would delete the thread. Here is the repost: https://groups.google.com/forum/?hl=en#!topic/clojure/NV8ujk4L8MI On Tuesday, May 26, 2015 at 11:59:14 AM UTC-5, Fluid Dynamics wrote:

Re: [ANN] Pedestal 0.4.0 and doc updates

2015-05-26 Thread Paul deGrandis
Effort was invested in updating the `samples ` over the docs, since it seemed like more people used those and we knew there were architectural changes coming down the roadmap. We added the API docs

Re: prose - a minimal language, inspired by Io/Ioke, that compiles to Clojure and ClojureScript

2015-05-26 Thread Fluid Dynamics
I'm sorry, but for some reason I can't seem to view the contents of this thread. In fact, even the "reply" button on it isn't working correctly (just does nothing) so I'm having to create a "new" thread with the appropriate subject line. Google seems to have effed something up here so perhaps y

repost (bad url): prose is a minimal language that is inspired by Io and Ioke that compiles down to Clojure and ClojureScript

2015-05-26 Thread Aaron Lebo
Hi, I wanted to show a little project I've been working on. It is called prose, the syntax is heavily inspired by Io and Ioke. It is not object-oriented, though. It does compiles to readable Clojure/Clojurescript. A quick comparison of syntax: prose: sum = reduce partial(+) [1, 2, 3] sum + 1

Re: clarity on binding and thread local

2015-05-26 Thread Omri Hurvitz
Yeh - I'm struggling with this myself. My intuition is 'atom signifies multithreaded access', but I did not see a lot of rebinding in idiomatic Clojure. On Tuesday, May 26, 2015 at 12:47:05 PM UTC-4, Colin Yates wrote: > > Hi Omri, I guess I could, using an atom to indicate multiple disparate >

Re: prose - a minimal language, inspired by Io/Ioke, that compiles to Clojure and ClojureScript

2015-05-26 Thread Aaron Lebo
Sorry, the url is https://github.com/aaron-lebo/prose On Tuesday, May 26, 2015 at 11:49:13 AM UTC-5, Aaron Lebo wrote: > > Hi, > > I wanted to show a little project I've been working on. > > It is called prose, the syntax is heavily inspired by Io and Ioke. It is > not object-oriented, though. I

prose - a minimal language, inspired by Io/Ioke, that compiles to Clojure and ClojureScript

2015-05-26 Thread Aaron Lebo
Hi, I wanted to show a little project I've been working on. It is called prose, the syntax is heavily inspired by Io and Ioke. It is not object-oriented, though. It does compiles to readable Clojure/Clojurescript. A quick comparison of syntax: prose: sum = reduce partial(+) [1, 2, 3] sum + 1

Re: clarity on binding and thread local

2015-05-26 Thread Colin Yates
Hi Omri, I guess I could, using an atom to indicate multiple disparate chunks of code will update it (all within the same thread) felt idiomatic. - the initial (binding) is at the transaction level, subject updates are within the transaction. > On 26 May 2015, at 17:38, Omri Hurvitz wrote: >

Re: [ANN] Pedestal 0.4.0 and doc updates

2015-05-26 Thread Lars Andersen
The roadmap for Pedestal has been saying for a while that the focus going forward is on various forms of documentation, yet most of the files in the documentation folder haven't been touched for quite some time. When I last wanted to take a closer look at Pedestal this put me off, because I fig

Re: clarity on binding and thread local

2015-05-26 Thread Omri Hurvitz
If you always access *callbacks* as a thread-local, IE in the same thread, why do you need it to be an atom? You can just rebind it using set! instead of swap!. Beyond that, I think that using thread locals this way is very useful when you want to limit the need for implementations to know your

Re: How can I remove this "nil?" check from my code?

2015-05-26 Thread Francis Avila
Your two functions can be written more succinctly (and with fewer explicit conditionals) like these, but they will be harder for a beginner to understand. (The nested update-in with fnil in particular may cause confusion.) (defn add-placeholder-to-history [users] (reduce-kv (fn [users uk {:k

[Component] - Remove (dissoc) component from system

2015-05-26 Thread Édipo Luis Féderle
Hi everyone, I am using componente framework , I have the follow system: (def system (let [config (get envs :dev)] (component/system-map :db (db-connection (get (get config :db) :host) (get

Re: lein uberjar with prep tasks of cljx once, garden once and cljsbuild once loops forever

2015-05-26 Thread Henrik Lundahl
Adding :auto-clean false to project.clj *might* do the trick. BR -- Henrik On Tue, May 26, 2015 at 1:54 PM, Colin Yates wrote: > This looks similar to https://github.com/lynaghk/cljx/issues/60 but I am > running 0.6.0. > > I have tried "lein do clean, cljx once, garden once, cljsbuild once,

Re: Advice when running java -jar rather than a managed server like tomcat?

2015-05-26 Thread Colin Yates
Thanks all for your excellent tips - keep it coming :). > On 26 May 2015, at 15:57, Henrik Lundahl wrote: > > Hi > > For Logback you can set a system property (logback.configurationFile) that > points to the location of your logback.xml. See > http://logback.qos.ch/manual/configuration.html >

Re: Advice when running java -jar rather than a managed server like tomcat?

2015-05-26 Thread Henrik Lundahl
Hi For Logback you can set a system property (logback.configurationFile) that points to the location of your logback.xml. See http://logback.qos.ch/manual/configuration.html. BR -- Henrik On Tue, May 26, 2015 at 1:38 PM, Colin Yates wrote: > Hi, > > I am venturing into new territory using h

[ANN] Pedestal 0.4.0 and doc updates

2015-05-26 Thread Paul deGrandis
Hi all, Pedestal 0.4.0 has been released, featuring: - A very fast and efficient prefix-tree router - The ability to plug-in new routers - A simplified and improved Interceptor API - Advanced error handling capabilities for async systems - an

Re: Advice when running java -jar rather than a managed server like tomcat?

2015-05-26 Thread Andrey Antukh
http://circus.readthedocs.org/en/0.11.1/ We are using it not only for deploy java, also: python and nodejs applications. Is a generc process monitor in a userspace with good comand line interface, with web interface, ... and works pretty well! Andrey On Tue, May 26, 2015 at 3:24 PM, Jozef Wagner

Re: Advice when running java -jar rather than a managed server like tomcat?

2015-05-26 Thread Jozef Wagner
We were using http://wrapper.tanukisoftware.com/doc/english/download.jsp for deploying uberjars as a service under linux (AWS), and were quite satisfied with it. On Tue, May 26, 2015 at 3:15 PM, Shantanu Kumar wrote: > I'm doing some of those things at work (http-kit, > logback+slf4j+MDC+clojure

Re: Advice when running java -jar rather than a managed server like tomcat?

2015-05-26 Thread Shantanu Kumar
I'm doing some of those things at work (http-kit, logback+slf4j+MDC+clojure.tools.logging, config via property files). My entry point (main) is a Java class that reads properties file, sets system properties to hoist logging config variables, then uses reflection to load other Java/Clojure init

Re: Advice when running java -jar rather than a managed server like tomcat?

2015-05-26 Thread Colin Yates
Thanks for those links David. On 26 May 2015 at 14:06, David Powell wrote: > I use procrun as a service wrapper on Windows. > > It is configured by the command-line used to install it, and generally works > with little fuss. > > I us

Re: Advice when running java -jar rather than a managed server like tomcat?

2015-05-26 Thread David Powell
I use procrun as a service wrapper on Windows. It is configured by the command-line used to install it, and generally works with little fuss. I use InnoSetup to create a windows installer. For the runtime class path, I just use someth

Re: How to add headers to a clojure.java.io/resource response

2015-05-26 Thread James Reeves
Compojure uses the compojure.response/render protocol method to turn values like URLs into Ring responses. So you could write: (-> (io/resource "public/html/confirm.html") (compojure.response/render) (response/header "X-Foo" "Bar")) Or you could use some middleware, if the hea

How to add headers to a clojure.java.io/resource response

2015-05-26 Thread Jonathon McKitrick
I have a GET route returning the result of this: (io/resource "public/html/confirm.html") but I need to add Cache-Control headers. Since the `resource` function returns a java.net.URL object, how can I add headers? The normal Ring way with ring.util.response/header only operates on a Ring res

lein uberjar with prep tasks of cljx once, garden once and cljsbuild once loops forever

2015-05-26 Thread Colin Yates
This looks similar to https://github.com/lynaghk/cljx/issues/60 but I am running 0.6.0. I have tried "lein do clean, cljx once, garden once, cljsbuild once, uberjar" but uberjar seems to clear the target directory thus making the previous tasks pointless. Any suggestions or pointers which are

Advice when running java -jar rather than a managed server like tomcat?

2015-05-26 Thread Colin Yates
Hi, I am venturing into new territory using http-kit, as I usually use a 'managed' web server container like tomcat and have a few questions about packing and running a JAR file: - are there are convenient service wrappers for windows and/or Linux - any best practice around managing class pat

Re: what demonstrates Stuart Sierra's "State/Event Pattern"

2015-05-26 Thread Stuart Sierra
Yes, you can use this pattern to define a mini-interpreter for a stream of events or commands, where each event is represented as a data structure. For example, I've used this pattern to write little scripts, a a collection of maps, for driving an integration test. –S On Monday, May 25, 2015 a