Earlier quoted context omitted.
Enable them when you need to debug. This is for speeding up "edit-build-run" workflows.
It's a lot faster to add a log point in a debugger than to add a print statement and recompile. Especially with cargo check, I really don't see the point of non-debuggable builds (outside of embedded, but the size of debuginfo already makes that a non-starter).
Speeding up the Rust edit-build-run cycle
111–120 of 125 posts
Re: Speeding up the Rust edit-build-run cycle
#112> ~/.cargo/ This reminds me... STOP putting your shitty dot-directories full of a mix of config, cache and data in my god damned home directory. Concerned that not doing this will break things? Just check if you've dumped your crap in there already and if not then put it in the right places. Worried about confusing existing users migrating to other machines? Document the change. Still worried? How about this: I'll pu…
So like ~/.ssh/ is bad? Or does it get grandfathered?
Re: Speeding up the Rust edit-build-run cycle
#113>Debug information tends to be large and linking it slows down linking quite considerably. If you’re like many developers and you generally use println for debugging and rarely or never use an actual debugger, then this is wasted time. Interesting. Is this true? In my work (java/kotlin, primarily in app code on a server, occasional postgres or frontend js/react stuff), I'm almost always reaching for a debugger as an…
I came here to write exactly this .. if I was drinking something I would have spit it everywhere laughing when I read it. I guess 'many developers' here probably refers to web developers who don't use the debugger, cause it's mostly useless/perpetually broken in JS land ..? I rely heavily on the debugger; can't imagine how people work without one.
Re: Speeding up the Rust edit-build-run cycle
#114Re: Speeding up the Rust edit-build-run cycle
#115>Debug information tends to be large and linking it slows down linking quite considerably. If you’re like many developers and you generally use println for debugging and rarely or never use an actual debugger, then this is wasted time. Interesting. Is this true? In my work (java/kotlin, primarily in app code on a server, occasional postgres or frontend js/react stuff), I'm almost always reaching for a debugger as an…
In c++ for debugging a mid-sized app, gdb will sometime take up to 5 min to start (assuming no remote symbol cache used). On fairly powerful hardware - i7 13000-something, 64g of RAM. I have the time to do 15 compile-edit-run cycles adding prints in that time span before I have even reached main() in it. (And I really tried every optimisation, gdb-index, caches, split DWARF etc. It jus is absolutely mind bogglingly s…
Downloading symbols for first time from network symbol server is long but its not part of debugging cycle, at least after 1st run.
Re: Speeding up the Rust edit-build-run cycle
#116Earlier quoted context omitted.
You're obviously not a Rust programmer.
Rust only protects from a very small subset of bugs (memory corruption issues and data races) but not from logic bugs which are far more common.
Re: Speeding up the Rust edit-build-run cycle
#117Earlier quoted context omitted.
I am comfortable using a debugger, but println debugging is easy, fast, and disproportionately effective for most of my debugging in practice. I reach for a “real” debugger when necessary, but that’s less than 5% of the time.
I wonder, do you use a separate debugger, or a debugger that's integrated into your IDE? "Reaching for a debugger" is just pressing F5 in an IDE. E.g. I keep wondering whether the split between people who can't live without debuggers vs people who rarely use debuggers is actually people who use IDEs versus people who don't.
Re: Speeding up the Rust edit-build-run cycle
#118> ~/.cargo/ This reminds me... STOP putting your shitty dot-directories full of a mix of config, cache and data in my god damned home directory. Concerned that not doing this will break things? Just check if you've dumped your crap in there already and if not then put it in the right places. Worried about confusing existing users migrating to other machines? Document the change. Still worried? How about this: I'll pu…
Re: Speeding up the Rust edit-build-run cycle
#119> ~/.cargo/ This reminds me... STOP putting your shitty dot-directories full of a mix of config, cache and data in my god damned home directory. Concerned that not doing this will break things? Just check if you've dumped your crap in there already and if not then put it in the right places. Worried about confusing existing users migrating to other machines? Document the change. Still worried? How about this: I'll pu…
So like ~/.ssh/ is bad? Or does it get grandfathered?
Yes, it's bad. If you predate the specification then see options 2 (check), 3 (document) or 4 (come up with a new spec for opting in).
Re: Speeding up the Rust edit-build-run cycle
#120> ~/.cargo/ This reminds me... STOP putting your shitty dot-directories full of a mix of config, cache and data in my god damned home directory. Concerned that not doing this will break things? Just check if you've dumped your crap in there already and if not then put it in the right places. Worried about confusing existing users migrating to other machines? Document the change. Still worried? How about this: I'll pu…
I hate XDG. I prefer app/kinds-of-data. If home directory clutter is the problem, I would prefer having a ~/crap folder. So it would be ~/crap/.cargo