HNHacker News
TopNewBestAskShowJobs

holy_city

970 karma · joined February 19, 2019

Audio software/DSP engineer in Los Angeles
submissionscomments
holy_city··on California Approves Statewide Rent Control
When I was interviewing for jobs in the Bay area I noticed entry level salaries (even at smaller shops) were in the range of 100-120k and rent was like 35-40% of your salary after taxes. Certainly higher than the recommended 30% but it's not that different from somewhere like LA or NYC, even Chicago and Miami aren't much cheaper.

Are my numbers just totally off?

holy_city··on Why is Rust slightly slower than C?
>I wonder if some of the bounds checks could be eliminated by using iterators instead of loops

It can and often is. Don't use [] to index into data if you can afford not to. Anecdotally, rustc is also much better at generating SIMD-friendly code with iterators than idiomatic C/C++, but that depends largely on what you're doing.

holy_city··on An Interactive Introduction to Fourier Transforms
Two texts I keep on my desk that are a bit more rigorous than most:

- Oppenheim & Schafer Discrete Time Signal Processing (the Bible of DSP)

- Manolakis & Ingle, Applied Digital Signal Processing (good discussion of orthogonal transforms).

A lot of what I know about transform analysis comes from self study of linear algebra/vector spaces with some reading here and there in commonly cited papers. Might want to pick up a text on that subject, it's the same idea but more rigor than an engineer would use.

There's also a book I haven't worked all the way through yet and is dated, heavily based in EE concepts (non negligible amount of circuit theory) and extremely rigorous called Theory of Linear Physical Systems by Ernst Guilleman. I picked it up last week actually and quite like it.

It has a lot of information and approaches with Fourier/Laplace methods, which is interesting since it predates the FFT and has so much information on concepts that engineers 50 years ago would need to build their intuition with instead of through tooling. I picked it up for the network theory/dynamical systems angle (which relates to some stuff I'm working on) but the rigor is definitely higher than what you'd see in those more digestible books.

holy_city··on An Interactive Introduction to Fourier Transforms
There are three really important things about the Fourier transform in my mind. Two are math and one is engineering.

- the Fourier Transform preserves energy (Parceval's theorem, the norm of the transformed function is the same as the norm of the original)

- there exists an inverse transform to get the original function back

- once you grasp that magnitude/phase describe patterns in the function you can gain powerful intuition about the transform and how to use it as an analytical and design tool.

Those first two properties tell us that the transform preserves information, basically it's another way of looking at the same thing to gain more insight without loss. The third is something not harped on enough in engineering courses, and failure to teach it in my mind is one reason so many people thing controls/signal processing is black magic.

A big followup question here is, are there other transforms for which energy is preserved, and there exists an inverse? The answer is yes, there are infinitely many. The third property is more useful, which begs the question, which of those other transforms are useful?

An example of this is a cousin of the Fourier Transform called the Discrete Cosine Transform which is critical in compression, classification, and machine learning (especially contemporary speech recognition). It's not as straightforward as Fourier, since the result isn't as obvious as breaking down the energy into patterns, but rather what it does is break the energy into correlated parts, in other words it preserves the energy while representing it in decorrelated bins. The strongest of those bins is the most important part, which is why compression technology works by taking the DCT and tossing out low magnitude components (it preserves the most important energy) while also showing how it can work for machine learning, where it decomposes the input information into an equivalent but decorrelated representation where inputs aren't shared for different parts of something like a neural net.

There are other equally cool orthogonal transforms, I like the Hilbert transform myself because it can extract really useful info like signal envelopes and be used to make wacky noises, like a frequency shifter.

holy_city··on iPhone 11 Pro and iPhone 11 Pro Max
Which always sounded like "iPhone tennis" to me
holy_city··on Using Spotify data to predict what songs will be hits
meh? Charts have always been poor representations of musical quality/popularity. I use spotify because the algorithms suggest me good music based on my taste, and despite the weird polarity of it they always find new music that interests me.

I have no problem with Spotify's algorithms. They do a very good job with a very difficult problem.

holy_city··on Using Spotify data to predict what songs will be hits
I'll take algorithms over payola. At least they suggest things to me that I'd like to hear.
holy_city··on Vinyl set to outsell CDs for first time since 1986
People like it.
holy_city··on APIs are the next big SaaS wave
Please don't turn "API" into the next "blockchain", where I have to fend off VCs asking me how I incorporate APIs into my product or if I'm currently developing any APIs. That would be like me asking them about spreadsheets.
holy_city··on Apple has copied some of the most popular apps in the App Store
>applies an ambisonic convoluted reverberation impulse response to an audio stream

Yikes. If you're doing naive convolution that's O(n^2) in real time.

Try reading up on partitioned convolution techniques via FFT. The current state of the art in FFTs is using FFTW (extremely fast, GPL licensed but a bit tricky to get a commercial license if that is unacceptable) or IPP on x86 (closed source, but works and is fast).

I'd also try looking at Facebook's Two Big Ears code for ambisonic rendering via HRTFs:

https://github.com/facebookincubator/Audio360

holy_city··on Apple has copied some of the most popular apps in the App Store
I was a huge fan of your app! We used to play around with it a bit in high school.

To be fair to Apple here (and this was way before my time, so I'm probably mixing stuff up) - Garageband dates to 2004 with the eMagic acquisition and was (iirc) built on top of the Logic Pro audio engine. And back then, you still had to deal with the raw CoreAudio API (if anyone wants an adventure, try finding the documentation for it... you'll have to generate it yourself!) on MacOS. I recently had to dig through the old CoreAudio mailing list and read a book [1] on the API for low latency stuff, and I'm guessing that in terms of their engine there wasn't much needing change (at least architecturally) to port to iOS. I seem to recall the biggest difference between desktop/mobile versions was the featureset and UI, I think the problem you mention was present even in Logic. You had to get hacky with ES24's key/velocity maps to do what you mention.

From working in the pro audio world for awhile, I've found that other folks in the space just love to talk shop about how they do things. Audio devs are nerds like that. Doesn't always mean people are stealing from others.

[1] https://www.amazon.com/Learning-Core-Audio-Hands-Programming...

holy_city··on Let the callers of your API control allocations
> If you meant that the function could possibly allocate fields of `result`, the API should always have a `free_result()`.

Yea that's what I meant. But this sort of gets into the weirdness of docs, if there is a `free_result` somewhere then authors should make sure to put a "see also free_result()" in their doc comments, especially when you don't have the niceties of constructors/destructors.

holy_city··on Let the callers of your API control allocations
I read the title as "don't force callers to allocate" not "don't do allocations behind the call" which is what the post is about. Totally agree on that point, but with nuance. Any call that allocates (or blocks) should be obvious in name and API.

For example a lot of C libs will have an API along these lines:

    typedef void* my_api_t;
    int create_api (my_api_t* api); // almost certainly allocates

    typedef struct {
        // yada yada yada
    } api_result_t;

    int get_result(my_api_t api, api_result_t* result); // does this allocate? I have no idea

I think every function that might block/allocate should be stupid obvious in the documentation and function naming convention, especially if you're distributing closed source libs with opaque types.
holy_city··on DRM Broke Its Promise
I have personally seen both sides of the this and have worked on DRM solutions. The merits and efficacy of DRM highly depends on what you're locking down, how you lock it down, and who is being locked out.

For example. Hardware DRM (TPM/dongles/etc) is near impossible to crack, or worthless if you did crack it. Try and find a contemporary version of Steinberg/Avid software that has been cracked - to my knowledge it doesn't exist, at least not in a usable form.

I've also heard of some content where DRM increased revenue by a moderate integer factor.

On the other hand, I'm also aware of content in the same market that saw significantly increased revenue due to piracy, and other content where legitimate users pirated because it was easier to access than the legitimate content!

It's all a balancing act over how much your users can tolerate and how much benefit you see. There's no one solution for all digital content, and sometimes none is the best business decision. I will say that people deciding to use DRM are not stupid and have better numbers than the author of this article. The big guys know exactly how much money they would lose by abandoning DRM. In a smaller shop it's more of a guessing game, but that's just because we have less information and forecasting ability.

holy_city··on Human speech may have a universal transmission rate: 39 bits per second
I'm not sure what the review process is for the source, but the paper [1] is pretty interesting. Lots of cool findings/references in there like:

- There is a measurable difference in information density based on the sex of the speaker

- Syllables were chosen as the base unit of measurement because morphemes (words) are too big/linguistically varied and phonemes (sound equivalent of letters) are too small and likely to be dropped in regular speech. I'd like to see the same analysis using phonemes to see how it changes, especially between dialects.

[1] https://advances.sciencemag.org/content/5/9/eaaw2594

holy_city··on A Gambler Who Cracked the Horse-Racing Code (2018)
I'm not saying a drug-war like approach is the best method here, just that some degree of prohibition that prevents industrialized gambling is better than none.

For example, even in a fair game the house will eventually take a gambler's bankroll provided the house's bankroll is practically infinite [1]. That's a thought experiment, but it works in practice when you are dealing with gambling addicts that won't walk away from the table.

Secondly, those gambling addicts, or "whales" as they call them represent something like 0.15% of players bring in 50% of the revenue [2].

And lastly, I would have agreed with you a few months ago, before I heard this story [3] on NPR about how Big Fish was targeting people and using predatory practices to keep them on the game. It reminded me of a twisted version of AOL's customer retention practices that they were sued for a decade ago.

There's also the whole notion of casinos/gambling disproportionately impacting low income communities and how you can't start a gambling business without tons of capital, so it serves as an efficient funnel of money from the poor to the rich. And it's really naive to think that someone going broke affects that person alone. God help them if they have a family.

[1] https://en.wikipedia.org/wiki/Gambler%27s_ruin

[2] https://www.forbes.com/sites/insertcoin/2014/03/01/why-its-s...

[3] https://www.pbs.org/newshour/show/how-social-casinos-leverag...

holy_city··on USB4 Specification
The Serial Time Link Protocol (STLP) looks really cool to me - I've thought for awhile that the next-gen in audio gear would be more modular front ends that sit on top consumer protocols, which is where things are moving in broadcast/commercial audio installations today. I can imagine a whole host of consumer and professional devices that solve real problems at lower costs than we can today. Really interesting stuff.

edit: one weirdness, STLP has a recommended packet rate of 62.5kHz (actual quote "A Router shall periodically transmit a Serial Time Link Packet on TMU_CLK_OUT. The period between transmissions is implementation specific, but it is recommended that a Router transmit a Serial Time Link Packet every 16 μs"). If the only application domain (besides compliance testing) is audio, how did they arrive at that recommended rate, where it is rather different from standard sample rates (44.1k/88.2k and multiples of 8kHz)? I'm not sure how that affects clock synchronization.

holy_city··on A Gambler Who Cracked the Horse-Racing Code (2018)
>there hasn’t been a lot of VC action in the space, either on the platform side or on the content/services side

Do "social" casinos count? Zynga is all over that and went public in 2011, Big Fish was acquired by Aristocrat in 2017, and I'm sure there are others.

If you throw ethics to the wind, there's no reason to make a real gambling app/service when you can give gamblers the same dopamine feedback loop without ever needing to pay them real money.

Personally I think there's only so much time left for gambling (in lootboxes, social casinos, or even sports betting) before it gets shutdown by regulation. There's very little pragmatic argument for allowing it to exist in the first place, other than classic prohibition arguments like "personal freedom" and "black markets still exist." Valid, but I think the harm of industrialized gambling through digital platforms outweighs the benefit of taxing it and allowing a black market to exist, but that's just me.

holy_city··on NanoLog – a nanosecond scale logging system for C++
I've dealt with this problem too, mostly in trying to log/debug real-time media processing where a log trace equivalent would be long chunks of floating point data at multiple trace points in the data flow.

I came to the same conclusion. Raw bandwidth to your logging endpoint is meaningless when you start dealing with big chunks of information, which is common sense I guess. You need a fast way to digest it into whatever format works for the person reading the log later, and it's tough to make it abstract since how data is interpretted can be quite varied even in the same application.

holy_city··on Rust is the future, C is the new Assembly: Josh Triplett (Intel)
You can integrate with COM already through winapi [1] (and author your own COM objects too with com-impl[2]). GUI stuff is still a long way from being useful, but a huge chunk of code has nothing to do with UIs. And Rust can integrate with anything that can call C.

w.r.t debugging, I haven't had much trouble mixing with C++ but I haven't tried to do anything through C#.

[1] https://github.com/retep998/winapi-rs

[2] https://github.com/Connicpu/com-impl

holy_city··on Tufts Ph.D. ‘Punished’ for Reporting Adviser’s Fabricated Research: Lawsuit
idk about the rest of the school, but the Fletcher School of International Law and Diplomacy alumni list is a who's-who of global politics and international trade. [1]

https://en.wikipedia.org/wiki/List_of_Fletcher_School_of_Law...

holy_city··on Rust is the future, C is the new Assembly: Josh Triplett (Intel)
I think Rust adoption has pointed out that the idea of safe C/C++ developers are a myth. It's an appeal to authority to be sure, but if Intel and Microsoft (and others, but those two have talked about it) are finding that their security-conscious C/C++ developers are still putting memory safety bugs into production - there's an argument that the idea of "competent" use of C/C++ for safety critical is possible (in general) needs to be brought into question.

On a personal note, learning Rust has made me a much better C++ developer. I'm more conscious of various degrees of aliasing and multiple ownership, to the point where much of the C++ I've written of late is inspired by the borrow checker's conventions. And since what I do is usually executed concurrently, I've seen a concrete decrease in bug count and severity without cost in performance. Which means the time investment in learning Rust has paid off, in my opinion.

holy_city··on Software Architecture Guide
I strongly disagree.

Engineering is the study and practice of problem analysis and design synthesis. Whether that means using abstractions of the physical world or how data is structured and processed is unimportant.

Any approach to the understanding of problems and how to solve them is engineering. Sometimes it's very structured, sometimes it deals with the physical world - and other times it's incredibly abstract and divorced from the real world. It's all engineering.

holy_city··on Amazon has proven unable or unwilling to effectively police third-party sellers
> I don't think many users will scroll through more than a page or two of options.

I don't use Amazon for product discovery so I don't scroll through it at all.

holy_city··on Apple's petition against RED
There's a weird bar for confidence, to be frank. Most often I've found that people disregard studies with people who have "golden ears" because they're not average ears, or that studies find that only those with "golden ears" can find a difference, and the audience tends to feel they're in that range.

For example, there was a study a few years ago at McGill with trained listeners on the effects of bitrate with mp3 and m4a audio encoding that found that only a slim number of mastering engineers preferred lossless over lossy encoded audio (interestingly enough, some professional mixers and musicians found lossy encodings preferable to lossless even for jazz and classical music). But trying to convince audiophiles that those codecs are comparable to lossless is a losing battle.

holy_city··on Help Advance the World with Advanced Linear Algebra
Something not touched on in the video or description but I think is worthwhile.

The greatest failing in my math education is that it didn't give me the "keys to the kingdom" in other words, it didn't teach me how to conceptualize problems and really dig into literature to further my understanding on topics as they come up.

Contrast that with my signal processing courses, which were very much focused on concepts, conventions, notation, and best practice to provide a ground work for future study.

And working in the signal processing field, it was easy for me to dig into literature as I researched problems up until my math skills failed and I had to teach myself a lot of what my grades showed I had learned in college. Linear algebra in particular.

So when I see something like a course that will teach me about orthagonality, linear systems, SVD and eigenvalues I want to back it. But only if it's the kind of content that will tell me what those things are and how to read about them and understand them, not more rote memorization of how to work a problem set.

Just my two cents.

holy_city··on Apple's petition against RED
Having worked a bit in the field (on the audio side of film) "perceptually lossless" means that in a double blind study, an audience would not be able to discern between the lossless and the lossy encoded versions. The only way to verify is by testing with real people, and due to the nature of the business, it's easier to do it with professionals who have a higher bar for perception.

There are a lot of reasons to prefer lossless over lossy, but there is always the "good enough" point with storage media. Film is not lossless, so it doesn't matter if the digital storage is. What matters is if the lossiness in encoding is good enough to work with at the same level as film.

holy_city··on Are Men Singing Higher in Pop Music?
Reminds me of pitch inflation [1]. Time is a flat circle in the arts it seems.

[1] https://music.stackexchange.com/questions/10388/what-is-the-...

holy_city··on Thoughts on Rust bloat
You can kind of hack a shared cache using cargo workspaces (put all your rust projects in one directory as part of a workspace) but that is far from ideal. All your projects will share a target directory and Cargo.lock.

I agree though. I don't mind binary sizes in the single megabytes for a release build, and I don't mind clean/rebuild build times that are a few dozen seconds. I do mind the 500MB of build artifacts in a single target directory, multiplied by all the projects I have that share the same version of serde/winapi/syn/quote/insert-common-dependency-here.

holy_city··on Hundreds of extreme self-citing scientists revealed in new database
More like Github stars
← PreviousPage 3 of 9Next →