From owner-freebsd-questions@FreeBSD.ORG Thu Dec 18 06:23:12 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4B77216A4CF for ; Thu, 18 Dec 2003 06:23:12 -0800 (PST) Received: from fw.farid-hajji.net (fw.farid-hajji.net [213.146.115.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id F143743D46 for ; Thu, 18 Dec 2003 06:23:06 -0800 (PST) (envelope-from cpghost@cordula.ws) Received: from fw.farid-hajji.net (localhost [127.0.0.1]) by fw.farid-hajji.net (8.12.10/8.12.10) with ESMTP id hBIEMOo7093253; Thu, 18 Dec 2003 15:22:25 +0100 (CET) (envelope-from cpghost@cordula.ws) Date: Thu, 18 Dec 2003 15:22:24 +0100 (CET) Message-Id: <200312181422.hBIEMOo7093253@fw.farid-hajji.net> From: "Cordula's Web" To: soultrax@verizon.net In-reply-to: <20031218013742.QRHC9064.out007.verizon.net@outgoing.verizon.net> (soultrax@verizon.net) X-Mailer: Emacs-21.3.1/FreeBSD-4.9-STABLE References: <20031218013742.QRHC9064.out007.verizon.net@outgoing.verizon.net> cc: freebsd-questions@FreeBSD.org Subject: Re: Just a question..... X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: cpghost@cordula.ws List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Dec 2003 14:23:12 -0000 soultrax@verizon.net wrote: > What programming languages do you use for interacting with > freebsd( the kernel,ports)? FreeBSD and most other third-party applications are written in C. You can also program in other languages if you like: just have a look at the huge collection of compilers and interpreters in /usr/ports/lang > Where can i get more information on how make programs for > freebsd? The easiest way to learn how to program, is to look at existing source code. FreeBSD itself (kernel and the base system, minus the ports) comes with full source code under /usr/src. When you install a port, the source code for that port (the tar ball) is stored in /usr/ports/distfiles, so you can have a look too. Unless you plan to write kernel modules, programming for FreeBSD is the same as programming for other Unices, e.g. Linux. Actually, most open source programs written for Linux also can be (and are) compiled under FreeBSD. The reason for this lies in the Unix C library (and other libraries), which provides a fairly standard interface to the kernel. > I plan on going to college to study computer science but i > dont want to waste my time studying programming languages > like visual basic, even though it wouldnt hurt. I want you > to guide me so i wont make a mistake. i know ms software > dictates most things in the market because of their business > practices but i dont want to get stuck with it. Freebsd is > my choice and i want it to be a meaningfull choice in my > future career. Most popular programming languages are C, C++, Java, and Perl. If you learn one of them (and I'd suggest that you concentrate on C), it is fairly easy to learn the others. VB is not that good, because it is restricted to the MS platform (and it is a _terrible_ language). A portable C, C++, Java and Perl program would run on nearly any platform. FreeBSD comes with gcc, which can compile C and C++ code. Perl and Java can be added by installing the appropriate ports in /usr/ports/lang. As an example, you may want to start with the canonical simple hello-world program below, and build more complex programs on top of that: /* File: hello.c */ #include int main (int argc, char *argv[]) { printf ("Hello World!\n"); return 0; } ------------------------------------- Compile with: $ cc -o hello hello.c Run: $ ./hello Hello World! > Thats all i ask for now. with your help in two to four > years from now ( or less if possible) you`ll hear from me > with what i can provide to you or the freebsd community. > Have fun and happy hacking! > Regards, > Luis Sime -- Cordula's Web. http://www.cordula.ws/