From: ············@gmail.com
Subject: graphical representation of code
Date: 
Message-ID: <1138053722.293072.156810@z14g2000cwz.googlegroups.com>
Hello
this is a question from a pre-newbie
Is there some kind of gui that would show
lisp code graphically
and allow also to edit it?
I would perhaps imagine that blocks (or lists
or whatever is the proper name) would appear as
boxes, the first item of the list might appear in the top
left corner of the box (or some other special position),
unless the list is quoted, when there
would be nothing in the corner, etc. So the code would appear
in nested boxes, with no paretheses(??). Is there anything remotely
similar? Just
for teaching purposes I suppose.
Best regards
Palo

From: Thomas A. Russ
Subject: Re: graphical representation of code
Date: 
Message-ID: <ymizmlmfsfq.fsf@sevak.isi.edu>
If I recall correctly, didn't Interlisp have some sort of structure
editor?  I only know of this via rumor, since I never programmed in
interlisp.  You would manipulate functions and list structure, but not
text files.

But Interlisp is no more, and I don't know of any modern lisp systems
that use structure editors as their interface.  That is probably because
most programmers are already conversant with text editting, so it is
easier to write a text-editor-based IDE than to introduce a special
structure-based one that would have a learning curve all its own.

As it is, the (dare I say) dominant lisp editor (Emacs) has a number of
commands for moving up and down nested list structures, so that power
users tend to use shortcuts for moving up, down and across lisp
s-expressions.  See for example C-M-d, C-M-f, C-M-u, C-M-k, etc.

-- 
Thomas A. Russ,  USC/Information Sciences Institute
From: Bill Atkins
Subject: Re: graphical representation of code
Date: 
Message-ID: <87y816wfwd.fsf@rpi.edu>
···@sevak.isi.edu (Thomas A. Russ) writes:

> If I recall correctly, didn't Interlisp have some sort of structure
> editor?  I only know of this via rumor, since I never programmed in
> interlisp.  You would manipulate functions and list structure, but not
> text files.
>
> But Interlisp is no more, and I don't know of any modern lisp systems
> that use structure editors as their interface.  That is probably because
> most programmers are already conversant with text editting, so it is
> easier to write a text-editor-based IDE than to introduce a special
> structure-based one that would have a learning curve all its own.
>
> As it is, the (dare I say) dominant lisp editor (Emacs) has a number of
> commands for moving up and down nested list structures, so that power
> users tend to use shortcuts for moving up, down and across lisp
> s-expressions.  See for example C-M-d, C-M-f, C-M-u, C-M-k, etc.
>
> -- 
> Thomas A. Russ,  USC/Information Sciences Institute

I've been hearing tantalizingly cool things about Interlisp all week.
Is there anyone reading this who's used Interlisp and can give more
detail about features like this?

--

Bill Atkins
From: Fred Gilham
Subject: Re: graphical representation of code
Date: 
Message-ID: <u71wyypaiq.fsf@snapdragon.csl.sri.com>
> I've been hearing tantalizingly cool things about Interlisp all
> week.  Is there anyone reading this who's used Interlisp and can
> give more detail about features like this?

I don't know if this will help, but you can play with Interlisp in an
emulated environment.  It's a full-blown Interlisp-D environment.

Check out http://www2.parc.com/istl/groups/nltt/medley/default.html

Note that this system is supposed to host an application called the
Grammar Writer's Workbench but all the Interlisp stuff is there.

You can also probably find Interlisp documentation on the Internet
that will help you figure out what to do with it.

-- 
Fred Gilham                                         ······@csl.sri.com
A Bolshevik speaker promised his audience "come the revolution, we
will all eat strawberries and cream."  "But I don't like strawberries
and cream," responded a listener.  "Come the revolution we will *all*
eat strawberries and cream!," the Bolshevik intoned. -- Butler Shaffer
From: bob_bane
Subject: Re: graphical representation of code
Date: 
Message-ID: <1138117770.480467.131020@o13g2000cwo.googlegroups.com>
For a pretty compressed set of instructions on how to get started in
the Medley environment, look here:

http://groups.google.com/group/comp.lang.lisp/browse_thread/thread/f6439b7c2043a48/428159ec7ccda602?q=Bane+Medley&rnum=5#428159ec7ccda602
From: Tayssir John Gabbour
Subject: Re: graphical representation of code
Date: 
Message-ID: <1138118989.951265.119880@g49g2000cwa.googlegroups.com>
Bill Atkins wrote:
> ···@sevak.isi.edu (Thomas A. Russ) writes:
>
> > If I recall correctly, didn't Interlisp have some sort of structure
> > editor?  I only know of this via rumor, since I never programmed in
> > interlisp.  You would manipulate functions and list structure, but not
> > text files.
> >
> > But Interlisp is no more, and I don't know of any modern lisp systems
> > that use structure editors as their interface.  That is probably because
> > most programmers are already conversant with text editting, so it is
> > easier to write a text-editor-based IDE than to introduce a special
> > structure-based one that would have a learning curve all its own.
> >
> > As it is, the (dare I say) dominant lisp editor (Emacs) has a number of
> > commands for moving up and down nested list structures, so that power
> > users tend to use shortcuts for moving up, down and across lisp
> > s-expressions.  See for example C-M-d, C-M-f, C-M-u, C-M-k, etc.
>
> I've been hearing tantalizingly cool things about Interlisp all week.
> Is there anyone reading this who's used Interlisp and can give more
> detail about features like this?

I have a book _Interactive Programming Environments_ (probably
available cheap as I'm sure it's out of print), which discusses
Interlisp quite a bit, among other things... there was one small debate
between Sandewall and Stallman on it, representing Interlisp and Emacs
respectively. Maybe it's here, though I don't have access...
http://portal.acm.org/citation.cfm?id=356719

Tayssir
From: ···@itasoftware.com
Subject: Re: graphical representation of code
Date: 
Message-ID: <1138118767.088757.229860@f14g2000cwb.googlegroups.com>
Thomas A. Russ wrote:
> But Interlisp is no more, and I don't know of any modern lisp systems
> that use structure editors as their interface.  That is probably because
> most programmers are already conversant with text editting, so it is
> easier to write a text-editor-based IDE than to introduce a special
> structure-based one that would have a learning curve all its own.

The main problem is that structure editors interact very poorly with
comments because comments aren't part of the structure.  MIT-style
Lisps used comments and Emacs.  Stanford-style Lisps used a structure
editor but didn't have text comments.  They did have some sort of
comment form, but that could only be inserted in safe places in the
code and wasn't used as much (think about adding a COMMENT form to an
IF).

When Common Lisp was created it kept the MIT-style comments so
structure editors kind of faded away.  This is partly a pity because
you could do neat things like mark two different sexps and exchange
them with a single command.  I released an Emacs mode that did this
sort of thing back in the late 1980's but it was never widely used and
I've long lost it.
From: jayded
Subject: Re: graphical representation of code
Date: 
Message-ID: <1138059591.401262.185300@z14g2000cwz.googlegroups.com>
Nothing that I am aware of.

Lispbox is probably the best bet for teaching/learning it seems -->
http://www.gigamonkeys.com/book/lispbox/

There may be others though.
From: JP Massar
Subject: Re: graphical representation of code
Date: 
Message-ID: <vq9dt1dajbauacilvk7q52clfp8l0lp51u@4ax.com>
On 23 Jan 2006 14:02:02 -0800, ············@gmail.com wrote:

>Hello
>this is a question from a pre-newbie
>Is there some kind of gui that would show
>lisp code graphically
>and allow also to edit it?
>I would perhaps imagine that blocks (or lists
>or whatever is the proper name) would appear as
>boxes, the first item of the list might appear in the top
>left corner of the box (or some other special position),
>unless the list is quoted, when there
>would be nothing in the corner, etc. So the code would appear
>in nested boxes, with no paretheses(??). Is there anything remotely
>similar? Just
>for teaching purposes I suppose.
>Best regards
>Palo

The Biobike (nee BioLingua) project, www.biobike.net, is in the
process of designing and implementing such a thing for a biological
programming language based on Common Lisp.

It's still not much beyond vaporware (we can created nested boxes in a
webpage as a proof of concept, but not much more), so check back with
us in 3-4 months.
From: ········@gmail.com
Subject: Re: graphical representation of code
Date: 
Message-ID: <1138150948.419482.257070@g44g2000cwa.googlegroups.com>
> Is there some kind of gui that would show
> lisp code graphically and allow also to edit it?
> I would perhaps imagine that blocks (or lists
> or whatever is the proper name) would appear as
> boxes, the first item of the list might appear in the top
> left corner of the box (or some other special position),
> unless the list is quoted, when there
> would be nothing in the corner, etc. So the code would appear
> in nested boxes, with no paretheses(??). Is there anything remotely
> similar? Just for teaching purposes I suppose.

Huh? The parens ARE nested boxes!
From: ············@gmail.com
Subject: Re: graphical representation of code
Date: 
Message-ID: <1138190480.509336.71790@g49g2000cwa.googlegroups.com>
> Huh? The parens ARE nested boxes!

Boxes are rectangles. Parens are, normally, not rectangles :)

I would think that writing a gui editor that would display lisp code
graphically,
using rectangles instead of parens, is not a difficult thing (doing it
well may be harder?). And to me it looked superficially as a good idea,
though just for learning/teaching purposes. But if it were both simple
and good idea, then it would probably exist.

Best regards
Palo
From: Bruce Stephens
Subject: Re: graphical representation of code
Date: 
Message-ID: <874q3sa49d.fsf@cenderis.demon.co.uk>
············@gmail.com writes:

>> Huh? The parens ARE nested boxes!
>
> Boxes are rectangles. Parens are, normally, not rectangles :)
>
> I would think that writing a gui editor that would display lisp code
> graphically,
> using rectangles instead of parens, is not a difficult thing (doing it
> well may be harder?). And to me it looked superficially as a good idea,
> though just for learning/teaching purposes. But if it were both simple
> and good idea, then it would probably exist.

Like this <http://www.foldr.org/~michaelw/emacs/color-box.png>?  I
suspect it just happens to be a bit tricky to do (and allow editing)
with Emacs.  

I think it would be rather cool to have that kind of thing with an
editable buffer---it looks like it could be subtle enough to act much
like syntax highlighting, and stay out of your way when you didn't
care.  (Actually removing the parentheses seems to be going too far,
IMHO.)
From: Pascal Bourguignon
Subject: Re: graphical representation of code
Date: 
Message-ID: <87acdk1jum.fsf@thalassa.informatimago.com>
············@gmail.com writes:

>> Huh? The parens ARE nested boxes!
>
> Boxes are rectangles. Parens are, normally, not rectangles :)

This is not difficult:

(set-syntax-from-char #\[ #\()
(set-syntax-from-char #\] #\))
(set-macro-character #\[ (lambda (stream char) (read-delimited-list #\] stream t)))

Then:

[434]> [defun fact [x] [if [< x 1] 1 [* x [fact [1- x]]]]]
FACT
[435]> [fact [* 2 3]]
720
[436]> 

But careful with the corners!


> I would think that writing a gui editor that would display lisp code
> graphically,
> using rectangles instead of parens, is not a difficult thing (doing it
> well may be harder?). And to me it looked superficially as a good idea,
> though just for learning/teaching purposes. But if it were both simple
> and good idea, then it would probably exist.

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

HANDLE WITH EXTREME CARE: This product contains minute electrically
charged particles moving at velocities in excess of five hundred
million miles per hour.
From: John Thingstad
Subject: Re: graphical representation of code
Date: 
Message-ID: <op.s3xv8ofvpqzri1@mjolner.upc.no>
On Wed, 25 Jan 2006 15:08:01 +0100, Pascal Bourguignon  
<····@mouse-potato.com> wrote:

> ············@gmail.com writes:
>
>>> Huh? The parens ARE nested boxes!
>>
>> Boxes are rectangles. Parens are, normally, not rectangles :)
>
> This is not difficult:
>
> (set-syntax-from-char #\[ #\()
> (set-syntax-from-char #\] #\))
> (set-macro-character #\[ (lambda (stream char) (read-delimited-list #\]  
> stream t)))
>
> Then:
>
> [434]> [defun fact [x] [if [< x 1] 1 [* x [fact [1- x]]]]]
> FACT
> [435]> [fact [* 2 3]]
> 720
> [436]>
>
> But careful with the corners!
>

Be carefull of clashes, as one lisper said to me last week.
This would shaddow the CLSQL brackets.

-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
From: Pascal Bourguignon
Subject: Re: graphical representation of code
Date: 
Message-ID: <87ek2wz4lf.fsf@thalassa.informatimago.com>
"John Thingstad" <··············@chello.no> writes:

> On Wed, 25 Jan 2006 15:08:01 +0100, Pascal Bourguignon
> <····@mouse-potato.com> wrote:
>
>> ············@gmail.com writes:
>>
>>>> Huh? The parens ARE nested boxes!
>>>
>>> Boxes are rectangles. Parens are, normally, not rectangles :)
>>
>> This is not difficult:
>>
>> (set-syntax-from-char #\[ #\()
>> (set-syntax-from-char #\] #\))
>> (set-macro-character #\[ (lambda (stream char) (read-delimited-list
>> #\]  stream t)))
>>
>> Then:
>>
>> [434]> [defun fact [x] [if [< x 1] 1 [* x [fact [1- x]]]]]
>> FACT
>> [435]> [fact [* 2 3]]
>> 720
>> [436]>
>>
>> But careful with the corners!
>>
>
> Be carefull of clashes, as one lisper said to me last week.
> This would shaddow the CLSQL brackets.

Of course.  There are several solutions.

- use various read tables and switch from one to the other according
  to what syntax you want to read.

- use a Common Lisp implementation able to handle unicode, and choose
  from one of the 52 pairs of brackets.  Even if you limit ourself to
  square brackets you have still a choice amongst 12 pairs:

#x0005B      91  [  "LEFT_SQUARE_BRACKET"
#x0005D      93  ]  "RIGHT_SQUARE_BRACKET"
#x02045    8261  ⁅  "LEFT_SQUARE_BRACKET_WITH_QUILL"
#x02046    8262  ⁆  "RIGHT_SQUARE_BRACKET_WITH_QUILL"
#x023A1    9121  ⎡  "LEFT_SQUARE_BRACKET_UPPER_CORNER"
#x023A2    9122  ⎢  "LEFT_SQUARE_BRACKET_EXTENSION"
#x023A3    9123  ⎣  "LEFT_SQUARE_BRACKET_LOWER_CORNER"
#x023A4    9124  ⎤  "RIGHT_SQUARE_BRACKET_UPPER_CORNER"
#x023A5    9125  ⎥  "RIGHT_SQUARE_BRACKET_EXTENSION"
#x023A6    9126  ⎦  "RIGHT_SQUARE_BRACKET_LOWER_CORNER"
#x023B4    9140  ⎴  "TOP_SQUARE_BRACKET"
#x023B5    9141  ⎵  "BOTTOM_SQUARE_BRACKET"
#x027E6   10214  ⟦  "MATHEMATICAL_LEFT_WHITE_SQUARE_BRACKET"
#x027E7   10215  ⟧  "MATHEMATICAL_RIGHT_WHITE_SQUARE_BRACKET"
#x0298B   10635  ⦋  "LEFT_SQUARE_BRACKET_WITH_UNDERBAR"
#x0298C   10636  ⦌  "RIGHT_SQUARE_BRACKET_WITH_UNDERBAR"
#x0298D   10637  ⦍  "LEFT_SQUARE_BRACKET_WITH_TICK_IN_TOP_CORNER"
#x0298E   10638  ⦎  "RIGHT_SQUARE_BRACKET_WITH_TICK_IN_BOTTOM_CORNER"
#x0298F   10639  ⦏  "LEFT_SQUARE_BRACKET_WITH_TICK_IN_BOTTOM_CORNER"
#x02990   10640  ⦐  "RIGHT_SQUARE_BRACKET_WITH_TICK_IN_TOP_CORNER"
#x0301A   12314  〚  "LEFT_WHITE_SQUARE_BRACKET"
#x0301B   12315  〛  "RIGHT_WHITE_SQUARE_BRACKET"
#x0FF3B   65339  [  "FULLWIDTH_LEFT_SQUARE_BRACKET"
#x0FF3D   65341  ]  "FULLWIDTH_RIGHT_SQUARE_BRACKET"




-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

What is this talk of 'release'? Klingons do not make software 'releases'.
Our software 'escapes' leaving a bloody trail of designers and quality
assurance people in it's wake.
From: ·······@pagedata.com
Subject: Re: graphical representation of code
Date: 
Message-ID: <1138237480.684551.290030@o13g2000cwo.googlegroups.com>
············@gmail.com wrote:
> > Huh? The parens ARE nested boxes!
>
> Boxes are rectangles. Parens are, normally, not rectangles :)
>
> I would think that writing a gui editor that would display lisp code
> graphically,
> using rectangles instead of parens, is not a difficult thing (doing it
> well may be harder?). And to me it looked superficially as a good idea,
> though just for learning/teaching purposes. But if it were both simple
> and good idea, then it would probably exist.
>
> Best regards
> Palo


Not exactly what was asked for, but this can be of good use for
learning puposes.
>From David Touretzkey:  http://www.cs.cmu.edu/~dst/Lisp/sdraw/

(Draws con cell structures)