[ANN] com.walmartlabs/schematic 1.1.0

2018-03-30 Thread Steve Ashton
Schematic is a Clojure library which aids in assembling Component systems from configuration data. * Expects components to implement the Component/Lifecycle protocol * Prefers pure data for declaring dependencies * Provides a simple mechanism for assembling/starting just a subset of Components

Re: Kicking off a process in Compojure Defroutes / http-kit runserver

2016-02-01 Thread Steve Ashton
This sounds like a good candidate for using Component (https://github.com/stuartsierra/component). I would think you could create a component which starts the async process. That component could then be provided to your ring handlers, to be used during web request processing. On Monday, Febru

Re: How to include ... in project.clj

2015-06-03 Thread Steve Ashton
Try: :repositories [["..." "url"]] -Steve -- 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 unsu

map-in

2015-03-24 Thread Steve Ashton
Is there anything for map which operates like update-in and assoc-in, where we can call a function with the value looked up in a nested structure? What I've come up with: (defn map-in "Returns a lazy sequence consisting of the results of calling map on coll, for each value in the coll, extr

Re: Help needed with Component library

2015-02-10 Thread Steve Ashton
In main.clj, it looks like you aren't keeping a reference to the started app. So when you call stop, you are actually stopping the version of the system which doesn't have the jetty server set. Try changing this: (defn -main [& args] (component/start app) (component/stop app)) to this: (de

Re: Combining reloaded workflow in web dev with dynamic var approach

2015-02-09 Thread Steve Ashton
I've had the same question. What I've come up with is to introduce a new middleware in the the dev-system, which wraps the both the creation of the app handler and calling the handler with the request map. The prod-system would still refer directly to a single instance of the app handler. Now i

Better update function

2014-12-21 Thread Steve Ashton
I'm trying to figure out if there is a better / more concise / more generic way to write an update function. The data I have is a vector of maps containing vectors of maps. For example: [{:values [{:y 1 :x 4}{:y 2 :x 7}]}{:values [{:y 5 :x 8}]}] The goal is to update all the :y values or all