Live data from Hacker News

Why Did I Choose Perl When Building Crowdtilt?

dsog.info

41–50 of 143 posts

Re: Why Did I Choose Perl When Building Crowdtilt?

#41

"As far as I know, Perl is one of the only languages that can evolve via 3rd party modules." Ummm... What?! There's a long tradition creating DSLs in the Ruby community. Lisp/Scheme/Clojure have macros. OCaml has campl4. I'm sure there are many others.

I'll give you macros, but if you define DSLs as "chained methods", many languages have DSL supports. The author's talking about Perl's support for mangling the language itself through third party modules.

Re: Why Did I Choose Perl When Building Crowdtilt?

#42

The one thing I've learned as a consultant working outside the startup world, in the boring world of everyday business is just how much of the computerized world still runs on perl. I've seen some fantastically made systems and some real stinkers. In the HN echo chamber, it seems like everyone who's anyone has moved on to ruby, rails, python, django, etc. Look into the every-web. My god, it's full of perl.

I agree. It is a misconception that Perl is "dying". It powers a lot of the web. It had a bad rep a few years ago due to cryptic-looking codes that were written as a throw away code and somehow spread all over the web :). I was one of the skeptical developers at some point, but then I got hooked :). Modern Perl changes the old rep alltogether. I encourage people to write well architected, maintainable, extensible cod…

Regardless of the structure of modern usage its syntax is still very noisy for the reader. It seems the majority prefer the cleaner syntax that doesn't use punctuation to define the type of access a la BASIC.

Re: Why Did I Choose Perl When Building Crowdtilt?

#43

Earlier quoted context omitted.

Workhorses are never fashionable.

"There are only two kinds of languages: the ones people complain about and the ones nobody uses" - Bjarne Stroustrup

He was very biased; it counts for little.

Re: Why Did I Choose Perl When Building Crowdtilt?

#44

Earlier quoted context omitted.

There's a school of writing "modern" Perl, using source filters and object systems. Bare Perl is a mess but, in somewhat of a Lispy way, you can use Perl to rewrite your Perl. If none of your functions have signatures and you're manually blessing objects, your codebase will quickly turn to shit. Using a standard bits (such as Moose) to give you a consistent object system and method call syntax changes things dramatic…

This is a new fad and it undoubtedly leads to more maintainable code, but it still feels like a bad tradeoff to me: you get the verbosity of stricter languages without the benefit (compile-time errors) at worse performance than plain Perl. I'd rather write something new in Scala or Go nowdays than in strict "modern Perl" style / Moose (and I've used Perl almost exclusively for the past 13 years).

umm, verbosity?

  package Point;
  use Moose; # automatically turns on strict and warnings
  has 'x' => (is => 'rw', isa => 'Int');
  has 'y' => (is => 'rw', isa => 'Int');
  sub clear { my $self = shift; $self->$_(0) for qw/x y/}
1;

Re: Why Did I Choose Perl When Building Crowdtilt?

#45
post #42

Earlier quoted context omitted.

I agree. It is a misconception that Perl is "dying". It powers a lot of the web. It had a bad rep a few years ago due to cryptic-looking codes that were written as a throw away code and somehow spread all over the web :). I was one of the skeptical developers at some point, but then I got hooked :). Modern Perl changes the old rep alltogether. I encourage people to write well architected, maintainable, extensible cod…

Regardless of the structure of modern usage its syntax is still very noisy for the reader. It seems the majority prefer the cleaner syntax that doesn't use punctuation to define the type of access a la BASIC.

Yes, the sigils can make Perl code look noisy, especially as Perl uses curly braces and semicolons too. However, they do have a couple of nice benefits: firstly, they make variable interpolation easier (and less noisy!) than in other languages like Ruby and Python. Secondly, sigils make it easy to see what kind of data you are dealing with, obviating the need to scroll through your program to the variable declaration.

Re: Why Did I Choose Perl When Building Crowdtilt?

#46
I learned perl in the past (I'd rate myself as ~somewhat proficient~, ignoring 'new style perl'), and I like the language. That puts me in a strange place when I talk to friends: I don't know ruby nor python, but do think that perl's a nice language. A strange position to be in, by now.

That said: The do what I mean paragraph kind of reminded me of the Stripe CTF. One of the levels (5?) was vulnerable to pass parameters to a POST handler via query string. In other words: In level 5 in that CTF, if you followed one possible solution, you abused this flexibility.

So .. maybe it's not always a good thing? Including this particular reference in the article?

Re: Why Did I Choose Perl When Building Crowdtilt?

#47
post #42

Earlier quoted context omitted.

I agree. It is a misconception that Perl is "dying". It powers a lot of the web. It had a bad rep a few years ago due to cryptic-looking codes that were written as a throw away code and somehow spread all over the web :). I was one of the skeptical developers at some point, but then I got hooked :). Modern Perl changes the old rep alltogether. I encourage people to write well architected, maintainable, extensible cod…

Regardless of the structure of modern usage its syntax is still very noisy for the reader. It seems the majority prefer the cleaner syntax that doesn't use punctuation to define the type of access a la BASIC.

As a self-trained programmer who cut his chops on Perl, I find it a bit humorous that people complain about reading Perl, while every coding test at a job interview involves some five-way algorithm or other generally-arcane CS concept that CS people spend two years practicing and that the business will never use. Two forms of complexity, one valued much higher within the industry.

Re: Why Did I Choose Perl When Building Crowdtilt?

#48
post #38

I see these justifications for perl almost every time it comes up - The community, cpan, writing lots of code fast. These are good things, but it's worth pointing out that EVERY OTHER LANGUAGE DOES THAT. Ruby has gem, python has pip - modern languages have these things built in by design. Not to hate on perl, because there's things I like about it, but this article could be retitled "what I like about not using fortr…

I know of no other language that has anything like cpantesters.org. Everything that gets uploaded to the CPAN gets tested automatically on a large matrix of Perl versions and host platforms, often within minutes of the upload. Furthermore, the entirety of CPAN is the continuous integration test suite for Perl 5 itself.

Edit to add: I know why this sounded familiar! I had forgotten I wrote about it recently:

http://www.modernperlbooks.com/mt/2012/08/why-i-use-perl-tes...

Re: Why Did I Choose Perl When Building Crowdtilt?

#49
post #38

I see these justifications for perl almost every time it comes up - The community, cpan, writing lots of code fast. These are good things, but it's worth pointing out that EVERY OTHER LANGUAGE DOES THAT. Ruby has gem, python has pip - modern languages have these things built in by design. Not to hate on perl, because there's things I like about it, but this article could be retitled "what I like about not using fortr…

I use Perl for the Turing completeness.

Re: Why Did I Choose Perl When Building Crowdtilt?

#50

I learned perl in the past (I'd rate myself as ~somewhat proficient~, ignoring 'new style perl'), and I like the language. That puts me in a strange place when I talk to friends: I don't know ruby nor python, but do think that perl's a nice language. A strange position to be in, by now. That said: The do what I mean paragraph kind of reminded me of the Stripe CTF. One of the levels (5?) was vulnerable to pass paramet…

You are exactly right. But for some cases, it is a great thing. You obviously need to know when is the right time to be explicit. I remember doing the Stripe CTF and I was like, I wish all people would learn to be explicit about those parameters.

Thanks for the feedback :).

Post reply on HN