Talk:Native shebang: Difference between revisions

Line 4:
Write a "script" file in your programming language which starts with #! (aka shebang)
and is followed by a path to a binary executable compiled from the same script file.
The executable must then rebuild itself using the contents of the script file. Following this, it
must print arguments on the command line, separated by spaces.
 
Background:
Line 38 ⟶ 39:
 
::: It's not at all clear that a binary cannot begin with #! - if anything, that is an OS limitation (for example '#' corresponds to an 8086 AND opcode and the msdos COM file format is just executable code on the 8086 architecture with conventions added in an ad-hoc fashion). It's also not clear that this "self compiling application" does anything - actually, this is sounding more like a viral infection than a useful application. So let's say that the application does nothing - in that case, compiling can be a no-op. Do you see where I am going with this? --[[User:Rdm|Rdm]] ([[User talk:Rdm|talk]]) 07:38, 26 September 2014 (UTC)
 
::Since shebangs are a UNIX convention, I am thinking in terms of UNIX only. I forgot to add the default behavior which was part of the original proposal, which is to print arguments on the command line. I added it to the new wording. Most interestingly I see this as a way to demonstrate ways languages can compile code from within the language itself. The C example is not ideal, since it doesn't use internal facilities, but since not all languages have a built in compiler, this should be allowed. --[[User:POP|POP]] ([[User talk:POP|talk]]) 09:02, 26 September 2014 (UTC)
 
==What is this task asking for?==
Anonymous user