Date: Sat, 8 Apr 89 21:21:48 EDT From: Don Hopkins To: lwall@devvax.Jpl.Nasa.Gov Cc: don@brillig.umd.edu Subject: hypertext & perl I finished the manual! Perl sounds fantastic -- very powerful! I can't wait to start messing around with it. I'd like to try out 3.0 when you've put socket support into it -- that I can really use! I may have missed it in the Perl 2.0 manual, but will there be a way to wait for input (ala select(2)) on a bunch of fd's, find out how many bytes are available for reading on an fd without blocking, and accept incoming connections so's ya kin write Perl servers? (I'd also like to be able to frob pty's, and do various ioctl's. Or would you rather have a higher level interface to that kind to stuff?) Now what I'd *really* like would be a clean easy way to link in my own libraries and call them from Perl, and to be able to call Perl functions from my libraries. Instant extension language -- just add heavy water (and palladium)! I'm working on a hypertext system for NeWS, called HyperTIES. It has a hypertext markup language interpreter that reads "storyboard" text files, expands macros and drives the formatter. The formatter uses NeWS to display mouse sensative text and graphics. The buttons on the screen can feed commands back into the interpreter, which calls the index manager to look up and display definitions, follow links, backtrack, etc... Pictures and buttons are very open ended -- they can look or behave like whatever... Their bodies are stored in auxilary files which can contain arbitrary chunks of code (PostScript, or some other language, like Perl.) It would be an interesting experiment to link Perl with HyperTIES, and make it so the interpreters can pass expressions to each other, and get return values. Communicating with an asynchronous Perl process over a socket would be very useful, but I'm looking for a more intimate relationship than you can carry on over a socket. I'd like to be able to access and manipulate the HyperTIES data structures from Perl, to generate synthetic articles, indices, summaries, outlines, search results, directory listings, utmp listings, mail headers, etc... [Do you know how "magic dictionaries" work in NeWS? i.e. objects that behave like PostScript dictionaries (Perl associative arrays?), but have read&write accessor functions that safely manipulate underlying C structures, with magical side effects! (like changing the /Retained key of a canvas)] HyperTIES could be used to display and manipulate regular old files in place, in whatever format they're written, by using Perl to translate them into HyperTIES markup language and munge them on the fly! I believe that no one language is good for everything. PostScript is good at describing pictures and interactive graphics, the HyperTIES markup language is good at describing formatted text and graphics, and I think Perl's just the thing for parsing and processing files, generating input for the the above interpreters, and dealing with Unix! -Don From: lwall@devvax.Jpl.Nasa.Gov (Larry Wall) Subject: Re: perl To: don@brillig.umd.edu (Don Hopkins) Date: Mon, 3 Apr 89 15:33:13 PDT > Enclosed is a message about what I'd like to do with perl. Do you > think it's the right language in which to write "liaison" (a > connection manager, process server, pumping station, whatever -- > described in the last paragraphs below)? I'd also want the server to > doll out pty's, as well. Know of any work in that direction? (I think > it could all be done with emacs, but that's too heavy handed a > solution. I'd rather just run one multi-window emacs at once, and > make connections between it and various liaisons running on > different machines, to take care of my remote editing urges.) Perl 3.0 will be better than 2.0 for that, since it supports binary data and will support sockets, as soon as I hack them in. Larry