| Deutsch English Français Italiano |
|
<vana1g$3gbkr$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Bart <bc@freeuk.com>
Newsgroups: comp.lang.c
Subject: Re: Top 10 most common hard skills listed on resumes...
Date: Wed, 28 Aug 2024 14:51:42 +0100
Organization: A noiseless patient Spider
Lines: 88
Message-ID: <vana1g$3gbkr$1@dont-email.me>
References: <vab101$3er$1@reader1.panix.com>
<vad7ns$1g27b$1@raubtier-asyl.eternal-september.org>
<vad8lr$1fv5u$1@dont-email.me> <vaf7f0$k51$2@reader1.panix.com>
<vafgb2$1to4v$2@dont-email.me>
<92ab79736a70ea1563691d22a9b396a20629d8cf@i2pn2.org>
<vafim7$1ubg8$1@dont-email.me> <vafll4$21ar$1@news.gegeweb.eu>
<vafpgv$20j4p$2@dont-email.me> <20240828142119.00001991@yahoo.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 28 Aug 2024 15:51:44 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="1407973ec3a2d1c19c9aff4f00a8367c";
logging-data="3681947"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+1ZrnVMiivZ/4/e5eQiXyT"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:/2+IRvHDgO3WIfdz/VkWSVGVSDI=
In-Reply-To: <20240828142119.00001991@yahoo.com>
Content-Language: en-GB
Bytes: 3816
On 28/08/2024 12:21, Michael S wrote:
> On Sun, 25 Aug 2024 18:26:57 +0100
> Bart <bc@freeuk.com> wrote:
>
>> On 25/08/2024 17:20, tTh wrote:
>>> On 8/25/24 17:30, Bart wrote:
>>>>
>>>> So what language goes between Assembly and C?
>>>
>>> Forth ?
>>>
>>
>> I had in mind languages classed as 'HLLs'. I'm not sure if Forth
>> counts.
>>
>
> They say that Forth is a HLL
> https://www.forth.com/forth/
> I tend to agree with them.
From 'forth.com', and a commercial site at that? They're going to be
completely impartial of course!
This is the Ackermann function in Forth, from
https://rosettacode.org/wiki/Category:Forth :
: acker ( m n -- u )
over 0= IF nip 1+ EXIT THEN
swap 1- swap ( m-1 n -- )
dup 0= IF 1+ recurse EXIT THEN
1- over 1+ swap recurse recurse ;
Well, it's not assembly, but it doesn't have one characteristic of HLLs
which is readability. The code for Ackermann can usually be trivially
derived from its mathemetical definition; not so here.
So I say it fails the HLL test. But if it's not a HLL, it's also fails
on low-level control: the above doesn't concern itself with types or
bitwidths for example; you might consider that a HLL trait, but it's one
that belongs the other side of C rather than below.
(Below are versions in more conventional syntax.)
> My personal bar for HLL is pretty low - any language in which one can
> write useful program (not necessarily big useful program or *very*
> useful program) in a way that does not depend on instruction set of
> underlying hardware is HLL.
>
Then you'd need to include any intermediate languages or
representations, since they are usually not tied to any specific target
either.
Although any static typing scheme will likely be crude, for example with
type info specified per-instruction rather than centrally as in a normal
HLL.
-------
(Examples from my languages)
func ack(m,n)=
case
when m=0 then
n+1
when n=0 then
ack(m-1,1)
else
ack(m-1,ack(m,n-1))
esac
end
(Compact version)
fun ack(m,n) = (m=0|n+1|(n=0|ack(m-1,1)|ack(m-1,ack(m,n-1))))
(Example for Haskell; usually considered difficult, here it is clearer
than the Forth where the algorithm or formula is indiscernible)
ack :: Int -> Int -> Int
ack 0 n = succ n
ack m 0 = ack (m-1) 1
ack m n = ack (m-1) (ack m (n-1))