home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.forth      Forth programmers eat a lot of Bratwurst      117,927 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 116,538 of 117,927   
   Anton Ertl to albert@spenarnc.xs4all.nl   
   Re: Extensions for Forth files.   
   05 Jun 24 12:24:37   
   
   From: anton@mips.complang.tuwien.ac.at   
      
   albert@spenarnc.xs4all.nl writes:   
   >In article <2024Jun4.181145@mips.complang.tuwien.ac.at>,   
   >Anton Ertl  wrote:   
   >>At the 2015 Forth200x meeting we decided on ".4th", and that has been   
   >>added to the extensions that VFX knows about   
   >><2016Mar29.122333@mips.complang.tuwien.ac.at>.  And indeed:   
   >>   
   >I wasn't aware of that this decision. Are there any influentual   
   >people (GNU;s, professors) that could promote this extension with   
   >distribution, in particular make ?   
      
   We have put it in Gforth's start-gforth.el, which will autoload   
   gforth.el when encountering a program with the extension ".4th".   
      
   If you want to have a GNU make default rule that involves .4th, I   
   would add a wishlist item to the GNU make bugtracker.  But what would   
   such a rule do?   
      
   >Is it possible that .fs are actually forth source files, that   
   >can only be interpreted by gforth?   
      
   .fs and .4th are for the same kinds of files: Forth source files.   
   Whether they work on one system or several is not encoded in the   
   extension.   
      
   >Why then change the extension?   
      
   Which change?   
      
   >(A proper script file has extension .sh and start with e.g.   
   > #!/usr/bin/lina )   
      
   When people write shell scripts, some that love file extensions use   
   the extension .sh for those scripts.  I normally don't use an   
   extension for shell scripts.  When I put   
      
   #!/bin/bash   
      
   at the start of such a script, Emacs knows automatically that this is   
   a bash script.  For scripts written in Forth I naturally use one of   
   the extensions where Emacs then knows that it is a Forth source file,   
   such as ".fs" or ".4th".  I don't see a reason why a Forth script   
   should use the extension ".sh", but it's a free world.   
      
   I just tested what happens when I write a Forth source file called   
   zzz.sh that starts with   
      
   #! /usr/bin/gforth   
      
   When I visit the file in Emacs, I geht the mode   
   "Shell-script[gforth]", but that mode does not know anything about   
   Gforth (or Forth in general), and Emacs does not use the Forth mode   
   that it uses when the extension is .4th.   
      
   - anton   
   --   
   M. Anton Ertl  http://www.complang.tuwien.ac.at/anton/home.html   
   comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html   
        New standard: https://forth-standard.org/   
      EuroForth 2023: https://euro.theforth.net/2023   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca