Live data from Hacker News

Learn Perl in about 2 hours 30 minutes

qntm.org

21–30 of 111 posts

Re: Learn Perl in about 2 hours 30 minutes

#21

Earlier quoted context omitted.

Not just an overview but something where you pick the languages you know and it shows you side by side examples doing the same thing. I know there's a site that does that (can't remember the name) but having it side by side with a great overview like this would be awesome.

Perhaps you're thinking of PLEAC? http://pleac.sourceforge.net/ Or perhaps Rosetta Code? http://rosettacode.org/wiki/Main_Page

Rosetta Code's the one I was thinking of, but I really dislike their structure - I never want to see how to do something in dozens of languages, almost all of which aren't relevant to me.

What I would love to see is:

1) select language you want to learn

2) select languages you already know

3) you get a cheatsheet like the OP that goes through all the basics (and maybe even more detailed), and all the code samples are changeable ala MSDN where you click "C#" or "VB.NET" or whatever to see the code in that language: http://msdn.microsoft.com/en-us/library/system.drawing.bitma...

Re: Learn Perl in about 2 hours 30 minutes

#22
post #2

not mentioned in the article is that apparently Moose is a really good OO system for perl, but (in my opinion) about 10 years too late.

How is it too late? Ten years ago, significant pieces of Moose did not exist anywhere . You can make the argument that if Perl 5 had had a better OO system not borrowed from Python, Moose might not exist now. That may be true in part, but I suspect significant pieces of Moose would still have to exist.

[deleted]

Re: Learn Perl in about 2 hours 30 minutes

#23
post #2

not mentioned in the article is that apparently Moose is a really good OO system for perl, but (in my opinion) about 10 years too late.

How is it too late? Ten years ago, significant pieces of Moose did not exist anywhere . You can make the argument that if Perl 5 had had a better OO system not borrowed from Python, Moose might not exist now. That may be true in part, but I suspect significant pieces of Moose would still have to exist.

I think it's 'too late' in the sense that Perl may have lost some developer share b/c people started looking elsewhere for direction - and Moose hasn't been strong enough a reason for them to come back.

(said as someone who used and advocated Perl in production for 12+ years but no longer actively uses it)

At one point Perl was the golden child of dynamic website development. It was really attractive to both developers and business types because of the productivity increase over other technologies - you could ship faster (which is what often counts most). It has other viable competitors in that space now. Devs have a limited amount of time to invest in any technology - once they've reached a certain threshold of investment getting them to switch is nigh impossible (see also language flame wars - which are about that threshold more than any real differences between most languages).

Re: Learn Perl in about 2 hours 30 minutes

#24
Perl rocks, I can testify to this: http://4.bp.blogspot.com/_Vtq6sCdzyKs/TK8Fooqqt9I/AAAAAAAAAG...

I built a 2D mmorpg using Perl and Erlang. The languages a lot of people whine about when it comes to syntax. Syntax is the LAST thing I had to worry. I'm really happy that I chose those two languages.

Re: Learn Perl in about 2 hours 30 minutes

#25
Nice concise writeup. The only important thing he missed as far as I can see is that the '..' operation can create anonymous arrays of sequences of characters too so 'a' .. 'z' gives you an array of all the letters between 'a' and 'z'.

Re: Learn Perl in about 2 hours 30 minutes

#26
post #4

Earlier quoted context omitted.

I personally found that I didn't need Perl at all. I am a bioinformatics programmer/scientist and Perl was the first language I learned. I find that whatever I can do in Perl I can do with bash/awk/sed--and whatever I can't do with bash/awk/sed I can do in Python. I've never been happier.

Perl's advantage over bash/awk/sed is that you can test, organize, and maintain code more effectively. This may not matter if you are programming to solve tiny unrelated problems, but it's a waste of effort if you are doing similar things frequently. Python is basically Perl but with different syntax, libraries, and community.

Out of curiosity, what do you consider to distinguish one Turing-complete language from another aside from those three traits?

Re: Learn Perl in about 2 hours 30 minutes

#27
I've been working with Perl programmers for just about ten years now and the one thing I've sadly learned is that while many folks claim to know Perl, but only a small group can do it well. (although granted you can apply this reality to any other programming language)

Re: Learn Perl in about 2 hours 30 minutes

#28
post #16

Over the past week I've read "Modern Perl", and will finish it later today: http://onyxneon.com/books/modern_perl/ The ebook/PDF edition is free! It's a great book for learning (modern) Perl basics if you're already familiar with programming concepts and another language like JavaScript (which is where I'm coming from). Actually, I think the knowledge and best-practices gleaned from the book will help to make me a be…

Were you previously a Perl programmer at all? And are you learning it for any particular purpose?

I've always wanted to give Perl a go but can't find something I want to use it for.

Re: Learn Perl in about 2 hours 30 minutes

#29
Sam, you've certainly made an enemy out of every member of the Perl community with this sarcastic and incomplete post.

Once you've gotten through OReilly's beginner Perl books and "Programming Perl", if you truly want to learn how to scale Perl in the enterprise, read Damian Conway's Object Oriented Perl. Once you can write solid consistent OO Perl, read "Apache modules with Perl and C".

Re: Learn Perl in about 2 hours 30 minutes

#30

I do wish he had mentioned the smart match operator ~~ as it nearly eliminates the confusion between EQ and ==. Of course, if you're dealing with legacy code, then you still need to understand both (or all three), but new coders might be well advised to start with smart match.

Smart match is undergoing revision because, frankly, it's too smart. I don't mind that he left it out, and I'm one of the core devs.
Post reply on HN