Live data from Hacker News

The Colour Clock

thecolourclock.co.uk

61–70 of 95 posts

Re: The Colour Clock

#62
post #50
post #15

Awesome idea. I took some time to rewrite in HTML5: http://brisy.info/colors/ Though the colours I'm getting are different. I wonder why.

This seemed like a fun idea: Here's my remix of it, a bit more HTML5-ish: http://labs.flog.co.nz/clock/

It's a bit wonky when you use a variable-width font.

Re: The Colour Clock

#63
post #62
post #50

Earlier quoted context omitted.

This seemed like a fun idea: Here's my remix of it, a bit more HTML5-ish: http://labs.flog.co.nz/clock/

It's a bit wonky when you use a variable-width font.

Yeah. I moved to ems, thinking that would help, but it's still an issue.

If you don't set a width then you get awkward spacing reflow when the digits change.

Re: The Colour Clock

#64
post #28
post #25

Earlier quoted context omitted.

I'm on a P4 3Ghz at the moment, whereby I can hear my CPU buzzing away when its under load. On the .co.uk site the buzzing is audible, its taking >70% of the CPU, whereas on your site its nice and quiet taking just 6% of the CPU.

I can not figure out how such a simple program can manage to take up 100% of my CPU, and despite that not be in sync with my actual clock (it's a random fraction of a second off). Has he not heard of sleep(1) ? Saying "it's flash" is no excuse, flash is perfectly capable of sleeping.

Updating a clock to display the correct time is actually difficult and involved, sleep(1) will not work! The problem reminds me of this Intel article on syncing video output [1]

Basically, sleep(1) won't always align with clock updates, so sometimes a given time will display for more or less time than a second. This can be observed by opening the clock widget on Windows XP for example, it's very noticeable. I don't actually know a nice way to do it, maybe updating 10 times per second or so?

[1] http://software.intel.com/en-us/articles/video-frame-display... - it's down right now, one of the diagrams illustrates the problem well though: http://software.intel.com/file/3984

Re: The Colour Clock

#66
post #33
post #15

Awesome idea. I took some time to rewrite in HTML5: http://brisy.info/colors/ Though the colours I'm getting are different. I wonder why.

I appreciate the pointlessness of being yet-another recreator, but hey, why not: http://davidlynch.org/toys/colorclock/ :D My quirk is that you can stick a fragment on the end to change the mapping of time to hex. e.g. http://davidlynch.org/toys/colorclock/#smh is seconds=red, minutes=green, hours=blue.

It'd be great if you could add the necessary meta tags to make this fullscreen when saved to home screen on a iOS device. No need for an icon -- iOS already frames the time nicely.

Re: The Colour Clock

#69
post #30
post #23

Earlier quoted context omitted.

Great minds and all. If you replace the html file in the screensaver bundle you can use yours (or mine) instead of the flash one.

Instead of: window.setInterval(frame, 1000); Do: window.setTimeout('window.setInterval(frame, 1000)', 999-(new Date()).getMilliseconds()); That way the seconds will be properly synchronized.

Instead of a string containing code, you should use an anonymous function.

Re: The Colour Clock

#70

Earlier quoted context omitted.

I'm quite sure there are much more mappings from hh:mm:ss -> rgb which would be even more interesting or even practical. For sure the internet will iterate on this idea in just a few seconds :)

Yeah, HMS->HSL would be quite intriguing.

Forked from flog: http://www.manatee-combine.com/colour-clock/ http://github.com/ctoneal/colour-clock/
Post reply on HN