News for hackers. Stuff that matters.
Re:Is Perl 6 Being Renamed? by petre on Thursday August 29, 2019 @11:38AM (#20830445)
Yeah too bad it's slow. I write Perl 5 code at work on a daily basis and really wanted to like Perl6. Too late, too slow.
Re:Is Perl 6 Being Renamed? by 6thaccount2 on Thursday August 29, 2019 @12:36PM (#20831057)
Lizormato and some other folks have put in hundreds of performance fixes...I think these things just take time. The language might have been in development and design since the 90's, but it only just got to 1.0 or a "stable release" in 2017 I think. I'm surprised Larry Wall hasn't written a Perl6 book yet. Plenty of other authors have, but I was really looking forward to something from him or Damien Conway.
Re:Is Perl 6 Being Renamed? by petre on Thursday August 29, 2019 @04:06PM (#20833094)
I've installed just about every release since 2017. It's a nice language but still slow and lacking library support. The best thing about it is probably the rational math.
Re:Is Perl 6 Being Renamed? by 6thaccount2 on Thursday August 29, 2019 @05:28PM (#20833896)
Thanks for the information!

Yea... libraries are always good (especially for math and analysis), but I find that powerful languages need far fewer libraries to get things done. APL can do something with a few characters that might commonly be implemented as a lengthy function or library in some languages.

Windows Powershell can surprisingly do a lot of what Perl 6 can do and people mostly understand the limitations. You can automate processes, build your own DSL, have full OO support, full .NET interop, concurrency, you can pipe data around kind of like with FP...etc. It doesn't have some of the more perlish features though.

Re:Is Perl 6 Being Renamed? by 6thaccount2 on Thursday August 29, 2019 @05:22PM (#20833829)
Some things are already significantly faster, but there are other common operations that are still slower.

I wonder if the JIT will interfere with scripts where startup time is not acceptable?

Re:Is Perl 6 Being Renamed? by petre on Friday August 30, 2019 @12:07AM (#20835906)
I did some tests for prime number crunching. For example the C-style loop statement is faster than Perl's own foreach. Perl6 was the slowest of them all while the fastest was LuaJIT. The whole code is two loops with a bunch of multiplications and additions, an array push, loading a hash and looking up values in it.

https://news.ycombinator.com/item?id=16720027

Re:Is Perl 6 Being Renamed? by colomon on Friday August 30, 2019 @08:23AM (#20837830)
This seems like a very odd standard to use? I understand that you wanted to compare performances of different languages, that's great.

But if you actually wanted to get the job done idiomatically, the code is one short, simple line of Perl 6. The performance, while admittedly slower, is within the same order of magnitude as your Perl 5 version.

To me, this is the magic of Perl 6. Sure, if you want to use 16 lines of loopy integer-crunching code to calculate the first N primes and you care about speed, Perl 6 should not be your choice. On the other hand, if you'd prefer to say

  (1..$N).grep(*.is-prime) 
and get the answer back in reasonable speed, Perl 6 is perfect.
Re:Is Perl 6 Being Renamed? by petre on Sunday September 01, 2019 @12:20AM (#20850463)
It's just stuff that I use daily in normal code, so this benchmark pretty much serves the pupose very well: it uses mundane operations, also uses memory, one can adjust it by raising the bar 10x times, so the actual algorithm takes several orders of magnitude longer than the JIT penalty. In fact most of the interpreted languages would pretty much crunch for minutes at 10⁴, while Go, Crystal, D and Rust would take seconds or tens of seconds. Perl6 is basically stuck there forever and at the other end of the spectrum are Node and Dart. LuaJIT would run out of memory at that figure, otherwise it's among the fastest.
Re:Is Perl 6 Being Renamed? by 6thaccount2 on Friday August 30, 2019 @02:12PM (#20841051)
That is impressive!