Fork me on GitHub
Danilo Oliveira09:07:46

Hi everyone, I have some problem here: I'm very interested in developing Clojure skills, but I feel too old for a new language (I'm 32, but my mind feels old). 10 years ago I would be able to spend many hours with a new language and come up with new ideas to try, or spending the whole day solving silly problems, but as it's said in German, I don't have "lust" for something like this anymore. Yesterday I spent the day trying to think on a cool project to start and wasn't able to think on something good. Any idea either is too hard, or too silly, or too boring, thinking on something intermediate and fun is really hard for me. The "scratch an itch" thing doesn't work for me because I became a dull person without hobbies that just burns time on social media (either I'm working or too exhausted). Any advice or suggestion for me - How can I develop my Clojure skills in a focused strategy?


perhaps try the advent of code challenges? I had fun solving increasingly complex problems and learning the clojure core functions at the same time. I also have trouble getting started when I want to learn something new but have no ideas (or time) for an actual project.

Danilo Oliveira09:07:59

Any recommendation of website to use? Codewars feels painfully boring at the initial katas, and sadly Leetcode doesn't support Clojure.

Danilo Oliveira09:07:29

Will take a look!


Welcome. I'm closer to 50 than 40, and often have similar motivational issues. I think finding some fun little problems is a great suggestion, and the advent of code is a good choice. I also tend to try and implement something familiar, like a small game like tick-tack-toe (without worrying about the ui too much 😉 ) ... and remember Clojure is the language for cranky, tired, old programmers 😉 ( )


If you're on a Mac / Linux machine, writing small CLI programs with babashka and babashka/cli is really nice! I am not able to do clojure in my day job, but I like being in charge of my system, and writing scripts in Clojure has been a chance for me to solve problems I care about with tools I like to use.

Danilo Oliveira10:07:05

Makes a lot of sense, @U3X7174KS. I'll install babashka on my machine and give it a try!

🙌 1

I turned seventy-one yesterday, @U035WLPF552. Coding never gets old, unless...have you tried coffee? I feel too old for everything without coffee. hth!

😄 3
Martynas Maciulevičius11:07:09

I don't drink coffee but when I was drinking teas and Cola it was rough. But now I started to attend swimming and it's quite nice. Screw caffeine... Yesterday I found blueberry juice in the market. One of the ingridients is caffeine... and then people ask why they need coffee...... It's really hard to run a car on Nitrous 100% of the time... So I choose 0% instead. Oh right, CPU overclocking too. Edit: it's not rough when you drink the caffeine. It's great what you can do with caffeine. The withdrawal is what's rough.


port a paper from a another language(for example: that haskell parser combinators paper, or the raft paper), write a minikanren

👍 1

see #adventofcode

Jacob O'Bryant14:07:27

@U035WLPF552 if you're interested in contributing to an open-source web app, you could take a look at I started it a few months ago partially as a showcase application for a web framework I develop (, partially to give people interested in Biff a fun project to hack on, and partially to scratch a personal itch (i.e. it is a useful piece of software, not just an example app!). If that looks interesting I'd be happy to help you get started. There are a number of good first issues. Hopefully this doesn't come off as solicitous; I saw you asked about projects in need of contribution on #community-development so I thought I'd mention this :).


@U035WLPF552 I'm late to this thread -- it's been "a day" -- but I just wanted to say that I turned 60 a few weeks ago and I picked up Clojure 12 years ago... and have been programming commercially with it for 11 years now. I always try to follow the advice in the Pragmatic Programmer book and learn a new language every year (or so). I've been learning new languages all through my (40+ year) career and I've built productions systems in dozens of languages -- as well as learning dozens of other languages "for fun" along the way. One of the key aspects of Clojure for me is that it runs on the JVM so I could integrate it into everything I've been doing since I first picked up Java commercially back in 1997. That's allowed me to try out a wide variety of languages to solve problems that I might normally solve in a more traditional JVM language. That has even included Frege (Haskell on the JVM) 🙂

Drew Verlee03:07:32

@U035WLPF552 you don't sound like your lacking motivation, you sound like your being discerning with your time. Don't let that by itself stress you out. Good ideas are hard to come by.


> that just burns time on social media @U035WLPF552 Build something takes care of some time-wasting aspect of social media for you in a timely manner... so hopefully you will feel less pressure to constantly check on things yourself.

Danilo Oliveira08:08:56

Sorry for the late reply. @U90R0EPHA, @U0DJ4T5U1, @U04V70XH6, @U7YNGKDHA, I appreciate all your answers.

Ben Lieberman15:07:40

if I want to build a collection from successive calls to the same function, is that a use case for for or dotimes

Ben Sless15:07:54

Sounds like repeatedly


do you need to retain results of those calls? does the function contain side effects?

☝️ 2
Ben Lieberman15:07:53

I ended up reaching for repeatedly but is that something that must be called in a for in order to keep the results of the function calls

Jacob O'Bryant15:07:46

no, you don't need to call repeatedly inside for. repeatedly will return the results on its own.

💯 1

(repeatedly 4 #(rand-int 10)) -> (5 8 1 0) for example

🤝 1

things that start do like dotimes and doseq are usually for side effects and often don't return a value other than nil. If each call to your function depends on the previous value, iterate might be useful too.

(take 5 (iterate inc 0)) ;; => (0 1 2 3 4)

Ben Lieberman15:07:13

@U0P0TMEFJ what's the use of a construct like that vs using range or is this just to illustrate your point


It’s just to illustrate the point of iterate.


that's just to illustrate the use of iterate if you really wanted that list, range would be a better choice 😉


I'm a simple man, map, reduce and filter have always been enough for me (and funnily enough, having at least 1 or 2 of those is all you need to implement the last one in any given language)


I think the history of clojure paper (or maybe another paper about transducers) rewrites those three in the form of transducers as well


I think rich hickey did a recorded talk about transducers showing this construction as well

Ben Lieberman21:07:57

Cool I'll check it out, everything I read or watch by him breaks my brain in some new and cool way


transducers are weird and seemingly unnecessary until they click and then they are awesome


let me correct that. they seem like that until they click. It took me a little while to really grok them but they are great once i really understood them

Ben Lieberman21:07:31

What makes them different than equivalent constructs in other languages? I've dabbled in Rust and that has some similar stuff like maps and folds etc

Ben Lieberman21:07:56

(I know Rust is not really a functional language though)


transducer is more like pre-emptive composition I think - imagine typical nested calls on a collection, for functions f, g, and h you might end up with your languages looping construct, similar to (map f (map g (map h xs))), which seems ok, but you're doing the iteration 3 times - iirc, transducer is more like, (map (compose f g h) xs) - so the iteration is done one time - I think the 'duce' comes from the idiomatic ending function being one that can reduce (like, well, reduce)


but despite that, your code sort of looks like/is written as if it was the 'one iteration per fn' style, despite it composing those calls to reduce iteration (which also enables it to work with lazy sequences)

Sam Ritchie22:07:27

That is a good example; it's more powerful too because functions in the (comp f g h) can additionally filter, add more items etc, not just map like in that example

Ben Lieberman15:07:13

I'm used to Python's list comps etc so the former makes the most sense to me

Jacob O'Bryant15:07:47

for is basically equivalent to python's list comprehension, so I think that's what you're looking for? see also map and filter which are sometimes more idiomatic.

Jacob O'Bryant15:07:31

ah I see you've got replies on the other message :)