Hello Stefano,
On Sat, Jul 20, 2024, at 10:53, Stefano Antoniazzi wrote:
This is a list of new possible key features that I think would enlarge the application area of EndBASIC and are especially important in my potential (industrial) scenarios, but not only:
I'm curious: if you can elaborate, what scenarios are you targeting?
STEFANO>>> besides experimenting EB as hobby language, I have one industrial scenario at hand
that is related to specify control algorithms that needs to be
embedded as firmware on ASICs (to run on proprietary embedded cores).
STEFANO>>> a very general solution could maybe involve complex types. However, a simpler solution would already cover most practical use cases.
I proposed a way for EB to act as socket client since it's a flexible approach to extend it. EB could rely on external servers to do things not directly supported.
In my PC<->ASIC scenario, for instance, I'm already using multiple automation clients talking to custom hardware with the mediation of a server.
The simpler solution could be to add just the following EB built-in function (in Rust, inside your codebase):
<reply string> = SEND(<string message>)
This function would send the message string to the socket server and wait for a string reply (like a synchronous remote call).
The specific server to contact (address and port, assuming a TCP socket) could be defined at command line or in some other way.
The session could be automatically open at first SEND call and closed when the EB program terminates or the interpreter exits.
An alternative (or an additional) mechanism would be some kind of FFI. Yabasic, for instance, provides this (based on my suggestion to its author some years ago).
With FFI (but with dynamic linking of custom DLLs to the EB interpreter), one could make any extension in any language to EB, including
the socket interface. It would be totally open and flexible but there's lot more work on your side.
STEFANO>>> of course we need more thinking about this; your integrated editor would need to select multiple files. Maybe there's a need for
an (optional) concept of "project" that is a list of .BAS file making a program (only if needed). The order of files could be also significant and
there's a need to understand what happens to top-level statements in each file.
STEFANO>>> QB64 is too slow as development cycle for my taste, due to the hidden C++ compiler.
Projects that are closer to EB are MMBasic (but no graphics in the Windows version) and Basic256 (but looks as abandonware).
What I like a lot in EndBASIC (and quite unique among BASIC-like solutions but also many other language families):
-
100% strong typing, with true booleans and without numeric promotions
-
32-bit integer type (very suitable for embedded/HW applications)
-
interactivity and simple repl/edit/run all-in-one concept
-
care for details
Thanks