Edmond D wrote: ↑Fri Mar 24, 2023 7:54 am
Thanks Bruce for the example and explanation. I can see its use for the developer. I wonder how much development would be done needing scripting on the X16 itself once the hardware is released? Given the amount of software already developed using cross-compiling tools on off platform systems leads me to that question. I do see value in the experience of attempting to work completely on the X16 in a stand-alone environment (that's so Eighties!
) Perhaps others who have developed inside the emulator (Basic, Assembler, Forth) might weigh in, as those are the only languages I know about that I believe have an on platform development environment. If C is in that mix, apologies to those programmers, or any other language I've missed.
As for us near mortal minions (end users?), I don't see a compelling case for a scripting language yet. I'm open to hearing others suggestions why the X16 needs one. Consider this a call for education, not an assumption that scripting isn't desirable. I'm all for making the X16 meet the community's needs, no matter how wide the feature request they are....
As far as how much hosted vs cross development is going to happen -- most of the hosted development that takes place will take place when people have the hardware to work on. Whether it's 20% or 5% or 0.2% of the development work is not something I worry about. It's how I'm going to develop on it if I get my hands on one, so for me the cross development is more a necessary evil until the hardware is in my hands and more full featured hosted development options have been developed.
As far as the use case, does it have to be a
compelling case? Is "handy" or "convenient" good enough?
It seems like people are talking about scripting from a "Unix as a server operating system" perspective, rather than the much broader range of uses for scripts we had back before we had the mountains of user libraries and the millions of cycles to burn that are the foundation for languages like Python.
A scripting language like awk is a convenience that makes it easier to accomplish something. In general use, it is used to automate something that would be tedious to do manually but also without the higher investment in programming time and effort required by a more general purpose language.
So, for a specific example, suppose that I have a block Forth file from back in the day that I want to port to xForth and I want it to load as an INCLUDE text file. Assuming for the sake of the example that I have fixed the CREATE ... DOES> bug and xForth actually works as a Forth, to be sure I would write a Forth word to convert from the (no return character, fixed 64 character lines, 16 lines per block) BLOCK format into a text file, replacing all of the space at the end of the block line with a carriage return.
To assist with the port, I went the text file to have an extra carriage return at the end of each block, and an extra comment line at the start of each block that says, eg, "\ BLOCK 34".
That's something where it would be convenient to have a scripting language to do that, since it's just a couple of lines in some "small AWK" language.
Whatever assembler hosted on the X16 that I use, cross development assemblers are likely to be more forgiving in terms of the various of different layouts that they accept than a hosted assembler -- because of the "resting on a mountain of libraries" nature of the modern cross-development assemblers -- so when I download assembly files that people have worked on in a cross-development assembler, I may have to go through the file making sure that it complies with the less forgiving layout requirements of the hosted assembler.
To be sure we can write the lint program in Small C or Pascal or Forth or Basic, but it's quicker and easier and easier to customize to a particular case -- eg, one common cross-development assembler *requires* something that some hosted assembler *forbids* -- and easier to test and overall likely to be less error prone to have a lint script to run through a scripting language.
Now, as far as a feature request, I don't think it has to be in ROM, so it's more an encouragement that if someone wants to work on it, if they come up with a useful "small AWK" (or whatever), the effort won't be in vain.