zoffix222
Even an empty Rakudo Perl 6 program is a multi-threaded program, as the dynamic optimizer runs on a separate thread. I'd figure if that's possible, concurrency/parallelism would be quite a first-class citizen, not a best hope on top of something.
Especially the .hyper method that turns a regular sequence into hyper sequence that gets processed in parallel. First 5000 prime numbers:
# single-thread, takes 14.893s
put ^∞ .grep(*.is-prime).head: 5000
# multi-threaded, takes 8.853s on my 2-core box
put ^∞ .hyper.grep(*.is-prime).head: 5000Feeling a lot more optimistic about it today than a year ago. \o/
To answer some of the comments: no, this isn't satire, nor is it a marketing or advertisement piece.
I'm just having fun with the language and wrote a post in the voice of The Grinch (https://en.wikipedia.org/wiki/Grinch). It's meant to be mean. That's all there is to it. Tomorrow's article (coincidentally, also written by me), will have a more sober tone and will describe Perl 6's system of containers and variables. See if you like it more.
I'm OK if you don't like Perl 6 :) That's why we have so many different wonderful languages: everyone can find what they love. I love Perl 6. You should try it out.
Bleed commits on VM for example, recently passed Perl 5 on speed with read-a-million-line-file-and-sum-up-number-of-chars bench ( https://twitter.com/zoffix/status/895684203550973956 ).
By any chance, was it from system packages that are likely outdated? You can get up-to-date packages [here](https://github.com/nxadm/rakudo-pkg/releases) or for Windows/Mac, use [Rakudo Star](http://rakudo.org/downloads/star/). Anything older than 2017.04 is ancient and anything older than 2015.12 precedes first stable release and is likely broken.
> Now I wonder what other number systems it supports
It goes by Unicode's definition of what's a digit or a number (using Nd and No) properties. Nd chars are "digits" and can be combined. `No` chars are "Numeric other" and can't be combined; can only use them as numeric literals. [Among other things](https://docs.perl6.org/language/unicode_texas.html#Numeric_c...), that includes Unicodey fractions. And as a cherry on top, you can use superscript chars to raise to a power:
$ rakudo -e 'say ½ + 42²'
1764.5
Here are all the Nd and No chars that can be used as numeric literals: $ rakudo -e 'put (^0x110000).grep(*.uniprop eq any <Nd No>)».chr'
0 1 2 3 4 5 6 7 8 9 ² ³ ¹ ¼ ½ ¾ ٠ ١ ٢ ٣ ٤ ٥ ٦ ٧ ٨ ٩ ۰ ۱ ۲ ۳ ۴ ۵ ۶ ۷ ۸ ۹ ߀ ߁
߂ ߃ ߄ ߅ ߆ ߇ ߈ ߉ ० १ २ ३ ४ ५ ६ ७ ८ ९ ০ ১ ২ ৩ ৪ ৫ ৬ ৭ ৮ ৯ ৴ ৵ ৶ ৷ ৸ ৹ ੦ ੧ ੨ ੩
੪ ੫ ੬ ੭ ੮ ੯ ૦ ૧ ૨ ૩ ૪ ૫ ૬ ૭ ૮ ૯ ୦ ୧ ୨ ୩ ୪ ୫ ୬ ୭ ୮ ୯ ୲ ୳ ୴
୵ ୶ ୷ ௦ ௧ ௨ ௩ ௪ ௫ ௬ ௭ ௮ ௯ ௰ ௱ ௲ ౦ ౧ ౨ ౩ ౪ ౫ ౬ ౭ ౮ ౯ ౸
౹ ౺ ౻ ౼ ౽ ౾ ೦ ೧ ೨ ೩ ೪ ೫ ೬ ೭ ೮ ೯ ൘ ൙ ൚ ൛ ൜ ൝ ൞ ൦ ൧ ൨ ൩ ൪
൫ ൬ ൭ ൮ ൯ ൰ ൱ ൲ ൳ ൴ ൵ ൶ ൷ ൸ ෦ ෧ ෨ ෩ ෪ ෫ ෬ ෭ ෮ ෯ ๐ ๑ ๒ ๓ ๔ ๕
๖ ๗ ๘ ๙ ໐ ໑ ໒ ໓ ໔ ໕ ໖ ໗ ໘ ໙ ༠ ༡ ༢ ༣ ༤ ༥ ༦ ༧ ༨ ༩ ༪ ༫ ༬ ༭ ༮ ༯ ༰
༱ ༲ ༳ ၀ ၁ ၂ ၃ ၄ ၅ ၆ ၇ ၈ ၉ ႐ ႑ ႒ ႓ ႔ ႕ ႖ ႗ ႘ ႙ ፩ ፪ ፫ ፬ ፭
፮ ፯ ፰ ፱ ፲ ፳ ፴ ፵ ፶ ፷ ፸ ፹ ፺ ፻ ፼ ០ ១ ២ ៣ ៤ ៥ ៦ ៧ ៨ ៩ ៰ ៱ ៲
៳ ៴ ៵ ៶ ៷ ៸ ៹ ᠐ ᠑ ᠒ ᠓ ᠔ ᠕ ᠖ ᠗ ᠘ ᠙ ᥆ ᥇ ᥈ ᥉ ᥊ ᥋ ᥌ ᥍ ᥎ ᥏ ᧐ ᧑
᧒ ᧓ ᧔ ᧕ ᧖ ᧗ ᧘ ᧙ ᧚ ᪀ ᪁ ᪂ ᪃ ᪄ ᪅ ᪆ ᪇ ᪈ ᪉ ᪐ ᪑ ᪒ ᪓ ᪔ ᪕ ᪖ ᪗
᪘ ᪙ ᭐ ᭑ ᭒ ᭓ ᭔ ᭕ ᭖ ᭗ ᭘ ᭙ ᮰ ᮱ ᮲ ᮳ ᮴ ᮵ ᮶ ᮷ ᮸ ᮹ ᱀ ᱁ ᱂ ᱃ ᱄
᱅ ᱆ ᱇ ᱈ ᱉ ᱐ ᱑ ᱒ ᱓ ᱔ ᱕ ᱖ ᱗ ᱘ ᱙ ⁰ ⁴ ⁵ ⁶ ⁷ ⁸ ⁹ ₀ ₁ ₂ ₃ ₄ ₅ ₆ ₇ ₈ ₉ ⅐ ⅑
⅒ ⅓ ⅔ ⅕ ⅖ ⅗ ⅘ ⅙ ⅚ ⅛ ⅜ ⅝ ⅞ ⅟ ↉ ① ② ③ ④ ⑤ ⑥ ⑦ ⑧ ⑨ ⑩ ⑪ ⑫ ⑬ ⑭ ⑮
⑯ ⑰ ⑱ ⑲ ⑳ ⑴ ⑵ ⑶ ⑷ ⑸ ⑹ ⑺ ⑻ ⑼ ⑽ ⑾ ⑿ ⒀ ⒁ ⒂ ⒃ ⒄ ⒅ ⒆ ⒇ ⒈ ⒉
⒊ ⒋ ⒌ ⒍ ⒎ ⒏ ⒐ ⒑ ⒒ ⒓ ⒔ ⒕ ⒖ ⒗ ⒘ ⒙ ⒚ ⒛ ⓪ ⓫ ⓬ ⓭ ⓮ ⓯ ⓰ ⓱ ⓲
⓳ ⓴ ⓵ ⓶ ⓷ ⓸ ⓹ ⓺ ⓻ ⓼ ⓽ ⓾ ⓿
⳽ ㆒ ㆓ ㆔ ㆕ ㈠ ㈡ ㈢ ㈣ ㈤ ㈥ ㈦ ㈧ ㈨
㈩ ㉈ ㉉ ㉊ ㉋ ㉌ ㉍ ㉎ ㉏ ㉑ ㉒ ㉓ ㉔ ㉕ ㉖ ㉗ ㉘ ㉙ ㉚ ㉛ ㉜ ㉝ ㉞ ㉟ ㊀ ㊁ ㊂
㊃ ㊄ ㊅ ㊆ ㊇ ㊈ ㊉ ㊱ ㊲ ㊳ ㊴ ㊵ ㊶ ㊷ ㊸ ㊹ ㊺ ㊻ ㊼ ㊽ ㊾ ㊿ ꘠ ꘡ ꘢ ꘣ ꘤ ꘥
꘦ ꘧ ꘨ ꘩ ꠰ ꠱ ꠲ ꠳ ꠴ ꠵ ꣐ ꣑ ꣒ ꣓ ꣔ ꣕ ꣖ ꣗ ꣘ ꣙ ꤀ ꤁ ꤂ ꤃ ꤄ ꤅ ꤆
꤇ ꤈ ꤉ ꧐ ꧑ ꧒ ꧓ ꧔ ꧕ ꧖ ꧗ ꧘ ꧙ ꧰ ꧱ ꧲ ꧳ ꧴ ꧵ ꧶ ꧷ ꧸ ꧹ ꩐ ꩑ ꩒
꩓ ꩔ ꩕ ꩖ ꩗ ꩘ ꩙ ꯰ ꯱ ꯲ ꯳ ꯴ ꯵ ꯶ ꯷ ꯸ ꯹ 0 1 2 3 4 5 6 7 8
9 𐄇 𐄈 𐄉 𐄊 𐄋 𐄌 𐄍 𐄎 𐄏 𐄐 𐄑 𐄒 𐄓 𐄔 𐄕 𐄖 𐄗 𐄘 𐄙 𐄚 𐄛 𐄜 𐄝 𐄞 𐄟 𐄠 𐄡 𐄢 𐄣 𐄤 𐄥 𐄦 𐄧
𐄨 𐄩 𐄪 𐄫 𐄬 𐄭 𐄮 𐄯 𐄰 𐄱 𐄲 𐄳 𐅵 𐅶 𐅷 𐅸 𐆊 𐆋 𐋡 𐋢 𐋣 𐋤 𐋥 𐋦 𐋧 𐋨 𐋩 𐋪 𐋫 𐋬 𐋭 𐋮 𐋯 𐋰 𐋱
𐋲 𐋳 𐋴 𐋵 𐋶 𐋷 𐋸 𐋹 𐋺 𐋻 𐌠 𐌡 𐌢 𐌣 𐒠 𐒡 𐒢 𐒣 𐒤 𐒥 𐒦 𐒧 𐒨 𐒩 𐡘 𐡙 𐡚 𐡛 𐡜 𐡝 𐡞 𐡟 𐡹 𐡺 𐡻
𐡼 𐡽 𐡾 𐡿 𐢧 𐢨 𐢩 𐢪 𐢫 𐢬 𐢭 𐢮 𐢯 𐣻 𐣼 𐣽 𐣾 𐣿 𐤖 𐤗 𐤘 𐤙 𐤚 𐤛 𐦼 𐦽 𐧀 𐧁 𐧂 𐧃 𐧄 𐧅 𐧆 𐧇 𐧈 𐧉
𐧊 𐧋 𐧌 𐧍 𐧎 𐧏 𐧒 𐧓 𐧔 𐧕 𐧖 𐧗 𐧘 𐧙 𐧚 𐧛 𐧜 𐧝 𐧞 𐧟 𐧠 𐧡 𐧢 𐧣 𐧤 𐧥 𐧦 𐧧 𐧨 𐧩 𐧪 𐧫 𐧬 𐧭 𐧮
𐧯 𐧰 𐧱 𐧲 𐧳 𐧴 𐧵 𐧶 𐧷 𐧸 𐧹 𐧺 𐧻 𐧼 𐧽 𐧾 𐧿 𐩀 𐩁 𐩂 𐩃 𐩄 𐩅 𐩆 𐩇 𐩽 𐩾 𐪝 𐪞 𐪟 𐫫 𐫬 𐫭 𐫮 𐫯
𐭘 𐭙 𐭚 𐭛 𐭜 𐭝 𐭞 𐭟 𐭸 𐭹 𐭺 𐭻 𐭼 𐭽 𐭾 𐭿 𐮩 𐮪 𐮫 𐮬 𐮭 𐮮 𐮯 𐳺 𐳻 𐳼 𐳽 𐳾 𐳿 𐹠 𐹡 𐹢 𐹣 𐹤 𐹥
𐹦 𐹧 𐹨 𐹩 𐹪 𐹫 𐹬 𐹭 𐹮 𐹯 𐹰 𐹱 𐹲 𐹳 𐹴 𐹵 𐹶 𐹷 𐹸 𐹹 𐹺 𐹻 𐹼 𐹽 𐹾 𑁒 𑁓 𑁔 𑁕 𑁖 𑁗 𑁘 𑁙 𑁚 𑁛
𑁜 𑁝 𑁞 𑁟 𑁠 𑁡 𑁢 𑁣 𑁤 𑁥 𑁦 𑁧 𑁨 𑁩 𑁪 𑁫 𑁬 𑁭 𑁮 𑁯 𑃰 𑃱 𑃲 𑃳 𑃴 𑃵 𑃶 𑃷 𑃸 𑃹 𑄶 𑄷 𑄸 𑄹 𑄺
𑄻 𑄼 𑄽 𑄾 𑄿 𑇐 𑇑 𑇒 𑇓 𑇔 𑇕 𑇖 𑇗 𑇘 𑇙 𑇡 𑇢 𑇣 𑇤 𑇥 𑇦 𑇧 𑇨 𑇩 𑇪 𑇫 𑇬 𑇭 𑇮 𑇯 𑇰 𑇱 𑇲 𑇳 𑇴
𑋰 𑋱 𑋲 𑋳 𑋴 𑋵 𑋶 𑋷 𑋸 𑋹 𑑐 𑑑 𑑒 𑑓 𑑔 𑑕 𑑖 𑑗 𑑘 𑑙 𑓐 𑓑 𑓒 𑓓 𑓔 𑓕 𑓖 𑓗 𑓘 𑓙 𑙐 𑙑 𑙒 𑙓 𑙔
𑙕 𑙖 𑙗 𑙘 𑙙 𑛀 𑛁 𑛂 𑛃 𑛄 𑛅 𑛆 𑛇 𑛈 𑛉 𑜰 𑜱 𑜲 𑜳 𑜴 𑜵 𑜶 𑜷 𑜸 𑜹 𑜺 𑜻 𑣠 𑣡 𑣢 𑣣 𑣤 𑣥 𑣦 𑣧
𑣨 𑣩 𑣪 𑣫 𑣬 𑣭 𑣮 𑣯 𑣰 𑣱 𑣲 𑱐 𑱑 𑱒 𑱓 𑱔 𑱕 𑱖 𑱗 𑱘 𑱙 𑱚 𑱛 𑱜 𑱝 𑱞 𑱟 𑱠 𑱡 𑱢 𑱣 𑱤 𑱥 𑱦 𑱧
𑱨 𑱩 𑱪 𑱫 𑱬 𖩠 𖩡 𖩢 𖩣 𖩤 𖩥 𖩦 𖩧 𖩨 𖩩 𖭐 𖭑 𖭒 𖭓 𖭔 𖭕 𖭖 𖭗 𖭘 𖭙 𖭛 𖭜 𖭝 𖭞 𖭟 𖭠 𖭡 𝍠 𝍡 𝍢
𝍣 𝍤 𝍥 𝍦 𝍧 𝍨 𝍩 𝍪 𝍫 𝍬 𝍭 𝍮 𝍯 𝍰 𝍱 𝟎 𝟏 𝟐 𝟑 𝟒 𝟓 𝟔 𝟕 𝟖 𝟗 𝟘 𝟙 𝟚 𝟛 𝟜 𝟝 𝟞 𝟟 𝟠 𝟡 𝟢
𝟣 𝟤 𝟥 𝟦 𝟧 𝟨 𝟩 𝟪 𝟫 𝟬 𝟭 𝟮 𝟯 𝟰 𝟱 𝟲 𝟳 𝟴 𝟵 𝟶 𝟷 𝟸 𝟹 𝟺 𝟻 𝟼 𝟽 𝟾 𝟿 𞣇 𞣈 𞣉 𞣊 𞣋
𞣌 𞣍 𞣎 𞣏 𞥐 𞥑 𞥒 𞥓 𞥔 𞥕 𞥖 𞥗 𞥘 𞥙 🄀 🄁 🄂 🄃 🄄 🄅 🄆 🄇 🄈 🄉 🄊 🄋 🄌I've used Perl 6 for IRC bots. The ease of writing parallel code, nice OO model, multi dispatch, and subsets make it very pleasant to do them in Perl 6. Here's a bot I wrote that listens for GitHub webhooks and reports new commits and PRs: https://github.com/perl6/geth and here's another one that's just a bunch of random features: https://github.com/zoffixznet/perl6-buggable/
I also heard people say grammars are the most note-worthy feature of Perl 6 and people basically use them to quickly hack up a nice little micro-language in which they then attack their problem. Before I came to Perl 6 I was dumb as shoe when it came to writing parsers, but I find it trivial to do with Perl 6 grammars.
Do I like it? Although I'm obviously biased, I love the language. It lets you write beautifully concise, yet still readable, code. It even lets you use much more readable syntax for regexes. Somewhat regretfully, it made it very difficult for me to learn other languages, as in them I end up writing 3x, 4x, 6x the amount of code and I keep getting reminded of Larry Wall saying Perl 6 would be the last language you'd learn. In Perl 6 I can "talk"; in other languages, I write "code".
However, while the language is fantastic, the implementation still has a lot of work to be done to polish it off. It's basically a 1.0 release. Unlike Go, Rust, or Swift, there isn't a giant corporation behind Perl 6 that can just throw money at problems until they disappear. Compared to other languages, some things are still unoptimized and are much slower. I spotted some leakage that makes it problematic for very-long-running (months) programs. About 65 new bug tickets are opened per month. The test suite is pretty sparse in some areas (which is the likely reason for many of the new bug tickets). But... three new core developers joined this January, so hopefully all that will get improved pretty fast.
Someone in the comments also mentioned the baby-sized ecosystem... Since Perl 6 lets you use C libraries without needing to compile anything, people wrote stuff like Inline::Perl5 and Inline::Python that let you import and even subclass stuff from Perl 5 and Python. And that's a bit of a double-edge sword: yes, it's trivial to use libraries from Perl 5 and Python, but it also stunts the ecosystem; no one has enough motivation to re-invent the wheel in Perl 6 when the wheels from other languages are reasonably usable.
Sorry, but that's just wishful thinking. We don't have infinite resources or infinite number of volunteers. Maybe instead of endless critique, you could offer a helping hand. You did want to at one point: https://irclog.perlgeek.de/mojo/2016-10-09#i_13366119
If you like go's conc stuff, then I'm sure you'll love Perl 6's async/conc/paralel. stuff: https://docs.perl6.org/language/concurrency#High-level_APIs
I wrote an IRC API with Perl 6 that I really love, since it makes it so easy for me to parallelize a plugin's work, while working with an async protocol, all the while connected to multiple servers, all with the same short script: http://perl6.party/post/IRC-Client-Perl-6-Multi-Server-IRC-M...
You also have grammars, more readable regex language, and superb object model. On a more advanced spectrum, with grammars and slangs, you can craft your own mini-languages for a specific domain where they would fit better; there's a nice little presentation by Damian Conway where he crafts an operator for quantum mechanical math that looks and functions just like the proper mathematical symbol functions: https://www.youtube.com/watch?v=Nq2HkAYbG5o
As for the langs you mentioned: I find a lot of similarities between Rust and Perl 6, although in some areas it seems Perl 6 folks did more thinking (like the .match stuff). They are however in different domains, Rust being a systems language; but you can use Rust libraries in Perl 6 via NativeCall if you compile them for C calling convention.
Perl 6 smokes Ruby and Python with its asynch/parallel/conc. support and more advanced object model.
As far as Unicode support goes, only Swift comes close to Perl 6; try to uppercase "ß" in Ruby, for example. Even if you to claim you only write software for English-speaking customers, you still have to deal with weird customer names for example.
For parameters you mention, many people notice they have to write fewer code in Perl 6. Personally, I found when writing equivalent code as Perl 5, my Perl 6 versions were TWICE as short. And I don't mean you golf your program to anything unreadable, but rather the provided primitives are... well, modern... so I don't have to reinvent them with more basic primitives provided by older langs.
What you'll find is performance is a bit crappy right now. Perl 6's stable got released less than a year ago so there's still a ton of work left to do in bugfixing and optimizations. I think that's what a lot of folks fail to realize that Perl 6 is a brand new baby language so trying to compare its performance to Python (25 years of work) or Ruby (21 years of work) or ES6 (tons of corporate interest) is a bit unrealistic at this moment in time.
In conclusion, one can list dozens of benefits, but I think at the end of the day, it'll all come down to which language better fits your brain and if you participate in a community, which community feels more like the folks of your kind. So far, anyone who I saw try the language say they loved it. The performance can use an improvement and that's what the core devs are working on. So, I think the steam is being gathered.
I personally like the method version: .subst() and .subst-mutate()
I am talking more about programming thinking than a feature set. That there's no such thing as Unicode issues or needing to use silly "u" prefixes. That 0.1 + 0.2 == 0.3 reliably that you can write accounting software worry-free and not wonder about why it fails in so many old langs. That you can use grammars to write a mini-language for your specific problem to save yourself tons of generic programming. That you can branch off into a separate processor core with a simple `start` keyword or parallelize a method call on a list of items with just a `>>` hyper prefix or seamlessly communicate a job parallelized over 30 cores with yet another core with a simmple channelled supply without worrying about data races.
These features may be present in Python, but way of thinking isn't. A new programmer starting in Perl 6 won't think of multi-threading, Unicode, floating point math as problematic areas and grammars together with full-language maleability that lets you create problem-specific langs instead of a mountain of generic classes is undreamt of by oldschoolers like me.
Sounds like you're making shit up just to be difficult. The giant button on perl6.org says "Rakudo is a compiler for Perl 6 code", it leads you to a page of choices, among which is a link to a binaries where you choose your platform.
It's like complaining that you have to use `gcc` when learning the C Programming Language and being flabbergasted to find there are multiple versions of it.
Seriously, this isn't rocket surgery.
It'll also take a bit for people who loudly push 25-year-old languages like Python and Ruby like holy grail to... die off (no, I don't want them to convert). Perl 6 is a next generation language over them and it'll take next generation of programmers to make use of the new programming paradigms.
What you're probably asking is why hasn't Perl 6 went viral like Swift, Rust, or Go? Well, we don't have a multi-million (or -billion) company backing us, so fanboys and people who are after the latest shiny things aren't flocking to us like to manure. But look around this site: those langs get as much nonsensical comments from the Python-Ruby zealots who are too scared of new languages :)
Perl 6's first production release was less than a year ago. It's a bit unrealistic to expect it to be a "poster child" of anything so fast. If you're old enough to remember, no one gave a shit about Python until at least second version.
Don't worry about popularity. Learn many languages and use what you like using.