LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 05-30-2007, 02:53 AM   #31
ghostdog74
Senior Member
 
Registered: Aug 2006
Posts: 2,697
Blog Entries: 5

Rep: Reputation: 244Reputation: 244Reputation: 244

Quote:
Originally Posted by Tinkster
Absolutely :}

Cherry tomatoes are sweet and flavoursome; the big
things are bland and watery. Clear winner is guy A.


Cheers,
Tink
lol, the thing is, some like it big, some like it small..and i certainly hope you know what i mean.
 
Old 05-30-2007, 07:48 AM   #32
Dox Systems - Brian
Member
 
Registered: Nov 2006
Posts: 344

Rep: Reputation: 31
Quote:
Originally Posted by ghostdog74
why don't you tell us what better tools, and why they are ugly hacks? I think you are talking crap
If I knew a better tool, I wouldn't have said that PHP/Perl/etc are still the way to get the job done... I said that we need better tools! :-)
 
Old 05-30-2007, 08:10 AM   #33
trashbird1240
Member
 
Registered: Sep 2006
Location: Durham, NC
Distribution: Slackware, Ubuntu (yes, both)
Posts: 463

Rep: Reputation: 31
Quote:
Originally Posted by ghostdog74
What applications? example?
I'm a statistician; at our lab we produce similar tables for almost every statistical analysis. I wrote a program that makes LaTeX tables out of simple input files. I manage my projects with make. It's a simple project. For some reason, it was never clear to me that Python could be applied to that problem; but the Llama Book made it clear right away. I said "Oh, I get it" and I got it. it was just a strike-out for Python with me pitching. It was a huge breakthrough for me. I've since considered re-doing it in Python, or Ruby, but practicality is winning out.

Quote:
So is python books
I agree, there are great books for Python, however from my perspective -- having never studied programming itself -- I found them confusing. Many things were assumed, like that I knew what a "stack" was. I know those things now, but only thanks to reading about and programming in Scheme, Perl and C.

Quote:
what's wrong with "everything is object"?
The problem with "everything's an object" is that it has no significance to me -- someone who is not an experienced programmer. For someone who's studied C since high school, C++, Java, gotten a computer science degree, been a system administrator for five years and tried every scripting language in the known universe, I'm sure that's significant. For me, even though I've done plenty of programming now, the value of object-oriented programming still escapes me because I have no direct need for it. My friend over in the next building who programs in Java every day completely understands it because her whole programming paradigm is object-oriented. Everything I need to do right now can be elegantly implemented procedurally.

Joel

Last edited by trashbird1240; 05-30-2007 at 08:12 AM.
 
Old 05-30-2007, 09:31 AM   #34
ghostdog74
Senior Member
 
Registered: Aug 2006
Posts: 2,697
Blog Entries: 5

Rep: Reputation: 244Reputation: 244Reputation: 244
Quote:
Originally Posted by Dox Systems - Brian
If I knew a better tool, I wouldn't have said that PHP/Perl/etc are still the way to get the job done... I said that we need better tools! :-)
well, the fact that you said "we need better tools" means that somehow you already knew that something is "wrong" with them? So what is wrong with them? Is it because their syntax look ugly to you? or something else?
 
Old 05-30-2007, 10:19 AM   #35
taylor_venable
Member
 
Registered: Jun 2005
Location: Indiana, USA
Distribution: OpenBSD, Ubuntu
Posts: 892

Rep: Reputation: 43
When I first saw this thread, I thought:
Code:
die("Oh no, Perl's dead!") if ($dead)
Nothing is perfect. I think Perl does a good job for what it was designed to do. Some languages (like Ruby) were designed to clean up what the designers perceived as Perl's faults. But syntactically, it gets into aesthetics at some point. If you don't like Perl, don't use it. I'm not worried that the majority of the jobs out there don't use Haskell.
 
Old 05-30-2007, 10:28 AM   #36
ghostdog74
Senior Member
 
Registered: Aug 2006
Posts: 2,697
Blog Entries: 5

Rep: Reputation: 244Reputation: 244Reputation: 244
first of all, i am not going against anyone. we have our own choices.
the following replies will be just for your information.

Quote:
Originally Posted by trashbird1240
For some reason, it was never clear to me that Python could be applied to that problem;
Some for statistics: StatPy
Some for latex: plastex, PyTex
Some for make: OO make, Scons
and more from Cheeseshop.

Quote:
Many things were assumed, like that I knew what a "stack" was. I know those things now, but only thanks to reading about and programming in Scheme, Perl and C.
You can associate stacks in Python as lists, equivalent to Perl arrays...

Quote:
My friend over in the next building who programs in Java every day completely understands it because her whole programming paradigm is object-oriented. Everything I need to do right now can be elegantly implemented procedurally.

Joel
Although Python is built with OO from the start, it doesn't mean you need to use classes or OO all the time. It can also be used for procedural programming.
you make a perl program hello world
Code:
#!/usr/bin/perl
print "hello world";
the equivalent in Python:
Code:
#!/usr/bin/python
print "hello world"
so where's the 00? You associate Python with Java, and thats where it went wrong. Java is Java. Python is Python. you need to declare a class in Java even to run a simple hello world, and that is pure OO.
 
Old 05-31-2007, 09:08 AM   #37
trashbird1240
Member
 
Registered: Sep 2006
Location: Durham, NC
Distribution: Slackware, Ubuntu (yes, both)
Posts: 463

Rep: Reputation: 31
OK, Ghostdog, point-by-point:

I know that python is very useful. That's why I studied it for three months.

I'm not using Perl directly for statistics, and I wouldn't use Python. I'm using these languages to help with stuff that is outside of the statistical realm; we have software specifically designed for that purpose -- though I understand that Python has great applications in numerical analysis (that was one of the reasons I was interested in it). Furthermore, none of those things you suggested do what I need, which in my mind is why people are still writing programs. It is, in particular, why I am writing programs.

The main point of my post is I (as in me, not you, not anybody else) don't get object-oriented programming. When I was reading about Python, that's all I seemed to be reading: how great it was that it was thoroughly object-oriented. Maybe I was reading the wrong books. Again that's me. That means a lot to somebody who cut his teeth on C++, it's meaningless to me. Some career programmers also feel like OOP is a tired idea and it's not that great after all.

I understand that Python can be procedural, as Perl can be object-oriented. It's irrelevant. The point is that as long as I read about Python, I had trouble understanding what it was good for -- my job is not directly computer-oriented (I'm not making "software for real people" as rms says), I'm just a heavy user who can benefit from some programming. When I read about Perl, I understood the application right away. For me to learn a language, I have to have a project to apply it to.

Joel

Last edited by trashbird1240; 05-31-2007 at 09:09 AM.
 
Old 05-31-2007, 12:49 PM   #38
coward77
LQ Newbie
 
Registered: May 2007
Distribution: windows, AIX
Posts: 9

Rep: Reputation: 0
Quote:
Originally Posted by trashbird1240
OK, Ghostdog, point-by-point:

I know that python is very useful. That's why I studied it for three months.

I'm not using Perl directly for statistics, and I wouldn't use Python. I'm using these languages to help with stuff that is outside of the statistical realm; we have software specifically designed for that purpose -- though I understand that Python has great applications in numerical analysis (that was one of the reasons I was interested in it). Furthermore, none of those things you suggested do what I need, which in my mind is why people are still writing programs. It is, in particular, why I am writing programs.

The main point of my post is I (as in me, not you, not anybody else) don't get object-oriented programming. When I was reading about Python, that's all I seemed to be reading: how great it was that it was thoroughly object-oriented. Maybe I was reading the wrong books. Again that's me. That means a lot to somebody who cut his teeth on C++, it's meaningless to me. Some career programmers also feel like OOP is a tired idea and it's not that great after all.

I understand that Python can be procedural, as Perl can be object-oriented. It's irrelevant. The point is that as long as I read about Python, I had trouble understanding what it was good for -- my job is not directly computer-oriented (I'm not making "software for real people" as rms says), I'm just a heavy user who can benefit from some programming. When I read about Perl, I understood the application right away. For me to learn a language, I have to have a project to apply it to.

Joel
For statistics, in perl if you have a text file containing anything you can easily find patterns through perl.

just do (in dos for example):

type file.txt|perl -ane"print if /put pattern/"

this can extract any kind of pattern. for example a sequence of 3 numbers would be
/\d\d\d/ or a sequence of any set of characters
a, G, f, d would be /[aGfd]+/ etc.

the point is the regular expression syntax can help alot. to extract just a part you can use $1 from /df(ww)uu/ gets "ww" or the entire pattern $&.

So you can learn at least a small subset of the language perl and do quite alot. Actually just learn a small useful subset of any language, learning it all doesn't even make sense, I have been using perl for a few years and just use 10 or 15 key concepts. Especially languages like java and C++ are true overkill and uselessly complicated .
 
  


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
Solaris Dying? keysorsoze Solaris / OpenSolaris 11 04-21-2007 07:24 PM
Documents to learn C language and Perl/python satimis Programming 5 03-19-2004 10:20 AM
need some advice on language choice(Perl vs PHP) coolman0stress Programming 8 11-17-2003 04:41 AM
perl(Cwd) perl(File::Basename) perl(File::Copy) perl(strict)....What are those? Baldorg Linux - Software 1 11-09-2003 08:09 PM
Dying disk???? Mux Linux - Hardware 2 10-22-2002 06:27 PM

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

All times are GMT -5. The time now is 01:39 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