Fork me on GitHub
#clojure-uk
<
2020-07-03
>
dharrigan05:07:33

Good Morning!

dharrigan05:07:37

Nice article on Rich Comment Blocks

dharrigan05:07:04

I use them too, they are certainly great - esp as I can eval forms inside of them, in the repl, to try out stuff πŸ™‚

dharrigan05:07:21

in the #news-and-articles channel.

seancorfield05:07:26

Yeah, I was pleased to see someone had written that up.

dharrigan06:07:15

my RCB's contain next.jdbc invocations pumping in some data and looking at the results πŸ™‚

dharrigan06:07:26

or invoking APIs and looking at the results that come back πŸ™‚

seancorfield06:07:37

My RCB's contain all sorts of stuff. I just committed a big data migration that was written and tested entirely via RDD using RCB's. And I left the whole thing in when the PR went up for review so my colleague could see how I'd evolved the solution and how I'd "tested" it in the REPL.

seancorfield06:07:51

I used Spec to generate random test data to populate 10,000 rows in each of three tables to act as a test bed for the migration. All in the RCB.

dharrigan06:07:21

You know what - that's what I do too. I test out stuff in my repl inside rcbs, backed by a few unit tests, and I'm happy to believe that it'll work. I love the rapid feedback.

dharrigan06:07:45

Can't say I produce 10,000 random test data rows 'tho - not yet anyway πŸ™‚

seancorfield06:07:01

(s/exercise ::some-spec 10000) πŸ™‚

seancorfield06:07:22

Spec is soooo useful for extended example testing!

dharrigan06:07:18

I'll have to do more, that's for sure!

djm06:07:38

I don't think that's a helpful way to put it, but I agree with the point - my first programming course at university was functional programming in haskell

Jakob Durstberger08:07:49

What surprised me about clojure when I started looking into it was how few language constructs there are. Some basic data types + standard lib and then bit later atoms/refs + async + protocols . It is funny now looking at Kotlin and other languages and see how many keywords and concepts there are to learn.

Conor08:07:15

I would guess most people learning Kotlin will already have paid a lot of the cost of learning it by becoming familiar with Java

Jakob Durstberger08:07:23

Yeah, I have been using Java for a few years but am now predominantly using Kotlin at work that’s why I used it as an example. I feel the same about C#, Haskell, Typescript and other.

djm08:07:02

There does seem to be some pain with learning Kotlin - as clunky as it is, I think I'm pretty good at functional-style programming with Java streams (after some horrible first attempts), and then the Kotlin equivalent requires learning a whole new set of functions

Conor08:07:10

Which bits did you find trickiest?

djm08:07:50

Nothing in particular, just a lack of familiarity with what's available, and the best way of doing things