good talk:
www.youtube.com/watch?v=TZ5a...
@kmj007.bsky.social
your friendly neighborhood nerd https://blog.karanjanthe.me
good talk:
www.youtube.com/watch?v=TZ5a...
My bytebeat was not working on the web because I was parsing the expression on every sample rate, like 8000 times per second, and it was slow for generating the value for audio buffers, which is why audio was cracking up, but running great in the desktop app
I actually used arena allocator properly
const std = @import("std");
pub fn main() !void {
    std.debug.print("{d}\n", .{@sizeOf(User)});
}
const User = struct {
    id: u32,
    name: []const u8,
};
The answer here is 24, not 20, cause 4 bytes are added for padding
So the size of a struct is padded to a multiple of its alignment, which is defined as the largest alignment requirement of any of its fields
30.10.2025 07:40 โ ๐ 0 ๐ 0 ๐ฌ 1 ๐ 0You can't use strings in swith case zig, interesting!
29.10.2025 14:48 โ ๐ 0 ๐ 0 ๐ฌ 0 ๐ 0I am thinking about starting a systems reading group
29.10.2025 13:29 โ ๐ 0 ๐ 0 ๐ฌ 0 ๐ 0Parsers are recursive because languages are recursive. Lexers are not recursive.
29.10.2025 13:06 โ ๐ 0 ๐ 0 ๐ฌ 0 ๐ 0i am still learning and understanding it, but this blog was really useful:
www.oilshell.org/blog/2017/12...
and now you need to write lexer for this and in that string expression itself can be any expression so it is recursive expression, so it quite becomes task to solve this
29.10.2025 10:50 โ ๐ 0 ๐ 0 ๐ฌ 1 ๐ 0lexer modes are useful, but they didn't teach me in the textbook!
Imagine you are making a programming language in which you want to support the  feature of template strings, like this:
> console.log(`${1 + 2 * 3} equals 7`)
7 equals 7
decided to update my macOS because I wanted to use the latest version of Zig, and guess what, I totally hate liquid glass, my ocd is kicking from all sides
21.10.2025 19:26 โ ๐ 0 ๐ 0 ๐ฌ 0 ๐ 0it's simple, high cardinality means more unique combination possible, and need to think more about storing and figuring out where was the issue or how to store things more easily.
now it is making more sense, kids getting your fundamentals are very right.
Cardinality is nothing but size of a Set.
i need to now connect how cardinality in SRE is different or similar
zig feels like the friendliness of C with good defaults, it is a joy to write.
15.10.2025 12:35 โ ๐ 0 ๐ 0 ๐ฌ 0 ๐ 0Are You Sure You Want to Use MMAP in Your Database Management System?
www.youtube.com/watch?v=1BRG...
On Windows, we only get the default stack size of 1 MB, while on macOS and Linux we get 8 MB.
when making cross platform programs, these things are the main pain points. UV solves this by running the  main CLI in one thread and processing in a separate thread to avoid stack overflow!
Beautiful morning to write some good handwritten code. It's a privilege.
06.10.2025 03:24 โ ๐ 0 ๐ 0 ๐ฌ 0 ๐ 0found #rust container cheat sheet while i was reading performance book
05.10.2025 11:49 โ ๐ 0 ๐ 0 ๐ฌ 0 ๐ 0It just feels like people have stopped caring, and AI slope has amplified it even more!
not against using AI, if you know what you are doing and dealing with
found about slint, an exciting project, and licensing is also done in a great way, would use this for future projects where i need to support native/embedded devices with very low memory footprint!
need to check how great tauri is on embedded devices, which i highly doubt
While i am not thinking about becoming a researcher, but i really like the use case and things we can build using this field
09.09.2025 13:31 โ ๐ 0 ๐ 0 ๐ฌ 0 ๐ 0Great guide on Mechanistic Interpretability
09.09.2025 13:31 โ ๐ 0 ๐ 0 ๐ฌ 1 ๐ 0Homomorphic encryption is interesting!
www.jeremykun.com/frequently-a...
Why didn't they teach me like this?
14.07.2025 04:50 โ ๐ 0 ๐ 0 ๐ฌ 0 ๐ 0#Zustand Store Usage: Always use selector functions (e.g., `useStore(state => state.value)`) for selective subscriptions to prevent unnecessary re-renders and boost performance. See example: [image]
#Zustand Store Usage: Always use selector functions for selective subscriptions to prevent unnecessary re-renders and boost performance.
08.07.2025 09:27 โ ๐ 0 ๐ 0 ๐ฌ 0 ๐ 0Another great blog:
tigerbeetle.com/blog/2023-07...
i think LLVM IR learning is going to be worth it for my GSOC project and even afterwards
link:
kmj-007.github.io/notes/tech/L...
how to test LLVM IR: LLVM has good way to test it's generated IR, you can do that using check, if you come across some code like this in your lifetime: ```rust define void @sub1(i32* %p, i32 %v) { entry: ; CHECK: sub1: ; CHECK: subl %0 = tail call i32 @llvm.atomic.load.sub.i32.p0i32(i32* %p, i32 %v) ret void } define void @inc4(i64* %p) { entry: ; CHECK: inc4: ; CHECK: incq %0 = tail call i64 @llvm.atomic.load.add.i64.p0i64(i64* %p, i64 1) ret void } ``` ; is how you define a comments in llvm IR, so that line will be ignored by llvm, but there is FileCheck tool, which is basically pattern matching file verifier. so this tool basically does pattern matching for us, and we can verify generated IR, if it's correct or not! another example: ```rust ; CHECK: %0 = load i32, i32* %ptr, align 4 %0 = load i32, i32* %ptr, align 4 ``` In this example, theย `"; CHECK:"`ย line instructs FileCheck to ensure that the following instruction (`%0 = load i32, i32* %ptr, align 4`) matches the patternย `"%0 = load i32, i32* %ptr, align 4"`.ย In summary: Theย `";check"`ย directive is a way to guide FileCheck in verifying the correctness of LLVM IR code.ย It's not a part of the IR itself, but a comment used for testing purposes.
How to test the generated #LLVM IR
I am learning LLVM for my GSOC project, and will share lots of other notes
I've finally published a long-gestating piece about why India has largely failed at research & development, and inventing novel products downstream of R&D, over the past few decades, as well as what we can do about it.
www.infinitesunrise.com/p/overcoming...