Live data from Hacker News

Ask HN: Perl 6: Do you use it, how do you like it, what do you do with it?

news.ycombinator.com

101–110 of 163 posts

Re: Ask HN: Perl 6: Do you use it, how do you like it, what do you do with it?

#101
post #71
post #35

Earlier quoted context omitted.

I chuckled the first time I saw 'use strict'; at the top of the javascript file. Node.js seems to be morphing more and more into Perl 5 with every new release.

I still chuckle, and try to remind everyone in the room that: 1) Node did not invent concurrency, Hoare did (if a single person should ever be credited on this), others understood the concept some 20 years. 2) Node was originally based on a library by a very-controversial, still largely acclaimed Perl contributor 3) 'use strict' is indeed a Perl idea, but (to a certain extent) is the JSON format 4) The first JS repos…

For those wondering what library he is talking about in point 2, that is libev by Marc Lehmann. Before moving to libuv node was using libev for events and libeio for I/O

Re: Ask HN: Perl 6: Do you use it, how do you like it, what do you do with it?

#102

I worked on Perl 5 projects professionally for about 15 years, then switched to a new job that uses Node.js. I enjoyed coding in Perl 5, but it was hard to find and retain Perl 5 developers. Our later hires preferred to code in C#, Python and Ruby-- This was before Node.js took off. Looking at language trajectories on http://modulecounts.com/ The momentum that JavaScript has compared to Perl is amazing-- CPAN growth…

Things to consider: Perl developers would never bother to upload something as trivial as left-pad to CPAN (someone did it to mock node developers but that is a different story)

and the code quality of modules in CPAN is usually higher.

Re: Ask HN: Perl 6: Do you use it, how do you like it, what do you do with it?

#103

I worked on Perl 5 projects professionally for about 15 years, then switched to a new job that uses Node.js. I enjoyed coding in Perl 5, but it was hard to find and retain Perl 5 developers. Our later hires preferred to code in C#, Python and Ruby-- This was before Node.js took off. Looking at language trajectories on http://modulecounts.com/ The momentum that JavaScript has compared to Perl is amazing-- CPAN growth…

We should be careful when comparing the growth or package counts of CPAN and npm. While conceptually similar, they're still very different from one another.

A lot of the npm growth is just the JavaScript ecosystem catching up to where CPAN was ages ago.

Then there are the npm packages that add functionality that's typically included by default with Perl, so there would never really be a need for equivalent CPAN modules.

I think there is much less duplication within CPAN, while it's not unusual to find several similar npm packages that more or less do the same thing.

CPAN modules also tend to be larger and include more functionality, while it's not unusual for npm packages to include just a single function, or otherwise limited functionality. Sometimes several npm packages are needed to approximate the functionality of individual CPAN modules.

That module count graph should perhaps even be treated as worrying. Npm is clearly an outlier compared to every other package management system listed. There's not much suggesting it's inherently better than all of the other systems, either. So it's likely more negative factors, such as an excessive need for functionality, and many duplicate packages, and unreasonably small packages, and so on causing such inflated numbers.

Re: Ask HN: Perl 6: Do you use it, how do you like it, what do you do with it?

#104
post #97
post #89

Earlier quoted context omitted.

I can't think of a single capitalized keyword. Unless you mean capitalized built-in classes, or the infix meta operators. Certain parts are faster than Perl 5, for example this finds the sum of a range in less than a millisecond. ( of course it cheats by calling the sum method on the Range object ) my $sum = [+] 1..100000000000000000000000; That was the syntax for a left fold using the infix numeric addition operator…

Perhaps worth another look again. I remember 'Int', '.WHAT', etc. from some presentations and that stung in my eyes a bit.

Perl 6 makes careful use of letter case to convey useful information.

If it's in ALL CAPS then it's drawing some attention to the fact that something VERY UNUSUAL is going on.

For example, `WHAT`, `HOW` etc. are special compiler macros, not at all ordinary routines. Fortunately there's little or no need to use these in typical Perl 6 programs.

Another example are the "phasers" CATCH, LEAVE, UNDO, etc. These are unusual because they are executed according to execution phases rather than the sequential order of code.

Another convention is use of initial caps. All built in object type names use initial caps. Hence `Int` for the arbitrary size integer type. (Use `int` for the native machine oriented alternative.)

This all may sound weird but I find it works well for me in practice.

Re: Ask HN: Perl 6: Do you use it, how do you like it, what do you do with it?

#105
As a perl5 programmer of 5 years, I've branched out. In terms of professionally this means mostly into Ruby but a little bit Java and the occasional JavaScript.

Perl5 is a fine language that is over-attacked, and neat stuff is still done in it. Ruby as a language is better (but more subject to hype and so more often overrated)... and I'm confident that Perl6 is full of neat stuff. I wish it the best. And I will take any of these languages over Java for most problems I've faced.

But if you stick with too much Perl for too long you run a serious risk of being typecast as a "Perl guy" familiar only with dated languages, fairly or otherwise, and can expect a hard time finding the sort of jobs you want in the future, which is a pity. (Which isn't to say you won't find jobs, just that the pool of jobs will lean towards "maintain legacy code with no chance to refactor make your time" and "build engineer".) This is why I branched out in the first place.

My next target is Elixir (and then by extension, Erlang), narrowly winning out over Scala, with Go/Rust/OCaml trailing behind a little. I reckon Scala is probably more practical, and surprisingly popular in Europe, but I like working with a "reliability" mindset more than not and therefore forecast that I'll like the tools and opportunities in Elixir better. I've barely started but my initial reaction to what I've seen is quite positive.

- But at some level, all that's just me, and you shouldn't take lessons from my experience nearly so much as it should prompt you to think about your own experience and what you want out of programming as a hobby or as your career.

Re: Ask HN: Perl 6: Do you use it, how do you like it, what do you do with it?

#106
I wrote up a tutorial on Perl 6 and tried to get it more widely known there are a lot of neat features in it and it looks far better designed than most languages:

https://www.codementor.io/perl/tutorial/how-to-use-json-in-p...

However, most people have dismissed it because they think Perl 5 is dead and anything using Perl should be replaced with Python or Ruby or Go or Rust or some other language.

The hacker flavour of the language has been preserved and that's the niche it would fill for me...if I didn't have to basically do frontend web all day.

Re: Ask HN: Perl 6: Do you use it, how do you like it, what do you do with it?

#107
post #104
post #97

Earlier quoted context omitted.

Perhaps worth another look again. I remember 'Int', '.WHAT', etc. from some presentations and that stung in my eyes a bit.

Perl 6 makes careful use of letter case to convey useful information. If it's in ALL CAPS then it's drawing some attention to the fact that something VERY UNUSUAL is going on. For example, `WHAT`, `HOW` etc. are special compiler macros, not at all ordinary routines. Fortunately there's little or no need to use these in typical Perl 6 programs. Another example are the "phasers" CATCH, LEAVE, UNDO, etc. These are unusu…

I hope these things are explained well in the upcoming books. Me, a seasoned Perl 5 programmer that doesn't participate much in the Perl 6 community find these things a bit strange and visually a turnoff if you get what I mean. Also angle brackets usage no auto quoting was something I remember not liking too much.

Note that this has more to do with familiarity and syntax than the new features etc. I very much hope for a "Java killer" in the Perl family but that means performance must be a first priority.

Thanks for explaining, at least I can view examples with a little more understanding of the syntax choices going forward.

Re: Ask HN: Perl 6: Do you use it, how do you like it, what do you do with it?

#108

I worked on Perl 5 projects professionally for about 15 years, then switched to a new job that uses Node.js. I enjoyed coding in Perl 5, but it was hard to find and retain Perl 5 developers. Our later hires preferred to code in C#, Python and Ruby-- This was before Node.js took off. Looking at language trajectories on http://modulecounts.com/ The momentum that JavaScript has compared to Perl is amazing-- CPAN growth…

We should be careful when comparing the growth or package counts of CPAN and npm. While conceptually similar, they're still very different from one another. A lot of the npm growth is just the JavaScript ecosystem catching up to where CPAN was ages ago. Then there are the npm packages that add functionality that's typically included by default with Perl, so there would never really be a need for equivalent CPAN modul…

Furthermore, AFAIK NPM is more than a module manager for Node.js, IIRC many use it for CSS and other languages.

Re: Ask HN: Perl 6: Do you use it, how do you like it, what do you do with it?

#109

I considered Perl 6 for a deep dive at the end of 2015...just as it was 'officially released'. The difficulty for me was the state of the documentation ecosystem. No dead-tree books (but for one that was written more than a decade earlier) and a lot of information ad hocked up in blogs and slides. I just felt like I could not really get a handle on it...While googling 'Perl 6' sort of worked, 'Perl 6 how do I ' type…

FWIW, a huge amount of work has been done to docs in the past year. There's even a dead-tree book available now ( https://deeptext.media/perl6-at-a-glance/ ), with 3 more slated to release later this year.

I knew there was work in progress because I've made a similar comment in the past few months. I'm not in hurry which is perhaps in good alignment with Perl 6...A quick look at the book sample suggests it's not probably what I'd look for before starting a deep dive.

Re: Ask HN: Perl 6: Do you use it, how do you like it, what do you do with it?

#110
Everything I've seen about Perl 6, I love to death.

I just wish I had an excuse to use it. The problem is, most of the time I start a new project, I default to Python because it's what I know. I know the libraries, I know the quirks of the built-in data structures, etc. So I just go with what I know.

I really wish I had the discipline to sit down and tell myself "I'm going to write this next project in Perl 6 no matter how much time it takes to figure out how to do what I want to do".

Like, I actually just started a personal project to parse some US Census data a few days ago. I could have, and probably should have, taken the opportunity to write it in Perl 6. But I got lazy and just went with what I knew. I feel really bad about that, since from what I've seen, it sounds like a language I'll love working with just as much as Python.

Post reply on HN