Live data from Hacker News

Show HN: MineSweeper implemented in 100% CSS and HTML – no JavaScript

github.com

21–30 of 97 posts

Re: Show HN: MineSweeper implemented in 100% CSS and HTML – no JavaScript

#21

Idle question, is CSS/HTML turing complete? If so I look forward to a Show HN of a CSS/HTML emulator of JSMESS emulating a 386 running Windows 98.

My understanding is that:

Neither CSS nor HTML is turing complete.

The combination of CSS and HTML together is not quite turing complete either.

The combination of CSS and HTML plus an external source that repeated clicks the mouse is turing complete.

I could be remembering this wrong, however.

Re: Show HN: MineSweeper implemented in 100% CSS and HTML – no JavaScript

#22

Idle question, is CSS/HTML turing complete? If so I look forward to a Show HN of a CSS/HTML emulator of JSMESS emulating a 386 running Windows 98.

I would say no because the core boolean mechanic that allows CSS-Sweeper to exist cannot be inverted directly (NOT, !). In order to invert anything here, you have to start with an inverted copy of every bit and do the opposite calculation at every &, |, etc to always have a "NOT" var to reference. Like a shadowy, anti-vein, copy of the main logic.

There are several edge cases where a sort of simile of NOT is possible though. You can branch from truthy/falsey into falsy/truthy numbers. And if is something is falsey you can "else" into another action.

Just can't "else" from a truthy state without the ...anti-vein... always being present.

Re: Show HN: MineSweeper implemented in 100% CSS and HTML – no JavaScript

#24
Good stuff! I made a sudoku in CSS (https://identicalsnowflake.github.io/sudoku.html) a while back, but it looks like the variable trick mentioned in the readme is a more straightforward way to embed logic, so if I were to make something similar today, I'd probably pursue that route.

Re: Show HN: MineSweeper implemented in 100% CSS and HTML – no JavaScript

#26
post #11

Very cool. CSS can do some amazing stuff these days. I made a game using moving checkboxes recently - https://codepen.io/onion2k/pen/qBbKYee - with a timer and scoring. It's a fun challenge to avoid JS.

I saw that a few days before I started making this actually! https://news.ycombinator.com/item?id=23867569

I always wonder what kind of cool stuff HN inspires. There has to be tons. Is there a list?

Re: Show HN: MineSweeper implemented in 100% CSS and HTML – no JavaScript

#28

This is very slow in my browser, which I don't mean as a criticism. Just refreshing to see something be slow that uses no JS at all :D

It is rather ironic that the chief complaints about JS are how it makes things bloated and unresponsive, yet this is 100x the size of http://www.play-minesweeper.com and the time to interactivity is recognizable by comparison. The HN community is a funny one, sometimes.

Re: Show HN: MineSweeper implemented in 100% CSS and HTML – no JavaScript

#30

This is very slow in my browser, which I don't mean as a criticism. Just refreshing to see something be slow that uses no JS at all :D

It is rather ironic that the chief complaints about JS are how it makes things bloated and unresponsive, yet this is 100x the size of http://www.play-minesweeper.com and the time to interactivity is recognizable by comparison. The HN community is a funny one, sometimes.

The OP is a 1.23MB tech demo in CSS absurdism, not a baseline for performance comparisons. You have the wrong take-away if you think you can squeeze any sort of performance point from this.

It's like seeing that fun tech demo that implements Brainfuck in Rust's type system and going "heh, and they said compiled languages were fast? I can do this faster in PHP!"

Post reply on HN