announcements

rschmukler 2026-02-26T17:42:19.679359Z

We just open sourced a new reactive server-rendered web framework for Clojure. https://github.com/dynamic-alpha/hyper - Please feel free to message me about it here or on GitHub

👀 6
🔥 2
8
🚀 5
🎉 19
rschmukler 2026-03-20T15:02:44.267409Z

I'm unfamiliar with clj-reload - what is it?

hlship 2026-03-20T15:03:34.948229Z

https://github.com/tonsky/clj-reload --- a smarter way to properly reload namespaces when source files change.

hlship 2026-03-20T15:03:53.576699Z

But because it does it "properly", it subverts what hyper is doing.

rschmukler 2026-03-20T15:04:06.902979Z

Is it effectively restarting your hyper server?

rschmukler 2026-03-20T15:04:18.616249Z

ie. when it redefines the namespace that you have the server in, what happens?

hlship 2026-03-20T15:05:50.546089Z

I keep the server in an atom in a defonce, so that isn't affected. clj-reload deletes namespaces, then reloads them. Result: new Vars. This ensures that a lot of edge-effects in reloading are done correctly ... deleted Vars actually disappear, multi-methods and protocols are reloaded correctly, etc. But if you are adding a watch on a Var, that doesn't trigger because the Var is replaced, not modified.

rschmukler 2026-03-20T15:06:10.016109Z

I see

rschmukler 2026-03-20T15:06:34.198859Z

Well, in the readme I see ^:clj-reload/keep as an option? is that not viable?

rschmukler 2026-03-20T15:06:56.681539Z

I suppose the issue is the var doesn't change then, even if you keep it

hlship 2026-03-20T15:07:09.637839Z

It is, but would need to put that on virtually everything. I only looked at this for a few minutes last night, there's probably a way to make them work well together.

rschmukler 2026-03-20T15:09:23.052409Z

Yeah. So as a work around, I think you could define an atom and add it as a global watch to hyper, and then add a hook to the clj-reload to increment that atom

rschmukler 2026-03-20T15:09:38.135279Z

There might be something cleaner, but that probably will work quick and easy

rschmukler 2026-03-20T15:14:44.550179Z

(ns your.server)

(defonce reload-count* (atom 0))

^:clj-reload/keep
(def routes
  [...])

(defonce server* 
  (atom (h/start! (h/create-handler #'routes {:watches [reload-count*]) {:port 3000}))

(defn after-ns-reload
  []
  (swap! reload-count* inc))

rschmukler 2026-03-20T15:14:47.966019Z

Something like that perhaps

rschmukler 2026-03-20T15:57:05.024579Z

Just created #hyper for anyone who finds this and wants to discuss hyper / needs help

👍 3
hlship 2026-03-20T15:58:10.995999Z

It looks like there's a way to disable the unload behavior for an entire namespace, and I think that's what we want. I'll have time to experiment later.

teodorlu 2026-03-20T16:08:12.638309Z

I rewrote a smaller code base to be clj-reload-reloadable a while back. My approach was: 1. Centralize all state in a single namespace, except that from being touched by clj-reload 2. Get hold of vars that may be unloaded with (resolve the-ns/the-sym)`. Source is open, though interspersed with some Norwegian text. State namespace (note clj-reload ns metadata): https://github.com/mikrobloggeriet/mikrobloggeriet.no/blob/3f8d0f9cc54084fedac24752ac635bcea9dfaaac/src/mblog/state.clj#L1 resolve injection: https://github.com/mikrobloggeriet/mikrobloggeriet.no/blob/3f8d0f9cc54084fedac24752ac635bcea9dfaaac/src/mblog/system.clj#L40 There are definitely lots of other approaches, but after these changes, clj-reloads have been reliable in this codebase.

hlship 2026-03-20T01:33:50.000329Z

I'm starting to look at hyper but the docs are .... sparse. Does your workflow include clj-reload? I've certainly seen a case where reloading source updates the web page immediately ... but only the first time? Do you haev a Discord or other preferred place to discuss?

rschmukler 2026-03-20T02:20:32.659069Z

Hey! Would love to improve docs if needed. If you redefine vars they should live reload for you - and it shouldn't be the first time only. We need to see about getting a channel here but you can DM me as needed too

hlship 2026-03-20T04:41:24.438739Z

I've found that reloading a namespace (not using clj-reload) does work, and updates the page, which is chef_kiss . When using clj-reload, its semantics are different, and you end up getting whole new Vars in the loaded namespace, which (I'm guessing, having not read the hyper code) gets in the way of hyper's reload logic.

2026-02-27T11:29:21.553009Z

I haven't been able to give it a test run yet - but a question I have is: if you don't diff changes and replace everything, then what happens when the user is typing in an input field which is updating state on every keystroke, will the user lose focus/position in the input?

teodorlu 2026-02-27T12:35:43.775079Z

Usually, there's throttling somewhere in the system. And morph keeps user focus and position. So that's non-problems in practice, but you have to think a bit differently from typical SPA architectures.

2026-02-27T14:25:29.028349Z

Morph + a signal can keeps focus. You can play with some demos probably a few bags haven't touched them in a while (for context these are both stress tests in that they morph 14000+ divs on each frame): http://cells.andersmurphy.com http://checkboxes.andersmurphy.com

2026-02-27T15:43:01.894249Z

Gotcha! Very cool demos btw.

2026-02-27T17:58:46.009199Z

Just another little example: https://github.com/Schroedingberg/tilda A booking system using datastar+xtdb - I haven't looked into whether this is architecturally similar to hyper, that'll be interesting

2026-02-27T18:00:12.562789Z

That potentially infinite amount of divs still makes me feel guilty at times 😅

tvaughan 2026-02-26T18:16:34.220599Z

Nice

🙏 1
teodorlu 2026-02-26T18:28:43.545929Z

Congratulations! I've been toying with a few of the same ideas, very interesting that you also landed on a "state stack" of global, session and tab. Doing the same for path parameters was an interesting addition I didn't think of!

2026-02-26T18:30:04.628009Z

Awesome stuff! Excited to see where you take this! 🎉

rschmukler 2026-02-26T18:31:50.941329Z

Thanks! I feel like a lot of us had all been imagining what it could look like since @andersmurphy's demo broke the web haha. Happy to have other peoples ideas and experience helping to shape it if you feel like getting involved @teodorlu

🎉 2
teodorlu 2026-02-26T18:35:23.200089Z

Yeah, the Clojure Datastar crowd has been a surge of innovation and helpfulness for the past year! I think many of us have sensed some potential, and desired higher-level tools than the SDK 🤘

💯 2
2026-02-26T22:07:33.669969Z

Cool, good to see that I am not the only one tinkering with clojure+datastar 🥳

bozhidar 2026-02-26T21:09:26.392829Z

nREPL 1.6 is out with many small improvements! (details - https://github.com/nrepl/nrepl/blob/master/CHANGELOG.md#160-2026-02-26) We'll start rolling it out to CIDER user tomorrow. cider Outside of the code improvements, you'll probably (hopefully?) notice that the documentation has been polished in quite a few areas. I hope this will make it easier to find there what you're looking for - e.g. the meaning of life! 😉 P.S. We really need an nREPL emoji here! 😁

16
❤️ 7
19
2026-02-26T21:25:05.056859Z

i posted in #spam-reports about an nrepl emoji

❤️ 1
1
2026-02-26T22:18:53.051739Z

thank you @seancorfield for adding nrepl aka :nrepl:!

2
bozhidar 2026-02-27T07:40:56.766639Z

So nice! We're finally putting that beautiful logo to some good use! 😁

2026-02-26T22:05:57.651939Z

Hi folks, I am putting together a list of awesome LLM Clojure-focused libraries and projects: https://github.com/iwillig/awesome-clojure-llm. I hope other folks find this useful, and please reach out if you would like your project added there.

2026-04-06T19:18:29.359159Z

👁️ I will check your project out.

❤️ 1
minikomi 2026-04-07T04:16:18.642039Z

Thanks 🙏

minikomi 2026-03-31T05:19:43.862059Z

hello iwillig. i am making an ergonomic llm library for my own tooling about exploring models. it's just my little garden shed, but if it fits please feel free to add it write up https://poyo.co/note/20260318T184012/ github https://github.com/minikomi/clj-llm • works well with babashka • backend agnostic api • malli based structured outputs