ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
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.
Distribution: Damn Small Linux, KateOs, M$ Ickdows Vista, My own OS
Posts: 2,094
Rep:
Quote:
Originally Posted by Garry | K | E
How so?
scripted languages will always be slow and thats what makes it have less purpose.
think about graphics, try to fill the screen with pixels 32FPS on python.
scripted languages will always be slow and thats what makes it have less purpose.
scripted languages eg Python (or Perl ) can be extended if some part of your program needs the speed. Otherwise, the speed of development of your program is the priority. That's why i say, you are spewing nonsense when you say they have less purpose.
Quote:
think about graphics, try to fill the screen with pixels 32FPS on python.
you will be amazed what people can do with "scripting languages".
You mean graphics in games?
I'm not wanting to learn Python in that way. If ever I go trying to program a game in Python, I doubt it will be something too graphically pleasing.
Am I right in thinking that a "scripting language"/interpreter are languages that are not converted to computer-readable code before the program is run but at runtime?
A random question but I learnt this once when I was at college doing a Pascal course and was wondering if I heard it right since all I done in them lessons was talk on IRC and MSN.
Last edited by Garry | K | E; 11-17-2009 at 09:12 PM.
You mean graphics in games?
I'm not wanting to learn Python in that way. If ever I go trying to program a game in Python, I doubt it will be something too graphically pleasing.
There's "an embarassing wealth of" good software tools in the Linux environment, all of which have also been ported to Windows (and just about everywhere else).
Languages like C/C++ are normally relegated to building other language compilers, and for writing subroutines that are used as extensions to higher-level languages like PHP, Perl, Ruby, and Python. (And Common Lisp and Haskell and Prolog and ...)
The "80/20 rule" definitely applies here: "80% of the time is spent in 20% of the code." So that code might be written-in and/or assisted-by a smattering of C/C++. But for all the rest of it, speed of execution is not the issue: speed of developmentis. The ability to reliably leverage what someone else has already done... is.
For instance, with Perl I can literally construct a fully functional web-server using four lines of code (that I had to write). Or, I can write a script to slice-and-dice a text file and stuff pieces of it into a database, finishing the entire job in maybe an hour. That gets me out of the computer-center and into the pub, and I like that.
Here's what to do: "you've got 'em all, and you didn't have to pay money for any of 'em, so spend a little time learning to use 'em all." The Linux world is positively stuffed with great tools.
Last edited by sundialsvcs; 11-17-2009 at 11:43 PM.
(snip)
Here's what to do: "you've got 'em all, and you didn't have to pay money for any of 'em, so spend a little time learning to use 'em all." The Linux world is positively stuffed with great tools.
I wholeheartedly agree with the sentiment. Having some ability in a variety of tools and languages will enable you to choose the right tool for the job and thus (hopefully!) complete your task more efficiently.
At work I'm the only perl programmer (it's not a job requirement, I just happen to love perl) and I can complete a job that involves parsing a text file in a fraction of the time it takes our lead developer to write a delphi app to do it because perl is the best tool for that sort of task.
scripted languages will always be slow and thats what makes it have less purpose.
think about graphics, try to fill the screen with pixels 32FPS on python.
This really makes me LOL. Your not knowing scripting languages doesn't mean that they are as bad and having less purpose. Slowness? Have you ever written anything in scripting languages, like python?
To OP, I don't know Ruby, but I'm pretty familiar with C++ and Python, I personally prefer Python because it saves so much coding time and that little runtime speed advantage of C++ doesn't really matter mostly, well still depends on what you do.
Distribution: Damn Small Linux, KateOs, M$ Ickdows Vista, My own OS
Posts: 2,094
Rep:
Think about it, C++ is compiled into the CPUs native language and scripted languages have to parsed, loaded and executed.
I dont dislike scripted languages but they aren't common in the real world because people like speed.
Think about it, C++ is compiled into the CPUs native language and scripted languages have to parsed, loaded and executed.
I dont dislike scripted languages but they aren't common in the real world because people like speed.
So what ? For example, I've noticed that EDA software written in C/C++ does not necessarily work faster than tools written in, say, Perl. That is, source code (in, say, Verilog) is parsed faster by written in C/C++ parser, but manipulations on internal data structures do not feel faster.
I am not surprised - I guess developers writing in C/C++ are as constructively lazy as the ones who wrote Perl, and they all use the same libraries for hashes, vectors, strings, etc.
You have already been explained the 80/20 rule.
...
By the way, it's often feels a good comedy to read string manipulation code written by people who know C/C++, but do not know a scripting languages, i.e. their one page of "C" code is often translated into a line or two of, say, Perl.
Distribution: Damn Small Linux, KateOs, M$ Ickdows Vista, My own OS
Posts: 2,094
Rep:
Quote:
By the way, it's often feels a good comedy to read string manipulation code written by people who know C/C++, but do not know a scripting languages, i.e. their one page of "C" code is often translated into a line or two of, say, Perl.
But the perl script is actually being parsed by those wacky string manipulations.
An example for you.
2 equally bad programmers, 1 using C++, the other using Python. Both write bad code. BUT the one who writes with Python has no choice but to indent his code properly, because otherwise his program won't work. Now you go and read their code, which one do you prefer, ( even though the other parts may be badly written ) ? the one which has at least indentation proper, or the one without?
You can run the C++ code through a code formatter and get any indentation style you like, bad indentation really isn't a big deal.
You can run the C++ code through a code formatter and get any indentation style you like, bad indentation really isn't a big deal.
still you need to run it through a code formatter. Yes, bad indentation IS a big deal, if you are the one reading and maintaining code written by others
Last edited by ghostdog74; 11-18-2009 at 07:15 PM.
I dont dislike scripted languages but they aren't common in the real world because people like speed.
wth are you talking about not common in real world ? you are not making sense. this forum you come to is created using PHP, which is a scripting language. that backup script you have may be done in shell or Perl scripting language. There are many more examples of scripting language used in everyday scenarios. Get your facts right.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.