Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

LOL IT'S C TIME

Name: Anonymous 2007-07-11 13:15 ID:hoSRp9Cj

Hi /prog/, I have some experience with C, but I don't know how to do much except take text input, save variables, calculate, and print text out. What should I read to learn to do things like display graphics, save/load files, send/receive data using ports, et cetera?

Name: Anonymous 2007-07-11 13:19 ID:dB/KDuBD

java

Name: Anonymous 2007-07-11 13:22 ID:Heaven

read SICP

Name: Anonymous 2007-07-11 13:29 ID:EYgm7xyk

save/load files
wait, you know how to ``print text out'' but you don't know that?
You need to read about file I/O. when you ``print text out'' you're basicly using some file IO operation to write to stdout.

send/receive data using ports
well first you gotta clear that concept in your mind before you attempt to write some socket I/O program. i recommend teh TCP/IP protocl

display graphics
use some 3rd party library/etc like wxWidgets, GTK, Qt and friends.

Name: Anonymous 2007-07-11 14:33 ID:hoSRp9Cj

>>3

I'm looking for language-specific information here. Abstract crap I can do very well on my own, thank you.

>>4
|well first you gotta clear that concept in your mind before you attempt to write some socket I/O program. i recommend teh TCP/IP protocl

...I meant serial port.

Name: Anonymous 2007-07-11 14:43 ID:gIkz0/WY

>>5

>>3
>"read SICP"
>- Bryce's Law

Name: Anonymous 2007-07-11 16:01 ID:3KkbGjeX

>...I meant serial port.

/dev/ttyS0

You need to read about file I/O. when you ``print text out'' you're basicly using some file IO operation to write to stdout.

Name: Anonymous 2007-07-11 16:59 ID:d89mCTBA

>>1
You might want to look at writing GUI applications with GTK or QT, but expect it to be a little more work than taking input and evaluating whether the user's name is "Ted" or not.

Name: Anonymous 2007-07-11 17:17 ID:Heaven

>>1
read man pages.

Name: Anonymous 2007-07-11 17:28 ID:EYgm7xyk

>>9
most man pages are incomplete and/or bad.

The C programming language - by K&R
bmurali.c.tripod.com/Documents/dritchie.pdf
ISO/IEC - 9899 - Programming languages - C
www.nirvani.net/docs/ansi_c.pdf

Name: Anonymous 2007-07-11 18:05 ID:zBT/N6Zt

>>10
Translation: I don't know how to read manpages.

Name: Anonymous 2007-07-11 18:39 ID:hoSRp9Cj

>>11

And manpages are what?

Name: Anonymous 2007-07-11 18:40 ID:hoSRp9Cj

>>11

Also, I'm not looking for information on Unix, am I?

Name: Anonymous 2007-07-11 18:48 ID:rY/SVHcT

Actually, I'm looking for information on Unix, I just don't know it yet.

Name: Anonymous 2007-07-11 19:08 ID:hoSRp9Cj

Actualy, I am looking for information on Unix, just not in this thread. I'd like my programs to run with FreeDOS too. :)

Name: Anonymous 2007-07-11 19:16 ID:entyKWyj

Actualy, I am looking for information on Spiny Norman.

Name: Anonymous 2007-07-11 19:51 ID:gIkz0/WY

"Actually, I'm looking for information on Unix, I just don't know it yet."
- Bryce's law

Name: Anonymous 2007-07-11 20:33 ID:lWteE4Zg

Actually, I'm a complete retard, I just haven't dropped a toaster in my bathtub yet.

Name: Anonymous 2007-07-11 20:41 ID:hoSRp9Cj

If by "retard" you mean "some who is held back", then yes, I'm being held back by zealots who demand I take in their philosophy instead of letting me have the information I want.

Name: Anonymous 2007-07-11 21:08 ID:Heaven

>>19

OKAY YOU FUQIN ANGERED AN EXPERT PROGRAMMER
GODFUCKIGNDAMN
FIRST OF ALL, YOU DONT FUQIN KNOW WHAT A MAN PAGE IS
SECONDLY, THIS IS
/prog/ DO NOT DEMAND USEFUL ANSWERS THE WAY YOU WANT THEM TO BE
THIRDLY PROGRAMMING IS ALL ABOUT PHILOSOPHY AND ``ABSTRACT BULLSHITE'' THAT YOU WILL NEVER COMPREHEND
AND FUQIN LASTLY, FUCK OFF WITH YOUR BULLSHYT
EVERYTHING HAS ALREADY BEEN ANSWERED IN
>>3,4,10

Name: Anonymous 2007-07-11 21:39 ID:gIkz0/WY

>>19
No, by "retard", I mean "broken", mentally.

Name: Anonymous 2007-07-11 21:56 ID:ZnqaABLy

OKAY YOU FUQIN ANGERED AN EXPERT PROGRAMMER
GODFUCKIGNDAMN
FIRST OF ALL, YOU DONT FUQIN KNOW WHAT A MAN PAGE IS
SECONDLY, THIS IS /prog/ DO NOT DEMAND USEFUL ANSWERS THE WAY YOU WANT THEM TO BE
THIRDLY PROGRAMMING IS ALL ABOUT PHILOSOPHY AND ``ABSTRACT BULLSHITE'' THAT YOU WILL NEVER COMPREHEND
AND FUQIN LASTLY, FUCK OFF WITH YOUR BULLSHYT
EVERYTHING HAS ALREADY BEEN ANSWERED IN >>3,4,10

Name: Anonymous 2007-07-11 21:58 ID:hoSRp9Cj

I'll be reading all of these things you told me to, you know, I'd just like to know why you want me to read it. Otherwise, I'll jsut assume it's an article on how Ubuntu needs to have a red blinking cursor to make it easier to find. I love "PHILOSOPHY AND ``ABSTRACT BULLSHITE''", that's why I want to program in the first place, I don't like "DOGMA AND ``TIRED RHETORICE''", which is all anyone uses around here.

And actualy, I didn't notice >>10 until now. Thanks, >>10!

Name: Anonymous 2007-07-11 22:07 ID:hoSRp9Cj

Also, thanks for the help, I'll try to take your advice into account, but I'm still going to put making programming fun over doing things "professionally". I belaive SICP agrees with me on that point: http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-3.html

Anyway, I'm glad you've been as patient with me as you were. I'll be sure to come back after I've read up and made some programs for myself.

Name: Anonymous 2007-07-11 22:08 ID:gIkz0/WY

DOGMA AND ``TIRED RHETORICE[sic\]"" IS ALL YOU'RE GONNA GET

Name: Anonymous 2007-07-12 0:14 ID:qwhna3BT

Sorry, what I meant was "everything sounds like a forced meme because most of it is".

Name: Anonymous 2007-07-12 2:33 ID:Heaven

>>26
spent some time to actually read >>20's post.
SECONDLY, THIS IS /prog/ DO NOT DEMAND USEFUL ANSWERS THE WAY YOU WANT THEM TO BE
that means, we're here *mostly* for the lulz, but we'll have some seriose talk from time to time
seriose now; SICP is a good book but you do not need to read it in order to write good programs. achieving satori is a differend story though ... ;)

Name: Anonymous 2007-07-12 18:49 ID:aJTNj4qL

>>27
[quote]SICP is a good book but you do not need to read it in order to write good programs[/quote]

...?

Name: Anonymous 2007-07-12 21:53 ID:Heaven

>>28
noob

Name: Anonymous 2007-07-12 23:56 ID:aABzBmR9

The way I learn programming is to figure out something I want to do first; often a difficult step. Come up with some project you want to make.
From that, you can come up with a fairly clear list of what you need to know, and then research that.

-- things like display graphics
Use a library for this. If you wanted to make a game, for instance, you want to look up either a suitable sprite library or some sort of openGL or directX library. Once installed, these will provide functions to do graphics.

You could learn how to do it from a lower level instead, but it frankly isn't worth the effort.

-- save/load files
http://www.google.com.au/search?q=open+a+file+in+c
http://www.thinkage.ca/english/gcos/expl/c/lib/fopen.html

-- send/receive data using (serial) ports
as posted earlier, on unix open the file /dev/ttyS0 and then read/write to it.

Name: Anonymous 2007-07-13 1:52 ID:9I30q8gt

>>30
And if you're not Unix, hm?

Name: Anonymous 2007-07-13 5:58 ID:weRnsXDO

Name: Anonymous 2008-12-12 11:23

bampu

Name: Anonymous 2008-12-12 11:30

And now, for something completely different: why did Dennis decide to have two operators, . and ->? It's not like there are cases when you can use both any of them in the same place, so why not have only .? I'm sure there was some reason behind this.

Name: Anonymous 2008-12-12 11:36

It's not like there are cases when you can use both any of them in the same place, so why not have only .?
Write more C.

Name: Anonymous 2008-12-12 12:15

>>34
You're dumb, but -> shouldn't have been included.

Name: Anonymous 2008-12-12 12:19

>>36
-> shouldn't have been included.
Why?

Name: Anonymous 2008-12-12 12:36

>>34
Because they are different operations and anbiguous operator overloading belongs in C++, not C.

Name: Anonymous 2008-12-12 12:42

>>38
lolwut

Name: Anonymous 2008-12-12 12:58

>>35
I'm writing a lot C already, post code where it's possible or shut up.

>>38
It is completely unambiguous.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List