ūü¶č Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). This channel is logged for the purpose of keeping a history about its development | evalbot usage: 'm: say 3;' or /msg camelia m: ... | Log inspection is getting closer to beta. If you're a beginner, you can also check out the #raku-beginner channel!
Set by lizmat on 25 August 2021.
00:07 reportable6 left 00:08 reportable6 joined 00:27 rbt left 01:13 ToddAndMargo joined
ToddAndMargo anyone on newbie duty?  Is there an escape for "while" and "until" loops?  Sort of like  "last" for "for" loops, 01:15
moon-child last should work just fine 01:16
ToddAndMargo my $x = 0; 01:19
while $x <= 10 {
    $x = prompt 'Enter a number, which is not bigger than 10: ';
    say "You entered $x.";
    if $x eq 3  { last; }
}
say "$x is bigger than 10.";
2
Enter a number, which is not bigger than 10: 4
You entered 4.
Enter a number, which is not bigger than 10: 3
You entered 3.
3 is bigger than 10.
> 6
6
tried `$x == 3` too
11 do not escape either 01:20
wait.  I was misreading the output. "last" worked fine. 01:21
Thank you for the help!
Voldenet actually no problem 01:22
01:24 rbt joined
Voldenet btw, in your case it might be saner to use `loop` instead of while 01:28
> loop { my $x = prompt("x: "); say "$x is greater than 10" if $x > 10; last if $x == 3 }
01:34 RakuIRCLogger left, Geth left
ToddAndMargo I wanted both for my keepers file 01:57
This is what I did with it:
      while $Page < 21  {
         my Str $WebSitePage = $WebSite ~ "?page=" ~ "$Page";
         if  CurlExists( $WebSitePage )  {
            ( $WebPage, $PageStatus ) = CurlGetWebSite( $WebSitePage, True );
            if $WebPage.contains( "Release v" ) {
               if $Debug  { PrintGreen "$SubName\: WebSite = <$WebSitePage>\n"; }
               $ReleaseFound = True;
               last;
            } # contains
         } # if curl exists 01:58
         $Page += 1;
      } # while
      # if $WebPage.contains( "Release v" )  {
      if $ReleaseFound  {
these two woudl be nice: my int $Page = 1;
my bool, $ReleaseFound = False;
Voldenet fyi, if you don't use pastebin for large chunks of code, people could get mad at you later 02:04
ToddAndMargo ops.  Thanks for the tip 02:05
Voldenet and you don't really have to track $ReleaseFound 02:07
ofc it depends on what you are trying to do, but "No value" is also a correct value 02:08
m: sub find-release($page) returns Int { if $page eq "a" { return 42 }; return Int }; for "a", "b" { if my $rel = find-release($_) { say $rel } else { say "no value" }} 02:10
camelia 42
no value
Voldenet consider this
ToddAndMargo If $ReleaseFound triggers a bunch of stuff on the web page I downloaded.  I suppose I could put all that stuff in the loop, but I was modifying a kluge and let me keep the original code in place.  Originally, I was using if elseif over and over.  It is not pretty.
Voldenet In your case then webpage can be a (Str) or an actual value 02:12
ToddAndMargo love subs!  Thank you!  Once I know what ?page  "release v" occures on, them it is regex time 02:13
02:14 rbt left, rbt joined
ToddAndMargo pastebin.com/pMWJDFDH 02:15
The buzzards mix their nightlies and betas together.  So itis fun to find what page they put their latest general release on 02:17
Voldenet you know, you could've just used github api 02:28
> api.github.com/repos/brave/brave-b...er_page=10
set per_page to whatever insane value you want, there's also page variable
ToddAndMargo Hmmm.  So they tell me how many pages they have.   Thank you!   May just be easier to use "CurlExists".  api.github.com/repos/brave/brave-b...r/releases shows 29 pages. 02:32
03:09 rbt left 03:10 Guest35 left 03:28 frost joined 03:37 grizzlysmit left 04:00 rbt joined 04:11 xinming left, xinming joined 04:20 rbt left, rbt joined, ToddAndMargo left 04:44 PotatoGim joined 05:03 epony joined 06:03 releasable6 left, coverable6 left, greppable6 left, bisectable6 left, bloatable6 left, linkable6 left, shareable6 left, committable6 left, reportable6 left, notable6 left, statisfiable6 left, evalable6 left, sourceable6 left, nativecallable6 left, unicodable6 left, quotable6 left, benchable6 left 06:04 shareable6 joined, benchable6 joined, bloatable6 joined, quotable6 joined, greppable6 joined, linkable6 joined 06:05 coverable6 joined, notable6 joined, sourceable6 joined, bisectable6 joined, committable6 joined 06:06 nativecallable6 joined, reportable6 joined, releasable6 joined, rbt left, evalable6 joined 06:07 unicodable6 joined, statisfiable6 joined 06:08 ocomport left 06:10 mexen joined 06:18 abraxxa joined 06:23 abraxxa left, abraxxa joined 06:30 rbt joined 06:35 rbt left 06:37 rbt joined 06:39 Sgeo left 06:57 rbt left, rbt joined 07:01 lichtkind joined 07:28 [Coke] left 07:31 [Coke] joined 07:37 rbt left, rbt joined 07:45 fluca1978 joined
fluca1978 When checking a MAIN argument, I had a program that emitted a warn. This was working on ancient rakudo, e.g., 2020.01, but not on recent ones. Something like this: sub MAIN( Str :$dir where { .so && .IO.d // warn "Specify the directory [$dir]" } ) 07:46
is there a way to emit the warn without having raku to complain for an empty string if the argument is not specified? 07:47
08:06 dakkar joined 08:08 razetime joined
lizmat Str :$dir = "" 08:11
??
08:13 jjido joined
Voldenet I know it's uncool, but `sub MAIN(IO:D() :$dir) { unless $dir.d { warn "Specify the directory [$dir]"; }; }` is saner 08:23
also, signatures having side effects is probably not something desirable 08:27
08:42 rbt left 08:53 rbt joined 08:58 rbt left 09:02 Geth joined, RakuIRCLogger joined 09:03 TempIRCLogger joined 09:19 rbt joined 09:23 synthmeat left, synthmeat joined 09:26 synthmeat left, synthmeat joined 09:31 synthmeat left 09:32 synthmeat joined 09:34 rbt left, rbt joined 09:43 sena_kun left 09:54 sena_kun joined 10:02 razetime left, razetime joined 10:33 jjido left 10:39 rbt left, rbt joined 11:05 TempIRCLogger left 11:24 rbt left 11:27 gugod left, gugod joined 11:28 jercos left, jercos joined 12:07 reportable6 left 12:09 reportable6 joined 12:15 rbt joined 12:18 ocomport joined 12:39 ocomport left 12:55 rbt left, rbt joined 13:02 frost left 13:10 razetime left 13:11 razetime joined
[Coke] if by side effect you mean "default value", it's literally part of the language. 13:27
OH! you don't, you mean *fluca's* signature, not lizmat's. Whoops! 13:28
[Coke] is hopefully caught up now
lizmat clickbaits rakudoweekly.blog/2022/04/11/2022-15-wordling/ 13:29
[Coke] guesses that lizmat++ is the longest running newsletter generator for raku/perl 6 at this point.
lizmat I guess about 7 years now? 13:30
13:30 rbt left 13:31 rbt joined 13:35 sena_kun left 13:36 rbt left, rbt joined, sena_kun joined
[Coke] wow 13:46
13:48 Sgeo joined 14:33 jjido joined
Geth doc: rbt++ created pull request #4052:
Update modules.pod6
14:37
14:51 rbt left
[Coke] is ^^ correct? Do we support raku as that field name or just perl still? 15:10
15:20 razetime left, razetime joined
Geth doc/search-categories-update: a03478d15e | Coke++ | xt/search-categories.t
Identify incorrect category
15:41
doc/search-categories-update: 6e271bf366 | Coke++ | doc/Language/variables.pod6
add category
15:47 rbt joined, Guest35 joined 15:53 razetime left 15:54 razetime joined 16:02 rbt left, rbt joined
Geth doc/search-categories-update: f38545c41b | Coke++ | doc/Language/5to6-perlfunc.pod6
typo
16:06
16:07 abraxxa left 16:10 abraxxa-home joined 16:13 abraxxa-home left, abraxxa-home joined
Geth doc/search-categories-update: 8a7d8fd71f | Coke++ | doc/Language/operators.pod6
Remove Category

this is a C<>, not an X<>
16:22
doc/search-categories-update: e3b07f5192 | Coke++ | doc/Language/pragmas.pod6
add missing X<>
16:32 jjido left 16:35 dakkar left 16:42 rbt left, rbt joined 16:51 mexen left 17:17 djerius left 17:18 djerius joined 17:36 razetime left 17:43 rbt left 17:52 jjido joined 18:04 abraxxa-home left 18:05 sena_kun left 18:06 sena_kun joined 18:08 reportable6 left, reportable6 joined 18:31 jjido left 18:33 rbt joined 18:53 rbt left, rbt joined 19:00 jjido joined 19:18 n1to joined 19:34 rbt left, rbt joined
Geth doc: 53319ff11b | Coke++ | xt/links-not-links.t
skip file until #4053 is resolved
19:35
19:36 linkable6 left
Geth doc/search-categories-update: 27 commits pushed by Altai-man++, Coke++
review: github.com/Raku/doc/compare/e3b07f...83761e3b1a
19:37
19:37 linkable6 joined
[Coke] docs#4053 looks like it's really a bug with Pod::To::HTML if someone wants to dig. 19:46
19:46 linkable6 left 19:49 linkable6 joined 19:51 sena_kun left 19:54 sena_kun joined, rbt left, rbt joined 20:04 rbt left, rbt joined 20:35 rbt left, rbt joined 20:37 jjido left
Xliff Does TIOBE track Raku use? 20:44
lizmat it does afaik 20:48
it's one of the reasons I always mention "the Raku Programming Language" at least once in the weekly :-)
El_Che i rememeber raku entering at 93 20:49
Xliff Ah, OK. 20:51
Voldenet according to tiobe RPG and ABAP are more popular than bash and typescript is less popular than Awk
I'd really take those ratings with grain of salt
20:51 melezhik joined
melezhik I can finally announce first working CI for DBIish with mysql database support - twitter.com/melezhik2/status/15139...9909866497 20:52
it all runs in a alpine linux docker container with MariaDB ( mysql ) installed on the fly
github.com/melezhik/DBIish/blob/ma...rkyci.yaml 20:53
sparrowhub.io:2222/report/110
sparrowhub.io:2222/report/111
^^ SmokeMachine the same is possible to do for Red
20:54 melezhik left
SmokeMachine melezhik: thanks! I’ll take a look! 20:54
El_Che weekly: twitter.com/melezhik2/status/15139...9909866497 20:55
notable6 El_Che, Noted! (weekly)
21:12 n1to left 21:26 lichtkind_ joined 21:28 lichtkind left 21:29 Xliff left 21:50 lichtkind_ left 22:30 rbt left
[Coke] .ask ugexe - does META6.json support using 'raku' instead of 'perl' for the required language version? 22:41
asking for github.com/Raku/doc/pull/4052 22:46
23:30 lichtkind_ joined
Geth doc/search-categories-update: 0cbd82d3b8 | Coke++ | xt/search-categories.t
add synopsis
23:32
doc/search-categories-update: 283fa4760a | Coke++ | 3 files
Best guess on remaining categories
doc/search-categories-update: 9b21ac9f66 | Coke++ | xt/search-categories.t
Convert list of quotes to quoted list

Also explicitly mention the dimension # in the test output
23:33 greyrat_ left 23:35 lucerne left 23:37 lichtkind_ left