šŸ¦‹ 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 still being worked out
Set by lizmat on 12 August 2021.
00:02 reportable6 left
SmokeMachine_ m: say Match ~~ Associative # should Match do Associative? 00:17
camelia False
SmokeMachine_ I think that would make senseā€¦
moon-child more broadly, should the class/role be in roast? There was a bug filed recently, native types were not doing some numeric roles 00:19
*class/role _hierarchy_ be in roast
00:19 b2gills left
moon-child I think people depend on many aspects of the hierarchy which may not currently be tested 00:20
00:20 b2gills joined
moon-child m: say Associative.of; say Match.of 00:20
camelia (Mu)
No such method 'of' for invocant of type 'Match'
in block <unit> at <tmp> line 1
moon-child or, rather 00:21
m: say Associative.can('of'); say Match.can('of')
camelia (of)
()
00:26 happy-dude joined
SmokeMachine_ m: say ā€œbla bleā€ ~~ /<ws>/ 00:29
camelia ļ½¢ļ½£
ws => ļ½¢ļ½£
SmokeMachine_ m: say (ā€œbla bleā€ ~~ /<ws>/)<ws>
camelia ļ½¢ļ½£
SmokeMachine_ m: say (ā€œbla bleā€ ~~ /<ws>/).keys
camelia (ws)
SmokeMachine_ It even has the .keys methodsā€¦ 00:30
m: say (ā€œbla bleā€ ~~ /<ws>/).values
camelia (ļ½¢ļ½£)
SmokeMachine_ m: say (ā€œbla bleā€ ~~ /<ws>/).kv 00:31
camelia (ws ļ½¢ļ½£)
SmokeMachine_ m: Match.^mro
camelia ( no output )
SmokeMachine_ m: say Match.^mro
camelia ((Match) (Capture) (Cool) (Any) (Mu))
SmokeMachine_ m: say ā€œ{ .^name } -> { ? .^can: ā€œkvā€ } for Match.^mro 00:33
camelia 5===SORRY!5=== Error while compiling <tmp>
Unable to parse expression in curly double quotes; couldn't find final 'ā€' (corresponding starter was at line 1)
at <tmp>:1
------> 3me } -> { ? .^can: ā€œkvā€ } for Match.^mro7ā5<EOL>
ā€¦
SmokeMachine_ m: say ā€œ{ .^name } -> { ? .^can: ā€œkvā€ }ā€for Match.^mro 00:34
camelia Match -> True
Capture -> True
Cool -> True
Any -> True
Mu -> False
SmokeMachine_ m: say ā€œ{ .^name } -> { ? .^find_method: ā€œkvā€, :local } for Match.^mro
camelia 5===SORRY!5=== Error while compiling <tmp>
Unable to parse expression in curly double quotes; couldn't find final 'ā€' (corresponding starter was at line 1)
at <tmp>:1
------> 3nd_method: ā€œkvā€, :local } for Match.^mro7ā5<EOL>
ā€¦
SmokeMachine_ m: say ā€œ{ .^name } -> { ? .^find_method: ā€œkvā€, :local }ā€ for Match.^mro 00:35
camelia Match -> True
Capture -> True
Cool -> True
Any -> True
Mu -> False
SmokeMachine_ m: say ā€œ{ .^name } -> { ? .^find_method: ā€œkeysā€, :local }ā€ for Match.^mro
camelia Match -> True
Capture -> True
Cool -> True
Any -> True
Mu -> False
01:03 Doc_Holliwould left 01:04 Doc_Holliwood joined, reportable6 joined 01:16 b2gills left 01:37 b2gills joined 01:55 sono joined, sono left, sono joined 01:59 CIAvash joined 02:02 Doc_Holliwood left 02:07 cnx joined, rba[m] joined 02:12 AlexDaniel joined 02:25 juanfra joined 02:38 aolko[m] joined 03:17 gabiruh left, gabiruh joined 04:17 sourceable6 left, releasable6 left, reportable6 left, statisfiable6 left, bisectable6 left, linkable6 left, squashable6 left, nativecallable6 left, benchable6 left, committable6 left, greppable6 left, bloatable6 left, coverable6 left, unicodable6 left, shareable6 left, quotable6 left, tellable6 left, evalable6 left, notable6 left, greppable6 joined 04:18 shareable6 joined, linkable6 joined, committable6 joined, benchable6 joined, quotable6 joined, sourceable6 joined 04:19 statisfiable6 joined, notable6 joined 04:20 bloatable6 joined 04:27 eagerlist joined, Doc_Holliwood joined 04:40 Doc_Holliwood left 04:41 Doc_Holliwood joined 04:48 xinming left 04:50 ddeimeke left 04:51 ddeimeke joined 05:18 bisectable6 joined 05:19 tellable6 joined, releasable6 joined 05:20 squashable6 joined 05:21 Doc_Holliwood left 05:22 Doc_Holliwood joined 05:38 Doc_Holliwood left 06:18 unicodable6 joined 06:19 evalable6 joined 06:21 Doc_Holliwood joined 06:35 eagerlist left 06:52 Sgeo left 06:55 Doc_Holliwood left 07:06 reportable6 joined 07:20 coverable6 joined 07:26 ufobat_ joined 07:37 Doc_Holliwood joined 07:44 jrjsmrtn left 07:47 jrjsmrtn joined 08:34 MoC joined
gfldex lolibloggedalittle: gfldex.wordpress.com/2021/08/13/inequality/ 08:40
Altreus Quite in contrast to ==, eqv does a type check # this is surprising 09:47
eqv surely means equivalent 09:48
Shouldn't equivalence try harder to be true than equality?
saying that Int(1) is not equivalent to Rat(1) breaks English 09:49
lizmat from the doc: "This could be called an equivalence operator, and it will return True if the two arguments are structurally the same, i.e. from the same type and (recursively) contain equivalent values." 09:56
docs.raku.org/routine/eqv
it specifically shows: say 1 eqv 1.0; # OUTPUT: Ā«Falseā¤Ā» 09:57
Altreus Yeah I think I'm questioning the 20 years of design instead of saying something constructive again 09:58
lizmat well... maybe there *is* a point to be made 09:59
fwiw, we now got more user experiences :-)
I'm just saying that changing anything in this area, would need a language version bump
Altreus I'm a big fan of the thing doing what I think the word means
lizmat m: dd 1 == 1.0 10:00
camelia Bool::True
lizmat now, whether you would call those equivalent...
Altreus I was rude about PHP having === but now I realise that was just me being rude about everything PHP did 10:01
I actually quite like it, in principle
Does raku keep P5's philosophy of == for numeric equality and eq for string equality? 10:02
lizmat yes
== numifies, eq stringifies
Altreus Thought so - when you remember that, eqv makes
lizmat m: say "42" == "42.0"
camelia True
Altreus oops, makes more sense to do what it does
cos what else are you gonna do? mimic PHP's or JS's stack of rules for how to apply ==? 10:03
The whole point of == and eq is to tell Raku how to treat it; if you don't tell it how to do the comparison it also has to compare type
gfldex: you spawned discussion :D 10:04
I note that Int and Rat are both Real and therefore siblings 10:05
cousins actually 10:06
gfldex I believe haveing a meta-op variant for āˆˆ and friends would actually solve the problem. 10:07
m: say 1/1 eqv 2/2; 10:10
camelia True
gfldex m: say 1 eqv 2/2;
camelia False
gfldex infix:<eqv> does the right thing. Sadly, the name doesn't fit to what it does. 10:11
Altreus āˆˆ[==] like? 10:17
10:18 nativecallable6 joined
lizmat fwiw, I think that is mixing set semantics with something else 10:22
set semantics are not about comparisons, in my view 10:23
they are about applying some hashing function to values to see whether they are the same
currently, that's .WHICH
so, from the example, it should probably be something like āˆˆ[Int] 10:24
you could also see the .WHICH as a coercion to an ObjAt object
10:25 Doc_Holliwood left, Xliff joined
Xliff \o 10:26
m: proto sub a (|c) { c<a>.gist.say; {*} }; multi sub a (:$i!) { $i.gist.say }; a(:a = 1, :i = <a b c>); 10:27
camelia Cannot modify an immutable Pair (i => True)
in block <unit> at <tmp> line 1
Xliff m: proto sub a (|c) { c<a>.gist.say; {*} }; multi sub a (:$i!) { $i.gist.say }; a(a = 1, i = <a b c>);
camelia 5===SORRY!5=== Error while compiling <tmp>
Preceding context expects a term, but found infix = instead.
Did you make a mistake in Pod syntax?
at <tmp>:1
------> 3ulti sub a (:$i!) { $i.gist.say }; a(a =7ā5 1, i = <a b c>);
Xliff m: proto sub a (|c) { c<a>.gist.say; {*} }; multi sub a (:$i!) { $i.gist.say }; a(a => 1, i => <a b c>);
camelia 1
Cannot resolve caller a(:i(List), :a(Int)); none of these signatures match:
(:$i!)
in sub a at <tmp> line 1
in block <unit> at <tmp> line 1
Xliff m: proto sub a (|c) { c<a>.gist.say; {*} }; multi sub a (:$i!, *%c) { $i.gist.say }; a(a => 1, i => <a b c>); 10:28
camelia 1
(a b c)
Xliff m: proto sub a (|c) { c<a>.gist.say; {*} }; multi sub a (:$i!, :$a) { $i.gist.say }; a(a => 1, i => <a b c>);
camelia 1
(a b c)
10:37 frost-lab joined
Altreus lizmat: hadn't considered that perspective 10:39
Rather than are these equivalent according to this operation, it's are these equivalent after this conversion?
10:40 Doc_Holliwood joined
Altreus mind you, isn't that just āˆˆ map? 10:40
lizmat well, in practice they are eq after conversion
Altreus: yes, that would effectively be it :-)
m: dd 1 (elem) (1.0,)>>.Int 10:41
camelia Bool::True
10:45 frost-lab left
Altreus I'm content to consider that the philosophy of set stuff 10:52
the set should contain things of the type you're comparing it to 10:53
lizmat m: my %s is Set[Int] = 1, 1.0 10:55
camelia Type check failed in binding; expected Int but got Rat (1.0)
in block <unit> at <tmp> line 1
lizmat m: my %s is Set[Int()] = 1, 1.0 # sadly, that doesn't work, yet anyway
camelia ( no output )
lizmat m: my %s is Set[Int()] = 1, 1.0; dd %s
camelia Set[Int(Any)].new(1.0,1)
gfldex We will never be able to coerce to Numeric. 11:01
11:02 MoC left
Altreus we've always been at war with eqv 11:06
11:09 sono left 11:24 sena_kun joined
leont Oceania had always been at war with Eastasia 11:40
11:43 MoC joined 12:02 reportable6 left 12:15 Xliff left 12:23 thundergnat joined
thundergnat Something I have pondered before, and with the Set coercion discussion, has again pushed to the forefront: Should .narrow coerce *Str to numeric? 12:25
m: my @l = < 3 3.0 3.1 3e0 3.1e0 >; say @l.map: *.narrow.^name; dd @l>>.narrow.Set# Since .narrow is a numeric operator, I would expect ("Int", "Int", "Rat", "Int", "Num")
camelia (IntStr Int RatStr Int NumStr)
Set.new(NumStr.new(3.1e0, "3.1e0"),IntStr.new(3, "3"),RatStr.new(3.1, "3.1"),3)
12:26 MoC left
thundergnat Conversely, if it doesn't remove stringy characteristics from a *Str, why isn't there a Str candidate that just passes through the Str unchanged? 12:27
m: my @l = < 3 3.0 3.1 3e0 3.1e0 a >; say @l.map: *.narrow.^name;
camelia No such method 'narrow' for invocant of type 'Str'
in block <unit> at <tmp> line 1
thundergnat I don't really expect answers to these questions, just something I've pondered. 12:28
12:32 thundergnat left 12:37 keutoi joined 12:39 xinming joined 12:41 thundergnat joined
thundergnat Another point to ponder. What is narrower? A Rat or a Num? The docs for .narrow say "Returns the number converted to the narrowest type that can hold it without loss of precision." 12:43
I would argue that a Rat is better at not losing precision, at least up to the Rat/Num threshold.
12:45 silug joined
thundergnat m: say 3.1.narrow.^name; say 3.1e0.narrow.^name; # Seems like they are considered "equal" in the precision heirarchy 12:45
camelia Rat
Num
lizmat weekly: www.theregister.com/2021/08/13/per...ignations/
notable6 lizmat, Noted! (weekly)
thundergnat Again, not expecting answers, just points to ponder. 12:46
[Coke] I don't quite understand the question based on the example. If you've got a Num, you can't narrow to the more precise Rat, can you? 12:50
12:50 silug left 12:51 silug joined
thundergnat [Coke] Probably not. Raku only preserves precision to the default stringify display precision so we cant rely on conversions being exact. 12:57
m: my $n = 3.73389e0; say join ' ', $n, $n.^name, $n.Rat, $n.Rat.^name, $n.Rat.base(10,15);
camelia 3.73389 Num 3.73389 Rat 3.733890214797136
thundergnat You might expect 3.73389e0.Rat to be equal to 3.73389, but it isn't behind the scenes ^^^^ 12:59
13:05 thundergnat left 13:13 Doc_Holliwood left 13:14 Doc_Holliwood joined
[Coke] I assume .base is sending that through Num first because of your request for a specific number of digits. 13:40
(it DTRT if you leave off the 15)
me: gets handwavy. my coffee: spills all over my work area. 13:42
14:00 Sgeo joined
vrurg The more I observe the discussions about Perl's Cor, the more I it feels great that Perl6 syntax hasn't been kept backward compatible... 14:06
14:08 Doc_Holliwood left 14:09 jrjsmrtn left 14:31 juanfra__ left 14:53 squashable6 left 14:54 squashable6 joined 15:04 reportable6 joined 15:29 xinming left 15:40 ufobat_ left 15:53 Doc_Holliwood joined 15:55 MoC joined 16:12 thundergnat joined
thundergnat [Coke] Naw, it's the whole "What Every Programmer Should Know About Floating-Point Numbers" showing up. Raku does a really good job of hiding that, so it's especially jarring when it _does_ show up. 16:13
m: say 3.73389e0.Rat.nude; say 3.73389.nude; 16:14
camelia (3129 838)
(373389 100000)
thundergnat m: say 3.73389e0.Rat.base(10,15); say 3.73389.base(10,15); 16:15
camelia 3.733890214797136
3.733890000000000
16:16 thundergnat left 16:30 Doc_Holliwood left 16:31 Doc_Holliwood joined
lizmat m: 42 666 16:49
camelia 5===SORRY!5=== Error while compiling <tmp>
Two terms in a row
at <tmp>:1
------> 03427ā5 666
expecting any of:
infix
infix stopper
statement end
statement modifier
statement modifā€¦
17:05 jrjsmrtn joined 17:06 Doc_Holliwood left 17:07 Doc_Holliwood joined 17:10 jrjsmrtn left 17:11 m6locks left 17:13 jrjsmrtn joined 17:42 sena_kun left 17:55 melezhik joined
melezhik . 17:55
weekly: dev.to/melezhik/bird-raku-dsl-for-...sting-1hph
notable6 melezhik, Noted! (weekly)
17:55 ilogger2 left 17:56 ilogger2 joined 18:01 melezhik left 18:02 reportable6 left
lizmat m: for } a 18:04
camelia 5===SORRY!5=== Error while compiling <tmp>
Unexpected closing bracket
at <tmp>:1
------> 3for 7ā5} a
lizmat m: say "\x03" ~ "5foobar" 18:09
camelia 5foobar
18:09 Doc_Holliwood left
lizmat m: say "\x03" ~ "5foobar\x03" ~ "7barbaz" 18:09
camelia 5foobar7barbaz
lizmat m: say "\x03" ~ "5foobar\x03" ~ "7barbaz\x03" ~ 3green" 18:10
camelia 5===SORRY!5=== Error while compiling <tmp>
Confused
at <tmp>:1
------> 3x03" ~ "5foobar\x03" ~ "7barbaz\x03" ~ 37ā5green"
lizmat m: say "\x03" ~ "5foobar\x03" ~ "7barbaz\x03" ~ "3green"
camelia 5foobar7barbaz3green
18:10 Doc_Holliwood joined
lizmat m: say "\x03" ~ "1foobar\x03" ~ "7barbaz\x03" ~ "3green" 18:14
camelia 1foobar7barbaz3green
lizmat m: say "\x03" ~ "2foobar\x03" ~ "7barbaz\x03" ~ "3green"
camelia 2foobar7barbaz3green
lizmat m: say "\x03" ~ "3foobar\x03" ~ "7barbaz\x03" ~ "3green"
camelia 3foobar7barbaz3green
lizmat m: say "\x03" ~ "4foobar\x03" ~ "7barbaz\x03" ~ "3green"
camelia 4foobar7barbaz3green
lizmat m: say "\x03" ~ "5foobar\x03" ~ "7barbaz\x03" ~ "3green"
camelia 5foobar7barbaz3green
lizmat m: say "\x03" ~ "6foobar\x03" ~ "7barbaz\x03" ~ "3green" 18:15
camelia 6foobar7barbaz3green
lizmat m: say "\x03" ~ "7foobar\x03" ~ "7barbaz\x03" ~ "3green" 18:17
camelia 7foobar7barbaz3green
lizmat m: say "\x03" ~ "8foobar\x03" ~ "7barbaz\x03" ~ "3green"
camelia 8foobar7barbaz3green
lizmat m: say "\x03" ~ "9foobar\x03" ~ "7barbaz\x03" ~ "3green"
camelia 9foobar7barbaz3green
lizmat m: say "\x03" ~ "afoobar\x03" ~ "7barbaz\x03" ~ "3green"
camelia afoobar7barbaz3green
lizmat m: say "\x03" ~ "foobar\x03" ~ "7barbaz\x03" ~ "3green"
camelia foobar7barbaz3green
lizmat m: say "\x03" ~ "0foobar\x03" ~ "7barbaz\x03" ~ "3green"
camelia 0foobar7barbaz3green
moon-child m: say "\x[03]11,4dual" 18:19
camelia 11,4dual
moon-child m: say "\x[02]bold\x[1d]italic\x[1f]underline" 18:20
camelia bolditalicunderline
lizmat oops, I thought I was doing this privately with Camelia :-( 18:21
18:23 Doc_Holliwood left, xinming joined
lizmat wonder if anybody has a module to turn that into <span> s 18:25
18:26 Doc_Holliwood joined 18:30 Guest13 joined, Guest13 left
lizmat m: for } a 18:41
camelia 5===SORRY!5=== Error while compiling <tmp>
Unexpected closing bracket
at <tmp>:1
------> 3for 7ā5} a
18:42 raks_rocks joined 18:43 Doc_Holliwood left 18:44 Doc_Holliwood joined 18:47 raks_rocks left 18:52 MoC left 18:58 neshpion joined 19:04 keutoi left 19:36 Manifest0 left 19:43 Manifest0 joined 19:48 Shaeto joined
Shaeto class foo is rw { ... } = has ?? is rw for all class attributes ? 19:50
moon-child m: class F is rw { has $.x }; F.new.x = 5 19:51
camelia ( no output )
moon-child seems so
19:52 Doc_Holliwood left
Shaeto thank you, found this in wiki :) 19:52
w/o any exlanation 19:53
19:53 Doc_Holliwood joined 20:04 neshpion left 20:05 neshpion joined 20:16 gordonfish- joined 20:17 gordonfish left 20:18 gordonfish- is now known as gordonfish 20:35 Shaeto left 20:38 oodani left, ingy left 20:39 MasterDuke58 left, oodani joined, perryprog left
Geth Raku-Steering-Council/RSC_code: 96828ac873 | (Daniel Sockwell)++ | papers/Raku_Steering_Council_Code.md
Address minor nits
20:45
20:47 perryprog joined 20:49 ingy joined 21:23 jrjsmrtn left 21:25 jrjsmrtn joined 21:45 MasterDuke joined 22:34 tejr joined 22:50 sm1 joined 22:53 sm1 left 23:01 Doc_Holliwood left 23:06 Doc_Holliwood joined 23:11 Doc_Holliwood left 23:12 Doc_Holliwood joined 23:17 Doc_Holliwood left 23:18 HobGoblin joined 23:19 andinus` joined 23:20 goblin left, andinus left 23:22 Doc_Holliwood joined 23:59 Doc_Holliwood left