9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Axel Belinfante <Axel.Belinfante@cs.utwente.nl>
To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu>
Subject: Re: [9fans] tcl 9p support? (via tcl vfs?)
Date: Wed, 15 Mar 2006 23:40:12 +0100	[thread overview]
Message-ID: <200603152240.k2FMeCc00983@zamenhof.cs.utwente.nl> (raw)
In-Reply-To: Your message of "Sat, 11 Mar 2006 11:06:57 -0600." <a4e6962a0603110906q3c193effsf5189d657f5f64ac@mail.gmail.com>

eric responded to my question:
> > Only recently I discovered that there is vfs support in tcl.
> > Any informed opinions on how involved it would be to extend
> > it with 9p support?
>
> A 9P server library in tcl is something I've wanted for some time --
> I'd like 9P server bindings for lots of script languages, but tcl
> always seemed to be a good fit for file-system control interfaces (and
> I already have a bunch of stuff written in it too).

I'm currently focussing on client, just proof-of-concept.
I have not given much though what a nice tcl 9p server API might be;
maybe there are some ideas?

regarding client:

turns out that the vfs support in tcl (as already present in tcl 8.4)
is not sufficient to have a 9p client interface
(it allows transparent navigating in the file system, but does not
 offer interception of operations on open(ed) file descriptors
 ('channels' in tcl-speak), to redirect read and write calls to own code))

however, the 'chan create' (sub)command of tcl 8.5(alfa)
allows defining your own 'channel' where your own read/write/etc
functions are called as a consequence of 'ordinary' operations on
your 'channel' object (open file descriptor).

experimentation suggests that the combination of the two features
(all accesible from tcl, no C) is powerful enough to just mount
your fs over 9p and then access it transparently via ordinary tcl
(file) operations (so far only tried reading on readonly fs, no auth)

this is a preliminary result - just a subset of functionality tried,
my tcl code is far from a clean package, but I thought the intermediate
result promising enough to warrant some noise - I, at least,
was until very recently not aware of these possibilities in tcl.


Axel.


      reply	other threads:[~2006-03-15 22:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-11  9:11 Axel Belinfante
2006-03-11  9:40 ` Charles Forsyth
2006-03-11 17:06 ` Eric Van Hensbergen
2006-03-15 22:40   ` Axel Belinfante [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200603152240.k2FMeCc00983@zamenhof.cs.utwente.nl \
    --to=axel.belinfante@cs.utwente.nl \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).