🦋 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:06 guifa left 00:08 reportable6 left
sienet_ja_LSD[m] rakubrew just built raku + moarvm on my openbsd 7.0 just fine, I don't know why it didn't work last time I tried 00:21
00:23 squashable6 joined 00:40 guifa joined 00:42 getimiskon left 01:09 reportable6 joined 01:32 ggoebel left 02:37 tellable6 left, greppable6 left, squashable6 left, bisectable6 left, committable6 left, bloatable6 left, evalable6 left, statisfiable6 left, releasable6 left, sourceable6 left, quotable6 left, benchable6 left, linkable6 left, shareable6 left, notable6 left, reportable6 left, coverable6 left, unicodable6 left, nativecallable6 left, nativecallable6 joined, linkable6 joined 02:38 greppable6 joined, bisectable6 joined 02:39 squashable6 joined, reportable6 joined, sourceable6 joined, coverable6 joined 02:40 tellable6 joined 03:24 vrurg joined 03:27 vrurg_ left 03:37 shareable6 joined 03:38 evalable6 joined 03:39 bloatable6 joined, notable6 joined, benchable6 joined 03:40 statisfiable6 joined, vrurg left, vrurg joined 04:39 unicodable6 joined, quotable6 joined 05:40 committable6 joined 05:45 samebchase joined 06:07 reportable6 left 06:13 Sgeo left 06:14 Sgeo joined 06:40 releasable6 joined, vrurg_ joined 06:42 vrurg left 07:15 ggoebel joined 07:25 seednode left 07:26 seednode joined 08:33 euandreh left 08:34 euandreh joined 09:10 reportable6 joined 09:48 Colt left 09:49 Colt joined
El_Che \o/ 10:01
10:49 evalable6 left, linkable6 left 10:50 linkable6 joined 10:51 evalable6 joined 11:45 Sgeo left 11:51 ssaint joined 12:04 abraxxa-home joined 12:07 reportable6 left 12:13 stoned75 left 12:36 ssaint left, tejr left 12:37 tejr joined, abraxxa-home left 12:41 MoC joined 12:49 mscha joined
mscha m: my $s = 'abcde'; my $m = $s.match(/c/), say $m.from; say $m.to; say $s.substr($m.from .. $m.to); 12:51
camelia 2
3
cd
mscha Isn't this wrong?  The doc says: method to() 12:52
Returns the index of the end position of the match.
docs.raku.org/type/Match#method_to
13:02 stoned75 joined 13:15 MoC left 13:16 stoned75 left
CIAvash mscha: `.to` is where match ended. And where it might [continue](docs.raku.org/language/regexes#Continue). Also see design.raku.org/S05.html#line_3098 where it mentions `$/.chars` is `$/.to - $/.from`. 13:47
mscha CIAvash: well, then the documentation is wrong.  Issue submitted. 14:06
github.com/Raku/doc/issues/4000
14:08 reportable6 joined 14:34 Manifest1 left
CIAvash if you think of the end position as `$/.pos`, it is correct 14:42
14:44 Manifest0 joined 14:47 [Coke] left 14:51 [Coke] joined, dextercd joined 15:19 lichtkind joined
guifa lizmat: ty for the DateTime is DateTime + CORE::DateTime trick, so far that I can tell it's cleaned up my code a good bit 15:27
15:33 monkey_ joined 15:55 monkey_ left 15:58 monkey_ joined 16:58 linkable6 left, evalable6 left 17:03 p6steve joined 17:08 p6steve_ joined
MasterDuke mscha: this is the implementation of `substr(Range)`, maybe there's a bug you can spot? github.com/rakudo/rakudo/blob/mast...3487-L3502 17:13
17:16 p6steve left 17:58 Guest1254 joined 18:00 evalable6 joined 18:08 reportable6 left
CIAvash no it's correct, it needs to be written as `$s.substr($m.from ..^ $m.to)`, because `$m.to` is the last position of the match 18:08
m: my $s = 'abc'; my $m = $s.match(/ { $/.pos.say } c /) 18:09
camelia 0
1
2
18:09 reportable6 joined
CIAvash m: my $s = 'abc'; my $m = $s.match(/ c { $/.pos.say } /) 18:09
camelia 3
18:19 p6steve_ left 18:20 p6steve joined 18:25 p6steve left 18:38 p6steve joined
Guest1254 Urgent: "Raku track at FOSDEM needs more talks" 18:54
www.reddit.com/r/rakulang/comments...ore_talks/
Anton Antonov Where the talks can be submitted? 18:58
18:59 linkable6 joined
Meaning, should it be done through the FOSDEM22 system or someone from "the Raku team" have to be emailed? 18:59
19:00 p6steve left
lizmat Anton Antonov: ideally you should get a login on pentabarf 19:04
if that is troublesome, you could let me know a gist of what you want to do, and I'll try to enter it on your behalf
Anton Antonov lizmat: Thank you for the clarification! I was preparing for JJ Merelo efforts in "Advent of Code" an article on "Data wrangling with Raku." I am terribly late with article, but it might become a good talk. 19:12
19:12 p6steve joined
lizmat it could well be both :-) 19:12
Anton Antonov Ah! Ok, I will try to finish this weekend then... 19:14
lizmat: Also, thank you for implementing the terribly needed and useful `Acme::Text::UpsideDown` !!
lizmat had forgotten all about it :-) 19:15
Anton Antonov Well, I submitted and issue I have on GitHub... 19:16
Well, I submitted an issue I have on GitHub...
lizmat yeah, saw that, will get to it soon 19:23
19:26 Sgeo joined
Anton Antonov lizmat: Here is the abstract of "Data wrangling with Raku": In this document we demonstrate and explain different data wrangling techniques in Raku using a specially made system of packages. We start with a general discussion on data wrangling's place in data science and why that influenced the choice of data structures that are easily interpreted in tabular data format and, the same time, natively repre 19:29
tonyo lizmat: orgs is now in fez
i'll do a write up on how to use it
lizmat tonyo: thanks!
tonyo but in the meantime the commands are in fez and the gist of roles are `admin|member`, admin can add/remove users and modify the role, members cannot. both can upload 19:30
Anton Antonov lizmat: I will make a dedicated GitHub page for that presentation / document later today.
lizmat Anton Antonov: looking forward to int 19:31
tonyo: probably won't have time to look at it today, but will do so tomorrow
Anton Antonov lizmat: Thank you! (It is encouraging...) 19:32
lizmat :-)
19:36 Guest1254 left 19:46 p6steve left 19:47 Guest125 joined 19:48 Guest125 left 19:57 p6steve joined
Anton Antonov I got interested recently in the macOS and iOS app called Siri Shortcuts. I am interested in utilizing it with Raku. I can call scripts from Shortcuts, so in principle Raku scripts should be easy to invoke. But Shortcuts also uses a a protocol called "x-callback-url" -- see (x-callback-url.com) -- which allows queries like this: `targetapp://x-callback-url/updateStatus?x-source=SourceApp&text=[Us 20:01
20:01 mcmillhj joined
Or probably some Raku solutions for this already exist, I just don't know how to find them... 20:01
I got interested recently in the macOS and iOS app called Siri Shortcuts. I am interested in utilizing it with Raku. I can call scripts from Shortcuts, so in principle Raku scripts should be easy to invoke. But Shortcuts also uses a a protocol called "x-callback-url" -- see (x-callback-url.com) -- which allows queries like this: `targetapp://x-callback-url/updateStatus?x-source=SourceApp&text=[Us 20:02
mcmillhj m: sub bits-to-int(Int @bits) { :2(@bits.join(''); } say bits-to-int([0, 1, 1, 0]); 20:03
camelia ===SORRY!=== Error while compiling <tmp>
Unable to parse expression in parenthesized expression; couldn't find final ')' (corresponding starter was at line 1)
at <tmp>:1
------> -to-int(Int @bits) { :2(@bits.join(''); ⏏} say bits-t…
tellable6 2021-12-14T10:59:15Z #raku <SmokeMachine> mcmillhj m: my @pairs = :a(0), :b(1); for @pairs ->(:$key,:$value) { say "k: $key, v: $value" }
mcmillhj m: sub bits-to-int(Int @bits) { :2(@bits.join('')); } say bits-to-int([0, 1, 1, 0]);
camelia ===SORRY!=== Error while compiling <tmp>
Strange text after block (missing semicolon or comma?)
at <tmp>:1
------> o-int(Int @bits) { :2(@bits.join('')); }⏏ say bits-to-int([0, 1, 1, 0]);
expecting any of:
infix
mcmillhj m: sub bits-to-int(Int @bits) { :2(@bits.join("")); }; say bits-to-int([0, 1, 1, 0]); 20:04
camelia Type check failed in binding to parameter '@bits'; expected Positional[Int] but got Array ([0, 1, 1, 0])
in sub bits-to-int at <tmp> line 1
in block <unit> at <tmp> line 1
mcmillhj ^ what's the correct way to type bits-to-int above? I always seem to struggle with Array types in Raku 20:05
20:05 p6steve left 20:07 p6steve joined
lizmat m: sub a(@a where .all ~~ Int) { dd }; a (1,2,3) # mcmillhj 20:08
camelia sub a(@a where { ... })
mcmillhj oh okay, I thought since Array implemented Positional it would work the other way. Or also with `Array[Int] $bits`. 20:09
20:17 p6steve left 20:18 p6steve joined
p6steve show_names_on_join off 20:20
m: sub a(@a where .all ~~ Int) { dd }; a (1,2,3) 20:22
camelia sub a(@a where { ... })
21:13 kjp left 21:17 mcmillhj left 21:47 kjp joined 21:48 lichtkind_ joined 21:51 lichtkind left 21:57 dustinm` left 22:10 dustinm` joined 22:21 monkey_ left 23:11 mscha left 23:17 monkey_ joined 23:19 discord-raku-bot left, discord-raku-bot joined 23:28 RandalSchwartz joined 23:32 RandalSchwartz left 23:57 lichtkind_ left