frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Hungary's oldest library is fighting to save books from a beetle infestation

https://www.npr.org/2025/07/14/nx-s1-5467062/hungary-library-books-beetles
39•smollett•3d ago•2 comments

Make Your Own Backup System – Part 1: Strategy Before Scripts

https://it-notes.dragas.net/2025/07/18/make-your-own-backup-system-part-1-strategy-before-scripts/
184•Bogdanp•7h ago•64 comments

I tried Vibe coding in BASIC and it didn't go well

https://www.goto10retro.com/p/vibe-coding-in-basic
29•ibobev•3d ago•13 comments

Local LLMs versus offline Wikipedia

https://evanhahn.com/local-llms-versus-offline-wikipedia/
177•EvanHahn•10h ago•95 comments

Nobody knows how to build with AI yet

https://worksonmymachine.substack.com/p/nobody-knows-how-to-build-with-ai
247•Stwerner•11h ago•207 comments

"Bypassing" Specialization in Rust or How I Learned to Stop Worrying and Love F

https://oakchris1955.eu/posts/bypassing_specialization/
9•todsacerdoti•2d ago•0 comments

OpenAI claims gold-medal performance at IMO 2025

https://twitter.com/alexwei_/status/1946477742855532918
424•Davidzheng•18h ago•635 comments

Mushroom learns to crawl after being given robot body (2024)

https://www.the-independent.com/tech/robot-mushroom-biohybrid-robotics-cornell-b2610411.html
73•Anon84•2d ago•13 comments

Ring introducing new feature to allow police to live-stream access to cameras

https://www.eff.org/deeplinks/2025/07/amazon-ring-cashes-techno-authoritarianism-and-mass-surveillance
168•xoa•5h ago•79 comments

Death by AI

https://davebarry.substack.com/p/death-by-ai
188•ano-ther•13h ago•58 comments

Rethinking CLI interfaces for AI

https://www.notcheckmark.com/2025/07/rethinking-cli-interfaces-for-ai/
138•Bogdanp•10h ago•67 comments

Erythritol linked to brain cell damage and stroke risk

https://www.sciencedaily.com/releases/2025/07/250718035156.htm
24•OutOfHere•1h ago•3 comments

Babies made using three people's DNA are born free of mitochondrial disease

https://www.bbc.com/news/articles/cn8179z199vo
261•1659447091•3d ago•152 comments

What Were the Earliest Laws Like?

https://worldhistory.substack.com/p/what-were-the-earliest-laws-really
41•crescit_eundo•4d ago•8 comments

The curious case of the Unix workstation layout

https://thejpster.org.uk/blog/blog-2025-07-19/
73•ingve•11h ago•21 comments

The borrowchecker is what I like the least about Rust

https://viralinstruction.com/posts/borrowchecker/
161•jakobnissen•8h ago•217 comments

TSMC to start building four new plants with 1.4nm technology

https://www.taipeitimes.com/News/front/archives/2025/07/20/2003840583
141•giuliomagnifico•7h ago•95 comments

Trigon: Exploiting coprocessors for fun and for profit (part 2)

https://alfiecg.uk/2025/07/16/Trigon.html
30•Bogdanp•7h ago•1 comments

Zig Interface Revisited

https://williamw520.github.io/2025/07/13/zig-interface-revisited.html
85•ww520•3d ago•20 comments

Intel to boost gross margins – new products must deliver 50% gross profit

https://www.tomshardware.com/tech-industry/semiconductors/intel-draws-a-line-in-the-sand-to-boost-gross-margins-new-products-must-deliver-50-percent-to-get-the-green-light
38•walterbell•3h ago•24 comments

MCP Security Vulnerabilities and Attack Vectors

https://forgecode.dev/blog/prevent-attacks-on-mcp/
152•tested1•9h ago•16 comments

What the Fuck Python

https://colab.research.google.com/github/satwikkansal/wtfpython/blob/master/irrelevant/wtf.ipynb
131•sundarurfriend•8h ago•139 comments

Show HN: Am-I-vibing, detect agentic coding environments

https://github.com/ascorbic/am-i-vibing
52•ascorbic•11h ago•24 comments

Pimping My Casio: Part Deux

https://blog.jgc.org/2025/07/pimping-my-casio-part-deux.html
169•r4um•19h ago•53 comments

How we tracked down a Go 1.24 memory regression

https://www.datadoghq.com/blog/engineering/go-memory-regression/
129•gandem•2d ago•8 comments

Piano Keys

https://www.mathpages.com/home/kmath043.htm
43•gametorch•4d ago•39 comments

Show HN: Display Photos on a World Map

https://worldsnap.surge.sh/
27•stagas•3d ago•2 comments

Fstrings.wtf

https://fstrings.wtf/
383•darkamaul•16h ago•119 comments

Hyatt Hotels are using algorithmic Rest “smoking detectors”

https://twitter.com/_ZachGriff/status/1945959030851035223
753•RebeccaTheDev•23h ago•439 comments

N78 band 5G NR recordings

https://destevez.net/2025/07/n78-band-5g-nr-recordings/
69•Nokinside•2d ago•3 comments
Open in hackernews

Piano Keys

https://www.mathpages.com/home/kmath043.htm
43•gametorch•4d ago

Comments

bruce343434•7h ago
On my (accoustic) piano, the black keys are just as wide as the back ends of the white keys. This is achieved by shifting the position of the black keys a bit, instead of centering them right between the white keys.
o11c•7h ago
Same, but I had to look. I wonder how badly this affects muscle memory?
madaxe_again•5h ago
In my experience, you fumble for a minute and then you adapt. I had a Young Chang that followed this model, and a Yamaha at school that didn’t.
blobbers•4h ago
Generally speaking fumbling on a piano doesn’t bode well for performance… it’s a little bit like Olympic gymnastics, you only get one chance to stick the landing!
blobbers•4h ago
This is fascinating! I’ve never played a YC seriously, but I have played several Yamahas and currently play on a Kawai and Baldwin. I’ve often wondered if the Baldwin or Yamaha is laid out slightly differently than the Kawai because I feel like playing broken 4 note chords the fingering can feel off on one piano vs another. It’s a slight stretch but the 4-5 on the second 4 note chord can be uncomfortable on the Kawai and comfortable on the Yamaha. I never play them in the same room, one is at my teachers and one at home.

Very interesting! Is there a spec for this? Or a layout description? Surely something as precise as piano would note this.

Nition•4h ago
Interesting, my piano is a Yamaha (specifically a 1980 Yamaha YUA, basically a U3), and it does follow the model (same width everywhere).

Photo: https://i.imgur.com/ulsLUoG.jpeg

I also have a MIDI keyboard (M-Audio Hammer 88) which follows the same model.

I'd like to see a photo of someone's piano that uses a different system, really I thought they were always this way. It's a good system because it lets the black keys be spaced a little further apart, while also reducing the jump between black key clusters.

mlochbaum•3h ago
The point that the article is addressing (but you have to ignore the image and study the equations to see this!) is that this sort of shifting can't equalize everything. In the span of 3 white keys C to E at the front, you have 2 black keys at the back, so if you take r to be the ratio of back-width to white key front-width then you have 3 = 5r. But in the 4 keys F to B, you've got 3 black keys so 4 = 7r. No single ratio works! So the article investigates various compromises. The B/12 solution is what seems to me the most straightforward, divide white keys in each of the sections C to E and F to B equally at the back, and don't expect anyone to notice the difference.
ajuc•7h ago
I never understood why the piano keyboard isn't regular. It forces players to remember different positions for the same chord transposed to start at different notes.

Like why do I have to remember the shape for C major and D major chords? It should be the same shape just starting at C vs D.

It's not even that hard to fix. There's 12 semitones in an octave. Just make it 6 white 6 black keys.

tetraodonpuffer•6h ago
having the keyboard the way it is also allows you to more easily orient yourself, you can feel with the sides of your fingers if you are next to E/F or B/C and with the corner of your eye it's also straightforward to figure it out. I don't think it'd be possible (or anyways even more difficult than it is now) to play large jumps accurately if the whole keyboard looked the same
paulgerhardt•6h ago
I think both of those concerns were addressed by the Dvorak of piano keyboards: https://en.wikipedia.org/wiki/Jank%C3%B3_keyboard

Has the symmetry of GP while large jumps are accomplished by shifting up a row or two.

I assume it didn’t take off for the same reason Dvorak didn’t.

ajuc•6h ago
Make a dimple on every C key and paint it red.
toast0•18m ago
That's all fine and dandy, except early apple keyboards have the dimples one key over :p
bluGill•5h ago
There are multiple alterative layout that some advocate for. they generally do sonething else for orintation. putting a bump on middle c and other places.
krallja•6h ago
https://en.wikipedia.org/wiki/Jank%C3%B3_keyboard available since 1882!
jng•6h ago
The white keys form a sequence of notes (frequencies) that is known as the diatonic scale. It's the foundation underlying all popular western music. It is not random or arbitrary, it has some nice dual mathematical and musical properties: intervals between the notes in the scale have special frequency ratios that sound pleasing to the ear (read Helmholtz's "On the sensations of tone" for a fascinating physically-based take on why it is like that -- he is known as "the father of acoustics", and that book contains the distillation of 8 years of deep, smart research way before we had the means or understanding we hav today). A ton, if not most, of popular music can be played using only the white keys.

There used to be keyboards with other different arrangements, which were actually extremely cumbersome and actually didn't allow very rich and interesting musical excursions like modulations (look up "microtonal keyboards"). Today's standard keyboard and tuning is a compromise between those fundamentally mathematical and perceptual acoustic relations (the tonic, the fourth, the fifth, the sixth, the major and minor third, the "sensible" or subtonic...) and the ability to perform those trans-tonality excursions. A fully regular keyboard like you propose would lend itself more easily to those excursions, at the cost of being less apt at the foundational diatonic model and most popular music.

Interestingly also, the notes used by modern keyboards and all modern instruments, and to which we are all so accustomed that we thing it "just is", is an imperfect compromise that needed a lot of selling back in the day, much of which was done by Bach (the compromise scale is called the "tempered scale", and Bach authored the arch-famous "Well-tempered clavier" pieces to show it off -- impossible to perform on keyboards with other tunings).

And of course, there is a tradition factor. English isn't written like this because it's optimizing for any easily describable or measurable optimization metric, more like it minimized a socio-perceptual function covering many centuries of UX.

Finally, if you want an instrument where all keys are equal, you can always move to a fretboard based one like the guitar. Funnily, it has a one-semitone-short jump between strings 3 and 2 that will throw off the desire of full regularity... again due to diatonic leanings. A bass guitar is fully regular, even when they add a 5th and 6th string, so that may fulfill your wish of a fully regular instrument... and it sounds awesome! Just can't do the same things as a piano or a guitar.

ofalkaed•6h ago
>Interestingly also, the notes used by modern keyboards and all modern instruments

Vast majority of fretted instruments since the death of the lute are untempered.

Edit: Which is not to suggest that lutes were tempered. Lutes and other tied fret instruments allow for unequal fret spacing so you can temper one string at the cost of more notes being more off from the temperament on other strings, or the frets being at an angle so you could find a bit of a compromise. But often they were EDO or in the ancient tradition of fretted instruments, close enough for rock and roll.

moefh•6h ago
Do you mean equal-tempered?

I never heard someone describe a tuning system as "untempered", but I guess it would mean something like just intonation -- which sounds really great for playing anything in a specific key but falls horribly apart if you try to change the key (which is why it has seen very little use since the renaissance).

ofalkaed•5h ago
Equally divided octave (EDO) with no tempering which is distinct from Equal temperament. Tempered scales are generally EDO with tempering. Other methods like just intonation don't really need to be tempered and generally are not in my experience, but it has been years since I was into just intonation and may just not remember. Historically speaking, the advantage of justly tuned scales is there is no need to temper it because it is already just and perfect, things may have changed in 20th century as far as just intonation is concerned and tempering, don't recall.

Edit: ET and EDO are essentially the same in the case of most fretted instruments, I am dredging long forgotten stuff from memory here and somewhat off above.

Edit2: Refreshing my memory some and seeing how much things have become muddled in my head over the years. Clearly I did not even consider what came out of my memory and just regurgitated it verbatim. ET scales are not tempered but do not mean EDO. Guitar and the like are both ET and EDO. ET and EDO are untempered in the sense that notes are not shifted slightly away from the EDO/ET as they are on the piano and many instruments.

moefh•5h ago
I don't see how you can divide the octave equally and not end up with equal temperament: that's exactly what equal temperament is!

> Tempered scales are generally EDO with tempering.

That's not historically accurate. EDO wasn't used until very recently (about the middle of the 19th century I think), tempering was used way before that.

For example, the first widely used temperament (which became popular in the Renaissance) was the quarter-comma meantone, which shrinks each fifth (from the natural 3/2) so that the major thirds are perfectly 5/4. The name "quarter-comma" means that the amount of shrinkage is 1/4 of the "syntonic comma", which is the difference you get beteween going up 4 fifths (e.g. C->G->D->A->E) and a major third plus 2 octaves (C->E->E->E). Those final Es can only be the same if you shrink the fifth or stretch the third (or both). What this tempering does is shrink each fifth by 1/4 of the difference (so that going up 4 fifths closes it) and doesn't touch the major third. That means the major thirds are beautiful, and the fifths are a little off. For a chosen key, that is -- everything sounds horrible as soon as you try to change the key too far away from the chosen key.

In the Baroque period a lot of other temperaments were invented, the Werckmeister temperaments were very widely used in (what is today) Germany for example (a lot of people believe Bach had one of these in mind when writing the Well-Tempered Clavier). Those temperaments were also defined by how much each fifth is changed from the "normal" 3/2, but each fifth was to be changed by some different amount in some complicated way.

It was only much later that EDO (12-TET, or "equal temperament") started to be widely used. You can think of it (and people do!) as a "temperament" because it just means you shrink the fifth from the "normal" 3/2 = 1.5 to be instead 2^(7/12) =~ 1.4983, so that going up 12 fifths lands you exactly 7 octaves above (since 2^(7/12)^12 = 2^7). That also means that the octave is divided exactly equally, because going up 12 fifths goes through every one of the 12 notes before going back to the original note.

ofalkaed•4h ago
EDO on fretted instruments goes back to at least the 16th century and was essentially the standard well before the mid 19th. Equal temperament is an EDO scale whose divisions approximate justly tuned scales. The western 12TET scale is not actually 12TET or 12EDO, we temper the scale itself and tweak some notes to make it work better unless you play fretted instruments and then it is up to the guitarist to make small adjustments in their playing technique so their untempered 12TET is in tune with the pianos tempered 12TET.

I admitted to making a mess in that post.

moefh•4h ago
> The western 12TET scale is not actually 12TET or 12EDO, we temper the scale itself and tweak some notes [...]

I think you and I must be using words differently. To me (and to Wikipedia, and everything else I've ever read, including[1] which I just consulted to make sure I'm not crazy), 12TET is a way to specify by how much you have to multiply the frequency of the first note of the scale to get the other notes' frequencies. Wikipedia[2] has a table with the numbers for 12TET (the column "Decimal value in 12-ET"), but it's very simple: you just multiply the value of the preceding note by 2^(1/12). If you take 12TET and adjust/change the notes a bit, then it's not 12TET anymore.

> EDO on fretted instruments goes back to at least the 16th century

I'd love to see a reference for that. I just consulted [1], it has a chapter called "Non-Keyboard Tuning" and it doesn't mention that (although admittedly it spends most of its time talking about violin, with a ton of references to stuff that Mozart said). The book does say that equal temperament was known for centuries before it was used, but the people who first discovered it simply didn't think it sounded good.

[1] "How Equal Temperament Ruined Harmony (and Why You Should Care)" by Ross W. Duffin

[2] https://en.wikipedia.org/wiki/12_equal_temperament

ofalkaed•2h ago
Try the wikipedia pages for Equal Temperament and Musical Temperament, they explain all of this.

Here is a 1688 Stradivari[1] guitar with fixed frets and a EDO octave, they were reasonably common by that point. Much of the information regarding this is looking at the fixed frets that many lutes and guitars had applied to their soundboard and comparing that to how composers used those fixed frets, either the tied frets adhere to the scale of the fixed frets or they are out of tune. The history of EDO/ET in fretted instruments goes back to at least Vincenzo Galilei[2] (father of Galileo) who developed the rule of 18 for fret spacing. If memory serves we have a few early steel string instrument (cittern, bandora, orpharion) from around ~1600 with equal spaced frets and this orpharion[3] looks it but it is difficult to tell from that photo. Going back earlier things get more difficult since we have so few intact and unaltered instruments but we do have a fair amount of ingravings and art plus writing on the topic such as Galilei's.

There is a paper going into great depth on all this that is just out of reach in my memory and I can't seem to trick the search engines to give it to me, I will post it if I remember/find it. No time to dig more right now.

[1]https://lsaguitarshop.substack.com/p/gear-27-the-stradivariu...

[2]https://en.wikipedia.org/wiki/Vincenzo_Galilei#Acoustics_and...

[3]https://i0.wp.com/earlymusicmuse.com/wp-content/uploads/2017...

moefh•2h ago
> I will post it if I remember/find it

If you remember and have the time, please do! (And thank you for the links you already posted).

I see now that everything I read about this was way too focused on keyboard and violin, since I had never heard any of this about fretted instruments. I'm glad I get to correct a bit of my understanding, so thank you. Now I'm left wondering about wind instruments.

ofalkaed•12m ago
Western theory is focused on the keyboard with violin as second fiddle, the rest of the instruments do their own thing unless they are forced to kowtow to a piano or violin. Each instrument is ultimately tuned to the physics which dictate how it makes sound and this is part of why our tempered 12TET works and why we see the rise of the big orchestras of unlike instruments with the move away from meantone, it provides a compromise which works quite well for all instruments with the exception of the brass (with the exception of the trombone) who are forever out of tune (sort of).

Part of the reason beginners sound bad is because most instruments have to bend notes to be "in tune," I can teach anyone to play a chord on the guitar and get them having each note sounding clearly in a couple of minutes but my DMaj will sound better than theirs simply because I have played that DMaj thousands of times and my fingers have learned to adjust the pressure on each string in just the right way to make it sound "right" just as the woodwinds learn to bend certain notes and the brass learns to live with being out of tune.

Also part of why the lute became such a dominant instrument is that it could retune in ways other instruments can not, which was a major advantage for the working musician back in the days when every city had its own idea about tuning; nudge a few frets, retune a few strings and accept that certain notes were now out of bounds and you could play with anyone like you were playing in your native tongue. As tuning became more standard the lute started to die.

Meantone Temperaments on Lutes and Viols might be of interest to you, it is aimed towards lutenists and violists but has some more general stuff as well and I think does a good job of showing the compromises the lute (and viol) had to make in moving away from equal temperament.

I don't really think brass is forever out of tune, I love the brass and used to play trumpet but the brass section is more under the influence of the physics of its instrument than anyone but the pianist but the pianist is "in tune" because western theory is built around the keyboard.

ofalkaed•5h ago
To offer something better than this mess and correct. Fretted instruments are tehnically unequally tempered do to the physics the string, the fret board is EDO but in fretting the string we stretch it and raise its pitch. Fretted instruments use various compensation tricks to lessen this effect but most notes are off from both 12EDO and 12TET, we get the open string and the 12th fret but the rest are off by varying amounts.
brudgers•5h ago
An untempered instrument would be one that is tuned to maintain the perfect intervals of a specific root tone.

Temperament is adjusting tuning for musical practicality. 12 TET is simply one set of compromises/benefits in a constellation of alternatives.

https://en.m.wikipedia.org/wiki/Musical_temperament

ofalkaed•5h ago
Thank you for offering something clearer than the mess I made. Been 25 years since I studied this stuff and finally learned to just accept (and love) the modern standard.
brudgers•6h ago
I agree, the white keys on a piano represent a diatonic scale, but because today’s pianos are rarely tuned to anything other than 12TET, there are few interesting mathematical relationships between notes in practice (and pianos are normally tuned with high notes sharp and low notes flat because that’s how piano strings tend to produce their partials anyway).

Also worth noting the black keys represent a major pentatonic scale and the major pentatonic scale is how many of the earliest bone flutes are tuned.

brudgers•6h ago
It forces players to remember different positions for the same chord transposed to start at different notes.

The piano was developed well before equal temperament came to dominate tuning. [1] So each musical key would have different harmonic relationships between the intervals within it. And musical keys were not thought of as equal.

Generally, the musical keys based on “black keys”/“sharps and flats” would be farther from an ideal tuning and there were better and worse sounding keys depending on which musical keys a piano was tuned for.

Historically in Western European music, there were preferred keys and intervals inherited from Plain Chant (roughly C,G, & F and octave, perfect 4th, perfect 5th, and the 6th).

Of course using an electronic instrument that can be electronically transposed up and down by half steps might be an easy way to avoid learning lots of fingerings.

[1] https://www.math.uwaterloo.ca/~mrubinst/tuning/tuning.html

IsTom•6h ago
Historically before twelve tone equal temperament playing in another key on a keyboard instrument would sound different.
skybrian•5h ago
Chromatic button accordions have each octave in three rows of four instead of two rows of five and seven like a piano. It's very regular, but doesn't match up with major or minor scales or with sheet music. A major scale is a zig-zag.

I play both piano and button accordion and they're just different. Neither one has a compelling advantage.

yayitswei•5h ago
I'm picky about layouts - I type in Dvorak, learned Janko via Chromatone, currently playing harpejji.

Coming from a classical piano background, there was definitely a learning curve, but I feel like it was worth it. Every chord shape is identical across all keys (C major and D major would be played the same way), which makes it much easier to learn jazz voicings or modulate a song.

If anyone ever builds a quality grand piano with Janko layout, I'm buying! Hacks on hacks become unnecessary if you start with the right design.

ncake•5h ago
Same. I recently tried to find a MIDI keyboard like that for sale and got nothing. Apparently this is what it's called:

https://en.m.wikipedia.org/wiki/Dodeka_keyboard

Nition•4h ago
With the irregular layout we have now, some keys are easy (e.g. C) and some are hard (e.g. B). If you make the layout regular, putting a black note between every white note, then every key becomes the same, but also quite hard, because every major scale is now played like this: https://i.imgur.com/6EmW8eU.gif

It's not a particularly good tradeoff. If you got rid of the black keys entirely instead, you'd have to remember which keys to skip. Harder for beginners than just playing in C.

There is the Janko keyboard though: http://en.wikipedia.org/wiki/Janko_keyboard

Snarwin•4h ago
It's not actually that much to remember. There are 3 shapes that cover most of the major chords, and 3 special cases (F♯, B♭, and B).
yongjik•5m ago
That's a bit like complaining that there are six different kinds of chess pieces and you have to memorize how each moves. The truth is, if you have trouble remembering how a knight moves, you can't be that good at Chess anyway.

Remembering twelve different ways of playing a scale is a vastly small part of learning how to play a piano.

moefh•7h ago
I always thought the canonical way to place the black keys was to divide the octave in the two parts that have the sequential black keys (C-D-E and F-G-A-B), and then simply place the black keys so they're the same distance away from each other and the edge of the parts.

That means that the white keys in each of the groups have "mirrors": for example, C is a mirror of E, D is a mirror of itself (it's the only key like that), F is a mirror of B, and G is a mirror of A.

I just looked at the keyboards I have around me (a slightly-above-low-end digital piano, a small midi controller, and a small 90s synth), and they all seem to fit that description.

ETA: note that the image in the article doesn't fit this description: for example the D is way too narrow (the black keys around it should be much further apart).

ETA2: I just noticed that this seems to be the "B/12 solution" described in the article.

ralfd•4h ago
I didn’t understand this post? More pictures needed?
prmph•1h ago
I guess I must be dumb or something, but I'm simply not seeing the problem.

Imagine the piano had only white keys, no problem right? Now just place the black keys at the back, between some of the white keys, right in the middle, such that each black key takes like a quarter of the width of the sandwiching white keys.

Now what's the problem with this again? Can someone explain in clearer terms?

If the issue is that we are trying to make the white key all have the same width at the back, well, why should that matter? Pianists don't press the white keys all the way at the back, do they?