From 65ed987575ed017f974eba3112381f6a530da107 Mon Sep 17 00:00:00 2001 From: Greg Buchholz Date: Wed, 20 Aug 2003 21:56:58 +0000 Subject: none --- Hurd/TranslatorWishList.mdwn | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Hurd/TranslatorWishList.mdwn b/Hurd/TranslatorWishList.mdwn index d4fb0af6..1a703f33 100644 --- a/Hurd/TranslatorWishList.mdwn +++ b/Hurd/TranslatorWishList.mdwn @@ -38,6 +38,23 @@ It's like a named pipe which is smart enough to start a process everytime someth Perl is a wonderful language for hacking together something useful in a short amount of time. No concept is complete without being able to use it in a perl one-liner. And that goes for Hurd translators too. Right? + #!/usr/bin/perl + use Hurd::translator; + + #file named two can produce an endless supply of twos, etc. (a la /dev/zero) + my $i=-1; + for $filename ([zero one two three four]) + { + $i++; + $libtrivfsread_codehash{$filename}=sub{ $num_bytes=shift; return chr($i) x $num_bytes; }; + #that's a hash of references to closures + } + translator_startup(); + +## Source code + +Here's a crazy thought. How about a translator for source code. You have a C source file like `hello.c` which is your normal everyday file. But there's a translator sitting underneath, so when you `cd hello.c` you get a directory with files like `main()` which represent the subroutines in `hello.c`. And of course you should be able to edit/remove those and have it modify the original source. + -- Greg Buchholz - 25 Jul 2003 Minor formatting updates. -- cgit v1.2.3