Live data from Hacker News

ClojureScript Gets Async/Await

clojurescript.org

51–60 of 76 posts

Re: ClojureScript Gets Async/Await

#51
post #6

I wish an alternative to JS for the front end would catch on and be something more than obscure... I'd love to use something like clojurescript, but I struggle to imagine doing so for anything but a personal side project :/ Maybe this is easier to adopt if you're already a clojure shop for the backend?

Are you worried because it’s not a mainstream language and coworkers may not know it, or are you worried about the language itself getting abandoned or being bad or such? I’ve not used it in production, but I’ve shipped a few side projects and stuff for family members in it. ClojureScripts React wrapper, Reagent, honestly makes more sense to me than React does. I used Hiccup to generate HTML, and your components are…

A big reason why react in clojure can make more sense than react itself is because clojure is much more declarative than JavaScript. There's been a lot of work done on the react end to fix that but the mismatch will always be there.

The type of code you're writing isn't special, it's the way people have written lots of clojure programs for over a decade.

Re: ClojureScript Gets Async/Await

#52
post #28
post #24

Surprised to see Clojure/ClojureScript come up on socials more often all of a sudden. I used it professionally for a few years around ~2012 and like many others moved off JVM and moved into typed [functional] languages. Is the sudden buzz due to agentic coding? Does it rip through code faster with no type checking and fewer invalid syntax errors and reserved keywords to deal with? are we in for a sexp resurgence?

Another feature that plays well with agentic coding is REPL driven development. I don't know why that approach hasn't caught on in more languages that could theoretically support it.

Because most languages don't have a full interactive REPL like for example Common Lisp has. The Python REPL for example is a joke compared to it. Clojure is very closely there, but not quite yet.

Live image editing is just pure bliss.

Re: ClojureScript Gets Async/Await

#53

Earlier quoted context omitted.

Are you worried because it’s not a mainstream language and coworkers may not know it, or are you worried about the language itself getting abandoned or being bad or such? I’ve not used it in production, but I’ve shipped a few side projects and stuff for family members in it. ClojureScripts React wrapper, Reagent, honestly makes more sense to me than React does. I used Hiccup to generate HTML, and your components are…

A big reason why react in clojure can make more sense than react itself is because clojure is much more declarative than JavaScript. There's been a lot of work done on the react end to fix that but the mismatch will always be there. The type of code you're writing isn't special, it's the way people have written lots of clojure programs for over a decade.

Totally agree. I also think Clojures relative lack of support for custom types leads to elegant APIs.

It’s a breath of fresh air that practically every DSL takes either lists or maps so I can use very similar patterns to build their input rather than “every API wants me to method chain their custom types so every API needs its own special helpers library for common patterns”.

I never realized how much I hate classes until Clojure.

Have you tried typed Clojure? Curious about opinions on that vs having Malli do runtime validation. I tried it when I was a total noob and got overwhelmed. I feel like I have just enough context now to try again, and not sure if it’s nice or the overhead is so high it’s a boondoggle

Re: ClojureScript Gets Async/Await

#54
post #24

Surprised to see Clojure/ClojureScript come up on socials more often all of a sudden. I used it professionally for a few years around ~2012 and like many others moved off JVM and moved into typed [functional] languages. Is the sudden buzz due to agentic coding? Does it rip through code faster with no type checking and fewer invalid syntax errors and reserved keywords to deal with? are we in for a sexp resurgence?

Been coding in lots of languages with agentic coding and it performs much better with typed languages since it basically corrects the agent if it does any hallucination errors. Especially during major refactorings. I have been dealing with large untyped python code bases and it sucks with AI since if it's not covered with tests it's such a teadious job to make sure it did not break anything. The stronger the type sys…

So, best to just use for maximum results? And have the LLM just rehash the majority of what that language's code looks like? Because a lot of say Javascript code I have seen floating around on Github has been absolutely atrocious. That doesn't really give a good basis for LLMs.

I agree that stronger type systems might help. But a good swatch of unit tests should still accompany that code.

The Clojure code I have worked with usually had a damn good array of unit tests as its more of the "clojure" culture to do so.

Re: ClojureScript Gets Async/Await

#55
post #22

Earlier quoted context omitted.

For me it also lacks observability. It has been a few years since I last used Clojure, but I found manifold to be a much better fit for actual production code that you want to optimize. I loved ztellman’s “everything must flow” talk on the topic.

Heh, I used to maintain manifold/aleph for a few years after Zach left the Clojure community.

That means we have had various exchanges in the past, but I’m operating under a different username here.

I’ve had several PRs accepted into there, I think manifold got a lot of things right, if only it weren’t for Zach leaving the community.

Unfortunately I left the community for similar reasons, I have a different vision of how the language should evolve than the people in charge, but wasn’t as vocal about it. I suspect there are more people like me.

It’s fine, like Rich Hickey said, it’s his project and we have no right to expect anything.

I am forever glad for what Clojure taught me, it made me a much better developer.

Re: ClojureScript Gets Async/Await

#57
post #24

Surprised to see Clojure/ClojureScript come up on socials more often all of a sudden. I used it professionally for a few years around ~2012 and like many others moved off JVM and moved into typed [functional] languages. Is the sudden buzz due to agentic coding? Does it rip through code faster with no type checking and fewer invalid syntax errors and reserved keywords to deal with? are we in for a sexp resurgence?

I think a lot of the recent interest is being driven by the recent release of the Clojure documentary: https://clojure.org/about/documentary

Re: ClojureScript Gets Async/Await

#58
I noticed borkdude posted this thread *and* he is listed as a contributor for this release.

For the longest time, I recall the opposition to async/await support being twofold:

1. adding support would require deep changes across the CLJS compiler (theller, creator of shadow-cljs, once tried and concluded this)

2. macros from libraries like Promesa provided similar convenience

There were some other arguments brought up at the time (e.g. just use core.async, expression-oriented languages aren't a good fit with async/await, etc.), but they were usually specific to one person rather than something you'd see repeated in forums.

In the Clojurians Slack, borkdude once stated he wasn't convinced it'd be impractical to add support. It seems that he eventually took the time and made it happen. Extremely thankful for that.

Re: ClojureScript Gets Async/Await

#60
post #38
post #24

Surprised to see Clojure/ClojureScript come up on socials more often all of a sudden. I used it professionally for a few years around ~2012 and like many others moved off JVM and moved into typed [functional] languages. Is the sudden buzz due to agentic coding? Does it rip through code faster with no type checking and fewer invalid syntax errors and reserved keywords to deal with? are we in for a sexp resurgence?

Personally I moved from typed functional languages to Clojurescript and then Clojure around 10 years ago Most serious Clojure code bases I'm aware of invest heavily in their test suite so yes you can just add a skill to your AI that tells it the most effective way to use your test suite then send it to the races Some of my colleagues let the agent interact with the REPL and they report faster performance because the…

Well said, I spent a lot of time watching a playlist on Rich Hickey's talks that did more for my career than just software.
Post reply on HN