The Surprising Importance of This Adorable Sea Turtle Dance
https://www.nature.com/articles/s41586-024-08554-y [www.nature.com]
2025-02-17 21:59
tags:
biology
food
maps
paper
turtles
Growing evidence indicates that migratory animals exploit the magnetic field of the Earth for navigation, both as a compass to determine direction and as a map to determine geographical position. It has long been proposed that, to navigate using a magnetic map, animals must learn the magnetic coordinates of the destination, yet the pivotal hypothesis that animals can learn magnetic signatures of geographical areas has, to our knowledge, yet to be tested. Here we report that an iconic navigating species, the loggerhead turtle (Caretta caretta), can learn such information. When fed repeatedly in magnetic fields replicating those that exist in particular oceanic locations, juvenile turtles learned to distinguish magnetic fields in which they encountered food from magnetic fields that exist elsewhere, an ability that might underlie foraging site fidelity. Conditioned responses in this new magnetic map assay were unaffected by radiofrequency oscillating magnetic fields, a treatment expected to disrupt radical-pair-based chemical magnetoreception, suggesting that the magnetic map sense of the turtle does not rely on this mechanism. By contrast, orientation behaviour that required use of the magnetic compass was disrupted by radiofrequency oscillating magnetic fields. The findings provide evidence that two different mechanisms of magnetoreception underlie the magnetic map and magnetic compass in sea turtles.
Summary: https://www.scientificamerican.com/article/sea-turtle-dance-reveals-a-hidden-magnetic-ability/
0+0 > 0: C++ thread-local storage performance
https://yosefk.com/blog/cxx-thread-local-storage-performance.html [yosefk.com]
2025-02-17 21:29
tags:
compiler
concurrency
cxx
library
perf
programming
We’ll discuss how to make sure that your access to TLS (thread-local storage) is fast. If you’re interested strictly in TLS performance guidelines and don’t care about the details, skip right to the end — but be aware that you’ll be missing out on assembly listings of profound emotional depth, which can shake even a cynical, battle-hardened programmer. If you don’t want to miss out on that — and who would?! — read on, and you shall learn the computer-scientific insight behind the intriguing inequality 0+0 > 0.
source: HN
Can atproto scale down?
https://bsky.bad-example.com/can-atproto-scale-down/ [bsky.bad-example.com]
2025-02-17 21:10
tags:
networking
perf
programming
social
storage
And skipping right to the end, my answer to “can it scale down” is just: “yes!”. Here’s my Raspberry Pi 4b, at home, consuming a few watts and pulling around 20GB of simplified firehose events per day. It’s an AppView indexing all cross-repo references (backlinks) in the AT-mosphere, often up to 1,500 created per second. It’s closing in on one billion backlinks, eating up an old SATA SSD connected over a salvaged USB adapter.
source: L
The hardest working font in Manhattan
https://aresluna.org/the-hardest-working-font-in-manhattan/ [aresluna.org]
2025-02-17 21:05
tags:
article
design
history
photos
text
urban
In 2007, on my first trip to New York City, I grabbed a brand-new DSLR camera and photographed all the fonts I was supposed to love. I admired American Typewriter in all of the I <3 NYC logos, watched Akzidenz Grotesk and Helvetica fighting over the subway signs, and even caught an occasional appearance of the flawlessly-named Gotham, still a year before it skyrocketed in popularity via Barack Obama’s first campaign.
But there was one font I didn’t even notice, even though it was everywhere around me. Last year in New York, I walked over 100 miles and took thousands of photos of one and one font only. The font’s name is Gorton.
source: L
"A calculator app? Anyone could make that."
https://chadnauseam.com/coding/random/calculator-app [chadnauseam.com]
2025-02-17 21:02
tags:
android
compsci
math
programming
ux
A calculator should show you the result of the mathematical expression you entered. That’s much, much harder than it sounds.
source: HN
How do modern compilers choose which variables to put in registers?
https://langdev.stackexchange.com/questions/4325/how-do-modern-compilers-choose-which-variables-to-put-in-registers [langdev.stackexchange.com]
2025-02-17 20:59
tags:
compiler
cpu
programming
This is a very broad subject. The problem of deciding how to map a program with arbitrarily many variables onto a fixed set of registers is known as register allocation, and it has been the subject of much research, study, and engineering effort since the very earliest compilers. One of the canonical approaches, graph coloring, was first proposed in 1981. Countless other approaches and variants have been explored since then, and I cannot hope to cover the full breadth of the topic in a single answer.
source: HN
Get in loser. We're rewinding the stack.
https://andrews.substack.com/p/get-in-loser-were-rewinding-the-stack [andrews.substack.com]
2025-02-17 20:57
tags:
perl
programming
series
wasm
In my last post, I expressed frustration at how the lack of exnref support in most WebAssembly runtimes made zeroperl effectively unusable. However, complaining alone doesn’t solve problems—if something is broken, fix it. Don’t accept the status quo or let it derail your goals.
Using libsetjmp from the WASI SDK for setjmp/longjmp breaks compatibility across WebAssembly runtimes, so I decided to implement it myself. Binaryen has an Asyncify feature, which provides more than enough functionality to build a setjmp implementation from scratch.
Part of a series on getting perl running in wasm.
https://andrews.substack.com/p/zeroperl-sandboxed-perl-with-webassembly
source: HN
AMD: Microcode Signature Verification Vulnerability
https://github.com/google/security-research/security/advisories/GHSA-4xq7-4mgh-gp6w [github.com]
2025-02-03 19:53
tags:
bios
cpu
exploit
hash
security
systems
virtualization
This vulnerability allows an adversary with local administrator privileges (ring 0 from outside a VM) to load malicious microcode patches. We have demonstrated the ability to craft arbitrary malicious microcode patches on Zen 1 through Zen 4 CPUs. The vulnerability is that the CPU uses an insecure hash function in the signature validation for microcode updates. This vulnerability could be used by an adversary to compromise confidential computing workloads protected by the newest version of AMD Secure Encrypted Virtualization, SEV-SNP or to compromise Dynamic Root of Trust Measurement.
https://www.amd.com/en/resources/product-security/bulletin/amd-sb-3019.html
source: HN
The Art of Dithering and Retro Shading for the Web
https://blog.maximeheckel.com/posts/the-art-of-dithering-and-retro-shading-web/ [blog.maximeheckel.com]
2025-02-03 19:47
tags:
gl
graphics
interactive
programming
visualization
web
I spent the past few months building my personal website from the ground up, finally taking the time to incorporate some 3D work to showcase my shader and WebGL skills. Throughout this work, I got to truly understand the crucial role that post-processing plays in making a scene actually look good, which brought some resolutions to long-term frustrations I had with my past React Three Fiber and shader projects where my vision wouldn’t materialize regardless of the amount of work and care I was putting into them.
Taking the time to build, combine, and experiment with custom post-processing effects gave me an additional creative outlet, and among the many types I got to iterate on, I always had a particular affection for the several “retro” effects I came up with. With subtle details such as dithering, color quantization, or pixelization/CRT RGB cells, they bring a pleasant contrast between the modern web landscape and a long-gone era of technology we 90s/early 2000s kids are sometime longing for.
source: HN
JavaScript Temporal is coming
https://developer.mozilla.org/en-US/blog/javascript-temporal-is-coming/ [developer.mozilla.org]
2025-01-30 20:14
tags:
browser
javascript
library
programming
update
web
Implementations of the new JavaScript Temporal object are starting to be shipped in experimental releases of browsers. This is big news for web developers because working with dates and times in JavaScript will be hugely simplified and modernized.
source: HN
Bilinear down/upsampling, aligning pixel grids, and that infamous GPU half pixel offset
https://bartwronski.com/2021/02/15/bilinear-down-upsampling-pixel-grids-and-that-half-pixel-offset/ [bartwronski.com]
2025-01-27 23:28
tags:
graphics
programming
So I figured it’s an opportunity for another short blog post – on bilinear filtering, but in context of down/upsampling. We will touch here on GPU half pixel offsets, aligning pixel grids, a bug / confusion in Tensorflow, deeper signal processing analysis of what’s going on during bilinear operations, and analysis of the magic of the famous “magic kernel”.
source: HN
Where Do Those Undergraduate Divisibility Problems Come From?
https://grossack.site/2025/01/16/undergrad-divisibility-problems.html [grossack.site]
2025-01-20 19:25
tags:
math
Oftentimes in your “intro to proofs” class or your first “discrete math” class or something similar, you’ll be shown problems of the form “prove that for is a multiple of for every ”… But where do these problems come from? And have you ever stopped to think how magical this is? If I gave you some random polynomial in and asked you if it always output multiples of , the answer would almost always be “no”! So if you really needed to come up with an example of this phenomenon, how would you do it? In this blog post, we give one approach!
source: HN
Bypassing disk encryption on systems with automatic TPM2 unlock
https://oddlama.org/blog/bypassing-disk-encryption-with-tpm2-unlock/ [oddlama.org]
2025-01-17 16:26
tags:
crypto
linux
security
storage
Have you setup automatic disk unlocking with TPM2 and systemd-cryptenroll or clevis? Then chances are high that your disk can be decrypted by an attacker who just has brief physical access to your machine - with some preparation, 10 minutes will suffice. In this article we will explore how TPM2 based disk decryption works, and understand why many setups are vulnerable to a kind of filesystem confusion attack. We will follow along by exploiting two different real systems (Fedora + clevis, NixOS + systemd-cryptenroll).
source: HN
Physically Based Rendering: From Theory To Implementation
https://pbr-book.org/ [pbr-book.org]
2025-01-17 16:21
tags:
book
gl
graphics
Physically Based Rendering describes both the mathematical theory behind a modern photorealistic rendering system and its practical implementation. A method known as literate programming combines human-readable documentation and source code into a single reference that is specifically designed to aid comprehension. The book’s leading-edge algorithms, software, and ideas—including new material on GPU ray tracing—equip the reader to design and employ a full-featured rendering system capable of creating stunning imagery.
source: HN
Why The Weak Nuclear Force Is Short Range
https://profmattstrassler.com/articles-and-posts/particle-physics-basics/the-astonishing-standard-model/why-the-weak-nuclear-force-is-short-range/ [profmattstrassler.com]
2025-01-15 22:22
tags:
physics
The “range” of a force is a measure of the distance across which it can easily be effective. Some forces, including electric and magnetic forces and gravity, are long-range, able to cause dramatic effects that can reach across rooms, planets, and even galaxies. Short-range forces tail off sharply, and are able to make a significant impact only at distances shorter than their “range”. The weak nuclear force, for instance, dies off at distances ten million times smaller than an atom! That makes its effects on atoms rather slow and rare, which is why it is called “weak”.
source: HN
Go 1.24 interactive tour
https://antonz.org/go-1-24/ [antonz.org]
2025-01-15 21:07
tags:
garbage-collection
go
programming
update
Go 1.24 is scheduled for release in February, so it’s a good time to explore what’s new. The official release notes are pretty dry, so I prepared an interactive version with lots of examples showing what has changed and what the new behavior is.
source: L
Justified Text: Better Than Expected?
https://cloudfour.com/thinks/justified-text-better-than-expected/ [cloudfour.com]
2025-01-15 21:06
tags:
design
html
web
I was pleasantly surprised by the results in Chromium browsers at medium and large container widths. Hyphenation seems conservative and readable, yet there are no unsightly gaps or “rivers” between words. Safari and Firefox hyphenate a bit more frequently, but not distractingly so.
source: L
Why is my CPU usage always 100%?
https://www.downtowndougbrown.com/2024/04/why-is-my-cpu-usage-always-100-upgrading-my-chumby-8-kernel-part-9/ [www.downtowndougbrown.com]
2025-01-13 22:14
tags:
bugfix
c
investigation
linux
programming
systems
That’s really weird! Why would top be using all of my CPU? It says 100% usr in the second line. Sometimes the usage showed up as 50% usr and 50% sys. Other times it would show up as 100% sys. And very rarely, it would show 100% idle. In that rare case, top would actually show up with 0% usage as I would expect. The 2.6.28 kernel did not have this problem, so it was something different about my newer kernel.
source: HN
It's time to abandon the cargo cult metaphor
http://www.righto.com/2025/01/its-time-to-abandon-cargo-cult-metaphor.html [www.righto.com]
2025-01-13 19:14
tags:
article
history
hoipolloi
The cargo cult metaphor is commonly used by programmers. This metaphor was popularized by Richard Feynman’s “cargo cult science” talk with a vivid description of South Seas cargo cults. However, this metaphor has three major problems. First, the pop-culture depiction of cargo cults is inaccurate and fictionalized, as I’ll show. Second, the metaphor is overused and has contradictory meanings making it a lazy insult. Finally, cargo cults are portrayed as an amusing story of native misunderstanding but the background is much darker: cargo cults are a reaction to decades of oppression of Melanesian islanders and the destruction of their culture. For these reasons, the cargo cult metaphor is best avoided.
I doubt anyone is going to avoid anything, but the history is very interesting.
The history and use of /etc/glob in early Unixes
https://utcc.utoronto.ca/~cks/space/blog/unix/EtcGlobHistory [utcc.utoronto.ca]
2025-01-13 18:57
tags:
sh
text
unix
One of the innovations that the V7 Bourne shell introduced was built in shell wildcard globbing, which is to say expanding things like *, ?, and so on. Of course Unix had shell wildcards well before V7, but in V6 and earlier, the shell didn’t implement globbing itself; instead this was delegated to an external program, /etc/glob (this affects things like looking into the history of Unix shell wildcards, because you have to know to look at the glob source, not the shell).
source: HN