Re: A difficult Metaphor for Macros (especially for Java people)

2010-09-10 Thread Adam Burry
On Sep 9, 5:06 pm, alux alu...@googlemail.com wrote: But, @Luc pushing the advantage of Lisp macros to the forefront is not obvious if the audience cannot compare with another (good/simple) implementation they understand well. Thats why I want to use a nifty metaphor ;-) Even your dumbest

Re: A difficult Metaphor for Macros (especially for Java people)

2010-09-10 Thread lprefontaine
Adam Burry abu...@gmail.com wrote .. On Sep 9, 5:06 pm, alux alu...@googlemail.com wrote: But, @Luc pushing the advantage of Lisp macros to the forefront is not obvious if the audience cannot compare with another (good/simple) implementation they understand well. Thats why I want to

Re: A difficult Metaphor for Macros (especially for Java people)

2010-09-10 Thread Adam Burry
On Sep 10, 1:10 pm, lprefonta...@softaddicts.ca wrote: Adam Burry abu...@gmail.com wrote .. On Sep 9, 5:06 pm, alux alu...@googlemail.com wrote: But, @Luc pushing the advantage of Lisp macros to the forefront is not obvious if the audience cannot compare with another (good/simple)

Re: A difficult Metaphor for Macros (especially for Java people)

2010-09-09 Thread Sean Corfield
On Wed, Sep 8, 2010 at 7:28 AM, CuppoJava patrickli_2...@hotmail.com wrote: I found the easiest way to introduce macros is just to introduce them as small syntactic sugaring. For example, getting rid of the explicit (fn [] ...) for macros like (with-open file ...). Interesting. I don't see any

Re: A difficult Metaphor for Macros (especially for Java people)

2010-09-09 Thread Laurent PETIT
Hello, 2010/9/9 Sean Corfield seancorfi...@gmail.com: On Wed, Sep 8, 2010 at 7:28 AM, CuppoJava patrickli_2...@hotmail.com wrote: I found the easiest way to introduce macros is just to introduce them as small syntactic sugaring. For example, getting rid of the explicit (fn [] ...) for macros

Re: A difficult Metaphor for Macros (especially for Java people)

2010-09-09 Thread Alessio Stalla
On Sep 8, 5:41 pm, lprefonta...@softaddicts.ca wrote: Writing tons of XML lines to control behavior of frameworks was also a turn off. We use Spring to create low-level Java beans but the XML describing these beans did not change much over time. That is acceptable. I think Lisp is very well

Re: A difficult Metaphor for Macros (especially for Java people)

2010-09-09 Thread Andrew Gwozdziewycz
On Thu, Sep 9, 2010 at 3:48 AM, Laurent PETIT laurent.pe...@gmail.com wrote: Hello, 2010/9/9 Sean Corfield seancorfi...@gmail.com: On Wed, Sep 8, 2010 at 7:28 AM, CuppoJava patrickli_2...@hotmail.com wrote: I found the easiest way to introduce macros is just to introduce them as small

Re: A difficult Metaphor for Macros (especially for Java people)

2010-09-09 Thread Laurent PETIT
2010/9/9 Andrew Gwozdziewycz apg...@gmail.com: On Thu, Sep 9, 2010 at 3:48 AM, Laurent PETIT laurent.pe...@gmail.com wrote: Hello, 2010/9/9 Sean Corfield seancorfi...@gmail.com: On Wed, Sep 8, 2010 at 7:28 AM, CuppoJava patrickli_2...@hotmail.com wrote: I found the easiest way to introduce

Re: A difficult Metaphor for Macros (especially for Java people)

2010-09-09 Thread ajuc
On 9 Wrz, 14:25, Andrew Gwozdziewycz apg...@gmail.com wrote: The fact that Lisp macros actually operate on the AST means that Lisp macros can make *changes* to the AST (insert things, remove things, rearrange things), and *not* just substitute FOO for BAR. This is a hell of a lot more

Re: A difficult Metaphor for Macros (especially for Java people)

2010-09-09 Thread Mike Meyer
On Thu, 9 Sep 2010 07:04:00 -0700 (PDT) ajuc aju...@gmail.com wrote: [In C] you can't output different code in macro depending on the structure of its arguments That, of course, is a *crucial* difference. Think about the same restriction outside the macro environment: what would programming be

Re: A difficult Metaphor for Macros (especially for Java people)

2010-09-09 Thread Andrew Gwozdziewycz
On Thu, Sep 9, 2010 at 10:04 AM, ajuc aju...@gmail.com wrote: On 9 Wrz, 14:25, Andrew Gwozdziewycz apg...@gmail.com wrote: The fact that Lisp macros actually operate on the AST means that Lisp macros can make *changes* to the AST (insert things, remove things, rearrange things), and *not*

Re: A difficult Metaphor for Macros (especially for Java people)

2010-09-09 Thread alux
Interesting discussion! I think about taking some of the topics into separate threads. Will see, I'm a bit under project pressure. Wont tell you the language ;( But, @Luc pushing the advantage of Lisp macros to the forefront is not obvious if the audience cannot compare with another

Re: A difficult Metaphor for Macros (especially for Java people)

2010-09-09 Thread lprefontaine
alux alu...@googlemail.com wrote .. Interesting discussion! I think about taking some of the topics into separate threads. Will see, I'm a bit under project pressure. Wont tell you the language ;( But, @Luc pushing the advantage of Lisp macros to the forefront is not obvious if the

A difficult Metaphor for Macros (especially for Java people)

2010-09-08 Thread alux
Hello, I still try to read my way through Paul Grahams On Lisp, and always think how to motivate this stuff to my fellow Java people. How do I describe what it is all about in this Code is Data, and Macros let you grow your own language towards the problem stuff? [Why? Well, maybe I read to much

Re: A difficult Metaphor for Macros (especially for Java people)

2010-09-08 Thread Joop Kiefte
Actually, this metaphor has been used before. Check http://www.defmacro.org/ramblings/lisp.html for an other version of your story ;). 2010/9/8 alux alu...@googlemail.com: Hello, I still try to read my way through Paul Grahams On Lisp, and always think how to motivate this stuff to my fellow

Re: A difficult Metaphor for Macros (especially for Java people)

2010-09-08 Thread alux
Hello Joop, thanks for the link. So it seems not to be completely misled ;-) Greetings, alux On 8 Sep., 11:59, Joop Kiefte iko...@gmail.com wrote: Actually, this metaphor has been used before. Checkhttp://www.defmacro.org/ramblings/lisp.htmlfor an other version of your story ;). 2010/9/8

Re: A difficult Metaphor for Macros (especially for Java people)

2010-09-08 Thread CuppoJava
I found the easiest way to introduce macros is just to introduce them as small syntactic sugaring. For example, getting rid of the explicit (fn [] ...) for macros like (with-open file ...). Once people get accustomed to this, they naturally extend it to more and more complicated usages. -Patrick

Re: A difficult Metaphor for Macros (especially for Java people)

2010-09-08 Thread alux
Hi Patrick, yes, I think thats the right way to teach this stuff. My problem arises earlier - I still have to motivate my collegues, to get them interested, and, maybe, teach them later ;-) Regards, alux On 8 Sep., 16:28, CuppoJava patrickli_2...@hotmail.com wrote: I found the easiest way to

Re: A difficult Metaphor for Macros (especially for Java people)

2010-09-08 Thread CuppoJava
Ah I see. Yes, motivation is hard. I don't have any good tips for that. I remember when I was trying to learn Lisp. Even though I desperately *wanted* to like Lisp, it still took a few tries before I started to appreciate it. Good luck! -Patrick On Sep 8, 11:07 am, alux alu...@googlemail.com

Re: A difficult Metaphor for Macros (especially for Java people)

2010-09-08 Thread Meikel Brandmeyer
Hi, On 8 Sep., 17:07, alux alu...@googlemail.com wrote: yes, I think thats the right way to teach this stuff. My problem arises earlier - I still have to motivate my collegues, to get them interested, and, maybe, teach them later ;-) Then I wouldn't stress macros at all. Just mention them

Re: A difficult Metaphor for Macros (especially for Java people)

2010-09-08 Thread alux
Hello Meikel, I agree with all the points you suggest to mention, and I do so. Nevertheless I will get (and got, so this is not hypothetic) the question: But why do they use this intolerable strange syntax? Why cant this be in a usual (C-like) syntax? And here (thats my state of understanding)

Re: A difficult Metaphor for Macros (especially for Java people)

2010-09-08 Thread lprefontaine
Hi, My main motivation to get away from Java as much as possible was the code size. I was tired of having to write tons of code lines for what I considered mundane things. Using wizards was not satisfactory to me. The generated code size is significant and still it has to be maintained either by

Re: A difficult Metaphor for Macros (especially for Java people)

2010-09-08 Thread Alan
This was actually the article that finally got me to overcome the inertia and start exploring lisp, as a long-time native Java speaker. I gave up again in a few weeks, but the possibilities excited me, and when I found Clojure I was delighted with the number of things that were better than lisp,

Re: A difficult Metaphor for Macros (especially for Java people)

2010-09-08 Thread alux
Hello Luc, what you say is of course completely true. Nevertheless it seems true for Scala too. And now I come with a new language again. The curious people in my team (well, or its the one with enough spare time :) already had some look into Scala, and I think I need additional arguments make

Re: A difficult Metaphor for Macros (especially for Java people)

2010-09-08 Thread lprefontaine
alux alu...@googlemail.com wrote .. Hello Luc, what you say is of course completely true. Nevertheless it seems true for Scala too. And now I come with a new language again. The curious people in my team (well, or its the one with enough spare time :) already had some look into Scala, and I

Re: A difficult Metaphor for Macros (especially for Java people)

2010-09-08 Thread Mike Meyer
On Wed, 08 Sep 2010 15:13:57 -0400 (EDT) lprefonta...@softaddicts.ca wrote: I cannot help you much here. I looked at Scala nearly two years ago while searching for a JVM alternative to Java. I already knew Lisp and wanted a generic macro facility but I was not convinced by Scala even before

Re: A difficult Metaphor for Macros (especially for Java people)

2010-09-08 Thread Adam Burry
Rich does a fine job of explaining macros here: http://channel9.msdn.com/shows/Going+Deep/Expert-to-Expert-Rich-Hickey-and-Brian-Beckman-Inside-Clojure See minutes 23 to 25. The macro concept is not complicated, it should not be hard to explain to someone. The benefits of code writing code should

Re: A difficult Metaphor for Macros (especially for Java people)

2010-09-08 Thread Michael Ossareh
On Wed, Sep 8, 2010 at 08:17, CuppoJava patrickli_2...@hotmail.com wrote: Ah I see. Yes, motivation is hard. I don't have any good tips for that. I'm still a noob at the evangelising part of Lisp! However, when it comes to clojure, I tell Java people it's a better way of writing Java than

Re: A difficult Metaphor for Macros (especially for Java people)

2010-09-08 Thread alux
Hello all, @Luc I'm not a OO adversary, but no evangelist too ;-) @Mike I think the difference between Scala and Clojure is not OO vs not OO, but rather static vs dynamic typing. Clojure is OO too, but as you see with Luc, you can ignore it ;-) @Adam Cool! A RH-video I want aware of! Thank you!