Live data from Hacker News

Show HN: I saw this mind-blowing experiment, so I made a simple version of it

github.com

121–130 of 140 posts

Re: Show HN: I saw this mind-blowing experiment, so I made a simple version of it

#121
post #89
post #60

Earlier quoted context omitted.

I wonder if it would be more instant if they used postMessage api instead of going over network.

Any local network usage should be nearly instantaneous. My personal theory about the lag is that positioning the window is not synchronized to the JS thread, so the window moves before the JS thread is aware, which means you see the square move after the window has already moved.

Ah, my bad. I didn't read the code and just assumed there was a far away server.

Re: Show HN: I saw this mind-blowing experiment, so I made a simple version of it

#122

Two more examples of multiple windows as a single unit. This time on the video game side. (Ludum Dare 35 Overall Winner) WindowFrame: https://youtu.be/CY7NUHn6GQg?t=273 Window Kill: https://youtu.be/7iP68FZWVxM?t=160

Metal Marines, a 1993 game with multiple windows that interact with each other: https://youtu.be/KiiAUP1fG14?t=297

Thanks! I am adding this one to my list!

Re: Show HN: I saw this mind-blowing experiment, so I made a simple version of it

#123
post #85

Earlier quoted context omitted.

Pretty sure this is tongue-in-cheek, given the commenter (pretty high profile dev who creates a lot of cool stuff and does not shy away from using other open source code!) :)

Aw I thought it would be obvious :( Thanks for clarifying, of course nobody makes anything without being inspired from something that already existed, at least to a degree. I guess it's hard to accurately convey sarcasm online, thanks again!

Standing on the shoulders of giants

Re: Show HN: I saw this mind-blowing experiment, so I made a simple version of it

#124
post #80
post #79

Earlier quoted context omitted.

Why is it over a websocket? Can't it just share local data?

those were my thoughts too You can use Broadcast Channels as well as Service Workers, even WebRTC would use a loopback interface!

This ought to work across different browsers though, for what it's worth. But ultimately it's just a fun experiment.

Re: Show HN: I saw this mind-blowing experiment, so I made a simple version of it

#126

That's a great demo! I'd be curious to see how this would work with multiple monitors. Also, thank you for voluntarily acknowledging that you were directly inspired by somebody else and giving them credit - the software industry could use more people like you.

https://twitter.com/_nonfigurativ_/status/172798055677504755...

Here the original creator is demoing the behavior on multiple monitors

Re: Show HN: I saw this mind-blowing experiment, so I made a simple version of it

#128

But… why does it lag? Shouldn’t this be trivial enough to be instant?

Well, it's in a browser. Between trivial mouse move and trivial object coordinate change, there are numerous system and application layers to relay event to your interpreted (or compiled) code, and then to deliver state change to screen.

Even if we move to native world, making two different windows do the same instantly is not always trivial. For example, there have been articles about GUI toolkits making it impossible to have smooth window resizing. If we make everything ourselves (say, immediate drawing in response to WM_PAINT), we can only hope that the system notifies windows quickly, and that performance available is enough to pump bitmaps to screen. Or, better, we can try to use system-wide software or hardware compositor, add layers for individual objects, and only change their coordinates. Then we rely on compositor being good enough to handle 60/120/144/whatever updates per second when it's needed.

Re: Show HN: I saw this mind-blowing experiment, so I made a simple version of it

#129

Might as well link to the original / "stolen from" author's equivalent demo with Three.js (open this in multiple overlapping windows) - https://bgstaal.github.io/multipleWindow3dScene/ - and repo - https://github.com/bgstaal/multipleWindow3dScene/

3 days old, twitter one seems 4 days old, who stole from who? Anyway nice repo, thanks for sharing!

The links I posted are from the original Twitter guy but a simplified version he made to open source it

Re: Show HN: I saw this mind-blowing experiment, so I made a simple version of it

#130

> The original work by Bjorn Staal https://twitter.com/_nonfigurativ_/status/172732259457002734 used localStorage, but I found sockets more fun, because if tweaked a bit, this can be shared with friends. Anyone have a link to what this was? The tweet is gone.

It's missing a digit at the end, original tweet: https://twitter.com/_nonfigurativ_/status/172732259457002734... / https://nitter.net/_nonfigurativ_/status/1727322594570027343

Thanks
Post reply on HN