Live data from Hacker News

Tour of our 250k line Clojure codebase

tech.redplanetlabs.com

11–20 of 237 posts

Re: Tour of our 250k line Clojure codebase

#12
post #5
post #3

Earlier quoted context omitted.

I've found I typically reach for clojure when i need to do something on the jvm and want a better java than java.

Interesting take since Clojure and Java are two very different languages. And unlike for example Kotlin, Clojure does not try to be a better Java than Java. But true though Clojure leverages the power of the jvm.

It was a better Java in many ways.

The doto macro was a relief back in the days when Java APIs insisted on being designed around stateful setters and getters rather than the builder pattern, it allowed you to operate on such unfortunately designed objects in single logical blocks and simulating it all being an expression.

Proxy allowed you to instantiate anonymous inner classes implementing only the methods of an interface that you needed, the rest you could omit; in Java you have to put them all, empty, which necessitated that you use an IDE to generate them, and back then IDEs were not as nice as today.

Those two alone made interacting with contemporary Java libraries so much easier.

It also was convenient to go from Java collections to Clojure collections and vice versa.

Re: Tour of our 250k line Clojure codebase

#13

If I want to learn Clojure, where is the best place to start? I have a lot of experience with Python/Javascript now, and spent many years in C/C++/Objective C and Java. Also have some Go.

https://purelyfunctional.tv/mini-guide/the-ultimate-guide-to...

Re: Tour of our 250k line Clojure codebase

#14

Is there more info about the tool itself that claims 100X decrease in application development cost? Quite the claim.

It does seem odd. Stealth product. Bold claims. 3 blog posts one of which is a funding announcement and the other two having nothing to do with the product. I am intrigued but also a bit skeptical.

Re: Tour of our 250k line Clojure codebase

#15

If I want to learn Clojure, where is the best place to start? I have a lot of experience with Python/Javascript now, and spent many years in C/C++/Objective C and Java. Also have some Go.

If you are into books, I will recommend Clojure for the Brave and True which is free to read online [1], and Living Clojure [2], in that order.

If you're into interactive kata-style problems, there's 4Clojure [3].

Also join the Clojurians's Slack [4] for the community.

[1] https://www.braveclojure.com/clojure-for-the-brave-and-true/ [2] https://www.oreilly.com/library/view/living-clojure/97814919... [3] https://www.4clojure.com/ [4] https://clojurians.slack.com/

Re: Tour of our 250k line Clojure codebase

#16
I don't really like 'Component'. I seems very clunky and we had a lot of issues with it and a lot incidental complexity in our codebase (now converted to Java). It was the first real system that did these sort of things but if I start a project now, I much rather use Integrant or Clip.

https://github.com/weavejester/integrant

https://github.com/juxt/clip

I haven't used Clip a lot yet but my next project is defiantly going to be with Clip.

For validation I have started to use Malli (https://github.com/metosin/malli). I really liked the idea behind clojure.spec but some of the implementation was a bit clunky and a bit too 'Rich Hickey', not sure how to describe it otherwise. Schema was again the first serious attempt at a library like that for Clojure so it was really nice when it came out. Malli sort of combines what is great about both.

Re: Tour of our 250k line Clojure codebase

#17
Thank you for sharing this detailed rundown. One of the challenges that I faced as a new Clojure developer was understanding how all the parts fit together (and in fact, what parts I should care about in the first place). Example: is learning Component worth it? (yes)

Extremely glad to see this resource published! Thank you to the Red Planet team for releasing this!

Re: Tour of our 250k line Clojure codebase

#18

If I want to learn Clojure, where is the best place to start? I have a lot of experience with Python/Javascript now, and spent many years in C/C++/Objective C and Java. Also have some Go.

The "Clojure for the Brave and True" ebook is a popular and free resource for beginners: https://www.braveclojure.com/
Post reply on HN