Hello, I'm Antoni from Barcelona, just a newbie.
Thinking how to enhance gforth's console output, i stumbled on the ASCII big lettering generator figlet, it's online here so you can reate your own texts and choose and copy/paste the lettering that fits to your program.
https://www.askapache.com/online-tools/figlet-ascii/
So I copied and pasted one output of figlet in my code and made a word to handle it. It does'nt clip the text if it goes out of screen.
On 1/10/2023 8:53 pm, Antoni Gual Via wrote:
Hello, I'm Antoni from Barcelona, just a newbie.It's also gforth-specific. A nice exercise would be to make it portable :)
Thinking how to enhance gforth's console output, i stumbled on the ASCII big lettering generator figlet, it's online here so you can reate your own texts and choose and copy/paste the lettering that fits to your program.
https://www.askapache.com/online-tools/figlet-ascii/
So I copied and pasted one output of figlet in my code and made a word to handle it. It does'nt clip the text if it goes out of screen.
BUT this method is also both gforth & system dependant
On Monday, October 2, 2023 at 12:22:14 PM UTC+2, gobli...@gmail.com wrote: [..]
BUT this method is also both gforth & system dependant
Amusing. Why is it gForth dependent (leave off /shmem/ to remove OS-dependency)?
Multiple persistent S" strings outside a definition.This is the third time I try to answer. I could open the thread but my answers are blocked, I don't know why...
On Tuesday, October 3, 2023 at 1:07:15 PM UTC+2, Antoni Gual Via wrote:https://www.quickbookintegration.com
I got a library that does banners: https://sourceforge.net/p/forth-4th/code/HEAD/tree/trunk/4th.src/lib/banners.4th
You may not like the font, but it is what it is.
If a font has a fixed with, you may select the letters by making some very large string and clip 'em. I used
that technique with digits here (sorry: no Forth)..
https://sourceforge.net/p/forth-4th/code/HEAD/tree/trunk/4th.src/apps/basic/clock.bas
Hans Bezemer
I got a library that does banners: https://sourceforge.net/p/forth-4th/code/HEAD/tree/trunk/4th.src/lib/banners.4th
You may not like the font, but it is what it is.
Hello HansNo, you don't. I nicked the original from F-PC (much easier to adapt). So here it is. It does the same.
I tried to run the banner library but it had some words specific to 4th, I will have to install it.
No problem with Basic, I have been using VBA and VBS for the last 20 years. In fact some of the VBS entries in Rosetta Code are mine.Yeah, it's written in 4tH. I started out with a (somewhat flawed) C framework, ironed out the bugs, made a few additions (like <, =, > and # work like operators,
I'm wrong or uBasic is programmed in Forth?
CR
" WELCOME" BANNER
" TO F-PC" BANNER
CR
" BANNER" BANNER
" PROGRAM" BANNER
" FROM F83X" BANNER ;
On Thursday, October 5, 2023 at 12:19:56 PM UTC-4, Hans Bezemer wrote:Oops, sorry - forgot that one!
CRReplace, e.,g., [ " WELCOME" ] with [ s" WELCOME" ]
" WELCOME" BANNER
" TO F-PC" BANNER
CR
" BANNER" BANNER
" PROGRAM" BANNER
" FROM F83X" BANNER ;
and then it will compile and run on Gforth 0.7.3
On Thursday, October 5, 2023 at 8:47:24 PM UTC+2, Doug Hoffman wrote:
On Thursday, October 5, 2023 at 12:19:56 PM UTC-4, Hans Bezemer wrote:Oops, sorry - forgot that one!
CRReplace, e.,g., [ " WELCOME" ] with [ s" WELCOME" ]
" WELCOME" BANNER
" TO F-PC" BANNER
CR
" BANNER" BANNER
" PROGRAM" BANNER
" FROM F83X" BANNER ;
and then it will compile and run on Gforth 0.7.3
I ran it on Gforth 0.7.9_20230726. Second conversion - thought I
caught them all, but forgot that one. Thx, Doug!
Not just pre-ANS forths that present conversion problems. Differences between "standard systems" has become pathological - and growing.
Forth has what it likes to call 'a minimal standard' - which is akin
to 'having your cake and eating it too'.
On Thursday, October 5, 2023 at 8:47:24=E2=80=AFPM UTC+2, Doug Hoffman wrot= >e:
Replace, e.,g., [ " WELCOME" ] with [ s" WELCOME" ]=20Oops, sorry - forgot that one!
and then it will compile and run on Gforth 0.7.3=20
I ran it on Gforth 0.7.9_20230726.
Hans Bezemer <the.beez.speaks@gmail.com> writes:
On Thursday, October 5, 2023 at 8:47:24=E2=80=AFPM UTC+2, Doug Hoffman wrot= >>e:
Replace, e.,g., [ " WELCOME" ] with [ s" WELCOME" ]=20Oops, sorry - forgot that one!
and then it will compile and run on Gforth 0.7.3=20
I ran it on Gforth 0.7.9_20230726.
Note that in recent Gforth snapshots S" WELCOME" is equivalent to
"WELCOME", not " WELCOME".
- anton
In article <2023Oct...@mips.complang.tuwien.ac.at>,
Anton Ertl <an...@mips.complang.tuwien.ac.at> wrote:
Hans Bezemer <the.bee...@gmail.com> writes:
On Thursday, October 5, 2023 at 8:47:24=E2=80=AFPM UTC+2, Doug Hoffman wrot=
e:
Replace, e.,g., [ " WELCOME" ] with [ s" WELCOME" ]=20Oops, sorry - forgot that one!
and then it will compile and run on Gforth 0.7.3=20
I ran it on Gforth 0.7.9_20230726.
Note that in recent Gforth snapshots S" WELCOME" is equivalent to >"WELCOME", not " WELCOME".I urge everybody to add normal-looking strings like "WELCOME" with unrestricted life span to their Forths. We have a million fold
progress in storage space since Forth began.
Hans Bezemer <the.bee...@gmail.com> writes:I was looking out for errors, not (huge) superfluous spaces - so I missed that one.
On Thursday, October 5, 2023 at 8:47:24=E2=80=AFPM UTC+2, Doug Hoffman wrot=
e:
Replace, e.,g., [ " WELCOME" ] with [ s" WELCOME" ]=20Oops, sorry - forgot that one!
and then it will compile and run on Gforth 0.7.3=20
I ran it on Gforth 0.7.9_20230726.Note that in recent Gforth snapshots S" WELCOME" is equivalent to
"WELCOME", not " WELCOME".
- 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 2023: https://euro.theforth.net/2023
There are lots of reasons why Forth standards fail. In some sense, it's like the
BASICs in the 1980s. Yes, there was some common ground, but it was near impossible to make a non-trivial C64 BASIC program run on a ZX Spectrum. Gee, even porting ZX81 BASIC to ZX Spectrum BASIC required a LOT of expertise (I did it several times, but sometimes needed some additional assembly).
So it's not new - and not restricted to Forth. It's just annoying at times.
none albert schrieb am Freitag, 6. Oktober 2023 um 13:37:00 UTC+2:
In article <2023Oct...@mips.complang.tuwien.ac.at>,
Anton Ertl <an...@mips.complang.tuwien.ac.at> wrote:
Hans Bezemer <the.bee...@gmail.com> writes:I urge everybody to add normal-looking strings like "WELCOME" with
On Thursday, October 5, 2023 at 8:47:24=E2=80=AFPM UTC+2, Doug Hoffman wrot=
e:
Replace, e.,g., [ " WELCOME" ] with [ s" WELCOME" ]=20Oops, sorry - forgot that one!
and then it will compile and run on Gforth 0.7.3=20
I ran it on Gforth 0.7.9_20230726.
Note that in recent Gforth snapshots S" WELCOME" is equivalent to
"WELCOME", not " WELCOME".
unrestricted life span to their Forths. We have a million fold
progress in storage space since Forth began.
Using since decades:
"STRING" with embeddable ' apostrophes, or equivalent
'STRING' with embeddable " quotes
(but single 'c' means char c as expected)
In article <f3b587e2-982f-4726...@googlegroups.com>,
minforth <minf...@arcor.de> wrote:
Using since decades:
"STRING" with embeddable ' apostrophes, or equivalent
'STRING' with embeddable " quotes
(but single 'c' means char c as expected)
I adopted the convention of algol 68. The convention with then
single, then double is silly. You still don't be able to have
single and double quotes in the same string.
none albert schrieb am Samstag, 7. Oktober 2023 um 12:36:51 UTC+2:
In article <f3b587e2-982f-4726...@googlegroups.com>,
minforth <minf...@arcor.de> wrote:
Using since decades:
"STRING" with embeddable ' apostrophes, or equivalent
'STRING' with embeddable " quotes
(but single 'c' means char c as expected)
I adopted the convention of algol 68. The convention with then
single, then double is silly. You still don't be able to have
single and double quotes in the same string.
Call it silly, but it is as simple as can be, without parsing for escape characters
and string conversion while eliminating the escape backslash.
But then I never had to work with strings that contained both ' and ".
Lucky me. ;-)
I used that trick in my parsing library: https://sourceforge.net/p/forth-4th/code/HEAD/tree/trunk/4th.src/lib/parsing.4thCall it silly, but it is as simple as can be, without parsing for escape charactersDoubling convention is likewise simple. Parse until ". The following char should be a blank, give an error message. In the case it is a " ,
and string conversion while eliminating the escape backslash.
parse until " and append.
I just reported the original Tom Zimmer source and .."Reported".. Meaning I did the port AGAIN. I didn't rat out the poor guy to some authority.
On Thursday, October 5, 2023 at 8:47:37 AM UTC+2, Antoni Gual Via wrote:
Hello HansNo, you don't. I nicked the original from F-PC (much easier to adapt). So here it is. It does the same.
I tried to run the banner library but it had some words specific to 4th, I will have to install it.
It's tested on Gforth and runs just fine.
Commodore BASIC 2 provided on the C64Yeah, if I remember correctly, all sound and graphics were only available by endless
was an enormous disappointment to users who were expecting something more comprehensive.
Similar disappointment has run through the Forth standards. Folks felt they got lessThe main failure IMHO was it wasn't a language standard. It was a SYSTEM STANDARD.
than what they were expecting. To add insult to injury the wording was such that it
allowed for difference - sometimes substantial.
If language standards came with a user-satisfaction rating, I suspect Forth's wouldn'tI'd give Forth-79 a 7 out of 10, Forth-83 off the scale - minus infinity and ANS-Forth a 6.
do so well.
In contrast I do sense support for individual forth systems - the 4tH's, 8th's and so on. Moore said he couldn't vote on matters of truth and beauty. If oneWell, 4tH has *some* compatibility with ANS Forth. But that's because I like to port
is looking for a standard, that's not a bad one!
In article <2023Oct6.132456@mips.complang.tuwien.ac.at>,
Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote:
Hans Bezemer <the.beez.speaks@gmail.com> writes:
On Thursday, October 5, 2023 at 8:47:24=E2=80=AFPM UTC+2, Doug Hoffman wrot=
e:
Replace, e.,g., [ " WELCOME" ] with [ s" WELCOME" ]=20Oops, sorry - forgot that one!
and then it will compile and run on Gforth 0.7.3=20
I ran it on Gforth 0.7.9_20230726.
Note that in recent Gforth snapshots S" WELCOME" is equivalent to
"WELCOME", not " WELCOME".
I urge everybody to add normal-looking strings like "WELCOME" with unrestricted life span to their Forths. We have a million fold
progress in storage space since Forth began.
If language standards came with a user-satisfaction rating, I suspect Forth's wouldn'tI'd give Forth-79 a 7 out of 10, Forth-83 off the scale - minus infinity and ANS-Forth a 6.
do so well.
The main benefits of ANS are IMHO word sets and the abstraction of numeric >datatypes (CELLS, CHARS, FLOATS). Ignoring COMUS words and leaving essential stuff
like retrieving and storing strings completely open was a huge error. And some wordsets
are just plain horrors (like LOCAL and FILE).
IN are not present in the ciforth kernel.The kernel of ciforth is much more elegant and concise, and those
Neither do I. 4tH stores such strings in R/O memory - and only whenI urge everybody to add normal-looking strings like "WELCOME" with unrestricted life span to their Forths. We have a million foldAnd still it would be hard to justify. Forth has managed without
progress in storage space since Forth began.
these things for so long they'd now have the appearance of a novelty.
It's what I feel when I see 200x quoted characters.
On Sunday, October 8, 2023 at 5:07:29 AM UTC+2, dxf wrote:
Neither do I. 4tH stores such strings in R/O memory - and only whenI urge everybody to add normal-looking strings like "WELCOME" withAnd still it would be hard to justify. Forth has managed without
unrestricted life span to their Forths. We have a million fold
progress in storage space since Forth began.
these things for so long they'd now have the appearance of a novelty.
It's what I feel when I see 200x quoted characters.
they are called, are they copied to a circular buffer - as if "I've been here all the time, now use me like you want". https://sourceforge.net/p/forth-4th/wiki/Temporary%20strings/
It rarely causes any problems. As a matter of fact, I tend to forget that's how it works - so it's quite transparent I suppose.
In a way you can say they're stored permanently, though. S\" are only available in the preprocessor - expanded at runtime. It's overhead, so
I tend not to use them.
There are other ways to compose a string with embedded special
characters - and 4tH also features S| Welcome| as an alternative.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 475 |
Nodes: | 16 (2 / 14) |
Uptime: | 18:36:18 |
Calls: | 9,487 |
Calls today: | 6 |
Files: | 13,617 |
Messages: | 6,121,092 |