๐ŸŒธ Wed, Nov 6, 2024 ๐ŸŒธ

A Thought Experiment: Simplifying C++ Function Calls with Structs (C++20)

Ever dealt with a C++ function that has too many parameters, most of which are optional? Hereโ€™s an example:

auto llm(
    ChatCompletionsQuery,
    int npredict = 2048,
    float te<a href="post/1730913352.html">...</a>

๐ŸŒธ Wed, Nov 6, 2024 ๐ŸŒธ

Donald Trump won.


๐ŸŒธ Wed, Nov 6, 2024 ๐ŸŒธ

Note to future me. I take it back; I realized I have a smaller GPU, and it’s on 7.5. I want to use both. So, the command to build whisper.cpp on my laptop is.

CUDA_DOCKER_ARCH=compute_75 GGML_CUDA=1 make -j

๐ŸŒธ 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


๐ŸŒธ 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 g


๐ŸŒธ 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 c


๐ŸŒธ 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 prog


๐ŸŒธ 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 avoi


๐ŸŒธ 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>(
        <a href="post/1729868660.html">...</a>

๐ŸŒธ 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 f


๐ŸŒธ 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 roug


๐ŸŒธ Thu, Oct 17, 2024 ๐ŸŒธ

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


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 - Next