Re: Trying to understand Clojure/Java concurrency performance?

2015-10-07 Thread Christopher Small
I'd just like to point something which may have been glossed over from Timothy's post (and now Andrey's as well). > ... if you're doing actual processing, handling that many connections on a box seems like premature optimization. > Have the ability to handle 2M persistent connections does not d

How do I return the data I need from this Exception?

2015-10-07 Thread Lawrence Krubner
I'm thinking that I've misunderstood something about how to catch an Exception. I have these 2 functions: (defn catch-exceptions [e this-users-conversation] (try (timbre/log :trace (str "in catch-exceptions our exception was: " e)) (let [error (:object (ex-data e)) status (

Re: [ANN] Yesql 0.5.1 Released.

2015-10-07 Thread Andrey Antukh
Great work! Any change for have yesql decoupled from java.jdbc? I really want to use it, but with other jdbc libraries... Regards Andrey On Thu, Oct 8, 2015 at 12:55 AM, Kris Jenkins wrote: > Yesql - the Clojure library for using SQL - has just released v0.5.1. > > The API is much improved -

Re: Trying to understand Clojure/Java concurrency performance?

2015-10-07 Thread Andrey Antukh
Hi Nick. I think that you are taking wrong conclusions on wrong assumptions. IMHO I'm not trying defend clojure or erlang, I like them both. I try to explain me: When you trying to scale one single machine to 1-2M persistent connections, the main problem will not be the virtual machine (jvm or

Re: Smallest Heroku slug size?

2015-10-07 Thread Robin Heggelund Hansen
Thanks. I've added an issue now :) -- 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 unsubscribe f

Re: Trying to understand Clojure/Java concurrency performance?

2015-10-07 Thread Charles Harvey III
Have you had a look at Chronicle? They have built up an entire infrastructure that is off-heap so there is no GC. http://chronicle.software/products/chronicle-engine/ https://github.com/OpenHFT/Chronicle-Engine There is a free version and a paid for version. They have broken it into parts so y

Re: Library suggestions requested for clojure-toolbox.com

2015-10-07 Thread Matthew Boston
Here are a few that I and others on my team have created. clojurescript.csv - https://github.com/testdouble/clojurescript.csv - csv parsers, clojurescript baizen - https://github.com/testdouble/baizen - parsing ring-okta - https://github.com/Hendrick/ring-okta - request middleware avenue - htt

Re: Trying to understand Clojure/Java concurrency performance?

2015-10-07 Thread Moe Aboulkheir
On Wed, Oct 7, 2015 at 7:47 PM, Moe Aboulkheir wrote: > Nick, > > (There's a lot to understand about those benchmarks, and I haven't really > spent time with them, or wrk2, so feel free to ignore) > > On Wed, Oct 7, 2015 at 2:13 AM, Nick Pavlica wrote: > >> After looking at the numbers in the be

[ANN] Yesql 0.5.1 Released.

2015-10-07 Thread Kris Jenkins
Yesql - the Clojure library for using SQL - has just released v0.5.1. The API is much improved - especially if you're using queries with many arguments - so see the migration guide if you're upgrading: My thanks to everyone who has contributed to this release, and for all the users who've been

Re: Trying to understand Clojure/Java concurrency performance?

2015-10-07 Thread Nick Pavlica
Hi Timothy & Moe, Thanks for your feedback! I realize that we are speaking very generally on this thread, and know that there are many ways to solve the complex problems we face as developers. I'm trying to understand the current know limitations of using great tools like Clojure to solve th

Re: palingdrome problem (4 clojure)

2015-10-07 Thread Erik Assum
I do believe that a palindrome could be defined as user> (defn palindrome [s] (= s (clojure.string/reverse s))) ;; => #'user/palindrome user> (palindrome "agnesisenga") ;; => true user> No need to split in half. > On 7. okt. 2015, at 20.24, Tristan Strange wrote: > > Hey Roelof, > > Moe's a

Clojure in Action, Second Edition

2015-10-07 Thread BarreisR
New and very useful book by author Amit Rathore. https://www.manning.com/books/clojure-in-action-second-edition -- 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 mem

Re: palingdrome problem (4 clojure)

2015-10-07 Thread Tristan Strange
Hey Roelof, Moe's answered your question perfectly. Unfortunately I'm not sure it'll help you. All that's been written up there is a reverse function that works on both a string and a sequence. Firstly I think you might need to check up on what a palindrome is: https://en.wikipedia.org/wiki/Pali

Re: Trying to understand Clojure/Java concurrency performance?

2015-10-07 Thread Moe Aboulkheir
On Wed, Oct 7, 2015 at 8:40 PM, Nick Pavlica wrote: > > I'm not currently planning on 1-2 million connections on a single server > at the moment. I really wish I had those problems, but I would like to > count on being able to achieve 100-200K on a single reasonably sized > server. Even if I

Re: Trying to understand Clojure/Java concurrency performance?

2015-10-07 Thread Timothy Baldridge
I wouldn't be so fast to discount the JVM. http-kit isn't exactly the only game in town when it comes to websockets on the JVM. And also it's written by a rather small team. I'd investigate other tools (Netty?) before discounting an entire platform due to a quick glance at a single library. Also,

Re: Trying to understand Clojure/Java concurrency performance?

2015-10-07 Thread Nick Pavlica
All, Thanks for the great reply's thus far! They have helped me get a better idea of what the issues may be on the JVM. "Are you sure you are going to need that scale? 1mil connections is a pretty ambitious goal." I'm not currently planning on 1-2 million connections on a single server

Re: Library suggestions requested for clojure-toolbox.com

2015-10-07 Thread Christopher Small
Would love to see Semantic CSV up there under the CSV parsers. {:name "semantic-csv" :category "CSV parsers" :URL "https://github.com/metasoarous/semantic-csv"; :description "Higher level tools for working with CSV data"} Cheers Chris On Monday, October 5, 2015 at 12:41:11 PM UTC-7, James R

Re: palingdrome problem (4 clojure)

2015-10-07 Thread r/ Wobben
Thanks for the explanation. For a beginner enough to learn Roelof Op woensdag 7 oktober 2015 21:02:00 UTC+2 schreef Moe Aboulkheir: > Roelof, > > As you noted, reverse doesn't preserve the variety of collection which was > passed in - it returns a sequence. (into A B) appends the items in B

Re: Trying to understand Clojure/Java concurrency performance?

2015-10-07 Thread Thomas Heller
Just realized that I misread the http-kit benchmark, but still stand by my arguments. GC problems are pretty much directly tied to the size of the heap. So if you'd re-run the http-kit benchmark with a 8gb heap instead of 3gb things would probably look different. How much heap you are going to

Re: palingdrome problem (4 clojure)

2015-10-07 Thread Moe Aboulkheir
Roelof, As you noted, reverse doesn't preserve the variety of collection which was passed in - it returns a sequence. (into A B) appends the items in B onto A, and will return a collection of the same type as A. (empty A) returns a collection of the same type as A, with no items in it. So with (

Re: Trying to understand Clojure/Java concurrency performance?

2015-10-07 Thread Thomas Heller
FWIW getting 1mil+ connections will requires some OS level tuning even in Erlang. So you are not going to get that in a benchmark that is not set up for this. In the JVM you are going to run into GC problems eventually, depending on how much state/memory you keep per connection. It might work w

Re: Trying to understand Clojure/Java concurrency performance?

2015-10-07 Thread Moe Aboulkheir
Nick, (There's a lot to understand about those benchmarks, and I haven't really spent time with them, or wrk2, so feel free to ignore) On Wed, Oct 7, 2015 at 2:13 AM, Nick Pavlica wrote: > After looking at the numbers in the benchmark, I was a little disappointed > to see that they were only se

Re: palingdrome problem (4 clojure)

2015-10-07 Thread Roelof Wobben
Thanks , that did the trick. Apperent; string/reverse works different from reverse One question : what does into do and does (empty x) means if x is empty or do you make a empty copy of x. Roelof Op woensdag 7 oktober 2015 20:07:00 UTC+2 schreef Moe Aboulkheir: > > Roelof, > > Something l

Re: Trying to understand Clojure/Java concurrency performance?

2015-10-07 Thread Nick Pavlica
All, I posed this question with a little more detail in the Quasar/Pulsar group in hopes that they may have some insight into my question (https://groups.google.com/forum/#!topic/quasar-pulsar-user/l8ZX7pk9bkI) because they are more focused on that domain. Hopefully, my question is clear, if n

Re: palingdrome problem (4 clojure)

2015-10-07 Thread Moe Aboulkheir
Roelof, Something like this: (defn palindrome [x] (if (string? x) (clojure.string/reverse x) (into (empty x) (reverse x Alternatively, you may want to consider explicitly using seq on your inputs when you get them, and using that of the basis of comparison & input to reverse. If y

palingdrome problem (4 clojure)

2015-10-07 Thread Roelof Wobben
Hello, I try to solve a problem for 4clojure where I have to make a palingdrome detector. So for trying I did this : (ns fourclojure.core (:gen-class)) (defn palingdrome [string] ( reverse string)) (apply str (palingdrome '( 1 2 3) )) '321' (apply str (palingdrome "Roelof" )) "foleoR

Re: Library suggestions requested for clojure-toolbox.com

2015-10-07 Thread Erik Assum
chat/xmpp https://github.com/slipset/xmpp-clj Erik. > On 5. okt. 2015, at 21.40, James Reeves wrote: > > If you've written or know about a Clojure or ClojureScript library, and it's > not already on clojure-toolbox.com, I'd like to hear about it. > > Post the name and URL (and an optional ca

Re: No recent activity for core.async?

2015-10-07 Thread Yehonathan Sharvit
any important new featres on perspective? -- 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 unsubs

Re: Clojure Dev Environment

2015-10-07 Thread Erlis Vidal
Sven! Thans for sharing! On Wed, Oct 7, 2015 at 8:14 AM, Sven Richter wrote: > Hi Erlis, > > Not considering myself a seasoned developer, still I stream from time to > time on: https://www.livecoding.tv/sveri/ > I am always happy to talk about things and explain everything to my best > knowledg

Re: No recent activity for core.async?

2015-10-07 Thread Alex Miller
When Rich has time to approve things. -- 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 unsubscrib

Re: Smallest Heroku slug size?

2015-10-07 Thread Joe Kutner
Right now you'd either have to create a custom buildpack, which would effectively be the Clojure buildpack[1] minus these few lines of code[2]. Then you'd add a line to remove all the source code and anything that isn't your uberjar from the slug. I'd be willing to add an option to the lein-her

Re: Library suggestions requested for clojure-toolbox.com

2015-10-07 Thread Arnout Roemers
{:name "functionalbytes/rmap" :description "Define literal lazy, recursive maps - plus extras" :URL "https://github.com/aroemers/rmap"; :category "Data Structures"} Op maandag 5 oktober 2015 21:41:11 UTC+2 schreef James Reeves: > > If you've written or know about a Clojure or ClojureScript libr

Re: Clojure Dev Environment

2015-10-07 Thread Sven Richter
Hi Erlis, Not considering myself a seasoned developer, still I stream from time to time on: https://www.livecoding.tv/sveri/ I am always happy to talk about things and explain everything to my best knowledge. Best Regards, Sven Am Dienstag, 6. Oktober 2015 16:18:00 UTC+2 schrieb Erlis Vidal:

Re: Clojure Dev Environment

2015-10-07 Thread Sven Richter
Hi Miguel, When I started clojure and web development I faced the same questions for some long time. Also it took me a lot to figure out how to have the best developer experience (regarding web stuff). All my findings boil down into this leiningen template: https://github.com/sveri/closp It de

Re: Library suggestions requested for clojure-toolbox.com

2015-10-07 Thread Lars Andersen
String manipulation library for clj and cljs: https://github.com/expez/superstring On Monday, October 5, 2015 at 9:41:11 PM UTC+2, James Reeves wrote: > > If you've written or know about a Clojure or ClojureScript library, and > it's not already on clojure-toolbox.com

Re: Timbre corrupting EDN via prn-str

2015-10-07 Thread Tassilo Horn
Ken Restivo writes: > Only when conch is called, is this error generated. Not shelling out > makes the problem go away. So it's an interaction between pr-str, > conch and/or clojure.java.shell, and Timbre-- all three of which are > manipulating *out* which I'm guessing is not thread-safe. You ca

Re: Timbre corrupting EDN via prn-str

2015-10-07 Thread Ken Restivo
I've dug into this more, and it seems there's a third factor at work: conch. In one of the functions called before this data is written, conch is shelling out to a command. Obviously it's also mucking around with stdin/stdout/stderr. Only when conch is called, is this error generated. Not shelli

Re: Timbre corrupting EDN via prn-str

2015-10-07 Thread Atamert Ölçgen
So you actually want to print your data. I don't think it can be helped then, two threads writing to the same buffer. I would have one of them use a different buffer, write the logs to a file and tail it for instance. On Wed, Oct 7, 2015 at 11:36 AM, Ken Restivo wrote: > Yep. It doesn't help. >

Re: Timbre corrupting EDN via prn-str

2015-10-07 Thread Ken Restivo
Yep. It doesn't help. I also tried (.flush *out*) before... no dice. -ken -- - On Wed, Oct 07, 2015 at 11:31:12AM +0300, Atamert Ölçgen wrote: > Hi Ken, > > Have you tried with-out-str? > > On Wed, Oct 7, 2015 at 11:18 AM, Ken Restivo wrote: > > > I was trying to save a data structure us

Re: Timbre corrupting EDN via prn-str

2015-10-07 Thread Atamert Ölçgen
Hi Ken, Have you tried with-out-str? On Wed, Oct 7, 2015 at 11:18 AM, Ken Restivo wrote: > I was trying to save a data structure using prn-str. > > However, I'm also using Timbre for logging. > > My nice data structure is getting corrupted by INFO and DEBUG and other > log messages from Timbre.

Timbre corrupting EDN via prn-str

2015-10-07 Thread Ken Restivo
I was trying to save a data structure using prn-str. However, I'm also using Timbre for logging. My nice data structure is getting corrupted by INFO and DEBUG and other log messages from Timbre. Is there any way to turn a Clojure data structure into EDN without mucking around with things like

Re: Generate all possible teams

2015-10-07 Thread Gerrit Jansen van Vuuren
Have a look at http://www.afronski.pl/sicp-in-clojure/2015/10/05/sicp-in-clojure-chapter-4.html scroll to "Ambiguous operator", this implements searching for combinations in a search space based on the conditions you give it using backtracking, also as already mentioned you could directly g

Re: Smallest Heroku slug size?

2015-10-07 Thread Robin Heggelund Hansen
I'm just trying to optimize, so it isn't vital to my app. How do I use the builtin openjdk 7? My app makes no use of Java 8 anyway. onsdag 7. oktober 2015 03.56.26 UTC+2 skrev Joe Kutner følgende: > > The slug will also include the JDK, which is ~50mb compressed. It is > possible to exclude the J

Re: finding optimal pairs/triplets

2015-10-07 Thread Kurt Sys
Yes! That's what I was looking for :). I really like the idea of 'team-centric' and 'player-centric', and combining them! It might take me some time to figure it all out in detail, but with this idea and your example, I'll pretty confident I'll get there :). I could go for heuristics as well, b