C++ sucks for games

T

Trent Buck

Quoth Gerry Quinn on or about 2004-11-12:
But there are no *tasks* fitting that description (hello, Turing-
complete).

Perhaps I was not clear. I am not saying that a given algorithm[0]
cannot be written in C / C++. I am saying that for SOME CLASSES or
algorithm, Lisp's additional features (e.g. lexical closure) allow the
algorithm to be expressed more concisely.

If the task does not lend itself to Lisp's extra features, choice of
language is essentially a matter of personal preference.

Consider: an problem involves a large number of hierarchical datatypes.
You *could* solve the problem in C, but you'll probably think `Aha! This
is an OO-type problem. They are easier to code in C++ than C.' But if
your coprogrammers were unfamiliar with C++ (and OO), they'd probably
try to write C++ code as if it were C, and complain loudly about all the
extra type-checking[1].

-trent

[0] Anything expressible as an algorithm is expressible in Turing
machine language. (Church/Turing thesis)
[1] *I* certainly did this two years ago, before I learnt C++.
 
W

William Bland

But there are no *tasks* fitting that description (hello, Turing-
complete).

- Gerry Quinn

If you think Turing completeness means that all languages are equal in
expressive power, go program in BrainFuck.

Cheers,
Bill.
 
J

Jerry Coffin

[ ... ]
If a formal model of painting is possible, then it
will be a parameterized function of some kind. The
point is this guy has produced the best such
parameterized function in existence, and he did it
in Lisp.

This is clearly a long ways from the best that's ever been done. A
program that simply generates and draws totally random pixels is
obviously better -- given sufficient time, it'll inevitably produce
something worth looking at, whereas it seems fairly clear that this
program has been written in such a way that it can never produce
anything artistic, even by accident.

Despite a lack of formal proof, it seems likely to me that anybody who
can concieve the phrase "formal model of painting" (not to mention
trying to create such a thing) is probably incapable of recognizing
art when he sees it.
And this counts as evidence for C++ somehow?!

Yes -- if memory serves, it was Ambrose Bierce who originally said
something to the effect that free verse is the most difficult poetry
to write well, and therefore the type most often attempted by those
incapable of writing any poetry at all.

Likewise here -- the author has undertaken a program sufficiently
difficult that its fans blithely ignore the fact that it fails utterly
in its goal.
You have a real problem facing discomfirming evidence.

You seem to have a real problem facing logic. It's true that
well-written programs can produce garbage output (typically when given
bad input). It's also true that this program produces garbage output.
By itself, however, that garbage output provides neither proof nor
even evidence of the program being well-written.
 
P

Pascal Bourguignon

[ ... ]
If a formal model of painting is possible, then it
will be a parameterized function of some kind. The
point is this guy has produced the best such
parameterized function in existence, and he did it
in Lisp.

This is clearly a long ways from the best that's ever been done. A
program that simply generates and draws totally random pixels is
obviously better -- given sufficient time, it'll inevitably produce
something worth looking at, whereas it seems fairly clear that this
program has been written in such a way that it can never produce
anything artistic, even by accident.

It depends in what universe.

There are: (expt (expt 2 24) (expt 2 22)) 4-Mpixel 24-bit color
pictures. That's about (expt 10 30000000) Since there's only about
(expt 10 17) seconds in the universe (or at most (expt 10 19)), you
just DON'T have sufficient time. That's why you need to be scient
to produce something worth looking at.
 
J

John Thingstad

If you think Turing completeness means that all languages are equal in
expressive power, go program in BrainFuck.

Cheers,
Bill.

One might add that McCarthy's incentive to create LISP (yeah, old style)
was inspired by the awkwardness of expressing proofs using the Turing
machine as a model..

This is becoming a battle of words.
What does expressiveness really mean?
Turing complete, terse, succinct are easier to get a grip on.
 
P

Philippa Cowderoy

But there are no *tasks* fitting that description (hello, Turing-
complete).

There're a couple of problems with taking turing complete as the point you
stop caring. The first is that it ignores issues like IO and concurrency -
operational semantics matter. The second is that it completely ignores
static semantics, where one language's version may contain proofs of
significant properties of the program that aren't present in the other.

I find the latter to be something of an issue, especially as the
equivalence of programs is in general undecidable.
 
G

Gareth McCaughan

Jerry Coffin wrote:

[Sashank Varma:]
If a formal model of painting is possible, then it
will be a parameterized function of some kind. The
point is this guy has produced the best such
parameterized function in existence, and he did it
in Lisp.
[Jerry:]
This is clearly a long ways from the best that's ever been done. A
program that simply generates and draws totally random pixels is
obviously better -- given sufficient time, it'll inevitably produce
something worth looking at, whereas it seems fairly clear that this
program has been written in such a way that it can never produce
anything artistic, even by accident.

Despite a lack of formal proof, it seems likely to me that anybody who
can concieve the phrase "formal model of painting" (not to mention
trying to create such a thing) is probably incapable of recognizing
art when he sees it.

Well, Harold Cohen was a pretty eminent artist before he
started working on AARON. He's a professor at UCSD. It's
possible that he's "incapable of recognizing art when he
sees it", but it doesn't seem very plausible.
 
M

mikel

Gareth said:
Jerry Coffin wrote:

[Sashank Varma:]
If a formal model of painting is possible, then it
will be a parameterized function of some kind. The
point is this guy has produced the best such
parameterized function in existence, and he did it
in Lisp.

[Jerry:]

This is clearly a long ways from the best that's ever been done. A
program that simply generates and draws totally random pixels is
obviously better -- given sufficient time, it'll inevitably produce
something worth looking at, whereas it seems fairly clear that this
program has been written in such a way that it can never produce
anything artistic, even by accident.

Despite a lack of formal proof, it seems likely to me that anybody who
can concieve the phrase "formal model of painting" (not to mention
trying to create such a thing) is probably incapable of recognizing
art when he sees it.


Well, Harold Cohen was a pretty eminent artist before he
started working on AARON. He's a professor at UCSD. It's
possible that he's "incapable of recognizing art when he
sees it", but it doesn't seem very plausible.

And Aaron's work shows a strong relationship to Cohen's work, which
should be no surprise. Aaron might be regarded as a surprisingly
successful attempt by an artist to automate some part of his process of
invention and discovery.

As for its merits as art, it seems likely that some folks just don't
like Cohen's work.
 
P

Philippa Cowderoy

Quoth Philippa Cowderoy on or about 2004-11-11:
Personally I use [Windows] because ... I
can't be bothered to figure out how to duplicate my desktop setup under X.

You shouldn't duplicate you Windows desktop, you should improve upon it :)

I'm aware there's more possibility under X, but there's not much beyond
the windows desktop and a rearrangeable taskbar I need. Though I guess
it'd be nice to be able to drop app windows into splitter panes - IIRC
it's Ion I should play about with for that? A big issue for me is
notification from apps that don't have the focus, I effectively run
everything maximised and swap between what may as well be screens.

A friend on IRC's offered to help out when I next feel like booting a *nix
flavour on here, I'll be taking him up on it at some point.
 
D

drewc

Philippa Cowderoy wrote:
I'm aware there's more possibility under X, but there's not much beyond
the windows desktop and a rearrangeable taskbar I need. Though I guess
it'd be nice to be able to drop app windows into splitter panes - IIRC
it's Ion I should play about with for that?

I use Ion3. It allows you to have both non-floating windows split into
frames, and you can also have a more traditional 'floating' desktop as
well, either at the same time or in different workspaces.

.A big issue for me is
notification from apps that don't have the focus, I effectively run
everything maximised and swap between what may as well be screens.

Ion has a tatle bar for each app (which end up looking like 'tabs' when
one has multiple apps open. When a dialog pops up on an app that does
not have focus, the titlebar turns red. that's god enough for me.

Ion is also scriptable in Lua, which should be well known to game
developers. I have a few crazy lua hacks to set up my environment for
lisp hacking to be just the way i like it!

I love ion3, as i never use the rodent, and can't stand windows that
overlap.

drewc
 
J

John Thingstad

Philippa Cowderoy wrote:


I use Ion3. It allows you to have both non-floating windows split into
frames, and you can also have a more traditional 'floating' desktop as
well, either at the same time or in different workspaces.



Ion has a tatle bar for each app (which end up looking like 'tabs' when
one has multiple apps open. When a dialog pops up on an app that does
not have focus, the titlebar turns red. that's god enough for me.

Ion is also scriptable in Lua, which should be well known to game
developers. I have a few crazy lua hacks to set up my environment for
lisp hacking to be just the way i like it!

I love ion3, as i never use the rodent, and can't stand windows that
overlap.

drewc

Funny.. Sounds like my Windows desctop ;)
 
H

Hartmann Schaffer

Pascal said:
...
Either you have to buy Solaris/sparc, a Macintosh, or build yourself
your PC from parts, to avoid the Microsoft tax.

i bought my last two systems from local stores that put them together
according to specs. they charged extra if you wanted windows installed
(the official price, >$200), but were happy to sell you a bare system
without charging for windows

hs
 
W

Wade Humeniuk

John said:
Nice!
Amazing how short that program was.
Wouldn't have thought to use the WebDings font :)

I took some time and delivered it as a standalone exe for
windows for those who do not have LWW (even the evaluation
version). Delivery means the lisp image is shaken of uneccessary
functionality before being saved.

http://www3.telus.net/public/whumeniu/concentration.zip

It is a 1.6 MB zip file. The delivery file is included. If
any wants to (and can) deliver a Mac or Linux version, be my guest.
I have lost my icon editor somewhere along the way, so I have
just defaulted the icon to the LW icon.

The actual fsl (compiled lisp file) is 27,133 bytes
The exe size is 4.12 MB. Essentially most of the exe is the
minimal runtime lisp image.

Unzip wherever you like. The executable is concentration.exe

Wade
 
P

Philippa Cowderoy

Ion has a tatle bar for each app (which end up looking like 'tabs' when
one has multiple apps open. When a dialog pops up on an app that does
not have focus, the titlebar turns red. that's god enough for me.

Is there a decent way of getting an IRC client to turn the titlebar red or
similar on eg receipt of any private message going to a window that
doesn't have focus?
 
C

Christer Ericson

[...]
But they don't address the point I was making:

"The time it takes to sling together a few algorithms and produce a
basic pre-designed game is insignificant. Even if Lisp were ten times
more productive in this regard, it wouldn't make any difference. [...]
Productivity in messing around with small programs that are not for
general release is not really an advantage."

Tell me, is your point based on:

a) your extensive experience writing large programs,
b) your extensive experience with Lisp, or perhaps
c) your complete lack of experience with either.


Christer Ericson
Sony Computer Entertainment, Santa Monica
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,202
Messages
2,571,057
Members
47,666
Latest member
selsetu

Latest Threads

Top