Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

But it does move! -- Galileo Galilei


devel / comp.lang.forth / Avoiding processor penalty by KISS and no sugar

SubjectAuthor
* Avoiding processor penalty by KISS and no sugarS Jack
+* Re: Avoiding processor penalty by KISS and no sugarS Jack
|`* Re: Avoiding processor penalty by KISS and no sugarUlrich Hoffmann
| +* Re: Avoiding processor penalty by KISS and no sugarS Jack
| |+* Re: Avoiding processor penalty by KISS and no sugardxforth
| ||`* Re: Avoiding processor penalty by KISS and no sugarS Jack
| || +- Re: Avoiding processor penalty by KISS and no sugarBranimir Maksimovic
| || `* Re: Avoiding processor penalty by KISS and no sugardxforth
| ||  `* Re: Avoiding processor penalty by KISS and no sugarS Jack
| ||   `- Re: Avoiding processor penalty by KISS and no sugarS Jack
| |`* Re: Avoiding processor penalty by KISS and no sugarUlrich Hoffmann
| | +- Re: Avoiding processor penalty by KISS and no sugarRuvim
| | +- Re: Avoiding processor penalty by KISS and no sugarS Jack
| | `* Re: Avoiding processor penalty by KISS and no sugarS Jack
| |  +* Re: Avoiding processor penalty by KISS and no sugardxforth
| |  |`- Re: Avoiding processor penalty by KISS and no sugarS Jack
| |  +* Re: Avoiding processor penalty by KISS and no sugarAnton Ertl
| |  |`- Re: Avoiding processor penalty by KISS and no sugarS Jack
| |  `* Re: Avoiding processor penalty by KISS and no sugarminf...@arcor.de
| |   +* Re: Avoiding processor penalty by KISS and no sugarBranimir Maksimovic
| |   |`* Re: Avoiding processor penalty by KISS and no sugardxforth
| |   | +- Re: Avoiding processor penalty by KISS and no sugarBranimir Maksimovic
| |   | `* Re: Avoiding processor penalty by KISS and no sugarPaul Rubin
| |   |  `* Re: Avoiding processor penalty by KISS and no sugardxforth
| |   |   `* Re: Avoiding processor penalty by KISS and no sugarPaul Rubin
| |   |    +* Re: Avoiding processor penalty by KISS and no sugardxforth
| |   |    |`* Re: Avoiding processor penalty by KISS and no sugarPaul Rubin
| |   |    | `- Re: Avoiding processor penalty by KISS and no sugardxforth
| |   |    `* Re: Avoiding processor penalty by KISS and no sugarAnton Ertl
| |   |     `- Re: Avoiding processor penalty by KISS and no sugardxforth
| |   `- Re: Avoiding processor penalty by KISS and no sugarS Jack
| `* Re: Avoiding processor penalty by KISS and no sugarS Jack
|  +- Re: Avoiding processor penalty by KISS and no sugarS Jack
|  `- Re: Avoiding processor penalty by KISS and no sugarBranimir Maksimovic
`* Re: Avoiding processor penalty by KISS and no sugarBranimir Maksimovic
 `- Re: Avoiding processor penalty by KISS and no sugarS Jack

Pages:12
Avoiding processor penalty by KISS and no sugar

<87464ea5-5426-4024-a5b9-5a816cdf5dd9n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=14798&group=comp.lang.forth#14798

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:ac8:57d0:: with SMTP id w16mr14866783qta.96.1633111495282;
Fri, 01 Oct 2021 11:04:55 -0700 (PDT)
X-Received: by 2002:a05:6214:2e2:: with SMTP id h2mr7883529qvu.13.1633111495106;
Fri, 01 Oct 2021 11:04:55 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Fri, 1 Oct 2021 11:04:54 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:3f7a:20d0:e1d5:31c6:358e:a503;
posting-account=V5nGoQoAAAC_P2U0qnxm2kC0s1jNJXJa
NNTP-Posting-Host: 2600:1700:3f7a:20d0:e1d5:31c6:358e:a503
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <87464ea5-5426-4024-a5b9-5a816cdf5dd9n@googlegroups.com>
Subject: Avoiding processor penalty by KISS and no sugar
From: sdwjac...@gmail.com (S Jack)
Injection-Date: Fri, 01 Oct 2021 18:04:55 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 49
 by: S Jack - Fri, 1 Oct 2021 18:04 UTC

( New thread from "Show human-readable time" )

FORGET and MARKER work ok for out-of-flow data but out-of-flow :NONAME
can have problems. The out-of-flow noname was being used for quotation.
The problem with out-of-flow noname has to do with it's being in link
with other dicitionary words. The following uses un-linked anonymous
code in place of noname and as can be seen there is no problem with
FORGET. When FOO is forgotten, memory is reclaimed up to the last
linked word BAR. All out-of-flow data and code was in-between BAR and
FOO so they were also removed as desired.

Notes:
1. The headless value previous name XVAR was renamed VAL,
2. The compiling register %R1 and %R2 were replace with two
standard compliant words [PARM0] and [PARM1] and
standard values named PARM0 and PARM1. These new compliant
words perform the same as compiling registers.

The run (as echoed):

\ Couple of parameter holders for compiling
0 value PARM0 \ hold a parameter
0 value PARM1 \ hold a parameter
: [PARM0] PARM0 COMPILE, ; IMMEDIATE \ compile parameter
: [PARM1] PARM1 COMPILE, ; IMMEDIATE \ compile parameter

: bar ." BAR " ;

HERE ," Today's date is " VAL, to PARM0 \ string data
HERE ," date" VAL, to PARM1 \ string data
DOCOL , HERE ] [PARM1] TRY /SYS THROW EXIT [ to PARM1 \ code ~ quotation
: FOO SPACE [PARM0] COUNT TYPE [PARM1] ;

FOO Today's date is Fri 01 Oct 2021 12:06:30 PM CDT

' FOO forget
latest space id. bar
+echo

Recap:
The goal was to move data and quotation code out of program flow of
the parent word to avoid processor penalty.

By placing out-of-flow data and code before the parent word and leaving them
un-linked FORGET and MARKER (not shown here) are able to perform
without modification.
--
me

Re: Avoiding processor penalty by KISS and no sugar

<f9ef8022-6fbd-4548-86b7-27d63b688718n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=14800&group=comp.lang.forth#14800

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a37:ab15:: with SMTP id u21mr11096302qke.394.1633115240041;
Fri, 01 Oct 2021 12:07:20 -0700 (PDT)
X-Received: by 2002:ac8:7948:: with SMTP id r8mr15325419qtt.360.1633115239852;
Fri, 01 Oct 2021 12:07:19 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Fri, 1 Oct 2021 12:07:19 -0700 (PDT)
In-Reply-To: <87464ea5-5426-4024-a5b9-5a816cdf5dd9n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:3f7a:20d0:e1d5:31c6:358e:a503;
posting-account=V5nGoQoAAAC_P2U0qnxm2kC0s1jNJXJa
NNTP-Posting-Host: 2600:1700:3f7a:20d0:e1d5:31c6:358e:a503
References: <87464ea5-5426-4024-a5b9-5a816cdf5dd9n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <f9ef8022-6fbd-4548-86b7-27d63b688718n@googlegroups.com>
Subject: Re: Avoiding processor penalty by KISS and no sugar
From: sdwjac...@gmail.com (S Jack)
Injection-Date: Fri, 01 Oct 2021 19:07:20 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 24
 by: S Jack - Fri, 1 Oct 2021 19:07 UTC

On Friday, October 1, 2021 at 1:04:56 PM UTC-5, S Jack wrote:

To make previous example a little clearer
1. defined the following to remove word clutter:
: {{ DOCOL , HERE ] ;
: }} POSTPONE EXIT POSTPONE [ ; IMMEDIATE

2. Moved the catch/throw to the parent word (note that a VAL,
was then added to the quotation)
Being able to catch un-named code phrase is probably
the main driver for having quotations in Forth.
(
I'm not promoting quotations; I'm just dealing with it.
Give a concept a name and people get goofy with it.
)
HERE ," Today's date is " VAL, to PARM0
HERE ," date" VAL, to PARM1
{{ [PARM1] /SYS }} VAL, to PARM1
: FOO SPACE [PARM0] COUNT TYPE [PARM1] CATCH THROW ;

FOO Today's date is Fri 01 Oct 2021 02:02:03 PM CDT

--
me

Re: Avoiding processor penalty by KISS and no sugar

<7sJ5J.50387$3p3.9138@fx16.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=14801&group=comp.lang.forth#14801

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!aioe.org!feeder5.feed.usenet.farm!feeder1.feed.usenet.farm!feed.usenet.farm!peer03.ams4!peer.am4.highwinds-media.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx16.iad.POSTED!not-for-mail
Newsgroups: comp.lang.forth
From: branimir...@icloud.com (Branimir Maksimovic)
Subject: Re: Avoiding processor penalty by KISS and no sugar
References: <87464ea5-5426-4024-a5b9-5a816cdf5dd9n@googlegroups.com>
User-Agent: slrn/1.0.3 (Darwin)
Lines: 40
Message-ID: <7sJ5J.50387$3p3.9138@fx16.iad>
X-Complaints-To: abuse@usenet-news.net
NNTP-Posting-Date: Fri, 01 Oct 2021 19:37:39 UTC
Organization: usenet-news.net
Date: Fri, 01 Oct 2021 19:37:39 GMT
X-Received-Bytes: 1802
 by: Branimir Maksimovic - Fri, 1 Oct 2021 19:37 UTC

On 2021-10-01, S Jack <sdwjack69@gmail.com> wrote:
> ( New thread from "Show human-readable time" )
>
> 0 value PARM0 \ hold a parameter
> 0 value PARM1 \ hold a parameter
>: [PARM0] PARM0 COMPILE, ; IMMEDIATE \ compile parameter
>: [PARM1] PARM1 COMPILE, ; IMMEDIATE \ compile parameter
>
>: bar ." BAR " ;
>
> HERE ," Today's date is " VAL, to PARM0 \ string data
> HERE ," date" VAL, to PARM1 \ string data
> DOCOL , HERE ] [PARM1] TRY /SYS THROW EXIT [ to PARM1 \ code ~ quotation
>: FOO SPACE [PARM0] COUNT TYPE [PARM1] ;
>
> FOO Today's date is Fri 01 Oct 2021 12:06:30 PM CDT
>

You should provide definitions for non standard words, I don't have
extensions...
>
> ' FOO forget
> latest space id. bar
> +echo
>
> Recap:
> The goal was to move data and quotation code out of program flow of
> the parent word to avoid processor penalty.
>
> By placing out-of-flow data and code before the parent word and leaving them
> un-linked FORGET and MARKER (not shown here) are able to perform
> without modification.
> --
> me

--

7-77-777
Evil Sinner!

Re: Avoiding processor penalty by KISS and no sugar

<bd6aa17b-36fe-41ca-ac2b-f5f133f96c87n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=14802&group=comp.lang.forth#14802

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a37:9e4b:: with SMTP id h72mr404714qke.475.1633127304793;
Fri, 01 Oct 2021 15:28:24 -0700 (PDT)
X-Received: by 2002:ad4:57ac:: with SMTP id g12mr11617744qvx.49.1633127304594;
Fri, 01 Oct 2021 15:28:24 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Fri, 1 Oct 2021 15:28:24 -0700 (PDT)
In-Reply-To: <7sJ5J.50387$3p3.9138@fx16.iad>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:3f7a:20d0:e1d5:31c6:358e:a503;
posting-account=V5nGoQoAAAC_P2U0qnxm2kC0s1jNJXJa
NNTP-Posting-Host: 2600:1700:3f7a:20d0:e1d5:31c6:358e:a503
References: <87464ea5-5426-4024-a5b9-5a816cdf5dd9n@googlegroups.com> <7sJ5J.50387$3p3.9138@fx16.iad>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <bd6aa17b-36fe-41ca-ac2b-f5f133f96c87n@googlegroups.com>
Subject: Re: Avoiding processor penalty by KISS and no sugar
From: sdwjac...@gmail.com (S Jack)
Injection-Date: Fri, 01 Oct 2021 22:28:24 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 40
 by: S Jack - Fri, 1 Oct 2021 22:28 UTC

On Friday, October 1, 2021 at 2:37:43 PM UTC-5, Branimir Maksimovic wrote:
> You should provide definitions for non standard words, I don't have
> extensions...

I know very little about the standard especially anything beyond ANS.
But I'll try:

"' foo FORGET" is same as "FORGET foo" and FORGET is standard.
In my Forth the norm is to have parameters precede operator with
some exception such as TO and IS . But don't concern yourself
about that; it just my thing.

LATEST ID. is Fig Forth. Have no idea how standard handles that.
Ask a guru.

DOCOL is codeword for colon definition. In a standard compliant Forth
you should be able to get it by ticking some colon definition:
: FOO ; ' FOO CONSTANT DOCOL
Again, ask a guru if that is compliant.

TRY wasn't standard in ANS and may be now, not sure. It was commonly used
in a definition as "TRY FOO" to be the same as "['] FOO CATCH".

VAL, was my headless value. VAL, is a rename of XVAL which I defined in
the previous thread. I show the definition that works in my Forth, a
Fig Forth which PFA functions like the standard XT. Probably most Figgers
who make their FIG behave close to standard use CFA as their XT which I
did long back. But Fig is PFA centric so I went with that this round and
it has not been a problem. My goal is not to make my system compliant but
I usually make words behave the same as standard where I can. But
some words such as ['] and [CHAR] no. And I usually use shorten names
such as VAR for VARIABLE CONST for CONSTANT VAL for VALUE and etc.
Back to VAL, . Because the definition shows where the XT of VAL, comes
from (the PFA) then for sure it's not compliant. What it would take to
make a compliant VAL, ask a guru.

Bottom line. Anything I publish is Forth in general and has nothing to
do with suggesting what the standard should do. You have many people
here more than happy to do that.
--
me

Re: Avoiding processor penalty by KISS and no sugar

<irqa3gF4gc8U1@mid.individual.net>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=14806&group=comp.lang.forth#14806

  copy link   Newsgroups: comp.lang.forth
Path: rocksolid2!i2pn.org!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: uho...@xlerb.de (Ulrich Hoffmann)
Newsgroups: comp.lang.forth
Subject: Re: Avoiding processor penalty by KISS and no sugar
Date: 2 Oct 2021 05:47:28 GMT
Lines: 24
Message-ID: <irqa3gF4gc8U1@mid.individual.net>
References: <87464ea5-5426-4024-a5b9-5a816cdf5dd9n@googlegroups.com>
<f9ef8022-6fbd-4548-86b7-27d63b688718n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: individual.net aVlGPFYMK5rBSY/O0gOVfgCgrDWJ3JzACQ5+S3WL8uKx5WYg7u
Cancel-Lock: sha1:VHGfne5h3nDr1Sa7iyAeaxNwiaU= sha1:/pSBqa38HvIEAUxt4b6KJCm+zaY=
User-Agent: NewsTap/5.5 (iPhone/iPod Touch)
 by: Ulrich Hoffmann - Sat, 2 Oct 2021 05:47 UTC

Hi SJack,

I have 2 (and a half) questions concerning your code.

S Jack <sdwjack69@gmail.com> wrote:
>
> HERE ," Today's date is " VAL, to PARM0
> HERE ," date" VAL, to PARM1
> {{ [PARM1] /SYS }} VAL, to PARM1
>> FOO SPACE [PARM0] COUNT TYPE [PARM1] CATCH THROW ;
>
> FOO Today's date is Fri 01 Oct 2021 02:02:03 PM CDT
>

Is CATCH THROW. different from EXECUTE in your system?

After FORGET foo are the string and the unnamed definition still
allocated in the dictionary? If not, how are they released?

Greetings, Ulrich

Re: Avoiding processor penalty by KISS and no sugar

<16d947c0-af7c-4c0e-a499-cc626f7abcdcn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=14809&group=comp.lang.forth#14809

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a37:aac6:: with SMTP id t189mr2843563qke.88.1633187606077;
Sat, 02 Oct 2021 08:13:26 -0700 (PDT)
X-Received: by 2002:ac8:4243:: with SMTP id r3mr4083593qtm.187.1633187605810;
Sat, 02 Oct 2021 08:13:25 -0700 (PDT)
Path: rocksolid2!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Sat, 2 Oct 2021 08:13:25 -0700 (PDT)
In-Reply-To: <irqa3gF4gc8U1@mid.individual.net>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:3f7a:20d0:7035:174c:11e:250a;
posting-account=V5nGoQoAAAC_P2U0qnxm2kC0s1jNJXJa
NNTP-Posting-Host: 2600:1700:3f7a:20d0:7035:174c:11e:250a
References: <87464ea5-5426-4024-a5b9-5a816cdf5dd9n@googlegroups.com>
<f9ef8022-6fbd-4548-86b7-27d63b688718n@googlegroups.com> <irqa3gF4gc8U1@mid.individual.net>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <16d947c0-af7c-4c0e-a499-cc626f7abcdcn@googlegroups.com>
Subject: Re: Avoiding processor penalty by KISS and no sugar
From: sdwjac...@gmail.com (S Jack)
Injection-Date: Sat, 02 Oct 2021 15:13:26 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 19
 by: S Jack - Sat, 2 Oct 2021 15:13 UTC

On Saturday, October 2, 2021 at 12:47:30 AM UTC-5, Ulrich Hoffmann wrote:
> Is CATCH THROW. different from EXECUTE in your system?
Not sure what you're getting at but because I used PFA as XT and to be somewhat
like standard I renamed Fig EXECUTE to EXEC and created EXECUTE ( pfa -- )
thus: ' FOO EXECUTE behaves like standard instead of ' FOO CFA EXECUTE in Fig.
That I believe was the only renaming of a Fig word to accommodate the standard.
But in general I found I could hide the CFA in most new words like COMPILE, and IS :
' foo compile,
defer bar ' koo is bar
I retained the evil state smart tick so in a definition I have:
' bar CATCH and not ['] bar CATCH
and PPN ' to postpone it (which in past was named ['] :)
>
> After FORGET foo are the string and the unnamed definition still
> allocated in the dictionary? If not, how are they released?
>
Your are correct. My claim of reclaiming the memory was false.
See following post.
--
me

Re: Avoiding processor penalty by KISS and no sugar

<6a976350-cb17-4e58-b1ee-a565581ac602n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=14810&group=comp.lang.forth#14810

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a37:9b16:: with SMTP id d22mr2911399qke.22.1633187926240;
Sat, 02 Oct 2021 08:18:46 -0700 (PDT)
X-Received: by 2002:a05:6214:1321:: with SMTP id c1mr16087411qvv.43.1633187926119;
Sat, 02 Oct 2021 08:18:46 -0700 (PDT)
Path: rocksolid2!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Sat, 2 Oct 2021 08:18:45 -0700 (PDT)
In-Reply-To: <irqa3gF4gc8U1@mid.individual.net>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:3f7a:20d0:7035:174c:11e:250a;
posting-account=V5nGoQoAAAC_P2U0qnxm2kC0s1jNJXJa
NNTP-Posting-Host: 2600:1700:3f7a:20d0:7035:174c:11e:250a
References: <87464ea5-5426-4024-a5b9-5a816cdf5dd9n@googlegroups.com>
<f9ef8022-6fbd-4548-86b7-27d63b688718n@googlegroups.com> <irqa3gF4gc8U1@mid.individual.net>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <6a976350-cb17-4e58-b1ee-a565581ac602n@googlegroups.com>
Subject: Re: Avoiding processor penalty by KISS and no sugar
From: sdwjac...@gmail.com (S Jack)
Injection-Date: Sat, 02 Oct 2021 15:18:46 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 53
 by: S Jack - Sat, 2 Oct 2021 15:18 UTC

On Saturday, October 2, 2021 at 12:47:30 AM UTC-5, Ulrich Hoffmann wrote:
> After FORGET foo are the string and the unnamed definition still
> allocated in the dictionary? If not, how are they released?

1. Replace scratch values with a parameter block; looks cleaner.
2. Found I didn't reclaim memory.
ELF32X86_64 Frog Version 1.0d

"wrk" job

\ VAL, ( x -- xt ) Headless value
\ Execution only.
\ Compile a headless value holding value x
\ and return the xt of the headless value
\ {{ ( -- xt ) Begin headless anonymous colon code
\ Execution only, not-nested.
\ }} ( C: xt -- ) Immediate ( -- XT )
\ End headless anonymous code
\ []! ( x n a -- ) Store x in nth cell of memory block
\ at address a
\ /SYS ( s -- ) Pass counted string s to system ( Frog Forth )
\ FORGET ( xt -- ) Non-parsing FORGET ( Frog Forth )

WRK DEFINITIONS
CREATE PARMBLK 16 CELLS ALLOT \ parameter block
: [PARM0] \ compile first parmeter
PARMBLK @ COMPILE, ; IMMEDIATE
: [PARM1] \ compile second parameter
PARMBLK CELL+ @ COMPILE, ; IMMEDIATE

CREATE BAR \ HERE at this point
HERE ," Today's date is " VAL, PARMBLK !
HERE ," date" VAL, 1 PARMBLK []!
{{ [PARM1] /SYS }} VAL, 1 PARMBLK []!
: FOO SPACE [PARM0] COUNT TYPE [PARM1] CATCH THROW ;

CR FOO \ text and date shown
Today's date is Сб окт 2 09:42:02 CDT 2021

WORDS
CURRENT and CONTEXT are WRK
FOO BAR [PARM1] [PARM0] PARMBLK
' FOO FORGET \ Forget FOO
WORDS
CURRENT and CONTEXT are WRK
BAR [PARM1] [PARM0] PARMBLK
( Confirmed BAR is now last word in context BUT...)
BAR HERE - 0= SPACE . \ TRUE if Memory reclaimed upto BAR -> 0
( (oops!) memory not reclaimed. )

+echo ok
--
me

Re: Avoiding processor penalty by KISS and no sugar

<dca0a52f-0fa1-44b0-bc67-c663eb7930c4n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=14812&group=comp.lang.forth#14812

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a37:8046:: with SMTP id b67mr2865673qkd.200.1633188385956;
Sat, 02 Oct 2021 08:26:25 -0700 (PDT)
X-Received: by 2002:ad4:4744:: with SMTP id c4mr11688790qvx.66.1633188385823;
Sat, 02 Oct 2021 08:26:25 -0700 (PDT)
Path: rocksolid2!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Sat, 2 Oct 2021 08:26:25 -0700 (PDT)
In-Reply-To: <6a976350-cb17-4e58-b1ee-a565581ac602n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:3f7a:20d0:7035:174c:11e:250a;
posting-account=V5nGoQoAAAC_P2U0qnxm2kC0s1jNJXJa
NNTP-Posting-Host: 2600:1700:3f7a:20d0:7035:174c:11e:250a
References: <87464ea5-5426-4024-a5b9-5a816cdf5dd9n@googlegroups.com>
<f9ef8022-6fbd-4548-86b7-27d63b688718n@googlegroups.com> <irqa3gF4gc8U1@mid.individual.net>
<6a976350-cb17-4e58-b1ee-a565581ac602n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <dca0a52f-0fa1-44b0-bc67-c663eb7930c4n@googlegroups.com>
Subject: Re: Avoiding processor penalty by KISS and no sugar
From: sdwjac...@gmail.com (S Jack)
Injection-Date: Sat, 02 Oct 2021 15:26:25 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 8
 by: S Jack - Sat, 2 Oct 2021 15:26 UTC

On Saturday, October 2, 2021 at 10:18:46 AM UTC-5, S Jack wrote:

> \ {{ ( -- xt ) Begin headless anonymous colon code
> \ Execution only, not-nested.

Bah! Of course it's nested.

--
me

Re: Avoiding processor penalty by KISS and no sugar

<sja0tb$1sad$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=14814&group=comp.lang.forth#14814

  copy link   Newsgroups: comp.lang.forth
Path: rocksolid2!i2pn.org!aioe.org!7AktqsUqy5CCvnKa3S0Dkw.user.46.165.242.75.POSTED!not-for-mail
From: dxfo...@gmail.com (dxforth)
Newsgroups: comp.lang.forth
Subject: Re: Avoiding processor penalty by KISS and no sugar
Date: Sun, 3 Oct 2021 03:20:59 +1100
Organization: Aioe.org NNTP Server
Message-ID: <sja0tb$1sad$1@gioia.aioe.org>
References: <87464ea5-5426-4024-a5b9-5a816cdf5dd9n@googlegroups.com>
<f9ef8022-6fbd-4548-86b7-27d63b688718n@googlegroups.com>
<irqa3gF4gc8U1@mid.individual.net>
<16d947c0-af7c-4c0e-a499-cc626f7abcdcn@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="61773"; posting-host="7AktqsUqy5CCvnKa3S0Dkw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.14.0
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-GB
 by: dxforth - Sat, 2 Oct 2021 16:20 UTC

On 3/10/2021 01:13, S Jack wrote:
> On Saturday, October 2, 2021 at 12:47:30 AM UTC-5, Ulrich Hoffmann wrote:
>>
>> After FORGET foo are the string and the unnamed definition still
>> allocated in the dictionary? If not, how are they released?
>>
> Your are correct. My claim of reclaiming the memory was false.
> See following post.

It's not an uncommon situation e.g.

: BAR ... ;

:NONAME ... ; DROP

: FOO ... ;

FORGET FOO

won't recover the space consumed by the :NONAME. Few would lose sleep
over it but should an exact restore point be wanted, create a dummy word
and FORGET that.

Re: Avoiding processor penalty by KISS and no sugar

<3a4db5e4-298b-4e06-a619-c331ee7051ebn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=14817&group=comp.lang.forth#14817

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:ac8:5a0f:: with SMTP id n15mr4932271qta.129.1633200885570;
Sat, 02 Oct 2021 11:54:45 -0700 (PDT)
X-Received: by 2002:ad4:418a:: with SMTP id e10mr15084660qvp.64.1633200885427;
Sat, 02 Oct 2021 11:54:45 -0700 (PDT)
Path: rocksolid2!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Sat, 2 Oct 2021 11:54:45 -0700 (PDT)
In-Reply-To: <sja0tb$1sad$1@gioia.aioe.org>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:3f7a:20d0:7035:174c:11e:250a;
posting-account=V5nGoQoAAAC_P2U0qnxm2kC0s1jNJXJa
NNTP-Posting-Host: 2600:1700:3f7a:20d0:7035:174c:11e:250a
References: <87464ea5-5426-4024-a5b9-5a816cdf5dd9n@googlegroups.com>
<f9ef8022-6fbd-4548-86b7-27d63b688718n@googlegroups.com> <irqa3gF4gc8U1@mid.individual.net>
<16d947c0-af7c-4c0e-a499-cc626f7abcdcn@googlegroups.com> <sja0tb$1sad$1@gioia.aioe.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <3a4db5e4-298b-4e06-a619-c331ee7051ebn@googlegroups.com>
Subject: Re: Avoiding processor penalty by KISS and no sugar
From: sdwjac...@gmail.com (S Jack)
Injection-Date: Sat, 02 Oct 2021 18:54:45 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 48
 by: S Jack - Sat, 2 Oct 2021 18:54 UTC

On Saturday, October 2, 2021 at 11:21:02 AM UTC-5, dxforth wrote:
> On 3/10/2021 01:13, S Jack wrote:

Can't let it go.

VAL, ( x -- xt ) Headless value
\ Execution only.
\ Compile a headless value holding value x
\ and return the xt of the headless value
\ {{ ( -- xt ) Begin headless anonymous colon code
\ Execution only, not-nested.
\ }} ( C: xt -- ) Immediate ( -- XT )
\ End headless anonymous code
\ []! ( x n a -- ) Store x in nth cell of memory block
\ at address a
\ /SYS ( s -- ) Pass counted string s to system ( Frog Forth )
\ FORGET ( xt -- ) Non-parsing FORGET ( Frog Forth )
\ VDOES Vector latest to here ( Frog Forth )

WRK DEFINITIONS
CREATE PARMBLK 16 CELLS ALLOT \ parameter block
: [PARM0] \ compile first parmeter
PARMBLK @ COMPILE, ; IMMEDIATE
: [PARM1] \ compile second parameter
PARMBLK CELL+ @ COMPILE, ; IMMEDIATE

CREATE BAR \ HERE at this point
: FOO ;
HERE ," Today's date is " VAL, PARMBLK !
HERE ," date" VAL, 1 PARMBLK []!
{{ [PARM1] /SYS }} VAL, 1 PARMBLK []!
VDOES SPACE [PARM0] COUNT TYPE [PARM1] CATCH THROW ;

CR FOO \ text and date shown
Today's date is Сб окт 2 13:52:21 CDT 2021

WORDS
CURRENT and CONTEXT are WRK
FOO BAR [PARM1] [PARM0] PARMBLK
' FOO DUP FORGET \ Forget FOO
WORDS
CURRENT and CONTEXT are WRK
BAR [PARM1] [PARM0] PARMBLK
BAR HERE - 0= SPACE . \ TRUE if Memory reclaimed upto BAR -> -1

+echo ok
--
me

Re: Avoiding processor penalty by KISS and no sugar

<Qb76J.23135$4X4.261@fx27.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=14820&group=comp.lang.forth#14820

  copy link   Newsgroups: comp.lang.forth
Path: rocksolid2!news.neodome.net!news.mixmin.net!border2.nntp.ams1.giganews.com!nntp.giganews.com!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!news-out.netnews.com!news.alt.net!fdc2.netnews.com!feeder1.feed.usenet.farm!feed.usenet.farm!peer01.ams4!peer.am4.highwinds-media.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx27.iad.POSTED!not-for-mail
Newsgroups: comp.lang.forth
From: branimir...@icloud.com (Branimir Maksimovic)
Subject: Re: Avoiding processor penalty by KISS and no sugar
References: <87464ea5-5426-4024-a5b9-5a816cdf5dd9n@googlegroups.com>
<f9ef8022-6fbd-4548-86b7-27d63b688718n@googlegroups.com>
<irqa3gF4gc8U1@mid.individual.net>
<6a976350-cb17-4e58-b1ee-a565581ac602n@googlegroups.com>
User-Agent: slrn/1.0.3 (Darwin)
Lines: 46
Message-ID: <Qb76J.23135$4X4.261@fx27.iad>
X-Complaints-To: abuse@usenet-news.net
NNTP-Posting-Date: Sun, 03 Oct 2021 00:55:12 UTC
Organization: usenet-news.net
Date: Sun, 03 Oct 2021 00:55:12 GMT
X-Received-Bytes: 2391
X-Original-Bytes: 2252
 by: Branimir Maksimovic - Sun, 3 Oct 2021 00:55 UTC

On 2021-10-02, S Jack <sdwjack69@gmail.com> wrote:
> On Saturday, October 2, 2021 at 12:47:30 AM UTC-5, Ulrich Hoffmann wrote:
>> After FORGET foo are the string and the unnamed definition still
>> allocated in the dictionary? If not, how are they released?
>
> 1. Replace scratch values with a parameter block; looks cleaner.
> 2. Found I didn't reclaim memory.
> ELF32X86_64 Frog Version 1.0d
>
> "wrk" job
>
> \ VAL, ( x -- xt ) Headless value
> \ Execution only.
> \ Compile a headless value holding value x
> \ and return the xt of the headless value
> \ {{ ( -- xt ) Begin headless anonymous colon code
> \ Execution only, not-nested.
> \ }} ( C: xt -- ) Immediate ( -- XT )
> \ End headless anonymous code
> \ []! ( x n a -- ) Store x in nth cell of memory block
> \ at address a
> \ /SYS ( s -- ) Pass counted string s to system ( Frog Forth )
> \ FORGET ( xt -- ) Non-parsing FORGET ( Frog Forth )
>
> WRK DEFINITIONS
> CREATE PARMBLK 16 CELLS ALLOT \ parameter block
>: [PARM0] \ compile first parmeter
> PARMBLK @ COMPILE, ; IMMEDIATE
>: [PARM1] \ compile second parameter
> PARMBLK CELL+ @ COMPILE, ; IMMEDIATE
>
> CREATE BAR \ HERE at this point
> HERE ," Today's date is " VAL, PARMBLK !
Is it : HERE @ ! ;
? What is PARAM0 ?
> --
> me

--

7-77-777
Evil Sinner!
to weak you should be meek, and you should brainfuck stronger
https://github.com/rofl0r/chaos-pp

Re: Avoiding processor penalty by KISS and no sugar

<2d76J.23136$4X4.15397@fx27.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=14821&group=comp.lang.forth#14821

  copy link   Newsgroups: comp.lang.forth
Path: rocksolid2!news.neodome.net!feeder1.feed.usenet.farm!feed.usenet.farm!peer02.ams4!peer.am4.highwinds-media.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx27.iad.POSTED!not-for-mail
Newsgroups: comp.lang.forth
From: branimir...@icloud.com (Branimir Maksimovic)
Subject: Re: Avoiding processor penalty by KISS and no sugar
References: <87464ea5-5426-4024-a5b9-5a816cdf5dd9n@googlegroups.com>
<f9ef8022-6fbd-4548-86b7-27d63b688718n@googlegroups.com>
<irqa3gF4gc8U1@mid.individual.net>
<16d947c0-af7c-4c0e-a499-cc626f7abcdcn@googlegroups.com>
<sja0tb$1sad$1@gioia.aioe.org>
<3a4db5e4-298b-4e06-a619-c331ee7051ebn@googlegroups.com>
User-Agent: slrn/1.0.3 (Darwin)
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Lines: 61
Message-ID: <2d76J.23136$4X4.15397@fx27.iad>
X-Complaints-To: abuse@usenet-news.net
NNTP-Posting-Date: Sun, 03 Oct 2021 00:56:30 UTC
Organization: usenet-news.net
Date: Sun, 03 Oct 2021 00:56:30 GMT
X-Received-Bytes: 2918
 by: Branimir Maksimovic - Sun, 3 Oct 2021 00:56 UTC

On 2021-10-02, S Jack <sdwjack69@gmail.com> wrote:
> On Saturday, October 2, 2021 at 11:21:02 AM UTC-5, dxforth wrote:
>> On 3/10/2021 01:13, S Jack wrote:
>
> Can't let it go.
>
> VAL, ( x -- xt ) Headless value
> \ Execution only.
> \ Compile a headless value holding value x
> \ and return the xt of the headless value
> \ {{ ( -- xt ) Begin headless anonymous colon code
> \ Execution only, not-nested.
> \ }} ( C: xt -- ) Immediate ( -- XT )
> \ End headless anonymous code
> \ []! ( x n a -- ) Store x in nth cell of memory block
> \ at address a
> \ /SYS ( s -- ) Pass counted string s to system ( Frog Forth )
> \ FORGET ( xt -- ) Non-parsing FORGET ( Frog Forth )
> \ VDOES Vector latest to here ( Frog Forth )
>
> WRK DEFINITIONS
> CREATE PARMBLK 16 CELLS ALLOT \ parameter block
>: [PARM0] \ compile first parmeter
> PARMBLK @ COMPILE, ; IMMEDIATE
>: [PARM1] \ compile second parameter
> PARMBLK CELL+ @ COMPILE, ; IMMEDIATE
>
> CREATE BAR \ HERE at this point
>: FOO ;
> HERE ," Today's date is " VAL, PARMBLK !
> HERE ," date" VAL, 1 PARMBLK []!
> {{ [PARM1] /SYS }} VAL, 1 PARMBLK []!
> VDOES SPACE [PARM0] COUNT TYPE [PARM1] CATCH THROW ;
>
> CR FOO \ text and date shown
> Today's date is Сб окт 2 13:52:21 CDT 2021
>
>
> WORDS
> CURRENT and CONTEXT are WRK
> FOO BAR [PARM1] [PARM0] PARMBLK
> ' FOO DUP FORGET \ Forget FOO
> WORDS
> CURRENT and CONTEXT are WRK
> BAR [PARM1] [PARM0] PARMBLK
> BAR HERE - 0= SPACE . \ TRUE if Memory reclaimed upto BAR -> -1
>

A thanks!

> +echo ok
> --
> me

--

7-77-777
Evil Sinner!
to weak you should be meek, and you should brainfuck stronger
https://github.com/rofl0r/chaos-pp

Re: Avoiding processor penalty by KISS and no sugar

<sjb0qn$hoe$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=14824&group=comp.lang.forth#14824

  copy link   Newsgroups: comp.lang.forth
Path: rocksolid2!i2pn.org!aioe.org!7AktqsUqy5CCvnKa3S0Dkw.user.46.165.242.75.POSTED!not-for-mail
From: dxfo...@gmail.com (dxforth)
Newsgroups: comp.lang.forth
Subject: Re: Avoiding processor penalty by KISS and no sugar
Date: Sun, 3 Oct 2021 12:25:43 +1100
Organization: Aioe.org NNTP Server
Message-ID: <sjb0qn$hoe$1@gioia.aioe.org>
References: <87464ea5-5426-4024-a5b9-5a816cdf5dd9n@googlegroups.com>
<f9ef8022-6fbd-4548-86b7-27d63b688718n@googlegroups.com>
<irqa3gF4gc8U1@mid.individual.net>
<16d947c0-af7c-4c0e-a499-cc626f7abcdcn@googlegroups.com>
<sja0tb$1sad$1@gioia.aioe.org>
<3a4db5e4-298b-4e06-a619-c331ee7051ebn@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="18190"; posting-host="7AktqsUqy5CCvnKa3S0Dkw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.14.0
Content-Language: en-GB
X-Notice: Filtered by postfilter v. 0.9.2
 by: dxforth - Sun, 3 Oct 2021 01:25 UTC

On 3/10/2021 05:54, S Jack wrote:
> On Saturday, October 2, 2021 at 11:21:02 AM UTC-5, dxforth wrote:
>> On 3/10/2021 01:13, S Jack wrote:
>
> Can't let it go.

Just give it some time :)

Re: Avoiding processor penalty by KISS and no sugar

<d463b3e6-c55e-4a04-9d0b-ffaeabffc577n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=14825&group=comp.lang.forth#14825

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a37:547:: with SMTP id 68mr4174644qkf.491.1633224492895;
Sat, 02 Oct 2021 18:28:12 -0700 (PDT)
X-Received: by 2002:a05:6214:921:: with SMTP id dk1mr9426439qvb.31.1633224492703;
Sat, 02 Oct 2021 18:28:12 -0700 (PDT)
Path: rocksolid2!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Sat, 2 Oct 2021 18:28:12 -0700 (PDT)
In-Reply-To: <sjb0qn$hoe$1@gioia.aioe.org>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:3f7a:20d0:793c:254b:ef55:e24e;
posting-account=V5nGoQoAAAC_P2U0qnxm2kC0s1jNJXJa
NNTP-Posting-Host: 2600:1700:3f7a:20d0:793c:254b:ef55:e24e
References: <87464ea5-5426-4024-a5b9-5a816cdf5dd9n@googlegroups.com>
<f9ef8022-6fbd-4548-86b7-27d63b688718n@googlegroups.com> <irqa3gF4gc8U1@mid.individual.net>
<16d947c0-af7c-4c0e-a499-cc626f7abcdcn@googlegroups.com> <sja0tb$1sad$1@gioia.aioe.org>
<3a4db5e4-298b-4e06-a619-c331ee7051ebn@googlegroups.com> <sjb0qn$hoe$1@gioia.aioe.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <d463b3e6-c55e-4a04-9d0b-ffaeabffc577n@googlegroups.com>
Subject: Re: Avoiding processor penalty by KISS and no sugar
From: sdwjac...@gmail.com (S Jack)
Injection-Date: Sun, 03 Oct 2021 01:28:12 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 9
 by: S Jack - Sun, 3 Oct 2021 01:28 UTC

On Saturday, October 2, 2021 at 8:25:48 PM UTC-5, dxforth wrote:
> On 3/10/2021 05:54, S Jack wrote:
> > On Saturday, October 2, 2021 at 11:21:02 AM UTC-5, dxforth wrote:
> >> On 3/10/2021 01:13, S Jack wrote:
> >
> > Can't let it go.
> Just give it some time :)
Don't need to. Last post shows it working.
--
me

Re: Avoiding processor penalty by KISS and no sugar

<32cd47bf-145d-461f-9c71-30ca7df36b98n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=14833&group=comp.lang.forth#14833

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a37:bf82:: with SMTP id p124mr6668681qkf.45.1633284814987;
Sun, 03 Oct 2021 11:13:34 -0700 (PDT)
X-Received: by 2002:ac8:7059:: with SMTP id y25mr9375845qtm.404.1633284814839;
Sun, 03 Oct 2021 11:13:34 -0700 (PDT)
Path: rocksolid2!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Sun, 3 Oct 2021 11:13:34 -0700 (PDT)
In-Reply-To: <d463b3e6-c55e-4a04-9d0b-ffaeabffc577n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:3f7a:20d0:1c8d:3c13:9564:fb67;
posting-account=V5nGoQoAAAC_P2U0qnxm2kC0s1jNJXJa
NNTP-Posting-Host: 2600:1700:3f7a:20d0:1c8d:3c13:9564:fb67
References: <87464ea5-5426-4024-a5b9-5a816cdf5dd9n@googlegroups.com>
<f9ef8022-6fbd-4548-86b7-27d63b688718n@googlegroups.com> <irqa3gF4gc8U1@mid.individual.net>
<16d947c0-af7c-4c0e-a499-cc626f7abcdcn@googlegroups.com> <sja0tb$1sad$1@gioia.aioe.org>
<3a4db5e4-298b-4e06-a619-c331ee7051ebn@googlegroups.com> <sjb0qn$hoe$1@gioia.aioe.org>
<d463b3e6-c55e-4a04-9d0b-ffaeabffc577n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <32cd47bf-145d-461f-9c71-30ca7df36b98n@googlegroups.com>
Subject: Re: Avoiding processor penalty by KISS and no sugar
From: sdwjac...@gmail.com (S Jack)
Injection-Date: Sun, 03 Oct 2021 18:13:34 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 15
 by: S Jack - Sun, 3 Oct 2021 18:13 UTC

On Saturday, October 2, 2021 at 8:28:13 PM UTC-5, S Jack wrote:
> On Saturday, October 2, 2021 at 8:25:48 PM UTC-5, dxforth wrote:
> > On 3/10/2021 05:54, S Jack wrote:
> > > On Saturday, October 2, 2021 at 11:21:02 AM UTC-5, dxforth wrote:
> > >> On 3/10/2021 01:13, S Jack wrote:
> > >
> > > Can't let it go.
> > Just give it some time :)
> Don't need to. Last post shows it working.
> --
> me
The fix to reclaim data involved constructing a compound Forth word, one that
has both a data area and a main code area. Started a new thread for the construct
of compound Forth words.
--
me

Re: Avoiding processor penalty by KISS and no sugar

<is01j7F7hjnU1@mid.individual.net>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=14846&group=comp.lang.forth#14846

  copy link   Newsgroups: comp.lang.forth
Path: rocksolid2!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: uho...@xlerb.de (Ulrich Hoffmann)
Newsgroups: comp.lang.forth
Subject: Re: Avoiding processor penalty by KISS and no sugar
Date: Mon, 4 Oct 2021 11:59:03 +0200
Lines: 116
Message-ID: <is01j7F7hjnU1@mid.individual.net>
References: <87464ea5-5426-4024-a5b9-5a816cdf5dd9n@googlegroups.com>
<f9ef8022-6fbd-4548-86b7-27d63b688718n@googlegroups.com>
<irqa3gF4gc8U1@mid.individual.net>
<16d947c0-af7c-4c0e-a499-cc626f7abcdcn@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: individual.net 3KdmsOTgJC1Tswne8k7c2QaKI7Ag2KiXJg2yJODjfKFjYxziC/
Cancel-Lock: sha1:ihP0AmiBgGRpp3oZAwE5T5qoe2g=
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0)
Gecko/20100101 Thunderbird/78.14.0
In-Reply-To: <16d947c0-af7c-4c0e-a499-cc626f7abcdcn@googlegroups.com>
 by: Ulrich Hoffmann - Mon, 4 Oct 2021 09:59 UTC

Hi SJack,

> Not sure what you're getting at but because I used
> PFA as XT and to be somewhat like standard I renamed Fig
> EXECUTE to EXEC and created EXECUTE ( pfa -- )

I see - I only wanted to remark that in

> : FOO SPACE [PARM0] COUNT TYPE [PARM1] CATCH THROW ;

if CATCH THROW is like EXECUTE then there is no need to CATCH
any error and then reTHROW it. Just EXECUTING will throw the same
errors anyway. So you could write

: FOO SPACE [PARM0] COUNT TYPE [PARM1] EXECUTE ;

I like the idea of having phrases that are considered equivalent such as

CATCH THROW == EXECUTE

LITERAL EXECUTE == COMPILE,

Here is a standard version of your code:

: pass ( x <name> -- x ) >r ' execute r> ; immediate

Marker empty

here u. ( 250360 )

here ," date" pass :noname ( -- addr ) Literal ;

pass :noname ( -- )
[ compile, ] /sys ; pass :noname ( -- addr ) Literal ;

here ," Today's date is " pass :noname ( -- addr ) Literal ;

pass pass : spam ( -- )
space [ compile, ] count type [ compile, ] execute ;

spam ( Today's date is Mo 4 Okt 2021 11:01:19 CEST )

empty

here u. ( 250360 )

PASS is an invention of Michael Gassenenko and passes a single value
inside a definition. (pass pass transfers two values).

EMPTY as a marker will revert the dictionary to its original
state thus also eliminating ALLOTed space and unnamed definitions.
HERE is the same as before.

A simplified version would be:

: pass ( x <name> -- x ) >r ' execute r> ; immediate

Marker empty

here u. ( 250360 )

here ," date"
pass :noname ( -- ) Literal /sys ;
here ," Today's date is "

pass pass : spam ( -- ) space Literal count type [ compile, ] ;

spam ( Today's date is Mo 4 Okt 2021 11:01:19 CEST )

empty

here u. ( 250360 )

Note this is all discussed in the context of avoiding to branch
around strings or quotations because of branch prediction penalties
in native code systems. Yes this can be made explicit as seen above
and the code is ugly. The gforth idea of using sections in the
implementation for this does it implicitly and keeps the normal syntax:

: spam ( -- ) space ." Today's date is " c" date" /sys ;

Greetings,

Ulrich

Am 02.10.21 um 17:13 schrieb S Jack:
> On Saturday, October 2, 2021 at 12:47:30 AM UTC-5, Ulrich Hoffmann wrote:
>> Is CATCH THROW. different from EXECUTE in your system?
> Not sure what you're getting at but because I used PFA as XT and to
be somewhat
> like standard I renamed Fig EXECUTE to EXEC and created EXECUTE ( pfa
-- )
> thus: ' FOO EXECUTE behaves like standard instead of ' FOO CFA
EXECUTE in Fig.
> That I believe was the only renaming of a Fig word to accommodate
the standard.
> But in general I found I could hide the CFA in most new words like
COMPILE, and IS :
> ' foo compile,
> defer bar ' koo is bar
> I retained the evil state smart tick so in a definition I have:
> ' bar CATCH and not ['] bar CATCH
> and PPN ' to postpone it (which in past was named [']
>>
>> After FORGET foo are the string and the unnamed definition still
>> allocated in the dictionary? If not, how are they released?
>>
> Your are correct. My claim of reclaiming the memory was false.
> See following post.
> --
> me
>

Re: Avoiding processor penalty by KISS and no sugar

<sjekek$pvs$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=14847&group=comp.lang.forth#14847

  copy link   Newsgroups: comp.lang.forth
Path: rocksolid2!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: ruvim.pi...@gmail.com (Ruvim)
Newsgroups: comp.lang.forth
Subject: Re: Avoiding processor penalty by KISS and no sugar
Date: Mon, 4 Oct 2021 13:18:59 +0300
Organization: A noiseless patient Spider
Lines: 35
Message-ID: <sjekek$pvs$1@dont-email.me>
References: <87464ea5-5426-4024-a5b9-5a816cdf5dd9n@googlegroups.com>
<f9ef8022-6fbd-4548-86b7-27d63b688718n@googlegroups.com>
<irqa3gF4gc8U1@mid.individual.net>
<16d947c0-af7c-4c0e-a499-cc626f7abcdcn@googlegroups.com>
<is01j7F7hjnU1@mid.individual.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 4 Oct 2021 10:19:00 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="7efad9b728fdea35d416803065e000f7";
logging-data="26620"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+lxzaBO2NljYe1kh9UPzcw"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.1.2
Cancel-Lock: sha1:oGFvwagB2z6qQ778WvYK+fQ85uQ=
In-Reply-To: <is01j7F7hjnU1@mid.individual.net>
Content-Language: en-US
 by: Ruvim - Mon, 4 Oct 2021 10:18 UTC

On 2021-10-04 12:59, Ulrich Hoffmann wrote:

> > : FOO SPACE [PARM0] COUNT TYPE [PARM1] CATCH THROW ;
>
> if CATCH THROW is like EXECUTE then there is no need to CATCH
> any error and then reTHROW it. Just EXECUTING will throw the same
> errors anyway. So you could write
>
> : FOO SPACE [PARM0] COUNT TYPE [PARM1] EXECUTE ;
>
>
> I like the idea of having phrases that are considered equivalent such as
>
> CATCH THROW  ==  EXECUTE
>
> LITERAL EXECUTE  ==  COMPILE,

A small correction:

LITERAL EXECUTE == [ COMPILE, ]

POSTPONE LITERAL POSTPONE EXECUTE == COMPILE,

Also, for an ordinary word X

['] X EXECUTE == X == [ ' X COMPILE, ]

Concerning "COMPILE," in brackets -- such use has small conflict with
the letter of the standard, but it's conceptually correct.

--
Ruvim

Re: Avoiding processor penalty by KISS and no sugar

<c57eea1e-68e2-4ec4-a92e-539017c80ab5n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=14850&group=comp.lang.forth#14850

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a37:a943:: with SMTP id s64mr11221152qke.422.1633371100057;
Mon, 04 Oct 2021 11:11:40 -0700 (PDT)
X-Received: by 2002:a37:9581:: with SMTP id x123mr11417476qkd.477.1633371099812;
Mon, 04 Oct 2021 11:11:39 -0700 (PDT)
Path: rocksolid2!i2pn.org!paganini.bofh.team!news.dns-netz.com!news.freedyn.net!newsreader4.netcologne.de!news.netcologne.de!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Mon, 4 Oct 2021 11:11:39 -0700 (PDT)
In-Reply-To: <is01j7F7hjnU1@mid.individual.net>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:3f7a:20d0:bd32:702a:6fee:f67f;
posting-account=V5nGoQoAAAC_P2U0qnxm2kC0s1jNJXJa
NNTP-Posting-Host: 2600:1700:3f7a:20d0:bd32:702a:6fee:f67f
References: <87464ea5-5426-4024-a5b9-5a816cdf5dd9n@googlegroups.com>
<f9ef8022-6fbd-4548-86b7-27d63b688718n@googlegroups.com> <irqa3gF4gc8U1@mid.individual.net>
<16d947c0-af7c-4c0e-a499-cc626f7abcdcn@googlegroups.com> <is01j7F7hjnU1@mid.individual.net>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <c57eea1e-68e2-4ec4-a92e-539017c80ab5n@googlegroups.com>
Subject: Re: Avoiding processor penalty by KISS and no sugar
From: sdwjac...@gmail.com (S Jack)
Injection-Date: Mon, 04 Oct 2021 18:11:40 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2988
 by: S Jack - Mon, 4 Oct 2021 18:11 UTC

On Monday, October 4, 2021 at 4:59:06 AM UTC-5, Ulrich Hoffmann wrote:
> if CATCH THROW is like EXECUTE then there is no need to CATCH
> any error and then reTHROW it. Just EXECUTING will throw the same
> errors anyway. So you could write

Indeed, the example catch/throw isn't necessary but I wanted to show
referenced code being caught. Unnamed code phrase apart from and
referenced by parent code is my limited understanding of what a
Quotation is. I figured its interest to Forth programmers is having a
fragment of code complied in the middle of a definition that provides
the main code an XT that could be caught. Unnamed code in the data
area referenced by the main code to my understanding performs the
same service as Quotations.

Code fragments preceding and passed to main code, has some appeal to
me. All the fragments are exposed, nothing hidden, the parent code
is more concise, and the ugly references is like underlining where the
fragments apply (similar to folding or accordion text in text editor).
Not trying to sell it, don't expect many to embrace it, but it's workable.

Passing parameters by parameter block is one of several ways, PASS and
OUTSIDE being typical alternatives. I wanted to pass the parameters on
stack and access them via Fig CSP (disregarding compliance). But
parameters on stack to be consumed can require stack maneuvers for
the right order and duplicates. Without stack maneuvers and consumption
drops after (or in) definitions are needed. Parameter block passing
involved less clutter.

Glad you've given me an compliant example. I'll be looking at it.
Thank-you.

Re: Avoiding processor penalty by KISS and no sugar

<85c12a88-ce5e-4d19-9040-5086db070b8an@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=14851&group=comp.lang.forth#14851

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:ac8:5fd3:: with SMTP id k19mr16254408qta.60.1633384161005;
Mon, 04 Oct 2021 14:49:21 -0700 (PDT)
X-Received: by 2002:ac8:15a:: with SMTP id f26mr15452705qtg.417.1633384160814;
Mon, 04 Oct 2021 14:49:20 -0700 (PDT)
Path: rocksolid2!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Mon, 4 Oct 2021 14:49:20 -0700 (PDT)
In-Reply-To: <is01j7F7hjnU1@mid.individual.net>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:3f7a:20d0:bd32:702a:6fee:f67f;
posting-account=V5nGoQoAAAC_P2U0qnxm2kC0s1jNJXJa
NNTP-Posting-Host: 2600:1700:3f7a:20d0:bd32:702a:6fee:f67f
References: <87464ea5-5426-4024-a5b9-5a816cdf5dd9n@googlegroups.com>
<f9ef8022-6fbd-4548-86b7-27d63b688718n@googlegroups.com> <irqa3gF4gc8U1@mid.individual.net>
<16d947c0-af7c-4c0e-a499-cc626f7abcdcn@googlegroups.com> <is01j7F7hjnU1@mid.individual.net>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <85c12a88-ce5e-4d19-9040-5086db070b8an@googlegroups.com>
Subject: Re: Avoiding processor penalty by KISS and no sugar
From: sdwjac...@gmail.com (S Jack)
Injection-Date: Mon, 04 Oct 2021 21:49:21 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 35
 by: S Jack - Mon, 4 Oct 2021 21:49 UTC

On Monday, October 4, 2021 at 4:59:06 AM UTC-5, Ulrich Hoffmann wrote:
> Hi SJack,
MARKER , used in anticipation of deletion, was not my concern. MARKER
deleting all after allotted memory is a tautology. The case in point
was how could FORGET reclaim allotted memory when no deletion was
anticipated and no preparation for deletion, such a dummy word, were
made. Found that FORGET can reclaim memory for word constructed
compound with data and code spaces.

I do recognize that reclaiming all data memory is not a high priority.
Delete a word and if some data memory is left over, it's just taking
up space but not causing any harm otherwise (in most cases). I don't
want to dwell on if left over memory is harmful or not. For me it's
get rid of it if can be reasonably done or else not worry about it.
Of course what's "reasonable" is subjective. I can live with compound
words and I sure many can't.

Branch prediction penalties I can live with (have been) but if I can
find a convenient way to avoid them I would thus willing to explore
the subject in particular that dealing with string data and quotations
as Anton suggests. I also included work around LITERAL replacing
literals with values which was the purpose of "VAL,", a headless value
to use in place of LIT .

For removing branching around string data and quotation it's a matter
of separation of strings and quotations from the main code flow. The
separating doesn't appear to be a big deal; of course to do it
elegantly most likely is.

I'm a bit surprised that sections is getting so much attentions as if
it's a key to this affair. Is there any real advantage of data in
sections over data in an allocated block of dictionary memory?
(hardware concern may dictate use of sections but that's an
independent subject)
--
me

Re: Avoiding processor penalty by KISS and no sugar

<sjggcs$19k8$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=14853&group=comp.lang.forth#14853

  copy link   Newsgroups: comp.lang.forth
Path: rocksolid2!news.neodome.net!news.uzoreto.com!aioe.org!7AktqsUqy5CCvnKa3S0Dkw.user.46.165.242.75.POSTED!not-for-mail
From: dxfo...@gmail.com (dxforth)
Newsgroups: comp.lang.forth
Subject: Re: Avoiding processor penalty by KISS and no sugar
Date: Tue, 5 Oct 2021 14:22:04 +1100
Organization: Aioe.org NNTP Server
Message-ID: <sjggcs$19k8$1@gioia.aioe.org>
References: <87464ea5-5426-4024-a5b9-5a816cdf5dd9n@googlegroups.com>
<f9ef8022-6fbd-4548-86b7-27d63b688718n@googlegroups.com>
<irqa3gF4gc8U1@mid.individual.net>
<16d947c0-af7c-4c0e-a499-cc626f7abcdcn@googlegroups.com>
<is01j7F7hjnU1@mid.individual.net>
<85c12a88-ce5e-4d19-9040-5086db070b8an@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="42632"; posting-host="7AktqsUqy5CCvnKa3S0Dkw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.14.0
Content-Language: en-GB
X-Notice: Filtered by postfilter v. 0.9.2
 by: dxforth - Tue, 5 Oct 2021 03:22 UTC

On 5/10/2021 08:49, S Jack wrote:
>
> I do recognize that reclaiming all data memory is not a high priority.
> Delete a word and if some data memory is left over, it's just taking
> up space but not causing any harm otherwise (in most cases). I don't
> want to dwell on if left over memory is harmful or not. For me it's
> get rid of it if can be reasonably done or else not worry about it.
> Of course what's "reasonable" is subjective. I can live with compound
> words and I sure many can't.

Have you lived with it? It may be a passing fancy such as quotations.
The latter having been tagged and bagged, the search is on for the next
perceived dragon to slay.

Re: Avoiding processor penalty by KISS and no sugar

<2021Oct5.082327@mips.complang.tuwien.ac.at>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=14854&group=comp.lang.forth#14854

  copy link   Newsgroups: comp.lang.forth
Path: rocksolid2!news.neodome.net!weretis.net!feeder8.news.weretis.net!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: ant...@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.lang.forth
Subject: Re: Avoiding processor penalty by KISS and no sugar
Date: Tue, 05 Oct 2021 06:23:27 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 50
Message-ID: <2021Oct5.082327@mips.complang.tuwien.ac.at>
References: <87464ea5-5426-4024-a5b9-5a816cdf5dd9n@googlegroups.com> <f9ef8022-6fbd-4548-86b7-27d63b688718n@googlegroups.com> <irqa3gF4gc8U1@mid.individual.net> <16d947c0-af7c-4c0e-a499-cc626f7abcdcn@googlegroups.com> <is01j7F7hjnU1@mid.individual.net> <85c12a88-ce5e-4d19-9040-5086db070b8an@googlegroups.com>
Injection-Info: reader02.eternal-september.org; posting-host="d09f5bc1768ed31c9b4d3a6ea0821884";
logging-data="1895"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/XhPBVlMKLB0nRQt+0/8ng"
Cancel-Lock: sha1:+3b7XbCvU9SkUz4AB7CpQM982as=
X-newsreader: xrn 10.00-beta-3
 by: Anton Ertl - Tue, 5 Oct 2021 06:23 UTC

S Jack <sdwjack69@gmail.com> writes:
>For removing branching around string data and quotation it's a matter
>of separation of strings and quotations from the main code flow. The
>separating doesn't appear to be a big deal; of course to do it
>elegantly most likely is.
>
>I'm a bit surprised that sections is getting so much attentions as if
>it's a key to this affair. Is there any real advantage of data in
>sections over data in an allocated block of dictionary memory?

Do you mean an ALLOCATEd block of memory? The disadvantage of
ALLOCATEd memory in Gforth and most other Forth systems is that it is
not saved in an image. So you would have

: foo s" bla" ;

and after putting this into an image and restoring it, foo would
produce a "string", where the address points to some place that
probably does not contain "bla", and has a good chance of being
unmapped (i.e., trying to access it produces a segmentation
violation). One could implement an image saver that can save
ALLOCATEd memory, but sections are easier to implement. For
quotations ALLOCATE is also inconvenient because you have to know the
size in advance.

Or do you mean an ALLOTed block of dictionary memory? That's the
first step towards sections: At the very least you now have to save
the dictionary pointer (DP) of the original dictionary and each of
these blocks. If you leave it at that, UNUSED will not tell you how
much of your block you have left, and more importantly, the system
cannot inform you when you have used up that block and are overwriting
parts of the dictionary not belonging to the block. You can now add a
dictionary-end pointer per block to address these things, and are
already pretty far in sections land. What you still have is that
saving the image will save all the unused data in these blocks, and
you cannot resize these blocks on image loading, but the advantage is
that image saving and loading is quite a bit simpler than if you have
resizable and (by necessity) relocatable sections.

>(hardware concern may dictate use of sections but that's an
>independent subject)

I am unaware of such hardware concerns.

- 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 2021: https://euro.theforth.net/2021

Re: Avoiding processor penalty by KISS and no sugar

<599ae14f-562b-4262-accd-9592a190215an@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=14855&group=comp.lang.forth#14855

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a37:9586:: with SMTP id x128mr13997248qkd.49.1633420421034;
Tue, 05 Oct 2021 00:53:41 -0700 (PDT)
X-Received: by 2002:a0c:ac03:: with SMTP id l3mr11487478qvb.15.1633420420892;
Tue, 05 Oct 2021 00:53:40 -0700 (PDT)
Path: rocksolid2!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Tue, 5 Oct 2021 00:53:40 -0700 (PDT)
In-Reply-To: <85c12a88-ce5e-4d19-9040-5086db070b8an@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2003:f7:1f0f:8f54:18d2:1343:64cf:cd77;
posting-account=AqNUYgoAAADmkK2pN-RKms8sww57W0Iw
NNTP-Posting-Host: 2003:f7:1f0f:8f54:18d2:1343:64cf:cd77
References: <87464ea5-5426-4024-a5b9-5a816cdf5dd9n@googlegroups.com>
<f9ef8022-6fbd-4548-86b7-27d63b688718n@googlegroups.com> <irqa3gF4gc8U1@mid.individual.net>
<16d947c0-af7c-4c0e-a499-cc626f7abcdcn@googlegroups.com> <is01j7F7hjnU1@mid.individual.net>
<85c12a88-ce5e-4d19-9040-5086db070b8an@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <599ae14f-562b-4262-accd-9592a190215an@googlegroups.com>
Subject: Re: Avoiding processor penalty by KISS and no sugar
From: minfo...@arcor.de (minf...@arcor.de)
Injection-Date: Tue, 05 Oct 2021 07:53:41 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 13
 by: minf...@arcor.de - Tue, 5 Oct 2021 07:53 UTC

S Jack schrieb am Montag, 4. Oktober 2021 um 23:49:21 UTC+2:
> On Monday, October 4, 2021 at 4:59:06 AM UTC-5, Ulrich Hoffmann wrote:
> > Hi SJack,
> MARKER , used in anticipation of deletion, was not my concern. MARKER
> deleting all after allotted memory is a tautology. The case in point
> was how could FORGET reclaim allotted memory when no deletion was
> anticipated and no preparation for deletion, such a dummy word, were
> made. Found that FORGET can reclaim memory for word constructed
> compound with data and code spaces.
Use case here:
If an exception occurs while loading a library (Forth source) or an overlay
(binary) all ponters and allotted/allocated memories are automaticall freed
in the exception handler to avoid garbage accumulation.

Re: Avoiding processor penalty by KISS and no sugar

<_5V6J.42476$tA2.24416@fx02.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=14856&group=comp.lang.forth#14856

  copy link   Newsgroups: comp.lang.forth
Path: rocksolid2!i2pn.org!paganini.bofh.team!news.dns-netz.com!news.freedyn.net!newsreader4.netcologne.de!news.netcologne.de!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx02.iad.POSTED!not-for-mail
Newsgroups: comp.lang.forth
From: branimir...@icloud.com (Branimir Maksimovic)
Subject: Re: Avoiding processor penalty by KISS and no sugar
References: <87464ea5-5426-4024-a5b9-5a816cdf5dd9n@googlegroups.com>
<f9ef8022-6fbd-4548-86b7-27d63b688718n@googlegroups.com>
<irqa3gF4gc8U1@mid.individual.net>
<16d947c0-af7c-4c0e-a499-cc626f7abcdcn@googlegroups.com>
<is01j7F7hjnU1@mid.individual.net>
<85c12a88-ce5e-4d19-9040-5086db070b8an@googlegroups.com>
<599ae14f-562b-4262-accd-9592a190215an@googlegroups.com>
User-Agent: slrn/1.0.3 (Darwin)
Lines: 25
Message-ID: <_5V6J.42476$tA2.24416@fx02.iad>
X-Complaints-To: abuse@usenet-news.net
NNTP-Posting-Date: Tue, 05 Oct 2021 09:42:18 UTC
Organization: usenet-news.net
Date: Tue, 05 Oct 2021 09:42:18 GMT
X-Received-Bytes: 2002
 by: Branimir Maksimovic - Tue, 5 Oct 2021 09:42 UTC

On 2021-10-05, minf...@arcor.de <minforth@arcor.de> wrote:
> S Jack schrieb am Montag, 4. Oktober 2021 um 23:49:21 UTC+2:
>> On Monday, October 4, 2021 at 4:59:06 AM UTC-5, Ulrich Hoffmann wrote:
>> > Hi SJack,
>> MARKER , used in anticipation of deletion, was not my concern. MARKER
>> deleting all after allotted memory is a tautology. The case in point
>> was how could FORGET reclaim allotted memory when no deletion was
>> anticipated and no preparation for deletion, such a dummy word, were
>> made. Found that FORGET can reclaim memory for word constructed
>> compound with data and code spaces.
>
> Use case here:
> If an exception occurs while loading a library (Forth source) or an overlay
> (binary) all ponters and allotted/allocated memories are automaticall freed
> in the exception handler to avoid garbage accumulation.
So that library is practically useless... Exceptions are most evil ever
invented:P

--

7-77-777
Evil Sinner!
to weak you should be meek, and you should brainfuck stronger
https://github.com/rofl0r/chaos-pp

Re: Avoiding processor penalty by KISS and no sugar

<04106bb2-0980-4d0f-a0e2-eac2c912bcfen@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=14857&group=comp.lang.forth#14857

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a37:a94a:: with SMTP id s71mr529695qke.273.1633436960970;
Tue, 05 Oct 2021 05:29:20 -0700 (PDT)
X-Received: by 2002:a37:b902:: with SMTP id j2mr14404274qkf.286.1633436960800;
Tue, 05 Oct 2021 05:29:20 -0700 (PDT)
Path: rocksolid2!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Tue, 5 Oct 2021 05:29:20 -0700 (PDT)
In-Reply-To: <sjggcs$19k8$1@gioia.aioe.org>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:3f7a:20d0:45c9:8e14:1339:c4e5;
posting-account=V5nGoQoAAAC_P2U0qnxm2kC0s1jNJXJa
NNTP-Posting-Host: 2600:1700:3f7a:20d0:45c9:8e14:1339:c4e5
References: <87464ea5-5426-4024-a5b9-5a816cdf5dd9n@googlegroups.com>
<f9ef8022-6fbd-4548-86b7-27d63b688718n@googlegroups.com> <irqa3gF4gc8U1@mid.individual.net>
<16d947c0-af7c-4c0e-a499-cc626f7abcdcn@googlegroups.com> <is01j7F7hjnU1@mid.individual.net>
<85c12a88-ce5e-4d19-9040-5086db070b8an@googlegroups.com> <sjggcs$19k8$1@gioia.aioe.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <04106bb2-0980-4d0f-a0e2-eac2c912bcfen@googlegroups.com>
Subject: Re: Avoiding processor penalty by KISS and no sugar
From: sdwjac...@gmail.com (S Jack)
Injection-Date: Tue, 05 Oct 2021 12:29:20 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 13
 by: S Jack - Tue, 5 Oct 2021 12:29 UTC

On Monday, October 4, 2021 at 10:22:08 PM UTC-5, dxforth wrote:
> Have you lived with it?
Of course not but it got my interest. I like the idea of having all the
data close at hand with the word that using it. As in this case it
allows FORGET to deal with it.

> It may be a passing fancy such as quotations.
Most likely. I'm not rewriting any existing code but am exploring with it. I often
use constants for numbers. Could put a number or two not being shared in a
data area where they could be nameless.
--
me

Re: Avoiding processor penalty by KISS and no sugar

<6b48b312-4f90-4e8b-a5e2-c21cd7ee0246n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=14858&group=comp.lang.forth#14858

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a37:bb86:: with SMTP id l128mr944170qkf.411.1633438176568;
Tue, 05 Oct 2021 05:49:36 -0700 (PDT)
X-Received: by 2002:a37:301:: with SMTP id 1mr14758056qkd.510.1633438176405;
Tue, 05 Oct 2021 05:49:36 -0700 (PDT)
Path: rocksolid2!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Tue, 5 Oct 2021 05:49:36 -0700 (PDT)
In-Reply-To: <2021Oct5.082327@mips.complang.tuwien.ac.at>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:3f7a:20d0:45c9:8e14:1339:c4e5;
posting-account=V5nGoQoAAAC_P2U0qnxm2kC0s1jNJXJa
NNTP-Posting-Host: 2600:1700:3f7a:20d0:45c9:8e14:1339:c4e5
References: <87464ea5-5426-4024-a5b9-5a816cdf5dd9n@googlegroups.com>
<f9ef8022-6fbd-4548-86b7-27d63b688718n@googlegroups.com> <irqa3gF4gc8U1@mid.individual.net>
<16d947c0-af7c-4c0e-a499-cc626f7abcdcn@googlegroups.com> <is01j7F7hjnU1@mid.individual.net>
<85c12a88-ce5e-4d19-9040-5086db070b8an@googlegroups.com> <2021Oct5.082327@mips.complang.tuwien.ac.at>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <6b48b312-4f90-4e8b-a5e2-c21cd7ee0246n@googlegroups.com>
Subject: Re: Avoiding processor penalty by KISS and no sugar
From: sdwjac...@gmail.com (S Jack)
Injection-Date: Tue, 05 Oct 2021 12:49:36 +0000
Content-Type: text/plain; charset="UTF-8"
 by: S Jack - Tue, 5 Oct 2021 12:49 UTC

On Tuesday, October 5, 2021 at 1:47:13 AM UTC-5, Anton Ertl wrote:
> S Jack <sdwj...@gmail.com> writes:
> Do you mean an ALLOCATEd block of memory? The disadvantage of
No for said reason.

> Or do you mean an ALLOTed block of dictionary memory? That's the
Yes.
The feeling was the use of sections may be convenient for some given scheme
but a mandated use of sections seems too much.

> I am unaware of such hardware concerns.
Sections give memory blocks access attributes which may apply because of type
of memory used in some address range.

--
me


devel / comp.lang.forth / Avoiding processor penalty by KISS and no sugar

Pages:12
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor