Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #385542

Re: Writing own source disk

From Ben Bacarisse <ben@bsb.me.uk>
Newsgroups comp.lang.c
Subject Re: Writing own source disk
Date 2024-06-04 14:40 +0100
Organization A noiseless patient Spider
Message-ID <87y17kkerb.fsf@bsb.me.uk> (permalink)
References <v3hmha$3banl$1@dont-email.me> <87sexvm1lr.fsf@bsb.me.uk> <v3iu2s$3i7bf$1@dont-email.me> <875xuqmdjn.fsf@bsb.me.uk> <v3lkb8$3d35$2@dont-email.me>

Show all headers | View raw


Malcolm McLean <malcolm.arthur.mclean@gmail.com> writes:

> On 03/06/2024 13:11, Ben Bacarisse wrote:
>> Malcolm McLean <malcolm.arthur.mclean@gmail.com> writes:
>> 
>>> 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 a
>>>>> standard programming problem. It's called a quine.
>>>> A quine must also not process any input.
>>>>
>>>>> And I have achieved a
>>>>> quine. But a serious quine. Not contrived special purpose code, but serious
>>>>> codde which can be used to package up source for real.
>>>> You XML-producing program may be very useful, but it's not really a
>>>> quine, serious or otherwise.
>>>>
>>>>> And it's completely
>>>>> 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.
>>>> That sounds as if the program reads input (but it's not explicitly
>>>> 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 genuine
>>> quine. Compile it and see.
>> No need; I'll take your word for it.
>> 
>>> 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.
>> 
> It's not therortically interesting from a computer science perspective.
> 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.

I'm not getting it.  Why do I want a quine in connection to a graphical
program?  I want a way to include everything in the distribution, but
we've had that for ages.  Why is having a program that outputs something
you already have (by defintion!) of any use?

-- 
Ben.

Back to comp.lang.c | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Writing own source disk Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2024-06-02 12:54 +0100
  Re: Writing own source disk Ben Bacarisse <ben@bsb.me.uk> - 2024-06-02 23:17 +0100
    Re: Writing own source disk Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2024-06-03 00:09 +0100
      Re: Writing own source disk Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-06-02 23:19 +0000
      Re: Writing own source disk Ben Bacarisse <ben@bsb.me.uk> - 2024-06-03 13:11 +0100
        Re: Writing own source disk Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2024-06-04 00:41 +0100
          Re: Writing own source disk Ben Bacarisse <ben@bsb.me.uk> - 2024-06-04 14:40 +0100
            Re: Writing own source disk Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2024-06-04 19:45 +0100
              Re: Writing own source disk scott@slp53.sl.home (Scott Lurndal) - 2024-06-04 19:23 +0000
            Re: Writing own source disk bart <bc@freeuk.com> - 2024-06-04 20:57 +0100
              Re: Writing own source disk Mikko <mikko.levanto@iki.fi> - 2024-06-05 11:13 +0300
                Re: Writing own source disk bart <bc@freeuk.com> - 2024-06-05 09:23 +0100
    Re: Writing own source disk bart <bc@freeuk.com> - 2024-06-03 00:10 +0100
      Re: Writing own source disk Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2024-06-03 05:16 +0100
      Re: Writing own source disk Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2024-06-03 05:19 +0100
      Re: Writing own source disk Ben Bacarisse <ben@bsb.me.uk> - 2024-06-03 10:31 +0100
        Re: Writing own source disk bart <bc@freeuk.com> - 2024-06-03 11:01 +0100
          Re: Writing own source disk Ben Bacarisse <ben@bsb.me.uk> - 2024-06-03 12:58 +0100
            Re: Writing own source disk bart <bc@freeuk.com> - 2024-06-03 13:37 +0100
              Re: Writing own source disk bart <bc@freeuk.com> - 2024-06-03 14:50 +0100
              Re: Writing own source disk Ben Bacarisse <ben@bsb.me.uk> - 2024-06-03 14:55 +0100
                Re: Writing own source disk bart <bc@freeuk.com> - 2024-06-03 15:34 +0100
                Re: Writing own source disk Ben Bacarisse <ben@bsb.me.uk> - 2024-06-03 19:36 +0100
              Re: Writing own source disk Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2024-06-04 00:35 +0100
          Re: Writing own source disk Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-06-03 17:33 -0700
            Re: Writing own source disk Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-06-03 17:35 -0700
              Re: Writing own source disk David Brown <david.brown@hesbynett.no> - 2024-06-04 09:30 +0200
              Re: Writing own source disk Mikko <mikko.levanto@iki.fi> - 2024-06-05 11:19 +0300
                Re: Writing own source disk Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-06-05 08:29 +0000
                Re: Writing own source disk Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-06-05 11:10 -0700
                Re: Writing own source disk scott@slp53.sl.home (Scott Lurndal) - 2024-06-05 18:23 +0000
                Re: Writing own source disk Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-06-05 11:26 -0700
                Re: Writing own source disk David Brown <david.brown@hesbynett.no> - 2024-06-05 21:27 +0200
        Re: Writing own source disk Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-06-03 23:56 +0000
          Re: Writing own source disk Ben Bacarisse <ben@bsb.me.uk> - 2024-06-04 12:10 +0100
  Re: Writing own source disk Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-06-02 23:18 +0000
  Re: Writing own source disk Michael S <already5chosen@yahoo.com> - 2024-06-03 16:04 +0300
    Re: Writing own source disk Ben Bacarisse <ben@bsb.me.uk> - 2024-06-03 14:47 +0100
      Re: Writing own source disk Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2024-06-04 01:18 +0100
        Re: Writing own source disk Ben Bacarisse <ben@bsb.me.uk> - 2024-06-04 14:33 +0100
          Re: Writing own source disk Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2024-06-04 19:41 +0100
            Re: Writing own source disk Richard Harnden <richard.nospam@gmail.invalid> - 2024-06-04 21:04 +0100
            Re: Writing own source disk Ben Bacarisse <ben@bsb.me.uk> - 2024-06-06 18:00 +0100
              Re: Writing own source disk Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2024-06-06 20:24 +0100
                Re: Writing own source disk Ben Bacarisse <ben@bsb.me.uk> - 2024-06-07 20:04 +0100

csiph-web