frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Show HN: Moli P2P – An ephemeral, serverless image gallery (Rust and WebRTC)

https://moli-green.is/
1•ShinyaKoyano•8m ago•0 comments

The Crumbling Workflow Moat: Aggregation Theory's Final Chapter

https://twitter.com/nicbstme/status/2019149771706102022
1•SubiculumCode•13m ago•0 comments

Pax Historia – User and AI powered gaming platform

https://www.ycombinator.com/launches/PMu-pax-historia-user-ai-powered-gaming-platform
2•Osiris30•13m ago•0 comments

Show HN: I built a RAG engine to search Singaporean laws

https://github.com/adityaprasad-sudo/Explore-Singapore
1•ambitious_potat•19m ago•0 comments

Scams, Fraud, and Fake Apps: How to Protect Your Money in a Mobile-First Economy

https://blog.afrowallet.co/en_GB/tiers-app/scams-fraud-and-fake-apps-in-africa
1•jonatask•19m ago•0 comments

Porting Doom to My WebAssembly VM

https://irreducible.io/blog/porting-doom-to-wasm/
1•irreducible•20m ago•0 comments

Cognitive Style and Visual Attention in Multimodal Museum Exhibitions

https://www.mdpi.com/2075-5309/15/16/2968
1•rbanffy•21m ago•0 comments

Full-Blown Cross-Assembler in a Bash Script

https://hackaday.com/2026/02/06/full-blown-cross-assembler-in-a-bash-script/
1•grajmanu•26m ago•0 comments

Logic Puzzles: Why the Liar Is the Helpful One

https://blog.szczepan.org/blog/knights-and-knaves/
1•wasabi991011•38m ago•0 comments

Optical Combs Help Radio Telescopes Work Together

https://hackaday.com/2026/02/03/optical-combs-help-radio-telescopes-work-together/
2•toomuchtodo•43m ago•1 comments

Show HN: Myanon – fast, deterministic MySQL dump anonymizer

https://github.com/ppomes/myanon
1•pierrepomes•49m ago•0 comments

The Tao of Programming

http://www.canonical.org/~kragen/tao-of-programming.html
1•alexjplant•50m ago•0 comments

Forcing Rust: How Big Tech Lobbied the Government into a Language Mandate

https://medium.com/@ognian.milanov/forcing-rust-how-big-tech-lobbied-the-government-into-a-langua...
2•akagusu•50m ago•0 comments

PanelBench: We evaluated Cursor's Visual Editor on 89 test cases. 43 fail

https://www.tryinspector.com/blog/code-first-design-tools
2•quentinrl•53m ago•2 comments

Can You Draw Every Flag in PowerPoint? (Part 2) [video]

https://www.youtube.com/watch?v=BztF7MODsKI
1•fgclue•58m ago•0 comments

Show HN: MCP-baepsae – MCP server for iOS Simulator automation

https://github.com/oozoofrog/mcp-baepsae
1•oozoofrog•1h ago•0 comments

Make Trust Irrelevant: A Gamer's Take on Agentic AI Safety

https://github.com/Deso-PK/make-trust-irrelevant
6•DesoPK•1h ago•2 comments

Show HN: Sem – Semantic diffs and patches for Git

https://ataraxy-labs.github.io/sem/
1•rs545837•1h ago•1 comments

Hello world does not compile

https://github.com/anthropics/claudes-c-compiler/issues/1
33•mfiguiere•1h ago•20 comments

Show HN: ZigZag – A Bubble Tea-Inspired TUI Framework for Zig

https://github.com/meszmate/zigzag
3•meszmate•1h ago•0 comments

Metaphor+Metonymy: "To love that well which thou must leave ere long"(Sonnet73)

https://www.huckgutman.com/blog-1/shakespeare-sonnet-73
1•gsf_emergency_6•1h ago•0 comments

Show HN: Django N+1 Queries Checker

https://github.com/richardhapb/django-check
1•richardhapb•1h ago•1 comments

Emacs-tramp-RPC: High-performance TRAMP back end using JSON-RPC instead of shell

https://github.com/ArthurHeymans/emacs-tramp-rpc
1•todsacerdoti•1h ago•0 comments

Protocol Validation with Affine MPST in Rust

https://hibanaworks.dev
1•o8vm•1h ago•1 comments

Female Asian Elephant Calf Born at the Smithsonian National Zoo

https://www.si.edu/newsdesk/releases/female-asian-elephant-calf-born-smithsonians-national-zoo-an...
5•gmays•1h ago•0 comments

Show HN: Zest – A hands-on simulator for Staff+ system design scenarios

https://staff-engineering-simulator-880284904082.us-west1.run.app/
1•chanip0114•1h ago•1 comments

Show HN: DeSync – Decentralized Economic Realm with Blockchain-Based Governance

https://github.com/MelzLabs/DeSync
1•0xUnavailable•1h ago•0 comments

Automatic Programming Returns

https://cyber-omelette.com/posts/the-abstraction-rises.html
1•benrules2•1h ago•1 comments

Why Are There Still So Many Jobs? The History and Future of Workplace Automation [pdf]

https://economics.mit.edu/sites/default/files/inline-files/Why%20Are%20there%20Still%20So%20Many%...
2•oidar•1h ago•0 comments

The Search Engine Map

https://www.searchenginemap.com
1•cratermoon•2h ago•0 comments
Open in hackernews

Rolling the dice with CSS random()

https://webkit.org/blog/17285/rolling-the-dice-with-css-random/
145•zdw•5mo ago

Comments

gherkinnn•5mo ago
Nice. Currently I have to set CSS custom properties with JS to achieve the same effect.

Wonderful to see how CSS gets a usable random function before JS does.

noman-land•5mo ago
Maybe "usable" is your qualifier but what's wrong with Math.random()?
tsujp•5mo ago
JS also has Crypto.getRandomValues()
akdev1l•5mo ago
To generate random number in a specific range you need to do something I always forget and need to google.

    Math.floor(Math.random() * (max - min + 1)) + min;

(Google AI summary says this is the thing)

The CSS function would be random(min, max)

Also the CSS function seems to take a number of steps, it is not immediately obvious to me how to do that with Math.random()

sdenton4•5mo ago
Why not add a Math.randint?

I imagine there's some deep ideological war over whether to add more programming functionality to css...

ameliaquining•5mo ago
Currently under discussion in the standards committee: https://tc39.es/proposal-random-functions/
ameliaquining•5mo ago

    Math.floor(Math.random() * Math.floor((max - min) / step)) * step + min
ballenf•5mo ago
So now we can add a random data prop to a hidden dom element, then query that from JS. You know, to make your JS random function simpler. ;)
gherkinnn•5mo ago
That was my second idea. I've done worse.
jvdvegt•5mo ago
Nice but... no dice!
Tepix•5mo ago
Related: Animated starfield in pure CSS

https://codepen.io/ArneSava/pen/BaWxOaR

lelandfe•5mo ago
Really laggy on an M1 MBP; probably `box-shadow`'s fault.
Tepix•5mo ago
Have you tried different browsers?
kachapopopow•5mo ago
I yern for the day we can have react-type pages without any javascript. Keep chugging webkit I believe in you.
hannob•5mo ago
Having seen too many "this randomness function was never meant to be used for security, but people use it for security anyway" vulnerabilities in the past:

Can we PLEASEPLEASEPLEASE have this secure by default from the beginning?

1718627440•5mo ago
Security in the Stylesheet? Come on, you need to set boundaries for expectable use.
phyzome•5mo ago
"Look, I implemented diceware in pure CSS!" is unfortunately not that hard to imagine.

I would bet someone is already working on it as we speak.

1718627440•5mo ago
I don't disagree on that point.

Introducing cryptography in the STANDARD for stylesheets adds complexity where it doesn't belong. Ultimately a browser vendor isn't responsible when a company sells insecure cryptography.

Adding crypto to CSS will bring us nearer to bitcoin mining in the CSS engine.

bigDinosaur•5mo ago
If you implement security protocols in a production app using CSS then you deserve to be hacked and then sued for negligence.
RestartKernel•5mo ago
Counterargument: it would make for a very funny post-mortem.
demurgos•5mo ago
Where is the spec? I can't find an entry on MDN.

Is there a way to get reproducibility? In the same browser or across browsers? Even if it's not the default mode.

twiss•5mo ago
Spec: https://www.w3.org/TR/css-values-5/#randomness

WPT test results: https://wpt.fyi/results/css/css-values?label=master&label=ex...

Only Safari supports it for now, it seems.

ameliaquining•5mo ago
And only in a prerelease build; no browser has yet shipped this to users by default.
JKCalhoun•5mo ago
Perhaps you can set the seed to a fixed value on page loads? I kind of like the idea of the same "random" star field even if the user refreshes the page. Or rather, it would somewhat bother me if it changed for a refresh since a refresh is supposed to simply re-present the same web page.
chipsrafferty•5mo ago
Says who? Why would I refresh to see the same page? Usually I refresh because I want to see some different content.
Analemma_•5mo ago
The starfield example is cool but it seems like that might be exactly where random() wouldn’t work as well as people hope: true randomness often looks pretty bad when you want to make graphics out of it, because true randomness has clumps and voids, and a lot of observers think it looks less random than pseudorandom sequences with more evenly-spaced points.

The term for this is “low-discrepancy sequences”, there have been a handful of HN posts on it over the years. I know I’m bikeshedding the API already before it even really exists, but for image presentation I think a lot of applications might actually find that more useful.

capitainenemo•5mo ago
This seems like a good opportunity to bring up the old, more hacky, but also more performant and predictable CSS random effect using backgrounds of prime number sizes to achieve a "random" distribution. The "cicada principle"

https://www.sitepoint.com/the-cicada-principle-and-why-it-ma...

https://lea.verou.me/blog/2020/07/the-cicada-principle-revis...

In this case you would use multiple transparent tiles of different star patterns (images, or gradient/clip-path tricks), each one a different prime number in size. It should work with anything you can tile and overlay in CSS though.

pstuart•5mo ago
I'm not sure if I'll ever get a chance to use that but it was very informative nonetheless.
capitainenemo•5mo ago
(oh, I should note that the 2nd link uses nth selector to apply any rules pseudo-randomly, not just tiles) ... and, hm, I guess you could "seed" the pseudorandom nth selectors if your pages had unique attribute selectors, by adjusting the primes and offsets. Like with drupal you could do different ones based on digits of the nid in the body tag.
ericyd•5mo ago
These examples feel a bit contrived, are there any other cases where random CSS values would be useful? I don't often reach for randomness when doing business apps.
EduardoBautista•5mo ago
I can only imagine the groundbreaking and innovative MySpace themes that would have been possible with this new random technology.