HNHacker News
TopNewBestAskShowJobs

matja

1,184 karma · joined December 29, 2018

https://github.com/matja
submissionscomments
matja··on So We've Got a Memory Leak
And then you accidently add a use-after-free bug by trying to satisfy a "correctness" tool...
matja··on Ask HN: How to handle user file uploads?
By running it in an ephemeral container with no network access for each file you want to check?
matja··on I found one of my first programs (Java, 2011) on the Wayback Machine and it runs
Most Linux distros still package jdk8-openjdk which has appletviewer.
matja··on Do not buy a Hisense TV (or at least keep them offline)
> never connected it up to anything other than a HDMI cable, so it can't phone home

Well, you're lucky that your equipment doesn't use the Ethernet channel in HDMI 1.4 then :) you can put a piece of Kapton tape over the HEC pin to make sure that doesn't happen.

matja··on Tesla recalls all cybertrucks for faulty accelerator pedals
Until the brake pedal falls off as well
matja··on A disk so full, it couldn't be restored
Probably you are using zsh and need:

    MULTIOS=1 > file
- zsh isn't POSIX compatible by default
matja··on A disk so full, it couldn't be restored
Ok, we'll leave that a mystery then!
matja··on Dark Star at 50: How a micro-budget student film changed sci-fi forever

    <ext4> I have no proof it was false data
    <zfs> YOU HAVE NO PROOF IT WAS CORRECT DATA!
matja··on A disk so full, it couldn't be restored
Simple to verify with strace -f bash -c "> file":

    openat(AT_FDCWD, "file", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3
man 2 openat:

    O_TRUNC
        If the file already exists and is a regular file and the
        access mode allows writing (i.e., is O_RDWR or O_WRONLY) it
        will be truncated to length 0.
        ...
matja··on Dark Star at 50: How a micro-budget student film changed sci-fi forever
This movie blew my mind as a kid and a serves warning of things to come with AI that kinda became a movie trope, but had some memorable scenes in Dark Star:

<Commander Powell> Talk to the bomb.

<Doolittle> But I have been talking to it, sir. And Pinback's talking to it right now.

<Commander Powell> No, no, Doolittle. You talk to it.

<Commander Powell> Teach it phenomenology

matja··on Subroutine calls in the ancient world, before computers had stacks or heaps
> This would be transformed by the compiler into something like this:

Even modern C compilers for "modern" 8051-derived MCUs work like this :)

matja··on Running a Raspberry Pi with a read-only root filesystem
> Oversize your card so that the card can properly perform wear-levelling

I think this is half of the problem: SDHC does not require wear-leveling at all, I am unsure of SDXC. But regardless, the wear-levelling algorithm the SD card firmware does is completely invisible, from some vendors it might do a decent job, from some it might be a no-op, we have no way to tell.

The only way to know you're getting wear-levelling is to do it at an OS level, e.g. UBIFS stacked on MTD emulation - but there's a bunch of assumptions there which make it unsuitable for SD cards.

matja··on Show HN: Flatito, grep for YAML and JSON files
Yes:

    json = {};
    json["foo.bar"] = true;
    json["foo[0]"] = true;
matja··on Bug hunting in Btrfs
> running again smoothly for 5 years

So did you bite the bullet and get ECC, or are you just waiting for the next corruption caused by memory errors? :)

matja··on Bug hunting in Btrfs
> I don't want to deal with keeping ZFS up to date

That's what DKMS is for, which most distros use for ZFS. Install and forget.

matja··on Intel Processor Instability Causing Oodle Decompression Failures
Was it proven that the issue still occurred with ECC RAM?
matja··on AWS charge for using IPv4 expected to bring $1B/year and speed up IPv6 adoption
What's an "every day user"?

Maybe some P2P applications will magically start working or have lower startup time because of no need for STUN/TURN/ICE for NAT traversal.

matja··on Lego Mechanical Computer
Eerily similar to molecular nanotechnology rod logic proposed by Eric Drexler back in the 80's
matja··on 1195725856 and other mysterious numbers (2020)
More magic numbers: https://rachelbythebay.com/w/2020/11/26/magic/
matja··on Clang now makes binaries an original Pi B+ can't run
Is that why other distros break? :)
matja··on Clang now makes binaries an original Pi B+ can't run
clang/clang++ read from /etc/env.d/gcc to get the target flags/profile, it's up to the OS to maintain them and make sure they're correct, looks like that didn't happen for this OS.

My Gentoo ARM SBC based on an even more ancient armv4 arch has been chugging along just fine with the latest gcc/clang updates:

    grep CTARGET /etc/env.d/gcc -r
    /etc/env.d/gcc/armv4tl-softfloat-linux-gnueabi-11.3.0:CTARGET="armv4tl-softfloat-linux-gnueabi"
matja··on Tinnitus linked to undetected auditory nerve damage
> pushing downward on the top of my head with my hands

I've never tried or noticed this before until you mentioned it, but this makes my tinitus noticeably worse. It's not really louder, but seems to add "harmonics".

matja··on The largest number representable in 64 bits
IEEE754 64-bit representation already has infinity:

    uint64_t x = 0x7ff0000000000000ULL;
    printf("%f\n", *(double *)&x);
output:

    inf
But you could use a representation where 0 is 0, and 1 is infinity, saving 63 bits...
matja··on Fun with DNS TXT Records
Also, every "class" has TXT records, not just the "IN" (internet class):

    $ host -c ch -t txt version.bind glass.its.utexas.edu
    version.bind descriptive text "9.11.36-RedHat-9.11.36-11.el8"

    $ host -c ch -t txt version.bind ns1.yahoo.com
    version.bind descriptive text "Yahoo"
matja··on I tested four NVMe SSDs from four vendors – half lose FLUSH'd data on power loss (2022)
Actual file data ends up in the same transaction group (txg) as metadata if both are changed within the same txg commit (either flushed explicitly, due to recordsize/buffer limit being reached, or txg commit timeout - 5 seconds by default), so if there is a write barrier violation caused by hardware lies followed by an untimely loss of power, the checksums for the txg updates won't match and they get rolled-back until the last valid one when importing the pool - which doesn't end up zero'ing out extents of a file (like in xfs) or ending up with a zero file size (like on ext3/ext4).
matja··on I tested four NVMe SSDs from four vendors – half lose FLUSH'd data on power loss (2022)
> which should prevent this problem if the hardware doesn't lie.

Or, one can take the ZFS approach and assume the hardware often lies :)

matja··on I tested four NVMe SSDs from four vendors – half lose FLUSH'd data on power loss (2022)
Journaling filesystems (including NTFS, and ext3/ext4 using default mount options) typically only track file structure metadata in the journal, so that is WAI - the filesystem structure was not corrupted, but all bets are off when it comes to the contents of the files.
matja··on Diskomator – NVMe-TCP at your fingertips
There was a line of products called EtherDrive made by Coraid in the early 2000's that was basically a SATA to ATAoE bridge on the most basic devices, up to rack-mount solutions that used a Linux OS and Dell HBA to run vblade (https://github.com/OpenAoE/vblade) to expose a Linux MD array carved up using LVM2.

ATAoE ("aoe" in the Linux kernel) is nice because it is very lightweight in both terms of code to implement it (~2-3kloc, basically just stuff an ATA packet in an ethernet frame), low network overhead, and ease to setup (no IP addresses).

matja··on We don't do DST at this company
> your computer’s internal clock doesn’t actually go forward or back one hour

Kind of, there's multiple "internal clock"s. Windows (in)famously uses localtime instead of UTC by default for the RTC (stored in CMOS) which has caused many bugs (would list them all but my old bookmarks to MS KB pages were all broken by MS's site redesign), and setting the (unsupported) HKLM\SYSTEM\CurrentControlSet\Control\TimeZoneInformation\RealTimeIsUniversal registry key causes yet more bugs.

A hilarious one was Windows getting stuck in a loop continuously changing the time back to 01:00 every time it reached 02:00 because it couldn't persist the "InDST" flag.

matja··on Moving our Encrypted DNS servers to run in RAM
I have an AMD CPU and I get in my kernel logs during boot:

    [    0.338594] Memory Encryption Features active: AMD SME
← PreviousPage 7 of 13Next →