frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

2D Signed Distance Functions

https://iquilezles.org/articles/distfunctions2d/
51•nickswalker•3d ago

Comments

on_the_train•1h ago
I come back every couple of months when I have a new project involving sdfs. And almost every time it's a bit of trial and error figuring out the parameters. It's workable, but a minor pet peeve that they're not described or named better.

It's a priceless resource nevertheless.

RogerL•1h ago
I was just about to say the same thing. This is bad code/documentation. Single letter variable names is almost always wrong if it isn't i for an index or such (and even then, would typing 'idx' kill you?). And as parameters, so much worse. Don't make me guess how to call your function please.
Lerc•59m ago
Can you freely compose signed distance functions? Obviously people use them for + and - regularly. My intuition says you should be able to apply *, / and more as well.

and sqrt( sdEquilateralTriangle(pos.xy, 10)**2 + sdCircle(pos.xz,10)**2 )

seems like there's scope for a nice little domain specific language to.

I think it would be interesting to have some composite operations that did probabilistic branching based upon a hashing RNG to conditionally combine shapes

something like

    float thingy(pos,r) {
      float more = infinity
      float pseudoRandom = HashToUnit(pos) 
      if (pseudoRandom >0.5) {
        float direction=randomAngleFromSeed(pseudoRandom+r)
        more = thingy(pos+direction*r, r*0.75) 
      }
      return  min(circle(pos,r),more)
    }
sebastianmestre•23m ago
You can take the minimum of two SDFs, which more or less gives you an SDF for their union. The maximum is the intersection. A few years ago I wrote a DSL that writes the SDFs for you, for my university programming languages course. https://github.com/SebastianMestre/school/tree/master/univer...

Stepping down as Mockito maintainer after 10 years

https://github.com/mockito/mockito/issues/3777
19•saikatsg•50m ago•0 comments

Rust errors without dependencies

https://vincents.dev/blog/rust-errors-without-dependencies/
27•vsgherzi•16h ago•15 comments

Growing up in “404 Not Found”: China's nuclear city in the Gobi Desert

https://substack.com/inbox/post/182743659
603•Vincent_Yan404•14h ago•263 comments

Remembering Lou Gerstner

https://newsroom.ibm.com/2025-12-28-Remembering-Lou-Gerstner
30•thm•2h ago•11 comments

No it's not a Battleship

https://www.navalgazing.net/No-its-not
44•hermitcrab•1h ago•39 comments

Calendar

https://neatnik.net/calendar/?year=2026
862•twapi•16h ago•108 comments

Global Memory Shortage Crisis: Market Analysis

https://www.idc.com/resource-center/blog/global-memory-shortage-crisis-market-analysis-and-the-po...
56•naves•5h ago•35 comments

Building a macOS app to know when my Mac is thermal throttling

https://stanislas.blog/2025/12/macos-thermal-throttling-app/
169•angristan•9h ago•75 comments

Replacing JavaScript with Just HTML

https://www.htmhell.dev/adventcalendar/2025/27/
636•soheilpro•19h ago•235 comments

Learn computer graphics from scratch and for free

https://www.scratchapixel.com
104•theusus•9h ago•9 comments

Designing Predictable LLM-Verifier Systems for Formal Method Guarantee

https://arxiv.org/abs/2512.02080
39•PaulHoule•6h ago•6 comments

Never Use Pixelation to Hide Sensitive Text (2014)

https://dheera.net/posts/20140725-why-you-should-never-use-pixelation/
92•basilikum•1w ago•29 comments

One year of keeping a tada list

https://www.ducktyped.org/p/one-year-of-keeping-a-tada-list
182•egonschiele•6d ago•52 comments

tc-ematch(8) extended matches for use with "basic", "cgroup" or "flow" filters

https://man7.org/linux/man-pages/man8/tc-ematch.8.html
22•hamonrye•4h ago•0 comments

Vibration Isolation of Precision Objects (2005) [pdf]

http://www.sandv.com/downloads/0607rivi.pdf
8•nill0•6d ago•0 comments

Floor796

https://floor796.com/
948•krtkush•1d ago•112 comments

Last Year on My Mac: Look Back in Disbelief

https://eclecticlight.co/2025/12/28/last-year-on-my-mac-look-back-in-disbelief/
353•vitosartori•10h ago•238 comments

We "solved" C10K years ago yet we keep reinventing it (2003)

https://www.kegel.com/c10k.html
83•birdculture•2d ago•49 comments

2D Signed Distance Functions

https://iquilezles.org/articles/distfunctions2d/
51•nickswalker•3d ago•4 comments

Rex is a safe kernel extension framework that allows Rust in the place of eBPF

https://github.com/rex-rs/rex
130•zdw•5d ago•57 comments

How we lost communication to entertainment

https://ploum.net/2025-12-15-communication-entertainment.html
628•8organicbits•1d ago•351 comments

Langfuse (YC W23) Is Hiring in Berlin, Germany

https://langfuse.com/careers
1•clemo_ra•9h ago

Hungry Fat Cells Could Someday Starve Cancer

https://www.ucsf.edu/news/2025/01/429411/how-hungry-fat-cells-could-someday-starve-cancer-death
125•mrtnmrtn•11h ago•31 comments

Deathbed Advice/Regret

https://hazn.com/deathbed-regret
39•paulpauper•3h ago•24 comments

Fathers’ choices may be packaged and passed down in sperm RNA

https://www.quantamagazine.org/how-dads-fitness-may-be-packaged-and-passed-down-in-sperm-rna-2025...
272•vismit2000•19h ago•169 comments

Gpg.fail

https://gpg.fail
423•todsacerdoti•1d ago•274 comments

A "Prime" View of HN

https://dosaygo-studio.github.io/prime-news/index.html
41•keepamovin•3h ago•22 comments

Rainbow Six Siege hacked as players get billions of credits and random bans

https://www.shanethegamer.com/esports-news/rainbow-six-siege-hacked-global-server-outage/
270•erhuve•1d ago•138 comments

Dialtone – AOL 3.0 Server

https://dialtone.live/
101•rickcarlino•17h ago•48 comments

Functional programming and reliability: ADTs, safety, critical infrastructure

https://blog.rastrian.dev/post/why-reliability-demands-functional-programming-adts-safety-and-cri...
138•rastrian•20h ago•136 comments