ldnclj

Find us on #clojure-uk
agile_geek 2015-07-01T05:45:33.001449Z

@pupeno: Morning Pablo. Nice meeting you last night.

agile_geek 2015-07-01T05:47:54.001450Z

@benedek: The first rule of Monad club is you can’t explain Monad’s?

agile_geek 2015-07-01T05:51:55.001451Z

Just looking at changes in Clojure 1.7 https://github.com/clojure/clojure/blob/master/changes.md and in amongst the lovely reader conditional and transducer goodness I quite like the format for exceptions printed to a stream..it’s a small thing but anything that helps debugging and readability is always good in my book.

agile_geek 2015-07-01T07:37:29.001453Z

Seriously, if anyone has a really good tutorial on monads point me to it (I’ve read what seems like dozens but it goes in one ear and out the other!)

pupeno 2015-07-01T07:43:37.001454Z

Good morning.

pupeno 2015-07-01T07:44:02.001455Z

@agile_geek: nice meeting you too. Are you talking about monads in Haskell or are there monads in Clojure now too?

pupeno 2015-07-01T07:44:57.001456Z

@agile_geek: BTW, here’s the code: https://github.com/pupeno/london-colure-dojo-2015-06-30-gameweb

thomas 2015-07-01T07:47:47.001458Z

mogge

benedek 2015-07-01T07:48:37.001459Z

‘morning

benedek 2015-07-01T07:48:58.001460Z

@agile_geek: indeed. they are simpler than they look

agile_geek 2015-07-01T07:49:40.001461Z

@pupeno: Clojure doesn’t really have monads but I just want to understand the concept. Monad lib for Clojure here - https://github.com/funcool/cats - that started the thread about Monads!

pupeno 2015-07-01T07:50:34.001463Z

agile_geek: I remember liking this one when I was using Haskell: http://blog.sigfpe.com/2006/08/you-could-have-invented-monads-and.html but I don’t know if I like it because it was good or entertaining.

agile_geek 2015-07-01T07:50:59.001464Z

@benedek: ppl keep saying that. Same people said Clojure was simple but I’m a bit slow so took me a while to rewire my brain!

benedek 2015-07-01T07:52:46.001465Z

i may be mistaken (and then i dont really understand them at all 😉 ) but i think if you use clojure you use the underlying concepts all the time. using them explicitly (like algo.monads lib) might not make a practical sense...

benedek 2015-07-01T07:53:23.001466Z

for the majority of projects anyway

broquaint 2015-07-01T08:10:17.001467Z

agile_geek: This might clarify things - http://two-wrongs.com/the-what-are-monads-fallacy

jonpither 2015-07-01T08:23:26.001468Z

If it's so hard for anyone to understand monads, that says something about them...

jonpither 2015-07-01T08:24:04.001469Z

"Attempting to learn how to use monads by understanding what they are is like asking "What is a musical instrument?"" Dear lord

jonpither 2015-07-01T08:24:12.001470Z

I don't want to learn such a thing in order to code

pupeno 2015-07-01T08:30:44.001471Z

@jonpither: I think the concept of a monad can be useful but I indeed agree that having to grok it to be able to code is unacceptable which is why I don’t think Haskell is a practical programming language for every day use.

jonpither 2015-07-01T08:37:15.001473Z

I'd be interested in examples where we used monads in Clojure without knowing it

jonpither 2015-07-01T08:37:22.001474Z

if we ever do

agile_geek 2015-07-01T08:46:33.001475Z

@jonpither: I agree I don’t need to understand them. I didn’t need to know the names of common OO patterns to use them..but it helped when I wanted a short hand to refer to them when talking to other programmers. I suspect, but don’t know (see “I don’t understand Monads”) that Monads may be similar?

benedek 2015-07-01T10:46:58.001476Z

@jonpither: am i being caught here? 😉

benedek 2015-07-01T10:56:32.001479Z

is perhaps close to what i meant. which basically that if you understand monads you might understand the underlying concepts of certain constructs in clojure/lisp better — again i maybe wrong here and you don’t necessarily need monads for good understanding either

benedek 2015-07-01T11:01:21.001480Z

yeah i agree @agile_geek i consider monads a bit like design patterns in OO. but again this is a ‘dangerous’ metaphor in a sense...

benedek 2015-07-01T11:01:32.001481Z

as they are not the same

agile_geek 2015-07-01T12:12:30.001482Z

@benedek: true. I was using the analogy to point out that once you can name/recognise something you can reason about it in shorthand form…if that makes sense?

benedek 2015-07-01T12:18:18.001483Z

abs does. only being careful as @jonpither is after my monadic lies... ;)

mccraigmccraig 2015-07-01T12:19:42.001485Z

@benedek: is it a 'dangerous' metaphor (the design patterns metaphor) ? it seems like a pretty good match to me

mccraigmccraig 2015-07-01T12:22:21.001486Z

"invocation patterns" maybe ?

benedek 2015-07-01T12:25:17.001487Z

analogy is a much better word / thx @agile_geek

benedek 2015-07-01T12:25:53.001488Z

i guess it is still like comparing apples and oranges..

xlevus 2015-07-01T13:34:31.001489Z

@agile_geek: wrt project-dojo. Neat.

agile_geek 2015-07-01T13:44:52.001490Z

@xlevus working on which day per month to run it on and location. May have to pay for pizzas and beer myself!

xlevus 2015-07-01T13:46:19.001491Z

If the weather keeps up. how does the arctic sound?

agile_geek 2015-07-01T13:56:00.001493Z

Frozen pizza

xlevus 2015-07-01T14:25:16.001494Z

How many people usually come to Dojos?

agile_geek 2015-07-01T15:08:18.001495Z

@xlevus up to 20

mccraigmccraig 2015-07-01T15:22:37.001496Z

@benedek: thinking about it a bit more... individual monads are invocation patterns : the concept of monad is perhaps a meta-pattern... a pattern for invocation patterns

benedek 2015-07-01T15:40:57.001497Z

yeah, i see what you mean. their practical use in clojure is still a big question for me tbh

benedek 2015-07-01T15:42:01.001498Z

i wanted to use them in a bigish project to pass around a context (state monad perhaps) but never really got around it and it would have been a huge refactor

mccraigmccraig 2015-07-01T15:43:48.001499Z

benedek: i've been looking at https://github.com/james-henderson/yoyo for configuring systems... but this is basically built around a continuation monad

mccraigmccraig 2015-07-01T15:44:04.001501Z

so i tried doing the same thing with a cont-m implementation... turned out to be quite straightforward :

mccraigmccraig 2015-07-01T15:44:06.001502Z

https://gist.github.com/mccraigmccraig/10fe6eeda12dc47f2850

mccraigmccraig 2015-07-01T15:47:19.001503Z

i started thinking this way because i have a bigish project with a load of objects configured with a declarative container approach, and functions which i realised look just like readers... i though that monads maybe offered an approach which would avoid me buggily re-inventing a wheel

mccraigmccraig 2015-07-01T15:52:11.001504Z

but retro-fitting looks hard, so i'm keeping the approach for a greenfield project

mccraigmccraig 2015-07-01T16:04:39.001505Z

also, how cool is this :) https://github.com/funcool/canal

benedek 2015-07-01T16:20:04.001507Z

wow, nice!

benedek 2015-07-01T16:20:22.001508Z

yeah i guess this funcool stuff started the conversation

benedek 2015-07-01T16:20:26.001509Z

really nice stuff

benedek 2015-07-01T16:21:38.001510Z

so are you building a component system based on monads? (would be nicer than the protocol/record based ones)

benedek 2015-07-01T16:21:48.001511Z

that would be quite cool actually

mccraigmccraig 2015-07-01T16:58:27.001512Z

yoyo's continuation monad based approach to object construction seems great so far, so i'm probably going to use that... beyond that, i'm not sure how it will pan out

mccraigmccraig 2015-07-01T16:59:00.001513Z

i'm pretty much a n00b with monads, so i'm going to play around and see what emerges

2015-07-01T17:45:35.001514Z

agile_geek: this one looks relevant to your interests https://www.youtube.com/watch?v=VSdnJDO-xdg

agile_geek 2015-07-01T18:54:11.001516Z

@otfrom: cheers Bruce. I’ll take a look.

pupeno 2015-07-01T20:21:50.001517Z

When I first joined and searched for channels, I searched for “London” and couldn’t find this channel. Is lndclj something well known? Because it may be preventing people from finding the channel.