<Wanda[cis]>
because they were going to make ranges Copy
<Wanda[cis]>
and we uh. clone ranges a lot.
<Wanda[cis]>
which is incredibly annoying
<galibert[m]>
And they didn’t ?
<Wanda[cis]>
except then I learned they descoped it for some reason
<Wanda[cis]>
so yeah.
<galibert[m]>
Annoying
leocassarani[m] has joined #prjunnamed
<leocassarani[m]>
ranges in Rust are really annoying
<leocassarani[m]>
the RangeBounds trait is theoretically a good idea for abstracting over all the different types of ranges, but it's also not dyn safe
<leocassarani[m]>
and then they just kind of feel underpowered — would it kill them to have methods like intersect, union, overlaps, etc that work across the different ranges (.., ..=, etc)
<leocassarani[m]>
And yeah then you've got the limitation that you can't call iter() on a range (and iterate it by reference), you need to consume the value by calling into_iter() which means more cloning, indeed
<Wanda[cis]>
yeah the new ranges were going to fix that particular annoyance
<Wanda[cis]>
I mean, they still are; just, in 2027 or so
<Wanda[cis]>
sigh we may have spent a significant amount of time fighting Rust annoyances when writing prjunnamed core
<Wanda[cis]>
beats C++ I guess, but ehhhh
<Wanda[cis]>
(have you seen the sheer amount of `Into<Cow<'_, Value>>` impls we have?)
<Wanda[cis]>
(I actually think I'll want to make this stuff even more messy at some point, to avoid creating ephermeral Values in places)
<Wanda[cis]>
(note: if I need to make a "behaves-like-a-Value" trait at any point, you can bet it's going to be called Valuable)
<Wanda[cis]>
I with unsized types were real so I could just struct ValueSlice([Net])
<Wanda[cis]>
ohhhh hey that reminds me, I have mei here now so I can get in-catperson help with annoying Rust stuff
<Wanda[cis]>
hey mei remind me to ask you about enum-maps once we finish eating
<mei[m]>
btw thoughts on piping uir to graphviz?
<Wanda[cis]>
as is the compiler tradition
<Wanda[cis]>
yeah, just make sure to gate it under an optional feature
<Wanda[cis]>
(for wasm reasons mostly)
<galibert[m]>
mei is your resident Rust expert ?
<mei[m]>
meow
<Wanda[cis]>
mei's my roommate; it also happens to be even more of a programming language nerd than me
<Wanda[cis]>
and a compiler nerd
<Wanda[cis]>
(and many other kinds of nerd)
<Wanda[cis]>
I maaaaay have ranted at it a lot about unnamed long before its existence became public
<galibert[m]>
Feel like a load-bearing « may » :-)
<mei[m]>
so, currently the cell count statistics only get printed if you're outputting the IR to stdout. thoughts about printing them always instead?
<mei[m]>
i think it would make the most sense to print the statistics to stdout at all times (maybe have a --quiet option that would let you suppress it)
<whitequark[cis]>
mmm
<whitequark[cis]>
originally they were in impl Display for Design
<whitequark[cis]>
then i factored them out since it seemed expensive and not always necessary
<whitequark[cis]>
proposal: we make "alternate" mean "no comments, no toposort" and print the stats always otherwise
<mei[m]>
hm, i think it might specifically be useful to print the statistics to stdout even if the actual IR is being output to a file
<whitequark[cis]>
mmm, true actually
<whitequark[cis]>
yeah sure lets do that
<whitequark[cis]>
put it in print_statistics() or smth
<whitequark[cis]>
we can add --quiet when we have real users i guess