Re: Writing apps in clojure and/or java : Binary Search Trees

2010-12-15 Thread Alex Osborne
Todd t.greenwoodg...@gmail.com writes: My main question is, what tasks/apps is clojure ideally suited for? I've been playing with implementing Binary Search Trees in clojure and Java as a way to learn clojure and compare the two languages. My original thought was to implement some basic data

Re: Downloadable Clojure mp3s

2010-12-15 Thread Alex Ott
Hi I'm trying to maintain actual list of videos, related to Clojure. It's available at http://alexott.net/en/clojure/video.html On Wed, Dec 15, 2010 at 1:02 AM, Alex Baranosky alexander.barano...@gmail.com wrote: Hi guys, I love to listen to mp3's that I've downloaded, on my way to work.  I

Looking for a better way

2010-12-15 Thread Emeka
*Helllo All,* * * *Is there a better way of doing this?* * * *(defmacro foo [string] (let[b# string f# (symbol b#)] `(def ~f# ~b#)))* * * * * *Regards,* *Emeka * -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to

Lazy Programming

2010-12-15 Thread Ralph
I'm not sure what all the hype is about lazy programming. I've been a lazy programmer for more than 30 years. :-) -- 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

Re: Lazy Programming

2010-12-15 Thread Lars Nilsson
On Wed, Dec 15, 2010 at 8:20 AM, Ralph grkunt...@gmail.com wrote: I'm not sure what all the hype is about lazy programming. I've been a lazy programmer for more than 30 years. :-) So this demotivator should fit the bill? http://despair.com/proc24x30pri.html Lars Nilsson -- You received this

Re: Downloadable Clojure mp3s

2010-12-15 Thread Alex Ott
May of videos, listed in my list, are downloadable in corresponding formats. I'm using Miro to download most of videos that I see On Wed, Dec 15, 2010 at 2:26 PM, Alex Baranosky alexander.barano...@gmail.com wrote: (Sorry, previous message was a mis-click. Just woke up.) Alex, That's a great

Re: Downloadable Clojure mp3s

2010-12-15 Thread Alex Baranosky
On Wed, Dec 15, 2010 at 4:41 AM, Alex Ott alex...@gmail.com wrote: Hi I'm trying to maintain actual list of videos, related to Clojure. It's available at http://alexott.net/en/clojure/video.html On Wed, Dec 15, 2010 at 1:02 AM, Alex Baranosky alexander.barano...@gmail.com wrote: Hi guys,

Re: Looking for a better way

2010-12-15 Thread Laurent PETIT
2010/12/15 Emeka emekami...@gmail.com *Helllo All,* * * *Is there a better way of doing this?* * * *(defmacro foo [string] (let[b# string f# (symbol b#)] `(def ~f# ~b#)))* Hello, What is it supposed to be used ? What do you expect the macroexpansion to look like ? As is stands, your

Re: Writing apps in clojure and/or java : Binary Search Trees

2010-12-15 Thread Alex Osborne
Alex Osborne a...@meshy.org writes: Todd t.greenwoodg...@gmail.com writes: So far, my experience implementing basic BST functionality in clojure has felt contrived, and was definitely easier in java. As others have said, implementing mutable data structures in Clojure is going against the

Re: Lazy Programming

2010-12-15 Thread nickik
I've been a lazy programmer for more than 30 years. :-) True me to but the trick is to let the computer be lazy too. Because we all know a team of lazy 'things' work best. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send

Re: Writing apps in clojure and/or java : Binary Search Trees

2010-12-15 Thread Alex Osborne
Todd t.greenwoodg...@gmail.com writes: At the end of the day, I'm not sure how valid this exercise is. I'm certainly slowly learning clojure...but perhaps learning by way of what not do do. Unfortunately I don't think there's yet any Clojure books that really focus on teaching functional

Re: Clojure 1.3 Alpha 4

2010-12-15 Thread Ken Wesson
On Wed, Dec 15, 2010 at 1:07 AM, David Nolen dnolen.li...@gmail.com wrote: On Wed, Dec 15, 2010 at 12:50 AM, Ken Wesson kwess...@gmail.com wrote: On Wed, Dec 15, 2010 at 12:38 AM, David Nolen dnolen.li...@gmail.com wrote: On Wed, Dec 15, 2010 at 12:22 AM, Ken Wesson kwess...@gmail.com wrote:

Re: Clojure 1.3 Alpha 4

2010-12-15 Thread nicolas.o...@gmail.com
Again, there'd have to be a staggering further benefit from the change than just the clojure.core code looks cleaner in github or even the code is a bit easier to maintain in the future. I'm not sure that even massive increases in code maintainability alone suffice for something like this. A

Re: Clojure 1.3 Alpha 4

2010-12-15 Thread Ken Wesson
On Wed, Dec 15, 2010 at 10:56 AM, Laurent PETIT laurent.pe...@gmail.com wrote: People criticized me Hello Ken, please, don't take it bad, but just halt for a minute, and take a deep breath. Nobody criticized you. To convince myself with this, I've reread the first posts following your

Re: Clojure 1.3 Alpha 4

2010-12-15 Thread David Nolen
On Wed, Dec 15, 2010 at 11:14 AM, Ken Wesson kwess...@gmail.com wrote: Pros (heard from others so far and taken on faith): * Clojure's code base can be made internally simpler. * It's easier to implement what was already implemented. (?) * Code that isn't performance-critical may get slightly

Re: Clojure 1.3 Alpha 4

2010-12-15 Thread Laurent PETIT
2010/12/15 Ken Wesson kwess...@gmail.com On Wed, Dec 15, 2010 at 1:11 AM, Michael Gardner gardne...@gmail.com wrote: On Dec 14, 2010, at 11:22 PM, Ken Wesson wrote: On Tue, Dec 14, 2010 at 10:37 PM, Michael Gardner gardne...@gmail.com wrote: That's what archives are for Are you

Re: complex number library

2010-12-15 Thread Konrad Hinsen
On 14 Dec, 2010, at 19:47 , Stuart Sierra wrote: On Dec 14, 2:31 am, Konrad Hinsen konrad.hin...@fastmail.net wrote: That's actually what clojure.contrib.complex-numbers already uses! And it's based on multimethods, not protocols, because of all those binary operations. It is possible,

Re: Clojure 1.3 Alpha 4

2010-12-15 Thread Ken Wesson
On Wed, Dec 15, 2010 at 11:07 AM, nicolas.o...@gmail.com nicolas.o...@gmail.com wrote: Again, there'd have to be a staggering further benefit from the change than just the clojure.core code looks cleaner in github or even the code is a bit easier to maintain in the future. I'm not sure that

Re: Clojure 1.3 Alpha 4

2010-12-15 Thread Eric Schulte
Ken Wesson kwess...@gmail.com writes: Are you honestly suggesting I search the archives It is common courtesy on open-source lists such as this one to check if a question you are about to ask has already been answered. Not only does it save a lot of noise on the list, but it often means that

Re: Clojure 1.3 Alpha 4

2010-12-15 Thread Ken Wesson
On Wed, Dec 15, 2010 at 12:51 PM, Eric Schulte schulte.e...@gmail.com wrote: Ken Wesson kwess...@gmail.com writes: Are you honestly suggesting I search the archives It is common courtesy on open-source lists such as this one to check if a question you are about to ask has already been

Re: Clojure 1.3 Alpha 4

2010-12-15 Thread Mike Meyer
On Tue, 14 Dec 2010 21:04:11 -0500 Ken Wesson kwess...@gmail.com wrote: On Tue, Dec 14, 2010 at 8:23 PM, Benny Tsai benny.t...@gmail.com wrote: As Brian said, primitive math is now the default in 1.3.  If auto- promotion on overflow is desired, you can use the +', -', *', inc', dec'

Re: Clojure 1.3 Alpha 4

2010-12-15 Thread Ken Wesson
On Wed, Dec 15, 2010 at 12:52 PM, Mike Meyer mwm-keyword-googlegroups.620...@mired.org wrote: One of the things those of us on your side *begged* for (and apparently also didn't get) was that the versions with correct behavior not have second-class names. That we didn't get them means we'll

Re: Downloadable Clojure mp3s

2010-12-15 Thread Alec Battles
I use audio in much the same way. On the other hand, I hardly listen to music. I have nothing to contribute, but would be interested in seeing what people end up posting. I suppose extracting the audio track from a video lecture is in most cases a pretty good idea... (after all, if Feynman were

Re: Clojure 1.3 Alpha 4

2010-12-15 Thread Eric Schulte
Ken Wesson kwess...@gmail.com writes: On Wed, Dec 15, 2010 at 12:51 PM, Eric Schulte schulte.e...@gmail.com wrote: Ken Wesson kwess...@gmail.com writes: Are you honestly suggesting I search the archives It is common courtesy on open-source lists such as this one to check if a question you

unquote

2010-12-15 Thread Poojan
I was trying to print out a list of symbols and I was wondering if I could remove the quotes. (def process-print-list (fn [a-list] (cond (empty? a-list) 'false (list? a-list) (let [a a-list] (println (first a)) (process-print- list (rest a) )) :else (process-print-list (rest a-list)

Re: Any demand for ClojureCLR support under slime / emacs?

2010-12-15 Thread Larry Coleman
I don't know enough emacs Lisp to be much help with coding, but I can help test. -- 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 members are moderated - please be

Re: unquote

2010-12-15 Thread Ken Wesson
On Wed, Dec 15, 2010 at 11:22 AM, Poojan poojanshah2...@gmail.com wrote: I was trying to print out a list of symbols and I was wondering if I could remove the quotes. (def process-print-list  (fn [a-list]  (cond (empty? a-list) 'false  (list? a-list) (let [a a-list] (println (first a))

Re: Clojure 1.3 Alpha 4

2010-12-15 Thread Ken Wesson
On Wed, Dec 15, 2010 at 1:12 PM, Eric Schulte schulte.e...@gmail.com wrote: Ken Wesson kwess...@gmail.com writes: On Wed, Dec 15, 2010 at 12:51 PM, Eric Schulte schulte.e...@gmail.com wrote: Ken Wesson kwess...@gmail.com writes: Are you honestly suggesting I search the archives It is

Re: unquote

2010-12-15 Thread Brian Marick
On Dec 15, 2010, at 10:22 AM, Poojan wrote: I was trying to print out a list of symbols and I was wondering if I could remove the quotes. (name 'symbol) ; gives the string name of a symbol (map name '(a b c))) ; will give you a list of string names of symbols. (println (map

Re: Clojure 1.3 Alpha 4

2010-12-15 Thread Mike Meyer
On Wed, 15 Dec 2010 13:02:13 -0500 Ken Wesson kwess...@gmail.com wrote: On Wed, Dec 15, 2010 at 12:51 PM, Eric Schulte schulte.e...@gmail.com wrote: Ken Wesson kwess...@gmail.com writes: Are you honestly suggesting I search the archives It is common courtesy on open-source lists such

Re: The 'in' family

2010-12-15 Thread ninjudd
i completely agree about adding update to core. i've added it my utils library and i use it all the time. here's a slightly different implementation of update that takes a variable number of args (like update-in). (defn update Update value in map where f is a function that takes the old

Re: unquote

2010-12-15 Thread Meikel Brandmeyer
Hi, Am 15.12.2010 um 19:54 schrieb Brian Marick: (See also #'dorun.) Argh. See also doseq. Sincerely Meikel -- 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

eclipse and emacs?

2010-12-15 Thread Robert McIntyre
I'm trying to move between emacs and eclipse, and was wondering the following: When I change code in eclipse, how do I get those changes to propagate to the repl without restarting? sorry if this is vague --Robert McIntyre -- You received this message because you are subscribed to the

Re: eclipse and emacs?

2010-12-15 Thread Laurent PETIT
2010/12/15 Robert McIntyre r...@mit.edu I'm trying to move between emacs and eclipse, and was wondering the following: When I change code in eclipse, how do I get those changes to propagate to the repl without restarting? sorry if this is vague Hi, You can send code at any time :

Re: Clojure 1.3 Alpha 4

2010-12-15 Thread Jason Wolfe
On Dec 15, 10:05 am, Ken Wesson kwess...@gmail.com wrote: On Wed, Dec 15, 2010 at 12:52 PM, Mike Meyer mwm-keyword-googlegroups.620...@mired.org wrote: One of the things those of us on your side *begged* for (and apparently also didn't get) was that the versions with correct behavior

ANN: clj-help 0.2.0 released

2010-12-15 Thread Nicolas Buduroi
Hi, I've been using this small project to get some help while working at the REPL. It's a macro that regroups into one command a set of useful functions from contrib libraries while auto-quoting it's arguments. It's quite simple to use, after loading it (use 'clj- help), you only have to type

Re: ANN: clj-help 0.2.0 released

2010-12-15 Thread Nicolas Buduroi
It appears I've forgotten to include some essential information to this announcement! ;-) git repo: https://github.com/budu/clj-help leiningen: [clj-help 0.2.0] On Dec 15, 6:23 pm, Nicolas Buduroi nbudu...@gmail.com wrote: Hi, I've been using this small project to get some help while working

Midje: a different slant on clojure testing

2010-12-15 Thread Brian Marick
I'd like to formally announce Midje, a testing framework for Clojure that emphasizes ease of use, readability, and relationships among functions. https://github.com/marick/Midje Midje is at 0.8.1. I'd bump it to 1.0. but I don't want to freeze the interface to some of the newer features

Re: Midje: a different slant on clojure testing

2010-12-15 Thread Ken Wesson
On Wed, Dec 15, 2010 at 6:37 PM, Brian Marick mar...@exampler.com wrote: I'd like to formally announce Midje, a testing framework for Clojure that emphasizes ease of use, readability, and relationships among functions.    https://github.com/marick/Midje Midje is at 0.8.1. I'd bump it to

Re: eclipse and emacs?

2010-12-15 Thread Robert McIntyre
Thanks for trying to help --- I know my first stab at this was vague so I'll try to be more clear this time. I have a java project in eclipse, and I'm using the clojure repl in emacs to try and debug the java. I've just but the special eclipse /bin folder for that project on the classpath so

Re: eclipse and emacs?

2010-12-15 Thread Laurent PETIT
several ideas: * start the jvm from emacs in debug mode * start the project in debug mode from within eclipse, with an embedded clojure-swank-server, and connect to it remotely via emacs the key is debug mode, where the JVM will be able to reflect *some* clas changes on the fly (generally,

Catching ClassNotFoundException.

2010-12-15 Thread Nicolas Buduroi
Hi, is there a way of catching ClassNotFoundException? Using try..catch doesn't work! Thanks -- 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 members are moderated -

Re: complex number library

2010-12-15 Thread Sunil S Nandihalli
double-dispatch in clojure .. thats neat... Thanks Stuart. Sunil. On Wed, Dec 15, 2010 at 12:17 AM, Stuart Sierra the.stuart.sie...@gmail.com wrote: On Dec 14, 2:31 am, Konrad Hinsen konrad.hin...@fastmail.net wrote: That's actually what clojure.contrib.complex-numbers already uses! And

Re: Yegge's Lisp is not an acceptable Lisp - was he talking about Clojure?

2010-12-15 Thread Tim Daly
On 12/15/2010 7:18 PM, javajosh wrote: On Dec 14, 11:56 pm, nickiknick...@gmail.com wrote: Lisp is Not an Acceptable Lisp Friday, April 14, 2006 Clojure wasn't out then. Right. I picked a *really terrible* subject line to basically discuss the question of whether Clojure is the language

the expression problem and protocols

2010-12-15 Thread Tim Daly
This is an interesting read: Solving the Expression Problem: http://www.ibm.com/developerworks/java/library/j-clojure-protocols/index.html -- 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

Re: Midje: a different slant on clojure testing

2010-12-15 Thread Brian Marick
On Dec 15, 2010, at 6:05 PM, Ken Wesson wrote: Midje makes it easy to use functions other than equality to check results: (facts (first (primes-greater-than-2)) = odd? (some-complicated-function) = (in-any-order [1 2 3])) So, a predicate is called on the result instead of

Re: Catching ClassNotFoundException.

2010-12-15 Thread Stuart Halloway
Can you post an example? (try (throw (ClassNotFoundException. What makes you say that?)) (catch ClassNotFoundException e (println (.getMessage e Hi, is there a way of catching ClassNotFoundException? Using try..catch doesn't work! Thanks -- You received this message because

Re: Catching ClassNotFoundException.

2010-12-15 Thread Nicolas Buduroi
Yeah, while doing more testing it seems to depend from where the ClassNotFoundException is thrown. What I was trying to do at first is to call extend-type on a Java class only if it exists. Surrounding extend-type by a try..catch clause doesn't work here. So I tried to simply type: user (try

Re: Rebinding a var in a Lazytest test -- beginner

2010-12-15 Thread fuchsd
Hi Stuart, Ahh, got it. do-it/expect worked perfectly. Thanks! Dan On Dec 14, 12:37 pm, Stuart Sierra the.stuart.sie...@gmail.com wrote: Both `describe` and `it` create functions.  That is, they expand out to `(fn [] ...)`.  Wrapping `binding` around the creation of a fn has no effect.

Re: Looking for a better way

2010-12-15 Thread Robert McIntyre
no need to use macros at all: (defn foo creates a symbol named s with the value s in the current namespace [s] (intern *ns* (symbol s) s)) that is, assuming I got the use case right. --Robert McIntyre On Wed, Dec 15, 2010 at 8:00 AM, Laurent PETIT laurent.pe...@gmail.com wrote: 2010/12/15

Re: Midje: a different slant on clojure testing

2010-12-15 Thread Shantanu Kumar
This looks really interesting. Two obligatory questions: 1. Is there any example app that demonstrates how to use Midje? 2. Why would I use Midje instead of clojure.test? (Perhaps you can also blog about it with an example using clojure.test and Midje.) Regards, Shantanu On Dec 16, 7:01 am,

unsplicing quote without the other macro-specific name resolution etc.

2010-12-15 Thread Sunil S Nandihalli
Hello everybody, I would like to write regular code something like [1 2 ~@(map some-fn some-coll) 4 5] is this possible? I don't mind not using the literal vector notation.. it could even be (some-macro-or-fn 1 2 3 ~@(map some-fn some-coll) 4 5) is this possible .. ? i don't want ' `

Re: unsplicing quote without the other macro-specific name resolution etc.

2010-12-15 Thread Ken Wesson
On Thu, Dec 16, 2010 at 1:33 AM, Sunil S Nandihalli sunil.nandiha...@gmail.com wrote: Hello everybody,  I would like to write regular code something like [1 2 ~@(map some-fn some-coll) 4 5] is this possible? (vec (concat [1 2] (map some-fn some-coll) [4 5])) will do it. A tidier form would

Re: unsplicing quote without the other macro-specific name resolution etc.

2010-12-15 Thread Sunil S Nandihalli
thanks Ken, your second vecify was exactly what I was looking for! .. I feel it would be good candidate for the core. Sunil. On Thu, Dec 16, 2010 at 12:19 PM, Ken Wesson kwess...@gmail.com wrote: On Thu, Dec 16, 2010 at 1:33 AM, Sunil S Nandihalli sunil.nandiha...@gmail.com wrote: Hello

Re: unsplicing quote without the other macro-specific name resolution etc.

2010-12-15 Thread Ken Wesson
On Thu, Dec 16, 2010 at 1:55 AM, Sunil S Nandihalli sunil.nandiha...@gmail.com wrote: thanks Ken, You're welcome. -- 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