 |
 |
|
 |
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
http://nanochess.110mb.com/chess3.html
--
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Darren New wrote:
> http://nanochess.110mb.com/chess3.html
That is exceedingly disturbing.
--
Tim Cook
http://empyrean.freesitespace.net
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Darren New schrieb:
> http://nanochess.110mb.com/chess3.html
CAUTION:
My virus scanner warns me about some of that page's content! I didn't
check whether it's a true or false alert, but I'd recommend a heightened
attention to potential security issues when visiting that page.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Darren New <dne### [at] san rr com> wrote:
> http://nanochess.110mb.com/chess3.html
that man is clearly a real programmer. ^_^
also amazing the things he does with javascript, the zooming of the photo...
checked the source? :)
http://nanochess.110mb.com/efectos.js
perhaps he generated it from perl... :P
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Darren New <dne### [at] san rr com> wrote:
> http://nanochess.110mb.com/chess3.html
That's pretty amazing. Did you try it? How well does it play? I mean, not
well of course, but is it at least somewhat competent? I saw a similar program
whose features included occasional suicide and such. One of those "features,
not bugs" sort of things.
I've played around with these obfuscated things a little, and I was pretty
surprised how much you can fit in a kilobyte or two of c. Not to toot my own
horn, but I'm not a skilled programmer in the least, and for 1728 bytes, I
managed to get a 3D incompressible fluid simulator with temperature convection
and buoyancy, adjustable size, an X11 display, volume rendering with faked
scattering, and animation output and playback. Of course it's no chess
program, but the only trick is to do exactly what he did and iterate about five
times, realizing each time the way you should have done it. It's actually
pretty addicting... I think the most elegant I ever saw was this:
http://www.ioccc.org/2000/dhyang.c
- Ricky
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Darren New
Subject: Re: You thought 4K graphics demos were impressive?
Date: 28 Aug 2009 01:04:54
Message: <4a976576$1@news.povray.org>
|
|
 |
|  |
|  |
|
 |
triple_r wrote:
> Darren New <dne### [at] san rr com> wrote:
>> http://nanochess.110mb.com/chess3.html
>
> That's pretty amazing. Did you try it?
No. He says it goes 6 ply on that page, tho.
--
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
triple_r schrieb:
> I think the most elegant I ever saw was this:
>
> http://www.ioccc.org/2000/dhyang.c
Only looks that elegant at first glance, until you notice that he's
actually kind of cheating: First line defines a single-character empty
preprocessor macro, which he makes quite liberal use of to achieve the
desired formatting of the code.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
clipka <ano### [at] anonymous org> wrote:
> Only looks that elegant at first glance, until you notice that he's
> actually kind of cheating: First line defines a single-character empty
> preprocessor macro, which he makes quite liberal use of to achieve the
> desired formatting of the code.
Did you run it? If you run it, the output is a different beautifully-formatted
c-code. If you run that, the output is another formatted c-code. If you run
that, the output is another formatted c-code. If you run that, the output is
the first result again. Basically:
original -> #1
#1 -> #2
#2 -> #3
#3 -> #1
It's probably more mundane than it looks, but at a glance it's pretty slick.
Maybe RLE compression?
- Ricky
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Warp
Subject: Re: You thought 4K graphics demos were impressive?
Date: 28 Aug 2009 08:34:34
Message: <4a97ceda@news.povray.org>
|
|
 |
|  |
|  |
|
 |
triple_r <nomail@nomail> wrote:
> Did you run it? If you run it, the output is a different beautifully-formatted
> c-code. If you run that, the output is another formatted c-code. If you run
> that, the output is another formatted c-code. If you run that, the output is
> the first result again. Basically:
> original -> #1
> #1 -> #2
> #2 -> #3
> #3 -> #1
It's one of the best self-replicating programs I have ever seen.
Most self-replicating programs just replicate themselves, and that's it.
No ascii art either.
This program, however, prints a different program, which prints a third
program, which prints the original program. And all these programs use
ascii art formatting. That's some self-replication there.
It's just incredible how he could store the *shapes* of all four programs
inside a single self-replicating program.
--
- Warp
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Darren New
Subject: Re: You thought 4K graphics demos were impressive?
Date: 28 Aug 2009 12:31:21
Message: <4a980659$1@news.povray.org>
|
|
 |
|  |
|  |
|
 |
Warp wrote:
> It's one of the best self-replicating programs I have ever seen.
FWIW, this is called a "quine", after the philosopher Quine.
http://en.wikipedia.org/wiki/Quine
--
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: 28 Aug 2009 12:46:24
Message: <4a9809e0@news.povray.org>
|
|
 |
|  |
|  |
|
 |
Darren New <dne### [at] san rr com> wrote:
> Warp wrote:
> > It's one of the best self-replicating programs I have ever seen.
> FWIW, this is called a "quine", after the philosopher Quine.
> http://en.wikipedia.org/wiki/Quine
I wonder what a quine in haskell would look like.
--
- Warp
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Warp <war### [at] tag povray org> wrote:
> It's just incredible how he could store the *shapes* of all four programs
> inside a single self-replicating program.
I don't know exactly how he did it, but if I had to do it, I would use 1/3 of
the junk at the beginning to define each image (It actually looks like he's
divided them in half). I would RLE compress the image and add or subtract a
constant until the ascii values were all in the printable range. If you just
reprint the data section each time with different whitespace and the same
program at the end, maybe you could pull it off. That's a million miles away
from actually pulling it off, but maybe it would work.
- Ricky
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Warp <war### [at] tag povray org> wrote:
> I wonder what a quine in haskell would look like.
Not sure, but this is a particularly short quine, written in c:
http://www0.us.ioccc.org/1994/smr.c
http://www0.us.ioccc.org/1994/smr.hint
- Ricky
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Jim Henderson
Subject: Re: You thought 4K graphics demos were impressive?
Date: 28 Aug 2009 14:50:04
Message: <4a9826dc@news.povray.org>
|
|
 |
|  |
|  |
|
 |
On Fri, 28 Aug 2009 08:34:34 -0400, Warp wrote:
> Most self-replicating programs just replicate themselves, and that's
> it.
> No ascii art either.
One of the most impressive of these that I've ever seen was from the
IOCCC - I can't seem to find the right keywords, but it did something
similar to this but used more than one programming language (ie, #1 was
C, #2 was maybe Pascal, #3 was C again). Wish I could find it now.
Jim
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Warp
Subject: Re: You thought 4K graphics demos were impressive?
Date: 28 Aug 2009 14:56:43
Message: <4a98286b@news.povray.org>
|
|
 |
|  |
|  |
|
 |
triple_r <nomail@nomail> wrote:
> Not sure, but this is a particularly short quine, written in c:
> http://www0.us.ioccc.org/1994/smr.c
> http://www0.us.ioccc.org/1994/smr.hint
That program doesn't link. The linker cannot find the main() function.
--
- Warp
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Orchid XP v8
Subject: Re: You thought 4K graphics demos were impressive?
Date: 28 Aug 2009 15:11:35
Message: <4a982be7$1@news.povray.org>
|
|
 |
|  |
|  |
|
 |
>> Most self-replicating programs just replicate themselves, and that's
>> it.
>> No ascii art either.
>
> One of the most impressive of these that I've ever seen was from the
> IOCCC - I can't seem to find the right keywords, but it did something
> similar to this but used more than one programming language (ie, #1 was
> C, #2 was maybe Pascal, #3 was C again). Wish I could find it now.
I found a program (I forget what it did) that was runnable in multiple
languages simultaneously...
--
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: 28 Aug 2009 18:24:43
Message: <4a98592b@news.povray.org>
|
|
 |
|  |
|  |
|
 |
Orchid XP v8 wrote:
> I found a program (I forget what it did) that was runnable in multiple
> languages simultaneously...
I saw that. And not similar languages. Like, javascript, awk, Haskell, and
C++ or something.
The one I liked was the one that output its own source code in the shape of
a maze, and then solved itself.
--
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: 28 Aug 2009 18:30:36
Message: <4a985a8c$1@news.povray.org>
|
|
 |
|  |
|  |
|
 |
On Fri, 28 Aug 2009 20:11:47 +0100, Orchid XP v8 wrote:
>>> Most self-replicating programs just replicate themselves, and that's
>>> it.
>>> No ascii art either.
>>
>> One of the most impressive of these that I've ever seen was from the
>> IOCCC - I can't seem to find the right keywords, but it did something
>> similar to this but used more than one programming language (ie, #1 was
>> C, #2 was maybe Pascal, #3 was C again). Wish I could find it now.
>
> I found a program (I forget what it did) that was runnable in multiple
> languages simultaneously...
Hmmm, maybe that's the one I am remembering - though I was sure there was
a code generator involved in it...
Jim
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Warp <war### [at] tag povray org> wrote:
> > http://www0.us.ioccc.org/1994/smr.c
> > http://www0.us.ioccc.org/1994/smr.hint
>
> That program doesn't link. The linker cannot find the main() function.
I think the hints said there was some tricky compile flags to force it to
compile. Turns out this is how you compile it:
cp smr.c smr
chmod +x smr
That doesn't seem valid, but I guess that's how you abuse rules and get them
changed.
- Ricky
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Darren New schrieb:
>> I found a program (I forget what it did) that was runnable in multiple
>> languages simultaneously...
>
> I saw that. And not similar languages. Like, javascript, awk, Haskell,
> and C++ or something.
I actually encountered something close to this in real-life work: It was
a file designed to be included in both a C program and a makefile, to
define certain constants.
And typically, pulling this off is even easier if the languages are
quite different, as the most typical way to do it is by having one
language see comments where the other one doesn't.
For instance, to fuse POV-Ray SDL and Lua code, you can use the
following pattern:
#version 3.7; /* (Lua ignores first line if it starts with "#")
-- Lua code goes here
--[=[ */
// POV-Ray SDL code goes here
// ]=]
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Warp
Subject: Re: You thought 4K graphics demos were impressive?
Date: 29 Aug 2009 06:38:17
Message: <4a990518@news.povray.org>
|
|
 |
|  |
|  |
|
 |
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.
--
- Warp
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Warp
Subject: Re: You thought 4K graphics demos were impressive?
Date: 29 Aug 2009 06:41:20
Message: <4a9905d0@news.povray.org>
|
|
 |
|  |
|  |
|
 |
Orchid XP v8 <voi### [at] dev null> wrote:
> I found a program (I forget what it did) that was runnable in multiple
> languages simultaneously...
A polyglot quine?
--
- Warp
Post a reply to this message
|
 |
|  |
|  |
|
 |
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] dev null> 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] san rr com> 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] san rr com> 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] san rr com> 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] nospam com> 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] nospam com> 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] nospam com> 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] tag povray org> wrote:
> Darren New <dne### [at] san rr com> 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] nospam com> 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] nospam com>
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] nospam com>
> 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] nospam com> wrote:
> On Sat, 29 Aug 2009 14:22:40 -0400, Warp wrote:
> > Jim Henderson <nos### [at] nospam com> 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] nospam com> wrote:
>> On Sat, 29 Aug 2009 14:22:40 -0400, Warp wrote:
>
>> > Jim Henderson <nos### [at] nospam com> 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] san rr com> 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
|
 |
|  |
|  |
|
 |
|
 |
|  |