[ANN] Suricatta 0.2.0: high level sql toolkit for clojure (backed by jooq)

2015-01-17 Thread Andrey Antukh
Hello everybody. I wanted to announce the second release of suricatta, a high level sql toolkit for clojure (backed by fantastic jooq library). Main changes/improvements: - Improved connection creation. - Added support for custom type extensions (like postgresql json types) - Add ddl functions t

[ANN] cljfmt

2015-01-17 Thread James Reeves
I've just released cljfmt 0.1.0, a code formatting library and Leiningen plugin for Clojure. https://github.com/weavejester/cljfmt The library is useful for ensuring that the formatting is correct after code transformations via tools like rewrite-clj. The plugin is useful for ensuring that pull

Re: [ANN] cljfmt

2015-01-17 Thread James Reeves
On 17 January 2015 at 14:02, James Reeves wrote: > > If you spot a bug, please open an issue or pull request for it. Pull > requests should include tests to prevent disclaimers. > By which I of course mean "regressions" :) I just need write a lein-anti-typo plugin now... - James -- You receiv

Dynamically creating defrecord

2015-01-17 Thread Sven Richter
Hi, I am trying to create record definitions dynamically during runtime. What I would like to do is something like this: (defn mk-rec [record-name namespace arg-list] (eval '(do (ns namespace) (defrecord record-name arg-list And then call it like this: (mk-rec "A" "ns" [a b c])

Re: Dynamically creating defrecord

2015-01-17 Thread Lee Spector
> On Jan 17, 2015, at 12:27 PM, Sven Richter wrote: > > I am trying to create record definitions dynamically during runtime. What I > would like to do is something like this: > > (defn mk-rec [record-name namespace arg-list] > (eval '(do (ns namespace) >(defrecord record-name arg

Part 6 of building a Compojure address book: Deployment

2015-01-17 Thread Jarrod Taylor
The last installment in a blog series covering developing and testing a Compojure web app. This wraps it up by address deployment. http://www.jarrodctaylor.com/posts/Compojure-Address-Book-Part-6/ -- You received this message because you are subscribed to the Google Groups "Clojure" group. To

Re: Dynamically creating defrecord

2015-01-17 Thread Matching Socks
Did you find something really wrong with defstruct? Occasions when the basis fields are not known to the programmer seem better met by defstruct than defrecord. And defstruct has *not* been deprecated in the API documentation. The comment "Note: Most uses of StructMaps would now be better se

Re: Dynamically creating defrecord

2015-01-17 Thread James Reeves
On 17 January 2015 at 17:27, Sven Richter wrote: > > I am trying to create record definitions dynamically during runtime. > To what end? The right answer depends very much on your end goal. - James -- You received this message because you are subscribed to the Google Groups "Clojure" group. To

Re: Dynamically creating defrecord

2015-01-17 Thread Christopher Small
The reason you can't just call `(mk-rec "A" "ns" [a b c])` is that your `mk-rec` is a function, and `a`, `b`, and `c` are undefined. To have them interpretted as symbols, you'd either have to explicitly use `['a 'b 'c]`, or write `mk-rec` as a macro (as Lee points towards). I was able to get a

Re: Dynamically creating defrecord

2015-01-17 Thread Lee Spector
> On Jan 17, 2015, at 6:04 PM, Matching Socks wrote: > > Did you find something really wrong with defstruct? Occasions when the basis > fields are not known to the programmer seem better met by defstruct than > defrecord. And defstruct has not been deprecated in the API documentation. > Th

Re: Dynamically creating defrecord

2015-01-17 Thread Sean Corfield
On Jan 17, 2015, at 3:04 PM, Matching Socks wrote: > And defstruct has not been deprecated in the API documentation. Technically true but when you see comments like these out there it’s reasonable to assume that structs should be avoided: "We intentionally omit ... struct-maps, which are deprec