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
5
votes
2 answers

Why do I get 'divide by zero` errors when I try to run my script with Rakudo?

I just built Rakudo and Parrot so that I could play with it and get started on learning Perl 6. I downloaded the Perl 6 book and happily typed in the first demo program (the tennis tournament example). When I try to run the program, I get an…
daotoad
  • 26,689
  • 7
  • 59
  • 100
4
votes
2 answers

Rakudo test suite progression?

There used to be a graph that tracked the implementation of Perl6 against the test suite for Perl6. I was interested in watching it progress (and, regress). What happened to that graph, it used to be hosted on the site www.rakudo.de Is there any…
Evan Carroll
  • 78,363
  • 46
  • 261
  • 468
4
votes
1 answer

Is there a Raku method that allows a hash value to be sorted and split from its pair?

I am currently trying to use hashes in an array to find the keys and values of each specific item in the array. I am able to do this and both the keys and the values are separate when I haven't sorted the array, but when I create a sorted array such…
Homerian
  • 183
  • 4
4
votes
0 answers

Cannot use example about roles from official doc in Raku

Following this defenitions from docs.raku, I get the following error with rakudo 2022.03 platform-pro (pro) in ~ via ⬢ v12.4.0 ❯ raku ~ Welcome…
anquegi
  • 11,125
  • 4
  • 51
  • 67
4
votes
0 answers

Enforcing read-only attributes from the metaclass

Yes, still going with this. My impression is that there's this powerful facility in Raku, which is not really easy to use, and there's so little documentation for that. I'd like to kind of mitigate that. In this case, I'm trying to force…
jjmerelo
  • 22,578
  • 8
  • 40
  • 86
4
votes
1 answer

raku a graphical interface for WIndows 8

I would like to download some sophisticated graphical interface for Raku for Windows 8. Where can I find one ? I have installed the following, which looks good, but I cannot currently run the oppened script: EDIT EDIT 2 I cannot enter the path…
user2925716
  • 949
  • 1
  • 6
  • 13
4
votes
1 answer

Using void structs in Raku via NativeCall

I'm trying to link libzip to Raku, and it uses a void struct or a struct with no body, like this: struct zip; typedef struct zip zip_t; I declare it in my Raku program in the same way: class zip_t is repr('CStruct'){}; This fails with: Class zip_t…
jjmerelo
  • 22,578
  • 8
  • 40
  • 86
4
votes
2 answers

Batch text processing with Perl 6

I am reading Think Perl 6 by Laurent Rosenfeld, with Allen B. Downey recently which is a very good reading. It has its .tex files available in github here. It has code examples like this: I believe it would be very useful to have the code blocks…
Suman Khanal
  • 3,079
  • 1
  • 17
  • 29
4
votes
1 answer

How do I change the size of an array in Perl6 after creation?

In perl6 I can create an array of fixed size as so: my @array[5]; How can I then change the size of the array later on to be larger, for instance I want array to be of size 7 now Thanks
3
votes
0 answers

Getting error "Could not load oplib `nqp_dyncall_ops'" + traceback when executing raku one liner

I have a rakudo instance that will do nothing other than respond with "Could not load oplib 'nqp_dyncall_ops'". Using the REPL: perl6 Could not load oplib 'nqp_dyncall_ops exit Unable to load setting CORE; maybe it is missing a…
3
votes
0 answers

Can't precompile when using some external module

I'm trying to precompile external files to get their assets with this script: #!/usr/bin/env perl6 use v6; use nqp; my $precomp-store = CompUnit::PrecompilationStore::File.new(prefix => "/tmp".IO); our $precomp =…
jjmerelo
  • 22,578
  • 8
  • 40
  • 86
3
votes
1 answer

Rakudo Perl 6: clear screen while using Readline module

Here's my test program: use Readline; shell 'clear'; my $r = Readline.new; loop { my $a = $r.readline("> "); {say ''; last} if not defined $a; $r.add-history( $a ); say $a; } After I enter any string, it exits with the following…
Eugene Barsky
  • 5,780
  • 3
  • 17
  • 40
3
votes
2 answers

Cannot install Readline with Rakudo Perl 6 zef

I'm trying to install Readline. (The system is Linux Mint Mate 18.3, the same is true for Lubuntu 17.10). $ zef install Readline The installation process begins but later is aborted with the following messages: ===> Searching for: Readline ===>…
Eugene Barsky
  • 5,780
  • 3
  • 17
  • 40
3
votes
2 answers

How do I `say` and `print` into a buffer?

In Perl 6 the Str type is immutable, so it seems reasonable to use a mutable buffer instead of concatenating a lot of strings. Next, I like being able to use the same API regardless if my function is writing to stdout, file or to an in-memory…
user7610
  • 25,267
  • 15
  • 124
  • 150
2
votes
3 answers

perl6/rakudo: dereferencing-question

#!perl6 use v6; my $list = 'a' .. 'f'; sub my_function( $list ) { for ^$list.elems -> $e { $list[$e].say; } } my_function( $list ); First I tried this in perl5-style, but it didn't work: for @$list -> $e { $e.say; } #…
sid_com
  • 24,137
  • 26
  • 96
  • 187
1 2 3
12
13