HNHacker News
TopNewBestAskShowJobs

ssfrr

463 karma · joined February 3, 2014

spencer@heavisideresearch.com https://heavisideresearch.com
submissionscomments
ssfrr··on C++ patterns for low-latency applications including high-frequency trading
I'm curious how HFT relates to pro audio programming. The timescale is close to gaming (usually <10ms for desktop PC work), but you really care about the tail of the distribution. All the audio processing happens in a high-priority callback that's called for every audio frame and needs complete within the time budget, so you typically never allocate, do IO, or use any blocking synchronization primitives [1].

It's not hard real-time like you're going to crash your car, but if you miss your deadline it causes an unacceptable and audible glitch.

I've always been a bit surprised that Jane Street uses OCaml. I know they've put a lot of attention into the GC, but it still seems fundamentally indeterminate in a way that would make most audio devs nervous.

[1]: http://www.rossbencina.com/code/real-time-audio-programming-...

ssfrr··on Exorcising Us of the Primer
I loved this insight on the difficulty (and often futility) of trying to gamify learning:

“only after they’d satisfied the primary constraint of making something fun, or beautiful, or whatever, the designers figured out how to ensure people would learn what they need as they play. Most mechanisms are not fun. Good games come from a demanding selection process which works the other way around: first, find the fun. There’s no reason at all to believe that for any arbitrary abstract topic, one can always ‘find the fun’ which implicitly teaches it.”

ssfrr··on Ask HN: Are you still using your Vision Pro?
30fps is 33ms per frame. I'd expect that to be fine for most free-space gestures (for musical instruments you generally want <10ms, but that's most noticeable with discrete impulsive events like hitting a drum pad, and even then is pretty manageable).

Is the frame rate really the limiting factor here, or something algorithmic in the tracking (like smoothing out noise)?

ssfrr··on Long distance sound localization with the Raspberry Pi
I did similar long baseline acoustic localization for my dissertation a few years ago. We had about 15 microphones deployed in a wetland for bioacoustic monitoring.

https://resenv.media.mit.edu/pubs/theses/Resynthesizing_Volu...

Rather than manually finding the timestamps in the individual audio files you can do pretty well with using cross-correlation to find the relative delays between the mic signals. Any particular delay between a pair of microphones corresponds to a hyperbola through the mic array. If you visualize the hyperbola from all the pairs of microphones, the correct location pops up as the intersection of them. The cross-correlation peak can get pretty smeared out though, because each microphone is hearing a different version of the source signal.

ssfrr··on ICQ will stop working from June 26
just googling didn't come up with anything for me. were there specific sites you found info on?
ssfrr··on Why we shift testing left: A software dev cycle that doesn’t scale
This is the first time I’ve heard the term “shifting left”. Maybe I missed it, but is this the same as TDD?
ssfrr··on ICQ will stop working from June 26
1303789

Serious question - why do so many people remember our ICQ numbers? I don’t remember what user-facing function it served. Was that actually the identifier we shared with people to connect?

I suppose it also came at a time for a lot of us where things seemed to wedge into our brains more easily.

ssfrr··on Cindy Lee might be the future of music
Oh man, soulseek brings back serious nostalgia for me. Is it still pretty active?
ssfrr··on Tacit programming
the languages listed (Pure Data, Max/MSP, Reaktor) are all visual languages where you connect up boxes with wires, similar to labview. I usually associate the term "Dataflow language" to refer to these types of languages, but I'm not actually sure if there are also text-based dataflow languages. Maybe Faust (which is also audio DSP focused)
ssfrr··on Valve Makes All Steam Audio SDK Source Code Available Under Apache 2.0 License
What you probably want is to place a virtual listener/receiver where the NPC is, so the system would use the same rendering that it does for the player. Then you put an envelope detector on the signal and you have an approximation of how much sound is reaching that NPC.

You could also render the player sound separately from environmental sounds. So the NPC only hears the player if their sound exceeds the environmental noise.

You could get real fancy and do some directional processing on the NPC so they’ll go in the apparent direction.

It’s probably overkill though. You could probably do a much cheaper approximation and it would feel about the same to the player. It would be fun to test it out and see though!

ssfrr··on A seafood firm wants to farm octopus. Activists say they're too smart for that
Sounds like Stephen baxter’s Manifold: Time. She’s a squid not an octopus, but same idea. Great book!
ssfrr··on Printed robots with bones, ligaments, and tendons
The status quo they describe is a printing process where material is deposited and then UV cured, then there’s some kind of scraping process. That seems like a hybrid of FDM and lithographic printing from a vat of goo a la FormLabs.

Is that a common process?

ssfrr··on Toolship: A more secure workstation
I think if I were going to the trouble of dockerizing and isolating all my tools, I wouldn’t want to rely on someone else’s registry of dockerfiles.

This reminds me a lot of the cycle of sandboxing:

https://xkcd.com/2044/

ssfrr··on Attested Audio with ZKP
Yeah, this is my understanding also. I don't understand how this is better than the publisher signing the content with their own key though, rather than relying on a special microphone.

I wish the article was more clear on what threat model they're trying to address.

ssfrr··on Attested Audio with ZKP
> In our setting, we can compute a function that computes the hashes of the inputs and outputs the edited audio from the inputs. By revealing the hashes, we can be assured that the inputs match the recorded audio!

I don't understand how this works, or what exactly is being proven here. For instance, you could silence the given inputs and inject some other unrelated audio, so the fact that your output hash incorporates the input hashes doesn't seem very meaningful.

I figure I must be missing something here.

ssfrr··on Kchat: Persistent group chat in <50 lines using kdb+/k/q web sockets, JavaScript
k: super terse language inspired by APL and lisp

q: slightly less-terse language written in k, with similar semantics. The vendor (kx) supports q, not k

kdb+: column-oriented database bundled with q

ssfrr··on Kchat: Persistent group chat in <50 lines using kdb+/k/q web sockets, JavaScript
Your comment makes it sound like they’re using some task-specific library, but this looks like pretty generic standard library functions to me.
ssfrr··on APL deserves its renaissance too (2018)
Yeah, the fact that the same symbol is overloaded with two meanings for the one-arg and two-arg (infix) cases adds some overhead to reading APL code. The precedence rules are very simple and uniform in isolation, but personally I find that applying them to (mentally) parse a nontrivial line of code is one of the hardest parts of getting started with APL.
ssfrr··on APL deserves its renaissance too (2018)
When used with 2 arguments, e.g. `a ≢ b`, it indeed is called "not match", i.e. are `a` and `b` the same. When used with 1 argument, `≢ a` it will give you the number of elements.
ssfrr··on APL deserves its renaissance too (2018)
The use of ASCII was a concession to the state of technology at the time. I don't think he actually preferred the ASCII digraphs to APL glyphs.
ssfrr··on APL deserves its renaissance too (2018)
> No one time investment is needed if you want to learn J.

I don't understand the "{J,K,Q} don't require you to learn new symbols" argument. You're learning a mapping between symbols and functionality, not literally learning to recognize the lines and curves that make up the glyph.

"reverse" is `|.` in J and `⌽` in APL. It doesn't seem obvious that the J mapping is easier just because I've seen those characters in other contexts.

It does take a little work to learn where they live on the keyboard, but that doesn't seem like a huge barrier to overcome. The live editor on the BQN site shows a list of glyphs and hovering shows you where they are on the keyboard. You just prefix with `\` to type them, so you don't even need any custom keymap.

ssfrr··on Using grape harvest dates to estimate summer temperature over 650 years
Say you have some variable you are tracking, which is due to some underlying phenomenon, with some noise. In this case it's the average summer temperature (so each summer gives 1 datapoint).

The simplest model is that the underlying phenomenon has some constant value, and the variations in your observations are all just random noise. You can estimate the true value as just the average of all the data. Computing the variance (the average squared distance from the true value) gives you a sense of how much noise there is.

Now lets say that we make our model a little more complicated and allow that the temperature changes year-to-year. In fact, let's say that we know the true value for each year. Imagine overlaying this "true" plot on top of the noisy observations. We can re-compute the variance, but rather than looking at the error relative to the mean, we're looking at the error relative to this true value. This variance is likely to be lower than the first one we calculated, because some of that variance wasn't actually noise, it was changes in the true value. We've "explained" some of the variance.

Now, rather than having access to the true values, we have some other variable that we think may be a good proxy for the temperature. In this case it's the grape harvest date. The first step is to find some mapping of the proxy variable onto the one that we're interested in (the article doesn't explain what mapping they're using). We assume that explaining more variance means that the (mapped) proxy variable is higher-quality.

Note that the mapping function is essentially learned from the data. In a simple case it might be just finding a scale factor and offset using a linear regression, but it could be more complicated. You need to be a little bit careful that you're not overfitting. It's a good idea to use some of the data to fit the proxy variable, and then compute the explained variance on other data (train/test split).

ssfrr··on Optical microphone can separate multiple instruments from afar
LDVs are the gold standard for noncontact vibration measurement and are widely used in acoustics. The main problem is that they’re pretty expensive (I think on the order of a few 10s of k$)
ssfrr··on Colouring Noise – Generating Noise with a Specific Power Spectral Density
The author identified the cause of the integration-to-zero behavior - they've set the DC (0Hz) component to 0, so the signal must sum to 0.

Any length-N signal can be thought of as one period of an N-periodic signal, so the FFT will be exact. It's not the first and last samples that need to be identical, it's the 1st sample needs to match the (N+1)th sample (1-indexed), which comes right after the last sample of the original finite signal.

For example if you have the length-8 signal 12345678, the FFT is valid - you can think of it as a slice of the signal ...123456781234567812345678...

ssfrr··on The Hidden Worlds of the Klein Tools TI250 Thermal Imager
> The only real major inconvenience using it is the fact that it constantly pauses to calibrate itself to the temperature range it is being exposed to, a process that freezes the screen and UI for well over a second.

Does anyone know what these thermal cameras are doing when they calibrate? Normally I think of calibration as using some known reference to match your sensor data to, but it’s not clear to me what the reference would be in this case.

ssfrr··on K – A simple, fast vector programming language
How do you think about the k/q split? Do you ever drop into k or use q exclusively?

Is q mostly just longer aliases for k verbs or do the semantics differ?

ssfrr··on New blog about my journey to develop a Common Lisp 3D software
Really enjoying the interleaved CL and flashbacks to Media Lab history
ssfrr··on Breaking rainbow takes a weekend on a laptop
Do you have a good reference on the relationship between quantum computers and Fourier transforms? I’m a DSP researcher by day and this is the first time I’ve heard about this, so my interest is piqued.
ssfrr··on Amazon more than doubles max base pay to $350k
Yeah, I wonder if that's part of the confusion. "Signing Bonus" is a weird name for what amounts to a large salary boost for the first 2 years. I think a lot of people think of a signing bonus as a lump sum you get when you are hired.
ssfrr··on Amazon more than doubles max base pay to $350k
The "waiting for my vesting" mindset only makes sense to me if your TC is back-loaded, but I think Amazon offers are usually pretty consistent TC over the first 4 years, it's just that the balance shifts from bonus to stock.

So lets' say I start in January with 5% vesting after 1year, 15% after 2 years, and 20% every 6mo for the next 2 years. The signing bonus starts large and then shrinks proportionally to keep the TC constant. In my mind the only change is that my salary gets more "lumpy" at the end because I'm getting paid every 6mo instead of every 2wks.

So right before a vest I'm thinking "it's worth it to stay for 1 more week for 20% of my stock" but right after a vest the question is "is it worth it to stay 6months for 20% of my stock and 6 months of base pay?". That latter question seems the same whether my TC is cash or stock.

← PreviousPage 2 of 5Next →