summaryrefslogtreecommitdiff
path: root/Hurd/TranslatorWishList.mdwn
diff options
context:
space:
mode:
authorGreg Buchholz <hurd@sleepingsquirrel.org>2003-08-20 21:56:58 +0000
committerGreg Buchholz <hurd@sleepingsquirrel.org>2003-08-20 21:56:58 +0000
commit65ed987575ed017f974eba3112381f6a530da107 (patch)
treec832ef7e114faaae573782ae6e22b09bd455656c /Hurd/TranslatorWishList.mdwn
parent38d51e063ee77c543f361ec4c993d2f1a904299e (diff)
none
Diffstat (limited to 'Hurd/TranslatorWishList.mdwn')
-rw-r--r--Hurd/TranslatorWishList.mdwn17
1 files changed, 17 insertions, 0 deletions
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();
+
+## <a name="Source_code"> Source code </a>
+
+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.