๐ธ Thu, May 23, 2024 ๐ธ
Multiple times I considered setting up a keylogger on my laptop for the convenience of having a recording of everything I typed. However, I didn’t trust myself to be diligent enough to clean up the log files that would inevitably contain my passwords and other sensitive information. TL;DR: I’m probably going to opt out of having AI record my screen all the time. The convenience of recalling events is outweighed by the hassle of remembering to remove sensitive information from the recording.
๐ธ Wed, May 22, 2024 ๐ธ
If you need to scale faces in Blender and it’s kind of working but not exactly, try using Shrink/Fatten (Alt+S); you may get better results.
๐ธ Tue, May 21, 2024 ๐ธ
I want Scarlett Johansson to be the voice of AI. Please…
๐ธ Mon, May 20, 2024 ๐ธ
I wonder if in the future, people will crave current artifacts in media similarly to how people now crave the crackling sound of vinyl discs, the noise from old radios, or film grain. Imagine people craving MP3 compression artifacts or AI-generated image artifacts, and we will have special filters that mutate human hands to make them look “authentic.”
๐ธ Sun, May 19, 2024 ๐ธ
Oh, Twitter is X now.
๐ธ Sat, May 18, 2024 ๐ธ
I should practice for the technical interview next week, and I am playing around with AI image generation.
๐ธ Thu, May 16, 2024 ๐ธ
Similarly to Llama.cpp, there is a stable-diffusion.cpp, which allows you to generate AI images purely on CPUโperfect for “image generation on potato computers.” Since itโs written in C++, it might be super easy to integrate into Unreal Engine. What a great time to be alive!
https://github.com/leejet/stable-diffusion.cpp
๐ธ Wed, May 15, 2024 ๐ธ
So, I have got sick. Running nose, watering eyes, sneezing, itchy throat. I have got that sick first time after I got COVID last year in March. I thought I had gained a superpower from my long-COVID to resist any infection. My body definitely became more resistant to infections but not bulletproof.
I am actually hopeful. It is getting old, waking up in the morning and the chest pain slowly waking up with me. When I am sleeping, there is no chest pain; it only starts when I am awake.
Something different, you know, like when you are debugging a bug and trying all different things for hours and nothing is changing, and suddenly something changes. It may even become worse, but you are celebrating because something changed, which means you are making progress.
Same thing, I was not sick for more than one year despite long-COVID, and who knows, maybe my chest pain will go away? Who knows.
๐ธ Tue, May 14, 2024 ๐ธ
Tesla is embracing their failures and selling the cracked window decal for the Cybertruck.
https://shop.tesla.com/product/cybertruck-omfg_decal
๐ธ Tue, May 14, 2024 ๐ธ
Hey, next week is a technical interview with Meta. Wish me luck.
๐ธ Mon, May 13, 2024 ๐ธ
I realized that in the event of a zombie apocalypse and the collapse of civilization, we don’t need super-smart AI; we need super-knowledgeable AI. If we can ask factual questions and get accurate answers, that would be good enough. How do you start a fire with this, this, and this? What plants are safe to eat?
๐ธ Thu, May 9, 2024 ๐ธ
SpaceX can make an offer to install Starlinks on aircraft; I think it’s a pretty promising B2B idea.
๐ธ Wed, May 8, 2024 ๐ธ
Solar energy, harvested using solar panels, is essentially fusion power since it originates from the Sun, which is powered by a fusion reaction. ๐ฒ
๐ธ Tue, May 7, 2024 ๐ธ
It seems that SFW and NSFW are merging, and they both are becoming NSFW. I am pretty sure nobody watching content in the office tagged as SFW.
๐ธ Tue, May 7, 2024 ๐ธ
Git should change the defaults to clone with recursive submodules by default. I am tired of typing --recursive
๐ธ Tue, May 7, 2024 ๐ธ
More layoffs :(
๐ธ Tue, May 7, 2024 ๐ธ
AwesomeBump allows you to author textures. Yesterday, I played around with it a bit to create a normal map for the granola bar static mesh.
https://github.com/kmkolasinski/AwesomeBump
๐ธ Mon, May 6, 2024 ๐ธ
I think studying physics would be a lot more fun if physicists referred to particles as balls. Everything is a ball, and everything is made of balls. “Physics of Elementary Balls.”
๐ธ Mon, May 6, 2024 ๐ธ
A well-informed populace, being necessary to the security of a free society, the right of the people to develop, use, and control artificial intelligence technologies, shall not be infringed. ๐
๐ธ Mon, May 6, 2024 ๐ธ
Just updated the firmware on my laptop, hopefully it will start charging my battery to the level I set, not to some random numbers like 69%. Just checked, nope; it’s stuck on 64%. ๐
๐ธ Mon, May 6, 2024 ๐ธ
Quite often I see the following pattern in C++:
int64_t getSomeValue()
{
static int64_t cache = 0;
if (cache)
return cache;
// expensive calculation with assigning the calculated value to the cache
return cache;
}
While this approach might seem effective at first glance, it has several issues:
Magic Value Zero: The code uses
0
as a magic value to indicate that the cache hasn’t been initialized. This can lead to unintended behavior if0
is a valid result from the expensive calculation. Additionally, using magic values like this is generally considered poor practice as it relies on implicit knowledge.Not Leveraging Static Variableโs Reentry Protection: The static variable
cache
is initialized to0
, and the function checks ifcache
is non-zero to avoid recalculating. However, in C++, static variables are protected from concurrent reentry issues using a mutex during initialization. In the original pattern, theif
statement checkingcache
is not protected with any mutex, so this pattern does not leverage the built-in protection provided by the language.
A better approach would be to use a lambda function for the initialization, like this:
auto getSomeValue()
{
static auto cache = []() {
return 314LL; // expensive calculation
}();
return cache;
}
With this code:
No Magic Value: The initialization of the static variable
cache
is done directly through a lambda function that performs the expensive calculation. This avoids the need for a magic value and ensures that the actual result of the calculation is stored in the cache.Reentry Protection: By leveraging the static variable’s reentry protection, this code is cleaner and safer. The lambda function executes only once, and the resulting value is cached properly. Additionally, this version clearly communicates the intention of performing a one-time calculation.
Improved Readability: In my opinion, this code is easier to read and understand. The use of the lambda function clarifies that the expensive calculation is only performed once, and the result is cached for future use. This clarity enhances maintainability and reduces potential bugs.
In conclusion, the lambda-based initialization pattern is not only cleaner but also takes full advantage of the safety features provided by C++. It’s an excellent way to handle expensive calculations that only need to be done once, while also avoiding the pitfalls of magic values and unnecessary reentry checks. Additionally, it makes the code more readable and understandable, which is always a bonus in software development.
The article was written with the help of ChatGPT 4.
๐ธ Mon, May 6, 2024 ๐ธ
My sense of taste changed after wisdom tooth extraction; noticeable change: water has got some hint of metallic taste. I hope I’ll get used to it or my sense of taste will get back to normal.
๐ธ Mon, May 6, 2024 ๐ธ
I’ve got an idea for a horror game where the player is an AI assistant, similar to Alexa or Google Mini. Initially, everything seems innocent, with tasks like telling the time or reporting the weather. However, things take a turn as the game starts to gaslight the player into thinking they aren’t a real AI, but a human in a simulation being trained as an AI assistant. The game creates psychological horror by making the player question, “Am I a real human or in a simulation?” There could even be a cutscene where a technician walks into a data center and casually presses the delete button, amplifying the player’s unease.
๐ธ Sun, May 5, 2024 ๐ธ
I just noticed I accidentally switched ChatGPT from 4 to 3.5. I literally got angry with ChatGPT earlier today because of how stupid 3.5 is.
๐ธ Sun, May 5, 2024 ๐ธ
What’s going on with UI lately? The X and Y coordinates have to be exactly the same on mouse button down and mouse button up. It’s impossible to click on buttons using my Wacom tablet. I remember having struggles on Samsung’s website once, with emoji selection on KDE, and with some UI elements in Bitwig. It’s kind of annoyingโI have to click multiple times and keep my hands extremely steady.
In my opinion, as long as the mouse cursor stays within the area of the button, the button should trigger the on-click event.
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