HNHacker News
TopNewBestAskShowJobs

dezgeg

2,900 karma · joined August 7, 2013

[ my public key: https://keybase.io/dezgeg; my proof: https://keybase.io/dezgeg/sigs/T97m4HN4fIeKVsJzfbIsXEgnHunf6ut9z2hZbtMU3BM ]
submissionscomments
dezgeg··on My review of the C standard library in practice
> Treating null pointer as an empty string (perhaps by expecting them first N pages to contain just \0 bytes, as various older Unix systems predating Linux did) feels like a recipe to hide bugs.

Empty string is not a 'zero-sized object'. It's an object with size of one byte that is zero.

dezgeg··on Trunk-Based Development: Game Changers
Maybe I misunderstood your description, but does 'develop' not ever merge to 'main' directly? Your description sounded like QA could for example test 'develop' which is main + featureA + featureB, give that a green light, and then have new main be main + featureA (which has been never tested). That does sound bit dangerous.

(As an embedded developer, it would be bliss to experience 'develop gets deployed semi-hourly'...)

dezgeg··on The Rust Implementation of GNU Coreutils Is Becoming Remarkably Robust
How well is this working nowadays with non-UTF8 input?
dezgeg··on Linux 6.1 Officially Promoted to Being an LTS Kernel
Um, no, I have not seen anything that would be the case for upstream Linux. Sure, downstream distributors like Red Hat might be able to give such guarentees, but they do not generally use upstream LTS releases directly.
dezgeg··on Can sanitizers find the two bugs I wrote in C++?
It presumably allows the implementation to be a tiny bit faster, by avoiding a compare and branch for the empty case.
dezgeg··on The x86's Decimal Adjust after Addition (DAA) instruction
Another GB emulator hobbyist here :) My dim recollection is that Pokemon uses BCD for in-game cash, so there you might be able to 'cheat' or either never buy anything if BCD stuff is left unimplemented :)
dezgeg··on Ask HN: Is it just me or is 5G strictly worse than LTE?
They are certainly not using mmWave 5G. Numbers show (1st Google result) that less than 1% of time connected is to a mmWave network. I don't personally get why mmWave part of 5G is talked so much about.

5G over the same cmWave frequencies 4G uses still has a benefit - but mainly for the operator! It allows them more users and throughput for the same amount of spectrum. So in a rational market, the operators should be giving you discounts for using 5G instead of charging more for it!

dezgeg··on A different approach to building C++ projects
How does gcc -MD help at all in tracking which .cpp files to link in?

> Of course, the other alternative is to simply #include _every_ file in your project into a single source file, then compile that.

Yeah, no... recompiling the entire project whenever any file is touched is way too slow for any non-trivial project.

dezgeg··on Fedora's tempest in a stack frame
> And there's technology available that reduces the number of these damn near zero (with no impact to backtrace generation or debuggability), which would obviate all the argumentation over -f-o-f-p.

Any pointers on such solution? And why couldn't it be applied right now, without LTO?

dezgeg··on ABC: A C compiler for printable x86
I wonder if the BOUND instruction could have been used to call int 21h more than once.

That would have the same problem that after return the BOUND instruction would be re-executed, but perhaps there are useful DOS calls that after execution modify the registers such that the bounds check wouldn't fail afterwards.

dezgeg··on Directly access your physical memory (dev/mem)
The 'devmem' command is pretty neat when doing embedded systems, allowing you to write entire device drivers in bash!
dezgeg··on 24-core CPU and I can’t move my mouse (2017)
Yes, but that sort of 'delay' will be there all the time, with no relation to the system being loaded (like the top commenter is claiming).
dezgeg··on 24-core CPU and I can’t move my mouse (2017)
Sure, on the wire USB is a polling protocol. But the polling is done by the host controller hardware, which will raise an interrupt just like PS/2 whenever the device responds to the polling as having data available.
dezgeg··on There oughta be a Game Boy capture cartridge
rp2040 doesn't run Linux unlike all the other Raspberry Pis.
dezgeg··on There oughta be a Game Boy capture cartridge
On Gameboy copying some code to RAM is essentially required if you want to use sprites, because the fastest way to update the sprite attributes (so called OAM) is to use DMA. And during OAM DMA the CPU cannot access anything else than a internal 128 byte RAM, so the DMA trigger + delay loop procedure must be copied and executed there.
dezgeg··on Checked integer arithmetic in the prospect of C23
Hmm, isn't the Apple-specific magic only for parity(PF) and aux carry (AF)? aarch64 does have a 'V' flag for signed overflow.
dezgeg··on AVR-GCC Compiler Makes Questionable Code
In particular there seem to be couple of MMIO stores, maybe those are done with some accessor/macro which accidentally makes too much stuff volatile causing this extra zero-addition etc. So yes seeing all the code could give some clues...
dezgeg··on So, what can you do with a process ID?
Could have written disclaimer in the 'kill -HUP' example that they should be only sent when it is known that the destination process will handle it, as the default for most signals is to terminate the process.

Especially since every other example is non-destructive...

dezgeg··on Legacy Update: Fix Windows Update on Windows XP, Vista, Server 2008, 2003, 2000
Plenty of routers (especially on Broadcom chipset).
dezgeg··on IDN is crazy
Wire format could be the same. But to prevent eg. homoglyph attacks the principle on what non-Unicode characters are allowed would be 'default deny'.
dezgeg··on IDN is crazy
Perhaps good trade-off would have been that non-ASCII is allowed only in country code TLDs, with these country operators limiting to only characters in their own alphabet.

E.g. for Finland .fi could do fine with just allowing ASCII + ä, ö, å.

dezgeg··on Fputc semantics for conforming C implementations
There is even some precedent, for example original Alpha AXP instruction set only supports 32-bit and 64-bit memory reads/writes, while still having 8-bit char.

Although, I guess the bigger problem is to how to represent pointers to 8-bit values - on Alpha a pointer with value 1 would point to the octet at offset 1 in memory, where presumably on this 16-bit DSP such 1-pointer would point at the octet at offset 2.

dezgeg··on Helsinki hospitals severely overcrowded, emergency rooms full to capacity
Not sure if I got the same interpretation (both languages on YLE and HS one seem quite ambiguous).

My interpretation I got is Jorvi cannot even admit in patients from ambulances for urgent care, wheras Töölö, Peijas and Hyvinkää have all beds full.

dezgeg··on Creating a modifiable gzipped disk image
Initramfs archives have a little-known secret: you can simply concatenate them even when they are compressed and the kernel will parse them all. So appending stuff doesn't need unmkinitramfs (which is indeed painful due to needing to keep permissions correct etc.)
dezgeg··on A bug fix in the 8086 microprocessor, revealed in the die's silicon
And even still today this kind of manual hand-patching will be done for minor bug fixes (instead of 'recompiling' the layout from the RTL code).

One motivator is if the fixes are simple enough, the modifications can be done such they only affect the top-most metal layer, so there is no need to remanufacture the masks for other layers, saving time and $$$.

dezgeg··on Investigating why Steam started picking a random font
> Yes, st_ino too, which means it could also break on a filesystem with large enough inode numbers.

Yep, been broken for 8 years in some Valve's games: https://github.com/ValveSoftware/Source-1-Games/issues/1685

dezgeg··on Use this kernel parameter in your kiosk
So that people cannot press these key combinations behind Alt+PrintScreen: https://en.wikipedia.org/wiki/Magic_SysRq_key (assuming there is a keyboard, of course).
dezgeg··on Use this kernel parameter in your kiosk
On the kernel side please use kernel.sysrq=0 also to disable magic sysrq (usually under key combo Alt+PrintScreen).
dezgeg··on Rust in the 6.2 kernel
Can you share some concrete examples where you think "kernel C" is really unlike normal C? Sure, there will be couple of additional things the programmer needs to be aware of (e.g. special care needed when inside interrupt handlers and when holding spinlocks) but overall it doesn't visually look that different.
dezgeg··on Starlink User Terminal Modchip
Depends on how much of the stack is implemented in software and how much in fixed-function silicon.
← PreviousPage 9 of 14Next →