I love the sound of my GPU squealing. It is the sound of effective debugging 😀 🚫🐜 .

@kristinmbranson If you don't mind me asking, what langauge/tools do you use to write/debug?

I've been looking into Lisp specifically for the interactive debugging experience that doesn't blow the stack when it errors, but it's scientific computing facilities leave much to be desired IMO.

@johnabs I'm using python. I recently switched to VSCode as an IDE, and the Python extension's debugger works well. It can catch errors and you can mess around in the environment after that, go up and down in the stack. I like to write code while debugging it in an interpreter. I write some code, highlight it, use a shortcut to evaluate it in the environment, and iterate. Partly this is because loading my data takes forever. It's been 25 years since I last used Lisp, not sure how it compares.

Follow

@kristinmbranson Interesting! I've used python before in a similar way(and R and Julia, for that matter), but I find that long simulations with "inconsistent" runtime bugs just demolish my productivity and lead to a whole goose chase.

One of the advantages to lisp that I'm trying to realize for myself lies in the debugging process: you can fix runtime errors *after* they occur, but *without* restarting the entire process. For example, 30 minutes into a sim, you get a divide by 0 error from some weird overflow or something. So long as you compiled the code with maximum debug settings, the debugger let's you go through the stack (without dumping it and killing the process) find the error in the appropriate function, recompile JUST that function, and resume the process from the exact point before it failed, rather than wasting another 30 minutes praying you actually fixed it (my life for a month last year 😑). I can't tell from your original response, does the python debugger allow stuff like this?

Oh, and once you fix any remaining bugs, you can speed up the code just by changing the compiler settings to optimize for speed and/or space. Boom, you're on par with c/c++ in many cases, much faster than pure python or R, and it let's you use an iterated workflow like the more modern languages too!

I must admit, it definitely doesn't feel as polished as python/R/Julia in terms of certain language features and scientific computing (yet), but I think with enough TLC it will get there...I hope (or some other language will implement the awesome debugging protocol, lol).

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.