Hacker Newsnew | past | comments | ask | show | jobs | submit | more cpplinuxdude's commentslogin

Let's not forget what perl was created for; it's a practical extraction and report language.

Initially it was used to extract tables from text documents, and its always had a strong focus on text manipulation and regular expressions.

Its implicit variables and syntax mean you can write very, very concise code. Yet by following stylistic guidelines of your choice, you can write code that looks sane and maintainable.

I really like the fact you can import os commands and call them as a part of the language. It makes writing scripts a breeze. In fact writing anything in perl is a breeze. Check rosetta code, you'll see Perl 6 is one of the most concise at every turn.

As much as I really like python, I find that calling system commands is a pain.. calling os.system is obviously far from great, and calling subprocess can get cumbersome.

I haven't played with perl in a while, but my past experiences with perl was always getting a lot done, with very little work.


Just to note that it's not all puppies and unicorns. There are a lot of low-level commands that are all tied up in different modules in Perl. Like having to remember where what you want falls into the File::* namespace... or maybe what you need is in Cwd.

I worked with Perl for 4 years, and while it's not the gauntlet of pain that people make it out to be, there were several annoyances (like needing to always hit the docs for that stuff).


The biggest problem I have programming Perl 5 is discovery of what the best current module is to get past the pain points of the past, and the best way I know of that is to keep current with community discussions. E.g. Path::Tiny is awesome for automating a lot of the file ops you could want to do into one simple, useful, well structured place. As soon as you're exposed to it, you'll immediately want to scrap the use of 3-4 other modules you might have been using in lieu of it. What's the best way to learn about it? Possibly reading Perl community blog posts. It's unfortunate, but with a couple decades worth of modules on CPAN, it can be hard to find the gems of the bunch without some help.


That's what the mstpan posts on http://shadow.cat/blog/matt-s-trout/ are for; I'll be doing more starting Dec 1.



Yeah, I'm aware of Task::Kensho (although I forget about it all too often). But even that is at this point more a point-in-time snapshot of what was relevant a year or two ago. In most cases, they are still relevant and some of the best choices, but there are new items that aren't on the list (e.g. Path::Tiny) that I would argue really should be.

I understand it's a trade off. We don't have a large standard library in Perl like Python does, and that means there's a bit of searching required to find what to use, but that's often a benefit as well as a drawback. Would we have Path::Tiny if we had something that provided some but not all of the capability, and not as well? Would we have DateTime (or would it be popular) if we had a core DateTime-like module that was problematic, but mostly worked? Part of the beauty of having a small core set of libraries and an large and vibrant set of extended libraries is that the constant churn leads to newer and better things. Really what I'm lamenting, is that while there are these benefits to the churn, it still does lead to some painful situations where you find you've been using a poor choice for your needs just because you didn't know of the better choice that was out there. It's acceptable if it leads to DBIC, DateTime, Path::Tiny, etc, but it still sucks some times.


I'm right there with you. Having a small core has several drawbacks.

Having a LARGE core does as well, and mostly that any modules in the Perl core seem to also have their API and features frozen in time. Even if those features and API are not so good - it's in core! So, there's a reason to keep them how broken they are for backwards-compatibility sake.

I've also felt the burn of a core module that's then removed, and the new maintainer now going absolutely wild changing things. I understand exactly why they want to change things, and would not disagree with their ideas in a vacuum, but it causes great grief to me when I'm supporting apps that relied on in-core modules that have been upgraded out of core.

I wanna say that this problem is being used as a lesson for Perl 6 - that the core for the, "official/main/whatever" distro is going to be kept very spartan, but it's going to be encouraged to build upon that distro for your own Perl 6 releases. So, if you want the, "Web Framework" release, it'll come with all the bits and pieces you need to get that going - however editorialized that selection will be.

Moritz talks about this concept, here:

http://perlgeek.de/blog-en/perl-6/how-core-is-core.html

Although this post is pretty old, and I'd hate to say that their line of thinking now.


Note, however, that Perl6 is a completely different language with a different set of standard libraries and ecosystem and pros-and-cons. You'd be as well off comparing Perl6 to Ruby as you would Perl5.


I only used it for small scripts. I'd think twice before using it for anything more significant.

What did you use it for, if I may ask? What how big a project are we talking about?

I would have thought hitting the docs wouldn't be a part of the annoyances list. Did you feel you had to hit the docs more than with any other language?


> As much as I really like python, I find that calling system commands is a pain.. calling os.system is obviously far from great, and calling subprocess can get cumbersome.

Have a look at the 'sh' python module to ease your pain: http://pypi.python.org/pypi/sh


I think having to use/install something is precisely the pain people are talking about.


Especially for the kind of glue scripts we're talking about, having to install new language packages across a heterogeneous environment consisting of thousands of boxes is not an easy option.

For me the greatest advantage of the Perl5/shell integration is that you can use Perl's sane data structures, flow control, and code organization features instead of their bash equivalents which have endless pitfalls and can be less portable than basic Perl5.


That's useful, thanks.


It depends on many factors, such as experience, learning abilities, and how well people work together. Speaking for myself, I can start becoming useful within my first morning using a new language or technology. Then, given that I'm working with people who enjoy sharing their knowledge, I can be up to speed with them in a week.

What I tend to dislike with the concept of prior knowledge before being let to work on something, is that in the vast majority of cases, once you join a team that has such a requirement, you notice their knowledge acquisition rate is currently flat; they've become stagnant themselves and are generally insecure about what they know and don't know; it's usually people with a currently flat learning curve who assume others need to know a technology prior to working on it; they're just projecting their static mindset onto others.

Some people eat new programming languages for breakfast if they have to. Deal with it?


> Some people eat new programming languages for breakfast if they have to. Deal with it?

Yeah, I understand that because I'm one of them. And this attitude is fine if you're a junior or mid-level developer; I usually just hire best-athlete for those positions for that reason. But if I'm looking for a senior developer, I need someone who has enough domain knowledge that they can come in and lead other people in using that technology. I'm not talking about small things, but if I'm hiring a senior developer for a data services group that uses Cassandra on the back-end, I want someone who at least has some experience building data services at scale with Cassandra (or some other schema-less NoSQL database tech). They need to be able to catch the mistakes that junior guys make.

It's also different if I'm starting something from scratch - you usually have enough of a runway that someone can develop the expertise along the way. But saying language and technology are irrelevant is just naive: the more senior we get, the more we have to specialize (well, either that or eject to the management track). There are simply too many technology stacks out there to do it otherwise.


Agree with all you say. I can pick up languages with ease, but my real value in a team is the baggage of burns I had fighting against the Java ecosystem.

Some day ago one dev here had trouble getting an image parsed, and I remembered being burn by it many years prior, and indeed was an issue with the in-container initialization order of ImageIO extensions. I see this happening more and more as I grew on. As Spolsky said (but I'm sure there were others) experience is having made all the mistakes in a domain.


Or how to have 1984 running in your web browser. :)

But some people don't care about their privacy any longer, because, well we probably have none at this point anyway.

So in for a penny, in for a pound.

Edit:

Consider putting something about privacy right at the top of the page, if such a feature exists. e.g all bookmarks are encrypted, and only the user has the key, or whatever.


Will do, thanks!


Quitting for a week, and quitting forever are two different things. Life off facebook has its own challenges too. How does a 1 week study draw such categorical conclusions?


I got lost a the word "space-age". I don't mean to be the pedantic one. Sorry. But why would an outlet like the NYTimes use a word that means 1976 when they don't mean it. Meh.

returns to article


Because it's a valid and appropriate term? Here's Oxford Dictionary:

    space-age, adj. very modern; technologically advanced: a space-age control room.


Unfortunately I agree with the comment; please rename.

Other than that: fantastic work.


"with a little bit of mathematics too" how wonderfully understated.


He actually said "with quite a lot of mathematics too"


I feel like buying some stock in Tesla to make a contribution toward our future, not in the hopes of making money.

If these shares make money, that will be a bonus.


If by "contribution toward our future", you mean giving money to Tesla, buying their stock in the secondary market (i.e. the "stock market") doesn't transfer any money to them. You'd have to get in on the IPO or a secondary offering to have that effect.

However, supporting the existing stock price could have an effect - typically the market price influences the price of a secondary offering like this.


That's always been a point of confusion for me with respect to the idea of 'ethical investment funds'. Buying shares in solar companies on the market, for example, just transfers money to people who have elected to get out of owning solar. Why would it be 'ethical' to give those guys money? What if they then take that money and go invest it in oil?

As you say, the market price has an influence on secondary offering prices, so it affects a company's ability to raise further funds, but buying stock secondhand seems like a fairly indirect way of supporting a company's goals. Just like if you enjoy a band's music, you don't demonstrate your support by buying second hand records...


If Tesla offers new stock, that's additional money in their pocket.


The "secondary offering" part of my comment already covers this.

It also worthwhile to note that the underwriters will take a cut/percentage of whatever goes to the issuing company.


Yeah me too, but not really. You make absolutely no difference when you buy a few shares of stock. Can you buy the car? I believe consumers can make a big difference by helping new technologies. (e.g buy LED lights, hybrids, EV's). We can also help by supporting Kickstarter projects that make a difference. VR was Kickstarted. Maybe home solar or robotics will be next.


I've ordered a Model X not because I need a fancy car, but to contribute towards Tesla revenue (I've been saving up specifically for this since I bought Tesla stock when they IPOd years ago).


Yeah me too, but not really. You make absolutely no difference when you buy a few shares of stock. Your shares matter in proportion, it may be a small number, but it isn't zero. A hundred thousand one dollar bills are worth just as much as a 100,000 dollar check, you can't just round the dollar bills down to zero.


$100,000/$30,000,000,000 = 0.00


If that's the case, this is the rare case for your money to actually go to the company. Unless you're buying shares "directly" from the company (ignoring the middle-man for now), the company never sees your money. So if you want to do that, now's the time (or if you think they'll have another public offering in the future, wait, I guess).


Once a stock is trading on the stock market, buying the products of a company is a better way to support them then buying their stock IMHO.

When you buy Tesla stock on the stock market Tesla gets no money from you - you are actually buying the stock from another entity independent from Tesla. Tesla only receives money when the stock is sold for the first time, by the Tesla Corporation to an outsider.


Somehow I am skeptical that you actually believe this.


Some people just roll Lawful-Good in life


reminds me someone had put together a way of entering directions into google maps, then seeing a 3D view of the step by step navigation. Anyone remember what the url was for that?


I'm a slow reader. As a result I am extremely selective with what I read. This has probably turned out to be one of my greatest assets to date.

Also don't feel bad for forgetting an entire module. It means you watched it passively, rather than actively tried to solve problems using the knowledge you had acquired.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: