This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # asami (3)
- # babashka (3)
- # beginners (45)
- # boot (3)
- # calva (6)
- # clojure (26)
- # clojure-dev (16)
- # clojure-europe (15)
- # clojure-norway (6)
- # clojure-uk (6)
- # clojurescript (34)
- # community-development (4)
- # conjure (3)
- # datascript (4)
- # datomic (4)
- # emacs (21)
- # events (1)
- # fulcro (16)
- # graalvm (5)
- # jackdaw (1)
- # kaocha (5)
- # lsp (74)
- # malli (8)
- # nbb (37)
- # off-topic (50)
- # pathom (5)
- # reagent (19)
- # ring (1)
- # shadow-cljs (60)
- # sql (3)
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.
Any recommendation of website to use? Codewars feels painfully boring at the initial katas, and sadly Leetcode doesn't support Clojure.
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 😉 ( https://youtu.be/2V1FtfBDsLU?t=1874 )
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. https://github.com/babashka/cli
Makes a lot of sense, @U3X7174KS. I'll install babashka on my machine and give it a try!
This could also be an option: https://exercism.org/tracks/clojure/exercises
I turned seventy-one yesterday, @U035WLPF552. Coding never gets old, unless...have you tried coffee? I feel too old for everything without coffee. hth!
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. https://youtu.be/AScojLj139A?t=875 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
@U035WLPF552 if you're interested in contributing to an open-source web app, you could take a look at https://github.com/jacobobryant/platypub. I started it a few months ago partially as a showcase application for a web framework I develop (https://biffweb.com/), 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) 🙂
@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.
if I want to build a collection from successive calls to the same function, is that a use case for
do you need to retain results of those calls? does the function contain side effects?
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
no, you don't need to call
repeatedly will return the results on its own.
things that start
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)
@U0P0TMEFJ what's the use of a construct like that vs using
range or is this just to illustrate your point
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,
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
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
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
transducer is more like pre-emptive composition I think - imagine typical nested calls on a collection, for functions
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)
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
for is basically equivalent to python's list comprehension, so I think that's what you're looking for? see also
filter which are sometimes more idiomatic.