LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 11-17-2009, 08:50 PM   #16
Garry | K | E
LQ Newbie
 
Registered: Nov 2009
Location: location, location.
Distribution: Ubuntu, Back Track 4
Posts: 15

Original Poster
Rep: Reputation: 1

Quote:
Originally Posted by smeezekitty View Post
C/C++ definitly python is a scripted language and scripted languages are really really really slow. python doesnt have that much purpose.
How so?
 
Old 11-17-2009, 08:51 PM   #17
smeezekitty
Senior Member
 
Registered: Sep 2009
Location: washington U.S.
Distribution: Damn Small Linux, KateOs, M$ Ickdows Vista, My own OS
Posts: 2,094

Rep: Reputation: 104Reputation: 104
Quote:
Originally Posted by Garry | K | E View Post
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.
 
Old 11-17-2009, 09:05 PM   #18
ghostdog74
Senior Member
 
Registered: Aug 2006
Posts: 2,695
Blog Entries: 5

Rep: Reputation: 233Reputation: 233Reputation: 233
Quote:
Originally Posted by smeezekitty View Post
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".
 
Old 11-17-2009, 09:09 PM   #19
Garry | K | E
LQ Newbie
 
Registered: Nov 2009
Location: location, location.
Distribution: Ubuntu, Back Track 4
Posts: 15

Original Poster
Rep: Reputation: 1
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.
 
Old 11-17-2009, 09:14 PM   #20
ghostdog74
Senior Member
 
Registered: Aug 2006
Posts: 2,695
Blog Entries: 5

Rep: Reputation: 233Reputation: 233Reputation: 233
Quote:
Originally Posted by Garry | K | E View Post
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.
Pygame
 
Old 11-17-2009, 11:42 PM   #21
sundialsvcs
Senior Member
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 3,422

Rep: Reputation: 245Reputation: 245Reputation: 245
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 development is. 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.
 
Old 11-18-2009, 03:24 AM   #22
Komakino
Senior Member
 
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938

Rep: Reputation: 52
Quote:
Originally Posted by sundialsvcs View Post
(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.

The more strings to your bow, the better
 
Old 11-18-2009, 05:32 AM   #23
blwizard
LQ Newbie
 
Registered: Nov 2009
Distribution: Ubuntu 9.10
Posts: 1

Rep: Reputation: 1
Quote:
Originally Posted by smeezekitty View Post
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.
 
Old 11-18-2009, 01:50 PM   #24
smeezekitty
Senior Member
 
Registered: Sep 2009
Location: washington U.S.
Distribution: Damn Small Linux, KateOs, M$ Ickdows Vista, My own OS
Posts: 2,094

Rep: Reputation: 104Reputation: 104
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.
 
Old 11-18-2009, 04:54 PM   #25
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,037

Rep: Reputation: 399Reputation: 399Reputation: 399Reputation: 399
Quote:
Originally Posted by smeezekitty View Post
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.
 
Old 11-18-2009, 05:12 PM   #26
smeezekitty
Senior Member
 
Registered: Sep 2009
Location: washington U.S.
Distribution: Damn Small Linux, KateOs, M$ Ickdows Vista, My own OS
Posts: 2,094

Rep: Reputation: 104Reputation: 104
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.
 
Old 11-18-2009, 05:15 PM   #27
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,037

Rep: Reputation: 399Reputation: 399Reputation: 399Reputation: 399
Quote:
Originally Posted by smeezekitty View Post
But the perl script is actually being parsed by those wacky string manipulations.
Or by lex/yacc/whatever.
 
Old 11-18-2009, 05:23 PM   #28
ntubski
Senior Member
 
Registered: Nov 2005
Distribution: Debian
Posts: 1,332

Rep: Reputation: 294Reputation: 294Reputation: 294
Quote:
Originally Posted by ghostdog74 View Post
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.
 
Old 11-18-2009, 07:08 PM   #29
ghostdog74
Senior Member
 
Registered: Aug 2006
Posts: 2,695
Blog Entries: 5

Rep: Reputation: 233Reputation: 233Reputation: 233
Quote:
Originally Posted by ntubski View Post
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.
 
Old 11-18-2009, 07:14 PM   #30
ghostdog74
Senior Member
 
Registered: Aug 2006
Posts: 2,695
Blog Entries: 5

Rep: Reputation: 233Reputation: 233Reputation: 233
Quote:
Originally Posted by smeezekitty View Post
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Perl vs. Ruby vs. Python vargadanis Programming 53 12-31-2010 01:37 PM
Perl or Ruby or Python? Or something else? MasterOfTheWind Programming 18 05-07-2009 01:43 PM
Lisp, Ruby, or python nesrail Programming 20 01-27-2009 03:49 AM
Python, Java, or Ruby? Doctorzongo Programming 9 04-01-2008 12:14 AM


All times are GMT -5. The time now is 06:11 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration