🦋 Welcome to Raku! raku.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: colabti.org/irclogger/irclogger_log/raku
Set by ChanServ on 14 October 2019.
Geth doc: d21a27d71d | Coke++ | writing-docs/SQUASHATHONS.md
perl6 -> raku
02:17
[Coke] haven't had one of those in a while, have we? 02:32
guifa lizmat: your fix for X::Method::NotFound is making me have to think extra hard for Intl::X — but I think I figured something out to work mostly along the same lines 03:33
AlexDaniel [Coke]: yeah. In fact, the whole renaming process went surprisingly easy, I thought it'd be much harder 03:55
like, much much harder :)
guifa BTW can anyone forward me one of the e-mails on the ICU perl6-users thread? I want to respond and just subscribed to the list but … no way to respond to previous messages that I can see 04:02
SmokeMachine m: my $a = %(bla => %(a => %(x => 1), b => %(x => 2), c => %(x => 3))); say $a{"bla"; *; "x"}:v # should this work? Is this a bug? 06:57
camelia Unexpected named argument 'v' passed
in block <unit> at <tmp> line 1
SmokeMachine Is this a bug? 06:58
elcaro bisectable6: say %(:a(:1b)){'a'; 'b'}:v; 07:27
bisectable6 elcaro, Will bisect the whole range automagically because no endpoints were provided, hang tight
elcaro, Output on all releases: gist.github.com/1b0acce894e6f3b613...366dbaec0e
elcaro, Bisecting by output (old=2016.08.1 new=2016.09) because on both starting points the exit code is 1
elcaro looks like it doesn't like :v as soon as you try to use a semi-list
bisectable6 elcaro, bisect log: gist.github.com/c37918af17727854e1...fe342e72df
elcaro, Output on all releases and bisected commits: gist.github.com/ad502bfa78af0b891d...47def87560
elcaro doesn't looks like it's ever worked 07:28
gfldex semilists are not well tested
AlexDaniel huh that's a very weird output 07:51
bisectable6: old=2016.08.1 new=2016.09 say %(:a(:1b)){'a'; 'b'}:v;
bisectable6 AlexDaniel, Bisecting by output (old=2016.08.1 new=2016.09) because on both starting points the exit code is 1
AlexDaniel, bisect log: gist.github.com/bab5f56b5f678b2c0d...a21504c443 07:52
AlexDaniel, There are 6 candidates for the first “new” revision. See the log for more details
AlexDaniel ah, that's why
thanks bisectable6, but you could've said something instead of just silently moving on… 07:53
bisectable6 AlexDaniel, It's my pleasure!
tobs That failed the Turing test for me :D 07:57
elcaro maybe bisectable is just being snarky 07:58
mark[m]1 its bisectables pleasure to just silently move on, we all have our pleasures 😉 08:12
* its bisectable's pleasure to just silently move on, we all have our pleasures 😉
Geth ¦ problem-solving: JJ assigned to jnthn Issue META6 specification only exists "de facto" github.com/Raku/problem-solving/issues/236 09:03
lizmat clickbaits rakudoweekly.blog/2020/09/28/2020-...-releaser/ 09:47
Xliff timotimo: You around? 10:21
Geth doc: c349332854 | (Simon Proctor)++ | doc/Language/objects.pod6
Updating working on the TWEAK documentation based on confusion here : stackoverflow.com/questions/641036...ld-routine
12:05
doc: 7ddd0ddc67 | (Elizabeth Mattijsen)++ (committed using GitHub Web editor) | doc/Language/objects.pod6
Merge pull request #3656 from Scimon/master

Updating working on the TWEAK documentation based on confusion here :…
linkable6 Link: docs.raku.org/language/objects
[ptc] just wondering: is it possible to do an element-wise division (or multiplication for that matter) on an array? Something like Matlab's `./` operator? 12:49
I haven't been able to find anything in the docs, so I thought I'd ask here :-) 12:50
m: ($_ / 10 for 1..11) 12:54
camelia WARNINGS for <tmp>:
Useless use of "/" in expression "$_ / 10" in sink context (line 1)
[ptc] m: (1..11) >>/>> 10 12:57
camelia Potential difficulties:
Useless use of >>/>> in sink context
at <tmp>:1
------> 3(1..11) 7⏏5>>/>> 10
12:58
[ptc] menno
m: say((1..11) >>/>> 10)
camelia (0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 1.1)
[ptc] ok, that seemed to work. Is there a better/more elegant way to do the same thing? 12:59
i.e. could one do `(1..11)./10` ?
dakkar m: say (1..11).map:*/10 13:00
camelia 5===SORRY!5=== Error while compiling <tmp>
Confused
at <tmp>:1
------> 3say (1..11).map:7⏏5*/10
expecting any of:
colon pair
dakkar uh…
m: say (1..11).map: */10
camelia (0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 1.1)
dakkar (one day I'll remember that whitespace is sometimes significant in Raku…) 13:01
guifa m: say 1..11 X/ 10
camelia (0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 1.1)
dakkar oh, that's clever but I'd nix it in a code review 13:02
too risky having a list-that's-accidentally-1-long
guifa m: say (1,) X/ 10 13:03
camelia (0.1)
guifa it works okay with one element lists
dakkar [ptc]: how does Matlab's ./ operator behave when it's got arrays on both sides?
[ptc] dakkar: iirc it divides each element by the respective element in the other array. Hence it only works if the arrays are the same length. 13:04
dakkar guifa: sorry, I meant that `10` is a 1-element list, and someone is going to make it `(1..10) X/ (10,11)
[ptc] it's been a while since I've done matlab though
guifa: ooh, that's a nice solution! 13:05
guifa dakkar: ah. yeah, that would then give different results
dakkar for arrays of the same length:
m: say (1..10) Z/ (11..20)
camelia (0.090909 0.166667 0.230769 0.285714 0.333333 0.375 0.411765 0.444444 0.473684 0.5)
[ptc] dakkar: wow! Thanks! I was only intersted in the division by scalar case :-) I like the generalisation too! 13:07
dakkar explanation: X is the cross-product meta-op, Z is the "zip" meta op
say <a b> X~ <c d>
evalable6 (ac ad bc bd)
dakkar m:say <a b> Z~ <c d>
evalable6 (ac bd)
[ptc] cool, many thanks :-) 13:08
guifa if it’s something you’re going to be using a lot, and you want really fine control (throw an error if a list of nonmatching sizes are used, etc), you could also define your own operator 13:09
guifa m: sub infix:<./> (@a, @b where @a == @b || die "Each side must have the same number of elements" ) { @a Z/ @b }; say (2,4,6) ./ (1,2,3); say (2,4,6) ./ (1,2) 13:10
camelia (2 2 2)
Each side must have the same number of elements
in sub infix:<./> at <tmp> line 1
in block <unit> at <tmp> line 1
guifa you could make it multi 13:11
so that you can handle Positional ./ Positional, and Positional ./ Numeric according to how matlab does 13:12
[ptc] yeah, I'd thought of that. Just wondered if there were something directly in the language and I'd just not spotted it in the docs
[Coke] AlexDaniel: heh. I meant "squashathons", not "renaming commits". :) :) 13:45
[Coke] ... google for api info on how to determine monitor size. top hit "use a rule, measure the diagonal" 15:33
guifa [Coke]: I didn’t know the Google already was learning dad jokes 15:47
AlexDaniel [Coke]: ah :D 18:04
Geth doc: 35ea8e21c8 | Coke++ | 2 files
perl6 -> raku
18:36
[Coke] AlexDaniel: ... but now that you mention it, found another one. :) 19:19
[Coke] I remember asking this years ago but cannot find the ticket: do we have a way for raku to tell us what version of unicode we support? 20:55
also, how long has there been tab completion in the REPL? nifty 20:56
m: 3.fmt("0.3d") # bet we could improve the error message here by asking if they forgot a % 20:58
camelia Your printf-style directives specify 0 arguments, but 1 argument was supplied
in block <unit> at <tmp> line 1
sena_kun [Coke], I think lizmat has worked on printf, so can ping and ask. 20:59
[Coke] (unicode) reminded by the thread on perl6-users
@lizmat: ^^ fmt question 21:00
MasterDuke i thought unicode version might be in -V output, but i don't see it
[Coke] Yah, might be nice to have it in -V output and also in a $* var. 21:04
El_Che I thought tab completion was handled by external libs and progs? 21:06
[Coke] Sure, it's probably readline or linenoise, but I didn't realize it was there 21:10
guifa [Coke]: I actually believe most of the unicode stuff is in MoarVM rather than in Rakudo 21:31
[Coke] ... Sure, but I only ever run moarvm through rakudo. :) 21:33
guifa Fair :-) I only started using the JS backend recently 21:35
guifa I mention it only because while it’d be sweet to get the version number of Unicode, it might just not be available 21:36
El_Che 12.1 21:45
www.moarvm.org/releases.html
also here: github.com/MoarVM/MoarVM#feature-overview 21:46
and here: docs.raku.org/language/unicode
13 is from march this year 21:48
rather new
guifa` El_Che: there's normally just one release a year, and the last one came out less than half a year ago 22:11
CLDR is worse, two releases a year and less stability between releases
lizmat [Coke]: re: 3.fmt("0.3d") I guess we could warn at compile time that no actual format was specified 22:46
and perhaps add a % at the end and see if that is a valid format 22:47
in the error reporting
lizmat my work on sprintf now lives in the RakuAST branch, and is "live" there as it were 22:48
PR's welcome :-)