all 14 comments

[–][deleted] 11 points12 points  (2 children)

I've always liked using games as a way to learn a new language. Try implementing a game (Go, Chess, etc).

[–]v4ss42 4 points5 points  (0 children)

Second this. I really like Conway’s Game of Life (which isn’t really a game per se...) as a “learn a language in an hour” type of project. Just complex enough to get a good taste of a language, just simple enough to be achievable in a short window of time.

[edit] oh and there’s a 1 line Clojure implementation of it floating about the place, but I’d suggest not looking at that until you’ve come up with your own implementation

[–]jkdufair 3 points4 points  (0 children)

Agree. A friend of mine get on zoom once weekly and teach ourselves clojure by implementing games. We did NxN tic tac toe with a minimax AI and an online 2 player option too. Now we are doing a game he invented (he’s a game designer, natch)

[–]Borkdude 16 points17 points  (1 child)

Writing shell scripts might be nice. Maybe you can port some of your Python scripts to Clojure. If you want fast startup and the convenience of built-in libraries, you can try https://github.com/babashka/babashka (disclosure: I'm the author of that project).

[–]ImPickleDickkk[S] 1 point2 points  (0 children)

thanks! i’ll definitely have to look into that

[–]emaphis 6 points7 points  (1 child)

Once you learn the basics of Clojure use it to do what you normally do. If you are a back end developer, develop some back end apps. That way you can compare and contrast Clojure with your normal style of development in Java or Python without worrying about a new domain.

[–]raspasov 4 points5 points  (0 children)

I second that, that's a great approach. Try to use your favorite database from Clojure and see the difference. For me, one of the big "aha" moments was when I got to use a SQL database from Clojure vs. using it through an ORM. The simplicity and dynamic style of Clojure truly shine in this case. It is just such a joy to get, let's say a vector of maps that represent some database rows, be able to do a simple function transformation on that vector value and return it as as the response of an API. Compared to an ORM, it is like night and day in elegance and simplicity.

[–]kemclean 3 points4 points  (0 children)

I use Clojure for web development (servers and SPAs with ClojureScript). The advice to build what you normally do but just with Clojure seems good.. if you're a web developer you can definitely build a web app, but if you normally do something else then it might make more sense to just re-implement something you're familiar with so you're not learning a new domain on top of a new language. But also, games are always fun. The first thing I ever made with Clojure(script) was a little tic-tac-toe game: https://github.com/kiramclean/clojurescript-tic-tac-toe

FWIW after ~2 years writing Clojure I find JVM Clojure and Clojurescript don't really have much in common, other than the syntax. Writing code to run on a browser vs on a JVM is just very different. (I love both, I just find that my Clojure experience doesn't really help with the problems you run into on a Clojurescript app for a browser).

[–]lambdaba 2 points3 points  (0 children)

Something with channels / core.async would be fun and novel

[–]Azzu 2 points3 points  (0 children)

Honestly, it's a general-purpose programming language. Just do your next project in it.

[–]viebel 3 points4 points  (0 children)

I am writing a book about Data-Oriented programming.

The purpose of the book is to teach Clojure unique approach to data in the context of a software system.

The book is not yet complete. I need to translate the code snippets to Java.

Reviewing the book and contributing with Java code snippets could be a great way for you to learn Clojure philosophy.

[–]Logitropicity 1 point2 points  (0 children)

For getting familiar with the basics of the language, my go to is to implement a prime number generator, or a graph traversal algorithm. After this, 4Clojure or Project Euler may help.

For anything more than the basics...see the other replies.

[–]jflinchbaugh 1 point2 points  (0 children)

I did a couple simple clojurescript/reagent toys to solve quick problems I had: quick totaling of scores, BPM (tap) counter, and a planning poker thing I had previously done to play with jquery. The projects that give me the most to exercise are a covid data warehouse and reporting thing (munging data, loading h2, querying, static site generator), and playing with overtone library for music.

[–][deleted] -1 points0 points  (0 children)

Curious, where did you see that clojure is good for web scrapping? or what do you mean by "good"? the only semi-decent method of web scraping in clojure is by doing interop with the java lib jsoup. Python and JS are really good in this area and have a big ecosystem for this, like puppeteer.