Re: [9fans] Connecting to the wiki from linux with plan9port

2021-11-13 Thread Fazlul Shahriar
srv 'net!9p.io!wiki' wiki
9p read wiki/Acme_wiki_instructions/current

I'm not aware of a port of the acme client.

On Fri, Nov 12, 2021 at 2:21 PM Cam  wrote:
>
> I'm assuming it's possible to mount the wiki using plan9port however I 
> haven't been able to find documentation on it. If it is indeed possible I'd 
> like to update the wiki with instructions on how. Does anyone have any 
> insight into how to make this happen?
>
>
> -Cameron
> 9fans / 9fans / see discussions + participants + delivery options Permalink

--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/T6d63e203d311a706-M58234d25cb961e6bbea8c968
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


Re: [9fans] sshnet and the go dns resolver

2021-02-23 Thread Fazlul Shahriar
The Go net package uses /net/cs and /net/dns. I see sshnet doesn't create
/net/dns. That could be the issue.

fhs

On Tue, Feb 23, 2021 at 4:35 PM Steve Simon  wrote:

> hi,
> 
> the senerio - i have a plan9 terminal, a mac laptop. the laptop connects
> to a vpn.
> 
> i write in go, and thus far i use sshfs to mount the mac’s filesystem and
> edit my code. i build and run the code on the mac.
> 
> i thought i could use git9 via sshnet to work natively on plan9
> 
> most of this is fine but when go tries to access mod files for packages on
> the vpn i get a “no sutiable address found” error for proxy.golang.org.
> 
> i can resce the address i need (over the vpn) using ndb/dnsquery however.
> 
> if i try and build without my sshnet vpn connection then i get a different
> error which refers to a repository on the vpn.
> 
> so. i think the native resolver in the go libraries (and thus in the go
> executable) do not play nicely with sshnet.
> 
> my guess (only a guess) is go is trying to do its own name resolution
> using udp port 53 and sshnet does not support udp.
> 
> anyone any ideas?
> can i convince go to use plan9’s own name resolution?
> can ssh (and thus sshnet) forward udp or is that not possible?
> 
> thanks for any ideas
> 
> -Steve
> 

--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/T774469ff9f943e45-M6e96a817ce5e09891b086877
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


Re: [9fans] authoritative source for u9fs?

2021-01-22 Thread Fazlul Shahriar
Actually, I only know of one u9fs that is being maintained:
https://bitbucket.org/plan9-from-bell-labs/u9fs/src/master/
I think most of the others you may find on github are (outdated)
mirror of this one.

On Fri, Jan 22, 2021 at 3:02 AM Dworkin Muller  wrote:
> 
> My initial installation/playing with Plan 9 was, surprisingly enough,
> using the basic Plan 9 ISO from 9p.io.  That image (and the resulting
> installed system's /sys/src) has a handful of useful interoperability
> bits to run on Unix, including u9fs.  Now I've working with 9front,
> which is being less frustrating in at least a few respects.  However,
> it no longer has those Unix-related bits.  Doing a web search for
> "u9fs server" comes up with a lot of different places claiming to have
> it, but they don't appear to all have exactly the same thing, and I'm
> generally reluctant to use a package from other than its true home or
> a mirror listed at said true home.
> 
> Thus, the question is, what is considered to be the location of the
> source for u9fs?
> 
> I have a funny feeling the answer's going to be ``well, it depends on
> which variant of u9fs you want'' :-)
> 
> Thanks.
> 
> Dworkin

--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/Tee2220301f2a891c-Mce5f51c865d65f16cb30bb66
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


Re: [9fans] various problems with installing go lang

2020-10-24 Thread Fazlul Shahriar
You don't need git. Try this:
% GO111MODULE=on go get github.com/henesy/disco

On Sat, Oct 24, 2020 at 1:32 AM  wrote:
>
> Since having the git rc script in either /bin/amd64, $home/bin or 
> $home/bin/rc didnt work
> i just had it put it in the same directory that i was running go get from
> it results in this ...
>
> term% go get github.com/henesy/disco
> # cd .; git clone -- https://github.com/henesy/disco 
> /usr/glenda/go/src/github.com/henesy/disco
> rc: git:2: syntax error
> package github.com/henesy/disco: exit status: 'git 569: syntax error'
>
> Do I have the wrong git? I compared this rc git wrapper to the one found on 
> 9legacy and it looks the same.
>
>
> 9fans / 9fans / see discussions + participants + delivery options Permalink

--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/T80ee3327f2f3dc57-M8339a82acbe242653e04790a
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


Re: [9fans] a simple graphical application in Go?

2020-04-04 Thread Fazlul Shahriar
There is a PR open with Plan 9 devdraw support to 9fans.net/go/draw:
https://github.com/9fans/go/pull/28
It at least works with the Go acme port Edwood last I tested.

On Sat, Apr 4, 2020 at 4:33 PM Jeremy Jackins 
wrote:

> Well, you need a Go draw package in place of the C library. There is a
> draw package in github.com/9fans/go/ but unfortunately I think it only
> supports plan9port devdraw, rather than the native Plan 9 draw device.
> So there is some library work to be done first. Since the Go standard
> library also contains the most important drawing primitives
> implemented by the Plan 9 draw device (with the exception of font
> rendering, but there is golang.org/x/image/font), you may be able to
> ignore a lot of functionality provided by the Plan 9 draw library and
> focus on a few things like loading pixel data directly to the draw
> device.
>
> See: http://man.cat-v.org/plan_9/3/draw
>
> Jeremy
>
> On Sat, 4 Apr 2020 at 06:55, Kim Lassila  wrote:
> >
> > Has anyone written a graphical application in Go on Plan 9? How would
> the Go equivalent of black.c (thank you fgb) look like?
> >
> > - - - clip - - -
> >
> > #include 
> > #include 
> > #include 
> >
> > void
> > main(int, char *argv[])
> > {
> > Rectangle rect;
> > Image *black;
> >
> > fmtinstall('R', Rfmt);
> > if(initdraw(nil, nil, argv[0]) < 0)
> > sysfatal("initdraw: %r");
> > rect = screen->r;
> > black = display->black;
> > draw(screen, rect, black, nil, ZP);
> > flushimage(display, 1);
> > sleep(5 * 1000);
> > closedisplay(display);
> > print("rectangle was %R\n", rect);
> > exits(nil);
> > }
> >
> > 9fans / 9fans / see discussions + participants + delivery options
> Permalink

--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/T0d490c91935dc74b-Mfd4090e269de1d17fc3df91d
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


Re: [9fans] Software preservation in the post-hg era

2020-03-31 Thread Fazlul Shahriar
It's worth highlighting the fact that Bitbucket will be deleting *all* hg
repositories on May 30, 2020. Thankfully, the Software Heritage (
https://www.softwareheritage.org/) seems to be doing a great job of
archiving all open source work. For example:
https://archive.softwareheritage.org/browse/origin/https://bitbucket.org/inferno-os/inferno-os/directory/
I don't know how much they have archived or how up-to-date it is. It's
worth converting repos to git anyway, especially if we want to continue
maintaining them.

On Mon, Mar 30, 2020 at 9:11 PM Sean Hinchee  wrote:

> In the wake of Bitbucket removing hg (Mercurial) support [1], I feel
> it's topical to bring up software preservation for the plan9
> community.
> 
> A lot of community contributed software has been put up on Bitbucket
> or other hg hosts over time (RIP Google Code), but no consolidated
> effort, to my knowledge, seems to have been made to index, let alone
> mirror, this software.
> 
> For now, as a stop-gap, I've made a GitHub organization in which I've
> consolidated most of what I had indexed from Bitbucket and a few other
> places.
> 
> Thanks to people like Ori Bernstein, we have a native git client for
> plan9 [3]; without a native client, this kind of transition wouldn't
> be nearly as simple, thank you.
> 
> I'm more than happy to add anyone interested in the curation of this
> archive to the GitHub organization. It would be nice to have spare
> hands around to add README's, mkfiles, and attributions where they
> have been missed or never existed.
> 
> In the long term, it would be nice to have a federated or otherwise
> decentralized solution to pooling community contributed software,
> especially keeping in mind ease of mirroring and picking up old
> projects as contributors come and go.
> 
> The contrib/ directory on sources and 9front are fine and good, but
> they are centralized. I don't have a proposed solution to this
> problem, but it would be nice to have ideas or insight posted ☺.
> 
> I recognize that GitHub is also centralized and doesn't solve the
> centralization problem, but at least git is really straightforward to
> mirror with multiple remotes, etc. and having an index/archive is
> valuable at least to me.
> 
> If anyone has further thoughts, anything they want added, or any lists
> or indices of works they want archived/mirrored, I would love to see
> these posted.
> 
> If anyone wants to mirror the archive, that would be wonderful. I was
> considering mirroring everything to a remote in sr.ht in the future,
> but haven't gotten around to it.
> 
> As a footnote, there's a decent git client written in Go that works
> alright on plan9 [4], but it's slow and memory intensive at the
> moment.
> 
> Cheers,
> Sean
> 
> [1] https://twitter.com/traverser/status/1244398479591563265
> [2] https://github.com/Plan9-Archive
> [3] https://github.com/oridb/git9
> [4] https://github.com/driusan/dgit

--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/T303744e1ec6d2108-M3889534780ac09733b7bf1cd
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


Re: [9fans] Software preservation in the post-hg era

2020-03-30 Thread Fazlul Shahriar
>
> As a footnote, there's a decent git client written in Go that works
> alright on plan9 [4], but it's slow and memory intensive at the
> moment.


 go-git also works well. I recently wrote a wrapper around it for plan9:
https://github.com/fhs/gig

--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/T303744e1ec6d2108-M5a0ab076eb11ff1ddb369ae6
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


Re: [9fans] go on plan9 - what doesn’t work?, ports list?

2019-12-28 Thread Fazlul Shahriar
Hi,

I believe Multicast works. There are some basic tests at
https://golang.org/src/net/udpsock_plan9_test.go. It should work on all
three architectures.

I don't know of any ports list. In general everything should work unless
it's doing something non-portable. I recently played around with go-git and
had to deal with its use of symlinks, assuming posix semantics for
os.Rename, etc. However, there are features missing in the Go port to
plan9, and other issues (see https://github.com/golang/go/labels/OS-Plan9).

- fhs

On Sat, Dec 28, 2019 at 2:55 PM Steve Simon  wrote:

> hi
> 
> i am interested to hear from in those using go under plan9.
> 
> what doesn't work? i know the build servers confirm the nightly build but
> they cannot check everything.
> 
> for example, does multicast work? if so does it work on x86, amd64, and
> arm (pi)?
> 
> secondly, is there a ports list, or a list of packages and apps
> successfully built?
> 
> i am toying with moving to plan9 as my main go development platform (for
> work). this sits on etcd, nats, and protobufs which should be
> straightforward, but also needs multicast which is a bit of a dusty corner
> in plan9.
> 
> i would also like to run a DLNA server for music and movies on plan9.
> there is a nifty ine in go (DMS) but anyone already tried porting it?
> 
> thanks for any/all help,
> 
> -Steve
> 

--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/T25dc9fda4f99337a-Mb7b0c119f0952ea9f6947228
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


Re: [9fans] git9 on 9legacy

2019-12-05 Thread Fazlul Shahriar
Very cool. I just tried and it seems to work.

patch/apply rc-line-split

This patch does not apply cleanly on 9legacy because of conflict with
rc-badrunes patch
(see http://www.9legacy.org/patch.html) which is included in 9legacy CD
image.

I've installed the commands in a "git9" directory instead of "git", so it
doesn't conflict with the 9legacy git script (
http://www.9legacy.org/9legacy/tools/git), which I still want to have
around for 'go get'. It's possible we can have a more complete git script
with the help of git9.

fhs

--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/T8be5c9b686015974-Mba1fca18cabf0967551ce54f
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


Re: [9fans] Is the vanilla Plan 9 still alive?

2019-11-24 Thread Fazlul Shahriar
On Sun, Nov 24, 2019 at 12:32 PM  wrote:

> > This is a good idea. Let me know how do you want to proceed.
>
> I will be busy working on other systems until December,
> but when I get back, I'll just make the chages to the
> wiki. If it's not editable,  I'll email a patch to the
> 9fans list.


The wiki seems to be editable. Run within acme:

Local srv net!9p.io!wiki wiki /mnt/wiki
Wiki /mnt/wiki/

I've updated few pages, include the mailing list page (
https://9p.io/wiki/plan9/mailing_lists/index.html) to link to 9fans
Topicbox.
All the man page links are broken, and this will require a change in
wikifs(4). Links to bell-labs.com in the html files in /sys/lib/wiki also
need to be updated.

fhs

--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/Tf6a8184d9a08179e-Mdf3a4a00f0a8e31328887d91
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


Re: [9fans] Is the vanilla Plan 9 still alive?

2019-11-21 Thread Fazlul Shahriar
9legacy might interest you: http://www.9legacy.org/intro.html


On Fri, Nov 22, 2019 at 1:29 AM  wrote:

> The site hasn't been updated since 2014-2015. If it's dead, is there any
> chance of it coming back into development?
> *9fans * / 9fans / see discussions
>  + participants
>  + delivery options
>  Permalink
> 
>

--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/Tb6b3aefeebeb526d-M413abc2162e702976f0dd665
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


Re: [9fans] moving 9fans to new server, but still 9fans@9fans.net

2019-10-24 Thread Fazlul Shahriar
Does 9fans-requ...@9fans.net still work for subscription? Can someone
update https://9p.io/wiki/plan9/mailing_lists/ since that's the first
result of a web search.

On Fri, Oct 11, 2019 at 12:58 PM Russ Cox  wrote:

> As you may know from the thread back in August, we've been running 9fans
> on a self-hosted Mailman on a VM instance, with a spam blocking service in
> front.
>
> I've been working with Calvin Morrison of Fastmail on moving 9fans over to
> Fastmail's hosted mailing list service, Topicbox.
>
> The list address remains 9fans@9fans.net.
> Searchable archives will be hosted at 9fans.topicbox.com/groups/9fans.
>
> I think everything is ready to cut over, and I plan to try after sending
> this message.  All addresses that were receiving mail from the old system
> should start receiving mail from Topicbox automatically, and we've
> preserved the "digest or not" bit as well. To manage your subscription, log
> in to topicbox at 9fans.topicbox.com.
>
> If all goes well, this will be the last message sent through the old
> system.
> I will follow up with a message through the Topicbox system after the
> cutover.
>
> Best,
> Russ
>

--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/T73a7388a716e3644-M126b44aef4fcfcb757d8fe4d
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


Re: [9fans] Desktop File for Acme [plan9port]

2019-09-11 Thread Fazlul Shahriar
This works for me:

$ cat ~/.local/share/applications/acme.desktop
[Desktop Entry]
Version=1.0
Type=Application
Categories=Development
Name=Acme
Comment=
Exec=/home/fhs/bin/sh/acmestart
Icon=/usr/local/plan9/mac/spaceglenda.png
Path=/home/fhs
Terminal=false
StartupNotify=false

On Wed, Sep 11, 2019 at 8:10 PM Parker Ellertson 
wrote:

> I'm trying to set up a desktop entry so I can launch acme w/o opening a
> spare terminal.  So far I have this in the entry:
> ```
> [Desktop Entry]
> Version=1.0
> Type=Application
> Exec=/home/parker/bin/acme.rc &
> Terminal=true
> Name=Acme
> Icon=/usr/local/plan9/mac/spaceglenda.png
> ```
> And the executable file is:
> ```
> #!/usr/bin/env rc
>
> TERM=dumb
> plumber
>
> fn cd { builtin cd $1 && awd $sysname }
> tabstop=4
>
> #font='/mnt/font/Lucida Grande/15a/font'
> #font='/mnt/font/Roboto Regular/14a/font'
> #font='/mnt/font/Noto Sans/13a/font'
>
> lfont=/mnt/font/UnifontMedium/10a/font
> font=$lfont
>
> SHELL=rc
> exec acme -a -f $font -F $lfont $*
> ```
> The script works when I launch it in a terminal.  But I can't figure out
> why it isn't working via the desktop entry.  I had `terminal` set to
> false before and it didn't work.  But when I set it to true, I see a
> terminal screen flicker for a moment before it vanishes again.  Anyone
> here have any luck with doing this?
>
>


Re: [9fans] Someone made a Wayland compositor based on Rio, Wio

2019-05-02 Thread Fazlul Shahriar
I just gave it a try. Yes, wio can run inside wio.

This is what I had to do to build it:

git clone https://git.sr.ht/~sircmpwn/wio
cd wio
git clone https://github.com/swaywm/wlroots.git subprojects/wlroots
meson build
cd build
ninja
./wio # pops up a window with wio


fhs

On Thu, May 2, 2019 at 1:21 AM Skip Tavakkolian 
wrote:

> Can Wio run inside Wio? Broadly speaking, that's the essence of Rio.
>
> On Wed, May 1, 2019, 9:13 PM Ryan Gonzalez  wrote:
>
>> https://wio-project.org/
>>
>> 2/10 name, 9/10 demo, can't win it all I guess ¯\_(ツ)_/¯
>>
>


Re: [9fans] searching in email using imap

2011-08-27 Thread Fazlul Shahriar
If you're using the p9p mailfs, you can do this:

echo keyword | 9p rdwr mail/mbox/search

and it'll print the ids of the matched messages. I don't think an
interface for this exists in acme Mail.

fhs

On Sat, Aug 27, 2011 at 2:55 PM, Rudolf Sykora rudolf.syk...@gmail.com wrote:
 Hello,

 when using gmail via web, one
 i) immediately sees what folders/labels they have,
 ii) can search the mail (i.e. also its contents).

 I'd like to know how one can/could obtain this information when using imap.
 I believe (I read it somewhere) that imap has some means to ask the
 server to search the mail...
 (It'd be nice to have such possibility somehow integrated into acme/Mail.)

 Can anybody comment on this?

 Thanks!
 Ruda





Re: [9fans] mail client; general question web vs command

2011-08-13 Thread Fazlul Shahriar
 % mailfs -t imap.gmail.com
 /sbin/stunnel exec failed at /usr/sbin/stunnel3 line 39.
 mailfs: imapconnect: no greeting

I think your stunnel3 is broken. stunnel3 is actually a perl script
that runs stunnel 4. In your case, it thinks stunnel 4 is at
/sbin/stunnel, but it's not.

fhs



Re: [9fans] mail client; general question web vs command

2011-08-11 Thread Fazlul Shahriar
I just tried -- it works fine with gmail.

mailfs -t imap.gmail.com# -t enable TLS
It'll ask your for your username/password. Then start Mail in acme.

mailfs will look for stunnel in your system. In my system, it found
stunnel 4, which it doesn't know how to use. So, I had to point it to
stunnel3:

--- a/src/cmd/upas/nfs/imap.c   Thu Aug 11 07:43:28 2011 -0400
+++ b/src/cmd/upas/nfs/imap.c   Thu Aug 11 08:12:24 2011 -0400
@@ -756,8 +756,8 @@
fd[2] = dup(2, -1);
tmp = esmprint(%s:993, server);
if(threadspawnl(fd, tlsclient, tlsclient, tmp, nil)  0
-threadspawnl(fd, /usr/sbin/stunnel, stunnel, -c, 
-r,
tmp, nil)  0
-threadspawnl(fd, /usr/bin/stunnel, stunnel, -c, 
-r,
tmp, nil)  0){
+threadspawnl(fd, /usr/sbin/stunnel3, stunnel, -c,
-r, tmp, nil)  0
+threadspawnl(fd, /usr/bin/stunnel3, stunnel, -c, 
-r,
tmp, nil)  0){
free(tmp);
close(p[0]);
close(p[1]);


On Thu, Aug 11, 2011 at 6:42 AM, Rudolf Sykora rudolf.syk...@gmail.com wrote:
 Can anybody point me to some recipe which would get me from a point
 when I have p9p installed to a point when I can read mail from my
 gmail account via imap(s) in p9p acme?

 Well, that's a pity nobody can help :(

 Is there any reason for that man pages of p9p
 http://swtch.com/plan9port/man/
 do not mention neither upas nor mail?
 (So nobody actually uses it today?)

 Also, although some mail program is present,
 /src/cmd/acme/mail
 it is apparently not installed by default?

 [I'm tired of the web interface. I tried mutt, which was easy to set
 up since you can find instructions for this. But I want the acme mail.
 And there seem to be many things `somehow around', but not a coherent
 explanation of how to put the pieces (and which) together...]

 Thanks
 Ruda





Re: [9fans] simple venti demo:

2011-08-11 Thread Fazlul Shahriar
 Is it goinstallable?  If so, I'm not sure what I'm doing wrong.  I very
 rarely use any 3rd party Go code but my own :-).

goinstall govt.googlecode.com/hg/vt/vtclnt
goinstall govt.googlecode.com/hg/vt/vtsrv

Works for me.

fhs



Re: [9fans] simple venti demo:

2011-08-11 Thread Fazlul Shahriar
On Thu, Aug 11, 2011 at 5:42 PM, David Leimbach leim...@gmail.com wrote:


 On Thu, Aug 11, 2011 at 2:19 PM, Fazlul Shahriar fshahr...@gmail.com
 wrote:

  Is it goinstallable?  If so, I'm not sure what I'm doing wrong.  I very
  rarely use any 3rd party Go code but my own :-).

 goinstall govt.googlecode.com/hg/vt/vtclnt
 goinstall govt.googlecode.com/hg/vt/vtsrv

 Works for me.

 fhs

 strings.SplitN is not there... I must be a release or so behind for go?


yes, SplitN was introduced in release r59. Latest weekly will also work.

fhs



Re: [9fans] Plan 9 Go (Was: GNU/Linux/Plan 9 disto)

2011-07-14 Thread Fazlul Shahriar
On Thu, Jul 14, 2011 at 4:21 PM, Lucio De Re lu...@proxima.alt.za wrote:
 It is possible to cross-compile Go on Linux for Plan 9, the details are
 a bit vague and I, for one, would not mind somebody rehashing them here
 or providing a pointer to them.

I have a script shown below that I source. Then, running ./make.bash
in $GOROOT/src will build and install everything. You can also build
tests using the host system's gotest (run with -c flag). I'm disabling
hg because codereview might attempt to run Plan 9's gofmt, etc, which
won't work and mess up your CL. More details about the environment
variables are here: http://golang.org/doc/install.html#environment

export GOROOT=/s/9vx/go
export GOOS=plan9
export GOARCH=386
export GOHOSTOS=linux
export GOHOSTARCH=386
export GOBIN=$GOROOT/bin
export 
PATH=$GOROOT/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/games:$PLAN9/bin
export PS1=goplan9; 
alias goplan9=:
alias gotest=$HOME/go/bin/gotest
alias gofmt=$HOME/go/bin/gofmt
alias hg='echo this is a cross-compile env'



Re: [9fans] 9 Games of Go

2009-08-31 Thread Fazlul Shahriar
It might be worth the effort to implement Go Text Protocol
(http://www.lysator.liu.se/~gunnar/gtp/), just in case you're having
trouble finding people to play with.

Anyway, nice work.

fhs

2009/8/31 Akshat Kumar aku...@mail.nanosouffle.net:
 With the hopes of playing Go amongst
 fellow Plan 9 users, I've written a little
 filesystem[1] which can currently be
 used for any two-player turn-based
 games.

 I'm currently working on Paurea's
 wonderful goban code, to implement
 support for reading from and writing to
 files, so that we have a working
 interface to use.
 I also have plans to add the same
 ability to Mirtchovski's port of GNU Go,
 so that the antisocial community can
 play amongst themselves (or oneself).

 The filesystem is meant to simulate
 a proper game server, through basic
 file and permissions operations.

 Creating a directory in the root of the fs
 is equivalent to a game room. The fs
 automatically creates two files: 'W' and
 'B' under the newly created dir, which
 correspond, respectively, to the positional
 data of white and black players.
 The files, as well as the directory, have
 uid and gid of the user who created
 them. When that user wants to play
 against someone, they set the gid of
 either 'W' or 'B' to their opponent's uname.
 To this effect, both files are mode 464.
 Both files block until new data is written.
 The fs implements no formatting restrictions
 to data -- it is left up to clients to agree on
 a format and use it for the duration of a game.
 (Oh what fun it might be to map the operations
 of a Chess game to that of Go)
 In this way, the fs implements only one real
 rule, which is general enough for any sort of
 game (in this class): once either 'W' or 'B' is
 written, a dirty flag is set on the file, so it
 may not again be written to, until the other file
 has been written.

 There are a few things left to do still, and they
 are briefly documented in the NOTES[2] file.

 I crave feedback, so please do not hesitate.
 Programming suggestions, fs implementations,
 and the like, all more than welcome. Privately,
 or publicly.


 Best,
 ak

 [1] The source can be found in
 /n/sources/contrib/akumar/α/gofs

 [2] /n/sources/contrib/akumar/α/gofs/NOTES

 For convenience, I've attached just the gofs
 source file to this mail. Let me know if this is
 undesirable.




Re: [9fans] mkindex of dict(7)

2009-01-06 Thread Fazlul Shahriar
Hi,

You need to sort your index file. Looks like dict(7) is doing binary
search on it. After sorted, it works fine.

fhs

On Tue, Jan 6, 2009 at 12:34 AM, Akshat Kumar
aku...@sounine.nanosouffle.net wrote:
 Regarding the dict index files, what I understand is that dict(7)
 receives a pattern (may also be a byte offset or whatever, but suppose
 pattern), looks it up in the first fields of the lines in the dict
 index, and uses the corresponding byte offset in the index to find the
 full line in the dict file.  Well, I've been trying to make the EDICT
 dictionary[1] usable with dict(7), using just the simple dict scheme
 as described in /sys/src/cmd/dict/simple.c, and have made (for now) a
kanji byte offset
 index file from the output of mkindex (piping through to sed and
 switching the order of the kanji and byte offset).  I've tried quite a
 few ways of making that index file, but have yet not succeeded in
 getting dict(7) to actually find a corresponding line in the dict file
 (`pattern not found'), given any kanji in the first fields in the
 index file as a pattern.

 I cannot attach the index file nor the dictionary file with this
 E-Mail, since both are too big -- though I've put them online[2] --
 but the dictionary file made available at [1] is in a slightly
 different format (inserted tab after each kanji/kana) and charset
 (EUC-JP/JIS X 0208 → UTF-8) than I have converted at [2].  If anyone
 is willing to help figure this out, I'd be very grateful.


 [1] http://www.csse.monash.edu.au/~jwb/edict_doc.html
(see FORMAT for default formatting, and CURRENT VERSION  DOWNLOAD
 to grab edict.gz)
 [2] http://sounine.nanosouffle.net/magic/webls?dir=/comp/dict


 Please alert me if the information here is insufficient --
 I also don't mind if you go ahead and make the dict files yourself...
 just let me in on it --
 ak


[9fans] sftpfs

2008-07-02 Thread Fazlul Shahriar
Hello,

I wrote a file server for the SSH File Transfer Protocol (SFTP).  You
can find it here:

http://www.tip9ug.jp/who/fhs/sftpfs.tgz

It implements version 3 of the protocol because that's the version
most widely use.  At least OpenSSH uses version 3.  Also, it requires
that you have the OpenSSH port install (see README).

Anyway, enjoy!

fhs

PS.
This is my first 9p fs, so I'm not responsible for data loss ☺




Re: [9fans] sftpfs

2008-07-02 Thread Fazlul Shahriar
 Please could you put it in sources/contrib rather than in an external host?

I will once I get my contrib directory.

fhs




Re: [9fans] rc bug

2008-07-01 Thread Fazlul Shahriar

I saw something similar before, but unfortunately, the patch below
doesn't fix it.

cpu% fn 'file?' { test -f $* }
cpu% 'file?' /LICENSE
cpu% echo $status

cpu% 'file?' /foo
cpu% echo $status
test 145387: false
cpu% rc
cpu% 'file?' /LICENSE
rc: can't open /env/fn#file?: bad character in file name: '/env/fn#file?'
file?: '/bin/file?' file does not exist
cpu% 'file?' /LICENSE
file?: '/bin/file?' file does not exist
cpu% unicode 
0001
cpu% 


 it appears something is going wrong
 with rc's local assignments.  ifs has the usual
 value.
 
 ; font=/lib/font/bit/cyberbit/mod*.font rio
 rio: can't access /lib/font/bit/cyberbit/mod*.font: bad character in file 
 name: '/lib/font/bit/cyberbit/mod*.font'
 ; unicode 
 0001
 ; echo /lib/font/bit/cyberbit/mod*.font
 /lib/font/bit/cyberbit/mod14.font
 ; x=/lib/font/bit/cyberbit/mod*.font
 ; whatis x
 x=/lib/font/bit/cyberbit/mod14.font
 
 % diff -c /n/sources/plan9/sys/src/cmd/rc/exec.c .
 /n/sources/plan9/sys/src/cmd/rc/exec.c:751,759 - ./exec.c:751,761
   }
   deglob(runq-argv-words-word);
   runq-local = newvar(strdup(runq-argv-words-word), runq-local);
 - runq-local-val = copywords(runq-argv-next-words, (word *)0);
 - runq-local-changed = 1;
   poplist();
 + globlist();
 + runq-local-val = runq-argv-words;
 + runq-local-changed = 1;
 + runq-argv-words = 0;
   poplist();
   }
   
 % 




Re: [9fans] 9vx os x

2008-06-29 Thread Fazlul Shahriar
 Does anyone else get errors about missing files when pulling? Many
 other files are copied successfully before this:
 
 error: copying /n/boot/sys/src/games/mp3dec/COPYING:
 '/n/boot/sys/src/games' does not exist
 
 error: copying /n/boot/sys/src/games/mp3dec/COPYRIGHT:
 '/n/boot/sys/src/games' does not exist
 
 error: copying /n/boot/sys/src/games/mp3dec/D.dat:
 '/n/boot/sys/src/games' does not exist
 
 error: copying /n/boot/sys/src/games/mp3dec/README:
 '/n/boot/sys/src/games' does not exist
 
 ...

Try:
mkdir -p /sys/src/games/mp3dec
and the pull again

 Also, which man page(s) would I read to know how to work with special
 files like #Z? I am unsure of what to do when I get errors like this:
 
 term% src echo
 src: can't find source for /bin/echo - unrecognized type special file #Z/echo

#Z is the root of the host system. #Zplan9 is 9vx's root

It seems anything that assume Dir.type == 'M' is broken.  This
includes file(1) which is used by src(1), and also diff(1).  Probably
others.

fhs




Re: [9fans] I/O load crashes Qemu

2008-06-13 Thread Fazlul Shahriar
On Thu, Jun 12, 2008 at 9:54 PM, Venkatesh Srinivas [EMAIL PROTECTED] wrote:
 Hi,

 I currently use Plan 9 in qemu 0.9.1; whenever I try to do anything I/O
 demanding such as unpacking a ~100MB tarball, qemu locks up and refuses
 further connections (via vnc, or gdb for example). I am using fossil
 alone. This behavior occurs whether kqemu is enabled or not, though it
 happens a lot faster w/o kqemu.

 Has anyone else noticed anything like this? Any thoughts about running
 Plan 9 in qemu?

Yes, I had this problem several times while doing replica/pull
yesterday. Qemu uses up all cpu load, and does not respond. Sometimes
it comes back on from the lock up, while other times I lose my
patience and kill it. I went back to 0.9.0. Lets see if I have the
same problem.

fhs