HNHacker News
TopNewBestAskShowJobs

sudodevnull

133 karma · joined January 3, 2019

submissionscomments
sudodevnull··on Datastar: Web Framework for the Future?
Hashed script content
sudodevnull··on Datastar: Web Framework for the Future?
Ian is great, if you want progressive enhancement it would be my go-to every time!
sudodevnull··on Datastar: Web Framework for the Future?
Well obviously there's a difference between latency and throughput. Of course it's going to be microsecond plus your rtt/2. Sorry, we can't beat physics.
sudodevnull··on Datastar: Web Framework for the Future?
So unlike HTMX we support merge in both fragments and signals. We also support custom events natively for purely local state. We just make the browser declaratively reactive, that's it
sudodevnull··on Datastar: Web Framework for the Future?
Datastar is fully plugin based. If you don't like my take on SSE, cool let's talk. The core is just making data-* attribute into reactive expressions, everything else is a plugin by design. I want it to be OK for me to be wrong without losing the declarative approach
sudodevnull··on Datastar: Web Framework for the Future?
the site is just a Go app, https://github.com/starfederation/datastar/tree/develop/site
sudodevnull··on Datastar: Web Framework for the Future?
Our free shared fly.io was not built to handle hackernews. We are looking into alternatives but in the mean time checkout https://andersmurphy.com/2025/04/07/clojure-realtime-collabo... as it's the same tech but on a slight better machine.
sudodevnull··on Datastar: Web Framework for the Future?
Datastar started as an attempt to help shape HTMX2 before that was a thing... https://github.com/delaneyj/nothtmx2

Not sure the negativity. It's a superset of HTMX and it's 40% smaller with more features. Can you please tell me issue? I'm to dumb dumb grug please teach me senpai

sudodevnull··on Datastar: Web Framework for the Future?
I have thoughts about a fully compliant CSP middleware, problem is it's per language so I'd probably only make for Go (maybe PHP & TS)
sudodevnull··on Datastar: Web Framework for the Future?
I'm very much of the opinion that progressive enhancement leads to lowest common denominator and you should just do a static MPA (nothing wrong with that). Modern browsers are a combination of HTML+CSS+JS and you should just embrace that as what modern hypermedia is. We aren't fighting against the browser. If you want just links and forms, you should just do that and have less code to maintain. But in my experience that's not what most are looking for in their apps.
sudodevnull··on Datastar: Web Framework for the Future?
I'm am not of that opinion at all. I'm all about optimization but then people will say "that's not how web pages are made". Can't win opinions but can say, Datastar is not the bottleneck. You send as much, as often as you choose.
sudodevnull··on Datastar: Web Framework for the Future?
I agree! That's kinda the point with Datastar. EVERYTHING is a plugin, the core is a < 300 LOC engine for parsing data-* attributes and making available to plugins. You can pick and choose what makes sense for you. If you want to have declarative spec compliant interfaces, it can't get any smaller from what I've seen in the wild. Happy to get help to shrink it even more!
sudodevnull··on Datastar: Web Framework for the Future?
UPDATE: I have no idea why fly.io hate the TODO, but https://example.andersmurphy.com/ is a decent example (that's way more fun) that's running now. I'm commenting out that demo until I have more time to investigate. If y'all find other ones that are acting up please let me know. Looks likes it might be time to actual host this thing on a real server.
sudodevnull··on Datastar: Web Framework for the Future?
It's a DOM render stress test. It's trying to show the network is not the bottleneck. TL;DR do this in React or any other framework compared to a one time tiny shim and see if you get better results.
sudodevnull··on Datastar: Web Framework for the Future?
May the Yellows never forget
sudodevnull··on Datastar: Web Framework for the Future?
Not a fan (andersmurphy actually is better at explaining than me). However! I've been working with Micah from the Turbo.js team on idiomorph ideas. We are already multiples of v0.7.3 right now and getting faster each day. Together we can solve the core ideas even if we disagree on the top level API.
sudodevnull··on Datastar: Web Framework for the Future?
I think your confusing signals with observables
sudodevnull··on Datastar: Web Framework for the Future?
Alien, Reactively, TC39 are all about the core semantics of signal, computed, effect. Much of the rest is implementation details. https://dev.to/this-is-learning/the-evolution-of-signals-in-... is a good intro.
sudodevnull··on Datastar: Web Framework for the Future?
We'll just have to disagree here. The browser is REALLY smart about caching and no amount of JS localStorage is gonna match proper E-Tags and CDNs. If it's dynamic content your point is moot anyways.
sudodevnull··on Datastar: Web Framework for the Future?
Yeah something is DEFINITELY up. This is not the norm, we haven't seen this before. Fly.io free tier is not happy and I'm not sure why (we've been on it for years at this point). I'm gonna disable until I can dig deeper. Have day job stuff to attend to, this is not my ideal Friday afternoon :P
sudodevnull··on Datastar: Web Framework for the Future?
I think, at least as the creator, I've seen the "fight" be MPA vs SPA. IMO, both are wrong. It's about state management. MOST state lives in the backend but you still need fine grain reactivity on the frontend. On the number line between React and HTMX; Datastar is complex :)
sudodevnull··on Datastar: Web Framework for the Future?
I hate how right you are. We are now the smallest (v1 is on track to be 11.4Kb), have the fastest signal implementation and looking like over 2x faster than idiomorph. So it's the smallest and fastest shim to build real-time apps or simple CRUD. Shocked how much tech world is vibes based but so be it.
sudodevnull··on Datastar: Web Framework for the Future?
Yeah I'm seeing that too. We're getting ready for V1 and I probably missed a test around the Todo. My fault, didn't think we'd get hit by hackernews on a free shared fly.io server. I'll look into it now
sudodevnull··on Datastar: Web Framework for the Future?
Signals have dependencies and subscribers. It's a value and publisher and subscriber if you want to be more correct.
sudodevnull··on Datastar: Web Framework for the Future?
Same, you control your signals and fragments. So you are responsible for proper escaping and thoughtful design.
sudodevnull··on Datastar: Web Framework for the Future?
That's the nature of anything that does this kind of work. React, Svelte, Solid. Alpine has a CSP version but it does so little that I recommend you just accept being a Web1 MPA basic site.

I have ideas around ways around this but it's a per language template middleware.

sudodevnull··on Datastar: Web Framework for the Future?
Datastar author here... AMA, but know that Datastar is pure yak shaving for me to do real work stuff so I have no golden calves, just approaches I've seen work at scale.
sudodevnull··on Back to basics: Why we chose long-polling over websockets
That's the dumbest thing I've ever heard. SSE is just a response type for normal HTTP. Explain exactly what you mean cause that's like saying that are removing response types from HTTP.
sudodevnull··on Server-Sent Events (SSE) Are Underrated
Datastar author here, happy to answer any questions!
sudodevnull··on Datastar (Real-time Hypermedia Framework) releases v0.13.0
https://data-star.dev

More people are getting into HOWL stacks. Datastar is a single CDN include that gives you the ability to make real-time hypermedia apps with less code and a unified model.

We are starting to get more developers involved and that's wonderful. Datastar's originally intent was to be a plugin framework for creating declarative hypermedia. Seeing more active involvement on Github and Discord has been amazing.

Major changes this release are...

We have TESTS! Pete took on the major effort to integrate Playwright and start writing tests. It's already found regressions and will help make Datastar release more more battle tested going forward.

Plugins are now better about how/when to cleanup on an idiomorph merge. Some were killing themselves and others (like on page load) weren't cleaning up signals completely.

We now support multi-line HTML fragments! This is a problem with the SSE spec. Since we work directly from the event/text-stream primitives we can handle this better. It means easier integration with hand written HTML and native support for formats like CSV within a fragment's attributes.

Signal regexp could have issues if calling a function on a signal. data-text="$input.toUpperCase()" would be interpreted as a nested signal instead of a method call, fixed.

data-scroll-into-view got more modifiers about exact placement, animation, and ability to focus the element as well. Led to removal of data-focus as it's redundant.

More examples based off questions from Discord and Github issues.

Delete SSE events no longer need any html fragment.

New $$clipboard action

We have our first plugin developed by another! Thanks Patrick for his work on data-fetch-signal plugin and $isLoading signal.

A Haskell back-end example was provided by Henry. It's great to see as many back-end example as possible!

Redirect simplification

Deleting an element was flaky and is fixed with tests

If you start getting into more complicated UIs where fine-grain signals and a more robust plugin framework makes sense but want to keep it declarative please give it a try and give us a Github star

← PreviousPage 5 of 6Next →