Poster | Thread |
evilFrog
| |
Re: AmigaOS Programming articles Posted on 26-Oct-2004 9:04:37
| | [ #1 ] |
|
|
|
Regular Member |
Joined: 20-Jan-2004 Posts: 397
From: UK | | |
|
| Excellent! Just what I needed.
Thanks, guys! _________________ "Knowledge is power. Power corrupts. Study hard, be evil."
|
|
Status: Offline |
|
|
olegil
| |
Re: AmigaOS Programming articles Posted on 26-Oct-2004 14:33:45
| | [ #2 ] |
|
|
|
Elite Member |
Joined: 22-Aug-2003 Posts: 5895
From: Work | | |
|
| Regarding the article from Michael Ness, he's dead right when he says function pointers are powerful. I'm using them in a project at work, and I must say I do not see what the fuss about C++ is all about _________________ This weeks pet peeve: Using "voltage" instead of "potential", which leads to inventing new words like "amperage" instead of "current" (I, measured in A) or possible "charge" (amperehours, Ah or Coulomb, C). Sometimes I don't even know what people mean.
|
|
Status: Offline |
|
|
Anonymous
| |
Re: AmigaOS Programming articles Posted on 26-Oct-2004 14:42:19
| | [ # ] |
|
| C++ has built in scope rules, call-chains, by-value copy of instances and data-privacy in the runtime and language that you tend to find you need to re-implement yourself if you try to use C in an OO like way. Polymorphism isn't the only built-in concept in C++ that is useful.
Thats before we get onto templates, operator overloading and overloading by parameter type of functions and methods that you would have to invent your own mangling scheme for and layers of indirection to implement.
Use the wheel, or re-invent it - at least the choice is yours. |
|
|
|
|
riksweeney
| |
Re: AmigaOS Programming articles Posted on 26-Oct-2004 15:06:37
| | [ #4 ] |
|
|
|
Member |
Joined: 20-Jan-2004 Posts: 50
From: Unknown | | |
|
| Quote:
Regarding the article from Michael Ness, he's dead right when he says function pointers are powerful. I'm using them in a project at work, and I must say I do not see what the fuss about C++ is all about |
I read quite a few websites that complain about using C over C++. One of the best ones was when the Quake 1 source came out and people complained that it was written in C, not C++ and therefore was "hard to understand".
Personally I don't go anywhere near C++, it's Kerningham and Ritchie for me all the way |
|
Status: Offline |
|
|
Sidewinder
| |
Re: AmigaOS Programming articles Posted on 26-Oct-2004 23:56:26
| | [ #5 ] |
|
|
|
Regular Member |
Joined: 10-Mar-2003 Posts: 152
From: Saint Paul, Minnesota, USA | | |
|
| @olegil
Thanks olegil. I'm glad my tutoral is being used. I wish I had more time to keep it up, but alas other things keep coming up...imagine that?
May I ask what type of project you're making at work or is it "top secret"? |
|
Status: Offline |
|
|
olegil
| |
Re: AmigaOS Programming articles Posted on 27-Oct-2004 5:54:22
| | [ #6 ] |
|
|
|
Elite Member |
Joined: 22-Aug-2003 Posts: 5895
From: Work | | |
|
| @Sidewinder
No secret: http://www.network-electronics.com/default.asp?Cat=16 http://gyda.network-electronics.com/
Am working on two "upgrades" simultaneously, one is migrating to a 400MHz Xscale board (same form factor), the other is support for broadcast routing switchers.
I do a lot of thinking in this job, as I'm writing standards (SNMP MIBs) we have to live with for many years almost as much as I'm writing the software that implements the MIB...
I don't need a lot of fancy things from the OO world, but the ability to abstract different boards into a an array of structs, each with one pointer to board-specific data and a set of pointers for board-specific functions has worked really nice.
(edit: Oh, and btw... The Linux kernel does the excact same thing in the init-routines, so it's not uncommon at all).
Now, if I could only figure out why I'm loosing 40 ms each time I fetch an SNMP variable (I know where in the code it happens, I just can't figure out why). Anyone here have any experience using sockets and send()?
Edit again: Dangit, found the "problem". I write from the pass_persist daemon (which listens to requests from the SNMP agent) to the data collector using one send(), then I passed the result back using two send()'s... With only one send on the return (needed to stuff in more data in the transmit buffer before sending) I can dump 2500 SNMP variables (using snmpwalk from net-snmp) in 3.4 seconds. That's a BIT better than 40ms per variable So each send seems to generate one packet, but why does it take 40ms to receive the second one? This is the lo interface on a 2.2GHz P4, for crying out loud... Last edited by olegil on 27-Oct-2004 at 08:54 AM. Last edited by olegil on 27-Oct-2004 at 05:57 AM.
_________________ This weeks pet peeve: Using "voltage" instead of "potential", which leads to inventing new words like "amperage" instead of "current" (I, measured in A) or possible "charge" (amperehours, Ah or Coulomb, C). Sometimes I don't even know what people mean.
|
|
Status: Offline |
|
|