🌸 Mon, Nov 4, 2024 🌸

Command to build whisper.cpp on my laptop. Note for future me.

CUDA_DOCKER_ARCH=compute_86 GGML_CUDA=1 make -j

🌸 Mon, Nov 4, 2024 🌸

Why do we call things headless, usually there is a head, but no body. Like headless Git, it has everything except the working tree. Or a headless VM, it has the brains but no visual representation. Maybe ‘faceless’ would be a more appropriate term?


🌸 Mon, Nov 4, 2024 🌸

Do you remember that I complained about Bank of America about a month ago? They sent an email that looked suspiciously scammy. And I needed to double-check if it was a legitimate email. They asked me to verify my personal data, my name, date of birth, and so on. I did it a month ago, and they still froze my credit cards. LUL


🌸 Fri, Nov 1, 2024 🌸

Not fond of that: std::numbers::pi_v<float>. Too long for simple humble π.


🌸 Wed, Oct 30, 2024 🌸

Time is hard. My approach to the problem. Internally, time is always in the UnixTime format, which might be a number of seconds, or if more resolution is needed, it might be in milliseconds, microseconds, or even nanoseconds. Sometimes we may have an integer overflow, so we can go to monotonic time, but first, try UnixTime. And carry it everywhere, and convert it to a human-readable format as close to the user, probably on the frontend side. Try to avoid saving HH, MM, SS and convert them immediately to UnixTime. Still hard, though. For example, scheduling a meeting at 10AM every day - daylight saving - BOOM! - problems.


🌸 Tue, Oct 29, 2024 🌸

I set tabs to be 3 spaces, so I can relatively easily detect if we have source code with mixed-up spaces vs tabs.


🌸 Tue, Oct 29, 2024 🌸

Yesterday, I pulled my back.


🌸 Sat, Oct 26, 2024 🌸

It took one week and one day without long COVID symptoms from last Friday until today, Saturday. Chest pain is starting now.


🌸 Sat, Oct 26, 2024 🌸

My sense of smell is slowly returning. Initially, I lost my sense of smell due to COVID, and subsequently, long COVID. I thought it was not a big deal, mostly I missed the smell of coffee, but it’s nice to be able to smell familiar smells of the house when I return home, or the change of smell outside because it’s fall, even in Southern California, you can smell different seasons.


🌸 Sat, Oct 26, 2024 🌸

Developers love to latch onto the latest “magic bullet” solutions—object-oriented programming, functional programming, data-driven techniques, design patterns, test-driven development, continuous integration, continuous deployment, memory safety, rapid development, extreme programming, unit tests, functional tests, AI-assisted coding—you name it. There’s a common belief that mastering any one of these will solve all their problems. Newsflash: It won’t.

I’m not saying these practices aren’t valuable; they are. But here’s the harsh truth: no methodology or tool can replace the hard work of actually thinking about the problem, understanding the nuances, and applying your experience. I’ve seen developers slap on design patterns like they’re checkboxes to tick, or rely on AI to generate code without a second thought, only to end up with messy, unmaintainable solutions.

That’s why I love C++. It’s a language that doesn’t let you off easy—it forces you to think deeply. Being multi-paradigm, C++ allows you to blend these practices directly in the code, but it’s up to you to choose the right approach for the right problem. You want to do object-oriented design while optimizing for performance? C++ lets you do that. You want to mix functional programming with low-level memory management? Go for it. But the language won’t hold your hand or cover up bad decisions.

So, yes, use these methodologies, embrace AI tools, and learn the latest techniques. But don’t fool yourself into thinking they’ll save you from having to think hard and make tough decisions. In the end, it’s your brain and your experience that matter the most. Everything else is just a tool.


🌸 Fri, Oct 25, 2024 🌸

I asked ChatGPT to generate a productivity mantra based on the Sith Code:

  1. Tasks are a lie.
    Challenge their necessity; reject pointless obligation.

  2. If you can avoid a task, avoid it.
    Value your time and energy as precious resources.

  3. If avoidance fails, delegate.
    Recognize that others may take on what does not require your focus.

  4. If delegation fails, automate.
    Embrace systems and tools that free you from repetition.

  5. If all else fails, do the task.
    Approach only the unavoidable with intention and efficiency.

The system shall liberate me.


🌸 Fri, Oct 25, 2024 🌸

I wish I could quit. Can someone hire me? I am so frustrated with SVN; simple things like getting the three dots diff between branches turn into impossible tasks.


🌸 Fri, Oct 25, 2024 🌸

I don’t use perfect forwarding often and always forget to put Args std::forward<Args>(args)... Just a reminder for the future me.

template<typename T, typename... Args>
std::unique_ptr<T> make_unique(Args&&... args)
{
    return std::unique_ptr<T>(
        new T(std::forward<Args>(args)...));
}

🌸 Thu, Oct 24, 2024 🌸

DejaVu Sans Mono is the best mono font. I periodically try to jump from it, but I cannot find a better font.


🌸 Thu, Oct 24, 2024 🌸

After $260, the washing machine is fixed.


🌸 Thu, Oct 24, 2024 🌸

I need to slow down, just record ideas and focus on my game.


🌸 Wed, Oct 23, 2024 🌸

With AI-assisted code, I’ve been wondering what’s more optimal and also more enjoyable. On one hand, it feels great when AI generates code that, with just a couple of tweaks, works well enough for me to start iterating. But it often misses edge cases, which can lead to a lot of frustration. For example, just yesterday, I was using the new ChatGPT o1 model with Cursor (which is basically a clone of Visual Studio Code that uses LLMs for code assistance). I was bouncing between Cursor for AI changes and Emacs for making bigger manual edits. I had some AI-generated code that made a simple video by grabbing an OpenGL buffer and encoding it using ffmpeg. Things were going smoothly until, all of a sudden, the code just stopped working.

I spent hours scratching my head, trying to figure out what went wrong. Turns out, the AI-generated code had a sneaky bug; it wasn’t flushing the decoder at the end, so a couple of seconds of the video were missing. It was the kind of bug that’s easy to miss, especially in my AI-generated podcasts, where I didn’t even notice that 2 seconds were cut off in a 40-minute episode. But yesterday, I was doing something else, and that missing bit mattered.

There’s this sweet instant gratification when the AI spits out something that works right away, but then, the debugging hits hard. It’s like a rollercoaster. I thought, “This is it! Humanity can relax; AI is here to take over.” But nah, it’s not a silver bullet. I still ended up spending too much time debugging instead of just writing it myself. I keep thinking there must be a balanced approach, but I haven’t quite figured out where to draw the line yet.

To be honest, I prefer writing code that’s already solid, bug-free (if that’s even possible), and easy to debug. I like adding tons of debug output logs, safety checks, error handling—things that AI doesn’t really think about. Debugging is just… not fun. I want the code to work right from the start, not to spend hours playing detective on an AI’s half-baked output.

In the end, I’m torn. I love not having to write all the boilerplate code, but the constant back-and-forth between Cursor and Emacs, tweaking AI-generated code, then manually fixing it—it’s a lot. It’s fun, but also frustrating, and I’m not sure if AI-assisted coding is where it needs to be just yet.


🌸 Mon, Oct 21, 2024 🌸

The washing machine broke. 😦


🌸 Sun, Oct 20, 2024 🌸

Note: alpha = opacity; 1 is equivalent to full opacity, 0 is fully transparent.


🌸 Thu, Oct 17, 2024 🌸

All happy families are alike; each unhappy family is unhappy in its own way. – Leo Tolstoy

I always wanted to be happy my way, but maybe Leo is right.


🌸 Thu, Oct 17, 2024 🌸

Found on YouTube a good tune; I thought that song was a banger. I checked it out, and it had 50 views. Wait a minute; no way. I got a bit suspicious; somebody just reposted the song, and the official version has 500,000 views. For a moment, I thought I found a diamond in the rough, nope.


🌸 Thu, Oct 17, 2024 🌸

OMG! Sony! How come X is accept and O is cancel?!


🌸 Thu, Oct 17, 2024 🌸

I asked ChatGPT to create a program that can generate automated podcasts, and it wrote it in Python. It worked for a while, but now I’m getting a bit irritated. Of course, the program wasn’t perfect from the first run, and ChatGPT handled the big changes well.

However, for small tweaks, I’ve been making manual edits, which is why I need a good text editor. Going back and forth with ChatGPT for minor adjustments is time-consuming. I could probably start using Cursor, but I’m used to Emacs, and it will take time to get accustomed to Cursor, especially for basic operations like searching or navigating within and between files.

The most irritating part is that Python doesn’t help with variable names—it’s all handled at runtime. I constantly make typos, and in C++, the compiler catches them. But here, I run the program, the podcast generation takes quite a long time, and after 10-20 minutes it crashes because some variable names were misspelled.

How do Python developers deal with that?


🌸 Wed, Oct 16, 2024 🌸

Working with o1 preview is like working with an intern who knows all languages in the world, but has 0 experience in software engineering. I have to be very explicit with my intent.


🌸 Wed, Oct 16, 2024 🌸

It took a whole day trying to piece things together, essentially re-onboarding without the help from others; I was embarrassed to ask for help a second time. I probably should admit that I remember nothing, and I need help.


Previous - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 - 14 - 15 - 16 - 17 - 18 - 19 - 20 - 21 - 22 - 23 - 24 - 25 - 26 - 27 - 28 - 29 - 30 - 31 - 32 - 33 - 34 - 35 - 36 - 37 - 38 - 39 - 40 - 41 - 42 - 43 - 44 - 45 - 46 - 47 - 48 - 49 - 50 - 51 - 52 - Next