Re: Using parallellisation

2014-04-11 Thread Cecil Westerhof
2014-04-11 3:10 GMT+02:00 Andy Fingerhut andy.finger...@gmail.com: Your check-concurrent2 is a much better way to use parallelism in your program -- create a few threads, each of which does a lot of work. I haven't analyzed the values you are computing in detail, but note that your program

Re: [ANN] Zengarden. A Clojure library for generating CSS

2014-04-11 Thread Dave Sann
ok, I understand now. thx D On Friday, 11 April 2014 12:16:02 UTC+10, frye wrote: I actually did take Joel up on his offer. But my feature requests are on the back burner for the moment. I happen to be building a product, that needs what Zengarden provides. Mainly authoring gnarly things

Re: Advice for building backend REST services from scratch using clojure

2014-04-11 Thread Colin Yates
As others have said - a more focused question would help. Our back end runs on ring + compojure using https://github.com/jkk/honeysql for querying and straight https://github.com/clojure/java.jdbc for writes. We use https://github.com/marick/Midje/wiki rather than clojure.test and

Re: Real World Example

2014-04-11 Thread Alan Moore
I'm building a fairly large real-world system called Clortex [1], which is a rewrite of the Numenta Platform for Intelligent Computing (NuPIC) [2]. As it's a greenfield project, I've chosen to use Clojure components all the way through instead of fitting in with Java-based or .Net-based

Re: Using parallellisation

2014-04-11 Thread atucker
I haven't tried it, but for parallelisation it's sometimes worth starting from more array-oriented code, e.g. (defn max-diff [check-until] (let [val (map #(Math/sqrt %) (range 1 check-until))] (reduce max (map #(Math/abs (- %1 %2)) (map #(Math/pow % 2) val) (map #(* % %) val) On

Re: Real World Example

2014-04-11 Thread Fergal Byrne
Hi Alan, Thanks for your interest - everywhere I mention this in the Clojure world I get the same reaction! This is one of the reasons why I settled on Clojure a couple of months back (Erlang and Elixir were also good choices, but the Clojure movement has so much energy it was a no-brainer). I'm

Re: Advice for building backend REST services from scratch using clojure

2014-04-11 Thread Colin Fleming
you can fight it as hard as you like but you will eventually end up using emacs, clojure-mode, cider, paredit and magit and then wonder how you ever lived without it, but not without spending at least a month or two cursing anything to do with emacs :). As the developer of Cursive, I'd like

Re: Advice for building backend REST services from scratch using clojure

2014-04-11 Thread C K Kashyap
Just for the record ... I am an emacs fan :) Had been a vim power user for a long time but switched to emacs after the fp bug bit me. Regards, Kashyap On Fri, Apr 11, 2014 at 2:50 PM, Colin Fleming colin.mailingl...@gmail.comwrote: you can fight it as hard as you like but you will eventually

Re: Advice for building backend REST services from scratch using clojure

2014-04-11 Thread Colin Fleming
Ah, ok - if you're already using Emacs then have at it :-) On 11 April 2014 21:32, C K Kashyap ckkash...@gmail.com wrote: Just for the record ... I am an emacs fan :) Had been a vim power user for a long time but switched to emacs after the fp bug bit me. Regards, Kashyap On Fri, Apr

Re: Advice for building backend REST services from scratch using clojure

2014-04-11 Thread Colin Yates
Colin - you are right - I shouldn't throw out such inflammatory marks, particularly when they do a disservice to the excellent work done in Cursive Clojure, Lighttable and Counter Clockwise (and others that I am not aware off). For me personally, after years of using Eclipse then IntelliJ and

Re: Advice for building backend REST services from scratch using clojure

2014-04-11 Thread rossputin
My two cents... Ring/Compojure, Friend, Datomic. I've had these in production since 2012, no issues really and its still fun to hack on them. On Thursday, 10 April 2014 15:13:19 UTC+1, Kashyap CK wrote: Hi, I have the opportunity to build a set of services from scratch. I plan to use

Re: Advice for building backend REST services from scratch using clojure

2014-04-11 Thread Colin Fleming
No worries, I didn't think what you wrote was inflammatory and it's undeniable that Emacs has the largest mindshare in the Clojure world. But the alternatives are getting better and better and I think I could make a reasonable case that Cursive is better than Emacs for some circumstances and/or

Is it possible to give an atomic message?

2014-04-11 Thread Cecil Westerhof
I have the following functions in my concurrent program: (def time-format (new java.text.SimpleDateFormat HH:mm:ss)) (defn now [] (new java.util.GregorianCalendar)) (defn give-message [message] (println (format %s: %s (. time-format format (. (now) getTime)) message))) But sometimes a new

Re: Is it possible to give an atomic message?

2014-04-11 Thread Alex Robbins
You could do this with core.async. Make a channel that takes messages, and then run a go loop that pulls messages off the message channel and prints them. Then only one part of the program is ever printing. Any other part that wants to print a message can push onto the channel. On Fri, Apr 11,

Re: Clojure + BDD + TDD + Pairing...

2014-04-11 Thread Tom George
Marcus, I think the idea of working on a small project with fellow novices would be a great idea. Tom On Tuesday, October 29, 2013 11:43:54 PM UTC-4, Marcus Blankenship wrote: Hi Folks, I’m a Clojure n00b, but am interested in finding another n00b who aspires to learn Clojure, and do so

Re: Meta-eX - The Music of Code

2014-04-11 Thread Samuel Aaron
On 10 Apr 2014, at 03:18, Earl Jenkins ejenkins...@gmail.com wrote: Good stuff, all the hard work you've done in the field of live coding, yet no mention of Meta-ex nor clojure in the Computer Music Journal which has a whole issue dedicated to this subject ;( To be honest, Overtone was

Re: Is it possible to give an atomic message?

2014-04-11 Thread Alan Dipert
Hello, Here's maybe the easiest way, with locking: (defn give-message [message] (locking *out* (println (format %s: %s (. time-format format (. (now) getTime)) message Of course, locks can introduce their own problems, so maybe the next easiest way is with the combination of agent

Re: Clojure + BDD + TDD + Pairing...

2014-04-11 Thread Timothy Washington
Hey Marcus, If you have Google Calendars, you can use that, and invite people to edit a particular calendar. It would start off as an honour system, so that people don't trample on each others bookings. But as Tom George points out, building such a booking tool, is a great project. Otherwise,

Re: Is it possible to give an atomic message?

2014-04-11 Thread Alex Vzorov
You could use a clojure agent http://clojure.org/agents, that would output your messages on a separate thread, one by one. (def *logger* (agent 0)) (defn give-message [message] (send *logger* (fn [_ [msg]] (println (format %s: %s (. time-format format (. (now) getTime)) msg)))

Re: Clojure + BDD + TDD + Pairing...

2014-04-11 Thread Andy Fingerhut
I haven't used it myself, but noted that Alex Miller used http://ohours.orgfor allowing others to schedule meetings with him. Andy On Fri, Apr 11, 2014 at 9:08 AM, Timothy Washington twash...@gmail.comwrote: Hey Marcus, If you have Google Calendars, you can use that, and invite people to

[ANN]: clj.jdbc 0.1.1 - A jdbc library for clojure.

2014-04-11 Thread Andrey Antukh
A JDBC library for clojure. Released: 2014-04-06 Changes: - Multiple connection pooling pluggable solutions: dbcp and c3p0 (every one resides on its own package without hard dependencies on them). - Set clojure 1.6 as default clojure version. - Allow set isolation level for transaction. - Allow

Re: Clojure + BDD + TDD + Pairing...

2014-04-11 Thread Marcus Blankenship
I can't get my google calendar to allow others to add / change events. If anyone else could set this up, it would be great! Or, if you have ideas on how I can do this, contact me off-list and I'll work on it. On Apr 11, 2014, at 9:38 AM, Andy Fingerhut andy.finger...@gmail.com wrote: I

Re: Advice for building backend REST services from scratch using clojure

2014-04-11 Thread Erik Bakstad
You should take a look at Liberatorhttp://clojure-liberator.github.io/liberator/ for the REST services. We're using it at Ardoq http://ardoq.com to build our REST-APIs and we are very happy with it. kl. 16:13:19 UTC+2 torsdag 10. april 2014 skrev Kashyap CK følgende: Hi, I have the

Re: Uberjar woes

2014-04-11 Thread Josh Lehman
Tom, Not sure if you every figured this out, but I'm having the same issue. In my case, the error points to the Lifecycle protocol in https://github.com/stuartsierra/component (com/stuartsierra/component/Lifecycle). It's a pretty barebones configuration.

Re: Helping newcomers get involved in Clojure projects

2014-04-11 Thread Erlis Vidal
Anyone doing something about this? I would like to start contributing to some OSS it's the only chance I'll have to use clojure in something useful, I don't have the privilege to use it at work but I really don't know where to start. On Wed, Jan 29, 2014 at 3:49 PM, Bridget

Re: Helping newcomers get involved in Clojure projects

2014-04-11 Thread Marcus Blankenship
+1 to this concept. Also, I don't live near a ClojureBridge workshop, or user groups. One thing I've been arranging is pair programming sessions, which may turn into something for helping folks meet each other and work on interesting stuff. But, it's a different approach. On Apr 11, 2014, at

Re: Uberjar woes

2014-04-11 Thread James Reeves
Clout doesn't depend on any protocols in Clojure. The only protocol it uses is defined within the clout.core namespace itself. Problems like this are often caused by compiled class files on your classpath. Often they are in the target directory, which can be solved by a lein clean. The

[ANN] lein-fruit 0.2.0

2014-04-11 Thread Zach Oakes
This is a new release of [lein-fruit](https://github.com/oakes/lein-fruit), a Leiningen plugin for building iOS apps in Clojure. It does this by using [RoboVM](http://www.robovm.org/), a bytecode-to-native translator. The template in this version offers a huge improvement over the past

Re: Advice for building backend REST services from scratch using clojure

2014-04-11 Thread danneu
Play around with this: $ lein new compojure myapp $ cd myapp $ lein ring server-headless Started server on port 3000 On Thursday, April 10, 2014 9:13:19 AM UTC-5, Kashyap CK wrote: Hi, I have the opportunity to build a set of services from scratch. I plan to use clojure for

Re: Uberjar woes

2014-04-11 Thread Josh Lehman
I've come up with a fix after lots of fiddling, and I cannot quite explain it -- but it works! The component library involves creating records that implement the Lifecycle protocol. In every namespace where I implemented that protocol, I added a (:gen-class) to the namespace declaration. I