🦋 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.
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
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 }
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
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
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
lizmat Str :$dir = "" 08:11
??
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
[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
[Coke] wow 13:46
Geth doc: rbt++ created pull request #4052:
Update modules.pod6
14:37
[Coke] is ^^ correct? Do we support raku as that field name or just perl still? 15:10
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
Geth doc/search-categories-update: f38545c41b | Coke++ | doc/Language/5to6-perlfunc.pod6
typo
16:06
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<>
Geth doc: 53319ff11b | Coke++ | xt/links-not-links.t
skip file until #4053 is resolved
19:35
Geth doc/search-categories-update: 27 commits pushed by Altai-man++, Coke++
review: github.com/Raku/doc/compare/e3b07f...83761e3b1a
19:37
[Coke] docs#4053 looks like it's really a bug with Pod::To::HTML if someone wants to dig. 19:46
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
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
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)
[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
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