9fans archive / 2008 / 04 / 56    prev next

search terms are split using tokenize from:regexp searches From: lines subject:regexp searches Subject: lines before:yyyy[/mm[/dd]] and after:yyyy[/mm[/dd]] specify date range powered by grep(1)
From: Caerwyn Jones <caerwynj@gma...> Subject: silliness in flight: build a desktop calculator with srv and rio Date: Sat, 5 Apr 2008 08:53:18 -0500 > > > % dc <[0=1] | echo 0 > /srv/desk > Ok, so this is really neat. How do I do it in inferno? What's the > equivalent of /srv? Inferno has srv(3) which is the file2chan registry. The closest I can get to the above, without writing a new limbo command, is % load file2chan % calc >[0=1] | {file2chan /chan/desk {rblock; putrdata &} {fetchwdata > /fd/0} } & % stream -b 1 /chan/desk % echo 1+1 > /chan/desk It doesn't really work as the plan9 one liner because file2chan is binding a new instance of '#s' each time, so the /chan/desk file isn't visible from other namespaces. If it used an existing instance it would be. Also, putrdata might do multiple reads to satisfy the single read from /chan/desk, which is why I'm using stream -b1 to read. So, not a success, unless anyone can point out a way I missed. Caerwyn