[Date Prev][Date Next][Thread Prev][Thread Next][Author Index][Date Index][Thread Index]
:zz: WARNING: d.inside and d.contents DON'T WORK YET
- To: zzdev@xxxxxxxxxx
- Subject: :zz: WARNING: d.inside and d.contents DON'T WORK YET
- From: Ted Nelson <ted@xxxxxxxxxx>
- Date: Mon, 26 Oct 1998 14:58:46 -0500
- Cc: ted@xxxxxxxxxx
- In-reply-to: <19981026013609.22839.qmail@xxxxxxxxxx>
- Reply-to: zzdev@xxxxxxxxxx
Dear Mark-Jason--
VERY gratified that you've added to the system.
(Note: it is hoped that each new function will be in its own
menu cell, although we've gotten lax, thus allowing cloning
and re-use.)
HowEVer, d.inside and d.contents are STILL NOT FIXED!
(Not meaning they're shifting in meaning, but that they are
not yet repaired and working correctly). So be careful what
you try to do with them.
As to your soul-searching about the idea--
>I can't make up my mind whether the existing inside/contents system is
>a good idea or not. Over the last couple of days I've made a lot of
>notes about how contents lists can be managed, trying to get to the
>bottom of this.
-- Does it help that some people think this is an exact transposition
of Lisp's equivalent, car (the containing cell) and cdr? (I'm not
making the assertion, I'm not quite sure how that works myself !-)
And WELCOME TO THE GANG!
Blessings, Ted
At 08:36 PM 10/25/98 -0500, you wrote:
>
>I wanted to use d.contents and d.inside to manage contents lists for
>nodes. But using `x' and `y' every time was a pain; I needed to press
>them three times each to avance from d.1 to d.inside and from d.2 to
>d.contents. So I added a new command to do it automatically, and I
>added a new action node to the action menu to invoke the command.
>
>The command is a perl function, `view_inside()'. It accepts on
>argument, which is a cursor/window number. It then sets the X
>direction in that window to `d.inside' and the Y direction to
>`d.contents'. I did not include a key binding for this function.
>
>I can't make up my mind whether the existing inside/contents system is
>a good idea or not. Over the last couple of days I've made a lot of
>notes about how contents lists can be managed, trying to get to the
>bottom of this.
>
>The general thrust of the notes is this: Dimensions need to have
>semantics associated with them. For example, if B is linked posward
>from A in the d.contents dimension, B is deemed to be contained in A.
>If the existing contents system is going to work at all, users must be
>able to provide their own semantics for dimensions. It should be easy
>to provide a kitful of common semantics that can be assembled together
>to make more complicated semantics. An example of an item in the Kit:
>You should be able to say that a certain dimension is symmetric, which
>means that the meaning of the positive and the negative directions are
>the same.
>
>I'll write these notes up when I get a chance because I'm really
>curious what Ted thinks about it; perhaps I'm not seeing the Big
>Picture.
>
>Here's the patch:
>
>--- zigzag.054 Sun Oct 25 02:57:14 1998
>+++ zigzag.view_inside Sun Oct 25 19:59:25 1998
>@@ -25,9 +25,15 @@
> # ===================== Change Log
> #
> # Inital zigzag implementation
>-# $Id: zigzag,v 0.54 1998/10/08 03:56:21 xanni Exp $
>+# $Id: zigzag,v 0.56 1998/10/25 18:47:15 mjd Exp $
> #
> # $Log: zigzag,v $
>+# Revision 0.54.0.1 1998/10/25 18:47:15 mjd
>+# Implement new function, `view_inside'.
>+# Argument: Window/cursor number.
>+# Effect: Adjust X and Y directions in specified window to `d.inside'
>+# and `d.contents', respectively.
>+#
> # Revision 0.54 1998/10/08 03:56:21 xanni
> # Incorporate Gossamer's changes, fix $TEMP_FILE problem
> #
>@@ -205,7 +211,7 @@
> return (
> 0 => "Home",
> "0-d.1" => 99,
>- "0+d.2" => 30,
>+ "0+d.2" => 32,
> "0+d.cursor" => 11,
> 1 => "d.1",
> "1-d.1" => 10,
>@@ -270,8 +276,11 @@
> "20-d.1" => 19,
> 30 => "#Edit\natcursor_edit(1);",
> "30+d.1" => 35,
>- "30-d.2" => 0,
>+ "30-d.2" => 32,
> "30+d.2" => 40,
>+ 32 => "#Containment\n#MJD 1998 10 25\nview_inside(1);",
>+ "32+d.2" => 30,
>+ "32-d.2" => 0,
> 35 => "#Clone\natcursor_clone(1);",
> "35-d.1" => 30,
> 40 => "#L-ins\natcursor_insert(1, 'L');",
>@@ -1654,6 +1663,36 @@
> }
>
> $ZZ{$curs} = substr($ZZ{$curs}, 0, 1) . $ZZ{$ZZ{"$index+d.2"}};
>+ $Window_Dirty[$number] = $TRUE;
>+}
>+
>+sub view_inside($)
>+# Rotate dimensions of given cursor so that X=d.inside and Y=d.contents
>+# 1998 08 25 MJD (M-J. Dominus) mjd@xxxxxxxxx
>+{
>+ my $number = @_;
>+ my $curs = &get_cursor($number);
>+ my $dimension1 = $ZZ{"$CURSOR_HOME+d.1"}; # Dimension list is +d.1 from
Cursor home
>+ my $d;
>+ my ($inside, $contents);
>+ my $pass = 0; # Prevent infinite loop on dimension list by counting
passes
>+ for ($d = $dimension1; !($inside && $contents) && $pass < 2; $d =
$ZZ{"$d+d.2"}) {
>+ $pass++ if $d == $dimension1;
>+ if ($ZZ{$d} eq 'd.inside') {
>+ $inside = $d;
>+ } elsif ($ZZ{$d} eq 'd.contents') {
>+ $contents = $d;
>+ }
>+ }
>+
>+ # Check here for $inside and $contents?
>+ # Abort if either is undefined.
>+
>+ my $curs_x = $ZZ{"$curs+d.1"};
>+ my $curs_y = $ZZ{"$curs_x+d.1"};
>+
>+ $ZZ{$curs_x} = '+' . $ZZ{$inside};
>+ $ZZ{$curs_y} = '+' . $ZZ{$contents};
> $Window_Dirty[$number] = $TRUE;
> }
>
>
>
>
____________________________________________________
Theodor Holm Nelson, Visiting Professor of Environmental Information
Keio University, Shonan Fujisawa Campus, Fujisawa, Japan
Home Fax from USA: 011-81-466-46-7368 (If in Japan, 0466-46-7368)
Professorial home page http://www.sfc.keio.ac.jp/~ted/
_____________________________________________________
Permanent: Project Xanadu, 3020 Bridgeway #295, Sausalito CA 94965
Tel. 415/ 331-4422, fax 415/332-0136
http://www.xanadu.net
PERMANENT E-MAIL: ted@xxxxxxxxxx
_____________________________________________________
Quotation of the day, 98.10.20:
"Paranoia is the belief in a hidden order behind the visible."
-- Anonymous. (From http://www.pithemovie.com)