Skip to main content
Code Review

Questions tagged [raku]

For questions relating to the Raku programming language (formerly known as Perl 6).

Filter by
Sorted by
Tagged with
2 votes
1 answer
118 views

AST node class generator

Given two hashes, my script generates two (poorly formatted) C# source files containing some classes that represent several AST nodes a programming language needs and an implementation of the Visitor ...
Julia's user avatar
  • 171
2 votes
1 answer
87 views

Raku multiplication using prompt and say

I have extensively consulted Raku documentation and have tried many combinations to finally arrive at this working solution. ...
Pedr Ap Glyn's user avatar
4 votes
3 answers
427 views

How can I make my program that calculates π faster?

For my first Raku program, I thought it might be a fun challange to port over a program I'd written in C# about two years ago, and I was right: it was. There's just one problem: while the C# program ...
Julia's user avatar
  • 171
3 votes
1 answer
71 views

Linux: Raku script to open files from terminal and ask for deletion

Raku script to open files from terminal with xdg-open and, with del option, asks for deletion. Happy to receive Raku syntax improvements. Thanks! ...
Mimosinnet's user avatar
5 votes
2 answers
122 views

Range check operator

I'd like to improve this operator code if I can. I don't know enough Raku to write idiomatically (or any other way for that matter), but suggestions along those lines would be good also. ...
hsmyers's user avatar
  • 153
3 votes
0 answers
74 views

Raku and the Knapsack

The following is a solution to the knapsack problem and supposed to be my entry to this weeks perl challenge. I wonder if this is a good use of dynamic variables or is it too confusing? I use them ...
Holli's user avatar
  • 221
2 votes
1 answer
57 views

Ranges of enum members that dwim

Inspired by this blogpost I decided to try and make it possible to have ranges of enum members that dwim, aka. that contain the actual members and not a stringified ...
Holli's user avatar
  • 221
6 votes
1 answer
92 views

Raku / Perl6: A module to enable escape codes in the win32 console, naming suggestions

I have this little project i am about to release. https://github.com/holli-holzer/perl6-Win-VT I would be happy about a code review and suggestions for a better name. Discussion in IRC yielded ...
Holli's user avatar
  • 221
6 votes
3 answers
180 views

perl6: html color gradient generator

Edit: The comments have been incorporated to this module in GitHub. The final code has been included at the end of this thread. Thanks very much for the detailed and brilliant suggestions. Inspired ...
Mimosinnet's user avatar
3 votes
1 answer
292 views

Parsing a C++ function declaration with Perl 6 grammar

I wrote a Perl 6 grammar to parse a C++ function. My final goal would be to parse an entire header. The aim is not to correct C++ syntax errors, but to parse valid C++. Do you have some advice or ...
4 votes
0 answers
83 views

Correct user typos in a C source file using Perl 6 grammar

To learn about Perl 6 grammars, I created a simple parser for C source files. Note that this is a constructed example motivated by this question. The point is to parse a C source file and correct user ...
11 votes
3 answers
203 views

Mass and length calculator using Perl 6 custom operator

I am studying chemistry in the university, and then I try to write all the things in the textbook with Perl6 or Perl, like balancing the chemical formula or other process! Then I encountered the ...
4 votes
1 answer
111 views

Get sum of an array in 3 ways, for, while and recursive

So i was trying to find sum of an array using 3 ways in perl6 for while recursive (I know there are inbuilt perl6 functions for this) I want to know if there is a better way to do this or is this it? ...
5 votes
2 answers
181 views

Break an array into n equal or almost-equal sized sublists

I want to break a larger list into $num-lists smaller lists. I thought that there might be an option for rotor that would ...
7 votes
3 answers
324 views

Perl 6 oneliner to sum up all numbers in a text file

The task is to sum up scores mentioned in a text file. Scores are floating point numbers as defined by the regexp float immediately preceded by a * character to ...
user7610's user avatar
  • 559

15 30 50 per page
1
2

AltStyle によって変換されたページ (->オリジナル) /