🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). Log available at irclogs.raku.org/raku/live.html . If you're a beginner, you can also check out the #raku-beginner channel!
Set by lizmat on 6 September 2022.
00:00 xinming joined, reportable6 left 00:01 reportable6 joined
tonyo . 00:01
00:09 codesections left
Voldenet lizmat: huh, that's news to me, stagestats show parsing time for every execution of scripts 00:09
I mean simply scripts file, nothing module-related 00:13
00:14 MasterDuke joined
Voldenet something like `echo 'sub postfix:<a>{};' > f ; raku f` 00:16
jdv MitarashiDango[m: no, i'd guess a screw up on my part 00:39
wait, no 00:41
rakudo.org/dl/rakudo/rakudo-2023.0...cksums.txt and rakudo.org/dl/rakudo/rakudo-2023.0...cksums.txt look "the same" to me. what do you mean? 00:42
MitarashiDango[m: ^
lizmat: thanks 00:44
MitarashiDango[m jdv: Sorry I meant rakudo-moar 00:49
The previous ones don't have a directory
01:14 linkable6 left, evalable6 left 01:15 linkable6 joined 01:16 evalable6 joined
jdv iirc that's patrickb's stuff 01:26
patrickb: ^
MitarashiDango[m: ^ 01:27
i'm just the "rakudo and moarvm release manager" - my only end products are the src releasees, patrickb and MasterDuke and maybe others take it further/other/etc 01:28
01:48 Matthew|m left 02:06 xinming left 02:08 xinming joined 02:25 teatime left 02:26 teatime joined 02:39 tobs left 02:40 tobs left, ecocode left, jetchisel left, patrickb left, atweedie left, eseyman left, kst left 02:46 tobs joined, ecocode joined, jetchisel joined, patrickb joined, atweedie joined, eseyman joined, kst joined 02:47 teatwo joined 02:51 teatime left 03:10 jpn joined 03:15 jpn left 03:46 rf left 04:46 linkable6 left, evalable6 left 04:47 evalable6 joined 04:48 linkable6 joined 05:04 xinming left 05:06 xinming joined 05:09 MasterDuke left 05:10 MasterDuke left
patrickb MitarashiDango[m, jdv: That directory in the checksums file is a mistake on my part. I'll fix this. I'll find time probably in ~8 hours. 05:26
05:27 Matthew|m joined
patrickb Thanks for the report! 05:27
05:45 jpn joined 05:50 jpn left 06:00 reportable6 left 06:02 reportable6 joined 06:36 jpn joined 06:41 jpn left 07:35 jpn joined 07:40 jpn left 07:46 sena_kun joined 07:58 Sgeo left 08:03 xinming_ joined 08:05 xinming left 08:07 dakkar joined 08:10 abraxxa joined 08:26 sena_kun left 08:34 TieUpYourCamel left 08:46 TieUpYourCamel joined 08:53 notable6 left, statisfiable6 left, bisectable6 left, heartburn left 08:54 GreaseMonkey left
jjatria [Coke]: I'm back now. I'll go through the issues you've reported recently and try to get a fix for them, although that will most likely be over the weekend. Thanks for the reports! 08:54
08:55 rypervenche left, greaser|q joined 08:56 heartburn joined 08:57 rypervenche joined
lizmat jjatria: good to hear you're ok and back! 08:58
09:01 tailgate left, tailgate joined 09:04 dutchie left 09:08 dutchie joined 09:20 jpn joined 09:24 jpn left 09:25 jpn left
jjatria Thanks :) 09:38
09:42 greaser|q left, greaser|q joined 09:43 greaser|q is now known as GreaseMonkey 09:44 euandreh left 09:45 euandreh joined 09:46 euandreh left 09:47 notable6 joined 09:49 statisfiable6 joined, bisectable6 joined 10:13 jpn joined 10:25 xkr47 left 10:35 xkr47 joined 10:51 jpn left 11:00 jpn joined 11:05 jpn left 11:49 melezhik joined
melezhik .tell tonyo Hi! I have created a couple issues for fez 11:50
tellable6 melezhik, I'll pass your message to tonyo
melezhik --unattended does not work for me
11:53 RonaldR34g4m joined 11:54 Vyrus left 11:55 melezhik left 12:00 reportable6 left 12:01 reportable6 joined, mjgardner left, mjgardner joined 12:27 jgaz left 12:28 jpn joined 12:32 jgaz joined 12:33 jpn left
Anton Antonov Has anyone experimented with grammar visualization or mapping? 12:34
Well, using Raku, of course! 🙂
12:36 tbrowder_ left, tbrowder_ joined 12:38 jgaz left, jgaz joined 12:46 xinming_ left 12:48 xinming_ joined 13:00 dakkar left, dakkar joined 13:49 finanalyst joined
[Coke] waves at jjatria 13:50
grammar::tracer, was it?
was a nice command line tool for stepping through how the match was progressing. 13:51
14:08 abraxxa left 14:21 finanalyst left 14:25 tea3po joined 14:28 teatwo left 14:37 Sgeo joined
Anton Antonov @Coke Yeah, after I posted my question, it occurred to me that I have seen "Grammar::Tracer" and Comma's "live grammars". I used "Grammar::Tracer" ≈ an year. ago. 14:39
I was thinking more about graph representations of grammars. Something like this : wiki.c2.com/?BnfToDot . I am not sure how useful it is. Seems neat for small grammars. 14:41
tbrowder__ Voldenet: lizmat <librasteve>: thanks, all, i'm going as lazy as i can! 14:57
and i'm pretty lazy! 14:58
14:58 rf joined 15:16 jpn joined
jdv patrickb: cool, thanks! 15:29
15:30 jpn left 15:33 charsbar left, charsbar joined 15:51 bigdata joined 16:06 xinming_ left 16:08 xinming_ joined 16:35 dakkar left
tonyo anton antonov: i have something like that for dependency graphs that could be adapted to grammars 16:48
tellable6 2023-06-29T11:50:23Z #raku <melezhik> tonyo Hi! I have created a couple issues for fez
tonyo melezhik: i'll take a look
tellable6 tonyo, I'll pass your message to melezhik
17:16 Anant joined 17:26 jpn joined 17:31 jpn left 17:57 tea3po left, tea3po joined, melezhik joined 18:00 reportable6 left, melezhik left 18:02 reportable6 joined 18:26 sena_kun joined
Tirifto Since work on v6.e is apparently underway, are any Unicode additions being planned or considered? :o I recall reading this page at one point, but it has not changed in a while: github.com/rakudo/rakudo/wiki/save...from-ASCII 18:31
lizmat Tirifto: hasn't been touched in almost 4 years 18:32
18:34 bigdata left
lizmat Updated so that at least the name is ok 18:36
Tirifto A lot from that page reads like a brainstorm, but some symbols, like ‘⌁’, ‘⟅⟆’, or ‘∑’, seem to fit the outlined requirements very well. Do they need more discussion/evaluation, or is it just that someone has to make a pull request implementing them (possibly leading to further discussion there), and no one’s done that so far?
lizmat fwiw I think it fell through the cracks of the turmoil with the name change 18:37
*I* had completely forgotten about it
Tirifto I probably remembered since the use of Unicode symbols might be my favourite thing about Raku. x) 18:40
So if I’d like to see these in Raku, would sending a patch be a good way to start? :o 18:46
Anton Antonov @tonyo Very interesting! Is your visualization "targeting" GraphViz / DOT? 18:47
18:47 Anant left
Tirifto Or should some discussion precede each of these first? 18:47
lizmat I'm looking at them now, and preparing new PRs for the Raku Grammar (aka RakuAST) 18:50
18:55 bigdata joined
lizmat github.com/rakudo/rakudo/pull/5301 18:59
Tirifto lizmat, that’s wonderful; thanks a whole lot! :D 19:14
lizmat It's only a PR 19:15
Tirifto Aren’t seeds as wonderful as the flowers they sprout? :-) 19:18
lizmat the ⇒ is a bit more involved 19:19
github.com/rakudo/rakudo/pull/5302 19:26
19:30 bigdata left
lizmat Tirifto: that'll be all I think, although I'm thinking about how to work out 1⅐ 19:35
and seeing the difference between ⅐ an 19:36
and ⁹
Tirifto Ahh, I hadn’t noticed the fractions were already supported. 19:50
19:52 bigdata joined, bigdata left
Tirifto There’s also a fraction slash, which in writing should be used in conjunction with superscript and subscript numbers, I think. [citation needed] So you get ¹⁄₂, ⁶⁄₇, ¹¹⁄₂₃, and so on. Raku doesn’t seem to support those, though, and the ASCII page only mentions it as a possible operator. 19:54
19:56 gregzakh joined
Tirifto lizmat, what do you think of ⌁ for the smartmatch operator? 19:58
20:01 gregzakh left 20:02 gregzakh joined, gregzakh left
Anton Antonov Hard to discern. 20:19
20:31 jpn joined 20:35 jpn left
[Coke] -1 on the lightning 20:48
patrickb MitarashiDango[m, jdv: I believe to have fixed the problem with the directory in the checksums file.
Tirifto Alternative smartmatch idea: U+219D RIGHTWARDS WAVE ARROW ↝ 21:06
21:07 jpn joined
Tirifto Retains the shape of the tilde, looks easily discernible from the concatenation operator on my screen, and shows a direction, which might be nice as smartmatch is not commutative. What do you think? :o 21:10
MitarashiDango[m patrickb: All good, thanks! 21:17
21:17 bigdata joined 21:18 bigdata left 21:38 jpn left
Anton Antonov @Tirifto So, we can use two waves? ↝↝ 21:40
Tirifto @Anton Antonov, wouldn’t a single one suffice? :o 21:43
lizmat I think we should be very careful with adding unicode ops that could also be added in module space 21:45
m: constant &infix:<↝> = &infix:<~~>; say "foo" ↝ / o / 21:46
camelia 「o」
lizmat also: almost there: 21:48
m: say ¹/₂
camelia 0.5
lizmat m: say ¹¹/₂
camelia 0.5
lizmat guess that needs a little work
Anton Antonov @Tirifto "wouldn’t a single one suffice? :o" -- I don't know. Some people do prefer using "%%" instead of "%" when defining list-of-things regexes. (By analogy, same with "↝" ...)
lizmat m: say ¹
camelia 1
lizmat m: say ¹¹ 21:49
camelia 1
Voldenet having unicode inside files is a code smell 21:51
Anton Antonov @lizmat Is this expected to work: √¹¹/₂ ?
lizmat not at the moment 21:52
Anton Antonov 😭
lizmat m: sub prefix:<√>($a) { sqrt $a }; say √16 21:53
camelia 4
Voldenet m: sub prefix:<√>($a) { sqrt $a }; say √11/2
camelia 1.6583123951777
Voldenet that's close enough ;)
Tirifto @Anton Antonov, oh, you meant a double variant in addition to the single one? Then I suppose so, but I’m not sure what it might be used for. :o 21:54
Anton Antonov Well, we have to define also ''∛" and "∜"... 21:55
Voldenet m: say sqrt 11/2 21:56
camelia 2.345207879911715
Voldenet ngl, sqrt is more readable and works
Tirifto lizmat, how does one identify operators likely to be used in module space? Isn’t that mostly unpredictable? I can see symbols with established meaning used because they have an established meaning, and symbols without it used because they don’t (so they can work for whatever). 21:57
Voldenet re ∛, it'd be difficult to explain difference between √ and that
Anton Antonov @Voldenet Agreed. (But I am spoiled from using Mathematica too much...) 21:58
lizmat anything that's an prefix, infix, postfix, postcircumfix and even circumfix, can be added
-> => <-> are more syntaxy things
Voldenet (sqrt returns one number, roots(*, 3) returns complex numbers) 22:00
Anton Antonov @Voldenet Thanks! (I was wondering does something like roots exist in Raku...) 22:02
Voldenet It does and in fact it has quite confusing relation to sqrt 22:03
m: say sqrt(9), roots(9, 2)
camelia 3(3+0i -3+3.6739403974420594e-16i)
Anton Antonov @Voldenet 🙂 You start to sound like @nemokosch ...
Voldenet :D 22:04
I remember answering that question about roots here, so it's not that synthetical problem though 22:05
Anton Antonov @Voldenet It is good to know. When I get back to my Mathematica-to-Raku translator I will use roots. 22:06
How does Raku finds suggestions for misspellings during compile / run time? Is "Text::Diff::Sift4" used?
lizmat I think StrDistance is used 22:07
nemokosch 3+0i and -3+3.6739403974420594e-16i sum to 0, right?
lizmat docs.raku.org/type/StrDistance
sleep& 22:08
Tirifto good-night&
22:08 sena_kun left
Voldenet no, they sum to 0+3.6739403974420594e-16i 22:09
the answer as misleading as technically correct
Anton Antonov Where the dead links of docs.raku.org are supposed to be reported? 22:50
Voldenet perhaps github.com/Raku/doc 22:51
Anton Antonov dead link here in docs.raku.org/type/StrDistance.html -- "string transformation", docs.raku.org/syntax/tr$SOLIDUS$SOLIDUS$SOLIDUS
@Voldenet -- Yeah, sure. 22:52
Voldenet btw, on the topic of roots, maybe tau constant could be used here: github.com/rakudo/rakudo/blob/main...x.pm6#L141
Anton Antonov 🤔 22:55
Voldenet in fact maybe doing division before sum would increase precision
not by much
nemokosch why are there still $SOLIDUS URL's... 22:59
anyway, I think it's bizarre that the positive root is accurate while the negative root which should really be the positive root times -1, is inaccurate 23:00
it would actually make more logical sense if both had some representational error 23:01
23:02 jpn joined
Voldenet m: say (^2).map({ Complex.new(3 * cos($_ * tau), 3 * sin($_ * tau)) }) 23:03
camelia (3+0i 3-7.347880794884119e-16i)
Voldenet when you know that one of them is `0 * tau ` and second is `1 * tau`, it becomes more obvious that first root will be the most accurate 23:04
eh, it should be .5 * tau 23:05
m: say (^2).map({ Complex.new(3 * cos($_ * tau), 3 * sin($_ / $_ * tau)) })
camelia (3+NaN\i 3-7.347880794884119e-16i)
Voldenet m: say (^2).map({ Complex.new(3 * cos($_ / 2 * tau), 3 * sin($_ / 2 * tau)) }) 23:06
camelia (3+0i -3+3.6739403974420594e-16i)
23:08 rf left
Voldenet …I do wonder if using some identities would yield higher precision in this case 23:39
m: sub cos_ab($k, $a, $b) { "$k * cos($a) * cos($b) - $k * sin($a) * sin($b)" }; sub sin_ab($k, $a, $b) { "$k * sin($a) * cos($b) + $k * cos($a) * sin($b)" }; my $v = <$mag $angle/$n $_/$n*tau>; say "Complex.new({cos_ab(|$v)} , {sin_ab(|$v)})"
camelia Complex.new($mag * cos($angle/$n) * cos($_/$n*tau) - $mag * sin($angle/$n) * sin($_/$n*tau) , $mag * sin($angle/$n) * cos($_/$n*tau) + $mag * cos($angle/$n) * sin($_/$n*tau))
Voldenet m: my ($mag, $angle) = 3.Complex.polar; my Int $n = 2; Complex.new($mag * cos($angle/$n) * cos($_/$n*tau) - $mag * sin($angle/$n) * sin($_/$n*tau) , $mag * sin($angle/$n) * cos($_/$n*tau) + $mag * cos($angle/$n) * sin($_/$n*tau))
camelia Use of uninitialized value of type Any in numeric context
in block <unit> at <tmp> line 1
Use of uninitialized value of type Any in numeric context
in block <unit> at <tmp> line 1
Use of uninitialized value of type Any in numeric context…
Voldenet m: my ($mag, $angle) = 3.Complex.polar; my Int $n = 2; say (^$n).map({ Complex.new($mag * cos($angle/$n) * cos($_/$n*tau) - $mag * sin($angle/$n) * sin($_/$n*tau) , $mag * sin($angle/$n) * cos($_/$n*tau) + $mag * cos($angle/$n) * sin($_/$n*tau)) }); 23:40
camelia (3+0i -3+3.6739403974420594e-16i)
Voldenet maybe the output is exactly the same, but at least it's difficult to maintain and slow 23:44