Are my numbers just totally off?
970 karma · joined February 19, 2019
Are my numbers just totally off?
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.
- 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.
- 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.
I have no problem with Spotify's algorithms. They do a very good job with a very difficult problem.
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:
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...
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.
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.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.
- 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.
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...
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.
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.
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.
w.r.t debugging, I haven't had much trouble mixing with C++ but I haven't tried to do anything through C#.
https://en.wikipedia.org/wiki/List_of_Fletcher_School_of_Law...
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.
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.
I don't use Amazon for product discovery so I don't scroll through it at all.
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.
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.
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.
[1] https://music.stackexchange.com/questions/10388/what-is-the-...
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.