Re: Monitoring a Clojure app, possibly with New Relic

2013-12-28 Thread James Thornton
Here's what you need to do to get the New Relic plugin working with a Clojure/Pedestal app on Heroku. It took some fiddling because there are several versions of docs floating around for doing this, but none of them were quite right. See https://gist.github.com/espeed/8159198 - James On Fri

Re: Recommended SPDY client?

2013-05-28 Thread James Thornton
dy Also see Twitter's Finagle SPDY client, which is based on Netty: - Finagle: http://twitter.github.io/finagle/guide/index.html [com.twitter/finagle-spdy "6.4.0"] https://github.com/twitter/finagle/tree/master/finagle-spdy - James On Monday, May 27, 2013 2:17:20 PM

Recommended SPDY client?

2013-05-27 Thread James Thornton
What are the recommended Java/Clojure SPDY clients? I'm interested in using it for backend RPC. Ilya Grigorik discusses this in his AirBnB TechTalk on SPDY. At the end he makes the case for using it for modern backend RPC instead of stuff like Thrift, etc. See... "Building a Modern Web Stack"

Re: Local database recommendation?

2013-05-26 Thread James Thornton
On Sunday, May 26, 2013 12:14:22 PM UTC-5, Cedric Greevey wrote: > > On Sun, May 26, 2013 at 11:33 AM, James Thornton > > > wrote: > >> Hi Cedric - >> >> Look at Datomic free edition or the Titan graph database using >> either Berkeley DB as its backe

Re: Local database recommendation?

2013-05-26 Thread James Thornton
Hi Cedric - Look at Datomic free edition or the Titan graph database using either Berkeley DB as its backend datastore or Cassandra in single-server mode -- you can run both locally. Datomic: http://www.datomic.com/ Docs: http://docs.datomic.com/ Clojure Client: http://docs.datomic.com/clojure

Using Clojure with AppEngine's new ThreadManager and Sockets APIs?

2013-05-26 Thread James Thornton
App Engine just became a more interesting Clojure platform now that Google has opened Compute Engine to everyone and has provided a way to use sockets and threads. Has anyone adapted Clojure to work with App Engine's new ThreadManager and Sockets APIs? The experimental sockets API enables you

Re: emacs - how to wean me off the family of Java IDEs

2013-05-01 Thread James Thornton
Here's a key Emacs tip that will reduce your stress and make the key combinations easier, but it may not be obvious when you're first starting out... When you're learning something new, it's easy for bad form to go unnoticed unless someone points it out -- this is true in golf, tennis, Emacs, o

Re: ANN Titanium, a Clojure library on top of Titan

2013-02-11 Thread James Thornton
This looks cool Michael, and it looks like it has made it to the front page of HN (http://news.ycombinator.com). I have been working with Titan in Clojure so I'll definitely check it out. - James On Monday, February 11, 2013 11:37:14 AM UTC-6, Michael Klishin wrote: > > Titanium [1] is a Cloju

How do you typecast and insert a Postgres enum value using Clojure JDBC?

2013-02-06 Thread James Thornton
For example, here is a product table in PostgreSQL with status as an enum: create type product_status as enum ('InStock', 'OutOfStock'); create table product ( pidint primary key default nextval('product_pid_seq'), skutext not null unique, name text

Re: How to configure a Clojure library at runtime?

2012-05-12 Thread James Thornton
On Saturday, May 12, 2012 8:12:53 AM UTC-5, Baishampayan Ghose wrote: > > > You got the basic idea right, that of creating a lexical closure over > the config map. But I personally don't like the approach of returning > a function that takes a function and applies it over the other args. > > I

Re: How to configure a Clojure library at runtime?

2012-05-12 Thread James Thornton
On Saturday, May 12, 2012 12:44:45 AM UTC-5, Baishampayan Ghose wrote: > > > There are many ways of doing this. One approach that I have seen a lot > is something like this - > > ;; core.clj > > (def ^:dynamic *settings* {:default :stuff}) ;; the default settings can > be nil > I was experim

Re: How to configure a Clojure library at runtime?

2012-05-11 Thread James Thornton
On Friday, May 11, 2012 4:03:52 AM UTC-5, Baishampayan Ghose wrote: > > > * Create a protocol called IGraphDBClient or something similar and > create a spec. > * Provide different client implementations in their own namespaces > using deftype, eg. bulbs.db.neo4j/client, bulbs.db.orientdb/clien

What are some examples of good Clojure/Java interop libraries?

2012-04-23 Thread James Thornton
I am in the process of learning Clojure, and I want to play around with the MIT Java WordNet library (http://projects.csail.mit.edu/jwi/) to familiarize myself with Clojure idioms. What are some examples of idiomatic Clojure/Java interop libraries that I can study? Thanks. - James -- You r

How do you use defmulti to create a function with a variable number of args?

2012-04-16 Thread James Thornton
How do you use defmulti to create a function with a variable number of args? For example, add-item is wrapping a Java method that can take a variable number of args, and so here I am trying to make add-item take zero, one, or two args. Notice there are two singe-arg funcs -- each taking a differ