RFC: non-unu source files

RetroForth/nga requires source files to be in unu format (http://unu.retroforth.org). Should I add support for plain, non-unu source files?

Considerations here:

  • what new command line arguments are needed
  • do we need a variation of include that works with non-unu sources?
Assigned to
6 months ago
6 months ago
No labels applied.

~rickcarlino 6 months ago

I've seen a few folks get tripped up by Unu, so I think this is a good idea. You could possibly use a -p / --plain flag. I think it would be important to have a unified include word that can mix Unu and non-Unu source files.

~rickcarlino 6 months ago

Thinking about it more, it would seem that having an "Unu-aware" include word might mandate a known file extension. If that's the case, maybe there is no need for a special flag (the Unu-ness of a source file would be inferred from the file extension).

~crc_ 6 months ago

Arland suggests having the include functionality scan the files for ~~~ and/or ``` blocks rather than using a specific file extension (or set thereof).

~rickcarlino 6 months ago

That's another option.

Some possible hiccups that would need to be considered:

  • performance when loading large files.
  • Accidental false positives in applications that do funny things with text input parsing and have stray ~~~ chars in unexpected places.

Another option I hadn't considered could be to have some sort of pragma comment that is always on the first line of a non-unu source..


Register here or Log in to comment, or comment via email.