As a casual user of scheme and reader of the related newsgroups, I've noticed that there's always so much debate, confusion, and critiques of the scheme macro system.
Is there something fundamentally broken with Scheme macros? Are they badly designed? Or is all this discussion simply due to confusion?
Why the constant debate?
If the macro system is badly designed, are there any serious attempts to improve it? Or is it cast in stone forever more due to appearing in the R5RS? I've seen one alternative, syntax-case, but is it a serious alternative for the standard, or is it just a slightly better version of syntax rules?
Finally, is there a Scehme macros FAQ? I must admit I'm quite confused by all this debate.
> > Is there something fundamentally broken with Scheme macros?
> Please do not cross post to comp.lang.lisp.
And why exactly not? Lispers are strong users of macros and may have some good experience on the design and use of macro systems. Its not like the question was crossposted to a C++ or Java newsgroup.
Years of bitter experience indicate that no good comes of these discussions. Look at google.
c.l.l seems to be reverting to type alas - we have our first genuine semi-literate but arrogant halfwit in ages (ilias), and now we are about to have a c.l.l / c.l.s flame war.
I for one do not despair over the arrival of ilias on our shore, for he has many redeeming qualties. He loves Lisp (or at least professes it). He does not go back-and-forth ad nauseum over a personal dispute. His articles are mostly technical. Best of all, his articles are short.
As for his refusal to learn, well, that is a self-limiting quality. One by one all who would offer guidance discover the futility of the effort and thereafter lurk him for amusement value.
> Years of bitter experience indicate that no good comes of these > discussions. Look at google.
> c.l.l seems to be reverting to type alas - we have our first genuine > semi-literate but arrogant halfwit in ages (ilias), and now we are > about to have a c.l.l / c.l.s flame war.
b...@swirve.com (Adrian B.) writes: > As a casual user of scheme and reader of the related newsgroups, I've > noticed that there's always so much debate, confusion, and critiques > of the scheme macro system.
> Is there something fundamentally broken with Scheme macros? Are they > badly designed? Or is all this discussion simply due to confusion?
> Why the constant debate?
> If the macro system is badly designed, are there any serious attempts > to improve it? Or is it cast in stone forever more due to appearing > in the R5RS? I've seen one alternative, syntax-case, but is it a > serious alternative for the standard, or is it just a slightly better > version of syntax rules?
There is no real debate. Scheme needs the macro system it has because it is useful and because of the conflating of "variable" and "function" namespaces. Not having a macro systme would impair Scheme usefulness.
Another matter is the pointless debate about the "superiority" of Scheme "pattern directed" macro system over the "structure handling" macro system of Common Lisp. Even in this case the chase can be cut short in many ways. It is simply a non problem.
Cheers
-- Marco Antoniotti ======================================================== NYU Courant Bioinformatics Group tel. +1 - 212 - 998 3488 715 Broadway 10th Floor fax +1 - 212 - 995 4122 New York, NY 10003, USA http://bioinformatics.cat.nyu.edu "Hello New York! We'll do what we can!" Bill Murray in `Ghostbusters'.
Kenny Tilton <ktil...@nyc.rr.com> writes: > But what is the sound of one Ilias corresponding?
people are attached to their own learning model and sometimes can't make light of others', but all crystalographers know the value of refraction and internal reflection. like all gems, lisp is amenable to such methods. lisp experts can drink diamonds and thus sometimes forget its liquid properties are due to their expertise and practice, which is applicable mostly on a personal basis.
i'm glad ilias did not post a 2-line sed (or other text transform) script!
b...@swirve.com (Adrian B.) wrote in message <news:7ed8f64d.0209020319.1d5fb809@posting.google.com>... > And why exactly not? Lispers are strong users of macros and may have > some good experience on the design and use of macro systems. Its not > like the question was crossposted to a C++ or Java newsgroup.
I agree that it's interesting to discuss differences in macros in different languages. It seems easy enough for those who aren't interested to just skip this whole thread. Especially with such an easily plonkable thread name that won't even cause any hesitation.
As an example to compare Common Lisp macros with Scheme macros, consider a macro named DO-COMBINATIONS, which works as follows:
The above three examples show three ways to use the example DO-COMBINATIONS macro.
I don't actually know Scheme, but would like to see the implementation of the above DO-COMBINATIONS macro in it. Then I or someone could post a CL version of it to compare. Maybe several people could post more than one way to implement it, to compare different ways in each language. Then we could do the same thing for other kinds of macros. Etc., till we get a better idea of the differences.
>>But what is the sound of one Ilias corresponding?
> people are attached to their own learning model and sometimes can't make light > of others', but all crystalographers know the value of refraction and internal > reflection. like all gems, lisp is amenable to such methods. lisp experts > can drink diamonds and thus sometimes forget its liquid properties are due to > their expertise and practice, which is applicable mostly on a personal basis.
> i'm glad ilias did not post a 2-line sed (or other text transform) script!
can someone please be so kindly to transform this to simple English?
(i'm just assimilating the LISP-reader, and i'm unable to switch context. but i'd like to know.)
cubicle...@mailandnews.com (Software Scavenger) wrote in message <news:a6789134.0209021413.9956022@posting.google.com>... > As an example to compare Common Lisp macros with Scheme macros, > consider a macro named DO-COMBINATIONS, which works as follows:
> (do-combinations (x1 x2 x3) '(1 2 3 4 5) > (print (list x1 x2 x3))) > I don't actually know Scheme, but would like to see the implementation > of the above DO-COMBINATIONS macro in it.
; The do-combinations macro ; (do-combinations (x1 x2 x3) (1 2 3 4 5) ; (print (list x1 x2 x3))) ; will print all combinations of three elements out of (1 2 3 4 5)
; create a list of all subsets from 'elements' of length 'how-many' ; The resulting list will have the size of ; (choose how-many (length elements)) ; Recurrence relation: ; (subsets how-many (cons el elems)) = ; (append (subsets how-many elems) ; (map add-el (subsets (-- how-many) elems))) ; (subsets 0 elems) = '() ; (subsets 1 elems) = (map list elems) ; singleton subsets ; (subsets n elems) = '() whenever n > (length elems) ; ; The code is optimized for clarity rather than for speed ; See the thread ; http://groups.google.com/groups?threadm=7eb8ac3e.0201120056.3fc231c8%... ; for the fastest implementation of this function.
cubicle...@mailandnews.com (Software Scavenger) writes: > b...@swirve.com (Adrian B.) wrote:
> > And why exactly not? Lispers are strong users of macros and may have > > some good experience on the design and use of macro systems. > I agree that it's interesting to discuss differences in macros in > different languages.
There are certainly some readers of comp.lang.lisp who are interested in comparing scheme and cl macros, but those people should all be reading comp.lang.scheme as well. Scheme is not a recent offshoot of lisp. Lisp followers have had plenty of time to consider whether or not they are interested in the directions scheme has taken, and those who are interested should look in comp.lang.scheme.
> As an example to compare Common Lisp macros with Scheme macros, > consider a macro named DO-COMBINATIONS, which works as follows: > (do-combinations (a b) > '(heart spade diamond club) > (print (list a b))) > ===> > (HEART SPADE) > (HEART DIAMOND) > (HEART CLUB) > (SPADE DIAMOND) > (SPADE CLUB) > (DIAMOND CLUB) > I don't actually know Scheme, but would like to see the implementation > of the above DO-COMBINATIONS macro in it.
That example happens to be well-suited to syntax-rules, scheme's pattern language for macros:
> > > And why exactly not? Lispers are strong users of macros and may have > > > some good experience on the design and use of macro systems.
> > I agree that it's interesting to discuss differences in macros in > > different languages.
> There are certainly some readers of comp.lang.lisp who are interested > in comparing scheme and cl macros, but those people should all be > reading comp.lang.scheme as well. Scheme is not a recent offshoot of > lisp. Lisp followers have had plenty of time to consider whether or > not they are interested in the directions scheme has taken, and those > who are interested should look in comp.lang.scheme.
New directions in Scheme? Like "let's re-implement the CLHS"?
Sorry, I am a sucker. I cannot resist these flame baits :)
Fell frce to send replies to /dev/null :)
Cheers
-- Marco Antoniotti ======================================================== NYU Courant Bioinformatics Group tel. +1 - 212 - 998 3488 715 Broadway 10th Floor fax +1 - 212 - 995 4122 New York, NY 10003, USA http://bioinformatics.cat.nyu.edu "Hello New York! We'll do what we can!" Bill Murray in `Ghostbusters'.
> > > Is there something fundamentally broken with Scheme macros?
> > Please do not cross post to comp.lang.lisp.
> And why exactly not? Lispers are strong users of macros and may have > some good experience on the design and use of macro systems. Its not > like the question was crossposted to a C++ or Java newsgroup.
Actually it's exactly as if the question was crossposted to a C++ or Java newsgroup.
The world rejoiced as "Perry E. Metzger" <pe...@piermont.com> wrote:
> Feuer <fe...@his.com> writes: >> > In fact, it is not an offshoot at all. It is a lisp. May I >> > assume that you are in the "c.l.l is for CL only" brigade?
>> Is it really a Lisp? Does it really retain anything significant from >> Lisp other than parentheses and call-by-value semantics?
> It is hard to see why scheme would not be considered a lisp but emacs > lisp or interlisp or the lisp in the sawfish window manager or > whatever would not be. It is certainly not even an unusual dialect -- > lisp 1 also had the unified function/variable namespace, the lexical > scoping is now the norm rather than unusual, etc. What makes scheme > the least bit unlispy, in fact?
The fact that such questions lead to flame wars and division, along quite clearly discernable lines that form on both sides.
There may be things worth discussing about the comparative similarities and differences between Common Lisp and Scheme; there might conceivably be some new things worth discussing, even concerning the respective macro systems.
Unfortunately, past history shows that such discussions generally lead to flames and acrimony.
The only way that you should _consider_ such a discussion is if you are: a) Well aware of the possibilities for flames, and b) Really quite sure, based on reviewing past discussions, that you aren't merely rehashing ancient history.
The fact that you aren't aware of the flameworthiness of the discussion suggests that it is _highly_ unlikely that you have reviewed past discussions, and that there is little reason to expect the discussion to lead anywhere constructive. -- (reverse (concatenate 'string "moc.enworbbc@" "enworbbc")) http://www.ntlug.org/~cbbrowne/multiplexor.html Signs of a Klingon Programmer - 2. "Specifications are for the weak and timid!"
Christopher Browne <cbbro...@acm.org> writes: > > It is hard to see why scheme would not be considered a lisp but emacs > > lisp or interlisp or the lisp in the sawfish window manager or > > whatever would not be. It is certainly not even an unusual dialect -- > > lisp 1 also had the unified function/variable namespace, the lexical > > scoping is now the norm rather than unusual, etc. What makes scheme > > the least bit unlispy, in fact?
> The fact that such questions lead to flame wars and division, along > quite clearly discernable lines that form on both sides.
I find something interesting about both comp.lang.lisp and comp.lang.scheme. In other language newsgroups, like the the ruby group or what have you, people spend most of their time asking questions about how to solve particular problems they're having with their production code using the language or what have you. This tends to indicate the people involved are largely interested in programming languages as a way of accomplishing their work. In the c.l.l and c.l.s, however, we have groups of people who are concerned largely about linguistic metaissues, that is, about their language as a religion.
It would appear that, in their ability to confine themselves almost entirely at the religious layer of the stack, the two communities are obviously made up of people of nearly the same mentality. Whether this is a productive mentality or not remains to be seen, but clearly if we are to ask a question someone else mentioned today and ask if both Common Lisp and the Scheme communities share an outlook, there is no question that they do.
Perhaps to insiders there is a tremendous difference in world view between the two groups, but to outsiders it looks ever so much like two groups of Christians a few hundred years ago persecuting each other over doctrinal minutia utterly unimportant to the overall picture.
> The fact that you aren't aware of the flameworthiness of the > discussion suggests that it is _highly_ unlikely that you have > reviewed past discussions, and that there is little reason to expect > the discussion to lead anywhere constructive.
Perhaps we could have a new discussion about why it is that people think that religion is more interesting than writing programs.
-- Perry E. Metzger pe...@piermont.com -- "Ask not what your country can force other people to do for you..."
* "Perry E. Metzger" <pe...@piermont.com> | Perhaps we could have a new discussion about why it is that people | think that religion is more interesting than writing programs.
Perhaps people who use Common Lisp and Scheme are already adept at writing programs and no longer have the pathetic little problems that so plague the newer languages and are interested in politics (not religion) just as people who think there is a better way to make a living than wonder how to get a job serving burgers get into law and politics and diplomacy and standards. That you have no better grasp of the higher levels of society than to call it "religion" unfortunately speaks volumes about your own outlook on that which transcends petty problems expressing simple algorithms in languages younger than their practitioners' computers.
-- Erik Naggum, Oslo, Norway
Act from reason, and failure makes you rethink and study harder. Act from faith, and failure makes you blame someone and push harder.
Erik Naggum wrote: > Perhaps people who use Common Lisp and Scheme are already adept at writing > programs and no longer have the pathetic little problems that so plague the > newer languages and are interested in politics (not religion) just as people > who think there is a better way to make a living than wonder how to get a > job serving burgers get into law and politics and diplomacy and standards.
Umm... That is an interesting view. I would rather say that people who think there is a better way to make a living then wonder how to get a job serving burgers get into LAW and POLITICS and DIPLOMACY ... are people who are not interested in working at all.
As for politics not being religion ... I was "fortunate" enough to have been born in a communist run country, and know very well that communism (probably most of the other "politics" as well) is very much a religion at its best -- cause if you speak up; they will burn you!
Perry E. Metzger wrote: > Perhaps we could have a new discussion about why it is that people > think that religion is more interesting than writing programs.
So then, people or books[1]?
:)w
[1] ...and where do you sit on the call/cc debate?
> I find something interesting about both comp.lang.lisp and > comp.lang.scheme. In other language newsgroups, like the the ruby > group or what have you, people spend most of their time asking > questions about how to solve particular problems they're having with > their production code using the language or what have you. This tends > to indicate the people involved are largely interested in programming > languages as a way of accomplishing their work. In the c.l.l and > c.l.s, however, we have groups of people who are concerned largely > about linguistic metaissues, that is, about their language as a > religion.
Your comparisons are not fair, for the following reasons.
(1) Programming languages like Ruby are deliberately restricted to a particular programming paradigm, in that case object-oriented programming. If you are willing to restrict yourself to a particular language you have already made several choices, consciously or subconsciously, and when you discuss things with your peers you won't get into these kinds of discusssions because you already agree on some fundamentals.
Lisp is different in this respect because it has a long history of experimenting with several programming paradigms. Of course you will get discussions about language features, sometimes heated discussions, if that's your topic of interest. No surprises there.
(2) Common Lisp and Scheme reveal different design decisions. This is most likely because their designers had different goals, sometimes fundamentally different goals. Sometimes people forget that design issues are never decided upon in a vacuum, but always with certain concrete and/or abstract goals in mind. More often than not they are based on hidden assumptions and discussions get heated because the participators are not aware of their own respective assumptions.
Now assume you had a newsgroup where people of different object-oriented programming languages would meet. Soon you would get similar heated discussions. See http://c2.com/cgi/wiki?LanguagePissingMatch for some examples.
(3) comp.lang.lisp is about several Lisp dialects. Imagine a kind of comp.lang.commonlisp - I assume that in such a newsgroup the outcome would be different. What I want to say here is that comp.lang.lisp is not about _one_ language but about a family of languages. Again, it's not surprising that you get discussions about the differences between the several dialects.
These newsgroups just play in a different league.
Pascal
-- Pascal Costanza University of Bonn mailto:costa...@web.de Institute of Computer Science III http://www.pascalcostanza.de Römerstr. 164, D-53117 Bonn (Germany)
Perry E. Metzger wrote: > I find something interesting about both comp.lang.lisp and > comp.lang.scheme. In other language newsgroups, like the the ruby > group or what have you, people spend most of their time asking > questions about how to solve particular problems they're having with > their production code using the language or what have you. This tends > to indicate the people involved are largely interested in programming > languages as a way of accomplishing their work. In the c.l.l and > c.l.s, however, we have groups of people who are concerned largely > about linguistic metaissues...
The same faulty conclusion could be drawn from observing the traffic in comp.instrument.guitar.rock and c.i.g.classical.
* Hrvoje Blazevic | Umm... That is an interesting view. I would rather say that people who think | there is a better way to make a living then wonder how to get a job serving | burgers get into LAW and POLITICS and DIPLOMACY ... are people who are not | interested in working at all.
What was the significance of the "then" that replaced my "than"? Presuming it has meaning, I am unable to understand what you mean fully. I also wonder what kind of misguided notions "work" that make up the substance of your opinion. May I offer a counter-view that muscle-time is irrelevant and the only measure of the amount of work involved is the brain-time needed.
| As for politics not being religion ... I was "fortunate" enough to have been | born in a communist run country, and know very well that communism (probably | most of the other "politics" as well) is very much a religion at its best -- | cause if you speak up; they will burn you!
It is religion that has elements of politics, not the other way around.
-- Erik Naggum, Oslo, Norway
Act from reason, and failure makes you rethink and study harder. Act from faith, and failure makes you blame someone and push harder.
Erik Naggum <e...@naggum.no> writes: > * "Perry E. Metzger" <pe...@piermont.com> > | Perhaps we could have a new discussion about why it is that people > | think that religion is more interesting than writing programs.
> Perhaps people who use Common Lisp and Scheme are already adept at > writing programs and no longer have the pathetic little problems > that so plague the newer languages
Perhaps, but I doubt it. I've been writing software in a variety of languages for... well, I don't want to think about it but I started on PDP-8s a long time ago. I still learn new things all the time. Hell, I even learn whole new paradigms.
What I've noticed in a lot of people in this community (and it really is just one community) is a lot of arrogance. Being a very arrogant person at times, I can perhaps recognize the symptom a bit better than most. I have often made the mistake of thinking I knew more than I really did, but I've been working pretty hard on keeping my mind open instead, and it often brings results.
> and are interested in politics (not religion) just as people > who think there is a better way to make a living than wonder how to get a > job serving burgers get into law and politics and diplomacy and standards.
I don't know about that. I'd expect that if the community was truly vibrant we'd be seeing things like equivalents to CPAN and such. It is not disgraceful to say "I'm writing an application that needs to interface with database X, anyone have a binding written already" or what have you. Perhaps the Lisp community is beyond actually having to use its language day to day but I doubt that.
> That you have no better grasp of the higher levels of society than to call > it "religion" unfortunately speaks volumes about your own outlook on that > which transcends petty problems expressing simple algorithms in languages > younger than their practitioners' computers.
I've been programming long enough to know that when you're more concerned about what the right comment character is than about writing good comments you're not on the level of the important any longer. I also know that the nuts and bolts of getting work done is the petty problem of expressing algorithms for execution by machine, not the discussion of whether the guys who use language-flavor Y are apostates who must be banned from the church.
Software, unlike theoretical mathematics, is largely about accomplishing things. That leads people to unfortunate mundane concerns like finding a module that builds web pages for you or finding a module that interfaces to Oracle or finding a module that does statistical analysis for you. When a language's devotees no longer discuss such pragmatic matters and instead spend all their energy on religion, it implies they are not writing code.
-- Perry E. Metzger pe...@piermont.com -- "Ask not what your country can force other people to do for you..."
Erik Naggum wrote: > What was the significance of the "then" that replaced my "than"? Presuming > it has meaning, I am unable to understand what you mean fully.
Just a typo!
> I also > wonder what kind of misguided notions "work" that make up the substance of > your opinion. May I offer a counter-view that muscle-time is irrelevant and > the only measure of the amount of work involved is the brain-time needed.
I also wonder what led you to believe that I would value selling burgers more than the brain-time. Is it because you believe that it is only lawyers, politicians and diplomats that do use brain-power?
* Hrvoje Blazevic | I also wonder what led you to believe that I would value selling burgers | more than the brain-time. Is it because you believe that it is only lawyers, | politicians and diplomats that do use brain-power?
No. I consider this "discussion" to have ended some time ago.
-- Erik Naggum, Oslo, Norway
Act from reason, and failure makes you rethink and study harder. Act from faith, and failure makes you blame someone and push harder.
> I've been programming long enough to know that when you're more > concerned about what the right comment character is than about writing > good comments you're not on the level of the important any longer. I > also know that the nuts and bolts of getting work done is the petty > problem of expressing algorithms for execution by machine, not the > discussion of whether the guys who use language-flavor Y are apostates > who must be banned from the church.
I think the point is that an important goal for Scheme is to do it right, dammit, or not at all. This would be horrible if Scheme were the only choice, but it's not. Since there are a jillion decent programming languages with the attitude "who cares what the comment character is", what's wrong with there being *one* that wants to get it right, dammit.