Re: Back on max again...

2008-11-03 Thread Christian Vest Hansen
On Tue, Nov 4, 2008 at 6:23 AM, Mark H. <[EMAIL PROTECTED]> wrote: > > On Nov 3, 6:48 pm, Cosmin Stejerean <[EMAIL PROTECTED]> wrote: >> I think clearly spelling out how objects of a type should be sorted is >> the point of the Comparable interface. > > Ah, yes, this is true, I hadn't realized tha

STM criticisms from Bryan Cantrill (Sun)

2008-11-03 Thread srnm
http://blogs.sun.com/bmc/entry/concurrency_s_shysters I'm new to clojure... and like what I see. Just passing this blog post on as a discussion point... Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cl

Re: Concerned about Clojure's license choice.

2008-11-03 Thread J . Pablo Fernández
Hello, On Nov 3, 7:54 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > On Nov 3, 5:35 am, J. Pablo Fernández <[EMAIL PROTECTED]> wrote: > > > One thing that might be doable and acceptable is dual licensing. If > > Clojure is realsed as CPL *and* GPL, it can be combined with GPL > > programs a

Re: Concerned about Clojure's license choice.

2008-11-03 Thread [EMAIL PROTECTED]
On Nov 3, 12:36 pm, Matthias Benkard <[EMAIL PROTECTED]> wrote: > Yes, it's worth worrying about.  The problem is, you're going to have > the danger of fragmenting the Clojure user base. I think Clojure has potential to become *very much* more well known and used. Are we sure we want to risk go

Re: Back on max again...

2008-11-03 Thread Mark H.
On Nov 3, 6:48 pm, Cosmin Stejerean <[EMAIL PROTECTED]> wrote: > I think clearly spelling out how objects of a type should be sorted is   > the point of the Comparable interface. Ah, yes, this is true, I hadn't realized that String and Date both implement Comparable. Comparable is supposed to im

Re: Ant simulation questions: keyword functions and #' for agent calls

2008-11-03 Thread Kelsin
On Nov 3, 3:35 pm, Konrad Hinsen <[EMAIL PROTECTED]> wrote: > On 03.11.2008, at 17:22, Kelsin wrote: > > > First is the use of keywords as the predicate in some forms. For > > example in the turn function: (:ant @p) > > > Does :ant become a function of the map because it's a map? Can you > > alway

Re: A newb question about macros

2008-11-03 Thread David Nolen
@Phlex & @MikeM, apologies I checked back on Chouser's post and it helped me to understand that Clojure takes a different approach to macros than Common Lisp: Common Lisp - (defmacro foobar () `(+ a b)) (let ((a 5) (b 6)) (foobar)) Clojure

Re: Back on max again...

2008-11-03 Thread Cosmin Stejerean
On Nov 3, 2008, at 8:35 PM, Mark H. wrote: > > On Nov 3, 5:39 pm, "Paul Stadig" <[EMAIL PROTECTED]> wrote: >> Could/Should the max function be modified to work against the >> Comparable interface instead of expecting its arguments to be >> numbers? >> >> I'm working with a sequence of strings

Having struggle in understanding FP (and Clojure question)

2008-11-03 Thread cwyang
Hi all. First of all, thanks for the joyful language, Clojure. I am having struggle in understanding functional programming, which Clojure dictates. Though I'm not a big fan of object oriented programming, I totally agree with the model of objects - objects and methods, entities and functions i

Re: Back on max again...

2008-11-03 Thread .Bill Smith
> The semantics of "max string" are unclear enough that it would be > better to write out the operation explicitly so that all readers of > the code know what you mean. Agreed. For example, the semantics of "max string" are locale- dependent. Bill --~--~-~--~~~---~--

Re: Open Source project hosting for clojure.

2008-11-03 Thread Matt Revelle
On Nov 3, 2008, at 4:09 PM, Paul Stadig wrote: > > Hey Drew, > I'd like to see this come to fruition, and help administer if needed. I'll volunteer some time to help admin as well. > > > Coming from Ruby (most recently) I may have a Ruby bias, but I think > that RubyForge has been a great boon

Re: Back on max again...

2008-11-03 Thread Matt Revelle
On Nov 3, 2008, at 9:35 PM, Mark H. wrote: > > On Nov 3, 5:39 pm, "Paul Stadig" <[EMAIL PROTECTED]> wrote: >> Could/Should the max function be modified to work against the >> Comparable interface instead of expecting its arguments to be >> numbers? >> >> I'm working with a sequence of strings

Re: Open Source project hosting for clojure.

2008-11-03 Thread Josh Daghlian
On Nov 3, 4:09 pm, "Paul Stadig" <[EMAIL PROTECTED]> wrote: > Hey Drew, > I'd like to see this come to fruition, and help administer if needed. > > Coming from Ruby (most recently) I may have a Ruby bias, but I think > that RubyForge has been a great boon to the Ruby community. It is nice > to be

Re: Back on max again...

2008-11-03 Thread Mark H.
On Nov 3, 5:39 pm, "Paul Stadig" <[EMAIL PROTECTED]> wrote: > Could/Should the max function be modified to work against the > Comparable interface instead of expecting its arguments to be numbers? > > I'm working with a sequence of strings that are dates in the > "-mm-dd" format, and I want to

Back on max again...

2008-11-03 Thread Paul Stadig
Could/Should the max function be modified to work against the Comparable interface instead of expecting its arguments to be numbers? I'm working with a sequence of strings that are dates in the "-mm-dd" format, and I want to find the max. Calling max gives an exception about not being able to

Re: (source name)

2008-11-03 Thread carlitos
On Nov 3, 7:03 pm, Chouser <[EMAIL PROTECTED]> wrote: > [...] It's not pretty, and it only works on functions defined in the clojure > namespace.  [...] The variation below works in a more general setting: it will look for the source file anywhere in the classpath (including jar files) or in user

Re: Processing wrapper

2008-11-03 Thread Joel L
Just had a quick play with the example you provide, good fun. Almost impossible to believe, but I think you're on the way to making working with processing even more interactive! On Sep 8, 10:43 pm, fyuryu <[EMAIL PROTECTED]> wrote: > Hi all, I've written a wrapper for Processing.org. It covers m

Re: Open Source project hosting for clojure.

2008-11-03 Thread Paul Stadig
Hey Drew, I'd like to see this come to fruition, and help administer if needed. Coming from Ruby (most recently) I may have a Ruby bias, but I think that RubyForge has been a great boon to the Ruby community. It is nice to be able to go to a single site (or do a google site: search) to find Ruby

Open Source project hosting for clojure.

2008-11-03 Thread Drew Crampsie
Hey Clojurians, My name is Drew Crampsie, and i'm the administrator of the machine that runs common-lisp.net, cliki, and paste.lisp.org. I'm interested in setting up an similar site for clojure projects. If you don't know about cl-net, it's a project hosting site that provides version control ser

Re: (Small Questions) Keywords used as verbs and different in agent send-off calls in ant simulation

2008-11-03 Thread Kelsin
And of course after I post this the original finally posts, sorry about that, should have waited longer. Chris G On Nov 3, 3:05 pm, Kelsin <[EMAIL PROTECTED]> wrote: > Howdy, I posted this a little while ago and it doesn't seem to have > posted so I'm reposting. If this comes through twice I'm s

Re: Concerned about Clojure's license choice.

2008-11-03 Thread Matthias Benkard
On Nov 3, 7:59 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I'm not advocating the GPL...only a GPL compatible license. Regarding > the benefits to a dual license or reclicense, are you sure there > *aren't* benefits? If it is easy to move to GPL compatibility, then > is it worth worryin

Re: Ant simulation questions: keyword functions and #' for agent calls

2008-11-03 Thread Konrad Hinsen
On 03.11.2008, at 17:22, Kelsin wrote: > First is the use of keywords as the predicate in some forms. For > example in the turn function: (:ant @p) > > Does :ant become a function of the map because it's a map? Can you > always do this? Isn't this the same as (@p :ant)? Yes, yes, and yes. > Is

Ant simulation questions: keyword functions and #' for agent calls

2008-11-03 Thread Kelsin
Howdy, been enjoying learning Clojure and watching some screencasts but had to simple (I think) questions about the ant code that I haven't been able to find info about on the site or in this group (though I admit my lack of knowledge about what to call these two questions could lead me to not fin

(Small Questions) Keywords used as verbs and different in agent send-off calls in ant simulation

2008-11-03 Thread Kelsin
Howdy, I posted this a little while ago and it doesn't seem to have posted so I'm reposting. If this comes through twice I'm sorry for double posting. My first question is about the form: (:ant @p) How does :ant get to be used as a verb? Do all keywords expand to (@p :ant) if @p is a map or some

2nd European Lisp Symposium (ELS 2009)

2008-11-03 Thread aml
* * *2nd European Lisp Symposium (ELS 2009) * * * * Milan, Italy, May 27-29, 2009 * * Università degli Studi di Milano-Bicocca * * * **

newb slime/clojure question...

2008-11-03 Thread Peter Hart
I've been trying to get clojure working with slime (on windows). I can run ants.clj from the command line fine. I can run simple expressions under slime (e.g. (+ 2 3)). However, when I try to run ants.clj from within slime, I get the following warning in the inferior lisp buffer, and nothing happe

Guerilla Guide to Macros

2008-11-03 Thread Meikel Brandmeyer
Dear Clojurians, since there were several questions on the list concerning macros I put up a tutorial on the Wiki. Please feel free to comment, modify and improve: http://tinyurl.com/6y8857 Sincerely Meikel smime.p7s Description: S/MIME cryptographic signature

Re: A newb question about macros

2008-11-03 Thread David Nolen
@Phlex, I understand why the code is usually bad form. @MikeM, I had already noticed that it worked on the REPL when I defined vars. My questions was _why_ it does not work in the case where I have locals via a let expression? David On Mon, Nov 3, 2008 at 12:27 PM, MikeM <[EMAIL PROTECTED]>wrote

Re: Concerned about Clojure's license choice.

2008-11-03 Thread Chouser
On Sat, Nov 1, 2008 at 12:33 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > http://www.dwheeler.com/essays/gpl-compatible.html >From that page, "it is possible that the CPL is compatible with GPL version 3" Sounds like GPL-compatibility may be coming to us without us having to change anyth

Re: Concerned about Clojure's license choice.

2008-11-03 Thread [EMAIL PROTECTED]
On Nov 2, 10:52 pm, "Mark H." <[EMAIL PROTECTED]> wrote: > On Nov 2, 10:31 pm, "[EMAIL PROTECTED]" > > <[EMAIL PROTECTED]> wrote: > > (There are  examples of projects 'weakening' the GPL in  various ways > > to suit their needs.) > > Just out of curiosity (I don't have an interest in this partic

Re: Concerned about Clojure's license choice.

2008-11-03 Thread [EMAIL PROTECTED]
On Nov 3, 2:14 am, mritun <[EMAIL PROTECTED]> wrote: > Hi Chris > > What said problem would moving to GPL solve ? Shouldn't we hear > atleast a couple of benefits that may be derived from moving to GPL ? > Are there (GPL) projects that clojure would benefit from incorporating > directly into the

Re: Concerned about Clojure's license choice.

2008-11-03 Thread [EMAIL PROTECTED]
On Nov 3, 5:35 am, J. Pablo Fernández <[EMAIL PROTECTED]> wrote: > One thing that might be doable and acceptable is dual licensing. If > Clojure is realsed as CPL *and* GPL, it can be combined with GPL > programs and it is not in any way more free than the CPL (say, like if > you add BSD in the ba

Re: (source name)

2008-11-03 Thread Chouser
On Sun, Nov 2, 2008 at 6:34 PM, Mark McGranaghan <[EMAIL PROTECTED]> wrote: > > I really like being able to find and check documentation in the REPL > with find-doc and doc, but I often would like to see the source code > of a function or macro to be able to understand it better or learn > from th

Re: A newb question about macros

2008-11-03 Thread MikeM
On Nov 3, 9:57 am, David Nolen <[EMAIL PROTECTED]> wrote: > (defmacro foobar [] >   `'(+ a b)) > > (let >     [a 5 >      b 6] >   (eval (foobar))) > > I know that the above is completely useless but I'm just trying to get > an intuitive understanding of how macros work under Clojure.  At the >

Re: A question about test-is

2008-11-03 Thread Stephen C. Gilardi
On Nov 3, 2008, at 9:34 AM, Stuart Sierra wrote: > Hmm, not sure. I don't use SLIME, but I know that run-tests prints > results to *test-out*, which by default is bound to > java.lang.System.err. You could try re-binding *test-out* to standard > output like this: > > (binding [*test-out* System

Re: (source name)

2008-11-03 Thread Graham Fawcett
On Sun, Nov 2, 2008 at 6:34 PM, Mark McGranaghan <[EMAIL PROTECTED]> wrote: > > I really like being able to find and check documentation in the REPL > with find-doc and doc, but I often would like to see the source code > of a function or macro to be able to understand it better or learn > from th

Re: (source name)

2008-11-03 Thread lpetit
And this could open the door to "organic code" : dynamically discovering the source code of functions, and - why not- correcting / adjusting the code by re-def ining the function by manipulating its original source code. Some sort of macro, at runtime :-) On Nov 3, 3:57 pm, Paul Barry <[EMAIL PR

Re: A newb question about macros

2008-11-03 Thread Phlex
David Nolen wrote: > (defmacro foobar [] > `'(+ a b)) > > (let > [a 5 > b 6] > (eval (foobar))) > > > -You should almost never have to use eval. -Don't use macros when a function will do Thanks to the answer of chooser a bit earlier : cara.trie> (defmacro foobar [] `(+ ~'a ~'b)

Re: Macro-Defining Macros

2008-11-03 Thread Phlex
Chouser wrote: > On Mon, Nov 3, 2008 at 9:13 AM, Chanwoo Yoo <[EMAIL PROTECTED]> wrote: > > Another option is ~'foo which would > explicitly capture "foo" from the context where the macro is expanded. > > --Chouser > > Nice ! I couldn't find this in the documentation. Thanks, Sacha --

A newb question about macros

2008-11-03 Thread David Nolen
(defmacro foobar [] `'(+ a b)) (let [a 5 b 6] (eval (foobar))) I know that the above is completely useless but I'm just trying to get an intuitive understanding of how macros work under Clojure. At the REPL when I try to evaluate the second form, I get an null pointer exception. W

Re: (source name)

2008-11-03 Thread Paul Barry
I agree that this would be helpful. On Nov 2, 6:34 pm, Mark McGranaghan <[EMAIL PROTECTED]> wrote: > I really like being able to find and check documentation in the REPL > with find-doc and doc, but I often would like to see the source code > of a function or macro to be able to understand it bet

Re: A question about test-is

2008-11-03 Thread J. McConnell
> I have one more trivial question. It seems good that Clojure > consistently manages all data structures as sequence. But operator > like 'assoc' can be applied to map and vector, except list and string. > I'm curious about the reason of this decision. What would (assoc (list 1 2 3) x y) mean? W

Re: A question about test-is

2008-11-03 Thread Stuart Sierra
On Nov 2, 11:20 pm, Chanwoo Yoo <[EMAIL PROTECTED]> wrote: > When I evaluate (run-tests) in a repl of my terminal, I can see test > messages. But when I do it in slime, I can't see any messages. How I > can see test results in slime? Hmm, not sure. I don't use SLIME, but I know that run-tests pr

Re: Macro-Defining Macros

2008-11-03 Thread Chouser
On Mon, Nov 3, 2008 at 9:13 AM, Chanwoo Yoo <[EMAIL PROTECTED]> wrote: > > Below code is copied from 'On Lisp'. I just changed , to ~. But this > code does not work in Clojure. > > (defmacro abbrev [short long] > `(defmacro ~short [& args] > `(~'~long [EMAIL PROTECTED]))) > > Is there any imp

Macro-Defining Macros

2008-11-03 Thread Chanwoo Yoo
Today, when I was writing some code, which is a macro writing a macro, I felt strange that it never work.. So I decided to examine existing code from 'On Lisp' Below code is copied from 'On Lisp'. I just changed , to ~. But this code does not work in Clojure. (defmacro abbrev [short long] `(def

Re: Concerned about Clojure's license choice.

2008-11-03 Thread J . Pablo Fernández
One thing that might be doable and acceptable is dual licensing. If Clojure is realsed as CPL *and* GPL, it can be combined with GPL programs and it is not in any way more free than the CPL (say, like if you add BSD in the bag). In that way you can keep GPLists happy and still use CPL. On Nov 1,

Re: Processing wrapper

2008-11-03 Thread fyuryu
Thanks, fixed. -- Roland On Nov 2, 4:49 am, cranebird <[EMAIL PROTECTED]> wrote: > Hi, > > Thank you for your good wrapper for processing. I think it makes > simplify to use PApplet class in clojure. > I found 'stroke-weight in processing.clj may be wrong - I think it > should call strokeWeight

Re: [EMAIL PROTECTED]

2008-11-03 Thread Rich Hickey
On Nov 2, 11:35 pm, David Hilton <[EMAIL PROTECTED]> wrote: > On Oct 22, 5:15 am, Krukow <[EMAIL PROTECTED]> wrote: > > > Rich, > > > Was this presentation recorded? Any chance you can upload the slides > > and/or video for those of us that didn't participate in Lisp50. > > > Thanks > > - Karl >

Re: Concerned about Clojure's license choice.

2008-11-03 Thread [EMAIL PROTECTED]
On Nov 3, 7:33 am, "Christian Vest Hansen" <[EMAIL PROTECTED]> wrote: > On Mon, Nov 3, 2008 at 2:11 AM, Rich Hickey <[EMAIL PROTECTED]> wrote: > > MIT and BSD are not reciprocal licenses. I want a reciprocal license. > > What does it mean that a license is reciprocal? > I think in this case it mea

Re: [EMAIL PROTECTED]

2008-11-03 Thread David Hilton
On Oct 22, 5:15 am, Krukow <[EMAIL PROTECTED]> wrote: > Rich, > > Was this presentation recorded? Any chance you can upload the slides > and/or video for those of us that didn't participate in Lisp50. > > Thanks > - Karl I'd also be interested in seeing the Lisp50 presentation (I missed it becaus

Re: Concerned about Clojure's license choice.

2008-11-03 Thread mritun
Hi Chris What said problem would moving to GPL solve ? Shouldn't we hear atleast a couple of benefits that may be derived from moving to GPL ? Are there (GPL) projects that clojure would benefit from incorporating directly into the base language compiler and/or libraries ? What are they ? Are the