Democratic Underground Latest Greatest Lobby Journals Search Options Help Login
Google

I program in C++. I like Pain.

Printer-friendly format Printer-friendly format
Printer-friendly format Email this thread to a friend
Printer-friendly format Bookmark this thread
This topic is archived.
Home » Discuss » The DU Lounge Donate to DU
 
Commie Pinko Dirtbag Donating Member (1000+ posts) Send PM | Profile | Ignore Mon Nov-08-04 09:01 AM
Original message
I program in C++. I like Pain.
That will be all.

I'm dealing with streams of data that come from a communications device with NO boundaries between the bytes. Therefore, they may come in all 8 possible bit shifts. Have to do all kinds of treatment in real time.

:spank: :spank: :spank: :spank: :spank: :spank: :spank: :spank:
Printer Friendly | Permalink |  | Top
LisaLynne Donating Member (1000+ posts) Send PM | Profile | Ignore Mon Nov-08-04 09:08 AM
Response to Original message
1. You have my sympathies...
However, I occasionally have to program in FORTRAN. That's right -- FORTRAN. Seriously, it's not bad except for the fact that I'm cleaning up really bad code written by people who obviously can't be trusted around a computer ... at least with a keyboard hooked up.
Printer Friendly | Permalink |  | Top
 
Commie Pinko Dirtbag Donating Member (1000+ posts) Send PM | Profile | Ignore Mon Nov-08-04 09:24 AM
Response to Reply #1
8. Wow. I'm privileged.
Edited on Mon Nov-08-04 09:26 AM by JCCyC
Find someone dealing with old buggy undocumented COBOL code, so YOU can feel privileged.

On edit: DarkSim is your man. :evilgrin:
Printer Friendly | Permalink |  | Top
 
Florida_Geek Donating Member (1000+ posts) Send PM | Profile | Ignore Mon Nov-08-04 09:10 AM
Response to Original message
2. I am a C guy and feel no pity for you C++ ppl
:evilgrin::evilgrin::evilgrin::evilgrin::evilgrin::evilgrin::evilgrin::evilgrin::evilgrin::evilgrin::evilgrin::evilgrin::evilgrin:
Printer Friendly | Permalink |  | Top
 
meegbear Donating Member (1000+ posts) Send PM | Profile | Ignore Mon Nov-08-04 09:15 AM
Response to Original message
3. What compiler and OS?
Printer Friendly | Permalink |  | Top
 
ContraBass Black Donating Member (1000+ posts) Send PM | Profile | Ignore Mon Nov-08-04 09:19 AM
Response to Original message
4. I program in C++. I hate pain.
My work is simple training, but between bugs in my compiler and my own ineptitude, I am hopelessly behind. :argh:
Printer Friendly | Permalink |  | Top
 
demnan Donating Member (1000+ posts) Send PM | Profile | Ignore Mon Nov-08-04 09:20 AM
Response to Original message
5. Dreamweaver
The web stuff is more routine but a lot easier.
Printer Friendly | Permalink |  | Top
 
htuttle Donating Member (1000+ posts) Send PM | Profile | Ignore Mon Nov-08-04 09:21 AM
Response to Original message
6. When is an equals sign not an equals sign?
When you're programming in C++ and somebody overrode it. GAAAAAHHHHH! A POX on overridden operators!!

Believe it or not, I taught myself C++, having previously only programmed in several of Wirth's languages (Pascal, Modula). I almost went batshit nuts before I got comfortable with it. Looking at templated code STILL gives me a headache...

Good luck! I'm off to write Java code most of the day today. Lots more typing, somewhat fewer headaches.
Printer Friendly | Permalink |  | Top
 
DarkSim Donating Member (266 posts) Send PM | Profile | Ignore Mon Nov-08-04 09:23 AM
Response to Original message
7. Nothing worse than COBOL n/t
Printer Friendly | Permalink |  | Top
 
German-Lefty Donating Member (568 posts) Send PM | Profile | Ignore Mon Nov-08-04 09:47 AM
Response to Original message
9. Bit alligned data requires bit pointers not byte(or word) pointers
The driver of you IO device is giving you bytes back, but the data is bit alligned. So you've got some buffer of bytes, but you just need to keep offsets to it in bits. Write yourself some helper functions to retrieve/write like memcpy(),memset() => bitcpy(), bitset().

I think this is legal in C++.
class foo{
int a5BitInt:5;
unsigned int a3BitNumber:3;
};
where sizeof(foo)==1. Remember to set packing to bytes. In MVC++ it's:
#pragma pack(1)

Have fun. I remomend you just convert all the packets coming in into an easier format, instead of allowing this logic to wander around your whole application. Then again I'm not 100% sure I know what you're doing.
Printer Friendly | Permalink |  | Top
 
Arkana Donating Member (1000+ posts) Send PM | Profile | Ignore Mon Nov-08-04 10:10 AM
Response to Original message
10. Then so do I, for that's the only language I know so far.
Printer Friendly | Permalink |  | Top
 
DU AdBot (1000+ posts) Click to send private message to this author Click to view 
this author's profile Click to add 
this author to your buddy list Click to add 
this author to your Ignore list Sun May 05th 2024, 06:41 AM
Response to Original message
Advertisements [?]
 Top

Home » Discuss » The DU Lounge Donate to DU

Powered by DCForum+ Version 1.1 Copyright 1997-2002 DCScripts.com
Software has been extensively modified by the DU administrators


Important Notices: By participating on this discussion board, visitors agree to abide by the rules outlined on our Rules page. Messages posted on the Democratic Underground Discussion Forums are the opinions of the individuals who post them, and do not necessarily represent the opinions of Democratic Underground, LLC.

Home  |  Discussion Forums  |  Journals |  Store  |  Donate

About DU  |  Contact Us  |  Privacy Policy

Got a message for Democratic Underground? Click here to send us a message.

© 2001 - 2011 Democratic Underground, LLC