HNHacker News
TopNewBestAskShowJobs

brewmarche

501 karma · joined August 5, 2018

submissionscomments
brewmarche··on How problematic is resampling audio from 44.1 to 48 kHz?
That would mean that higher sampling rates (which add more inaudible frequencies) could cause similar problems. OK xiphmont actually mentions that, sorry, I had only watched the video when I replied.
brewmarche··on How problematic is resampling audio from 44.1 to 48 kHz?
Someone else wrote that it was chosen to best match PAL and NTSC. IIRC there is also a Technology Connections video about those early PCM adaptor devices that would record to VHS tape.

<https://en.wikipedia.org/w/index.php?title=44,100_Hz&oldid=1...>

Take it with a grain of salt, I’m not really knowledgeable about this.

E: also note the section about prime number squares below

brewmarche··on How problematic is resampling audio from 44.1 to 48 kHz?
> Now you could play it back wrong by emitting a sharp pulse f_s times per second with the indicated level. This will have a lot of frequency content above 20kHz and, in fact, above f_s/2. It will sounds all kinds of nasty.

Wouldn’t the additional frequencies be inaudible with the original frequencies still present? Why would that sound nasty?

brewmarche··on How problematic is resampling audio from 44.1 to 48 kHz?
This is a nice video. But I’m wondering: do we even need to get back the original signal from the samples? The zero-order hold output actually contains the same audible frequencies doesn’t it? If we only want to listen to it, the stepped wave would be enough then
brewmarche··on Microsoft May Have Created the Slowest Windows in 25 Years with Windows 11
I think I had to disable spellcheck to fix the ignored keystrokes, it happened even after disabling formatting
brewmarche··on The PGP problem (2019)
> git/GitHub/gitlab/codeberge

Is this about commit signing? Git and all of the mentioned forges (by uploading the public key in the settings) support SSH keys for that afaik.

git configuration:

gpg.format = ssh

user.signingkey = /path/to/key.pub

If you need local verification of commit signatures you need gpg.ssh.allowedSignersFile too to list the known keys (including yours). ssh-add can remember credentials. Security keys are supported too.

brewmarche··on IPv6 just turned 30 and still hasn't taken over the world
I’m wondering, wouldn’t a default deny inbound firewall still need hole punching with IPv6? You wouldn’t need STUN to find your global address but if you use varying ports you’d need to communicate the port first, and you’d also need to time the simultaneous open. So a coordinating party is still needed somewhere. Getting rid of TURN relays (if you’re affected by symmetric NATs) is of course a huge plus.
brewmarche··on IPv6 just turned 30 and still hasn't taken over the world
You should use unique local addresses (ULAs, fc00::/7) not link-local addresses (fe80::/10) for this. Choose a random prefix and advertise it in your network (you can use some website like https://www.unique-local-ipv6.com if you want).

This prevents clashing subnets when using VPN like it sometimes happens with IPv4.

brewmarche··on Bluetooth Headphone Jacking: A Key to Your Phone [video]
There’s a difference between the European version of the Apple dongle and other regions. The European version maxes out at 0.5 Vrms instead of 1 Vrms.
brewmarche··on C++ says “We have try... finally at home”
Usage at call site:

    using (var result = foo.GetSomethingIfLucky())
    {
        if (result.IfHappy is {} success)
        {
            // do something
        }
    }
brewmarche··on C++ says “We have try... finally at home”
You have to write a disposable wrapper to return. Return it in error case too.

    readonly record struct Result<TResult, TDisposable>(TResult? IfHappy, TDisposable? Disposable): IDisposable where TDisposable : IDisposable
    {
        public void Dispose() => Disposable?.Dispose();
    }
brewmarche··on C++ says “We have try... finally at home”
You can move the burden of disposing to the caller (return the disposable object and let the caller put it in a using statement).

In addition, if the caller itself is a long-lived object it can remember the object and implement dispose itself by delegating. Then the user of the long-lived object can manage it.

brewmarche··on C++ says “We have try... finally at home”
In C# the closest analogue to a C++ destructor would probably be a `using` block. You’d have to remember to write `using` in front of it, but there are static analysers for this. It gets translated to a `try`–`finally` block under the hood, which calls `Dispose` in `finally`.

    using (var foo = new Foo())
    {
    }
    // foo.Dispose() gets called here, even if there is an exception
Or, to avoid nesting:

    using var foo = new Foo(); // same but scoped to closest current scope
These also is `await using` in case the cleanup is async (`await foo.DisposeAsync()`)

I think Java has something similar called try with resources.

brewmarche··on TCP, the workhorse of the internet
I agree, although I am a bit surprised to see that we’ve used more than half of the protocol numbers already
brewmarche··on TCP, the workhorse of the internet
I guess most people mean NAPT/PAT when they say NAT
brewmarche··on TCP, the workhorse of the internet
What if extension headers made it better? We could come up with a protocol consisting solely of a larger Next Header field and chain this pseudo header with the actual payload whenever the protocol number is > 255. The same idea could also be used in IPv4.
brewmarche··on Designing a Low Latency 10G Ethernet Core (2023)
Apologies, my post was not precise enough, but I think I got it.

> It wouldn't be practical to make it behave quite like an L2 switch.

What are typical configuration? If you’re allowed to talk about it.

brewmarche··on Designing a Low Latency 10G Ethernet Core (2023)
So, if I know the destination addresses on each port in advance I can program it to behave like an L2 switch (with proper multicast even), and I can use code to reprogram it whenever the traffic pattern changes?
brewmarche··on Incident with Webhooks
Interesting that they went with a custom MIME type and a custom version header. I would have expected the version to be in the MIME type, but I feel like there is a reason behind this.
brewmarche··on Designing a Low Latency 10G Ethernet Core (2023)
Are L1 switches like hubs or repeaters then? Sorry for my confusion.
brewmarche··on Pnpm has a new setting to stave off supply chain attacks
Maybe surprising for days (could also happen with minutes because of leap seconds technically :-) but for months and years this is more apparent due to month ends and leap years.
brewmarche··on Microsoft Python Driver for SQL Server
I have very limited Python experience but I remember using pymssql in the past. Are there any problems with it?
brewmarche··on About the security content of iOS 15.8.5 and iPadOS 15.8.5
I have the same phone but to be fair some websites stopped working (GitHub is among them) and some of my banking apps stopped getting updates as well.

No huge deal breakers _personally_ as I don’t need banking on my phone anyway (I have an iPad at home, and also checked that the banks offer authentication devices like TAN generators if I really need to get out of the iOS/Android ecosystem).

Apple Pay still works fine.

I hope that small phone has a long life ahead of it still :)

brewmarche··on Folks, we have the best π
I don’t think it’s a metric for 0 < p < 1 though.
brewmarche··on macOS Tahoe is certified Unix 03 [pdf]
Note: while the link above points to a newer standard, the quote has already been present in the one for UNIX 03 it seems: < https://pubs.opengroup.org/onlinepubs/009696699/functions/po...>
brewmarche··on The Deletion of Docker.io/Bitnami
That’s the first part, but will the charts work if I override the image name with a non-Bitnami one (e.g. docker.io/library/redis for redis)? Or do they bake in special stuff in their images that their charts rely on?
brewmarche··on The Deletion of Docker.io/Bitnami
Anyone know what happens to their Helm charts? As far as I know they remain available but do they work with non-Bitnami images? Can I use the official redis image instead of bitnami/redis with the Bitnami redis chart for example?
brewmarche··on macOS dotfiles should not go in –/Library/Application Support
That sounds like a good distinction.

What are CLI tools that work under macOS but not under Darwin? Shortcuts like `code` or `pycharm` that open graphical apps? CLI tools that come bundled with macOS? Yeah these could use the latter.

brewmarche··on macOS dotfiles should not go in –/Library/Application Support
As does vim (e.g. $XDG_CONFIG_HOME/vim/vimrc and $XDG_CONFIG_HOME/vim/pack/...)
brewmarche··on Show HN: OS X Mavericks Forever
I often bring this one up when I see missing braces in PRs.
← PreviousPage 3 of 9Next →