Re: How to separate code into different files

2010-04-12 Thread Meikel Brandmeyer
Hi, On Apr 11, 4:36 pm, Nurullah Akkaya wrote: > (ns tubes.core >   (:use :reload-all tubes.plugins.a)) Please note, that :reload-all is not necessarily a good idea in standard code. You should use it only for debugging. Sincerely Meikel -- You received this message because you are subscribe

?: create static inner Java class with constructor argument

2010-04-12 Thread alux
Hello, sorry, I'm a bit slow today. I try to create an instance of a Java class I want to use, and am just confused. The Java code is import javax.sound.sampled.*; ... Line.Info li = new Line.Info(Object.class); My two (wrong) trials are: (def li (new javax.sound.sampled.Line/Info (.getClass

RE: create static inner Java class with constructor argument

2010-04-12 Thread Kevin
> > import javax.sound.sampled.*; > > ... > > Line.Info li = new Line.Info(Object.class); > > My two (wrong) trials are: > > (def li (new javax.sound.sampled.Line/Info (.getClass (Object. ; gives Unable to resolve classname: javax.sound.sampled.Line/Info ; [Thrown class java.lang.IllegalAr

Re: create static inner Java class with constructor argument

2010-04-12 Thread alux
Aaaah! Hello Kevin, right, thank you! I had even seen this once before, but forgot it ;-) Regards, alux On 12 Apr., 13:34, "Kevin" wrote: > > import javax.sound.sampled.*; > > > ... > > > Line.Info li = new Line.Info(Object.class); > > > My two (wrong) trials are: > > > (def li (new javax.soun

Re: ?: create static inner Java class with constructor argument

2010-04-12 Thread Michael Wood
On 12 April 2010 13:21, alux wrote: > Hello, > > sorry, I'm a bit slow today. I try to create an instance of a Java > class I want to use, and am just confused. > > The Java code is > > import javax.sound.sampled.*; > > ... > > Line.Info li = new Line.Info(Object.class); > > My two (wrong) trials

Jersey REST with Clojure is it possible?

2010-04-12 Thread foop1
Hi, Newbie to clojure, can i user jersey REST library along with clojure, if not you can tell me why it would not work if possible, or suggest me a nice rest framework for clojure i really like jersey, i want to use it though? Thank you -- You received this message because you are subscrib

Re: ?: create static inner Java class with constructor argument

2010-04-12 Thread Remco van 't Veer
It's: javax.sound.sampled.Line$Info alux writes: > Hello, > > sorry, I'm a bit slow today. I try to create an instance of a Java > class I want to use, and am just confused. > > The Java code is > > import javax.sound.sampled.*; > > ... > > Line.Info li = new Line.Info(Object.class); > > My two

ClojureTab publication announcement

2010-04-12 Thread ru
Yet another Clojure IDE - ClojureTab plug-in to Protege ontology editor (http://protege.stanford.edu). Very useful, simple and powerful tool for knowledge processing in Protege environment: http://oogis.ru/clojuretab Free, open source. -- You received this message because you are subscribed to

Re: Haskell-style list functions

2010-04-12 Thread saturap
Hi, If you know any smart solutions with only currently available functions, please tell me. I mean, 'smart' solutions have no explicit 'lazy-seq', recursion, and return a lazy sequence as a result. How about using clojure.contrib.seq-utils/reductions? > user> (accum-seq [1, 1, 1, 1, 1]) > (

Re: create static inner Java class with constructor argument

2010-04-12 Thread Michael Wood
On 12 April 2010 13:54, alux wrote: > Aaaah! > > Hello Kevin, right, thank you! I had even seen this once before, but > forgot it ;-) I wouldn't have bothered replying if Gmail hadn't put this in a separate thread :) Oh well. Perhaps my slightly more explicit answer will help someone else in fu

Common Algorithms Written in Clojure

2010-04-12 Thread Bytesource
Hi, I am new to Clojure and currently reading "Programming Clojure" (just finished the chapter on concurrency). I would like to know if there is a collection of common algorithms written in Clojure to get a better feel for the language and to familiarize myself with an idiomatic coding style? Fo

Re: Common Algorithms Written in Clojure

2010-04-12 Thread Steve Purcell
On 12 Apr 2010, at 09:39, Bytesource wrote: > Hi, > > I am new to Clojure and currently reading "Programming Clojure" (just > finished the chapter on concurrency). > > I would like to know if there is a collection of common algorithms > written in Clojure to get a better feel for the language an

Re: Common Algorithms Written in Clojure

2010-04-12 Thread Steve Purcell
On 12 Apr 2010, at 13:46, Steve Purcell wrote: > On 12 Apr 2010, at 09:39, Bytesource wrote: >> For example, I tried to implement the "insertion sort" in Clojure but >> could not figure out how to "swap" values and get the recursion >> right. > > > How about the Clojure examples on Rosettacode?

Re: create static inner Java class with constructor argument

2010-04-12 Thread alux
Oh, thats fine. Now I can even reduce my (Class/forName "javax.sound.sampled.SourceDataLine") to just SourceDataLine I like shortening code (especially if it stays readable). Thank you. alux On 12 Apr., 14:41, Michael Wood wrote: > On 12 April 2010 13:54, alux wrote: > > > Aaaah! > > > Hel

Re: Jersey REST with Clojure is it possible?

2010-04-12 Thread Krešimir Šojat
Hi, On Apr 11, 4:40 pm, foop1 wrote: > Hi, > > Newbie to clojure, can i user jersey REST library along with clojure, > > if not you can tell me why it would not work if possible, > > or suggest me a nice rest framework  for clojure > > i really like jersey, i want to use it though? > > Thank you

Re: Common Algorithms Written in Clojure

2010-04-12 Thread Bytesource
That's a great link! Thank you very much! On Apr 12, 2:49 pm, Steve Purcell wrote: > On 12 Apr 2010, at 13:46, Steve Purcell wrote: > > > On 12 Apr 2010, at 09:39, Bytesource wrote: > >> For example, I tried to implement the "insertion sort" in Clojure but > >> could not figure out how to "swap"

Re: Clojure Concurrency Screencast Available

2010-04-12 Thread Baishampayan Ghose
Craig Andera wrote: I've recorded a screencast on Clojure concurrency primitives. It's available at http://link.pluralsight.com/clojure. Thought some here might find it useful. It's in six parts, the first four of which are up now. The last two will be up by the middle of next week. Feedback we

Re: Clojure Concurrency Screencast Available

2010-04-12 Thread Craig Andera
That's typing-speed-mode. I wrote it. :) Available here [1]. You'll probably also want this [2] in your .emacs. [1] http://www.pluralsight-training.net/community/blogs/craig/archive/2008/10/07/typing-speed-mode-emacs-minor-mode.aspx

Re: Jersey REST with Clojure is it possible?

2010-04-12 Thread Shantanu Kumar
> or suggest me a nice rest framework  for clojure > > i really like jersey, i want to use it though? Jersey makes quite heavy use of annotations. Annotations are not supported in Clojure yet. You may like to take a look at Taimen for writing RESTful services: http://code.google.com/p/bitumenfram

Re: Remapping Class Imports

2010-04-12 Thread Stuart Sierra
On Mar 30, 11:38 am, aria42 wrote: > Hi, >   Is it possible to remap the name of a class or package import? No. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new me

Re: ?: create static inner Java class with constructor argument

2010-04-12 Thread verec
You may also want to browse this thread: http://groups.google.com/group/clojure/browse_frm/thread/a80e0767566357e5/224909f792464f6d -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note tha

Understanding lazy-seq

2010-04-12 Thread Edmund Jackson
Dear Clojurians, I have been trying to get a proper grip on the operation of lazy-seq and hope somebody will have the time to clarify a point for me. The references indicate that you should not hold onto the head of a lazy sequence as it blocks the GC. This has lead to me to believe t

Re: Jersey REST with Clojure is it possible?

2010-04-12 Thread foop1
Thank you all for the reply, do you know if the annotations support is coming to clojure? now a days mjaor libraries are having some form of annotation , actually annotation makes java program appear intutive and concise... Do you guys know any resource /blogpost where annotation has been convert

Re: Jersey REST with Clojure is it possible?

2010-04-12 Thread foop1
Hi Shantanu, is taimen framework follow JSR311 standard? just curious. Can you point me to any resource as to how an annotation can be translated to clojrue code Thank you On Apr 12, 1:57 pm, Shantanu Kumar wrote: > > or suggest me a nice rest framework  for clojure > > > i really like jersey,

Re: Understanding lazy-seq

2010-04-12 Thread Stuart Halloway
Hi Edmund, This is a regression since last Tuesday's commit f81e612cc9ff91ddefc1d86e270cd7f018701802. Thanks for catching it! Stu Dear Clojurians, I have been trying to get a proper grip on the operation of lazy- seq and hope somebody will have the time to clarify a point for me. The

Re: Jersey REST with Clojure is it possible?

2010-04-12 Thread patrickdlogan
Also I have had good success with Restlet using Java as well as Groovy in production apps. I wrote a v.small example in Clojure some time ago... should work fine. Annotations are optional in Restlet, so no problem there. On Apr 12, 10:57 am, Shantanu Kumar wrote: > > or suggest me a nice rest fr

removing parethesis

2010-04-12 Thread Glen Rubin
I am working with a collection of integer sequences ...(e.g. coll: ((3 7 3 5 9 2 0 8 4 0 1 2323 4 11...) (243 4 664 478 3948...) (6 3 7 4 3335 2 4 5 7 6...)...) I want to create an average sequence such that all of the first elements are averaged, all of the second elements, etc However, I am

Re: removing parethesis

2010-04-12 Thread Douglas Philips
On 2010 Apr 12, at 10:48 PM, Glen Rubin wrote: I am working with a collection of integer sequences ...(e.g. coll: ((3 7 3 5 9 2 0 8 4 0 1 2323 4 11...) (243 4 664 478 3948...) (6 3 7 4 3335 2 4 5 7 6...)...) I want to create an average sequence such that all of the first elements are averaged, a

Re: removing parethesis

2010-04-12 Thread Alan Busby
On Tue, Apr 13, 2010 at 11:54 AM, Douglas Philips wrote: > On 2010 Apr 12, at 10:48 PM, Glen Rubin wrote: > >> I am working with a collection of integer sequences ...(e.g. >> coll: >> ((3 7 3 5 9 2 0 8 4 0 1 2323 4 11...) (243 4 664 478 3948...) (6 3 7 4 >> 3335 2 4 5 7 6...)...) >> >> I want to

Re: Jersey REST with Clojure is it possible?

2010-04-12 Thread Shantanu Kumar
On Apr 13, 3:59 am, foop1 wrote: > Hi Shantanu, > > is taimen framework follow JSR311 standard? just curious. Taimen is not JSR-311 compliant. However, it exposes a simple API to achieve what you can do otherwise through annotations in JSR-311. Taimen is a REST compatible server-side web framew

Re: removing parethesis

2010-04-12 Thread Mark J. Reed
On Mon, Apr 12, 2010 at 11:15 PM, Alan Busby wrote: > On Tue, Apr 13, 2010 at 11:54 AM, Douglas Philips wrote: > >> On 2010 Apr 12, at 10:48 PM, Glen Rubin wrote: >> >>> I am working with a collection of integer sequences ...(e.g. >>> coll: >>> ((3 7 3 5 9 2 0 8 4 0 1 2323 4 11...) (243 4 664 47