LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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
  Search this Thread
Old 01-18-2010, 02:51 PM   #1
ericcpp
LQ Newbie
 
Registered: Jan 2010
Location: Terhan
Distribution: Debian, Mandriva
Posts: 14

Rep: Reputation: 0
Question Learn new language after c++?


Hi
I'm c++ programmer under win and Linux (mostly qt).
and in Linux world I have some small expedience in shell scripting.
now i want to learn a new language, I want to know what is the general propose
of Perl and Python in one line!

Thank you all!
Eric
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 01-18-2010, 03:00 PM   #2
smeezekitty
Senior Member
 
Registered: Sep 2009
Location: Washington U.S.
Distribution: M$ Windows / Debian / Ubuntu / DSL / many others
Posts: 2,339

Rep: Reputation: 231Reputation: 231Reputation: 231
I would go for ASM/assembly/assembler/what ever you want to call it.
 
Old 01-18-2010, 04:47 PM   #3
David1357
Senior Member
 
Registered: Aug 2007
Location: South Carolina, U.S.A.
Distribution: Ubuntu, Fedora Core, Red Hat, SUSE, Gentoo, DSL, coLinux, uClinux
Posts: 1,302
Blog Entries: 1

Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by ericcpp View Post
I want to know what is the general purpose of Perl and Python in one line!
I use Perl and Python when I need to do a lot of string handling.

For the applications where I am doing mostly string handling, writing the equivalent code in C or C++ would take approximately 10 times as long.
 
Old 01-18-2010, 05:51 PM   #4
vigol
Member
 
Registered: Feb 2008
Location: Uns Cigano from Vigol
Distribution: FreeBSD 8.0
Posts: 59

Rep: Reputation: 19
Quote:
I'm c++ programmer
Refer to my post at
http://www.linuxquestions.org/questi...=1#post3831435

Quote:
(mostly qt).
Qt is just a library.
Quote:
I'm c++ programmer under win and
maybe you're a MSDN fan.
But now, try to learn more about Kernel System Calls & Glibc.

Quote:
in Linux world I have some small expedience in shell scripting
Some small experience is too small. If you don't want to call for a administrator to make your system up, please don't hesitate to learn your default system configuration scripting language.
As a matter of fact learn sh or bash in depth
Quote:
I want to know what is the general propose
of Perl and Python in one line!
I haven't good experience in Python, But about perl
1- It's perl, It is not Perl or PERL!
2- Originally it was designed for String/Text Game(I real hot loving game)- I like that
3- Do you like to become a perl's master? you must think like Larry when you design/write code, before refering to perldoc
4- You can achieve one result from n way -- Relax Syntax

why I don't answer your question in one line?
Because perl is not {C#,VB,VC++}

Last edited by vigol; 01-18-2010 at 06:05 PM.
 
Old 01-18-2010, 09:49 PM   #5
graemef
Senior Member
 
Registered: Nov 2005
Location: Hanoi
Distribution: Fedora 13, Ubuntu 10.04
Posts: 2,379

Rep: Reputation: 148Reputation: 148
Originally, most scripting languages were designed to do a specific task and do it well. But now they are so powerful that they can achieve many many things. Given that you already have some experience with C++, an adventure into scripting would be a good move. I would say pick one (Perl, Python, PHP, Ruby etc..),and give it a whirl.



Quote:
Originally Posted by vigol View Post
1- It's perl, It is not Perl or PERL!
Are you sure? A quick search on Amazon and all the texts on the first page I saw wrote it either Perl or PERL. Looking inside a text co-authored by a chap with the name Larry Wall has the following: "Most Perl programmers tend to follow an imperative (also called procedural) style,". (Programming Perl (3rd Edition) pg 206)

Quote:
Originally Posted by vigol View Post
3- Do you like to become a perl's master? you must think like Larry when you design/write code, before refering to perldoc
For me that would be a really turn off for the language. To be able to code well in it you need to think like someone else. Yuk.
 
Old 01-18-2010, 10:02 PM   #6
Matafome
LQ Newbie
 
Registered: May 2006
Location: Portugal
Distribution: Ubuntu
Posts: 4

Rep: Reputation: 1
Perl and Python are scripting languages used in little/medium programs. But it's main objective is used to make various components previously created to interact between so they're caled glue.
They're good in applications which manipulates a greate diversity of structures, applications that changes too quickly, applications that need to be expandble, administration of files, administration of users, dns and other name services in networks, administration of databases, using e-mail for administration of systems, manipulation of log files, security and network surveilance, administration of systems supported over XML, programming for web.
Never use this kind on languages in real time programs.

This is my humble opinion
 
Old 01-18-2010, 10:31 PM   #7
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Incidentally:

Perl - name of language
perl - name of actual perl executable (thing that runs your programs)
PERL - post-facto 'backronym' with 2 expansions a) Practical Extraction & Reporting Language (mgrs) b) Pathologically Eclectic Rubbish Lister (programmers definition)

http://perldoc.perl.org/
http://perldoc.perl.org/perlfaq1.htm...nd-%22Perl%22?
 
Old 01-18-2010, 11:05 PM   #8
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941
I would suggest Perl.

Here's why:
  • Almost all of the things that you'll be doing are going to be "things that have been done before." Things that have been done hundreds of times before. It is absolutely senseless to spend original effort doing not-original things.
  • The raw speed-of-execution of a program is, quite frankly, unimportant. But the speed and accuracy with which you can develop it is vital. You are the expensive part of the equation. Your time is what needs to be conserved.
  • Perl gives you access to the CPAN library, which consists of many thousands of thoroughly-tested packages including some that really are "rocket science." CPAN is the pay-dirt. CPAN is "what all the fuss is about."
  • There are too-many tools out there which are "special purpose." PHP, say, may be fine for websites, but will you use it for anything else? (Oh, you could, but is it really designed for anything else?) It is very handy to have ready access to a tool that can be applied in all sorts of situations, and on any type of computer that you might sit down in front of (or put in your pocket).
  • Among the various tools in your toolbox, some of them are have well-worn handles from being picked up and used over and over again. Their blades are sharp and they are well cared-for. Perl is such a tool. Highly recommended.
 
Old 01-19-2010, 08:07 AM   #9
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 454Reputation: 454Reputation: 454Reputation: 454Reputation: 454
Quote:
Originally Posted by sundialsvcs View Post
I would suggest Perl.

Here's why:
  • Almost all of the things that you'll be doing are going to be "things that have been done before." Things that have been done hundreds of times before. It is absolutely senseless to spend original effort doing not-original things.
  • The raw speed-of-execution of a program is, quite frankly, unimportant. But the speed and accuracy with which you can develop it is vital. You are the expensive part of the equation. Your time is what needs to be conserved.
  • Perl gives you access to the CPAN library, which consists of many thousands of thoroughly-tested packages including some that really are "rocket science." CPAN is the pay-dirt. CPAN is "what all the fuss is about."
  • There are too-many tools out there which are "special purpose." PHP, say, may be fine for websites, but will you use it for anything else? (Oh, you could, but is it really designed for anything else?) It is very handy to have ready access to a tool that can be applied in all sorts of situations, and on any type of computer that you might sit down in front of (or put in your pocket).
  • Among the various tools in your toolbox, some of them are have well-worn handles from being picked up and used over and over again. Their blades are sharp and they are well cared-for. Perl is such a tool. Highly recommended.
And Perl is a darn good functional (i.e. of the LISP/Haskell/OCaml flavor) language - I am using its functional side a lot, and it's fun, i.e. convenient and robust.

Last edited by Sergei Steshenko; 01-19-2010 at 03:39 PM.
 
Old 01-19-2010, 02:34 PM   #10
ericcpp
LQ Newbie
 
Registered: Jan 2010
Location: Terhan
Distribution: Debian, Mandriva
Posts: 14

Original Poster
Rep: Reputation: 0
thank you all. I choosed perl. It's really cool!
 
Old 01-19-2010, 03:42 PM   #11
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 454Reputation: 454Reputation: 454Reputation: 454Reputation: 454
Quote:
Originally Posted by ericcpp View Post
thank you all. I choosed perl. It's really cool!
Now that you've chosen Perl, remember that regarding object creation Perl is very different from C++ in a sense that in Perl constructor does return a value.

In the beginning it might look like a non significant difference, but in reality the difference is huge - it drastically affects the way you can (and probably should) write your code.
 
Old 01-19-2010, 04:30 PM   #12
wje_lq
Member
 
Registered: Sep 2007
Location: Mariposa
Distribution: FreeBSD,Debian wheezy
Posts: 811

Rep: Reputation: 179Reputation: 179
Quote:
Originally Posted by ericcpp View Post
thank you all. I choosed perl. It's really cool!
... and when you've immersed yourself in Perl (a good choice, by the way) and want to learn yet another language, and you wish to expand your horizons a little, consider LISP.

http://www.linuxquestions.org/questi...g-deal-748193/
http://en.wikipedia.org/wiki/Lisp_%2...ng_language%29
http://www.gigamonkeys.com/book/
http://www.lisp.org/alu/res-lisp-education
http://www.cc.gatech.edu/computing/c...ommenting.html

... and to put it all in perspective, this cartoon.
 
Old 01-19-2010, 06:12 PM   #13
vigol
Member
 
Registered: Feb 2008
Location: Uns Cigano from Vigol
Distribution: FreeBSD 8.0
Posts: 59

Rep: Reputation: 19
Quote:
Originally Posted by graemef View Post
For me that would be a really turn off for the language. To be able to code well in it you need to think like someone else. Yuk.
At least it can be true in a context of the expression decision between Scalar and List. But I correct my previous thread :
prediction of how Larry think instead of Thinking like Larry.
Quote:
Originally Posted by graemef View Post
Are you sure? ...Looking inside a text co-authored by a chap with the name Larry Wall has the following: "Most Perl programmers tend to follow an imperative (also called procedural) style,". (Programming Perl (3rd Edition) pg 206)
Your're right. http://www.perl.org/about/style-guide.html
I don't know why, but I'm going to name it perl in all context. sorry.

These are some facts about perl from following references:

Paradigms of Artificial Intelligence Programming, by Peter Norvig
Learning Perl, 4th Edition, By Brian D Foy, Tom Phoenix, Randal L. Schwartz
Higher-order perl, by Mark Jason Dominus
Perl in a Nutshell, By Ellen Siever, Stephen Spainhour & Nathan Patwardhan


1- perl was originally designed as a replacement for C on the one hand and Unix scripting languages like Bourne Shell and awk on the other.
2- perl is much more like Lisp than it is like C.
3- perl shares some important features with Lisp such as first-class functions, dynamic access to the symbol table, and automatic storage management.
4- perl is primarily developed for unix, It has been called a "Pathologically Eclectic Rubbish Lister".
It's a retronym, not an acronym.Larry , came up with the name first and the expansion later.
5- Some nice, but not exlusive features : CGI development (CGI), Database interconnectivity & database independent interface (DBI, DBM),
Network programming (Sockets Interface) [WEB, Email, News, FTP], GUI (Perl/Tk)
 
Old 01-19-2010, 07:19 PM   #14
David1357
Senior Member
 
Registered: Aug 2007
Location: South Carolina, U.S.A.
Distribution: Ubuntu, Fedora Core, Red Hat, SUSE, Gentoo, DSL, coLinux, uClinux
Posts: 1,302
Blog Entries: 1

Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by ericcpp View Post
thank you all. I chose Perl. It's really cool!
Now that you have chosen Perl, I would suggest that you purchase "Mastering Regular Expressions", by Jeffrey E. F. Friedl.

I have a lot of Perl books, but that was the one that helped me maximize my knowledge of Perl. It might seem counter-intuitive that a book on regular expressions would make someone a better programmer, but Perl's greatest strength is its string processing ability. To understand its string processing ability, you need to understand regular expressions. Thus the need for the book.

While you are at it, don't forget to have fun!
 
Old 01-19-2010, 09:44 PM   #15
ghostdog74
Senior Member
 
Registered: Aug 2006
Posts: 2,697
Blog Entries: 5

Rep: Reputation: 244Reputation: 244Reputation: 244
Quote:
Originally Posted by ericcpp View Post
thank you all. I choosed perl. It's really cool!
after you learn Perl, learn Python. You will define "cool" in a whole new light. See here too

Last edited by ghostdog74; 01-19-2010 at 10:24 PM.
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
What was your first language to learn? vashsna Programming 21 06-11-2007 07:04 PM
what language is best to learn io13 Programming 4 07-09-2006 09:17 AM
What Language Should I Learn? KungFuHamster General 45 04-25-2006 02:10 PM
Which C language to learn? Heiland Programming 10 08-14-2005 08:03 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:05 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration