Live data from Hacker News

Reactive Clojure: A web language

hyperfiddle.notion.site

101–110 of 185 posts

Re: Reactive Clojure: A web language

#101

So from what I can tell this is conceptually similar to the LiveView model, except that the problem is approached from the perspective of the SPA/client stack instead of the SSR stack. It’s a refreshing idea that I’ve never seen executed like this before. However I think it’s missing the point of de-coupling. Security would be very hard to reason about, as would handling of intermittent network connections when the r…

Mr first thought reading the article was security. After a quick ctrl-f, it was a little disconcerting to find that the only mention of security is in a tacked-on bullet list under the heading "risks"...

Re: Reactive Clojure: A web language

#102
post #80

One thing I admire about the Clojure community is audacious projects like this. While a ton of these seem to run out of steam, they certainly shoot for the stars and tend to come pretty dang close for a while. For those working in Typescript, Blitz.js seems to do a great job at drastically decreasing the plumbing you have to write to shuttle data between Postgres and React. There’s also a ton of goodies like auth bui…

Sadly the running out of steam effect hits the tooling for the community too. It's really hard to find good, stable clojure tools on the level of those available for Java.

Definitely take a look at Cursive, it may be what you're looking for along the lines of stability and out-of-the-box features you'd see in a Java IDE: https://cursive-ide.com/

Re: Reactive Clojure: A web language

#103
post #34

Earlier quoted context omitted.

I think Phoenix LiveView (posted recently on HN: https://fly.io/blog/how-we-got-to-liveview/ ) and Rails Hotwire ( https://hotwired.dev/ ) are the main alternatives that have momentum right now. The general idea being to abstract away the difference between client and server code, so that you can write code that handles both, in a single file. > There has got to be a better way What's offensive about the OP to you? I…

Thank you for posting those two, I wanted to post them but I don't comment often. Wanted to chip in another contemporary: edelvalle/reactor, which is inspired by LiveView[0]. [0]: https://github.com/edelvalle/reactor I am using Hotwire for a project, and I'm learning Elixir and Phoenix on the side. Finding edelvalle/reactor was immediately helpful to me though, because I cut my teeth on Python/Django, so reading a Py…

Thanks for sharing - I currently work with Django so I'm very happy to see an equivalent library in that ecosystem.

Have you found any issues with Reactor, areas where it's behind Hotwire, etc?

Re: Reactive Clojure: A web language

#104
post #85

Earlier quoted context omitted.

How is this different from any other framework? Try fixing a React or Rails bug. At least their system is only 2k LOC, which will presumably be well documented.

At first glance, this appears to be much more complex. React is a relatively simple DOM diffing library. Rails is a closer comparison, especially with whatever their live-view implementation is. This appears to be doing a lot more than React, at least, including network communication, and database change event propagation. The odds seem much higher that stuff will go wrong, especially under load, and be pretty diffic…

> At first glance, this appears to be much more complex. React is a relatively simple DOM diffing library.

Their implementation is 2k lines of code. The React repo has 350k lines of code. The Rails repo has 336k lines of code (both of those according to tokei). Of course this includes tests, lots of other stuff, etc. But still, that's two orders of magnitude.

Re: Reactive Clojure: A web language

#105

This is not reinvention of PHP as some are commenting. In fact I think this is extremely cool. If I understand it correctly, it allows you to achieve reactive data flow in a single page app without any boilerplate. Meaning - you update the database on the server and all the relevant UI(s) will automatically receive the updated data and re-render only the parts of the UI that display that data. This would require a to…

In this sense it's same as what microsoft is trying to do with Blazor - except they are skipping whole javascript crap and compile to wasm.

Re: Reactive Clojure: A web language

#106
post #102

Earlier quoted context omitted.

Sadly the running out of steam effect hits the tooling for the community too. It's really hard to find good, stable clojure tools on the level of those available for Java.

Definitely take a look at Cursive, it may be what you're looking for along the lines of stability and out-of-the-box features you'd see in a Java IDE: https://cursive-ide.com/

Or Calva for VS Code.

It's the best dev environment I've used for any language. It's brilliant.

Re: Reactive Clojure: A web language

#107
post #104

Earlier quoted context omitted.

At first glance, this appears to be much more complex. React is a relatively simple DOM diffing library. Rails is a closer comparison, especially with whatever their live-view implementation is. This appears to be doing a lot more than React, at least, including network communication, and database change event propagation. The odds seem much higher that stuff will go wrong, especially under load, and be pretty diffic…

> At first glance, this appears to be much more complex. React is a relatively simple DOM diffing library. Their implementation is 2k lines of code. The React repo has 350k lines of code. The Rails repo has 336k lines of code (both of those according to tokei). Of course this includes tests, lots of other stuff, etc. But still, that's two orders of magnitude.

LoC != Complexity. React has one job, and it does it really well, part of that 350k lines of code is a LOT of tests. Just because it has those tests doesn’t mean it’s “much more complex”.

My two cents :)

Re: Reactive Clojure: A web language

#108
When the framework does so much for you, I always worry about what it looks like at scale when you need to start optimizing. Can you instrument all the plumbing, if something breaks can you get at it to fix it? How will you add caches at various different layers? On the browser, http cache, db cache, CDN, etc.? If the generated JavaScript that’s ultimately running on the browser has a bug, how many layers of library do I have to sift through to fix it? When I want to simulate the network for testing or deal with intermittent connection failures on the frontend how hard it is to plug in? What do schema migrations look like? What do deployments across a fleet of servers look like (there’s some point in time when some servers are old and some servers are new…)?

These are problems with any framework, but the more all-in-one a framework attempts to be the harder it is to get in between the joints with your glue gun to fix things up.

That said, this is Clojure and usually you have pretty easy access to all the intermediate bits and bobs and macros so maybe it’ll be great.

Re: Reactive Clojure: A web language

#109
post #106
post #102

Earlier quoted context omitted.

Definitely take a look at Cursive, it may be what you're looking for along the lines of stability and out-of-the-box features you'd see in a Java IDE: https://cursive-ide.com/

Or Calva for VS Code. It's the best dev environment I've used for any language. It's brilliant.

Calva always exploded on me when I tried to set it up on Windows 10. Is it better on a *NIX system?

Re: Reactive Clojure: A web language

#110
post #39

This reminds me of Meteor.js[0] from back in the day (2014?), which had a very similar approach—you wrote code that ran on both the frontend and the backend, and database updates were propagated automatically. It suffered from a pretty hard reliance on Mongodb and its own package manager (Atmosphere), and it was at odds with the rest of the JS ecosystem which was settling on NPM. This project looks very cool! I like…

I feel like Meteor lost a lot of ground to Firebase. I think what we are seeing with these tools to make data synchronization in the frontend more invisible will continue to proliferate. I am looking forward to the next, rich landscape of interactivity on the web powered by WASM, WebGL, etc.

> I am looking forward to the next, rich landscape of interactivity on the web powered by WASM, WebGL, etc.

All of which will likely be a broken mess on iOS thanks to Apple

Post reply on HN