| 29 Jun 2026 | |||
| librasteve_ | s/does/does not/ | 08:49 | |
| m: my @s := (loop { 42.say }).list; say @s[2], ‘:’, @s[1], ‘:’ @s[4]; | 08:50 | ||
| camelia | ===SORRY!=== Error while compiling <tmp> Two terms in a row at <tmp>:1 ------> .say }).list; say @s[2], ‘:’, @s[1], ‘:’<HERE> @s[4]; expecting any of: infix infix stopper postfix statement en… |
||
| librasteve_ | m: my @s := (loop { 42.say }).list; say @s[2]; say @s[1]; say @s[4]; | 08:51 | |
| camelia | 42 42 42 True True 42 42 True |
||
| librasteve_ | well - works fine in an actual Raku script - guess Camelia struggles too | 08:52 | |
| oh, I am holding it wrong (the ‘say’ is on the loop) durr | 08:54 | ||
| m: my @s := (loop { 42.say }).list; @s[2]; @s[1]; @s[4]; | |||
| camelia | 42 42 42 42 42 |
||
| librasteve_ | rakudoweekly.blog/2026/06/29/2026-...lease-194/ | 13:51 | |
| lizmat | librasteve__++ | 14:03 | |
| 2 Jul 2026 | |||
| comborico | Is the conference going to be put online? | 22:56 | |
| 3 Jul 2026 | |||
| librasteve | according to the organizers Watch for our videos on our YouTube channel at youtube.com/@YAPCNA/videos/ once the conference is over. | 03:03 | |
| they’re not there yet :-( | |||
| timemelon | is there a difference between »×« and «×»? | 19:28 | |
| librasteve | for listy things, I think they are equivalent, for associative things, you have %foo «+» %bar; intersection of keys and %foo »+« %bar; union of keys (docs.raku.org/language/operators#H...operators) | 22:01 | |
| timemelon | ty! | 22:13 | |
| 6 Jul 2026 | |||
| librasteve_ | rakudoweekly.blog/2026/07/06/2026-27-trf-lives/ | 08:41 | |
| tbrowder | the new Raku Foundation needs to accept donations by check unless someone in US knows of an easy way to send money internationally without going to a bank or post office. | 15:02 | |
| lizmat | tbrowder: we're working on alternate ways to donate.... BTW, there's no point in working with checks, as the charges for processing a US check by a EU bank are typically in the range of 50€ :-( | 15:46 | |
| tbrowder | wowser! i forgot you told me that before :( | 15:54 | |
| well worth a trip to the bank | 15:55 | ||
| 7 Jul 2026 | |||
| pippo | m: my @a=((1,2,3),(2,3,4),(3,4,5)); say @a[1..2;0]; | 16:37 | |
| camelia | (2 3) | ||
| pippo | m: my @a=((1,2,3),(2,3,4),(3,4,5)); say @a[1..*;0]; | ||
| camelia | (timeout) | ||
| pippo | ^^ anybody knows why? | 16:39 | |
| lizmat | m: use v6.e.PREVIEW; my @a=((1,2,3),(2,3,4),(3,4,5)); say @a[1..*;0]; | 16:46 | |
| camelia | (2 3) | ||
| pippo | Ha! Thank you lizmat! | 16:48 | |
| lizmat | it's a known issue in 6.d | 16:49 | |
| since some of the semantics were fixed, the fix is bounded by a language level | 16:50 | ||
| pippo | Ok. I'll use v6.e.PREVIEW for my little scrip as you suggested. Cheers! | ||
| lizmat | (as some code in the ecosystem possibly depended on the wrong semantics) | 16:51 | |
| 8 Jul 2026 | |||
| habere-et-disper | How do I output the name of a module I'm writing? | 22:55 | |
| This seems a bit too fragile: `say "{.head.tc}::{.skip.head.uc}" with cache $*PROGRAM.basename.split: / <-alnum> /;` | |||
| Thanks 🦝s! | |||
| jubilatious1_98524 | I wish. One of them should equalize lengths with Nil | 22:57 | |
| 9 Jul 2026 | |||
| lizmat | m: module Foo { say $?MODULE.^name } # habere-et-disper also see $?CLASS for classes and $?PACKAGE for packages | 09:19 | |
| camelia | Foo | ||
| timemelon | I guess if the pointy end points to the shorter list to be looped over, then »×« makes sense for a version that pads with Nil rather than looping, since neither pointy end points to an arg | 09:31 | |
| I phrased that a bit badly, pointy end points to the list to be cycled | 09:32 | ||
| jubilatious1_98524 | It's a common problem in Data Science, you have two datasets and need to throw them in a 2D data structure (i.e. csv table). But one is longer than another and you can't zero-fill (because zero has measurement meaning). | 12:57 | |
| I'd say the opposite. If »×« is intersection and «×» is union, then the »×« looks "narrow" while the «×» looks "wide". The wide one should pad. But I probably got that backwards!!!! | 13:05 | ||
| librasteve | I vote with »×« looks "narrow" while the «×» looks "wide". | 20:12 | |
| 11 Jul 2026 | |||
| lucs | Hmm... Can I have a regex substitution that would transform for example "a - a - a a" into "A1 - A2 - A3 A4", or do I need to loop for that? | 23:41 | |
| 12 Jul 2026 | |||
| Oh, this works: | 00:53 | ||
| m: my $n = 1; my $s = 'a - a - a a'; $s ~~ s:g/ a /A{$n++}/; say $s; | |||
| camelia | A1 - A2 - A3 A4 | 00:54 | |
| timemelon | I'm struggling with adding types to a sub with an @-sigiled parameter: sub takes-typed(Int @matrix) { 'ok' } say takes-typed Array[Int].new: shape => (2, 2), (1, 2), (3, 4); | 18:51 | |
| when I run this, I get this error: Type check failed in binding to parameter '@matrix'; expected Positional[Int] but got Array[Int] (Array[Int].new(:shap...) | |||
| but Array implements Positional no? so I'm confused | 18:52 | ||
| a different question, but for the same task: [0] > my @foo = (1, 2, 3), (4, 5, 6) [(1 2 3) (4 5 6)] [1] > [Z] @foo ((1 4) (2 5) (3 6)) [2] > [Z]@foo ===SORRY!=== Error while compiling: Two terms in a row ------> [Z]⏏@foo expecting any of: infix infix stopper statement end statement modifier statement modifier loop why is a space needed between [Z] and @foo? | 19:28 | ||