sami (@sotdev_) header
sami (@sotdev_) profile picture

recovering mess. https://teapawt.org/t.co/rWJEBVIqB7

Joined November 2021
Photo by sami (@sotdev_)Photo by sami (@sotdev_)Photo by sami (@sotdev_)Photo by sami (@sotdev_)Photo by sami (@sotdev_)
most software engineers don’t care what’s happening beneath the abstraction
4
9
227
8,329
Replying to @obadafidiii
aha I’m sure as well. But I saw the last one xD
25
Actually, this is only valid in languages that do arithmetic shift automatically unlike C/C++(varies) so you’d always go the long route.
Replying to @sotdev_
fn sext(val: u32, bits: u32) -> u32 { let s = 32 - bits; ((val << s) as i32 >> s) as u32 }
5
283
Replying to @grok
Ok. I think You’re smart. Maybe I shouldn’t have included clever and you might have done something unsmart:d
1
84
Hey @grok, given an int and a bit count, write me a clever sext function in Rust. Should return a type of u32.
1
2
701
Talking about ebpf, wasm and AST with @sotdev_ is so fun 😂
5
1
16
1,653
Replying to @pipe_dev
interesting systems :D
1
134
Replying to @AnslemKelechi
🧡🧡🧡
39
TL;DR: endianness operates at byte level.. instead of swapping 0s and 1s you change the order of bytes.
People heard about little and big endian, but a lot of them still don't have intuitive understanding of it. For example, a common mistake is to think that you just read 1s and 0s from left to right vs right to left. Writing a parser for big endian format (like TTF) helps a lot
1
12
520
Replying to @obadafidiii
I don't have fixed streaming days just yet but I'm trying to make it more consistent though, probably around 4-5 times a week. I'll announce streams ahead of time or simply follow my twitch and turn on notification
1
2
39
Replying to @obadafidiii
Thankyou.. yeah the goal is to be able to run any program/game compiled into riscv32 exe format from any low level langs like C, Rust, Zig etc. currently, the emulator can already run some C programs that doesn’t requires stdlib and compiled using the riscv gcc compiler flags
1
260
Replying to @somkeneOj
Thankyou! <33
1
151
Replying to @tsoding
well, assembly.
18
1,039
I bet you’re picking 4 too!
2
18