admin-announcements

Announcements from the Clojurians Admin Team (@U11BV7MTK @U077BEWNQ @U050TNB9F @U0ETXRFEW @U04V70XH6 @U8MJBRSR5 and others)
agile_geek 2015-10-22T06:20:26.000520Z

@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_geek 2015-10-22T06:21:18.000521Z

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

agile_geek 2015-10-22T06:22:53.000522Z

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.yates 2015-10-22T08:04:40.000523Z

@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.yates 2015-10-22T08:05:30.000524Z

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.yates 2015-10-22T08:06:11.000525Z

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_geek 2015-10-22T11:55:52.000529Z

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

2015-10-22T13:32:14.000531Z

@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

roberto 2015-10-22T14:17:31.000533Z

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

roberto 2015-10-22T14:18:23.000534Z

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.

placeboza 2015-10-22T14:18:33.000535Z

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

placeboza 2015-10-22T14:18:47.000536Z

(random side comment)

roberto 2015-10-22T14:19:00.000537Z

yeah, it is what makes life interesting.

placeboza 2015-10-22T14:19:19.000538Z

and makes us die young

roberto 2015-10-22T14:19:27.000539Z

speak for yourself :simple_smile:

placeboza 2015-10-22T14:19:29.000540Z

haha

placeboza 2015-10-22T14:20:27.000541Z

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

placeboza 2015-10-22T14:20:43.000542Z

short of resigning, of course

roberto 2015-10-22T14:20:53.000543Z

hehehe

roberto 2015-10-22T14:20:57.000544Z

I know how you feel

roberto 2015-10-22T14:21:45.000545Z

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.

roberto 2015-10-22T14:21:56.000546Z

Before that it was only in the weekends.

mj_langford 2015-10-22T16:38:31.000549Z

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?

sventechie 2015-10-22T18:28:34.000552Z

@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_langford 2015-10-22T18:47:23.000553Z

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

placeboza 2015-10-22T20:14:27.000555Z

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

placeboza 2015-10-22T20:14:47.000556Z

maybe I've just gotten too cynical

sventechie 2015-10-22T20:56:51.000558Z

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

mj_langford 2015-10-22T21:13:44.000559Z

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