Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #1242 > unrolled thread
| Started by | gavino <gavcomedy@gmail.com> |
|---|---|
| First post | 2011-04-17 00:34 -0700 |
| Last post | 2011-04-21 18:33 -0700 |
| Articles | 20 on this page of 166 — 22 participants |
Back to article view | Back to comp.lang.forth
made it to page 4 of gforth tutorial gavino <gavcomedy@gmail.com> - 2011-04-17 00:34 -0700
Re: made it to page 4 of gforth tutorial "The Beez'" <hansoft@bigfoot.com> - 2011-04-17 02:29 -0700
Re: made it to page 4 of gforth tutorial alberto pasquale <alberto@hal-pc.org> - 2011-04-18 12:55 -0700
Re: made it to page 4 of gforth tutorial "The Beez'" <hansoft@bigfoot.com> - 2011-04-18 14:45 -0700
Re: made it to page 4 of gforth tutorial Albert van der Horst <albert@spenarnc.xs4all.nl> - 2011-04-19 09:06 +0000
Re: made it to page 4 of gforth tutorial BruceMcF <agila61@netscape.net> - 2011-04-18 20:30 -0700
Re: made it to page 4 of gforth tutorial BruceMcF <agila61@netscape.net> - 2011-04-18 20:33 -0700
Re: made it to page 4 of gforth tutorial David Kuehling <dvdkhlng@gmx.de> - 2011-04-19 13:04 +0200
Re: made it to page 4 of gforth tutorial mhx@iae.nl (Marcel Hendrix) - 2011-04-19 22:09 +0200
Re: made it to page 4 of gforth tutorial "The Beez'" <hansoft@bigfoot.com> - 2011-04-19 23:40 -0700
Re: made it to page 4 of gforth tutorial mhx@iae.nl (Marcel Hendrix) - 2011-04-20 21:27 +0200
Re: made it to page 4 of gforth tutorial alberto pasquale <alberto@hal-pc.org> - 2011-04-20 14:56 -0700
Re: made it to page 4 of gforth tutorial stephenXXX@mpeforth.com (Stephen Pelc) - 2011-04-20 22:42 +0000
Re: made it to page 4 of gforth tutorial John Passaniti <john.passaniti@gmail.com> - 2011-04-20 22:26 -0700
Re: made it to page 4 of gforth tutorial mhx@iae.nl (Marcel Hendrix) - 2011-04-21 20:51 +0200
Re: made it to page 4 of gforth tutorial Marc Olschok <nobody@nowhere.invalid> - 2011-04-26 16:40 +0000
Re: made it to page 4 of gforth tutorial Bernd Paysan <bernd.paysan@gmx.de> - 2011-04-26 22:23 +0200
Re: made it to page 4 of gforth tutorial Alex McDonald <blog@rivadpm.com> - 2011-04-26 13:34 -0700
Re: made it to page 4 of gforth tutorial anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2011-04-27 14:48 +0000
Re: made it to page 4 of gforth tutorial Andrew Haley <andrew29@littlepinkcloud.invalid> - 2011-04-21 04:07 -0500
Re: made it to page 4 of gforth tutorial BruceMcF <agila61@netscape.net> - 2011-04-21 07:38 -0700
Re: made it to page 4 of gforth tutorial John Passaniti <john.passaniti@gmail.com> - 2011-04-21 08:10 -0700
Re: made it to page 4 of gforth tutorial Albert van der Horst <albert@spenarnc.xs4all.nl> - 2011-04-22 12:35 +0000
Re: made it to page 4 of gforth tutorial John Passaniti <john.passaniti@gmail.com> - 2011-04-22 08:51 -0700
Re: made it to page 4 of gforth tutorial Albert van der Horst <albert@spenarnc.xs4all.nl> - 2011-04-23 10:17 +0000
Re: made it to page 4 of gforth tutorial gavino <gavcomedy@gmail.com> - 2011-04-23 18:05 -0700
Re: made it to page 4 of gforth tutorial Andrew Haley <andrew29@littlepinkcloud.invalid> - 2011-04-21 11:16 -0500
Re: made it to page 4 of gforth tutorial anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2011-04-23 11:26 +0000
Re: made it to page 4 of gforth tutorial gavino <gavcomedy@gmail.com> - 2011-04-23 18:07 -0700
Re: made it to page 4 of gforth tutorial foxchip <fox@ultratechnology.com> - 2011-04-24 00:10 -0700
Re: made it to page 4 of gforth tutorial Paul Rubin <no.email@nospam.invalid> - 2011-04-21 11:38 -0700
Re: made it to page 4 of gforth tutorial Andrew Haley <andrew29@littlepinkcloud.invalid> - 2011-04-21 15:13 -0500
Re: made it to page 4 of gforth tutorial Paul Rubin <no.email@nospam.invalid> - 2011-04-21 14:07 -0700
Re: made it to page 4 of gforth tutorial foxchip <fox@ultratechnology.com> - 2011-04-21 15:05 -0700
Re: made it to page 4 of gforth tutorial foxchip <fox@ultratechnology.com> - 2011-04-21 15:24 -0700
Re: made it to page 4 of gforth tutorial Albert van der Horst <albert@spenarnc.xs4all.nl> - 2011-04-22 12:48 +0000
Re: made it to page 4 of gforth tutorial foxchip <fox@ultratechnology.com> - 2011-04-22 10:51 -0700
Re: made it to page 4 of gforth tutorial Paul Rubin <no.email@nospam.invalid> - 2011-04-21 17:41 -0700
Re: made it to page 4 of gforth tutorial BruceMcF <agila61@netscape.net> - 2011-04-21 18:16 -0700
Re: made it to page 4 of gforth tutorial Paul Rubin <no.email@nospam.invalid> - 2011-04-21 18:58 -0700
Re: made it to page 4 of gforth tutorial BruceMcF <agila61@netscape.net> - 2011-04-21 19:49 -0700
Re: made it to page 4 of gforth tutorial Paul Rubin <no.email@nospam.invalid> - 2011-04-22 00:02 -0700
Re: made it to page 4 of gforth tutorial BruceMcF <agila61@netscape.net> - 2011-04-22 06:59 -0700
Re: made it to page 4 of gforth tutorial Paul Rubin <no.email@nospam.invalid> - 2011-04-23 01:20 -0700
Re: made it to page 4 of gforth tutorial foxchip <fox@ultratechnology.com> - 2011-04-21 21:11 -0700
Re: made it to page 4 of gforth tutorial Paul Rubin <no.email@nospam.invalid> - 2011-04-22 00:16 -0700
Re: made it to page 4 of gforth tutorial foxchip <fox@ultratechnology.com> - 2011-04-22 10:12 -0700
Re: made it to page 4 of gforth tutorial Jan Coombs <jan_2011-02@murray-microft.co.uk> - 2011-04-23 07:38 +0100
Re: made it to page 4 of gforth tutorial Paul Rubin <no.email@nospam.invalid> - 2011-04-25 00:05 -0700
Re: made it to page 4 of gforth tutorial Jan Coombs <jan_2011-02@murray-microft.co.uk> - 2011-04-25 13:34 +0100
Re: made it to page 4 of gforth tutorial Paul Rubin <no.email@nospam.invalid> - 2011-04-25 08:50 -0700
Re: made it to page 4 of gforth tutorial foxchip <fox@ultratechnology.com> - 2011-04-25 23:11 -0700
Re: made it to page 4 of gforth tutorial Paul Rubin <no.email@nospam.invalid> - 2011-04-22 00:18 -0700
Re: made it to page 4 of gforth tutorial foxchip <fox@ultratechnology.com> - 2011-04-22 10:19 -0700
Re: made it to page 4 of gforth tutorial Paul Rubin <no.email@nospam.invalid> - 2011-04-25 10:43 -0700
Re: made it to page 4 of gforth tutorial BruceMcF <agila61@netscape.net> - 2011-04-25 13:17 -0700
Re: made it to page 4 of gforth tutorial Paul Rubin <no.email@nospam.invalid> - 2011-04-25 16:32 -0700
Re: made it to page 4 of gforth tutorial BruceMcF <agila61@netscape.net> - 2011-04-25 18:21 -0700
Re: made it to page 4 of gforth tutorial Charles G Montgomery <cgm@physics.utoledo.edu> - 2011-04-26 19:36 -0400
Re: made it to page 4 of gforth tutorial BruceMcF <agila61@netscape.net> - 2011-04-26 21:05 -0700
Re: made it to page 4 of gforth tutorial Paul Rubin <no.email@nospam.invalid> - 2011-04-26 23:36 -0700
Re: made it to page 4 of gforth tutorial BruceMcF <agila61@netscape.net> - 2011-04-27 08:57 -0700
Re: made it to page 4 of gforth tutorial Albert van der Horst <albert@spenarnc.xs4all.nl> - 2011-04-28 11:53 +0000
Re: made it to page 4 of gforth tutorial BruceMcF <agila61@netscape.net> - 2011-04-29 22:21 -0700
Re: made it to page 4 of gforth tutorial Jan Coombs <jan_2011-02@murray-microft.co.uk> - 2011-04-27 17:41 +0100
Re: made it to page 4 of gforth tutorial BruceMcF <agila61@netscape.net> - 2011-04-27 09:53 -0700
Re: made it to page 4 of gforth tutorial Albert van der Horst <albert@spenarnc.xs4all.nl> - 2011-04-26 11:39 +0000
Re: made it to page 4 of gforth tutorial foxchip <fox@ultratechnology.com> - 2011-04-25 23:22 -0700
Re: made it to page 4 of gforth tutorial Paul Rubin <no.email@nospam.invalid> - 2011-04-26 17:51 -0700
Re: made it to page 4 of gforth tutorial Albert van der Horst <albert@spenarnc.xs4all.nl> - 2011-04-23 10:33 +0000
Re: made it to page 4 of gforth tutorial Paul Rubin <no.email@nospam.invalid> - 2011-04-25 00:48 -0700
Re: made it to page 4 of gforth tutorial BruceMcF <agila61@netscape.net> - 2011-04-29 22:24 -0700
Re: made it to page 4 of gforth tutorial John Passaniti <john.passaniti@gmail.com> - 2011-04-22 09:44 -0700
Re: made it to page 4 of gforth tutorial foxchip <fox@ultratechnology.com> - 2011-04-22 11:36 -0700
Re: made it to page 4 of gforth tutorial John Passaniti <john.passaniti@gmail.com> - 2011-04-22 17:08 -0700
Re: made it to page 4 of gforth tutorial Paul Rubin <no.email@nospam.invalid> - 2011-04-23 18:11 -0700
Re: made it to page 4 of gforth tutorial Paul Rubin <no.email@nospam.invalid> - 2011-04-23 00:49 -0700
Re: made it to page 4 of gforth tutorial Andrew Haley <andrew29@littlepinkcloud.invalid> - 2011-04-23 03:55 -0500
Re: made it to page 4 of gforth tutorial John Passaniti <john.passaniti@gmail.com> - 2011-04-23 14:47 -0700
Re: made it to page 4 of gforth tutorial BruceMcF <agila61@netscape.net> - 2011-04-23 11:12 -0700
Re: made it to page 4 of gforth tutorial Jan Coombs <jan_2011-02@murray-microft.co.uk> - 2011-04-30 16:33 +0100
Re: made it to page 4 of gforth tutorial Paul Rubin <no.email@nospam.invalid> - 2011-05-01 23:03 -0700
Re: made it to page 4 of gforth tutorial Bernd Paysan <bernd.paysan@gmx.de> - 2011-05-02 22:15 +0200
Re: made it to page 4 of gforth tutorial Paul Rubin <no.email@nospam.invalid> - 2011-05-02 19:15 -0700
Re: made it to page 4 of gforth tutorial Jan Coombs <jan_2011-02@murray-microft.co.uk> - 2011-05-04 08:14 +0100
Re: made it to page 4 of gforth tutorial Paul Rubin <no.email@nospam.invalid> - 2011-05-04 00:51 -0700
Re: made it to page 4 of gforth tutorial Jan Coombs <jan_2011-02@murray-microft.co.uk> - 2011-05-04 22:03 +0100
Re: made it to page 4 of gforth tutorial Andrew Haley <andrew29@littlepinkcloud.invalid> - 2011-04-30 03:15 -0500
Re: made it to page 4 of gforth tutorial Elizabeth D Rather <erather@forth.com> - 2011-05-01 19:04 -1000
Re: made it to page 4 of gforth tutorial Paul Rubin <no.email@nospam.invalid> - 2011-04-27 22:58 -0700
Re: made it to page 4 of gforth tutorial Andrew Haley <andrew29@littlepinkcloud.invalid> - 2011-04-28 03:37 -0500
Re: made it to page 4 of gforth tutorial Paul Rubin <no.email@nospam.invalid> - 2011-04-28 08:54 -0700
Re: made it to page 4 of gforth tutorial Andrew Haley <andrew29@littlepinkcloud.invalid> - 2011-04-28 12:12 -0500
Re: made it to page 4 of gforth tutorial Paul Rubin <no.email@nospam.invalid> - 2011-04-28 21:34 -0700
Re: made it to page 4 of gforth tutorial Andrew Haley <andrew29@littlepinkcloud.invalid> - 2011-04-29 02:27 -0500
Re: made it to page 4 of gforth tutorial Paul Rubin <no.email@nospam.invalid> - 2011-04-29 15:09 -0700
Re: made it to page 4 of gforth tutorial Hugh Aguilar <hughaguilar96@yahoo.com> - 2011-05-02 21:47 -0700
Re: made it to page 4 of gforth tutorial John Passaniti <john.passaniti@gmail.com> - 2011-04-28 10:49 -0700
Re: made it to page 4 of gforth tutorial Paul Rubin <no.email@nospam.invalid> - 2011-04-28 21:57 -0700
Re: made it to page 4 of gforth tutorial John Passaniti <john.passaniti@gmail.com> - 2011-05-03 13:28 -0700
Re: made it to page 4 of gforth tutorial John Passaniti <john.passaniti@gmail.com> - 2011-04-28 11:01 -0700
Re: made it to page 4 of gforth tutorial John Passaniti <john.passaniti@gmail.com> - 2011-04-23 14:02 -0700
Re: made it to page 4 of gforth tutorial Paul Rubin <no.email@nospam.invalid> - 2011-04-25 07:08 -0700
Re: made it to page 4 of gforth tutorial John Passaniti <john.passaniti@gmail.com> - 2011-04-26 10:47 -0700
Re: made it to page 4 of gforth tutorial Alex McDonald <blog@rivadpm.com> - 2011-04-26 10:58 -0700
Re: made it to page 4 of gforth tutorial Paul Rubin <no.email@nospam.invalid> - 2011-04-27 22:39 -0700
Re: made it to page 4 of gforth tutorial John Passaniti <john.passaniti@gmail.com> - 2011-04-28 10:43 -0700
Re: made it to page 4 of gforth tutorial David Thompson <dave.thompson2@verizon.net> - 2011-05-05 04:39 -0400
Re: made it to page 4 of gforth tutorial Andrew Haley <andrew29@littlepinkcloud.invalid> - 2011-05-05 04:10 -0500
Re: made it to page 4 of gforth tutorial stephenXXX@mpeforth.com (Stephen Pelc) - 2011-04-23 09:53 +0000
Re: made it to page 4 of gforth tutorial John Passaniti <john.passaniti@gmail.com> - 2011-04-23 14:59 -0700
Re: made it to page 4 of gforth tutorial BruceMcF <agila61@netscape.net> - 2011-04-23 16:10 -0700
Re: made it to page 4 of gforth tutorial Paul Rubin <no.email@nospam.invalid> - 2011-05-01 23:47 -0700
Re: made it to page 4 of gforth tutorial John Passaniti <john.passaniti@gmail.com> - 2011-05-03 14:23 -0700
Re: made it to page 4 of gforth tutorial Paul Rubin <no.email@nospam.invalid> - 2011-05-04 01:48 -0700
Re: made it to page 4 of gforth tutorial Andrew Haley <andrew29@littlepinkcloud.invalid> - 2011-05-04 05:23 -0500
Re: made it to page 4 of gforth tutorial John Passaniti <jpassaniti@ashly.com> - 2011-05-04 11:17 -0700
Re: made it to page 4 of gforth tutorial BruceMcF <agila61@netscape.net> - 2011-05-04 12:03 -0700
Re: made it to page 4 of gforth tutorial foxchip <fox@ultratechnology.com> - 2011-04-23 23:59 -0700
Re: made it to page 4 of gforth tutorial Paul Rubin <no.email@nospam.invalid> - 2011-05-01 23:48 -0700
Re: made it to page 4 of gforth tutorial Andrew Haley <andrew29@littlepinkcloud.invalid> - 2011-04-22 03:22 -0500
Re: made it to page 4 of gforth tutorial foxchip <fox@ultratechnology.com> - 2011-04-22 10:28 -0700
Re: made it to page 4 of gforth tutorial Andrew Haley <andrew29@littlepinkcloud.invalid> - 2011-04-22 12:37 -0500
Re: made it to page 4 of gforth tutorial David Kuehling <dvdkhlng@gmx.de> - 2011-04-22 20:07 +0200
Re: made it to page 4 of gforth tutorial anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2011-04-22 18:55 +0000
Re: made it to page 4 of gforth tutorial foxchip <fox@ultratechnology.com> - 2011-04-23 23:25 -0700
Re: made it to page 4 of gforth tutorial Andrew Haley <andrew29@littlepinkcloud.invalid> - 2011-04-24 03:27 -0500
Re: made it to page 4 of gforth tutorial foxchip <fox@ultratechnology.com> - 2011-04-24 20:20 -0700
Re: made it to page 4 of gforth tutorial Andrew Haley <andrew29@littlepinkcloud.invalid> - 2011-04-25 03:24 -0500
Re: made it to page 4 of gforth tutorial Elizabeth D Rather <erather@forth.com> - 2011-04-25 11:55 -1000
Re: made it to page 4 of gforth tutorial foxchip <fox@ultratechnology.com> - 2011-04-25 23:45 -0700
Re: made it to page 4 of gforth tutorial Elizabeth D Rather <erather@forth.com> - 2011-04-25 21:49 -1000
Re: made it to page 4 of gforth tutorial Alex McDonald <blog@rivadpm.com> - 2011-04-26 02:39 -0700
Re: made it to page 4 of gforth tutorial Hugh Aguilar <hughaguilar96@yahoo.com> - 2011-04-26 03:19 -0700
Re: made it to page 4 of gforth tutorial anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2011-04-26 10:01 +0000
Re: made it to page 4 of gforth tutorial Andrew Haley <andrew29@littlepinkcloud.invalid> - 2011-04-23 03:43 -0500
Re: made it to page 4 of gforth tutorial foxchip <fox@ultratechnology.com> - 2011-04-23 23:53 -0700
Re: made it to page 4 of gforth tutorial foxchip <fox@ultratechnology.com> - 2011-04-24 20:27 -0700
Re: made it to page 4 of gforth tutorial Andrew Haley <andrew29@littlepinkcloud.invalid> - 2011-04-25 03:35 -0500
Re: made it to page 4 of gforth tutorial foxchip <fox@ultratechnology.com> - 2011-04-26 00:20 -0700
Re: made it to page 4 of gforth tutorial Andrew Haley <andrew29@littlepinkcloud.invalid> - 2011-04-26 04:02 -0500
Re: made it to page 4 of gforth tutorial Bernd Paysan <bernd.paysan@gmx.de> - 2011-04-26 22:40 +0200
Re: made it to page 4 of gforth tutorial Alex McDonald <blog@rivadpm.com> - 2011-04-25 14:16 -0700
Re: made it to page 4 of gforth tutorial foxchip <fox@ultratechnology.com> - 2011-04-25 23:25 -0700
Re: made it to page 4 of gforth tutorial Alex McDonald <blog@rivadpm.com> - 2011-04-26 02:47 -0700
Re: made it to page 4 of gforth tutorial anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2011-04-26 10:22 +0000
Re: made it to page 4 of gforth tutorial Alex McDonald <blog@rivadpm.com> - 2011-04-26 10:45 -0700
Re: made it to page 4 of gforth tutorial mhx@iae.nl (Marcel Hendrix) - 2011-04-26 22:19 +0200
Re: made it to page 4 of gforth tutorial mhx@iae.nl (Marcel Hendrix) - 2011-04-27 21:05 +0200
Re: made it to page 4 of gforth tutorial foxchip <fox@ultratechnology.com> - 2011-04-22 11:44 -0700
Re: made it to page 4 of gforth tutorial Elizabeth D Rather <erather@forth.com> - 2011-04-22 11:46 -1000
Re: made it to page 4 of gforth tutorial Jan Coombs <jan_2011-02@murray-microft.co.uk> - 2011-04-23 08:02 +0100
Re: made it to page 4 of gforth tutorial foxchip <fox@ultratechnology.com> - 2011-04-23 23:46 -0700
Re: made it to page 4 of gforth tutorial foxchip <fox@ultratechnology.com> - 2011-04-24 01:32 -0700
Re: made it to page 4 of gforth tutorial Elizabeth D Rather <erather@forth.com> - 2011-04-24 08:36 -1000
Re: made it to page 4 of gforth tutorial foxchip <fox@ultratechnology.com> - 2011-04-24 19:43 -0700
Re: made it to page 4 of gforth tutorial foxchip <fox@ultratechnology.com> - 2011-04-24 21:07 -0700
Re: made it to page 4 of gforth tutorial Albert van der Horst <albert@spenarnc.xs4all.nl> - 2011-04-25 11:04 +0000
Re: made it to page 4 of gforth tutorial foxchip <fox@ultratechnology.com> - 2011-04-25 23:02 -0700
Re: made it to page 4 of gforth tutorial BruceMcF <agila61@netscape.net> - 2011-04-20 18:17 -0700
Re: made it to page 4 of gforth tutorial foxchip <fox@ultratechnology.com> - 2011-04-21 15:19 -0700
Re: made it to page 4 of gforth tutorial foxchip <fox@ultratechnology.com> - 2011-04-21 15:27 -0700
Re: made it to page 4 of gforth tutorial gavino <gavcomedy@gmail.com> - 2011-04-21 16:54 -0700
Re: made it to page 4 of gforth tutorial gavino <gavcomedy@gmail.com> - 2011-04-21 17:09 -0700
Re: made it to page 4 of gforth tutorial foxchip <fox@ultratechnology.com> - 2011-04-21 17:57 -0700
Re: made it to page 4 of gforth tutorial BruceMcF <agila61@netscape.net> - 2011-04-21 18:33 -0700
Page 1 of 9 [1] 2 3 4 5 6 7 8 9 Next page →
| From | gavino <gavcomedy@gmail.com> |
|---|---|
| Date | 2011-04-17 00:34 -0700 |
| Subject | made it to page 4 of gforth tutorial |
| Message-ID | <fa0405c0-626f-4f4b-a1cb-64035d984d9d@d19g2000prh.googlegroups.com> |
http://www.complang.tuwien.ac.at/forth/gforth/Docs-html/Stack-Manipulation-Tutorial.html#Stack-Manipulation-Tutorial
[toc] | [next] | [standalone]
| From | "The Beez'" <hansoft@bigfoot.com> |
|---|---|
| Date | 2011-04-17 02:29 -0700 |
| Message-ID | <69afdd7c-135c-4d8b-8932-a6db451e6dc4@gu8g2000vbb.googlegroups.com> |
| In reply to | #1242 |
On Apr 17, 9:34 am, gavino <gavcom...@gmail.com> wrote: > http://www.complang.tuwien.ac.at/forth/gforth/Docs-html/Stack-Manipul... 17 s>d d>f 3 s>d d>f f** ;-) Hans
[toc] | [prev] | [next] | [standalone]
| From | alberto pasquale <alberto@hal-pc.org> |
|---|---|
| Date | 2011-04-18 12:55 -0700 |
| Message-ID | <8e8b828c-6294-4b27-99b5-c9cdc67d8e35@m23g2000prl.googlegroups.com> |
| In reply to | #1242 |
On Apr 17, 2:34 am, gavino <gavcom...@gmail.com> wrote: > http://www.complang.tuwien.ac.at/forth/gforth/Docs-html/Stack-Manipul... The exercise, Assignment: Write 17^3 and 17^4 in Forth, without writing 17 more than once. One answer, : Solution ( n -- n^3 n^4 ) dup over * \ n n^2 over * \ n n^3 dup -rot * ; \ n^3 n^4 ok ok 17 solution . . 83521 4913 ok
[toc] | [prev] | [next] | [standalone]
| From | "The Beez'" <hansoft@bigfoot.com> |
|---|---|
| Date | 2011-04-18 14:45 -0700 |
| Message-ID | <c53fc343-ae3d-4d19-982a-c2fc25c757ef@w36g2000vbi.googlegroups.com> |
| In reply to | #1292 |
On 18 apr, 21:55, alberto pasquale <albe...@hal-pc.org> wrote: > On Apr 17, 2:34 am, gavino <gavcom...@gmail.com> wrote: > > >http://www.complang.tuwien.ac.at/forth/gforth/Docs-html/Stack-Manipul... > > The exercise, > Assignment: Write 17^3 and 17^4 in Forth, without writing 17 more than > once. : ^3^4 dup dup dup * * dup rot * ; ok 17 ^3^4 . . 83521 4913 ok Hans Bezemer
[toc] | [prev] | [next] | [standalone]
| From | Albert van der Horst <albert@spenarnc.xs4all.nl> |
|---|---|
| Date | 2011-04-19 09:06 +0000 |
| Message-ID | <ljw6ne.1mg@spenarnc.xs4all.nl> |
| In reply to | #1294 |
In article <c53fc343-ae3d-4d19-982a-c2fc25c757ef@w36g2000vbi.googlegroups.com>, The Beez' <hansoft@bigfoot.com> wrote: >On 18 apr, 21:55, alberto pasquale <albe...@hal-pc.org> wrote: >> On Apr 17, 2:34=A0am, gavino <gavcom...@gmail.com> wrote: >> >> >http://www.complang.tuwien.ac.at/forth/gforth/Docs-html/Stack-Manipul... >> >> The exercise, >> Assignment: Write 17^3 and 17^4 in Forth, without writing 17 more than >> once. >: ^3^4 dup dup dup * * dup rot * ; ok >17 ^3^4 . . 83521 4913 ok : ^3^4 >R R@ R@ * R@ * DUP R> * ; > >Hans Bezemer Groetjes Albert -- -- Albert van der Horst, UTRECHT,THE NETHERLANDS Economic growth -- being exponential -- ultimately falters. albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst
[toc] | [prev] | [next] | [standalone]
| From | BruceMcF <agila61@netscape.net> |
|---|---|
| Date | 2011-04-18 20:30 -0700 |
| Message-ID | <6ead0c70-a43a-4fbd-b2a6-fdee96746f23@dn9g2000vbb.googlegroups.com> |
| In reply to | #1292 |
On Apr 18, 3:55 pm, alberto pasquale <albe...@hal-pc.org> wrote: > On Apr 17, 2:34 am, gavino <gavcom...@gmail.com> wrote: > > >http://www.complang.tuwien.ac.at/forth/gforth/Docs-html/Stack-Manipul... > > The exercise, > Assignment: Write 17^3 and 17^4 in Forth, without writing 17 more than > once. > > One answer, > > : Solution ( n -- n^3 n^4 ) > dup over * \ n n^2 > over * \ n n^3 > dup -rot * ; \ n^3 n^4 ok > ok > 17 solution . . 83521 4913 ok : >>R POSTPONE DUP POSTPONE >R ; IMMEDIATE : solution ( n -- n^3 n^4 ) DUP DUP DUP >>R * * DUP R> * ; 17 solution
[toc] | [prev] | [next] | [standalone]
| From | BruceMcF <agila61@netscape.net> |
|---|---|
| Date | 2011-04-18 20:33 -0700 |
| Message-ID | <80931f69-30bd-4995-bed6-0d9f35a0f608@dn9g2000vbb.googlegroups.com> |
| In reply to | #1292 |
On Apr 18, 3:55 pm, alberto pasquale <albe...@hal-pc.org> wrote: > On Apr 17, 2:34 am, gavino <gavcom...@gmail.com> wrote: > > >http://www.complang.tuwien.ac.at/forth/gforth/Docs-html/Stack-Manipul... > > The exercise, > Assignment: Write 17^3 and 17^4 in Forth, without writing 17 more than > once. > > One answer, > > : Solution ( n -- n^3 n^4 ) > dup over * \ n n^2 > over * \ n n^3 > dup -rot * ; \ n^3 n^4 ok > ok > 17 solution . . 83521 4913 ok Oops, didn't hit .s, I had an extra DUP [UNDEFINED] >>R [IF] : >>R POSTPONE DUP POSTPONE >R ; IMMEDIATE [THEN] : solution ( n -- n^3 n^4 ) DUP DUP >>R * * DUP R> * ; 17 Solution
[toc] | [prev] | [next] | [standalone]
| From | David Kuehling <dvdkhlng@gmx.de> |
|---|---|
| Date | 2011-04-19 13:04 +0200 |
| Message-ID | <87vcyafqn8.fsf@snail.Pool> |
| In reply to | #1292 |
>>>>> "alberto" == alberto pasquale <alberto@hal-pc.org> writes: > On Apr 17, 2:34 am, gavino <gavcom...@gmail.com> wrote: >> http://www.complang.tuwien.ac.at/forth/gforth/Docs-html/Stack-Manipul... > The exercise, Assignment: Write 17^3 and 17^4 in Forth, without > writing 17 more than once. > One answer, > : Solution ( n -- n^3 n^4 ) dup over * \ n n^2 over * \ n n^3 dup -rot > * ; \ n^3 n^4 ok ok 17 solution . . 83521 4913 ok better solution: : ^ ( n1 n2 -- n3 ) 1 swap 0 ?do over * loop nip ; : Solution ( n -- n^3 n^4 ) dup 3 ^ swap 4 ^ ; :) David -- GnuPG public key: http://user.cs.tu-berlin.de/~dvdkhlng/dk.gpg Fingerprint: B17A DC95 D293 657B 4205 D016 7DEF 5323 C174 7D40
[toc] | [prev] | [next] | [standalone]
| From | mhx@iae.nl (Marcel Hendrix) |
|---|---|
| Date | 2011-04-19 22:09 +0200 |
| Message-ID | <89941316998436@frunobulax.edu> |
| In reply to | #1314 |
David Kuehling <dvdkhlng@gmx.de> writes Re: made it to page 4 of gforth tutorial >>>>>> "alberto" == alberto pasquale <alberto@hal-pc.org> writes: [..] >> The exercise, Assignment: Write 17^3 and 17^4 in Forth, without >> writing 17 more than once. [..] > better solution: > : ^ ( n1 n2 -- n3 ) 1 swap 0 ?do over * loop nip ; > : Solution ( n -- n^3 n^4 ) dup 3 ^ swap 4 ^ ; [..] Without using the number 17 at all: : square dup * ; ( u1 -- u2 ) 4 square 1+ constant 17 17 square constant 17^2 : 17^3 ( -- u ) 17^2 17 * ; : 17^4 ( -- u ) 17^2 square ; FORTH> ' 17^3 idis $012439C0 : [trashed] $012439CA push $00001331 d# $012439CF ; FORTH> ' 17^4 idis $01243A40 : [trashed] $01243A4A push $00014641 d# $01243A4F ; -marcel
[toc] | [prev] | [next] | [standalone]
| From | "The Beez'" <hansoft@bigfoot.com> |
|---|---|
| Date | 2011-04-19 23:40 -0700 |
| Message-ID | <40897826-9ec5-42c7-bb7f-540e964cddac@z33g2000vbk.googlegroups.com> |
| In reply to | #1325 |
On 19 apr, 22:09, m...@iae.nl (Marcel Hendrix) wrote: > David Kuehling <dvdkh...@gmx.de> writes Re: made it to page 4 of gforth tutorial Apart from any specific Forth implementation, I like Alberts solution best, since it uses the return-stack as a sort of "local variable". I saw this technique first in the implementation of the classic Fig- Forth block editor. Anyway, all solutions seem to require 3 multiplies and 5-6 stack instructions. Hans Bezemer
[toc] | [prev] | [next] | [standalone]
| From | mhx@iae.nl (Marcel Hendrix) |
|---|---|
| Date | 2011-04-20 21:27 +0200 |
| Message-ID | <99081415998436@frunobulax.edu> |
| In reply to | #1341 |
"The Beez'" <hansoft@bigfoot.com> wrote Re: made it to page 4 of gforth tutorial
> On 19 apr, 22:09, m...@iae.nl (Marcel Hendrix) wrote:
>> David Kuehling <dvdkh...@gmx.de> writes Re: made it to page 4 of gforth tutorial
> Apart from any specific Forth implementation, I like Alberts solution
> best, since it uses the return-stack as a sort of "local variable".
Fail to see any good in that, sorry.
> I
> saw this technique first in the implementation of the classic Fig-
> Forth block editor. Anyway, all solutions seem to require 3 multiplies
> and 5-6 stack instructions.
All could attempt to work without any multiplications or stack-ops at run-time.
Let's see:
1) 17 s>d d>f 3 s>d d>f f**
Returns a floating result and is only half of the solution.
Extension:
17e fdup 3e f** f>s .
4e f** f>s .
2) : Solution ( n -- n^3 n^4 )
dup over * \ n n^2
over * \ n n^3
dup -rot * ; \ n^3 n^4 ok
17 solution . . 83521 4913 ok
Result ok, but uses a definition.
17 dup over * \ n n^2
over * \ n n^3
dup -rot * \ n^3 n^4
swap . .
works as well, but still obscure.
3) : ^3^4 dup dup dup * * dup rot * ; ok
17 ^3^4 . . 83521 4913 ok
Again a definition, but
17 dup dup dup * * dup rot * swap . .
works the same on real Forths.
4) : ^3^4 >R R@ R@ * R@ * DUP R> * ;
No hope of removing the colon def., but on some compilers:
: 17^3^4 17 >R R@ R@ * R@ * DUP R> * SWAP ; ok
FORTH> ' 17^3^4 idis
$012434C0 : [trashed]
$012434CA push $00014641 d#
$012434CF push $00001331 d#
$012434D4 ;
.. it could be done if you feel like it.
5) : >>R POSTPONE DUP POSTPONE >R ; IMMEDIATE
: solution ( n -- n^3 n^4 ) DUP DUP DUP >>R * * DUP R> * ;
I do not feel like wasting time here :-)
6) : ^ ( n1 n2 -- n3 ) 1 swap 0 ?do over * loop nip ;
: Solution ( n -- n^3 n^4 ) dup 3 ^ swap 4 ^ ;
Could be 17 dup 3 ^ . 4 ^ .
Can not be done at runtime, needs one definition, and this
definition is problably not optimizable. However, "^" might
be a useful word to keep/have, so I would judge this solution
as also a good one.
7) Mine (note that most Forths have a word like square).
In my view the solutions with R-stack manipulations are
definitely too big, obscure, and slow. All other solutions
are acceptable, so choose the least obscure one.
-marcel
[toc] | [prev] | [next] | [standalone]
| From | alberto pasquale <alberto@hal-pc.org> |
|---|---|
| Date | 2011-04-20 14:56 -0700 |
| Message-ID | <d5129313-af98-451b-a173-3caa4ae26b5b@j13g2000pro.googlegroups.com> |
| In reply to | #1355 |
On Apr 20, 2:27 pm, m...@iae.nl (Marcel Hendrix) wrote: > "The Beez'" <hans...@bigfoot.com> wrote Re: made it to page 4 of gforth tutorial > > > On 19 apr, 22:09, m...@iae.nl (Marcel Hendrix) wrote: > >> David Kuehling <dvdkh...@gmx.de> writes Re: made it to page 4 of gforth tutorial > > Apart from any specific Forth implementation, I like Alberts solution > > best, since it uses the return-stack as a sort of "local variable". > > Fail to see any good in that, sorry. > > > I > > saw this technique first in the implementation of the classic Fig- > > Forth block editor. Anyway, all solutions seem to require 3 multiplies > > and 5-6 stack instructions. > > All could attempt to work without any multiplications or stack-ops at run-time. > Let's see: > > 1) 17 s>d d>f 3 s>d d>f f** > > Returns a floating result and is only half of the solution. > > Extension: > > 17e fdup 3e f** f>s . > 4e f** f>s . > > 2) : Solution ( n -- n^3 n^4 ) > dup over * \ n n^2 > over * \ n n^3 > dup -rot * ; \ n^3 n^4 ok > > 17 solution . . 83521 4913 ok > > Result ok, but uses a definition. > > 17 dup over * \ n n^2 > over * \ n n^3 > dup -rot * \ n^3 n^4 > swap . . > > works as well, but still obscure. > > 3) : ^3^4 dup dup dup * * dup rot * ; ok > 17 ^3^4 . . 83521 4913 ok > > Again a definition, but > > 17 dup dup dup * * dup rot * swap . . > > works the same on real Forths. > > 4) : ^3^4 >R R@ R@ * R@ * DUP R> * ; > > No hope of removing the colon def., but on some compilers: > > : 17^3^4 17 >R R@ R@ * R@ * DUP R> * SWAP ; ok > > FORTH> ' 17^3^4 idis > $012434C0 : [trashed] > $012434CA push $00014641 d# > $012434CF push $00001331 d# > $012434D4 ; > > .. it could be done if you feel like it. > > 5) : >>R POSTPONE DUP POSTPONE >R ; IMMEDIATE > > : solution ( n -- n^3 n^4 ) DUP DUP DUP >>R * * DUP R> * ; > > I do not feel like wasting time here :-) > > 6) : ^ ( n1 n2 -- n3 ) 1 swap 0 ?do over * loop nip ; > : Solution ( n -- n^3 n^4 ) dup 3 ^ swap 4 ^ ; > > Could be 17 dup 3 ^ . 4 ^ . > > Can not be done at runtime, needs one definition, and this > definition is problably not optimizable. However, "^" might > be a useful word to keep/have, so I would judge this solution > as also a good one. > > 7) Mine (note that most Forths have a word like square). > > In my view the solutions with R-stack manipulations are > definitely too big, obscure, and slow. All other solutions > are acceptable, so choose the least obscure one. > > -marcel This was a the end of a chapter teaching stack manipulation words, so the solutions exemplify different stack usages. In real life, the philosophy of Forth tells you that it is best to solve as much of the problem as possible at compile time not at run time so for a problem stated as: Assignment: Write 17^3 and 17^4 in Forth, without writing 17 more than once. You write: : Solution 4913 83521 ; Zero multiplications, zero stack gymnastics and without writing 17 at all :) alberto
[toc] | [prev] | [next] | [standalone]
| From | stephenXXX@mpeforth.com (Stephen Pelc) |
|---|---|
| Date | 2011-04-20 22:42 +0000 |
| Message-ID | <4daf5ded.6356525@192.168.0.50> |
| In reply to | #1357 |
On Wed, 20 Apr 2011 14:56:42 -0700 (PDT), alberto pasquale <alberto@hal-pc.org> wrote: >This was a the end of a chapter teaching stack manipulation words, so >the solutions exemplify different stack usages. >In real life, the philosophy of Forth tells you that it is best to >solve as much of the problem as possible at compile time not at run >time so for a problem stated as: > >Assignment: Write 17^3 and 17^4 in Forth, without writing 17 more >than >once. > >You write: > >: Solution 4913 83521 ; > >Zero multiplications, zero stack gymnastics and without writing 17 at >all :) Good solution! Just to emphasise Marcel's point that modern compilers may do the compile-time work for you, today's VFX Forth build 3208 gives: dis solution SOLUTION ( 004C6C90 8D6DF8 ) LEA EBP, [EBP+-08] ( 004C6C93 C7450031130000 ) MOV DWord Ptr [EBP], 00001331 ( 004C6C9A 895D04 ) MOV [EBP+04], EBX ( 004C6C9D BB41460100 ) MOV EBX, 00014641 ( 004C6CA2 C3 ) NEXT, ( 19 bytes, 5 instructions ) ok : t 17 dup dup dup * * tuck * ; ok dis t T ( 004DE500 8D6DF8 ) LEA EBP, [EBP+-08] ( 004DE503 C7450031130000 ) MOV DWord Ptr [EBP], 00001331 ( 004DE50A 895D04 ) MOV [EBP+04], EBX ( 004DE50D BB41460100 ) MOV EBX, 00014641 ( 004DE512 C3 ) NEXT, ( 19 bytes, 5 instructions ) ok 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 | John Passaniti <john.passaniti@gmail.com> |
|---|---|
| Date | 2011-04-20 22:26 -0700 |
| Message-ID | <e58bd5f3-2f85-4d6c-ac76-ac06e5d965bf@gu8g2000vbb.googlegroups.com> |
| In reply to | #1357 |
On Apr 20, 5:56 pm, alberto pasquale <albe...@hal-pc.org> wrote: > Assignment: Write 17^3 and 17^4 in Forth, without writing > 17 more than once. > > You write: > > : Solution 4913 83521 ; > > Zero multiplications, zero stack gymnastics and without writing 17 at > all :) That actually isn't entirely silly. In the Test Driven Development (TDD) methodology, one never writes any code without writing a test for that code first. And it's not uncommon when you're just starting out on some code that the first tests call on code that does The Simplest Thing That Could Possibly Work. So your solution, above, would be a perfectly reasonable definition that would exercise (and pass) the test. It seems silly, but it's an important part of TDD; the definition of what the code does is defined through continually adding and refining tests. What would reasonably occur next would be a test would be written that might be "take an arbitrary integer x between 0 and the maxint^(1/4) and produce x^3 and x^4 on the stack." That would then force the programmer to write code that passed both the first and second tests, which would actual run-time calculation.
[toc] | [prev] | [next] | [standalone]
| From | mhx@iae.nl (Marcel Hendrix) |
|---|---|
| Date | 2011-04-21 20:51 +0200 |
| Message-ID | <60841514998436@frunobulax.edu> |
| In reply to | #1357 |
alberto pasquale <alberto@hal-pc.org> writes Re: made it to page 4 of gforth tutorial > On Apr 20, 2:27 pm, m...@iae.nl (Marcel Hendrix) wrote: [..] > This was a the end of a chapter teaching stack manipulation words, so > the solutions exemplify different stack usages. > In real life, the philosophy of Forth tells you that it is best to > solve as much of the problem as possible at compile time not at run > time so for a problem stated as: > Assignment: Write 17^3 and 17^4 in Forth, without writing 17 more than > once. > You write: > : Solution 4913 83521 ; > Zero multiplications, zero stack gymnastics and without writing 17 at all :) Unfortunately, not automatically clear, and still a colon definition. 4913 83521 2constant Solution FORTH> : Solution [ 17 dup square dup 1 m*/ ] 2literal ; ok Much clearer. FORTH> see Solution Flags: ANSI $01243400 : Solution $0124340A push $00001331 d# $0124340F push $00014641 d# $01243414 ; -marcel
[toc] | [prev] | [next] | [standalone]
| From | Marc Olschok <nobody@nowhere.invalid> |
|---|---|
| Date | 2011-04-26 16:40 +0000 |
| Message-ID | <ip6sii$bjr$1@news.albasani.net> |
| In reply to | #1357 |
alberto pasquale <alberto@hal-pc.org> wrote: >[...] > This was a the end of a chapter teaching stack manipulation words, so > the solutions exemplify different stack usages. > In real life, the philosophy of Forth tells you that it is best to > solve as much of the problem as possible at compile time not at run > time so for a problem stated as: > > Assignment: Write 17^3 and 17^4 in Forth, without writing 17 more > than > once. > > You write: > > : Solution 4913 83521 ; > > Zero multiplications, zero stack gymnastics and without writing 17 at > all :) > Mental calculation can be further reduced by rewriting it as hex 1331 14641 -- Marc
[toc] | [prev] | [next] | [standalone]
| From | Bernd Paysan <bernd.paysan@gmx.de> |
|---|---|
| Date | 2011-04-26 22:23 +0200 |
| Message-ID | <p6mj88-slk.ln1@vimes.paysan.nom> |
| In reply to | #1552 |
Marc Olschok wrote: > Mental calculation can be further reduced by rewriting it as > > hex 1331 14641 17 base ! 1000 10000 -- Bernd Paysan "If you want it done right, you have to do it yourself" http://www.jwdt.com/~paysan/
[toc] | [prev] | [next] | [standalone]
| From | Alex McDonald <blog@rivadpm.com> |
|---|---|
| Date | 2011-04-26 13:34 -0700 |
| Message-ID | <c81f23c5-249e-4d7b-b0cc-758c03721154@e8g2000vbz.googlegroups.com> |
| In reply to | #1560 |
On Apr 26, 9:23 pm, Bernd Paysan <bernd.pay...@gmx.de> wrote: > Marc Olschok wrote: > > Mental calculation can be further reduced by rewriting it as > > > hex 1331 14641 > > 17 base ! 1000 10000 > > -- > Bernd Paysan > "If you want it done right, you have to do it yourself"http://www.jwdt.com/~paysan/ Oh my. That's cool!
[toc] | [prev] | [next] | [standalone]
| From | anton@mips.complang.tuwien.ac.at (Anton Ertl) |
|---|---|
| Date | 2011-04-27 14:48 +0000 |
| Message-ID | <2011Apr27.164846@mips.complang.tuwien.ac.at> |
| In reply to | #1552 |
Marc Olschok <nobody@nowhere.invalid> writes:
>alberto pasquale <alberto@hal-pc.org> wrote:
>> Assignment: Write 17^3 and 17^4 in Forth, without writing 17 more
>> than
>> once.
...
>hex 1331 14641
In that vain, even easier (but also using features not known to the
students at the time, and missing the point):
decimal 17 base ! 1000 10000
- 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 2010: http://www.euroforth.org/ef10/
[toc] | [prev] | [next] | [standalone]
| From | Andrew Haley <andrew29@littlepinkcloud.invalid> |
|---|---|
| Date | 2011-04-21 04:07 -0500 |
| Message-ID | <Q-ydnelbZeZLbjLQnZ2dnUVZ7vSdnZ2d@supernews.com> |
| In reply to | #1355 |
Marcel Hendrix <mhx@iae.nl> wrote: > > In my view the solutions with R-stack manipulations are > definitely too big, obscure, and slow. All other solutions > are acceptable, so choose the least obscure one. For top marks, we can reject anything that does much stack manipulation, and anything that uses the R-stack when it's not necessary gets disqualified altogether. There is some merit, I suppose, to writing a word ^ , but IMO it's an over-generalized solution. This problem is all about minimizing stack manipulation. The best solution is the one that thrashes the stack the least, i.e. the one where the ratio of work done to pointlessly moving things around is the highest. So what is the minimum amount of stack thrashing? It's four DUPs: : cube ( n - n^3) dup dup * * ; ok 17 dup cube dup . * . 4913 83521 ok The only way to reduce this any further is with a 2DUP, but it's not an improvement: 17 dup 2dup * * dup . * . 4913 83521 ok Andrew.
[toc] | [prev] | [next] | [standalone]
Page 1 of 9 [1] 2 3 4 5 6 7 8 9 Next page →
Back to top | Article view | comp.lang.forth
csiph-web