Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #20052 > unrolled thread
| Started by | Rob Sciuk <rob@controlq.com> |
|---|---|
| First post | 2013-02-26 17:03 -0500 |
| Last post | 2013-02-27 13:10 -1000 |
| Articles | 20 on this page of 115 — 20 participants |
Back to article view | Back to comp.lang.forth
MiniForth 0.1.18 has just been released ... Rob Sciuk <rob@controlq.com> - 2013-02-26 17:03 -0500
Re: MiniForth 0.1.18 has just been released ... "Rod Pemberton" <do_not_have@notemailnotz.cnm> - 2013-02-27 04:06 -0500
Re: MiniForth 0.1.18 has just been released ... Richard Owlett <rowlett@pcnetinc.com> - 2013-02-27 05:30 -0600
Re: MiniForth 0.1.18 has just been released ... Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-02-27 06:34 -0600
Re: MiniForth 0.1.18 has just been released ... anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-02-27 14:42 +0000
Re: MiniForth 0.1.18 has just been released ... Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-02-27 11:54 -0600
Re: MiniForth 0.1.18 has just been released ... Rob Sciuk <rob@controlq.com> - 2013-02-27 15:27 -0500
Re: MiniForth 0.1.18 has just been released ... Coos Haak <chforth@hccnet.nl> - 2013-02-27 21:58 +0100
Re: MiniForth 0.1.18 has just been released ... Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-02-27 16:33 -0600
Re: MiniForth 0.1.18 has just been released ... anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-03-02 17:23 +0000
Re: MiniForth 0.1.18 has just been released ... Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-03-02 15:12 -0600
Re: MiniForth 0.1.18 has just been released ... anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-03-03 14:30 +0000
Re: MiniForth 0.1.18 has just been released ... Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-03-03 14:49 -0600
Re: MiniForth 0.1.18 has just been released ... anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-03-07 16:58 +0000
Re: MiniForth 0.1.18 has just been released ... Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-03-07 16:35 -0600
Re: MiniForth 0.1.18 has just been released ... anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-03-08 17:29 +0000
Re: MiniForth 0.1.18 has just been released ... Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-03-08 12:17 -0600
Re: MiniForth 0.1.18 has just been released ... Bernd Paysan <bernd.paysan@gmx.de> - 2013-02-28 00:17 +0100
Re: MiniForth 0.1.18 has just been released ... Paul Rubin <no.email@nospam.invalid> - 2013-02-28 01:04 -0800
Re: MiniForth 0.1.18 has just been released ... Bernd Paysan <bernd.paysan@gmx.de> - 2013-02-28 17:10 +0100
Re: MiniForth 0.1.18 has just been released ... Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-02-28 11:20 -0600
Re: MiniForth 0.1.18 has just been released ... anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-03-02 16:54 +0000
Re: MiniForth 0.1.18 has just been released ... Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-03-02 15:38 -0600
Re: MiniForth 0.1.18 has just been released ... anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-03-03 14:43 +0000
Re: MiniForth 0.1.18 has just been released ... Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-03-03 15:05 -0600
Re: MiniForth 0.1.18 has just been released ... Bernd Paysan <bernd.paysan@gmx.de> - 2013-03-03 23:14 +0100
Re: MiniForth 0.1.18 has just been released ... Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-03-04 03:41 -0600
Re: MiniForth 0.1.18 has just been released ... Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2013-03-04 11:00 +0000
Re: MiniForth 0.1.18 has just been released ... albert@spenarnc.xs4all.nl (Albert van der Horst) - 2013-03-04 12:47 +0000
Re: MiniForth 0.1.18 has just been released ... Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2013-03-04 16:27 +0000
Re: MiniForth 0.1.18 has just been released ... albert@spenarnc.xs4all.nl (Albert van der Horst) - 2013-03-04 19:27 +0000
Re: MiniForth 0.1.18 has just been released ... Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2013-03-04 20:46 +0000
Re: MiniForth 0.1.18 has just been released ... Alex McDonald <blog@rivadpm.com> - 2013-03-05 00:19 -0800
Re: MiniForth 0.1.18 has just been released ... albert@spenarnc.xs4all.nl (Albert van der Horst) - 2013-03-05 12:17 +0000
Re: MiniForth 0.1.18 has just been released ... Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2013-03-05 17:22 +0000
Re: MiniForth 0.1.18 has just been released ... albert@spenarnc.xs4all.nl (Albert van der Horst) - 2013-03-05 17:52 +0000
Re: MiniForth 0.1.18 has just been released ... Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2013-03-05 17:03 +0000
Re: MiniForth 0.1.18 has just been released ... Rob Sciuk <rob@controlq.com> - 2013-03-05 12:38 -0500
Re: MiniForth 0.1.18 has just been released ... anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-03-05 17:57 +0000
Re: MiniForth 0.1.18 has just been released ... Rob Sciuk <rob@controlq.com> - 2013-03-05 13:29 -0500
Re: MiniForth 0.1.18 has just been released ... Andy Valencia <user@vsta.org> - 2013-03-05 22:19 +0000
Re: MiniForth 0.1.18 has just been released ... albert@spenarnc.xs4all.nl (Albert van der Horst) - 2013-03-05 17:58 +0000
Re: MiniForth 0.1.18 has just been released ... Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2013-03-05 19:26 +0000
Re: MiniForth 0.1.18 has just been released ... Alex McDonald <blog@rivadpm.com> - 2013-03-05 11:19 -0800
Forth convergence with rest of world Andy Valencia <user@vsta.org> - 2013-03-05 22:17 +0000
Re: Forth convergence with rest of world Alex McDonald <blog@rivadpm.com> - 2013-03-05 15:15 -0800
Re: Forth convergence with rest of world Bernd Paysan <bernd.paysan@gmx.de> - 2013-03-06 17:35 +0100
Re: Forth convergence with rest of world albert@spenarnc.xs4all.nl (Albert van der Horst) - 2013-03-06 16:44 +0000
Re: Forth convergence with rest of world Zbiggy <zbigniew2011REMOVE@gmail.REMOVE.com> - 2013-03-06 17:39 +0000
Re: Forth convergence with rest of world Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-03-05 18:16 -0600
Re: Forth convergence with rest of world Rob Sciuk <rob@controlq.com> - 2013-03-06 13:49 -0500
Re: Forth convergence with rest of world Zbiggy <zbigniew2011REMOVE@gmail.REMOVE.com> - 2013-03-06 19:11 +0000
Re: Forth convergence with rest of world Rob Sciuk <rob@controlq.com> - 2013-03-06 14:24 -0500
Re: Forth convergence with rest of world Zbiggy <zbigniew2011REMOVE@gmail.REMOVE.com> - 2013-03-06 19:40 +0000
Re: Forth convergence with rest of world "Elizabeth D. Rather" <erather@forth.com> - 2013-03-06 09:26 -1000
Re: Forth convergence with rest of world "Elizabeth D. Rather" <erather@forth.com> - 2013-03-06 09:26 -1000
Re: Forth convergence with rest of world Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-03-06 15:34 -0600
Re: Forth convergence with rest of world Andy Valencia <user@vsta.org> - 2013-03-06 22:04 +0000
Re: Forth convergence with rest of world "Elizabeth D. Rather" <erather@forth.com> - 2013-03-06 12:09 -1000
Re: Forth convergence with rest of world Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-03-07 04:24 -0600
Re: Forth convergence with rest of world Alex McDonald <blog@rivadpm.com> - 2013-03-07 04:15 -0800
Re: Forth convergence with rest of world Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-03-07 08:42 -0600
Re: Forth convergence with rest of world Alex McDonald <blog@rivadpm.com> - 2013-03-07 13:50 -0800
Re: Forth convergence with rest of world Rob Sciuk <rob@controlq.com> - 2013-03-07 12:12 -0500
Re: Forth convergence with rest of world Zbiggy <zbigniew2011REMOVE@gmail.REMOVE.com> - 2013-03-07 18:36 +0000
Re: Forth convergence with rest of world Rob Sciuk <rob@controlq.com> - 2013-03-07 14:07 -0500
Re: Forth convergence with rest of world Zbiggy <zbigniew2011REMOVE@gmail.REMOVE.com> - 2013-03-07 19:43 +0000
Re: Forth convergence with rest of world anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-03-08 17:27 +0000
Re: Forth convergence with rest of world "Elizabeth D. Rather" <erather@forth.com> - 2013-03-07 08:47 -1000
Re: Forth convergence with rest of world awegel@arcor.de (Alex Wegel) - 2013-03-07 21:42 +0100
Re: Forth convergence with rest of world Alex McDonald <blog@rivadpm.com> - 2013-03-07 14:43 -0800
Re: Forth convergence with rest of world "Elizabeth D. Rather" <erather@forth.com> - 2013-03-07 13:53 -1000
Re: Forth convergence with rest of world stephenXXX@mpeforth.com (Stephen Pelc) - 2013-03-07 12:38 +0000
Re: Forth convergence with rest of world Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-03-07 08:43 -0600
Re: Forth convergence with rest of world Syd Rumpo <usenet@nononono.co.uk> - 2013-03-08 18:04 +0000
Re: Forth convergence with rest of world Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-03-08 12:18 -0600
Re: Forth convergence with rest of world Syd Rumpo <usenet@nononono.co.uk> - 2013-03-08 18:36 +0000
Re: Forth convergence with rest of world "Elizabeth D. Rather" <erather@forth.com> - 2013-03-08 14:30 -1000
Re: Forth convergence with rest of world Syd Rumpo <usenet@nononono.co.uk> - 2013-03-09 01:27 +0000
Re: Forth convergence with rest of world Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-03-09 02:43 -0600
Re: MiniForth 0.1.18 has just been released ... Mark Wills <markrobertwills@yahoo.co.uk> - 2013-03-05 01:19 -0800
Re: MiniForth 0.1.18 has just been released ... albert@spenarnc.xs4all.nl (Albert van der Horst) - 2013-03-05 12:01 +0000
Re: MiniForth 0.1.18 has just been released ... anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-03-08 17:02 +0000
Re: MiniForth 0.1.18 has just been released ... albert@spenarnc.xs4all.nl (Albert van der Horst) - 2013-03-04 12:45 +0000
Re: MiniForth 0.1.18 has just been released ... Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-03-04 11:58 -0600
Re: MiniForth 0.1.18 has just been released ... albert@spenarnc.xs4all.nl (Albert van der Horst) - 2013-03-04 19:34 +0000
Re: MiniForth 0.1.18 has just been released ... Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-03-04 15:15 -0600
Re: MiniForth 0.1.18 has just been released ... Roelf Toxopeus <rt4all@notthis.hetnet.nl> - 2013-03-04 23:31 +0100
Re: MiniForth 0.1.18 has just been released ... Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2013-03-05 17:07 +0000
Re: MiniForth 0.1.18 has just been released ... Rob Sciuk <rob@controlq.com> - 2013-03-05 12:11 -0500
Re: MiniForth 0.1.18 has just been released ... Bernd Paysan <bernd.paysan@gmx.de> - 2013-03-05 00:32 +0100
Re: MiniForth 0.1.18 has just been released ... anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-03-07 17:00 +0000
Re: MiniForth 0.1.18 has just been released ... Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-03-07 16:52 -0600
Re: MiniForth 0.1.18 has just been released ... anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-03-08 17:32 +0000
Re: MiniForth 0.1.18 has just been released ... Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-03-08 12:25 -0600
Re: MiniForth 0.1.18 has just been released ... Brad Eckert <hwfwguy@gmail.com> - 2013-03-11 09:57 -0700
Re: MiniForth 0.1.18 has just been released ... Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-03-11 12:05 -0500
Re: MiniForth 0.1.18 has just been released ... anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-03-11 17:20 +0000
Re: MiniForth 0.1.18 has just been released ... Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-03-11 14:05 -0500
Re: MiniForth 0.1.18 has just been released ... Alex McDonald <blog@rivadpm.com> - 2013-03-11 14:35 -0700
Re: MiniForth 0.1.18 has just been released ... Bernd Paysan <bernd.paysan@gmx.de> - 2013-03-12 00:21 +0100
Re: MiniForth 0.1.18 has just been released ... stephenXXX@mpeforth.com (Stephen Pelc) - 2013-03-12 12:13 +0000
Re: MiniForth 0.1.18 has just been released ... albert@spenarnc.xs4all.nl (Albert van der Horst) - 2013-03-11 19:16 +0000
Re: MiniForth 0.1.18 has just been released ... Zbiggy <zbigniew2011REMOVE@gmail.REMOVE.com> - 2013-03-11 19:29 +0000
Re: MiniForth 0.1.18 has just been released ... Bernd Paysan <bernd.paysan@gmx.de> - 2013-03-11 21:36 +0100
Re: MiniForth 0.1.18 has just been released ... Zbiggy <zbigniew2011REMOVE@gmail.REMOVE.com> - 2013-03-11 20:52 +0000
Re: MiniForth 0.1.18 has just been released ... Alex McDonald <blog@rivadpm.com> - 2013-03-11 14:39 -0700
Re: MiniForth 0.1.18 has just been released ... Zbiggy <zbigniew2011REMOVE@gmail.REMOVE.com> - 2013-03-11 21:52 +0000
Re: MiniForth 0.1.18 has just been released ... Coos Haak <chforth@hccnet.nl> - 2013-03-12 01:11 +0100
Re: MiniForth 0.1.18 has just been released ... Zbiggy <zbigniew2011REMOVE@gmail.REMOVE.com> - 2013-03-12 00:41 +0000
Re: MiniForth 0.1.18 has just been released ... Coos Haak <chforth@hccnet.nl> - 2013-03-12 17:33 +0100
Re: MiniForth 0.1.18 has just been released ... Rob Sciuk <rob@controlq.com> - 2013-02-27 11:51 -0500
Re: MiniForth 0.1.18 has just been released ... "Elizabeth D. Rather" <erather@forth.com> - 2013-02-27 09:25 -1000
Re: MiniForth 0.1.18 has just been released ... Rob Sciuk <rob@controlq.com> - 2013-02-27 17:23 -0500
Re: MiniForth 0.1.18 has just been released ... "Elizabeth D. Rather" <erather@forth.com> - 2013-02-27 13:10 -1000
Page 4 of 6 — ← Prev page 1 2 3 [4] 5 6 Next page →
| From | Alex McDonald <blog@rivadpm.com> |
|---|---|
| Date | 2013-03-07 04:15 -0800 |
| Subject | Re: Forth convergence with rest of world |
| Message-ID | <1272571b-e811-4007-b712-02cf1c5e9600@hq4g2000vbb.googlegroups.com> |
| In reply to | #20387 |
On Mar 7, 10:24 am, Andrew Haley <andre...@littlepinkcloud.invalid> wrote: > Andy Valencia <u...@vsta.org> wrote: > > "Elizabeth D. Rather" <erat...@forth.com> writes: > >> It is never advisable to > >> change common practice. > > > All we're saying is that, for 99.9999 (probably more 9's) percent of > > programmers, they see 0xFF and they know what you mean. They see > > $FF and they say "wtf?". > > It depends on which group of programmers you choose. $ is a common > prefix that will be recognized by many assembly language programmers. Each to his own. Here are some samples. URI: %<hex> CSS, Modula: #<hex> MIME: =<hex> C and offspring: 0x<hex>, \x<hex> in strings Postscript: 16#<hex> Unicode: U+<hex>, sometimes \U<hex> in strings Intel, some assemblers; <hex>H Other assemblers: $<hex>, x"<hex>" and (IBM) x'<hex>' Rule 1: be consistent with others. Rule 2: break Rule 1 if it suits you. > > For what it's worth, I believe that number prefixes are a pointless > addition to Forth. It's common that when you're programming in a > style that requires hex numbers, which usually means low-level coding, > all your numbers in that section of code are hex. Therefore, it makes > perfect sense to say HEX and thereafter use HEX . The resulting code, > uncluttered by prefixes, has greater economy and clarity. This is one > way in which Forth is superior to other languages, and definitely not > one in which I think we need to mimic such languages. > > The superiority of HEX and DECIMAL modes when using a system > interactively is obvious. I'm not fond of HEX or DECIMAL and find them annoying, as I do BASE. Clarity is important for me as I often return to code months & years after writing it, and constants such as 10 0F A DEAD BEE CAFE (and yes, this is a synthetic and extreme example) is just not clear enough. decimal 36 base ! ok basd . BASD ok base . WAYO ok Ouch. I have support for #. (force decimal) and $. (force hex). But the latter is incompatible with Albert vd Horst's string notation. See Rule 2. > > > We're arguing aligning Forth with the bigger picture of common > > practice, and yes, at the expense of the (few remaining) faithful. > > I am really starting to get annoyed at this characterization of Forth > as a kind of religious cult. Please knock it off. Seconded. > > Andrew.
[toc] | [prev] | [next] | [standalone]
| From | Andrew Haley <andrew29@littlepinkcloud.invalid> |
|---|---|
| Date | 2013-03-07 08:42 -0600 |
| Subject | Re: Forth convergence with rest of world |
| Message-ID | <kd2dnaUuv5_uOqXMnZ2dnUVZ_rKdnZ2d@supernews.com> |
| In reply to | #20389 |
Alex McDonald <blog@rivadpm.com> wrote: > On Mar 7, 10:24?am, Andrew Haley <andre...@littlepinkcloud.invalid> > wrote: >> For what it's worth, I believe that number prefixes are a pointless >> addition to Forth. ?It's common that when you're programming in a >> style that requires hex numbers, which usually means low-level coding, >> all your numbers in that section of code are hex. ?Therefore, it makes >> perfect sense to say HEX and thereafter use HEX . ?The resulting code, >> uncluttered by prefixes, has greater economy and clarity. ?This is one >> way in which Forth is superior to other languages, and definitely not >> one in which I think we need to mimic such languages. >> >> The superiority of HEX and DECIMAL modes when using a system >> interactively is obvious. > > I'm not fond of HEX or DECIMAL and find them annoying, as I do BASE. > Clarity is important for me as I often return to code months & years > after writing it, and constants such as 10 0F A DEAD BEE CAFE (and > yes, this is a synthetic and extreme example) is just not clear > enough. > > decimal 36 base ! ok > basd . BASD ok > base . WAYO ok > > Ouch. I don't understand what you're saying here. It's not a good idea to omit leading zeros for hex numbers, of course. And use of Base 36 is too obscure for me. Andrew.
[toc] | [prev] | [next] | [standalone]
| From | Alex McDonald <blog@rivadpm.com> |
|---|---|
| Date | 2013-03-07 13:50 -0800 |
| Subject | Re: Forth convergence with rest of world |
| Message-ID | <dedd8dac-b65e-4a25-99ea-9bc18857a7cf@cd3g2000vbb.googlegroups.com> |
| In reply to | #20395 |
On Mar 7, 2:42 pm, Andrew Haley <andre...@littlepinkcloud.invalid> wrote: > Alex McDonald <b...@rivadpm.com> wrote: > > On Mar 7, 10:24?am, Andrew Haley <andre...@littlepinkcloud.invalid> > > wrote: > >> For what it's worth, I believe that number prefixes are a pointless > >> addition to Forth. ?It's common that when you're programming in a > >> style that requires hex numbers, which usually means low-level coding, > >> all your numbers in that section of code are hex. ?Therefore, it makes > >> perfect sense to say HEX and thereafter use HEX . ?The resulting code, > >> uncluttered by prefixes, has greater economy and clarity. ?This is one > >> way in which Forth is superior to other languages, and definitely not > >> one in which I think we need to mimic such languages. > > >> The superiority of HEX and DECIMAL modes when using a system > >> interactively is obvious. > > > I'm not fond of HEX or DECIMAL and find them annoying, as I do BASE. > > Clarity is important for me as I often return to code months & years > > after writing it, and constants such as 10 0F A DEAD BEE CAFE (and > > yes, this is a synthetic and extreme example) is just not clear > > enough. > > > decimal 36 base ! ok > > basd . BASD ok > > base . WAYO ok > > > Ouch. > > I don't understand what you're saying here. It's not a good idea to > omit leading zeros for hex numbers, of course. And use of Base 36 is > too obscure for me. > > Andrew. The word is looked up in the dictionary first. Then number conversion is applied. Yes, BASE should be 0BASE and hex numbers may-to-should have leading zeros, but that's just like a prefix, is it not? Why not be absolutely clear, avoid BASE bashing and use $?
[toc] | [prev] | [next] | [standalone]
| From | Rob Sciuk <rob@controlq.com> |
|---|---|
| Date | 2013-03-07 12:12 -0500 |
| Subject | Re: Forth convergence with rest of world |
| Message-ID | <alpine.BSF.2.00.1303071209400.51154@yoko.controlq.com> |
| In reply to | #20389 |
On Thu, 7 Mar 2013, Alex McDonald wrote: > > I'm not fond of HEX or DECIMAL and find them annoying, as I do BASE. > Clarity is important for me as I often return to code months & years > after writing it, and constants such as 10 0F A DEAD BEE CAFE (and > yes, this is a synthetic and extreme example) is just not clear > enough. > > decimal 36 base ! ok > basd . BASD ok > base . WAYO ok > > Ouch. > -- MiniForth-Hosted alpha Version: 00.01.19D -- www.ControlQ.com ok 36 base ! ok base . 3ro40 ok base @ . 10 ok decimal base @ . 10 ok I've always enjoyed the fact that fetching the base, and printing it will return 10 regardless the actual number. Hex and decimal are absolutely necessary if one is allowed to change the base ...
[toc] | [prev] | [next] | [standalone]
| From | Zbiggy <zbigniew2011REMOVE@gmail.REMOVE.com> |
|---|---|
| Date | 2013-03-07 18:36 +0000 |
| Subject | Re: Forth convergence with rest of world |
| Message-ID | <slrnkjhqmv.cu1.zbigniew2011REMOVE@Tichy.myhome.org> |
| In reply to | #20401 |
In comp.lang.forth, Rob Sciuk wrote: > -- MiniForth-Hosted alpha Version: 00.01.19D > -- www.ControlQ.com > ok 36 base ! > ok base . > 3ro40 ok base @ . > 10 ok decimal base @ . > 10 ok > > I've always enjoyed the fact that fetching the base, and printing it will > return 10 regardless the actual number. Isn't MiniForth your own creation? If so - you're free to change it... -- The consensus was, as usual in this community, that there is no consensus. (RA)
[toc] | [prev] | [next] | [standalone]
| From | Rob Sciuk <rob@controlq.com> |
|---|---|
| Date | 2013-03-07 14:07 -0500 |
| Subject | Re: Forth convergence with rest of world |
| Message-ID | <alpine.BSF.2.00.1303071407040.77103@yoko.controlq.com> |
| In reply to | #20406 |
On Thu, 7 Mar 2013, Zbiggy wrote:
> Date: Thu, 7 Mar 2013 18:36:10 +0000 (UTC)
> From: Zbiggy <zbigniew2011REMOVE@gmail.REMOVE.com>
> Newsgroups: comp.lang.forth
> Subject: Re: Forth convergence with rest of world
>
> In comp.lang.forth, Rob Sciuk wrote:
>
>> -- MiniForth-Hosted alpha Version: 00.01.19D
>> -- www.ControlQ.com
>> ok 36 base !
>> ok base .
>> 3ro40 ok base @ .
>> 10 ok decimal base @ .
>> 10 ok
>>
>> I've always enjoyed the fact that fetching the base, and printing it will
>> return 10 regardless the actual number.
>
> Isn't MiniForth your own creation? If so - you're free to change it...
>
Umh, yes, but 10 is always correct. One need only implement .hex or
similar to correctly show the base. Why would I extend MiniForth, when
the user can do it at will -- it *IS* Forth after all???
: .hex base @ swap hex . base ! ;
Cheers,
Rob.
[toc] | [prev] | [next] | [standalone]
| From | Zbiggy <zbigniew2011REMOVE@gmail.REMOVE.com> |
|---|---|
| Date | 2013-03-07 19:43 +0000 |
| Subject | Re: Forth convergence with rest of world |
| Message-ID | <slrnkjhulf.ftf.zbigniew2011REMOVE@Tichy.myhome.org> |
| In reply to | #20409 |
In comp.lang.forth, Rob Sciuk wrote: > Umh, yes, but 10 is always correct. One need only implement .hex or > similar to correctly show the base. Why would I extend MiniForth, when > the user can do it at will -- it *IS* Forth after all??? It depends, of course, on purpose of MiniForth. There are implementations with a wordset far beyond the standard requirements. There are others: simply not quite conforming to ANS standard, since creator had different opinion - yes, it's Forth. -- The consensus was, as usual in this community, that there is no consensus. (RA)
[toc] | [prev] | [next] | [standalone]
| From | anton@mips.complang.tuwien.ac.at (Anton Ertl) |
|---|---|
| Date | 2013-03-08 17:27 +0000 |
| Subject | Re: Forth convergence with rest of world |
| Message-ID | <2013Mar8.182710@mips.complang.tuwien.ac.at> |
| In reply to | #20409 |
Rob Sciuk <rob@controlq.com> writes:
>Umh, yes, but 10 is always correct. One need only implement .hex or
>similar to correctly show the base.
DEC. shows probably more intuitive results, but you can also do
10 1- .
and show the largest digit of the current base.
- anton
--
M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
New standard: http://www.forth200x.org/forth200x.html
EuroForth 2013: http://www.euroforth.org/ef13/
[toc] | [prev] | [next] | [standalone]
| From | "Elizabeth D. Rather" <erather@forth.com> |
|---|---|
| Date | 2013-03-07 08:47 -1000 |
| Subject | Re: Forth convergence with rest of world |
| Message-ID | <eMWdnbWGNesrfaXMnZ2dnUVZ_radnZ2d@supernews.com> |
| In reply to | #20389 |
On 3/7/13 2:15 AM, Alex McDonald wrote: > On Mar 7, 10:24 am, Andrew Haley <andre...@littlepinkcloud.invalid> > wrote: >> Andy Valencia <u...@vsta.org> wrote: >>> "Elizabeth D. Rather" <erat...@forth.com> writes: >>>> It is never advisable to >>>> change common practice. >> >>> All we're saying is that, for 99.9999 (probably more 9's) percent of >>> programmers, they see 0xFF and they know what you mean. They see >>> $FF and they say "wtf?". >> >> It depends on which group of programmers you choose. $ is a common >> prefix that will be recognized by many assembly language programmers. > > Each to his own. Here are some samples. > > URI: %<hex> > CSS, Modula: #<hex> > MIME: =<hex> > C and offspring: 0x<hex>, \x<hex> in strings > Postscript: 16#<hex> > Unicode: U+<hex>, sometimes \U<hex> in strings > Intel, some assemblers; <hex>H > Other assemblers: $<hex>, x"<hex>" and (IBM) x'<hex>' > > Rule 1: be consistent with others. > Rule 2: break Rule 1 if it suits you. The question becomes, *which* others? The above demonstrates there is no universal consensus. Therefore, IMO it makes sense for Forth programmers to be consistent with other Forth usage, just as users of the technologies above are consistent within their user communities. >> For what it's worth, I believe that number prefixes are a pointless >> addition to Forth. It's common that when you're programming in a >> style that requires hex numbers, which usually means low-level coding, >> all your numbers in that section of code are hex. Therefore, it makes >> perfect sense to say HEX and thereafter use HEX . The resulting code, >> uncluttered by prefixes, has greater economy and clarity. This is one >> way in which Forth is superior to other languages, and definitely not >> one in which I think we need to mimic such languages. >> >> The superiority of HEX and DECIMAL modes when using a system >> interactively is obvious. > > I'm not fond of HEX or DECIMAL and find them annoying, as I do BASE. > Clarity is important for me as I often return to code months & years > after writing it, and constants such as 10 0F A DEAD BEE CAFE (and > yes, this is a synthetic and extreme example) is just not clear > enough. What is unclear about: HEX <lines of code using hex numbers> DECIMAL Sure, you want to be explicit. FORTH, Inc. practice is to standardize on DECIMAL, invoke HEX visibly in front of a section of code using hex, and then explicitly return to DECIMAL. We find BASE @ ... BASE ! sequences to be less clear than adhering to an explicitly supported default. > decimal 36 base ! ok > basd . BASD ok > base . WAYO ok > > Ouch. Agreed, unusual settings of BASE should be avoided unless they serve a very specific, limited, and well-documented purpose. > I have support for #. (force decimal) and $. (force hex). But the > latter is incompatible with Albert vd Horst's string notation. See > Rule 2. > >> >>> We're arguing aligning Forth with the bigger picture of common >>> practice, and yes, at the expense of the (few remaining) faithful. >> >> I am really starting to get annoyed at this characterization of Forth >> as a kind of religious cult. Please knock it off. > > Seconded. Thirded? Cheers, Elizabeth -- ================================================== Elizabeth D. Rather (US & Canada) 800-55-FORTH FORTH Inc. +1 310.999.6784 5959 West Century Blvd. Suite 700 Los Angeles, CA 90045 http://www.forth.com "Forth-based products and Services for real-time applications since 1973." ==================================================
[toc] | [prev] | [next] | [standalone]
| From | awegel@arcor.de (Alex Wegel) |
|---|---|
| Date | 2013-03-07 21:42 +0100 |
| Subject | Re: Forth convergence with rest of world |
| Message-ID | <1kzdtkq.m5s041599xj4N%awegel@arcor.de> |
| In reply to | #20408 |
> > Seconded. > > Thirded? Forthed!
[toc] | [prev] | [next] | [standalone]
| From | Alex McDonald <blog@rivadpm.com> |
|---|---|
| Date | 2013-03-07 14:43 -0800 |
| Subject | Re: Forth convergence with rest of world |
| Message-ID | <d03a1ebc-9b79-4486-9922-d71fed9e7c9b@m4g2000vbo.googlegroups.com> |
| In reply to | #20408 |
On Mar 7, 6:47 pm, "Elizabeth D. Rather" <erat...@forth.com> wrote: > On 3/7/13 2:15 AM, Alex McDonald wrote: > > > > > > > > > > > On Mar 7, 10:24 am, Andrew Haley <andre...@littlepinkcloud.invalid> > > wrote: > >> Andy Valencia <u...@vsta.org> wrote: > >>> "Elizabeth D. Rather" <erat...@forth.com> writes: > >>>> It is never advisable to > >>>> change common practice. > > >>> All we're saying is that, for 99.9999 (probably more 9's) percent of > >>> programmers, they see 0xFF and they know what you mean. They see > >>> $FF and they say "wtf?". > > >> It depends on which group of programmers you choose. $ is a common > >> prefix that will be recognized by many assembly language programmers. > > > Each to his own. Here are some samples. > > > URI: %<hex> > > CSS, Modula: #<hex> > > MIME: =<hex> > > C and offspring: 0x<hex>, \x<hex> in strings > > Postscript: 16#<hex> > > Unicode: U+<hex>, sometimes \U<hex> in strings > > Intel, some assemblers; <hex>H > > Other assemblers: $<hex>, x"<hex>" and (IBM) x'<hex>' > > > Rule 1: be consistent with others. > > Rule 2: break Rule 1 if it suits you. > > The question becomes, *which* others? The above demonstrates there is no > universal consensus. Therefore, IMO it makes sense for Forth programmers > to be consistent with other Forth usage, just as users of the > technologies above are consistent within their user communities. > If you're not able to apply Rule 1, apply Rule 2. Which is what we've done with numeric prefixes in Forth200x. > >> For what it's worth, I believe that number prefixes are a pointless > >> addition to Forth. It's common that when you're programming in a > >> style that requires hex numbers, which usually means low-level coding, > >> all your numbers in that section of code are hex. Therefore, it makes > >> perfect sense to say HEX and thereafter use HEX . The resulting code, > >> uncluttered by prefixes, has greater economy and clarity. This is one > >> way in which Forth is superior to other languages, and definitely not > >> one in which I think we need to mimic such languages. > > >> The superiority of HEX and DECIMAL modes when using a system > >> interactively is obvious. > > > I'm not fond of HEX or DECIMAL and find them annoying, as I do BASE. > > Clarity is important for me as I often return to code months & years > > after writing it, and constants such as 10 0F A DEAD BEE CAFE (and > > yes, this is a synthetic and extreme example) is just not clear > > enough. > > What is unclear about: > > HEX > <lines of code using hex numbers> > DECIMAL This. : a3 ( -- flag ) 3 set-paper-size? ; : a4 ( -- flag ) 4 set-paper-size? ; ... several hundred lines later ... HEX a3 constant owowowthathurts DECIMAL But you might riposte; HEX 0a3 constant startitwithazero DECIMAL And I would say; $a3 constant hexeverytime > > Sure, you want to be explicit. FORTH, Inc. practice is to standardize on > DECIMAL, invoke HEX visibly in front of a section of code using hex, and > then explicitly return to DECIMAL. We find BASE @ ... BASE ! sequences > to be less clear than adhering to an explicitly supported default. How long should such a section be? Should an entire file be in DECIMAL or HEX? If not, then how do I work out what base I'm in in a long section of code without searching up? > > > decimal 36 base ! ok > > basd . BASD ok > > base . WAYO ok > > > Ouch. > > Agreed, unusual settings of BASE should be avoided unless they serve a > very specific, limited, and well-documented purpose. > > > I have support for #. (force decimal) and $. (force hex). But the > > latter is incompatible with Albert vd Horst's string notation. See > > Rule 2. > > >>> We're arguing aligning Forth with the bigger picture of common > >>> practice, and yes, at the expense of the (few remaining) faithful. > > >> I am really starting to get annoyed at this characterization of Forth > >> as a kind of religious cult. Please knock it off. > > > Seconded. > > Thirded? > > Cheers, > Elizabeth > > -- > ================================================== > Elizabeth D. Rather (US & Canada) 800-55-FORTH > FORTH Inc. +1 310.999.6784 > 5959 West Century Blvd. Suite 700 > Los Angeles, CA 90045http://www.forth.com > > "Forth-based products and Services for real-time > applications since 1973." > ==================================================
[toc] | [prev] | [next] | [standalone]
| From | "Elizabeth D. Rather" <erather@forth.com> |
|---|---|
| Date | 2013-03-07 13:53 -1000 |
| Subject | Re: Forth convergence with rest of world |
| Message-ID | <jIydnXgQZpcStaTMnZ2dnUVZ_judnZ2d@supernews.com> |
| In reply to | #20417 |
On 3/7/13 12:43 PM, Alex McDonald wrote: > On Mar 7, 6:47 pm, "Elizabeth D. Rather" <erat...@forth.com> wrote: >> On 3/7/13 2:15 AM, Alex McDonald wrote: ... >>> Rule 1: be consistent with others. >>> Rule 2: break Rule 1 if it suits you. >> >> The question becomes, *which* others? The above demonstrates there is no >> universal consensus. Therefore, IMO it makes sense for Forth programmers >> to be consistent with other Forth usage, just as users of the >> technologies above are consistent within their user communities. > > If you're not able to apply Rule 1, apply Rule 2. Which is what we've > done with numeric prefixes in Forth200x. There ae certainly situations in which prefixes are useful, such as a single hex number in code that's otherwise decimal, and in case of possible confusion as in your example below. But when there's a bunch of hex code, for example, it just looks cleaner to me to specify clearly and avoid the prefix. >>>> For what it's worth, I believe that number prefixes are a pointless >>>> addition to Forth. It's common that when you're programming in a >>>> style that requires hex numbers, which usually means low-level coding, >>>> all your numbers in that section of code are hex. Therefore, it makes >>>> perfect sense to say HEX and thereafter use HEX . The resulting code, >>>> uncluttered by prefixes, has greater economy and clarity. This is one >>>> way in which Forth is superior to other languages, and definitely not >>>> one in which I think we need to mimic such languages. >> >>>> The superiority of HEX and DECIMAL modes when using a system >>>> interactively is obvious. >> >>> I'm not fond of HEX or DECIMAL and find them annoying, as I do BASE. >>> Clarity is important for me as I often return to code months & years >>> after writing it, and constants such as 10 0F A DEAD BEE CAFE (and >>> yes, this is a synthetic and extreme example) is just not clear >>> enough. >> >> What is unclear about: >> >> HEX >> <lines of code using hex numbers> >> DECIMAL > > This. > > : a3 ( -- flag ) 3 set-paper-size? ; > : a4 ( -- flag ) 4 set-paper-size? ; > ... several hundred lines later ... > HEX > a3 constant owowowthathurts > DECIMAL Yes, that would hurt, although not for long, as you'd get a Stack Empty error message. > But you might riposte; > > HEX > 0a3 constant startitwithazero > DECIMAL Indeed I would. > And I would say; > > $a3 constant hexeverytime Well, I prefer 0a3 if it makes sense for this to be in code that's otherwise hex (as the previous example), but as a single instance the prefix works well. >> Sure, you want to be explicit. FORTH, Inc. practice is to standardize on >> DECIMAL, invoke HEX visibly in front of a section of code using hex, and >> then explicitly return to DECIMAL. We find BASE @ ... BASE ! sequences >> to be less clear than adhering to an explicitly supported default. > > How long should such a section be? Should an entire file be in DECIMAL > or HEX? If not, then how do I work out what base I'm in in a long > section of code without searching up? Like most style issues, it's a judgement call. Much depends on how long the file is, and what its content is. We would tend to put, for example, a single driver in a file, which probably wouldn't be very long, and the application code that uses the device would be elsewhere. In that case, it would probably make sense to have the whole file in hex. If the application code (which would probably be decimal) is in the same file, you'd switch to DECIMAL when appropriate. Our convention is to be in decimal when we start interpreting a file, so you don't have the potential error of accidentally being in hex because the last file you interpreted left it that way. Cheers, Elizabeth -- ================================================== Elizabeth D. Rather (US & Canada) 800-55-FORTH FORTH Inc. +1 310.999.6784 5959 West Century Blvd. Suite 700 Los Angeles, CA 90045 http://www.forth.com "Forth-based products and Services for real-time applications since 1973." ==================================================
[toc] | [prev] | [next] | [standalone]
| From | stephenXXX@mpeforth.com (Stephen Pelc) |
|---|---|
| Date | 2013-03-07 12:38 +0000 |
| Subject | Re: Forth convergence with rest of world |
| Message-ID | <513888f5.74521974@news.demon.co.uk> |
| In reply to | #20387 |
On Thu, 07 Mar 2013 04:24:30 -0600, Andrew Haley <andrew29@littlepinkcloud.invalid> wrote: >For what it's worth, I believe that number prefixes are a pointless >addition to Forth. It's common that when you're programming in a >style that requires hex numbers, which usually means low-level coding, >all your numbers in that section of code are hex. Therefore, it makes >perfect sense to say HEX and thereafter use HEX . In my role as a maintenance programmer, often of code from third parties, I have come to be suspicious of code in which it is not immediately obvious what the base is. Prefices make it much clearer. I note also that our clients like them. But then, this is a pragmatic view ... Stephen -- Stephen Pelc, stephenXXX@mpeforth.com MicroProcessor Engineering Ltd - More Real, Less Time 133 Hill Lane, Southampton SO15 5AF, England tel: +44 (0)23 8063 1441, fax: +44 (0)23 8033 9691 web: http://www.mpeforth.com - free VFX Forth downloads
[toc] | [prev] | [next] | [standalone]
| From | Andrew Haley <andrew29@littlepinkcloud.invalid> |
|---|---|
| Date | 2013-03-07 08:43 -0600 |
| Subject | Re: Forth convergence with rest of world |
| Message-ID | <kd2dnaQuv58XOqXMnZ2dnUVZ_rKdnZ2d@supernews.com> |
| In reply to | #20391 |
Stephen Pelc <stephenXXX@mpeforth.com> wrote: > On Thu, 07 Mar 2013 04:24:30 -0600, Andrew Haley > <andrew29@littlepinkcloud.invalid> wrote: > >>For what it's worth, I believe that number prefixes are a pointless >>addition to Forth. It's common that when you're programming in a >>style that requires hex numbers, which usually means low-level coding, >>all your numbers in that section of code are hex. Therefore, it makes >>perfect sense to say HEX and thereafter use HEX . > > In my role as a maintenance programmer, often of code from third > parties, I have come to be suspicious of code in which it is > not immediately obvious what the base is. Prefices make it much > clearer. > > I note also that our clients like them. > > But then, this is a pragmatic view ... So was mine. Andrew.
[toc] | [prev] | [next] | [standalone]
| From | Syd Rumpo <usenet@nononono.co.uk> |
|---|---|
| Date | 2013-03-08 18:04 +0000 |
| Subject | Re: Forth convergence with rest of world |
| Message-ID | <khd93n$h6n$1@dont-email.me> |
| In reply to | #20387 |
On 07/03/2013 10:24, Andrew Haley wrote: <snip> > For what it's worth, I believe that number prefixes are a pointless > addition to Forth. It's common that when you're programming in a > style that requires hex numbers, which usually means low-level coding, > all your numbers in that section of code are hex. Therefore, it makes > perfect sense to say HEX and thereafter use HEX . The resulting code, > uncluttered by prefixes, has greater economy and clarity. This is one > way in which Forth is superior to other languages, and definitely not > one in which I think we need to mimic such languages. I disagree absolutely. A number's base is part of its value and should therefore always be part of its displayed representation. I don't want to have to look elsewhere to see what 1234 means, that's how mistakes happen, particularly cut-and-paste mistakes. I don't want to have a number's value accidentally change dependant on some non-adjacent command, I want to be able to read it and know unequivocally what it means. In addition, the number's base gives some context to the code: personally I use #1234 or $4D2 or %010011010010, typically binary for register bit fields, hex for addresses and decimal for ordinary numbers. I've never needed any other base. This is from experience, having wasted time finding bugs where a hex address was being interpreted as decimal. There really is no need to make things any more confusing than they have to be. Base is a bad word, IMO one of the very few mistakes Chuck made. I suppose I might relent if *everything* is decimal, but that has never happened. Cheers -- Syd
[toc] | [prev] | [next] | [standalone]
| From | Andrew Haley <andrew29@littlepinkcloud.invalid> |
|---|---|
| Date | 2013-03-08 12:18 -0600 |
| Subject | Re: Forth convergence with rest of world |
| Message-ID | <3oydnehtaI7ktqfMnZ2dnUVZ_s6dnZ2d@supernews.com> |
| In reply to | #20457 |
Syd Rumpo <usenet@nononono.co.uk> wrote: > On 07/03/2013 10:24, Andrew Haley wrote: > > <snip> > >> For what it's worth, I believe that number prefixes are a pointless >> addition to Forth. It's common that when you're programming in a >> style that requires hex numbers, which usually means low-level coding, >> all your numbers in that section of code are hex. Therefore, it makes >> perfect sense to say HEX and thereafter use HEX . The resulting code, >> uncluttered by prefixes, has greater economy and clarity. This is one >> way in which Forth is superior to other languages, and definitely not >> one in which I think we need to mimic such languages. > > I disagree absolutely. A number's base is part of its value Of course it isn't. > and should therefore always be part of its displayed representation. > I don't want to have to look elsewhere to see what 1234 means, > that's how mistakes happen, particularly cut-and-paste mistakes. I > don't want to have a number's value accidentally change dependant on > some non-adjacent command, I want to be able to read it and know > unequivocally what it means. > > In addition, the number's base gives some context to the code: > personally I use #1234 or $4D2 or %010011010010, typically binary for > register bit fields, hex for addresses and decimal for ordinary numbers. > I've never needed any other base. > > This is from experience, having wasted time finding bugs where a hex > address was being interpreted as decimal. There really is no need to > make things any more confusing than they have to be. Base is a bad > word, IMO one of the very few mistakes Chuck made. Fair enough, we'll agree to differ. Andrew.
[toc] | [prev] | [next] | [standalone]
| From | Syd Rumpo <usenet@nononono.co.uk> |
|---|---|
| Date | 2013-03-08 18:36 +0000 |
| Subject | Re: Forth convergence with rest of world |
| Message-ID | <khdavo$sh0$1@dont-email.me> |
| In reply to | #20459 |
On 08/03/2013 18:18, Andrew Haley wrote: > Syd Rumpo <usenet@nononono.co.uk> wrote: >> >> I disagree absolutely. A number's base is part of its value > > Of course it isn't. > I must have expressed that badly, but how isn't the base of a number inextricably part of its value? 1234 could mean different things at different times if you use the Forth Base method. > > Fair enough, we'll agree to differ. > > Andrew. Yes, of course, but wait till you get caught out by this. I wasted many hours at a critical time bringing up some new hardware because of this, and never again will that happen. My numbers will always be exactly what they say they are. It's a shame, as Forth has so few inbuilt traps compared to C (= == & && etc). Cheers -- Syd
[toc] | [prev] | [next] | [standalone]
| From | "Elizabeth D. Rather" <erather@forth.com> |
|---|---|
| Date | 2013-03-08 14:30 -1000 |
| Subject | Re: Forth convergence with rest of world |
| Message-ID | <lMqdnQX9jrINH6fMnZ2dnUVZ_qCdnZ2d@supernews.com> |
| In reply to | #20468 |
On 3/8/13 8:36 AM, Syd Rumpo wrote: > On 08/03/2013 18:18, Andrew Haley wrote: >> Syd Rumpo <usenet@nononono.co.uk> wrote: > >>> >>> I disagree absolutely. A number's base is part of its value >> >> Of course it isn't. >> > I must have expressed that badly, but how isn't the base of a number > inextricably part of its value? 1234 could mean different things at > different times if you use the Forth Base method. >> >> Fair enough, we'll agree to differ. >> >> Andrew. > > Yes, of course, but wait till you get caught out by this. I wasted many > hours at a critical time bringing up some new hardware because of this, > and never again will that happen. My numbers will always be exactly > what they say they are. > > It's a shame, as Forth has so few inbuilt traps compared to C (= == & && > etc). It's no more of a trap than the fact that the most recent definition by a certain name is the one that will be found, and that if you add a single to a double by using + you'll probably get the wrong answer, and any of a number of other features of the language. If you follow good coding practice you won't get in trouble. In this case, it means establishing a rule of usage that you (and your team) always follow. It sounds as though in your case it's "mark every number, always". In FORTH, Inc. practice, it's "assume everything is DECIMAL unless it's in a section of code clearly marked HEX" and "if you're working in HEX, be sure you mark it clearly". The Open Firmware teams had a similar convention, except in reverse: "Assume everything is in HEX..." Cheers, Elizabeth -- ================================================== Elizabeth D. Rather (US & Canada) 800-55-FORTH FORTH Inc. +1 310.999.6784 5959 West Century Blvd. Suite 700 Los Angeles, CA 90045 http://www.forth.com "Forth-based products and Services for real-time applications since 1973." ==================================================
[toc] | [prev] | [next] | [standalone]
| From | Syd Rumpo <usenet@nononono.co.uk> |
|---|---|
| Date | 2013-03-09 01:27 +0000 |
| Subject | Re: Forth convergence with rest of world |
| Message-ID | <khe334$q6h$1@dont-email.me> |
| In reply to | #20473 |
On 09/03/2013 00:30, Elizabeth D. Rather wrote: > On 3/8/13 8:36 AM, Syd Rumpo wrote: >> On 08/03/2013 18:18, Andrew Haley wrote: >>> Syd Rumpo <usenet@nononono.co.uk> wrote: >> >>>> >>>> I disagree absolutely. A number's base is part of its value >>> >>> Of course it isn't. >>> >> I must have expressed that badly, but how isn't the base of a number >> inextricably part of its value? 1234 could mean different things at >> different times if you use the Forth Base method. >>> >>> Fair enough, we'll agree to differ. >>> >>> Andrew. >> >> Yes, of course, but wait till you get caught out by this. I wasted many >> hours at a critical time bringing up some new hardware because of this, >> and never again will that happen. My numbers will always be exactly >> what they say they are. >> >> It's a shame, as Forth has so few inbuilt traps compared to C (= == & && >> etc). > > It's no more of a trap than the fact that the most recent definition by > a certain name is the one that will be found, and that if you add a > single to a double by using + you'll probably get the wrong answer, and > any of a number of other features of the language. If you follow good > coding practice you won't get in trouble. > > In this case, it means establishing a rule of usage that you (and your > team) always follow. It sounds as though in your case it's "mark every > number, always". In FORTH, Inc. practice, it's "assume everything is > DECIMAL unless it's in a section of code clearly marked HEX" and "if > you're working in HEX, be sure you mark it clearly". > > The Open Firmware teams had a similar convention, except in reverse: > "Assume everything is in HEX..." > > Cheers, > Elizabeth > Yes, I guess the rule is, make everything as clear as you can. So why not 'mark every number, always'? I can't see a downside. To me, '#1234' means 'push 1243 decimal on to the stack', whereas '1234' means, "I know what you're thinking. 'Is this hexadecimal or base ten?' Well, to tell you the truth, in all this excitement I kind of lost track myself. Look upwards in the source code till you see a word which sets the base. You've got to ask yourself one question: Do I feel lucky? Well, do ya, punk?" But Clint notwithstanding, there exists in some source code a string of symbols which represent a number. Why would anyone ever want that to be even potentially ambiguous? Cheers -- Syd
[toc] | [prev] | [next] | [standalone]
| From | Andrew Haley <andrew29@littlepinkcloud.invalid> |
|---|---|
| Date | 2013-03-09 02:43 -0600 |
| Subject | Re: Forth convergence with rest of world |
| Message-ID | <3_2dnbDHrsyga6fMnZ2dnUVZ_t6dnZ2d@supernews.com> |
| In reply to | #20468 |
Syd Rumpo <usenet@nononono.co.uk> wrote: > On 08/03/2013 18:18, Andrew Haley wrote: >> Syd Rumpo <usenet@nononono.co.uk> wrote: > >>> >>> I disagree absolutely. A number's base is part of its value >> >> Of course it isn't. >> > I must have expressed that badly, but how isn't the base of a number > inextricably part of its value? 1234 could mean different things at > different times if you use the Forth Base method. Sure, but once input conversion has been done the base in which a number was converted has gone, and all that remains is its value. >> Fair enough, we'll agree to differ. > > Yes, of course, but wait till you get caught out by this. Excuse me? Wait? Andrew.
[toc] | [prev] | [next] | [standalone]
Page 4 of 6 — ← Prev page 1 2 3 [4] 5 6 Next page →
Back to top | Article view | comp.lang.forth
csiph-web