Fork me on GitHub
#beginners
<
2017-02-12
>
alicemonade01:02:28

For some reason i couldn't find that question on stackoverflow. Thanks and sorry @beppu

beppu01:02:49

no problem.

alicemonade02:02:25

Hmm. How can (deftest test (is (= false (nil? (do (def sym 0) (resolve 'sym)))))) pass in the repl but don't in a file ?

alicemonade02:02:38

It is literally the same expression.

mss15:02:34

what’s the idiomatic way to get the length of a keyword? (count (name :my-keyword)) is what I’m using now

curlyfry17:02:56

@mss I think you got it :)

mss17:02:15

awesome thanks

doddenino17:02:02

What's the correct way to debug and check all the steps for a recursive function that traverses a tree? I'm trying with cider debug functions right now

dpsutton17:02:34

is it not working?

dpsutton17:02:02

couple things come to mind: make test cases! CIDER has a test case runner

dpsutton17:02:16

define small bits that exemplify what needs to happen

doddenino17:02:32

It works, but it's a little hard to keep track of everything as it's not working only for more complex cases

dpsutton17:02:34

the good thing about trees is that (usually) if it works one level deep it'll work for arbitrarily many levels deep

doddenino17:02:12

Maybe I should just try to reduce it to the simplest case 😕

doddenino18:02:52

Can cider debug functions imported from libraries?

dpsutton18:02:53

no i don't believe so

jgreen18:02:11

what are some resources i can use to become a better functional programmer?

jgreen18:02:55

im coming from an object oriented language and i am having a hard time adjusting to clojure's paradigm

kauko18:02:02

@jgreen I used javascript before coming to clojure, and what helped me a lot was my master's thesis where I compared javascript code with and without rxjs

kauko18:02:37

maybe that could be useful to you too? Implement something in java or js, then implement it again with rxjava or rxjs?

schmee18:02:16

mrjoegreen give this a shot, it has a very good reputation in the clojure community: http://www.braveclojure.com/functional-programming/

schmee18:02:55

also, if you’re interested in functional programming in general and not just clojure, I think this is really good: https://fsharpforfunandprofit.com/posts/thinking-functionally-intro/

schmee18:02:19

beware that clojure and F# differ significantly in their approach to functional programming, it might be better to learn either Clojure or F# first and then the other to not muddle things up too much

schmee18:02:05

but it’s absolutely worth a skim at least 🙂

jgreen19:02:58

@kauko @schmee good ideas. thanks!