frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Big Data on the Cheapest MacBook

https://duckdb.org/2026/03/11/big-data-on-the-cheapest-macbook
88•bcye•1h ago•52 comments

Dolphin Progress Release 2603

https://dolphin-emu.org/blog/2026/03/12/dolphin-progress-report-release-2603/
103•BitPirate•4h ago•6 comments

3D-Knitting: The Ultimate Guide

https://www.oliver-charles.com/pages/3d-knitting
125•ChadNauseam•4h ago•41 comments

Avoiding Trigonometry (2013)

https://iquilezles.org/articles/noacos/
83•WithinReason•4h ago•16 comments

US private credit defaults hit record 9.2% in 2025, Fitch says

https://www.marketscreener.com/news/us-private-credit-defaults-hit-record-9-2-in-2025-fitch-says-...
36•JumpCrisscross•39m ago•21 comments

Show HN: s@: decentralized social networking over static sites

http://satproto.org/
335•remywang•13h ago•146 comments

SBCL: A Sanely-Bootstrappable Common Lisp (2008) [pdf]

https://research.gold.ac.uk/id/eprint/2336/1/sbcl.pdf
76•pabs3•6h ago•40 comments

Temporal: The 9-year journey to fix time in JavaScript

https://bloomberg.github.io/js-blog/post/temporal/
724•robpalmer•21h ago•231 comments

Printf-Tac-Toe

https://github.com/carlini/printf-tac-toe
60•carlos-menezes•4d ago•6 comments

Returning to Rails in 2026

https://www.markround.com/blog/2026/03/05/returning-to-rails-in-2026/
212•stanislavb•7h ago•125 comments

Making WebAssembly a first-class language on the Web

https://hacks.mozilla.org/2026/02/making-webassembly-a-first-class-language-on-the-web/
607•mikece•1d ago•216 comments

Thinnings: Sublist Witnesses and de Bruijn Index Shift Clumping

https://www.philipzucker.com/thin1/
10•matt_d•2d ago•0 comments

Datahäxan

https://0dd.company/galleries/witches/7.html
95•akkartik•2d ago•8 comments

I was interviewed by an AI bot for a job

https://www.theverge.com/featured-video/892850/i-was-interviewed-by-an-ai-bot-for-a-job
359•speckx•19h ago•345 comments

Tested: How Many Times Can a DVD±RW Be Rewritten? Methodology and Results

https://goughlui.com/2026/03/07/tested-how-many-times-can-a-dvd%C2%B1rw-be-rewritten-part-2-metho...
185•giuliomagnifico•4d ago•57 comments

1B identity records exposed in ID verification data leak

https://www.aol.com/articles/1-billion-identity-records-exposed-152505381.html
108•robtherobber•3h ago•27 comments

Don't post generated/AI-edited comments. HN is for conversation between humans

https://news.ycombinator.com/newsguidelines.html#generated
3781•usefulposter•17h ago•1414 comments

The MacBook Neo

https://daringfireball.net/2026/03/the_macbook_neo
584•etothet•1d ago•922 comments

WebPKI and You

https://blog.brycekerley.net/2026/03/08/webpki-and-you.html
72•aragilar•3d ago•8 comments

Reliable Software in the LLM Era

https://quint-lang.org/posts/llm_era
34•mempirate•5h ago•13 comments

NASA's DART spacecraft changed an asteroid's orbit around the sun

https://www.sciencenews.org/article/spacecraft-changed-asteroid-orbit-nasa
52•pseudolus•3d ago•18 comments

High fidelity font synthesis for CJK languages

https://github.com/kaonashi-tyc/zi2zi-JiT
5•kaonashi-tyc-01•3d ago•1 comments

Google closes deal to acquire Wiz

https://www.wiz.io/blog/google-closes-deal-to-acquire-wiz
308•aldarisbm•22h ago•183 comments

Show HN: I built a tool that watches webpages and exposes changes as RSS

https://sitespy.app
275•vkuprin•21h ago•72 comments

Faster asin() was hiding in plain sight

https://16bpp.net/blog/post/faster-asin-was-hiding-in-plain-sight/
223•def-pri-pub•22h ago•120 comments

BitNet: Inference framework for 1-bit LLMs

https://github.com/microsoft/BitNet
355•redm•1d ago•163 comments

Personal Computer by Perplexity

https://www.perplexity.ai/personal-computer-waitlist
180•josephwegner•19h ago•143 comments

Entities enabling scientific fraud at scale (2025)

https://doi.org/10.1073/pnas.2420092122
297•peyton•23h ago•204 comments

Many SWE-bench-Passing PRs would not be merged

https://metr.org/notes/2026-03-10-many-swe-bench-passing-prs-would-not-be-merged-into-main/
256•mustaphah•16h ago•138 comments

Galaxy Zoo

https://www.zooniverse.org/projects/zookeeper/galaxy-zoo
22•mooreds•3d ago•3 comments
Open in hackernews

Avoiding Trigonometry (2013)

https://iquilezles.org/articles/noacos/
82•WithinReason•4h ago

Comments

srean•2h ago
This has been some sort of a mix of peeve and a moment of enlightenment of mine when I understood this.

I wholeheartedly agree with the point being made in the post. I had commented about this in the recent asin() post but deleted thinking it might not be of general interest.

If you care about angles and rotations in the plane, it is often profitable to represent an angle not by a scalar such as a degree or a radian but as a tuple

    (cos \theta, sin \theta)
or as a complex number.

This way one can often avoid calls to expensive trigonometric functions. One may need calls to square roots and general polynomial root finding.

In Python you can represent an angle as a unit complex numbers and the runtime will do the computations for you.

For example, if you needed the angular bisector of an angle subtended at the origin (you can translate the vertex there and later undo the translation), the bisector is just the geometric mean of the arms of the angle

   sqrt(z1 * z2)
Along with stereographic transform and its inverse you can do a lot.

This is directly related to the field of algebraic numbers.

With complex numbers you get translations, scaled rotations and reflections. Sufficient for Euclidean geometry.

chriswarbo•2h ago
Norman Wildberger takes this to the extreme with Rational Trigonometry https://en.wikipedia.org/wiki/Divine_Proportions:_Rational_T...

It eschews angles entirely, sticking to ratios. It avoids square roots by sticking to "quadrances" (squared distance; i.e. pythagoras/euclidean-distance without taking square roots).

I highly recommend Wildberger's extensive Youtube channels too https://www.youtube.com/@njwildberger and https://www.youtube.com/@WildEggmathematicscourses

He's quite contrarian, so I'd take his informal statements with a pinch of salt (e.g. that there's no such thing as Real numbers; the underlying argument is reasonable, but the grand statements lose all that nuance); but he ends up approaching many subjects from an interesting perspective, and presents lots of nice connections e.g. between projective geometry, linear algebra, etc.

srean•2h ago
He maybe considered contrarian but his math is sound.
storus•2h ago
In principle, wouldn't a change of basis be all that is needed?
srean•2h ago
It's a little more than change of basis, although change of basis is an important part of it. It converts many apparently trigonometric operations into algebraic ones, root finding included.

There are certain drawbacks. If the solution involves non-algebraic numbers there is no getting away from the transcendental numbers (that ultimately get approximated by algebraic numbers).

xeonmc•1h ago
This is just https://en.wikipedia.org/wiki/Rodrigues%27_rotation_formula
djmips•1h ago
This is avoiding an common but unnecesary round trip. When your inputs are vectors, angles are an unnecessary intermediate representation. You can substitute the geometric meaning of dot and cross product directly into the Rodrigues matrix and get by with less operations overall. It's more elegant, uses less instructions.
skrebbel•1h ago
The point isn't that formula, it's that using angles for parameters or intermediary values is often wasteful.
djmips•1h ago
Also see https://fgiesen.wordpress.com/2010/10/21/finish-your-derivat...
GistNoesis•1h ago
I think it boils down to the alternate view of rotations as two successive reflections.

You can then use householder matrix to avoid trigonometry.

These geometric math tricks are sometimes useful for efficient computations.

For example you can improve Vector-Quantization Variational AutoEncoder (VQ-VAE) using a rotation trick, and compute it efficiently without trigonometry using Householder matrix to find the optimal rotation which map one vector to the other. See section 4.2 of [1]

The question why would someone avoid trigonometry instead of looking toward it is another one. Trigonometry [2] is related to the study of the triangles and connect it naturally to the notion of rotation.

Rotations [3] are a very rich concept related to exponentiation (Multiplication is repeated addition, Exponentiation is repeated multiplication).

As doing things repeatedly tend to diverge, rotations are self stabilizing, which makes them good candidates as building blocks for the universe [4].

Because those operations are non commutative, tremendous complexity emerge just from the order in which the simple operations are repeated, yet it's stable by construction [5][6]

[0]https://en.wikipedia.org/wiki/Householder_transformation

[1]https://arxiv.org/abs/2410.06424

[2]https://en.wikipedia.org/wiki/Trigonometry

[3]https://en.wikipedia.org/wiki/Matrix_exponential

[4]https://en.wikipedia.org/wiki/Exponential_map_(Lie_theory)

[5]https://en.wikipedia.org/wiki/Geometric_algebra

[6]https://en.wikipedia.org/wiki/Clifford_algebra

the__alchemist•1h ago
I think this is more subjective than the author makes it out to be. I take a third approach: You can change out Matrices for Quaternions. Then do almost every operation using these two types, and a few operation between them. The operation implementations are a mix of dot products, quaternion multiplication, trig etc.

I find this flow works well because it's like building arbitrarily complex transformation by composing a few operations, so easy to keep in my head. Or maybe I just got used to it, and the key is find a stick with a pattern you're effective with.

So:

> For example, you are aligning a spaceship to an animation path, by making sure the spaceship's z axis aligns with the path's tangent or direction vector d.

Might be:

  let ship_z = ship.orientation.rotate_vec(Z_AXIS);
  let rotator = Quaternion::from_unit_vecs(ship_z.to_normalized(), path.to_normalized());

  ship.orientation *= rotator;
I should break this down into individual interoperations to compare this to the two examples in the article. To start, `from_unit_vecs` is based on the cross product, and `rotate_vec` is based on quaternion-vector multiplication. So no trig there. But `quaternion::from_axis_angle()` uses sin and cos.

I need to review for the sort of redundant operations it warns about, but from a skim, I'm only using acos for SLERP, and computing dihedral angles, which aren't really the basic building blocks. Not using atan. So maybe OK?

aleph_minus_one•52m ago
> You can change out Matrices for Quaternions.

Better use spin groups: they work in every dimension.

dxuh•1h ago
I agree that use of trigonometry is almost always a smell, but e.g. in games there are so many cases where angles are just more useful and intuitive. I just grep-ed for "angle" in a game of mine and I find it for orienting billboard particles (esp. for particles a single angle is much better than a quat for example). Also for an FPS camera controller. It's much simpler to just store a pitch and a yaw and change that with mouse movement, than storing a quat. You can't really look at a quat and know what kind of rotation it represents without opening a calculator. And I also use it for angle "fudging" so if you want to interact with something if you are roughly looking at it, you need to configure an angle range that should be allowed. It just makes sense to configure this as an angle, because we have some intuition for angles. So I guess for computations angles are probably usually wrong, but they are great for intuition (they are low-dimensional and linear in amount of rotation). That makes them a better human interface for rotations. And as soon as you computations start with angles, of course they find their way into the rest of the code.
eska•33m ago
Now, don't get me wrong. Trigonometry is convenient and necessary for data input and for feeding the larger algorithm.
20k•1h ago
>poorly designed third party APIs

I think this is missing the reason why these APIs are designed like this: because they're convenient and intuitive

Its rare that this kind of performance matters, or that the minor imprecisions of this kind of code matter at all. While its certainly true that we can write a better composite function, it also means that.. we have to write a completely new function for it

Breaking things up into simple, easy to understand, reusable representations is good. The complex part about this kinds of maths is not the code, its breaking up what you're trying to do into a set of abstracted concepts so that it doesn't turn into a maintenance nightmare

Where this really shows up more obviously is in more real-world library: axis angle rotations are probably a strong type with a lot of useful functions attached to it, to make your life easier. For maths there is always an abstraction penalty, but its usually worth the time saved, because 99.9999% of the time it simply doesn't matter

Add on top of this that this code would be optimised away with -ffast-math, and its not really relevant most of the time. I think everyone goes through this period when they think "lots of this trig is redundant, oh no!", but the software engineering takes priority generally

simonreiff•24m ago
Nice article! I'm not a graphics programmer but mathematically it makes full sense that cross-product would be a vast optimization over using `sin()`. From a complexity perspective, the computation of a cross-product reduces to calculating a formal determinant, a fixed number of arithmetic operations, and hence resolves to O(1) complexity. By contrast, computing `sin()` is O(M(n)log(n)) (even though faster algorithms are often possible in practice). See Brent, Fast multiple-precision evaluation of elementary functions (1976).