▲ | beligum 14 hours ago | |||||||||||||
I wanted to use my new Sony DSLR (a6700) in the same way as I use my server: by ssh'ing into it. This is a one day hackaway helper built on Sony’s official Camera Remote SDK. It sort of mimics an ssh session by connecting to my Sony over Wi-Fi, listens for new photos or specific events... and runs scripts on them. Thank you Sony, for not forgetting the Linux fan base. And thank you ChatGPT for freshening up my c++ skills! | ||||||||||||||
▲ | SAI_Peregrinus 11 hours ago | parent | next [-] | |||||||||||||
Nitpick: that's a DSLM, or just "mirrorless" camera. There's no reflex mirror, so it's not a DSLR. | ||||||||||||||
| ||||||||||||||
▲ | JdeBP 7 hours ago | parent | prev | next [-] | |||||||||||||
I wouldn't thank ChatGPT too enthusiastically. As always for LLMs, it has given you code that is rife with common pitfalls (because, after all, they massively plagiarize sources where people post poor code). For examples: It does not follow the Linux rules for pathname separators, but mixes in Windows-isms. It doesn't properly check whether std::atomic<bool> is actually signal safe on the target architecture. Its unique filename generation has an all-too-common failure mode. It passes by reference only to then make local value copies anyway. It does not correctly follow the XDG Base Directory Specification. | ||||||||||||||
| ||||||||||||||
▲ | pjmlp 3 hours ago | parent | prev [-] | |||||||||||||
Some stuff that could be improved with modern C++, Instead of
Use the filesystem API,
-- https://en.cppreference.com/w/cpp/filesystem.html | ||||||||||||||
|