News for hackers. Stuff that matters.
Re:Why did Turbo Pascal apps fail with a division-by-zero on... by ivan4th on Saturday August 24, 2019 @03:58PM (#20789354)
Good for you! I've lost most of my "childhood coding" stuff to an accidental `rm -rf /home /something` (note the extra space. Backups? what backups?) some ~18 years ago. That included a couple of DOS viruses, one of which was polymorphic (I wrote them just for fun and never spread them; did upload one to an antivirus vendor BBS back then through their "Submit a new virus" function and it's still in many databases because of that); a C++ rewrite of mars.exe voxel landscape generator, but with added rotation, music and lakes; a PWM-based WAV player for PC speaker; etc. I'm still quite sad about that accident ...
Re:Why did Turbo Pascal apps fail with a division-by-zero on... by bonzini on Saturday August 24, 2019 @05:15PM (#20789756)
I remember an equally disastrous "rm -rf * ~". Again, notice the space, and also how the -r was completely unnecessary.

Fortunately these days everything is in version control and my editor doesn't clutter the current directory with backups anymore

Re:Why did Turbo Pascal apps fail with a division-by-zero on... by zshrdlu on Sunday August 25, 2019 @12:00PM (#20793650)
This is the reason I adopted 'find . -type f -name "*~" -delete'.
Re:Why did Turbo Pascal apps fail with a division-by-zero on... by colejohnson66 on Saturday August 24, 2019 @05:23PM (#20789798)
Is there a way to stop rm from running if there’s a space?
Re:Why did Turbo Pascal apps fail with a division-by-zero on... by semi-extrinsic on Saturday August 24, 2019 @06:12PM (#20790053)
IIRC, zsh has an option such that if you type `rm -rf /folder` it will ask

Sure you want to delete /folder with 382 files? (Y/N)

This would at least give you a chance to spot that it was asking about the wrong file.

Re:Why did Turbo Pascal apps fail with a division-by-zero on... by dllthomas on Saturday August 24, 2019 @05:50PM (#20789928)
If you're okay with being unable to remove multiple files at once...