Re: [9fans] clarification needed

2009-02-20 Thread Akshat Kumar
I'm Kumar.

Also, the one that isn't Harold.
ak
--- Begin Message ---
> > your horrible joke gave me an idea to photochop jmk and brucee in this pic:
> >
> > http://gnathaniel.files.wordpress.com/2007/10/harold_and_kumar_go_to_white_castle__1_.jpg
> >
> > but, like so many other things plan9, i didn't. so i posted to 9fans.
> 
> Dude.  I will PAY you money

does that go double for harold and kumar escape from gitmo?
by the way, which one's kumar?

- erik
--- End Message ---


Re: [9fans] clarification needed

2009-02-20 Thread erik quanstrom
> > your horrible joke gave me an idea to photochop jmk and brucee in this pic:
> >
> > http://gnathaniel.files.wordpress.com/2007/10/harold_and_kumar_go_to_white_castle__1_.jpg
> >
> > but, like so many other things plan9, i didn't. so i posted to 9fans.
> 
> Dude.  I will PAY you money

does that go double for harold and kumar escape from gitmo?
by the way, which one's kumar?

- erik



Re: [9fans] clarification needed

2009-02-20 Thread Dan Cross
On Fri, Feb 20, 2009 at 12:35 AM, andrey mirtchovski
 wrote:
> On Thu, Feb 19, 2009 at 10:28 PM, Andrew Simmons  wrote:
>> Is this exchange part of the script for the forthcoming reality TV
>> show "Harold and Kumar go to Murray Hill" ?
>
> your horrible joke gave me an idea to photochop jmk and brucee in this pic:
>
> http://gnathaniel.files.wordpress.com/2007/10/harold_and_kumar_go_to_white_castle__1_.jpg
>
> but, like so many other things plan9, i didn't. so i posted to 9fans.

Dude.  I will PAY you money

- Dan C.



[9fans] proxy server

2009-02-20 Thread Kenji Arisawa

Hello,

I have written HTTP proxy server that runs on Plan 9 and is written in  
Lua.

Look http://plan9.aichi-u.ac.jp/netlib/lua/

I developed "proxy.lua" to inspect live HTTP communication
therefore the server does nothing but transfer.
However  I believe adding other functionalities is not so difficult.

Kenji Arisawa




[9fans] SIGCSE (was Westin lax for scale 7)

2009-02-20 Thread blstuart
> Any 9fans here? We could do a bof.

Ron's post reminds me.  Are there going to be any
9fans or Inferno fans at SIGCSE in a couple weeks?
If anyone else is interested, I'd be up for an impromptu
bof.

BLS




Re: [9fans] page(1)

2009-02-20 Thread Federico G. Benavento
hola,

I haven't had the time to debug it, but readpng() changed
in the last days and it doesn't work correctly anymore.
I jdid yesterday -c /386/bin/png and everything went
back to normal.

On Fri, Feb 20, 2009 at 10:49 PM, erik quanstrom  wrote:
> On Fri Feb 20 20:29:55 EST 2009, aku...@mail.nanosouffle.net wrote:
>
>> Neither works for me.
>>
>> term% hget http://9grid.es/screens/screen1.png|page
>> reading through graphics...
>> warning: couldn't read image: readimage: read count 32400 not 64800: screen 
>> id in use
>>
>
> you should also try running png directly from sources.
> assuming that this does not work, ...
>
> it seems that here:
> /sys/src/libdraw/readimage.c:103
>
>m = readn(fd, tmp, n);
>if(m != n){
 werrstr("readimage: read count %d not %d: %r", m, n);
>   Err:
>if(dolock)
>lockdisplay(d);
>
> things are getting confused.  i think it would
> be easier to debug if you added
>
>werrstr("");
>
> right before the readn() and recompiled png.
> i can't quite see how that error message could
> result from reading an image.
>
> - erik
>
>



-- 
Federico G. Benavento



Re: [9fans] page(1)

2009-02-20 Thread erik quanstrom
On Fri Feb 20 20:29:55 EST 2009, aku...@mail.nanosouffle.net wrote:

> Neither works for me.
> 
> term% hget http://9grid.es/screens/screen1.png|page
> reading through graphics...
> warning: couldn't read image: readimage: read count 32400 not 64800: screen 
> id in use
> 

you should also try running png directly from sources.
assuming that this does not work, ...

it seems that here:
/sys/src/libdraw/readimage.c:103

m = readn(fd, tmp, n);
if(m != n){
>>> werrstr("readimage: read count %d not %d: %r", m, n);
   Err:
if(dolock)
lockdisplay(d);

things are getting confused.  i think it would
be easier to debug if you added

werrstr("");

right before the readn() and recompiled png.
i can't quite see how that error message could
result from reading an image.

- erik



Re: [9fans] page(1)

2009-02-20 Thread Akshat Kumar
No, they don't work in png(1) either:

term% hget http://9grid.es/screens/screen1.png|png
png: loadimage  of 243 bytes failed: loadimage: insufficient data

term% png n/dump/usr/akumar/plan9/screens/nihongonokawa.png
png: loadimage n/dump/usr/akumar/plan9/screens/nihongonokawa.png of 1310720 
bytes failed: loadimage: insufficient data

(the latter is a snapshot of /dev/screen taken with topng(1))
ak
--- Begin Message ---
On Fri, Feb 20, 2009 at 5:03 PM, Akshat Kumar
 wrote:
> Lately, page has been having troubles displaying an increasing number
> of PNG image files.  I'm not sure whether this is due to any recent
> changes or what...  Even a PNG of /dev/screen taken with topng(1)
> renders just the dreaded question-marks.

If they fail in page, do they work in png?
Do you happen to have another program
named "png" in your path before /bin/png?

Russ
--- End Message ---


Re: [9fans] page(1)

2009-02-20 Thread Russ Cox
On Fri, Feb 20, 2009 at 5:03 PM, Akshat Kumar
 wrote:
> Lately, page has been having troubles displaying an increasing number
> of PNG image files.  I'm not sure whether this is due to any recent
> changes or what...  Even a PNG of /dev/screen taken with topng(1)
> renders just the dreaded question-marks.

If they fail in page, do they work in png?
Do you happen to have another program
named "png" in your path before /bin/png?

Russ



Re: [9fans] page(1)

2009-02-20 Thread Akshat Kumar
Neither works for me.

term% hget http://9grid.es/screens/screen1.png|page
reading through graphics...
warning: couldn't read image: readimage: read count 32400 not 64800: screen id 
in use
--- Begin Message ---
On Fri Feb 20 20:05:49 EST 2009, aku...@mail.nanosouffle.net wrote:
> Lately, page has been having troubles displaying an increasing number
> of PNG image files.  I'm not sure whether this is due to any recent
> changes or what...  Even a PNG of /dev/screen taken with topng(1)
> renders just the dreaded question-marks.
> 
> Any ideas what's going on here (as a simple test, you can first try
> the screenshot on 9grid.es, which is a PNG, and also isn't rendered
> by page(1) for me, then you can try taking your own snapshot with
> topng(1))?

both of these work for me:

; hget http://9grid.es/screens/screen1.png|page
; hget http://9grid.es/screens/screen1.png|/n/sources/plan9/386/bin/page 

- erik
--- End Message ---


Re: [9fans] page(1)

2009-02-20 Thread erik quanstrom
On Fri Feb 20 20:05:49 EST 2009, aku...@mail.nanosouffle.net wrote:
> Lately, page has been having troubles displaying an increasing number
> of PNG image files.  I'm not sure whether this is due to any recent
> changes or what...  Even a PNG of /dev/screen taken with topng(1)
> renders just the dreaded question-marks.
> 
> Any ideas what's going on here (as a simple test, you can first try
> the screenshot on 9grid.es, which is a PNG, and also isn't rendered
> by page(1) for me, then you can try taking your own snapshot with
> topng(1))?

both of these work for me:

; hget http://9grid.es/screens/screen1.png|page
; hget http://9grid.es/screens/screen1.png|/n/sources/plan9/386/bin/page 

- erik



Re: [9fans] Westin lax for scale 7

2009-02-20 Thread ron minnich
On Fri, Feb 20, 2009 at 4:43 PM, Geoffrey Avila  wrote:
>
> When will you be there? Does Sandia have a booth?
>

we have a coreboot booth. Sadly, this time, no "boot plan9 on
coreboot" demos, there just was not time.

ron



[9fans] page(1)

2009-02-20 Thread Akshat Kumar
Lately, page has been having troubles displaying an increasing number
of PNG image files.  I'm not sure whether this is due to any recent
changes or what...  Even a PNG of /dev/screen taken with topng(1)
renders just the dreaded question-marks.

Any ideas what's going on here (as a simple test, you can first try
the screenshot on 9grid.es, which is a PNG, and also isn't rendered
by page(1) for me, then you can try taking your own snapshot with
topng(1))?


ak




Re: [9fans] Westin lax for scale 7

2009-02-20 Thread Geoffrey Avila

When will you be there? Does Sandia have a booth?

-GBA



> Any 9fans here? We could do a bof.
>
> Ron
>
>




Re: [9fans] Westin lax for scale 7

2009-02-20 Thread erik quanstrom
On Fri Feb 20 19:13:57 EST 2009, aku...@mail.nanosouffle.net wrote:

> bof?
> 

birds of a feather.  it's a conference thing.

- erik



Re: [9fans] Westin lax for scale 7

2009-02-20 Thread Akshat Kumar
bof?
--- Begin Message ---
Any 9fans here? We could do a bof.

Ron

-- 
Sent from my mobile device
--- End Message ---


[9fans] Westin lax for scale 7

2009-02-20 Thread ron minnich
Any 9fans here? We could do a bof.

Ron

-- 
Sent from my mobile device



Re: [9fans] impact of dynamic libraries on the speed of fork()

2009-02-20 Thread Micah Stetson
> I wrote a really simple program, forktest.c.

Chris beat me to the punch, but I'm posting anyway because I went a
different direction.  I wrote some rc scripts that make static and
dynamic libraries of various sizes and programs that use those
libraries (trivially).  For each number of functions 1, 10, 100, 1000,
1, 10 I timed static and dynamic execution of a program that
conditionally calls that many functions in 1 or 10 libraries.  The
scripts are attached, run mklibs, then mkprogs, then runtests.  Below
are the results of a single run on my laptop (fixed with font looks
better).  I can't spend any more time on this, but it was a fun
morning goof-off.

Static (functions libraries binary-size user system elapsed)
 1  1  556898 0.24 0.50 0.78
10  1  557324 0.28 0.44 0.82
10 10  557913 0.32 0.42 0.81
   100  1  561737 0.24 0.50 0.84
   100 10  562196 0.28 0.46 0.79
  1000  1  609496 0.29 0.47 0.83
  1000 10  606381 0.26 0.48 0.84
 1  1 1105475 0.30 0.44 0.87
 1 10 1083834 0.28 0.47 0.82
10  1 6245494 0.27 0.48 0.88
10 10 6043871 0.28 0.48 0.81

Dynamic (functions libraries binary-size user system elapsed)
 1  1 6489 0.49 0.86 1.39
10  1 7322 0.52 0.86 1.45
10 10 7464 0.83 1.14 2.03
   100  116366 0.59 0.78 1.42
   100 1016177 1.14 1.11 2.35
  1000  1   108268 0.55 0.87 1.47
  1000 10   104496 0.88 1.12 2.07
 1  1  1077758 0.81 0.98 1.89
 1 10  1037387 1.12 1.36 2.63
10  1 10915272 2.79 2.50 6.31
10 10 10517862 3.13 3.68 7.13

I think dynamic 100-10 is a fluke, I also think it's interesting that
the dynamic binaries are bigger above 1 function calls.  Don't
know why, don't have time to figure it out.

Micah


mklibs
Description: Binary data


mkprog
Description: Binary data


mkprogs
Description: Binary data


runtests
Description: Binary data


Re: [9fans] impact of dynamic libraries on the speed of fork()

2009-02-20 Thread erik quanstrom
On Fri Feb 20 14:35:45 EST 2009, cmbran...@cox.net wrote:
> I wrote a really simple program, forktest.c.
> Next, I performed some experiments using this program.  Fork is faster
> for statically linked executables.  It becomes slower as more libraries
> are added to a dynamically linked executable.
> These tests were done on an x86 machine running Linux.
> Here is a transcript of my experiments, followed by the source for forktest.
> 
> -- Chris

very nice.  

i wonder if you may be measuring the performance
of memory management more than the performance of dynamic
linking.  the reason i suspect this is because on my p3 machine i see

gcc static  13440 f/s
gcc dyn 12953 f/s
gcc static 6963 fork + exec/s

or the tipoff is the size of the executable:

; ls -l a.out
-rwxr-xr-x 1 quanstro users 609298 Feb 20 14:36 a.out

for snarky comparison, here are the programs on my system that
are that large or larger:
--rwxrwxr-x M 48625 sys  sys13275174 Jan 16  2006 /bin/gs
--rwxrwxr-x M 48625 sys  sys  758520 Dec  9  2005 /bin/spin

the hard bit would be keeping the memory footprint the
same while increasing the number of shared libraries.

even in bad cases, this is like 0.2ms/fork + exec.
i wonder if the reason that there can be such big
differences is that linux fork+exec may have been
massaged for such syntetic benchmarks.  thus small
amounts of extra work might look big.

- erik



Re: [9fans] impact of dynamic libraries on the speed of fork()

2009-02-20 Thread Brian L. Stuart
> I wrote a really simple program, forktest.c.
> Next, I performed some experiments using this program.  Fork is faster
> for statically linked executables.  It becomes slower as more libraries
> are added to a dynamically linked executable.

What fascinates me here is that forktest doesn't even
use anything from those other libraries.  In the statically
linked case, listing an unneeded library is basically a
noop.  It appears to be rather more involved in the
world of GNU shared libraries.

BLS




[9fans] impact of dynamic libraries on the speed of fork()

2009-02-20 Thread Chris Brannon
I wrote a really simple program, forktest.c.
Next, I performed some experiments using this program.  Fork is faster
for statically linked executables.  It becomes slower as more libraries
are added to a dynamically linked executable.
These tests were done on an x86 machine running Linux.
Here is a transcript of my experiments, followed by the source for forktest.

-- Chris

--- begin transcript ---
Script started on Fri 20 Feb 2009 01:23:10 PM CST
% dietcc forktest.c # link statically against dietlibc
% ./a.out
30864.1 forks per second
% gcc forktest.c # compile with gcc, dynamic linking
% ./a.out
15723.3 forks per second
% gcc forktest.c -lm # pull in the math library
% ./a.out
14792.9 forks per second
% gcc forktest.c -lm -lcurses
% ./a.out
13888.9 forks per second
% gcc forktest.c -lm -lcurses -lpthread
% ./a.out
11961.7 forks per second
% . gcc forktest.c -lm -lcurses -lpthread -lresolv
% ./a.out
11013.2 forks per second
% gcc forktest.c -lm -lcurses -lpthread -lresolv -lssl
% ./a.out
8250.83 forks per second
% gcc forktest.c -lm -lcurses -lpthread -lresolv -lssl -lreadline
% ./a.out
7961.78 forks per second
% exit

Script done on Fri 20 Feb 2009 01:27:20 PM CST
--- end transcript ---

---begin forktest.c---
#include 
#include 
#include 
#include 
#include 
#include 
#include 

int
main(void)
{
double elapsed_secs;
int forks = 0;
clock_t start = clock(), elapsed;
int i;
for(i = 0; i < 25000; i++) {
int waitstatus;
switch (fork()) {
case -1:
perror("fork");
break;
case 0:
exit(42);
default:
wait(&waitstatus);
++forks;
break;
}
}
elapsed = clock() - start;
elapsed_secs = (double)elapsed / CLOCKS_PER_SEC;
printf("%g forks per second\n", (double)forks / elapsed_secs);
exit(0);
}
---end forktest.c---



Re: [9fans] Calling vac from C

2009-02-20 Thread erik quanstrom
On Fri Feb 20 11:18:41 EST 2009, urie...@gmail.com wrote:
> One of the main costs of dynamic linking is making fork much slower.
> Even on linux statically linked binaries fork a few magnitude orders
> faster than dynamically linked ones.
> 
> The main source of anti-fork FUD turns out to be the alleged
> 'solution' to a problem that didn't exist until the geniuses at Sun
> decided dynamic linking was such a wonderful idea.

very generally, i agree with the direction of your
post.  but i do remember things a bit differently.

iirc, this went the other way 'round.  fork itself
was very expensive on sun hardware in the early
90s if one had some memory mapped.  sun mmus
had issues.  i benchmarked a vax 11/780 vs a sun
670mp.  the 4x50mhz 670mp was scheduled to replace the
1x5mhz (?) vaxen.  the vax forked maybe 10x faster when no
memory was allocated.  however, when a moderate
amount of memory was allocated, the vax pounded
the sun by many (3, i think) of magnitude.

i posted this info way back when, but can't find
a reference.

threading became a really hot topic at the time,
too.  maybe just coincidence, but i'm sure it didn't
hurt to be able to show such great improvement.

the fork test run on my underpowered p3 machine
gets 1800µs/fork-exec.  since the p3 does 1836 bogomips
and the i7 does 43173, it's safe to assume that linux
has fine fork performance, given a reasonable amount
of shared libraries.

it would be very interesting if someone would
see how fork performance relates to the size and
number of dynamic libraries.  i'm not sure i know
how to do this without devoting weeks to the project.

- erik



Re: [9fans] Calling vac from C

2009-02-20 Thread Uriel
One of the main costs of dynamic linking is making fork much slower.
Even on linux statically linked binaries fork a few magnitude orders
faster than dynamically linked ones.

The main source of anti-fork FUD turns out to be the alleged
'solution' to a problem that didn't exist until the geniuses at Sun
decided dynamic linking was such a wonderful idea.

On linux with ancient hardware one can do hundreds of forks per second
without any problems, it works great for werc[1], and it is amusing to
see people inventing hacks like fcgi and writing pthreaded web servers
to avoid as much as one fork call per request, when making hundreds of
them is a non-issue.

An example of how one mistake in systems design(introduction of
dynamic linking) leads to even greater mistakes down the road
(pthreads, fcgi, all kinds of hacks to avoid fork), and people never
steps back to think if the original design decision was really worth
it.

Peace

uriel

[1]: http://werc.cat-v.org

On Fri, Feb 20, 2009 at 4:41 PM, erik quanstrom  wrote:
>> I believe that
>> 1) Its too much trouble parsing the output everytime.
>
> i don't buy that.  that takes very little code.  since you
> have evidently already written the code, the cost
> is zero.
>
> (if you're worried about runtime, i measure parsing
> time at 338ns on a core i7 920.  cf. attached digestspd.c)
>
>> 2) Calling some function from an included library will be faster.
>
> maybe.  are you sure that it matters?  i measure
> base fork/exec latency on a 1.8ghz xeon5000 at 330µs.
> (files served from the fileserver, not a ram disk.)
> the attached fork.c and nop.c were used to do the
> measurement.  i measure vac throughput at ~3mb/s
> for small files from a brand new venti running from a
> ramdisk.  the venti was tiny with 5mb isect and 100mb
> arenas, and empty.  at that rate, 330µs will cost you
> 1038 bytes, or 0.3%.
>
> remember that dynamic linking isn't free.  that cost
> assumes that dynamic linking is free, and it is not.
>
> - erik



Re: [9fans] Mail configuration

2009-02-20 Thread erik quanstrom
> Hi there,
> I am using plan9port on linux, and I want to be able to read mail from
> some account I have in some server running IMAP.
> Since this is the first time I try to configure a mail client (gmail
> is just so easy) I have no clue on what exactly I should do or if it
> is even possible to read mail using plan9's utilities on linux.
> The wiki has something about reading email on plan 9, but I do not
> know if this should work also for plan9port (to begin with I cannot
> find upas/fs).
> Probably this a stupid question, so I hope someone could give me some
> pointers to start with.

there is a very old, very awful, totally unsupported
port of upas to p9p in /n/sources/contrib/quanstro/p9p/upas.tbz.
upas/fs did work.

- erik



Re: [9fans] Mail configuration

2009-02-20 Thread erik quanstrom
> distribution; the file tree is slightly different
> than the standard upas/fs (more faithful to imap).
> It downloads pieces of the message as it
> needs them, so if you have big attachments,
> they don't get downloaded until you ask for them.
[..]
> I used this setup for a few years against a dovecot
> imap server.  It does not work against the
> gmail imap server, because gmail imap
> will not serve the full mime tree of the message;
> it only gives you the raw message bytes.

(n)upas/fs imap4 client uses the body[] syntax
to download blocks from the message.  this technique
also works on gmail.  however, gmail lies about message
sizes so there's a bit of extra work.

> Messages saved with the Save command
> go into imap folders, not local files.

cool.  (n)upas lacks this ability, but has the framework
for adding it.  it would take a little work to figure out
how to handle defaulting to the imap server or
to another folder.  the folder selection code is
already horrible.

- erik



Re: [9fans] Calling vac from C

2009-02-20 Thread erik quanstrom
> I believe that
> 1) Its too much trouble parsing the output everytime.

i don't buy that.  that takes very little code.  since you
have evidently already written the code, the cost
is zero.

(if you're worried about runtime, i measure parsing
time at 338ns on a core i7 920.  cf. attached digestspd.c)

> 2) Calling some function from an included library will be faster.

maybe.  are you sure that it matters?  i measure
base fork/exec latency on a 1.8ghz xeon5000 at 330µs.
(files served from the fileserver, not a ram disk.)
the attached fork.c and nop.c were used to do the
measurement.  i measure vac throughput at ~3mb/s
for small files from a brand new venti running from a
ramdisk.  the venti was tiny with 5mb isect and 100mb
arenas, and empty.  at that rate, 330µs will cost you
1038 bytes, or 0.3%.

remember that dynamic linking isn't free.  that cost
assumes that dynamic linking is free, and it is not.

- erik#include 
#include 
#include 

static int
nibble(int c)
{
if(c >= '0' && c <= '9')
return c - '0';
if(c < 0x20)
c += 0x20;
if(c >= 'a' && c <= 'f')
return c - 'a'+10;
return 0xff;
}

static void
bindigest(char *s, uchar *t)
{
int i;

if(strlen(s) != 2*SHA1dlen)
sysfatal("bad digest %s", s);
for(i = 0; i < SHA1dlen; i++)
t[i] = nibble(s[2*i])<<4 | nibble(s[2*i + 1]);
}

static char *vs = "vac:da6b4b5549383cffc1b5691d824fc4bd381f0f6b";

void
main(void)
{
int i, n;
uchar score[SHA1dlen];
uvlong t0, t1;

n = 1000*1000;
t0 = nsec();
for(i = 0; i < n; i++){
if(strncmp(vs, "vac:", 4) == 0)
bindigest(vs + 4, score);
else
sysfatal("bad digest");
}
t1 = nsec();
print("%g\n", 1.*(t1 - t0)/(1.*n));
exits("");
}#include 
#include 

char *argv[] = {"nop", 0};

void
main(void)
{
int i, n;
uvlong t0, t1;

n = 1;
t0 = nsec();
for(i = 0; i < n; i++)
switch(fork()){
case 0:
exec(*argv, argv);
_exits("exec");
case -1:
sysfatal("fork");
default:
free(wait());
}
t1 = nsec();
print("%g\n", 1.*(t1 - t0)/(1.*n));
exits("");
}#include 
#include 
void
main(void)
{
exits("");
}

[9fans] tlssrv and tlsclient

2009-02-20 Thread Kenji Arisawa

Hello,

I am hung up! Please any one help me.

io% aux/listen1 'tcp!*!8010' /bin/tlssrv -c/sys/tls/cert /bin/aux/ 
trampoline 'tcp!io!7'


term% tlsclient tcp!io!8010
tlsclient: tlsclient: devtls expected ver=301, saw (len=28207) type=2f  
ver=6269 '/bin/�H��!'

term%

tlssrv and tlsclient fails in negotiation at version confirmation.
what's wrong?
- certificate "/sys/tls/cert" is working for Pegasus.
- tcp!io!7 is working.
- tlsclient can communicate with Pegasus in https protocol.
- tlssrv and tlsclient are the most recent ones:
term% ls -l /bin/tlssrv /bin/tlsclient
--rwxrwxr-x M 9 sys sys 199254 May 10  2008 /bin/tlsclient
--rwxrwxr-x M 9 sys sys 199634 Jun 27  2008 /bin/tlssrv
term%

Kenji Arisawa




Re: [9fans] Mail configuration

2009-02-20 Thread Russ Cox
> I am using plan9port on linux, and I want to be able to read mail from
> some account I have in some server running IMAP.
> Since this is the first time I try to configure a mail client (gmail
> is just so easy) I have no clue on what exactly I should do or if it
> is even possible to read mail using plan9's utilities on linux.
> The wiki has something about reading email on plan 9, but I do not
> know if this should work also for plan9port (to begin with I cannot
> find upas/fs).
> Probably this a stupid question, so I hope someone could give me some
> pointers to start with.

I didn't bring over upas/fs.
There is a separate program, not installed
by default, in src/cmd/upas/nfs (n=new)
that speaks only imap.  When installed, its
name is mailfs.  It works with the nedmail
and acme Mail that are in the plan9port
distribution; the file tree is slightly different
than the standard upas/fs (more faithful to imap).
It downloads pieces of the message as it
needs them, so if you have big attachments,
they don't get downloaded until you ask for them.
Messages saved with the Save command
go into imap folders, not local files.
I used this setup for a few years against a dovecot
imap server.  It does not work against the
gmail imap server, because gmail imap
will not serve the full mime tree of the message;
it only gives you the raw message bytes.

Russ



Re: [9fans] Query regarding vac

2009-02-20 Thread anooop . anooop

> that's probably because vac stores the metadata about
> the file as well as the file itself. the score is probably
> different because the access time of the file has changed.
>
> if you really always want the same score for the same
> file, i think you'll probably have to hack vac to do what you
> want (it shouldn't be hard - either just write the file data itself,
> or zero selected metadata).

Thank you.
I was hoping that there will be some option that might help.. It does
not hinder my work altogether, so I will leave it for now. I am behind
schedule and really short of time to hack the vac now otherwise I
would have given a try. :-)

~Anoop



Re: [9fans] Calling vac from C

2009-02-20 Thread anooop . anooop
On Feb 19, 8:03 am, quans...@quanstro.net (erik quanstrom) wrote:

> what's wrong with the tools-based approach
> you're currently using?
>
> this may be hard to believe coming from unix,
> but your approach is what many tools do.  nobody
> links to a tcs library.  one uses the tcs(1)
> executable.
>
> executables.  god's answer to dynamic linking.
>
> - erik

just a matter of preference  :-)

I believe that
1) Its too much trouble parsing the output everytime.
2) Calling some function from an included library will be faster.

~Anoop



[9fans] Mail configuration

2009-02-20 Thread hugo rivera
Hi there,
I am using plan9port on linux, and I want to be able to read mail from
some account I have in some server running IMAP.
Since this is the first time I try to configure a mail client (gmail
is just so easy) I have no clue on what exactly I should do or if it
is even possible to read mail using plan9's utilities on linux.
The wiki has something about reading email on plan 9, but I do not
know if this should work also for plan9port (to begin with I cannot
find upas/fs).
Probably this a stupid question, so I hope someone could give me some
pointers to start with.

-- 
Saludos

Hugo



Re: [9fans] 2 acmes using plan9port

2009-02-20 Thread Rudolf Sykora
thanks!
R

>  Heh, I'm doing both of the suggestions in this thread, with a wrapper script:
> http://sqweek.dnsdojo.org/plan9/acme
> -sqweek