Why Perl (a request to the developer sof the Ports-System)

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

Why Perl (a request to the developer sof the Ports-System)

Sebastian Rother
I scrited with pdksh all the time lon for now.
Now I'm interested into learning another Scripting-Language.

I can't decide between Perl and Python.
Perl has a lot modules but it's GPLed.
Python on the other hand is under a BSD-compatible License and has less
modules.

I would like to know some "facts" why Perl is in the base system on a
BSD even Python is a BSD-licensed alternativ. Does it have some
advantages I don#t know?

I read a lot papers about both languages. Also CS-related Papers but I
can't decide.

I would be happy if some developers would tell me why they prefere Perl.
Even if the answer would be: It's more common or: It existed at first.

Kind regards,
Sebastan

Reply | Threaded
Open this post in threaded view
|

Re: Why Perl (a request to the developer sof the Ports-System)

L. V. Lammert
At 06:14 PM 12/2/2005 +0100, Sebastian Rother wrote:

>I can't decide between Perl and Python.
>Perl has a lot modules but it's GPLed.
>Python on the other hand is under a BSD-compatible License and has less
>modules.
>
>I would like to know some "facts" why Perl is in the base system on a
>BSD even Python is a BSD-licensed alternativ. Does it have some
>advantages I don#t know?

Perl has been around 'forever', .. is very useful for a ton of sysadmin
applications (a good reason for it to be in base), .. has a lot of good
support (a la class libraries & interfaces), .. but it's NOT true OO (which
has it's plusses & minuses).

Python is an OO language that is much less widely supported, but it has a
good start in the web community. It's just now starting to proliferate for
other applications.

If Web is your forte, however, you might want to consider Ruby.

         Lee

Reply | Threaded
Open this post in threaded view
|

Re: Why Perl (a request to the developer sof the Ports-System)

Jimmy Scott
In reply to this post by Sebastian Rother
On Fri, Dec 02, 2005 at 06:14:18PM +0100, Sebastian Rother wrote:
> I scrited with pdksh all the time lon for now.
> Now I'm interested into learning another Scripting-Language.
>
> I can't decide between Perl and Python.
> Perl has a lot modules but it's GPLed.
> Python on the other hand is under a BSD-compatible License and has less
> modules.

http://www.perl.com/download.csp#srclic
It is NOT gpl'ed.

>
> I would like to know some "facts" why Perl is in the base system on a
> BSD even Python is a BSD-licensed alternativ. Does it have some
> advantages I don#t know?
>
> I read a lot papers about both languages. Also CS-related Papers but I
> can't decide.

I advice to try both, Python is nice in it's syntax and it's harder to
"misuse", I mean, there are a LOT of Perl programmers out there that do
theire best to make theire program unreadable, to say it softly.

The downside about Perl (in my opinion) is the whole "you can do it in
more than one way" and "you can do it on a single line" spirit.

>
> I would be happy if some developers would tell me why they prefere Perl.
> Even if the answer would be: It's more common or: It existed at first.
>

I use Perl because it's easier to get the hard things done. I also think
it has better documentation than Python does; probably because Python is
more OO minded than Perl and I don't like it to much, except for things
where it has it's use. On the other hand, I don't like the Perl way it
returns it's values from functions based on the "context" it's being
called and Python does better type checking.

> Kind regards,
> Sebastan
>
>

I advice to learn both, you can browse the Python tutorial in one day,
and Perl shouldn't be any harder if you learn it from the supplied
documentation 'perldoc perl' and 'perldoc perlintro' it a good start.

Kind regards,
Jimmy Scott

--
The Four Horsemen of the Apocalypse: Death, Famine, War, and SNMP

[demime 1.01d removed an attachment of type application/pgp-signature]

Reply | Threaded
Open this post in threaded view
|

Re: Why Perl (a request to the developer sof the Ports-System)

knitti
In reply to this post by Sebastian Rother
if you intend to write anything other than some system maintenance
scripts, chose python. its code is better maintainable _by design_,
and you'll have it easier to express abstract concepts.
its way to epress object orientation is very powerful, and imho far
superior to the java-like approach (java, c# etc.)

but on the other hand, without a clear task what to write, who can tell?

--knitti

Reply | Threaded
Open this post in threaded view
|

Re: Why Perl (a request to the developer sof the Ports-System)

Jason Crawford
In reply to this post by Jimmy Scott
On 12/2/05, Jimmy Scott <[hidden email]> wrote:

> On Fri, Dec 02, 2005 at 06:14:18PM +0100, Sebastian Rother wrote:
> > I scrited with pdksh all the time lon for now.
> > Now I'm interested into learning another Scripting-Language.
> >
> > I can't decide between Perl and Python.
> > Perl has a lot modules but it's GPLed.
> > Python on the other hand is under a BSD-compatible License and has less
> > modules.
>
> http://www.perl.com/download.csp#srclic
> It is NOT gpl'ed.

According to this:
http://www.openbsd.org/cgi-bin/cvsweb/src/gnu/usr.bin/perl/README?rev=1.8&content-type=text/x-cvsweb-markup
it is GPL'd.

>
> >
> > I would like to know some "facts" why Perl is in the base system on a
> > BSD even Python is a BSD-licensed alternativ. Does it have some
> > advantages I don#t know?
> >
> > I read a lot papers about both languages. Also CS-related Papers but I
> > can't decide.
>
> I advice to try both, Python is nice in it's syntax and it's harder to
> "misuse", I mean, there are a LOT of Perl programmers out there that do
> theire best to make theire program unreadable, to say it softly.
>
> The downside about Perl (in my opinion) is the whole "you can do it in
> more than one way" and "you can do it on a single line" spirit.

Definitely try both, as no one can really tell you which language is
better for your situation except...you. And if you try both, you'll
definitely learn more than if you only tried one. There are always
downsides and upsides to any language, and the best way to judge which
fits your situation the most is just to dive in and get dirty.

> <snip>

Jason

Reply | Threaded
Open this post in threaded view
|

Re: Why Perl (a request to the developer sof the Ports-System)

Mike Hernandez-3
In reply to this post by L. V. Lammert
On  Fri, Dec 02, 2005 at 11:27:34AM -0600, L. V. Lammert wrote:

> Perl has been around 'forever', .. is very useful for a ton of sysadmin
> applications (a good reason for it to be in base), .. has a lot of good
> support (a la class libraries & interfaces), .. but it's NOT true OO (which
> has it's plusses & minuses).
>
> Python is an OO language that is much less widely supported, but it has a
> good start in the web community. It's just now starting to proliferate for
> other applications.
>
> If Web is your forte, however, you might want to consider Ruby.
>

I'd definitely suggest a look at ruby. It's gotten publicity lately for
web stuff due to rails but is also very useful for other applications
including "sysadmin-stuff", gui apps, etc. The FreeBSD ports system uses
ruby as well.

Mike

Reply | Threaded
Open this post in threaded view
|

Re: Why Perl (a request to the developer sof the Ports-System)

Darrin Chandler
In reply to this post by Jimmy Scott
Jimmy Scott wrote:

>I advice to learn both, you can browse the Python tutorial in one day,
>and Perl shouldn't be any harder if you learn it from the supplied
>documentation 'perldoc perl' and 'perldoc perlintro' it a good start.
>  
>
I second that. Also, as with most any language, they each have
strengths. Knowing both you'll be in a position to choose the better
tool for the job at hand. Learn some Perl, Python, and Ruby.

One thing about Perl. It has a few idiosyncrasies. Weird builtin
"shortcut" behaviors that aren't always intuitive. These behaviors are
meant to handle the most common cases, but if you're not aware of them
they can surprise you. For instance, file names as command line
parameters can automatically become more than parameters: they may be
automatically opened and fed into <STDIN> or some such (I have to
refresh my brain every time I come across it). Comes in very handy if
that's what you wanted and it can be turned off, but it'll screw you up
if you're not expecting it.

--
Darrin Chandler
[hidden email]
http://www.stilyagin.com/

Reply | Threaded
Open this post in threaded view
|

Re: Why Perl (a request to the developer sof the Ports-System)

Miod Vallat
In reply to this post by Jason Crawford
> > http://www.perl.com/download.csp#srclic
> > It is NOT gpl'ed.
>
> According to this:
> http://www.openbsd.org/cgi-bin/cvsweb/src/gnu/usr.bin/perl/README?rev=1.8&content-type=text/x-cvsweb-markup
> it is GPL'd.

According to this very same file, it is not. It is dual-licensed, which
is VERY different from being GPL only.

Miod

Reply | Threaded
Open this post in threaded view
|

Re: Why Perl (a request to the developer sof the Ports-System)

Jimmy Scott
In reply to this post by Jason Crawford
On Fri, Dec 02, 2005 at 01:02:32PM -0500, Jason Crawford wrote:

> On 12/2/05, Jimmy Scott <[hidden email]> wrote:
> > On Fri, Dec 02, 2005 at 06:14:18PM +0100, Sebastian Rother wrote:
> > > I scrited with pdksh all the time lon for now.
> > > Now I'm interested into learning another Scripting-Language.
> > >
> > > I can't decide between Perl and Python.
> > > Perl has a lot modules but it's GPLed.
> > > Python on the other hand is under a BSD-compatible License and has less
> > > modules.
> >
> > http://www.perl.com/download.csp#srclic
> > It is NOT gpl'ed.
>
> According to this:
>
http://www.openbsd.org/cgi-bin/cvsweb/src/gnu/usr.bin/perl/README?rev=1.8&con
tent-type=text/x-cvsweb-markup
> it is GPL'd.

It's the first time I read that. But you are right if OpenBSD has chosen
to redistribute it under the GPL instead of the artistic license, which
seems to be the case:

http://www.openbsd.org/cgi-bin/cvsweb/src/gnu/usr.bin/perl/Copying

>
> >
> > >
> > > I would like to know some "facts" why Perl is in the base system on a
> > > BSD even Python is a BSD-licensed alternativ. Does it have some
> > > advantages I don#t know?
> > >
> > > I read a lot papers about both languages. Also CS-related Papers but I
> > > can't decide.
> >
> > I advice to try both, Python is nice in it's syntax and it's harder to
> > "misuse", I mean, there are a LOT of Perl programmers out there that do
> > theire best to make theire program unreadable, to say it softly.
> >
> > The downside about Perl (in my opinion) is the whole "you can do it in
> > more than one way" and "you can do it on a single line" spirit.
>
> Definitely try both, as no one can really tell you which language is
> better for your situation except...you. And if you try both, you'll
> definitely learn more than if you only tried one. There are always
> downsides and upsides to any language, and the best way to judge which
> fits your situation the most is just to dive in and get dirty.
>
> > <snip>
>
> Jason
>

--
The Four Horsemen of the Apocalypse: Death, Famine, War, and SNMP

[demime 1.01d removed an attachment of type application/pgp-signature]

Reply | Threaded
Open this post in threaded view
|

Re: Why Perl (a request to the developer sof the Ports-System)

Juan Jose Natera
In reply to this post by Sebastian Rother
Hi,

>> > Perl has a lot modules but it's GPLed.
[snip]
>> It is NOT gpl'ed.
[snip]
>According to this:
>http://www.openbsd.org/cgi-bin/cvsweb/src/gnu/usr.bin/perl/README?rev=1.8&content-type=text/x-cvsweb-markup
>it is GPL'd.

Well actually you're both kind of right, it's either GPL or Artisticly licensed, user's choice. If in doubt, download perl's source code and check the README file.

As for the choice of language, there is some info at:

http://cvs.openbsd.org/papers/ven05-espie/

regards,

Juan Natera

Reply | Threaded
Open this post in threaded view
|

Re: Why Perl (a request to the developer sof the Ports-System)

Jason Crawford
In reply to this post by Miod Vallat
On 12/2/05, Miod Vallat <[hidden email]> wrote:

> > > http://www.perl.com/download.csp#srclic
> > > It is NOT gpl'ed.
> >
> > According to this:
> > http://www.openbsd.org/cgi-bin/cvsweb/src/gnu/usr.bin/perl/README?rev=1.8&content-type=text/x-cvsweb-markup
> > it is GPL'd.
>
> According to this very same file, it is not. It is dual-licensed, which
> is VERY different from being GPL only.
>
I didn't say GPL ONLY, I was just pointing out that it's wrong to say
it's GPL'd. And the fact that it's in the gnu directory of OpenBSD
would suggest to people that OpenBSD seems to choose the GPL license
for distributing perl.

Jason

Reply | Threaded
Open this post in threaded view
|

Re: Why Perl (a request to the developer sof the Ports-System)

Reid Nichol
In reply to this post by Sebastian Rother
--- Sebastian Rother <[hidden email]>
wrote:

> I scrited with pdksh all the time lon for now.
> Now I'm interested into learning another
> Scripting-Language.
>
> I can't decide between Perl and Python.
> Perl has a lot modules but it's GPLed.
> Python on the other hand is under a BSD-compatible
> License and has less
> modules.
>
> I would like to know some "facts" why Perl is in the
> base system on a
> BSD even Python is a BSD-licensed alternativ. Does
> it have some
> advantages I don#t know?
>
> I read a lot papers about both languages. Also
> CS-related Papers but I
> can't decide.
>
> I would be happy if some developers would tell me
> why they prefere Perl.
> Even if the answer would be: It's more common or: It
> existed at first.
>
> Kind regards,
> Sebastan
>
>

My recommendation is to stop reading the CS-related
papers and start poking around with the code.  There
are tonnes of tutorials for both languages that will
help you in this endeavour.

You're also going to have to think about what you are
going to use it for.  A language is something of a
tool.  You _can_ get the job done with pretty much any
language, but some are better than others for certain
jobs.  ie parallel. You wouldn't want to dig a
foundation of a house with a screw driver.  So, Perl,
Python or neither might be the one for you.

But, keeping it restricted to Python/Perl.  There is
also the esthetic quality of the language.  I find
Python *far* more pretty than Perl.  I also find
Python *far* easier to code and read than Perl.
Though I'm certian someone, somewhere will disagree.

I'm also not certain as to why the license of the
language interpreter is coming into play.  The code
you write is yours, and Perl's or Python's license is
rather moot.  That is unless you plan to embed the
interpreter.

IMO, the more languages you know (and I mean actually
know, not just familiar with), the better programmer
you are, the better you can get the job done.  You
really should be learning both.  Just start with the
one that'll be more useful to you right now.

What is it that you wanted to accomplish?

best regards,
Reid Nichol

"We're in a giant car heading into a brick wall at 100 miles/hr and everybody's arguing about where they want to sit."
-David Suzuki
Just $16.99/mo. or less.
dsl.yahoo.com

Reply | Threaded
Open this post in threaded view
|

Re: Why Perl (a request to the developer sof the Ports-System)

Reid Nichol
In reply to this post by Sebastian Rother
--- Alexander Farber <[hidden email]>
wrote:
> On 12/2/05, Reid Nichol <[hidden email]>
> wrote:
> > --- Sebastian Rother
> <[hidden email]> wrote:
> >
> > What is it that you wanted to accomplish?
>
> Just talk ;-)
>

I know this is just a poke, but it does bring up a
point about an ambiguity in my phrasing.

I meant what needs to be done programmatically.
Wasn't trying to start anything.


best regards,
Reid Nichol

"We're in a giant car heading into a brick wall at 100 miles/hr and everybody's arguing about where they want to sit."
-David Suzuki
Just $16.99/mo. or less.
dsl.yahoo.com