You can also use required checkboxes to make form elements (and their contents) in entirely separate DOM subtrees match the :invalid state, with hilarious opportunities for CSS.
> I’m starting to feel guilty spending months tinkering on these things when I’ve got the tools and skills to put actually useful stuff into the world. I feel like Superman, using his powers to fry an egg.
What’s the point of skills if not for stuff like this? I mean if I was Superman I’d totally use my powers to fry an egg.
Except of course if he fries that egg while he is supposed to save the world, or if by frying the egg he used too much energy, to now get defeated by the real thing.
Part of the charm of the Smallville series was Clark using his powers to do chores on the family farm. At one point, his Dad says he's able to do the work of four farmhands.
Amazing, my whole chromium 122.0.6261.94 on gnome arch linux became unresponsive with this demo. I think this kind of stuff is a good way to find security vulnerabilities :)
Haha, when first learning programming I implemented Conway's Game of Life using a table of checkboxes. I remember I showed it to my mentor and he cracked up. He thought it was very creative but to me it had just seemed like the obvious tool for the job. Glad to see I'm not the only one!
I know the sentiment isn't appreciated here, and I love a good hack as much as the next guy, but yeah, all I could think of is "you're just using bigger pixels".
Seems like a wholesome venture to me. After all the very foundations of computing rely on the ability to differentiate between two states. It is only by convention we call them "1" and "0", and historical circumstance that we (mostly) use vast arrays of nanoscale transistors in SRAM and DRAM to represent almost all modern states. But any system that has (at least) two distinguishable states is a valid basis for computation. So projects like this are not just fun but remind us of the fundamental arbitrariness of our interpretations.
The next project I'd like to see from him (assuming he's not serious about quitting!) is the use of checkboxes to represent the layout of RAM in a simplified computer, and the state of a CPU registers and pc, such that the grid represents an input and a sequence of binary-encoded instructions. Might be simpler to define your own architecture, or pick a simple one like ARM. Using this, implement a simple, ideally recursive, algorithm like finding the gcd of two inputs. (Hopefully the state is actually stored in the checkboxes and not just treated as a rendering of some other more conventionally modeled internal state, such that if you slowed down execution and started clicking you'd get...interesting results.)
I'm a little surprised no one has pointed out yet that this is incredibly close to cellular automata, which Wolfram has show can get you Turing completeness among other things.[1]
Wolfram's "New Kind of Science" almost certainly has tons of fun things for the author to play around with if so inclined.
I remember in the Visual Basic days, guys got really creative with games etc they would build by just using standard Windows Controls (UI elements), and no bitmaps.
This is a great way of teaching browser js (dom manipulation, etc.). I always think, for most people, building games (ie., building play time) is the best route into engineering of any kind.
I think it's awesome that one of the first comments suggested that he ported DOOM to the checkbox renderer, and then 3 days later someone else actually implements it: https://healeycodes.com/doom-rendered-via-checkboxes
Also the cool thing about using <input type="checkbox"> is that updating the checked status of each input doesn't cause reflow (as far as I can tell according to: https://gist.github.com/paulirish/5d52fb081b3570c81e3a). And using JS to check/uncheck an input doesn't update the DOM. If you inspect the DOM of https://www.bryanbraun.com/checkboxland/ you see absolutely nothing changing as all of the animations are running. That helps keep things speedy.
46 comments
[ 0.19 ms ] story [ 98.4 ms ] threadhttps://healeycodes.com/doom-rendered-via-checkboxes
I love that - wholesome.
No, no I hadn't. https://www.youtube.com/watch?v=KN0K58EfJSg&t=44s
Different era.
Please complete this form and have a seat.
What’s the point of skills if not for stuff like this? I mean if I was Superman I’d totally use my powers to fry an egg.
But would you be able to poach it?
It reminds me of the demo "Tides" (in the sense of demoscene) made out of sliders. The concept is well executed and synced with music:
https://www.youtube.com/watch?v=bUTPlQzfz1k
The next project I'd like to see from him (assuming he's not serious about quitting!) is the use of checkboxes to represent the layout of RAM in a simplified computer, and the state of a CPU registers and pc, such that the grid represents an input and a sequence of binary-encoded instructions. Might be simpler to define your own architecture, or pick a simple one like ARM. Using this, implement a simple, ideally recursive, algorithm like finding the gcd of two inputs. (Hopefully the state is actually stored in the checkboxes and not just treated as a rendering of some other more conventionally modeled internal state, such that if you slowed down execution and started clicking you'd get...interesting results.)
Wolfram's "New Kind of Science" almost certainly has tons of fun things for the author to play around with if so inclined.
[1] https://en.m.wikipedia.org/wiki/A_New_Kind_of_Science#Simple...
Heh, cool, but where is bad apple?
>Bad Apple on HTML Checkboxes
Damn...
Also the cool thing about using <input type="checkbox"> is that updating the checked status of each input doesn't cause reflow (as far as I can tell according to: https://gist.github.com/paulirish/5d52fb081b3570c81e3a). And using JS to check/uncheck an input doesn't update the DOM. If you inspect the DOM of https://www.bryanbraun.com/checkboxland/ you see absolutely nothing changing as all of the animations are running. That helps keep things speedy.