Avatar

robinm

robinm@programming.dev
Joined
1 posts • 37 comments
Direct message

I don’t agree with the sentiment that debuggers are sub-optimal for Rust and that’s why they are not used. In C++, I hop in gdb all the time, and I’m very fluent with it. But I never had the need for it in Rust. So they may be sub-optimals, IDK, I never had an issue in Rust where the best tool would have been a debugger.

I would never do printf debugging in C++ because it’s too complicated to do. In Rust with Display/Debug it’s a breeze. And my best debugger for Rust is the compiler itself. But most importantly, most of my bugs are caught at compile time. The few remaining one are logic error and best analyzed with logging, aka printf debugging, and not a debugger that can pause the execution.

permalink
report
reply

It seems extremely interesting.

permalink
report
reply

You seems to have a severe issue so I’m not sure what I’m going to say may help.

Learning something and then forgeting it is absolutely normal. Repetition over and exponentially long time and sleep in between helps a lot. Some people use flashcards to helps with memorisation. The idea is simple, when you learn something you write question + answers on a piece on paper (usually bristol for easy manipulation) and put it in a box. This box has multiple compartment: every day, every second day, once a week, once every second week, once every second month for example. When you add a card you add it to the “every day” compartment. Then each day you open all the compartment of the current day and ask yourself all the questions. If you correctly remember the answer you put it in the next compartment, and if you don’t you put it back to the “every day” one.

Another way to helps you understand and rembembering things is to explain them to others. If you don’t have someone to explain what you just learn you can create youtube video (even if noone will watch them but you do as if you had an audience). As bonus you now have a video that explains using your language something you just learn if you ever forget it!

permalink
report
reply

It’s especially true when you want to parse some json/xml/whatever. Just describe your datastuctures with regular struct and enum, add serde and done! It’s like magic!

permalink
report
parent
reply

I need to re-try it. I really like like lsp/dsp are first class cityzen, including the keybindings, and that there is better text objects than in vanilla neovim. Last time I tried it there was a few things that where not that easy to set-up (I forget what), but I should definitively take the time to learn it.

I just wish that neovim/kakoune/helix had a marketplace just like vscode. It make the discovery and installation so much easier when everyone use the same tools.

permalink
report
parent
reply

I didn’t know about CACHEDIR.TAG, that’s good to know. And yes, Rust tooling is stellar.

permalink
report
reply

I definitively love llogic comments when he(she?) has no submitions for the quote of the week!

permalink
report
reply

That was a fantastic read. I’m both impressed by the stellar performance of C, and the stellar safety of Rust while keeping nealy best in class performances.

permalink
report
reply

I do understant why old unicode versions re-used “i” and “I” for turkish lowercase dotted i and turkish uppercase dotless I, but I don’t understand why more recent version have not introduce two new characters that looks exactly the same but who don’t require locale-dependant knowlege to do something as basic as “to lowercase”.

permalink
report
reply

Yes exacly. And I assume that the test suite of all of those project are long enough to average the usual jitter of wall time mesurement.

What I’m hoping to see is if rust+llvm vs rustc+gcc binary speed are within a few percents or if there is a real difference between the two (I’m expected that we eventually reach the former once thinLTO and other optimisations are implemented).

And while doing so it could also be possible to measure the difference in max RSS.

permalink
report
parent
reply