pl6anet.org pl6anet.org

Rakudo Weekly News: 2021.17 Releastable

Alexander Kiryuhin has announced the Rakudo Compiler 2021.04 Release. A little later than originally planned, because some issues were discovered that needed to be fixed, either in core or in the ecosystem. Kudos to Alexander and all the other people that worked on this release! This release comes with new IO::Path methods, and support for Julian Dates in the DateTime class, and a now term that is 38x as fast. Also many stability and...

pl6anet.org pl6anet.org

gfldex: Reusing a wheel

A while back I reinvented a wheel which is rolling slower then the one build into Rakudo. While reading BOOTSTRAP.nqp I discovered add_dispatchee. By stealing this wheel I might get better results. After all, this approach is working very well for manufacturers all over the world. Let’s have something to dispatch on. my $emitter = Supplier.new; my $s = $emitter.Supply; my $p = start { loop { $emitter.emit: [42,...

pl6anet.org pl6anet.org

Rakudo Weekly News: 2021.16 Dispatch Anew

Jonathan Worthington has posted an extensive blog post about the progress on the new dispatch infrastructure in MoarVM: Raku multiple dispatch with the new MoarVM dispatcher, with exciting new capabilities and the promise of much better performance (Lobsters comments). In related news, Jonathan also reported on the RakuAST progress in March. Documentation Team In an attempt to unify work on the documentation of the Raku Programming...

pl6anet.org pl6anet.org

gfldex: All your idioms are belong to us

In he closing thought in my last post I postulated the need to find idioms. That worried me a bit because finding things that are not there (yet) is no easy feat. By chance that day Hacker News linked to an article with well written and explained Python code. We can’t quite translate idioms from one language to another. But if we can steal ideasborrow features from other languages, maybe we can take inspiration for idioms too. The...

pl6anet.org pl6anet.org

Rakudo Weekly News: 2021.13 Games Pop

JJ Atria just announced another part of the Raku Programming Language’s growing support for games: POP, an experimental 2D game development framework. It has been inspired by frameworks like LÓVE2D and Pico-8, and by others of a similar nature. Meanwhile, it turns out that this work is complementary to Geoffrey Broadwell‘s MUGS (Multi-User Gaming Services) project. Which made it the right time to start a new IRC channel dedicated...

pl6anet.org pl6anet.org

6guts: Towards a new general dispatch mechanism in MoarVM

My goodness, it appears I’m writing my first Raku internals blog post in over two years. Of course, two years ago it wasn’t even called Raku. Anyway, without further ado, let’s get on with this shared brainache. What is dispatch? I use “dispatch” to mean a process by which we take a set of arguments and end up with some action being taken based upon them. Some familiar examples include: Making a method call, such...

pl6anet.org pl6anet.org

gfldex: Raku is a match for *

PimDaniel asked an interesting question. How do i test match is True while matching : this does NOT work : if my ($type,$a,$b,$c) = ($v ~~ /^ ('horiz'|'vertic') '_' (\d+) '_' (\d+) '_' (\d+) $/)>>.Str { ... } Well i made it in 2 times 1/ capture and test the match, 2/ convert the match to Str. There was no prompt answer and no improvement at all. I couldn’t find a nice way to do this quickly either. In fact it took me the better...