9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] 9p hello world
@ 2011-09-05  0:34 s s
  2011-09-05  1:03 ` Skip Tavakkolian
  2011-09-05  9:03 ` yy
  0 siblings, 2 replies; 12+ messages in thread
From: s s @ 2011-09-05  0:34 UTC (permalink / raw)
  To: 9fans

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

Dear 9fans,

Looking for a hello world example, between client and server, conversing
with 9p.

A google search for "9p hello world" returned basically nothing.

It seems like there might be a hello world example for libixp ...

http://www.anarchyinthetubes.com/src/hello_libixp

Looking for an example based on plan9port, though.

Any suggestions?

Cheers,
Leonard

[-- Attachment #2: Type: text/html, Size: 522 bytes --]

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

* Re: [9fans] 9p hello world
  2011-09-05  0:34 [9fans] 9p hello world s s
@ 2011-09-05  1:03 ` Skip Tavakkolian
  2011-09-05  1:11   ` s s
  2011-09-05  9:03 ` yy
  1 sibling, 1 reply; 12+ messages in thread
From: Skip Tavakkolian @ 2011-09-05  1:03 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

here are a few you can google for:

styx-n-9p (Java)
limbo-machine (JavaScript)
go9p (Go)

they include the customary client and server examples. there are
implementations in many other languages; however COBOL and FORTRAN
implementations are currently missing.

-Skip

On Sun, Sep 4, 2011 at 5:34 PM, s s <leonardnemoi@gmail.com> wrote:
> Dear 9fans,
>
> Looking for a hello world example, between client and server, conversing
> with 9p.
>
> A google search for "9p hello world" returned basically nothing.
>
> It seems like there might be a hello world example for libixp ...
>
> http://www.anarchyinthetubes.com/src/hello_libixp
>
> Looking for an example based on plan9port, though.
>
> Any suggestions?
>
> Cheers,
> Leonard
>
>
>



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

* Re: [9fans] 9p hello world
  2011-09-05  1:03 ` Skip Tavakkolian
@ 2011-09-05  1:11   ` s s
  2011-09-05  4:44     ` s s
  0 siblings, 1 reply; 12+ messages in thread
From: s s @ 2011-09-05  1:11 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

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

On Sun, Sep 4, 2011 at 9:03 PM, Skip Tavakkolian <skip.tavakkolian@gmail.com
> wrote:

> here are a few you can google for:
>
> styx-n-9p (Java)
> limbo-machine (JavaScript)
> go9p (Go)
>
> they include the customary client and server examples. there are
> implementations in many other languages; however COBOL and FORTRAN
> implementations are currently missing.
>
> -Skip


Thanks Skip.

Wanted to try 9pclient and 9pserve from plan9port.

go9p looks promising, though.

[-- Attachment #2: Type: text/html, Size: 828 bytes --]

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

* Re: [9fans] 9p hello world
  2011-09-05  1:11   ` s s
@ 2011-09-05  4:44     ` s s
  2011-09-05  5:44       ` Skip Tavakkolian
  0 siblings, 1 reply; 12+ messages in thread
From: s s @ 2011-09-05  4:44 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

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

> On Sun, Sep 4, 2011 at 9:03 PM, Skip Tavakkolian <
> skip.tavakkolian@gmail.com> wrote:
>
>> ...
>> go9p (Go)
>>
>> ...
>>
>> -Skip
>
>
Compiled and ran go9p/p/srv/examples/timefs.go.

Compiled and ran go9p/p/clnt/examples/read.go.

Output was ...

2011/09/05 00:40:13 invalid arguments

Success?

 - Leonard

[-- Attachment #2: Type: text/html, Size: 892 bytes --]

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

* Re: [9fans] 9p hello world
  2011-09-05  4:44     ` s s
@ 2011-09-05  5:44       ` Skip Tavakkolian
  2011-09-05  5:53         ` s s
  0 siblings, 1 reply; 12+ messages in thread
From: Skip Tavakkolian @ 2011-09-05  5:44 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

try

./read time

a better choice is "cl" client, which lets you navigate the namespace
the file server is serving. the -d flag lets you see what is being
passed around.

$ ../../srv/examples/timefs &
[1] 3681
$ ./read time
Sun Sep  4 22:32:00 PDT 2011$
$ ./cl
9p> ls
time
inftime
9p> cat time
Sun Sep  4 22:32:12 PDT 20119p>
9p> exiting...
$

here's how the plan9port's 9p utility can be used:

% 9p -a tcp!localhost!5640 ls
inftime
time
% 9p -a tcp!localhost!5640 read time
Sun Sep  4 22:32:34 PDT 2011%

-Skip

On Sun, Sep 4, 2011 at 9:44 PM, s s <leonardnemoi@gmail.com> wrote:
>
>> On Sun, Sep 4, 2011 at 9:03 PM, Skip Tavakkolian
>> <skip.tavakkolian@gmail.com> wrote:
>>>
>>> ...
>>> go9p (Go)
>>>
>>> ...
>>>
>>> -Skip
>
>
> Compiled and ran go9p/p/srv/examples/timefs.go.
>
> Compiled and ran go9p/p/clnt/examples/read.go.
>
> Output was ...
>
> 2011/09/05 00:40:13 invalid arguments
>
> Success?
>
>  - Leonard
>
>
>



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

* Re: [9fans] 9p hello world
  2011-09-05  5:44       ` Skip Tavakkolian
@ 2011-09-05  5:53         ` s s
  2011-09-06  5:51           ` Skip Tavakkolian
  0 siblings, 1 reply; 12+ messages in thread
From: s s @ 2011-09-05  5:53 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

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

On Mon, Sep 5, 2011 at 1:44 AM, Skip Tavakkolian <skip.tavakkolian@gmail.com
> wrote:

> try
>
> ./read time
>
> a better choice is "cl" client, which lets you navigate the namespace
> the file server is serving. the -d flag lets you see what is being
> passed around.
>
> $ ../../srv/examples/timefs &
> [1] 3681
> $ ./read time
> Sun Sep  4 22:32:00 PDT 2011$
> $ ./cl
> 9p> ls
> time
> inftime
> 9p> cat time
> Sun Sep  4 22:32:12 PDT 20119p>
> 9p> exiting...
> $
>
> here's how the plan9port's 9p utility can be used:
>
> % 9p -a tcp!localhost!5640 ls
> inftime
> time
> % 9p -a tcp!localhost!5640 read time
> Sun Sep  4 22:32:34 PDT 2011%
>
> -Skip


Woah.

Thanks.

 - Leonard

[-- Attachment #2: Type: text/html, Size: 1140 bytes --]

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

* Re: [9fans] 9p hello world
  2011-09-05  0:34 [9fans] 9p hello world s s
  2011-09-05  1:03 ` Skip Tavakkolian
@ 2011-09-05  9:03 ` yy
  2011-09-05 10:56   ` s s
  1 sibling, 1 reply; 12+ messages in thread
From: yy @ 2011-09-05  9:03 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

2011/9/5 s s <leonardnemoi@gmail.com>:
> It seems like there might be a hello world example for libixp ...
>
> http://www.anarchyinthetubes.com/src/hello_libixp

I wrote that, but is needing some attention. It is quite old, and
although is still valid, I should finish more examples. Extending it
to p9p's 9p(3) and Inferno's styxserver(10) is in my TODO list, but it
will still be there for a while.

If you write a p9p's hello world server, let me know and I can add it
to that page.

By the way, there probably are more 9p implementations than real
programs using them, but they are not very different. What you really
need to understand is how the protocol works. It's actually quite
simple. Nemo's book includes a very good explanation, which is
completed by the man pages. Also, try to find an existing file server
which matches what you need as much as possible and go on from there.


--
- yiyus || JGL .



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

* Re: [9fans] 9p hello world
  2011-09-05  9:03 ` yy
@ 2011-09-05 10:56   ` s s
  2011-09-05 12:22     ` pmarin
  2011-09-05 12:26     ` Andreas Wagner
  0 siblings, 2 replies; 12+ messages in thread
From: s s @ 2011-09-05 10:56 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

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

On Mon, Sep 5, 2011 at 5:03 AM, yy <yiyu.jgl@gmail.com> wrote:

> 2011/9/5 s s <leonardnemoi@gmail.com>:
> > It seems like there might be a hello world example for libixp ...
> >
> > http://www.anarchyinthetubes.com/src/hello_libixp
>
> I wrote that, but is needing some attention. It is quite old, and
> although is still valid, I should finish more examples. Extending it
> to p9p's 9p(3) and Inferno's styxserver(10) is in my TODO list, but it
> will still be there for a while.
>
> If you write a p9p's hello world server, let me know and I can add it
> to that page.
>
> By the way, there probably are more 9p implementations than real
> programs using them, but they are not very different. What you really
> need to understand is how the protocol works. It's actually quite
> simple. Nemo's book includes a very good explanation, which is
> completed by the man pages. Also, try to find an existing file server
> which matches what you need as much as possible and go on from there.
>
>
> --
> - yiyus || JGL .
>

Compiled and ran "timefs" in the go9p examples.

Wondering now how to do timefs in p9p.

Thought using p9p would be more concise, since it has 9pclient library and
9pserve program.

Wondering how to write a timefs in go, that uses 9pclient and 9pserve.

What is Nemo's book?

 - Leonard

[-- Attachment #2: Type: text/html, Size: 1911 bytes --]

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

* Re: [9fans] 9p hello world
  2011-09-05 10:56   ` s s
@ 2011-09-05 12:22     ` pmarin
  2011-09-05 12:26     ` Andreas Wagner
  1 sibling, 0 replies; 12+ messages in thread
From: pmarin @ 2011-09-05 12:22 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

http://lsub.org/who/nemo/9.intro.pdf

On Mon, Sep 5, 2011 at 12:56 PM, s s <leonardnemoi@gmail.com> wrote:
> On Mon, Sep 5, 2011 at 5:03 AM, yy <yiyu.jgl@gmail.com> wrote:
>>
>> 2011/9/5 s s <leonardnemoi@gmail.com>:
>> > It seems like there might be a hello world example for libixp ...
>> >
>> > http://www.anarchyinthetubes.com/src/hello_libixp
>>
>> I wrote that, but is needing some attention. It is quite old, and
>> although is still valid, I should finish more examples. Extending it
>> to p9p's 9p(3) and Inferno's styxserver(10) is in my TODO list, but it
>> will still be there for a while.
>>
>> If you write a p9p's hello world server, let me know and I can add it
>> to that page.
>>
>> By the way, there probably are more 9p implementations than real
>> programs using them, but they are not very different. What you really
>> need to understand is how the protocol works. It's actually quite
>> simple. Nemo's book includes a very good explanation, which is
>> completed by the man pages. Also, try to find an existing file server
>> which matches what you need as much as possible and go on from there.
>>
>>
>> --
>> - yiyus || JGL .
>
> Compiled and ran "timefs" in the go9p examples.
>
> Wondering now how to do timefs in p9p.
>
> Thought using p9p would be more concise, since it has 9pclient library and
> 9pserve program.
>
> Wondering how to write a timefs in go, that uses 9pclient and 9pserve.
>
> What is Nemo's book?
>
>  - Leonard
>
>
>
>



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

* Re: [9fans] 9p hello world
  2011-09-05 10:56   ` s s
  2011-09-05 12:22     ` pmarin
@ 2011-09-05 12:26     ` Andreas Wagner
  1 sibling, 0 replies; 12+ messages in thread
From: Andreas Wagner @ 2011-09-05 12:26 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

> What is Nemo's book?

http://lsub.org/who/nemo/9.intro.pdf

http://www.lulu.com/product/paperback/introduction-to-os-abstractions-using-plan-9-from-bell-labs/5482490


- Andreas



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

* Re: [9fans] 9p hello world
  2011-09-05  5:53         ` s s
@ 2011-09-06  5:51           ` Skip Tavakkolian
  2011-09-06  6:16             ` s s
  0 siblings, 1 reply; 12+ messages in thread
From: Skip Tavakkolian @ 2011-09-06  5:51 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

a good example app is styxbrowser - an android app. it's based on styx-n-9p.

-Skip

On Sun, Sep 4, 2011 at 10:53 PM, s s <leonardnemoi@gmail.com> wrote:
> On Mon, Sep 5, 2011 at 1:44 AM, Skip Tavakkolian
> <skip.tavakkolian@gmail.com> wrote:
>>
>> try
>>
>> ./read time
>>
>> a better choice is "cl" client, which lets you navigate the namespace
>> the file server is serving. the -d flag lets you see what is being
>> passed around.
>>
>> $ ../../srv/examples/timefs &
>> [1] 3681
>> $ ./read time
>> Sun Sep  4 22:32:00 PDT 2011$
>> $ ./cl
>> 9p> ls
>> time
>> inftime
>> 9p> cat time
>> Sun Sep  4 22:32:12 PDT 20119p>
>> 9p> exiting...
>> $
>>
>> here's how the plan9port's 9p utility can be used:
>>
>> % 9p -a tcp!localhost!5640 ls
>> inftime
>> time
>> % 9p -a tcp!localhost!5640 read time
>> Sun Sep  4 22:32:34 PDT 2011%
>>
>> -Skip
>
> Woah.
>
> Thanks.
>
>  - Leonard
>
>
>



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

* Re: [9fans] 9p hello world
  2011-09-06  5:51           ` Skip Tavakkolian
@ 2011-09-06  6:16             ` s s
  0 siblings, 0 replies; 12+ messages in thread
From: s s @ 2011-09-06  6:16 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

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

On Tue, Sep 6, 2011 at 1:51 AM, Skip Tavakkolian <skip.tavakkolian@gmail.com
> wrote:

> a good example app is styxbrowser - an android app. it's based on
> styx-n-9p.
>
> -Skip


Nice.

What I'd really like to see is an "addressbookfs" example.

The server stores a list of addresses, in a flat-file, or a database.

The server also provides control-files for CRUD operations.

The server optionally provides html-files, as an interface to CRUD
operations.

Anyone know if such an example exists?

Wondering whether such an example would prove that p9p could replace a LAMP
stack.

 - Leonard

[-- Attachment #2: Type: text/html, Size: 973 bytes --]

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

end of thread, other threads:[~2011-09-06  6:16 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-05  0:34 [9fans] 9p hello world s s
2011-09-05  1:03 ` Skip Tavakkolian
2011-09-05  1:11   ` s s
2011-09-05  4:44     ` s s
2011-09-05  5:44       ` Skip Tavakkolian
2011-09-05  5:53         ` s s
2011-09-06  5:51           ` Skip Tavakkolian
2011-09-06  6:16             ` s s
2011-09-05  9:03 ` yy
2011-09-05 10:56   ` s s
2011-09-05 12:22     ` pmarin
2011-09-05 12:26     ` Andreas Wagner

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).