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


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

Stoked

Started byChris Curl <ccurl609@gmail.com>
First post2015-10-28 09:04 -0700
Last post2015-12-12 18:52 -0800
Articles 20 on this page of 174 — 27 participants

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


Contents

  Stoked Chris Curl <ccurl609@gmail.com> - 2015-10-28 09:04 -0700
    Re: Stoked Chris Curl <ccurl609@gmail.com> - 2015-10-28 09:18 -0700
      Re: Stoked rickman <gnuarm@gmail.com> - 2015-10-28 12:35 -0400
        Re: Stoked Chris Curl <ccurl609@gmail.com> - 2015-10-28 09:54 -0700
          Re: Stoked lehs <skydda.barnen@gmail.com> - 2015-10-28 10:35 -0700
          Re: Stoked Jason Damisch <jasondamisch@yahoo.com> - 2015-10-28 11:21 -0700
          Re: Stoked rickman <gnuarm@gmail.com> - 2015-10-28 14:24 -0400
            Re: Stoked Chris Curl <ccurl609@gmail.com> - 2015-10-28 13:12 -0700
              Re: Stoked rickman <gnuarm@gmail.com> - 2015-10-28 16:31 -0400
            Re: Stoked Chris Curl <ccurl609@gmail.com> - 2015-10-28 14:55 -0700
              Re: Stoked rickman <gnuarm@gmail.com> - 2015-10-29 01:36 -0400
            Re: Stoked Alfred Singlestone <vitonis@gmail.com> - 2015-10-30 06:01 -0700
              Re: Stoked rickman <gnuarm@gmail.com> - 2015-10-30 13:22 -0400
            Re: Stoked Marcos Cruz <use_the_contact_page@programandala.net> - 2015-11-07 17:50 +0000
              Re: Stoked rickman <gnuarm@gmail.com> - 2015-11-07 13:04 -0500
                Re: Stoked Paul Rubin <no.email@nospam.invalid> - 2015-11-07 10:19 -0800
                  Re: Stoked "Elizabeth D. Rather" <erather@forth.com> - 2015-11-07 08:29 -1000
                    Re: Stoked hughaguilar96@gmail.com - 2015-11-07 13:28 -0800
                    Re: Stoked Paul Rubin <no.email@nospam.invalid> - 2015-11-07 13:33 -0800
                      Re: Stoked rickman <gnuarm@gmail.com> - 2015-11-07 16:40 -0500
                        Re: Stoked Paul Rubin <no.email@nospam.invalid> - 2015-11-07 14:25 -0800
                          Re: Stoked rickman <gnuarm@gmail.com> - 2015-11-07 18:03 -0500
                            Re: Stoked Paul Rubin <no.email@nospam.invalid> - 2015-11-07 15:22 -0800
                              Re: Stoked rickman <gnuarm@gmail.com> - 2015-11-08 01:13 -0500
                                Re: Stoked Paul Rubin <no.email@nospam.invalid> - 2015-11-07 22:35 -0800
                                  Re: Stoked rickman <gnuarm@gmail.com> - 2015-11-08 01:58 -0500
                                    Re: Stoked Paul Rubin <no.email@nospam.invalid> - 2015-11-07 23:17 -0800
                                      Re: Stoked rickman <gnuarm@gmail.com> - 2015-11-08 02:49 -0500
                                        Re: Stoked Raimond Dragomir <raimond.dragomir@gmail.com> - 2015-11-08 00:06 -0800
                                        Re: Stoked Paul Rubin <no.email@nospam.invalid> - 2015-11-08 01:40 -0800
                                          Re: Stoked rickman <gnuarm@gmail.com> - 2015-11-08 15:18 -0500
                                            Re: Stoked Paul Rubin <no.email@nospam.invalid> - 2015-11-08 13:31 -0800
                                              Re: Stoked rickman <gnuarm@gmail.com> - 2015-11-08 17:19 -0500
                                                Re: Stoked Paul Rubin <no.email@nospam.invalid> - 2015-11-11 20:49 -0800
                                                  Re: Stoked rickman <gnuarm@gmail.com> - 2015-11-12 00:57 -0500
                                                    Re: Stoked hughaguilar96@gmail.com - 2015-11-11 22:24 -0800
                                                    Re: Stoked Paul Rubin <no.email@nospam.invalid> - 2015-11-11 23:34 -0800
                                                      Re: Stoked Raimond Dragomir <raimond.dragomir@gmail.com> - 2015-11-12 00:03 -0800
                                                        Re: Stoked Paul Rubin <no.email@nospam.invalid> - 2015-11-12 19:37 -0800
                                                      Re: Stoked rickman <gnuarm@gmail.com> - 2015-11-12 15:24 -0500
                                                        Re: Stoked Paul Rubin <no.email@nospam.invalid> - 2015-11-12 13:18 -0800
                                                          Re: Stoked rickman <gnuarm@gmail.com> - 2015-11-12 16:40 -0500
                                                            Re: Stoked Paul Rubin <no.email@nospam.invalid> - 2015-11-12 20:59 -0800
                                                              Re: Stoked rickman <gnuarm@gmail.com> - 2015-11-13 01:50 -0500
                                                                Re: Stoked Paul Rubin <no.email@nospam.invalid> - 2015-11-12 23:11 -0800
                                                          Re: Stoked forthisit@gmail.com - 2015-11-12 13:47 -0800
                                                            Re: Stoked Paul Rubin <no.email@nospam.invalid> - 2015-11-12 16:27 -0800
                                                          Re: Stoked "Elizabeth D. Rather" <erather@forth.com> - 2015-11-12 12:18 -1000
                                                            Re: Stoked Paul Rubin <no.email@nospam.invalid> - 2015-11-13 00:28 -0800
                                                    Re: Stoked "Elizabeth D. Rather" <erather@forth.com> - 2015-11-11 22:37 -1000
                                                      Re: Stoked hughaguilar96@gmail.com - 2015-11-12 23:37 -0800
                                              Re: Stoked Albert van der Horst <albert@spenarnc.xs4all.nl> - 2015-11-09 14:19 +0000
                                                Re: Stoked Lars Brinkhoff <lars.spam@nocrew.org> - 2015-11-23 07:47 +0100
                                                  Re: Stoked Albert van der Horst <albert@spenarnc.xs4all.nl> - 2015-11-23 11:27 +0000
                                                    Re: Stoked Lars Brinkhoff <lars.spam@nocrew.org> - 2015-11-23 13:43 +0100
                                            Re: Stoked "Elizabeth D. Rather" <erather@forth.com> - 2015-11-08 12:49 -1000
                                              Re: Stoked rickman <gnuarm@gmail.com> - 2015-11-08 19:20 -0500
                                      Re: Stoked "Elizabeth D. Rather" <erather@forth.com> - 2015-11-07 23:44 -1000
                                  Re: Stoked Albert van der Horst <albert@spenarnc.xs4all.nl> - 2015-11-08 18:23 +0000
                                    Re: Stoked Paul Rubin <no.email@nospam.invalid> - 2015-11-08 10:32 -0800
                                      Re: Stoked Albert van der Horst <albert@spenarnc.xs4all.nl> - 2015-11-08 18:45 +0000
                                        Re: Stoked Paul Rubin <no.email@nospam.invalid> - 2015-11-08 10:53 -0800
                                          Re: Stoked Albert van der Horst <albert@spenarnc.xs4all.nl> - 2015-11-08 21:25 +0000
                                            Re: Stoked Paul Rubin <no.email@nospam.invalid> - 2015-11-08 14:09 -0800
                                            Re: Stoked "Rod Pemberton" <boo@fasdfrewar.cdm> - 2015-11-09 05:32 -0500
                                              Re: Stoked Albert van der Horst <albert@spenarnc.xs4all.nl> - 2015-11-09 14:58 +0000
                                          Re: Stoked rickman <gnuarm@gmail.com> - 2015-11-08 23:42 -0500
                                            Re: Stoked Paul Rubin <no.email@nospam.invalid> - 2015-11-08 21:11 -0800
                                      Re: Stoked Lars Brinkhoff <lars.spam@nocrew.org> - 2015-11-15 12:50 +0100
                                Re: Stoked Raimond Dragomir <raimond.dragomir@gmail.com> - 2015-11-07 23:56 -0800
                                  Re: Stoked rickman <gnuarm@gmail.com> - 2015-11-08 03:24 -0500
                                    Re: Stoked Paul Rubin <no.email@nospam.invalid> - 2015-11-08 01:31 -0800
                                      Re: Stoked "Elizabeth D. Rather" <erather@forth.com> - 2015-11-07 23:57 -1000
                                        Re: Stoked Paul Rubin <no.email@nospam.invalid> - 2015-11-08 02:18 -0800
                                          Re: Stoked "Elizabeth D. Rather" <erather@forth.com> - 2015-11-08 08:33 -1000
                                          Re: Stoked rickman <gnuarm@gmail.com> - 2015-11-09 00:07 -0500
                                      Re: Stoked rickman <gnuarm@gmail.com> - 2015-11-08 23:49 -0500
                                        Re: Stoked Paul Rubin <no.email@nospam.invalid> - 2015-11-08 21:06 -0800
                                          Re: Stoked rickman <gnuarm@gmail.com> - 2015-11-09 00:20 -0500
                                            Re: Stoked Paul Rubin <no.email@nospam.invalid> - 2015-11-08 22:51 -0800
                                              Re: Stoked rickman <gnuarm@gmail.com> - 2015-11-09 02:22 -0500
                                            Re: Stoked Alfred Singlestone <vitonis@gmail.com> - 2015-11-10 04:32 -0800
                                              Re: Stoked Albert van der Horst <albert@spenarnc.xs4all.nl> - 2015-11-10 13:48 +0000
                                                Re: Stoked rickman <gnuarm@gmail.com> - 2015-11-10 16:17 -0500
                                                  Re: Stoked "Rod Pemberton" <boo@fasdfrewar.cdm> - 2015-11-10 17:26 -0500
                                          Re: Stoked "Elizabeth D. Rather" <erather@forth.com> - 2015-11-08 21:50 -1000
                                          Re: Stoked stephen@mpeforth.com (Stephen Pelc) - 2015-11-09 12:15 +0000
                                            Re: Stoked Albert van der Horst <albert@spenarnc.xs4all.nl> - 2015-11-09 15:09 +0000
                                            Re: Stoked Lars Brinkhoff <lars.spam@nocrew.org> - 2015-11-24 09:47 +0100
                                              Re: Stoked stephen@mpeforth.com (Stephen Pelc) - 2015-11-24 12:54 +0000
                                              Re: Stoked Lars Brinkhoff <lars.spam@nocrew.org> - 2015-11-24 15:03 +0100
                                                Emulating a 16-bit Forth Lars Brinkhoff <lars.spam@nocrew.org> - 2015-11-25 13:18 +0100
                                                  Re: Emulating a 16-bit Forth Lars Brinkhoff <lars.spam@nocrew.org> - 2015-11-25 14:08 +0100
                                          Re: Stoked Albert van der Horst <albert@spenarnc.xs4all.nl> - 2015-11-09 14:30 +0000
                                          Re: Stoked Bernd Linsel <bl1@gmx.com> - 2015-11-09 18:27 +0100
                                            Re: Stoked Paul Rubin <no.email@nospam.invalid> - 2015-11-10 00:50 -0800
                                  Re: Stoked "Elizabeth D. Rather" <erather@forth.com> - 2015-11-07 23:52 -1000
                            Re: Stoked "Elizabeth D. Rather" <erather@forth.com> - 2015-11-07 23:16 -1000
                          Re: Stoked "Elizabeth D. Rather" <erather@forth.com> - 2015-11-07 23:07 -1000
                          Re: Stoked Albert van der Horst <albert@spenarnc.xs4all.nl> - 2015-11-08 17:58 +0000
                      Re: Stoked "Elizabeth D. Rather" <erather@forth.com> - 2015-11-07 12:00 -1000
                  Re: Stoked Albert van der Horst <albert@spenarnc.xs4all.nl> - 2015-11-08 17:49 +0000
          Re: Stoked stephen@mpeforth.com (Stephen Pelc) - 2015-10-28 23:24 +0000
            Re: Stoked Jason Damisch <jasondamisch@yahoo.com> - 2015-10-28 17:30 -0700
            Re: Stoked Waldek Hebisch <hebisch@antispam.uni.wroc.pl> - 2015-10-29 02:40 +0000
              Re: Stoked stephen@mpeforth.com (Stephen Pelc) - 2015-10-29 10:11 +0000
            Re: Stoked Chris Curl <ccurl609@gmail.com> - 2015-10-28 21:07 -0700
              Re: Stoked Paul Rubin <no.email@nospam.invalid> - 2015-10-28 21:16 -0700
              Re: Stoked franck.bensusan@gmail.com - 2015-10-29 01:35 -0700
              Re: Stoked stephen@mpeforth.com (Stephen Pelc) - 2015-10-29 10:16 +0000
                Re: Stoked lehs <skydda.barnen@gmail.com> - 2015-10-29 03:35 -0700
                  Re: Stoked lehs <skydda.barnen@gmail.com> - 2015-10-29 03:48 -0700
            Re: Stoked mhx@iae.nl - 2015-10-29 11:31 -0700
              Re: Stoked Chris Curl <ccurl609@gmail.com> - 2015-10-29 12:01 -0700
                Re: Stoked Paul Rubin <no.email@nospam.invalid> - 2015-10-29 12:26 -0700
              Re: Stoked rickman <gnuarm@gmail.com> - 2015-10-29 15:29 -0400
                Re: Stoked mhx@iae.nl - 2015-10-29 13:27 -0700
                  Re: Stoked rickman <gnuarm@gmail.com> - 2015-10-29 16:48 -0400
                    Re: Stoked josv@planet.nl - 2015-10-29 14:58 -0700
                      Re: Stoked rickman <gnuarm@gmail.com> - 2015-10-30 01:36 -0400
                        Re: Stoked josv@planet.nl - 2015-10-30 04:34 -0700
                          Re: Stoked rickman <gnuarm@gmail.com> - 2015-10-30 13:28 -0400
                            Re: Stoked josv@planet.nl - 2015-10-30 12:05 -0700
                              Re: Stoked rickman <gnuarm@gmail.com> - 2015-10-30 15:32 -0400
                                Re: Stoked "Elizabeth D. Rather" <erather@forth.com> - 2015-10-30 18:53 -1000
                                  Re: Stoked josv@planet.nl - 2015-11-01 04:28 -0800
                                  Re: Stoked hughaguilar96@gmail.com - 2015-11-03 22:27 -0800
                    Re: Stoked mhx@iae.nl - 2015-10-29 16:47 -0700
                      Re: Stoked rickman <gnuarm@gmail.com> - 2015-10-30 01:33 -0400
                      Re: Stoked mhx@iae.nl - 2015-10-31 00:55 -0700
                  Re: Stoked stephen@mpeforth.com (Stephen Pelc) - 2015-10-30 11:52 +0000
                Re: Stoked josv@planet.nl - 2015-10-29 14:49 -0700
                Re: Stoked stephen@mpeforth.com (Stephen Pelc) - 2015-10-30 11:50 +0000
      Re: Stoked Hans Bezemer <the.beez.speaks@gmail.com> - 2015-10-28 18:39 +0100
        Re: Stoked Chris Curl <ccurl609@gmail.com> - 2015-10-28 11:11 -0700
          Re: Stoked Hans Bezemer <the.beez.speaks@gmail.com> - 2015-10-28 20:01 +0100
          Re: Stoked hughaguilar96@gmail.com - 2015-10-28 12:34 -0700
            Re: Stoked Chris Curl <ccurl609@gmail.com> - 2015-10-28 13:09 -0700
      Re: Stoked François <francois.ganza@wanadoo.fr> - 2015-10-28 15:25 -0700
        Re: Stoked Chris Curl <ccurl609@gmail.com> - 2015-10-28 21:01 -0700
          Re: Stoked "Rod Pemberton" <boo@fasdfrewar.cdm> - 2015-10-29 01:58 -0400
            Re: Stoked Raimond Dragomir <raimond.dragomir@gmail.com> - 2015-10-28 23:34 -0700
          Re: Stoked Lars Brinkhoff <lars.spam@nocrew.org> - 2015-10-29 08:56 +0100
      Re: Stoked "Rod Pemberton" <boo@fasdfrewar.cdm> - 2015-10-28 18:41 -0400
        Re: Stoked josv@planet.nl - 2015-10-29 05:28 -0700
        Re: Stoked "Rod Pemberton" <boo@fasdfrewar.cdm> - 2015-12-12 11:25 -0500
          Re: Stoked "Elizabeth D. Rather" <erather@forth.com> - 2015-12-12 08:43 -1000
            Re: Stoked hughaguilar96@gmail.com - 2015-12-16 13:45 -0800
              Re: Stoked hughaguilar96@gmail.com - 2015-12-17 10:26 -0800
          Re: Stoked Rob Sciuk <rob@controlq.com> - 2015-12-13 23:29 -0500
            Re: Stoked Raimond Dragomir <raimond.dragomir@gmail.com> - 2015-12-13 22:31 -0800
      Re: Stoked Paul Rubin <no.email@nospam.invalid> - 2015-10-28 15:52 -0700
        Re: Stoked anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-10-29 16:57 +0000
          Re: Stoked Paul Rubin <no.email@nospam.invalid> - 2015-10-29 12:36 -0700
            Re: Stoked anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-10-31 14:57 +0000
              Re: Stoked Bernd Paysan <bernd.paysan@gmx.de> - 2015-10-31 20:25 +0100
          Re: Stoked Paul Rubin <no.email@nospam.invalid> - 2015-11-03 20:39 -0800
      Re: Stoked Pablo Hugo Reda <pabloreda@gmail.com> - 2015-10-28 16:27 -0700
      Re: Stoked Alfred Singlestone <vitonis@gmail.com> - 2015-10-30 05:57 -0700
      Re: Stoked "HAA" <someone@microsoft.com> - 2015-11-02 13:15 +1100
        Re: Stoked François <francois.ganza@wanadoo.fr> - 2015-11-02 02:08 -0800
    Re: Stoked Paul Rubin <no.email@nospam.invalid> - 2015-10-28 09:28 -0700
      Re: Stoked Chris Curl <ccurl609@gmail.com> - 2015-10-28 09:37 -0700
        Re: Stoked Paul Rubin <no.email@nospam.invalid> - 2015-10-28 10:28 -0700
    Re: Stoked Chris Curl <ccurl609@gmail.com> - 2015-10-28 10:52 -0700
      Re: Stoked anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-10-28 18:14 +0000
    Re: Stoked François <francois.ganza@wanadoo.fr> - 2015-10-28 15:20 -0700
      Re: Stoked Chris Curl <ccurl609@gmail.com> - 2015-10-28 21:16 -0700
    Re: Stoked Chris Curl <ccurl609@gmail.com> - 2015-10-30 12:13 -0700
      Re: Stoked rickman <gnuarm@gmail.com> - 2015-10-30 15:34 -0400
    Re: Stoked Chris Curl <ccurl609@gmail.com> - 2015-11-07 13:57 -0800
      Re: Stoked rickman <gnuarm@gmail.com> - 2015-11-07 17:19 -0500
    Re: Stoked François <francois.ganza@wanadoo.fr> - 2015-11-09 00:10 -0800
    Re: Stoked Chris Curl <ccurl609@gmail.com> - 2015-12-12 18:52 -0800

Page 6 of 9 — ← Prev page 1 2 3 4 5 [6] 7 8 9  Next page →


#43328

From"Elizabeth D. Rather" <erather@forth.com>
Date2015-11-07 12:00 -1000
Message-ID<YMWdnedQr_Tu6aPLnZ2dnUU7-I-dnZ2d@supernews.com>
In reply to#43324
On 11/7/15 11:33 AM, Paul Rubin wrote:
> "Elizabeth D. Rather" <erather@forth.com> writes:
>>> if the features you want aren't in any existing Forth and have to be
>>> baked in from the beginning, rather than added on.
>> Such as?
>
> Each of these exists in at least one Forth, but I don't know of any
> Forth that combines all of them:
>
>      1. Being written entirely in Forth with no external dependencies,
>      instead of booting from assembler.
>
>      2. Being able to choose the cell size at build time, or maybe even
>      run time.
>
>      3. Separating the compiler and interpreter/VM such as for a tethered
>      system.
>
>      4. All FOSS.
>
>      5. Multitasker with async i/o behind the scenes, and memory
>      isolation between tasks.
>
> Maybe something like this could re-use parts of existing Forths but the
> differences would be deep enough that it wouldn't really be "adding on".

Doing all this as a DIY project for someone just learning Forth would be 
quite an undertaking! Far easier to start with a system that has as much 
of it as possible and then add/modify as needed.

Cheers,
Elizabeth

-- 
==================================================
Elizabeth D. Rather   (US & Canada)   800-55-FORTH
FORTH Inc.                         +1 310.999.6784
5959 West Century Blvd. Suite 700
Los Angeles, CA 90045
http://www.forth.com

"Forth-based products and Services for real-time
applications since 1973."
==================================================

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


#43373

FromAlbert van der Horst <albert@spenarnc.xs4all.nl>
Date2015-11-08 17:49 +0000
Message-ID<563f8b12$0$23800$e4fe514c@news.xs4all.nl>
In reply to#43316
Paul Rubin <no.email@nospam.invalid> writes:

>rickman <gnuarm@gmail.com> writes:
>> I find it hard to picture a situation where you would be better off
>> writing your own forth rather than modifying/extending one of the many
>> excellent forths out there.

>That is not always possible or practical, if the features you want
>aren't in any existing Forth and have to be baked in from the beginning,
>rather than added on.

Exactly. Mostly when I'm writing ciforth, I'm actually writing library
functions that are hard or unusable in other Forth's, or inaccessible
due to limited documentation, or orders of magnitude too complicated
because they are written in ISO Forth and try to work around missing
entitlements in the standard. Sometimes I'm adapting my Forth to make
additions easier, case in point may be an optimiser.
A missing entitlement can be finding the name that belongs to an xt.
Instead of saying : I want an environmental dependancy on a word
that find the name from an xt *that finds the name of a non-immediate
colon definition" some program their way to Rome via Melbourne.
In most Forth's such a word would be trivial supply,

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]


#42939

Fromstephen@mpeforth.com (Stephen Pelc)
Date2015-10-28 23:24 +0000
Message-ID<563157eb.287705779@news.eternal-september.org>
In reply to#42907
On Wed, 28 Oct 2015 09:54:17 -0700 (PDT), Chris Curl
<ccurl609@gmail.com> wrote:

>And while 6 seconds for about a billion instructions may be slow compared t=
>o other implementations, I think it is plenty fast enough for what I am usi=
>ng it for at the moment.

Well done for getting your Forth running - it's always a buzz when a 
new system says hello. Here's the detail for VFX Forth:

: test begin ?dup if 1 - else exit then again ;  ok

dis test 
TEST 
( 004CABB0    85DB )                  TEST      EBX, EBX
( 004CABB2    750B )                  JNZ/NE    004CABBF
( 004CABB4    8B5D00 )                MOV       EBX, [EBP]
( 004CABB7    8D6D04 )                LEA       EBP, [EBP+04]
( 004CABBA    E908000000 )            JMP       004CABC7
( 004CABBF    83C3FF )                ADD       EBX, -01
( 004CABC2    E901000000 )            JMP       004CABC8
( 004CABC7    C3 )                    NEXT,
( 004CABC8    EBE6 )                  JMP       004CABB0        TEST
( 004CABCA    C3 )                    NEXT,
( 27 bytes, 10 instructions )
 ok

ticks 100000000 test ticks swap - . 125

That's 0.125 seconds.

Writing Forth kernels is a hypnotic trap from which some people never
recover. Writing and maintaining a production-grade kernel that
supports what Forth programmers need is a horrifying business.

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]


#42941

FromJason Damisch <jasondamisch@yahoo.com>
Date2015-10-28 17:30 -0700
Message-ID<a5300acd-e430-4ccc-a607-14f1380bfb12@googlegroups.com>
In reply to#42939
On Wednesday, October 28, 2015 at 4:24:43 PM UTC-7, Stephen Pelc wrote:

> Writing Forth kernels is a hypnotic trap from which some people never
> recover. Writing and maintaining a production-grade kernel that
> supports what Forth programmers need is a horrifying business.

Fascinating...   What happens 20 years from now?  Are there young
whippersnappers willing to write a Forth?

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


#42943

FromWaldek Hebisch <hebisch@antispam.uni.wroc.pl>
Date2015-10-29 02:40 +0000
Message-ID<n0s0u6$h25$1@z-news.wcss.wroc.pl>
In reply to#42939
Stephen Pelc <stephen@mpeforth.com> wrote:
> On Wed, 28 Oct 2015 09:54:17 -0700 (PDT), Chris Curl
> <ccurl609@gmail.com> wrote:
> 
> >And while 6 seconds for about a billion instructions may be slow compared t=
> >o other implementations, I think it is plenty fast enough for what I am usi=
> >ng it for at the moment.
> 
> Well done for getting your Forth running - it's always a buzz when a 
> new system says hello. Here's the detail for VFX Forth:
> 
> : test begin ?dup if 1 - else exit then again ;  ok
> 
> dis test 
> TEST 
> ( 004CABB0    85DB )                  TEST      EBX, EBX
> ( 004CABB2    750B )                  JNZ/NE    004CABBF
> ( 004CABB4    8B5D00 )                MOV       EBX, [EBP]
> ( 004CABB7    8D6D04 )                LEA       EBP, [EBP+04]
> ( 004CABBA    E908000000 )            JMP       004CABC7
> ( 004CABBF    83C3FF )                ADD       EBX, -01
> ( 004CABC2    E901000000 )            JMP       004CABC8
> ( 004CABC7    C3 )                    NEXT,
> ( 004CABC8    EBE6 )                  JMP       004CABB0        TEST
> ( 004CABCA    C3 )                    NEXT,
> ( 27 bytes, 10 instructions )
>  ok
> 
> ticks 100000000 test ticks swap - . 125
> 
> That's 0.125 seconds.

I appreciate that to produce compiler giving such code took
significant effort.  However, as optimizing compiler this
is crappy: jump to jumps or to returns are classic things
to improve.  So just a single optimization would drop
3 instructions, including one in the loop.  Avoidng two
taken jumps per loop interation is another classic thing.
Also, there is no need to test after ADD: it already sets
flags, so when optimizing for speed one may create tighter
loop.


-- 
                              Waldek Hebisch

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


#42954

Fromstephen@mpeforth.com (Stephen Pelc)
Date2015-10-29 10:11 +0000
Message-ID<5631efe0.326606828@news.eternal-september.org>
In reply to#42943
On Thu, 29 Oct 2015 02:40:06 +0000 (UTC), Waldek Hebisch
<hebisch@antispam.uni.wroc.pl> wrote:

>I appreciate that to produce compiler giving such code took
>significant effort.  However, as optimizing compiler this
>is crappy: jump to jumps or to returns are classic things
>to improve.

Yes, it's not good on some code styles. However, compilation
speed is one of the design objectives. VFX will compile
1.2 million lines of source code in about a minute. Our
client with that much code wants a faster compiler more than
he wants a faster product.

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]


#42945

FromChris Curl <ccurl609@gmail.com>
Date2015-10-28 21:07 -0700
Message-ID<7ea31611-d70b-48de-9994-a35fe611e4fd@googlegroups.com>
In reply to#42939
On Wednesday, October 28, 2015 at 7:24:43 PM UTC-4, Stephen Pelc wrote:
> On Wed, 28 Oct 2015 09:54:17 -0700 (PDT), Chris Curl
> <...@gmail.com> wrote:
> 
> >And while 6 seconds for about a billion instructions may be slow compared t=
> >o other implementations, I think it is plenty fast enough for what I am usi=
> >ng it for at the moment.
> 
> Well done for getting your Forth running - it's always a buzz when a 
> new system says hello. Here's the detail for VFX Forth:
> 
> : test begin ?dup if 1 - else exit then again ;  ok
> 
> dis test 
> TEST 
> ( 004CABB0    85DB )                  TEST      EBX, EBX
> ( 004CABB2    750B )                  JNZ/NE    004CABBF
> ( 004CABB4    8B5D00 )                MOV       EBX, [EBP]
> ( 004CABB7    8D6D04 )                LEA       EBP, [EBP+04]
> ( 004CABBA    E908000000 )            JMP       004CABC7
> ( 004CABBF    83C3FF )                ADD       EBX, -01
> ( 004CABC2    E901000000 )            JMP       004CABC8
> ( 004CABC7    C3 )                    NEXT,
> ( 004CABC8    EBE6 )                  JMP       004CABB0        TEST
> ( 004CABCA    C3 )                    NEXT,
> ( 27 bytes, 10 instructions )
>  ok
> 
> ticks 100000000 test ticks swap - . 125
> 
> That's 0.125 seconds.
> 
> Writing Forth kernels is a hypnotic trap from which some people never
> recover. Writing and maintaining a production-grade kernel that
> supports what Forth programmers need is a horrifying business.
> 
> 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

how do you declare or set up the memory to be able to generate machine code on the fly?

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


#42947

FromPaul Rubin <no.email@nospam.invalid>
Date2015-10-28 21:16 -0700
Message-ID<87oafitikn.fsf@jester.gateway.sonic.net>
In reply to#42945
Chris Curl <ccurl609@gmail.com> writes:
> how do you declare or set up the memory to be able to generate machine
> code on the fly?

You might look at GNU Lightning:

   https://www.gnu.org/software/lightning/

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


#42952

Fromfranck.bensusan@gmail.com
Date2015-10-29 01:35 -0700
Message-ID<f5dd4009-4ab6-4d48-b58a-aa56ab248aec@googlegroups.com>
In reply to#42945
Le jeudi 29 octobre 2015 05:07:05 UTC+1, Chris Curl a écrit :
> On Wednesday, October 28, 2015 at 7:24:43 PM UTC-4, Stephen Pelc wrote:
> > On Wed, 28 Oct 2015 09:54:17 -0700 (PDT), Chris Curl
> > <...@gmail.com> wrote:
> > 
> > >And while 6 seconds for about a billion instructions may be slow compared t=
> > >o other implementations, I think it is plenty fast enough for what I am usi=
> > >ng it for at the moment.
> > 
> > Well done for getting your Forth running - it's always a buzz when a 
> > new system says hello. Here's the detail for VFX Forth:
> > 
> > : test begin ?dup if 1 - else exit then again ;  ok
> > 
> > dis test 
> > TEST 
> > ( 004CABB0    85DB )                  TEST      EBX, EBX
> > ( 004CABB2    750B )                  JNZ/NE    004CABBF
> > ( 004CABB4    8B5D00 )                MOV       EBX, [EBP]
> > ( 004CABB7    8D6D04 )                LEA       EBP, [EBP+04]
> > ( 004CABBA    E908000000 )            JMP       004CABC7
> > ( 004CABBF    83C3FF )                ADD       EBX, -01
> > ( 004CABC2    E901000000 )            JMP       004CABC8
> > ( 004CABC7    C3 )                    NEXT,
> > ( 004CABC8    EBE6 )                  JMP       004CABB0        TEST
> > ( 004CABCA    C3 )                    NEXT,
> > ( 27 bytes, 10 instructions )
> >  ok
> > 
> > ticks 100000000 test ticks swap - . 125
> > 
> > That's 0.125 seconds.
> > 
> > Writing Forth kernels is a hypnotic trap from which some people never
> > recover. Writing and maintaining a production-grade kernel that
> > supports what Forth programmers need is a horrifying business.
> > 
> > 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
> 
> how do you declare or set up the memory to be able to generate machine code on the fly?

Hi,

congratulations !

You can always generate native code on memory 
(after all, that is just a sequence of bytes).

After, it depends if you run on a particular OS or not.

On Windows, Linux, Mac OS, ... your memory page should
have an EXECUTE protection flag set. Otherwise you won't 
be able to jump or call an address where your code has been
generated.

On Windows, check VirtualAlloc & VirtualProtect functions.
On Linux based, check mmap and mprotect functions.

Enjoy :)

Franck

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


#42955

Fromstephen@mpeforth.com (Stephen Pelc)
Date2015-10-29 10:16 +0000
Message-ID<5631f147.326965584@news.eternal-september.org>
In reply to#42945
On Wed, 28 Oct 2015 21:07:03 -0700 (PDT), Chris Curl
<ccurl609@gmail.com> wrote:

>how do you declare or set up the memory to be able to generate machine code on the fly?

You need read, write and execute permissions. There are ways and means
to do this on all operating systems. However, real RAM doesn't know
about permissions, it just does as it's told.

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]


#42956

Fromlehs <skydda.barnen@gmail.com>
Date2015-10-29 03:35 -0700
Message-ID<2271607e-e3e5-40cd-a4b7-3be63de3c304@googlegroups.com>
In reply to#42955
Den torsdag 29 oktober 2015 kl. 11:16:00 UTC+1 skrev Stephen Pelc:
> On Wed, 28 Oct 2015 21:07:03 -0700 (PDT), Chris Curl
> <ccurl609@gmail.com> wrote:
> 
> >how do you declare or set up the memory to be able to generate machine code on the fly?
> 
> You need read, write and execute permissions. There are ways and means
> to do this on all operating systems. However, real RAM doesn't know
> about permissions, it just does as it's told.
> 
> 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

In SP-Forth you can store and run machine code in allocated memory. Since SP-Forth with optimize mode set (set-opt) is compiling machine code, it is possible to design an own core, letting SP-Forth do the coding, in a colon definition that load the core words to allocated memory and start running the new Forth system ending in your (high level) definition of quit... Or?

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


#42957

Fromlehs <skydda.barnen@gmail.com>
Date2015-10-29 03:48 -0700
Message-ID<a984b272-a816-40cb-a1f9-e3da50ae0f60@googlegroups.com>
In reply to#42956
Den torsdag 29 oktober 2015 kl. 11:35:38 UTC+1 skrev lehs:
> Den torsdag 29 oktober 2015 kl. 11:16:00 UTC+1 skrev Stephen Pelc:
> > On Wed, 28 Oct 2015 21:07:03 -0700 (PDT), Chris Curl
> > <ccurl609@gmail.com> wrote:
> > 
> > >how do you declare or set up the memory to be able to generate machine code on the fly?
> > 
> > You need read, write and execute permissions. There are ways and means
> > to do this on all operating systems. However, real RAM doesn't know
> > about permissions, it just does as it's told.
> > 
> > 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
> 
> In SP-Forth you can store and run machine code in allocated memory. Since SP-Forth with optimize mode set (set-opt) is compiling machine code, it is possible to design an own core, letting SP-Forth do the coding, in a colon definition that load the core words to allocated memory and start running the new Forth system ending in your (high level) definition of quit... Or?

It would be like just making an other Forth word, which when executing let you program in an other Forth in an other part of the memory. SP-Forth is free but is unfortunately only available in 32 bit for Windows.
____________________
Lehs
http://forthmath.blogspot.se
https://github.com/Lehs/BIG-INTEGER-ANS-FORTH

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


#42974

Frommhx@iae.nl
Date2015-10-29 11:31 -0700
Message-ID<e5f5c82d-8446-42ed-838b-da8d232ac285@googlegroups.com>
In reply to#42939
On Thursday, October 29, 2015 at 12:24:43 AM UTC+1, Stephen Pelc wrote:
[..]
> : test begin ?dup if 1 - else exit then again ;  ok
[..] 
> ticks 100000000 test ticks swap - . 125
> 
> That's 0.125 seconds.
[..]

Coding style DOES make a difference. The use of ?DUP and the
avoidance of WHILE REPEAT hurt:

FORTH> : test begin ?dup if 1 - else exit then again ;  ok
FORTH> timer-reset 1e8 f>s test .elapsed 0.313 seconds elapsed.
FORTH> : test begin dup if 1- else drop exit then again ;
FORTH> timer-reset 1e8 f>s test .elapsed 0.195 seconds elapsed. ok
FORTH> : test begin dup 0= if drop exit else 1- then again ;
FORTH> timer-reset 1e8 f>s test .elapsed 0.194 seconds elapsed. ok
FORTH> : test begin dup while 1- repeat drop ; 
FORTH> timer-reset 1e8 f>s test .elapsed 0.052 seconds elapsed. ok

(64 bit iForth, Windows 7, Intel(R) Core(TM) i7-4930K CPU @ 3.40GHz).

-marcel

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


#42975

FromChris Curl <ccurl609@gmail.com>
Date2015-10-29 12:01 -0700
Message-ID<91558bd8-6b1e-4a0a-a939-02d8b780875c@googlegroups.com>
In reply to#42974
On Thursday, October 29, 2015 at 2:31:42 PM UTC-4, m...@iae.nl wrote:
> Coding style DOES make a difference. The use of ?DUP and the
> avoidance of WHILE REPEAT hurt:
Good point ... This runs in about 1/2 the time:

: test begin dup if 1 - else drop exit then again ;

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


#42977

FromPaul Rubin <no.email@nospam.invalid>
Date2015-10-29 12:26 -0700
Message-ID<87k2q5tr1g.fsf@jester.gateway.sonic.net>
In reply to#42975
Chris Curl <ccurl609@gmail.com> writes:
> Good point ... This runs in about 1/2 the time:
> : test begin dup if 1 - else drop exit then again ;

Using do...loop or for...next would probably be faster still, but given
that the code does nothing useful, any of the versions are a reasonable
test.

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


#42978

Fromrickman <gnuarm@gmail.com>
Date2015-10-29 15:29 -0400
Message-ID<n0trvd$n12$1@dont-email.me>
In reply to#42974
On 10/29/2015 2:31 PM, mhx@iae.nl wrote:
> On Thursday, October 29, 2015 at 12:24:43 AM UTC+1, Stephen Pelc wrote:
> [..]
>> : test begin ?dup if 1 - else exit then again ;  ok
> [..]
>> ticks 100000000 test ticks swap - . 125
>>
>> That's 0.125 seconds.
> [..]
>
> Coding style DOES make a difference. The use of ?DUP and the
> avoidance of WHILE REPEAT hurt:
>
> FORTH> : test begin ?dup if 1 - else exit then again ;  ok
> FORTH> timer-reset 1e8 f>s test .elapsed 0.313 seconds elapsed.
> FORTH> : test begin dup if 1- else drop exit then again ;
> FORTH> timer-reset 1e8 f>s test .elapsed 0.195 seconds elapsed. ok
> FORTH> : test begin dup 0= if drop exit else 1- then again ;
> FORTH> timer-reset 1e8 f>s test .elapsed 0.194 seconds elapsed. ok
> FORTH> : test begin dup while 1- repeat drop ;
> FORTH> timer-reset 1e8 f>s test .elapsed 0.052 seconds elapsed. ok
>
> (64 bit iForth, Windows 7, Intel(R) Core(TM) i7-4930K CPU @ 3.40GHz).

How does this version compare to the while version?

: test begin dup 0= if drop exit then 1- again ;

-- 

Rick

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


#42980

Frommhx@iae.nl
Date2015-10-29 13:27 -0700
Message-ID<9e9c6415-26fd-4093-a89a-fb537f718505@googlegroups.com>
In reply to#42978
On Thursday, October 29, 2015 at 8:29:54 PM UTC+1, rickman wrote:
> On 10/29/2015 2:31 PM, mhx@iae.nl wrote:
> > On Thursday, October 29, 2015 at 12:24:43 AM UTC+1, Stephen Pelc wrote:
> > [..]
> >> : test begin ?dup if 1 - else exit then again ;  ok
> > [..]
> >> ticks 100000000 test ticks swap - . 125
> >>
> >> That's 0.125 seconds.
> > [..]
> >
> > Coding style DOES make a difference. The use of ?DUP and the
> > avoidance of WHILE REPEAT hurt:
> >
> > FORTH> : test begin ?dup if 1 - else exit then again ;  ok
> > FORTH> timer-reset 1e8 f>s test .elapsed 0.313 seconds elapsed.
> > FORTH> : test begin dup if 1- else drop exit then again ;
> > FORTH> timer-reset 1e8 f>s test .elapsed 0.195 seconds elapsed. ok
> > FORTH> : test begin dup 0= if drop exit else 1- then again ;
> > FORTH> timer-reset 1e8 f>s test .elapsed 0.194 seconds elapsed. ok
> > FORTH> : test begin dup while 1- repeat drop ;
> > FORTH> timer-reset 1e8 f>s test .elapsed 0.052 seconds elapsed. ok
> >
> > (64 bit iForth, Windows 7, Intel(R) Core(TM) i7-4930K CPU @ 3.40GHz).
> 
> How does this version compare to the while version?
> 
> : test begin dup 0= if drop exit then 1- again ;

iForth version 4.0.1782, generated 21:06:07, March 6, 2014.
x86_64 binary, native floating-point, extended precision.
Copyright 1996 - 2014 Marcel Hendrix.

FORTH> : test begin dup 0= if drop exit then 1- again ;  ok
FORTH> timer-reset 1e8 f>s test .elapsed 0.052 seconds elapsed. ok

Good catch!

-marcel

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


#42981

Fromrickman <gnuarm@gmail.com>
Date2015-10-29 16:48 -0400
Message-ID<n0u0jp$a1o$1@dont-email.me>
In reply to#42980
On 10/29/2015 4:27 PM, mhx@iae.nl wrote:
> On Thursday, October 29, 2015 at 8:29:54 PM UTC+1, rickman wrote:
>> On 10/29/2015 2:31 PM, mhx@iae.nl wrote:
>>> On Thursday, October 29, 2015 at 12:24:43 AM UTC+1, Stephen Pelc wrote:
>>> [..]
>>>> : test begin ?dup if 1 - else exit then again ;  ok
>>> [..]
>>>> ticks 100000000 test ticks swap - . 125
>>>>
>>>> That's 0.125 seconds.
>>> [..]
>>>
>>> Coding style DOES make a difference. The use of ?DUP and the
>>> avoidance of WHILE REPEAT hurt:
>>>
>>> FORTH> : test begin ?dup if 1 - else exit then again ;  ok
>>> FORTH> timer-reset 1e8 f>s test .elapsed 0.313 seconds elapsed.
>>> FORTH> : test begin dup if 1- else drop exit then again ;
>>> FORTH> timer-reset 1e8 f>s test .elapsed 0.195 seconds elapsed. ok
>>> FORTH> : test begin dup 0= if drop exit else 1- then again ;
>>> FORTH> timer-reset 1e8 f>s test .elapsed 0.194 seconds elapsed. ok
>>> FORTH> : test begin dup while 1- repeat drop ;
>>> FORTH> timer-reset 1e8 f>s test .elapsed 0.052 seconds elapsed. ok
>>>
>>> (64 bit iForth, Windows 7, Intel(R) Core(TM) i7-4930K CPU @ 3.40GHz).
>>
>> How does this version compare to the while version?
>>
>> : test begin dup 0= if drop exit then 1- again ;
>
> iForth version 4.0.1782, generated 21:06:07, March 6, 2014.
> x86_64 binary, native floating-point, extended precision.
> Copyright 1996 - 2014 Marcel Hendrix.
>
> FORTH> : test begin dup 0= if drop exit then 1- again ;  ok
> FORTH> timer-reset 1e8 f>s test .elapsed 0.052 seconds elapsed. ok

I guess it all depends on what code the tools generate, but this might 
be shorter yet since it should only have one branch in the loop.

: inner begin 1- dup 0= until ;

: test dup if inner then drop ;

-- 

Rick

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


#42984

Fromjosv@planet.nl
Date2015-10-29 14:58 -0700
Message-ID<075403c4-c562-4633-ba3e-4e1afcaeb073@googlegroups.com>
In reply to#42981
Indeed:
: inner begin 1- dup 0= until ;
: test5 dup if inner then drop ;
cr 100000000 time-reset test5 .elapsed
\s Elapsed time: 00:00:00.296 ok
Jos

On 29 oktober 2015 21:49:02 UTC+1 rickman wrote:
> I guess it all depends on what code the tools generate, but this might 
> be shorter yet since it should only have one branch in the loop.
> 
> : inner begin 1- dup 0= until ;
> 
> : test dup if inner then drop ;
> 
> -- 
> 
> Rick

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


#42989

Fromrickman <gnuarm@gmail.com>
Date2015-10-30 01:36 -0400
Message-ID<n0uvgl$2ba$1@dont-email.me>
In reply to#42984
On 10/29/2015 5:58 PM, josv@planet.nl wrote:
> Indeed:
> : inner begin 1- dup 0= until ;
> : test5 dup if inner then drop ;
> cr 100000000 time-reset test5 .elapsed
> \s Elapsed time: 00:00:00.296 ok
> Jos
>
> On 29 oktober 2015 21:49:02 UTC+1 rickman wrote:
>> I guess it all depends on what code the tools generate, but this might
>> be shorter yet since it should only have one branch in the loop.
>>
>> : inner begin 1- dup 0= until ;
>>
>> : test dup if inner then drop ;
>>
>> --
>>
>> Rick

Interesting.  The speedup was not as large as Marcel's system produced. 
  In his case this code was about twice as fast.  Here the speedup was 
about 10%.  Can you show the code produced?

-- 

Rick

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


Page 6 of 9 — ← Prev page 1 2 3 4 5 [6] 7 8 9  Next page →

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


csiph-web