* [9fans] Suggestion: Programming Tutorial for /sys/doc @ 2007-11-01 20:11 Pietro Gagliardi 2007-11-01 20:23 ` don bailey ` (6 more replies) 0 siblings, 7 replies; 40+ messages in thread From: Pietro Gagliardi @ 2007-11-01 20:11 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs Hello. I've been trying out programming Plan 9 since I got the system up and I think I'm getting the hang of learning from man pages. I'm not a big fan of having to type "man -t 2 xxx | page" about 100 times a day to figure out something, and there are things that the man pages don't cover in a clear way, so I think a tutorial should be put in. I already started writing one, and I think it would benefit from being in /sys/doc. It will cover: - basics - compiler usage - file access - threads - graphics and controls - hopefully networking - debugging within about 15-30 pages. Anyone like this idea? - Pietro ^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [9fans] Suggestion: Programming Tutorial for /sys/doc 2007-11-01 20:11 [9fans] Suggestion: Programming Tutorial for /sys/doc Pietro Gagliardi @ 2007-11-01 20:23 ` don bailey 2007-11-01 20:47 ` Anthony Sorace ` (5 subsequent siblings) 6 siblings, 0 replies; 40+ messages in thread From: don bailey @ 2007-11-01 20:23 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 > within about 15-30 pages. Anyone like this idea? - Pietro > That stuff already is in sys/doc. Try using acme and right-clicking on results from lookman. D -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFHKjWlyWX0NBMJYAcRAptbAJ0cYKFFWBbiVJLuRo3tiiZnaHIFhACeMdUB 89V8Vja8nIdDqSlFB+ivp4A= =9c2O -----END PGP SIGNATURE----- ^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [9fans] Suggestion: Programming Tutorial for /sys/doc 2007-11-01 20:11 [9fans] Suggestion: Programming Tutorial for /sys/doc Pietro Gagliardi 2007-11-01 20:23 ` don bailey @ 2007-11-01 20:47 ` Anthony Sorace 2007-11-01 21:00 ` Pietro Gagliardi 2007-11-01 21:24 ` ISHWAR RATTAN ` (4 subsequent siblings) 6 siblings, 1 reply; 40+ messages in thread From: Anthony Sorace @ 2007-11-01 20:47 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs On 11/1/07, Pietro Gagliardi <pietro10@mac.com> wrote: // I'm not a big fan of having to type "man -t 2 xxx | page" about 100 times // a day to figure out something... oh, who would be? you want 'man -P 2 xxx' instead. ;-) // Anyone like this idea? I certainly like the idea of a good tutorial-style introduction. The subject matter seems to lend itself more to the wiki than /sys/doc. Regarding your list of suggested topics, Don's right about most of that already being in /sys/doc (or the man pages). ^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [9fans] Suggestion: Programming Tutorial for /sys/doc 2007-11-01 20:47 ` Anthony Sorace @ 2007-11-01 21:00 ` Pietro Gagliardi 2007-11-01 21:22 ` Federico Benavento ` (2 more replies) 0 siblings, 3 replies; 40+ messages in thread From: Pietro Gagliardi @ 2007-11-01 21:00 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs On Nov 1, 2007, at 4:47 PM, Anthony Sorace wrote: > I certainly like the idea of a good tutorial-style introduction. The > subject matter seems to lend itself more to the wiki than /sys/doc. > Regarding your list of suggested topics, Don's right about most of > that already being in /sys/doc (or the man pages). /sys/doc doesn't talk much about the system as far as I know - I have to look at lookman first. The man pages have several flaws: there are too many; some important stuff is hard to find; "man page jumping" is a problem. ^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [9fans] Suggestion: Programming Tutorial for /sys/doc 2007-11-01 21:00 ` Pietro Gagliardi @ 2007-11-01 21:22 ` Federico Benavento 2007-11-02 13:10 ` Iruata Souza 2007-11-01 21:27 ` Uriel 2007-11-02 1:44 ` Anthony Sorace 2 siblings, 1 reply; 40+ messages in thread From: Federico Benavento @ 2007-11-01 21:22 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs did you read nemo's intro? http://lsub.org/who/nemo/9.intro.pdf On 11/1/07, Pietro Gagliardi <pietro10@mac.com> wrote: > On Nov 1, 2007, at 4:47 PM, Anthony Sorace wrote: > > > I certainly like the idea of a good tutorial-style introduction. The > > subject matter seems to lend itself more to the wiki than /sys/doc. > > Regarding your list of suggested topics, Don's right about most of > > that already being in /sys/doc (or the man pages). > > /sys/doc doesn't talk much about the system as far as I know - I have > to look at lookman first. The man pages have several flaws: there are > too many; some important stuff is hard to find; "man page jumping" is > a problem. > -- Federico G. Benavento ^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [9fans] Suggestion: Programming Tutorial for /sys/doc 2007-11-01 21:22 ` Federico Benavento @ 2007-11-02 13:10 ` Iruata Souza 2007-11-02 13:34 ` David Leimbach ` (2 more replies) 0 siblings, 3 replies; 40+ messages in thread From: Iruata Souza @ 2007-11-02 13:10 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs since no one seemed to care, I'll repeat fgb: did you tried nemo's intro? http://lsub.org/who/nemo/9.intro.pdf iru ^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [9fans] Suggestion: Programming Tutorial for /sys/doc 2007-11-02 13:10 ` Iruata Souza @ 2007-11-02 13:34 ` David Leimbach 2007-11-02 13:39 ` erik quanstrom 2007-11-02 18:47 ` Pietro Gagliardi 2007-11-02 18:52 ` Pietro Gagliardi 2 siblings, 1 reply; 40+ messages in thread From: David Leimbach @ 2007-11-02 13:34 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs On Nov 2, 2007 6:10 AM, Iruata Souza <iru.muzgo@gmail.com> wrote: > since no one seemed to care, I'll repeat fgb: > did you tried nemo's intro? > > http://lsub.org/who/nemo/9.intro.pdf > > iru > I've tried it... I think it's great :-) I can confess I've not gotten through the whole thing because my plan 9 box doesn't work anymore... and I'm unable to get one running in VMWare fusion to continue playing around. It still hangs at boot. I'm using venti+fossil if it matters. Probably should just use fossil if it's going to be a toy I guess. ^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [9fans] Suggestion: Programming Tutorial for /sys/doc 2007-11-02 13:34 ` David Leimbach @ 2007-11-02 13:39 ` erik quanstrom 2007-11-02 16:44 ` geoff 2007-11-02 18:09 ` David Leimbach 0 siblings, 2 replies; 40+ messages in thread From: erik quanstrom @ 2007-11-02 13:39 UTC (permalink / raw) To: 9fans > I've tried it... I think it's great :-) > > I can confess I've not gotten through the whole thing because my plan > 9 box doesn't work anymore... and I'm unable to get one running in > VMWare fusion to continue playing around. It still hangs at boot. > I'm using venti+fossil if it matters. Probably should just use fossil > if it's going to be a toy I guess. would it make sense to use to the older 9load until the new one works for more people? - erik ^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [9fans] Suggestion: Programming Tutorial for /sys/doc 2007-11-02 13:39 ` erik quanstrom @ 2007-11-02 16:44 ` geoff 2007-11-02 18:00 ` erik quanstrom 2007-11-02 18:09 ` David Leimbach 1 sibling, 1 reply; 40+ messages in thread From: geoff @ 2007-11-02 16:44 UTC (permalink / raw) To: 9fans The new 9load works on all the machines I was able to test it on, including booting from USB flash disks and SATA disks, in AHCI and non-AHCI modes. The only way it's going to work for more people is if the community at large uses it and helps me to understand why it doesn't work on particular machines. Although the BIOS booting code is generating the most error messages, the panics are likely due to interactions with AHCI. ^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [9fans] Suggestion: Programming Tutorial for /sys/doc 2007-11-02 16:44 ` geoff @ 2007-11-02 18:00 ` erik quanstrom 2007-11-02 19:34 ` geoff 2007-11-03 2:44 ` Gorka Guardiola 0 siblings, 2 replies; 40+ messages in thread From: erik quanstrom @ 2007-11-02 18:00 UTC (permalink / raw) To: 9fans > The new 9load works on all the machines I was able to test it on, > including booting from USB flash disks and SATA disks, in AHCI and > non-AHCI modes. The only way it's going to work for more people is if > the community at large uses it and helps me to understand why it > doesn't work on particular machines. i think the new 9load is a good idea and it's nice to have more booting options. the problem is no actual testing is going on. when folks can't get the livecd booting, that's pretty much the end of the road for them. there are very limited debugging options and there is very little useful information gained from the failure. > Although the BIOS booting code is generating the most error messages, > the panics are likely due to interactions with AHCI. i believe none of machines with reported failures in the past day have ahci support. (qemu, nforce 55) also, the machines seem to be failing when accessing the cdrom which should be accessable in legacy mode. anyway, what is the answer for folks who are having problems with the current livecd? - erik ^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [9fans] Suggestion: Programming Tutorial for /sys/doc 2007-11-02 18:00 ` erik quanstrom @ 2007-11-02 19:34 ` geoff 2007-11-02 20:57 ` David Leimbach 2007-11-03 2:44 ` Gorka Guardiola 1 sibling, 1 reply; 40+ messages in thread From: geoff @ 2007-11-02 19:34 UTC (permalink / raw) To: 9fans For now, I've added *nobiosload=1 and *noahciload=1 to most cases of the plan9.inis that will appear in tomorrow's CD image. With AHCI and BIOS loading disabled, 9load should be pretty much what it was before they were added. Once plan 9 is installed, especially on new or emulated machines, please boot and select a case ending in `and debug 9load' and let me know what it prints, if 9load panics. ^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [9fans] Suggestion: Programming Tutorial for /sys/doc 2007-11-02 19:34 ` geoff @ 2007-11-02 20:57 ` David Leimbach 0 siblings, 0 replies; 40+ messages in thread From: David Leimbach @ 2007-11-02 20:57 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs On Nov 2, 2007 12:34 PM, <geoff@plan9.bell-labs.com> wrote: > For now, I've added *nobiosload=1 and *noahciload=1 to most cases of > the plan9.inis that will appear in tomorrow's CD image. With AHCI and > BIOS loading disabled, 9load should be pretty much what it was before > they were added. Once plan 9 is installed, especially on new or > emulated machines, please boot and select a case ending in `and debug > 9load' and let me know what it prints, if 9load panics. > > Great! I'll try again tomorrow then. ^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [9fans] Suggestion: Programming Tutorial for /sys/doc 2007-11-02 18:00 ` erik quanstrom 2007-11-02 19:34 ` geoff @ 2007-11-03 2:44 ` Gorka Guardiola 2007-11-03 8:49 ` Sander van Dijk 1 sibling, 1 reply; 40+ messages in thread From: Gorka Guardiola @ 2007-11-03 2:44 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs I tested it on qemu and it worked for me. -- - curiosity sKilled the cat ^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [9fans] Suggestion: Programming Tutorial for /sys/doc 2007-11-03 2:44 ` Gorka Guardiola @ 2007-11-03 8:49 ` Sander van Dijk 2007-11-03 15:24 ` Eldanen 2007-11-05 11:59 ` [9fans] Suggestion: Programming Tutorial for /sys/doc Gorka Guardiola 0 siblings, 2 replies; 40+ messages in thread From: Sander van Dijk @ 2007-11-03 8:49 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs On Nov 3, 2007 3:44 AM, Gorka Guardiola <paurea@gmail.com> wrote: > I tested it on qemu and it worked for me. May I ask how you booted the image? Greetings, Sander. ^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [9fans] Suggestion: Programming Tutorial for /sys/doc 2007-11-03 8:49 ` Sander van Dijk @ 2007-11-03 15:24 ` Eldanen 2007-11-03 21:43 ` erik quanstrom 2007-11-05 11:59 ` [9fans] Suggestion: Programming Tutorial for /sys/doc Gorka Guardiola 1 sibling, 1 reply; 40+ messages in thread From: Eldanen @ 2007-11-03 15:24 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs [-- Attachment #1: Type: text/plain, Size: 692 bytes --] The Nov 3rd image didn't work for me. But, by turning off extended IDE mode for my HDD, I was able to get an error message in assembly rather than it just hanging without any error message. (Not sure if that makes it irrelevant, but anyway.) http://home.earthlink.net/~eldanen/pastes/dmesg http://home.earthlink.net/~eldanen/pastes/plan9output The following was appended to "plan9output": FLAGS=10246 TRAP=0 ENCODE=0 PC=80030089 AX 00000000 BX 8004483c CX 00000000 DX 00000000 SI 0000020 DI 00000000 BP 80047e6c CS 0010 DS 0008 ES 0008 FS 0008 GS 0008 CRO 80000011 CR2 00f0c05c CR3 0000c000 panic: exception/interrupt 0 Press almost any key to reset... Eldanen [-- Attachment #2: Type: text/html, Size: 889 bytes --] ^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [9fans] Suggestion: Programming Tutorial for /sys/doc 2007-11-03 15:24 ` Eldanen @ 2007-11-03 21:43 ` erik quanstrom 2007-11-03 23:40 ` Eldanen 2007-11-06 14:39 ` [9fans] Font Michaelian Ennis 0 siblings, 2 replies; 40+ messages in thread From: erik quanstrom @ 2007-11-03 21:43 UTC (permalink / raw) To: 9fans > The Nov 3rd image didn't work for me. But, by turning off extended IDE mode > for my HDD, I was able to get an error message in assembly rather than it > just hanging without any error message. (Not sure if that makes it > irrelevant, but anyway.) > > http://home.earthlink.net/~eldanen/pastes/dmesg > http://home.earthlink.net/~eldanen/pastes/plan9output > > The following was appended to "plan9output": > > FLAGS=10246 TRAP=0 ENCODE=0 PC=80030089 > AX 00000000 BX 8004483c CX 00000000 DX 00000000 > SI 0000020 DI 00000000 BP 80047e6c > CS 0010 DS 0008 ES 0008 FS 0008 GS 0008 > CRO 80000011 CR2 00f0c05c CR3 0000c000 > panic: exception/interrupt 0 > > Press almost any key to reset... it didn't print anything else, did it? the pc indicates that these lines should have been executed ; acid /n/sources/plan9/386/9loaddebug /n/sources/plan9/386/9loaddebug:386 plan 9 boot image /sys/lib/acid/port /sys/lib/acid/386 acid: src(0x80030089) /sys/src/boot/pc/ether.c:119 /n/sources/plan9/sys/src/boot/pc/ether.c 108 print("ether#%d: %s: port 0x%luX irq %lud", 109 ctlr->ctlrno, ctlr->type, ctlr->port, ctlr->irq); [...] 118 ctlr->rb = ialloc(sizeof(RingBuf)*ctlr->nrb, 0); >119 if(ctlr->ntb == 0 here's a wild stab in the dark which has bitten us for an embedded kernel we run. make sure to turn off legacy emulation for usb devices in the bios. (phoenix bios has this option in the second tab under one of the bottom selections.) legacy emulation can turn on system management mode. system management mode takes over system resources (like memory) to run the emulation code and then puts things back. the os is not supposed to notice, but sometimes the emulation is not seemless. (or perhaps we don't know all the magic spots in memory.) either way, it's worth a shot. - erik ^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [9fans] Suggestion: Programming Tutorial for /sys/doc 2007-11-03 21:43 ` erik quanstrom @ 2007-11-03 23:40 ` Eldanen 2007-11-06 14:39 ` [9fans] Font Michaelian Ennis 1 sibling, 0 replies; 40+ messages in thread From: Eldanen @ 2007-11-03 23:40 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs [-- Attachment #1: Type: text/plain, Size: 2337 bytes --] No dice on changing the USB settings in the BIOS. Or a bunch of other settings on/off, that I tried. The only thing that was able to get an error message to show was turning off Extended IDE for my SATA HDD :/. Strange. Thanks, though :). On 11/3/07, erik quanstrom <quanstro@quanstro.net> wrote: > > > The Nov 3rd image didn't work for me. But, by turning off extended IDE > mode > > for my HDD, I was able to get an error message in assembly rather than > it > > just hanging without any error message. (Not sure if that makes it > > irrelevant, but anyway.) > > > > http://home.earthlink.net/~eldanen/pastes/dmesg > > http://home.earthlink.net/~eldanen/pastes/plan9output > > > > The following was appended to "plan9output": > > > > FLAGS=10246 TRAP=0 ENCODE=0 PC=80030089 > > AX 00000000 BX 8004483c CX 00000000 DX 00000000 > > SI 0000020 DI 00000000 BP 80047e6c > > CS 0010 DS 0008 ES 0008 FS 0008 GS 0008 > > CRO 80000011 CR2 00f0c05c CR3 0000c000 > > panic: exception/interrupt 0 > > > > Press almost any key to reset... > > it didn't print anything else, did it? the pc indicates that these > lines should have been executed > > ; acid /n/sources/plan9/386/9loaddebug > /n/sources/plan9/386/9loaddebug:386 plan 9 boot image > /sys/lib/acid/port > /sys/lib/acid/386 > acid: src(0x80030089) > /sys/src/boot/pc/ether.c:119 > > /n/sources/plan9/sys/src/boot/pc/ether.c > 108 print("ether#%d: %s: port 0x%luX irq %lud", > 109 ctlr->ctlrno, ctlr->type, ctlr->port, > ctlr->irq); > [...] > 118 ctlr->rb = ialloc(sizeof(RingBuf)*ctlr->nrb, 0); > >119 if(ctlr->ntb == 0 > > here's a wild stab in the dark which has bitten us for an embedded > kernel we run. make sure to turn off legacy emulation for usb devices > in the bios. (phoenix bios has this option in the second tab under one > of the bottom selections.) legacy emulation can turn on system management > mode. system management mode takes over system resources (like memory) > to run the emulation code and then puts things back. the os is not > supposed to notice, but sometimes the emulation is not seemless. > (or perhaps we don't know all the magic spots in memory.) either way, > it's worth a shot. > > - erik > > [-- Attachment #2: Type: text/html, Size: 3421 bytes --] ^ permalink raw reply [flat|nested] 40+ messages in thread
* [9fans] Font 2007-11-03 21:43 ` erik quanstrom 2007-11-03 23:40 ` Eldanen @ 2007-11-06 14:39 ` Michaelian Ennis 2007-11-06 14:46 ` Anant Narayanan 2007-11-06 14:56 ` Martin Neubauer 1 sibling, 2 replies; 40+ messages in thread From: Michaelian Ennis @ 2007-11-06 14:39 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs I'd really like to use this font in plan9. Is there a guide out there of what is required? http://www.levien.com/type/myfonts/inconsolata.html Ian ^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [9fans] Font 2007-11-06 14:39 ` [9fans] Font Michaelian Ennis @ 2007-11-06 14:46 ` Anant Narayanan 2007-11-06 14:50 ` erik quanstrom 2007-11-06 14:56 ` Martin Neubauer 1 sibling, 1 reply; 40+ messages in thread From: Anant Narayanan @ 2007-11-06 14:46 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs Michaelian Ennis wrote: > I'd really like to use this font in plan9. Is there a guide out there of > what is required? > http://www.levien.com/type/myfonts/inconsolata.html Get the freetype port from http://mirtchovski.com/p9/freetype/ Convert the font to ttf and then use ttf2subf. -- Anant ^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [9fans] Font 2007-11-06 14:46 ` Anant Narayanan @ 2007-11-06 14:50 ` erik quanstrom 2007-11-07 18:12 ` Michaelian Ennis 0 siblings, 1 reply; 40+ messages in thread From: erik quanstrom @ 2007-11-06 14:50 UTC (permalink / raw) To: 9fans > Michaelian Ennis wrote: >> I'd really like to use this font in plan9. Is there a guide out there of >> what is required? >> http://www.levien.com/type/myfonts/inconsolata.html > > Get the freetype port from http://mirtchovski.com/p9/freetype/ > Convert the font to ttf and then use ttf2subf. there is a copy of these converted fonts on sources /n/sources/contrib/quanstro/subpixel/icons.tar and /n/sources/contrib/quanstro/subpixel/lib/font/bit/icons/ you will need my patch to libframe for highlighting to work correctly. - erik ^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [9fans] Font 2007-11-06 14:50 ` erik quanstrom @ 2007-11-07 18:12 ` Michaelian Ennis 0 siblings, 0 replies; 40+ messages in thread From: Michaelian Ennis @ 2007-11-07 18:12 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs > there is a copy of these converted fonts on sources > /n/sources/contrib/quanstro/subpixel/icons.tar > and > /n/sources/contrib/quanstro/subpixel/lib/font/bit/icons/ > > you will need my patch to libframe for highlighting to work > correctly. Hey that works great. I didn't have to apply a patch though. Perhaps that was done for me by my friendly neighborhood sysadmin? :) Ian ^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [9fans] Font 2007-11-06 14:39 ` [9fans] Font Michaelian Ennis 2007-11-06 14:46 ` Anant Narayanan @ 2007-11-06 14:56 ` Martin Neubauer 1 sibling, 0 replies; 40+ messages in thread From: Martin Neubauer @ 2007-11-06 14:56 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs http://mirtchovski.com/p9/freetype/ has some hints on that topic. ^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [9fans] Suggestion: Programming Tutorial for /sys/doc 2007-11-03 8:49 ` Sander van Dijk 2007-11-03 15:24 ` Eldanen @ 2007-11-05 11:59 ` Gorka Guardiola 1 sibling, 0 replies; 40+ messages in thread From: Gorka Guardiola @ 2007-11-05 11:59 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs On Nov 3, 2007 9:49 AM, Sander van Dijk <a.h.vandijk@gmail.com> wrote: > On Nov 3, 2007 3:44 AM, Gorka Guardiola <paurea@gmail.com> wrote: > > I tested it on qemu and it worked for me. > > May I ask how you booted the image? > I used a hard disk on a file. I am using a flat vmware disk as a file, dunno if this affects. I formated it with 9fat, added a kernel and booted from it. -- - curiosity sKilled the cat ^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [9fans] Suggestion: Programming Tutorial for /sys/doc 2007-11-02 13:39 ` erik quanstrom 2007-11-02 16:44 ` geoff @ 2007-11-02 18:09 ` David Leimbach 1 sibling, 0 replies; 40+ messages in thread From: David Leimbach @ 2007-11-02 18:09 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs On Nov 2, 2007 6:39 AM, erik quanstrom <quanstro@quanstro.net> wrote: > > I've tried it... I think it's great :-) > > > > I can confess I've not gotten through the whole thing because my plan > > 9 box doesn't work anymore... and I'm unable to get one running in > > VMWare fusion to continue playing around. It still hangs at boot. > > I'm using venti+fossil if it matters. Probably should just use fossil > > if it's going to be a toy I guess. > > would it make sense to use to the older 9load until the new one > works for more people? > > - erik > Hmmm that would explain why the liveCD portion works eh? ^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [9fans] Suggestion: Programming Tutorial for /sys/doc 2007-11-02 13:10 ` Iruata Souza 2007-11-02 13:34 ` David Leimbach @ 2007-11-02 18:47 ` Pietro Gagliardi 2007-11-02 20:11 ` Iruata Souza 2007-11-02 18:52 ` Pietro Gagliardi 2 siblings, 1 reply; 40+ messages in thread From: Pietro Gagliardi @ 2007-11-02 18:47 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs I caught the file iru, I haven't gone 100% through that but it's looking good so far On Nov 2, 2007, at 9:10 AM, Iruata Souza wrote: > since no one seemed to care, I'll repeat fgb: > did you tried nemo's intro? > > http://lsub.org/who/nemo/9.intro.pdf > > iru ^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [9fans] Suggestion: Programming Tutorial for /sys/doc 2007-11-02 18:47 ` Pietro Gagliardi @ 2007-11-02 20:11 ` Iruata Souza 0 siblings, 0 replies; 40+ messages in thread From: Iruata Souza @ 2007-11-02 20:11 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs On 11/2/07, Pietro Gagliardi <pietro10@mac.com> wrote: > I caught the file iru, I haven't gone 100% through that but it's > looking good so far > good to know and good luck! iru ^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [9fans] Suggestion: Programming Tutorial for /sys/doc 2007-11-02 13:10 ` Iruata Souza 2007-11-02 13:34 ` David Leimbach 2007-11-02 18:47 ` Pietro Gagliardi @ 2007-11-02 18:52 ` Pietro Gagliardi 2 siblings, 0 replies; 40+ messages in thread From: Pietro Gagliardi @ 2007-11-02 18:52 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs By the way - thanks for the file again, it told me how to properly use the Look tag in acme! :-) On Nov 2, 2007, at 9:10 AM, Iruata Souza wrote: > since no one seemed to care, I'll repeat fgb: > did you tried nemo's intro? > > http://lsub.org/who/nemo/9.intro.pdf > > iru ^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [9fans] Suggestion: Programming Tutorial for /sys/doc 2007-11-01 21:00 ` Pietro Gagliardi 2007-11-01 21:22 ` Federico Benavento @ 2007-11-01 21:27 ` Uriel 2007-11-02 1:44 ` Anthony Sorace 2 siblings, 0 replies; 40+ messages in thread From: Uriel @ 2007-11-01 21:27 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs > "man page jumping" is a problem. Use the plumber luke. (Specially in acme, any man page reference is a right click away) ^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [9fans] Suggestion: Programming Tutorial for /sys/doc 2007-11-01 21:00 ` Pietro Gagliardi 2007-11-01 21:22 ` Federico Benavento 2007-11-01 21:27 ` Uriel @ 2007-11-02 1:44 ` Anthony Sorace 2007-11-02 7:53 ` Uriel 2 siblings, 1 reply; 40+ messages in thread From: Anthony Sorace @ 2007-11-02 1:44 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs On 11/1/07, Pietro Gagliardi <pietro10@mac.com> wrote: > /sys/doc doesn't talk much about the system... Erm, what? That's pretty much all it talks about. From your list of topics, 9.ms gives a nice view of "basics", acid.ms gives a nice tour of debugging (acidpaper.ms is a good read, too, but isn't really "introductory"), comp.ms give a good view of how the compilers are typically used in Plan 9 (as opposed to compiler.ms, which talks about the compilers themselves), and net/net.ms covers networking in Plan 9 very well (I thought i saw a paper on libthread in there, but I seem to be wrong). I'm certainly not saying that there isn't valid work to do for an introductory document, but there's much information already out there on the topics you're covering. Maybe I'm misunderstanding your intentions and you want to cover neglected aspects of them or some such. > I have to look at lookman first. Well, yes. Or read the index yourself, I suppose (how *would* one do that with the online version?). > The man pages have several flaws: there are too many; Again, I'm afraid I don't really understand this complaint. They are numerous, yes, because they're describing lots of different things. They don't make for the best introduction *on their own* for that reason, but they make an excellent reference - which is more or less their intent. > some important stuff is hard to find; Sometimes, yes. lookman does a very good job, but is not perfect. Can you give examples of the types of difficulty you've been having? > "man page jumping" is a problem. Why? It's certainly easy enough to do - the acme integration via plumber is very nice. It's a "problem" in that it doesn't make for a nice, flowing introduction, but again, that's not their intent. My point about the man pages as regards an introductory document is mostly that it'd be bad to needlessly duplicate effort. I'd expect an introductory document to make extensive reference to the manual for the topics it covers. ^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [9fans] Suggestion: Programming Tutorial for /sys/doc 2007-11-02 1:44 ` Anthony Sorace @ 2007-11-02 7:53 ` Uriel 0 siblings, 0 replies; 40+ messages in thread From: Uriel @ 2007-11-02 7:53 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs > > The man pages have several flaws: there are too many; > > Again, I'm afraid I don't really understand this complaint. They are > numerous, yes, because they're describing lots of different things. > They don't make for the best introduction *on their own* for that > reason, but they make an excellent reference - which is more or less > their intent. There is intro(2) is not a bad introduction either, althought it certainly doesn't cover much. Just thinking out loud here so I might make no sense, but I suspect the issue is that the style of the plan9 documentation is very different from what people have become used to expect, this days people expects 'tutorials' and other handholding with many examples to 'copy paste' into their code and so on, which is quite different from the Unix/Plan 9 documentation style of clear and concise information and simple examples that help illustrate the general concepts, but that does require the reader to actually *understand* things rather than just follow an arbitrary set of steps. Best wishes uriel > > > some important stuff is hard to find; > > Sometimes, yes. lookman does a very good job, but is not perfect. Can > you give examples of the types of difficulty you've been having? > > > "man page jumping" is a problem. > > Why? It's certainly easy enough to do - the acme integration via > plumber is very nice. It's a "problem" in that it doesn't make for a > nice, flowing introduction, but again, that's not their intent. > > My point about the man pages as regards an introductory document is > mostly that it'd be bad to needlessly duplicate effort. I'd expect an > introductory document to make extensive reference to the manual for > the topics it covers. > ^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [9fans] Suggestion: Programming Tutorial for /sys/doc 2007-11-01 20:11 [9fans] Suggestion: Programming Tutorial for /sys/doc Pietro Gagliardi 2007-11-01 20:23 ` don bailey 2007-11-01 20:47 ` Anthony Sorace @ 2007-11-01 21:24 ` ISHWAR RATTAN 2007-11-02 3:07 ` Joel C. Salomon ` (3 subsequent siblings) 6 siblings, 0 replies; 40+ messages in thread From: ISHWAR RATTAN @ 2007-11-01 21:24 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs Sounds good to me. -ishwar On Thu, 1 Nov 2007, Pietro Gagliardi wrote: > Hello. I've been trying out programming Plan 9 since I got the system up and > I think I'm getting the hang of learning from man pages. I'm not a big fan of > having to type "man -t 2 xxx | page" about 100 times a day to figure out > something, and there are things that the man pages don't cover in a clear > way, so I think a tutorial should be put in. I already started writing one, > and I think it would benefit from being in /sys/doc. It will cover: > - basics > - compiler usage > - file access > - threads > - graphics and controls > - hopefully networking > - debugging > within about 15-30 pages. Anyone like this idea? - Pietro > ^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [9fans] Suggestion: Programming Tutorial for /sys/doc 2007-11-01 20:11 [9fans] Suggestion: Programming Tutorial for /sys/doc Pietro Gagliardi ` (2 preceding siblings ...) 2007-11-01 21:24 ` ISHWAR RATTAN @ 2007-11-02 3:07 ` Joel C. Salomon 2007-11-02 8:19 ` fernanbolando ` (2 subsequent siblings) 6 siblings, 0 replies; 40+ messages in thread From: Joel C. Salomon @ 2007-11-02 3:07 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs On 11/1/07, Pietro Gagliardi <pietro10@mac.com> wrote: > … so I think a tutorial should be put in. I already started writing one, > and I think it would benefit from being in /sys/doc. Something like a combination of Brian Kernighan's "UNIX for Beginners" and K&R's "UNIX Programming" from the 7th Edition manual, perhaps? --Joel ^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [9fans] Suggestion: Programming Tutorial for /sys/doc 2007-11-01 20:11 [9fans] Suggestion: Programming Tutorial for /sys/doc Pietro Gagliardi ` (3 preceding siblings ...) 2007-11-02 3:07 ` Joel C. Salomon @ 2007-11-02 8:19 ` fernanbolando 2007-11-02 10:03 ` roger peppe 2007-11-02 12:42 ` erik quanstrom 2007-11-02 15:39 ` Douglas A. Gwyn 2007-11-02 19:12 ` Anant Narayanan 6 siblings, 2 replies; 40+ messages in thread From: fernanbolando @ 2007-11-02 8:19 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs, Pietro Gagliardi -----Original Message----- From: Pietro Gagliardi <pietro10@mac.com> > Hello. I've been trying out programming Plan 9 since I got the system > up and I think I'm getting the hang of learning from man pages. I'm > not a big fan of having to type "man -t 2 xxx | page" about 100 times > a day to figure out something, and there are things that the man > pages don't cover in a clear way, so I think a tutorial should be put > in. I already started writing one, and I think it would benefit from > being in /sys/doc. It will cover: > - basics > - compiler usage > - file access > - threads > - graphics and controls > - hopefully networking > - debugging > within about 15-30 pages. Anyone like this idea? - Pietro For someone like me who have not gotten used to the entire plan 9 ideas yet. Something like this would be very useful. But I think this type of documentation should be placed in the wiki not in /sys/doc. Once you have learned the system, you only need the man files as references or to get more details. Even in linux I remove all the documentation I can find except for the man files. ^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [9fans] Suggestion: Programming Tutorial for /sys/doc 2007-11-02 8:19 ` fernanbolando @ 2007-11-02 10:03 ` roger peppe 2007-11-02 13:07 ` Eric Van Hensbergen 2007-11-02 12:42 ` erik quanstrom 1 sibling, 1 reply; 40+ messages in thread From: roger peppe @ 2007-11-02 10:03 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs i've sometimes thought that it would be nice to have some kind of overview of the manual pages - classifying them into groups smaller than the main sections, and talking about them a bit. lookman's fine if you know what you're looking for. just reading through the manual pages sequentially turns up many little gems, but isn't really a quick way to go about things. ^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [9fans] Suggestion: Programming Tutorial for /sys/doc 2007-11-02 10:03 ` roger peppe @ 2007-11-02 13:07 ` Eric Van Hensbergen 0 siblings, 0 replies; 40+ messages in thread From: Eric Van Hensbergen @ 2007-11-02 13:07 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs On 11/2/07, roger peppe <rogpeppe@gmail.com> wrote: > i've sometimes thought that it would be nice to have > some kind of overview of the manual pages - classifying > them into groups smaller than the main sections, and > talking about them a bit. > Yeah - I've got a lib/man-guide for acme which basically does something like this with plumbable references to the man-pages I seem to use most. Although maybe more of a narrative would be useful. -eric ^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [9fans] Suggestion: Programming Tutorial for /sys/doc 2007-11-02 8:19 ` fernanbolando 2007-11-02 10:03 ` roger peppe @ 2007-11-02 12:42 ` erik quanstrom 1 sibling, 0 replies; 40+ messages in thread From: erik quanstrom @ 2007-11-02 12:42 UTC (permalink / raw) To: 9fans > For someone like me who have not gotten used to the entire > plan 9 ideas yet. Something like this would be very useful. > But I think this type of documentation should be placed in the > wiki not in /sys/doc. Once you have learned the system, you only > need the man files as references or to get more details. you mean like here: http://plan9.bell-labs.com/wiki/plan9/papers/ folks, google is your friend. - erik ^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [9fans] Suggestion: Programming Tutorial for /sys/doc 2007-11-01 20:11 [9fans] Suggestion: Programming Tutorial for /sys/doc Pietro Gagliardi ` (4 preceding siblings ...) 2007-11-02 8:19 ` fernanbolando @ 2007-11-02 15:39 ` Douglas A. Gwyn 2007-11-02 19:12 ` Anant Narayanan 6 siblings, 0 replies; 40+ messages in thread From: Douglas A. Gwyn @ 2007-11-02 15:39 UTC (permalink / raw) To: 9fans Pietro Gagliardi wrote: > I'm not a big fan of having to type "man -t 2 xxx | page" about 100 times > a day to figure out something, So make a shell function or command script that lets you type "m xxx" instead. > and there are things that the man pages don't cover in a clear way, > so I think a tutorial should be put in. There are "user guide" papers describing various subsystems, etc. and at least one good, comprehensive tutorial that I know of: http://www.lsub.org/who/nemo/9.intro.pdf Also check out: http://www.magma.com.ni/moin/Plan9Tutorial ^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [9fans] Suggestion: Programming Tutorial for /sys/doc 2007-11-01 20:11 [9fans] Suggestion: Programming Tutorial for /sys/doc Pietro Gagliardi ` (5 preceding siblings ...) 2007-11-02 15:39 ` Douglas A. Gwyn @ 2007-11-02 19:12 ` Anant Narayanan 2007-11-02 19:44 ` Pietro Gagliardi 6 siblings, 1 reply; 40+ messages in thread From: Anant Narayanan @ 2007-11-02 19:12 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs Pietro Gagliardi wrote: > cover in a clear way, so I think a tutorial should be put in. I already > started writing one, and I think it would benefit from being in > - graphics and controls While I am mostly able understand the other concepts you mention from existing documentation, I find graphics (libdraw) to be somewhat cryptic. I've always felt the need for a tutorial-style introduction on how to do graphics in Plan 9. The current solution seems to be mostly be: "Read the code". Which isn't really as good. Uriel wrote: > Just thinking out loud here so I might make no sense, but I suspect > the issue is that the style of the plan9 documentation is very > different from what people have become used to expect, this days > people expects 'tutorials' and other handholding with many examples to > 'copy paste' into their code and so on, which is quite different from > the Unix/Plan 9 documentation style of clear and concise information > and simple examples that help illustrate the general concepts, but > that does require the reader to actually *understand* things rather > than just follow an arbitrary set of steps. Sometimes people need hand-holding, especially when they're trying to learn a completely new system. I am all for conventional tutorial-style introductions to Plan 9. Even if the tutorial shamelessly repeats a lot (all?) of the information in the man pages and papers, redundancy in documentation never really hurt anyone. In fact, the more, the merrier :) Cheers, -- Anant ^ permalink raw reply [flat|nested] 40+ messages in thread
* Re: [9fans] Suggestion: Programming Tutorial for /sys/doc 2007-11-02 19:12 ` Anant Narayanan @ 2007-11-02 19:44 ` Pietro Gagliardi 0 siblings, 0 replies; 40+ messages in thread From: Pietro Gagliardi @ 2007-11-02 19:44 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs Here's a little bit of (heavily) commented code that simply sets up the screen and draws a line. This should be more than enough to get you started (it's almost how I started). /* necessary headers */ #include <u.h> #include <libc.h> #include <draw.h> #include <cursor.h> /* main routine */ void main(int argc, char *argv[]) { int c; void draw_line(void); /* int initdraw(err_func, default_font, program_name) If err_func is 0, use default If default_font is 0, use default */ if (initdraw(0, 0, "program name") < 0) sysfatal("could not initialize graphics"); draw_line(); for (;;) /* not the best way to wait for a key hit I don't want to go into events here */ if (read(0, &c, 1) == 1) break; exits(0); /* graphics is automatically terminated */ } So here's how you draw a line: void draw_line(void) { /* this is how to create a color - see allocimage(2) for a complete list */ Image *black_color = allocimage(display, Rect(0, 0, 1, 1), RGB24, 1, DBlack); Point a = Pt(3, 2), b = Pt(400, 900); /* line(destination, from, to, from_end_type, to_end_type, thickness, source_color, point_to_use); To get the thickness of the line, use the equation 1 + (2 * thickness) In this case, the thickness is 1. Other choices for end types are Enddisc and Endarrow. Plan 9 is more powerful than this, however. You can take any color from any image or create more elaborate arrows with ARROW() as the type parameter. You can even mix and match types. But this is more advanced. Refer to draw(2). */ line(screen, a, Endsquare, Endsquare, 0, black_color, Pt(0, 0)); } Just stick that in the code section. On Nov 2, 2007, at 3:12 PM, Anant Narayanan wrote: > Pietro Gagliardi wrote: >> cover in a clear way, so I think a tutorial should be put in. I >> already >> started writing one, and I think it would benefit from being in >> - graphics and controls > > While I am mostly able understand the other concepts you mention from > existing documentation, I find graphics (libdraw) to be somewhat > cryptic. I've always felt the need for a tutorial-style > introduction on > how to do graphics in Plan 9. > > The current solution seems to be mostly be: "Read the code". Which > isn't > really as good. > ^ permalink raw reply [flat|nested] 40+ messages in thread
* [9fans] $font @ 2005-09-17 15:26 erik quanstrom 0 siblings, 0 replies; 40+ messages in thread From: erik quanstrom @ 2005-09-17 15:26 UTC (permalink / raw) To: 9fans if $font were used by acme, would $font be the fixed font or the proportional font? what would we call the other font? erik ^ permalink raw reply [flat|nested] 40+ messages in thread
end of thread, other threads:[~2007-11-07 18:12 UTC | newest] Thread overview: 40+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2007-11-01 20:11 [9fans] Suggestion: Programming Tutorial for /sys/doc Pietro Gagliardi 2007-11-01 20:23 ` don bailey 2007-11-01 20:47 ` Anthony Sorace 2007-11-01 21:00 ` Pietro Gagliardi 2007-11-01 21:22 ` Federico Benavento 2007-11-02 13:10 ` Iruata Souza 2007-11-02 13:34 ` David Leimbach 2007-11-02 13:39 ` erik quanstrom 2007-11-02 16:44 ` geoff 2007-11-02 18:00 ` erik quanstrom 2007-11-02 19:34 ` geoff 2007-11-02 20:57 ` David Leimbach 2007-11-03 2:44 ` Gorka Guardiola 2007-11-03 8:49 ` Sander van Dijk 2007-11-03 15:24 ` Eldanen 2007-11-03 21:43 ` erik quanstrom 2007-11-03 23:40 ` Eldanen 2007-11-06 14:39 ` [9fans] Font Michaelian Ennis 2007-11-06 14:46 ` Anant Narayanan 2007-11-06 14:50 ` erik quanstrom 2007-11-07 18:12 ` Michaelian Ennis 2007-11-06 14:56 ` Martin Neubauer 2007-11-05 11:59 ` [9fans] Suggestion: Programming Tutorial for /sys/doc Gorka Guardiola 2007-11-02 18:09 ` David Leimbach 2007-11-02 18:47 ` Pietro Gagliardi 2007-11-02 20:11 ` Iruata Souza 2007-11-02 18:52 ` Pietro Gagliardi 2007-11-01 21:27 ` Uriel 2007-11-02 1:44 ` Anthony Sorace 2007-11-02 7:53 ` Uriel 2007-11-01 21:24 ` ISHWAR RATTAN 2007-11-02 3:07 ` Joel C. Salomon 2007-11-02 8:19 ` fernanbolando 2007-11-02 10:03 ` roger peppe 2007-11-02 13:07 ` Eric Van Hensbergen 2007-11-02 12:42 ` erik quanstrom 2007-11-02 15:39 ` Douglas A. Gwyn 2007-11-02 19:12 ` Anant Narayanan 2007-11-02 19:44 ` Pietro Gagliardi -- strict thread matches above, loose matches on Subject: below -- 2005-09-17 15:26 [9fans] $font erik quanstrom
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).