A Conversation for The H2G2 Programmers' Corner
can someone help an absolute beginner in c++?
Peet (the Pedantic Punctuation Policeman, Muse of Lateral Programming Ideas, Eggcups-Spurtle-and-Spoonswinner, BBC Cheese Namer & Zaphodista) Posted Apr 20, 2003
In para.1, shouldn't that be "increase" development time?
can someone help an absolute beginner in c++?
26199 Posted Apr 20, 2003
Hmm, Java is slower than C++ because of additional run-time protection and more powerful object oriented features... not because it's byte code.
The fact that it's byte code does mean you get a delay on load, because of all the 'just in time' compilation going on...
can someone help an absolute beginner in c++?
DoctorMO (Keeper of the Computer, Guru, Community Artist) Posted Apr 20, 2003
can someone help an absolute beginner in c++?
MaW Posted Apr 20, 2003
bytecode only gets that fast if the JIT compiler is very, very good, and I don't think they've got there yet. Certainly not with my experience of Java, and also that's something that varies immensely from platform to platform. The Windows JITs from Microsoft and Sun may be very good, but the UNIX one is fairly dreadful, and I wouldn't expect the Mac one to be all that great either, but then that's got a lot to do with relative share of the market.
I still don't think a JIT can get that fast though, but you are very much right about the startup penalties involved in it of course.
can someone help an absolute beginner in c++?
Ion the Naysayer Posted Apr 20, 2003
I wasn't very clear but I did mean the startup speed.
And I agree with MaW. Parrot is going to rock. Plus I hear they're working on a Parrot compiler for Python. Probably other languages as well.
can someone help an absolute beginner in c++?
Peet (the Pedantic Punctuation Policeman, Muse of Lateral Programming Ideas, Eggcups-Spurtle-and-Spoonswinner, BBC Cheese Namer & Zaphodista) Posted Apr 20, 2003
can someone help an absolute beginner in c++?
MaW Posted Apr 20, 2003
Mmm, there are Parrot-targeted compilers being written for several other languages. The Parrot distribution includes a preliminary Perl 6 compiler, based on what of the language has been defined so far (and what Parrot currently allows to be implemented, obviously this expands regularly), BASIC, Cola and Jako (which are cut-down Java and C variants, more proof-of-concept languages than anything else), and Brainf**k, which is rare in being a language which is much, much more evil to code in than one of the lower-level languages it depends on (i.e. Parrot assembly, Parrot's native input language).
It seems from my limited explorations that Parrot is slightly odd in some ways - not only is it a run-time enging for its bytecode format, it's also a compiler which turns Parrot assembly into Parrot bytecode. So if you want to write a compiler that produces code to run on Parrot, you can generate Parrot assembly and invoke Parrot to compile it, or you can write out Parrot bytecode directly. I suspect the latter approach is more efficient, but the former is probably easier to code - although Parrot bytecode is probably fairly close to the assembly language.
Please excuse me if my random rampant speculations are getting boring, this was after all originally a thread about basic C++ stuff.
And no, I don't think anyone will be making a C++ compiler that targets Parrot. Not much point really - although, theoretically, a gcc backend which produced Parrot bytecode would allow all the languages which gcc supports to be compiled to run with Parrot, which would theoretically have rather nice portability implications because Parrot is intended to run on just about everything (like Java's runtimes). Depending on library availability of course.
can someone help an absolute beginner in c++?
Ion the Naysayer Posted Apr 20, 2003
The thing about Parrot as compared to Java though, is that Parrot will likely have the same portability as Perl - that's something obscene like 60 platforms. I'm pretty sure Java doesn't run on nearly that many platforms.
can someone help an absolute beginner in c++?
Peet (the Pedantic Punctuation Policeman, Muse of Lateral Programming Ideas, Eggcups-Spurtle-and-Spoonswinner, BBC Cheese Namer & Zaphodista) Posted Apr 20, 2003
I wouldn't be that sure; it depends whether you call "embedded systems" a single platform, or a whole raft of platforms. I was most impressed a few years back (1997/1998?) with the "Java ring" - as it sounds, it's a ring you wear on your finger containing a button cell, some non-volatile memory and a PIC chip running Java! It had a short range radio comm. link (something like three inches) so it could communicate with "smart door handles" and suchlike... I think Texas Instruments were behind it, if memory serves.
can someone help an absolute beginner in c++?
xyroth Posted Apr 21, 2003
one word of warning for the person at the start of this thread who was learning C++.
whatever you do, don't learn it in microsoft visual c/c++ form.
while it has a lot of good things about it for experienced c++ programmers, for the beginner, they cause a lot of problems you could do without.
for example, they bundle together the things you need to get a c++ program working with the things you need to get the same program working using visual c++, and they don't say which is which.
I havea friend who learned using it, and when they switched to linux, they had to unlearn about 1/3rd of the stuff which turned out to be microsoft specific, and they would never have found out that any of it was non-standard ifthey hadn't needed to write a program in linux using gcc.
learn using gcc first, then make use of microsoft visual c++ for the helpfiles (but don't rely on them).
can someone help an absolute beginner in c++?
Ion the Naysayer Posted Apr 21, 2003
Here's the list of supported Perl platforms in case you were curious:
http://www.perldoc.com/perl5.6/pod/perlport.html#Supported-Platforms
can someone help an absolute beginner in c++?
MaW Posted Apr 21, 2003
xyroth makes a very good point, Microsoft Visual C++ includes a whole raft of nonstandard mess, largely to support their GUI toolkits (which are highly evil for the most part).
can someone help an absolute beginner in c++?
xyroth Posted Apr 22, 2003
I really don't mind that too much, it is the same problem with programming any gui.
what I find unforgivable is the near impossibility of finding which stuff is c++ and which stuff is microsoft windows from the help files.
at least with .NET you know the whole lot is shipped factory pre-broken, so you only go near it if you can tolerate that.
can someone help an absolute beginner in c++?
MaW Posted Apr 22, 2003
With .NET it's not so much that it's all shipped pre-broken, it's that you know it's all made up in one go (unless you're silly enough to believe that Managed Extensions to C++ leave you with anything normal from C++ - but then if you're .NET programming, C#'s probably a better choice of language anyway, at least it doesn't rely on messy yuck to implement garbage collection).
What would have been nice is to see a new wrapper around the Windows API which uses C++-native concepts - templates, STL containers and the like. Too much to even contemplate I suppose *sigh*
can someone help an absolute beginner in c++?
Calculator Nerd 256 Posted May 5, 2003
oh no!
i joined this thread too late
i was going to ask a lot of questions but now if i do you guys will just tell me to read the previous threads and that's alotta thread to sift thru
i want to learn C++ and i understand C-style syntax but i have had little to no success with even the most rudimentary C++ and i bought a book on game programming but it was way too over my head and assumed i already knew C++ so I gues what i am asking is does anyone wanna mentor me in C++?
>8^B
can someone help an absolute beginner in c++?
Potholer Posted May 5, 2003
When you say you understand C syntax, do you mean you've written much code in C?
What level of C++ did you find difficulty with, and were your problems essentially with C++ itself, or to some extent with the environment you were programming in (MS/Borland/Whatever).
can someone help an absolute beginner in c++?
MaW Posted May 6, 2003
Try and find an introductory textbook - games programming is hard, and definitely not the place to start with something like C++.
can someone help an absolute beginner in c++?
Calculator Nerd 256 Posted May 17, 2003
i use js. a lot. i tried M$ VC++ and KDev (guess which is cooler) and i guess i am just not used to all the initialization i have to do for a simple graphical "pxlSet()" kind of program
>8^B
can someone help an absolute beginner in c++?
MaW Posted May 18, 2003
Hmm... you'll have to get used to it though, there aren't any real heavyweight programming languages which include graphics at the core feature level of the language. Java comes fairly close, as it's got all the required libraries present in the core runtime environment - but Java is, quite frankly, c**p. There are some interesting enhancements in Java 1.5, but that's not done yet and they still haven't addressed some of my biggest peeves. Unfortunately for them, most of them are base issues in the language, so they'll never get changed.
* wanders off to do some more C++ *
Key: Complain about this post
can someone help an absolute beginner in c++?
- 21: Peet (the Pedantic Punctuation Policeman, Muse of Lateral Programming Ideas, Eggcups-Spurtle-and-Spoonswinner, BBC Cheese Namer & Zaphodista) (Apr 20, 2003)
- 22: 26199 (Apr 20, 2003)
- 23: DoctorMO (Keeper of the Computer, Guru, Community Artist) (Apr 20, 2003)
- 24: MaW (Apr 20, 2003)
- 25: Ion the Naysayer (Apr 20, 2003)
- 26: Peet (the Pedantic Punctuation Policeman, Muse of Lateral Programming Ideas, Eggcups-Spurtle-and-Spoonswinner, BBC Cheese Namer & Zaphodista) (Apr 20, 2003)
- 27: MaW (Apr 20, 2003)
- 28: Ion the Naysayer (Apr 20, 2003)
- 29: Ion the Naysayer (Apr 20, 2003)
- 30: Peet (the Pedantic Punctuation Policeman, Muse of Lateral Programming Ideas, Eggcups-Spurtle-and-Spoonswinner, BBC Cheese Namer & Zaphodista) (Apr 20, 2003)
- 31: xyroth (Apr 21, 2003)
- 32: Ion the Naysayer (Apr 21, 2003)
- 33: MaW (Apr 21, 2003)
- 34: xyroth (Apr 22, 2003)
- 35: MaW (Apr 22, 2003)
- 36: Calculator Nerd 256 (May 5, 2003)
- 37: Potholer (May 5, 2003)
- 38: MaW (May 6, 2003)
- 39: Calculator Nerd 256 (May 17, 2003)
- 40: MaW (May 18, 2003)
More Conversations for The H2G2 Programmers' Corner
Write an Entry
"The Hitchhiker's Guide to the Galaxy is a wholly remarkable book. It has been compiled and recompiled many times and under many different editorships. It contains contributions from countless numbers of travellers and researchers."