Live data from Hacker News

Why I’m Learning Perl 6

evanmiller.org

1–10 of 380 posts

Re: Why I’m Learning Perl 6

#2
Read the article, very informative. Pleasantly surprised to find out that it doesn't mention at all language traits like syntax, but focuses on the features of Perl6's underlying VM, specifically MoarVM.

Re: Why I’m Learning Perl 6

#3
Crystal (http://crystal-lang.org) has fibers and channels. Current implementation isn't multi-threaded but it's being worked on. So you'll get that concurrency + nice syntax + types + a wonderful stdlib.

EDIT: as seen in other responses, options abound: Python 3, Elixir, D, Dart and more all have built-in concurrency primitives, not to mention that discarding nodejs because of "callback hell" is at this point laughable.

Re: Why I’m Learning Perl 6

#4

Crystal ( http://crystal-lang.org ) has fibers and channels. Current implementation isn't multi-threaded but it's being worked on. So you'll get that concurrency + nice syntax + types + a wonderful stdlib. EDIT: as seen in other responses, options abound: Python 3, Elixir, D, Dart and more all have built-in concurrency primitives, not to mention that discarding nodejs because of "callback hell" is at this point laugh…

Not sure about channels but D has fibers. It is one reason / benefit of why vibe.d[0] was made.

[0]: http://vibed.org/features

Note: Vibe.d is a web frameworks as well as a networking stack for D. If you're even remotely curious about D or do any web development I recommend you check out Vibe.d it is quite impressive (at the very least to me).

Edit:

There's apparently jin.go / Go.d:

https://github.com/nin-jin/go.d

Re: Why I’m Learning Perl 6

#5
> Concurrency is hard and if you want M:N thread multiplexing (i.e. WEB SCALE CODE, where application threads aren’t pinned to pthreads) your options today are precisely Erlang, Go, .NET, and Perl 6

Why mention .NET here? Async code in .NET works with a dispatcher thread (-pool) under the hood, which is nothing like the greenish threads that the other systems offer. Am I missing something?

Re: Why I’m Learning Perl 6

#6
post #2

Read the article, very informative. Pleasantly surprised to find out that it doesn't mention at all language traits like syntax, but focuses on the features of Perl6's underlying VM, specifically MoarVM.

Indeed, a GILless bytecode VM is worth a look.

Re: Why I’m Learning Perl 6

#7
post #5

> Concurrency is hard and if you want M:N thread multiplexing (i.e. WEB SCALE CODE, where application threads aren’t pinned to pthreads) your options today are precisely Erlang, Go, .NET, and Perl 6 Why mention .NET here? Async code in .NET works with a dispatcher thread (-pool) under the hood, which is nothing like the greenish threads that the other systems offer. Am I missing something?

TPL, tasks are the greenish threads you mention.

You can also just call Windows fibers directly, if feeling adventurous.

Re: Why I’m Learning Perl 6

#9
> Why is this important? Concurrency is hard and if you want M:N thread multiplexing (i.e. WEB SCALE CODE, where application threads aren’t pinned to pthreads) your options today are precisely Erlang, Go, .NET, and Perl 6.

I guess the author doesn't know about Haskell? The concurrency story for Haskell is great, and using the right library, you can literally just define types for the routes for your backend and then ask it to generate JS for your frontend.

Re: Why I’m Learning Perl 6

#10
post #2

Read the article, very informative. Pleasantly surprised to find out that it doesn't mention at all language traits like syntax, but focuses on the features of Perl6's underlying VM, specifically MoarVM.

Indeed, a GILless bytecode VM is worth a look.

GIL less yes, but not lockless. The previous perl6 VM, parrot, had lockless threads, scaling linearly per native core. MoarVM even needs to lock on hash or array accesses, which is certainly not state of the art.
Post reply on HN