discussion icon indicating copy to clipboard operation
discussion copied to clipboard

Finding Forth repositories

Open larsbrinkhoff opened this issue 10 years ago • 15 comments

Hello,

I created a GitHub user to put a star on Forth repositories: http://github.com/stars/ForthStar

I'd be happy to take suggestions for more repositories. The criteria are:

  • Detected as Forth by GitHub, and not a false positive. Or
  • At least 20% Forth, and not a toy.

larsbrinkhoff avatar Mar 09 '15 18:03 larsbrinkhoff

https://github.com/VoidVolker/metronom - my old simple free forth program. https://github.com/VoidVolker/spf64 - spf64 linux experiment.

VoidVolker avatar Mar 12 '15 19:03 VoidVolker

reda4, a colorless colorforth just moved to github from google code: https://github.com/phreda4/reda4

lowfatcomputing avatar Mar 16 '15 16:03 lowfatcomputing

@VoidVolker Thanks; those were already starred.

@lowfatcomputing Thanks, I'm keeping an eye out for new Forth repos, but missed that one. If indeed it is a Forth?

larsbrinkhoff avatar Mar 16 '15 18:03 larsbrinkhoff

https://github.com/aviatorRHK/rpiForth

lowfatcomputing avatar Apr 19 '15 11:04 lowfatcomputing

@lowfatcomputing Thanks, but that's not written in Forth, is it?

larsbrinkhoff avatar Apr 19 '15 17:04 larsbrinkhoff

It's Forth code written in assembly. Maybe star it with ForthStar but don't have it detected as Forth?

lowfatcomputing avatar Apr 19 '15 17:04 lowfatcomputing

https://github.com/mitra42/webforth Javascript version of Forth Runs in Browser without browserify, or webpack or similar (zero dependencies). https://www.mitra.biz/forth/console.html Enough words in Javascript for a minimal interpreter and then rest of it compiled from Forth. Arduino version, metacompiled from javascript.

Intention is to make the metacompiler easier to use, so can develop forth in the browser, and then hit one button to dump a Arduino sketch (or in future other system).

@larsbrinkhoff - its 90% in Forth itself, but Github doesnt auto-detect it for some reason, I've no idea what their algorithm is ?

mitra42 avatar Dec 02 '20 22:12 mitra42

@mitra42, the algorithm is in GitHub's "linguist". It looks for file extensions, and when languages share extensions it looks at file contents.

You can place an override in the ,gitattributes file, say *.f linguist-language=Forth

larsbrinkhoff avatar Dec 03 '20 09:12 larsbrinkhoff

Thanks @larsbrinkhoff - I don't think that will work because the main forth file is index.js - because its actually run in Javascript (which then compiles Forth). That's what allows it to be loaded by a browser.

I think relying on auto-classification for finding Forth repositories might work for finding programs IN forth, is always going to be problematic for finding implementations OF Forth - which are most likely going to be in something else (Assembler, C, JS etc)

mitra42 avatar Dec 03 '20 21:12 mitra42

As a hack workaround, you could construct your software so that the forth file is separate, but is merged during build. This would also enable syntax highlighting and other integrated development environment features.

Also, many implementations of forth are, I guess, partially self-hosting or metacompiled, where the core may be in the implementation language (C) and the remainder in forth. CForth is one such.

quozl avatar Dec 03 '20 21:12 quozl

Sure @quozl I'm going to do that anyway at some point, once I figure out how to make it work in both the browser and node cases (its non-trivial), however its far from the top of the priority list compared to things that make life more powerful for the user. This is a generic problem - implementations OF forth are written, at least partially, in other languages. I don't want to rewrite my code just to convince github's algorithm (which I don't care about) in order to convince @larsbrinkhoff to give it a star (which I do care about )

mitra42 avatar Dec 03 '20 21:12 mitra42

No worries, glad to help.

quozl avatar Dec 03 '20 22:12 quozl

@mitra42, now that you pointed out index.js, I see the Forth code clearly.

I do think index.js linguist-language=Forth make GitHub display it as Forth, not JavaScript.

larsbrinkhoff avatar Dec 04 '20 05:12 larsbrinkhoff

Yes - that works - and doesnt seem to stop my IDE (WebStorm) understanding its JS

mitra42 avatar Dec 04 '20 06:12 mitra42

Great! Your star is well deserved. :-)

larsbrinkhoff avatar Dec 04 '20 06:12 larsbrinkhoff