🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #1194

links - forget UNIX; what about AMIGA?

#1194
From: Ranjit Bhatnagar
Date: Sat, 09 Sep 1989 09:01
73 lines
3844 bytes
In article <14083@netnews.upenn.edu> I wrote
>If you think of a symbolic link as just a way of making a file point
>at another file, you miss the more exciting possibilities of the
>Amiga's device space.

I find it frustrating that an argument about a technical point about
links on UNIX can go on for weeks, but nobody is interested in discussing
the implications of links in AmigaDOS.  This IS comp.sys.AMIGA.tech,
isn't it?  As I pointed out in the referenced article, the presence
of arbitrary gunk in the amigados filespace through the use of
handlers makes the symbolic link a very different thing (I'd say
'a more powerful tool' but then everyone would attack) in AmigaDOS than
in UNIX.  Or it would be if there were one.  With handlers, we can stick
anything at all into the filesystem as a rooted tree.  If you want
/dev/kmem you can write a KMEM: handler, what the heck.  If you want
a virus, write VIRUS:.  Now, if we throw in symbolic links, this gunk
can effectively be ANYWHERE in the filesystem.  I can stick a serial
port in my devs:keymaps directory if I want just by typing

	ln -s ser: "devs:keymaps/why a serial port?"

This isn't just an extension of UNIX links, this is something entirely
different, because a handler is user-installable.  In essense, as long
as you 'mount' the right things, you can link arbitrary processes to
arbitrary filenames.  If you want automatic decompression of a file,
just write an uncompress handler and 

	ln -s UNCOMPRESS:boffo.text.Z boffo.text

In my previous article, I took this a step further and proposed an
AREXX: handler.  All it does is convert its argument into an arexx
command whose stdin or stdout is linked to the file handle the handler
returns, as appropriate.  So now you don't even need to write a new
handler to do automatic decompression!  Just write

	ln -s "AREXX:address command uncompress <boffo.text.Z" boffo.text

Pretty mind boggling, I think - but I may be wrong, since nobody responded
to the previous article except to _correct an error in my UNIX syntax._
Perhaps this is all pie-in-the-sky, because there are no symbolic links
in AmigaDOS, and there's no such thing as the arexx: handler.  But I'll
bet my kickstart disk that there'll be symbolic links in 1.4, and if 
nobody else is interested in AREXX:, I'll write the handler myself.
Meanwhile, here's some more amazing-but-true uses for symbolic links
and AREXX: 

You want an disk whose icon is different each time you reload it?

	ln -s "AREXX:funnydisk:rexx/dumprandomicon.rexx" funnydisk:disk.info

How about a booby-trapped file?  Now much easier to write:

	ln -s "AREXX:address command run <nil: >nil: format dh0: 
	       name GOTCHA!" ReadMe

How about this: a program which recompiles itself if it's not up to date:

	ln -s "AREXX:address command 'make <nil: >nil: FooCalc';
		     address command 'type FooCalc'"  AutoFooCalc

	this one could be done more cleverly, but you get the idea.

Talk about hypertext!  The very directories on your disk are now as
powerful as hypercard scripts, and more dangerous (see booby-trap above).

Alright!  Let's have some comments.  Please?

	- Ranjit



"Trespassers w"   ranjit@eniac.seas.upenn.edu	mailrus!eecae!netnews!eniac!...
	   "Such a brute that even his shadow breaks things." (Lorca)
Technical Details
Message-ID: <14187@netnews.upenn.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!netnews.upenn.edu!grad1.cis.upenn.edu!ranjit
References: <14083@netnews.upenn.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!netnews.upenn.edu!grad1.cis.upenn.edu!ranjit
From: ranjit@grad1.cis.upenn.edu (Ranjit Bhatnagar)
Newsgroups: comp.sys.amiga.tech
Subject: links - forget UNIX; what about AMIGA?
Message-ID: <14187@netnews.upenn.edu>
Date: 9 Sep 89 09:01:00 GMT
References: <14083@netnews.upenn.edu>
Sender: news@netnews.upenn.edu
Reply-To: ranjit@grad1.cis.upenn.edu.UUCP (Ranjit Bhatnagar)
Organization: University of Pennsylvania
Lines: 73