Liste des Groupes | Revenir à cl c |
On 03/06/2024 13:11, Ben Bacarisse wrote:Malcolm McLean <malcolm.arthur.mclean@gmail.com> writes:It's not therortically interesting from a computer science perspective.
On 02/06/2024 23:17, Ben Bacarisse wrote:Malcolm McLean <malcolm.arthur.mclean@gmail.com> writes:
>Writing a prgram which writes its own source to standard output is aA quine must also not process any input.
standard programming problem. It's called a quine.
>And I have achieved aYou XML-producing program may be very useful, but it's not really a
quine. But a serious quine. Not contrived special purpose code, but serious
codde which can be used to package up source for real.
quine, serious or otherwise.
>And it's completelyThat sounds as if the program reads input (but it's not explicitly
portable ANSI C. So of course it can't write output to disk - that is
impossible to achive portably. Instead it writes its own source to standard
output using a simle XML format called FileSystem, which represents the
source tree.
stated) as well as not producing the program text but some XML
representation of the program text. That would make it not a quine for
two reasons.
How do you process a source tree in completely portable ANSI C?The FileSystem XML fie is embedded with the program. It is a genuineNo need; I'll take your word for it.
quine. Compile it and see.
It's also a very superior quine, and it spits out images and binaries.If it's a quine (and I don't doubt you) then is spits out its own source
code. That can, of course, include source code encodings of images.
I'm not sure why you consider that superior, but that is, after all, a
rather subjective assessment.
You can encode images as source.
>
But from a practical point of view, yes my quine is massively
powerful. Most graphical programs do have images as source. And they just
get zipped up into the FileSystem XML file. So any binary data can be
included. Easily, Using exactly the same system.
Les messages affichés proviennent d'usenet.