[00:00] *** reportable6 left [00:03] *** reportable6 joined [00:44] *** Manifest0 left [01:17] *** derpydoo joined [01:36] *** jpn joined [01:41] *** jpn left [01:53] *** jgaz left [02:20] *** tea3po left [02:20] *** tea3po joined [02:36] *** tea3po left [02:37] *** tea3po joined [03:24] *** jpn joined [03:29] *** jpn left [04:01] *** derpydoo left [04:05] *** xinming left [04:08] *** xinming joined [04:24] *** jpn joined [04:28] *** jpn left [05:01] *** jpn joined [05:06] *** jpn left [06:00] *** reportable6 left [06:01] *** reportable6 joined [06:01] *** jpn joined [06:31] *** jpn left [06:36] *** jpn joined [06:43] *** abraxxa joined [07:07] *** jpn left [07:21] *** sena_kun joined [07:40] *** sena_kun left [07:42] ¦ ecosystem: Demayl++ created pull request #618: remove Email::Valid Sys::IP and Terminal::Size [07:42] ¦ ecosystem: review: https://github.com/Raku/ecosystem/pull/618 [07:44] *** Manifest0 joined [07:47] *** zara joined [07:49] *** jpn joined [07:54] *** jpn left [07:54] *** zara left [08:47] *** jpn joined [08:55] *** Sgeo left [09:04] *** abraxxa left [09:21] *** timo left [09:24] ¦ ecosystem/main: 38f22680f4 | (Denis Kanchev)++ (committed using GitHub Web editor) | META.list [09:24] ¦ ecosystem/main: remove Email::Valid Sys::IP and Terminal::Size as they live now in the fez ecosystem (#618) [09:24] ¦ ecosystem/main: review: https://github.com/Raku/ecosystem/commit/38f22680f4 [09:48] *** lizmat left [09:52] *** lizmat joined [09:54] *** silug left [10:00] <_________> m: class A { our enum E ; has E $.E is rw; }; class B { our enum E ; has E $.E is rw; }; A.new(E => B::V1); [10:00] rakudo-moar 592d11d37: OUTPUT: «Type check failed in assignment to $!E; expected E but got E (E::V1)␤ in block at line 1␤␤» [10:00] <_________> "expected E but got E" ;D [10:01] * lizmat just blogged again: https://dev.to/lizmat/a-practical-example-of-rakuast-18jk [10:07] *** timo joined [10:13] *** thundergnat joined [10:14] lizmat++  BTW  instalment -> installment, RakUAST -> RakuAST [10:14] *** thundergnat left [10:14] instalment is UK spelling, installment is US [10:15] Brits hate Ls, Americans hate Us [10:16] anyways, fixed: thundergnat++ [10:17] we can use RakUAST for any user-added ast bits, kind of like the linux subsystems "uinput" :D [10:17] that's what macros are all about, no? [10:18] i guess so yeah [10:46] *** squashable6 left [10:48] *** squashable6 joined [10:53] *** silug joined [11:24] it would be nice if `use RakuAST::Regex` could be done, so `CharClassEnumerationElement::Character, Assertion::CharClass and CharClassElement::Enumeration` could be directly used [11:25] Voldenet: I think we will see some official and semi-official shortcuts [11:27] I'm not sure "use RakuAST::Regex" would help: I would be in favour of moving pragmas from "use" to a dedicated such as "pragma foo" and "pragma foo :off" [11:29] in fact: in RakuAST, pragmas already have their own class: [11:29] m: say Q|use strict|.AST.statements.head [11:29] `import RakuAST::Regex as Rx` ;) [11:29] rakudo-moar 592d11d37: OUTPUT: «RakuAST::Pragma.new(␤ off => 0,␤ name => "strict"␤)␤» [11:29] Voldenet: you can already do that with a constant? [11:29] my constant Rx = RakuAST::Regex ?? [11:31] neat [11:32] in that case I'm guessing the code can be massively shortened [11:36] being able to import whole RakuAST and RakuAST::Regex would be easier to work with locally, but `my constant R = RakuAST; my constant Rx = R::Regex;` would look more pleasant [11:38] lizmat: btw pre-cursor -> precursor [11:39] thanks, fixed [11:41] *** euandreh joined [11:59] *** cm_ joined [11:59] *** cm left [11:59] *** cm_ is now known as cm [12:00] *** reportable6 left [12:02] *** reportable6 joined [12:12] *** jpn left [12:46] *** PipStuart left [12:48] *** jpn joined [12:52] *** jpn left [13:05] *** jpn joined [14:05] *** notable6 left [14:05] *** coverable6 left [14:05] *** statisfiable6 left [14:05] *** bloatable6 left [14:05] *** sourceable6 left [14:05] *** committable6 left [14:05] *** quotable6 left [14:05] *** nativecallable6 left [14:05] *** benchable6 left [14:05] *** unicodable6 left [14:05] *** greppable6 left [14:05] *** evalable6 left [14:05] *** linkable6 left [14:05] *** releasable6 left [14:05] *** reportable6 left [14:05] *** tellable6 left [14:05] *** squashable6 left [14:05] *** shareable6 left [14:05] *** bisectable6 left [14:05] *** tellable6 joined [14:05] *** squashable6 joined [14:06] *** releasable6 joined [14:06] *** linkable6 joined [14:06] *** notable6 joined [14:06] *** quotable6 joined [14:07] *** committable6 joined [14:07] *** bloatable6 joined [14:07] *** greppable6 joined [14:07] *** statisfiable6 joined [14:07] *** reportable6 joined [14:07] *** unicodable6 joined [14:07] *** nativecallable6 joined [14:07] *** evalable6 joined [14:07] *** benchable6 joined [14:08] *** shareable6 joined [14:08] *** sourceable6 joined [14:08] *** bisectable6 joined [14:08] *** coverable6 joined [14:19] *** tea3po left [14:19] *** tea3po joined [14:22] *** teatwo joined [14:23] *** guifa_ joined [14:25] *** tea3po left [14:25] *** guifa left [14:55] *** codesections joined [14:56] lizmat: cool rakuast posts [15:14] *** Xliff_ joined [15:16] *** codesections left [15:16] *** codesections joined [15:16] elcaro: It may not be exactly what you want, but you could always .encode the Str when you get it. [15:19] How difficult would it be to implement COMPOSE? [15:20] *** Dan1968 joined [15:20] *** Dan1968 left [15:22] I am currently hacking away with a .Init method, but it would be nice to have a formal mechanism to properly incorporate roles into an object. Consider: role A { has $.a; method value { ... }; submethod COMPOSE { $!a = self.value / 2; }; }; class B { has $.b is built; method value { $.b }; }; my $b.new(b => 32); $b does A; [15:22] *** Sgeo joined [15:35] *** teatwo left [15:35] *** teatwo joined [15:52] *** teatwo left [15:52] *** teatwo joined [15:53] *** teatwo left [15:53] *** teatwo joined [16:56] *** jpn left [17:13] *** sena_kun joined [17:24] *** jpn joined [17:39] Is there an idomatic way of saying I would like an array containing the 100 values between 5 and 255? [17:40] I think this would be analogous to the Javascript map function. [17:41] which 100 values between 5 and 255 ? [17:41] that'd be 201 values ? [17:41] Or not... [17:41] well, 199 maybe then ? [17:41] No. Take 5..255 and get an array of 100 values between the two representing the stops. [17:42] (5..255).pick(100) [17:42] Nope. That's random. I want a linear function. [17:42] And my brain just doesn't want to Math right now. [17:43] I don't understand the question then [17:43] m: my $s = 250 / 100; say (5..255) »+»$s [17:43] rakudo-moar f2b69f53f: OUTPUT: «(7.5 8.5 9.5 10.5 11.5 12.5 13.5 14.5 15.5 16.5 17.5 18.5 19.5 20.5 21.5 22.5 23.5 24.5 25.5 26.5 27.5 28.5 29.5 30.5 31.5 32.5 33.5 34.5 35.5 36.5 37.5 38.5 39.5 40.5 41.5 42.5 43.5 44.5 45.5 46.5 47.5 48.5 49.5 50.5 51.5 52.5 53.5 54.5 55.5 56.5 57.…» [17:45] my $s = 250 / 100; say 5, |(6..255) »+» $s [17:45] Xliff, rakudo-moar 4b69dd51e: OUTPUT: «5(8.5 9.5 10.5 11.5 12.5 13.5 14.5 15.5 16.5 17…» [17:45] Xliff, Full output: https://gist.github.com/596e553a291fc12eed61ff907916c6a7 [17:45] my $s = 250 / 100; say |5, |(6..255) »+» $s [17:45] Xliff, rakudo-moar 4b69dd51e: OUTPUT: «5(8.5 9.5 10.5 11.5 12.5 13.5 14.5 15.5 16.5 17…» [17:45] Xliff, Full output: https://gist.github.com/1694c39b0d62560f488be3cc9ee6ca3d [17:45] Hrm. [17:45] my $s = 250 / 100; my @a = (5); @a.append: |(6..255) »+» $s; @a.gist.say [17:45] Xliff, rakudo-moar 4b69dd51e: OUTPUT: «[5 8.5 9.5 10.5 11.5 12.5 13.5 14.5 15.5 16.5 1…» [17:45] Xliff, Full output: https://gist.github.com/47f4663954b13690423b04002bdaa7c5 [17:49] my $s = 100 / 249; my @a = (5); @a.append: |(6..255) »+» $s; @a.gist.say [17:49] Xliff, rakudo-moar 4b69dd51e: OUTPUT: «[5 6.401606 7.401606 8.401606 9.401606 10.40160…» [17:49] Xliff, Full output: https://gist.github.com/d821a78e61d24ca87b0be1029088748e [18:00] *** reportable6 left [18:02] *** reportable6 joined [18:05] (0..99).map( * * 100) » [18:08] m: sub linear ($p, $s, $x = 0) { (0..$p).map( * * $s ) »+» $x }; linear(100, 2.5, 5).gist.say [18:08] rakudo-moar f2b69f53f: OUTPUT: «(5 7.5 10 12.5 15 17.5 20 22.5 25 27.5 30 32.5 35 37.5 40 42.5 45 47.5 50 52.5 55 57.5 60 62.5 65 67.5 70 72.5 75 77.5 80 82.5 85 87.5 90 92.5 95 97.5 100 102.5 105 107.5 110 112.5 115 117.5 120 122.5 125 127.5 130 132.5 135 137.5 140 142.5 145 147.5 …» [18:12] sub linear ($r, $p) { $r.map( * * $r.max / $p) »+» $r.min }; (5..255).linear(100).gist.say [18:13] m: sub llinear ($r, $p) { $r.map( * * $r.max / $p) »+» $r.min }; (5..255).linear(100).gist.say [18:13] rakudo-moar f2b69f53f: OUTPUT: «No such method 'linear' for invocant of type 'Range'. Did you mean␤'lines'?␤ in block at line 1␤␤» [18:13] m: sub linear ($r, $p) { $r.map( * * $r.max / $p) »+» $r.min }; (5..255).linear(100).gist.say [18:13] rakudo-moar f2b69f53f: OUTPUT: «No such method 'linear' for invocant of type 'Range'. Did you mean␤'lines'?␤ in block at line 1␤␤» [18:13] m: sub linear ($r, $p) { $r.map( * * $r.max / $p) »+» $r.min }; (5..255).&linear(100).gist.say [18:13] rakudo-moar f2b69f53f: OUTPUT: «(17.75 20.3 22.85 25.4 27.95 30.5 33.05 35.6 38.15 40.7 43.25 45.8 48.35 50.9 53.45 56 58.55 61.1 63.65 66.2 68.75 71.3 73.85 76.4 78.95 81.5 84.05 86.6 89.15 91.7 94.25 96.8 99.35 101.9 104.45 107 109.55 112.1 114.65 117.2 119.75 122.3 124.85 127.4 1…» [18:13] m: sub linear ($r, $p) { $r.map( * * ($r.max - $r.min) / $p) »+» $r.min }; (5..255).&linear(100).gist.say [18:13] rakudo-moar f2b69f53f: OUTPUT: «(17.5 20 22.5 25 27.5 30 32.5 35 37.5 40 42.5 45 47.5 50 52.5 55 57.5 60 62.5 65 67.5 70 72.5 75 77.5 80 82.5 85 87.5 90 92.5 95 97.5 100 102.5 105 107.5 110 112.5 115 117.5 120 122.5 125 127.5 130 132.5 135 137.5 140 142.5 145 147.5 150 152.5 155 157…» [18:13] Why won't my brain MATH? [18:13] *** manu__ joined [18:13] *** eseyman left [18:14] *** manu__ is now known as eseyman [18:14] m: sub linear ($r, $p) { $r.map( * * $r.max / ($r.max - $r.min) ) »+» $r.min }; (5..255).&linear(100).gist.say [18:14] rakudo-moar f2b69f53f: OUTPUT: «(10.1 11.12 12.14 13.16 14.18 15.2 16.22 17.24 18.26 19.28 20.3 21.32 22.34 23.36 24.38 25.4 26.42 27.44 28.46 29.48 30.5 31.52 32.54 33.56 34.58 35.6 36.62 37.64 38.66 39.68 40.7 41.72 42.74 43.76 44.78 45.8 46.82 47.84 48.86 49.88 50.9 51.92 52.94 5…» [18:16] m: sub linear ($r, $p) { $r.map( * * ($r.max - $r.min) / $p.pred ) »+» $r.min }; (5..255).&linear(100).gist.say [18:16] rakudo-moar f2b69f53f: OUTPUT: «(17.626263 20.151515 22.676768 25.20202 27.727273 30.252525 32.777778 35.30303 37.828283 40.353535 42.878788 45.40404 47.929293 50.454545 52.979798 55.505051 58.030303 60.555556 63.080808 65.606061 68.131313 70.656566 73.181818 75.707071 78.232323 80.…» [18:16] m: sub linear ($r, $p) { $r.map( * * ($r.max - $r.min) / $p.elems ) »+» $r.min }; (5..255).&linear(100).gist.say [18:16] rakudo-moar f2b69f53f: OUTPUT: «(1255 1505 1755 2005 2255 2505 2755 3005 3255 3505 3755 4005 4255 4505 4755 5005 5255 5505 5755 6005 6255 6505 6755 7005 7255 7505 7755 8005 8255 8505 8755 9005 9255 9505 9755 10005 10255 10505 10755 11005 11255 11505 11755 12005 12255 12505 12755 130…» [18:22] *** jpn left [18:22] sub linear ($r, $p) { my $s = ($r.max - $r.min) / $p.pred; say " {$r.min} / { $s }"; $r.kv.map( -> $k, $v { $k * $s + $r.min }) }; (5..255).&linear(100).gist.say [18:22] Xliff, rakudo-moar 4b69dd51e: OUTPUT: « 5 / 2.525253␤(5 7.525253 10.050505 12.575758 1…» [18:22] Xliff, Full output: https://gist.github.com/3cbe60687e300a89011204a414ca0bdd [18:22] lizmat: ^^ [18:26] that goes until 636.313131, shouldn't it stop at 255 or around 255 [18:27] kv seems to be the responsible [18:30] Hrm. Still not right then. # Nahita [18:30] sub linear ($r, $p) { my $s = ($r.max - $r.min) / $p.pred; say " {$r.min} / { $s }"; $r.kv.map( -> $k, $v { $k * $s + $r.min }) }; (5..255).&linear(100).elems.gist.say [18:30] Xliff, rakudo-moar 4b69dd51e: OUTPUT: « 5 / 2.525253␤251␤» [18:30] sub linear ($r, $p) { my $s = ($r.max - $r.min) / $p.pred; say " {$r.min} / { $s }"; $r.kv.map( -> $k, $v { $k * $s + $r.min }) [^$p] }; (5..255).&linear(100).gist.say [18:31] sub linear ($r, $p) { my $s = ($r.max - $r.min) / $p.pred; say " {$r.min} / { $s }"; $r.kv.map( -> $k, $v { $k * $s + $r.min })[^$p] }; (5..255).&linear(100).gist.say [18:31] Xliff, rakudo-moar 4b69dd51e: OUTPUT: « 5 / 2.525253␤(5 7.525253 10.050505 12.575758 1…» [18:31] Xliff, Full output: https://gist.github.com/c7bd4df734286b62d0080c791454f01b [18:31] sub linear ($r, $p) { my $s = ($r.max - $r.min) / $p.pred; say " {$r.min} / { $s }"; $r.kv.map( -> $k, $v { $k * $s + $r.min })[^$p] }; (5..255).&linear(100).tail.say [18:31] Xliff, rakudo-moar 4b69dd51e: OUTPUT: « 5 / 2.525253␤255␤» [18:31] There. [18:32] Yay! I've mathed. Now I can nap. [18:36] *** derpydoo joined [18:50] m: sub linear( @a, \c ) { my ( \s, \f ) = |@a.bounds; s, * + (f - s) / c ... f }; say linear (5..255),100 [18:50] *** jpn joined [18:51] (5 7.5 10 12.5 15 17.5 20 22.5 25 27.5 30 32.5 35 37.5 40 42.5 45 47.5 50 52.5 55 57.5 60 62.5 65 67.5 70 72.5 75 77.5 80 82.5 85 87.5 90 92.5 95 97.5 100 102.5 105 107.5 110 112.5 115 117.5 120 122.5 125 127.5 130 132.5 135 137.5 140 142.5 145 147.5 150 152.5 155 157.5 160 162.5 165 167.5 170 172.5 175 177.5 180 182.5 185 187.5 190 192.5 195 197.5 200 202.5 205 207.5 210 212.5 215 217.5 220 222.5 225 227.5 230 [18:51] 232.5 235 237.5 240 242.5 245 247.5 250 252.5 ...) [18:56] *** jpn left [19:04] lizmat: fyi, deepmap solved all my "multiply all values by a common factor problem" even for a hash of hashes! [19:04] 2023-05-25T17:59:05Z #raku tbrowder__ Thanks for the heads up! What's the repo mentioned? [19:07] librasteve++ # Thanks! [19:09] uzl[m]: the repo is at the publisher's github site and is in the booki have to find it. i'll fork it if i haven't and let you know. [19:12] *** notna joined [19:14] *** jpn joined [19:15] uzl[m]: it's at JJ's public site at 'https://github.com/JJ/perl6em' [19:20] *** euandreh left [19:22] *** euandreh joined [19:28] *** emakei joined [19:34] *** emakei left [19:36] *** notna left [19:36] *** squashable6 left [19:37] *** squashable6 joined [19:39] *** jpn left [20:16] *** jpn joined [20:21] *** jpn left [20:27] *** rf joined [20:27] Afternoon folks [20:45] Hi rf! Sorry, we are busy reading lizmat's new blogpost. [21:11] * gfldex .oO( raku -e 'try our $language;' ) [21:17] *** codesections left [21:31] *** sena_kun left [21:42] *** codesections joined [22:04] *** jpn joined [22:09] *** jpn left [22:41] ¦ advent: tbrowder++ created pull request #106: prep for the upcoming season [22:41] ¦ advent: review: https://github.com/Raku/advent/pull/106 [22:46] I think raku.land has stopped rebuilding. Or at least. I updated a module yesterday and it's still not there. [23:00] gfldex: which post? monday's weekly? or? [23:00] https://dev.to/lizmat/a-practical-example-of-rakuast-18jk [23:09] *** linkable6 left [23:09] *** evalable6 left [23:12] *** evalable6 joined [23:12] *** linkable6 joined [23:34] *** zara joined [23:40] *** zara left [23:42] *** Manifest0 left [23:52] *** jpn joined [23:58] *** jpn left