From: bc@freeuk.com   
      
   On 28/10/2025 15:03, Scott Lurndal wrote:   
   > bart writes:   
   >> On 28/10/2025 12:56, Michael S wrote:   
   >>> On Sun, 26 Oct 2025 15:45:34 -0700   
   >>> Keith Thompson wrote:   
   >>>   
   >>>> Michael S writes:   
   >>>>> On Sun, 26 Oct 2025 14:56:56 -0700   
   >>>>> Keith Thompson wrote:   
   >>>>>> Michael S writes:   
   >>>>>>> On Fri, 24 Oct 2025 13:20:45 -0700   
   >>>>>>> Keith Thompson wrote:   
   >>>>>> [...]   
   >>>>>>>> Free software still has to be usable. cdecl is usable for most   
   >>>>>>>> of us.   
   >>>>>>>>   
   >>>>>>>> [...]   
   >>>>>>>>   
   >>>>>>>   
   >>>>>>> I'd say that it is not sufficiently usable for most of us to   
   >>>>>>> actually use it.   
   >>>>>>   
   >>>>>> Why do you say that?   
   >>>>>   
   >>>>> I would guess that less than 1 per cent of C programmers ever used   
   >>>>> it and less than 5% of those who used it once continued to use it   
   >>>>> regularly.   
   >>>>> All numbers pulled out of thin air...   
   >>>>   
   >>>> So it's about usefulness, not usability. You're not saying that   
   >>>> it works incorrectly or that it's difficult to use (which would be   
   >>>> usability issues), but that the job it performs is not useful for   
   >>>> most C programmers.   
   >>>>   
   >>>> (One data point: I use it occasionally.)   
   >>>>   
   >>>   
   >>> Few minutes ago I typed 'pacman -S cdecl' at my msys2 command prompt.   
   >>> Then I hit Y at suggestion to proceed with installation. After another   
   >>> second or three I got it installed. Then tried it and even managed to   
   >>> get couple of declarations properly explained.   
   >>> So, now I also belong to less than 1 per cent :-)   
   >>>   
   >>> In the process I finally understand why the build process is none-trivial.   
   >>> It's mostly because of interactivity.   
   >>> It's very hard to build decent interactive program in portable subset   
   >>> of C. Or, may be, even impossible rather than hard.   
   >>   
   >>   
   >> I don't understand. What's hard about interactive programs?   
   >>   
   >> The problem below, which is in standard C and runs on both Windows and   
   >> Linux, should give you all the interativity needed for a program like CDECL.   
   >>   
   >> It reads a line of input, and prints something based on that. In between   
   >> would go all the non-interactive processing that it needs to do (parse   
   >> the line and so on).   
   >>   
   >> So what's missing that could render this task impossible?   
   >>   
   >> (Obviously, it will need a keyboard and display!)   
   >>   
   >> ----------------------------------------   
   >> #include    
   >> #include    
   >>   
   >> int main() {   
   >> char buffer[1000];   
   >>   
   >> puts("Type q to quit:");   
   >>   
   >> while (1) {   
   >> printf("Cdecl> ");   
   >> fgets(buffer, sizeof(buffer), stdin);   
   >> if (buffer[0] == 'q') break;   
   >>   
   >> printf("Input was: %s\n", buffer);   
   >> }   
   >> }   
   >   
   > Where is the command line editing and history support   
   > in this trivial application?   
      
   On Windows, that seems to work anyway: you can edit and navigate within   
   a line, or use Up/Down to retrieve previous lines.   
      
   On WSL, only backspace works, others keys show the escape sequences.   
   It's the same with the RPi.   
      
   I'd never noticed before that Linux line input doesn't provide these   
   fundamentals.   
      
   Still, it will suffice for the simple task that Cdecl has to do.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|