Thread: programming?

  1. #1
    Registered User
    Join Date
    Apr 2006
    Posts
    65

    programming?

    Hello everyone, I'm new here and a very beginner to programming. Before i can get to my goal which is building an OS by myself. I need to learn how to program. I know C is involved, maybe C++, Assembly and i don't know what else but it's alot more. Is there any really good tutorials? Which language do i need to learn before C since it's required in building an OS. I'm looking for eith a bunch of tutorials that is either step by step or close to it. I'm going home on Saturday and don't have internet there so i need something i can do on my own. Thanks everyone.

  2. #2
    Registered User
    Join Date
    Jan 2005
    Posts
    847
    Well this has nothing to do with artificial inteligence.

    Creating an OS (even something which just boots and displays text) is to far ahead of you at the moment.

    You can look thru the c/c++ tutorials on this site or get yourself a good book.

  3. #3
    Registered User
    Join Date
    Apr 2006
    Posts
    65
    Quote Originally Posted by Quantum1024
    Well this has nothing to do with artificial inteligence.

    Creating an OS (even something which just boots and displays text) is to far ahead of you at the moment.

    You can look thru the c/c++ tutorials on this site or get yourself a good book.
    Ok i rather not a book. I took a look in the other sections just on the first page and i didn't see nothing for tutorials. Would C be the first language to start with?

  4. #4
    Registered User
    Join Date
    Jan 2005
    Posts
    847
    The tutorials are here. You can start with c but you don't have to you could just start with c++.

  5. #5
    Registered User
    Join Date
    Apr 2006
    Posts
    65
    Quote Originally Posted by Quantum1024
    The tutorials are here. You can start with c but you don't have to you could just start with c++.

    ok thank you. I wait because i don't want to do nothing on my Uncle's PC so i ordered a motherboard for my PC so when they comes in i hope it works but i was reading the C tutorial because C is what i start with. Do i put all those #, commands or whatever in a complier? I read up to the first set of commands.

  6. #6
    Registered User
    Join Date
    Jan 2005
    Posts
    847
    You put the program into a c source file (.c) which is just a text file. Your compiler then compiles the source file(s) and links it/them to create your program. Your compiler will most likely come with an IDE for editing source files.

  7. #7
    Registered User
    Join Date
    Apr 2006
    Posts
    65
    Quote Originally Posted by Quantum1024
    You put the program into a c source file (.c) which is just a text file. Your compiler then compiles the source file(s) and links it/them to create your program. Your compiler will most likely come with an IDE for editing source files.
    ok. Would it in be a pain the ass if you put together a similar tutorial of your own and email it to me and get it to me by this Saturday in EST time? If you want i could PM you with my email?

  8. #8
    Registered User
    Join Date
    Aug 2002
    Location
    Hermosa Beach, CA
    Posts
    446
    Dude. Build "Hello World" first like the rest of us. There's PLENTY of tutorials out there for doing this, you don't need someone here to write one specifically for you and gift wrap it into your inbox.
    The crows maintain that a single crow could destroy the heavens. Doubtless this is so. But it proves nothing against the heavens, for the heavens signify simply: the impossibility of crows.

  9. #9
    Registered User
    Join Date
    Apr 2006
    Posts
    65
    I cant find any step by step tutorials. Belive me i tried to search. Yes i found tutorials but there not easy at all. The one peoson above who posted the tutorial that tutorial wasnt eay if it was i wouldnt have asked what to do with the commands. They didnt even tell me to put it as text .txt or in a complier thats how hard the tutorial was.

  10. #10
    int x = *((int *) NULL); Cactus_Hugger's Avatar
    Join Date
    Jul 2003
    Location
    Banks of the River Styx
    Posts
    902
    You're not searching hard enough if you can't find tutorials. Besides, you were linked to one in this thread. First, I'd recommend seeing if your compiler / IDE (software) came with any documentation, tutorials, or sample code. You can, of course, compile Hello World to ensure that everything works. (That's still what I do whenever I set up a compiler after an upgrade, or on another system.) Getting your feet off the ground is the toughest part.

    Depending on what IDE you're using (posting compiler / IDE info aids in responses), compiling & linking code can be a push of a button.

    As for the ultimate goal of creating an OS... shove that to the back of your mind and put it in long-term storage. I've tried this personally. I've created my own kernel, and had it load and run. (And it did nothing more than put text on the screen and read keyboard pushes.) Even if you can get that far (which took me a long time, and a lot of reading) there's even more and more stuff about talking to hardware, memory management, filesystems, assembly code, multitasking, etc. It's overwhelming, and a task best left to a team of programmers.

    As for Hello World:
    Code:
    #include <stdio.h>
    
    int main()
    {
       printf("Hello world!\n");
       return 0;
    }
    long time; /* know C? */
    Unprecedented performance: Nothing ever ran this slow before.
    Any sufficiently advanced bug is indistinguishable from a feature.
    Real Programmers confuse Halloween and Christmas, because dec 25 == oct 31.
    The best way to accelerate an IBM is at 9.8 m/s/s.
    recursion (re - cur' - zhun) n. 1. (see recursion)

  11. #11
    Registered User
    Join Date
    Apr 2006
    Posts
    65
    Tell you the truth i'm about to give up just looking at the tutorials. I said i could find some but what i said is i can't find any that is step by step walk me through everything. Like i mentioned in the reply above. Read it again please. Nothing is step by step these days so if thats the case i give up right now until someone can tutor me which will be never so i probably never going to learn.

  12. #12
    Registered User
    Join Date
    Aug 2002
    Location
    Hermosa Beach, CA
    Posts
    446
    step by step.
    1) You need to learn a language. Start with c.
    2) Get a compiler. That's a program that builds c programs. You can find a free one online as a download. If you have the money, you might consider buying Visual C++, which is Microsoft's compiler. They have a learning edition for about $40.
    3) If you find one online for free, it will be a pain in the ass to install and configure. Expect it. Grab as much documentation from the website where you download beforehand.
    4) After you install the compiler, make sure it works. To do this, take the "Hello World" code posted above, put it into a text file, and save the file as "hello.c".
    5) Compile the program. I have no idea what the compile command looks like. I'm sorry. It will be different for each compiler. But it will probably be similar to "gcc -o hello.exe hello.c", where gcc is the name of the compiler. If you use Visual C++, you'll need to create a new project, add a c file, then push the compile button.
    6) Run the program hello.exe.
    7) Come back for further instructions when you have gotten at least this far.
    The crows maintain that a single crow could destroy the heavens. Doubtless this is so. But it proves nothing against the heavens, for the heavens signify simply: the impossibility of crows.

  13. #13
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,708
    unbelievable.
    Code:
    #include <cmath>
    #include <complex>
    bool euler_flip(bool value)
    {
        return std::pow
        (
            std::complex<float>(std::exp(1.0)), 
            std::complex<float>(0, 1) 
            * std::complex<float>(std::atan(1.0)
            *(1 << (value + 2)))
        ).real() < 0;
    }

  14. #14
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Location
    Out of scope
    Posts
    4,079
    Let's be optimistic here... considering this is in the AI forum, then maybe php111 is actually an AI bot created by a really good programmer. Then you'd have to say that his conversational skills and logic really aren't that bad.
    Sent from my iPadŽ

  15. #15
    Registered User
    Join Date
    Jan 2005
    Posts
    847
    For php111's sake lets hope you're right.

Popular pages Recent additions subscribe to a feed