Results 21 to 24 of 24
Thread: how to choose
|
Enjoy an ad free experience by logging in. Not a member yet? Register.
|
|
-
04-27-2005 #21
BryanLooking for a distro? Look here.
"There can be no doubt that all our knowledge begins with experience." - Immanuel Kant (Critique of Pure Reason)
Queen's University - Arts and Science 2008 (Sociology)
Registered Linux User #386147.
-
04-27-2005 #22
- Join Date
- Feb 2005
- Location
- between a cup of tea and a cup of no tea
- Posts
- 16
I think it comes down, as well, to what you want to do with the language. Do you want to write applications that you will use or distribute? Do you want to h4xx0r some hardware? Do you want to automate tasks you find repetetive?
One thing I haven't seen answered is the difference between compiled and scripting languages.
Just so you understand, a computer only talks zeros and ones. That's it. Either a register is open or closed.
You can specifically tell a computer how to do something by writing in low-level machine language. A way of abstracting that machine language is by using what's called, Assembler. Here's an example of what assembler looks like:
Code:mov ax,cs mov ds,ax mov ah,9 mov dx, offset Hello int 21h xor ax,ax int 21h Hello: db "Hello World!",13,10,"$"
Most applications written by commercial ventures are done in a slightly more abstract language, where you're not actually telling the computer what to do with teh memory. C and C++ fall into these categories. You write the code and run it through a compiler. The compiler translates your code into machine language (similar to above) for execution.
An example would be
Code:#include <iostream.h> main() { cout << "Hello World!" << endl; return 0; }
The next level of code is pure script. This form of code is never compiled and has to be parsed through a "runtime" prior to each use. The programmer has no idea about memory addressing or what is going on behind the scenes. This type is the easiest to code but provides the least amount of control. It is also the "slowest" to execute, since the processor must translate the code each time it is run.
Here's an example in BASIC, which is what I learned first back in '79.
Code:PRINT "Hello World!" END
Now, people wanted a sort of middle ground between pure compiled code and script code. Thus VB, Java, and .NET (Mono, C#...) were invented.
In each of these instances, code is written in a somewhat natural language syntax. The code is partially compiled, but only to a byte level. It is not yet machine code. When the program is executed, the machine runs the code through a runtime engine which either compiles it further or uses a cached version of the compiled code.
Here is an example of Java, which I'm learning right now:
Code:class HelloWorld { static public void main( String args[] ) { System.out.println( "Hello World!" ); } }
I hope that helps you out! The cool thing about coding is that - once you're done - you can run your app and make the computer do stuff.
-
04-28-2005 #23
- Join Date
- Apr 2005
- Posts
- 40
a lot of thanks Perfect Reign
really it helped me and i'll try to make the first step in (a middle ground between pure compiled code and script code ) by choosing beween them .
maybe i have to read a bit for each one
-
04-28-2005 #24
- Join Date
- Feb 2005
- Location
- Delft, Holland
- Posts
- 95
Why not LISP, most cs classes take LISP as an introduction to programming, as it is very easy and very powerful
It's an intepreted style of languages, although it can also be compiled.
Code:(DEFUN my_function () (FORMAT T "Hello World!"))
where the fib of n is the fib of n - 1 plus the fib of n - 2.
And the fib of anything below 2 is equal to 1.
Code:(DEFUN fibonacci (n) (COND ((< n 2) 1) (T (+ (fibonacci (- n 1)) (fibonacci (- n 2))))))