4 ms·
Author here: I honestly expected it to be much worse. The tracing integration in particular is fantastic - being able to just slap a `#[instrument(...)]` attrib
by fasterthanlime 4y ago
Author here: I honestly expected it to be much worse. The tracing integration in particular is fantastic - being able to just slap a `#[instrument(...)]` attribute on any function and then be able to filter which spans you want to see is kind of a superpower.
That said I think much could be improved, still. I only breezed through the perf/nperf stuff because I've used them before, and through the self-profiling stuff because rustc devs helped me with it.
I would've killed for a REPL while I was working on this (or a server architecture so I could write my _own_ rustc queries), and step through them, etc. I like Kate's approach to this[1] - I'd just like something a little more... interactive.
What do _you_ think it should look like? I feel like a ton of good ideas come from folks who "simply didn't know it was impossible" (more accurately: haven't been trained to accept to work with subpar tools). I'm excited to try out Pernosco[2] for example, it seems like a much-needed rethink of debuggers.
[1]: https://twitter.com/thingskatedid/status/1386077675211526148 https://twitter.com/thingskatedid/status/1386077675211526148
[2]: https://pernos.co/ https://pernos.co/
- PoignardAzur 4y agoThinking "things should be better" was actually part of what led me down the rabbit hole of working on the Druid crate, and then starting my own crates (Panoramix and an unreleased druid fork). > What do _you_ think it should look like? Ideally, I'd want something "browser-devtools-like". Like, you know how, when you hover your mouse over a DOM node in the DOM inspector, Chrome/Firefox will automatically highlight the rendered node on your page? I'd want that for code. Like, I'd want to be able to hover on that `Binder(ProjectionPredicate(...)` dump, and have the IDE highlight the span in the input code of the `where clause` this matches. (Or like, not in the input code, but in a buffer showing one of the intermediate representations.) Other things I'd want: - Being able to alt-click on the `Binder` log and open a page showing Binger's documentation, instead of having to ctrl+shift+f it in the code. - Being able to select a value I don't like, and jump to the call stack that generated that value, inspect variables in that call stack, etc. - Being able to hot-reload and execute spans with different parameters. Eg I'd want to be able to rewrite a function, and have it be recompiled on the fly, and called with the same parameters as before, and see the changes and new logs propagate. Of course this only works if the function is pure and part of a pass system; the idea being that the IDE would cache the previous passes. The document I've seen that best encapsulates what I'd want is "Learnable Programming" by Bret Victor: http://worrydream.com/#!/LearnableProgramming http://worrydream.com/#!/LearnableProgramming > I'm excited to try out Pernosco I really liked Pernosco when I first saw it! I haven't had the occasion to use it yet, but I really like the principles behind it. I've also heard good things about Jaeger, and the UI looks good in your screenshots. I might try to use it if I ever give working on rustc another try.