Live data from Hacker News

StarWars + Git logs = StarLogs

starlogs.net

71–75 of 75 posts

Re: StarWars + Git logs = StarLogs

#71
post #66

Awesome. But, shouldn't it be going from first commit to latest commit? Like telling the story of the project. Edit: Found the repo[0] in the page source. [0] https://github.com/artemave/StarLogs

even if not, it'd be pretty sweet if there was an option to do so.

It is an existing issue, in the repo, that could use some love.

https://github.com/artemave/StarLogs/issues/2

Re: StarWars + Git logs = StarLogs

#73

There's small problem on how browsers respond, when we change the hash#parameter in the URL and hit ENTER in the sites where DOM is manipulated using AJAX depending on hash-value, like in this site. It doesn't get updated until we hit ENTER for second time in Chrome, reload in Firefox. I also have a similar site that manipulates DOM depending on hash value. If you are on instamovi.com/#bourne with bourne movies liste…

Why not use the HTML5 history API? Why do people still use onhashchange? Better browser support?

Re: StarWars + Git logs = StarLogs

#74

Earlier quoted context omitted.

Nice, but please consider switching to HTML5 history (pushState). It's just as easy and a lot cleaner. Especially that you can use popstate to let people switch the URL. It's amazing anyway.

If he were to use pushState for this, wouldn't he need a .htaccess (or other means) to point all requests to index.html? Meaning it's not just as easy?

Yes, it is a bit more config on the server. The site can still be a FD at JS client though, you just need to make sure all paths link to it.

Re: StarWars + Git logs = StarLogs

#75

This is very cool. I also just noticed a neat quirk - if you switch tabs (I'm on chrome) the animations pause but the timer to show the text keeps ticking. So all the text bunches up at the bottom until you switch back at which point the text blob starts to fade out all together. The page visibility api: http://www.w3.org/TR/2011/WD-page-visibility-20110602/ might be able to help with that.

Not a bad idea to respond to visibility, but to solve the blob problem it would be better to explicitly synchronize text creation and text position. This is basic in game/simulation programming: you don't want the rules of the game to change depending on the performance of the computer — it may be slower, but it should be internally consistent.

For example, have a single, explicit 'scroll position' or 'time' variable (they're equivalent in this case), increment it on a timer, and insert new text when (time mod N) rolls over.

Post reply on HN