HNHacker News
TopNewBestAskShowJobs

cfstras

238 karma · joined August 4, 2014

submissionscomments
cfstras··on Stop making swap partitions—use swap files instead
In this case, IIUC the swap-restore mechanism just can’t use fragmented files because it runs before filesystem drivers can do their work. So it just gets an offset and probably derives the length from a header stored there, using raw disk accesses to thaw the RAM contents.

In general terms though, I hear disk fragmentation still makes a difference, f.ex. because disk page sizes don‘t match filesystem extent sizes, and disk optimizations like prefetching or even garbage collection work better with contiguous data.

cfstras··on Stop making swap partitions—use swap files instead
That’s my point, it’s different for each distro & partitioning setup, so I wouldn’t know what to share here. Having a swap partition makes it as easy as adding `resume=/dev/sdXYZ` or `resume=UUID=…` to your kernel parameters.
cfstras··on Stop making swap partitions—use swap files instead
swap files make setting up hibernation a bit more complicated - in most cases the file has to be contiguous, e.g. you have to defragment it once after allocating. Then, you need to tell the bootloader the byte offset of the file on the partition.
cfstras··on Asahi Linux on M3
It‘s going to be a godsend for people with M1 macs when Apple or App vendors decide to drop support for them.

The hardware is super capable and will make a great fileserver, TV box or HomeAssistant instance once I‘m done using it as daily driver.

Similarly, because of distros like Fedora and Ubuntu, I can keep using a 15y old Samsung notebook with a modern firefox, whereas Windows 8 already broke Samsung‘s display brightness driver and thermal management, and 10&11 are entirely unusable.

cfstras··on Palantir employees are starting to wonder if they're the bad guys
Demand would go down, so meat companies would reduce breeding to reduce output. Or start an ad & lobbying campaign to increase demand again.
cfstras··on Kidnapped by Deutsche Bahn
A couple years ago, I was at a station waiting for a (delayed) ICE train. I couldn't buy a ticket at the machine or with the app, since the train had already departed (if it had been on schedule). The ticket machine also wouldn't take VISA / MasterCard, only the more common Girocard (most people still call it EC)

Later, in the train, when I asked the conductor to buy a ticket with my Girocard, he said "That's not a commonly used payment method" and asked for VISA, or cash (not having any to provide change, obviously).

cfstras··on An appeal to Apple from Anukari
If my math is right, that gives you 83 clock cycles to calculate a single sample. on a 16 core, theoretically 1333 cycles. that‘s not a lot, considering you don‘t nearly 100% of the cpu all the time.
cfstras··on Let's talk about animation quality
That same graph had me jump towards the sampling theorem - playing back an animation with linear interpolation creates hard edges, e.g. frequency spikes. I‘m not sure if the movement space is comparable to audio here, but I can‘t see why not.

so; if the sampling theorem applies; having 2x the maximum movement „frequency“ should be enough to perfectly recreate them, as long as you „filter out“ any higher frequencies when playing back the animation by using something like fft upscaling (re-sampling) instead of linear or bezier interpolation.

(having written this, I realize that‘s probably what everyone is doing.)

cfstras··on Better HTTP server routing in Go 1.22
Most languages with macro or templating should be able to define this behavior as a library. Rust and C++ come to mind, for example.
cfstras··on Automakers invented the crime of jaywalking (2015)
is this satire? I honestly can’t tell.
cfstras··on Adding capacity to the electricity grid is not a simple task
Fellow German here, I’ve experienced a total of ~2 hours, in one single outage, about 20 years ago. Not even a single brownout since.
cfstras··on Single binary executable packages
Hmm… That makes sense. Though if you are building from source, the only gain you have over regular go tooling is downloading from your favorite mirror rather than github&co. I hope it doesn’t install these source-packages for prebuilt binaries…
cfstras··on Single binary executable packages
What are the golang- packages about in OpenSUSE? Go doesn‘t support dynamic linking (except for non-go-pieces like glibc or via cgo). Do they contain source-code? Or pre-built .a‘s? Both would have a hard time not conflicting with go‘s own build tooling, right?
cfstras··on Send text messages for free using Python
If you want to use this as a toy, sure. But please don’t rely on it for messages you want to actually get delivered: These gateways frequently drop messages for random reasons, or block your IP if you send more than a few messages at a time. Also, in countries other than the US, expect the gateways to be long gone, or completely unreliable.
cfstras··on NFT Replicas: An app to mint a replica of virtually any NFT
> The price for a replica starts at 0.001 ETH. Each time a particular NFT piece is replicated, its next replication cost will double. So be sure to replicate popular pieces early!

So who gets the replication fees? Is this just a cash grab by the authors of the site?

cfstras··on My Custom CSS Reset
I cannot stress this enough:

    -webkit-font-smoothing: antialiased
Looks _horrible_ on non-retina (read: most external) monitors with macOS. Browsers have sane defaults for every OS! Please retain them rather than making me install TamperMonkey just to read your blog.
cfstras··on S.F. is considering downtown 'congestion pricing'
I'm not convinced congestion pricing will actually fix the problem. Once public transit exists and is more useful than your own car, people will use it.

I consistently notice this when visiting larger cities in Germany. Good public transit => I'll take the bus/tram/subway every day. Slow or unreliable => I'll gladly take an Uber or buy my own car.

Maybe surge pricing could be use to finance investments into public transit. Just make it a function of the horsepower-to-people ratio. Anything below 90HP/person is free. If you can afford a nice car with lots of power and don't carpool, pay up.

cfstras··on Signal Desktop is corrupting its database
You could probably use something like https://github.com/benbjohnson/litestream to backup your signal db.
cfstras··on Actually Portable Executables
Yes, as they require a significantly less amount of stuff you need to deal with. WINE needs to implement vast amounts of Windows APIs to make something like .net work, while cosmopolitan limits you to low-level C (and things built on it, like lua) at compile time.
cfstras··on A 1000-processor chip powered by an AA battery (2016)
Java has this since 8:

    Arrays.asList("hello", "world").parallelStream()
        .forEach(s -> System.out.println(s));
If you want to calculate stuff, you can

    List<String> suffixed = Arrays.asList("hello", "world").parallelStream()
         .map(s -> s + "_suffix")
         .collect(Collectors.toList())
cfstras··on Timezone Bullshit
ah, that makes sense. Looks like the gdate I'm using only links against libsystem, and I don't have a glibc anywhere. So it's the darwin libc that doesn't have this bug.

Testing with https://hub.docker.com/_/busybox, it seems like musl also has this problem. uclibc is not affected.

cfstras··on Timezone Bullshit
The part about "using the text of the invalid timezone" seems to be fixed in latest GNU date (8.32):

  $ TZ=EDT gdate
  Wed Feb 10 13:22:23 UTC 2021
  $ gdate --version
  date (GNU coreutils) 8.32
  ...
8.30 (shipped in debian buster) still has the problem.

The BSD version of date shipped with MacOS 10.15 also does not seem to have this bug.

cfstras··on Docker fails to launch on Apple Silicon
Docker on Mac and Windows both use virtual machines to run a Linux OS, which then runs Docker normally.
cfstras··on Apple Silicon M1 chip in MacBook Air outperforms high-end 16-inch MacBook Pro
Since the 10,1 is not selling yet, where are these numbers coming from? Are Apple employees publishing benchmarks? Or are randos on the internet just uploading fake numbers?
cfstras··on Zoom lied to users about end-to-end encryption for years, FTC says
- I was looking for "desktop-solutions" comparable to Zoom, so WhatsApp and Telegram are out of the question (Telegram doesn't do group calls AFAICS).

Some notes:

- Wire has published a detailed whitepaper on e2ee. https://wire-docs.wire.com/download/Wire+Security+Whitepaper...

- Jami (formerly GNU Ring) has an interesting post about having e2e here: https://security.stackexchange.com/a/162603/243716

- Jitsi e2e is testable, but they note that it's not completely finished. Key exchange has to be done manually.

- https://github.com/bigbluebutton/bigbluebutton/issues/9893 suggests BigBlueButton don't have e2e yet

- Wikipedia claims "no encryption protocol" for OpenMeetings https://en.wikipedia.org/wiki/Apache_OpenMeetings

---

So that leaves Wire and Jami. Thanks for the info!

cfstras··on Zoom lied to users about end-to-end encryption for years, FTC says
What other popular group video meeting tools are e2e? I know of none.

I remember reading a while back that Zoom claimed a few times they were e2e-encrypted, but what they meant was transport encryption.

cfstras··on Ask HN: What's the deal with overlapping NYC IPs?
People have also found that you used to be able to discover the other routers in your „Carrier-Grade-LAN“: https://media.ccc.de/v/32c3-7133-beyond_your_cable_modem
cfstras··on Ask HN: What's the deal with overlapping NYC IPs?
CG-NAT, more specifically DS-Lite, is being used by lots of ISPs in Europe. In Germany, it has been the default for new consumer contracts for ~6 years now.
cfstras··on Ask HN: Good Resources on Voice Encryption?
The mumble protocol is a nicely documented example for using encrypted Opus (OCB-AES128) over UDP: http://mumble-protocol.readthedocs.io/en/latest/voice_data.h...
cfstras··on The Problem with Git Flow
If the qualifying process is long and expensive, doing a one-off fix does seem more logical. This is assuming you can be sure the fix really is isolated. I do feel like a lot of companies over-exaggerate the need for multiple supported releases.
Page 1 of 3Next →