9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] tcl 9p support? (via tcl vfs?)
@ 2006-03-11  9:11 Axel Belinfante
  2006-03-11  9:40 ` Charles Forsyth
  2006-03-11 17:06 ` Eric Van Hensbergen
  0 siblings, 2 replies; 4+ messages in thread
From: Axel Belinfante @ 2006-03-11  9:11 UTC (permalink / raw)
  To: 9fans

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?

It would find it rather interesting if one could easily
write 9p clients, or even better, simple 9p servers, in tcl,
also on systems that have no native 9p support.

(why tcl? I already have some stuff written in it;
 it seems the tclkit/starkit approach makes it
 easy to do simple cross-platform deployment)

Axel.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9fans] tcl 9p support? (via tcl vfs?)
  2006-03-11  9:11 [9fans] tcl 9p support? (via tcl vfs?) Axel Belinfante
@ 2006-03-11  9:40 ` Charles Forsyth
  2006-03-11 17:06 ` Eric Van Hensbergen
  1 sibling, 0 replies; 4+ messages in thread
From: Charles Forsyth @ 2006-03-11  9:40 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 193 bytes --]

there is at least one in python, at least three in java; they are nothing too
involved.  ok, all the java ones are more involved than the others,
some much more so, but that's java for you.

[-- Attachment #2: Type: message/rfc822, Size: 3946 bytes --]

From: Axel Belinfante <Axel.Belinfante@cs.utwente.nl>
To: 9fans@cse.psu.edu
Subject: [9fans] tcl 9p support? (via tcl vfs?)
Date: Sat, 11 Mar 2006 10:11:33 +0100
Message-ID: <200603110911.k2B9BY708977@zamenhof.cs.utwente.nl>

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?

It would find it rather interesting if one could easily
write 9p clients, or even better, simple 9p servers, in tcl,
also on systems that have no native 9p support.

(why tcl? I already have some stuff written in it;
 it seems the tclkit/starkit approach makes it
 easy to do simple cross-platform deployment)

Axel.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9fans] tcl 9p support? (via tcl vfs?)
  2006-03-11  9:11 [9fans] tcl 9p support? (via tcl vfs?) Axel Belinfante
  2006-03-11  9:40 ` Charles Forsyth
@ 2006-03-11 17:06 ` Eric Van Hensbergen
  2006-03-15 22:40   ` Axel Belinfante
  1 sibling, 1 reply; 4+ messages in thread
From: Eric Van Hensbergen @ 2006-03-11 17:06 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On 3/11/06, Axel Belinfante <Axel.Belinfante@cs.utwente.nl> wrote:
> 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).

        -eric


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9fans] tcl 9p support? (via tcl vfs?)
  2006-03-11 17:06 ` Eric Van Hensbergen
@ 2006-03-15 22:40   ` Axel Belinfante
  0 siblings, 0 replies; 4+ messages in thread
From: Axel Belinfante @ 2006-03-15 22:40 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

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.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-03-15 22:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-11  9:11 [9fans] tcl 9p support? (via tcl vfs?) 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 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).