[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: ANN: Om 0.6.1, moving towards independently addressable components

2014-04-24 Thread Kris Jenkins
All looks good here - a drop-in replacement. :-) Independently addressable components will be a very nice enhancement for us. I look forward to it. Cheers, Kris On Thursday, 24 April 2014 18:03:37 UTC+1, David Nolen wrote: > > Om 0.6.1 significantly changes how component local state works - we

Re: Question about map destrustures

2014-02-24 Thread Kris Jenkins
Isn't it just: (defn a [m] (println m)) If you want access to the keys: (defn a [{:keys [k j] :as m}] (println k)) Kris On Monday, 24 February 2014 14:34:13 UTC, bob wrote: > > Hi, > > There is a function a > > (defn a > [ & {:as m}] > (println m)) > > it accepts pair of params

[ANN] Yesql 0.4.0 - Clojure & SQL Rethought.

2014-02-24 Thread Kris Jenkins
Yesql is a simple library for blending SQL & Clojure together, cleanly. Here's how it works , and how to use it . New since v0.3.x: - Support for Insert/Update/Delete/etc. Hat tip to Yannick

Re: core.async as a rate-limiter

2014-02-19 Thread Kris Jenkins
Wed, Feb 19, 2014 at 10:27 AM, Kris Jenkins > > > wrote: > >> Hey folks, >> >> Can someone sanity check this for me, please? >> >> I want to write some code that processes messages on a core.async >> channel, at a rate of *at most* 1 message per

core.async as a rate-limiter

2014-02-19 Thread Kris Jenkins
Hey folks, Can someone sanity check this for me, please? I want to write some code that processes messages on a core.async channel, at a rate of *at most* 1 message per second. I'm using this code: (go (while true (let [t (timeout 1000)] (log "Message is: " (http://groups.google.com

Re: Handy clojure function to transform prepared statement queries

2014-02-10 Thread Kris Jenkins
Actually, Yesql already supports this, albeit unofficially. Here's an example, but please read the caveat at the end before you use it... Define an IN-query with one parameter: -- name: find-by-age SELECT * FROM person WHERE age IN (:age) Call it, supplying a vector for age: (find-by-age db-sp

Re: [ANN] Yesql 0.3.0 - Clojure & SQL queries rethought.

2014-01-09 Thread Kris Jenkins
Hmm...I'll have to mull that one. I have been thinking that I'm going to leave the whole issue of namespaces to Clojure, and let the call-site of (defqueries) decide. But I'll have to think it through some more. :-) Kris On Wednesday, 8 January 2014 00:26:58 UTC, Marco Shimomoto wrote: > > It l

Re: [ANN] Yesql 0.3.0 - Clojure & SQL queries rethought.

2014-01-09 Thread Kris Jenkins
hoice, Kris. I'm using yesql in my current work > project, and it's been a real delight to work with thus far. Being able to > put multiple queries in one file just makes it that much sweeter. > > ~Gary > > On Tuesday, January 7, 2014 10:57:55 AM UTC-5, Kris Jenkins w

[ANN] Yesql 0.3.0 - Clojure & SQL queries rethought.

2014-01-07 Thread Kris Jenkins
Yesql is a simple library for blending SQL queries & Clojure together, cleanly. Here's how it works, and how to use it . Project: https://github.com/krisajenkins/yesql Leiningen: [yesql "0.3.0"]

Re: [ANN] Yesql 0.2.1 - Clojure & SQL queries rethought.

2013-11-27 Thread Kris Jenkins
and this may be just because I am >> relatively new to Clojure, but making the returned query lazy seems to be a >> bit of a gotch'ya. >> >> For example: >> >> >> >> On Mon, Nov 11, 2013 at 10:10 PM, Kris Jenkins >> >> > wrote:

Re: [ANN] Yesql 0.2.1 - Clojure & SQL queries rethought.

2013-11-18 Thread Kris Jenkins
Not yet. That's in the works for the next version. :-) On Monday, 18 November 2013 11:02:07 UTC, Josh Kamau wrote: > > Can i put more than one sql statement in a file? > > Josh > > > On Mon, Nov 18, 2013 at 2:01 PM, Kris Jenkins > > > wrote: > >> &g

Re: [ANN] Yesql 0.2.1 - Clojure & SQL queries rethought.

2013-11-18 Thread Kris Jenkins
On Monday, 18 November 2013 03:21:12 UTC, Jeremy Heiler wrote: > > On Mon, Nov 11, 2013 at 6:10 AM, Kris Jenkins > > > wrote: > >> https://github.com/krisajenkins/yesql >> >> Yesql is a simple library for blending SQL & Clojure together, cleanly. &g

Re: [ANN] Yesql 0.2.1 - Clojure & SQL queries rethought.

2013-11-18 Thread Kris Jenkins
; please point me to them. I'd be interested!) >> >> Cheers, >> Kris >> >> On Tuesday, 12 November 2013 03:35:46 UTC, John Hume wrote: >>> >>> For me, the one feature that can justify an internal DSL for generating >>> SQL is the a

Re: [ANN] Yesql 0.2.1 - Clojure & SQL queries rethought.

2013-11-12 Thread Kris Jenkins
generating > SQL is the ability to compose queries. I assume that's not on the Yesql > roadmap. > On Nov 11, 2013 5:10 AM, "Kris Jenkins" > > wrote: > >> https://github.com/krisajenkins/yesql >> >> Yesql is a simple library for blending

Re: [ANN] Yesql 0.2.1 - Clojure & SQL queries rethought.

2013-11-12 Thread Kris Jenkins
My primary motivation is for smoother development. Both the editors I use have good SQL modes that do more than just highlighting - they take care of schema exploration, autocomplete, indentation, memorising bind parameters, previewing results, etc. I want to use them to develop a SQL query as a

Re: [ANN] Yesql 0.2.1 - Clojure & SQL queries rethought.

2013-11-11 Thread Kris Jenkins
Hi Kris, > > It's look fine. Is is possible to to add more query in one sql file? I > mean- I'd like to create one sql file and store all query on that file. > > BR, > Mamun > > > > On Monday, November 11, 2013 2:38:27 PM UTC+1, Kris Jenkins wrote: >>

Re: [ANN] Yesql 0.2.1 - Clojure & SQL queries rethought.

2013-11-11 Thread Kris Jenkins
ought, "oh, interesting... > > So, kudos on thinking outside the box. I certainly agree with a lot of > the points you've made. I'll definitely be playing around with this. > > Cheers, > DD > > (2013/11/11 20:10), Kris Jenkins wrote: > > https://git

[ANN] Yesql 0.2.1 - Clojure & SQL queries rethought.

2013-11-11 Thread Kris Jenkins
https://github.com/krisajenkins/yesql Yesql is a simple library for blending SQL & Clojure together, cleanly. Here's how it works , and how to use it . Feedback welcomed, Kris -- -- You rece

Re: SQL to logic rule mapping

2013-10-30 Thread Kris Jenkins
FWIW, I too am interested in a better SQL tool for Clojure, but my take on it is that we don't need a new language on top of SQL, but a better way to use SQL directly. My thinking, plus an *alpha-grade* library, can be found here: https://github.com/krisajenkins/yesql#rationale Cheers, Kris O

Re: [ANN] Clojure Cheatsheet for Emacs

2013-08-13 Thread Kris Jenkins
>>> >>> Actually was kinda funny, I typed something like "clojure cheatsheet >>> offline" and your github link was one of the first, and I was very >>> surprised... "Wow, it is possible that I didn't know of it ?" >>> Well no

[ANN] Clojure Cheatsheet for Emacs

2013-08-09 Thread Kris Jenkins
Hi, I find the Clojure Cheatsheet really useful, but since I often need at those times I don't have wifi, I've packaged it up into an Emacs plugin: In the hope that someone else finds

Re: Has anyone here played with Wisp?

2013-05-30 Thread Kris Jenkins
PS: I've created an Emacs major-mode for wisp: https://github.com/krisajenkins/wisp-mode On Monday, 27 May 2013 11:09:56 UTC+1, Kris Jenkins wrote: > > I've played around with it a fair bit and it's got promise. Despite > appearances, it's not really a Clojure - as

Re: Has anyone here played with Wisp?

2013-05-27 Thread Kris Jenkins
I've played around with it a fair bit and it's got promise. Despite appearances, it's not really a Clojure - as David says it's missing a lot of features that make Clojure more than Just Another Lisp. It's probably best to think of it as its own Lisp that's adopted Clojure's modernised syntax.

Re: Sweet-expressions

2013-03-25 Thread Kris Jenkins
As an interesting point of trivia, the idea of abandoning S-expressions for some other notation actually pre-dates the first implementation of Lisp. S-expressions were originally intended as a temporary measure, before a more familiar representation - deemed M-expressions - could be formalized.

Re: Migrate from IDEs to emacs or vim (already experienced with it) ?

2013-02-02 Thread Kris Jenkins
For what it's worth, I'm a diehard vi user and have been for many years, but Emacs' latest Vim-emulation (called evil-mode) is really very, very good. So good that Emacs is fighting to be my favourite version of Vi yet. You'll be walking a lonely road, but if you want Emacs *and* Vim, it's actu

Re: Clojurescript/facebook JS-SDK

2012-09-16 Thread Kris Jenkins
Hi Mimmo, I don't really have an answer to this, but I share your interest in the question. The only thing I can suggest is taking a look at Jayq. It's a ClojureScript wrapper around jQuery. It wrapping a large & complex existing JavaScript API, successfully,