Live data from Hacker News

Try Clojure

tryclojure.org

211–220 of 404 posts

Re: Try Clojure

#211
post #195
post #194

Earlier quoted context omitted.

You would abstract away the jdbc/execute part though, right? otherwise that's terribly unproductive compared to django etc.

In practice I do wrap `jdbc/execute!` with my own `execute!` function to set some default options. However, there is no ORM layer. What makes you think the code above is terribly unproductive? Edit: Not trying to dismiss your concerns, by the way. In Clojure you can often get away with doing less than you might think so I'm genuinely curious about the critique.

In Django I would just do Posts.objects.filter(title=x)

I don't need to define driver boilerplate for every query (or ever have to write it... at all).

Re: Try Clojure

#212
My favorite part of working in clojure is how easy it is to do common data structure operations.

map, filter and reduce are extraordinarily powerful, especially when combined with the other core library functions.

Re: Try Clojure

#213
post #155
post #116

Clojure looks productive. What frameworks libraries do people use to build web apps? Like, replacement for Django view layer and ORM (not looking to debate orms thanks)?

This is my goto: webserver: ring-jetty9-adapter[0] routing: reitit[1] html templates: hiccup[2] never used an ORM, but happily used HugSQL for making composable queries[3]. [0] https://github.com/sunng87/ring-jetty9-adapter [1] https://github.com/metosin/reitit [2] https://github.com/weavejester/hiccup [3] https://www.hugsql.org/

Those all look great, including HugSQL, thanks!

Re: Try Clojure

#215

I have to admit, several years ago, a colleague of mine advised me if not to try Clojure but at least to read the "History of Clojure": https://dl.acm.org/doi/pdf/10.1145/3386321 , which I never did. But one day I decided to watch Rich Hickey - Greatest Hits https://changelog.com/posts/rich-hickeys-greatest-hits ... I then read the "History of Clojure", and then jumped into learning it. This is probably one of the mo…

I got what you described by learning Common Lisp just a few months ago. Do you think learning Clojure would get me something in addition to that or is it roughly the same?

Besides the superficial syntax, those are some differences pointed out by (common) lispers: https://gist.github.com/vindarel/3484a4bcc944a5be143e74bfae1...

Re: Try Clojure

#217

Clojure is becoming popular in Mexico, and I'm guessing Brazil may see a similar situation, because of nubank. It is a popular destination to go work there for computer scientists, and they seem to work mostly in Clojure. I seem to remember they even employed some of the core members of the language? I think at some point they also bought the company of Jose Valim (Elixir's creator), but I think they are still mostly…

Nubank purchased Cognitect (the consulting company behind Clojure) in 2020, as well as Platformatec (employers of Jose Valim); the latter was for access to Platformatec's project management expertise (see https://building.nubank.com.br/tech-perspectives-behind-nuba... there is no Elixir code running at Nubank AFAIK.

There is Python on the "other side" of the ETL pipeline, but everything user-facing is (again AFAIK) Clojure on the backend and TypeScript in the Android and iOS apps.

Re: Try Clojure

#218

Earlier quoted context omitted.

> ...had a spike in popularity despite being very hostile to newcomers. To be fair the community itself, as humans, was very welcoming to newcomers. Really super nice and helpful folks. If anything was "hostile" it was the dominance of emacs and very limited options for other tooling. That, and the horrifically unhelpful leaky abstractions in the stack trace when something went wrong. It's a big step, if you don't al…

I'll second that the popular tooling, while powerful and reliable, its just not user friendly. The official Clojure CLI, for example, is just plain confusing, and that's most people's first impression to the entire ecosystem. The config files, while they use the wonderful `.edn` format, are also not intuitive. Newcomers are the most likely people to encounter the most amount of error messages... which are famously di…

> The official Clojure CLI, for example, is just plain confusing, and that's most people's first impression to the entire ecosystem. The config files, while they use the wonderful `.edn` format, are also not intuitive.

I completely agree; it is unfortunate they don't spend more time officially recommending leiningen.org. A beginner attempting to use the built-in CLI is going to lead to a poor first 3 months.

Re: Try Clojure

#219
post #180

i wish it was easy to make android apps with clojure. not sure if itd be easier with jetpack compose + clojure or react native + clojurescript.

There’s also clojuredart to do a dart / flutter app. I’ve been working on one, and it’s been pretty pleasant to work on.

Re: Try Clojure

#220

I have to admit, several years ago, a colleague of mine advised me if not to try Clojure but at least to read the "History of Clojure": https://dl.acm.org/doi/pdf/10.1145/3386321 , which I never did. But one day I decided to watch Rich Hickey - Greatest Hits https://changelog.com/posts/rich-hickeys-greatest-hits ... I then read the "History of Clojure", and then jumped into learning it. This is probably one of the mo…

I got what you described by learning Common Lisp just a few months ago. Do you think learning Clojure would get me something in addition to that or is it roughly the same?

really good talk from Rich Hickey: Clojure for Lisp Programmers - https://www.youtube.com/watch?v=cPNkH-7PRTk&t=3837s
Post reply on HN