rxi / fe

A tiny, embeddable language implemented in ANSI C
MIT License
1.3k stars 81 forks source link

trivial Plan 9 port #6

Closed ftrvxmtrx closed 4 years ago

ftrvxmtrx commented 4 years ago

Just a few changes to make it build and run under Plan 9. Also replaced /bin/bash with /bin/sh, seemed like no actual bash features are used and /bin/bash doesn't exist on some Unix systems (OpenBSD, NixOS) so this makes it build on those without any changes as well.

rxi commented 4 years ago

Unfortunately this pull request conflicts heavily with the goals of the project, see #1

ftrvxmtrx commented 4 years ago

I see. If it's mostly because of mkfile I could either replace it with an equivalient of build.sh named build.rc (rc is the shell in Plan 9) or just remove that altogether if that'd be a plausible solution.

rxi commented 4 years ago

The mkfile is unwanted, but it's mostly the other parts -- firstly it seems to conflict with the project's goal explicitly stated at the top of the README. The project is written in ANSI C, it's made to compile with -std=c89 -pedantic; before I removed support for 16bit targets it would compile in a 16bit version of TurboC for MS-DOS released in the 1980s. As far as I can tell your changes allow it to work with a language which I would describe as "resembling C" which isn't something I plan to support.

Secondly the change is large in the context of this project, the project isn't small incidentally, it's small from being hacked away on for years as an exercise in practical minimalism (eg. the code to handle escape sequences in a string is barely 4 lines). In the space of the 22 lines of code which this pull request adds, substantial functionality could have been added.

Note this is a criticism only of this pull request and the reasons for it not being introduced into the project. The fact that you've modified it to allow it to run on Plan 9 is pretty cool, it's just something that would exist better outside of this repo as a Plan 9 specific fork.

ftrvxmtrx commented 4 years ago

ok, makes total sense. thanks for the response!

okvik commented 4 years ago

Just a friendly reminder that a proposed change to #!/bin/sh can cut weight by further two characters, as well as having an overall healing effect.