discussion
discussion copied to clipboard
Forth file extensions on GitHub
Occasionally I check which Forth file extension are most popular on GitHub. It's not easy to know which files are written in Forth, but I use the heuristic "if it contains dup and swap, it's probably Forth".
These are the most recent results:
Extension | Files | Supported by GitHub |
---|---|---|
fs | 33629 | yes |
fth | 7041 | yes |
4th | 2183 | yes |
f | 2008 | yes |
frt | 1182 | yes |
m | 1003 | yes |
fr | 556 | yes |
muf | 365 | yes |
4 | 333 | |
forth | 121 | yes |
scr | 88 | |
fi | 56 | |
fb | 37 | |
ft | 22 | |
blk | 17 | |
for | 18 | yes |
seq | 4 | |
ans | 3 | |
fo | 0 |
There are some more used by particular Forth implementations:
Extension | Files | Forth |
---|---|---|
4k | 32 | FourK |
8th | 17 | 8th |
aforth | 14 | colorForth |
atl | 21 | Atlast |
bth | 51 | OpenFirmware |
cf | 3 | colorForth |
cfs | 152 | colorForth |
d4 | 57 | muforth |
e4 | 6 | eForth |
eforth | 1 | eForth |
f83 | 1 | F83 |
f99 | 2 | Forth99 |
fbs | 0 | Block |
fc | 17 | TurboOF |
ff | 16 | FreeForth |
fiv | 13 | Fifth |
fpm | 2 | ? |
fsb | 37 | "Blockish" |
gf | 23 | GameForth |
hfs | 2 | HenceForth |
hsf | 92 | HsF2012 |
lse | 10 | LSE |
mf | 62 | minforth |
mu4 | 121 | muforth |
nf | 29 | various |
nr | 1 | North |
of | 52 | TurboOF, OpenFirmware |
pez | 44 | Pez |
retro | 72 | RetroForth |
rx | 441 | RetroForth |
spf | 70 | SP-Forth |
vf | 3 | VentureForth |
zf | 16 | zForth |
Interesting, thanks.
OpenFirmware has some "bth" files, which are forth source used by the builder rather than by the target.
Thanks, I added bth to the list.
We have used .f for nearly 30 years.
Leon Wagner FORTH, Inc.
On Apr 20, 2017, at 11:51 PM, James Cameron [email protected] wrote:
Interesting, thanks.
OpenFirmware has some "bth" files, which are forth source used by the builder rather than by the target. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
For LSE I use .lse
https://github.com/noqsi/LSE64 https://github.com/noqsi/LSE-ARM
John Doty Noqsi Aerospace, Ltd. http://www.noqsi.com/ [email protected]
Swapforth uses .fs
I was wondering what extension is the most unique to Forth, I guess .4th does the trick, as I have never seen it used elsewhere, opposed to .fs which is unfortunately also used by F#.
@larsbrinkhoff would it be possible to augment your table with total uses of the extension? That way we could calculate the "Forth-percentage" of every extension.
@GeraldWodni, sure. I have just done ordinary GitHub searches like extension:fs dup swap
, so everyone can replicate the results. To search for file extensions without any keywords, you'll have to insert a dummy NOT like this: extension:fs NOT wordneverfound
.
I can make a new table including total files, for the top results. I won't update the original table, too much work.
Extension | Files | Total | Percentage |
---|---|---|---|
fs | 35780 | 283781 | 13 |
fth | 7354 | 19865 | 37 |
4th | 2260 | 5699 | 40 |
f | 3200 | 2269079 | 0.1 |
frt | 1196 | 17876 | 7 |
m | 1040 | 2269079 | 0.04 |
fr | 576 | 87512 | 0.7 |
muf | 370 | 1014 | 36 |
4 | 406 | 383389 | 0.1 |
forth | 129 | 372 | 35 |
@larsbrinkhoff thanks a lot! I took the liberty of correcting the percentage for "4th" from "4" to "40". I had no idea that one can pull statistics that easily, I thought you have some fancy api-script ;)
Thanks, I fixed frt
and forth
too.
En/Je/On 2017-04-20 23:36, Lars Brinkhoff escribió / skribis / wrote :
Extension Files Forth fbs 0 Block fsb 37 "Blockish"
I don't know if someone else used those two extensions before. I "invented" them when I developed my fsb and fsb2 source converters (http://programandala.net/en.program.fsb2.html); they were the logical variants of "fb" and "fs", used by Gforth and other Forth systems.
"fsb" is the source format of the converters: a "blockish" source text file, i.e. an ordinary text file with some simple layout conventions, e.g. line comments that are block index lines or that are "metacomments" that must be removed from the target blocks.
"fbs" is one of the target formats of the converters: a classic block file but with 63 characters per line plus a Unix end of line character. This block file can be edited with an ordinary editor, with some limitations. It's the format used by the lina library file, which uses the "lab" extension.
In recent projects I use the ordinary "fs" instead of "fsb", because a different extension has no practical advantage in this case: The Makefile that builds the target formats does not need it; besides, the format itself can be used with any Forth system, therefore I use a Vim modeline to specify the filetype in order to set the proper syntax highlighting.
-- Marcos Cruz http://programandala.net
I use .FTH .
have a look on taygeta fsl : https://www.taygeta.com/fsl/scilib.html or https://www.taygeta.com/fsl/library/ .seq has also been used
@jjonethal, right I have included seq
in the table. I got four hits.
@GarthWilson fth
is my favourite too.
What does it mean that an extension is supported by github? There is certainly a notion that an extension is supported by unix-like systems. ciforth's allow to build an executable using e.g. lina -c hello.frt The make database knows how to turn a c-program into an executable: $CC -c hello.c
What other Forths generate elf-executable under linux by a direct command? If we can agree on an option and an extension, we could have the like of $FORTH -c hello.frt added to the make database.
What does it mean that an extension is supported by github?
It means GitHub will recognize the file as written in a particular language. This affects search results, trending lists, repository statistics, and maybe some more things.
Note that a careful repository author can make GitHub recognize any extension at will by including linguist
configuration in .gitattributes
. For example, I use this to make GitHub recognize the ans
suffix as Forth.
(A weird implementation detail of GitHub is that you can’t use this for markup languages like Markdown, because the markup vs code decision is made before invoking linguist
. Thus the proliferation of README.md
in place of README
.)