POV-Ray : Newsgroups : povray.off-topic : You thought 4K graphics demos were impressive? Server Time
20 Nov 2026 11:13:54 EST (-0500)
  You thought 4K graphics demos were impressive? (Message 23 to 42 of 42)  
<<< Previous 22 Messages Goto Initial 42 Messages
From: Orchid XP v8
Subject: Re: You thought 4K graphics demos were impressive?
Date: 29 Aug 2009 11:50:31
Message: <4a994e47@news.povray.org>
Warp wrote:
> Orchid XP v8 <voi### [at] devnull> wrote:
>> I found a program (I forget what it did) that was runnable in multiple 
>> languages simultaneously...
> 
>   A polyglot quine?

Sounds suspicously familiar, yes.

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

From: Darren New
Subject: Re: You thought 4K graphics demos were impressive?
Date: 29 Aug 2009 12:56:38
Message: <4a995dc6$1@news.povray.org>
Warp wrote:
> triple_r <nomail@nomail> wrote:
>> cp smr.c smr
>> chmod +x smr

>   That's not C.

Are you sure?  (Serious question...)

-- 
   Darren New, San Diego CA, USA (PST)
   Understanding the structure of the universe
    via religion is like understanding the
     structure of computers via Tron.


Post a reply to this message

From: Darren New
Subject: Re: You thought 4K graphics demos were impressive?
Date: 29 Aug 2009 13:27:48
Message: <4a996514@news.povray.org>
Darren New wrote:
> Warp wrote:
>> triple_r <nomail@nomail> wrote:
>>> cp smr.c smr
>>> chmod +x smr
> 
>>   That's not C.
> 
> Are you sure?  (Serious question...)

To clarify, I recognise it's not a full C program, as it's missing main. I 
just wonder if it's actually an invalid source file.

-- 
   Darren New, San Diego CA, USA (PST)
   Understanding the structure of the universe
    via religion is like understanding the
     structure of computers via Tron.


Post a reply to this message

From: Warp
Subject: Re: You thought 4K graphics demos were impressive?
Date: 29 Aug 2009 13:47:12
Message: <4a99699f@news.povray.org>
Darren New <dne### [at] sanrrcom> wrote:
> Darren New wrote:
> > Warp wrote:
> >> triple_r <nomail@nomail> wrote:
> >>> cp smr.c smr
> >>> chmod +x smr
> > 
> >>   That's not C.
> > 
> > Are you sure?  (Serious question...)

> To clarify, I recognise it's not a full C program, as it's missing main. I 
> just wonder if it's actually an invalid source file.

  It's not a complete C program. AFAIK the C standard requires for main()
to exist.

-- 
                                                          - Warp


Post a reply to this message

From: Darren New
Subject: Re: You thought 4K graphics demos were impressive?
Date: 29 Aug 2009 14:14:06
Message: <4a996fee$1@news.povray.org>
Warp wrote:
> Darren New <dne### [at] sanrrcom> wrote:
>> Darren New wrote:
>>> Warp wrote:
>>>> triple_r <nomail@nomail> wrote:
>>>>> cp smr.c smr
>>>>> chmod +x smr
>>>>   That's not C.
>>> Are you sure?  (Serious question...)
> 
>> To clarify, I recognise it's not a full C program, as it's missing main. I 
>> just wonder if it's actually an invalid source file.
> 
>   It's not a complete C program. AFAIK the C standard requires for main()
> to exist.

Hence my clarification. It's obviously a valid .h file. But is it a valid .c 
file?

-- 
   Darren New, San Diego CA, USA (PST)
   Understanding the structure of the universe
    via religion is like understanding the
     structure of computers via Tron.


Post a reply to this message

From: Warp
Subject: Re: You thought 4K graphics demos were impressive?
Date: 29 Aug 2009 14:20:56
Message: <4a997187@news.povray.org>
Darren New <dne### [at] sanrrcom> wrote:
> Hence my clarification. It's obviously a valid .h file. But is it a valid .c 
> file?

  According to gcc, no (although it does compile it nevertheless):

> touch test.c
> ls -l
total 0
-rw-r--r-- 1 warp users 0 2009-08-29 21:18 test.c
> gcc -pedantic -c test.c
test.c:1: warning: ISO C forbids an empty source file
warp@a8:~/tmp/hops>ls -l
total 4
-rw-r--r-- 1 warp users   0 2009-08-29 21:18 test.c
-rw-r--r-- 1 warp users 684 2009-08-29 21:18 test.o

-- 
                                                          - Warp


Post a reply to this message

From: Jim Henderson
Subject: Re: You thought 4K graphics demos were impressive?
Date: 29 Aug 2009 14:21:17
Message: <4a99719d@news.povray.org>
On Sat, 29 Aug 2009 11:14:01 -0700, Darren New wrote:

> Hence my clarification. It's obviously a valid .h file. But is it a
> valid .c file?

Yes, it would be a valid .c file because a library doesn't need to have a 
main() function.

I also seem to recall that there is a way to specify a different entry 
point rather than main() even for a program, but whether the .c file is 
valid and whether it makes a valid "program" are actually two different 
questions. :-)

Jim


Post a reply to this message

From: Warp
Subject: Re: You thought 4K graphics demos were impressive?
Date: 29 Aug 2009 14:22:40
Message: <4a9971f0@news.povray.org>
Jim Henderson <nos### [at] nospamcom> wrote:
> Yes, it would be a valid .c file because a library doesn't need to have a 
> main() function.

  Have you checked that the C standard agrees with you?

-- 
                                                          - Warp


Post a reply to this message

From: Jim Henderson
Subject: Re: You thought 4K graphics demos were impressive?
Date: 29 Aug 2009 14:42:57
Message: <4a9976b1$1@news.povray.org>
On Sat, 29 Aug 2009 14:22:40 -0400, Warp wrote:

> Jim Henderson <nos### [at] nospamcom> wrote:
>> Yes, it would be a valid .c file because a library doesn't need to have
>> a main() function.
> 
>   Have you checked that the C standard agrees with you?

I researched a little bit, yes.  By definition, a library is not a 
program, just a collection of functions, and as such, a main function is 
not required (in fact, it could cause problems to have a library with a 
main() function).

Jim


Post a reply to this message

From: Jim Henderson
Subject: Re: You thought 4K graphics demos were impressive?
Date: 29 Aug 2009 14:43:36
Message: <4a9976d8@news.povray.org>
On Sat, 29 Aug 2009 14:22:40 -0400, Warp wrote:

> Jim Henderson <nos### [at] nospamcom> wrote:
>> Yes, it would be a valid .c file because a library doesn't need to have
>> a main() function.
> 
>   Have you checked that the C standard agrees with you?

Windows programs also don't include a main() function - their entry is 
WinMain() IIRC.

Jim


Post a reply to this message

From: Fredrik Eriksson
Subject: Re: You thought 4K graphics demos were impressive?
Date: 29 Aug 2009 14:45:06
Message: <op.uzfs1fla7bxctx@e6600>
On Sat, 29 Aug 2009 20:20:56 +0200, Warp <war### [at] tagpovrayorg> wrote:
> Darren New <dne### [at] sanrrcom> wrote:
>> Hence my clarification. It's obviously a valid .h file. But is it a  
>> valid .c file?
>
>   According to gcc, no (although it does compile it nevertheless):
>
> > touch test.c
> > ls -l
>  total 0
>  -rw-r--r-- 1 warp users 0 2009-08-29 21:18 test.c
> > gcc -pedantic -c test.c
>  test.c:1: warning: ISO C forbids an empty source file
>  warp@a8:~/tmp/hops>ls -l
>  total 4
>  -rw-r--r-- 1 warp users   0 2009-08-29 21:18 test.c
>  -rw-r--r-- 1 warp users 684 2009-08-29 21:18 test.o

Not everyone thinks that GCC is right about this. The only relevant part I  
can find in the actual standard is "A source file that is not empty shall  
end in a new-line character" (5.1.1.2.2), which seems to imply that empty  
source files are OK.



-- 
FE


Post a reply to this message

From: Jim Henderson
Subject: Re: You thought 4K graphics demos were impressive?
Date: 29 Aug 2009 14:46:00
Message: <4a997768$1@news.povray.org>
On Sat, 29 Aug 2009 14:22:40 -0400, Warp wrote:

> Jim Henderson <nos### [at] nospamcom> wrote:
>> Yes, it would be a valid .c file because a library doesn't need to have
>> a main() function.
> 
>   Have you checked that the C standard agrees with you?

And further, a multi-file C program doesn't require that every .c file 
have a main() function defined.  Therefore, having a .c file that has no 
main() function in it *is* valid.

Jim


Post a reply to this message

From: Fredrik Eriksson
Subject: Re: You thought 4K graphics demos were impressive?
Date: 29 Aug 2009 14:50:18
Message: <op.uzfs94pq7bxctx@e6600>
On Sat, 29 Aug 2009 20:43:36 +0200, Jim Henderson <nos### [at] nospamcom>  
wrote:
>
> Windows programs also don't include a main() function - their entry is
> WinMain() IIRC.

This of course being a platform-specific, non-standard convenience  
extension.


-- 
FE


Post a reply to this message

From: Jim Henderson
Subject: Re: You thought 4K graphics demos were impressive?
Date: 29 Aug 2009 14:51:55
Message: <4a9978cb$1@news.povray.org>
On Sat, 29 Aug 2009 20:50:18 +0200, Fredrik Eriksson wrote:

> On Sat, 29 Aug 2009 20:43:36 +0200, Jim Henderson <nos### [at] nospamcom>
> wrote:
>>
>> Windows programs also don't include a main() function - their entry is
>> WinMain() IIRC.
> 
> This of course being a platform-specific, non-standard convenience
> extension.

Yes, it's defined as a "freestanding" program IIRC.  Point is that you 
can specify a different entry point if desired.

Jim


Post a reply to this message

From: Warp
Subject: Re: You thought 4K graphics demos were impressive?
Date: 29 Aug 2009 15:28:12
Message: <4a99814c@news.povray.org>
Jim Henderson <nos### [at] nospamcom> wrote:
> On Sat, 29 Aug 2009 14:22:40 -0400, Warp wrote:

> > Jim Henderson <nos### [at] nospamcom> wrote:
> >> Yes, it would be a valid .c file because a library doesn't need to have
> >> a main() function.
> > 
> >   Have you checked that the C standard agrees with you?

> I researched a little bit, yes.  By definition, a library is not a 
> program, just a collection of functions, and as such, a main function is 
> not required (in fact, it could cause problems to have a library with a 
> main() function).

  That's not what I meant. I was talking about source files which contain
nothing. The question was whether an empty file is a valid C source file,
to which you responded positively, which is why I asked whether the standard
also says so.

-- 
                                                          - Warp


Post a reply to this message

From: Jim Henderson
Subject: Re: You thought 4K graphics demos were impressive?
Date: 29 Aug 2009 15:31:19
Message: <4a998207$1@news.povray.org>
On Sat, 29 Aug 2009 15:28:12 -0400, Warp wrote:

> Jim Henderson <nos### [at] nospamcom> wrote:
>> On Sat, 29 Aug 2009 14:22:40 -0400, Warp wrote:
> 
>> > Jim Henderson <nos### [at] nospamcom> wrote:
>> >> Yes, it would be a valid .c file because a library doesn't need to
>> >> have a main() function.
>> > 
>> >   Have you checked that the C standard agrees with you?
> 
>> I researched a little bit, yes.  By definition, a library is not a
>> program, just a collection of functions, and as such, a main function
>> is not required (in fact, it could cause problems to have a library
>> with a main() function).
> 
>   That's not what I meant. I was talking about source files which
>   contain
> nothing. The question was whether an empty file is a valid C source
> file, to which you responded positively, which is why I asked whether
> the standard also says so.

The bit you quoted from what I said specifically had to do with a main() 
function not being needed.  It wasn't clear that you were talking about 
an empty file, I thought you were specifically talking about the lack of 
a main() function, since that's what you quoted.

Though now that you've clarified, I see that it could be read either way.

Jim


Post a reply to this message

From: Darren New
Subject: Re: You thought 4K graphics demos were impressive?
Date: 29 Aug 2009 20:02:11
Message: <4a99c183$1@news.povray.org>
Jim Henderson wrote:
> Though now that you've clarified, I see that it could be read either way.

I anyone else amused that one can start a flame war amongst geeks over an 
empty file? :-)

-- 
   Darren New, San Diego CA, USA (PST)
   Understanding the structure of the universe
    via religion is like understanding the
     structure of computers via Tron.


Post a reply to this message

From: Jim Henderson
Subject: Re: You thought 4K graphics demos were impressive?
Date: 29 Aug 2009 22:33:16
Message: <4a99e4ec$1@news.povray.org>
On Sat, 29 Aug 2009 17:02:10 -0700, Darren New wrote:

> Jim Henderson wrote:
>> Though now that you've clarified, I see that it could be read either
>> way.
> 
> I anyone else amused that one can start a flame war amongst geeks over
> an empty file? :-)

Oh, yes, I am very amused by this.  :-)

Jim


Post a reply to this message

From: Nicolas Alvarez
Subject: Re: You thought 4K graphics demos were impressive?
Date: 29 Aug 2009 23:48:07
Message: <4a99f677@news.povray.org>
Warp wrote:
> triple_r <nomail@nomail> wrote:
>> cp smr.c smr
>> chmod +x smr
> 
>   I thought it was supposed to be the Internet Obfuscated *C* Code
>   Contest.
> 
>   That's not C.

They give awards for "best abuse of the rules" in that contest too.

That may not be C, but it *technically* followed the rules (and made the
organizers fix the rules for the next round).


Post a reply to this message

From: Warp
Subject: Re: You thought 4K graphics demos were impressive?
Date: 30 Aug 2009 02:51:03
Message: <4a9a2157@news.povray.org>
Darren New <dne### [at] sanrrcom> wrote:
> Jim Henderson wrote:
> > Though now that you've clarified, I see that it could be read either way.

> I anyone else amused that one can start a flame war amongst geeks over an 
> empty file? :-)

  Where is it?

-- 
                                                          - Warp


Post a reply to this message

<<< Previous 22 Messages Goto Initial 42 Messages

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.