Show HN: Fall asleep by watching JavaScript load

github.com

61 points by sarusso 12 hours ago


netsharc - 11 hours ago

Not criticism, just explaining a problem I noticed and would make a fun exercise in CSS, or JS: When a letter appears at the end of the line, the reflow (to make sure the whole text is centered) is not smooth, of course it isn't because the text is now n+1 characters wide and the rendering engine has probably been instructed to center it without any fancy delays. I wonder how to achieve a smooth "growth" of line.

I suppose one could render the text off-screen or in an invisible DIV, measure how many letters it has on the target display, find the time to render the line (if the text shows at 2 chars/sec, 20 chars takes 10 seconds to render), measure how wide the element is with the 20 chars, and then make it a DIV where the text within it is left-justified, and the DIV's left margin shrinks at a constant rate per animation frame.

caminanteblanco - 24 minutes ago

This is unreasonably effective, and I'm not entirely sure why

Thank you so much, an instant 'Add to Home Screen' from me

sarusso - 12 hours ago

I came up with this one night when I couldn’t fall asleep and was looking (waiting) for some data analysis results on a web platform, noticing that the spinner was actually making me sleepy.

I guess that when the brain is engaged in an activity, and that activity becomes boring, it creates good conditions for falling asleep.

stronglikedan - 11 hours ago

> The time the loader spins, as well as the speed at which the text appears, increases as you go through the story, so that you ideally never reach the end (unless you really, really want to).

Did you mean to say that the "speed at which the text appears" decreases, or am I misunderstanding?

Jeremy1026 - 11 hours ago

At what point does it start chanting "when you hear a bell, you'll think you're a duck."

smusamashah - 9 hours ago

Please make the background fully black. I am trying to bore to sleep and the background is bothering me a bit in the dark room. Also, add a full screen button so that I don't see anything on my phone at all except the words appearing slowly. May be even remove the next button and go to next part on touch. Also may be the words should appear slower too.

ameliaquining - 9 hours ago

What's the Service Worker for? It doesn't appear to do anything.

effnorwood - 5 hours ago

Goodbye sound machine!

sandinmyjoints - 10 hours ago

Excellent noticing.

VladVladikoff - 6 hours ago

I can’t think of a more terrible way to fall asleep.

zebreus - 11 hours ago

This is so dumb, I love it

exodust - an hour ago

I presume there's no actual loading happening, it's just a timer. Real loading spinners aren't fun, but fake ones are next level bad. Not sure why anyone would deliberately put themselves through this experience.

coldcity_again - 11 hours ago

Twisted and great.

- 10 hours ago
[deleted]
tonetheman - 12 hours ago

[dead]