Better HN
topnewbestaskshowjobs
Log inSign up

dezgeg

2,901 karma · joined Aug 7, 2013 (13y ago) · 448 submissions

[ my public key: https://keybase.io/dezgeg; my proof: https://keybase.io/dezgeg/sigs/T97m4HN4fIeKVsJzfbIsXEgnHunf6ut9z2hZbtMU3BM ]
Submissions

comment 17h ago · link · parent

Giant problem with the first approach is continue, break, return keywords can't be used (or even worse, has different semantics in case of `return`).

comment 3d ago · link · parent

Emitting a executable binary (eg. ELF) will never make sense over using assembly language. Adding/removing some code to the middle of a large program shifts tons of addresses like jump targets and variables. It makes no sense to have LLM spend tokens on making edits to (potentially) every single call instruction in an existing binary, instead of letting assembler do it.

comment 6d ago · link · parent

ASCIIbetical order, obviously!

comment 1w ago · link · parent

That's what we get when microcontrollers (which have software) are put in everything.

My dishwasher has some button combination which entered right after power up enters factory test / diagnostic mode. It could tell the water temperature, which was useful in diagnosing whether my fix to the heater worked.

5.

Infradle(infradle.com ↗)

2 points · by dezgeg · 2w ago · discuss

comment 2w ago · link · parent

I assume you're looked into whether it's possible to generate the yaml at runtime, without committing the generated file to the repo?

comment 2w ago · link · parent

Vibecoding.

Lots and lots of vibecoding.

comment 3w ago · link · parent

Isn't decrementing pos beyond start of haystack technically undefined behaviour?

9.

Correcting a 2400 dpi A3 Scanner in Software(pagetable.com ↗)

2 points · by dezgeg · 1mo ago · discuss

comment 1mo ago · link · parent

Well it doesn't need to be a generic purpose OCR, just one that works for this single UI layout and font.

comment 1mo ago · link · parent

How do you know the original code didn't use some undefined variable on stack, but happened to consistently work because something else spilled a register containing "suitable" value?

comment 1mo ago · link · parent

I've generally found it better to do it other way around - keep all the stuff in Linux partition and from Windows side access that over the virtual network share \\wsl.localhost\<Distro>\home\me\whatever

comment 1mo ago · link · parent

On top of the performance issue you mentioned, /mnt/c will be case-insensitive and trip up lots of Linux software!

comment 1mo ago · link · parent

Doesn't the Microsoft implementation work by having nop instruction as the first instruction of the function, which can then be patched to a jump to the patched code, that finally jumps back to the original function past the NOP?

Naive implementation of this scheme doesn't allow stacking.

comment 1mo ago · link · parent

> YouTube, Google, Google Maps, and Chrome

You listed products that have been around for ~20 years. Keeping up already entrenched products running doesn't correlate with being able to launch new products.

comment 1mo ago · link · parent

I'm gonna guess that the crew have been regularly landing while ignoring similar automated warnings in the past

comment 1mo ago · link · parent

Not to mention how any sort of TLS key exchange is supposed to happen with an unidirectional network.

comment 1mo ago · link · parent

If your session / computer crashes, for one.

comment 1mo ago · link · parent

Yes, most of this is all supported. There is a existing recipe for building an image that you just dd to and SD card and can boot in a Raspberry Pi (and other devices supported by mainline kernel + u-boot).

Kernel is a package just like another; so you just write your own recipe. Patching kernel recipe works just like patching any Nix recipe.

Not sure about the rockchip-proprietary boot parts; you may be on your own.

comment 2mo ago · link · parent

In theory device trees are supposed to be a OS-neutral stable ABI. Being able to put a device tree into unchangeable mask ROM is an often mentioned design goal.

However, there is a fatal flaw in the process that makes this a pipe dream in reality. In Linux, these rules only apply to reviewed and merged drivers. And during review any new DT interface will almost certainly be bikeshedded in some way.

So unless your chip vendor has upstreamed ALL their drivers before a device is manufactured, the device's firmware-provided DT will very likely work only against a vendor kernel and requires updating.

comment 2mo ago · link · parent

It probably will help you maintain a better local fork, but getting all things upstreamed is the bottleneck and won't help too much here.

comment 2mo ago · link · parent

Correct, N64 and PS1 era projects can essentially always be strictly tackled one function at a time. There are very minor things (like string literal sharing) where some earlier function can affect later function, but the workarounds are comparatively simple.

On the other hand, I have heard even old MSVC is a nightmare. Various things are affected by hash table ordering (so the names of variables matter in some situations), stuff like order of #includes mattering, etc.

comment 2mo ago · link · parent

The term for that is byte-matching decompilation. This is not such project.

comment 2mo ago · link · parent

Don't most harnesses already do that for bash commands?

comment 2mo ago · link · parent

There is more normal looking code in other files. It sounds like the original game had animation data (or similar) embedded in the C code.

comment 2mo ago · link · parent

Games use plenty of native code; so much in fact that when Intel tried to enter the Android tablet market with x86 they had to write an ARM emulator.

comment 2mo ago · link · parent

4G/5G Telco equipment (ab)use HDMI connectors/cables in a similar way.

comment 2mo ago · link · parent

How is that any different from PyPI, npm, cargo, etc?

comment 2mo ago · link · parent

Correct way is to have everything as-if a source dependency, but a globally shared cache system that can automatically provide artifacts if that exact version of source has already been compiled.

Any system that can only consume manually built (and even in worst case, only tagged and globally pushed) dependencies is horrible for cross-module development, like large scale refactorings and the like.

12345
15