Re: [9fans] Google Summer of code 2009
As to how many groups and students, they didn't say anything about that other than to show that each year the numbers had increased. Our prospects were evaluated with some care. In particular, Google has stated, publicly, in writing, that they expect to fund ~10% fewer students and thus fewer organizations this year. http://code.google.com/opensource/gsoc/2009/faqs.html 4. How many mentoring organizations does Google expect to take part in the program? We worked with 40 organizations in 2005, over 100 in 2006, over 130 in 2007 and 175 in 2008. We expect slightly fewer organizations to take part in 2009, as we've capped the number of student participants at 1,000. 5. How many students does Google expect to take part in the program? We funded approximately 400 student projects in 2005, 600 in 2006, 900 in 2007 and 1125 in 2008. We'll be funding approximately 1,000 student projects in 2009. Dave Eckhardt
Re: [9fans] C Programming in Plan 9 from Bell Labs
thank you. 2009/3/8, Pietro Gagliardi pietr...@mac.com: http://plan9.bell-labs.com/sources/contrib/pietro/programming.pdf I uploaded a slightly updated version to /n/sources/contrib/pietro/programming.ms and updated the PDF likewise. When I get more time I will further expand the tutorial. -- Hugo
Re: [9fans] acme Put doesn't save
Thank you R 2009/3/8 yy yiyu@gmail.com: 2009/3/4 roger peppe rogpe...@gmail.com: personally, i think that Put should work on any non-application window, and that re-columnation should only take place if the textual content hasn't been modified by the user. (and probably also that if you change the name of a window to a directory name and do Get, that it would get a directory listing). but YMMV as always. I think the attached patch is what you are proposing. If you apply it, when you edit dir windows, the file menu will be added (Undo, Put will only appear when the window name changes), and columnate won't be called for that window. If you execute Put in that window it will be saved, if the window name is a directory there will be an error. Another changes I did is that now if you edit the title of +Error windows the file menu will appear, and Get will appear when the window name finishes with '/'. I haven't tested it too much, but it is working here. -- - yiyus || JGL .
[9fans] ping suicide: sys: trap: divide error pc=0x00003953c
Hello all, I would like to learn how to fix this in the ping C code, I am new to plan9 and C ip/ping -r -f www.google.com sending 32 64 bytes messages 0 ms apart to icmp!www.google.com!1 ping 238: suicide: sys: trap: divide error pc=0x3953 term% 0: rrt 38841 us, avg rtt 38841 us, ttl = 128 ROuNIN
Re: [9fans] acme Put doesn't save
I think the attached patch is what you are proposing. If you apply it, -- - yiyus || JGL . Sorry for the question, but how can I apply the patch you sent? I mean, having the file with the patch and the file to be changed, what command is to be performed? thanks R
Re: [9fans] acme Put doesn't save
well, probably there is none such, sorry... :) R 2009/3/9 Rudolf Sykora rudolf.syk...@gmail.com: I think the attached patch is what you are proposing. If you apply it, -- - yiyus || JGL . Sorry for the question, but how can I apply the patch you sent? I mean, having the file with the patch and the file to be changed, what command is to be performed? thanks R
Re: [9fans] ping suicide: sys: trap: divide error pc=0x00003953c
since it doesn't make sense to both send packets as fast as possible and to delay randomly between packets, i think this case is just disallowed. /n/sources/plan9//sys/src/cmd/ip/ping.c:532,537 - ping.c:532,541 break; } ARGEND; + if(flood rint){ + fprint(2, -f and -r are not compatable\n); + usage(); + } if(msglen proto-iphdrsz + ICMP_HDRSIZE) msglen = proto-iphdrsz + ICMP_HDRSIZE; if(msglen 64) and /n/sources/plan9//sys/man/8/ping:83,89 - ping:83,91 adds the IP source and destination addresses to each report. .TP .B f - send messages as fast as possible (flood). + send messages as fast as possible (flood). This flag + is not compatable with + .BR -r . .TP .B i sets the time between messages /n/sources/plan9//sys/man/8/ping:104,110 - ping:106,114 .TP .B r randomizes the delay with a minimum extra delay of 0 ms and a - maximum extra delay of the selected interval. + maximum extra delay of the selected interval. This flag + is not compatable with + .BR -f . .TP .B s sets the length of the message to be
[9fans] vac flattens trees?
given a list of files like /fish /dog /snake/asp /snake/python, the results of a vac (as interpreted by vacfs) seem to be /fish /dog /asp /python. is this intentional? it seems unexpected, and makes doing selective backups using vac a bit awkward. this is vac on p9p and vacfs on plan9, if that matters.
Re: [9fans] Porter-Duff alpha blending
i submitted a patch to plan 9 with russ' fix: memdraw32bit. thanks russ, andrey! note: you will need to recompile your kernel, not just applications that use libmemdraw. i leave it as an exercize to the reader to port this to 9vx. ☺ - erik
[9fans] MMIXWare Plan 9
How to port MMIXWare into Plan 9? Has anyone done it?
Re: [9fans] vac flattens trees?
2009/3/9 Anthony Sorace ano...@gmail.com: given a list of files like /fish /dog /snake/asp /snake/python, the results of a vac (as interpreted by vacfs) seem to be /fish /dog /asp /python. is this intentional? it seems unexpected, and makes doing selective backups using vac a bit awkward. i suppose your preferred behaviour would be for it to do a treewise merge of the paths and vac the shallowest root that contains all the paths, missing out all contents that aren't under one of the named paths. this seems like quite an involved operation, when you can get much the same result by building a custom namespace containing the trees you want (admittedly, a recursive mntgen would be useful here).
Re: [9fans] Porter-Duff alpha blending
On Sun, Mar 8, 2009 at 6:33 PM, Jeff Sickel j...@corpus-callosum.com wrote: All this chatter about blending and Russ' recent updates to p9p encouraged me to finally fix a small thing that's annoyed me with devdraw's on OS X: that odd blank (all white) window when waking a machine from sleep, exiting a screen saver, or un-hiding a devdraw based application. Here's the patch all ready for an hg import (should also be applied to drawterm, and Inferno's win.c): I am confused as to why one would return eventNotHandledErr after handling the event? ian
Re: [9fans] Porter-Duff alpha blending
2009/3/9 erik quanstrom quans...@quanstro.net: i leave it as an exercize to the reader to port this to 9vx. ☺ There you are. Easy exercises are also good from time to time :) The patch also allows to use Shift+Button3 as Button2 (as documented in the man page). Regards, -- - yiyus || JGL . diff -r a18e9872164b src/9vx/libmemdraw/draw.c --- a/src/9vx/libmemdraw/draw.c Wed Dec 10 03:29:15 2008 -0800 +++ b/src/9vx/libmemdraw/draw.c Mon Mar 09 16:29:39 2009 +0100 @@ -10,22 +10,32 @@ #define RGB2K(r,g,b) ((156763*(r)+307758*(g)+59769*(b))19) /* - * for 0 ⤠x ⤠255*255, (x*0x0101+0x100)16 is a perfect approximation. - * for 0 ⤠x (116), x/255 = ((x+1)*0x0101)16 is a perfect approximation. - * the last one is perfect for all up to 116, avoids a multiply, but requires a rathole. + * For 16-bit values, x / 255 == (t = x+1, (t+(t8)) 8). + * We add another 127 to round to the nearest value rather + * than truncate. + * + * CALCxy does x bytewise calculations on y input images (x=1,4; y=1,2). + * CALC2x does two parallel 16-bit calculations on y input images (y=1,2). */ -/* #define DIV255(x) (((x)*257+256)16) */ -#define DIV255(x) x)+1)*257)16) -/* #define DIV255(x) (tmp=(x)+1, (tmp+(tmp8))8) */ +#define CALC11(a, v, tmp) \ + (tmp=(a)*(v)+128, (tmp+(tmp8))8) +#define CALC12(a1, v1, a2, v2, tmp) \ + (tmp=(a1)*(v1)+(a2)*(v2)+128, (tmp+(tmp8))8) +#define MASK 0xFF00FF -#define MUL(x, y, t) (t = (x)*(y)+128, (t+(t8))8) -#define MASK13 0xFF00FF00 -#define MASK02 0x00FF00FF -#define MUL13(a, x, t) (t = (a)*(((x)MASK13)8)+128, ((t+((t8)MASK02))8)MASK02) -#define MUL02(a, x, t) (t = (a)*(((x)MASK02)0)+128, ((t+((t8)MASK02))8)MASK02) -#define MUL0123(a, x, s, t) ((MUL13(a, x, s)8)|MUL02(a, x, t)) +#define CALC21(a, vvuu, tmp) \ + (tmp=(a)*(vvuu)+0x00800080, ((tmp+((tmp8)MASK))8)MASK) -#define MUL2(u, v, x, y) (t = (u)*(v)+(x)*(y)+256, (t+(t8))8) +#define CALC41(a, rgba, tmp1, tmp2) \ + (CALC21(a, rgba MASK, tmp1) | \ + (CALC21(a, (rgba8)MASK, tmp2)8)) + +#define CALC22(a1, vvuu1, a2, vvuu2, tmp) \ + (tmp=(a1)*(vvuu1)+(a2)*(vvuu2)+0x00800080, ((tmp+((tmp8)MASK))8)MASK) + +#define CALC42(a1, rgba1, a2, rgba2, tmp1, tmp2) \ + (CALC22(a1, rgba1 MASK, a2, rgba2 MASK, tmp1) | \ + (CALC22(a1, (rgba18) MASK, a2, (rgba28) MASK, tmp2)8)) static void mktables(void); typedef int Subdraw(Memdrawparam*); @@ -803,41 +813,85 @@ return bdst; } +/* + * Do the channels in the buffers match enough + * that we can do word-at-a-time operations + * on the pixels? + */ +static int +chanmatch(Buffer *bdst, Buffer *bsrc) +{ + uchar *drgb, *srgb; + + /* + * first, r, g, b must be in the same place + * in the rgba word. + */ + drgb = (uchar*)bdst-rgba; + srgb = (uchar*)bsrc-rgba; + if(bdst-red - drgb != bsrc-red - srgb + || bdst-blu - drgb != bsrc-blu - srgb + || bdst-grn - drgb != bsrc-grn - srgb) + return 0; + + /* + * that implies alpha is in the same place, + * if it is there at all (it might be == ones). + * if the destination is ones, we can scribble + * over the rgba slot just fine. + */ + if(bdst-alpha == ones) + return 1; + + /* + * if the destination is not ones but the src is, + * then the simultaneous calculation will use + * bogus bytes from the src's rgba. no good. + */ + if(bsrc-alpha == ones) + return 0; + + /* + * otherwise, alphas are in the same place. + */ + return 1; +} + static Buffer alphacalc14(Buffer bdst, Buffer bsrc, Buffer bmask, int dx, int grey, int op) { Buffer obdst; int fd, sadelta; int i, sa, ma, q; - uint32 s, t; + uint32 t, t1; obdst = bdst; sadelta = bsrc.alpha == ones ? 0 : bsrc.delta; - q = bsrc.delta == 4 bdst.delta == 4; + q = bsrc.delta == 4 bdst.delta == 4 chanmatch(bdst, bsrc); for(i=0; idx; i++){ sa = *bsrc.alpha; ma = *bmask.alpha; - fd = MUL(sa, ma, t); + fd = CALC11(sa, ma, t); if(op == DoutS) fd = 255-fd; if(grey){ - *bdst.grey = MUL(fd, *bdst.grey, t); + *bdst.grey = CALC11(fd, *bdst.grey, t); bsrc.grey += bsrc.delta; bdst.grey += bdst.delta; }else{ if(q){ -*bdst.rgba = MUL0123(fd, *bdst.rgba, s, t); +*bdst.rgba = CALC41(fd, *bdst.rgba, t, t1); bsrc.rgba++; bdst.rgba++; bsrc.alpha += sadelta; bmask.alpha += bmask.delta; continue; } - *bdst.red = MUL(fd, *bdst.red, t); - *bdst.grn = MUL(fd, *bdst.grn, t); - *bdst.blu = MUL(fd, *bdst.blu, t); + *bdst.red = CALC11(fd, *bdst.red, t); + *bdst.grn = CALC11(fd, *bdst.grn, t); + *bdst.blu = CALC11(fd, *bdst.blu, t); bsrc.red += bsrc.delta; bsrc.blu += bsrc.delta; bsrc.grn += bsrc.delta; @@ -846,7 +900,7 @@ bdst.grn += bdst.delta; } if(bdst.alpha != ones){ - *bdst.alpha = MUL(fd, *bdst.alpha, t); + *bdst.alpha = CALC11(fd, *bdst.alpha, t); bdst.alpha += bdst.delta; } bmask.alpha += bmask.delta; @@ -861,11 +915,11 @@ Buffer obdst; int fs, sadelta; int i, ma, da, q; - uint32 s, t; + uint32 t, t1; obdst = bdst; sadelta = bsrc.alpha == ones ? 0
Re: [9fans] texlive port to plan 9
On Mon, Mar 9, 2009 at 10:35 AM, xiantingmanbu xiantingma...@gmail.com wrote: Is there anyone porting TexLive to Plan 9? Plan 9 hasn't so many tex- related programs. Tex and MF is not enough. Bear in mind that some of the newer TeX programs (pdfTeX, XɘTeX, luaTeX) use a C++ library to handle PDF files. —Joel
Re: [9fans] vac flattens trees?
On Mon, Mar 9, 2009 at 6:35 AM, Anthony Sorace ano...@gmail.com wrote: given a list of files like /fish /dog /snake/asp /snake/python, the results of a vac (as interpreted by vacfs) seem to be /fish /dog /asp /python. is this intentional? it seems unexpected, and makes doing selective backups using vac a bit awkward. it is intentional, so that you can say vac /long/path/to/usr/rsc and get a vac with just rsc in the top level. if you want selective backups you can use the -x flag. russ
Re: [9fans] texlive port to plan 9
On Mon, Mar 9, 2009 at 7:35 AM, xiantingmanbu xiantingma...@gmail.com wrote: Is there anyone porting TexLive to Plan 9? Plan 9 hasn't so many tex- related programs. Tex and MF is not enough. one option before you go to that level of pain: use Plan 9's - x11 emulator - linux emulator and see if texlive just works. I'd like to know myself. thanks ron
Re: [9fans] Porter-Duff alpha blending
On Mar 9, 2009, at 10:28 AM, Michaelian Ennis wrote: I am confused as to why one would return eventNotHandledErr after handling the event? Because it's not really handling the event. It just happens to be the only hook available for monitoring the application event loop (in this case: the dance between the Carbon Event Manager and p9p) that I've found to force memscreen's image to flush. We still want OS X's application event loop to do whatever it does to get the window server and responder chain back--without messing up the buffering that could cause a flicker when moving the window later. -jas
Re: [9fans] MMIXWare Plan 9
On Mon, Mar 9, 2009 at 14:35, xiantingmanbu xiantingma...@gmail.com wrote: How to port MMIXWare into Plan 9? Has anyone done it? Porting wouldn't be hard. I don't remember the code right now (will look into it when I get home) but probably the only thing you would have to change would be mmap() to segattach(), or even simple malloc()-style allocation. Knuth is rather old fashioned, so it might actually work out of the box with APE, and with little changes with native libs. -- Paweł Lasek On #l...@freenode.net schme But the systems seem so darned complicated. I see the wife unit here sitting around with winXP and it seems very complicated.
Re: [9fans] vac flattens trees?
On Mon, Mar 9, 2009 at 8:43 AM, roger peppe rogpe...@gmail.com wrote: 2009/3/9 Russ Cox r...@swtch.com: if you want selective backups you can use the -x flag. presumably you mean the -e flag? i meant the -x flag (he said he was on p9p). http://swtch.com/plan9port/man/man1/vac.html russ
Re: [9fans] vac flattens trees?
2009/3/9 Russ Cox r...@swtch.com: On Mon, Mar 9, 2009 at 8:43 AM, roger peppe rogpe...@gmail.com wrote: 2009/3/9 Russ Cox r...@swtch.com: if you want selective backups you can use the -x flag. presumably you mean the -e flag? i meant the -x flag (he said he was on p9p). http://swtch.com/plan9port/man/man1/vac.html ah. that's new since i downloaded my p9p copy. my apologies.
Re: [9fans] MMIXWare Plan 9
i'm not sure whether the MMIX stuff was a fresh effort or an extension of the MIX code, but it might be worth noting that someone (Charles, i think) ported MIX years ago. perhaps a useful starting point. On 2009-03-09, Paweł Lasek pawel.la...@gmail.com wrote: On Mon, Mar 9, 2009 at 14:35, xiantingmanbu xiantingma...@gmail.com wrote: How to port MMIXWare into Plan 9? Has anyone done it? Porting wouldn't be hard. I don't remember the code right now (will look into it when I get home) but probably the only thing you would have to change would be mmap() to segattach(), or even simple malloc()-style allocation. Knuth is rather old fashioned, so it might actually work out of the box with APE, and with little changes with native libs. -- Paweł Lasek On #l...@freenode.net schme But the systems seem so darned complicated. I see the wife unit here sitting around with winXP and it seems very complicated.
Re: [9fans] MMIXWare Plan 9
On Mon, Mar 9, 2009 at 3:57 PM, Anthony Sorace ano...@gmail.com wrote: i'm not sure whether the MMIX stuff was a fresh effort or an extension MMIX is totally new, a more modern, RISC-y assembly language. Knuth worked with Hennessy on it, and it shows (not in a bad way, of course). AFAIK it's all new code since it's so drastically different. of the MIX code, but it might be worth noting that someone (Charles, i think) ported MIX years ago. perhaps a useful starting point. On 2009-03-09, Paweł Lasek pawel.la...@gmail.com wrote: On Mon, Mar 9, 2009 at 14:35, xiantingmanbu xiantingma...@gmail.com wrote: How to port MMIXWare into Plan 9? Has anyone done it? Porting wouldn't be hard. I don't remember the code right now (will look into it when I get home) but probably the only thing you would have to change would be mmap() to segattach(), or even simple malloc()-style allocation. Knuth is rather old fashioned, so it might actually work out of the box with APE, and with little changes with native libs. -- Paweł Lasek On #l...@freenode.net schme But the systems seem so darned complicated. I see the wife unit here sitting around with winXP and it seems very complicated.
Re: [9fans] vac flattens trees?
You can vac the directories separately and then use vac -m to create an archive that looks any way you want. On Mon, Mar 9, 2009 at 7:35 AM, Anthony Sorace ano...@gmail.com wrote: given a list of files like /fish /dog /snake/asp /snake/python, the results of a vac (as interpreted by vacfs) seem to be /fish /dog /asp /python. is this intentional? it seems unexpected, and makes doing selective backups using vac a bit awkward. this is vac on p9p and vacfs on plan9, if that matters.
Re: [9fans] jjm
IWP92009-Bondi: http://www.chunder.com/stuff/IWP92009-Bondi/IWP92009-Bondi.pdf brucee
Re: [9fans] jjm
do you reckon anyone will make dinner? 10am is an early start. perhaps you need to track down TK On 3/10/09, Bruce Ellis bruce.el...@gmail.com wrote: IWP92009-Bondi: http://www.chunder.com/stuff/IWP92009-Bondi/IWP92009-Bondi.pdf brucee
Re: [9fans] MMIXWare Plan 9
2009/3/9 xiantingmanbu xiantingma...@gmail.com: How to port MMIXWare into Plan 9? Has anyone done it? I have doen it before, but now it's a little out-dated: http://plan9.bell-labs.com/sources/contrib/lee/mmix-20060918.tgz lee
Re: [9fans] vac flattens trees?
i think include fish/clown exclude fish/* and then vac fish dog pig would be fine. i haven't tried this, but i know there are some vac users who use -x quite a bit. russ
Re: [9fans] vac flattens trees?
On Mon Mar 9 23:30:22 EDT 2009, ano...@gmail.com wrote: that seems a little awkward. erik's suggestion is what i think i'd really like. rog's would be okay, although still somewhatawkward, were i on plan 9; since i'm not, i think i have russ's option. so with -x, say i had a tree: /dog /cat /fish/guppie /fish/clown /pig and i wanted /dog, /cat, and /fish/clown. would three includes be sufficent there, or do i need it include /fish and then exclude /fish/guppie, to get the heirarchy? i do wish more tools used proto. the format is so nice. oh, you already know what i'm going to suggest, so just get to it! russ: i don't think in understand your motivating case. if you want to flatten /some/long/path/target to just target, why can't you just cd there? there must be some other part i haven't gotten yet. - erik
Re: [9fans] vac flattens trees?
Erik Quanstrom wrote: On Mon Mar 9 23:30:22 EDT 2009, ano...@gmail.com wrote: that seems a little awkward. erik's suggestion is what i think i'd really like. rog's would be okay, although still somewhatawkward, were i on plan 9; since i'm not, i think i have russ's option. so with -x, say i had a tree: /dog /cat /fish/guppie /fish/clown /pig and i wanted /dog, /cat, and /fish/clown. would three includes be sufficent there, or do i need it include /fish and then exclude /fish/guppie, to get the heirarchy? i do wish more tools used proto. the format is so nice. oh, you already know what i'm going to suggest, so just get to it! kenfs? ;) John
Re: [9fans] jjm
Perfect for Club Du Soleil - thanks! brucee On Tue, Mar 10, 2009 at 4:35 PM, Jeff Sickel j...@corpus-callosum.com wrote: I'm thinking someone needs to get a SEAforth 40C18 into brucee's hands On Mar 9, 2009, at 9:57 PM, Bruce Ellis wrote: IWP92009-Bondi: http://www.chunder.com/stuff/IWP92009-Bondi/IWP92009-Bondi.pdf brucee