🦋 Welcome to Raku! raku.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: colabti.org/irclogger/irclogger_log/raku
Set by ChanServ on 14 October 2019.
cpan-raku New module released to CPAN! Red (0.1.11) by 03FCO 01:35
cpan-raku New module released to CPAN! Red (0.1.12) by 03FCO 01:59
abraxxa we should get Raku in there: github.com/postmanlabs/postman-code-generators 06:21
ufobat When I create a rakutest in Comma (the IDEA plugin version of it), comma seems not to be aware of imported subs. I get a syntax error on `done-testing;` stating it has not been declared. Any advice? 07:33
ab5tract o/ #raku 08:01
thought you might appreciate the first post on my new blog: 5ab5traction5.bearblog.dev/apl-keyboard-keeper/
ab5tract it's part of an on-going series called "Raku to the Rescue" 08:02
sena_kun ufobat, do you have latest version of complete one? 08:20
ufobat, you need to either create raku SDK and set it for the whole project or if you are using latest complete, there is another nice way to have raku SDK added in this release. 08:21
ufobat what is "complete"? the not-plugin-version? 08:22
sena_kun ufobat, complete == not community, the one with paid subscription. It provides both plugin and non-plugin version with more features, has shorter release cycle and other goodies. 08:23
ufobat ah! no I do have the community version
sena_kun Global SDK then. Or in a month we will do a new community release with another way on board. 08:24
sena_kun afk& 08:25
ufobat sena_kun, thank you. :-) 08:31
ufobat sena_kun, it worked on the comma ide (non-plugin version). I did the same on idea with the plugin, and it did not work :( 08:37
but that was right hint :) 08:38
sena_kun ufobat, hmm, so setting project SDK to be raku one works or? 08:49
ufobat it works on comma ide, it does not wor on idea with the comma plugin,
ufobat (I've deleted the .idea folder and imported in again, but it stays broken) 08:50
sena_kun ufobat, did not work in what way? 08:51
ufobat i could apply the settings, so the raku sdk is attacht to that project. but the syntax errors are still found. those for `done-testing` and stuff 08:52
sena_kun oh 08:54
ufobat, is it persistent after restart?
ufobat yeah, it is persistent
sena_kun sigh 08:55
No luck then. Previous release did improve some parts in this area and I hope to address more platform-specific issues in next one. They are the most complex to resolve and usually the most annoying when you have resources shortage. 08:57
ufobat on comma i can not install other plugins, is that intentional?
sena_kun ufobat, not really, that's an old bug fixed about two releases ago. 08:58
ufobat i've got comma 2020.04 08:59
sena_kun This one doesn't ship the fix, I'm afraid. 09:00
ufobat a different topic: i couldn't find which version of idea is supported for the comma-plugin, because it does not work on the latest idea
ufobat but comma 2020.04 is the latest one to download on the website :( 09:01
sena_kun ufobat, 2019.3 works with it. 2020.3 is supported since 2020.05. 09:02
ufobat i've idea 2020.1.2 which does not work with the plugin 09:03
sena_kun Yes, latest community Comma plugin works with idea 2019.3. 09:04
ufobat except for me :( well i guess i need to wait for the next comma release so I could either use comma and install my own plugins, or i could use comma on a different ide, where the SDK works 09:07
s/ide/idea version/ 09:09
sena_kun ufobat, can you install your plugins from filesystem?
ufobat yeah i guess that might work :) 09:10
sena_kun The bug is related to plugin market, but the plugin stallation should work given they are compatible with 193 build (that is, 2019.3 IDEA version. 09:11
ufobat yes, i think i am happy now 09:22
sena_kun Yay
ufobat thanks for all the hints and help :) 09:24
sena_kun No problem, ping me anytime about this. I am quite ashamed you had to go through all this, though.
Zero_Dogg Hi! I've been using Raku for a small command-line app that I've been hacking on, and I'm noticing that it's quite slow to start. A simple '--version' which just outputs the version number takes 3 seconds. Are there any specific features of the language that are really slow to compile in the current implementation? (rakudo/moarvm) 09:42
ufobat you can have you code in a module, because modules get precompiled 09:47
this should increase the startup speed a lot 09:48
if you need an example: modules.raku.org/dist/cro:cpan:JNT...ls/CLI.pm6 09:49
samebchase- ab5tract: Nice post!! 09:50
Zero_Dogg thanks, that might be a good idea, since the overhead is quite a lot for a cli-app. Is there some sort of generally-agreed-upon magic for a script to locate its own lib dir? Ie. I'd like to support someone just cloning the repo, andsymlinking the executeable script into ~/bin 09:52
(ie. FindBin+use lib "$FindBin::RealBin …" used to be a way to do it in perl) 09:55
sena_kun Zero_Dogg, we don't do it this way here. You can provide a distribution of your app with code in `lib` and `bin`. The zef package manager on `zef install A::Cool::App` will install lib and bin in a way which would work for the user. 09:57
I mean, you create a normal "module" (which is called distribution) here with your code, tests, docs, resources and maybe runner scripts in `bin`. Then it can be managed using zef for the end-user. 09:58
Zero_Dogg sena_kun: Yep, I realize that, but that breaks the expectation of clone repo->run. I can appreciate it being cleaner, but for simply trying out something, having to resort to yet another package manger probably isn't worth it. 10:06
tellable6 Zero_Dogg, I'll pass your message to sena_kun
Altai-man_ Zero_Dogg, I am not sure what is your goal. Do you want it to be handy for developers of the module or for users? 10:08
Zero_Dogg Altai-man_: It's not a module. It's a command-line application, so intended for home end-users. It just happens to be written in Raku. 10:09
Zero_Dogg Right now, it's just a single file, around 2300 lines including comments and docs. But it's painfully slow to start up. So the recommendation was to split parts of it into a module that the script just loads, to get precompilation. But I'd rather not require users to fiddle with zef unless they have to. 10:11
Altai-man_ Zero_Dogg, well, technically you can go with `use lib $?FILE.IO.parent.child('lib')` or something like this. It takes compile-time path to the script executed in $?FILE, then gets lib directory path and adds this path into a path to search modules for. 10:12
s/into a path/into paths/ 10:13
Zero_Dogg Altai-man_: I'll look into that, thanks. Will raku still precompile the libs though, or is that something that zyf does on install-time?
Altai-man_ Zero_Dogg, it will still precompile them.
Zero_Dogg Altai-man_: Right then. Thanks! 10:14
I'm not opposed to releasing a distribution of it at all, that might even be a preferred way to install it, I just don't want to break existing expectations of clone->run
lizmat Zero_Dogg: you should realize that zef is a frontend to module installation logic that is in the core 10:17
Zero_Dogg lizmat: right, but pretty much the de-facto one at this point, isn't it 10:19
lizmat yes
Zero_Dogg Is .pm6 still the recommended module extension, or is it being phased out for something more raku-ish? 10:37
dakkar `.rakumod`, I believe 10:38
antoniogamiz rakumod? is not that too long_?
tellable6 2020-06-27T13:42:39Z #raku <tbrowder> antoniogamiz: hello
antoniogamiz tbrowder: hi :D
jnthn antoniogamiz: No. 10:39
antoniogamiz :) 10:40
dakkar unless you're using DOS or CP/M, I don't think there's any restriction on filename length
antoniogamiz I will have to rename my module files then
is this change documented anywhere?
MasterDuke github.com/Raku/problem-solving/bl...extensions 10:48
antoniogamiz ty 10:52
cpan-raku New module released to CPAN! App::Mi6 (0.4.0) by 03SKAJI
CIAvash I couldn't find anything about the `perl` keyword in META6.json in Path-To-Raku.md. Is that not going to change? 11:00
lizmat CIAvash: I guess that was forgotten, assume it will be superseded by "raku" at some point, I'd say 11:15
for a long time, I assume both will be supprted
ufobat is there anything i need to do beside set a breakpoint and run a script in the debugger in comma, in order to stop at this breakpoint? 11:37
Altai-man_ ufobat, not really. But current MoarVM support of breakpoints is LTA, so you might have troubles with 1)breakpoints being hit more than once; 2)breakpoints not being hit. The second case is resolved by simply adding some, dunno, say statement around the place you want to look at and add a couple more breakpoints on them. 11:44
ufobat none of my breakpoints get hit :-( 11:46
Altai-man_ ufobat, I wish we had more moarvm-level hackers with time on hands... The workaround I wrote above usually helps. 11:47
ufobat I've added a couple of says and added a breakpoint on each. unfortunatelly it didnt help. 11:49
pheix Hi, friends! Just noticied that download link for Star Bundle 20.01 sources (linux&mac) is returning 404 (((( rakudo.org/latest/star/src 11:50
Altai-man_ ufobat, you might want to add more... 11:51
ufobat like 10? 11:52
Altai-man_ ufobat, 6-8? 11:53
If you have 10 and it doesn't work, then, erm, I assume you are running it in debug mode. As in, not `Run script foo`, but `Debug script foo` in Run menu.
ufobat i had 7, let me add 4 more.. 11:54
antoniogamiz Test::Output has been deleted?!
ufobat yeah I pushed "debug script"
nope :( 11:55
doesn't work
Altai-man_ No luck then, sorry.
antoniogamiz ignore my last message, my zef installation is not finding modules for some reason
Zero_Dogg Do I need to define a 'unit' within a rakumod-file (like perl5 'package')? Ie. if I've got a single class in lib/Foo/base.rakumod declared with 'class fooBase is export', do I need a unit declaring 'unit Foo::base;' as well? 11:57
antoniogamiz Zero_Dogg: or 'class diaso {}' or 'unit class diaso;' 11:58
Zero_Dogg antoniogamiz: What I'm unclear about is what is implicit here. I want a base class that I load with 'use Foo::base'; If I just declare 'unit class Foo::base'; in that file, will said class be exported as "Foo::base" upon 'use Foo::base'? 12:01
antoniogamiz yep 12:02
Zero_Dogg Thanks, I wasn't quite sure from reading the docs 12:03
antoniogamiz you can always test it locally
antoniogamiz open an issue if you think that part of the docs is unclear 12:03
Zero_Dogg I'll do that 12:04
fluca1978 hi, given an array of integers like (1,1,2,3) I would like a smart test to see if a number appears more than once. So far I've found only: `for @digits -> $number { $ok = False if @digits.grep( $number ).elems > 1; } Any suggestion? 12:20
sena_kun fluca1978, you want to see if any numbers appears more than once or some specific one? 12:21
tellable6 hey sena_kun, you have a message: gist.github.com/52cf13c057560d8296...41a34c295b
MasterDuke m: my @a = 1,2,3,3; say @a.elems == @a.unique.elems 12:23
camelia False
sena_kun m: my @a = 1, 1, 2, 3; say @a.unique.elems == @a.elems;
camelia False
MasterDuke jinx
sena_kun hehehe
MasterDuke, I still think this is not very efficient, right? I mean, we probably want to lazy gather in a hash. 12:24
MasterDuke but that's not going to short-circuit if/when there's a duplicate
yeah, just depends on how big the arrays are going to be
oddp There's also: 12:25
m: say [1,2,3,1,2].repeated
camelia (1 2)
sena_kun m: my @a = 1, 1, 2, 3; my %h; for @a { with %h{$_} { say "False!" } else { %h{$_} = True } } 12:26
camelia Use of uninitialized value %h{'1'} of type Any in string context.
Methods .^name, .raku, .gist, or .say can be used to stringify it to something meaningful.
in block at <tmp> line 1
Use of uninitialized value %h{'1'} of type Any in string con…
sena_kun wat 12:27
fluca1978 MasterDuke: thanks, `unique` was what I was looking for
sena_kun m: my @a = 1, 1, 2, 3; my %h; for @a -> $n { with %h{$n} { say "False!"; last } else { %h{$n} = True } }
camelia False!
oddp Isn't (...).repeated.first short-circuting?
MasterDuke dunno. wouldn't depend on how .reapeated is implemented, right? 12:28
ufobat fixed a bug im Time::Crontab :D yeah 13:32
first contribution to open source since month :) 13:33
sena_kun ufobat++ 13:34
cpan-raku New module released to CPAN! App::Mi6 (0.4.1) by 03SKAJI 13:47
lizmat PSA: this weeks RWN is going to be so big, it will be a late one, or an early one tomorrow 14:18
Altai-man_ lizmat, cloud conf? 14:24
lizmat that, and the elephant in the room
Altai-man_ oh
lizmat, don't push yourself too much. :) 14:25
lizmat it's quite a big elephant :-)
jdv79 lizmat: to try your match refactor all taht's needed is to checkout that rakudo branch and make install? 14:28
lizmat jdv79: yes
jdv79 did that - my grammar heavy use case seemed only slightly slower - maybe 2-3%... 14:29
lizmat well, the intent is to make it faster :-)
could you run a --profile and post that somwhere ?
jdv79 at least it wasn't a lot slower;)
maybe sometime soon - i'll make a note to myself 14:30
lizmat ++jdv79
melezhik I am thinking about writing of series of post on Raku - Devops using Sparrow 15:44
things like automation of docker containers, installing Raku dependecies, running cro/web applications, so on 15:45
if that sounds like an interesting topic - please let me know
Altai-man_ melezhik, this sounds like an interesting topic. Any activity with "Raku programming language" is very helpful, I think, more content/promotion and so on. 15:47
melezhik yeah, I am trying to be more specific, I have a breadth of experience ... but I am kind a "blind" in a sense I don't use Raku often 15:48
so if Raku people bring up any more specific subjects - I'd more then happy to cover them up 15:49
melezhik maybe worth to post a questionnaire on reddit/r/rakuland, I don't know ... 15:51
an interesting word came up accidentally, "RakuLand" :-) 15:53
melezhik reserve the one for future needs )))) 15:54
timotimo .o( screencasts ) 16:00
abraxxa just a short note before I forget it: I thought about the sigils and a guide like the following might help to understand it's benefits: 16:14
abraxxa A variable prefixed with the @ sigil is guaranteed to contain an object that does one of the following (or all?) roles: .... 16:14
antoniogamiz abraxxa: are you asking for a new guide in the docs? 16:20
antoniogamiz uzl[m]: well with Pod::To::HTML :) 16:21
well done*
cpan-raku New module released to CPAN! Math::Libgsl::LinearAlgebra (0.0.1) by 03FRITH 16:42
cpan-raku New module released to CPAN! Time::Crontab (1.0.0) by 03UFOBAT 16:48
lizmat notable6: weekly 17:26
notable6 lizmat, 6 notes: gist.github.com/5ef2009536a48cd6e1...f0fec9f343
lizmat notable6: weekly reset 17:30
notable6 lizmat, Moved existing notes to “weekly_2020-06-29T17:30:07Z”
lizmat takes a break for a few hours, to finish the RWN later today 17:36
antoniogamiz . 17:59
El_Che no messages for ou :) 18:18
y
melezhik .tell Altai-man_ here is the draft of my very first post on the series - github.com/melezhik/RakuOps/tree/m...er-sparrow 18:48
tellable6 melezhik, I'll pass your message to Altai-man_
Geth doc/finanalyst-patch-1: 8a09dcc0c3 | (Richard Hainsworth)++ (committed using GitHub Web editor) | doc/Language/functions.pod6
Expand on the use of {*} with proto

The documentation was not as clear as I needed. I tried several times to understand it, but failed. I got it nearly right when I asked on perl6-users. Crucially '{*}' is a special token without whitespace - this needs to be noted. The extra example combines the proto declaration with methods that use it.
19:48
doc: finanalyst++ created pull request #3500:
Expand on the use of {*} with proto
19:50
Geth doc/finanalyst-patch-1: 7b8d232298 | (Richard Hainsworth)++ (committed using GitHub Web editor) | doc/Language/functions.pod6
inside the curly braces - edit
20:12
doc/finanalyst-patch-1: 96d1c49949 | (Richard Hainsworth)++ (committed using GitHub Web editor) | xt/code.pws
add example classname 'newclass'
20:15
lizmat and yet another Rakudo Weekly News hits the Net: rakudoweekly.blog/2020/06/29/2020-...loud-gone/ 21:21
oddp Thank you, liz! 21:23
Grinnz that list of tweets is pretty good evidence for why i suggested not to use 7... but i think the prior art of php 7 and such help with the messaging at least :/ 21:25
lizmat fwiw, I also suggested to not use 7 to Sawyer 21:29
El_Che what's done is done :) 21:30
lizmat is my impression wrong that Perl 7 is not a done deal yet, at least not wrt p5p ? 21:31
Grinnz that's kind of the discussion itself right now :P
El_Che I don't think they can backtrack now 21:31
the discussions it's probably about what perl 7 means 21:32
Grinnz while i want and hope that perl 7 means something different, yeah, i don't see the overall major version usage changing
El_Che Grinnz: what do you mean? everyone will stick with 5? 21:33
Grinnz er
Grinnz sorry let me reword that... i don't see the direction of releasing a "perl 7" changing 21:33
melezhik where can I find a documentation on class for loop?
i=1; i++; i<10;
melezhik classic 21:33
lizmat loop ? 21:34
El_Che loop
melezhik iterator
lizmat docs.raku.org/syntax/loop
melezhik thanks
El_Che m: loop (my $i = 0; $i < 10; $i++) { .say }
camelia (Any)
(Any)
(Any)
(Any)
(Any)
(Any)
(Any)
(Any)
(Any)
(Any)
melezhik I saw this, but every time I need this, I forget where it is ))))
El_Che ok, something like that
melezhik yeah, sure, thanks! 21:35
melezhik m: my $g = 32 dev 2; loop ( my $i = $g; $g > 0; $g = $g div 2 ) { say $i } 21:37
camelia 5===SORRY!5=== Error while compiling <tmp>
Two terms in a row
at <tmp>:1
------> 3my $g = 327⏏5 dev 2; loop ( my $i = $g; $g > 0; $g =
expecting any of:
infix
infix stopper
postfix
stateme…
El_Che div?
melezhik yeah
El_Che "32 dev 2" 21:38
melezhik ahh ... ok
melezhik m: my $g = 32 div 2; loop ( my $i = $g; $g > 0; $g = $g div 2 ) { say $i } 21:38
camelia 16
16
16
16
16
melezhik m: loop ( my $g = 32 div 2; $g > 0; $g = $g div 2 ) { say $i } 21:40
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$i' is not declared
at <tmp>:1
------> 0332 div 2; $g > 0; $g = $g div 2 ) { say 7⏏5$i }
melezhik m: loop ( my $g = 32 div 2; $g > 0; $g = $g div 2 ) { say $g }
camelia 16
8
4
2
1
melezhik m: loop ( my $g = 32 div 3; $g > 0; $g = $g div 3 ) { say $g }
camelia 10
3
1
melezhik m: my @a = 1,2,3; loop (my $i = 1; $i > 1 && @a[$i-1] > 1; $i++; ) { say $i } 22:09
camelia 5===SORRY!5=== Error while compiling <tmp>
Malformed loop spec (expected 3 semicolon-separated expressions but got more)
at <tmp>:1
------> 3(my $i = 1; $i > 1 && @a[$i-1] > 1; $i++7⏏5; ) { say $i }
melezhik m: my @a = 1,2,3; loop (my $i = 1; $i > 3 && @a[$i-1] > 1; $i++; ) { say $i }
camelia 5===SORRY!5=== Error while compiling <tmp>
Malformed loop spec (expected 3 semicolon-separated expressions but got more)
at <tmp>:1
------> 3(my $i = 1; $i > 3 && @a[$i-1] > 1; $i++7⏏5; ) { say $i }
melezhik m: my @a = 1,2,3; loop (my $i = 1; $i <= 2 && @a[$i-1] > 1; $i++; ) { say $i } 22:10
camelia 5===SORRY!5=== Error while compiling <tmp>
Malformed loop spec (expected 3 semicolon-separated expressions but got more)
at <tmp>:1
------> 3my $i = 1; $i <= 2 && @a[$i-1] > 1; $i++7⏏5; ) { say $i }
melezhik what is wrong with my loop statement?
m: my @a = 1,2,3; loop (my $i = 1; $i <= 2 && $i > 1; $i++; ) { say $i }
camelia 5===SORRY!5=== Error while compiling <tmp>
Malformed loop spec (expected 3 semicolon-separated expressions but got more)
at <tmp>:1
------> 3loop (my $i = 1; $i <= 2 && $i > 1; $i++7⏏5; ) { say $i }
melezhik m: my @a = 1,2,3; loop (my $i = 1; $i <= 2 and $i > 1; $i++; ) { say $i }
camelia 5===SORRY!5=== Error while compiling <tmp>
Malformed loop spec (expected 3 semicolon-separated expressions but got more)
at <tmp>:1
------> 3oop (my $i = 1; $i <= 2 and $i > 1; $i++7⏏5; ) { say $i }
melezhik m: my @a = 1,2,3; loop (my $i = 1; ($i <= 2 and $i > 1); $i++ ) { say $i } 22:11
camelia ( no output )
melezhik ah, it was last semi column
Xliff \o 23:56
I want to annotate enum entries, however it doesn't look like I can POD-After document each enum entry. How difficult would it be to add that?
Is this something that can be done in module space?
I suspect I might need a Slang to get that to work. 23:57