Zulip Chat Archive
Stream: mathlib4
Topic: Speedcenter: sort by absolute change in instructions?
Michael Rothgang (Jun 11 2024 at 08:52):
(No idea if this is the right stream, or #lean4 is better - feel free to move.)
First things first: I think the speed-center is great, thanks for having it!
Sorting the output (e.g. by number of instructions is great). Occasionally, I'd like to also sort by the absolute change (in e.g. instructions). How hard would it be to add this? @Sebastian Ullrich
Sebastian Ullrich (Jun 11 2024 at 12:32):
Depends on how good your TypeScript is :)
Michael Rothgang (Jun 11 2024 at 12:50):
Non-existent (I can presumably guess what the code does, but haven't written a single line), and neither is my ChatGPT :-)
Michael Rothgang (Jun 11 2024 at 15:36):
How large a change would this be? In the order of two lines, ten lines, 50 lines or "refactor this code first"? If given a pointer where to look, I might try a change up to ten lines.
Sebastian Ullrich (Jun 11 2024 at 16:56):
I don't know, I don't think I've ever touched that part
Daniel Weber (Jun 11 2024 at 17:22):
The relevant file seems to be https://github.com/IPDSnelting/velcom/blob/main/frontend/src/components/comparison/RunComparisonTable.vue , but I'm not sure exactly what's going on these
Michael Rothgang (Jun 11 2024 at 17:57):
@Daniel Weber Wow, thanks a lot!
@Sebastian Ullrich What happens when you change lines 161 to sortable: true,
? I guess this would do the trick :-)
Michael Rothgang (Jun 11 2024 at 18:04):
Would you prefer me to file a 1-line PR, or make that change yourself?
Some background after 5min of googling: the page uses a Vue data table (the v-data-table
on line 2), sorting is explained e.g. here
Sebastian Ullrich (Jun 11 2024 at 20:46):
It would be best to first build and test it locally but for this trivial change a direct PR would be welcome
Michael Rothgang (Jun 12 2024 at 07:00):
Noted! Will do so later - perhaps today, otherwise this week!
Sebastian Ullrich (Jun 12 2024 at 08:08):
Okay, since you already pointed me at the right line, I made the change and deployed it. Looks good!
Kevin Buzzard (Jun 12 2024 at 10:39):
+1 for speedcenter is great. I also like @Michael Stoll 's interpretations of the data.
Last updated: May 02 2025 at 03:31 UTC