Better HN
topnewbestaskshowjobs
Log inSign up

anyfoo

9,878 karma · joined Dec 7, 2012 (14y ago) · 2,939 submissions

If you want to send me an email: <username>@<username>.de
Submissions

comment 1y ago · link · parent

I'm sorry, but I don't think that makes sense, and that it's pretty obvious that it doesn't.

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

Putting aside that they are not optimized but just happen to have an effect, would you claim that these are the only things that affect happiness/its relevant chemicals?

comment 1y ago · link · parent

By that logic, "How does loved one dying affect different type of hormones, if at all. Given how sensitive our hormones are, it would be difficult to control only for 'loss of a loved one'".

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

Technically correct, but if that's what you reduce it to, why did you bother to reply? You only changed some light patterns on a bunch of atoms.

comment 1y ago · link · parent

It's a good question, but as elaborated in a sibling comment, I'm not sure it even matters in this case. (Sampling frequency vs. sampling the sound wave itself.)

comment 1y ago · link · parent

Even if they do (and I honestly have no idea), isn't it the frequency, i.e. the output of the basilar membrane in the ear, and not a sample in time of the actual sound wave which would correspond to a short-time frequency transform, that gets sampled here?

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

I'd say the title is like that (and I agree with someone else's assessment of it being clickbait-y). I think the actual article does a pretty good job in distinguishing a lot of these transforms, and honing into which one matches most.

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

Agree on the click-baity part, but as for being wrong... not if we're really pedantic. As you've said, Gabor and wavelet are basically generalizations of the Fourier Transform, not actually Fourier Transforms. Just like FS/DFT/DTFT aren't really Fourier Transforms either.

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

Yes, but the article specifically says that it isn't like a short-time fourier transform either, but more like a wavelet transform, which is different yet again.

comment 1y ago · link · parent

Since we're being pedantic, there is some confusion of ideas here (even though you do make a valid overall point), and the strawman may not be as ridiculous.

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

Maybe you'll get a kick out of this, I did it in a bored afternoon a while back:

    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

And you are technically correct, which is the best kind of correct anyway.

comment 1y ago · link · parent

Yeah, the mains frequency qualifies, if you explicitly use that.

(Doesn't solve the problem if you want them to be in sync phase-wise, i.e. blink at the same time or similar, but at least they won't drift apart, which was what this is about.)

comment 1y ago · link · parent

Well, yeah. I was sort of assuming that you won't use a TCXO or even just a cheapo quartz crystal, because it doesn't make a lot of sense: You've now thrown money at something that will relatively quickly desync anyway.

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

If they don't sync to a common clock source, they won't stay in sync for long. Probably not even for a few minutes or so.

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

That's what DCF77 is. Or GPS.

comment 1y ago · link · parent

Not that coincidental. tom7 is mentioned in the article itself, and in his video's heartbreaking conclusion, he mentions the work presented in the article at the end. tom7 was working on proving the same thing!

comment 1y ago · link · parent

A few early CPUs (famously including the 6502) were fully reverse engineered through "ordinary" die photos, and they even have gate-level simulators now where you can basically see the individual transistors switching: http://www.visual6502.org

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

My feeling is that this would make bin packing on a silicon wafer less optimal?

comment 1y ago · link · parent

> If everything constantly depends on the prior action you will never get any uplift.

I mean... that's kind of a pathological case, no?

comment 1y ago · link · parent

I use it to test connectivity in general. That it also checks whether my IPv6 stacks works correctly is basically a bonus.

comment 1y ago · link · parent

Yeah, I mentioned x18 on arm64 as an example for the latter one. Didn't know about the register reserved for assembly use, apparently MIPS indeed had that: $1, also known as $at, is the "assembler temporary".

comment 1y ago · link · parent

Oh yeah. S/360 assembly almost looks like a high level language sometimes. In MVS, functions of the OS and standard libraries (or its equivalent) were implemented as elaborate macros, with their own invocation syntax, whereas nowadays you'd expect a function that you'd call (dynamically linked or not), with parameters passed in registers.

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

Not really, or at least not that I know if in the case of arm64. What you have is calling conventions that specify what one function/procedure/whatever can expect both from the caller and the callee's side.n I.e. some registers are caller-saved, some are callee-saved, which basically means the called function can treat them as "scratch".

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

> I'm sure it was a relief to find a thorough solution that addressed the root cause. But it doesn't seem plausible that it was fun while it was unexplained. When I have this kind of bug it eats my whole attention.

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

I just opened both pictures in separate tabs, the browser says that both are 640x480.

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

Isn't it crazy how the image where every other pixel is black (labeled "Without interpolating, we can clearly see we only have half the pixels") sort of looks to have higher fidelity than the one after it, where the black pixels have been removed, which now looks pixelated?

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

Yeah, analog memory fits so incredibly well. Who cares if it's not "exact" and fuzzes around a bit if it's only used for weights and has massive efficiency advantages. Weights are never "exact" themselves, and it doesn't matter if they don't always read exactly the same. You basically just get some extra "temperature" for free!

A bit beautiful that we might end up partially going back to analog computers, which were quickly replaced by digital ones.

1
567
98