Talk:Native shebang: Difference between revisions

Line 17:
Programming languages which cannot generate a binary executable should ignore this
task.
 
If the programming language has a built-in compiler or functions to access one, then those
should be used. Otherwise the compiler can be called (e.g. gcc/clang).
--[[User:POP|POP]] ([[User talk:POP|talk]]) 16:02, 25 September 2014 (UTC)
 
:Where should the "binary executable" be written? --[[User:Rdm|Rdm]] ([[User talk:Rdm|talk]]) 18:35, 25 September 2014 (UTC)
 
::As this is a demo case, the path doesn't have to be absolute. A file in the local directory will work. I wrote a test case in C with "#! ./shebang" --[[User:POP|POP]] ([[User talk:POP|talk]]) 19:15, 25 September 2014 (UTC)
::I wrote a test case in C with "#! ./shebang" --[[User:POP|POP]] ([[User talk:POP|talk]]) 19:15, 25 September 2014 (UTC)
 
:::So this task needs at least two programs - the binary to be referenced by the "script" and the "script" and the purpose of this task is to write yet another binary? This is starting to sound more than a little silly. Why bother with all these pieces? Why not just write an ordinary program? --[[User:Rdm|Rdm]] ([[User talk:Rdm|talk]]) 22:28, 25 September 2014 (UTC)
 
::The shebang file must start with #! and a binary can't start with #!, so at least two files
::will always be needed.
::The goal is a self compiling application which can be called as a script. I.e.
::./shebang.x
::will recompile and run the app.
::For C you need the source file "shebang.x," the executable "shebang" and the compiler (gcc, clang etc.).
::For languages with a built-in compiler, that one should be used instead. I added this to the description.
::IAnyway, wrotethis ais testthe casebest inI Ccan come up with for a task called "#!native ./shebang." --[[User:POP|POP]] ([[User talk:POP|talk]]) 1905:1559, 2526 September 2014 (UTC)
 
 
==What is this task asking for?==
Anonymous user