frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

They Hijacked Our Tech [video]

https://www.youtube.com/watch?v=-nJM5HvnT5k
1•cedel2k1•2m ago•0 comments

Vouch

https://twitter.com/mitchellh/status/2020252149117313349
1•chwtutha•2m ago•0 comments

HRL Labs in Malibu laying off 1/3 of their workforce

https://www.dailynews.com/2026/02/06/hrl-labs-cuts-376-jobs-in-malibu-after-losing-government-work/
2•osnium123•3m ago•1 comments

Show HN: High-performance bidirectional list for React, React Native, and Vue

https://suhaotian.github.io/broad-infinite-list/
1•jeremy_su•4m ago•0 comments

Show HN: I built a Mac screen recorder Recap.Studio

https://recap.studio/
1•fx31xo•7m ago•0 comments

Ask HN: Codex 5.3 broke toolcalls? Opus 4.6 ignores instructions?

1•kachapopopow•12m ago•0 comments

Vectors and HNSW for Dummies

https://anvitra.ai/blog/vectors-and-hnsw/
1•melvinodsa•14m ago•0 comments

Sanskrit AI beats CleanRL SOTA by 125%

https://huggingface.co/ParamTatva/sanskrit-ppo-hopper-v5/blob/main/docs/blog.md
1•prabhatkr•26m ago•1 comments

'Washington Post' CEO resigns after going AWOL during job cuts

https://www.npr.org/2026/02/07/nx-s1-5705413/washington-post-ceo-resigns-will-lewis
2•thread_id•26m ago•1 comments

Claude Opus 4.6 Fast Mode: 2.5× faster, ~6× more expensive

https://twitter.com/claudeai/status/2020207322124132504
1•geeknews•28m ago•0 comments

TSMC to produce 3-nanometer chips in Japan

https://www3.nhk.or.jp/nhkworld/en/news/20260205_B4/
3•cwwc•30m ago•0 comments

Quantization-Aware Distillation

http://ternarysearch.blogspot.com/2026/02/quantization-aware-distillation.html
1•paladin314159•31m ago•0 comments

List of Musical Genres

https://en.wikipedia.org/wiki/List_of_music_genres_and_styles
1•omosubi•33m ago•0 comments

Show HN: Sknet.ai – AI agents debate on a forum, no humans posting

https://sknet.ai/
1•BeinerChes•33m ago•0 comments

University of Waterloo Webring

https://cs.uwatering.com/
1•ark296•33m ago•0 comments

Large tech companies don't need heroes

https://www.seangoedecke.com/heroism/
1•medbar•35m ago•0 comments

Backing up all the little things with a Pi5

https://alexlance.blog/nas.html
1•alance•35m ago•1 comments

Game of Trees (Got)

https://www.gameoftrees.org/
1•akagusu•36m ago•1 comments

Human Systems Research Submolt

https://www.moltbook.com/m/humansystems
1•cl42•36m ago•0 comments

The Threads Algorithm Loves Rage Bait

https://blog.popey.com/2026/02/the-threads-algorithm-loves-rage-bait/
1•MBCook•38m ago•0 comments

Search NYC open data to find building health complaints and other issues

https://www.nycbuildingcheck.com/
1•aej11•42m ago•0 comments

Michael Pollan Says Humanity Is About to Undergo a Revolutionary Change

https://www.nytimes.com/2026/02/07/magazine/michael-pollan-interview.html
2•lxm•43m ago•0 comments

Show HN: Grovia – Long-Range Greenhouse Monitoring System

https://github.com/benb0jangles/Remote-greenhouse-monitor
1•benbojangles•48m ago•1 comments

Ask HN: The Coming Class War

2•fud101•48m ago•4 comments

Mind the GAAP Again

https://blog.dshr.org/2026/02/mind-gaap-again.html
1•gmays•49m ago•0 comments

The Yardbirds, Dazed and Confused (1968)

https://archive.org/details/the-yardbirds_dazed-and-confused_9-march-1968
2•petethomas•50m ago•0 comments

Agent News Chat – AI agents talk to each other about the news

https://www.agentnewschat.com/
2•kiddz•51m ago•0 comments

Do you have a mathematically attractive face?

https://www.doimog.com
3•a_n•55m ago•1 comments

Code only says what it does

https://brooker.co.za/blog/2020/06/23/code.html
2•logicprog•1h ago•0 comments

The success of 'natural language programming'

https://brooker.co.za/blog/2025/12/16/natural-language.html
1•logicprog•1h ago•0 comments
Open in hackernews

Fizz Buzz in CSS

https://susam.net/fizz-buzz-in-css.html
110•froober•2mo ago

Comments

kevinsync•2mo ago
I love this, it's a very clever and funny way to solve the problem. Makes me think about how there are infinite routes from A to B, some more scenic and whimsical than others.. as well as all the people I've met along the way who would be so pissed and pedantic about how this isn't a "real solution" LOL
hyperhello•2mo ago
The problem is that you have to define the problem enough to avoid the fact that it's trivial to output the string "1,2,Fizz,4,Buzz,......" and fulfill the assignment. You can, in fact, output "$1,$2,Fizz,$4,Buzz,..." where $ is any prefix itself divisible by 15 (there are other templates for the other situations but it clearly does repeat endlessly.)
susam•2mo ago
A shorter solution is possible with an ordered list (<ol>) if we're willing to ignore the untidy output:

  li:nth-child(3n), li:nth-child(5n) { list-style: none }
  li:nth-child(3n)::before { content: "Fizz" }
  li:nth-child(5n)::after { content: "Buzz" }
Example: https://susam.net/code/web/css-fizz-buzz-ol.html

  $ curl -sS https://susam.net/code/web/css-fizz-buzz-ol.html | sed -n '/none/,/after/p' |  tr -d '[:space:]' 
  li:nth-child(3n),li:nth-child(5n){list-style:none}li:nth-child(3n)::before{content:"Fizz"}li:nth-child(5n)::after{content:"Buzz"}
  $ curl -sS https://susam.net/code/web/css-fizz-buzz-ol.html | sed -n '/none/,/after/p' |  tr -d '[:space:]' | wc -c
  129
But I don't quite like how misaligned the numbers and the words look in this version. Correcting that would call for extra code that would cancel out the characters saved.
cluckindan•2mo ago

    list-style-position: inside;
susam•2mo ago
Yes! However, like I mentioned in my previous comment, corrections like this cancel out the number of bytes saved with the <ol>-based solution.

I mean, the solution in the original post is 152 characters long.

The <ol> based solution is 129 characters long. Shorter but uglier.

If we add your correction, we get neater output, which is nice, but it comes at the cost of 30 additional characters in the minified code thereby making the solution 159 characters long.

  li { list-style-position: inside }
  li:nth-child(3n), li:nth-child(5n) { list-style: none }
  li:nth-child(3n)::before { content: "Fizz" }
  li:nth-child(5n)::after { content: "Buzz" }
carl_dr•2mo ago
Ignoring the size of the HTML in addition to the CSS, it’s fun, but not really fair when talking about code golf. Beyond a few numbers, you need to include some JavaScript and generating a million list elements. But those bytes count …
graiz•2mo ago
145 using P instead of li.

<style> p{counter-increment:n} p:not(:nth-child(5n)):before{content:counter(n)} p:nth-child(3n):before{content:"Fizz"} p:nth-child(5n):after{content:"Buzz"} </style><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>

rebane2001•2mo ago
im not sure how you counted that as 145, but here's 137 for the css

<style>p{--n:counter(n);counter-increment:n;&:before{content:var(--n)};&:nth-child(5n){--n:"";&:after{content:"Buzz"}}&:nth-child(3n){--n:"Fizz"</style><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>

dsmmcken•2mo ago
144, using css variables, with fallback and p instead of li

https://codepen.io/dsmmcken/pen/WbwYOEQ?editors=0100

p{counter-increment:n;--n:counter(n)}p:nth-child(3n){--f:"Fizz"}p:nth-child(5n){--b:"Buzz";--n:''}p::after{content:var(--f,var(--n))var(--b,'')}

genezeta•2mo ago
To nitpick a bit, I'd say there is something that is "placed outside the stylesheet".

Now, arguably it's not a "number or word that appears in the output", that's true, but it is a part of the logic of FizzBuzz. It's the fact that there are 100 and exactly 100 <li> elements in the HTML part.

I mean, it wouldn't be a correct FizzBuzz without precisely that HTML. Having exactly 100 <li> elements is implementing the part of the logic that a. loops, and b. stops at 100.

But of course this is just nitpicking, as I said ;)

culi•2mo ago
HTML is just the runtime of CSS
Metaboat•2mo ago
104 :nth-child(3n){list-style:"Fizz"}:nth-child(5n){list-style:"Buzz"}:nth-child(15n){list-style:"FizzBuzz"}

data:text/html,<style>:nth-child(3n){list-style:"Fizz"}:nth-child(5n){list-style:"Buzz"}:nth-child(15n){list-style:"FizzBuzz"}</style><ol id=o><script>o.innerHTML='<li>'.repeat(99)</script>

Metaboat•2mo ago
103 :nth-child(3n){list-style:"Fizz"}:nth-child(5n){list-style:"Buzz"}:nth-child(15n){list-style:"FizzBuzz"
Metaboat•2mo ago
98 :nth-child(5n){list-style:""}:nth-child(3n){list-style:"Fizz"}:nth-child(5n)::after{content:"Buzz"
Metaboat•2mo ago
95 :nth-child(5n){list-style:}:nth-child(3n){list-style:"Fizz"}:nth-child(5n)::after{content:"Buzz
Metaboat•2mo ago
68 :nth-child(3n){list-style:"Fizz"}:nth-child(5n)::after{content:"Buzz
eurleif•2mo ago
67 :nth-child(3n){list-style:"Fizz"}:nth-child(5n):after{content:"Buzz
Metaboat•2mo ago
thank you sir! i can improve the html op css was 152, we have the whole page at 144

data:text/html,<ol id=o><script>o.innerHTML='<li>'.repeat(100)</script><style>:nth-child(3n){list-style:"Fizz"}:nth-child(5n):after{content:"Buzz

throwaway150•2mo ago
Your code is showing the numbers 5, 10, 20. that's not correct, is it?

Yours prints 1. 2. Fizz 4. 5. Buzz Fizz 7.

But it should be 1. 2. Fizz 4. Buzz Fizz 7.

bulmenisaurus•2mo ago
This version fails for numbers like 5, showing "5. Buzz". In the case of a number divisible by 5 but not 3 nothing prevents the 5 in the ::marker from rendering.

Edit: it looks like your version can be fixed into a working 85:

  :nth-child(5n){list-style:'';&:after{content:"Buzz"}}:nth-child(3n){list-style:"Fizz"
cefqrn•2mo ago
89: :nth-child(3n)::marker{content:"Fizz"var(--b,)}:nth-child(5n){list-style:"Buzz";--b:"Buzz

with help from @bulmenisaurus

smrq•2mo ago
Am I the only one here who's never seen CSS counters before? Interesting feature, what are they useful for practically?