🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.arch
Article #75

Re: Optimization by programmers

#75
From: Niklas Holsti
Date: Tue, 13 Oct 2026 09:03
26 lines
2391 bytes
On 2026-10-12 20:10, Anton Ertl wrote:
> David Brown <david.brown@hesbynett.no> writes:
>> Forth is arguably even better for this :
>>
>> : 21 42 ;
>> 21 .
>> 42 ok
>>
>> That is - you can redefine the word "21" to put the value 42 on the
>> stack.  Then if you ask for the number "21", you get the value 42.  It
>> is not an oddity of the implementation, but the way the language works.
> 
> Yes, but used like this, it's only a curiosity; nobody does this
> except to show that it can be done.

Forth originated in astronomy, if I remember correctly. I do remember 
that in an astronomy-domain Forth program, where it was often necessary 
to transform the celestial coordinates of stars from the standard 
catalog epoch (the start of the year 1950) to the current time, the word 
1950.0 was defined to perform that transformation.

That Forth system did not have floating-point support, so 1950.0 could 
not be understood as a floating-point literal. But if the program had 
been ported to a Forth system with floating-point support, confusion 
could have resulted.
Technical Details
Message-ID: <nj6aehFiusqU1@mid.individual.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
References: <1177fdi$26ea4$1@dont-email.me> <11a3ofn$2ak3s$1@dont-email.me> <11a5hd5$4qb$1@reader2.panix.com> <11a5lqo$2v5bq$1@dont-email.me> <11a6870$41j$1@reader2.panix.com> <11a6a6h$37i1n$1@dont-email.me> <1791742457-5857@newsgrouper.org> <11agm4p$2tfut$1@dont-email.me> <11ahs8q$38ir0$4@dont-email.me> <11aig3c$3hdcn$1@dont-email.me> <11aiqc0$3kr94$3@dont-email.me> <2026Oct12.191033@mips.complang.tuwien.ac.at>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: Niklas Holsti <niklas.holsti@tidorum.invalid>
Newsgroups: comp.arch
Subject: Re: Optimization by programmers
Date: Tue, 13 Oct 2026 12:03:13 +0300
Organization: Tidorum Ltd
Lines: 26
Message-ID: <nj6aehFiusqU1@mid.individual.net>
References: <1177fdi$26ea4$1@dont-email.me> <11a3ofn$2ak3s$1@dont-email.me>
 <11a5hd5$4qb$1@reader2.panix.com> <11a5lqo$2v5bq$1@dont-email.me>
 <11a6870$41j$1@reader2.panix.com> <11a6a6h$37i1n$1@dont-email.me>
 <1791742457-5857@newsgrouper.org> <11agm4p$2tfut$1@dont-email.me>
 <11ahs8q$38ir0$4@dont-email.me> <11aig3c$3hdcn$1@dont-email.me>
 <11aiqc0$3kr94$3@dont-email.me> <2026Oct12.191033@mips.complang.tuwien.ac.at>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: individual.net 2URSqS6z9E5g93iFi7UhZAQI7FjLXl2bF13FJg9OcLR/Hk+owy
Cancel-Lock: sha1:yiEdlHeEAk8T0d+GvwmGhBkrn+o= sha256:sdHFE4FGZOnfzkYy+FR7Q5S4Li+FL9B6c0y6Q9KIHJk=
User-Agent: Mozilla Thunderbird
Content-Language: en-US
In-Reply-To: <2026Oct12.191033@mips.complang.tuwien.ac.at>