From: Joshua Taylor on
On 2010.04.22 5:27 AM, Nick Keighley wrote:
> I persevered. I think being more comfortable with recursion has been a
> help. Though scheme's named-let doesn't really look like recursion...

I spent time with CL before Scheme, and I've always found that
named-lets seemed like a nice abbreviation for CL's LABELS, and it so it
did have the nice recursive feel to it. Since CL doesn't guarantee
tail-call optimization I end up writing an iterative version in CL.
I've found that writing the named-let or LABELS version first can help:
the DO-loop usually just falls right out of the named-let version. //JT
From: Raffael Cavallaro on
On 2010-04-21 13:08:20 -0400, Tim Bradshaw said:

> On 2010-04-21 17:59:34 +0100, Pillsy said:
>
>> I think there's an engineering trade-off between ease of
>> metaprogramming and provision of syntactic sugar.
>
> I think that's a good summary.

I think it should be qualified:

there's an engineering trade-off between ease of metaprogramming and
provision of built-in syntactic sugar.

I think the problem lisp faces with its parenthesized syntax is that
one needs to become fairly advanced at the language before one can
start *adding* the syntactic sugar one wants. As a result, newcomers
think they'll be doing the equivalent of manual inlining of dozens of
sets of parentheses forever if they use lisp.

The language needs to be sold macros-first if it is to have any chance
of convincing newcomers that fully parenthesized syntax is a good
thing. That means intro texts should start with examples of extremely
short, macro based code in lisp, the equivalent very long
c/c++/java/python/ruby, etc. version, and the fully macroexpanded lisp,
compared side by side.
--
Raffael Cavallaro

From: His kennyness on
Pillsy wrote:
> On Apr 21, 10:51 am, Tamas K Papp <tkp...(a)gmail.com> wrote:
>> On Wed, 21 Apr 2010 07:04:14 -0700, Pillsy wrote:
> [...]
>>> I'm increasingly convinced that parentheses are the fundamental reason
>>> that Lisp isn't a lot more popular than it is.
>
>> That's like saying that the requirement to engage in abstract thinking
>> is the fundamental reason that makes (serious) mathematics unpopular.
>> Maybe.
>
> I don't think this is a good analogy. Programming languages provide
> specialized notations, and Lisp, by specializing its notation to make
> metaprogramming convenient, forgoes some other possibilities that make
> doing other things particularly convenient.
>
>> But there is nothing you can do about it: you can't make it "easier"
>> without making it uninteresting.
>
> I think there's an engineering trade-off between ease of
> metaprogramming and provision of syntactic sugar. A smallish number of
> languages and users gravitate towards the Lisp end of the spectrum and
> a much larger group of languages users gravitate towards the
> everything-else end of the spectrum, and there's virtually nothing in
> the middle. There are only a few attempts, and if you only have a few
> attempts, the whole class of languages is a lot more likely to get
> wiped out for unrelated economic reasons (like Dylan) or unrelated
> technical blunders (like Mathematica).
> [...]
>> If someone invented a Lisp without parenthesis that is as powerful as
>> eg CL, we would be able to talk about whether the parens make Lisp
>> unpopular. Naturally, I am not holding my breath :-)
>
> I think this sells CL short, because it has a lot of things beyond
> parenthesized syntax that make it a worthwhile language. Any idiot can
> write a Lisp---writing toy Lisp interpreters is a common exercise in
> undergraduate CS classes---but writing a *decent* Lisp is much
> harder.
>
> Someone can break new and interesting ground in terms of allowing more
> syntax while enabling structured manipulation of source code, but that
> doesn't mean that they won't totally botch the rest of their language.
> The cool syntactical possibilities are only going to go so far if your
> IO and error handling mechanisms are completely busted and your only
> implementation is a slow-like-molasses-on-Quaaludes interpreter.
>
>> Personally, I grew to like Lisp syntax.
>
> I did too. Actually, I discovered that I liked it almost immediately.
> OTOH, I find C-descended syntaxes to be very uncomfortable. Part of
> the reason I'm so convinced of the role that personal preference plays
> in this is that my own preferences seem to be so radically different
> from most other programmers.

What makes you think most other programmers would not have the same
result as yourself, viz. discover they like it almost immediately?

What I see is a conflation of opinion from a distance with actual
appreciation derived from experience. Talk about apples and orangutans!

kt
From: His kennyness on
Nick Keighley wrote:
> On 21 Apr, 05:47, Tamas K Papp <tkp...(a)gmail.com> wrote:
>> On Tue, 20 Apr 2010 20:43:14 -0700, G�nther Thomsen wrote:
>>> On Apr 19, 11:19 am, Tamas K Papp <tkp...(a)gmail.com> wrote: [..]
>
>
>>>> S-expressions (and macros) are
>>>> what makes Lisp powerful. With a C-like syntax, Lisp is not much more
>>>> powerful than a C-like language (with a few nice features thrown in, eg
>>>> Blub OO systems rarely ever come close to CLOS). The greatest help one
>>>> can give to newbies is help with learning CL as it is.
>
> I genuinely think the parentheses *are* a barrier. I was put off Lisp
> for years by the Lots of Irritating Silly Parentheses. (and then cam
> back to lisp-like languages because I kept reading what a great
> language it was and how it would change the way you thunk).


....and thennnnnnnnnn? What was your, um, parensification curve (short,
long, asymptopic?) and where did it end (their invisible? you hate them?)?


kt
From: roland.kaufmann on

>>>>> "Nick" == Nick Keighley <nick_keighley_nospam(a)hotmail.com> writes:

Nick> On 21 Apr, 05:47, Tamas K Papp <tkp...(a)gmail.com> wrote:
>> On Tue, 20 Apr 2010 20:43:14 -0700, G�nther Thomsen wrote:
>> > On Apr 19, 11:19�am, Tamas K Papp <tkp...(a)gmail.com> wrote: [..]

[snip]

>> Most books for Scheme I have seen seem to care little about the
>> language per se, and try to expand on a particular theme instead (eg
>> how to do everything using recursion, the joys of call/cc).

Nick> which book is that! "The Joy Of call/cc" is exactly what I've been
Nick> looking for (that and "So Which Bloody Macro Scheme Should I Use
Nick> Then?". Is there a "Hygenic Macros For Dummies"?)

The closest I came understanding call/cc was after reading Dorai Sitaram's
"Teach Yourself Scheme in Fixnum Days".
http://www.ccs.neu.edu/home/dorai/t-y-scheme/t-y-scheme.html

As for macros, you might find something useful at
http://library.readscheme.org/

hope this helps
Roland