HNHacker News
TopNewBestAskShowJobs

ad8e

932 karma · joined February 18, 2021

Kevin Yin
submissionscomments
ad8e··on Caltech Mathathon – first hackathon ever devoted to research level mathematics
Other than Yang Song, who were Caltech's AI faculty hires with issues?
ad8e··on Protect your shed
The second half of this article is detected as AI by pangram: https://www.pangram.com/history/63fdecd4-f932-4fad-af60-da99...
ad8e··on Hexagonal tic-tac-toe is ridiculous [video]
Vibe-coded PVP: https://hex-tic-tac-toe.did.science/
ad8e··on Amazon cuts 16k jobs
Your suspicion is right; it is 100% AI-generated. https://www.pangram.com/history/8b593dcc-6a7d-496f-8c80-a588...
ad8e··on Reasonable Person Principle
Yes. At Caltech, you'd be socially ostracized by your friends if people knew you were cheating, or helping another person cheat.
ad8e··on Meta plans to not open the weights for its 400B model
Agree, but I've seen other open-source ML people confirm it. For example:

Teknium: Okay and Ive had 4 high-ish level sources tell me they dont plan to release it ever though

ad8e··on Grandmaster-Level Chess Without Search
A quote from discord: "apparently alpha-zero has been replicated in open source as leela-zero, and then leela-zero got a bunch of improvements so it's far ahead of alpha-zero. but leela-zero was barely mentioned at all in the paper; it was only dismissed in the introduction and not compared in the benchmarks. in the stockfish discord they are saying that leela zero can already do everything in this paper including using the transformer architecture."
ad8e··on New Bézier curves for vector graphics
There are a few misunderstandings here. Rational Bézier curves are incidental in this article, and the conclusion is not that they are correct. They were just a convenient curve I used to express the main message of local control, and the article endorses looking for other curves that fit the properties.

The parameter count has not gone up; it's equal to or less than usual Bézier control handles, because I forced the parameters to take specific values.

The part that is "new" about the Béziers is the new formula that selects one specific Bézier out of all the possible choices. I think this linguistic accusation is silly; for example, if someone discovers a new rock, it would be fair to call it a "new rock" even though rocks have been discovered thousands of years ago.

These curves are also unrelated to the file format; the curves are designed to fit how the user thinks about curves rather than be computer-efficient. For the tooling point, I think you are agreeing with me while arguing; I agree that there's no reason the curve should match what is used in the final product, and some of the other curve choices I considered require a complex conversion step.

ad8e··on New Bézier curves for vector graphics
I have used this in some commercial software before (maybe Illustrator?); my experience was not positive. When you move a node, some not-so-close curves start wiggling, and you think, "I already set that part correctly, stop moving please". It behaves very poorly around rounded corners. Adding points causes the curves to shift, usually not how you want, and then you try to add more points, which causes more shifts, etc. Arc length-based interpolation might do better in this respect, as opposed to the (# of points)-based interpolation which I expect it used.

The alternative, which obeys similar principles, is the Pencil tool. This simply spams out a ton of points to match what you draw. https://news.ycombinator.com/item?id=37460009 mentions that these points can be capably reduced, which could serve your purpose.

ad8e··on New Bézier curves for vector graphics
The ideal dimensionality of the parameter space depends on the jaggedness of the curve. Derivatives are useful when they stay constant over a stretch of time; when derivatives vary too much, it becomes more efficient to use more points of lower degree. This is the same calculation in other domains of approximation: numerical integration, DiffEq, and Taylor series.

For example, to draw rough surfaces, point-to-point lines are the most efficient way, with a ton of points. For industrial geometric shapes, lines and ellipses become efficient. As the smoothness of the curve goes up, more derivatives become valid. But sometimes those higher derivatives are not useful.

This is why the parent comment likes the Pencil tool; it's optimal for high variation, because it is a local (smoothed) control of position, the zeroth derivative. The cost is some loss of smoothness, which likely doesn't matter for her domain, since her hands move smoothly enough.

I think the Pen tool would be a more competitive alternative with a better control scheme. For example, a Pen tool with local control would unify the Pencil and Pen: letting you draw jagged curves by holding your mouse down, and letting you draw straight lines and smooth curves by clicking. There would be no interruption of flow, as you can use either method freely to continue a curve. They should inherently be the same tool anyway, just with different numbers of derivatives.

ad8e··on New Bézier curves for vector graphics
It's a UI problem, not a mathematical problem. No set of curves can represent everything exactly, but they all can get close. The goal is just to make it easy to get close.

The computer can produce a near-perfect circle with Béziers for each 1/4 arc, and near-perfect circles are usually good enough. It's just inconvenient. It's also hard to manipulate the generated circle; the user might have a clear image of his head of the changed circle he wants, but pushing the control points to get there is not easy.

The mathematical "axioms" in the article are only attempting to provide a clean interface, so that the user can easily translate what is in his head to what the program creates. The circle axiom says, "The user often wants a circle, and also expects a circle, so let's produce the expected circle." There's no other mathematical purity involved.

ad8e··on New Bézier curves for vector graphics
The source code is visible with Ctrl+U, I didn't minimize anything. The g9 use is pretty neat. It definitely deserves the shout-out I gave it.

I just now uploaded a worse C++ desktop version with saving and loading: https://github.com/ad8e/local-curves This desktop version is 5 years old. I think the web version is better. This github repo is only interesting if you want to copy code from it; it's not practical as a drawing tool.

ad8e··on New Bézier curves for vector graphics
It's not as easy to visualize the tangent magnitude as you are suggesting, because the time parametrization makes the calculation fail - the curve doesn't travel forward at a constant rate. This is best seen with the second example: If the left handle is fully extended and the right handle is 0, the Bézier curve looks almost exactly the same as when the handles are reversed. Here's a picture: https://i.imgur.com/WkanN1G.png

The handle varies from 0 to full-strength, but the magnitude of the tangent vector stays constant. This means the handle doesn't decide the magnitude. Tracing the path in your head to visualize the changing tangent vectors would mean visualizing a competition between t^2, (1-t)^2t, and (1-t)^3, which I find difficult, even with some calculus knowledge.

ad8e··on Learn AutoHotKey by stealing my scripts
Remapping Capslock to Control:

Windows: https://github.com/randyrants/sharpkeys

Ubuntu Linux (don't know about other Linuxes): /usr/share/X11/xkb/symbols/pc

    key <CAPS> { [ Caps_Lock  ] };
->

    key <CAPS> { [ Control_L  ] };
These solutions avoid needing to keep a keybinding application open. The Linux solution unfortunately resets after every version upgrade.
ad8e··on Show HN: Just intonation keyboard – play music without knowing music
Hex keyboard, purple keys under thumbs. Extra set of temporary purple (blue) keys 1/2-1/7x, not ratios, applying to one copy only. Two copies of the green keys, one for each hand. Added numbers are 36, 40, 48; unsure about 45. 7, 14, 15, and 30 probably moved. The organized core should be continued as much as possible; I share the sentiment that ease of learning is important. The physical buttons should make fat-fingering convenient, because that's useful for fingering (and for playing lots of extra notes).

The musician probably wants his feet for other things like sustain pedal and effect pedals. I won't be too greedy :)

Though, one possible use of foot pedals is to select the instrument timbre. Since with this layout, you can take the role of two musicians, playing two different timbres, and you might as well have the flexibility to change one instrument out while the other is playing. All your fingers are occupied so it'd be hard to ask them to press extra buttons.

ad8e··on Show HN: Just intonation keyboard – play music without knowing music
Your feature is done, try it out.
ad8e··on Show HN: Just intonation keyboard – play music without knowing music
It's possible to generate 12 ET too, by rounding all the keys and harmony changes. Just as 12 ET is a good approximation to Just Intonation, Just Intonation is also a good approximation to 12 ET. The tones lose some accuracy but gain compatibility with MIDI interfaces.

However, it would be hard for me to implement this feature, since I have no midi devices, no midi experience, and my browser (Firefox) also doesn't support WebMIDI.

I'm thinking about implementing record-and-replay, since the playback and storage-format are already done, but midi will likely be deprioritized unless there is significant interest.

ad8e··on Show HN: Just intonation keyboard – play music without knowing music
These are great ideas, and I will implement them.

In the original design, temporary harmony changes (hold-and-release) was the feature of the thumb keys, but there are no thumb keys here, huh.

It's necessary to have stateful harmonic changes, to be able to transition more than a little at a time. But I will add your option too, since it's also useful. I'll need to think about the interface a little bit, since I would either have to add ` or Shift to the keyboard, which will widen it a bit.

When you press these new temporary keys (after they're done), I'll make them change the green numbers. That is hard to do with the permanent purple keys, since they need to keep a base state.

ad8e··on Show HN: Just intonation keyboard – play music without knowing music
State tracking is up. Fundamental = product of (prime)^(number of squares in the row), where the blue squares are 2, green 3, yellow 5, red 7. Let me know if this interface can be improved, such as by bolder colors or better explanations.

I didn't find a good way to implement absolute frequency without the rest of the visualization too, since it has to store and show "what were the last notes I just played", so the user can compare their frequencies to the current note options. So I don't have an idea for an easy-to-implement design here.

ad8e··on Show HN: Just intonation keyboard – play music without knowing music
I'll put it here, then: https://github.com/ad8e/harmonic-keyboard

(nothing there now!)

ad8e··on Show HN: Just intonation keyboard – play music without knowing music
There's a desktop version which I unfortunately don't have the time to get in release state, but I'll release the source code for everything eventually (maybe months later).
ad8e··on Show HN: Just intonation keyboard – play music without knowing music
Showing the internal state is a pretty good idea. I'll see if I can port over my visualization from my desktop version; it'll show the absolute pitches of the notes on a real number line, and how many powers there are of each prime. It won't be soon though.
ad8e··on Show HN: Just intonation keyboard – play music without knowing music
Yes, there's a secret music generation project if you can find it. If you are asking this without knowing about that secret project, that's a very deep insight.
ad8e··on Show HN: Just intonation keyboard – play music without knowing music
Thanks to you asking why it's right to left instead of left to right, I have the opportunity to talk about some interesting design decisions. I agree there should be an organized pattern. For example, 1-30 lexographically. So I'll explain the hidden logic and pattern.

The three necessary primes to represent on the organized lattice are 2, 3, and 5. Given a key like 16, each of these primes should be represented in its adjacent buttons, hopefully in an axis-like manner, because these are the consonant notes to it. Left of 16 is 5/4, right is 3/4, and up-down is 2 and 1/2. But why this way?

Consonant pitches stay within a range - so large leaps in pitch are the least common. That means next to any number, the adjacent keys must have close by numbers. That's why the three primes 2, 3, 5, are converted to 2, 3/4, 5/4 - because these are the closest numbers to 1, after multiplying by a power of 2.

Your hand has a harder time reaching vertically than horizontally. 2 is the largest of these three numbers, which is why 2x is on one of the 4 vertical directions, and 3/4 and 5/4 are on the horizontal directions. Furthermore, it means that 2x must be on the 5/4 side, not the 3/4 side - because this keeps pitch distances the smallest.

There's only one remaining decision - why right to left? Your hand has an easier time turning inward than outward. And, whichever way it turns, the horizontal notes should have pitches as close as possible. Thus, 5/4 must be to the left direction.

Luckily, divisors don't exist, so the fact that the 3/4 axis and 5/4 axis are on the same line - rather than 3/4 turning to 4/3 on the opposite side - is perfectly fine.

So thanks to the above, the keyboard is forced to be this way, and every note is in its logical and rightful place, with no subjective choices. Except not, because there's not enough space. And because 7 and 15 can't be on the lattice, so they are just placed wherever there's room. 2 should really be below 1, and 3 should be where 2 is. 30 should be 40, etc. I tried to maintain the structure as much as possible but had to make things fit.

ad8e··on Show HN: Just intonation keyboard – play music without knowing music
If you know your chord's format in just intonation, there's a (not-so-)secret converter. Type in "play_on_keyboard('4-5-6 15/2 12 10 20/3')" in the F12 console to produce fingering and play it on the keyboard. Maybe I should make this clearer by adding a text box.

EDIT: thanks to your feedback, I added a textbox below the keyboard. It will show how to play things if you can write the ratios of the notes. This may be a helpful map for turning 12 ET into just intonation:

C 16/15 D9/8 6/5 E5/4 F4/3 7/5 G3/2 8/5 A5/3 16/9 B15/8 2

ad8e··on Show HN: Just intonation keyboard – play music without knowing music
I'm not sure we're looking at the same thing, but I fixed an issue with the just intonation transcription. Now, the largest non-transient deviation from 440 Hz scale is 0.14 semitones, caused by Debussy modulating by a third (5/4).
ad8e··on Show HN: Just intonation keyboard – play music without knowing music
So, there are two things currently going on with the Debussy example.

The first is, yes, some of the notes from Debussy are actually poorly playable on the piano. One is this: https://i.imgur.com/K0Wuu3Q.png. This is a visualization I built (and which can't be ported to web easily, so unfortunately it's just something I have for now). It's like a scrolling player piano with rising notes, and the numbers next to the bars are what the numerators are. Note there are two 7s in the middle, and pianos are not good at 7s. I've verified these numbers are correct manually, so it's supposed to sound like that and the piano has an inaccurate approximation. This corresponds to this location in the score: https://i.imgur.com/24XY8vR.png

The second is, I suspect there is a mistake near the end. This visualization overlaps the original with the twelve-tone version: https://i.imgur.com/tS7WzRg.png. Note how some of the bars are separated from each other. I'm currently in the process of checking these notes. My original 12ET -> Just Intonation conversion was automatic and I fixed up all the errors I could find, but I could have missed one. EDIT: yes, there was. I fixed it now.

The third doesn't happen in this example, but sometimes composers want to deliberately round, such as in the Circle of Fifths. That would create unpleasant commas. I'm kind of lucky that it didn't happen in the demo I chose. The Circle of Fifths is not actually an issue; first, you can't keep old notes persistent across the whole circle; they will interfere. And second, thanks to Diana Deutsch's experiments on pitch memory, we know that if there are more than 16 notes between the old and new note, you shouldn't be able to discern the comma. However, although the Circle is not a big deal, other rounding intervals can become an issue, like 63/64, where the composer would like the rounding to occur somewhere other than the exact pitch repeat. Listeners are effective at detecting when an exact pitch repeat is slightly inexact, while they have a harder time discerning slightly-off harmonies.

ad8e··on Show HN: Just intonation keyboard – play music without knowing music
Unfortunately, I won't have time to expand on this project unless someone hires me to work on it. For now, it's just to educate people and let them copy it.
ad8e··on Generating Music Tracks with Unified Representation and Diffusion Framework
Contrast this parent comment's opinion, that it is "shameful to mention Bach's name" with the Bach example, with this comment https://news.ycombinator.com/item?id=36043384, pointing out that the Bach example is plagiarized from Bach: https://www.youtube.com/watch?v=Fpqd1gCzLN4&t=178s
ad8e··on Google banned me – open sourcing all my apps
"As someone else pointed out in a DM my implementation was pretty consistent with the official android developer docs found here: https://developers.google.com/admob/android/banner/anchored-...

"It's the exact same implementation."

So although Google banned him for breaking the rules on banner placement, he was following Google's own instructions on where to place the banner.

Source: https://old.reddit.com/r/androiddev/comments/13lf6jb/open_so...

Page 1 of 3Next →