News for hackers. Stuff that matters.
Re:Shebang Quine by adrianratnapala on Friday May 20, 2016 @11:02AM (#11738362)
Hmm, when we speak of quining, we ask "How in X programming language, do we write a program that outputs it's own text".

But in what language is this "program" written?

The best I can guess is that the unix shebang hack/convention is a (very, very minimal) language all of its own.

Re:Shebang Quine by maze-le on Friday May 20, 2016 @11:54AM (#11738846)
I is not 'exactly' a quine, because the tool 'cat' is a program on its own, and not a shell command. Still, it is an entertaining and unexpected outcome.
Re:Shebang Quine by profmonocle on Friday May 20, 2016 @01:08PM (#11739553)
My favorite pseudo-quine is just an empty file. Works in Bash, PHP, Node, Perl, Python, Ruby, and many others I'm sure.
Re:Shebang Quine by hkjgkjy on Friday May 20, 2016 @12:43PM (#11739321)
I'm curious to know where the line of a "program" goes. I imagine a OS without file system, but only with functions (like as if emacs was an OS). Would a function then be called a program?
Re:Shebang Quine by jannotti on Friday May 20, 2016 @01:08PM (#11739550)
That's not the issue, really. The issue is whether the program has access to itself as input. This one does, so it's not a quine. But it's cool.
Re:Shebang Quine by maze-le on Friday May 20, 2016 @12:59PM (#11739460)
Well, if your EmacsOS allocates exclusive adress-space for the function-call, so that it can be executed in a very own execution context, independent of other function-calls... then you could call it a program.
Re:Shebang Quine by khedoros on Friday May 20, 2016 @07:51PM (#11742435)
In that definition, it seems like DOS OSes never had programs.
Re:Shebang Quine by stormbrew on Friday May 20, 2016 @11:57AM (#11738880)
Yeah, I would call it a quine of the binary loader, basically.