Sujet : Re: Python recompile
De : bc (at) *nospam* freeuk.com (bart)
Groupes : comp.lang.cDate : 06. Mar 2025, 01:37:17
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vqaqnr$2l1ar$3@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
User-Agent : Mozilla Thunderbird
On 05/03/2025 23:36, Tim Rentsch wrote:
bart <bc@freeuk.com> writes:
On 05/03/2025 02:20, Lawrence D'Oliveiro wrote:
>
On Wed, 5 Mar 2025 01:20:07 +0000, bart wrote:
>
I maintain my own scripting language. Building it from source - on
Windows - takes 70ms:
>
How wonderful. Does it offer Python-style features?
>
No, it offers my-style features, that is, things I find useful:
>
[long list of features]
My understanding is that it is missing the two most important
features of a programming language:
(1) a user manual that defines and documents the language
(2) an available implementation so that other people can
use it to write programs
The 1990s version, where it supported a substantial application, had a 350-page manual. That one was used by other people to create add-on products.
But it's now a personal tool and I only have reference material for my own use.
It has been made available from time to time, here it is being made to run under Linux, but it starts off on Windows:
c:\qx>mc -c -linux qc # Transpile to C suitable for Linux
M6 Compiling qc.m to qc.c
c:\qx>wsl # Enter Linux and build the C
root@DESKTOP-11:/mnt/c/qx# gcc qc.c -oqc -lm -ldl -fno-builtin
root@DESKTOP-11:/mnt/c/qx# cat demo.q # Example posted earlier
print "Enter 2 values: "
readln a, b
fprintln "# + # is #", a, b, a+b
root@DESKTOP-11:/mnt/c/qx# ./qc -nosys demo # Run it
Enter 2 values: 340282366920938463463374607431768211456 44
340282366920938463463374607431768211456 + 44 is 340282366920938463463374607431768211500
root@DESKTOP-11:/mnt/c/qx#
(The -nosys is needed since it normally initialises a library that partly uses WinAPI calls, that don't exist on Linux.)
So the product exists, but I choose not to make it available; that would be a huge amount of work, and no one is really interested. Modern languages are going in a different direction.
Still, it is quite a substantial language, and it really does build in a tiny fraction of a second:
c:\qx>tim mm qq # bigger version with ASM-accelerator
Compiling qq.m to qq.exe
Time: 0.068