Re: [Review] Slow server, not maxing out CPU

2016-07-20 Thread James Reeves
On 21 July 2016 at 05:05, Ashish Negi wrote: > with core async `go` you can not do blocking IO or any time consuming work. > `go` uses fixed threadpool (no of cpus + 2 or something). > and in your async-handler you are using ` https://clojure.github.io/core.async/ > >

Re: [Review] Slow server, not maxing out CPU

2016-07-20 Thread Ashish Negi
with core async `go` you can not do blocking IO or any time consuming work. `go` uses fixed threadpool (no of cpus + 2 or something). and in your async-handler you are using `https://clojure.github.io/core.async/ Try with `future`. https://clojuredocs.org/clojure.core/future Simplest would be to

Re: Enhance spec/double-in to handle open and half-open intervals?

2016-07-20 Thread Mars0i
On Wednesday, July 20, 2016 at 10:02:17 PM UTC-5, Alex Miller wrote: > > On Wednesday, July 20, 2016 at 9:41:59 PM UTC-5, Mars0i wrote: >> >> On Wednesday, July 20, 2016 at 4:32:40 PM UTC-5, Alex Miller wrote: >>> >>> You can file a jira if you like, I'm not sure Rich's thoughts on this. >>> >>

Re: Enhance spec/double-in to handle open and half-open intervals?

2016-07-20 Thread Alex Miller
On Wednesday, July 20, 2016 at 9:41:59 PM UTC-5, Mars0i wrote: > > On Wednesday, July 20, 2016 at 4:32:40 PM UTC-5, Alex Miller wrote: >> >> You can file a jira if you like, I'm not sure Rich's thoughts on this. >> > > I understand. Thanks--will do. > > >> Also, keep in mind that you can

Re: Enhance spec/double-in to handle open and half-open intervals?

2016-07-20 Thread Mars0i
On Wednesday, July 20, 2016 at 4:32:40 PM UTC-5, Alex Miller wrote: > > You can file a jira if you like, I'm not sure Rich's thoughts on this. > I understand. Thanks--will do. > Also, keep in mind that you can also compose preds and get this with > slightly more effort now: > > (s/and

Re: Frustrations so far

2016-07-20 Thread Alan Thompson
Hi Peter - I started the Tupelo library and related Tupelo-Datomic library in order to collect helper & convenience functions that I felt were missing (IMHO) from core Clojure. If you have any ideas to add or improve

Re: [Bug?] Spec: spec/? not working?

2016-07-20 Thread Sean Corfield
Your code works for me as expected on 1.9.0 Alpha 10. What version are you using? Sean Corfield -- (970) FOR-SEAN -- (904) 302-SEAN An Architect's View -- http://corfield.org/ "If you're not annoying somebody, you're not really alive." -- Margaret Atwood On 7/20/16, 2:59 PM, "Torsten

Re: Amazonica and S3

2016-07-20 Thread Andrea Richiardi
Maybe not related, but I was checking that api and this showed up, maybe it can be helpful? https://stackoverflow.com/questions/30521046/malformedxml-when-tagging-an-s3-bucket On Wednesday, July 20, 2016 at 7:56:10 AM UTC-7, Gareth Rogers wrote: > > After chatting with a colleague who read this

Re: [Review] Slow server, not maxing out CPU

2016-07-20 Thread James Reeves
If you're going to be working with blocking I/O, then you're probably going to get constrained by the default threadpool size of HTTP Kit, which is only 4 threads. Up it to around 1000 and see if that improves matters. You can get around this by writing asynchronous code, but your async-handler

[Bug?] Spec: spec/? not working?

2016-07-20 Thread Torsten Anders
Dear all, I have some problems using clojure.spec: ? does not work as I would expect it. Instead of specifying an optional value, it seems that such values are never permitted, and instead the next value is always matched. Please see the short example demonstration below. BTW, * seems to cause

Re: Enhance spec/double-in to handle open and half-open intervals?

2016-07-20 Thread Alex Miller
You can file a jira if you like, I'm not sure Rich's thoughts on this. Also, keep in mind that you can also compose preds and get this with slightly more effort now: (s/and (s/double-in :min 0.0 :max 1.0) #(not= 0.0 %)) On Wednesday, July 20, 2016 at 2:03:28 PM UTC-5, Mars0i wrote: > >

[Review] Slow server, not maxing out CPU

2016-07-20 Thread Вук Мировић
I'm fooling around with Clojure and I implemented simple server that will randomly query/insert/update/delete random data from DB on every request. When I benchmark (wrk) server is slow (compared to similar solution) and I noticed that CPU is not maxed out, it's about ~30-40%. I used http-kit

Re: Thoughts on clojure.spec

2016-07-20 Thread Gary Fredericks
Here's a library you could add that functionality to: https://github.com/gfredericks/schpec Gary On Tuesday, July 19, 2016 at 1:30:27 AM UTC-5, Beau Fabry wrote: > > Right, and I don't think the "this is closed we shouldn't discuss it > anymore" line is great when people are advocating for a

Enhance spec/double-in to handle open and half-open intervals?

2016-07-20 Thread Mars0i
clojure.spec/double-in defines a spec that tests whether a double is greater than or equal to a minimum value and less than or equal to a maximum value. This is useful for many purposes, but sometimes you need to test whether a double is greater than a minimum or less than a maximum. There

Re: ANN: ClojureScript 1.9.89 - cljs.spec & :preloads

2016-07-20 Thread mars0i
This version isn't supposed to have implemented spec/double-in yet, right? I get "Use of undeclared Var cljs.spec/double-in". Sorry to ask--I don't know my way around JIRA well, and searching for "double-in" brings up a lot of irrelevant tickets. Thanks much. -- You received this message

Re: Recursive clojure.spec doesn't work

2016-07-20 Thread Johan Jonasson
It works! Thanks! Seems like I have to learn more about s/spec. On Wednesday, July 20, 2016 at 5:46:20 PM UTC+2, Alex Miller wrote: > > s/spec is going to try to resolve that keyword during the definition. Does > this do what you want? > > (s/def :html/element > (s/spec (s/cat >

Re: Recursive clojure.spec doesn't work

2016-07-20 Thread Alex Miller
s/spec is going to try to resolve that keyword during the definition. Does this do what you want? (s/def :html/element (s/spec (s/cat :tag keyword? :attrs map? :children (s/* (s/alt :element :html/element

Recursive clojure.spec doesn't work

2016-07-20 Thread Johan Jonasson
I might have stumbled upon a bug in clojure.spec, while trying to define a spec. This doesn't compile: (s/def :html/element (s/cat :tag keyword? :attrs map? :children (s/* (s/alt :element (s/spec :html/element) :string string? The exception says: "Unable

Re: Amazonica and S3

2016-07-20 Thread Gareth Rogers
After chatting with a colleague who read this and showed me the magic of trace I think the problem with amazonica.aws. s3/set-bucket-tagging-configuration is that I need {:tag-sets [{:tag {"Formation" "notlive"}}]} i.e. I need to know how to call setTag(string key, string value) which takes

Amazonica and S3

2016-07-20 Thread Gareth Rogers
Hi Has any one had any success using either amazonica.aws.s3/set-bucket-notification-configuration or amazonica.aws.s3/set-bucket-tagging-configuration? I've got (amazonica.aws.s3/set-bucket-notification-configuration "my.bucket.name" {"my-custom-event-name" {"" ;; This replaced

Re: Frustrations so far

2016-07-20 Thread James Reeves
On 20 July 2016 at 13:49, Peter Romfeld wrote: > I really love clojure over all, it makes maintenance/collaboration of code > such a breeze. its easy to get new employees start to work on it even > without any previous clojure knowledge! > > I do hate the JVM startup

Frustrations so far

2016-07-20 Thread Peter Romfeld
I really love clojure over all, it makes maintenance/collaboration of code such a breeze. its easy to get new employees start to work on it even without any previous clojure knowledge! I do hate the JVM startup shit, i hate how you it takes forever to fetch deps on a aws medium instance (you

ANN: Tongue, DYI i18n library for Clojure/Script

2016-07-20 Thread Nikita Prokopov
Tongue is a do-it-yourself i18n library for Clojure and ClojureScript. Tongue is very simple yet capable: - Dictionaries are just Clojure maps. - Translations are either strings, template strings or arbitrary functions. - No additional build steps, no runtime resource loading. - It comes with no