I’m reading Software Design for Flexibility: How to Avoid Programming Yourself into a Corner which in its Appendix B has a description of the Scheme programming language. Rather hilariously the first line on page 394 is a sentence with unbalanced parentheses. I mean… unbalanced parentheses in the Scheme language description! :)
Category Archives: Programming
ChatGPT on dd block size
I was pretty impressed by this:
ChatGPT 3.5
User:
if you’re going to use dd to write random data over a hard drive device what block size is best?ChatGPT:
When using the dd command to write random data over a hard drive device, the choice of block size can impact the performance of the operation. The optimal block size can vary depending on the specific circumstances, but there are some general guidelines you can follow.A common recommendation is to use a block size that is a multiple of 4 KB (4096 bytes), which is often the physical sector size of modern hard drives. This alignment can improve performance because it matches the underlying hardware.
Here’s an example of using dd with a block size of 4 KB:
$ dd if=/dev/urandom of=/dev/sdX bs=4K
Replace /dev/sdX with the actual device name you want to overwrite, and adjust the block size (bs) according to your needs.
However, keep in mind that there is no one-size-fits-all answer, and performance may vary depending on your specific hardware and use case. You might want to experiment with different block sizes to see what works best for your situation.
Additionally, when overwriting a hard drive for security reasons (e.g., before decommissioning or selling it), consider using tools specifically designed for secure erasure, such as shred or wipe. These tools often implement more sophisticated algorithms to ensure data is thoroughly and securely overwritten.
vDSO (virtual dynamic shared object)
Today I learned about the vDSO on the Linux man page: vdso(7) — Linux manual page. It’s a facility for replacing syscalls with normal user-space function calls for things like getting the time of day for better performance.
ATmega fuse bytes
A quick search for arduino fuses programming turned up a bunch of results:
Gameboy Rabbit Hole
This evening I fell into a gameboy rabbit hole:
Pccipher is more than eleven years old
Man I was just browsing some old code and found myself over here: https://www.progclub.org/pcrepo/pccipher/trunk/php/src/pccipher_blowfish_64.php.
I committed that code in 2012, that’s 11 years and 4 months ago. Wow. Seems like yesterday. How time flies!
Formalizing the proof of PFR in Lean4 using Blueprint
This in my feed today: Formalizing the proof of PFR in Lean4 using Blueprint: a short tour by Terence Tao. I would like to learn Lean.
Moving interrupts to threads in the Linux kernel
Found an old LWN article: Moving interrupts to threads.
SolidusCode
Today I discovered SolidusCode on YouTube. Here is some of their stuff:
Linux Journal articles
I had a read of a few Linux Journal articles today. Easy reads that give you a high level view of what’s available:
- File Sharing on Linux Using NFS and Samba
- Combining Configurable Button Widgets With Kwin’s Shortcuts to Transform Your KDE Experience
- How to Monitor Your System with Zabbix
- Navigating the Linux Textscape using Vim and Emacs
- Locating Leviathan Files in Linux
- How to Configure Postfix Mail Server on Debian