Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Everyone has a purpose in life. Perhaps yours is watching television. -- David Letterman


devel / comp.lang.forth / Re: Existing ior practice

SubjectAuthor
* Existing ior practiceAnton Ertl
+* Re: Existing ior practiceminf...@arcor.de
|+* Re: Existing ior practiceKrishna Myneni
||+* Re: Existing ior practiceminf...@arcor.de
|||+* Re: Existing ior practiceBernd Linsel
||||`- Re: Existing ior practiceNickolay Kolchin
|||`- Re: Existing ior practiceKrishna Myneni
||`* Re: Existing ior practiceAnton Ertl
|| `* Re: Existing ior practiceminf...@arcor.de
||  `- Re: Existing ior practicedxforth
|`- Re: Existing ior practiceAnton Ertl
+- Re: Existing ior practiceKrishna Myneni
+* Re: Existing ior practiceRuvim
|`* Re: Existing ior practicedxforth
| +* Re: Existing ior practiceRuvim
| |+* Re: Existing ior practicedxforth
| ||`* Re: Existing ior practiceRuvim
| || `* Re: Existing ior practiceAnton Ertl
| ||  +- Re: Existing ior practiceRuvim
| ||  `* Re: Existing ior practiceRuvim
| ||   `* Re: Existing ior practiceAnton Ertl
| ||    `* Re: Existing ior practiceRuvim
| ||     +- Re: Existing ior practiceRuvim
| ||     +* Re: Existing ior practicedxforth
| ||     |`* Re: Existing ior practiceRuvim
| ||     | `* Re: Existing ior practicedxforth
| ||     |  `* Re: Existing ior practiceRuvim
| ||     |   `* Re: Existing ior practicedxforth
| ||     |    `* Re: Existing ior practiceRuvim
| ||     |     +* Re: Existing ior practiceS Jack
| ||     |     |+- Re: Existing ior practiceS Jack
| ||     |     |`- Re: Existing ior practiceS Jack
| ||     |     `* Re: Existing ior practicedxforth
| ||     |      `* Re: Existing ior practiceRuvim
| ||     |       `* Re: Existing ior practicedxforth
| ||     |        `* Re: Existing ior practiceRuvim
| ||     |         `- Re: Existing ior practicedxforth
| ||     `* Re: Existing ior practiceAnton Ertl
| ||      `- Re: Existing ior practiceRuvim
| |`* Re: Existing ior practiceAnton Ertl
| | +* Re: Existing ior practiceRuvim
| | |`- Re: Existing ior practicedxforth
| | +* Re: Existing ior practiceStephen Pelc
| | |`* Re: Existing ior practiceAnton Ertl
| | | `- Re: Existing ior practicedxforth
| | `* How to avoid collisions of throw codes (was: Existing ior practice)Ruvim
| |  `* Re: How to avoid collisions of throw codes (was: Existing ior practice)Anton Ertl
| |   `* Re: How to avoid collisions of throw codes (was: Existing iorRuvim
| |    `- Re: How to avoid collisions of throw codes (was: Existing iorRuvim
| `- Re: Existing ior practiceAnton Ertl
+- Re: Existing ior practicedxforth
`- Re: Existing ior practiceHans Bezemer

Pages:123
Re: Existing ior practice

<srvru3$1p0f$1@gioia.aioe.org>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!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: Existing ior practice
Date: Sun, 16 Jan 2022 12:21:07 +1100
Organization: Aioe.org NNTP Server
Message-ID: <srvru3$1p0f$1@gioia.aioe.org>
References: <2022Jan7.125232@mips.complang.tuwien.ac.at>
<srajop$vmc$1@dont-email.me> <sram42$1kes$1@gioia.aioe.org>
<srbg47$v6g$1@dont-email.me> <srbip9$131d$1@gioia.aioe.org>
<srbku8$puh$1@dont-email.me> <2022Jan8.115507@mips.complang.tuwien.ac.at>
<srcrap$q96$1@dont-email.me> <2022Jan9.183919@mips.complang.tuwien.ac.at>
<srh1tg$h8s$1@dont-email.me> <srhgmt$1st7$1@gioia.aioe.org>
<srlu9f$ha0$1@dont-email.me> <srm0n4$1qv8$1@gioia.aioe.org>
<srmqkc$5m7$1@dont-email.me> <srnsat$1erc$1@gioia.aioe.org>
<srp2u5$8fu$1@dont-email.me> <srqeq7$grd$1@gioia.aioe.org>
<srr591$dkg$1@dont-email.me> <srs1nj$13s0$1@gioia.aioe.org>
<srv1ul$e3b$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: gioia.aioe.org; logging-data="58383"; 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:91.0) Gecko/20100101
Thunderbird/91.5.0
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-GB
 by: dxforth - Sun, 16 Jan 2022 01:21 UTC

On 16/01/2022 04:57, Ruvim wrote:
> On 2022-01-14 17:35, dxforth wrote:
>> On 14/01/2022 17:29, Ruvim wrote:
>>> On 2022-01-14 03:06, dxforth wrote:
>>>> On 13/01/2022 22:37, Ruvim wrote:
>>>>>
>>>>> A dedicated linked list is only one of possible implementations.
>>>>> For example, a word list is a built in linked list that can be also
>>>>> used. But it can implemented even without any linked list!
>>>>>
>>>>>     here constant magic-exception
>>>>>
>>>>>     : exception ( sd.message -- n )
>>>>>       align magic-exception , here >r ," r>
>>>>>     ;
>>>>>     : message-by-throwcode? ( n -- c-addr u true | n false )
>>>>>       dup magic-exception here within 0= if false exit then
>>>>>       dup cell- @ magic-exception <> if false exit then
>>>>>       count true
>>>>>     ;
>>>>>
>>>>> In this simple variant we don't provide a method to find the throw code
>>>>> by a message, and the "exception" word shall not be performed when the
>>>>> current definition exists. But these limitations are not too difficult
>>>>> to mitigate.
>>>>
>>>> Interesting technique.  Since n is an exception I would just throw it
>>>> (e.g.
>>>> via ?ABORT).
>>>
>>> Formally n is a throw code.
>>>
>>> "?ABORT" doesn't accept a throw code, it accepts a flag and always uses
>>> -2 as a throw code.
>>>
>>> An arbitrary throw code can be used as the argument of THROW
>>>
>>>     s" test error message" exception constant my-ior
>>>     :noname my-ior throw ; catch message-by-throwcode? 0= abort" Err"
>>> type
>>>     \ it should print "test error message"
>>>
>>> The system can use "message-by-throwcode?" to show an error message when
>>> an exception was not caught by the user.
>>>
>>>
>>>> Personally I would have a hard time justifying EXCEPTION. YMMV
>>>
>>> I don't sure that namely this variant is worth standardizing. But I like
>>> it's key idea, since it provides an easy way to avoid the possibility of
>>> throw codes collision.
>>
>> It's not worth standardizing message-by-throwcode? because most users will
>> say the system should be the error handler of last resort i.e. if I THROW
>> a code generated by EXCEPTION and don't CATCH it, the system should display
>> the message and abort.
>
> Yes, you are right, but it's unrelated to standardizing
> "message-by-throwcode?". If no exception frame on the exception stack,
> the system should display the message regardless of this word. And by
> the section 9.6.1.2275 a system is already allowed to do it:
>
> | Otherwise, the system may display an implementation-dependent
> | message giving information about the condition associated
> | with the THROW code n.
>
>
> Also, I said nothing concerning standardizing the word
> "message-by-throwcode?". But I believe such a word should be
> standardized. It's useful to a user-defined text interpreter, to some
> libraries for logging, etc. And such a function is usually implemented
> by systems in any case.

EXCEPTION having stored away the string in a system-dependent manner,
there needs to be another word should the user need to retrieve the
information for any reason. This is getting complicated.

Re: Existing ior practice

<1364b536-8fec-4531-be7f-b6f3672e00cfn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:622a:1743:: with SMTP id l3mr14360415qtk.342.1642521017466; Tue, 18 Jan 2022 07:50:17 -0800 (PST)
X-Received: by 2002:ac8:5a95:: with SMTP id c21mr10338027qtc.210.1642521017315; Tue, 18 Jan 2022 07:50:17 -0800 (PST)
Path: i2pn2.org!i2pn.org!aioe.org!feeder1.feed.usenet.farm!feed.usenet.farm!tr3.eu1.usenetexpress.com!feeder.usenetexpress.com!tr2.iad1.usenetexpress.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, 18 Jan 2022 07:50:17 -0800 (PST)
In-Reply-To: <2022Jan7.125232@mips.complang.tuwien.ac.at>
Injection-Info: google-groups.googlegroups.com; posting-host=82.95.228.79; posting-account=Ebqe4AoAAABfjCRL4ZqOHWv4jv5ZU4Cs
NNTP-Posting-Host: 82.95.228.79
References: <2022Jan7.125232@mips.complang.tuwien.ac.at>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <1364b536-8fec-4531-be7f-b6f3672e00cfn@googlegroups.com>
Subject: Re: Existing ior practice
From: the.beez...@gmail.com (Hans Bezemer)
Injection-Date: Tue, 18 Jan 2022 15:50:17 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 34
 by: Hans Bezemer - Tue, 18 Jan 2022 15:50 UTC

On Friday, January 7, 2022 at 2:07:28 PM UTC+1, Anton Ertl wrote:
> The recent discussions about throw codes and iors have inspired me to
> look at what various systems do.
Ok, my 2 cents for 4tH::
- 4tH has it's own I/O system, however, it can be emulated by a small library;
- If an exception is thrown, it is either caught or uncaught;
- If caught, the exception number is retained;
- If uncaught, the exception number is mapped to the system exception "Uncaught exception" UNLESS a system exception exists for this exception;
- Of the 30 system exceptions, only 8 conform to ANS-Forth (3-6, 9+10, 12+13);
- BTW, I'd love to have "37" - but it is outside the contiguous range of 0-29. So it is "14";
- Most of 4tHs native I/O words throw "14";
- The ANS FILE compatibility layer just checks for "non-zero" codes and makes it a "TRUE" flag;
- In 4tH, a TRUE flag equals "1";
- "1" maps to the vanilla "user defined exception" (all system exceptions are actually negative of course);
- Hence "1" is a valid throw value.

In the 30 year odd history of 4tH, the general "I/O error" has never posed a problem, since 4tH also reports the operand where it went wrong. But most often the cause is so trivial, even that debugging aid isn't required to solve it. IMHO the ANS FILE wordset is so b*** ugly, I've only used it once or twice for porting purposes. It would be quite simple to remove the "0<>" and let it return the true exception (and may be I'll do just that).

Bottom line is: ANY non-zero exception is just fine in 4tH for the reasons given before. The only reason I can think of when it's NOT fine is when you CATCH the exception and then manually evaluate it in some sort of CASE..ENDCASE without catering for an unlisted value.

Hans Bezemer

Pages:123
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor