Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Computers are not intelligent. They only think they are.


devel / comp.lang.forth / Help me to save progress or source management in SwiftForth

SubjectAuthor
* Help me to save progress or source management in SwiftForthYaroslav Veremenko
+* Re: Help me to save progress or source management in SwiftForthNN
|`* Re: Help me to save progress or source management in SwiftForthYaroslav Veremenko
| +- Re: Help me to save progress or source management in SwiftForthVan Kichline
| `* Re: Help me to save progress or source management in SwiftForthVan Kichline
|  `* Re: Help me to save progress or source management in SwiftForthYaroslav Veremenko
|   `- Re: Help me to save progress or source management in SwiftForthVan Kichline
+* Re: Help me to save progress or source management in SwiftForthHeinrich Hohl
|+- Re: Help me to save progress or source management in SwiftForthYaroslav Veremenko
|`- Re: Help me to save progress or source management in SwiftForthMarcel Hendrix
+* Re: Help me to save progress or source management in SwiftForthHans Bezemer
|`- Re: Help me to save progress or source management in SwiftForthYaroslav Veremenko
+- Re: Help me to save progress or source management in SwiftForthMarc Petremann
+* Re: Help me to save progress or source management in SwiftForthAnton Ertl
|+* Re: Help me to save progress or source management in SwiftForthnone
||`* Re: Help me to save progress or source management in SwiftForthYaroslav Veremenko
|| `* Re: Help me to save progress or source management in SwiftForthnone
||  `* Re: Help me to save progress or source management in SwiftForthMarcel Hendrix
||   `- Re: Help me to save progress or source management in SwiftForthnone
|`- Re: Help me to save progress or source management in SwiftForthYaroslav Veremenko
+* Re: Help me to save progress or source management in SwiftForthDavid Gipson
|`* Re: Help me to save progress or source management in SwiftForthfabianor...@gmail.com
| `* Re: Help me to save progress or source management in SwiftForthgobli...@gmail.com
|  `* Re: Help me to save progress or source management in SwiftForthnone
|   `* Re: Help me to save progress or source management in SwiftForthDavid Gipson
|    `- Re: Help me to save progress or source management in SwiftForthDavid Gipson
+- Re: Help me to save progress or source management in SwiftForthDavid Gipson
`- Re: Help me to save progress or source management in SwiftForthHugh Aguilar

Pages:12
Help me to save progress or source management in SwiftForth

<ac636c33-606e-4f0c-a081-9e23a1d24c72n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a7b:c2a9:0:b0:3df:97b0:ba02 with SMTP id c9-20020a7bc2a9000000b003df97b0ba02mr4402808wmk.3.1678811148345;
Tue, 14 Mar 2023 09:25:48 -0700 (PDT)
X-Received: by 2002:ac8:431a:0:b0:3d2:14a0:255b with SMTP id
z26-20020ac8431a000000b003d214a0255bmr687336qtm.13.1678811147832; Tue, 14 Mar
2023 09:25:47 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.128.88.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Tue, 14 Mar 2023 09:25:47 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=50.99.115.234; posting-account=nHBeeQkAAACXl-IdmTscYoeW1Y8g1lWy
NNTP-Posting-Host: 50.99.115.234
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <ac636c33-606e-4f0c-a081-9e23a1d24c72n@googlegroups.com>
Subject: Help me to save progress or source management in SwiftForth
From: werewolf...@gmail.com (Yaroslav Veremenko)
Injection-Date: Tue, 14 Mar 2023 16:25:48 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Yaroslav Veremenko - Tue, 14 Mar 2023 16:25 UTC

Every time I try forth, I start some interpreter, type some words, then it works and I feel like I want to learn more and want to write some code to actually try it out. But every time I hit a wall.

For example yesterday I installed SwiftForth, I read the documentation and it has few pages on source management. The only word that seem to matter to me in this case is INCLUDE. But it doesn't seem to go deep into how to actually use it. This is the process that I can imagine working, but it is crude, and prone to numerous mistakes:
1. Open interpreter, write some code, test it until it works
2. Hope that SwiftForth doesn't crash and you don't loose all your progress
3. Scroll up through the history or list the words, and hope I copy paste stuff that's important to a separate text editor
4. Close SwiftForth, start it again, wait for evaluation warning to expire, manually type INCLUDE my-updated-file

SwiftForth doesn't seem to have a command line arguments help in the documentation PDF, nor there seem to be a way to reset the state of a interpreter.. At least I couldn't find any. I had similar issues with other interpreters some time back, but I can't remember anymore what they were.

I'm probably missing something obvious, or there's something I don't get.

Re: Help me to save progress or source management in SwiftForth

<fe1f2ac2-af3c-4b02-b730-15f75e24d7acn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:adf:fecb:0:b0:2cf:176e:cb36 with SMTP id q11-20020adffecb000000b002cf176ecb36mr1523690wrs.4.1678812745018;
Tue, 14 Mar 2023 09:52:25 -0700 (PDT)
X-Received: by 2002:ac8:6b4e:0:b0:3bf:f94e:70ff with SMTP id
x14-20020ac86b4e000000b003bff94e70ffmr4565123qts.6.1678812744485; Tue, 14 Mar
2023 09:52:24 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.128.87.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Tue, 14 Mar 2023 09:52:24 -0700 (PDT)
In-Reply-To: <ac636c33-606e-4f0c-a081-9e23a1d24c72n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2a00:23c5:6f05:3a01:f730:9b98:7bd9:b4bf;
posting-account=9A5f7goAAAD_QfJPZnlK3Xq_UhzYjdP-
NNTP-Posting-Host: 2a00:23c5:6f05:3a01:f730:9b98:7bd9:b4bf
References: <ac636c33-606e-4f0c-a081-9e23a1d24c72n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <fe1f2ac2-af3c-4b02-b730-15f75e24d7acn@googlegroups.com>
Subject: Re: Help me to save progress or source management in SwiftForth
From: november...@gmail.com (NN)
Injection-Date: Tue, 14 Mar 2023 16:52:25 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: NN - Tue, 14 Mar 2023 16:52 UTC

On Tuesday, 14 March 2023 at 16:25:50 UTC, Yaroslav Veremenko wrote:
> Every time I try forth, I start some interpreter, type some words, then it works and I feel like I want to learn more and want to write some code to actually try it out. But every time I hit a wall.
>
> For example yesterday I installed SwiftForth, I read the documentation and it has few pages on source management. The only word that seem to matter to me in this case is INCLUDE. But it doesn't seem to go deep into how to actually use it. This is the process that I can imagine working, but it is crude, and prone to numerous mistakes:
> 1. Open interpreter, write some code, test it until it works
> 2. Hope that SwiftForth doesn't crash and you don't loose all your progress
> 3. Scroll up through the history or list the words, and hope I copy paste stuff that's important to a separate text editor
> 4. Close SwiftForth, start it again, wait for evaluation warning to expire, manually type INCLUDE my-updated-file
>
> SwiftForth doesn't seem to have a command line arguments help in the documentation PDF, nor there seem to be a way to reset the state of a interpreter. At least I couldn't find any. I had similar issues with other interpreters some time back, but I can't remember anymore what they were.
>
> I'm probably missing something obvious, or there's something I don't get.

There are actually two answers to what I think is the question you are asking.

Here's my first answer :

I use UBUNTU + GFORTH + TERMINAL
(1) open the terminal in the folder where you want to save the file or have a file
(2) open file using GEDIT
(3) When you have looked or made changes close file
(4) open file using GFORTH
(5) If there are mistakes you can either :
(a) investigate at the GFORTH command line
(b) type BYE to exit GFORTH and return to the UBUNTU TERMINAL
(6) use up-arrow key to scroll back throw last few commands until you come to GEDIT filename
(7) press enter and you are back at (3) above

You can use the arrow keys to move backwards and forwards between the
editor and forth on the UBUNTU TERMINAL
** but remember you have to close the editor to go back to the TERMINAL
and you have to quit GFORTH to get back to the TERMINAL

Every forth system is different. This is just something you have to get used to.

Because you are updating the file or correcting errors, there should never been a
need to scroll through the history and copy and paste into an editor.

Hope that helps

Re: Help me to save progress or source management in SwiftForth

<5d2d476d-0130-42d1-a51d-482a59671a82n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:adf:fe45:0:b0:2cf:f053:a32e with SMTP id m5-20020adffe45000000b002cff053a32emr196321wrs.6.1678815391325;
Tue, 14 Mar 2023 10:36:31 -0700 (PDT)
X-Received: by 2002:aed:2798:0:b0:3d4:4b5d:1fe1 with SMTP id
a24-20020aed2798000000b003d44b5d1fe1mr118145qtd.6.1678815390719; Tue, 14 Mar
2023 10:36:30 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.128.87.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Tue, 14 Mar 2023 10:36:30 -0700 (PDT)
In-Reply-To: <fe1f2ac2-af3c-4b02-b730-15f75e24d7acn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=50.99.115.234; posting-account=nHBeeQkAAACXl-IdmTscYoeW1Y8g1lWy
NNTP-Posting-Host: 50.99.115.234
References: <ac636c33-606e-4f0c-a081-9e23a1d24c72n@googlegroups.com> <fe1f2ac2-af3c-4b02-b730-15f75e24d7acn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <5d2d476d-0130-42d1-a51d-482a59671a82n@googlegroups.com>
Subject: Re: Help me to save progress or source management in SwiftForth
From: werewolf...@gmail.com (Yaroslav Veremenko)
Injection-Date: Tue, 14 Mar 2023 17:36:31 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Yaroslav Veremenko - Tue, 14 Mar 2023 17:36 UTC

On Tuesday, March 14, 2023 at 10:52:27 AM UTC-6, NN wrote:

> Hope that helps
Well that makes way more sense. I'll just get it on WSL in windows. That's how I imagine any modern ish language work (within a context of modern OS and disks).

To those who knows, is SwiftForth somewhat weird or is it just evaluation version?
Is there a common word/process used to reset forth environment?

Reason why I want to learn forth, is I'm in the process of designing esoteric homebrew computer for fun, and I think forth would be the best fit to run as a monitor+built-in language. But I want to actually learn it properly-ish first.

Re: Help me to save progress or source management in SwiftForth

<41868da9-3068-44ea-a463-ff6371f87e38n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:600c:3d8b:b0:3df:97c0:1b5 with SMTP id bi11-20020a05600c3d8b00b003df97c001b5mr4377909wmb.5.1678815487289;
Tue, 14 Mar 2023 10:38:07 -0700 (PDT)
X-Received: by 2002:ad4:58d3:0:b0:56e:a94c:a6e5 with SMTP id
dh19-20020ad458d3000000b0056ea94ca6e5mr2995443qvb.8.1678815486586; Tue, 14
Mar 2023 10:38:06 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!2.eu.feeder.erje.net!feeder.erje.net!newsreader4.netcologne.de!news.netcologne.de!peer03.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: Tue, 14 Mar 2023 10:38:06 -0700 (PDT)
In-Reply-To: <ac636c33-606e-4f0c-a081-9e23a1d24c72n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2a01:c22:72b1:a400:e938:7e91:1504:7b16;
posting-account=mrP5kgoAAADXISqI3e5f4EXLUinHClBq
NNTP-Posting-Host: 2a01:c22:72b1:a400:e938:7e91:1504:7b16
References: <ac636c33-606e-4f0c-a081-9e23a1d24c72n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <41868da9-3068-44ea-a463-ff6371f87e38n@googlegroups.com>
Subject: Re: Help me to save progress or source management in SwiftForth
From: hheinric...@gmail.com (Heinrich Hohl)
Injection-Date: Tue, 14 Mar 2023 17:38:07 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 3463
 by: Heinrich Hohl - Tue, 14 Mar 2023 17:38 UTC

On Tuesday, March 14, 2023 at 5:25:50 PM UTC+1, Yaroslav Veremenko wrote:
> For example yesterday I installed SwiftForth, I read the documentation and it has few pages on source management. The only word that seem to matter to me in this case is INCLUDE. But it doesn't seem to go deep into how to actually use it. This is the process that I can imagine working, but it is crude, and prone to numerous mistakes:
> 1. Open interpreter, write some code, test it until it works
> 2. Hope that SwiftForth doesn't crash and you don't loose all your progress
> 3. Scroll up through the history or list the words, and hope I copy paste stuff that's important to a separate text editor
> 4. Close SwiftForth, start it again, wait for evaluation warning to expire, manually type INCLUDE my-updated-file

This method is only ok for small test and tiny applications.
I would recommend the following steps:

1. Open a text editor, e.g. Notepad
2. Type your definitions in the text editor
3. Save the text file as <name>.f

4. Copy and paste words from the text editor into the SwiftForth window
5. Test the words in SwiftForth

6. If the words do not work properly, revise the words in the text editor
7. Save the revised source file
8. Copy/paste and test the revised words again in Swiftforth

NOTE:
You will get warnings that words are redefined because your new words
override the old ones. If you don't want these warnings, type EMPTY
before pasting. This will delete all your previous definitions in SwiftForth.

9. If everything works as expected, you may also include the entire source
file into SwiftForth. For this, click the [Include a file] button in the toolbar.
This is the third button from the left with the yellow folder symbol.

I always write code in the text editor, include the file in SwiftForth, and test
everything. If something goes wrong, I revise the file, type EMPTY, and include
the revised file.

Larger applications use a load file that in turn includes libraries and other
source files.

Henry

Re: Help me to save progress or source management in SwiftForth

<35bfc7c1-36b8-4b82-af70-51e03680a4fcn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:600c:4709:b0:3e2:2107:b7f2 with SMTP id v9-20020a05600c470900b003e22107b7f2mr4365114wmo.6.1678816428901;
Tue, 14 Mar 2023 10:53:48 -0700 (PDT)
X-Received: by 2002:ad4:58e7:0:b0:5a3:c914:3511 with SMTP id
di7-20020ad458e7000000b005a3c9143511mr2452677qvb.4.1678816427956; Tue, 14 Mar
2023 10:53:47 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.uzoreto.com!feeder1.cambriumusenet.nl!feed.tweak.nl!209.85.128.87.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Tue, 14 Mar 2023 10:53:47 -0700 (PDT)
In-Reply-To: <ac636c33-606e-4f0c-a081-9e23a1d24c72n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=77.174.47.232; posting-account=Ebqe4AoAAABfjCRL4ZqOHWv4jv5ZU4Cs
NNTP-Posting-Host: 77.174.47.232
References: <ac636c33-606e-4f0c-a081-9e23a1d24c72n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <35bfc7c1-36b8-4b82-af70-51e03680a4fcn@googlegroups.com>
Subject: Re: Help me to save progress or source management in SwiftForth
From: the.beez...@gmail.com (Hans Bezemer)
Injection-Date: Tue, 14 Mar 2023 17:53:48 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Hans Bezemer - Tue, 14 Mar 2023 17:53 UTC

On Tuesday, March 14, 2023 at 5:25:50 PM UTC+1, Yaroslav Veremenko wrote:
> Every time I try forth, I start some interpreter, type some words, then it works and I feel like I want to learn more and want to write some code to actually try it out. But every time I hit a wall.
> For example yesterday I installed SwiftForth, I read the documentation and it has few pages on source management. The only word that seem to matter to me in this case is INCLUDE. But it doesn't seem to go deep into how to actually use it. This is the process that I can imagine working, but it is crude, and prone to numerous mistakes:
> 1. Open interpreter, write some code, test it until it works
> 2. Hope that SwiftForth doesn't crash and you don't loose all your progress
> 3. Scroll up through the history or list the words, and hope I copy paste stuff that's important to a separate text editor
> 4. Close SwiftForth, start it again, wait for evaluation warning to expire, manually type INCLUDE my-updated-file

Well, obviously - you haven't tried 4tH.
(a) You can use either a gcc or Turbo Pascal like frontend - it's the same compiler.
But you won't have an interpreter, since it's a "compile only" language;
(b) You don't have a splash screen;
(c) You can't crash it. The worst that can happen is an error message;
(d) You can configure the Turbo Pascal like version to use any editor you like;
(e) It supports just about any platform you can think of - with the exception of Android and IOS;
(f) It's about 95% compatible with ANS Forth.

https://sourceforge.net/projects/forth-4th/

Hans Bezemer

Re: Help me to save progress or source management in SwiftForth

<354e2dc6-4454-4afd-ba4a-ba56f4edb175n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:adf:ef8e:0:b0:2ca:ec13:e7a0 with SMTP id d14-20020adfef8e000000b002caec13e7a0mr8206868wro.8.1678816634760;
Tue, 14 Mar 2023 10:57:14 -0700 (PDT)
X-Received: by 2002:a05:6214:906:b0:5a5:b7dd:e431 with SMTP id
dj6-20020a056214090600b005a5b7dde431mr2113898qvb.1.1678816634116; Tue, 14 Mar
2023 10:57:14 -0700 (PDT)
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Tue, 14 Mar 2023 10:57:13 -0700 (PDT)
In-Reply-To: <41868da9-3068-44ea-a463-ff6371f87e38n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=50.99.115.234; posting-account=nHBeeQkAAACXl-IdmTscYoeW1Y8g1lWy
NNTP-Posting-Host: 50.99.115.234
References: <ac636c33-606e-4f0c-a081-9e23a1d24c72n@googlegroups.com> <41868da9-3068-44ea-a463-ff6371f87e38n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <354e2dc6-4454-4afd-ba4a-ba56f4edb175n@googlegroups.com>
Subject: Re: Help me to save progress or source management in SwiftForth
From: werewolf...@gmail.com (Yaroslav Veremenko)
Injection-Date: Tue, 14 Mar 2023 17:57:14 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Yaroslav Veremenko - Tue, 14 Mar 2023 17:57 UTC

On Tuesday, March 14, 2023 at 11:38:09 AM UTC-6, Heinrich Hohl wrote:

> 4. Copy and paste words from the text editor into the SwiftForth window
> 5. Test the words in SwiftForth

Still, this doesn't feel like the correct way of doing things though. I'd rather use gforth, it can be automated very easily.

> You will get warnings that words are redefined because your new words
> override the old ones. If you don't want these warnings, type EMPTY
> before pasting. This will delete all your previous definitions in SwiftForth.

That explains it. The word is not mentioned in the word index of documentation, and only briefly mentioned in the text.

Re: Help me to save progress or source management in SwiftForth

<ab9cff8e-0702-45f5-b9aa-5f1bc850c4afn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:600c:9:b0:3df:d8c9:caa1 with SMTP id g9-20020a05600c000900b003dfd8c9caa1mr4305930wmc.1.1678816848361;
Tue, 14 Mar 2023 11:00:48 -0700 (PDT)
X-Received: by 2002:a05:6214:8c9:b0:56e:f63b:634e with SMTP id
da9-20020a05621408c900b0056ef63b634emr3223819qvb.6.1678816847863; Tue, 14 Mar
2023 11:00:47 -0700 (PDT)
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Tue, 14 Mar 2023 11:00:47 -0700 (PDT)
In-Reply-To: <41868da9-3068-44ea-a463-ff6371f87e38n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2001:1c05:2f18:6d00:a1f1:72f8:2c58:5b3d;
posting-account=-JQ2RQoAAAB6B5tcBTSdvOqrD1HpT_Rk
NNTP-Posting-Host: 2001:1c05:2f18:6d00:a1f1:72f8:2c58:5b3d
References: <ac636c33-606e-4f0c-a081-9e23a1d24c72n@googlegroups.com> <41868da9-3068-44ea-a463-ff6371f87e38n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <ab9cff8e-0702-45f5-b9aa-5f1bc850c4afn@googlegroups.com>
Subject: Re: Help me to save progress or source management in SwiftForth
From: mhx...@iae.nl (Marcel Hendrix)
Injection-Date: Tue, 14 Mar 2023 18:00:48 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Marcel Hendrix - Tue, 14 Mar 2023 18:00 UTC

On Tuesday, March 14, 2023 at 6:38:09 PM UTC+1, Heinrich Hohl wrote:
[..]
> I always write code in the text editor, include the file in SwiftForth, and test
> everything. If something goes wrong, I revise the file, type EMPTY, and include
> the revised file.

I always use ANEW -marker . You can do

[DEFINED] -foo [IF] -foo [THEN] MARKER -foo

at the start of the file (or define ANEW).

Bigger applications will use NEEDS -file etc.. ( or NEED or ... )

I also have "WHAT" . Type WHAT when a load error happens, and it will
jump into the file being included, at the correct line and cursor position.

LOCATE was mentioned already, HELP <name> may also work.
WORDS is normally extended to take a regular expression operand:

FORTH> WORDS: FILE
LIST-OPEN-FILES ?FILE$ ?FILE CURRENT-FILE:
SLURP-FILE(3) SLURP-FILE(2) SLURP-FILE(1) SLURP-FILE
FILE-BIRTH FILE-TIME FILE-EXISTS? FILE-HERE
ONLY-BASEFILENAME ONLY-FILENAME CURRENT-FILE= FILE-I//O
INCLUDE-FILE FILE-SIZE FILE-POSITION REPOSITION-FILE
RESIZE-FILE FLUSH-FILE WRITE-FILE
READ-FILE SEEK-FILE CLOSE-FILE OPEN-FILE
FILE-STATUS RENAME-FILE DELETE-FILE CREATE-FILE
MAP-FILE SOURCEFILENAME ?FILE logfile

There should be many more helper words like the above (in SwiftForth).

-marcel

Re: Help me to save progress or source management in SwiftForth

<86b3eadc-e96e-4f10-879a-ee9933a6e185n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a7b:c843:0:b0:3eb:3e75:5db2 with SMTP id c3-20020a7bc843000000b003eb3e755db2mr3740585wml.2.1678837627375;
Tue, 14 Mar 2023 16:47:07 -0700 (PDT)
X-Received: by 2002:ac8:4088:0:b0:3d4:35ee:b907 with SMTP id
p8-20020ac84088000000b003d435eeb907mr426373qtl.9.1678837626828; Tue, 14 Mar
2023 16:47:06 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.128.87.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Tue, 14 Mar 2023 16:47:06 -0700 (PDT)
In-Reply-To: <5d2d476d-0130-42d1-a51d-482a59671a82n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=50.46.219.106; posting-account=VRZdRQoAAAByg2veNn4xonsritzF12hS
NNTP-Posting-Host: 50.46.219.106
References: <ac636c33-606e-4f0c-a081-9e23a1d24c72n@googlegroups.com>
<fe1f2ac2-af3c-4b02-b730-15f75e24d7acn@googlegroups.com> <5d2d476d-0130-42d1-a51d-482a59671a82n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <86b3eadc-e96e-4f10-879a-ee9933a6e185n@googlegroups.com>
Subject: Re: Help me to save progress or source management in SwiftForth
From: vkichl...@gmail.com (Van Kichline)
Injection-Date: Tue, 14 Mar 2023 23:47:07 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Van Kichline - Tue, 14 Mar 2023 23:47 UTC

On Tuesday, March 14, 2023 at 10:36:33 AM UTC-7, Yaroslav Veremenko wrote:
....
> Well that makes way more sense. I'll just get it on WSL in windows. That's how I imagine any modern ish language work (within a context of modern OS and disks).
....
Since you use Windows and WSL: I use VS Code to edit source. There are a couple colorizers for Forth in the Code extensions. Open a terminal window and run bash to start WSL. Then you can edit, save, and in bash just type 'gforth myfilename.f' to run.
There is a word called 'marker' you can use to define a point in the dictionary to forget back to and kind of restore your environment, but saying 'bye' and pressing the up arrow to reenter your bash command line to reload you file is fast and easy. Just remember to save your source file manually before running. I'm sure there's a way to configure Code to do this for you, but it hasn't been a painful enough problem for me to deal with yet.

Re: Help me to save progress or source management in SwiftForth

<0bb333d3-8ab7-499f-a042-1567c2977043n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:adf:cd8d:0:b0:2c7:1dd1:41e8 with SMTP id q13-20020adfcd8d000000b002c71dd141e8mr152771wrj.14.1678838086477;
Tue, 14 Mar 2023 16:54:46 -0700 (PDT)
X-Received: by 2002:a05:620a:b44:b0:745:72b3:304e with SMTP id
x4-20020a05620a0b4400b0074572b3304emr2647122qkg.1.1678838085759; Tue, 14 Mar
2023 16:54:45 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.128.88.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Tue, 14 Mar 2023 16:54:45 -0700 (PDT)
In-Reply-To: <5d2d476d-0130-42d1-a51d-482a59671a82n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=50.46.219.106; posting-account=VRZdRQoAAAByg2veNn4xonsritzF12hS
NNTP-Posting-Host: 50.46.219.106
References: <ac636c33-606e-4f0c-a081-9e23a1d24c72n@googlegroups.com>
<fe1f2ac2-af3c-4b02-b730-15f75e24d7acn@googlegroups.com> <5d2d476d-0130-42d1-a51d-482a59671a82n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <0bb333d3-8ab7-499f-a042-1567c2977043n@googlegroups.com>
Subject: Re: Help me to save progress or source management in SwiftForth
From: vkichl...@gmail.com (Van Kichline)
Injection-Date: Tue, 14 Mar 2023 23:54:46 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Van Kichline - Tue, 14 Mar 2023 23:54 UTC

On Tuesday, March 14, 2023 at 10:36:33 AM UTC-7, Yaroslav Veremenko wrote:
> On Tuesday, March 14, 2023 at 10:52:27 AM UTC-6, NN wrote:
>
> > Hope that helps
> Well that makes way more sense. I'll just get it on WSL in windows. That's how I imagine any modern ish language work (within a context of modern OS and disks).
>
> To those who knows, is SwiftForth somewhat weird or is it just evaluation version?
> Is there a common word/process used to reset forth environment?
>
> Reason why I want to learn forth, is I'm in the process of designing esoteric homebrew computer for fun, and I think forth would be the best fit to run as a monitor+built-in language. But I want to actually learn it properly-ish first.

SwiftForth is a professional development system. A license is a bit expensive, but I understand the evaluation version never expires. (It does post dialogs on open and close.)
> I'm in the process of designing esoteric homebrew computer for fun
Me too! I think you're exactly right, Forth is perfect for this. Using block files, a microcontroller with eeprom would be a complete system using block files (the way Forth interacted with disk long ago.) gForth supports block files, but the editor is absolutely minimal. Learn Forth first, then look into block files. I have gone about it the other way and I don't recommend it.

Re: Help me to save progress or source management in SwiftForth

<899596a1-ac27-4a55-ab47-a90c618793c4n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:600c:54cd:b0:3ed:23ec:3268 with SMTP id iw13-20020a05600c54cd00b003ed23ec3268mr2632495wmb.2.1678852301321;
Tue, 14 Mar 2023 20:51:41 -0700 (PDT)
X-Received: by 2002:a05:6214:a6a:b0:56b:e002:75df with SMTP id
ef10-20020a0562140a6a00b0056be00275dfmr3335363qvb.5.1678852300816; Tue, 14
Mar 2023 20:51:40 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.128.87.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Tue, 14 Mar 2023 20:51:40 -0700 (PDT)
In-Reply-To: <35bfc7c1-36b8-4b82-af70-51e03680a4fcn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=50.99.115.234; posting-account=nHBeeQkAAACXl-IdmTscYoeW1Y8g1lWy
NNTP-Posting-Host: 50.99.115.234
References: <ac636c33-606e-4f0c-a081-9e23a1d24c72n@googlegroups.com> <35bfc7c1-36b8-4b82-af70-51e03680a4fcn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <899596a1-ac27-4a55-ab47-a90c618793c4n@googlegroups.com>
Subject: Re: Help me to save progress or source management in SwiftForth
From: werewolf...@gmail.com (Yaroslav Veremenko)
Injection-Date: Wed, 15 Mar 2023 03:51:41 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Yaroslav Veremenko - Wed, 15 Mar 2023 03:51 UTC

On Tuesday, March 14, 2023 at 11:53:51 AM UTC-6, Hans Bezemer wrote:
> Well, obviously - you haven't tried 4tH.

Thanks, I'll look into it. For now gforth works fell for me, but I saved the installer and the source. Is it possible to release win version without an installer?

Re: Help me to save progress or source management in SwiftForth

<725068ce-f01e-46b1-b926-f6cfd5c72408n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:600c:3512:b0:3df:d8c9:caa9 with SMTP id h18-20020a05600c351200b003dfd8c9caa9mr4784509wmq.7.1678857915617;
Tue, 14 Mar 2023 22:25:15 -0700 (PDT)
X-Received: by 2002:a05:620a:1389:b0:743:9b78:d97e with SMTP id
k9-20020a05620a138900b007439b78d97emr3904509qki.14.1678857915025; Tue, 14 Mar
2023 22:25:15 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.128.87.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Tue, 14 Mar 2023 22:25:14 -0700 (PDT)
In-Reply-To: <0bb333d3-8ab7-499f-a042-1567c2977043n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=50.99.115.234; posting-account=nHBeeQkAAACXl-IdmTscYoeW1Y8g1lWy
NNTP-Posting-Host: 50.99.115.234
References: <ac636c33-606e-4f0c-a081-9e23a1d24c72n@googlegroups.com>
<fe1f2ac2-af3c-4b02-b730-15f75e24d7acn@googlegroups.com> <5d2d476d-0130-42d1-a51d-482a59671a82n@googlegroups.com>
<0bb333d3-8ab7-499f-a042-1567c2977043n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <725068ce-f01e-46b1-b926-f6cfd5c72408n@googlegroups.com>
Subject: Re: Help me to save progress or source management in SwiftForth
From: werewolf...@gmail.com (Yaroslav Veremenko)
Injection-Date: Wed, 15 Mar 2023 05:25:15 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Yaroslav Veremenko - Wed, 15 Mar 2023 05:25 UTC

On Tuesday, March 14, 2023 at 5:54:49 PM UTC-6, Van Kichline wrote:
> I'm sure there's a way to configure Code to do this for you, but it hasn't been a painful enough problem for me to deal with yet.

It's actually quite simple. .vscode/tasks.json
{ // See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "build",
"type": "shell",
"command": "bash",
"args": [
"-c",
"\"gforth main.f\""
]
}
]
}

> Me too! I think you're exactly right, Forth is perfect for this. Using block files, a microcontroller with eeprom would be a complete system using block files (the way Forth interacted with disk long ago.) gForth supports block files, but the editor is absolutely minimal. Learn Forth first, then look into block files. I have gone about it the other way and I don't recommend it.

I've looked at the CollapseOS today, it has a tiny editor called VE that works on a block system.

Re: Help me to save progress or source management in SwiftForth

<d79dc7c0-0219-4812-8d1a-032e2b75a898n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:620a:5c:b0:733:4e2d:7834 with SMTP id t28-20020a05620a005c00b007334e2d7834mr5867062qkt.4.1678934157921;
Wed, 15 Mar 2023 19:35:57 -0700 (PDT)
X-Received: by 2002:a05:620a:14ad:b0:746:3907:8f with SMTP id
x13-20020a05620a14ad00b007463907008fmr2033qkj.8.1678934157621; Wed, 15 Mar
2023 19:35:57 -0700 (PDT)
Path: i2pn2.org!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: Wed, 15 Mar 2023 19:35:57 -0700 (PDT)
In-Reply-To: <725068ce-f01e-46b1-b926-f6cfd5c72408n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=50.46.219.106; posting-account=VRZdRQoAAAByg2veNn4xonsritzF12hS
NNTP-Posting-Host: 50.46.219.106
References: <ac636c33-606e-4f0c-a081-9e23a1d24c72n@googlegroups.com>
<fe1f2ac2-af3c-4b02-b730-15f75e24d7acn@googlegroups.com> <5d2d476d-0130-42d1-a51d-482a59671a82n@googlegroups.com>
<0bb333d3-8ab7-499f-a042-1567c2977043n@googlegroups.com> <725068ce-f01e-46b1-b926-f6cfd5c72408n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <d79dc7c0-0219-4812-8d1a-032e2b75a898n@googlegroups.com>
Subject: Re: Help me to save progress or source management in SwiftForth
From: vkichl...@gmail.com (Van Kichline)
Injection-Date: Thu, 16 Mar 2023 02:35:57 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Van Kichline - Thu, 16 Mar 2023 02:35 UTC

On Tuesday, March 14, 2023 at 10:25:18 PM UTC-7, Yaroslav Veremenko wrote:
> On Tuesday, March 14, 2023 at 5:54:49 PM UTC-6, Van Kichline wrote:
> > I'm sure there's a way to configure Code to do this for you, but it hasn't been a painful enough problem for me to deal with yet.
> It's actually quite simple. .vscode/tasks.json
> {
> // See https://go.microsoft.com/fwlink/?LinkId=733558
> // for the documentation about the tasks.json format
> "version": "2.0.0",
> "tasks": [
> {
> "label": "build",
> "type": "shell",
> "command": "bash",
> "args": [
> "-c",
> "\"gforth main.f\""
> ]
> }
> ]
> }

Thanks for this!

Re: Help me to save progress or source management in SwiftForth

<c1e1a9e8-dc2b-46e9-860a-f90eceb31f13n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:ad4:55c8:0:b0:5a3:c23e:d4c4 with SMTP id bt8-20020ad455c8000000b005a3c23ed4c4mr3932080qvb.6.1678956347822;
Thu, 16 Mar 2023 01:45:47 -0700 (PDT)
X-Received: by 2002:a05:6214:9a1:b0:56f:80e:701b with SMTP id
du1-20020a05621409a100b0056f080e701bmr4489588qvb.2.1678956347489; Thu, 16 Mar
2023 01:45:47 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.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: Thu, 16 Mar 2023 01:45:47 -0700 (PDT)
In-Reply-To: <ac636c33-606e-4f0c-a081-9e23a1d24c72n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=90.37.67.52; posting-account=xbxuywoAAAASFWsQBmiz40gnxDBWDrxx
NNTP-Posting-Host: 90.37.67.52
References: <ac636c33-606e-4f0c-a081-9e23a1d24c72n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <c1e1a9e8-dc2b-46e9-860a-f90eceb31f13n@googlegroups.com>
Subject: Re: Help me to save progress or source management in SwiftForth
From: mpetrema...@gmail.com (Marc Petremann)
Injection-Date: Thu, 16 Mar 2023 08:45:47 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 1802
 by: Marc Petremann - Thu, 16 Mar 2023 08:45 UTC

Le mardi 14 mars 2023 à 17:25:50 UTC+1, Yaroslav Veremenko a écrit :
> Every time I try forth, I start some interpreter, type some words, then it works and I feel like I want to learn more and want to write some code to actually try it out. But every time I hit a wall.
>
> I'm probably missing something obvious, or there's something I don't get.

Try eFORTH for WINDOWS or LINUX:
https://eforth.arduino-forth.com/article/elements_introduction

Edit and INCLUDE files for eFORTH:
https://eforth.arduino-forth.com/article/installation_windows_instalWindows

Re: Help me to save progress or source management in SwiftForth

<2023Mar16.095129@mips.complang.tuwien.ac.at>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: ant...@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.lang.forth
Subject: Re: Help me to save progress or source management in SwiftForth
Date: Thu, 16 Mar 2023 08:51:29 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 62
Message-ID: <2023Mar16.095129@mips.complang.tuwien.ac.at>
References: <ac636c33-606e-4f0c-a081-9e23a1d24c72n@googlegroups.com>
Injection-Info: reader01.eternal-september.org; posting-host="12f5c94d3c9e96ebb289675542beefc0";
logging-data="1431832"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1855fiiuQa5Ryc3TOrF+jz+"
Cancel-Lock: sha1:9hOi5rRpAHt+ja1DL+NvTvijuuU=
X-newsreader: xrn 10.11
 by: Anton Ertl - Thu, 16 Mar 2023 08:51 UTC

Yaroslav Veremenko <werewolfprankster@gmail.com> writes:
>For example yesterday I installed SwiftForth, I read the documentation and =
>it has few pages on source management. The only word that seem to matter to=
> me in this case is INCLUDE. But it doesn't seem to go deep into how to act=
>ually use it. This is the process that I can imagine working, but it is cru=
>de, and prone to numerous mistakes:
>1. Open interpreter, write some code, test it until it works
>2. Hope that SwiftForth doesn't crash and you don't loose all your progress
>3. Scroll up through the history or list the words, and hope I copy paste s=
>tuff that's important to a separate text editor
>4. Close SwiftForth, start it again, wait for evaluation warning to expire,=
> manually type INCLUDE my-updated-file

The usual way I develop code is to write it in an editor (Emacs in my
case) that runs in parallel with a terminal window. When I want to
test and debug the code, I save it in the editor without closing the
editor, and start the Forth system in the terminal window such that it
loads the code and typically also runs it; e.g., with Gforth

gforth program.4th -e "<code> bye"

where <code> exercises the words we are currently interested in. Then
I can just continue editing the code without having to restart the
editor. Sometimes I just load the program and do interactive testing
and examining, but for debugging, I usually do the setup above. It
allows me to just run the test again by typing cursor up and enter
after inserting tracers or other debugging aids in the source code, or
after an attempt to fix the bug.

In SwiftForth you could do the equivalent with

sf "include program.4th <code> bye"

but SwiftForth is less convenient when the code produces an exception,
as it requires the user to answer a prompt.

>SwiftForth doesn't seem to have a command line arguments help in the docume=
>ntation PDF

Many Forth systems, incluing SwiftForth, but not Gforth,
text-interpret the first command-line argument (or all of them).

>nor there seem to be a way to reset the state of a interpreter=
>.

Maybe COLD. Or you could set a marker at the start of the program and
then run it when you want to reset it:

marker reset include program.4th
....
reset
marker reset include program.4th

But note that the marker does not reset any corruption you may have
left in the Forth system, it just forgets the program.

- 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: https://forth-standard.org/
EuroForth 2022: https://euro.theforth.net

Re: Help me to save progress or source management in SwiftForth

<nnd$187d61fc$52c77f27@b37084ecd3abdeec>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
Newsgroups: comp.lang.forth
References: <ac636c33-606e-4f0c-a081-9e23a1d24c72n@googlegroups.com> <2023Mar16.095129@mips.complang.tuwien.ac.at>
Subject: Re: Help me to save progress or source management in SwiftForth
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
From: alb...@cherry (none)
Originator: albert@cherry.(none) (albert)
Message-ID: <nnd$187d61fc$52c77f27@b37084ecd3abdeec>
Organization: KPN B.V.
Date: Thu, 16 Mar 2023 13:35:02 +0100
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!feeder1.feed.usenet.farm!feed.usenet.farm!peer01.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!feed.abavia.com!abe006.abavia.com!abp002.abavia.com!news.kpn.nl!not-for-mail
Lines: 40
Injection-Date: Thu, 16 Mar 2023 13:35:02 +0100
Injection-Info: news.kpn.nl; mail-complaints-to="abuse@kpn.com"
X-Received-Bytes: 2060
 by: none - Thu, 16 Mar 2023 12:35 UTC

In article <2023Mar16.095129@mips.complang.tuwien.ac.at>,
Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote:
>Yaroslav Veremenko <werewolfprankster@gmail.com> writes:
<SNIP>
>>nor there seem to be a way to reset the state of a interpreter=
>>.
>
>Maybe COLD. Or you could set a marker at the start of the program and
>then run it when you want to reset it:
>
>marker reset include program.4th
>...
>reset
>marker reset include program.4th
>
>But note that the marker does not reset any corruption you may have
>left in the Forth system, it just forgets the program.

I don't bother with MARKER's. There is enough space to load a program
a second and third time.

Also I find no need to save a program's source all the time.
I can easily select a single definition in my editor and paste it in
Forth.

For a complicated system like the optimiser I'm working on,
I rely on REGRESS statements in the source, as a tiny difference
can trigger a failed test unexpectedly.

Different approaches suit different situation.

>- anton

Groetjes Albert
--
Don't praise the day before the evening. One swallow doesn't make spring.
You must not say "hey" before you have crossed the bridge. Don't sell the
hide of the bear until you shot it. Better one bird in the hand than ten in
the air. First gain is a cat spinning. - the Wise from Antrim -

Re: Help me to save progress or source management in SwiftForth

<2e550432-ded6-4254-97ca-6d28818ae1e6n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:622a:5a0e:b0:3df:dfa7:fa84 with SMTP id fy14-20020a05622a5a0e00b003dfdfa7fa84mr1828158qtb.0.1679336180116;
Mon, 20 Mar 2023 11:16:20 -0700 (PDT)
X-Received: by 2002:a37:f610:0:b0:746:9aff:f324 with SMTP id
y16-20020a37f610000000b007469afff324mr3922qkj.10.1679336179874; Mon, 20 Mar
2023 11:16:19 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!panix!diablo1.usenet.blueworldhosting.com!usenet.blueworldhosting.com!peer01.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, 20 Mar 2023 11:16:19 -0700 (PDT)
In-Reply-To: <2023Mar16.095129@mips.complang.tuwien.ac.at>
Injection-Info: google-groups.googlegroups.com; posting-host=50.99.115.234; posting-account=nHBeeQkAAACXl-IdmTscYoeW1Y8g1lWy
NNTP-Posting-Host: 50.99.115.234
References: <ac636c33-606e-4f0c-a081-9e23a1d24c72n@googlegroups.com> <2023Mar16.095129@mips.complang.tuwien.ac.at>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <2e550432-ded6-4254-97ca-6d28818ae1e6n@googlegroups.com>
Subject: Re: Help me to save progress or source management in SwiftForth
From: werewolf...@gmail.com (Yaroslav Veremenko)
Injection-Date: Mon, 20 Mar 2023 18:16:20 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 1605
 by: Yaroslav Veremenko - Mon, 20 Mar 2023 18:16 UTC

On Thursday, March 16, 2023 at 3:10:04 AM UTC-6, Anton Ertl wrote:
> gforth program.4th -e "<code> bye"

Agreed. Now that I feel myself a bit more comfortable, I find using gforth much more convenient. Especially with a trial splash screen of SwiftForth. Reason I was asking about the reset is to avoid waiting on that splash screen.

Re: Help me to save progress or source management in SwiftForth

<6735cd5c-db1b-4a8d-9c07-77e8778168bfn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:622a:198b:b0:3e0:e195:ebe8 with SMTP id u11-20020a05622a198b00b003e0e195ebe8mr28930qtc.8.1679336258123;
Mon, 20 Mar 2023 11:17:38 -0700 (PDT)
X-Received: by 2002:a05:622a:1aa8:b0:3df:f0cf:97e with SMTP id
s40-20020a05622a1aa800b003dff0cf097emr26260qtc.13.1679336257803; Mon, 20 Mar
2023 11:17:37 -0700 (PDT)
Path: i2pn2.org!i2pn.org!diablo1.usenet.blueworldhosting.com!usenet.blueworldhosting.com!peer01.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, 20 Mar 2023 11:17:37 -0700 (PDT)
In-Reply-To: <nnd$187d61fc$52c77f27@b37084ecd3abdeec>
Injection-Info: google-groups.googlegroups.com; posting-host=50.99.115.234; posting-account=nHBeeQkAAACXl-IdmTscYoeW1Y8g1lWy
NNTP-Posting-Host: 50.99.115.234
References: <ac636c33-606e-4f0c-a081-9e23a1d24c72n@googlegroups.com>
<2023Mar16.095129@mips.complang.tuwien.ac.at> <nnd$187d61fc$52c77f27@b37084ecd3abdeec>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <6735cd5c-db1b-4a8d-9c07-77e8778168bfn@googlegroups.com>
Subject: Re: Help me to save progress or source management in SwiftForth
From: werewolf...@gmail.com (Yaroslav Veremenko)
Injection-Date: Mon, 20 Mar 2023 18:17:38 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 1642
 by: Yaroslav Veremenko - Mon, 20 Mar 2023 18:17 UTC

On Thursday, March 16, 2023 at 6:35:06 AM UTC-6, none albert wrote:

> For a complicated system like the optimiser I'm working on,
> I rely on REGRESS statements in the source, as a tiny difference
> can trigger a failed test unexpectedly.
What are those? Quick google in the docs or forth standard website doesn't give me any hits.

Re: Help me to save progress or source management in SwiftForth

<nnd$7eb06f2c$6a201845@db2093ce977a54ba>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
Newsgroups: comp.lang.forth
References: <ac636c33-606e-4f0c-a081-9e23a1d24c72n@googlegroups.com> <2023Mar16.095129@mips.complang.tuwien.ac.at> <nnd$187d61fc$52c77f27@b37084ecd3abdeec> <6735cd5c-db1b-4a8d-9c07-77e8778168bfn@googlegroups.com>
Subject: Re: Help me to save progress or source management in SwiftForth
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
From: alb...@cherry (none)
Originator: albert@cherry.(none) (albert)
Message-ID: <nnd$7eb06f2c$6a201845@db2093ce977a54ba>
Organization: KPN B.V.
Date: Tue, 21 Mar 2023 10:14:54 +0100
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.uzoreto.com!peer02.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!feed.abavia.com!abe006.abavia.com!abp001.abavia.com!news.kpn.nl!not-for-mail
Lines: 25
Injection-Date: Tue, 21 Mar 2023 10:14:54 +0100
Injection-Info: news.kpn.nl; mail-complaints-to="abuse@kpn.com"
X-Received-Bytes: 1852
 by: none - Tue, 21 Mar 2023 09:14 UTC

In article <6735cd5c-db1b-4a8d-9c07-77e8778168bfn@googlegroups.com>,
Yaroslav Veremenko <werewolfprankster@gmail.com> wrote:
>On Thursday, March 16, 2023 at 6:35:06 AM UTC-6, none albert wrote:
>
>> For a complicated system like the optimiser I'm working on,
>> I rely on REGRESS statements in the source, as a tiny difference
>> can trigger a failed test unexpectedly.
>What are those? Quick google in the docs or forth standard website
>doesn't give me any hits.

I have discussed this at this panel. They are like C's assert().
They perform a test and failing that, they kill the program's
compilation, giving additional information.
In production REGRESS is redefined as a comment.
An example is
: add ... ;
REGRESS 1 2 add S: 3

Groetjes Albert
--
Don't praise the day before the evening. One swallow doesn't make spring.
You must not say "hey" before you have crossed the bridge. Don't sell the
hide of the bear until you shot it. Better one bird in the hand than ten in
the air. First gain is a cat spinning. - the Wise from Antrim -

Re: Help me to save progress or source management in SwiftForth

<6d17d83f-d98e-4a21-84a0-b8e7915e00c1n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a37:a0e:0:b0:746:a161:7dc2 with SMTP id 14-20020a370a0e000000b00746a1617dc2mr124981qkk.1.1679392933108;
Tue, 21 Mar 2023 03:02:13 -0700 (PDT)
X-Received: by 2002:a05:620a:4412:b0:72b:25b4:565d with SMTP id
v18-20020a05620a441200b0072b25b4565dmr4266073qkp.3.1679392932870; Tue, 21 Mar
2023 03:02:12 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.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: Tue, 21 Mar 2023 03:02:12 -0700 (PDT)
In-Reply-To: <nnd$7eb06f2c$6a201845@db2093ce977a54ba>
Injection-Info: google-groups.googlegroups.com; posting-host=2001:1c05:2f18:6d00:a02a:fe9c:9363:31e3;
posting-account=-JQ2RQoAAAB6B5tcBTSdvOqrD1HpT_Rk
NNTP-Posting-Host: 2001:1c05:2f18:6d00:a02a:fe9c:9363:31e3
References: <ac636c33-606e-4f0c-a081-9e23a1d24c72n@googlegroups.com>
<2023Mar16.095129@mips.complang.tuwien.ac.at> <nnd$187d61fc$52c77f27@b37084ecd3abdeec>
<6735cd5c-db1b-4a8d-9c07-77e8778168bfn@googlegroups.com> <nnd$7eb06f2c$6a201845@db2093ce977a54ba>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <6d17d83f-d98e-4a21-84a0-b8e7915e00c1n@googlegroups.com>
Subject: Re: Help me to save progress or source management in SwiftForth
From: mhx...@iae.nl (Marcel Hendrix)
Injection-Date: Tue, 21 Mar 2023 10:02:13 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 1946
 by: Marcel Hendrix - Tue, 21 Mar 2023 10:02 UTC

On Tuesday, March 21, 2023 at 10:14:58 AM UTC+1, none albert wrote:
[..]
> I have discussed this at this panel. They are like C's assert().
> They perform a test and failing that, they kill the program's
> compilation, giving additional information.
> In production REGRESS is redefined as a comment.
> An example is
> : add ... ;
> REGRESS 1 2 add S: 3
> Groetjes Albert

Just curious: do you some statistics on REGRESS ? (How many triggers
do you have once debugging is over?)

-marcel

Re: Help me to save progress or source management in SwiftForth

<nnd$12330571$6fc9054d@bafb809007b29fd7>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
Newsgroups: comp.lang.forth
References: <ac636c33-606e-4f0c-a081-9e23a1d24c72n@googlegroups.com> <6735cd5c-db1b-4a8d-9c07-77e8778168bfn@googlegroups.com> <nnd$7eb06f2c$6a201845@db2093ce977a54ba> <6d17d83f-d98e-4a21-84a0-b8e7915e00c1n@googlegroups.com>
Subject: Re: Help me to save progress or source management in SwiftForth
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
From: alb...@cherry (none)
Originator: albert@cherry.(none) (albert)
Message-ID: <nnd$12330571$6fc9054d@bafb809007b29fd7>
Organization: KPN B.V.
Date: Tue, 21 Mar 2023 12:10:47 +0100
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!feeder1.feed.usenet.farm!feed.usenet.farm!peer02.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!feed.abavia.com!abe004.abavia.com!abp003.abavia.com!news.kpn.nl!not-for-mail
Lines: 37
Injection-Date: Tue, 21 Mar 2023 12:10:47 +0100
Injection-Info: news.kpn.nl; mail-complaints-to="abuse@kpn.com"
X-Received-Bytes: 2235
 by: none - Tue, 21 Mar 2023 11:10 UTC

In article <6d17d83f-d98e-4a21-84a0-b8e7915e00c1n@googlegroups.com>,
Marcel Hendrix <mhx@iae.nl> wrote:
>On Tuesday, March 21, 2023 at 10:14:58 AM UTC+1, none albert wrote:
>[..]
>> I have discussed this at this panel. They are like C's assert().
>> They perform a test and failing that, they kill the program's
>> compilation, giving additional information.
>> In production REGRESS is redefined as a comment.
>> An example is
>> : add ... ;
>> REGRESS 1 2 add S: 3
>> Groetjes Albert
>
>Just curious: do you some statistics on REGRESS ? (How many triggers
>do you have once debugging is over?)

Essentially none. A typical situation is an Euler problem.
I keep all those asserts. At a certain point the test/toy cases
are over, and I have to alter e.g. the underlying data structures for
speed. This is the point where Chuck Moore starts over.
Then I rely on the asserts, to keep the program running.
That is stage two of the development, what you would call
debugging. It is less nerve wrecking to do clean ups.

assert's trigger occasionally, depending on the
problem at hand.

>
>-marcel

Groetjes Albert
--
Don't praise the day before the evening. One swallow doesn't make spring.
You must not say "hey" before you have crossed the bridge. Don't sell the
hide of the bear until you shot it. Better one bird in the hand than ten in
the air. First gain is a cat spinning. - the Wise from Antrim -

Re: Help me to save progress or source management in SwiftForth

<94eb3dcc-2639-46ac-916f-6bdcd97aa212n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:ad4:4e03:0:b0:63c:e9d7:2ea5 with SMTP id dl3-20020ad44e03000000b0063ce9d72ea5mr216qvb.5.1690212894611;
Mon, 24 Jul 2023 08:34:54 -0700 (PDT)
X-Received: by 2002:a05:6808:1a0e:b0:3a5:a925:826b with SMTP id
bk14-20020a0568081a0e00b003a5a925826bmr11492801oib.2.1690212894415; Mon, 24
Jul 2023 08:34:54 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.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, 24 Jul 2023 08:34:54 -0700 (PDT)
In-Reply-To: <ac636c33-606e-4f0c-a081-9e23a1d24c72n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1009:b144:b7e0:d503:a6c0:e8c5:580a;
posting-account=yu67hAoAAAAH9vI7F6QVNcMTGtmOy458
NNTP-Posting-Host: 2600:1009:b144:b7e0:d503:a6c0:e8c5:580a
References: <ac636c33-606e-4f0c-a081-9e23a1d24c72n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <94eb3dcc-2639-46ac-916f-6bdcd97aa212n@googlegroups.com>
Subject: Re: Help me to save progress or source management in SwiftForth
From: dgipson...@gmail.com (David Gipson)
Injection-Date: Mon, 24 Jul 2023 15:34:54 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 3830
 by: David Gipson - Mon, 24 Jul 2023 15:34 UTC

On Tuesday, March 14, 2023 at 12:25:50 PM UTC-4, Yaroslav Veremenko wrote:
> Every time I try forth, I start some interpreter, type some words, then it works and I feel like I want to learn more and want to write some code to actually try it out. But every time I hit a wall.
>
> For example yesterday I installed SwiftForth, I read the documentation and it has few pages on source management. The only word that seem to matter to me in this case is INCLUDE. But it doesn't seem to go deep into how to actually use it. This is the process that I can imagine working, but it is crude, and prone to numerous mistakes:
> 1. Open interpreter, write some code, test it until it works
> 2. Hope that SwiftForth doesn't crash and you don't loose all your progress
> 3. Scroll up through the history or list the words, and hope I copy paste stuff that's important to a separate text editor
> 4. Close SwiftForth, start it again, wait for evaluation warning to expire, manually type INCLUDE my-updated-file
>
> SwiftForth doesn't seem to have a command line arguments help in the documentation PDF, nor there seem to be a way to reset the state of a interpreter. At least I couldn't find any. I had similar issues with other interpreters some time back, but I can't remember anymore what they were.
>
> I'm probably missing something obvious, or there's something I don't get.
I learned this trick watching someone else ( I would give credit if i could remember who) I have planned on expanding the code to make it more universal but haven't got around to it yet here is the ex. i use for gforth in ecr..fs
**************************** ecr.fs **********************************
: empty s" ---marker--- marker ---marker---" evaluate ;
: edit s" vim file.fs" system ;
: run s" file.fs" included ;
: ecr edit run ;

marker ---marker---
********************************************************************
basically replace file.fs in the code with the file you are working on....... then gforth ecr.fs ..... while in gforth type ecr <ret>
it will restore the dictionary to initial point run vim file.fs when you exit vim saving or not it will include file.fs and return you to gforth. it keeps you from compiling on top of yourself hence redefining. this should work on most forth's. otherwise setup a ~/.SwiftForth-editor script chmod +x and just call EDIT in swiftforth. i am no swiftforth expert the reason for my vagueness.

Re: Help me to save progress or source management in SwiftForth

<19ba698c-68c9-48ee-944f-5664bd36e719n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:ad4:4b68:0:b0:63c:f2b9:40f4 with SMTP id m8-20020ad44b68000000b0063cf2b940f4mr383qvx.8.1690214049823;
Mon, 24 Jul 2023 08:54:09 -0700 (PDT)
X-Received: by 2002:a05:6808:f11:b0:3a1:f3ed:e9e with SMTP id
m17-20020a0568080f1100b003a1f3ed0e9emr19357933oiw.3.1690214049636; Mon, 24
Jul 2023 08:54:09 -0700 (PDT)
Path: i2pn2.org!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: Mon, 24 Jul 2023 08:54:09 -0700 (PDT)
In-Reply-To: <ac636c33-606e-4f0c-a081-9e23a1d24c72n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1009:b144:b7e0:d503:a6c0:e8c5:580a;
posting-account=yu67hAoAAAAH9vI7F6QVNcMTGtmOy458
NNTP-Posting-Host: 2600:1009:b144:b7e0:d503:a6c0:e8c5:580a
References: <ac636c33-606e-4f0c-a081-9e23a1d24c72n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <19ba698c-68c9-48ee-944f-5664bd36e719n@googlegroups.com>
Subject: Re: Help me to save progress or source management in SwiftForth
From: dgipson...@gmail.com (David Gipson)
Injection-Date: Mon, 24 Jul 2023 15:54:09 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: David Gipson - Mon, 24 Jul 2023 15:54 UTC

On Tuesday, March 14, 2023 at 12:25:50 PM UTC-4, Yaroslav Veremenko wrote:
> Every time I try forth, I start some interpreter, type some words, then it works and I feel like I want to learn more and want to write some code to actually try it out. But every time I hit a wall.
>
> For example yesterday I installed SwiftForth, I read the documentation and it has few pages on source management. The only word that seem to matter to me in this case is INCLUDE. But it doesn't seem to go deep into how to actually use it. This is the process that I can imagine working, but it is crude, and prone to numerous mistakes:
> 1. Open interpreter, write some code, test it until it works
> 2. Hope that SwiftForth doesn't crash and you don't loose all your progress
> 3. Scroll up through the history or list the words, and hope I copy paste stuff that's important to a separate text editor
> 4. Close SwiftForth, start it again, wait for evaluation warning to expire, manually type INCLUDE my-updated-file
>
> SwiftForth doesn't seem to have a command line arguments help in the documentation PDF, nor there seem to be a way to reset the state of a interpreter. At least I couldn't find any. I had similar issues with other interpreters some time back, but I can't remember anymore what they were.
>
> I'm probably missing something obvious, or there's something I don't get.
Sorry all i forgot to add the the new forth word empty needs to be the first call in file.fs
see my previous post on the file ecr.fs

Re: Help me to save progress or source management in SwiftForth

<8cead580-bf95-418d-ba3f-ad91d8cd9db7n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:620a:402:b0:765:ab00:9611 with SMTP id 2-20020a05620a040200b00765ab009611mr3086qkp.3.1690245202884;
Mon, 24 Jul 2023 17:33:22 -0700 (PDT)
X-Received: by 2002:a05:6808:1590:b0:3a3:8cf6:5edf with SMTP id
t16-20020a056808159000b003a38cf65edfmr20614153oiw.9.1690245202504; Mon, 24
Jul 2023 17:33:22 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer03.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, 24 Jul 2023 17:33:22 -0700 (PDT)
In-Reply-To: <94eb3dcc-2639-46ac-916f-6bdcd97aa212n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=168.121.178.0; posting-account=OMrK2AoAAACPu8JcOP64zhFwVmCz0fk3
NNTP-Posting-Host: 168.121.178.0
References: <ac636c33-606e-4f0c-a081-9e23a1d24c72n@googlegroups.com> <94eb3dcc-2639-46ac-916f-6bdcd97aa212n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <8cead580-bf95-418d-ba3f-ad91d8cd9db7n@googlegroups.com>
Subject: Re: Help me to save progress or source management in SwiftForth
From: fabianor...@gmail.com (fabianor...@gmail.com)
Injection-Date: Tue, 25 Jul 2023 00:33:22 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 4021
 by: fabianor...@gmail.co - Tue, 25 Jul 2023 00:33 UTC

Em segunda-feira, 24 de julho de 2023 às 12:34:56 UTC-3, David Gipson escreveu:
> On Tuesday, March 14, 2023 at 12:25:50 PM UTC-4, Yaroslav Veremenko wrote:
> > Every time I try forth, I start some interpreter, type some words, then it works and I feel like I want to learn more and want to write some code to actually try it out. But every time I hit a wall.
> >
> > For example yesterday I installed SwiftForth, I read the documentation and it has few pages on source management. The only word that seem to matter to me in this case is INCLUDE. But it doesn't seem to go deep into how to actually use it. This is the process that I can imagine working, but it is crude, and prone to numerous mistakes:
> > 1. Open interpreter, write some code, test it until it works
> > 2. Hope that SwiftForth doesn't crash and you don't loose all your progress
> > 3. Scroll up through the history or list the words, and hope I copy paste stuff that's important to a separate text editor
> > 4. Close SwiftForth, start it again, wait for evaluation warning to expire, manually type INCLUDE my-updated-file
> >
> > SwiftForth doesn't seem to have a command line arguments help in the documentation PDF, nor there seem to be a way to reset the state of a interpreter. At least I couldn't find any. I had similar issues with other interpreters some time back, but I can't remember anymore what they were.
> >
> > I'm probably missing something obvious, or there's something I don't get.
> I learned this trick watching someone else ( I would give credit if i could remember who) I have planned on expanding the code to make it more universal but haven't got around to it yet here is the ex. i use for gforth in ecr.fs
> **************************** ecr.fs **********************************
> : empty s" ---marker--- marker ---marker---" evaluate ;
> : edit s" vim file.fs" system ;
> : run s" file.fs" included ;
> : ecr edit run ;
>
> marker ---marker---
> ********************************************************************
> basically replace file.fs in the code with the file you are working on....... then gforth ecr.fs ..... while in gforth type ecr <ret>
> it will restore the dictionary to initial point run vim file.fs when you exit vim saving or not it will include file.fs and return you to gforth. it keeps you from compiling on top of yourself hence redefining. this should work on most forth's. otherwise setup a ~/.SwiftForth-editor script chmod +x and just call EDIT in swiftforth. i am no swiftforth expert the reason for my vagueness.
https://youtu.be/mvrE2ZGe-rs?t=1305

Re: Help me to save progress or source management in SwiftForth

<eefa62f9-eab0-4c2b-af76-c062056f9937n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:ae9:de03:0:b0:765:2eef:e3c3 with SMTP id s3-20020ae9de03000000b007652eefe3c3mr5758qkf.3.1690273570361;
Tue, 25 Jul 2023 01:26:10 -0700 (PDT)
X-Received: by 2002:a05:6808:16a7:b0:3a1:a15b:ef9f with SMTP id
bb39-20020a05680816a700b003a1a15bef9fmr3837216oib.0.1690273569948; Tue, 25
Jul 2023 01:26:09 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.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: Tue, 25 Jul 2023 01:26:09 -0700 (PDT)
In-Reply-To: <8cead580-bf95-418d-ba3f-ad91d8cd9db7n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2a01:e0a:118:ea0:5c19:d8c7:9237:9f5e;
posting-account=3HjpJwoAAACwXD1UyRZwC1Lkp4Lq1jcg
NNTP-Posting-Host: 2a01:e0a:118:ea0:5c19:d8c7:9237:9f5e
References: <ac636c33-606e-4f0c-a081-9e23a1d24c72n@googlegroups.com>
<94eb3dcc-2639-46ac-916f-6bdcd97aa212n@googlegroups.com> <8cead580-bf95-418d-ba3f-ad91d8cd9db7n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <eefa62f9-eab0-4c2b-af76-c062056f9937n@googlegroups.com>
Subject: Re: Help me to save progress or source management in SwiftForth
From: goblinri...@gmail.com (gobli...@gmail.com)
Injection-Date: Tue, 25 Jul 2023 08:26:10 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 5643
 by: gobli...@gmail.com - Tue, 25 Jul 2023 08:26 UTC

Le mardi 25 juillet 2023 à 02:33:24 UTC+2, fabianor...@gmail.com a écrit :
> Em segunda-feira, 24 de julho de 2023 às 12:34:56 UTC-3, David Gipson escreveu:
> > On Tuesday, March 14, 2023 at 12:25:50 PM UTC-4, Yaroslav Veremenko wrote:
> > > Every time I try forth, I start some interpreter, type some words, then it works and I feel like I want to learn more and want to write some code to actually try it out. But every time I hit a wall.
> > >
> > > For example yesterday I installed SwiftForth, I read the documentation and it has few pages on source management. The only word that seem to matter to me in this case is INCLUDE. But it doesn't seem to go deep into how to actually use it. This is the process that I can imagine working, but it is crude, and prone to numerous mistakes:
> > > 1. Open interpreter, write some code, test it until it works
> > > 2. Hope that SwiftForth doesn't crash and you don't loose all your progress
> > > 3. Scroll up through the history or list the words, and hope I copy paste stuff that's important to a separate text editor
> > > 4. Close SwiftForth, start it again, wait for evaluation warning to expire, manually type INCLUDE my-updated-file
> > >
> > > SwiftForth doesn't seem to have a command line arguments help in the documentation PDF, nor there seem to be a way to reset the state of a interpreter. At least I couldn't find any. I had similar issues with other interpreters some time back, but I can't remember anymore what they were.
> > >
> > > I'm probably missing something obvious, or there's something I don't get.
> > I learned this trick watching someone else ( I would give credit if i could remember who) I have planned on expanding the code to make it more universal but haven't got around to it yet here is the ex. i use for gforth in ecr.fs
> > **************************** ecr.fs **********************************
> > : empty s" ---marker--- marker ---marker---" evaluate ;
> > : edit s" vim file.fs" system ;
> > : run s" file.fs" included ;
> > : ecr edit run ;
> >
> > marker ---marker---
> > ********************************************************************
> > basically replace file.fs in the code with the file you are working on....... then gforth ecr.fs ..... while in gforth type ecr <ret>
> > it will restore the dictionary to initial point run vim file.fs when you exit vim saving or not it will include file.fs and return you to gforth. it keeps you from compiling on top of yourself hence redefining. this should work on most forth's. otherwise setup a ~/.SwiftForth-editor script chmod +x and just call EDIT in swiftforth. i am no swiftforth expert the reason for my vagueness.
> https://youtu.be/mvrE2ZGe-rs?t=1305

From Veltas repo of Christopher Leonard I use this scriptin function to add words to external file

\ github.com/Veltas/demo/blob/main/script.4th
\ Copyright 2023 Christopher Leonard - MIT Licence

: CREATE-FILE! CREATE-FILE ABORT" failed to open file" ;

: FILE-SIZE! FILE-SIZE ABORT" failed to get file size" ;

: SET-POSITION! REPOSITION-FILE ABORT" failed to reposition file" ;

: WRITE-LINE! WRITE-LINE ABORT" failed to write line to file" ;

: CLOSE-FILE! CLOSE-FILE ABORT" failed to write file" ;

: FAST-FORWARD! ( file) DUP FILE-SIZE! ROT SET-POSITION! ;

: OPEN-OR-CREATE! ( a u - file)
2DUP W/O OPEN-FILE IF
DROP W/O CREATE-FILE!
ELSE
NIP NIP
THEN ;

: APPEND-FILE! ( a u - file) OPEN-OR-CREATE! DUP FAST-FORWARD! ;

: REST-OF-LINE SOURCE >IN @ /STRING ;

: SCRIPT
PARSE-NAME APPEND-FILE!
DUP REST-OF-LINE ROT WRITE-LINE!
CLOSE-FILE! ; IMMEDIATE

0 VALUE SCRIPT-FILE

: SCRIPT((
PARSE-NAME APPEND-FILE! TO SCRIPT-FILE
BEGIN CR REFILL WHILE SOURCE S" ))" COMPARE WHILE

\ usecase
\ script a.fs 1 2 3 + + .
\ will create file named "a" containing "1 2 3 + + ." code
\ script a.fs : toto 10 0 do ." ." loop ;

this is a good way to test words in interpretor & copy the final versions to a file , like here a.fs.
this is a good helper to me :)

too

Re: Help me to save progress or source management in SwiftForth

<nnd$20cb4dc4$57d71c99@78e6c958409ba78e>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
Newsgroups: comp.lang.forth
References: <ac636c33-606e-4f0c-a081-9e23a1d24c72n@googlegroups.com> <94eb3dcc-2639-46ac-916f-6bdcd97aa212n@googlegroups.com> <8cead580-bf95-418d-ba3f-ad91d8cd9db7n@googlegroups.com> <eefa62f9-eab0-4c2b-af76-c062056f9937n@googlegroups.com>
Subject: Re: Help me to save progress or source management in SwiftForth
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
From: alb...@cherry (none)
Originator: albert@cherry.(none) (albert)
Message-ID: <nnd$20cb4dc4$57d71c99@78e6c958409ba78e>
Organization: KPN B.V.
Date: Tue, 25 Jul 2023 10:48:19 +0200
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!feeder1.feed.usenet.farm!feed.usenet.farm!peer02.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!feed.abavia.com!abe006.abavia.com!abp001.abavia.com!news.kpn.nl!not-for-mail
Lines: 60
Injection-Date: Tue, 25 Jul 2023 10:48:19 +0200
Injection-Info: news.kpn.nl; mail-complaints-to="abuse@kpn.com"
X-Received-Bytes: 3168
 by: none - Tue, 25 Jul 2023 08:48 UTC

In article <eefa62f9-eab0-4c2b-af76-c062056f9937n@googlegroups.com>,
gobli...@gmail.com <goblinrieur@gmail.com> wrote:
>From Veltas repo of Christopher Leonard I use this scriptin function to
>add words to external file
>
>\ github.com/Veltas/demo/blob/main/script.4th
>\ Copyright 2023 Christopher Leonard - MIT Licence
>
>: CREATE-FILE! CREATE-FILE ABORT" failed to open file" ;

Normally these kind of stuff doesn't go wrong.
Routinely I do
CREATE-FILE THROW
Only in the debugging face it fails. Other wise you are advised
to generate more specific messages if

'complicate-stuff-that-creates-init-file CATCH DUP 31 =
ABORT" You probably tried to create an init file where you have not \
write access on the directory"

This also show why I prefer numeric identification for error situation
and I abhor the reuse of same error numbers for vastly different errors.

It is a myth that a one line abort" message does cut it.

This is the documentation of error 121 for my bsl package.

"
121 : line is not stable before character
A character is expected, so we wait for a start bit.
If the line is already in a start bit / break state, that
means that it is stuck in that state, or that we were too slow
and the sbc has already started sending.

If you get this error consistently then we are stuck in that
state.
This is indicative of
1) A wrong cable connection.
Use the -t option to diagnose your cable. Check the connections.
2) your parallel port doesn't use the standard address.
Use ` -a #### ' to specify the proper address.
(Mostly you get 134 with that problem.)

If the fault is intermittent, at least the msp430 can control
the line, but it does so erratically.
3) Your pc is too slow. Terminate time consuming processes, like
a gui.
4) A defective MSP430 or faulty bsl in MSP430. This has been
seen in combination with a wrong patch of the bsl.
"

If bsl fails you see "error 121", but you know where to look.

Groetjes Albert
--
Don't praise the day before the evening. One swallow doesn't make spring.
You must not say "hey" before you have crossed the bridge. Don't sell the
hide of the bear until you shot it. Better one bird in the hand than ten in
the air. First gain is a cat spinning. - the Wise from Antrim -


devel / comp.lang.forth / Help me to save progress or source management in SwiftForth

Pages:12
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor