frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Free Programing Books

https://github.com/EbookFoundation/free-programming-books
90•fmfamaral•2h ago•10 comments

Tinnitus Neuromodulator

https://mynoise.net/NoiseMachines/neuromodulationTonesGenerator.php
100•gjvc•2h ago•64 comments

Attention Is a Luxury Good

https://seths.blog/2025/10/attention-is-a-luxury-good/
69•herbertl•3h ago•43 comments

1,180 root system drawings

https://images.wur.nl/digital/collection/coll13/search
121•bookofjoe•4h ago•21 comments

The IDEs we had 30 years ago ... and we lost (2023)

https://blogsystem5.substack.com/p/the-ides-we-had-30-years-ago-and
390•AlexeyBrin•5h ago•313 comments

Event Sourcing, CQRS and Micro Services: Real FinTech Example

https://lukasniessen.medium.com/this-is-a-detailed-breakdown-of-a-fintech-project-from-my-consult...
42•fmfamaral•2h ago•33 comments

Who invented deep residual learning?

https://people.idsia.ch/~juergen/who-invented-residual-neural-networks.html
31•timlod•5d ago•3 comments

./watch

https://dotslashwatch.com/
242•shrx•8h ago•66 comments

Liva AI (YC S25) Is Hiring

https://www.ycombinator.com/companies/liva-ai/jobs/inrUYH9-founding-engineer
1•ashlleymo•1h ago

Flowistry: An IDE plugin for Rust that focuses on relevant code

https://github.com/willcrichton/flowistry
48•Bogdanp•4h ago•8 comments

What Dynamic Typing Is For

https://unplannedobsolescence.com/blog/what-dynamic-typing-is-for/
19•hit8run•4d ago•7 comments

SQL Anti-Patterns You Should Avoid

https://datamethods.substack.com/p/sql-anti-patterns-you-should-avoid
151•zekrom•5h ago•102 comments

Andrej Karpathy – It will take a decade to work through the issues with agents

https://www.dwarkesh.com/p/andrej-karpathy
1029•ctoth•1d ago•917 comments

Ripgrep 15.0.0

https://github.com/BurntSushi/ripgrep/releases/tag/15.0.0
200•robin_reala•4h ago•49 comments

Lux: A luxurious package manager for Lua

https://github.com/lumen-oss/lux
38•Lyngbakr•5h ago•7 comments

Picturing Mathematics

https://mathenchant.wordpress.com/2025/10/18/picturing-mathematics/
12•jamespropp•2h ago•0 comments

New Work by Gary Larson

https://www.thefarside.com/new-stuff
428•jkestner•21h ago•110 comments

Atuin desktop: Runbooks that run

https://github.com/atuinsh/desktop
8•PaulHoule•2h ago•0 comments

Ruby Blocks

https://tech.stonecharioteer.com/posts/2025/ruby-blocks/
142•stonecharioteer•4d ago•82 comments

Fast calculation of the distance to cubic Bezier curves on the GPU

https://blog.pkh.me/p/46-fast-calculation-of-the-distance-to-cubic-bezier-curves-on-the-gpu.html
93•ux•9h ago•19 comments

Our Paint – a featureless but programmable painting program

https://www.WellObserve.com/OurPaint/index_en.html
23•ksymph•5d ago•4 comments

AMD's Chiplet APU: An Overview of Strix Halo

https://chipsandcheese.com/p/amds-chiplet-apu-an-overview-of-strix
135•zdw•14h ago•48 comments

Life, Work, Death and the Peasant, Part V: Life in Cycles

https://acoup.blog/2025/10/17/collections-life-work-death-and-the-peasant-part-v-life-in-cycles/
43•bell-cot•10h ago•5 comments

Rapid amyloid-β clearance and cognitive recovery by modulating BBB transport

https://www.nature.com/articles/s41392-025-02426-1
46•bookofjoe•3h ago•10 comments

The pivot

https://www.antipope.org/charlie/blog-static/2025/10/the-pivot-1.html
408•AndrewDucker•23h ago•191 comments

Cruz Godar Generative Art Gallery

https://cruzgodar.com/gallery/
35•bookofjoe•6d ago•2 comments

StageConnect: Behringer protocol is open source

https://github.com/OpenMixerProject/StageConnect
169•jdboyd•12h ago•92 comments

Live Stream from the Namib Desert

https://bookofjoe2.blogspot.com/2025/10/live-stream-from-namib-desert.html
541•surprisetalk•1d ago•98 comments

The Unix Executable as a Smalltalk Method [pdf]

https://programmingmadecomplicated.wordpress.com/wp-content/uploads/2025/10/onward25-jakubovic.pdf
124•pcfwik•17h ago•14 comments

The early Unix history of chown() being restricted to root

https://utcc.utoronto.ca/~cks/space/blog/unix/ChownRestrictionEarlyHistory
69•kencausey•5d ago•17 comments
Open in hackernews

Fast calculation of the distance to cubic Bezier curves on the GPU

https://blog.pkh.me/p/46-fast-calculation-of-the-distance-to-cubic-bezier-curves-on-the-gpu.html
93•ux•9h ago

Comments

amelius•6h ago
Cool. Maybe the next step can be to compute a set of bezier curves that (by a good approximation) closely cover the point-set that is exactly a given distance away from a given set of bezier curves.
jongjong•5h ago
Ok now all we need is an AI transformer model which can handle bezier curve embeddings as primitives instead of vector embeddings.
Lichtso•5h ago
> The next step is to work with chains of Bézier curves to make up complex shapes (such as font glyphs). It will lead us to build a signed distance field. This is not trivial at all and mandates one or several dedicated articles. We will hopefully study these subjects in the not-so-distant future.

If you only want to fill a path of bezier curves (e.g. for text rendering) you can do without the "distance" part from "signed distance field" [0], leaving you with a "signed field" aka. an implicit curve [1].

Meaning not having to calculate the exact distance but only the sign (inside or outside) can be done without all the crazy iterative root finding in an actually cheap manner with only four multiplications and one addition per pixel / fragment / sample for a rational cubic curve [3].

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

[1]: https://en.wikipedia.org/wiki/Implicit_curve

[2]: https://github.com/Lichtso/contrast_renderer/blob/a189d64a13...

ux•4h ago
Finding the sign of the distance has been extremely challenging to me in many ways, so I'm very curious about the approach you're presenting. The snippet you shared has a "a³-bcd ≤ 0" formula which is all I get without more context. Can you elaborate on it or provide resources?

The winding number logic is usually super involved, especially when multiple sub-shapes start overlap and subtracting each other. Is this covered or orthogonal to what you are talking about?

Lichtso•2h ago
> "a³-bcd ≤ 0" formula

These are the coefficients of the implicit curve, finding them can be done once upfront.

For integral quadratic bezier curves that is trivial as they are constant, see: https://www.shadertoy.com/view/fsXcDj

For rational cubic bezier curves it is more involved, see: https://www.shadertoy.com/view/ttVfzh

And for the full complexity of dealing with self intersecting loops and cusps see: https://github.com/Lichtso/contrast_renderer/blob/main/src/f...

> The winding number logic is usually super involved, especially when multiple sub-shapes start overlap and subtracting each other. Is this covered or orthogonal to what you are talking about?

Orthogonal: The implicit curve only tells you if you are inside or outside (the sign of the SDF), so that is technically sufficient, but usually you want more things: Some kind of anti-aliasing, composite shapes of more than one bezier curve and boolean operators for masking / clipping. Using the stencil buffer for counting the winding number allows to do all of that very easily without tessellation or decomposition at path intersections.

> Can you elaborate on it or provide resources?

If you are interested in the theory behind implicit curve rendering and how to handle the edge cases of cubic bezier curves checkout these papers:

Loop, Charles, and Jim Blinn. "Resolution independent curve rendering using programmable graphics hardware." https://www.microsoft.com/en-us/research/wp-content/uploads/...

BARROWCLOUGH, Oliver JD. "A basis for the implicit representation of planar rational cubic Bézier curves." https://arxiv.org/abs/1605.08669

ux•1h ago
Thanks, I'll look into this. BTW, your 2nd shadertoy link is off (maybe it's private?)
vlovich123•52m ago
But real shadows and lighting would require the distance aspect, no? The distance is only irrelevant for plain 2D text rendering, right?
Lichtso•47m ago
> The distance is only irrelevant for plain 2D text rendering, right?

Yes, as I said it is relevant for text rendering, but not necessarily 2D. It can also be embedded in a 3D perspective as long as the text itself is planar. Meaning you can directly render text in a 3D scene this way without rendering to a texture first.

> But real shadows and lighting would require the distance aspect, no?

I think the difference is in stroke vs fill, not the illumination (as you could still use shadow mapping / projection). In stroking you need to calculate an offset curve either explicitly or implicitly sample it from a signed distance field. Thus the exact distance matters for stroking, for filling it does not.

vlovich123•32m ago
Couldn’t you do stroking by doing a second fill operation on a slightly scaled down version of the first with the negative space color as the interior?
Lichtso•22m ago
Yep, stroking is just filling of the space between offset curves (aka. parallel curves), and that "slightly scaled down version of the first" is the "calculate an offset curve explicitly" approach I mentioned.

Though it is very unpractical because the offset curve of a cubic bezier curve is not a cubic bezier curve anymore, instead it is an analytic curve of degree 10. Thus, in practice the offset curves for stroking are either approximated by polygons or implicitly sampled from signed distance fields.

Raph Levien has a good blog post about it:

https://raphlinus.github.io/curves/2022/09/09/parallel-bezie...

One more thing: Offset curves are different form classical scaling from a center point in all but the most trivial cases where there exists such a center; namely regular polygons. And cubic bezier curves can be concave, even have a self intersecting loop or form a cusp.

0xml•3h ago
Last time I found a paper in Graphics Gems titled Solving the Nearest-Point-on-Curve Problem, which transforms the problem into a Bernstein polynomial form. Then an exact solution can be obtained using A Bézier Curve-Based Root-Finder. This is my implementation [1], but it's not very robust for high-degree cases.

[1] https://github.com/Long0x0/distance-to-bezier

jasonjmcghee•3h ago
Your link 404s- private repo?
0xml•3h ago
Oops, updated.
jasonjmcghee•3h ago
Possibly naive question, but at least in the context of using distance fields to store font glyphs, what's the cost of the analytical solution (distance field of N combined bezier curves) vs rasterize at "high enough" resolution and then perform jump flood
WithinReason•2h ago
this is a good question since for font rendering the length of each curve will usually be only a couple of pixels long
GistNoesis•2h ago
This is fundamentally a geometric problem and the author completely missed the geometry aspect by transforming everything into polynomials and root finding.

The naive generic way of finding distances from point P to curve C([0,1]) is a procedure quite standard for global minimization : repeat "find a local minimum on the space constrained to be better than any previous minimum"

- Find a point P0 local minimum of d(P,P0) subject to the constraint P0=C(t0) (aka P0 is on C)

- define d0 = d(P,P0)

- Bisect the curve at t1 into two curves C1 = C([0,t0]) and C2([t0,1])

- Find a point P1 local minimum of d(P,P1) subject to the constraint P1=C(t1) with 0< t1 < t0 (aka P1 on c1) and the additional constraint d(P,P1) < d0 (note here the inequality is strict so that we won't find P0 again) if it exist.

- define d1 = d(P,P1)

- Find a point P2 local minimum of d(P,P2) subject to the constraint P2=C(t2) with t0 < t2 < 1 (aka P2 on c2) and the additional constraint d(P,P2) < d0 (note here the inequality is strict so that we won't find P0 again) if it exist.

- define d2 = d(P,P2)

Here in the case of cubic Bezier the curve have only one loop so you don't need to bissect anymore. If curves where higher order like spirals, you would need to cascade the problems with a shrinking distance constraint (aka looking only for points in R^2 inside the circle

So the distance is min over all local minimum found = min( d0,d1,d2)

Here the local minimization problems are in R^n (and inside disks centered around P) with n the dimension of the space, and because this is numerical approximation, you can either use slack (dual) variables to find the tx which express the on Curve constraint or barrier methods to express the disk constraints once a t parametrization has been chosen.

Multivariate Newton is guaranteed to work because distances are positive so the Sequential Quadratic Programming problems are convex (scipy minimize "SLSQP"). (Whereas the author needed 5 polynomials root, you can only need to solve for 3 points because each solve solves for two coordinates).

A local minimum is a point which satisfy the KKT conditions.

This procedure is quite standard : it's for example use to find the eigenvalues of matrices iteratively. Or finding all solutions to a minimization problem.

Where this procedure shines, is when you have multiple splines, and you want to find the minimal distance to them : you can partition the space efficiently and not compute distances to part of curves which are to far away to have a chance to be a minimum. This will scale independently of the resolution of your chain spline. (imagine a spiral the number of local minimum you need to encounter are proportional to the complexity of the scene and not the resolution of the spiral)

But when you are speaking about computing the whole signed distance field, you should often take the step of solving the Eikonal equation over the space instead of computing individual distances.

ux•1h ago
I'm interested in the approach you're describing but it's hard to follow a comment in the margin. Is there a paper or an implementation example somewhere?
atilimcetin•2h ago
I had to deal with the same problem on a GPU once. What worked for me was subdividing the cubic Bezier curve into smaller quadratic ones and then finding the roots of a cubic polynomial for each.
phkahler•55m ago
This looks like new developments. Has any of it been applied to rational beziers of degree 3?