Why are all of the tutorials for C++?


Then you picked a very inappropriate analogy. While there's some practical reason to be able to read ancient Greek, there's no practical reason to be able to write it. This is hardly the case with assembly language. Maybe you didn't want to say that for all practical purposes it's useless but that's literally what you said.
Oh come on, cut me some slack here and stop beating that dead horse. Seriously, I can't do more than say sorry. Whan am I supposed to do, get on my knees and lick your feet while begging your majesty for forgiveness?

I don't really know why you figure someone learning programming won't do embedded.
Yeah, you constantly see people doing their first steps in programming on an embedded device as opposed to, you know, their computer. :rolleyes:


Sorry, there's only so much shit I can take.
 
ASM is far from useless. I use it all the time. And i dont have a clue about embedded systems. I use it on x86 windows coding. Why? Because you can get very easiely very high performance optimizations. It's not that i write a program completly in ASM, that's pointless on a PC. I write it first in high level, mostly in BASIC (PureBasic) because of it's simplicity and fast work flow. Then i do optimizations where they are needed, like rewriting a image filter in ASM. And i dont talk about 20% speed ups here. I have done procedures in ASM that are 10 times faster than in C.
 
Last edited by a moderator:
Oh come on, cut me some slack here and stop beating that dead horse. Seriously, I can't do more than say sorry. Whan am I supposed to do, get on my knees and lick your feet while begging your majesty for forgiveness?

You didn't apologize as much as you rationalized/justified your comments, and now you're just being abrasive.

Yeah, you constantly see people doing their first steps in programming on an embedded device as opposed to, you know, their computer. :rolleyes:

Sorry, there's only so much shit I can take.

This isn't about their first program, this is about their long term goals. Even intro courses in university don't focus on getting quick programs compiled to show immediate results, but in teaching foundations that will serve their future programming endeavors. I mean yeah, if you just want to mess around then do whatever you feel like. But here I thought we were talking about what's "pointless" for a person to bother with. FYI if you want to talk about people not being interested in embedded device development you picked the wrong forums for it.


At any rate, maybe be less of a snot.
 
It might've been to do with all the pointer crap I happened to do in my code (erm - yeah. Forget it : ))
Note to self: do not mock doublebeta because he has to put up with pointers : D

On the weekend I'll clean my code up and release in the Off Topic section.
No need to do this for me. No offense (really), but I played too many interactive fiction games with a too slow (Edit: I think I had some of that medicine too.. slow? tiny of course) grammar subset. There's nothing worse than to have to try 20 different wordings just to turn on a light or something (i'm in ur quote - stealin' ur smilies)

My code, made me kinda die inside ; ) Ever had that happen when you read old code?
I thinks that happens to every developer. No matter how much you allready know, there's always something you know now that you diddn't a year back or something you'd do differently today. I'm regularly temted to just delete all my old progs off of my homepage just in shame of the old code. (And sometimes because they're useless.. For example I once made a small prog in C++ that did nothing more than add two numbers of any size together (using arrays, so the max number would be (10^(INT_MAX+1))-1 ). Originally it was planned to make a complete math class for really large numbers, but I kinda lost interest and needed some stuff to put on my homepage when I made it : D). (and yes, I use way too many brackets (I really do (and I should stop)))

don't want to know how it works, I'd explode or cry(aaalllll that long code for an underappreciated feature?)
I guess it isn'tlong code at all but some Regex hacks that just work out most of the time.. Make all uppercase words red, all words in quotes green, color some keywords like "is" etc.

Inform 7 looks like something I could teach my parents pretty easily.
Except that such a language probably makes you use real english subconciously and therefore will take longer to write because you're constantly correcting stuff : )

Just so you know, I fucking love pointers :) .


My text rpg isn't like the ones in the 'bsdgames' package on Debian/Ubuntu/other apt repo systems. There's very little commands, which you learn at the start. Very very simple - in fact, there's not enough functionality yet for you to have to worry about that at all XD.


I wasn't just cleaning the code for you, I was gonna provide it as example code. See below, I will probably have a lot of homework to do over the weekend since I missed school.


I do recursive parenthesis waaay more than I should too. You'd think I was the most 3l33t l15p dev ;) . But no, I don't know lisp, at all actually(besides my own - hah). I tend to have way more functions and casts(to a lesser extent, I avoid casts as much as I can be bothered to(you won't notice in the code tho, there's plenty(uh oh, here I go again(recursive parentheses!))) on one line in C too :) .)


Good to know I needn't be ashamed for being ashamed of my code :) . (because we've all been there.)


I won't say some things brought to mind when I read "regex".

Then you picked a very inappropriate analogy. While there's some practical reason to be able to read ancient Greek, there's no practical reason to be able to write it. This is hardly the case with assembly language. Maybe you didn't want to say that for all practical purposes it's useless but that's literally what you said.
Oh come on, cut me some slack here and stop beating that dead horse. Seriously, I can't do more than say sorry. Whan am I supposed to do, get on my knees and lick your feet while begging your majesty for forgiveness?

I don't really know why you figure someone learning programming won't do embedded.
Yeah, you constantly see people doing their first steps in programming on an embedded device as opposed to, you know, their computer. : rolleyes :


Sorry, there's only so much shit I can take.

Yes, stop bashing Klaue, people. I...kinda started it, so it makes me feel real bad :( . Everyone makes a post that someone's not gonna like.


Define 'embedded'.


http://en.wikipedia.org/wiki/Embedded_system


hmm, ok.


I can't argue this (of course I'm only ever intending to argue in a friendly way) while still making sense.


Btw - don't tempt me, I could do with a foot licking ;) (I mean this as a joke)

ASM is far from useless. I use it all the time. And i dont have a clue about embedded systems. I use it on x86 windows coding. Why? Because you can get very easiely very high performance optimizations. It's not that i write a program completly in ASM, that's pointless on a PC. I write it first in high level, mostly in BASIC (PureBasic) because of it's simplicity and fast work flow. Then i do optimizations where they are needed, like rewriting a image filter in ASM. And i dont talk about 20% speed ups here. I have done procedures in ASM that are 10 times faster than in C.

Nice! Get in there and get a Cortex-M3 based board and make something epic (there's a LOOOT of power there - it'd make a killer synth! I wish I could afford to play with more microcontrollers atm!) :) .


Ugh, one thing I should have mentioned a long while ago, is don't start ASM dev under an operating system! It's a mess, linking*, and yeah, too many variables. Get out there on bare metal - not an x86 OS, that's the worst thing you could do, but maybe on a microcontroller (AVR is much friendlier than PIC - you get more registers) or, on a C64 (emulated or real - with an assembler, or in machine code like I did).


* - if you want more than 512 bytes of space, and don't wanna write a bootloader, you're gonna have to link on x86 too, and use GRUB. Don't do this anyway :p .


My favourite thing about python is that it can call C (and I suppose ASM if you're keen) code, to do the dirty work. Software blitting is slow in C, and ASM too(well, yeah, it's a pretty simple operation) - it'd sure suck in python! That said, if you can, just use C, dammit ;) .


WizardStan: was that a complement to me, possibly? Maybe? *doublebeta whimpers like a dog teased with a treat*


Sorry I haven't replied sooner, I've just spend the last two days (today and yesterday) in bed, thinking I had appendicitis (all the symptoms of it, but I saw the doctor (not hospital) today, I just had a virus - staying in bed was good. I read Underground btw, I can't remember where, but I mentioned the book recently. I think it might've been this thread - anyway, you can get it here: http://www.underground-book.net/. A Nintendo DS and moonshell make a pretty good (novel) reading device (as well as video player and amazingly, gaming device. Can't wait for my Pandora tho :( (it's an expression) ) OCR'd datasheets and reference manuals are impossible to read, even if you did get a good text dump - don't do it).


BTW - I'm in case any of my posts would lead you to think otherwise, I'm not into computer security - but I do indeed like to read zf0 and mess around at hax.tor.hu and smashthestack.org


EDIT: Forgot about it before - arbitrary length numbers are not useless - there's lots of applications for those (like physics - fixed point long math ftw...). That's very cool that you can do that. I know the theory, but haven't got around to doing it yet (i'll do physics calcs when there's a point, and when I have a machine fast enough to do them without waiting a week).


I made a 16bit adder/subtractor (in ASM - no (decent) C compiler) for the Z80. Haven't tested it. Only adds an 8bit value to a 16bit one, can't do 16bit plus 16bit. adding an 8bit number to a 16bit one is pretty easy. Add the 8bit number to the least significant byte(LSByte) of the 16bit one, check for overflow (use the overflow bit in the status register), if there was overflow, increment the Most Significant Byte(MSByte).


01F0h plus F7h =


F0h +


F7h =


E7h + overflow set


if overflow


01h +


01h =


02h


full 16=


02e7h


Yeah that was unnecessary, noone's gonna need it here, but meh. I do spend all my time NOT programming, doing my homework, or playing with my synths on the OpenPandora forums. And it's been awesome.


EDIT2: Typo!
 
Last edited by a moderator:
At any rate, maybe be less of a snot.
Oh look, the old "anyone who doesn't hold the same opinions as I do must be a <insert insult>"-fallacy. Maybe you shouldn't act all that high and mighty. But it will be a pleasure completely ignoring you in the future :)

Just so you know, I fucking love pointers :) .
It's always beautiful to watch wild pointers prancing around on the stack :p

EDIT: Forgot about it before - arbitrary length numbers are not useless - there's lots of applications for those (like physics - fixed point long math ftw...). That's very cool that you can do that.
Err, you can do too. Let's just say this thing was one of the first progs I ever did and I found it in a long forgotten dark corner of an old hard disk. I would've never put it online if the page diddn't looks so empty without it ;) It's nothing more than filling the numbers in an array and then performing math the way you did in elementary school. Really, it's ugly as hell and about as slow ;P

I made a 16bit adder/subtractor (in ASM - no (decent) C compiler) for the Z80. Haven't tested it.
I made a 4 bit adder in minecraft :D (before I found the wiki page for it with a better (as in, not football-field sized(yay, brackets!)) implementation)
 
Ugh, deleting a post I'd probably regret.


I think between Jebe and this I've had about enough of these forums.
 
Last edited by a moderator:
Oh look, the old "anyone who doesn't hold the same opinions as I do must be a <insert insult>"-fallacy. Maybe you shouldn't act all that high and mighty. But it will be a pleasure completely ignoring you in the future :)
You were qualifying his day job and what made him known and famous on the net as "useless". And even if he explained you politely his point of view you continued. That was rather insulting.


And this is... I've no word to qualify your behaviour.


I quitted reading news/general section/support here because of the bashing. But I was still reading the dev section expecting usefull stuff. And in the last days, all I've seen is you bashing one of our best member around.


I think I'll quit this board at all. Bye.
 
Ugh, deleting a post I'd probably regret.


I think between Jebe and this I've had about enough of these forums.
Sometimes it's not worth the hassle. Take two weeks vacation. I did and I feel all the better for it.
 
Like it's probably been said already, I must say it all goes with comfort and mindset. I know I personally am much more confident in writing procedural code rather than OO, so I choose C. I find it also much quicker to compile.


C++ has been quite trendy in the last decade so that's pretty much all you code in the game industry these days. That's probably why most tutos are in C++.


Funny story: my girlfriend studied in computer science and software engineering and never touched to C++. It was all Java, except for one class of C that was focussed on embedded systems, and where they teached her all sorts of stuff really specific to embedded platforms but NOT specific to C (stuff like unrolling the loops, using a minimum number of function calls and other ugly things) and after I had to convince her that C is NOT that limited.


I'm sure those kind of teaching don't help C in getting popular ;)


Also, some people suggest that video games are made to be programmed in OO. I don't agree. I think applications, where you have all kinds of menus and buttons, are much more appropriate, as you really want a structure based on events and also want tons of very similar but slightly different widgets. In a video game, you can have one big loop where you update your world, and all your items can be of a few generic classes (/structs) with different parameters.


For anyone interested in coding games in C, have a look at the Quake3 game code. It abuses of pointers to structs and functions, but it's made very simple and flexible at the same time.
 
Today, you'll probably do not want to use C for anything other than really low level or legacy stuff
I'm probably walking into a trap, but I'd like to respectfully disagree here.


C, when written correctly, can be tidy, elegant, readable and even object-oriented, and while it's true it doesn't quite have the vocabulary C++ does, this can actually make for easier-to-maintain code in the long run (no operator overloading stupidity, no 'hey, where do these auto_ptrs get initialized, and where do they disappear to?', no four(!!!) different kinds of type-casting, etc).
 
I don't really know why you figure someone learning programming won't do embedded.
Yeah, you constantly see people doing their first steps in programming on an embedded device as opposed to, you know, their computer. :rolleyes:
At our school every one has to build some machine (everyone can decide what (s)he wants to make) using a micro controller(s) one time. I guess you could call that "embedded device", couldn't you?


And that's the first programming most students who didn't start with their calculator (which you normally don't program in Java or C++ either...) do.
 
Back
Top