Live data from Hacker News

Why I’m Learning Perl 6

evanmiller.org

201–210 of 380 posts

Re: Why I’m Learning Perl 6

#201
post #71

Earlier quoted context omitted.

Afaik erlang has a lock as well - in fact I think most green thread implementations do: what you want/need at a minimum is one os process or thread per cpu core that works as a scheduler and then some form of (co-operative) scheduling with only user-mode/low-overhead context switching?

That doesn't sound right re: Erlang; its everything-is-immutable model is supposed to avoid the need for a GIL. Erlang processes are also preemptive, so there's no possibility for a process to lock up the whole VM (unless it calls into a long-running NIF, but native code is always dangerous in a "crash BEAM if you don't get it right" kind of way).

IIRC, Erlang uses shared mutable state internally, though its not exposed, so it needs to lock around accesses to that, but this isn't equivalent to the Python GIL.

Re: Why I’m Learning Perl 6

#202
post #185

Earlier quoted context omitted.

My main problem with Haskell was not the pure, funcational part. It was the side-effect-laden part. If I were ever to go there again, I would probably give OCaml a try. It seems to offer many of the benefits of Haskell, while also offering "a way out" into the familiar world of objects and side effects. But don't hold your breath, I don't think I will get there this year.

What do you mean by the "side-effect-laden" part? Did you find yourself writing lots of side effecting code because of Haskell (which seems weird)? Or Haskell just wasn't a good fit for a project that was full of side-effecting code? If it's the latter, I can definitely tell you that part of the zen of Haskell is firming up the boundaries between side-effecting code and pure code -- for example, IMHO the better you g…

Writing a purely functional function like, say, factorial, or the Ackermann function, was no problem at all.

Writing a "purely" side effect-based one, say, read a string from stdin, parse an age, and say, "What, you are %d years old?!?! Wow, you're old!" completely eluded me.

Maybe it was just that all the tutorials I encountered sucked. Maybe I am just too dumb for Haskell. Given that I currently really love Go, I kind of suspect the latter. But who knows? I'll find out next year, I guess. ;-)

Re: Why I’m Learning Perl 6

#203

Earlier quoted context omitted.

It's _different_. But working for a few years with Perl 5, it really grew on me. It could use a good "Perl: The Good Parts" book, I guess. I haven't looked at Perl 6 yet, don't know if that's better or worse. Too many other things to do, and I don't think I'll ever work with Perl professionally again, that ship has probably sailed.

Higher Order Perl might serve for that. (I haven't really read any other Perl books.)

And you can read it for nothing, if you are interested:

http://hop.perl.plover.com/book/pdf/HigherOrderPerl.pdf

Re: Why I’m Learning Perl 6

#204
post #88

Earlier quoted context omitted.

PyPy has a GIL : http://doc.pypy.org/en/latest/faq.html#does-pypy-have-a-gil-...

Ok, but ZipPy, Jython and IronPython do not.

Jython project's latest release and news post was mid-2015; the project would seem to be pining for the fjords, so to speak.

Jython and IronPython are both limited to Python 2.x, ZipPy is WIP without a stable release.

Re: Why I’m Learning Perl 6

#205
post #65

I hate perl6. I hate it because I tried to get involved in the project early on, and it led me down the Haskell rathole. I don't know what Haskell looks like today, but a decade or more ago it was the hardest language to pick up that I had ever experienced. It was as if I had a solid background in latin languages and I was trying to pick up Chinese based on a handful of tutorials written by a tourist on the back of a…

> and it led me down the Haskell rathole. was this through pugs? To this day, I think the days of pugs development and "commit bit to everyone" where the most fun I've seen in open source.

It was pugs, and it was pretty fun.

Re: Why I’m Learning Perl 6

#206
post #18

Can anyone recommend a good book on Perl 6? Are there any (even bad ones)? Right now I feel the major reason that keeps me from investing time in Perl 6 - besides adoption by distros - is the lack of a good book, like the Lama and the Camel book for Perl 5. It's kind of frustrating after having waited so long.

> adoption by distros This has improved, and I think most distros now ship Rakudo (Perl6 on MoarVM). At least: Debian, Ubuntu, Fedora, and Arch do.

I just checked on my desktop (openSUSE Tubmleweed) - it has both MoarVM and Rakudo. Fun times lie ahead! :-)

Re: Why I’m Learning Perl 6

#207
post #88

Earlier quoted context omitted.

Ok, but ZipPy, Jython and IronPython do not.

Have Jython and IronPython reached compatibility with Python 3 yet? Last I checked they hadn't, or it was still in alpha.

Yes, but ain't nobody really using Jython or IronPython. Yes some people are, but I'd bet a very small group of the greater Python whole. You also introduce incompatibilities that way. Perl6 has this in the base implementation, so I don't have to switch to a lesser maintained distribution.

Re: Why I’m Learning Perl 6

#208
post #123

Earlier quoted context omitted.

Have Jython and IronPython reached compatibility with Python 3 yet? Last I checked they hadn't, or it was still in alpha.

I don't know, but Python 3 still isn't relevant to many people. For example, I have to explicitly install 2.7 to be able to use Cocos2d-x build scripts.

Someone posted an article awhile back...people are moving over by a significant amount now.

Re: Why I’m Learning Perl 6

#209
post #65

I hate perl6. I hate it because I tried to get involved in the project early on, and it led me down the Haskell rathole. I don't know what Haskell looks like today, but a decade or more ago it was the hardest language to pick up that I had ever experienced. It was as if I had a solid background in latin languages and I was trying to pick up Chinese based on a handful of tutorials written by a tourist on the back of a…

Perl6 is no longer implemented in Haskell on the backend. I think the old parrot VM was, but MoarVM is in C. On the bright side, a lot of cool FP concepts made it into P6 as a result of the original Haskell backend, so useful cross polination happened. Even better, you can do FP stuff in a much easier to understand way and you can also mix in OO when needed or relevant.

Re: Why I’m Learning Perl 6

#210
post #138

Earlier quoted context omitted.

> The idea was laudable but it would have required buy-in from the other communities But imagine how cool it would have been - write a class in Python, sub-class it from Ruby, use that subclass in a function written in Perl, call that function from Lua code... Okay, I see it now. It was just too awesome for its time. Maybe in a hundred years or so...

JVM is now becoming what Parrot was intended to be with Graal/Truffle.

I guess so.

But without Perl 5 and Perl 6 it is just not going to be the same. (Pouty face)

Post reply on HN