Re: feedback about solutions

2015-09-02 Thread r/ Wobben
Thanks, For anyone who is interested. Here are the exercises and theory: http://iloveponies.github.io/120-hour-epic-sax-marathon/I-am-a-horse-in-the-land-of-booleans.html and here are the exercises layout ;

Re: Filter predicates and side-effects

2015-09-02 Thread Michael Blume
Don't call filter for side effects, don't rely on when side effects will or will not happen, but yeah, your filter predicate can have side effects. On Wed, Sep 2, 2015 at 9:13 AM James Elliott wrote: > Indeed, that would make sense for filter, but since filterv immediately >

Filter predicates and side-effects

2015-09-02 Thread James Elliott
I notice that the documentation for filter and filterv are emphatic that the predicate you are using be free of side effects. Why is that so? For example, I would like to use filterv to collect a list of lighting effects which respond false to a protocol method which asks whether they have

Re: [ANN] prismatic/schema 1.0 adds automatic test data generation

2015-09-02 Thread Jason Felice
I have a question: "both" is deprecated with a note to use "s/conditional" instead. However, that doesn't work for my case. I have the following: (s/both s/Int (s/pred pos?)) If I rewrite it to (s/conditional pos? s/Int), this throws: (s/check (s/conditional pos? s/Int) "") Since (as far as

Re: Filter predicates and side-effects

2015-09-02 Thread James Elliott
Indeed, that would make sense for filter, but since filterv immediately puts them all into a vector, I was particularly puzzled by the warning on its doc string. In my case I am not relying on the side effects for anything, I merely cannot guarantee there are none (and even if chunking were an

Re: Filter predicates and side-effects

2015-09-02 Thread Raymond Huang
I believe the reason it's not recommended is because it returns a lazy chunked sequence. This means that it's not guaranteed to eagerly perform your side-effects, unless you wrap it in `doall`. On Wed, Sep 2, 2015 at 8:48 AM, James Elliott wrote: > I notice that the

[ANN] Ring-logger 0.7.0 released - mostly refactoring and deps cleaning

2015-09-02 Thread Nicolás Berger
I'm pleased to announce the release of [ring-logger "0.7.0"]! The goal for this release was to refactor the code in preparation for future improvements and to remove the timbre & onelog (which pulls log4j, etc) dependencies. Those were moved to the new companion projects that also have 0.7.0

Should `list?` be true for a clojure.lang.PersistentQueue item?

2015-09-02 Thread William Tozier
A confusing cond result sent me to an odd place just now, and apparently list? is true for the result of (clojure.lang.PersistentQueue/EMPTY) queue item. Now technically I see this makes sense, since `list?` "Returns true if x implements IPersistentList", and that's absolutely the case for

Stuart Sierra's Component: retries & restarts in production

2015-09-02 Thread josh
TLDR: how do you use Component when the application logic involves retrying failed components? Background: I'm writing an app that consumes events from a streaming HTTP connection and writes those events to a message queue (see Code Illustration #1). It seems like that could be captured easily

Re: [ANN] prismatic/schema 1.0 adds automatic test data generation

2015-09-02 Thread Jason Wolfe
Hi Matt, Thanks for the report. I just tried and I'm unable to reproduce. Can you please open an issue on the schema github project with your project.clj and the results of `lein deps :tree` and we'll look into it ASAP? Thanks, Jason On Wednesday, September 2, 2015 at 7:14:21 PM UTC-7,

Re: [ANN] prismatic/schema 1.0 adds automatic test data generation

2015-09-02 Thread Jason Wolfe
Hi Jason, That's a great question, thanks. The exception you point out is just a bug: https://github.com/Prismatic/schema/issues/263. Preconditions currently wrap exceptions and return sensible validation errors, we just missed this in guards. Will address this ASAP and cut a new release.

Re: [ANN] prismatic/schema 1.0 adds automatic test data generation

2015-09-02 Thread Matt Mitchell
I just created a scratch project using schema-1.0.0. Requiring schema.core works fine, but coerce throws an exception. Here's the repl session: user=> (require '[schema.core]) nil user=> (require '[schema.coerce]) CompilerException java.lang.RuntimeException: No such var: s/spec,

Re: Live rendering of AsciiDoc files in Chrome browser

2015-09-02 Thread James Elliott
Wow, thank you, this is fantastic! I have been developing an extensive set of AsciiDoc documentation (having been forced to transition from FrameMaker to DocBook XML, then driven by its complexity to Markdown, and frustrated by its limitations to AsciiDoc), but found it frustrating that I had

Re: Live rendering of AsciiDoc files in Chrome browser

2015-09-02 Thread Alan Thompson
Re "File URLs": Go to the Options page for Asciidoctor.js (right-click on the red "A" to the right of the address bar. At the top of the page you will see an alert that says, "Heads up! In order to use this extension on local files (i.e. files on this computer), you must check the option Allow

Live rendering of AsciiDoc files in Chrome browser

2015-09-02 Thread Alan Thompson
Hey, As you all know, the README files on Github, etc can be formatted using the either AsciiDoc (my favorite) or the older MarkDown format. However, it is a pain to edit these files in just a plain text editor without a good way of seeing the final, rendered format until you commit and push

Re: Clojure bootstrap, what am I missing here?

2015-09-02 Thread Andrew Oberstar
That's great! Andrew Oberstar On Tue, Sep 1, 2015, 11:25 PM Patrick Gombert wrote: > There is an effort underway to port the stdlib to clojure named > clojure.core . The idea is > to eventually to move off of clojure and

Re: [ANN] Nginx-Clojure v0.4.2

2015-09-02 Thread Michael McLellan
Awesome! Sente support was one of the reasons I didn't try it out on my latest project. On Tuesday, September 1, 2015 at 2:20:32 AM UTC-4, Xfeep wrote: > > 0.4.2 (2015-08-31) > >1. New Feature: Support Sente (issue #87 >, see

Re: feedback about solutions

2015-09-02 Thread r/ Wobben
Another question from a beginner. How do I add klein here : (defproject i-am-a-horse-in-the-land-of-booleans "1.0.0-SNAPSHOT" :dependencies [[org.clojure/clojure "1.5.1"] [iloveponies.tests/i-am-a-horse-in-the-land-of-booleans "0.1.0-SNAPSHOT"]] :profiles {:dev {:plugins

:bootclasspath causes java.lang.NullPointerException

2015-09-02 Thread J . Pablo Fernández
Hello, I'm trying to compile my project with :bootclasspath set to true, so as to have the jar for a java agent added to my classpath, but in one of my projects it's generating java.lang.NullPointerException on this line: (def app (middleware/wrap-base #'app-base)) which is preceded by: