9,878 karma · joined Dec 7, 2012 (14y ago) · 2,939 submissions
comment 1y ago · link · parent
I don't have experience with cocaine, but as a Bavarian I made plenty of experience with alcohol. I've never been addicted, but I had my fair share of Oktoberfest and beer garden visits. And yet you don't see my optimizing my life around it. In fact, nowadays I have a beer every few months if even, simply because most of my hobbies don't work well with alcohol.
As for cocaine: As I said, no experience, but it appears to me that even very wealthy people who probably consume it also still do other things in life, despite not having to for income etc.
comment 1y ago · link · parent
If you have depression or another condition affecting your affect and your emotions, sure. Otherwise it's pretty obvious to anyone that concepts on orders of magnitude higher levels than hormones being correlated with happiness, or if you prefer, those concepts having a significant effect on the overall action of those hormones.
comment 1y ago · link · parent
And the basilar membrane seems like a pretty un-discrete (in time, not in frequency) process to me. But I'm not 100% sure.
Sure, if you go small enough, you end up with discrete structures sooner or later (molecules, atoms, quantum if you go far down enough and everything breaks apart anyway), but without knowing anything, the sensitivity of this whole process still seems better modeled as continuous rather than discrete, the scale at which that happens seems just too small to me.
comment 1y ago · link · parent
But the title instead makes it sound (pun unintended) that what the ear does is not about frequency decomposition at all.
comment 1y ago · link · parent
On one corner of the square, you have Fourier Transforms, which are essentially contiguous and infinite. On the opposite corner, you have the DFT, which is both finite (or periodic) and discrete. Hearing is more akin to a Fourier Series, which is finite/periodic but contiguous. That's probably not what the article aims at addressing, though.
But then wavelet transforms are different from Fourier Series again, because you have shifted and stretched shapes (some of them quite weird) instead of sinusoids.
But yeah, colloquially, I agree, the ear is indeed doing very Fourier-y things.
comment 1y ago · link · parent
First, I think when you say FFT, you mean DFT. A Fourier transform is both non-discrete and infinite in time. A DTFT (discrete time fourier transform) is discrete, i.e. using samples, but infinite. A DFT (discrete fourier transform) is both finite (analyzed data has a start and an end) and discrete. An FFT is effectively an implementation of a DFT, and there is nothing indicating to me that hearing is in any way specifically related to how the FFT computes a DFT.
But more importantly, I'm not sure DFT fits at all? This is an analog, real-world physical process, so where is it discrete, i.e. how does the ear capture samples?
I think, purely based upon its "mode", what's happening is more akin to a Fourier series, which is the missing fourth category completing (FT, DTFT, DFT): Continuous (non-discrete), but finite or rather periodic in time.
But secondly, unlike Gabor transforms, wavelet transforms are specifically not just windowed Fourier anythings (whether FT/FS/DFT/DTFT). Those would commonly be called "short-time Fourier transforms" (STFT, existing again in discrete and non-discrete variants), and the article straight up mentions that they don't fit either in its footnotes.
Wavelet transforms use an entirely different shape (e.g. a haar wavelet) that is shifted and stretched for analysis, instead of windowed sinusoids over a windowed signal.
And I think those distinctions are what the article actually wanted to touch upon.
comment 1y ago · link · parent
echo -ne '\e[8;32;90;t';n=20;t=524292;l=$((t-1));m=$((2**n-1));c=0;xs=(1);ys=(1);for ((i=0;i<n*m;i++));do b=$((l&1));l=$(((l>>1)^(b*t)));c=$(((c<<1|b)&m));[ $((i%n)) -eq 0 ] &&{xs=($c $xs[1,4]);y=$((((xs[4]-xs[0])<<30-0x3fffd60f*ys[2]+0x7d32617c*ys[1])>>30));ys=($y $ys[1]);yd=$((120+(y >> 24)));printf '\e[48;5;%um ' $yd};done
It is entirely self-contained (but needs zsh, not bash, for dumb reasons). Terminal at 90 columns works best.It is just a very simple integer LFSR as a random number source, followed by a hand-made integer IIR filter (manually placing poles on the z-plane). All of this entirely with trivial integer operations only (effectively using 32 bit fixed point arithmetic)
So without any external input or tools at all, and not even using zsh's $RANDOM, it makes an "analog" weavy pattern.
The LFSR is this part:
b=$((l&1));l=$(((l>>1)^(b*t)));c=$(((c<<1|b)&m))
The hand-made filter is this part: xs=($c $xs[1,4]);y=$((((xs[4]-xs[0])<<30-0x3fffd60f*ys[2]+0x7d32617c*ys[1])>>30));ys=($y $ys[1])
I specifically tuned the filter peak just slightly away from being an integer divisor of 90 columns, to give the pattern a slight "rolling" effect.*comment 1y ago · link · parent
I mean, sure, the TCXO will mean that you only start seeing a phase difference between the two after weeks instead of minutes, but what's the point of that? I you want them to be at the same phase, you'll need to sync them at some point, and you do that by using a common clock source.
So either you shell out some effort for a real solution (power line is nice, and also qualifies as a common clock source as I've predicated), or you don't. And if you don't, there's no point in using a precise-ish clock at all, and you'll likely end up with very quick desyncing.
comment 1y ago · link · parent
You'd get the same phenomenon that you see when operating turn signals in traffic. They seem to weave "in and out" of sync. The frequency at which that happens is the beat frequency, i.e. the difference between the two blinking frequencies.
comment 1y ago · link · parent
I don't know if that's still near feasible for an 8088 or 8086. Anything past that, almost certainly not. Anything modern, absolutely not.
comment 1y ago · link · parent
At least in the 90s, there were actually macro assemblers that supported OOP programming in assembly. Borland Turbo Assembler 5.0 comes to mind, if was kind of fun.
comment 1y ago · link · parent
Additionally, they call out interactions with the OS/execution environment. For example, x18 is the "platform register", and it's unspecified what the OS does with it. It's entirely possible that it clobbers it on context switch or during an interrupt or whatever. So don't use that one unless you have a contract with the OS itself.
But locally, i.e. "from instruction to instruction", no such convention exists to my knowledge, and you probably don't want to have registers that pseudo-instructions might trash inadvertently in general, because it means you can't optimally use these registers.
It's possible for pseudo-instructions or generally macros to be documented as, e.g., "this macro uses x3 as a temporary register and trashes it", but in my experience most macros that need additional temporary registers actually ask you to specify them as part of the macro invocation.
E.g. suppose you have a macro "weirdhash" that takes two registers and saves some kind of hash of them in a third register, but that also needs an extra register to perform its work. You would call it with:
weirdhash x9, x10, x11, x0
Where x0 would be the scratch register you don't care about.comment 1y ago · link · parent
Yeah, and that's fun for me. Some of my most fun bugs to debug have been compiler, or even CPU issues.
comment 1y ago · link · parent
But that's a good point nonetheless: That 640x480 picture is certainly upscaled somehow, otherwise it would be absolutely tiny on a retina display. That upscaling might certainly lead to very different results from both images.
However, when I download the images and open them in Preview, I get the same result. When I zoom in, I do see individual pixels. It looks like it just did nearest neighbor upscaling, so I'm not sure upscaling is at fault here.
comment 1y ago · link · parent
And yet both images have the exact amount of information, because all pixels that have been removed are simply black.
The effect is so pronounced, that I wonder whether there wasn't any additional processing between the two images. Compare the window with the sky reflection between the two: In the image without black pixels, it looks distorted and aliased, while in the one with, it looks pristine.
If actually only the black pixels have been removed (and the result nearest-neighbor scaled), I think the black pixel grid is a form of dithering, although neither random, nor the error diffusion kind one usually thinks of when hearing "dithering". There is no error being diffused here, and all added pixels are constant black.
Maybe the black pixels allow the mind to fill in the gaps (shifting the interpolation that was also removed, prior to the black pixel image, to our brain, essentially). It is known that our brain interpolates and even straight makes up highly non-linear stuff as part of our vision system. A famous example of that is how our blind spot, the fovea where the optic nerve comes out, is "hidden" from us that way.
The aliasing would "disappear" because we sort of have twice the amount of samples (pixels), leading to twice the Nyquist frequency, only that half of the samples have been made up by our vision system through interpolation. (This is a way simplified and crude way to look at it. Pun unintended.)
But before jumping to such lofty conclusions, I still wonder whether nothing more happened between the two images...
comment 1y ago · link · parent
A bit beautiful that we might end up partially going back to analog computers, which were quickly replaced by digital ones.