🇨🇦 tunetardis

  • 0 Posts
  • 18 Comments
Joined 1 year ago
cake
Cake day: June 8th, 2025

help-circle



  • This.

    As much as you try to keep various modules in your program functioning as independently from one another as possible so that you can unit test the shit out of them, the whole system is far more complex and interdependent in the end.

    And that’s just within your own code. Bring in external libraries, drivers, etc. and it’s easy enough for fixes downstream to affect what happens further up.

    One thing I find interesting is there seem to be cultural differences between platforms. In Windows, for example, it’s super common to see multiple versions of the same library installed, and apps dependent on a specific version, even if it’s rather ancient. Linux/Mac tends to frown on this? There may a stable version and development version, but that’s about it. So the onus is more on the app developers to make sure their code works with the latest library.

    It’s also important to note that it’s not always an unanticipated effect. There may be some need to change a library to no longer support a certain usage. In that case, the old usage is marked “deprecated” and anyone using the library is given a window of time to make adjustments to the new interface, but if they don’t get there on time, the patch breaks their program. And in some cases, the adjustments can be major, requiring what amounts to a total rewrite.


  • That’s a good question. It may depend on the platform?

    Right now, I’m doing most of my coding on a Mac. I noticed I get into trouble when trying to move the program to another machine. The OS seems to tag the executable with some metadata that runs afoul of Gatekeeper. Removing said metadata seems to get you past that. But that’s for in-house software that has never been registered with Apple or anything. I’ve never actually tried modifying a program that has been registered, so I’m not sure if there are any extra levels to this?


  • Yeah. At the lowest level, the CPU reads a program as a bunch of numbers, where each number is a very simple instruction such as “add 2 values together”. Assembly language is a more human-readable version of machine code, where you can see something more like add r1,r2 instead of 35397176 or whatever numeric code means “add the value in register 1 to 2” for some hypothetical processor. (Registers are where the processor keeps values loaded in from the RAM.)

    So in my case, if I saw that the program was making some system call to the random number generator and the calling conventions used by the operating system always put the return value in register 0, I could replace the call with something like clr r0 (clear the value in register 0). It’s a pretty simple hack. So the “generator” now always generates zero.

    These days, programs are often code-signed and if you start messing around like that, they’ll get flagged as malware. But it worked fine back in those open and trusting days.


  • I remember when my grandfather died, we were going through his belongings and found a drawer full of electric razors. Why did he have so many?!? Then we noticed every one was full of hair, and concluded that he bought a new one every time it filled up rather than emptying it.

    Then years later, my parents became snowbirds who went to Mexico every winter, and they stayed with this other family who were locals. They got good at Spanish and one day I guess, my dad was talking to the other dad and they burst out laughing. I asked what that was all about, and he said the Mexican dad’s father also had a drawer full of electric razors, and he never understood why?


  • I once pirated a book because I didn’t want to get it from another room.

    I pirated a game I legit bought. This was way back in the days when some games had this annoying copy protection where you had to look up words from the manual before you could play. Enter the 3rd word on line 7 of page 28. This sort of thing.

    It got old really fast, so I disassembled the binary and saw where it was calling on a random number generator to select the page. I changed just 1 assembly instruction so that the generator would always return 0. Then it said look up so-and-so and the word turned out to be “time”. After that, all I had to do was enter “time” at launch and I tossed out the manual.






  • Others have covered the subtleties of how the sound could be reproduced on older players in a different way. But there may a psychological component as well? And I don’t just mean a nostalgia factor, though that could certainly be part of it.

    One thing I miss is having a dedicated music player that will never interrupt my listening experience with a notification or anything like that. It’s the same reason I still prefer going to a theatre to watch movies. Zero distractions compared to a home screening and I feel like I can get far more immersed in it.


  • Ooh that’s a tricky one! I looked it up and the most common character for it is a verb meaning something like to arrange for display? Good luck finding an English equivalent to that! There is a 2nd meaning of “old or ancient” which sounds a little more promising, though I can’t think of an English name with that meaning off the top of my head.

    Apparently, Chen is the most common family name in Taiwan, and is really the same name as Chan, Tam, and Tran depending on where you live and what you speak. Not that that helps you any.


  • fwiw family names in English come typically come from several sources. They may be place names (e.g. London), descriptions of places (e.g. Ford: a shallow place where you can cross a river), occupations (e.g. Smith), or the name of a family business (e.g. if your name is Fox, your ancestor likely owned a tavern with a name like The Fox & Whistle or something random). If it’s an occupation that sounds too good to be true like King or Bishop, your ancestor was probably not royalty but served a royal estate.

    Not that you need to follow any of that. Is there a Chinese ancestral name in your family you’re aware of? Maybe you could get it’s meaning and find a close English equivalent? I’m part Japanese myself, and Japanese family names are almost all of the descriptions of places variety. So say your name was Watanabe: a shallow place where you can cross a river. You might then choose to go with Ford as your English name? Just a thought.


  • 🇨🇦 tunetardis@piefed.catoToday I learned@lemmy.ml...
    link
    fedilink
    English
    arrow-up
    2
    ·
    8 months ago

    A little follow-up on this. Tonight I had a look at what it generated. It produced 2 files: a .wav and a .ass. The latter apparently contains subtitles that sync to the audio. But how do you play them together?

    After searching around online, the general consensus seemed that you need to make a video file that throws it all together. For the background image I used a still of the book cover art. Then I ran an ffmpeg command that looked something like this:

    ffmpeg -loop 1 -i cover.jpg -i abogen_file.wav -vf subtitles=abogen_file.ass -shortest audio_book.mov
    

    It sounds pretty awesome and looks like this while it’s playing!

    bUtdFKluimxbNPg.jpg


  • 🇨🇦 tunetardis@piefed.catoToday I learned@lemmy.ml...
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    8 months ago

    I installed it yesterday and started having it chug through the Murderbot series I got in epub format. It seemed to be taking forever, but then I checked a system monitor and discovered it was using the GPU to do most of the work. So whenever my GPU-heavy screen saver kicked in, it slowed to a crawl.

    At any rate, it was done this morning but then I forgot to bring the files to work, so I can’t say at this point how good a job it did? It was a bit of a pain to install because it needed Python 12 and wouldn’t accept Python 14 for some reason, and pyenv on my Mac is a bit of pain because it hates tkinter. Go figure. But I got it working in the end.


  • Here in Ontario, I think we have 16 reactors spread across 3 power plants? And more are purportedly on the way.

    The CANDU reactors use heavy water and should, in theory, be safer than light water designs since they can function with unenriched uranium. OTOH the nearest reactor to where I live is in upstate New York and is rather Fukushima-like from what I’ve heard. Also, I don’t know what the new reactors will be, though the provincial gov seems to be pushing SMRs for whatever reason.