like this
F4GRX Sébastien, polprog68k and lomn like this.
like this
Tavi, F4GRX Sébastien, Matthieu F4FNE, nyami and Sven like this.
Understanding the internals of #Rust and learn how Rust code maps to assembly
Rust to Assembly: Understanding the Inner Workings of Rust
Understand the assembly code generated for various Rust concepts like enums, match, self-passing, arrays, option, and smart pointers. Learn how the Rust language is translated to assembly and how the compiler optimizes the code.eventhelix.com
reshared this
isithran reshared this.
TIFO the Arduino Ethernet library performs unbuffered byte-by-byte transfers when you're using print() and println(), leading to unreasonably increased turnaround count. I'll need to dig in the library's code, to check why, and I'll probably make a bug report.
This doesn't happen when using write() with an explicit buffer length, though.
PCAP: https://app.packetsafari.com/analyze/l/KllD-YoBW6-oT3TQMCLj
"2 text/gemini\r" is written using println(), and the page content with write( void*, size_t).
tTh likes this.
polprog68k likes this.
like this
Tavi, F4GRX Sébastien and evin / yujiri like this.
OH MY FUCKING GOD.
Pictured: Apple's M2 MacBook Air 13" speaker response (measured with a mic), and the response you get when you zero out every 128th sample of a sine sweep.
They have a stupid off-by-one bug in the middle of their bass enhancer AND NOBODY NOTICED NOR FIXED IT IN OVER A YEAR.
So instead of this (for a 128-sample block size):
for (int sample = 0; sample <= 127; sample++)<br> // process sample<br>
They did this:
for (int sample = 0; sample < 127; sample++)<br> // process sample<br>
Legendary audio engineering there Apple.
We can now, very confidently say the audio quality of Asahi Linux will be better than Apple's. Because we don't have blatant, in your face off-by-one bugs in our DSP and we actually check the output to make sure it's good 😂
FFS, and people praise them for audio quality. I get it, the bar is so low it's buried underground for just about every other laptop, but come on...
Edit: replaced gif with video because Mastodon is choking on the animation duration...
Edit 2: Update below; I can repro this across a large range of versions on this machine but none of the other models I've tried so far. It is definitely a bug, very very obvious to the ear, and seems unique to this machine model.
Edit 3: Still there in Sonoma, this is a current bug.
reshared this
Maya 🏳️⚧️, Tavi and isithran reshared this.
Tested 12.4 and 13.5 on M2 MBA, sounds just as bad, so this has been going on for a *long* time now.
M1 MBA does not have this problem, nor does M1 MBP 16". This might be an M2 MBA specific problem. It is very, *very* obvious if you just play a 300Hz sine with any random frequency generator website and crank the volume up.
Upgrading to Sonoma now, but I doubt they fixed it... it seems this has *always* been broken on at least the M2 13" MBA.
Edit: Still there in Sonoma.
Hector Martin reshared this.
The thing about this bug is that it makes me confident that we can do better, not just in terms of not making this mistake.
When you're doing DIY DSP like this, it's always hard to objectively be confident that you can do a decent job vs. a company with many more employees and resources (e.g. to run high quality tests, user studies, etc.); after all, we're not psychoacoustics experts here, there could be some real "magic sauce" to Apple's DSP that we can't reproduce.
Anyone can make this kind of mistake while writing DSP code, but the fact that nobody caught this before launch, never mind in over a year in the wild, makes it evident that Apple's audio engineering team is, at least on some level, incompetent (or incompetently run; I'm not blaming the employees here, but rather the organization). This is both obvious to the ear side by side with other machines, and obvious in a sine sweep frequency response test, which is the most basic test you can run end-to-end on a completed audio system to ensure it is performing properly. So they didn't even run that. Or they ran it, and didn't notice this. Which is nuts.
So now I feel a lot more confident that the less over-the-top DSP we're aiming for in Asahi is going to be competitive, because clearly Apple's audio team aren't audio geniuses with dark knowledge we don't have. At least on some level they're flailing around with open-coded time domain DSP and aren't running any serious analysis on the result, because anything would've caught this, especially in contrast to it not happening on other machines.
For those curious about how I figured out exactly what the bug was:
https://social.treehouse.systems/@marcan/111160552044972689
The train of thought was:
- The aliasing is every 375 Hz
- 48000 / 375 = 128 so this is some fourier thing with a block size 128???
- Wait no, this could be time domain, aliasing like that is what you get when you upsample without lowpassing
- Specifically, when you upsample with zero-sample padding (standard), that is, when one sample out of 128 has the low frequency content.
- So this is like taking the average of a 128-sample block and adding it to just one sample?
- Wait, isn't that almost equivalent to zeroing out one sample?
numpy time
fs, signal = wavfile.read("sweep.wav")<br>signal[::128] = 0<br>wavfile.write("lol.wav", fs, signal)<br><br>
And the rest is history.
I feel like this happens frequently in Asahi Linux, that the solution you few people come up with is better than the one by the trillion-dollar company, or that you catch mistakes that they don't.
Seriously impressive!
@torsteinv It's harder to notice with complex music, since it only affects frequencies the speakers can't reproduce very well anyway, so a lot of content in higher frequencies will mask it (e.g. you won't notice with pop/rock and things like that). But I looked for stuff like bassoon solos and I'm pretty sure I can hear a weird dissonance that shouldn't be there, caused by this.
See the previous reply for a demo with a pure tone. With that it's so blatant it sounds like old telephone DTMF dial tones (which are designed to sound dissonant).
I love how it sounds like some kind of airhorn (boat?). It’s kinda funny in that way.
But it has to be a real bummer for anyone owning an M2 laptop.
It doesn't sound like "higher volume", though, it's a very distinct, harsh, dissonant buzz.
What you're describing as "higher volume" is saturation/distortion. Distortion is always harmonic, so although it can sound harsh, it is not fundamentally changing the pitch of the sound.
Here are three tones. The first one is pure, the second one is clipped (distorted), and the third one is what happens with this weird kind of artifact (the actual M2 Air output is actually more broken than this, it's not just this bug, but it's part of it). The third one has a distinct "buzz" that sounds out of tune, like interference from another tone. That's what you get on the Mac. It's a very unnatural, unmusical kind of artifact that sounds very harsh because it cannot be produced through physical processes in real life (no instrument sounds like that).
I won't try to make any judgements here, as my ears are too bad for that.
thank god
@sean_ae Edited a video into here: https://social.treehouse.systems/@marcan/111160509734332411
Tested 12.4 and 13.5 on M2 MBA, sounds just as bad, so this has been going on for a *long* time now.M1 MBA does not have this problem, nor does M1 MBP 16". This might be an M2 MBA specific problem. It is very, *very* obvious if you just play a 300Hz sine with any random frequency generator website and crank the volume up.
Upgrading to Sonoma now, but I doubt they fixed it... it seems this has *always* been broken on at least the M2 13" MBA.
Edit: Still there in Sonoma.
The train of thought was:
- The aliasing is every 375 Hz
- 48000 / 375 = 128 so this is some fourier thing with a block size 128???
- Wait no, this could be time domain, aliasing like that is what you get when you upsample without lowpassing
- Specifically, when you upsample with zero-sample padding (standard), that is, when one sample out of 128 has the low frequency content.
- So this is like taking the average of a 128-sample block and adding it to just one sample?
- Wait, isn't that almost equivalent to zeroing out one sample?
numpy time
fs, signal = wavfile.read("sweep.wav")<br>signal[::128] = 0<br>wavfile.write("lol.wav", fs, signal)<br><br>
And the rest is history.
Tavi reshared this.
@Sobex You mean in terms of speaker audio quality? It's still much better than the vast majority of the competition, though as @chadmed said a few times, their DSP is too tryhard (this bug aside).
The drivers are decent, their EQ is reasonably good, the equal-loudness processing is a good idea (we're doing that too), and the speaker safety modeling stuff lets them safely crank them pretty loud. Those things alone are already more than most laptops do by far. Whether the rest of Apple's DSP helps or sounds good/bad is debatable, but those basics already make them stand out.
@dascandy42 It is aliasing at intervals of 1/128th of the sampling frequency, which is what happens with this kind of bug due to the mathematics involved. Basically you can think of it as downsampling (folding and truncating the spectrum) to 1/128th the sampling frequency (375Hz in this case, which gives you 187.5Hz worth of spectrum), and then copying and pasting and mirroring the resulting spectrum 128 times to fill in the entire original frequency range.
The increasingly angled lines in the real spectrum are the intended result of the filter (harmonics).
Yes.
I mean the two lines around the first harmonic that are parallel to it.
Ah yes, that's another aliasing-type artifact (and possibly a more audible one). I don't have a simple explanation for that one, but it might be related to the 1/128 bug in some way (maybe a larger block size is involved?).
It's not mains intermodulation, that would affect everything.
I was taught:
for(int sample = 0; sample < 128; sample++) {}
…because the actual number of iterations is right there in the test…
> the bar is so low it's buried underground for just about every other laptop
What a line! 😆
Sadly, it's so true though…
Since you seem to have a great setup with a reference mic already - mind recording how this off-by-one actually sounds like? As in, how it distorts the ~300Hz range. Spectra are great but I'd love to hear it (mostly to figure out whether I'd have noticed it or not)
If it takes too long, I guess I can call this an excuse to learn more about audio processing and try to replicate this myself
https://social.treehouse.systems/@marcan/111160509734332411
It's so obvious a smartphone mic is more than enough.
Tested 12.4 and 13.5 on M2 MBA, sounds just as bad, so this has been going on for a *long* time now.M1 MBA does not have this problem, nor does M1 MBP 16". This might be an M2 MBA specific problem. It is very, *very* obvious if you just play a 300Hz sine with any random frequency generator website and crank the volume up.
Upgrading to Sonoma now, but I doubt they fixed it... it seems this has *always* been broken on at least the M2 13" MBA.
Edit: Still there in Sonoma.
@de_maulwurf87 @l_prod No see that's the thing, this is *inharmonic* (out of tune), and that can't happen with a physical process like rattling. I was actually looking *for* rattling/resonances when I noticed this, which is a different (and much more inevitable) problem.
This kind of artifact can only happen with bad/broken DSP.
That is... wow. I don't know what to say.
<Bored Marvin the depressed robot voice>
File a bug report. Complaining on social media doesn’t work.
</Bored Marvin>
…or as we cynically used to say inside Apple:
Radar # or it didn’t happen.
some going back ten years. not obscure stuff either. mail, imessage, safari, reminders, autocarrot, weather, lock screen, and on and on and on. “it just works” is apples “don’t be evil.”
I don't understand those images or your explanation of the bug (other than the fact that it's an off-by-one error), but that audio demo is about as subtle as being run over by a goddamn freight train.
Jesus Christ
Yeah pretty much. This DSP needs to be implemented somewhere and PipeWire ended up being the best option. And it does supersede most other frameworks/use cases (PA, JACK, etc.) so there's very little reason not to use it.
Though we switched our users over earlier last year anyway, because PA was broken with headphone jack hotplug and PW worked fine, and it wasn't worth spending time debugging that when we already planned to require PW for the upcoming speaker support.
The speaker safety stuff, though, will be a stand-alone daemon working together with the kernel driver. So if you really want to use PA or anything else, it'll sound (very) bad, but you won't blow up your speakers. If the safety daemon dies or is not present, the kernel will fall back to a very low but safe volume cap.
@argv_minus_one You can use PA/JACK/ALSA/etc without PW, we just aren't building the DSP processing tooling for those. So if you want your speakers to sound good with something that isn't PW, you're on your own. I actually considered doing the DSP as an ALSA plug-in to make it more universal at one point, but it turned out to be a bad idea for various reasons.
PipeWire provides PulseAudio, JACK, and ALSA compatible interfaces, so apps that use any of those will work with PipeWire and can use our DSP. But you need to actually run PipeWire.
edit:
Not fine broken too!
I first used 300 HZ like in your text.
If I use the 270 Hz like you did in the video it’s very noticeable distorted too.
plays fine on my M2 MacBook Air 13“ with Sonoma 14.0
Found the very same website tone generator you used.
MBAir plays the same like iPad and not as distorted like in your video - maybe it is an “not all Models” Problem if some hw parts?
Edit:#2
Use 270 HZ not 300 Hz to test.
This website is beautiful ✿✿
Deux Fleurs is a non profit organization providing hosting without data centers. They are using old computers at home in France, using open source technologies.
Deuxfleurs : fabriquons un internet convivial
Association qui œuvre en utilisant ses propres infrastructures, des outils sobres et des valeurs fortes.deuxfleurs.fr
40 years ago, DAICON IV (the 4th Osaka Japan SF Convention) opened with the screening of the following short animation film.
The team who produced that short would become later GAINAX, after Bandai noticed and financed them to produce Royal Space Force: The Wings of Honneamise.
https://www.youtube.com/watch?v=j5-4-r3ReUU
Daicon IV Opening Animation (1983)
Opening animation for the Daicon IV science fiction convention, produced by animators who would go on to form the animation studio GAINAX (Gunbuster, Evangel...YouTube
isithran likes this.
reshared this
Hector Martin, isithran and Site Reliability Enby🏳️⚧️🏁🔦📈🐺👗😷 reshared this.
ou via le 3623 MAGIS avec un Magis Club et une connexion haute vitesse dite « TVR (Télétel Vitesse Rapide) » étant jusqu’à 8 fois plus rapide
Elle semble être d’origine avec aucun autre numéro et nom de service en mémoire
Il semble y avoir quelques anciens services en plus
Là il n’y a que des numéros vers des services via une connexion Minitel TVR
Il va falloir que je buche la doc technique du lecteur LECAM pour pouvoir lire et modifier leur contenu depuis mon serveur !
Il faudrait aussi que je trouve aussi d'anciennes cartes de paiement des années 90 pour voir si je peux interagir avec via mon serveur
Pour la curiosité, j'ai inséré les cartes dans mon Minitel Sillage
Il détecte bien que ce sont des cartes à mémoire mais il ne sait pas accéder à leur contenu
J'aurais bien testé avec un lecteur LECAM pour Minitel 1/1B/2/10/12 qui se branche sur la prise DIN mais j'en ai pas :(
isithran likes this.
https://go.nasa.gov/3Y9qP7D
NASA Mission Update: Voyager 2 Communications Pause
Once the spacecraft’s antenna is realigned with Earth, communications should resume.NASA Jet Propulsion Laboratory (JPL)
like this
xsspup :blobhaj_hearttrans:, Low Quality Facts, cat3c ΘΔ&, Paul Harvey, Harshad Sharma, Rae, Rogue, nota 🦈✨, fops, nyami and Blue like this.
isithran likes this.
isithran likes this.
reshared this
Site Reliability Enby🏳️⚧️🏁🔦📈🐺👗😷, isithran and Chloe A. reshared this.
reshared this
Q ✨, Tavi, polprog68k, isithran and Abraxas3d W5NYV reshared this.
Reminds me of the people who just go in and hang their work at museums without asking permission (and it stays there for weeks or months at a time) ... you really have to admire it.
https://news.artnet.com/art-world/michelle-hartney-met-protest-picasso-gauguin-wall-labels-1387801
etc... etc..
‘Museums Almost Infantilize Viewers’: A Guerrilla Artist Puts Up Her Own Wall Labels at the Met to Expose Male Artists’ Bad Behavior
Michelle Hartney is posting her own biographical descriptions next to work by Balthus, Picasso, and Gauguin.Sarah Cascone (Artnet News)
"Recently the security researchers at Midnight Blue in the Netherlands have discovered a collection of five vulnerabilities collectively called "TETRA:BURST" that apply to almost every TETRA network in the world. These two most critical vulnerabilities allow TETRA to be easily decrypted by consumer hardware." Hahaha oof
https://www.rtl-sdr.com/encryption-on-the-tetra-protocol-has-been-broken/
Encryption on the TETRA Protocol has been broken
TETRA (Terrestrial Trunked Radio) is a digital voice and text radio communications protocol often used by authorities and industry in European and many countries other than the USA.rtl-sdr.com
like this
Tavi and Jevin Sweval like this.
I'll wait for a while to see if that article is considered serious, but Europeans should prepare for a radical change if AMOC collapses as quickly as advertised. More than temperatures, my main concern is focused on the drastic reduction of rainfall amounts.
https://www.nature.com/articles/s41467-023-39810-w
Warning of a forthcoming collapse of the Atlantic meridional overturning circulation - Nature Communications
The Atlantic meridional overturning circulation (AMOC) is a major tipping element in the climate system. Here, data-driven estimators for the time of tipping predict a potential AMOC collapse mid-century under the current emission scenario.Nature
like this
F4GRX Sébastien and nyami like this.
https://www.youtube.com/watch?v=9zDuokAHazE
中島 怜「サプライズ」Music Video(Short ver.)
フライングドッグ・オーディション「犬コン!」の声優・歌手・シンガーソングライター部門でグランプリを受賞した愛知県出身の18才、中島 怜(なかしまれい)。そのデビューシングルで、7月放送開始のTVアニメ『シュガーアップル・フェアリーテイル』第2クールオープニングテーマ「サプライズ」のMusic Video(Shor...YouTube
F4GRX Sébastien
in reply to isithran • • •isithran likes this.
polprog68k
in reply to isithran • • •