Sysop: | Amessyroom |
---|---|
Location: | Fayetteville, NC |
Users: | 27 |
Nodes: | 6 (0 / 6) |
Uptime: | 38:01:33 |
Calls: | 631 |
Calls today: | 2 |
Files: | 1,187 |
D/L today: |
22 files (29,767K bytes) |
Messages: | 173,681 |
Recently discovered this wacky project
<https://www.netfort.gr.jp/~dancer/software/binfmtc.html>, using the Linux
binfmt mechanism (plus suitable shebang-style lines) to allow the direct execution of C source files, and also assembly-language source files, as though they were interpreted scripts.
Recently discovered this wacky project <https://www.netfort.gr.jp/~dancer/software/binfmtc.html>, using the Linux binfmt mechanism (plus suitable shebang-style lines) to allow the direct execution of C source files, and also assembly-language source files, as though they were interpreted scripts.
Of course behind the scenes the code is actually compiled through GCC to a temporary executable, which is then launched.
HasnrCOt been updated in a very long while, but itrCOs still in the current Debian repositories ...
Lawrence DrCOOliveiro <ldo@nz.invalid> wrote:
Recently discovered this wacky project
<https://www.netfort.gr.jp/~dancer/software/binfmtc.html>, using the Linux >> binfmt mechanism (plus suitable shebang-style lines) to allow the direct
execution of C source files, and also assembly-language source files, as
though they were interpreted scripts.
Of course behind the scenes the code is actually compiled through GCC to a >> temporary executable, which is then launched.
HasnrCOt been updated in a very long while, but itrCOs still in the current >> Debian repositories ...
For scripting gcc compile time is problematic. In such case it is better
to use tiny C which compiles much faster. Also, tiny C can compile to memory, so there is behind the scene messing with temporary files.
OTOH I find concept of C scripting uninteresting. For me need for
compiled executable is not a problem. Main attraction of scripting
langages is due to language and implementation features.
That is
usualy scripting languages do extensive checking at runtime and
offer convenience features like garbage collection, buitin functions
etc.
Such features does not fit well with C and what can be added
to C works for executables too. Additionaly, with C I depend more
on compile time checking which is different than usual way to
develop scripts.
There is thing called cint (C interpreter), that probably would be
more useful for scripting (as it did substantial checks at runtime).