Fork me on GitHub
#admin-announcements
<
2015-10-22
>
agile_geek06:10:26

@colin.yates: @sventechie I consider myself to be a fairly average developer from a mainly procedural/OOP background and I went..and I’m still going through..phases of understanding learning Clojure. Initially I had no problem with the idea of separating data and behaviour- easy and refreshing hark back to procedural programming where the two are not complected either. Syntax was easy. Thinking about high level functions being passed around and closures took some time. However, I still struggle with the density of some very idiomatic Clojure. I find myself struggling to hold in my head the shape of the data as it passes through the ‘pipeline’ of transformations in anything doing a reasonable amount. As with other languages, breaking things into much smaller functions helps but I think I miss the ‘type signposts’ that let me know what the data shape is the function expects and produces. Is it a map of keywords and vectors? If so what’s in the vectors? etc.

agile_geek06:10:18

I don’t necessarily want strong typing I just want documentation (meta data or examples) of what a function expects/produces.

agile_geek06:10:53

Prismatic Schema helps but I don’t want schema’s littered through code (haven’t tried core.typed so no comment), meta data type hints help but I’m toying with just using pre: and post: a bit more?

colin.yates08:10:40

@agile_geek: I use Schema almost everywhere, certainly on boundary functions. My colleague uses pre/post - either are invaluable I think. I also tend to be unidiomatic and prefer smaller named functions or a larger function with intermediary steps/fns in a let

colin.yates08:10:30

It isn’t a lack of familiarity with the fns (which are almost always some combination of map, reduce, filter, keep or remove :-)), it is, as you say, trying to understand what the shape of the data is.

colin.yates08:10:11

having said all of that, some of the fns are far more readable with the threading operator than I could ever have gotten close to with Java/Groovy.

agile_geek11:10:52

@colin.yates: glad to know it’s not just me.

pbostrom13:10:14

@agile_geek: you might consider checking out annotate: https://github.com/roomkey/annotate it's a little bit more lightweight/less noisy than schema, just a single type annotation at the top of the defn above the docstring

roberto14:10:31

I also still have problems understanding some deeper clojure concepts (transducers is the first thing that pops to mind).

roberto14:10:23

And also make heavy use of pre/post conditions and Schema (where it makes sense). I normally add Schema after the fact, once I’ve refactored all my functions and see them working.

placeboza14:10:33

The real world is such an ugly thing. i.e. Business vs Academic

placeboza14:10:47

(random side comment)

roberto14:10:00

yeah, it is what makes life interesting.

placeboza14:10:19

and makes us die young

roberto14:10:27

speak for yourself simple_smile

placeboza14:10:27

it would be fine if I could change my situation, but most of the problems I'm trying to deal with are not caused by me or under my control

placeboza14:10:43

short of resigning, of course

roberto14:10:57

I know how you feel

roberto14:10:45

just in the past month I’ve been able to do clojure in my day job. Very small applications, but it made me very happy.

roberto14:10:56

Before that it was only in the weekends.

mj_langford16:10:31

I’ve been looking at doing something like http://osv.io/blog/blog/2014/07/27/capstan-lein-template/ OSv to run clojure apps on. Is there a particular cloudOS/Unikernel that anyone else is using for their clojure deploys they’d recommend?

sventechie18:10:34

@mj_langford: I’ve experimented with Heroku, OpenShift and AWS — they are all quite easy, also Docker but probably want an Oracle JDK for performance

mj_langford18:10:23

@sventechie: I'm more looking for a fast launching "os free" pre-built image situation rather than something like Heroku

placeboza20:10:27

A smooth system deploy always makes me nervous. Means I missed the real problems 😛

placeboza20:10:47

maybe I've just gotten too cynical

sventechie20:10:51

@mj_langford: you mean like CoreOS or something even lower level?

mj_langford21:10:44

@sventechie: lower still, unikernel if possible, something like http://osv.io/manageability/ if not