Re: [ClojureScript] ANN: ClojureScript 0.0-2719, JavaScript Dependencies

2015-01-26 Thread Laurent PETIT
Yet ? Le lundi 26 janvier 2015, David Nolen a écrit : > Webjars doesn't package JS libs in a useful way for ClojureScript. > > On Sunday, January 25, 2015, Ivan L > wrote: > >> To this end I would hope everyone takes a look at using webjars.org as >> their source for frontend libraries. imo, i

Re: Copy binary files in leiningen template

2015-01-26 Thread Sven Richter
After searching through github I found this method unpack: https://github.com/tailrecursion/hlisp-template/blob/65b89bd257eca86c4ce76b82066a0b059323cdfb/src/leiningen/new/hlisp.clj which does the trick. In the end it manually copies from the jar file to a local folder. I wonder if there is a s

Re: [ClojureScript] ANN: ClojureScript 0.0-2719, JavaScript Dependencies

2015-01-26 Thread David Nolen
On Mon, Jan 26, 2015 at 3:08 AM, Laurent PETIT wrote: > Yet ? Right if Webjars was open to including the necessary information that would be great. I suspect this will be challenging since Webjars has chosen RequireJS as the runtime loading mechanism whereas deps.cljs provides Google Closure ru

Hi I am a new user of clojure ,I am not being able to use lein

2015-01-26 Thread Bis
I am trying from some time but cant install lein. Tried with the MSI installer and it finishes properly but no repl is created neither lein tried with lein.bat ,getting errors everytime , "Exception calling Downloadfile with two arguement.the remote server returned an error 403 forbidden.(set ht

lein discovery issues

2015-01-26 Thread andrea crotti
Hello everyone A couple of questions about Lein and how to find templates/libraries. I found out now that "lein search" allows me to search for the last stable version of a library, however every time I run it it takes forever downloading the index: Downloading https://repo1.maven.org/maven2/.i

Re: simple procedure for updating a value one level down

2015-01-26 Thread Erik Price
Many functions that affect keyed collections will work on vectors if you supply the numeric index as a key. e On Monday, January 26, 2015, Josh Stratton wrote: > I'm new to clojure and FP in general. One thing that has always been a > little confusing for me is working with immutable trees. I

Re: simple procedure for updating a value one level down

2015-01-26 Thread Michael Willis
(def categories [ [ { :id 1 :text "foo" } { :id 2 :text "bar" :ack 5 } ] [ { :id 3 :age 7 } ] ]) #'user/categories (update-in categories [1 0] merge { :age 12 :somethingElse 29 }) [[{:text "foo", :id 1} {:text "bar", :ack 5, :id 2}] [{:age 12, :somethingElse 29, :id 3}]] On Monday, January 26,

Re: simple procedure for updating a value one level down

2015-01-26 Thread Michael Willis
Now that I think about it, I wonder why your categories aren't keyed by id, like this: (def categories [ {1 {:text "foo"} 2 {:text "bar" :ack 5}} {3 {:age 7}}]) Then the update-in can take the category id, instead of having to know its index within a vector: (update-in categories [1 3] merge

Re: simple procedure for updating a value one level down

2015-01-26 Thread Josh Stratton
They're not keyed by id because order in both the category and its items is important. I could maintain the order explicitly, but that just makes other problems like reordering more difficult. As a couple people have suggested I could access the page using vector indexing, but then I'd need to fig

Re: simple procedure for updating a value one level down

2015-01-26 Thread Lucas Bradstreet
Given these points I would probably just do: (defn update-val-with-id [values m] (map (fn [v] (if (= (:id v) id) (merge v m) v)) values)) I'm not that happy with it either, so other suggestions are welcome. On 27 Janua

Re: simple procedure for updating a value one level down

2015-01-26 Thread Josh Stratton
This is my current solution. Again, it works fine, but seems a little verbose. I have a function called update-item, which has to call update-item-in-category with the same parameters plus the category I'm currently mapping through. On Jan 26, 2015 8:11 AM, "Lucas Bradstreet" wrote: > Given these

Re: ANN: ClojureScript 0.0-2719, JavaScript Dependencies

2015-01-26 Thread Daniel
Extremely happy to see you promoting cljsjs as a community solution for something equivalent to clojars. On Sunday, January 25, 2015 at 1:42:54 PM UTC-6, David Nolen wrote: > > I strongly recommend the Clojure(Script) community join forces when > packaging libraries to avoid duplicated effort an

Heuristic search: convenient memoization?

2015-01-26 Thread David James
Background: I'm implementing a heuristic search over a tree of possibilities. The heuristic calculation runs over a map of state. I have a large number of nested functions that support this heuristic. So, for convenience, I often pass around `state` as the first argument in these functions. Ins

Re: Convenient memoization with destructured arguments

2015-01-26 Thread David James
I just renamed the subject line since my question has nothing inherently to do with heuristic search. (That was just my particular use case.) This kind of thing can happen in any codebase where destructuring of function arguments is used. On Monday, January 26, 2015 at 12:16:04 PM UTC-5, David

Re: [ANN] Clojure 1.7.0-alpha5 now available

2015-01-26 Thread Jozef Wagner
With CLJ-979 applied, lein may crash when doing :aot :all. This is caused when lein forces recompilation of already compiled classes. Not sure whether this should be considered a lein of clojure bug though. See https://github.com/wagjo/aotbug for contrived example. Jozef On Saturday, January 1

Re: Dynamically creating defrecord

2015-01-26 Thread JUAN ANTONIO Ruz
Hi Sven, I was trying to do the same with my library tangrammer/defrecord-wrapper and, just today, I found a couple of links that worked fine for that http://grokbase.com/t/gg/clojure/11cjvz1jda/defrecord-based-on-runtime-metadata http://stackove

Pedestal comparison to Sente/HTTPKit

2015-01-26 Thread Julio Barros
Hi, I'm starting on a new api based (analytics and event logging) project that will get many http requests that I need to handle concurrently and with low latency. I'm trying to understand how Pedestal (service) and Sente w/ HTTPKit compare for this use. Has anyone written up experiences that

Pedestal comparison to Sente/HTTPKit

2015-01-26 Thread Mike Haney
I haven't had a chance to really dig into Pedestal yet, but Ryan Neufeld did a video sometime back that really opened my eyes to how Pedestal works: http://youtu.be/sFT_0v-iKVQ Pedestal is primarily focused on letting you provide your services (RESTful or otherwise) while still providing some

Pedestal comparison to Sente/HTTPKit

2015-01-26 Thread Mike Haney
Forgot to mention, as far as raw performance/latency of HTTP servers go, you can find a comparison here: https://github.com/ptaoussanis/clojure-web-server-benchmarks -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email t

Re: Pedestal comparison to Sente/HTTPKit

2015-01-26 Thread Julio Barros
Hi Mike, Thanks for the reply. Yes forgot to mention that there will also be a UI component to monitor the events and the status of the system. Thats why I was considering sente and push. Thanks again. Julio -- You received this message because you are subscribed to the Google Groups "Cloju

Re: Pedestal comparison to Sente/HTTPKit

2015-01-26 Thread Ryan Neufeld
Glad to hear you enjoyed the video. Anyone taking a look at Pedestal should feel free to hit us up on our Google Group (https://groups.google.com/forum/#!forum/pedestal-users) should they have any questions. On Monday, January 26, 2015 at 4:00:56 PM UTC-6, Mike Haney wrote: > > Forgot to mentio

Re: Hi I am a new user of clojure ,I am not being able to use lein

2015-01-26 Thread Denis Fuenzalida
Hi Bis, I just tried Leiningen on a Windows 7 machine and what was simpler for me was to: * Install JDK 8 * Save lein.bat to a location where lein could be run from the command line (eg. C:\WINDOWS). * On a cmd.exe console run "lein self-install" to download lein's library. Didn't have to inst

ANN: Om 0.8.6, Hello CLJSJS

2015-01-26 Thread David Nolen
The only significant change is that Om now relies on the cljsjs.react artifact instead of the one I maintained myself. cljsjs.react has the benefit that usage of React with addons instead of plain React may be configured via Maven in your pom.xml or your project.clj. It's exciting to see that we ar

Re: Convenient memoization with destructured arguments

2015-01-26 Thread Rob Lally
Graph from prismatic/plumbing [ https://github.com/Prismatic/plumbing ] provides memoization/delayed-execution allowing you to maintain a map-like structure whilst deferring and caching calculations. Rob. > On 26 Jan 2015, at 09:17, David James wrote

Resources don't work in uberjar

2015-01-26 Thread Dan Harbin
I've created a sample project at Github[1] to demonstrate the problem I'm facing with accessing a resource file when using an uberjar. Could someone point out what I'm doing wrong here? Thanks! [1]: https://github.com/RasterBurn/halp ### Given this code: ### ```clojure (ns ha