From: Alan Crowe
Subject: Re: Two questions together
Date: 
Message-ID: <8664rt3clf.fsf@cawtech.freeserve.co.uk>
"Kubilay" <···········@gmail.com> writes:
> Question 1: How powerful are the macros? Lisp is supposed to be a
> "programmable language" and as far as I know this feature is provided
> by macros, right? 

There are macros and read-macros. Macros work with
s-expressions. Read-macros work with the characters in the
source file. So if you want to fiddle with the surface
syntax you need read-macros. I find it more interesting to
tinker with the semantics, which one does with macros. If
one does not also use read-macros ones code continues to
look like Lisp with lots of parentheses.

> I mean something like this:
> 
> In Lisp:   (setf x (+ 4 5))
> 
> In Lisp++:  x = 4 + 5 ;
> 

Well x = 4 + 5 strikes me as a translation of

(+ (if (= x 4) 1 0) 5)

I would render (setf x (+ 4 5))

as: 4 + 5 -> x
or: add 4 and 5 to x  
:-)

So long as you are stuck with C or Java, and have to use the
syntax that the base language provides, it is possible to
believe that syntax is very important. Then you study
Lisp. After a while, you realise that you are not stuck with
the syntax of the base language. You write a few read
macros. You notice that the argument to an ordinary macro
could be a string, so you can in principle do 

(insert-C "
foo (bar)
{
  int n;
  ...
}")

and call a C parser that you have written, to let you write
bits of your Lisp program in C syntax.

So you can no longer dodge the issue. Does syntax actually
matter? Is x = 4 + 5 better or worse than x := 4 + 5 or 
x <- 4 + 5 ?

John Harrop was banging on about 1.3 not being exact. I
wrote a read macro so that #1.3 gets read in as 13/10. I
didn't post it because it had a bug, and I didn't fix the
bug because I realised that I didn't care. I didn't believe
it was actually worth the effort.

I'm dodging round the issue of whether syntax matters
because I'm trying to think up an alternative to the GO
metaphor that is running through my head.

Getting the fine details of the syntax right, whether it
should be if(x==4) y=7; or whether it should be if(x=4) y:=7;
does matter, but it is like a hane and connection on the
first line. It is only worth 2 points. And it is gote. You
must save such plays for the end game. Play them too soon
and you will lose, even though they take profit.

I got a wonderful piece of advice from Tim Bradshaw. I was
fiddling with the syntax for Crowe's Bizarre Language and
Tim said:

    Leave the syntax for now. If you are not careful it will
    suck up all your time. Just use a fully parenthesised
    prefix notation for now, and sort out the semantics. You
    can come back to the syntax once the semantics is
    decided.

That was a real eye opener. I discovered that I was playing
with syntax as a way of hiding from the fact that I didn't
know very much about issues of programming language
semantics and didn't have much of a clue about what Crowe's
Bizarre Language should actually do that was different from
any other language. I was just wasting my time, and fiddling
with syntax, because it is so subjective, was creating the
illusion that my time wasting was productive.

Now I waste my time posting on Usenet instead :-)

Alan Crowe
Edinburgh
Scotland

From: jayessay
Subject: Re: Two questions together
Date: 
Message-ID: <m3k6g6ucfs.fsf@rigel.goldenthreadtech.com>
Alan Crowe <····@cawtech.freeserve.co.uk> writes:

> John Harrop was banging on about 1.3 not being exact. I

Jon Harrop.  Rolls eyes...


> I got a wonderful piece of advice from Tim Bradshaw. I was
> fiddling with the syntax for Crowe's Bizarre Language and
> Tim said:
> 
>     Leave the syntax for now. If you are not careful it will
>     suck up all your time. Just use a fully parenthesised
>     prefix notation for now, and sort out the semantics. You
>     can come back to the syntax once the semantics is
>     decided.
> 
> That was a real eye opener. I discovered that I was playing

Indeed.  I would say it is hard to overemphasize the importance of the
content of this remark.  It is s a _very_ big deal.

> with syntax as a way of hiding from the fact that I didn't
> know very much about issues of programming language
> semantics and didn't have much of a clue about what Crowe's
> Bizarre Language should actually do that was different from
> any other language. I was just wasting my time, and fiddling
> with syntax, because it is so subjective, was creating the
> illusion that my time wasting was productive.

However, you are now a major leg up on most programming language
"designers".


> Now I waste my time posting on Usenet instead :-)

Even so, it's most likely more productive, :-|


/Jon

-- 
'j' - a n t h o n y at romeo/charley/november com
From: Kenny Tilton
Subject: Re: Two questions together
Date: 
Message-ID: <dw96f.12290$h25.102@news-wrt-01.rdc-nyc.rr.com>
jayessay wrote:

> Alan Crowe <····@cawtech.freeserve.co.uk> writes:
> 
> 
>>John Harrop was banging on about 1.3 not being exact. I
> 
> 
> Jon Harrop.  Rolls eyes...
> 
> 
> 
>>I got a wonderful piece of advice from Tim Bradshaw. I was
>>fiddling with the syntax for Crowe's Bizarre Language and
>>Tim said:
>>
>>    Leave the syntax for now. If you are not careful it will
>>    suck up all your time. Just use a fully parenthesised
>>    prefix notation for now, and sort out the semantics. You
>>    can come back to the syntax once the semantics is
>>    decided.

Ha! That is what McCarthy thought! Look what happened, we are still 
stuck with all those parentheses fifty years later!! And don't get me 
started on prefix notation!

-- 
Kenny

Why Lisp? http://wiki.alu.org/RtL_Highlight_Film

"I've wrestled with reality for 35 years, Doctor, and I'm happy to state 
I finally won out over it."
     Elwood P. Dowd, "Harvey", 1950
From: GP lisper
Subject: Re: Two questions together
Date: 
Message-ID: <1130018656.bc473644d672f026e65085ace1325823@teranews>
On Fri, 21 Oct 2005 17:25:29 GMT, <·······@nyc.rr.com> wrote:
>
> Ha! That is what McCarthy thought! Look what happened, we are still 
> stuck with all those parentheses fifty years later!! And don't get me 
> started on prefix notation!

Prefix notation was one of the important features for me to switch to
lisp, genetic algorithm coding gets to skip a validation step with it.
Parentheses are cool, I never need to look up which type of braces go
with which object (e.g. perl).


-- 
If you don't like LOOP, how do you feel about DOLIST ?
From: Kenny Tilton
Subject: Re: Two questions together
Date: 
Message-ID: <tEE6f.22077$H3.10599@twister.nyc.rr.com>
GP lisper wrote:
> On Fri, 21 Oct 2005 17:25:29 GMT, <·······@nyc.rr.com> wrote:
> 
>>Ha! That is what McCarthy thought! Look what happened, we are still 
>>stuck with all those parentheses fifty years later!! And don't get me 
>>started on prefix notation!
> 
> 
> Prefix notation was one of the important features for me to switch to
> lisp, genetic algorithm coding gets to skip a validation step with it.
> Parentheses are cool, I never need to look up which type of braces go
> with which object (e.g. perl).

Yak, yak, yak! McCarthy never wanted sexprs to see the light of day, but 
everyone liked them so much he got stuck with them!* Don't let this 
happen to you!!

-- 
Kenny

* "Nobody goes there anymore, it's too crowded." Yogi Berra


Why Lisp? http://wiki.alu.org/RtL_Highlight_Film

"I've wrestled with reality for 35 years, Doctor, and I'm happy to state 
I finally won out over it."
     Elwood P. Dowd, "Harvey", 1950