๐ธ Sun, Mar 9, 2025 ๐ธ
std::localtime is not thread safe. Don’t use it.
๐ธ Fri, Mar 7, 2025 ๐ธ
Can some countries adopt the USA, like Canada or Great Britain? Please?
๐ธ Tue, Mar 4, 2025 ๐ธ
The world is falling apart, but at least memes are funny.
๐ธ Mon, Mar 3, 2025 ๐ธ
We should add a value_or member function to std::unordered_map.
๐ธ Sat, Mar 1, 2025 ๐ธ
If I need to connect to my Oculus Quest wirelessly, I need to run:
adb tcpip 5555; adb connect $(adb shell ip addr show wlan0 | grep "inet " | awk '{print $2}' | cut -d/ -f1):5555
Then, if I want to map ports, I run:
adb reverse tcp:8090 tcp:8090
๐ธ Tue, Feb 25, 2025 ๐ธ
I was groking things before Grok even existedโwithout actually using Grok.
๐ธ Sun, Feb 23, 2025 ๐ธ
Dear President Donald Trump,
Could you sign an executive order to cancel daylight saving time?
Sincerely,
Mika
๐ธ Sat, Feb 22, 2025 ๐ธ
I wonder if a CoT LLM would perform better if we set the temperature high during reasoning and then immediately lower it after the reasoning is finished, right before the LLM gives us the final result.
๐ธ Wed, Feb 19, 2025 ๐ธ
Sometimes I need to search on GitHub, and I often look for C++ source code. To do this, you can use the path:<regex> filter. For example, path:/(^|\/)README\.md$/ narrows results to files named “README.md”.
๐ธ Mon, Feb 3, 2025 ๐ธ
This is the list of OpenAI models from smartest to dumbest.
o4-mini-high > o4-mini > o3 > o3-mini-pro > o3-mini > o1 > GPT-4o > GPT-4 > GPT-4o mini > GPT-3.5 Turbo > GPT-3 > GPT-2
Just trying to unconfuse myself.
๐ธ Mon, Feb 3, 2025 ๐ธ
I used YouTube to play music for a long time and compiled a playlist called โBanger Songs,โ but I am not using it anymore. It has multiple issues: the shuffle feature doesnโt work very wellโit often sticks in a loop of 10โ20 songs. It randomly stops autoplaying, plays one song and then stops, and the volume slider is very finicky and hard to set to the desired level.
I switched to fully offline music. I run mpv to play all songs from the ~/Music/banger-songs directory using the following script:
while true; do
find /home/mika/Music/banger-songs -type f \( -iname "*.mp4" -o -iname "*.mp3" -o -iname "*.flac" -o -iname "*.m4a" -o -iname "*.m4v" -o -iname "*.opus" \) -print0 | shuf | xargs -0 mpv --shuffle --input-ipc-server=/tmp/mpvsocket --no-video --msg-level=ifo_dvdnav=v --no-border --geometry=+1920+0;
sleep 10;
done
I populate that directory using a YouTube downloader CLI tool:
cd ~/Music/
/usr/local/bin/youtube-dl --verbose -f best -ciw --limit-rate 200K -o "%(title)s.%(ext)s" 'link to the music or playlist'
If I do not like a song anymore, I have a one-liner that skips the song and moves it back to the ~/Music directory:
FILE=$(printf '{ "command": ["get_property", "path"] }\n' | socat - /tmp/mpvsocket | jq -r '.data') && mv "$FILE" ~/Music && printf '{ "command": ["playlist-next", "force"] }\n' | socat - /tmp/mpvsocket # skip song and move it from bangers
๐ธ Sun, Feb 2, 2025 ๐ธ
I usually use Steam or Lutris to run games on Linux, but there is another game launcher called Heroic Game Launcher that lets you run Amazon Prime Games and GOG without hassle.
๐ธ Sun, Jan 19, 2025 ๐ธ
TikTok is unbanned. ๐ฅ
๐ธ Sun, Jan 19, 2025 ๐ธ
They actually banned TikTok! ๐ฏ
๐ธ Sat, Jan 18, 2025 ๐ธ
I am just a stupid guy on the internet. I have a question: Can some country just give nukes to Ukraine to scare Russia and let the war finish?
๐ธ Sat, Jan 18, 2025 ๐ธ
Lazy Sunday dreams unfold
Like a lazy summer rainstorm
Drizzly clouds drift low in sky
No motivation in sighing
Beats a drum that yearnings call
To escape this urban jailhouse
Where the walls grow taller high,
And the concrete streets a prison
But the winds in distant woods,
Call, “Escape into the wildflowers.”
And a beach beckoning, warm
And a camping fire’s promise
Lazy eyes scan maps in mind
For escapes within a hundred
Miles before the weekend slips,
And the city holds, a heavy
Grip around this restless heart,
Searching still, where freedom roosted
And the world was vast, the roads
Endlessly winding toward the
Open sea that calls within.
๐ธ Fri, Jan 17, 2025 ๐ธ
Sometimes, following “dumb” instructions can actually fix your problem. For example, the video on Netflix was completely black, and the official Netflix troubleshooting page suggested restarting the device (an Oculus Quest in my case). Surprisingly, restarting the device did help. Who knew?
๐ธ Sun, Jan 12, 2025 ๐ธ
Softly glowing ember skies,
Awning of the morning rise;
Golden threads across the trees
Weaver’s lope beneath the ease.
Silenced world beyond the sound,
Echoed whispers of the town,
Far below within the nest
Sleepless night, the day’s unrest.
๐ธ Thu, Jan 9, 2025 ๐ธ
If you want to force a carriage return (CR) in markdown, just add two spaces at the end of the line.
๐ธ Wed, Jan 8, 2025 ๐ธ
Ambers dance in twilight sigh.
Wind’s lamenting whispers pass.
Empted homes, in darkened halls,
Echo whispers, hollow walls.
Fire crackle, flames ascend.
Safety measures take the floor;
Lights, a distant fading song,
Power ebbs; a cautious sway.
Time, the thief. The hours drain,
Setting up. A task, a game?
Patience wears, frustration too,
New beginnings. What anew?
๐ธ Tue, Jan 7, 2025 ๐ธ
Emptied desks, a vacant screen
Malice hides, infection keen
Fresh machine, a gift, a sigh
New beginnings pass the eye
Network whispers secrets rare
Switching wires tangled lair
Wind’s lament above, below
Fiendish sparks the ember shows
Southern skies in flames, the land
Burned, a scar, forever grand
Palms, the trees the fires claimed
Echoed cries the flames sustained.
– AI poem about my day
Second working day of 2025. My working computer has been infected by malware, and I was given a new, better PC. I had issues with the network connection on my Linux box at work. It was an issue with the flimsy connection on the switch. There is a lot of wind and fire. Southern California. The Palisades Fire and the Eaton Fire.
๐ธ Tue, Jan 7, 2025 ๐ธ
Frozen pixels on the screen
Malice hid inside serene
Code, a serpent curled, a thief,
Stirred, awakened lifeless chief:
My computer fell beneath
Darkness that the morning’s sheen
Failed against the silent foe:
Malice hid the truth unknown.
– AI poem about my day
๐ธ Sun, Jan 5, 2025 ๐ธ
The free version of DaVinci Resolve does not support a lot of formats. Here is the line to transcode the video: ffmpeg -i input.mp4 -c:v mjpeg -q:v 3 -c:a pcm_s16le output.avi
๐ธ Sun, Dec 29, 2024 ๐ธ
prj027: whispers, shadows and echoes
๐ธ Fri, Dec 27, 2024 ๐ธ
Summary: Generating Raw Machine Code for m68k with Clang
Here’s the step-by-step process we followed to produce raw machine code for the m68k architecture without relying on any libraries or system headers:
1. Write Minimal C Code
Write a simple C program without standard library dependencies. For example:
main.c:
void _start() {
while (1) {}
}
Avoid standard headers like <stdio.h> since they depend on system libraries.
2. Compile with Clang
Use Clang to compile for the m68k target, in freestanding mode, and without linking:
/mnt/Texas/3rd-party/llvm-project/build/bin/clang --target=m68k-unknown-elf -c -ffreestanding -nostdlib -o output.o main.c
Key Flags:
--target=m68k-unknown-elf: Specifies the m68k architecture.-c: Generates an object file (.o) without linking.-ffreestanding: Disables assumptions about standard libraries.-nostdlib: Ensures no standard library functions are linked.
3. Extract Raw Machine Code
Use llvm-objcopy to strip away metadata and leave only the raw machine code:
/mnt/Texas/3rd-party/llvm-project/build/bin/llvm-objcopy -O binary output.o output.bin
Explanation: -O binary: Outputs a raw binary file containing only machine code.
4. Verify the Raw Binary
Check the contents of the resulting binary file:
hexdump -C output.bin
Example Output:
00000000 4e 56 00 00 60 00 00 02 60 fe |NV..`...`.|
This is the raw machine code for your program.
5. Tools Overview
- Clang: Compiles the source code to an ELF object file.
- llvm-objcopy: Extracts raw machine code from the ELF object file.
Recap of Commands:
Step 1: Compile to an object file
/mnt/Texas/3rd-party/llvm-project/build/bin/clang --target=m68k-unknown-elf -c -ffreestanding -nostdlib -o output.o main.c
Step 2: Extract raw binary
/mnt/Texas/3rd-party/llvm-project/build/bin/llvm-objcopy -O binary output.o output.bin
Step 3: Verify the raw binary
hexdump -C output.bin
You now have a minimal workflow for generating raw machine code for the m68k architecture using Clang. If you have more questions or need additional help, feel free to ask! :blush:
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 - 53 - 54 - 55 - 56 - Next