Re: [9fans] Flash
Paul Lalonde writes: >If time is the constraint, then just uninstall all your web browsers If I did that, I would indeed waste less time, but I would also have to forgo great benefits that I now enjoy. In contrast, I derived almost no benefit from Flash web pages. I am _not_ claiming that Flash cannot be used to create a web page beneficial to me or that Flash is intrinsically bad or that _you_ should uninstall _your_ Flash plugins. People seem to vary widely in how easy it is for a person to resist time-wasting temptations. Having to resist the temptation to play chess online seemed to consume a nontrivial amount of my willpower, which I would prefer to have available for other uses. -- Unless the body contains my name or email address or you CC me, it will probably be a long time before I see your reply.
Re: [9fans] Flash
Better yet, disconnect your Internet connection and go to Multics. On Feb 9, 2008, at 7:04 PM, Paul Lalonde wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 If time is the constraint, then just uninstall all your web browsers, or just run native plan9. Paul On 9-Feb-08, at 2:08 PM, Richard Uhtenwoldt wrote: Steve Simon writes: I turn flash off on all the browsers I use, I find it irritating and slows things down. I go further. I uninstall flash, as follows: rm ~/.mozilla/plugins/{flashplayer.xpt,libflashplayer.so} Why do I uninstall flash? To remove the temptation to visit a flash web site to play chess. (I was unhappy with the amount of time I wasted playing chess when I had flash installed.) -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.5 (Darwin) iD8DBQFHrj92pJeHo/Fbu1wRAoPWAJ0VQpZ5Mfg4LKGhocgAvMx3hOeTygCfXmhU oKSovEHHlmjv2Tyc363AMVw= =YEYw -END PGP SIGNATURE-
Re: [9fans] Flash
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 If time is the constraint, then just uninstall all your web browsers, or just run native plan9. Paul On 9-Feb-08, at 2:08 PM, Richard Uhtenwoldt wrote: Steve Simon writes: I turn flash off on all the browsers I use, I find it irritating and slows things down. I go further. I uninstall flash, as follows: rm ~/.mozilla/plugins/{flashplayer.xpt,libflashplayer.so} Why do I uninstall flash? To remove the temptation to visit a flash web site to play chess. (I was unhappy with the amount of time I wasted playing chess when I had flash installed.) -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.5 (Darwin) iD8DBQFHrj92pJeHo/Fbu1wRAoPWAJ0VQpZ5Mfg4LKGhocgAvMx3hOeTygCfXmhU oKSovEHHlmjv2Tyc363AMVw= =YEYw -END PGP SIGNATURE-
[9fans] Flash
Steve Simon writes: >I turn flash off on all the browsers I use, I find it irritating and >slows things down. I go further. I uninstall flash, as follows: rm ~/.mozilla/plugins/{flashplayer.xpt,libflashplayer.so} Why do I uninstall flash? To remove the temptation to visit a flash web site to play chess. (I was unhappy with the amount of time I wasted playing chess when I had flash installed.)
Re: [9fans] How to move to rc from sh/bash
`LANG=C' cures a number of ills in modern Gnuware, including ls -l output. In effect, it requests traditional Unix behaviour rather than this week's Linux behaviour, so it's a handy general-purpose prophylactic.
Re: [9fans] Hello Assembly
On Feb 9, 2008, at 4:15 PM, Anant Narayanan wrote: DATAstring<>+0(SB)/8, $"Hello\n\z\z" Why are there two \zs? Shouldn't one be enough?
Re: [9fans] Hello Assembly
Thanks everybody (especially Jim and Charles), I got this to work. Here's the final program: DATAstring<>+0(SB)/8, $"Hello\n\z\z" GLOBL string<>+0(SB), $8 TEXT_main+0(SB), 1, $0 MOVL$1, 4(SP) MOVL$string<>+0(SB), 8(SP) MOVL$7, 12(SP) MOVL$-1, 16(SP) MOVL$-1, 20(SP) MOVL$51, AX INT $64 MOVL$string<>+0(SB), 4(SP) MOVL$8, AX INT $64 Jim pointed out that using RET was incorrect as the instruction wouldn't know where to get back to. Calling exits() instead, works. Plan 9 gets more and more exciting for me, everyday :) Thanks again! Cheers, Anant
Re: [9fans] Hello Assembly
actually, there's probably enough space above your current location to (appear to) work, but a further error is hinted in the address given by the trap: 8.out 1183: suicide: invalid address 0x7 in sys call pc=0x104e since 7 is your length value, you've also got an off-by-4 error in your stack offsets. In which direction, 4(SP) or -4(SP)? Both don't work, it still suicides but at different 'invalid addresses' and pc values :( -- Anant
Re: [9fans] Hello Assembly
On 09-Feb-08, at 4:04 PM, erik quanstrom wrote: actually, i think there's something else wrong: for the equivalent c "pwrite(1, string, 7, 0)" i get this I don't get FP for `8c -S hello.c' (which just calls pwrite as you describe). This is what I get: TEXTmain+0(SB), 0, $32 MOVL$.string<>+0(SB), CX MOVL$1, AX MOVLAX, (SP) MOVLCX, 4(SP) MOVL$7, AX MOVLAX, 8(SP) MOVL$-1, 12(SP) MOVL$-1, 16(SP) CALL,pwrite+0(SB) RET , DATA.string<>+0(SB)/8, $"Hello\n\z\z" GLOBL .string<>+0(SB), $8 END , Replicating the exact program - with just three changes: moving the DATA/GLOBL statement to the top, changing main to _main and replacing CALL with MOVL $64, AX and INT $64 - still results in the suicide. Puzzling. -- Anant
Re: [9fans] How to move to rc from sh/bash
> The meaning of [A-Z], on a gnu system, depends on the locale used. The > letters between [A-Z] depend on the sorting order defined in the > locale, ... > Using "LANG=C" before evaluating any [A-Z] expression should give you > the usual C meaning of only capitals. i know. i want out.
Re: [9fans] Hello Assembly
>> No two cents from me. Just posted this to say that AT&T syntax is >> "sickly." I suppose Anant Narayanan is assembling these using 8a, and >> given the "symptoms" (the syntax, that is) 8a must be using AT&T syntax. I the assembler is really just a front-end to the loader, and nothing to do with `at&t syntax'. there are some odd aspects to thompson syntax as it is (data loading for instance, and the <>) but generally i agree with brantley. some weeks i'm working with several processors, even several a day, and the `native' (in what sense? does the processor implement them?) assemblers typically differ in operand order, basic mnemonics (l/st vs mov), and other conventions, whereas the ?a family is uniformly data flow, and tends to use similar instructions for similar things. i find it much easier moving from platform to platform with it.
Re: [9fans] Hello Assembly
> On Feb 9, 2008 8:17 AM, Brantley Coile <[EMAIL PROTECTED]> wrote: >> I would like to hear what Rob or others have to say about the >> assembler syntax, but I actually like the syntax for the following >> reason. > > if you love assembly code, the assembler on Plan 9 is not great. > > If you love assembly code, you are in need of a CAT scan in my view. > > The v6 manual entry for as called assembly code "the ultimate dead > language". If only that had been true. > > gcc and friends have made the world safe for assembly, and there is more > assembly in use than ever. > > Writing assembly code should be as painful as possible. Plan 9 > succeeds in that regard. It's a good thing in my view. > > ron I'm afraid Plan 9 fails in this reguard. Here's some Oberon code to make the pread call. (This is NOT Wirth's compiler, but Paul Reed's. He agrees with you about make assembly programming as hard as possible.) PROCEDURE syspread(poshi, poslo: LONGINT; VAR buf: ARRAY OF CHAR; fd: LONGINT): LONGINT; BEGIN (* 18: return value 14: poshi 10: poslo 0c: buflen 08; buf ptr 04: fd 00: RA *) SYSTEM.CODE( 0C9H, (* leave *) 06AH, 50, (* pushb $close *) 058H, (* pop eax *) 0CDH, 040H, (* int $40h *) 089H,084H,024H,018H,000H,000H,000H, (* movl eax, 18h(esp) *) 0C2H, 14H, 0(* ret $14h *) ) END syspread;
Re: [9fans] Hello Assembly
> if you love assembly code, the assembler on Plan 9 is not great. > > If you love assembly code, you are in need of a CAT scan in my view. > > The v6 manual entry for as called assembly code "the ultimate dead > language". If only that had been true. > > gcc and friends have made the world safe for assembly, and there is more > assembly in use than ever. > > Writing assembly code should be as painful as possible. Plan 9 > succeeds in that regard. It's a good thing in my view. > > ron i don't think that it follows from the fact that assembly language is inappropriately used in a lot of linux software that it should be as hard to use as possible on plan 9. there are some tasks that must be in assembly language. and it's a good tool for learning how the machine works. sometimes, like on really small controllers, it's the best tool for the job. just my 2¢. - erik p.s. relax ron. i promise not to rewrite plan 9 in assembly language.
Re: [9fans] Hello Assembly
On Feb 9, 2008 8:17 AM, Brantley Coile <[EMAIL PROTECTED]> wrote: > I would like to hear what Rob or others have to say about the > assembler syntax, but I actually like the syntax for the following > reason. if you love assembly code, the assembler on Plan 9 is not great. If you love assembly code, you are in need of a CAT scan in my view. The v6 manual entry for as called assembly code "the ultimate dead language". If only that had been true. gcc and friends have made the world safe for assembly, and there is more assembly in use than ever. Writing assembly code should be as painful as possible. Plan 9 succeeds in that regard. It's a good thing in my view. ron
Re: [9fans] Hello Assembly
I would like to hear what Rob or others have to say about the assembler syntax, but I actually like the syntax for the following reason. You only have to remember one syntax and not ten different ones. I would think, given that the structure of the compiler/loader is very non-traditional, it would be difficult to provide all the pseudo operations that the various native assemblers would require. Best thing is not to write a lot of assembler code. :) > On Sat, 09 Feb 2008 09:44:21 -, Anant Narayanan <[EMAIL PROTECTED]> wrote: > >> Hi, >> >> I'm trying to make a Hello World program in assembly without depending >> on libc. Here's what I have so far: >> >> DATA string+0(SB)/7, $"Hello\n\z" >> GLOBLstring+0(SB), $7 >> >> TEXT _main+0(SB), 1, $0 >> >> // first arg; $1 = stdout >> MOVL $1, (SP) >> // second arg, address of string >> MOVL $string+0(SB), 4(SP) >> // third arg, $7 = length of string >> MOVL $7, 8(SP) >> // fourth argument, -1LL (vlong offset) >> MOVL $-1, 12(SP) >> MOVL $-1, 16(SP) >> >> // use pwrite syscall >> MOVL $51, AX >> INT $64 >> RET >> > > No two cents from me. Just posted this to say that AT&T syntax is > "sickly." I suppose Anant Narayanan is assembling these using 8a, and > given the "symptoms" (the syntax, that is) 8a must be using AT&T syntax. I > am wondering if there is an Intel syntax assembler for Plan 9 (something > akin to Netwide Assembler or yet better Flat Assembler). > > -- > Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Re: [9fans] How to move to rc from sh/bash
On Feb 9, 2008 11:27 AM, Lluís Batlle <[EMAIL PROTECTED]> wrote: > The meaning of [A-Z], on a gnu system, depends on the locale used. The > letters between [A-Z] depend on the sorting order defined in the > locale, and I guess that's defined by language in unicode somehow; but > I don't know how much there is a decision by Unicode on that. For > example, in Catalan we have that [A-Z] array defined as > [aAbBcCdDeE...]. And imagine: [A-Z] doesn't include [a]. :) Histerical! Locales keep getting better and better the more I learn about them... think of all the jobs that have been created thanks to them, I bet Mr bs would love to have invented them! uriel
Re: [9fans] Hello Assembly
On Sat, 09 Feb 2008 09:44:21 -, Anant Narayanan <[EMAIL PROTECTED]> wrote: Hi, I'm trying to make a Hello World program in assembly without depending on libc. Here's what I have so far: DATAstring+0(SB)/7, $"Hello\n\z" GLOBL string+0(SB), $7 TEXT_main+0(SB), 1, $0 // first arg; $1 = stdout MOVL$1, (SP) // second arg, address of string MOVL$string+0(SB), 4(SP) // third arg, $7 = length of string MOVL$7, 8(SP) // fourth argument, -1LL (vlong offset) MOVL$-1, 12(SP) MOVL$-1, 16(SP) // use pwrite syscall MOVL$51, AX INT $64 RET No two cents from me. Just posted this to say that AT&T syntax is "sickly." I suppose Anant Narayanan is assembling these using 8a, and given the "symptoms" (the syntax, that is) 8a must be using AT&T syntax. I am wondering if there is an Intel syntax assembler for Plan 9 (something akin to Netwide Assembler or yet better Flat Assembler). -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Re: [9fans] How to move to rc from sh/bash
On Feb 9, 2008 5:11 AM, Charles Forsyth <[EMAIL PROTECTED]> wrote: > is it just a matter of chsh (after changing /etc/shells)? It is, or at least can be. If you've got the tools installed at any non-standard location, you have to make sure $PLAN9 is set somewhere before your shell is started (as opposed to on login). I've considered creating an rc with a built-in default rcmain to avoid this requirement on systems I don't control.
[9fans] [ANNOUNCE] libmixp and libmixpsrv
Hi folks, I'd like to announce two 9P libraries for *nix platforms: libmixp:9P protocol handling http://j.metux.de/index.php?option=com_content&task=view&id=51 libmixpsrv: 9P server library http://j.metux.de/index.php?option=com_content&task=view&id=52 cu -- - Enrico Weigelt== metux IT service - http://www.metux.de/ - Please visit the OpenSource QM Taskforce: http://wiki.metux.de/public/OpenSource_QM_Taskforce Patches / Fixes for a lot dozens of packages in dozens of versions: http://patches.metux.de/ -
Re: [9fans] Hello Assembly
> acid: asm(_main) > _main 0x1020 SUBL$0x18,SP > _main+0x3 0x1023 MOVL$0x1,0x0(SP) > _main+0xa 0x102a MOVL$string(SB),0x4(FP) > _main+0x12 0x1032 MOVL$0x7,0x8(FP) > _main+0x1a 0x103a MOVL$0x0,0xc(FP) > _main+0x22 0x1042 MOVL$0x0,0x10(FP) > _main+0x2a 0x104a MOVL$0x33,AX > _main+0x2f 0x104f INTB$0x40 > _main+0x31 0x1051 ADDL$0x18,SP > _main+0x34 0x1054 RET > > why does the ... SP in the .s get changed to FP unless the offset is 0? - erik
Re: [9fans] Hello Assembly
> actually, there's probably enough space above your current location to > (appear to) work, but a further error > is hinted in the address given by the trap: > > 8.out 1183: suicide: invalid address 0x7 in sys call pc=0x104e > > since 7 is your length value, you've also got an off-by-4 error in your stack > offsets. actually, i think there's something else wrong: acid: asm(_main) _main 0x1020SUBL$0x18,SP _main+0x3 0x1023MOVL$0x1,0x0(SP) _main+0xa 0x102aMOVL$string(SB),0x4(FP) _main+0x12 0x1032 MOVL$0x7,0x8(FP) _main+0x1a 0x103a MOVL$0x0,0xc(FP) _main+0x22 0x1042 MOVL$0x0,0x10(FP) _main+0x2a 0x104a MOVL$0x33,AX _main+0x2f 0x104f INTB$0x40 _main+0x31 0x1051 ADDL$0x18,SP _main+0x34 0x1054 RET why does the for the equivalent c "pwrite(1, string, 7, 0)" i get this acid: asm(main) main 0x1020 SUBL$0x18,SP main+0x3 0x1023 MOVL$0x1,AX main+0x8 0x1028 MOVLAX,0x0(SP) main+0xb 0x102b MOVLstring(SB),AX main+0x11 0x1031MOVLAX,0x4(SP) main+0x15 0x1035MOVL$0x7,AX main+0x1a 0x103aMOVLAX,0x8(SP) main+0x1e 0x103eMOVL$0x0,0xc(SP) main+0x26 0x1046MOVL$0x0,0x10(SP) main+0x2e 0x104eCALLpwrite(SB) main+0x33 0x1053ADDL$0x18,SP main+0x36 0x1056RET - erik
Re: [9fans] How to move to rc from sh/bash
The meaning of [A-Z], on a gnu system, depends on the locale used. The letters between [A-Z] depend on the sorting order defined in the locale, and I guess that's defined by language in unicode somehow; but I don't know how much there is a decision by Unicode on that. For example, in Catalan we have that [A-Z] array defined as [aAbBcCdDeE...]. And imagine: [A-Z] doesn't include [a]. :) Using "LANG=C" before evaluating any [A-Z] expression should give you the usual C meaning of only capitals. 2008/2/9, Charles Forsyth <[EMAIL PROTECTED]>: > this subject line reminds me: > > i'm fed up on Linux (Ubuntu) with bash messing up both file name matching > and 9term editing and i'd like to switch to p9p's rc. > (which twit decided that [A-Z] could ever be case-insensitive with a > case-sensitive file store?) > is it just a matter of chsh (after changing /etc/shells)? > given my experience with Linux, that seems implausibly straightforward. > i tried googling for some a little while ago but without success. > >
Re: [9fans] Hello Assembly
> there might be more, but you haven't allocated a stack frame for the (system) > call actually, there's probably enough space above your current location to (appear to) work, but a further error is hinted in the address given by the trap: 8.out 1183: suicide: invalid address 0x7 in sys call pc=0x104e since 7 is your length value, you've also got an off-by-4 error in your stack offsets.
Re: [9fans] Hello Assembly
> I did think that was the case earlier, so I tried: > > TEXT _main+0(SB), 1, $32 > > (And also with values ranging from $4 to $32 in increments of $4 just > for the heck of it). But it doesn't seem to make any difference in the > suicide, apart from the changed value of pc. > > The error is most likely because of the line (that's the only 7 around > there): > MOVL $7, 8(SP) > > But it doesn't complain about: > MOVL $1, (SP) > > so I wonder... you seek: SUBL$value, SP - erik
Re: [9fans] Hello Assembly
Hi Charles, there might be more, but you haven't allocated a stack frame for the (system) call I did think that was the case earlier, so I tried: TEXT_main+0(SB), 1, $32 (And also with values ranging from $4 to $32 in increments of $4 just for the heck of it). But it doesn't seem to make any difference in the suicide, apart from the changed value of pc. The error is most likely because of the line (that's the only 7 around there): MOVL$7, 8(SP) But it doesn't complain about: MOVL$1, (SP) so I wonder... -- Anant
Re: [9fans] How to move to rc from sh/bash
this subject line reminds me: i'm fed up on Linux (Ubuntu) with bash messing up both file name matching and 9term editing and i'd like to switch to p9p's rc. (which twit decided that [A-Z] could ever be case-insensitive with a case-sensitive file store?) is it just a matter of chsh (after changing /etc/shells)? given my experience with Linux, that seems implausibly straightforward. i tried googling for some a little while ago but without success.
Re: [9fans] Hello Assembly
> It's probably something silly - I'll be extremely grateful if someone there might be more, but you haven't allocated a stack frame for the (system) call
[9fans] Hello Assembly
Hi, I'm trying to make a Hello World program in assembly without depending on libc. Here's what I have so far: DATAstring+0(SB)/7, $"Hello\n\z" GLOBL string+0(SB), $7 TEXT_main+0(SB), 1, $0 // first arg; $1 = stdout MOVL$1, (SP) // second arg, address of string MOVL$string+0(SB), 4(SP) // third arg, $7 = length of string MOVL$7, 8(SP) // fourth argument, -1LL (vlong offset) MOVL$-1, 12(SP) MOVL$-1, 16(SP) // use pwrite syscall MOVL$51, AX INT $64 RET The program assembles and links fine - but executing it gives me: 8.out 1183: suicide: invalid address 0x7 in sys call pc=0x104e It's probably something silly - I'll be extremely grateful if someone could point out what I'm doing wrong. Thanks! -- Anant
Re: [9fans] How to move to rc from sh/bash
Thank you for your information. It is quite useful. I will have a browse for these documents first. On Feb 9, 2008 5:00 PM, erik quanstrom <[EMAIL PROTECTED]> wrote: > tom duff's original paper is in /sys/doc/rc.ps. i don't think i can > make a better argument for rc than that. personally, i think the > regularized grammer and quoting pay big dividends. rc is also > small. it's not hard to understand the virtual machine its built > around. but you'll need to decide for your self. -- HZ
Re: [9fans] How to move to rc from sh/bash
I started to list my favourite features (procedures, splitting, pattern matching, case) of rc, but I was just replicating the man page. I like rc because I can use it and understand scripts I haven't written, it is surprise free. I've also recently started making more use of signals. I spawn firefox to grab it's output with inferno via vnc but sometimes the page never finishes loading so I have to kill it something like this : fn sigalrm { kill_firefox_sleep_and_screengrab } sleep 200 && kill -ALRM $pid firefox $url & screengrab_when_appropriate & wait kill -ALRM $pid
Re: [9fans] How to move to rc from sh/bash
> 1. Is it possible to do command line edit in rc? > That is, in bash, both emacs and vi like keybindings can be used > (thanks to readline library). But in rc, I have not noticed that yet. > As a result, some basic usuages of a shell, such as recalling the > previously executed commands, have to be done by mouse (snarf and > paste). command line editing is provided by acme in the case of win, or rio(1) directly. not hold mode entered by typing . > 2. In non-interactive use (script programming), what's the main > advantages of rc over sh/bash? tom duff's original paper is in /sys/doc/rc.ps. i don't think i can make a better argument for rc than that. personally, i think the regularized grammer and quoting pay big dividends. rc is also small. it's not hard to understand the virtual machine its built around. but you'll need to decide for your self. - erik
Re: [9fans] How to move to rc from sh/bash
Hi, Because I can almost always find some new and interesting things in Plan9's equivalent implements, eg the unicode support of Plan9's troff and Sam's structural regexp, I think there may be such things in rc. Further, I think every system has its own idioms and habits and users must know them to make full use of it. But, frankly, I have not discovered the outstanding features of rc. So I post the previous question and hope to learn them, which perhaps are not well documented usually. Well, such a post may disturb you. I'm sorry for that. On Feb 9, 2008 4:01 PM, <[EMAIL PROTECTED]> wrote: > Groundhog day > > I like new users I really do but this is getting silly > > try reading the archives from LAST WEEK ! > > "what are the main benefits of your system over the ones you don't use" > is harder to answer > > > -- HZ
Re: [9fans] How to move to rc from sh/bash
Groundhog day I like new users I really do but this is getting silly try reading the archives from LAST WEEK ! "what are the main benefits of your system over the ones you don't use" is harder to answer