Live data from Hacker News

Why I’m Learning Perl 6

evanmiller.org

71–80 of 380 posts

Re: Why I’m Learning Perl 6

#71

Earlier quoted context omitted.

I'd like to know why people are downvoting this.

For Python there is no native support for threads because of GIL. You can get around this through multiprocessing etc but these are hacks

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?

Re: Why I’m Learning Perl 6

#72

> 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. Putting aside the "web scale" jokes ( http://www.mongodb-is-web-scale.com/ ), this statement is still absurd. Every major language, or at least the ones that matter for backend development, has support for thread multipl…

I'd like to know why people are downvoting this.

Probably because it treats a high-level feature (M:N threading) as equivalent to a lower-level feature (coroutines) and then compounds that by treating as equivalent languages where the former is built into the core with ones where the latter is available as a third-party library, all as a way of dismissing the value of languages where the former feature is built in to the core, and layered with scorn and derision on top of being doubly wrong.

Now, I preferred correction to downvoting, but I can easily see why others would choose downvoting.

Re: Why I’m Learning Perl 6

#73
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…

I looked quickly through the slides and saw that perl has now grammar build in the language...

Truly an interesting feature

Re: Why I’m Learning Perl 6

#74
post #28

My personal issue with Perl is how much of a mess the syntax is (10 different ways of doing the same thing), and the lack of a standard library (CPAN is not a viable replacement).

Why is CPAN not a viable replacement? It has always been perfectly viable for me.

Re: Why I’m Learning Perl 6

#76
post #25

Can Perl6 merge all of its generated VM code into one "package"? One of my favourite things about Go is that you can statically compile everything and then deployment basically becomes scp.

I find it somewhat humorous that more than 25 years on, we are effectively reverting to static linking and bundling [1].

Way ... way back in the day, the argument was it would save memory, encourage reuse, etc. While some of this may have been true, it also gave rise to dynamic library hell. Reuse was overshadowed by incompatible versions, or API changes between versions that became the stuff of legends.

This would make a great study in how the ROI was completely overshadowed by risk considerations not considered at the outset.

Of course, saving memory was a huge issue in the days when 1GB RAM was considered gigantic. So maybe the cost was worth it.

[1] https://scalability.org/2017/03/what-is-old-is-new-again/

Re: Why I’m Learning Perl 6

#77

I'll stick with Tcl if I'm going to use a glue language that has green thread like functionality and an event loop. early choices were tcl or perl: went Tcl and never looked back. As far as web development in perl..well have fun convincing everyone on the node.js and python bandwagons to move 'back' to perl. Glad it works for you.

I hadn't heard of Tcl before but it looks awesome! What do you find its ideal use cases to be?

I use Tcl/Tk from time to time and it always seems the easy choice when I need a simple GUI and also need to make an executable for Windows (which is trivial with Freewrap).

Some of the things I've written are: a simple standby order input app, a Forms/Reports compiler (sends file to server, waits for response and informs user), and a Ghostscript wrapper for merging lots of PDFs into one file.

Re: Why I’m Learning Perl 6

#78
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.

Re: Why I’m Learning Perl 6

#79
post #71

Earlier quoted context omitted.

For Python there is no native support for threads because of GIL. You can get around this through multiprocessing etc but these are hacks

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).

Re: Why I’m Learning Perl 6

#80

I'll stick with Tcl if I'm going to use a glue language that has green thread like functionality and an event loop. early choices were tcl or perl: went Tcl and never looked back. As far as web development in perl..well have fun convincing everyone on the node.js and python bandwagons to move 'back' to perl. Glad it works for you.

I hadn't heard of Tcl before but it looks awesome! What do you find its ideal use cases to be?

TCL is really great for throwing syntax errors at runtime, having no real data structures, and an inconsistent API!
Post reply on HN