Skip to main content

Question list filters

Filter by
Sorted by
Tagged with
Score of 1
1 answer
104 views

I have this output in my Raku REPL: [5] > so all() True Empty lists should evaluate to False, and all False should be False. So, why does it return True? What I wanted was to have all items in an ...
Score of 0
1 answer
155 views

Does Raku have an SDK related to Anthropic? I see that Ruby and Python both have officially maintained SDKs: anthropic-sdk-ruby and anthropic-sdk-python.
Score of 4
2 answers
189 views

Why do the third and fourth substitutions produce different results? #!/usr/bin/env raku use v6.d; my $str; my regex myregex1 { <[\d;]>+ }; $str = "abc3def0ghi"; $str.=subst( / <?...
Score of 2
1 answer
169 views

I want to assign my $FOO = $foo if $foo.defined; I tried my $FOO with= $foo; but that doesn't work. Is there a canonical way to do this?
Score of 1
2 answers
169 views

I would like to import Test::Color only when %*ENV<TEST_COLOR> is set. I can't put use inside an if block, because use happens at compile time.  I put require inside the if block, to no effect. ...
Score of -4
2 answers
226 views

I would like to develop a raku script that can search a word list for words of the same length which contain the same characters except for one. For example 'castle' and 'cattle' would be appropriate ...
Score of 0
2 answers
62 views

I have a tree of modules Air::Base, Air::Base::Tools and so on, and I want to re-export the Air::Base::Tools enum from Air::Base to code that uses that. Air::Base::Tools rakumod… sub exports-air-base-...
Score of 5
1 answer
140 views

Using only features from the Raku specification, i.e., not using any implementation-specific features, is there a way to get the method objects for a given class / object? I'd like to do something ...
Score of 6
1 answer
139 views

I'm trying to understand this behavior/error message. If I pass a pair where the key is unquoted to a slurpy hash, it succeeds. If I pass a pair where the key is explicitly quoted to a slurpy hash I ...
Score of 0
2 answers
141 views

Sometimes, I write code like my $x = do { my $result = get-result; do-a-thing-that-would-change-result; $result }; . Whenever I do, I yearn for an operator to express this idea. You ...
Score of 5
1 answer
106 views

In Raku, is it, or will it ever be possible to set required private attributes without writing a BUILD submethod? E.g., the following does not work: class C { has Str:D $!name is required; } C.new:...
Score of 7
2 answers
257 views

Given the input file: ---------------- A ---------------- information for A on these lines ---------------- B ---------------- Something about B on these lines etc I want to produce: A: information ...
Score of 2
1 answer
144 views

Following the documentation and this SO answer I wrote the following class with clone method, but the tests in the code do not give the expected result. use v6.d; use Test; class Numeration { ...
Score of 3
2 answers
178 views

Background: In build.rakumod I have several multi sub MAIN( ... ), one of which is: multi sub MAIN( :$config = 'config', #= localised config file Bool :install($)!, #= install a config ...
Score of 5
1 answer
183 views

I have color codes stored in an array. I cannot print color when I take a color code from the array, but I can print color if I use the code directly in a "say" or "print" ...

15 30 50 per page
1
2 3 4 5
…
140