I was in the audience, asking the question at the end of the video!
I didn't quite get the question across and got an answer to a different question, so to re-state my actual question (that I asked David later), I was curious how heavy a lift it would be to preserve enough information in production ClojureScript compilation to allow re-hydrating. The aim being to re-hydrate enough in production that e.g. in the event of issues or errors, you might attach a REPL to that production build and poke at it.
The answer (which I mostly knew/expected) is... quite a heavy lift. I can imagine some possible solutions, but I'm mostly-Rust nowadays, so no solution from me soon. :)
I also really recommend the other [1] talks [2] from this event!
[2]: https://youtu.be/fcSJAuUGVs8 (Ben, on a core.async error handling strategy that I had totally missed and totally changes the ergonomics of using c.a!)
This is such a good intro to clojurescript in general. I’ve dabbled in clojure for a few months, and CLJS seems really cool but also really confusing to get into. It’s got a whole ecosystem to itself.
Now I’m SUPER excited to try cljs!! It’s crazy how modern it is despite being kinda old in webdev terms
The way he shows off his REPL in VS code that controls the browser just reminds me how absurd this workflow of constantly switching between the browser and the IDE is, and it's even more absurd since VS code is an electron app, so you're really switching between chrome and chrome.
The thing that tipped me over the edge into learning ClojureScript was the news almost exactly a decade ago about achieving self-hosted compilation with eval [0] (kudos David!). In the end that specific capability was not quite practical enough for what I needed, but it proved a level of sophistication and maturity in the stack that has only increased since.
Today we also have sci/scittle/cherry for anyone who's seeking that runtime Clojure->JS eval vision. And now with Jank (LLVM Clojure) on the horizon this year it's never been a better time to try Clojure, regardless of which hosted runtime you're enthusiastic to use - Basilisp on Python, ClojureCLR, ClojureDart etc.
It's rare I have to do anything client side, but I'm so grateful for Clojurescript when I do. I used to dread native Javascript and the crazy tooling, but Clojurescript makes building client side functionality an absolute joy. It's just a shame it's not all that popular
Early cljs/react adopter here. Found "the next react" in Hyperfiddle's Electric Clojure — it eliminates the client/server boundary entirely. Write one function that spans both sites, compiler handles the network automatically. The amount of plumbing code that just disappears is staggering.
As someone who rarely does front-end but occasionally needs to hack something together, ClojureScript is a godsend. I get to hijack the react ecosystem for nice UI components while also getting to use a pleasant language and avoiding JSX (I hate anything XML-y).
11 comments
[ 2.8 ms ] story [ 30.8 ms ] threadI didn't quite get the question across and got an answer to a different question, so to re-state my actual question (that I asked David later), I was curious how heavy a lift it would be to preserve enough information in production ClojureScript compilation to allow re-hydrating. The aim being to re-hydrate enough in production that e.g. in the event of issues or errors, you might attach a REPL to that production build and poke at it.
The answer (which I mostly knew/expected) is... quite a heavy lift. I can imagine some possible solutions, but I'm mostly-Rust nowadays, so no solution from me soon. :)
I also really recommend the other [1] talks [2] from this event!
[1]: https://youtu.be/8K4IdE89IRA (Aaron, on using lenses, this sorta stuff [3])
[2]: https://youtu.be/fcSJAuUGVs8 (Ben, on a core.async error handling strategy that I had totally missed and totally changes the ergonomics of using c.a!)
[3]: https://github.com/tekacs/factor/blob/master/src/factor/lens...
Now I’m SUPER excited to try cljs!! It’s crazy how modern it is despite being kinda old in webdev terms
Today we also have sci/scittle/cherry for anyone who's seeking that runtime Clojure->JS eval vision. And now with Jank (LLVM Clojure) on the horizon this year it's never been a better time to try Clojure, regardless of which hosted runtime you're enthusiastic to use - Basilisp on Python, ClojureCLR, ClojureDart etc.
[0] https://swannodette.github.io/2015/07/29/clojurescript-17/