Live data from Hacker News

Why Did I Choose Perl When Building Crowdtilt?

dsog.info

81–90 of 143 posts

Re: Why Did I Choose Perl When Building Crowdtilt?

#81
post #63

Earlier quoted context omitted.

What does Perl have in that regard that Ruby hasn't? Ruby also has open classes and you can chain and modify any of the base classes, be it "String" or "Object". I don't know anything like "MooseX", but that might be because Ruby actually has a somewhat working object system.

Perl lets you add new language keywords which take effect during the parse phase.

So, basically, Perl has macros? REAL macros? Like, say, in Lisps? Could I, for example, make fully inlined merge sort, as demonstrated a couple days ago here by a post from Racket blog? Now I'm curious.

Re: Why Did I Choose Perl When Building Crowdtilt?

#82
post #47

Earlier quoted context omitted.

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.

+1 It is so hard to know that @ means array and % means a hash (key/value pair) haha.

It's not that hard to know the types of the variables you created without punctuation in the identifiers, either.

Re: Why Did I Choose Perl When Building Crowdtilt?

#83

I've had some experience with perl. While it has a lot of advantages (most of them are described in your post) it clumsily support OOP and is very hard to maintain. It's true that perl gets you going pretty fast, But once your code base reaches several hundred classes, you'll really regret ever considering it for production. As a grad student I found myself using it quite a lot for writing quick and dirty scripts for…

If the developers don't plan ahead then you'll regret whatever language you choose once the project gets big enough. Perl because it's "write once", Python because it's loose typing, C++ because it's so big and complicated, ...

Re: Why Did I Choose Perl When Building Crowdtilt?

#84
post #71

Earlier quoted context omitted.

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;

Verbosity. class Point { has Int $.x is rw; has Int $.y is rw; method clear() { $.x = 0; $.y = 0; } } :)

Perl 6 is / will be sweet :)

Re: Why Did I Choose Perl When Building Crowdtilt?

#85
post #71

Earlier quoted context omitted.

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;

Verbosity. class Point { has Int $.x is rw; has Int $.y is rw; method clear() { $.x = 0; $.y = 0; } } :)

[deleted]

Re: Why Did I Choose Perl When Building Crowdtilt?

#86

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.

It's really not that surprising when you think of how much of corporate programming is taking data in format A and outputting format B. Perl is fast and well suited to data transformations.

Re: Why Did I Choose Perl When Building Crowdtilt?

#87

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…

So I usually write Python. Perl has a similar heritage to Python and I think the two are similar in many ways (more in Rakudo). As a Python programmer, I think there is nothing wrong with liking and using Perl. I don't think you should find this uncomfortable or strange. I also think there is no clear-cut reason why you would absolutely have to switch, as long as Perl was still suiting your purposes.

Re: Why Did I Choose Perl When Building Crowdtilt?

#89
Does he think he has to justify jis language choices to others?

Maybe he's worried because someone else might have to read the code someday and they might wonder why it's Perl.

What's needed is a way to store code in an "intermediate" form that can easily be translated into whatever scripting language is desired.

Re: Why Did I Choose Perl When Building Crowdtilt?

#90

Earlier quoted context omitted.

Perl lets you add new language keywords which take effect during the parse phase.

So, basically, Perl has macros? REAL macros? Like, say, in Lisps? Could I, for example, make fully inlined merge sort, as demonstrated a couple days ago here by a post from Racket blog? Now I'm curious.

Perl doesn't have real macros. It has a pretty neat, get you most of the way there aftermarket bolt on. Kind of like its object system. Similarly, you can do a lot with it. But it ain't Lisp macros.
Post reply on HN