Prev: Water plant design | Design Build | Water plant construction
Next: Two programs with same logic
From: Nobody on 22 Dec 2009 23:58 On Mon, 21 Dec 2009 11:05:54 -0700, BGB / cr88192 wrote: > FWIW, Quake 1 / 2 / 3 were in C. > > Doom 3, maybe C, but I haven't seen the source (the scripts though have more > of an OO style, so possibly C++ may have been used in Doom 3...). id Tech 4 (the engine used for Doom 3 and Quake 4) uses C++. OOP is a natural fit for games (and other types of simulation). > Java is one of those languages: > one hears about it enough, but where is the code?... Java's strongest constituency is bespoke enterprise software, which typically never leaves the organisation for which it was developed. You may as well ask where all the COBOL or RPG-III code is.
From: Thad Smith on 23 Dec 2009 00:43 Squeamizh wrote: > On Dec 21, 6:19 pm, Thad Smith <ThadSm...(a)acm.org> wrote: >> bartc wrote: >>> So there are a large number of very cheap and very simple processors >>> around. >>> Someone decides to adapt the C language to those, instead of creating a >>> custom language (and when you get rid of all the baggage, and >>> concentrate on the one target, that's not so difficult). >>> Is programming in a considerably cutdown (and perhaps specially >>> customised) C language, actually programming in C, or in something that >>> just looks like C, complete with curly braces, semicolons and funny type >>> declarations? >> You decide. Most compilers now targetting small embedded processors >> implement most of the C90 base language, plus the standard library minus >> operating system and I/O calls. Localization features are usually >> ignored. In that sense, they are between the C standalone and hosted >> implementations. >> >> The compiler I am using for an 8-bit processor advertises, like many >> embedded-target cross compilers, ANSI C compliance. Take that with a >> grain of salt. What is meant by that is C90, not C99. > > That advice would be a lot more useful if you just stated the name of > the compiler you're using. It was a description of the typical C environment for some low-end processors with poor indexed addressing, not advice (except for the "grain of salt"). This pertains to the 8051 family and Microchip 8-bit PIC family, although I think that Microchip has a compiler that supports recursion for PIC18x and I believe Keil offers recursion as an option for the 8051 family (you pay the price in less efficient access of the parameters and auto variables). There are probably several other low-end architectures for which the limitations also apply. In general, you tend to think in smaller chunks for smaller processors. -- Thad
From: BGB / cr88192 on 23 Dec 2009 03:02 "Nobody" <nobody(a)nowhere.com> wrote in message news:pan.2009.12.23.04.58.45.31000(a)nowhere.com... > On Mon, 21 Dec 2009 11:05:54 -0700, BGB / cr88192 wrote: > >> FWIW, Quake 1 / 2 / 3 were in C. >> >> Doom 3, maybe C, but I haven't seen the source (the scripts though have >> more >> of an OO style, so possibly C++ may have been used in Doom 3...). > > id Tech 4 (the engine used for Doom 3 and Quake 4) uses C++. > > OOP is a natural fit for games (and other types of simulation). > yes, ok. I would have figured as much from what I had seen of Doom 3, although granted I have not seen any of their engine source. recently, I have been messing with Quake 2 engine (various reasons, mostly non-serious), and hacked on a number of features, most recently: expanding the map size (now ~98304 inches, or 8192 ft, or 1.55 mi); adding "drivable vehicles" (technically, they are neither drivable nor vehicles, but nevermind this...). prior additions: support for shadering; real-time stencil lighting/shadows; rigid-body physics; .... nevermind that it still mostly looks and behaves like Q2 at present, and infact a lot of content was re-added from Q1 as well, ... >> Java is one of those languages: >> one hears about it enough, but where is the code?... > > Java's strongest constituency is bespoke enterprise software, which > typically never leaves the organisation for which it was developed. > > You may as well ask where all the COBOL or RPG-III code is. > yes, ok.
From: Nobody on 24 Dec 2009 04:32 On Tue, 22 Dec 2009 00:21:25 +0000, bartc wrote: > Is programming in a considerably cutdown (and perhaps specially customised) > C language, actually programming in C, or in something that just looks like > C, complete with curly braces, semicolons and funny type declarations? Modern C compilers for all but the very simplest microcontrollers tend to follow the C standards quite faithfully. Not to the extent that you can't find deviations, but to the extent that you don't need to re-work real-world C code for the sake of the compiler. Where C code written for such systems uses non-standard features, it's more likely to be because it's appropriate to do so (e.g. because you need to do things which aren't covered by the standard, or because the extensions offer significant performance benefits) than because the compiler forces you to do so.
From: Colin Paul Gloster on 24 Dec 2009 08:21
On Mon, 21 Dec 2009, BGB / cr88192 posted: |-------------------------------------------------------------------------| |"[..] | | | |my reasons for using C are varried, although, part of it may be that [..]| |[..], and also I use | |some amount of "reflection", which does not work so well with C++ (mostly| |giving the non-standardized name mangling and compiler behaviors, ...). | | | |[..]" | |-------------------------------------------------------------------------| Hi! How and why do you use relection in C? With kind regards, Colin Paul Gloster |