Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #41835 > unrolled thread
| Started by | Marcos Cruz <null_email_so_use_my_contact_page@programandala.net> |
|---|---|
| First post | 2015-09-07 20:29 +0000 |
| Last post | 2015-09-11 14:16 +0200 |
| Articles | 20 on this page of 38 — 9 participants |
Back to article view | Back to comp.lang.forth
old `leave` renamed to `exhaust` Marcos Cruz <null_email_so_use_my_contact_page@programandala.net> - 2015-09-07 20:29 +0000
Re: old `leave` renamed to `exhaust` "HAA" <someone@microsoft.com> - 2015-09-08 14:52 +1000
Re: old `leave` renamed to `exhaust` Mark Wills <markwills1970@gmail.com> - 2015-09-08 00:57 -0700
Re: old `leave` renamed to `exhaust` Bernd Paysan <bernd.paysan@gmx.de> - 2015-09-08 15:19 +0200
Re: old `leave` renamed to `exhaust` Marcos Cruz <null_email_so_use_my_contact_page@programandala.net> - 2015-09-08 16:25 +0000
Re: old `leave` renamed to `exhaust` "HAA" <someone@microsoft.com> - 2015-09-09 11:39 +1000
Re: old `leave` renamed to `exhaust` Marcos Cruz <null_email_so_use_my_contact_page@programandala.net> - 2015-09-09 10:42 +0000
Re: old `leave` renamed to `exhaust` "HAA" <someone@microsoft.com> - 2015-09-10 14:05 +1000
Re: old `leave` renamed to `exhaust` Marcos Cruz <null_email_so_use_my_contact_page@programandala.net> - 2015-09-10 13:33 +0000
Re: old `leave` renamed to `exhaust` Coos Haak <chforth@hccnet.nl> - 2015-09-10 22:04 +0200
Re: old `leave` renamed to `exhaust` Coos Haak <chforth@hccnet.nl> - 2015-09-10 22:13 +0200
Re: old `leave` renamed to `exhaust` "HAA" <someone@microsoft.com> - 2015-09-11 13:14 +1000
Re: old `leave` renamed to `exhaust` Coos Haak <chforth@hccnet.nl> - 2015-09-11 12:30 +0200
Re: old `leave` renamed to `exhaust` "HAA" <someone@microsoft.com> - 2015-09-11 21:47 +1000
Re: old `leave` renamed to `exhaust` Bernd Paysan <bernd.paysan@gmx.de> - 2015-09-11 14:09 +0200
Re: old `leave` renamed to `exhaust` "HAA" <someone@microsoft.com> - 2015-09-12 11:29 +1000
Re: old `leave` renamed to `exhaust` "Elizabeth D. Rather" <erather@forth.com> - 2015-09-11 16:05 -1000
Re: old `leave` renamed to `exhaust` "HAA" <someone@microsoft.com> - 2015-09-14 12:25 +1000
Re: old `leave` renamed to `exhaust` "Elizabeth D. Rather" <erather@forth.com> - 2015-09-13 17:53 -1000
Re: old `leave` renamed to `exhaust` anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-09-14 08:33 +0000
Re: old `leave` renamed to `exhaust` "HAA" <someone@microsoft.com> - 2015-09-15 16:55 +1000
Re: old `leave` renamed to `exhaust` hughaguilar96@gmail.com - 2015-09-15 01:46 -0700
Re: old `leave` renamed to `exhaust` Coos Haak <chforth@hccnet.nl> - 2015-09-15 15:14 +0200
Re: old `leave` renamed to `exhaust` anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-09-15 15:13 +0000
Re: old `leave` renamed to `exhaust` hughaguilar96@gmail.com - 2015-09-15 16:13 -0700
Re: old `leave` renamed to `exhaust` jim.brakefield@ieee.org - 2015-09-15 17:05 -0700
Re: old `leave` renamed to `exhaust` hughaguilar96@gmail.com - 2015-09-15 18:35 -0700
Re: old `leave` renamed to `exhaust` "HAA" <someone@microsoft.com> - 2015-09-19 11:42 +1000
Re: old `leave` renamed to `exhaust` anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-09-19 10:48 +0000
Re: old `leave` renamed to `exhaust` "HAA" <someone@microsoft.com> - 2015-09-20 00:01 +1000
Re: old `leave` renamed to `exhaust` anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-09-19 15:02 +0000
Re: old `leave` renamed to `exhaust` "HAA" <someone@microsoft.com> - 2015-09-21 15:51 +1000
Re: old `leave` renamed to `exhaust` "Elizabeth D. Rather" <erather@forth.com> - 2015-09-15 08:45 -1000
Re: old `leave` renamed to `exhaust` "HAA" <someone@microsoft.com> - 2015-09-16 11:18 +1000
Re: old `leave` renamed to `exhaust` anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-09-16 06:10 +0000
Re: old `leave` renamed to `exhaust` "HAA" <someone@microsoft.com> - 2015-09-17 15:15 +1000
Re: old `leave` renamed to `exhaust` anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-09-17 06:04 +0000
Re: old `leave` renamed to `exhaust` Coos Haak <chforth@hccnet.nl> - 2015-09-11 14:16 +0200
Page 1 of 2 [1] 2 Next page →
| From | Marcos Cruz <null_email_so_use_my_contact_page@programandala.net> |
|---|---|
| Date | 2015-09-07 20:29 +0000 |
| Subject | old `leave` renamed to `exhaust` |
| Message-ID | <msks3o$6fv$1@speranza.aioe.org> |
I find the old FIG/Forth-79 `leave` very useful, so I use it with a new name: `exhaust`. Is there any post-Forth-83 Forth system that keeps the old `leave` with a different name? -- Marcos Cruz http://programandala.net
[toc] | [next] | [standalone]
| From | "HAA" <someone@microsoft.com> |
|---|---|
| Date | 2015-09-08 14:52 +1000 |
| Message-ID | <mslpeq$umg$1@speranza.aioe.org> |
| In reply to | #41835 |
Marcos Cruz wrote: > I find the old FIG/Forth-79 `leave` very useful, so I use it with a new > name: `exhaust`. > Interesting that you find 79-LEAVE "very useful". Example?
[toc] | [prev] | [next] | [standalone]
| From | Mark Wills <markwills1970@gmail.com> |
|---|---|
| Date | 2015-09-08 00:57 -0700 |
| Message-ID | <80ebd99c-47f2-4262-a51d-55a0cf8b1dab@googlegroups.com> |
| In reply to | #41847 |
Doesn't the old one do one more loop before leaving? Sounds useless to me. If I'm wrong just ignore!
[toc] | [prev] | [next] | [standalone]
| From | Bernd Paysan <bernd.paysan@gmx.de> |
|---|---|
| Date | 2015-09-08 15:19 +0200 |
| Message-ID | <msmn5h$53r$1@dont-email.me> |
| In reply to | #41849 |
Mark Wills wrote: > Doesn't the old one do one more loop before leaving? > Sounds useless to me. If I'm wrong just ignore! Essentially, instead of writing e.g. DO i @ IF .. leave THEN other stuff LOOP you wrote DO i @ IF .. leave ELSE other stuff THEN LOOP The new LEAVE is definitely an improve, but somewhat more difficult to implement. The old one is very simple: : leave ( r:i' r:i r:retaddr -- r:i' r:i' r:retaddr ) r> r> drop r@ >r >r ; -- Bernd Paysan "If you want it done right, you have to do it yourself" net2o ID: kQusJzA;7*?t=uy@X}1GWr!+0qqp_Cn176t4(dQ* http://bernd-paysan.de/
[toc] | [prev] | [next] | [standalone]
| From | Marcos Cruz <null_email_so_use_my_contact_page@programandala.net> |
|---|---|
| Date | 2015-09-08 16:25 +0000 |
| Message-ID | <msn26b$tmd$1@speranza.aioe.org> |
| In reply to | #41847 |
En/Je/On 2015-09-08, HAA <someone@microsoft.com> escribió/skribis/wrote: > Interesting that you find 79-LEAVE "very useful". Example? Maybe "very useful" was not a precise wording :) I find Forth-79 `leave` especially clear when a loop consists of several parts and the exit condition depends on some of them, but the iteration must be completed in any case. Example: : something ( n1 n2 -- i*x ) do part1 cond1? if 79-leave then part2 part3 cond3? if 79-leave then part4 part5 cond5? if 79-leave then loop ; Of course you can use Forth-83 `leave` instead several ways, depending on the way the "conds" work, consuming parameters left by their correspondent "parts" or not: : something ( n1 n2 -- i*x ) do part1 cond1? part2 part3 cond3? part4 part5 cond5? or or if 83-leave then loop ; : something ( n1 n2 -- i*x ) do part1 part2 part3 part4 part5 cond1? cond3? cond5? or or if 83-leave then loop ; Forth-79 `leave` seems clearer and simpler to me in these cases, not to mention when the "parts" of the loop leave items on the stack, or when the number of exit conditions changes during the development. I know that's a very specific example, but my point is: Forth-83 `leave` leaves the loop immediately, what was a great improvement over the old behaviour, and that is what is needed most of the times. On the other hand, Forth-79 `leave` forces the current iteration to be the last one, what is not exactly the same, even if its usual function was to leave the loop at the end of the iteration. *I find that subtle difference very useful*, and I miss it, because sometimes the old `leave` is exactly what I need to code: this iteration must the last one. That's why I keep the old `leave` with a different name. Regards, -- Marcos Cruz http://programandala.net
[toc] | [prev] | [next] | [standalone]
| From | "HAA" <someone@microsoft.com> |
|---|---|
| Date | 2015-09-09 11:39 +1000 |
| Message-ID | <mso2hh$5i9$1@speranza.aioe.org> |
| In reply to | #41852 |
Marcos Cruz wrote: > > Forth-79 `leave` seems clearer and simpler to me in these cases, not to > mention when the "parts" of the loop leave items on the stack, or when > the number of exit conditions changes during the development. > ... > That's why I keep the old `leave` with a different name. Did you encounter any problems implementing 79-LEAVE on an 83-system? Specifically the index I should not change after the LEAVE i.e : TEST 10 0 DO I 4 > IF LEAVE-79 THEN I . LOOP ; should produce 0 1 2 3 4 5 As for naming what about LEAVE-NEXT
[toc] | [prev] | [next] | [standalone]
| From | Marcos Cruz <null_email_so_use_my_contact_page@programandala.net> |
|---|---|
| Date | 2015-09-09 10:42 +0000 |
| Message-ID | <msp2eb$5a2$1@speranza.aioe.org> |
| In reply to | #41870 |
En/Je/On 2015-09-09, HAA <someone@microsoft.com> escribió/skribis/wrote: > the index I should not change after the LEAVE i.e > >: TEST 10 0 DO I 4 > IF LEAVE-79 THEN I . LOOP ; > > should produce > > 0 1 2 3 4 5 No problem, Forth-79 `leave` makes the loop limit equal to the loop count, so the current index is not affected. > As for naming what about LEAVE-NEXT I considered several names. I don't remember if `leave-next` was in the list, but it seems a good option, also because of the "etymology" [:)]. I think it would be nice to have a common use name for the Forth-79 `leave`. That's why I wondered if there are Forth systems that have kept it with a different name. -- Marcos Cruz http://programandala.net
[toc] | [prev] | [next] | [standalone]
| From | "HAA" <someone@microsoft.com> |
|---|---|
| Date | 2015-09-10 14:05 +1000 |
| Message-ID | <msqvek$fdm$1@speranza.aioe.org> |
| In reply to | #41890 |
Marcos Cruz wrote: > En/Je/On 2015-09-09, HAA <someone@microsoft.com> escribió/skribis/wrote: > > > the index I should not change after the LEAVE i.e > > > >: TEST 10 0 DO I 4 > IF LEAVE-79 THEN I . LOOP ; > > > > should produce > > > > 0 1 2 3 4 5 > > No problem, Forth-79 `leave` makes the loop limit equal to the loop > count, so the current index is not affected. That's what I thought until I came across FD v4n3 p25. Try this on an 83-system. : TEST2 -10 0 DO I -4 < IF LEAVE-79 THEN I . -1 +LOOP ;
[toc] | [prev] | [next] | [standalone]
| From | Marcos Cruz <null_email_so_use_my_contact_page@programandala.net> |
|---|---|
| Date | 2015-09-10 13:33 +0000 |
| Message-ID | <mss0rq$r74$1@speranza.aioe.org> |
| In reply to | #41915 |
En/Je/On 2015-09-10, HAA <someone@microsoft.com> escribió/skribis/wrote: > Marcos Cruz wrote: >> No problem, Forth-79 `leave` makes the loop limit equal to the loop >> count, so the current index is not affected. > > That's what I thought until I came across FD v4n3 p25. Thank you! The reading was enlightening, very helpful. By the way, I liked this description: "The old LEAVE mechanism -- efficient, utterly FORTH-like, and devoid of compile-time trickery." > Try this on an 83-system. >: TEST2 -10 0 DO I -4 < IF LEAVE-79 THEN I . -1 +LOOP ; You're right. It seems it would be easier to implement Forth-83 `leave` for the simple signed Forth-79 loops than the other way around... :) Regards, -- Marcos Cruz http://programandala.net
[toc] | [prev] | [next] | [standalone]
| From | Coos Haak <chforth@hccnet.nl> |
|---|---|
| Date | 2015-09-10 22:04 +0200 |
| Message-ID | <je4jwksnuqff$.hjecke3j8w2o.dlg@40tude.net> |
| In reply to | #41922 |
Op Thu, 10 Sep 2015 13:33:46 +0000 (UTC) schreef Marcos Cruz: > En/Je/On 2015-09-10, HAA <someone@microsoft.com> escribió/skribis/wrote: > >> Marcos Cruz wrote: >>> No problem, Forth-79 `leave` makes the loop limit equal to the loop >>> count, so the current index is not affected. >> >> That's what I thought until I came across FD v4n3 p25. > > Thank you! The reading was enlightening, very helpful. > > By the way, I liked this description: "The old LEAVE mechanism -- > efficient, utterly FORTH-like, and devoid of compile-time trickery." > >> Try this on an 83-system. >>: TEST2 -10 0 DO I -4 < IF LEAVE-79 THEN I . -1 +LOOP ; > > You're right. It seems it would be easier to implement Forth-83 `leave` > for the simple signed Forth-79 loops than the other way around... :) > > Regards, If I may ask, what was the result? ANS Forth gives 0 -1 -2 -3 -4 LEAVE discards index and limit and jumps past LOOP. As LEAVE is nestable (within the DO-LOOP) with IF/ELSE/THEN BEGIN/WHILE/REPEAT/UNTIL you must resolve the jump address of LEAVE separate from those constructs: linked list or extra stack. But you are guaranteed that it LEAVEs the loop. I don't have a pre-ANS Forth but if I wrote something as : LEAVE R> R> R> DROP DUP >R >R >R ; The result is 0 -1 -2 -3 -4 -5 I would not like this: when you have a very long loop (more than about seven words, recommended in good Forth books) with a LEAVE near the beginning, you have to write very carefully because it does not LEAVE the loop in fact. It's a bad design. groet Coos
[toc] | [prev] | [next] | [standalone]
| From | Coos Haak <chforth@hccnet.nl> |
|---|---|
| Date | 2015-09-10 22:13 +0200 |
| Message-ID | <1lpkhljfp27f5.f9w2ttmvdb7k.dlg@40tude.net> |
| In reply to | #41926 |
Op Thu, 10 Sep 2015 22:04:39 +0200 schreef Coos Haak: > Op Thu, 10 Sep 2015 13:33:46 +0000 (UTC) schreef Marcos Cruz: > >> En/Je/On 2015-09-10, HAA <someone@microsoft.com> escribió/skribis/wrote: >> >>> Marcos Cruz wrote: >>>> No problem, Forth-79 `leave` makes the loop limit equal to the loop >>>> count, so the current index is not affected. >>> >>> That's what I thought until I came across FD v4n3 p25. >> >> Thank you! The reading was enlightening, very helpful. >> >> By the way, I liked this description: "The old LEAVE mechanism -- >> efficient, utterly FORTH-like, and devoid of compile-time trickery." >> >>> Try this on an 83-system. >>>: TEST2 -10 0 DO I -4 < IF LEAVE-79 THEN I . -1 +LOOP ; >> >> You're right. It seems it would be easier to implement Forth-83 `leave` >> for the simple signed Forth-79 loops than the other way around... :) >> >> Regards, > > If I may ask, what was the result? > > ANS Forth gives 0 -1 -2 -3 -4 > LEAVE discards index and limit and jumps past LOOP. > As LEAVE is nestable (within the DO-LOOP) with IF/ELSE/THEN > BEGIN/WHILE/REPEAT/UNTIL you must resolve the jump address > of LEAVE separate from those constructs: linked list or extra stack. > But you are guaranteed that it LEAVEs the loop. I described my implementation, DO-LOOPS have only index and limit on the return stack. I you keep the address past LOOP on the return stack : LEAVE RDROP RDROP RDROP ; will do. See Ciforth. groet Coos
[toc] | [prev] | [next] | [standalone]
| From | "HAA" <someone@microsoft.com> |
|---|---|
| Date | 2015-09-11 13:14 +1000 |
| Message-ID | <mstgrq$52i$1@speranza.aioe.org> |
| In reply to | #41926 |
Coos Haak wrote: > > If I may ask, what was the result? Using F83 (Forth-83 ITC) and the definitions below the loop fails to terminate 0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 ... \ F83 8086 version : LEAVE-79 R> R> R> + 32767 - >R 32767 >R >R ; \ F83 8080 version : LEAVE-79 R> R> R> + 1+ >R -1 >R ;
[toc] | [prev] | [next] | [standalone]
| From | Coos Haak <chforth@hccnet.nl> |
|---|---|
| Date | 2015-09-11 12:30 +0200 |
| Message-ID | <nsip5yaysdsm$.nutyhf8je93f.dlg@40tude.net> |
| In reply to | #41938 |
Op Fri, 11 Sep 2015 13:14:57 +1000 schreef HAA: > Coos Haak wrote: >> >> If I may ask, what was the result? > > Using F83 (Forth-83 ITC) and the definitions below the loop fails to terminate > > 0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 ... > > \ F83 8086 version >: LEAVE-79 R> R> R> + 32767 - >R 32767 >R >R ; > > \ F83 8080 version >: LEAVE-79 R> R> R> + 1+ >R -1 >R ; Did you forget a >R ? Those are not compatible with the Laxen & Perry implementation of 8086 Forth 83 that has a LEAVE / (LEAVE) that does a jump. Look at the code in screen 15. This is not only a question of standard (fig, 79, 83, ANS) but more of implementation. Some DO's flip bits of the limit, some don't. groet Coos
[toc] | [prev] | [next] | [standalone]
| From | "HAA" <someone@microsoft.com> |
|---|---|
| Date | 2015-09-11 21:47 +1000 |
| Message-ID | <msuetd$2tc$1@speranza.aioe.org> |
| In reply to | #41953 |
Coos Haak wrote: > > This is not only a question of standard (fig, 79, 83, ANS) > but more of implementation. > Some DO's flip bits of the limit, some don't. The contention of the FD article is that it's not possible to implement a 79-LEAVE on an 83-system by the simple mechanism of adjusting the limit and/or index values on the return stack. Are you saying that's false?
[toc] | [prev] | [next] | [standalone]
| From | Bernd Paysan <bernd.paysan@gmx.de> |
|---|---|
| Date | 2015-09-11 14:09 +0200 |
| Message-ID | <msug6h$d0d$1@dont-email.me> |
| In reply to | #41954 |
HAA wrote: > Coos Haak wrote: >> >> This is not only a question of standard (fig, 79, 83, ANS) >> but more of implementation. >> Some DO's flip bits of the limit, some don't. > > The contention of the FD article is that it's not possible to implement a > 79-LEAVE on an 83-system by the simple mechanism of adjusting the > limit and/or index values on the return stack. Are you saying that's > false? There's no portable definition of the Forth-79 LEAVE on a later system. And it's not just "bit flipping", it's a more complicated operation which some systems do: I is represented as sum of two numbers, a bit-flipped I' (limit), and a value which will overflow when it reaches the limit. Also, I and I' may be in registers, not on the return stack. -- Bernd Paysan "If you want it done right, you have to do it yourself" net2o ID: kQusJzA;7*?t=uy@X}1GWr!+0qqp_Cn176t4(dQ* http://bernd-paysan.de/
[toc] | [prev] | [next] | [standalone]
| From | "HAA" <someone@microsoft.com> |
|---|---|
| Date | 2015-09-12 11:29 +1000 |
| Message-ID | <msvv29$leo$1@speranza.aioe.org> |
| In reply to | #41955 |
Bernd Paysan wrote: > HAA wrote: > > > Coos Haak wrote: > >> > >> This is not only a question of standard (fig, 79, 83, ANS) > >> but more of implementation. > >> Some DO's flip bits of the limit, some don't. > > > > The contention of the FD article is that it's not possible to implement a > > 79-LEAVE on an 83-system by the simple mechanism of adjusting the > > limit and/or index values on the return stack. Are you saying that's > > false? > > There's no portable definition of the Forth-79 LEAVE on a later system. And > it's not just "bit flipping", it's a more complicated operation which some > systems do: I is represented as sum of two numbers, a bit-flipped I' > (limit), and a value which will overflow when it reaches the limit. Also, I > and I' may be in registers, not on the return stack. The issue isn't portability or even whether 79-LEAVE is needed. Rather how much resources would you have to throw at a 83/94 system in order to simulate 79-LEAVE. The answer (so far) appears to be 'a lot'.
[toc] | [prev] | [next] | [standalone]
| From | "Elizabeth D. Rather" <erather@forth.com> |
|---|---|
| Date | 2015-09-11 16:05 -1000 |
| Message-ID | <BJmdnR8Wcp_DFW7InZ2dnUU7-XGdnZ2d@supernews.com> |
| In reply to | #41963 |
On 9/11/15 3:29 PM, HAA wrote: > Bernd Paysan wrote: >> HAA wrote: >> >>> Coos Haak wrote: >>>> >>>> This is not only a question of standard (fig, 79, 83, ANS) >>>> but more of implementation. >>>> Some DO's flip bits of the limit, some don't. >>> >>> The contention of the FD article is that it's not possible to implement a >>> 79-LEAVE on an 83-system by the simple mechanism of adjusting the >>> limit and/or index values on the return stack. Are you saying that's >>> false? >> >> There's no portable definition of the Forth-79 LEAVE on a later system. And >> it's not just "bit flipping", it's a more complicated operation which some >> systems do: I is represented as sum of two numbers, a bit-flipped I' >> (limit), and a value which will overflow when it reaches the limit. Also, I >> and I' may be in registers, not on the return stack. > > The issue isn't portability or even whether 79-LEAVE is needed. Rather > how much resources would you have to throw at a 83/94 system in order > to simulate 79-LEAVE. The answer (so far) appears to be 'a lot'. Yes. The basic problem is that Forth83 made fundamental changes to DO ... LOOP (as well as in other places). Many people hated those changes, but by the time the ANS effort began, Forth83 was the common usage, so ANS had to follow it. It's really not worth trying to fix it. 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 | "HAA" <someone@microsoft.com> |
|---|---|
| Date | 2015-09-14 12:25 +1000 |
| Message-ID | <mt5b3m$2c9$1@speranza.aioe.org> |
| In reply to | #41964 |
Elizabeth D. Rather wrote: > On 9/11/15 3:29 PM, HAA wrote: > > > > The issue isn't portability or even whether 79-LEAVE is needed. Rather > > how much resources would you have to throw at a 83/94 system in order > > to simulate 79-LEAVE. The answer (so far) appears to be 'a lot'. > > Yes. The basic problem is that Forth83 made fundamental changes to DO > ... LOOP (as well as in other places). Many people hated those changes, > but by the time the ANS effort began, Forth83 was the common usage, so > ANS had to follow it. It's really not worth trying to fix it. I think 83 loop was a positive change. It worked over the full range, eliminated the need for /LOOP, and LEAVE had no side-effects to worry about. What's amazing is that someone thought of it.
[toc] | [prev] | [next] | [standalone]
| From | "Elizabeth D. Rather" <erather@forth.com> |
|---|---|
| Date | 2015-09-13 17:53 -1000 |
| Message-ID | <2cudnYomTNMp2WvInZ2dnUU7-dudnZ2d@supernews.com> |
| In reply to | #41990 |
On 9/13/15 4:25 PM, HAA wrote: > Elizabeth D. Rather wrote: >> On 9/11/15 3:29 PM, HAA wrote: >>> >>> The issue isn't portability or even whether 79-LEAVE is needed. Rather >>> how much resources would you have to throw at a 83/94 system in order >>> to simulate 79-LEAVE. The answer (so far) appears to be 'a lot'. >> >> Yes. The basic problem is that Forth83 made fundamental changes to DO >> ... LOOP (as well as in other places). Many people hated those changes, >> but by the time the ANS effort began, Forth83 was the common usage, so >> ANS had to follow it. It's really not worth trying to fix it. > > I think 83 loop was a positive change. It worked over the full range, eliminated > the need for /LOOP, and LEAVE had no side-effects to worry about. What's > amazing is that someone thought of it. I agree that Forth83 was an important step forward, and in the long run that DO/LOOP is better. But the process (which entailed only two multi-day meetings 6 months apart for a very limited group of people) didn't allow for much feedback or community input, so there was a lot of hostility and many developers did not follow it. Both the length (24 meetings in various parts of the US over a 6 year period) and inclusiveness of the ANS Forth process achieved a lot more buy-in. 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 | anton@mips.complang.tuwien.ac.at (Anton Ertl) |
|---|---|
| Date | 2015-09-14 08:33 +0000 |
| Message-ID | <2015Sep14.103356@mips.complang.tuwien.ac.at> |
| In reply to | #41990 |
"HAA" <someone@microsoft.com> writes:
>I think 83 loop was a positive change. It worked over the full range, eliminated
>the need for /LOOP
But Forth-83's +LOOP does not eliminate the need for \LOOP, so you can
just as well have /LOOP instead of +LOOP.
And if the start value is at the wrong side of the limit value, DO and
even ?DO are not so great, so overall, I feel that the Forth-83
counted loops leave a lot to be desired (not that the Forth-79 ones
were better). But the 83-LEAVE is indeed better than the 79-LEAVE.
- 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 2015: http://www.rigwit.co.uk/EuroForth2015/
[toc] | [prev] | [next] | [standalone]
Page 1 of 2 [1] 2 Next page →
Back to top | Article view | comp.lang.forth
csiph-web