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

2014-04-11 Thread Tommi Reiman
Prismatic Schema is awesome for describing the (web) apis, does also validations & coersion. Using it in all web projects nowadays. If you are thinking of json apis, swagger is a great tool to publish out the documentation. For clojure at least these schema / swagger-aware web libs do exist: S

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 also

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

[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 versions

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 :clean-no

Re: Uberjar woes

2014-04-11 Thread Tom Connors
Hi Josh, My solution ended up being pretty lame: I stopped calling a function from clout, and the uberjar magically worked, as disappointing as that explanation is. As far as I could tell, the root cause of my problem was that clout depends on an old version of clojure (1.2, if I recall correct

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: 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 wrote: > On Monday,

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. https://gist.github.com/jalehman/104

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

2014-04-11 Thread Erik Bakstad
You should take a look at Liberator for the REST services. We're using it at Ardoq 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 op

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 wrote: > I haven't used it myself, but

[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 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 wrote: > Hey Marcus, > > If you have Google Calendars, you can use that, and invite people to edit > a particula

Re: Is it possible to give an atomic message?

2014-04-11 Thread Alex Vzorov
You could use a clojure agent , 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 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, I'm

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: Meta-eX - The Music of Code

2014-04-11 Thread Samuel Aaron
On 10 Apr 2014, at 03:18, Earl Jenkins 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 never targeted at aca

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

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,

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 n

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 pro

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 c

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 Colin Fleming
Ah, ok - if you're already using Emacs then have at it :-) On 11 April 2014 21:32, C K Kashyap 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 11, 2014 at 2:

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 wrote: > you can fight it as hard as you like but you will eventually end up using >> emacs, cloju

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

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 Fr

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-bas

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 https://gith

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 t