Live data from Hacker News

Hotwire: HTML over the Wire

hotwire.dev

381–390 of 573 posts

Re: Hotwire: HTML over the Wire

#381
I think the complexity/level is too high. You could easily do the chat from the example video in vanilla JavaScript with a Node.js server and Websocket, that would also be faster and smaller.

The video was however a great tutorial, although a bit too fast. (I had to pause and replay a few times). But it did not sell me on the concept.

A more simple approach would be to send a (head) request to the server every 5 second asking if the source/HTML/state has changed. Then do a sophisticated diff/replace of the DOM (like in React, but without React) making the smallest change to the DOM as possible (only change what was updated). eg. no full page refresh, nor iframes. (and also send a diff over the wire, not the full page).

If you would make the app fully functional/pure you would then be able to cache many states (input->output) and predict them on the client and prefetch, for example a link click, would instantly do the DOM/diff and update the page with the new content. For example in a tic-tac-toe game you could pre-render all states and have the client pre-fetch them.

Re: Hotwire: HTML over the Wire

#382
post #283

Earlier quoted context omitted.

Yeah people shouldn't make applications in programming languages. If your application can't be made with html/css then it's bloatware. All this java, .net and C are totally unnecessary.

I don’t think the problem is with programming languages, but with JavaScript specifically, since it was never designed to be stretched this far. TypeScript is an improvement, but if you could write C or whatever on the client side and run it as easily as JS I think more people would go that route.

C/C++ and Rust actually run very fine client side nowadays. However, it's just more cumbersome to make UI in those languages, so it's mostly used to port existing libs or for performance.

Re: Hotwire: HTML over the Wire

#383
post #100
post #40

Earlier quoted context omitted.

My thought exactly, though I fully support that. I often rant about how the modern web is billions of layers of duck tape over duck tape and it has become an unmanageable mess of libraries, frameworks, resources, all while javascript remains the most outrageous and absurd language ever created. I'm by no means a fan of rails or ruby for that matter but I think things like these are a considerably better alternative t…

Just wanted to point out that it is called duct tape, just to avoid misunderstandings since i had a similiar spelling error as a non-native speaker :)

it's funny how culture shapes our designations of the same thing. In (specially us) english it's duct tape as the product is primarily known for installation work, and often referred to as "duck tape" for it's well known brand, whereas in (german speaking) europe we also employ an English word for it, but call it "gaffer tape", for it's usage by light operators in the event business (so called gaffers)

Re: Hotwire: HTML over the Wire

#384
post #12

Earlier quoted context omitted.

I found this little thread on Twitter interesting, complaining Hey (powered by hotwire) is too slow https://twitter.com/youyuxi/status/1337851036015480843

And here's some additional followup. Minor speculation that maybe his location is what caused slowdown. https://twitter.com/swyx/status/1292825527116369922

Hey approach needs server on at least 2 regions to cover 90% of worldwide usage. I guess they only have server in the U.S. and some users may experience some lacking. I'd say having SFO3,FRA and NRT are pretty much enough for global customer.

Re: Hotwire: HTML over the Wire

#385
post #120

This is so exciting to see, especially for older folk like me. Almost 20 years ago, one of my professors told us before graduation that hot tech is mostly about the idea pendulum swinging back and forth. I immediately chalked it up to 65+ above white wise men snobbery. However, this is exactly that. We started with static pages, then came Ajax and Asp.net and the open source variants, then we went full SPA, now we ar…

I'd take it back even further: We started out on mainframes. Then things moved to the desktop, with some centralized functionality on servers (shared drives, batch jobs). The processing moved to centralized web servers via the web, SAAS, and the cloud. Then more moved into the client through React & similar. And now things are moving back to the server. Tick. Tock. These changes are not just arbitrary whims of fashio…

They're driven by generational improvements in technology and tooling.

I'd say they're driven by corporate greed. Cloud computing is basically renting time, and so the more you use them, the more $$$ they make.

Re: Hotwire: HTML over the Wire

#386

Earlier quoted context omitted.

I'd take it back even further: We started out on mainframes. Then things moved to the desktop, with some centralized functionality on servers (shared drives, batch jobs). The processing moved to centralized web servers via the web, SAAS, and the cloud. Then more moved into the client through React & similar. And now things are moving back to the server. Tick. Tock. These changes are not just arbitrary whims of fashio…

I got a chuckle out of Apple M1 chip touting having shared video memory as a big step forward. (Which it is, but is still amusing to me how it might have sounded like a groundbreaking innovation to a layperson.)

In the PC industry, that's called UMA and has been around for a few decades, synonymous with ultra-low-cost (and performance) integrated graphics. To hype it so much as a good thing, Apple marketing is really genius.

Re: Hotwire: HTML over the Wire

#387

Earlier quoted context omitted.

I’m glad this technique is making a comeback. The last 10 years of JavaScript on the client have been an utter shit show that left me wondering wtf people were thinking.

You have the benefit of hindsight at this time. You can draw parallel to history of flight and all the crazy contraptions that people attempted. Great technology can emerge from the combination of numerous shit shows. The whole is greater than the sum of the parts.

except we could fly before ;D

Re: Hotwire: HTML over the Wire

#388

Earlier quoted context omitted.

Racist people like you make peaceful protests and working for change against racism so much harder. You're just out for revenge and your rhetoric shows it. Edit: I've had just about enough of people using "white privilege" to justify violence and blatant discrimination because "they haven't been exposed to enough ". Its just another way to justify racism. Plenty of white people live in poverty. Its not ok in either d…

Did you read their entire comment? It sounds like you agree with them

The pre and post edit makes it seem like they could be on either side of the argument.

Re: Hotwire: HTML over the Wire

#389
post #320

So far, this looks very much tied to some Rails gems : documentation for installing outside of Rails is pretty much non-existent, I guess to be expected for a beta. My issue with Turbolinks/Stimulus is really that it's developed pretty much behind closed doors at Basecamp and we maybe get a shiny new release every few years, instead of being developed as a more open source project with incremental improvements and in…

Stimulus seems to have a very active Github page, maybe its more about the initial concept where Basecamp tends to be private?
Post reply on HN