Questions tagged [rakudo]

Rakudo is a compiler for the Raku programming language running on the MoarVM virtual machine.

Rakudo is a Raku compiler running on the MoarVM, JVM and JavaScript.

Related links

189 questions
32
votes
5 answers

What performance increases can we expect as the Perl 6 implementations mature?

Each time I have downloaded a new copy of Rakudo Perl 6, I have run the following expression just to get an idea of its current performance: say [+] 1 .. 100000; And the speeds have been increasing, but each time, there is a noticeable delay…
Eric Strom
  • 39,821
  • 2
  • 80
  • 152
17
votes
1 answer

How can you call JavaScript builtins from Perl 6 with the new JS backend?

I know it is possible to invoke Java when Perl 6 is using that backend: How do I invoke a Java method from perl6 Is there a way yet to access e.g. the JavaScript DOM interface from Perl 6 with the new Rakudo JavaScript VM running in the…
S. Albano
  • 707
  • 7
  • 21
17
votes
3 answers

Is it possible to compile/install Perl6 on a Raspberry Pi 3?

I am trying to install Rakudo Star 2018.04 on a Raspberry Pi 3. I do: sudo perl Configure.pl --gen-moar --gen-nqp --prefix ~/rakudo and it completes successfully. And then I try: sudo make-install but it fails with: The following step can take a…
ryn1x
  • 1,052
  • 2
  • 8
  • 19
16
votes
1 answer

Why are the source file names not human readable?

I installed Perl6 with rakudobrew and wanded to browse the installed files to see a list of hex-filenames in ~/.rakudobrew/moar-2018.08/install/share/perl6/site/sources as well as ~/.rakudobrew/moar-2018.08/install/share/perl6/sources/. E.g. > ls…
matthias krull
  • 4,389
  • 3
  • 34
  • 54
16
votes
3 answers

How to execute an external command and capture its output in perl6?

How can I execute an external command and capture its output in Perl6? Perl5-style back-ticks don't seem to work: > my $results = `ls`; Confused at line 1, near "my $results" Synopsis 16 documents the run method, but this returns the exit status…
mattbh
  • 5,230
  • 2
  • 27
  • 27
16
votes
4 answers

Does Perl6 support something equivalent to Perl5's __DATA__ and __END__ sections?

Does perl6/Rakudo have something equivalent to perl5's __DATA__ or __END__ sections?
sid_com
  • 24,137
  • 26
  • 96
  • 187
15
votes
2 answers

How can I use Perl 5 modules from Perl 6?

Is the a way to use Perl 5 modules from CPAN from Rakudo Perl 6? For example, how can I use the venerable Perl 5 module, CGI, which hasn't been ported yet, in Perl 6. Update: And what this funky code from some early Perl 6 module: use…
GeneQ
  • 7,485
  • 6
  • 37
  • 53
15
votes
1 answer

Lookaround regex and character consumption

Based on the documentation for Raku's lookaround assertions, I read the regex / / as saying "starting from the left, match but do not not consume one character that is a, b, or c and, once you have found a match, match and consume…
codesections
  • 8,900
  • 16
  • 50
14
votes
1 answer

Parsing binary files in Raku

I would like to parse binary files in Raku using its regex / grammar engine, but I didn't found how to do it because the input is coerce to string. Is there a way to avoid this string coercion and use objects of type Buf or Blob ? I was thinking…
WhiteMist
  • 885
  • 4
  • 13
14
votes
1 answer

What persistent data structures does Raku/Rakudo include?

Raku provides many types that are immutable and thus cannot be modified after they are created. Until I started looking into this area recently, my understanding was that these Types were not persistent data structures – that is, unlike the core…
codesections
  • 8,900
  • 16
  • 50
14
votes
1 answer

Raku regex: Inconsistent longest token matching

Raku's regexes are expected to match longest token. And in fact, this behaviour is seen in this code: raku -e "'AA' ~~ m/A {say 1}|AA {say 2}/" # 2 However, when the text is in a variable, it does not seem to work in the same way: raku -e "my $a =…
Julio
  • 5,208
  • 1
  • 13
  • 42
14
votes
1 answer

What are the specifics about the continuations upon which Raku(do) relies?

The topic of delimited continuations was barely discussed among programming language enthusiasts in the 1990s. It has recently been re-emerging as a major thing in programming language discussions. Aiui continuations aren't directly exposed in Raku,…
raiph
  • 31,607
  • 3
  • 62
  • 111
13
votes
3 answers

Raku list addition operator `Z+` 'fails' unless one of the lists is forced

I'm struggling to understand why the zip-add Z+ operator does not work on some cases. I have some 2-element lists that I'd like to sum. These work as expected whether I use lists or arrays: say (1, 2) Z+ (3, 4) # (4, 6) say [1, 2] Z+ (3, 4) # (4,…
Julio
  • 5,208
  • 1
  • 13
  • 42
12
votes
1 answer

Understanding Cro request/response cycle and memory use

I'm a bit confused about how Cro handles client requests and, specifically, why some requests seem to cause Cro's memory usage to balloon. A minimal example of this shows up in the literal "Hello world!" Cro server. use Cro::HTTP::Router; use…
codesections
  • 8,900
  • 16
  • 50
12
votes
1 answer

Understanding the point of supply blocks (on-demand supplies)

I'm having trouble getting my head around the purpose of supply {…} blocks/the on-demand supplies that they create. Live supplies (that is, the types that come from a Supplier and get new values whenever that Supplier emits a value) make sense to me…
codesections
  • 8,900
  • 16
  • 50
1
2 3
12 13