ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Well, you see, my favorite programming language is COBOL. Not your Daddies COBOL but the current standard. While most people think that COBOL is dead and useless, they usually are shocked when they find out that the most current standard for it is from 2002. COBOL now has as much, or better, OOP than C++ will ever have. It's also got functions and all kinds of "modern" programming stuff. That and it still retains the great strengths it always had, like the WORKING-STORAGE SECTION and readability.
As for the ones I use most they are, awk, bash, php, perl.
I don't understand what all the fuss is about Perl; I've basically only read the wiki on it. What can Perl do that other languages can't? Why do so many people use it?
When it comes to basics (like manipulating data), Perl is extremely powerful with a small learning curve and rapid development cycle (no compiling). I also prefer Perl because it dynamically types variables.
$x=5; #no explanation needed
$x.="0"; #concatenates a 0 on to the end of the string
$x+=5; #mathematically adds 5
(result is 55)
That a rather pointless example, but very demonstrative. In practical terms, I never have to scope between a short, int, long, and float....
...I think the thing with what is considered the most powerful languages is that they are not originally made by "serious" programmers. That is to say that with perl for instance, Larry Wall could not write a program in any language the way he wanted to so he made a new one, C was invented for the sake of making an OS which was really made to play a game on.
I think the additional posts have made my original post's point. The choice of language is dependent upon the project being done. And to a limited degree what a person is comfortable with using.
Perl was created because the existing languages did not do a job that Larry Wall needed to do. So he created a language to fill the need. The Perl interpreter is written in "C" or C++ I believe. As for FORTRAN it is alive and well - doing things most things people never think of - like running the traffic light systems. Its strength is mathematical computations. Ada is also doing quite well - it took off in Europe even though it was "created" by the US DoD. "B" was the predecessor to "C". And "C" and Unix were created by AT&T at Bell Labs not to run games but to run the phone system if I remember correctly as well as a research project. But games tend to stress a system in ways no one thinks of and thus are a good way to test languages and operating systems. See testing can be fun. Just look at how many games run on Microsoft Windows. And the game industry tends to have their own game programming languages no one sees outside of that industry.
There is a lot of history in the how and why language are created. Each one was created to fill a need or perceived need. As time has progressed some languages have fallen by the way side in most cases. Algol, Forth, PL/I (and derivatives), RPG II and other lesser known languages still exist but are rarely heard from today. Many have been supplanted by easier to use languages and by computer languages individual students learned in school. People tend to use the programming language they are familiar and are willing to learn. My brother has taken the time to learn lisp and has found it make his some of his work easier. Again, the choice is based upon the needs of the project.
For those of you in college, or out now, how many computer language classes did you take and how many computer languages have you been exposed? In my first year of college I took 5 different programming language classes - FORTRAN, IBM Assembler, PL/1, Cobol, and RPG II. For work I generally used FORTRAN and Series 3200 Assembler because of the math nature of the software being written. Remember, FORTRAN is from "FORmula TRANslator". And I have used and use Pascal, Ada, "C", various Assemblers, PHP and other interpreter based languages for different computers. The choice is always the how and why of the project I am working on.
Another question is a scripting language a true programming language? I think the answer is yes - the difference is that scripting languages tend to be specialized for a specific task or environment. I have written some powerful scripts to do support operations that while could be written in a compiled language it is much easier and quicker to use scripting languages.
Don't know 1 well enough to say it's my favorite. I really have fun with perl, python, php and shell scripting. I have dabbled with RoR just not flexible enough to try and take the time to learn something else. Wanna learn more PPP.
I'd say scripting languages are "true programming". They are "interpreted" rather than "compiled". Perl can do most everything C can (not surprising given that it was written to marry C with awk and other utilities).
There was an old Language called Databus used on the old Datapoint hardware and it was migrated to UNIX (the one I was familiar with was DB/C) and oddly enough it was an "interpreted" language as well with the interpreter itself being written in C. However, the major system I worked on at the time had all of its "programs" written in DB/C and a full "development" staff that wrote exclusively in that "intepreted" language.
For that matter I always thought macro "programs" in Lotus 123 were "real programming". In my former life as an accountant I could make Lotus 123 do many things that the average user wasn't aware was available and made rather sophisticated menu systems within it for the benefit of non-techie users.
I think the person that created the word lisp was a sadist - imagine describing people with a word they themselves can't say.
There's no need to take any position in favor of John McCarthy here, but I think it's quite curious to note that the form LisP took in the end was not the original one; McCarty intended the sexps only for machine usage, and proposed a more "traditional" (though traditional for non-assembly language, at the time, was mainly what FORTRAN was), infix notation for operations in expressions to be written by humans, but that second format actually never took off.
BTW, we ought LisP quite a lot: McCarthy introduced the basic conditional if-then-else instruction into Algol starting from what he was doing for LisP, when FORTRAN was having just conditional goto, LisP was the first language to propose functions as first-class objects, *recursion*, garbage collection, and many other things that we consider standard today.
Back in 1992, I wrote a fully working neural network simulator, for whatever kind of topology you wanted, in *one* day, to help a pair of friends (incidentally, two pretty good programmers) that had been struggling for a week to write that simulator in C using pointers; when I gave them the solution about what they were missing, then their solution was running 10x time faster, but...
The same year, my Computer Graphic course work consisted in a kernel for a proto PHIGS+ system, able to do extrusions, sweeps (I may be wrong about this term), and 3D polyhedra algebra, plus a lot of other things, all ported to LisP from Pascal, and I had a lot of fun doing it, finding lots of occasion for code improvement.
LisP it's an extremely incremental-fast-prototyping language, that allows you to do very complicated things in very short terms, and with today editors keeping that proliferation of parentheses under control is peanuts.
To close, whilst looking at the main page on Lua, I found this quite interesting page: