Re: every-nth

2010-11-25 Thread Sunil S Nandihalli
Thanks Meikel for such an insightfull feedback. Its hard to imagine so much thought goes into writing trivial looking functions. Sunil. On Thu, Nov 25, 2010 at 1:00 PM, Meikel Brandmeyer wrote: > Hi, > > On 25 Nov., 05:06, Sunil S Nandihalli > wrote: > > > (defn every-nth [n coll] > > (letfn

Re: ANN: ClojureQL 1.0.0 finally released as public beta

2010-11-25 Thread Saul Hazledine
On Nov 25, 8:28 am, LauJensen wrote: > ClojureQL: > > (defn oracle-take >   [tname limit] >   (-> (table (str "(SELECT ROW_NUMBER() OVER (ORDER BY key ASC)" >                   " AS rownumber,columns" >                   " FROM " (to-tablename tname) ")")) >       (select (where (<= :rownumber lim

Re: ANN: ClojureQL 1.0.0 finally released as public beta

2010-11-25 Thread Shantanu Kumar
Database dialect independence may be a useful thing to have for ClojureQL, so that users can work based on intent rather than syntax. Consider something like this (just an idea): ;; by default in ClojureQL ;; make-sql92-handler is a factory fn for a protocol (def *dialect-handler* (make-sql92-hand

Re: memcache, redis connection pooling

2010-11-25 Thread Saul Hazledine
On Nov 24, 9:12 pm, Wilson MacGyver wrote: > I highly recommend jedis for redis java lib. It supports connection > pooling, pub/sub. > and works with the 2.0 protocol. > > https://github.com/xetorthio/jedis > Many thanks for that. Now it looks like the best way forward is to wrap existing Java li

Re: every-nth

2010-11-25 Thread Meikel Brandmeyer
Hi, On 25 Nov., 09:40, Sunil S Nandihalli wrote: > Thanks Meikel for such an insightful feedback. Its hard to imagine so much > thought goes into writing trivial looking functions. There are several interpretations of the word "trivial." One is "easy" or "simple" (where one could dispute whethe

Re: *warn-on-reflection* broken in 1.2?

2010-11-25 Thread Sergey Didenko
Hi Ken, I repeated your commands in IDE REPL and do not see anything in *out* or *err*. Probably this bug is not as simple as it looks :) On Wed, Nov 24, 2010 at 9:39 PM, Ken Wesson wrote: > On Wed, Nov 24, 2010 at 11:18 AM, Sergey Didenko > wrote: > > Here is the Enclojure ticket - > > > htt

clojure 1.3 alpha3 and swank

2010-11-25 Thread Sunil S Nandihalli
Hello Everybody, I would like to have a go at 1.3 alpha3 .. but having a lot of trouble with the swank.. can somebody suggest me a version of swank-clojure that has worked for them along with 1.3 alpha3 Thanks, Sunil. -- You received this message because you are subscribed to the Google Groups

Re: priority queue for scheduling events in the future

2010-11-25 Thread HiHeelHottie
Ken, Thanks for putting this together. As a newbie, this gives me a lot to mull over. Can you explain the convention of a * at the end of a function name? On Nov 24, 12:39 am, Ken Wesson wrote: > On Tue, Nov 23, 2010 at 11:45 PM, HiHeelHottie wrote: > > > Does anybody know of an implementati

Re: priority queue for scheduling events in the future

2010-11-25 Thread Laurent PETIT
2010/11/25 HiHeelHottie > > Ken, > > Thanks for putting this together. As a newbie, this gives me a lot to > mull over. Can you explain the convention of a * at the end of a > function name? > Hi, it's a common convention when you have both a macro and a function, the macro generally delegatin

Re: a macro to debug the let form

2010-11-25 Thread Sunil S Nandihalli
I just tried to re-write with-seperator without using the symbol-macros from macro-utils and it seems to work fine .. On Thu, Nov 25, 2010 at 1:27 PM, Sunil S Nandihalli < sunil.nandiha...@gmail.com> wrote: > Hello everybody, > I was trying to learn to write clojure macros and the code is poste

Re: distinguishing the symbols generated by gensym from those that were part of the code

2010-11-25 Thread Sunil S Nandihalli
thanks Ken Sunil On Thu, Nov 25, 2010 at 11:41 AM, Ken Wesson wrote: > On Thu, Nov 25, 2010 at 1:06 AM, Sunil S Nandihalli > wrote: > > Hello everybody, > > Is there a function which can tell me if a particular symbol was > generated > > by gensym or was present in the code? > > Sunil. > > I d

Re: discussing Clojure with non-CS types

2010-11-25 Thread Michael Gardner
On Nov 24, 2010, at 7:47 PM, CuppoJava wrote: > The other reason is that Clojure emphasizes functional programming and > discourages mutation. This is fine, as I believe well-written code is > usually functional anyway. The problem is that bad code is usually > easier to write in an imperative way

Re: discussing Clojure with non-CS types

2010-11-25 Thread David Nolen
On Wed, Nov 24, 2010 at 8:47 PM, CuppoJava wrote: > > Numerical software involves a lot of array indexing, and loops, and > not much else. Clojure's functional data structures are elegant, but > are not quite fast enough for heavy numerical processing so I still > need to use native arrays. And if

Re: ANN: ClojureQL 1.0.0 finally released as public beta

2010-11-25 Thread rickmode
Allowing implementation-specific and optimized SQL only via strings and not via a mechanism within ClojureQL allows its use in specific applications but effectively prevents use for libraries and frameworks. Indirect use of ClojureQL could yield unacceptable performance with no elegant fix. On N

Re: ANN: ClojureQL 1.0.0 finally released as public beta

2010-11-25 Thread LauJensen
There's some valuable food for thought in this thread. My major problem with support various backends is the amount of work thats involved. Every single backend needs to play nice with all the primitives defined in Relational Algebra and that are implemented in ClojureQL. I believe that the SQL92

Re: Enclojure for Clojure 1.2

2010-11-25 Thread Harrison Maseko
Sorry to bother you, but where do I download Enclojure 1.4? Could you please give me a URL? Thanks. On Nov 18, 3:28 am, Ken Wesson wrote: > On Wed, Nov 17, 2010 at 3:54 PM, Harrison Maseko wrote: > > DoesEnclojuresupport Clojure1.2yet? > > Yes. I've been using Clojure1.2/Enclojure1.4/NB 6.9.1 fo

lein compile for clj-time problem..

2010-11-25 Thread Prometheus
Hi Steve, I am new on clojure and testing cascalog . I needed clj-time library .. I downloaded its files from git and cd clj-time than type lein deps && lein compile.. its creating classes and lib directory but nothing inside. So i am miising something.. what is the proper way to compile cl

Re: lein compile for clj-time problem..

2010-11-25 Thread Rayne
If you're using leiningen, you can create a new project with 'lein new'. In that project, you'll find a file called 'project.clj'. Open that file, and under :dependencies, add this to the vector: [clj-time "0.2.0-SNAPSHOT"] Save the file and then run 'lein deps'. After that, running lein repl/ swa

Re: Porting libraries to ClojureCLR

2010-11-25 Thread dmiller
On Nov 24, 1:24 pm, Ken Wesson wrote: > I gave some thought to the Integer vs. Int32 issue. > > I think what would help here is a way to alias classes when :importing them. > > It would require tweaking the ns macro and possibly parts of the > runtime. The outcome would be to allow something lik

Re: Enclojure for Clojure 1.2

2010-11-25 Thread Ken Wesson
On Thu, Nov 25, 2010 at 3:51 PM, Harrison Maseko wrote: > Sorry to bother you, but where do I download Enclojure 1.4? Could you > please give me a URL? Actually you should be able to select it and install it from inside NB 6.9.1's package manager. -- You received this message because you are su

problems using javax.sound.midi from clojure on windows

2010-11-25 Thread Brian Gruber
Hello clojure group, First off, everything I'm about to say only applies to Windows. The code in question works fine (for me anyhow) on Linux, and I haven't tried it on OSX. Here's some Java code to get the first channel out of the default midi synth. Assume the appropriate things are imported fr

using symbol macros from clojure.contrib.macro-utils does not seem to bind the &env environment variable correctly in the nested macro calls

2010-11-25 Thread Sunil S Nandihalli
Hello everybody, I am not sure if this is the expected behaviour .. or I am using it incorrectly .. The code is pasted at https://gist.github.com/716293 . (ns symbol-macro-problem (:require [clojure.contrib.macro-utils :as m])) (defmacro sym-macro [& body] `(m/symbol-macrolet [begin :begin

Re: using symbol macros from clojure.contrib.macro-utils does not seem to bind the &env environment variable correctly in the nested macro calls

2010-11-25 Thread Sunil S Nandihalli
I just realized that we don't need to use the with-symbol-macros when using symbol-macrolet .. but the problem persists all the same.. I have modified the gist to reflect this change.. Sunil. On Fri, Nov 26, 2010 at 10:35 AM, Sunil S Nandihalli < sunil.nandiha...@gmail.com> wrote: > Hello everyb

Re: discussing Clojure with non-CS types

2010-11-25 Thread Carson
Curious if anyone has given Lush a try here? http://lush.sourceforge.net/ It's essentially a lisp-like way to write C, with lots of integration with libraries to do numerical computing, machine learning, etc. Carson On Nov 24, 5:47 pm, CuppoJava wrote: > I must admit that even though I love Clo

Re: problems using javax.sound.midi from clojure on windows

2010-11-25 Thread Ken Wesson
On Thu, Nov 25, 2010 at 11:10 PM, Brian Gruber wrote: > At which point I get the following exception: > java.lang.IllegalArgumentException: Can't call public method of non- > public class: public javax.sound.midi.MidiChannel[] > com.sun.media.sound.AbstractPlayer.getChannels() I think that's a re

Re: lein compile for clj-time problem..

2010-11-25 Thread Prometheus
Thanks Steve.. Regards P: On Nov 26, 1:51 am, Rayne wrote: > If you're using leiningen, you can create a new project with 'lein > new'. In that project, you'll find a file called 'project.clj'. Open > that file, and under :dependencies, add this to the vector: [clj-time > "0.2.0-SNAPSHOT"] > >