Warning: mysqli::__construct(): (HY000/1203): User howardkn already has more than 'max_user_connections' active connections in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\includes\artfuncs.php on line 21
Failed to connect to MySQL: (1203) User howardkn already has more than 'max_user_connections' active connections
Warning: mysqli::query(): Couldn't fetch mysqli in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\index.php on line 66
Article <vbl0rh$21tps$1@dont-email.me>
Deutsch   English   Français   Italiano  
<vbl0rh$21tps$1@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!news.mixmin.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: Sun, 8 Sep 2024 21:18:57 +0100
Organization: A noiseless patient Spider
Lines: 189
Message-ID: <vbl0rh$21tps$1@dont-email.me>
References: <vab101$3er$1@reader1.panix.com> <871q27weeh.fsf@bsb.me.uk>
 <20240829083200.195@kylheku.com> <87v7zjuyd8.fsf@bsb.me.uk>
 <20240829084851.962@kylheku.com> <87mskvuxe9.fsf@bsb.me.uk>
 <vaq9tu$1te8$1@dont-email.me> <vbci8r$1c9e8$1@paganini.bofh.team>
 <vbcs65$eabn$1@dont-email.me> <vbekut$1kd24$1@paganini.bofh.team>
 <vbepcb$q6p2$1@dont-email.me> <vbgb5q$1ruv8$1@paganini.bofh.team>
 <vbhbbb$1blt4$1@dont-email.me> <vbipp5$24kl5$1@paganini.bofh.team>
 <vbk0d9$1tajm$1@dont-email.me> <vbkpfc$27l2o$1@paganini.bofh.team>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 08 Sep 2024 22:18:58 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="ad79b9a69b5377684053ea6685c7dbff";
	logging-data="2160444"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX19C9O4LStnYv1dwMTCZrJtX"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:Mynk4wJt9XddLsMXKtDz+bCegqQ=
In-Reply-To: <vbkpfc$27l2o$1@paganini.bofh.team>
Content-Language: en-GB
Bytes: 9143

On 08/09/2024 19:13, Waldek Hebisch wrote:
> Bart <bc@freeuk.com> wrote:
>> On 08/09/2024 01:05, Waldek Hebisch wrote:
>>> Bart <bc@freeuk.com> wrote:
>>
>>>> Then you no longer have a language which can be implemented in a few KB.
>>>> You might as well use a real with with proper data types, and not have
>>>> the stack exposed in the language. Forth code can be very cryptic
>>>> because of that.
>>>
>>> First, it is not my goal to advocate for Forth use.
>>
>> You're doing a fine job of it!
>>
>> For me it's one of those languages, like Brainf*ck, which is trivial to
>> implement (I've done both), but next to impossible to code in.
> 
> I wonder if you really implemented Forth.  Did you implement immediate
> words? POSTPONE?

I implemented a toy version, with 35 predefined words, that was enough 
to implement Fizz Buzz. Then I looked for more examples to try and found 
they all assumed slightly different sets of built-ins.


> define fibr(n);
>      if n < 2 then 1 else fibr(n - 1) + fibr(n - 2) endif
> enddefine;

 > There are some anomalies, assignment is written as:
 >
 > a -> b;
 >
 > which means assign a to b.

This POP11 seems a more viable language than Forth. (I vaguely remember 
something from college days, but that might have been POP2.)


> external declare tse in oldc;
> 
> void
> tse1(da, ia, sa, dp, ip, sp, d, i, s)
>      double da[];
>      int ia[];
>      float sa[];
>      double * dp;
>      int * ip;
>      float * sp;
>      double d;
>      int i;
>      float s;
> {
> }
> 
> endexternal;
> 
> The first line switches on syntax extention and lines after that
> up to 'endexternal' are parsed as C code.  More procisely, 'oldc'
> expects KR style function definitions (with empty body).  As
> result this piece of code generates Pop11 wrapper that call
> corresponding C routine passing it arguments of types specified
> in C definition (but on Pop11 side 'double da[]' and 'double * dp'
> are treated differently).  Note that this in _not_ a feature of
> core Pop11 langrage.  Rather it is handled by library code (which
> in principle could by written by ordinary user.

I don't quite understand that. Who or what is the C syntax for? Does 
POP11 transpile to C?

Usually the FFI of a language uses bindings expressed in that language, 
and is needed for the implementation to generate the correct code. So 
it's not clear if calls to that function are checked for numbers and 
types of arguments.

If they're not, then you don't really need a function sig, just that 
external declaration.

>> Most people prefer to code in a HLL.
> 
> You mean "most people prefer by now traditional syntax", sure.
> 
>> But this at least shows Lisp as
>> being higher level than Forth, and it's a language that can also be
>> bootstrapped from a tiny implementation.
> 
> Pop11 has very similar semantics to Lisp and resonably traditional
> syntax.  I would say that Lisp users value more extensibility than
> traditional syntax.  Namely Lisp macros give powerful extensibility
> and they work naturaly with prefix syntax.  In particular, to do
> an extension you specify tree transformation, that is transformation
> of Lisp "lists", which can be done conveniently in Lisp.  In Pop11
> extentions usually involve some hooks into parser and one need to
> think how parsing work.  And one needs to generate representation
> at lower level.  So extending Pop11 usualy is more work than extending
> Lisp.  I also use a language called Boot, you will not like it
> because it uses whitespace to denote blocks.  Semantics of Boot is
> essentially the same as Lisp and systax (expect for whitespace)
> is Algol-like.

One of yours? A search for Boot PL didn't show anything relevant.


> One of my early program did recursive walk on a graph.  Goal was
> to do some circuit computation.  I did it in Basic on ZX 81.
> I used GOSUB to do recursive calls, but had to simulate the argument
> stack with arrays.  This led to severl compilcations, purely
> because of inadequacy of the language.

On ZX81? I can imagine it being hard! (Someone wanted me to do something 
on ZX80, but I turned it down. I considered it too much of a toy.)

>> You're taking all those, to me, chaotic features of C as being superior
>> to Pascal.
>>
>> Like being able define anonymous structs always anywhere, or allowing
>> multiple declarations of the same module-level variables and functions.
> 
> Look at this C code:

I'll reply to that separately.

>> In my hands I would have given it some tweaks to make it a
>> viable systems language. For a better evolution of Pascal, forget Wirth,
>> look at Ada, even thought that is not my thing because it is too strict
>> for my style.
> 
> For system programming Turbo Pascal had what is needed.

OK, there's that too, although it's not something I used. (I last used 
actual Pascal c. 1980, and didn't try it again for 35+ years with 
FreePascal.)

>> Syntax IS superficial! But it's pretty important otherwise we'd be
>> programming in binary machine code, or lambda calculus.
> 
> Well, even in context of systax dot required by Bliss is little thing,
> just a bit of mandatory noise.

Confusing noise: in A = .B, why doesn't A need the dot too? (This has 
been discussed at length so is rhetorical!)

> Concerning Forth and Lisp, some people like such syntax and there are
> gains.

In the Reddit PL forum people absolutely love weird and esoteric syntax. 
The harder to understand the better. Loads of pointless punctuation is 
especially popular.


>>> I am not going to write substantial programs in Bliss or Forth
>>> but I have no double they are HLL-s.
>>
>> So, what would a non-HLL look like to you that is not actual assembly?
> 
> In first approximation HLL = not(assembly).  Of course (binary, octal,
> etc) machine language counts as assembly for purpose of this equation.
> And some language like PL360 or Randall Hyde HLA which have constructs
> which does not look like assembly still count as assembly.  Similarly
> macro assemblers like IBM HLA count as assembly.  Fact that there is
> a complier that turns IBM HLA Javascript, so that you can run it on
> wide range of machines does not change this.  For me what count is
> thinking and intent: using IBM HLA you still need to think in term
> of machine instructions.  One can use macro assemblers to provide
> set of macros such that user of those macros does not need to think
> about machine instructions.  IIUC one of PL/I compilers was created
> by using a macro assembler to implement a small subset of PL/I, and
> then proper PL/I compiler was written in this subset.  But this
> is really using macro assembler to implement different language.
> In other words, once extentions can function as independent language
> and users are encouraged to think in terms of new language,
> this is no longer assembler, but a new thing.
========== REMAINDER OF ARTICLE TRUNCATED ==========