ab5tract R#5778 is super interesting 00:05
linkable6 R#5778 [open]: github.com/rakudo/rakudo/issues/5778 hyperoperator with typed array expects result to be of type matching type of array operand
ab5tract m: dd my Int @a = False, False, True;
camelia Int = Array[Int].new(Bool::False, Bool::False, Bool::True)
timo where did the name go in that display? 00:06
ab5tract I think this one of those places where the available set of implemented features constrained the implementation of other, mostly unrelated things on the way 00:07
eg, if coercion was already implemented when Bool was made, we probably wouldn't have made `(Bool ~~ Int) ~~ True`
timo right, here's actually possibly a spot where more parameterization and some amount of type inference would be able to help? 00:08
ab5tract dd is liable to drop names quite often 00:09
m: my @a = "foo"; dd @a 00:10
camelia ["foo"]
timo mhm
i tend to dd :$foo, :@bar to get names
ab5tract yeah, me too :)
timo there's a bit of trickyness with hyper ops and the types of things they create for the return values, since hypers descend into iterables of any type 00:11
so you can have user-defined array-like or hash-like classes too
so the obvious solution i first thought of, of dropping type arguments would work for typed arrays but not for something where the type arguments don't directly correspond to types of inner containers doesn't generalize :| 00:12
ab5tract yeah, that's a good point.
timo special-casing for Positional[...] or Associative[...] could be okay 00:13
ab5tract Ah, I was thinking more along the lines of the fact that `Array[Int]` shouldn't really be storing `Bool`
timo since that's the roles you are supposed to use when you have some kind of "type of values (and optionally, keys)" in your thing
oh, i don't mind that too much
it's definitely a "huh" when you first see it
m: my Str @words = <dog cat mouse horse chinchilla>; dd @words>>.chars; 00:14
camelia Str = Array[Str].new(3, 3, 5, 5, 10)
ab5tract I don't see any reason for them to be a type of `Int` when everything that you could do with them in terms of comparison to `Int` values will coerce anyway
timo this doesn't even error, LOL 00:15
ab5tract eek
timo i assume we take a shortcut there where we create the results as an IterationBuffer and just bind it into the result
ab5tract well, that's Allomorphism, which I *also* think would have been handled differently if we had coercion in place ahead of time :)
timo oh, is it? 00:16
ab5tract ah, good call out. I'm not actually sure :/
timo m: my Str @words = <dog cat mouse horse chinchilla>; my $res = @words>>.chars; dd $res[0].WHAT, $res[0].^name, $res.^name, $res.^name;
camelia Int
"Int"
"Array[Str]"
"Array[Str]"
ab5tract too late for me to find out tonight
timo nope, it's legit Int objects in there
ab5tract wild :) 00:17
maybe I've been doing too much in statically typed langs lately, but bools and strings in `Array[Int]` feels not good to me 00:18
timo well, the Str in Array[Int] is absolutely without-a-doubt wrong
m: my Str @words = <dog cat mouse horse chinchilla>; my $res = @words>>.chars; $res[0] = $res[0]; 00:19
camelia Cannot assign to an immutable value
in block <unit> at <tmp> line 1
timo it doesn't actually even put scalars in the resulting Array it seems like
i wonder if that should be a "sub-issue" of the issue we were just discussing? how do these "sub-issues" work in github? 00:20
ab5tract They are pretty new, right?
timo docs.github.com/en/issues/tracking...sub-issues
ab5tract I don't think I've worked with them before
timo i think it doesn't necessarily make sense as a sub-issue of this issue, but there could be a parent issue with something like "hyper operators and typed containers don't work together very well" and the created issue could perhaps be renamed to cover dwimmy and non-dwimmy two-op hyperops, and a new issue for hyper-methodcall 00:22
ab5tract yeah, the strings are definitely off. I'm not saying that it's worth anyone's time to unwind the Bool ~~ Int thing, but I do wonder whether we could keep everything we care about WRT to using Bools in numeric contexts without it 00:23
timo if you don't mind, i'll quickly respond on the issue about the Int ~~ Bool thing as well as the custom type thing. or if you want, you can 00:25
ab5tract please go ahead
I'm going Shaq face over here :) i2.kym-cdn.com/photos/images/newsf...28/a11.jpg 00:26
timo have a good Shaq 00:31
m: my $silly = (my @foo = 1, 2, 3, 4) but Positional[Str]; say $silly.^name 00:39
camelia Array+{Positional[Str]}
timo m: my $silly = (my @foo = 1, 2, 3, 4) but Array[Str]; say $silly.^name
camelia Cannot mix in non-composable type Array[Str] into object of type Array
in block <unit> at <tmp> line 1
timo m: my $silly = (my @foo = 1, 2, 3, 4) but Positional[Str]; $silly[10] = "hello"; dd $silly; 00:40
camelia $silly = $[1, 2, 3, 4, Any, Any, Any, Any, Any, Any, "hello"]
timo m: my $silly = (my @foo = 1, 2, 3, 4) but Positional[Str]; $silly[10] = "hello"; $silly[11] = 5; dd $silly;
camelia $silly = $[1, 2, 3, 4, Any, Any, Any, Any, Any, Any, "hello", 5]
timo i guess just adding Positional[Str] doesn't cause the containers that it creates for holding new stuff to become typed 00:41
that may be considered a DIHWIDT 00:43
Geth rakudo/main: 0a70811438 | (Elizabeth Mattijsen)++ | 2 files
Make iterating Map/Hash ~1% faster

By doing repeated attribute lookups only once: this adds some overhead, but reduces bytecode size, which gives more inlining opportunities
14:27
Geth ¦ rakudo: lizmat self-assigned [RakuDoc / RakuAST] Adding config data to a RakuAST::Doc::Block github.com/rakudo/rakudo/issues/5777 19:27
¦ rakudo: lizmat self-assigned hyperoperator with typed array expects result to be of type matching type of array operand github.com/rakudo/rakudo/issues/5778
rakudo/lizmat-Hash-Ordered: 148c3d4815 | (Elizabeth Mattijsen)++ | 2 files
Introduce Hash::Ordered

This subclass of Hash will keep the order in which keys have been added, with as little overhead as possible.
The theory of operation is that whenever a key is accessed, and the key does **not** exist in the hash, then the key will be added to ... (29 more lines)
19:52
[Coke] I have a dirty checkout that shows changes in 3rdparty/libuv - how to discard those? 19:53
Geth rakudo: lizmat++ created pull request #5779:
Introduce Hash::Ordered: hashes that keep the order of the keys
coleman [Coke] if I remember submodules correctly, you need to cd down to the libuv directory and reset to the commit the parent repo expects 19:55
Geth ¦ rakudo: lizmat self-unassigned [JVM] Error when trying to assign to variable typed as native int and use the result of the expression directly as key for nqp::hash github.com/rakudo/rakudo/issues/4732 19:56
[Coke] git submodule foreach --recursive git reset --hard 20:37
git submodule update --recursive --init