Re: STM criticisms from Bryan Cantrill (Sun)

2008-11-05 Thread Krukow
On Nov 4, 2:15 pm, Rich Hickey <[EMAIL PROTECTED]> wrote: > On Nov 4, 3:47 am, "Christian Vest Hansen" <[EMAIL PROTECTED]> > wrote: > > My view is that TMs are another tool in the box, just like CAS, locks, > > agents, volatile, thread-locals, immutables, atomics and all the rest > > of java.uti

Re: Pathetic n00b wonders how to deploy

2008-11-05 Thread Robert Pfeiffer
On 31 Okt., 04:46, JCB <[EMAIL PROTECTED]> wrote: > 1) does Clojure maintain the CL notion of a "running image" (ACL > terms), or a "core" (sbcl terms)? You can do this with Scriba. Scriba allows you to save a "running image" of a scripting session on the JVM. It does not in particular support C

Re: Having struggle in understanding FP (and Clojure question)

2008-11-05 Thread mb
Hi, On 5 Nov., 08:31, Konrad Hinsen <[EMAIL PROTECTED]> wrote: > That's exactly my point. Multimethods may well be sufficient or even   > superior for implementing OO concepts useful in Clojure. We will see   > when someone actually uses them this way (or has it already   > happened?). But as lon

Re: A question about test-is

2008-11-05 Thread J. McConnell
On Tue, Nov 4, 2008 at 8:47 PM, Chanwoo Yoo <[EMAIL PROTECTED]> wrote: > Thank you for your kind exaplanation. :) To a newbie like me, list and > vector seemed that they have no significant difference. No problem, I think everyone runs into these kinds of issues when they first look at Clojure. H

Re: Concerned about Clojure's license choice.

2008-11-05 Thread [EMAIL PROTECTED]
On Nov 4, 4:37 pm, Matthias Benkard <[EMAIL PROTECTED]> wrote: > > The CPL doesn't allow me to choose the GPL.  Instead, it forces me to > apply a CPL-compatible, GPL-like license -- a thing which may or may > not currently exist, but which will certainly make my library useless > to almost everyb

Re: Having struggle in understanding FP (and Clojure question)

2008-11-05 Thread Konrad Hinsen
On Nov 5, 2008, at 11:12, mb wrote: > I don't think that there are first-class and second-class citizens. > They just have a different aspect. Right, one can't say one is superior to the other. There are just two separate worlds, each having its own characteristics. > Having pure Clojure "cla

Re: Having struggle in understanding FP (and Clojure question)

2008-11-05 Thread mb
Hi, On 5 Nov., 15:40, Konrad Hinsen <[EMAIL PROTECTED]> wrote: > But does gen-class have to look the way it does? Couldn't the same   > functionality be provided in a way that looks more like a proper part   > of the language? I'm not sure about the form itself. I had look at a CLOS tutorial and

Re: Concerned about Clojure's license choice.

2008-11-05 Thread Konrad Hinsen
On Nov 5, 2008, at 0:49, Mibu wrote: > You do know these licenses only hold in the litigious USA and some of > its subsidiaries? Even there, they're practically unenforceable. In > other places, developers usually ignore this red herring legal mambo > jumbo and just use the technology. Common law

Re: Having struggle in understanding FP (and Clojure question)

2008-11-05 Thread Mark H.
On Nov 4, 11:46 pm, Konrad Hinsen <[EMAIL PROTECTED]> wrote: > > Long answer:  SISAL is an example of a functional parallel language > > Ah, right, there was SISAL... unfortunately long forgotten. I saw a retrospective presentation on it at SIAM PP this spring by one of the Livermore folks who pr

N00B Question -- Trying to understand Interfaces

2008-11-05 Thread Peter Wolf
Hello all, I am just about to write my first Clojure code to teach myself the language. I thought I might try Bulls&Cows aka Mastermind. This is the game where one player hides a pattern of colors, the other guesses a pattern, and the first says something like "1 correct color in the right pl

Re: N00B Question -- Trying to understand Interfaces

2008-11-05 Thread Stuart Halloway
Hi Peter, For the sequence of positive integers: (iterate inc 1) Take a look at the lazy-seqs library in Clojure-Contrib for some more interesting lazy sequences. Cheers, Stuart > Hello all, I am just about to write my first Clojure code to teach > myself the language. > > I thought I might

Re: Files in Clojure Google Groups

2008-11-05 Thread Rastislav Kassak
Maybe everyone submitting new/updated file should announce it on the list in preferred format (with full filename, etc), so it could be fulltext searchable. Not the best enterprise class solution, but working - I've tried it for tsp.zip. :) On 10/31/08, Rich Hickey <[EMAIL PROTECTED]> wrote: > >

Re: quote + #^ bug?

2008-11-05 Thread wwmorgan
I don't know why you're getting this behavior, but you can do what you want by using with-meta instead of #^ user=> (meta (with-meta 'sss {:tag 'mmm})) {:tag mmm} On Nov 4, 8:24 pm, Stephen Wrobleski <[EMAIL PROTECTED]> wrote: > On rev 1086: > > user=> (meta `#^mmm sss) > {:tag user/mmm} > > use

Re: N00B Question -- Trying to understand Interfaces

2008-11-05 Thread Peter Wolf
Ah thank you, now I am un-stuck. ISeq really only exists for Java interop right? You don't really implement new sequence data types, rather you combine things like ITERATE and MAPCAT with your own functions to define your own sequences. Is it correct to say that sequences are not really a typ

Re: N00B Question -- Trying to understand Interfaces

2008-11-05 Thread Meikel Brandmeyer
Hi, Am 05.11.2008 um 17:33 schrieb Peter Wolf: Also I haven't found the right document/screencast that talks about this. Can someone give me a pointer. A bit long, but ...: http://blip.tv/file/734409 Sincerely Meikel smime.p7s Description: S/MIME cryptographic signature

Re: STM criticisms from Bryan Cantrill (Sun)

2008-11-05 Thread cliffc
On Nov 4, 10:53 am, Rich Hickey <[EMAIL PROTECTED]> wrote: > Once detected, a deadlock can still be a bear to reproduce/debug, and > often does not appear until the worst possible time - production. So far, my experience (both direct & observed from others) with deadlocks has been: - indeed you

Re: Concerned about Clojure's license choice.

2008-11-05 Thread Matthias Benkard
On Nov 5, 3:33 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Are you sure? You're not modifying the clojure source, so you're not > creating a derivative work. I would think you can create a GPL > licensed library in that case. I can, but noone else will be allowed to redistribute it or wo

sequence question and style question

2008-11-05 Thread Stuart Halloway
(1) Is there a simpler way to define pairwise, which takes an existing sequence and then returns its items a pair at a time? (defn pairwise [& seq] (map vector (take-nth 2 seq) (take-nth 2 (rest seq (2) When writing a function like pairwise, are there any bright-line rules about whethe

Programming Clojure beta book now available

2008-11-05 Thread bc
Since nobody else has mentioned it, I thought people on this group would be interested to know that Stuart Halloway's new Clojure book "Programming Clojure" is now available. I've also announced it on my blog: http://bc.tech.coop/blog/081105.html Congratulations Stuart, I've bought the combo pack

Re: STM criticisms from Bryan Cantrill (Sun)

2008-11-05 Thread Raoul Duke
> No argument there. #1 bug for Azul (and we train all our SE's to look > for it) is HashMap corruption leading to a closed-cycle linked list, > and threads stuck forever spinning down the infinite list. if you can share, i'd find it very interesting to learn about the top 5 or 10 such bugs. si

Re: Programming Clojure beta book now available

2008-11-05 Thread Matt Revelle
On Nov 5, 2008, at 12:56 PM, bc wrote: > > Since nobody else has mentioned it, I thought people on this group > would be interested to know that Stuart Halloway's new Clojure book > "Programming Clojure" is now available. I've also announced it on my > blog: > http://bc.tech.coop/blog/081105.htm

Re: sequence question and style question

2008-11-05 Thread Graham Fawcett
On Wed, Nov 5, 2008 at 12:56 PM, Stuart Halloway <[EMAIL PROTECTED]> wrote: > > (1) Is there a simpler way to define pairwise, which takes an existing > sequence and then returns its items a pair at a time? > > (defn pairwise [& seq] > (map vector (take-nth 2 seq) (take-nth 2 (rest seq The b

Re: Concerned about Clojure's license choice.

2008-11-05 Thread Graham Fawcett
On Wed, Nov 5, 2008 at 12:53 PM, Matthias Benkard <[EMAIL PROTECTED]> wrote: > > On Nov 5, 3:33 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > wrote: >> Are you sure? You're not modifying the clojure source, so you're not >> creating a derivative work. I would think you can create a GPL >> licensed

Re: Programming Clojure beta book now available

2008-11-05 Thread Peter Wolf
Just bought mine :-) Matt Revelle wrote: > On Nov 5, 2008, at 12:56 PM, bc wrote: > > >> Since nobody else has mentioned it, I thought people on this group >> would be interested to know that Stuart Halloway's new Clojure book >> "Programming Clojure" is now available. I've also announced it

Re: sequence question and style question

2008-11-05 Thread Stuart Halloway
Duh. Thanks, and I will be adding that to the sequences chapter. :-/ Stuart > > On Wed, Nov 5, 2008 at 12:56 PM, Stuart Halloway > <[EMAIL PROTECTED]> wrote: >> >> (1) Is there a simpler way to define pairwise, which takes an >> existing >> sequence and then returns its items a pair at a time?

Re: Programming Clojure beta book now available

2008-11-05 Thread Stuart Halloway
Thanks Bill! I blogged this too, even though you scooped me. :-) http://blog.thinkrelevance.com/2008/11/5/clojure-beta-book-available > Since nobody else has mentioned it, I thought people on this group > would be interested to know that Stuart Halloway's new Clojure book > "Programming Clojure

Re: sequence question and style question

2008-11-05 Thread Graham Fawcett
On Wed, Nov 5, 2008 at 2:00 PM, Stuart Halloway <[EMAIL PROTECTED]> wrote: > > Duh. Thanks, and I will be adding that to the sequences chapter. :-/ > > Stuart You're welcome -- looking forward to the book! Best, Graham > >> >> On Wed, Nov 5, 2008 at 12:56 PM, Stuart Halloway >> <[EMAIL PROTECT

Re: Programming Clojure beta book now available

2008-11-05 Thread Bill Clementson
Hehe, in the blogging world, it's the quick and the dead! On Wed, Nov 5, 2008 at 11:11 AM, Stuart Halloway <[EMAIL PROTECTED]> wrote: > > Thanks Bill! > > I blogged this too, even though you scooped me. :-) > > http://blog.thinkrelevance.com/2008/11/5/clojure-beta-book-available > >> Since nobody

Re: Concerned about Clojure's license choice.

2008-11-05 Thread Mibu
I love it how developers talk about legal issues as if they were software issues: license compatibility, backward compatibility, dual- licensing, license interop, adherence to license clauses, migration to a different license, forking of licenses, license features, supporting a license or license

Nother N00B Question

2008-11-05 Thread Peter Wolf
I just browsed Stuart's wonderful book. Lots of great stuff, which I will enjoy working though However, I didn't find a section that talks about how to do non-functional stuff in Clojure. Might be a good section to add for N00Bs For example, I'm implementing my Mastermind game. I want to pr

Re: Nother N00B Question

2008-11-05 Thread Peter Wolf
Duh... I should read more carefully. I just found the section on loop/recur. Still, it might be good to expand that section, and highlight it. I suspect that every N00B will wonder how to implement a console app. And every LISPer will try to implement the REPL in Clojure. P Peter Wolf wr

Re: Nother N00B Question

2008-11-05 Thread wwmorgan
Peter, You might look at the loop special form: (defn game "Runs the game, returning the final state" [] (loop [state (initial-state)] (report state) (if (final? state) state (recur (compute-new-state state (read-line)) for your own definitions of initial

Re: Concerned about Clojure's license choice.

2008-11-05 Thread Randall R Schulz
On Wednesday 05 November 2008 12:00, Mibu wrote: > I love it how developers talk about legal issues as if they were > software issues: license compatibility, backward compatibility, dual- > licensing, license interop, adherence to license clauses, migration > to a different license, forking of lic

Re: Concerned about Clojure's license choice.

2008-11-05 Thread Mibu
> Unless perhaps it is that you renounce all notions of ownership, > perhaps only for intellectual property. You're entitled to that > viewpoint, of course, but don't expect to find many technologists to > share such a view. I don't renounce ownership rights at all, not even for intellectual prop

Re: Nother N00B Question

2008-11-05 Thread Matt Revelle
On Nov 5, 2008, at 3:01 PM, Peter Wolf wrote: > > I just browsed Stuart's wonderful book. Lots of great stuff, which I > will enjoy working though > > However, I didn't find a section that talks about how to do > non-functional stuff in Clojure. Might be a good section to add for > N00Bs > >

Re: Concerned about Clojure's license choice.

2008-11-05 Thread Randall R Schulz
On Wednesday 05 November 2008 12:30, Mibu wrote: > > Unless perhaps it is that you renounce all notions of ownership, > > perhaps only for intellectual property. You're entitled to that > > viewpoint, of course, but don't expect to find many technologists > > to share such a view. > > I don't reno

Re: Concerned about Clojure's license choice.

2008-11-05 Thread Craig Andera
> I don't renounce ownership rights at all, not even for intellectual > property. I just think "free" software licenses are useless at best > and counterproductive at worst when applied to projects that are > supposed to be free. Free software needs a license if it's going to be adopted by organi

Re: Nother N00B Question

2008-11-05 Thread Peter Wolf
Thanks, the "hello" example on page 25 is perfect. Matt Revelle wrote: > On Nov 5, 2008, at 3:01 PM, Peter Wolf wrote: > > >> I just browsed Stuart's wonderful book. Lots of great stuff, which I >> will enjoy working though >> >> However, I didn't find a section that talks about how to do >>

Re: Concerned about Clojure's license choice.

2008-11-05 Thread [EMAIL PROTECTED]
On Nov 5, 6:55 am, Konrad Hinsen <[EMAIL PROTECTED]> wrote: > I agree. Can anyone cite a single lawsuit concerning an inappropriate   > mix of licenses? Usually these license issues get resolved before court. The fact is that it is illegal to combine CPL and GPL code in certain manners. Doing

Re: Concerned about Clojure's license choice.

2008-11-05 Thread [EMAIL PROTECTED]
On Nov 5, 12:00 pm, Mibu <[EMAIL PROTECTED]> wrote: > Why can't we debate whether a license is needed at all for a > free project? > (Too idealistic? Hey, it's a flame war. Just playing by the rules...) This is sounding awfully trollish of you. I didn't start this thread to cause a "flame war

Re: Concerned about Clojure's license choice.

2008-11-05 Thread Rich Hickey
On Nov 5, 4:13 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > On Nov 5, 12:00 pm, Mibu <[EMAIL PROTECTED]> wrote: > > > Why can't we debate whether a license is needed at all for a > > free project? > > (Too idealistic? Hey, it's a flame war. Just playing by the rules...) > > This is sound

jEdit Mode for Clojure

2008-11-05 Thread Daniel Spiewak
Just thought it was about time I gave someone a heads up about this... Mostly for amusement, I created a jEdit mode for Clojure a while back. I don't get a chance to play with Clojure all that much, so it hasn't been heavily tested ("go-to" *is* a Clojure "keyword", right?). ;-) It's primarily

Re: Nother N00B Question

2008-11-05 Thread Chanwoo Yoo
Thank you so much, Stuart! Congratulations~ I really look forward to reading this book. :) --~--~-~--~~~---~--~~ 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: Patch: callable defstruct (PersistentStructMap$Def extends AFn)

2008-11-05 Thread Chouser
On Wed, Nov 5, 2008 at 12:10 AM, Chouser <[EMAIL PROTECTED]> wrote: > The attached patch allows: > > user=> (point 42 11) > {:x 42, :y 11} The right tool for the job makes all the difference. Attached is a much simpler patch to accomplish the same thing. --Chouser --~--~-~--~~-

A trivial question about type and class

2008-11-05 Thread Chanwoo Yoo
Hi all. In Stuart's book - Programming Clojure, there is a multi method like following: (defmulti blank? class) (defmethod blank? String [s] (every? #{\space} s)) (defmethod blank? nil [_] true) After reading the method, I was curious about type or class of native data structures of Clojure. So

Re: A trivial question about type and class

2008-11-05 Thread mac
On 6 Nov, 07:25, Chanwoo Yoo <[EMAIL PROTECTED]> wrote: > Hi all. In Stuart's book - Programming Clojure, there is a multi > method like following: > > (defmulti blank? class) > (defmethod blank? String [s] (every? #{\space} s)) > (defmethod blank? nil [_] true) > > After reading the method, I wa

Re: A trivial question about type and class

2008-11-05 Thread Michael Wood
On Thu, Nov 6, 2008 at 8:25 AM, Chanwoo Yoo <[EMAIL PROTECTED]> wrote: > > Hi all. In Stuart's book - Programming Clojure, there is a multi > method like following: > > (defmulti blank? class) > (defmethod blank? String [s] (every? #{\space} s)) > (defmethod blank? nil [_] true) > > After reading