Learning C


Hey if you want to learn (very but important) basics of C , i'm in college and just did a course in it. i could email you Notes in pdf form if you want.. Stuff like basic input output,arrays,strings,pointers,file input output,... Not much to make a good game from, but a start none the less! PM me you email address and i'll send them if you want.


Hopefully u got gmail or somethin that has a good bit of room.
 
I'm sensing a little bit of Java hate here :p

My Java decision was mostly based on its usefulness at work, but then again, I may look at C++ anyways after diving into C :)

I completed my first lil' stdin text proggy today and I must say the syntax reminds me a lot of PHP(sorta makes sense, I guess, since PHP was modeled after C).

Methinks I'm gonna have a bit o' fun with this :)

DtotheK: I think with what was offered on this thread alone I got lots to look through but, hey, I won't turn down anything if you got it handy ;)

my email is realyst at real-ism dot com (and yes, it's gmail :p )


_______________________________

Edit: I just realized how many smileys I had in that post after hitting submit.....my sleep deprivation hath caused me to summon up an army of scary yellow faces o_O
 
realyst said:
I'm sensing a little bit of Java hate here :p
It has it's uses, but the 'hatred' is mostly because it forces OOP on you and not in a very nice manner. Java 1.7 is still much better than C#, but there still are better ways to do things.
 
Last edited by a moderator:
Since you know PHP and Perl, C is already too familiar. Try something radically new to stimulate that grey matter and learn Thumb-2EE, NEON, etc. Later on interface it with your favorite HLL.
 
Well, he wanted to do something low level, and C still hides things. Actually I would be tempted to suggest Erlang or ocaml as a sequel to Perl instead of Java or C++.
 
sindbad said:
It has it's uses, but the 'hatred' is mostly because it forces OOP on you and not in a very nice manner. Java 1.7 is still much better than C#, but there still are better ways to do things.
And I happen to disagree. Problem is, you've only been saying "I hate Java" so all I can really say is "have you really learned it, or did you have a bad experience so you gave up?"
 
Last edited by a moderator:
Wait a minute, this appears to be turning into a language war! Bet no one saw that coming :p

realyst: If you run into any problems, feel free to start a topic. There are a lot of C coders here :)
 
And we all love wars. If I weren't such a nice guy, I'd say that vim is the best editor ever. But I won't.
 
QUOTE
Since you know PHP and Perl, C is already too familiar. Try something radically new to stimulate that grey matter and learn Thumb-2EE, NEON, etc. Later on interface it with your favorite HLL.


That's going to require having a device that actually supports these things. He'd may as well at least wait until Pandora is out for that.

QUOTE
Well, he wanted to do something low level, and C still hides things. Actually I would be tempted to suggest Erlang or ocaml as a sequel to Perl instead of Java or C++.


OCaml is an ML with OOP and Erlang is a concurrency oriented language, both have their roots in functional programming and are really pretty distinct from all the other languages you mentioned.

C is pretty low level if you want it to be. He wasn't asking for the most low level thing possible, he said he wanted to learn C since he wants something more low level than what he's used to (and he didn't ask to be told what to learn instead of C)

Language evangelism <_<
 
Last edited by a moderator:
realyst said:
Thanks again for all the feedback:)

I'm actually now looking at how pointers work and am loving the possibilities! (does that make me a sick man?)
No it just means you haven't hit the debugging portion. :p
Pointers are both a god send and the devil's right hand ........ tool .
 
Last edited by a moderator:
realyst said:
Thanks again for all the feedback:)

I'm actually now looking at how pointers work and am loving the possibilities! (does that make me a sick man?)
Well, you are already familiar with pointers in Perl, although they are called references there (perldoc perlref). A straightforward (naive) translation from a hash reference in Perl

my %h = (a=>1, b=>2);
my $p = \%h;
printf "%d\n", $p->{a};

to a struct pointer in C would be:

struct {int a; int b;} h = {1, 2}, *p = &h;
printf("%d\n", p->a);

The dereference operator (->) is even the same.

Unless of course you mean with possibilities (potentially unsafe) type casts and dangling pointers :lol:
 
Last edited by a moderator:
netbsd said:
realyst said:
Thanks again for all the feedback:)

I'm actually now looking at how pointers work and am loving the possibilities! (does that make me a sick man?)
Well, you are already familiar with pointers in Perl, although they are called references there (perldoc perlref). A straightforward (naive) translation from a hash reference in Perl

my %h = (a=>1, b=>2);
my $p = \%h;
printf "%d\n", $p->{a};

to a struct pointer in C would be:

struct {int a; int b;} h = {1, 2}, *p = &h;
printf("%d\n", p->a);

The dereference operator (->) is even the same.

Unless of course you mean with possibilities (potentially unsafe) type casts and dangling pointers :lol:



I didn't think references in Perl could be used to cross scope or some of the other tricks I've seen so far.

But then again I'll admit that perl references were barely touched(I was mostly a php guy) as the syntax was far too funky and the documentation far too horrific.

Though I did touch them to simulate multidimensional arrays(why I'd need to 'simulate' something that should be inherent is topic for another flame war :p )
 
Last edited by a moderator:
realyst said:
I didn't think references in Perl could be used to cross scope or some of the other tricks I've seen so far.

/quote]
I don't know exactly what you mean, but as far as I know Perl still uses malloc() and a reference count for each data object, allowing you to freely create, pass, store or destroy references, with the system keeping track of these counts (and calling free() when the count reaches 0).
 
Last edited by a moderator:
netbsd said:
realyst said:
I didn't think references in Perl could be used to cross scope or some of the other tricks I've seen so far.

/quote]
I don't know exactly what you mean, but as far as I know Perl still uses malloc() and a reference count for each data object, allowing you to freely create, pass, store or destroy references, with the system keeping track of these counts (and calling free() when the count reaches 0).


I stand corrected.
 
Last edited by a moderator:
Back
Top