News for hackers. Stuff that matters.

danadam

Re:Mystery of 60-Second Fluctuations in Power Grids Solved on Monday November 02, 2026 @08:52AM (#50336810)
By increasing the length of the FFT you lower the apparent noise floor in the FFT magnitude plot and are able to detect smaller signals. That's called "FFT processing gain". The formula is:

FFT gain = 10*log(M/2)

where M is the number of points processed in the FFT. Doubling the number of points, lowers the apparent noise floor by 3 dB.

(I don't know if that's what the researchers actually did. I'm just explaining what the comment presumably meant.)

Re:Websites Should Be Printable on Monday October 26, 2026 @11:09AM (#50245094)
> I just made a simple site that didn't set any font sizes anywhere, and a friend of mine complained that the font was too small on mobile. Do I detect a lo-res screen and increase the font size?

Did you use

  <meta name="viewport" content="width=device-width, initial-scale=1.0">
That would probably be enough to look good on mobile too.
They block some user-agents, maybe that's it?

From [1]

> We must regularly implement temporary security measures to ensure the availability of Codeberg's resources and prevent abuse.

> The 403 you have received is expected based on the UA.

From [2]

> What is the version of your chromium? AFAICT <=137 gets 403 Forbidden: [...] while >= 138 works ok: [...]

[1] https://codeberg.org/Codeberg/Community/issues/3084

[2] https://codeberg.org/Codeberg/Community/issues/3078

Re:A brief history of Windows scroll bar shortcuts on Wednesday September 23, 2026 @07:36PM (#49824182)
> IMO, "scroll here" should be the default action for clicking on a scrollbar.

> and Qt does not.

Isn't that what middle click does in Qt?

Re:English: A vs. An on Sunday September 20, 2026 @11:37AM (#49776913)
To me, as non-native, it seems that it may be because the idea [1] of "cases" was already introduced. So, at the start of a conversation you would say:

- The rules of a/the are simple.

- Not really, if you think so, then you haven't considered _all cases_. There's this exception and there's that exception. [...]

but:

- The rules of a/the are simple.

- Not really. There's this exception and there's that exception. [...] If you think the rules are simple, then you haven't considered _all the cases_.

[1] but take what I write with a big grain of salt, I can't explain why I wrote "the idea" or "the start" and I'm not 100% sure if that's correct :)

Re:English: A vs. An on Sunday September 20, 2026 @08:04AM (#49774970)
> The funny thing is is that all the examples you gave are correct English.

> [I learned it] "at school" - I learned it at school, I'm not specifying which school

According to most comments here this should be "at a school" then :)

> If you're not on a US-based IP, you should check out https://src.infinitewave.ca/

There is also https://src.hydrogenaudio.org/ (with no IP based restrictions, AFAIK).

Re:Software Is Made Between Commits on Friday June 12, 2026 @04:07PM (#48508879)
> So many of these things would have been really painful to find if I'd had to sift through every line of a big commit.

> So to watch people intentionally balling up an entire PR's worth of commits and squashing them together to throw away the only (in my mind) thing that version control is good for, is truly baffling.

> But yeah, there are plenty of people like the parent in that camp

I'm confused. The parent doesn't want big commits but rather, as they wrote twice, commits that are small, atomic and without noise. So presumably "fix typo" would be removed during rebase but "rename function" would stay and be separate from "implement logic".

Re:EFF is leaving X on Thursday April 09, 2026 @05:45PM (#47710583)
IIUC, "clearly shows" doesn't apply to "they have certain concerns" but rather to the part that you replaced with "...". In other words "the statement clearly shows that they value [their certain concerns] more highly than the kind of stuff we tend to think the EFF primarily cares about"
> Your comment really deserves nothing more than an eye roll emoji, but HN doesn’t support them.

(◔_◔)

Re:10 years of writing a blog nobody reads on Monday December 01, 2025 @07:28PM (#46115650)
I clicked on some random post from 2020, 19 em-dashes.
Re:The Therac-25 Incident on Wednesday August 27, 2025 @05:20AM (#45037200)
Some Google Pixel phones couldn't dial emergency number (still can't?). I don't know if there were any deadly consequences of that.

https://www.androidauthority.com/psa-google-pixel-911-emerge...

> Normalization increases gain of all frequencies at any given point-in-time while reducing gain of all frequencies at other points in time.

When you do that then the difference between the loudest and the quietest part of the audio gets reduced. That's dynamic range reduction.

Re:Too Many Open Files on Friday June 06, 2025 @03:27PM (#44204138)
> trace it down to the select bitset having a hardcoded max of 4096

Did it change? Last time I checked it was 1024 (though it was long time ago).

> and no bounds checking!

_FORTIFY_SOURCE is not set? When I try to pass 1024 to FD_SET and FD_CLR on my (very old) machine I immediately get:

  *** buffer overflow detected ***: ./a.out terminated
  Aborted
(ok, with -O1 and higher)
Re:Show HN: I wrote a modern Command Line Handbook on Friday May 30, 2025 @10:20AM (#44136489)
page 112

> if [[ "${1-}" =~ ^-*h(elp)?$ ]]; then

> ... is an option that starts with one or multiple - characters ...

"one or multiple" is + not *. The regex above will also match "h" and "help" without - character(s).

I'd probably call it "disclosure".
I've never used it but sounds like https://rr-project.org/
Re:Decibels Are Ridiculous on Thursday May 22, 2025 @09:00AM (#44061627)
> It isn't tho. It's close but not exactly.

It isn't tho :-). It's not close to double loudness. It's double power, which is 1.41 higher sound pressure, which is only slightly louder.

Re:Decibels Are Ridiculous on Thursday May 22, 2025 @08:01AM (#44061182)
Some laboratory-grade equipment probably.

> 0 dB doesn’t mean “zero sound pressure”

From the decibel definition, zero of anything is -∞ in dB_suffix scale.

Re:The Awful German Language on Friday May 16, 2025 @09:15AM (#44005121)
> English, meanwhile, gives learners fits, because the pronunciation has nothing whatsoever to do with spelling. Consider ...

the poem https://en.wikipedia.org/wiki/The_Chaos :)

I use a picture with a solid color because with pictures the text under the icons is white with a black shadow. The "Solid color" option (instead of "Picture") chooses either white or black font color and there is no shadow and I don't like it.
I have a bookmarklet, since forever, labelled "sane width", with the following code:

  javascript:(function(){var newSS, styles='body { width: 800px ! important; margin: auto !important } '; if(document.createStyleSheet) { document.createStyleSheet("javascript:'"+styles+"'"); } else { newSS=document.createElement('link'); newSS.rel='stylesheet'; newSS.href='data:text/css,'+escape(styles); document.getElementsByTagName("head")[0].appendChild(newSS); } })();
It forces the body width to 800px and centers it. Crude but it is enough for me.
Re:Use Long Options in Scripts on Saturday March 22, 2025 @10:41AM (#43445947)
> No, the quotes are not seen by the program. The program receives a list of strings, it does not get the information about whether and how those strings were originally quoted in the shell.

With quotes the program will receive a single argument -n␣o␣p␣e instead of multiple ones -n, o, p, e. At least it works on the machine here:

    ]$ echo "-n o p e"
    -n o p e
    
    ]$ /bin/echo "-n o p e"
    -n o p e
3Blue1Brown has a very interesting video about how holograms are made:

https://www.youtube.com/watch?v=EmKQsSDlaa4

Re:YouTube audio quality – How good does it get? (2022) on Sunday February 02, 2025 @01:07PM (#42910405)
> However, if you put on a headset and apply only frequencies above 16kHz, you will distinctly notice a change in the pressure in your headset's ear cups.

If you put something above 16 kHz at full scale and/or if you play it extremely loud then maybe. With typical music content at typical volumes, I doubt it.

Re:YouTube audio quality – How good does it get? (2022) on Sunday February 02, 2025 @12:58PM (#42910328)
> When I use an FFT to view the spectrogram on YouTube music videos, it is very obvious that YouTube applies a lowpass filter at 16kHz on all videos (true since 2023 at least).

Maybe with a browser that doesn't support Opus and gets AAC instead (Safari?). With Firefox or Chromium on Linux I get up to 20 kHz, which by design is the upper limit in Opus codec.

That's unrelated. This difference is the inter-aural or inter-channel difference and 16/44.1k can capture that to much greater precision than microseconds.

Some math [1]

44.1k file containing pulses with sub-sample delays [2]

Something similar, but square wave, and nicely showing that timing precision actually depends on bit-depth and not the sampling rate [3]

Some practical experiments with capturing the playback of such files and verifying that the delay is preserved: pulse [4] and square [5]

[1] https://troll-audio.com/articles/time-resolution-of-digital-...

[2] https://www.audiosciencereview.com/forum/index.php?threads/t...

[3] https://audiophilestyle.com/forums/topic/58511-time-resoluti...

[4] https://www.head-fi.org/threads/can-you-hear-upscaling.97295...

[5] https://www.head-fi.org/threads/can-you-hear-upscaling.97295...

> The problem with sites that extract text from movies and other content is that they reduce people’s desire to pay a fair price for content

A bit strange to use "fair", which (to me) seems to be quite on a subjective side. Do people still think that the price is fair and only don't want to pay it? Or maybe some of them don't consider the price to be fair anymore :-)

Older »