Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #7710 > unrolled thread

Memoizing recursive words

Started byArnold Doray <thinksquared@gmail.com>
First post2011-12-03 19:07 +0000
Last post2011-12-08 03:37 -0600
Articles 20 on this page of 187 — 17 participants

Back to article view | Back to comp.lang.forth


Contents

  Memoizing recursive words Arnold Doray <thinksquared@gmail.com> - 2011-12-03 19:07 +0000
    Re: Memoizing recursive words "A. K." <akk@nospam.org> - 2011-12-04 13:21 +0100
      Re: Memoizing recursive words Arnold Doray <thinksquared@gmail.com> - 2011-12-04 14:20 +0000
        Re: Memoizing recursive words Josh Grams <josh@qualdan.com> - 2011-12-04 16:03 +0000
          Re: Memoizing recursive words "A. K." <akk@nospam.org> - 2011-12-04 17:25 +0100
          Re: Memoizing recursive words BruceMcF <agila61@netscape.net> - 2011-12-04 10:51 -0800
            Re: Memoizing recursive words "Elizabeth D. Rather" <erather@forth.com> - 2011-12-04 12:50 -1000
              Re: Memoizing recursive words BruceMcF <agila61@netscape.net> - 2011-12-04 15:40 -0800
          Re: Memoizing recursive words Arnold Doray <thinksquared@gmail.com> - 2011-12-05 11:17 +0000
        Re: Memoizing recursive words "Elizabeth D. Rather" <erather@forth.com> - 2011-12-04 08:24 -1000
          Re: Memoizing recursive words Arnold Doray <thinksquared@gmail.com> - 2011-12-04 19:14 +0000
            Re: Memoizing recursive words BruceMcF <agila61@netscape.net> - 2011-12-04 12:09 -0800
              Re: Memoizing recursive words Arnold Doray <thinksquared@gmail.com> - 2011-12-05 04:00 +0000
                Re: Memoizing recursive words BruceMcF <agila61@netscape.net> - 2011-12-07 12:41 -0800
    Re: Memoizing recursive words Andrew Haley <andrew29@littlepinkcloud.invalid> - 2011-12-05 11:04 -0600
      Re: Memoizing recursive words Arnold Doray <thinksquared@gmail.com> - 2011-12-06 07:24 +0000
        Re: Memoizing recursive words Andrew Haley <andrew29@littlepinkcloud.invalid> - 2011-12-06 04:02 -0600
      Re: Memoizing recursive words Arnold Doray <thinksquared@gmail.com> - 2011-12-06 08:03 +0000
        Re: Memoizing recursive words stephenXXX@mpeforth.com (Stephen Pelc) - 2011-12-06 10:46 +0000
          Re: Memoizing recursive words Andrew Haley <andrew29@littlepinkcloud.invalid> - 2011-12-06 04:54 -0600
            Re: Memoizing recursive words Hans Bezemer <thebeez@xs4all.nl> - 2011-12-08 00:08 +0100
          Re: Memoizing recursive words Arnold Doray <thinksquared@gmail.com> - 2011-12-06 12:36 +0000
            Re: Memoizing recursive words Andrew Haley <andrew29@littlepinkcloud.invalid> - 2011-12-06 10:28 -0600
              Re: Memoizing recursive words Arnold Doray <thinksquared@gmail.com> - 2011-12-06 16:32 +0000
                Re: Memoizing recursive words Andrew Haley <andrew29@littlepinkcloud.invalid> - 2011-12-06 10:40 -0600
                  Re: Memoizing recursive words Arnold Doray <thinksquared@gmail.com> - 2011-12-06 16:51 +0000
                    Re: Memoizing recursive words Andrew Haley <andrew29@littlepinkcloud.invalid> - 2011-12-06 12:03 -0600
                      Re: Memoizing recursive words Hans Bezemer <thebeez@xs4all.nl> - 2011-12-07 23:55 +0100
              Re: Memoizing recursive words Bernd Paysan <bernd.paysan@gmx.de> - 2011-12-07 01:06 +0100
                Re: Memoizing recursive words Andrew Haley <andrew29@littlepinkcloud.invalid> - 2011-12-07 03:37 -0600
                  Re: Memoizing recursive words stephenXXX@mpeforth.com (Stephen Pelc) - 2011-12-07 10:36 +0000
                    Re: Memoizing recursive words Andrew Haley <andrew29@littlepinkcloud.invalid> - 2011-12-07 06:23 -0600
                      Re: Memoizing recursive words stephenXXX@mpeforth.com (Stephen Pelc) - 2011-12-07 13:50 +0000
                        Re: Memoizing recursive words Andrew Haley <andrew29@littlepinkcloud.invalid> - 2011-12-07 11:49 -0600
                        Re: Memoizing recursive words anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2011-12-08 15:36 +0000
                          Re: Memoizing recursive words anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2011-12-08 16:15 +0000
                        Re: Memoizing recursive words Albert van der Horst <albert@spenarnc.xs4all.nl> - 2011-12-10 17:23 +0000
                          Re: Memoizing recursive words stephenXXX@mpeforth.com (Stephen Pelc) - 2011-12-10 17:34 +0000
                          Re: Memoizing recursive words Andrew Haley <andrew29@littlepinkcloud.invalid> - 2011-12-10 11:43 -0600
                    return address manipulation (was: Memoizing recursive words) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2011-12-07 13:29 +0000
                      Re: return address manipulation Andrew Haley <andrew29@littlepinkcloud.invalid> - 2011-12-07 11:55 -0600
                        Re: return address manipulation Bernd Paysan <bernd.paysan@gmx.de> - 2011-12-08 00:03 +0100
                          Re: return address manipulation BruceMcF <agila61@netscape.net> - 2011-12-07 15:11 -0800
                            Re: return address manipulation Bernd Paysan <bernd.paysan@gmx.de> - 2011-12-08 01:52 +0100
                              Re: return address manipulation Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2011-12-08 11:12 +0000
                                Re: return address manipulation Bernd Paysan <bernd.paysan@gmx.de> - 2011-12-08 18:04 +0100
                        Re: return address manipulation anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2011-12-08 15:51 +0000
                          Re: return address manipulation Andrew Haley <andrew29@littlepinkcloud.invalid> - 2011-12-08 12:17 -0600
                            Re: return address manipulation Andrew Haley <andrew29@littlepinkcloud.invalid> - 2011-12-13 13:07 -0600
                              Re: return address manipulation Alex McDonald <blog@rivadpm.com> - 2011-12-13 13:37 -0800
                                Re: return address manipulation Andrew Haley <andrew29@littlepinkcloud.invalid> - 2011-12-14 03:45 -0600
                                  Re: return address manipulation Alex McDonald <blog@rivadpm.com> - 2011-12-14 01:58 -0800
                                    Re: return address manipulation Andrew Haley <andrew29@littlepinkcloud.invalid> - 2011-12-14 04:09 -0600
                                      Re: return address manipulation "Elizabeth D. Rather" <erather@forth.com> - 2011-12-14 10:43 -1000
                              Re: return address manipulation Bernd Paysan <bernd.paysan@gmx.de> - 2011-12-14 14:08 +0100
                                Re: return address manipulation Andrew Haley <andrew29@littlepinkcloud.invalid> - 2011-12-14 09:18 -0600
                                  Re: return address manipulation Andrew Haley <andrew29@littlepinkcloud.invalid> - 2011-12-14 09:48 -0600
                                    Re: return address manipulation Bernd Paysan <bernd.paysan@gmx.de> - 2011-12-14 23:24 +0100
                                Quotations [Was: return address manipulation] Andrew Haley <andrew29@littlepinkcloud.invalid> - 2011-12-15 04:50 -0600
                                  Re: Quotations [Was: return address manipulation] BruceMcF <agila61@netscape.net> - 2011-12-15 07:45 -0800
                                  Re: Quotations [Was: return address manipulation] anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2011-12-15 15:48 +0000
                                    Re: Quotations [Was: return address manipulation] BruceMcF <agila61@netscape.net> - 2011-12-15 08:08 -0800
                                      Re: Quotations [Was: return address manipulation] Andrew Haley <andrew29@littlepinkcloud.invalid> - 2011-12-15 10:44 -0600
                                        Re: Quotations [Was: return address manipulation] BruceMcF <agila61@netscape.net> - 2011-12-15 09:07 -0800
                                          Re: Quotations [Was: return address manipulation] anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2011-12-15 17:16 +0000
                                            Re: Quotations [Was: return address manipulation] BruceMcF <agila61@netscape.net> - 2011-12-15 09:44 -0800
                                              Re: Quotations [Was: return address manipulation] anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2011-12-15 17:55 +0000
                                                Re: Quotations [Was: return address manipulation] BruceMcF <agila61@netscape.net> - 2011-12-15 10:13 -0800
                                                  Re: Quotations [Was: return address manipulation] anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2011-12-16 17:24 +0000
                                          Re: Quotations [Was: return address manipulation] Andrew Haley <andrew29@littlepinkcloud.invalid> - 2011-12-15 11:25 -0600
                                            Re: Quotations [Was: return address manipulation] BruceMcF <agila61@netscape.net> - 2011-12-15 09:40 -0800
                                              Re: Quotations [Was: return address manipulation] Andrew Haley <andrew29@littlepinkcloud.invalid> - 2011-12-15 12:11 -0600
                                                Re: Quotations [Was: return address manipulation] BruceMcF <agila61@netscape.net> - 2011-12-15 19:01 -0800
                                                  Re: Quotations [Was: return address manipulation] Andrew Haley <andrew29@littlepinkcloud.invalid> - 2011-12-16 03:14 -0600
                                                    Re: Quotations [Was: return address manipulation] BruceMcF <agila61@netscape.net> - 2011-12-16 07:54 -0800
                                                  Re: Quotations [Was: return address manipulation] anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2011-12-16 16:58 +0000
                                                    Re: Quotations [Was: return address manipulation] BruceMcF <agila61@netscape.net> - 2011-12-17 09:58 -0800
                                                      Re: Quotations [Was: return address manipulation] anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2011-12-19 14:36 +0000
                                                        Re: Quotations [Was: return address manipulation] BruceMcF <agila61@netscape.net> - 2011-12-19 12:49 -0800
                                                          Re: Quotations [Was: return address manipulation] Andrew Haley <andrew29@littlepinkcloud.invalid> - 2011-12-20 02:55 -0600
                                                            Re: Quotations [Was: return address manipulation] BruceMcF <agila61@netscape.net> - 2011-12-20 06:34 -0800
                                            Re: Quotations [Was: return address manipulation] BruceMcF <agila61@netscape.net> - 2011-12-15 10:22 -0800
                                              Re: Quotations [Was: return address manipulation] Andrew Haley <andrew29@littlepinkcloud.invalid> - 2011-12-15 12:44 -0600
                                              Re: Quotations [Was: return address manipulation] anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2011-12-16 17:27 +0000
                                        Re: Quotations [Was: return address manipulation] BruceMcF <agila61@netscape.net> - 2011-12-15 09:33 -0800
                                          Re: Quotations [Was: return address manipulation] Andrew Haley <andrew29@littlepinkcloud.invalid> - 2011-12-15 12:52 -0600
                                            Re: Quotations [Was: return address manipulation] BruceMcF <agila61@netscape.net> - 2011-12-15 11:07 -0800
                                              Re: Quotations [Was: return address manipulation] Andrew Haley <andrew29@littlepinkcloud.invalid> - 2011-12-16 03:16 -0600
                                                Re: Quotations [Was: return address manipulation] BruceMcF <agila61@netscape.net> - 2011-12-16 08:10 -0800
                                                  Re: Quotations [Was: return address manipulation] Andrew Haley <andrew29@littlepinkcloud.invalid> - 2011-12-16 12:38 -0600
                                                Re: Quotations [Was: return address manipulation] BruceMcF <agila61@netscape.net> - 2011-12-16 08:13 -0800
                                                  Re: Quotations [Was: return address manipulation] Andrew Haley <andrew29@littlepinkcloud.invalid> - 2011-12-16 12:43 -0600
                                              Re: Quotations [Was: return address manipulation] Sieur de Bienville <morrimichael@gmail.com> - 2011-12-17 15:35 -0800
                                                Re: Quotations [Was: return address manipulation] Roelf Toxopeus <rt4all@notthis.hetnet.nl> - 2011-12-19 20:40 +0100
                                                  Re: Quotations [Was: return address manipulation] Sieur de Bienville <morrimichael@gmail.com> - 2011-12-19 13:41 -0800
                                              Re: Quotations [Was: return address manipulation] Mark Wills <markrobertwills@yahoo.co.uk> - 2011-12-27 07:30 -0800
                                                Re: Quotations [Was: return address manipulation] anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2011-12-27 16:21 +0000
                                                  Re: Quotations [Was: return address manipulation] Bernd Paysan <bernd.paysan@gmx.de> - 2011-12-27 20:55 +0100
                                                    Re: Quotations [Was: return address manipulation] Andrew Haley <andrew29@littlepinkcloud.invalid> - 2011-12-27 14:42 -0600
                                                      Re: Quotations [Was: return address manipulation] Bernd Paysan <bernd.paysan@gmx.de> - 2011-12-27 22:58 +0100
                                                        Re: Quotations [Was: return address manipulation] Andrew Haley <andrew29@littlepinkcloud.invalid> - 2011-12-27 16:43 -0600
                                                      Re: Quotations [Was: return address manipulation] anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2011-12-30 12:00 +0000
                                                        Re: Quotations [Was: return address manipulation] Andrew Haley <andrew29@littlepinkcloud.invalid> - 2011-12-30 06:09 -0600
                                                          Re: Quotations [Was: return address manipulation] anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2011-12-30 13:23 +0000
                                                            Re: Quotations [Was: return address manipulation] Andrew Haley <andrew29@littlepinkcloud.invalid> - 2011-12-30 08:13 -0600
                                                              Re: Quotations [Was: return address manipulation] mhx@iae.nl (Marcel Hendrix) - 2011-12-30 16:48 +0200
                                                                Re: Quotations [Was: return address manipulation] Andrew Haley <andrew29@littlepinkcloud.invalid> - 2011-12-30 16:36 -0600
                                                                Re: Quotations [Was: return address manipulation] BruceMcF <agila61@netscape.net> - 2011-12-30 15:16 -0800
                                                                Re: Quotations [Was: return address manipulation] anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2011-12-31 14:00 +0000
                                                                Re: Quotations [Was: return address manipulation] Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-01-01 12:22 +0000
                                                                  Re: Quotations [Was: return address manipulation] Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-01-01 06:09 -0600
                                                                    Re: Quotations [Was: return address manipulation] mhx@iae.nl (Marcel Hendrix) - 2012-01-01 14:17 +0200
                                                                      Re: Quotations [Was: return address manipulation] Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-01-01 09:50 -0600
                                                                        Re: Quotations [Was: return address manipulation] Bernd Paysan <bernd.paysan@gmx.de> - 2012-01-01 18:15 +0100
                                                                          Re: Quotations [Was: return address manipulation] Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-01-01 11:48 -0600
                                                                        Re: Quotations [Was: return address manipulation] Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-01-02 11:19 +0000
                                                                  Re: Quotations [Was: return address manipulation] mhx@iae.nl (Marcel Hendrix) - 2012-01-01 14:02 +0200
                                                                    Re: Quotations [Was: return address manipulation] Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-01-01 09:37 -0600
                                                                    Re: Quotations [Was: return address manipulation] anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-01-02 14:30 +0000
                                                                    Re: Quotations [Was: return address manipulation] Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-01-03 13:28 +0000
                                                                  Re: Quotations [Was: return address manipulation] BruceMcF <agila61@netscape.net> - 2012-01-01 13:35 -0800
                                                                  Re: Quotations [Was: return address manipulation] anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-01-02 14:14 +0000
                                                                    Re: Quotations [Was: return address manipulation] Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-01-03 12:04 +0000
                                                              Re: Quotations [Was: return address manipulation] anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2011-12-31 14:19 +0000
                                                                Re: Quotations [Was: return address manipulation] Andrew Haley <andrew29@littlepinkcloud.invalid> - 2011-12-31 11:46 -0600
                                                                  Re: Quotations [Was: return address manipulation] anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-01-02 13:47 +0000
                                                                    Re: Quotations [Was: return address manipulation] Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-01-02 10:19 -0600
                                                                      Re: Quotations [Was: return address manipulation] anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-01-03 09:08 +0000
                                                                        Re: Quotations [Was: return address manipulation] Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-01-03 04:47 -0600
                                                                          Re: Quotations [Was: return address manipulation] anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-01-03 16:55 +0000
                                                                            Re: Quotations [Was: return address manipulation] Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-01-03 11:28 -0600
                                                                              Re: Quotations [Was: return address manipulation] anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-01-04 14:52 +0000
                                                                                Re: Quotations [Was: return address manipulation] Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-01-04 09:54 -0600
                                                                                  Re: Quotations [Was: return address manipulation] anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-01-04 17:28 +0000
                                                                                    Re: Quotations [Was: return address manipulation] Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-01-04 12:10 -0600
                                                                            Re: Quotations [Was: return address manipulation] BruceMcF <agila61@netscape.net> - 2012-01-03 10:09 -0800
                                                                              Re: Quotations [Was: return address manipulation] anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-01-04 17:14 +0000
                                                                                Re: Quotations [Was: return address manipulation] Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-01-04 11:26 -0600
                                                                                  Re: Quotations [Was: return address manipulation] anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-01-04 17:49 +0000
                                                                                    Re: Quotations [Was: return address manipulation] Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-01-04 12:11 -0600
                                                                                Re: Quotations [Was: return address manipulation] BruceMcF <agila61@netscape.net> - 2012-01-04 12:59 -0800
                                                                                  Re: Quotations [Was: return address manipulation] anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-01-05 16:46 +0000
                                                                        Re: Quotations [Was: return address manipulation] anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-01-03 16:34 +0000
                                                                          Re: Quotations [Was: return address manipulation] Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-01-03 11:40 -0600
                                                                            Re: Quotations [Was: return address manipulation] anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-01-04 15:03 +0000
                                                                              Re: Quotations [Was: return address manipulation] Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-01-04 12:01 -0600
                                                                          Re: Quotations [Was: return address manipulation] Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2012-01-04 21:02 +0000
                                                                            Re: Quotations [Was: return address manipulation] anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-01-05 16:38 +0000
                                                                              Re: Quotations [Was: return address manipulation] Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2012-01-07 14:27 +0000
                                                    Re: Quotations [Was: return address manipulation] anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2011-12-30 11:33 +0000
                                                    Re: Quotations [Was: return address manipulation] anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2011-12-30 11:53 +0000
                                            Re: Quotations [Was: return address manipulation] anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2011-12-16 17:18 +0000
                                              Re: Quotations [Was: return address manipulation] Andrew Haley <andrew29@littlepinkcloud.invalid> - 2011-12-16 13:16 -0600
                                                Re: Quotations [Was: return address manipulation] anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2011-12-19 15:01 +0000
                                    Re: Quotations [Was: return address manipulation] Andrew Haley <andrew29@littlepinkcloud.invalid> - 2011-12-15 10:40 -0600
                                      Re: Quotations [Was: return address manipulation] anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2011-12-22 16:21 +0000
                                        Re: Quotations [Was: return address manipulation] Andrew Haley <andrew29@littlepinkcloud.invalid> - 2011-12-22 11:40 -0600
                                          Re: Quotations [Was: return address manipulation] Andrew Haley <andrew29@littlepinkcloud.invalid> - 2011-12-26 13:01 -0600
                                            Re: Quotations [Was: return address manipulation] Andrew Haley <andrew29@littlepinkcloud.invalid> - 2011-12-27 03:54 -0600
                                    Re: Quotations [Was: return address manipulation] Bernd Paysan <bernd.paysan@gmx.de> - 2011-12-15 20:11 +0100
                              Quotations (was: return address manipulation) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2011-12-14 15:27 +0000
                                Re: Quotations Andrew Haley <andrew29@littlepinkcloud.invalid> - 2011-12-14 09:50 -0600
                                  Re: Quotations Bernd Paysan <bernd.paysan@gmx.de> - 2011-12-14 22:38 +0100
                                    Re: Quotations Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2011-12-14 23:03 +0000
                                    Re: Quotations anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2011-12-15 15:56 +0000
                          Re: return address manipulation stephenXXX@mpeforth.com (Stephen Pelc) - 2011-12-09 14:48 +0000
                            Re: return address manipulation anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2011-12-09 16:35 +0000
                              Re: return address manipulation BruceMcF <agila61@netscape.net> - 2011-12-09 10:18 -0800
                              Re: return address manipulation Andrew Haley <andrew29@littlepinkcloud.invalid> - 2011-12-09 12:36 -0600
                                Re: return address manipulation BruceMcF <agila61@netscape.net> - 2011-12-09 12:07 -0800
                                Re: return address manipulation anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2011-12-10 12:37 +0000
                                  Re: return address manipulation Andrew Haley <andrew29@littlepinkcloud.invalid> - 2011-12-10 11:49 -0600
                                    Re: return address manipulation BruceMcF <agila61@netscape.net> - 2011-12-10 10:06 -0800
                                      Re: return address manipulation Andrew Haley <andrew29@littlepinkcloud.invalid> - 2011-12-10 12:37 -0600
                                        Re: return address manipulation BruceMcF <agila61@netscape.net> - 2011-12-10 11:28 -0800
                              Re: return address manipulation "Elizabeth D. Rather" <erather@forth.com> - 2011-12-09 08:39 -1000
                                Re: return address manipulation anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2011-12-10 12:34 +0000
                                  Re: return address manipulation BruceMcF <agila61@netscape.net> - 2011-12-10 06:39 -0800
                                    Re: return address manipulation anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2011-12-11 11:30 +0000
            Re: Memoizing recursive words stephenXXX@mpeforth.com (Stephen Pelc) - 2011-12-06 17:18 +0000
              Re: Memoizing recursive words Arnold Doray <thinksquared@gmail.com> - 2011-12-07 14:30 +0000
                Re: Memoizing recursive words anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2011-12-07 15:33 +0000
                  Re: Memoizing recursive words Arnold Doray <thinksquared@gmail.com> - 2011-12-07 17:09 +0000
                    Re: Memoizing recursive words anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2011-12-07 17:26 +0000
        Re: Memoizing recursive words Andrew Haley <andrew29@littlepinkcloud.invalid> - 2011-12-07 12:08 -0600
          Re: Memoizing recursive words Arnold Doray <thinksquared@gmail.com> - 2011-12-08 00:05 +0000
            Re: Memoizing recursive words Andrew Haley <andrew29@littlepinkcloud.invalid> - 2011-12-08 03:37 -0600

Page 6 of 10 — ← Prev page 1 … 4 5 [6] 7 8 … 10  Next page →


#8381 — Re: Quotations [Was: return address manipulation]

FromAndrew Haley <andrew29@littlepinkcloud.invalid>
Date2011-12-27 16:43 -0600
SubjectRe: Quotations [Was: return address manipulation]
Message-ID<rd-dnYMWr6mZ12fTnZ2dnUVZ_jGdnZ2d@supernews.com>
In reply to#8378
Bernd Paysan <bernd.paysan@gmx.de> wrote:
> Andrew Haley wrote:
> 
>> I think we just have to agree that quotations aren't closures and
>> should not be thought of as closures.
> 
> And if we introduce Forth-style closures, they will have some more 
> explicit way to take their values.

Don't we already?  DOES> is surely pretty similar to a closure: a
binding of some code and some data.  Granted, it's not a dynamic
closure, but it fits in most other regards.

Andrew.

[toc] | [prev] | [next] | [standalone]


#8469 — Re: Quotations [Was: return address manipulation]

Fromanton@mips.complang.tuwien.ac.at (Anton Ertl)
Date2011-12-30 12:00 +0000
SubjectRe: Quotations [Was: return address manipulation]
Message-ID<2011Dec30.130013@mips.complang.tuwien.ac.at>
In reply to#8375
Andrew Haley <andrew29@littlepinkcloud.invalid> writes:
>I think we just have to agree that quotations aren't closures
>and should not be thought of as closures.

I think we agreed on that from the start, for ease of implementation,
not because it would cause any semantic difficulties.  Indeed it would
not cause any particular semantic difficulties.

- 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 2011: http://www.euroforth.org/ef11/

[toc] | [prev] | [next] | [standalone]


#8470 — Re: Quotations [Was: return address manipulation]

FromAndrew Haley <andrew29@littlepinkcloud.invalid>
Date2011-12-30 06:09 -0600
SubjectRe: Quotations [Was: return address manipulation]
Message-ID<eJednds93ZJkNGDTnZ2dnUVZ_qqdnZ2d@supernews.com>
In reply to#8469
Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote:
> Andrew Haley <andrew29@littlepinkcloud.invalid> writes:
>>I think we just have to agree that quotations aren't closures
>>and should not be thought of as closures.
> 
> I think we agreed on that from the start, for ease of implementation,
> not because it would cause any semantic difficulties.  Indeed it would
> not cause any particular semantic difficulties.

I don't think I agree.  There's the question of the lifetime of a
closure, and of whether the closure holds references to the locals in
enclosing scope or copies of their values, i.e. what the action of TO
on a captured local should be.

Andrew.

[toc] | [prev] | [next] | [standalone]


#8476 — Re: Quotations [Was: return address manipulation]

Fromanton@mips.complang.tuwien.ac.at (Anton Ertl)
Date2011-12-30 13:23 +0000
SubjectRe: Quotations [Was: return address manipulation]
Message-ID<2011Dec30.142318@mips.complang.tuwien.ac.at>
In reply to#8470
Andrew Haley <andrew29@littlepinkcloud.invalid> writes:
>Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote:
>> Andrew Haley <andrew29@littlepinkcloud.invalid> writes:
>>>I think we just have to agree that quotations aren't closures
>>>and should not be thought of as closures.
>> 
>> I think we agreed on that from the start, for ease of implementation,
>> not because it would cause any semantic difficulties.  Indeed it would
>> not cause any particular semantic difficulties.
>
>I don't think I agree.  There's the question of the lifetime of a
>closure

That's ease of implementation.  If we ignore that, we let the locals
live at least as long as they can be accessed, and possibly longer.

Actually, why worry about the lifetime at all, except for
implementation considerations?  Just let them live forever; the
accessability criterion follows from the as-if rule.

> and of whether the closure holds references to the locals in
>enclosing scope or copies of their values, i.e. what the action of TO
>on a captured local should be.

Why should it hold copies (apart from implementation considerations)?
Of course each instance of a local has only one location as far as
semantics are concerned.  If your implementation wants to make
additional copies, that's up to you, but you have to ensure correct
semantic operation.

- 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 2011: http://www.euroforth.org/ef11/

[toc] | [prev] | [next] | [standalone]


#8477 — Re: Quotations [Was: return address manipulation]

FromAndrew Haley <andrew29@littlepinkcloud.invalid>
Date2011-12-30 08:13 -0600
SubjectRe: Quotations [Was: return address manipulation]
Message-ID<tumdnX2UnehmW2DTnZ2dnUVZ_r2dnZ2d@supernews.com>
In reply to#8476
Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote:
> Andrew Haley <andrew29@littlepinkcloud.invalid> writes:
>>Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote:
>>> Andrew Haley <andrew29@littlepinkcloud.invalid> writes:
>>>>I think we just have to agree that quotations aren't closures
>>>>and should not be thought of as closures.
>>> 
>>> I think we agreed on that from the start, for ease of implementation,
>>> not because it would cause any semantic difficulties.  Indeed it would
>>> not cause any particular semantic difficulties.
>>
>>I don't think I agree.  There's the question of the lifetime of a
>>closure
> 
> That's ease of implementation.  If we ignore that, we let the locals
> live at least as long as they can be accessed, and possibly longer.
> 
> Actually, why worry about the lifetime at all, except for
> implementation considerations?  Just let them live forever; the
> accessability criterion follows from the as-if rule.
> 
>> and of whether the closure holds references to the locals in
>>enclosing scope or copies of their values, i.e. what the action of TO
>>on a captured local should be.
> 
> Why should it hold copies (apart from implementation considerations)?

I think it makes more sense.  It doesn't make any sense to have
multiple "locals" that refer to a single value.  In the definition of
locals, we have the specification "re-entrant and recursive".  This
property only holds if locals do not escape the word in which they're
defined.

If you really need a shared value, it's easy to make it a pointer to
memory.  I don't think that this is an implementation consideration,
it's a matter of what a program means.

(As an aside: We've been through this in Javaland during the
discussion of how lambdas should work, and come to the same
conclusion.  Admittedly the problem is particularly acute because Java
has threads, and you'd have the problem of a race condition if two
threads tried to access the same captured local.  If we had support
for threads in standard Forth we'd have the same problem.)

Andrew.

[toc] | [prev] | [next] | [standalone]


#8478 — Re: Quotations [Was: return address manipulation]

Frommhx@iae.nl (Marcel Hendrix)
Date2011-12-30 16:48 +0200
SubjectRe: Quotations [Was: return address manipulation]
Message-ID<90871905918436@frunobulax.edu>
In reply to#8477
Andrew Haley <andrew29@littlepinkcloud.invalid> writes Re: Quotations [Was: return address manipulation]

> Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote:
>> Andrew Haley <andrew29@littlepinkcloud.invalid> writes:
>>>Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote:
>>>> Andrew Haley <andrew29@littlepinkcloud.invalid> writes:
>>>>>I think we just have to agree that quotations aren't closures
>>>>>and should not be thought of as closures.

>>>> I think we agreed on that from the start, for ease of implementation,
>>>> not because it would cause any semantic difficulties.  Indeed it would
>>>> not cause any particular semantic difficulties.

>>>I don't think I agree.  There's the question of the lifetime of a
>>>closure

>> That's ease of implementation.  If we ignore that, we let the locals
>> live at least as long as they can be accessed, and possibly longer.
 
>> Actually, why worry about the lifetime at all, except for
>> implementation considerations?  Just let them live forever; the
>> accessability criterion follows from the as-if rule.
 
>>> and of whether the closure holds references to the locals in
>>>enclosing scope or copies of their values, i.e. what the action of TO
>>>on a captured local should be.
 
>> Why should it hold copies (apart from implementation considerations)?

> I think it makes more sense.  It doesn't make any sense to have
> multiple "locals" that refer to a single value.  In the definition of
> locals, we have the specification "re-entrant and recursive".  This
> property only holds if locals do not escape the word in which they're
> defined.
[..]

I have been ill for the past three weeks and couldn't think 
coherently since this quotation discussion started. 

As far as I understand, a quotation is an anonymous word ( :noname ) 
that can be called by any word that knows its xt. The only new thing 
here is that the :NONAME can be defined inline in a word being compiled 
(nested compilation). This is new because the Forth standard does not
allow nested compilation. 

I assume that an implementation will hoist the text of the quotation(s) 
outside the word being compiled and compiles it after the main definition 
has finished. Instead of the quotation's code "xt LITERAL" is compiled 
in the host word.

If this is true, there is no problem with accessing the locals of the
main colon definition -- these host local names are invisible 
to the :NONAME compiled lateron (or first). For the quotation to use
locals of the host word, their *value* must have been put on the stack 
before the :noname is called.  A quotation cannot use TO on the name
of a local in the host colon definition because that local's name is
simply unknown. 

Example:

\ This is legal and gives  66 154  (untested)
: test 22 11 0 locals| xt a b |
  [: + 2* ;] TO xt  a b xt execute .  
  33 44 xt execute . ;

\ .. and is equivalent to ( tested )
:noname  + 2* ; ( xt )
: test 22 11 locals| a b |
  ( xt) a b [ dup ] literal execute .  
  33 44 literal execute . ; ( not portable )

\ wrong would be: (untested)
: test 22 11 locals| a b |
  [: a b + 2* ;] >R  R@ execute .  
  33 TO a  44 TO b   R> execute . ;

Where is my misunderstanding?

-marcel

[toc] | [prev] | [next] | [standalone]


#8502 — Re: Quotations [Was: return address manipulation]

FromAndrew Haley <andrew29@littlepinkcloud.invalid>
Date2011-12-30 16:36 -0600
SubjectRe: Quotations [Was: return address manipulation]
Message-ID<l5adnduKochAoWPTnZ2dnUVZ_hmdnZ2d@supernews.com>
In reply to#8478
Marcel Hendrix <mhx@iae.nl> wrote:

> As far as I understand, a quotation is an anonymous word ( :noname ) 
> that can be called by any word that knows its xt. The only new thing 
> here is that the :NONAME can be defined inline in a word being compiled 
> (nested compilation). This is new because the Forth standard does not
> allow nested compilation. 

OK.

> I assume that an implementation will hoist the text of the quotation(s) 
> outside the word being compiled and compiles it after the main definition 
> has finished. Instead of the quotation's code "xt LITERAL" is compiled 
> in the host word.

I don't think that anyone has done it that way.  It sounds a little
bit more difficult, but it seems reasonable enough.

Andrew.

[toc] | [prev] | [next] | [standalone]


#8507 — Re: Quotations [Was: return address manipulation]

FromBruceMcF <agila61@netscape.net>
Date2011-12-30 15:16 -0800
SubjectRe: Quotations [Was: return address manipulation]
Message-ID<b5e9c145-9f54-4d5c-9d51-96f75942500a@24g2000yqi.googlegroups.com>
In reply to#8478
On Dec 30, 9:48 am, m...@iae.nl (Marcel Hendrix) wrote:

> I assume that an implementation will hoist the text of the
> quotation(s) outside the word being compiled and compiles
> it after the main definition has finished. Instead of the
> quotation's code "xt LITERAL" is compiled in the host word.

More direct would be to embed the definition in the word being
compiled with a branch over the embed. [: leaves an orig on the
control flow stack and ;] consumes it to resolve the branch and also
infer the xt which can be compiled as a literal after the EXIT from
the quotation has been compiled.

> If this is true, there is no problem with accessing the locals of the
> main colon definition -- these host local names are invisible
> to the :NONAME compiled lateron (or first). For the quotation to use
> locals of the host word, their *value* must have been put on the
> stack before the :noname is called.  A quotation cannot use TO on
> the name of a local in the host colon definition because that
> local's name is simply unknown.

Yes, that is the simplest. The closures don't come into it unless you
start to modify that name scoping for the LOCAL.

[toc] | [prev] | [next] | [standalone]


#8515 — Re: Quotations [Was: return address manipulation]

Fromanton@mips.complang.tuwien.ac.at (Anton Ertl)
Date2011-12-31 14:00 +0000
SubjectRe: Quotations [Was: return address manipulation]
Message-ID<2011Dec31.150053@mips.complang.tuwien.ac.at>
In reply to#8478
mhx@iae.nl (Marcel Hendrix) writes:
>As far as I understand, a quotation is an anonymous word ( :noname ) 
>that can be called by any word that knows its xt. The only new thing 
>here is that the :NONAME can be defined inline in a word being compiled 
>(nested compilation). This is new because the Forth standard does not
>allow nested compilation. 

Correct.

>I assume that an implementation will hoist the text of the quotation(s) 
>outside the word being compiled and compiles it after the main definition 
>has finished. Instead of the quotation's code "xt LITERAL" is compiled 
>in the host word.

That would be a valid implementation, but I think that most
implementations put the code of the quotation at the place in the
surrounding definition where it is defined, and the surrounding
definition branches around it, and puts the literal just before the
branch or just after the branch target.

>If this is true, there is no problem with accessing the locals of the
>main colon definition -- these host local names are invisible 
>to the :NONAME compiled lateron (or first). For the quotation to use
>locals of the host word, their *value* must have been put on the stack 
>before the :noname is called.  A quotation cannot use TO on the name
>of a local in the host colon definition because that local's name is
>simply unknown. 

The practical side is that we will simply not support accessing locals
of the surrounding definition within a quotation, just to make
implementation easy.

However, we are also leading an ivory-tower discussion on what it
would mean if we allowed it, and what the implications for the
implementation would be.

>\ wrong would be: (untested)
>: test 22 11 locals| a b |
>  [: a b + 2* ;] >R  R@ execute .  
>  33 TO a  44 TO b   R> execute . ;

This won't work on the existing and expected implementations.  Our
ivory-tower discussion is about how it should work if an
implementation accepts it.  But I think that all of the participants
agree that this case would be equivalent to your other variants; and I
guess you think so, too, because you produced this example.

The differences of opinion are for more complicated cases, like:

: foo {: n -- xt1 xt2 }
  [: n ;]
  [: TO n ;]
;

defer x
defer to-x

5 foo is to-x is x
x .
6 to-x
x .

I believe that the first "x ." should print 5 and the second "x ."
should print 6.

- 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 2011: http://www.euroforth.org/ef11/

[toc] | [prev] | [next] | [standalone]


#8548 — Re: Quotations [Was: return address manipulation]

FromAlbert van der Horst <albert@spenarnc.xs4all.nl>
Date2012-01-01 12:22 +0000
SubjectRe: Quotations [Was: return address manipulation]
Message-ID<lx4d1d.bfh@spenarnc.xs4all.nl>
In reply to#8478
In article <90871905918436@frunobulax.edu>, Marcel Hendrix <mhx@iae.nl> wrote:
<SNIP>
>
>I have been ill for the past three weeks and couldn't think
>coherently since this quotation discussion started.
>
>As far as I understand, a quotation is an anonymous word ( :noname )
>that can be called by any word that knows its xt. The only new thing
>here is that the :NONAME can be defined inline in a word being compiled
>(nested compilation). This is new because the Forth standard does not
>allow nested compilation.

There are essentially three ways to implement nested compilation:
1. compile a jump over the inserted code.
   ( I do that in getting not-yet-loaded words from a library)
2. remember the text and compile it later.
  ( That is a trick a use in my class  endclass definition)
3. More elegant is:
   compile to a scratch area
   once the definition is finished, copy it to its final place.

A direct benefit of 3 is that failed definitions will not enter
the dictionary. Once the mechanism to do 3 is in place,
it should be straightforward to add nesting.
It naturally supports multiple levels of nesting, something I
really don't expect from methods 1 and 2.

>
>-marcel
>

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]


#8551 — Re: Quotations [Was: return address manipulation]

FromAndrew Haley <andrew29@littlepinkcloud.invalid>
Date2012-01-01 06:09 -0600
SubjectRe: Quotations [Was: return address manipulation]
Message-ID<sd6dnS9i65-L0J3SnZ2dnUVZ_rGdnZ2d@supernews.com>
In reply to#8548
Albert van der Horst <albert@spenarnc.xs4all.nl> wrote:
> In article <90871905918436@frunobulax.edu>, Marcel Hendrix <mhx@iae.nl> wrote:
> <SNIP>
>>
>>I have been ill for the past three weeks and couldn't think
>>coherently since this quotation discussion started.
>>
>>As far as I understand, a quotation is an anonymous word ( :noname )
>>that can be called by any word that knows its xt. The only new thing
>>here is that the :NONAME can be defined inline in a word being compiled
>>(nested compilation). This is new because the Forth standard does not
>>allow nested compilation.
> 
> There are essentially three ways to implement nested compilation:
> 1. compile a jump over the inserted code.
>   ( I do that in getting not-yet-loaded words from a library)
> 2. remember the text and compile it later.
>  ( That is a trick a use in my class  endclass definition)

I don't think that would work.  You can't just scan forward until you
reach a ;] token because something like

 [: postpone ;] ;]

would break.

> 3. More elegant is:
>   compile to a scratch area
>   once the definition is finished, copy it to its final place.
> 
> A direct benefit of 3 is that failed definitions will not enter
> the dictionary. Once the mechanism to do 3 is in place,
> it should be straightforward to add nesting.
> It naturally supports multiple levels of nesting, something I
> really don't expect from methods 1 and 2.

Method 1 works perfectly well with multiple levels of nesting.
Why wouldn't it?  You saw the examples that were posted here.

Andrew.

[toc] | [prev] | [next] | [standalone]


#8555 — Re: Quotations [Was: return address manipulation]

Frommhx@iae.nl (Marcel Hendrix)
Date2012-01-01 14:17 +0200
SubjectRe: Quotations [Was: return address manipulation]
Message-ID<06188902028435@frunobulax.edu>
In reply to#8551
Andrew Haley <andrew29@littlepinkcloud.invalid> writes Re: Quotations [Was: return address manipulation]
[..]
> I don't think that would work.  You can't just scan forward until you
> reach a ;] token because something like

> [: postpone ;] ;]

> would break.

Do you consider ( broken?

: ) ." )" ; 
: hello  ( postpone ) ) ." hello" ;

-marcel

[toc] | [prev] | [next] | [standalone]


#8561 — Re: Quotations [Was: return address manipulation]

FromAndrew Haley <andrew29@littlepinkcloud.invalid>
Date2012-01-01 09:50 -0600
SubjectRe: Quotations [Was: return address manipulation]
Message-ID<OcadnWPpcIMwHZ3SnZ2dnUVZ_qudnZ2d@supernews.com>
In reply to#8555
Marcel Hendrix <mhx@iae.nl> wrote:
> Andrew Haley <andrew29@littlepinkcloud.invalid> writes Re: Quotations [Was: return address manipulation]
> [..]
>> I don't think that would work.  You can't just scan forward until you
>> reach a ;] token because something like
> 
>> [: postpone ;] ;]
> 
>> would break.
> 
> Do you consider ( broken?
> 
> : ) ." )" ; 
> : hello  ( postpone ) ) ." hello" ;

No, I don't think ( is broken.

[: looks like a similar case to ) , but I don't think it really is:
there is no good reason not to get this right.  [: should nest, and
POSTPONE ;] really should work.

I've posted a reference implementation (for SwiftForth) at

https://groups.google.com/group/comp.lang.forth/msg/4316e4d74781196d?hl=en
https://groups.google.com/group/comp.lang.forth/msg/376b37a10b0067a1?hl=en

and I'd be interested to discover how easy it is to add this feature
to other Forths.

Andrew.

[toc] | [prev] | [next] | [standalone]


#8563 — Re: Quotations [Was: return address manipulation]

FromBernd Paysan <bernd.paysan@gmx.de>
Date2012-01-01 18:15 +0100
SubjectRe: Quotations [Was: return address manipulation]
Message-ID<jdq4bv$chj$1@online.de>
In reply to#8561
Andrew Haley wrote:
> and I'd be interested to discover how easy it is to add this feature
> to other Forths.

Similarly easy.  Gforth's CVS repository has a quotation.fs, bigForth's 
svn repository has lambda.fs, and in the vfx-minos/VFXharness.fs there, 
I have a version for VFX Forth.

WRT to locals, these three implementations are somewhat different.  
Gforth's version hides the outer locals, so you can't accidently compile 
them (which would be of no use).  bigForth doesn't check this, but you 
can have your own locals within the lambda function.  In VFX Forth, I 
didn't care about locals at all.

-- 
Bernd Paysan
"If you want it done right, you have to do it yourself"
http://bernd-paysan.de/

[toc] | [prev] | [next] | [standalone]


#8564 — Re: Quotations [Was: return address manipulation]

FromAndrew Haley <andrew29@littlepinkcloud.invalid>
Date2012-01-01 11:48 -0600
SubjectRe: Quotations [Was: return address manipulation]
Message-ID<opudnWpA85YXAZ3SnZ2dnUVZ_gCdnZ2d@supernews.com>
In reply to#8563
Bernd Paysan <bernd.paysan@gmx.de> wrote:
> Andrew Haley wrote:
>> and I'd be interested to discover how easy it is to add this feature
>> to other Forths.
> 
> Similarly easy.  Gforth's CVS repository has a quotation.fs, bigForth's 
> svn repository has lambda.fs, and in the vfx-minos/VFXharness.fs there, 
> I have a version for VFX Forth.
> 
> WRT to locals, these three implementations are somewhat different.  
> Gforth's version hides the outer locals, so you can't accidently compile 
> them (which would be of no use).  bigForth doesn't check this, but you 
> can have your own locals within the lambda function.

Interesting, thanks.  The gforth version at
http://www.complang.tuwien.ac.at/viewcvs/cgi-bin/viewcvs.cgi/gforth/quotations.fs?rev=1.2&view=markup
is similar to the SwiftForth one I did.  It's interesting that despite
the differences in implementation of the Forths, essentially the same
technique can be used, although the details are inevitably different.

Andrew.

[toc] | [prev] | [next] | [standalone]


#8593 — Re: Quotations [Was: return address manipulation]

FromAlbert van der Horst <albert@spenarnc.xs4all.nl>
Date2012-01-02 11:19 +0000
SubjectRe: Quotations [Was: return address manipulation]
Message-ID<lx64sc.61g@spenarnc.xs4all.nl>
In reply to#8561
In article <OcadnWPpcIMwHZ3SnZ2dnUVZ_qudnZ2d@supernews.com>,
Andrew Haley  <andrew29@littlepinkcloud.invalid> wrote:
>Marcel Hendrix <mhx@iae.nl> wrote:
>> Andrew Haley <andrew29@littlepinkcloud.invalid> writes Re: Quotations [Was: return address manipulation]
>> [..]
>>> I don't think that would work.  You can't just scan forward until you
>>> reach a ;] token because something like
>>
>>> [: postpone ;] ;]
>>
>>> would break.
>>
>> Do you consider ( broken?
>>
>> : ) ." )" ;
>> : hello  ( postpone ) ) ." hello" ;
>
>No, I don't think ( is broken.

I don't think so. You need an end sentinel that is not
allowed as a word, or you are in endless trouble.
>
>[: looks like a similar case to ) , but I don't think it really is:
>there is no good reason not to get this right.  [: should nest, and
>POSTPONE ;] really should work.

My class endclass requires that you do not use the endsentinels
endclass and M; as a word.
Maybe I should introduce an error for this.

: endclass   45 ERROR ;
: M; 45 ERROR ;

Good idea, thanks!

>
>I've posted a reference implementation (for SwiftForth) at
>
>https://groups.google.com/group/comp.lang.forth/msg/4316e4d74781196d?hl=en
>https://groups.google.com/group/comp.lang.forth/msg/376b37a10b0067a1?hl=en
>
>and I'd be interested to discover how easy it is to add this feature
>to other Forths.

Groetjes Albert

>
>Andrew.


--
-- 
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]


#8554 — Re: Quotations [Was: return address manipulation]

Frommhx@iae.nl (Marcel Hendrix)
Date2012-01-01 14:02 +0200
SubjectRe: Quotations [Was: return address manipulation]
Message-ID<85018902028435@frunobulax.edu>
In reply to#8548
Albert van der Horst <albert@spenarnc.xs4all.nl> writes Re: Quotations [Was: return address manipulation]

> In article <90871905918436@frunobulax.edu>, Marcel Hendrix <mhx@iae.nl> wrote:
> <SNIP>
[..]
>>As far as I understand, a quotation is an anonymous word ( :noname )
>>that can be called by any word that knows its xt. The only new thing
>>here is that the :NONAME can be defined inline in a word being compiled
>>(nested compilation). This is new because the Forth standard does not
>>allow nested compilation.

Maybe I should stress that *my mental model* of a quotation is a 
completely independent :NONAME definition. I derive wanted / 
unwanted / expected characteristics from this mental model. 
Nobody has yet stated that my mental picture of a quotation 
is wrong. 

I do understand that most posters in this thread have other 
ideas what quotations should do, and try to find ways to tack them
on the :NONAME base. However, I have not seen convincing 
demonstrations of what such beefed-up quotations can do that 
is fantastic (quite to the contrary, even).

> There are essentially three ways to implement nested compilation:
> 1. compile a jump over the inserted code.
>   ( I do that in getting not-yet-loaded words from a library)

I find it interesting that compiling a word on your Forth has 
(apparently) zero related state stored in global variables. 
(Most posters here also step very lightly over this issue.) 
In your example it looks even more complicated to me, because 
your Forth seems to be effortlessly able to create a new 
dictionary header before a previous one is completely finished.  
How is this done?

An example problem when the Forth supports LOCALS| is that
a non-nested compile of :NONAME code with a branch around it 
(quite) probably gives the compiled code access to the 
surrounding locals (let alone what happens if the :noname 
defines its own locals), which is clearly not wanted (sorry,
I should say it does not match my mental picture).

> 2. remember the text and compile it later.
>  ( That is a trick a use in my class  endclass definition)

This looks OK to me as it avoids the compiler nesting issue 
completely. Of course the remembering should be re-entrant, 
but that is easily solved. There are special problems here, 
too -- like when BASE or the search order is manipulated 
in the main word or in the quotation.

> 3. More elegant is:
>   compile to a scratch area
>   once the definition is finished, copy it to its final place.

This only works when your colon compiler is already 
re-entrant. Moreover, compilation must deliver PIC. And copying 
looks far from elegant to me. Where would you copy it to? 
Why not leave it where it is?

> A direct benefit of 3 is that failed definitions will not enter
> the dictionary. Once the mechanism to do 3 is in place,
> it should be straightforward to add nesting.

With vigorous handwaving, sure :-)

> It naturally supports multiple levels of nesting, something I
> really don't expect from methods 1 and 2.

But your description of "getting not-yet-loaded words from a 
library" (method 1) clearly must support that a library word 
itself contains not-yet loaded words. So it should work on your 
system?

-marcel

PS: Happy Newyear to all! 

[toc] | [prev] | [next] | [standalone]


#8559 — Re: Quotations [Was: return address manipulation]

FromAndrew Haley <andrew29@littlepinkcloud.invalid>
Date2012-01-01 09:37 -0600
SubjectRe: Quotations [Was: return address manipulation]
Message-ID<Q5udnVH_k-I74J3SnZ2dnUVZ_sidnZ2d@supernews.com>
In reply to#8554
Marcel Hendrix <mhx@iae.nl> wrote:

> An example problem when the Forth supports LOCALS| is that a
> non-nested compile of :NONAME code with a branch around it (quite)
> probably gives the compiled code access to the surrounding locals
> (let alone what happens if the :noname defines its own locals),
> which is clearly not wanted (sorry, I should say it does not match
> my mental picture).

That would be wrong, IMO.  We've discussed this at length, and the
consensus is that a quotation should not have access to the locals in
the surrounding context, regardless of how it is implemented.

Andrew.

[toc] | [prev] | [next] | [standalone]


#8598 — Re: Quotations [Was: return address manipulation]

Fromanton@mips.complang.tuwien.ac.at (Anton Ertl)
Date2012-01-02 14:30 +0000
SubjectRe: Quotations [Was: return address manipulation]
Message-ID<2012Jan2.153051@mips.complang.tuwien.ac.at>
In reply to#8554
mhx@iae.nl (Marcel Hendrix) writes:
>Maybe I should stress that *my mental model* of a quotation is a 
>completely independent :NONAME definition. I derive wanted / 
>unwanted / expected characteristics from this mental model. 
>Nobody has yet stated that my mental picture of a quotation 
>is wrong. 
>
>I do understand that most posters in this thread have other 
>ideas what quotations should do

Apart from the ivory-tower closures discussion, not really.

>> There are essentially three ways to implement nested compilation:
>> 1. compile a jump over the inserted code.
>>   ( I do that in getting not-yet-loaded words from a library)
>
>I find it interesting that compiling a word on your Forth has 
>(apparently) zero related state stored in global variables. 

Gforth certainly has such state, and other Forth systems probably have
it, too.  "[:" just has to save that state and set it up for a new
definition, and ";]" has to restore it.

>In your example it looks even more complicated to me, because 
>your Forth seems to be effortlessly able to create a new 
>dictionary header before a previous one is completely finished.  
>How is this done?

Just save the necessary state, set up the state for the new
definition, and then start the new definition.  Requires a little
effort, but not much.

>An example problem when the Forth supports LOCALS| is that
>a non-nested compile of :NONAME code with a branch around it 
>(quite) probably gives the compiled code access to the 
>surrounding locals (let alone what happens if the :noname 
>defines its own locals), which is clearly not wanted (sorry,
>I should say it does not match my mental picture).

In Gforth that's relatively easy, because it manages the visible
locals in a linked list anyway; so just save the address of the first
local, and store 0 to the variable holding that address, and you get a
clean slate of locals:

   locals-list @  locals-list off

>PS: Happy Newyear to all! 

All the best to you and all, too!

- 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 2011: http://www.euroforth.org/ef11/

[toc] | [prev] | [next] | [standalone]


#8627 — Re: Quotations [Was: return address manipulation]

FromAlbert van der Horst <albert@spenarnc.xs4all.nl>
Date2012-01-03 13:28 +0000
SubjectRe: Quotations [Was: return address manipulation]
Message-ID<lx85ep.3uu@spenarnc.xs4all.nl>
In reply to#8554
In article <85018902028435@frunobulax.edu>, Marcel Hendrix <mhx@iae.nl> wrote:
>Albert van der Horst <albert@spenarnc.xs4all.nl> writes Re: Quotations [Was: return address manipulation]
<SNIP>
>
>
>> There are essentially three ways to implement nested compilation:
>> 1. compile a jump over the inserted code.
>>   ( I do that in getting not-yet-loaded words from a library)
>
>I find it interesting that compiling a word on your Forth has
>(apparently) zero related state stored in global variables.
>(Most posters here also step very lightly over this issue.)
>In your example it looks even more complicated to me, because
>your Forth seems to be effortlessly able to create a new
>dictionary header before a previous one is completely finished.

>How is this done?

In the following example you see CSP and DPL saved.
That is probably exaggerated.
There could be more, such as BASE. As my Forth is simple,
that is probably all.  The defining of NIP doesn't fool
around to much with BASE, but using the library via WANT
could.

At least it is transparent. There are no secret states to be
saved. If there is something clobbered it is something you
know and care about. If `` WANT NIP '' fails in the nesting,
it would fail in the same way as if it were in from of the
word `` test ''.

-----------------8<---------------
\ The following fails because NIP is a loaded extension
: test ." expect 1 3" 1 2 3 NIP .S ;

WANT NESTED-COMPILE

: test ." expect 1 3" 1 2 3
 SKIP [ (FORWARD
    CSP @ DPL @ UNLINK-LATEST
         : NIP SWAP DROP ;           \ WANT NIP here works too.
    LINK-LATEST DPL ! CSP !
 FORWARD) ]
 NIP .S ;

 test
-----------------8<---------------

UNLINK-LATEST leaves a dangling DEA on the stack that is
consumed by  LINK-LATEST .
These are system-dependant oneliners that manipulate a link field.

To get an idea about (FORWARD
: IF   POSTPONE 0BRANCH  (FORWARD ;  IMMEDIATE

This is the output of `` lina -a < testje.frt ''
-----------------8<---------------
pect 1 3" 1 2 3 NIP ? ciforth ERROR # 12 : NOT RECOGNIZED
expect 1 3
S[ 1 3 ]
-----------------8<---------------

Note the error (that is output on standard error) and an interpreter
that continues after the error.

>PS: Happy Newyear to all!

Keep on the good fight. Let's hope 2012 gives us some insight
how to evolve capitalism into something better.

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]


Page 6 of 10 — ← Prev page 1 … 4 5 [6] 7 8 … 10  Next page →

Back to top | Article view | comp.lang.forth


csiph-web