Fork me on GitHub
#clojure-uk
<
2017-07-06
>
dominicm09:07:02

this room is full of maven healers. I'm trying to deploy a fork of a clojure core library to clojars. The parent pom specifies sonatype or something as the repo. How can I override that in the child pom? I already have:

<distributionManagement>
    <repository>
      <id>clojars</id>
      <name>Clojars repository</name>
      <url>https://clojars.org/repo</url>
    </repository>
  </distributionManagement>
added to the pom.xml. parent pom for the lazy: https://github.com/clojure/build.poms

yogidevbear09:07:56

☀️ Morning

mccraigmccraig10:07:36

↕️ umown ↕️

chrjs11:07:06

Is there some group wisdom on a good “second book” for Clojure? For someone (shh, it’s me) who is productive, but probably not writing idiomatic code. I’ve heard The Joy of Clojure fits? Or Clojure Applied?

otfrom12:07:18

clojure applied

weavejester12:07:03

Though unfinished, I liked the first chapter of https://leanpub.com/elementsofclojure

otfrom12:07:26

that is very good. I think that is more about a clojure mindset. Clojure applied felt more like solving every day problems (so I'd recommend both really)

weavejester12:07:27

Looks like there are three more chapters done since I last looked at it.

reborg12:07:29

Sorry for the self-promotion, but I think there is some sort of wisdom also in Clojure STD annotated reference (the book I'm writing). It's just very granular (at the function level) compared to Clojure Applied for instance (which is higher level). Would be happy to know what people think about it, negative feedback also accepted 🙂

chrjs13:07:14

Self promotion welcome. As are books both about “theory” and application. Thanks for the tips all.

agile_geek13:07:26

@chrjs I've read both Clojure Applied (pre release) and the current state of elements of Clojure.. both are excellent but take a different perspective. 'Elements' feels like philosophy of Clojure mixed with good advice on the basics of an idiomatic approach to thinking about designing in the micro. Clojure Applied is more pragmatic advice about Clojure specifically (as @otfrom suggests it has some examples relating to real everyday problems) and covers a lot fo intermediate level design rather than low level details (naming, namespace organisation, etc). I like Clojure Applied a lot. It's easy to read cover to cover but I dip back into it for examples (especially the elegant use of core.async pipelines which I think elevates core.async usage to a higher level of abstraction making it, IMO, much easier to use).

otfrom13:07:19

sounds like @agile_geek said what I thought but was too heat addled to write 😓

agile_geek13:07:59

@otfrom the benefit of being up north in the rain...my brain is cooling nicely!

otfrom13:07:59

what @reborg is writing sounds great. I still use Linux in a Nutshell loads

otfrom13:07:09

I need gelato

otfrom13:07:13

and an ice pack

otfrom13:07:16

and a new brain

agile_geek13:07:33

Oh I still need Gelato

glenjamin13:07:58

in this part of the north its roasting

agile_geek13:07:22

@glenjamin head further north

agile_geek13:07:38

up here on the wall it's fine

agile_geek13:07:38

It's a comfortable 19 degrees centigrade up here

agile_geek13:07:58

@jonpither nice blog on Health Unlocked. I was talking to Russell two weeks ago. We had a meeting of minds on his reservations around microservices for example. I like what they are doing from a social as well as a technical perspective.

glenjamin13:07:06

20 services for 8 devs still sounds a tad high to me 🙂

glenjamin13:07:53

> So, controversially, I’ve come to prefer bigger applications with are composed of independent vertical slices of functionality. We enforce ‘in application’ segregation using different package structures as boundaries of the various sub-domains. This gives us the benefit of isolation without the pain of setting up the boilerplate of Microservices. I like this

jonpither13:07:46

@agile_geek I like @malcolmsparks's phrase that Microservices are a technical solution to a social problem

agile_geek13:07:54

@jonpither I think the problem is when you treat Microservices as a solution to a social problem...it's a perfectly good solution to a technical problem around scaling.

agile_geek13:07:17

@glenjamin I think Health Unlocked are consolidating those services to a more managable number.

chrjs13:07:52

Thanks @agile_geek, that’s more or less what I anticipated regarding Clojure Applied. I hadn’t heard of Elements but it sounds like I’m going to have to give both a go 🙂

mccraigmccraig13:07:14

ha @glenjamin i like that too, perhaps because it validates some of my choices 😄

glenjamin13:07:28

microservices is a solution to the social problem of scaling, not the technical problem of scaling

agile_geek13:07:11

@glenjamin not sure I agree entirely but it certainly has elements of both. My worry is when it's adopted without thought to the implicit acceptance of a number of issues that come with more complex distributed systems.

glenjamin13:07:15

I suppose particularly bad monoliths probably don’t scale well, but often you can just run N even if you don’t use all the functionality in each node

glenjamin13:07:45

someone here mentioned a weblogic app that uses one thread per user and requires sticky sessions. which is both hilarious and horrifying to me

agile_geek13:07:12

The first 'web' app I ever wrote needed a minimum of 7 threads per user but this was in 1996 before Java application servers/Web containers, servlets, let alone JSP. It was a custom built reporting engine that used a thick client UI built in swing hosted in a Java applet. It only supports about 300 users simultaneously but it's still running (runs on NHSNet for internal users in health authorities, etc.)

mccraigmccraig14:07:19

a minimum of 7 threads per user @agile_geek - what on earth did it do with those, and what was the maximum ?

glenjamin14:07:33

my understanding is the weblogic thing uses something like threadlocal storage as a user session

agile_geek14:07:03

@mccraigmccraig remember there was no non blocking I/O api's, no application server, no servlet specification, no libraries to support HTTP, nothing. So one thread was basically a keep alive/session thread, then we had five panels on the UI..3 were drop down trees for selecting data in three different dimensions and the other two where output panels, one for graphs and one for textual display of the same info. We had a thread per panel plus one additional thread for control messages (like run report etc.). I think we could have designed it better but we were basically writing a Java application server with no middleware library support and trying to deliver reporting business requirements at the same time.

mccraigmccraig14:07:34

yeah, no NIO... insanity

yogidevbear15:07:10

This part of that interview really made me chuckle: >Jon: What editors do you use? >Alex: We use all of them. Vim, Emacs - Spacemacs, Sublime, Intellij. Our front devs use VS Code. Developers can use whatever they are used to. >RusselL I converted one person to Vim. >Alex: Yes, he's been coding very slowly ever since!

dominicm15:07:11

I've started a little vim camp in JUXT, slowly taking over

otfrom15:07:45

@dominicm do you have a good vim clojure setup (and docs for it somewhere)? I'd like to point the vim ninjas at some good examples. I've nothing against it. I just can't help when things go wrong.

dominicm16:07:06

@otfrom https://juxt.pro/blog/posts/vim-1.html all the parts of ninja'ing. My particular config https://github.com/SevereOverfl0w/.files/tree/master/nvim/layer/clojure I'm in the process of turning my init.vim into a literate, so it can be used as documentation for others.

dominicm16:07:11

If you point people to #vim-fireplace I always work my hardest to help people there also if they get stuck.

otfrom16:07:01

literate config is the way to go obviously: https://github.com/otfrom/otfrom-org-emacs

dominicm16:07:26

I had to find an editor agnostic literate tool 😉

otfrom16:07:45

we all have our burdens. Think of it as character building. 🙂

malcolmsparks16:07:04

My view on microservices isn't far removed from the classic paper https://en.m.wikipedia.org/wiki/Fallacies_of_distributed_computing

seancorfield16:07:04

@dominicm I just don't "get" literate programming... It's been around for decades and it's still incredibly niche (and deservedly so IMO)... why is it still an idea that just won't die?

dominicm16:07:08

@seancorfield It makes a lot of sense for my init.vim for a couple reasons: * has to be in a particular order, which doesn't make sense for actually understanding things (plugins & their config have to be kept apart normally) * I want to document this weird hacks I come into & use, because they're hacks (I actually think a comment is fine here though!) * There's a bonus for me as someone who wants to share, in that I can produce a html file as documentation for others to learn about how to setup their init.vim for Clojure with documentation on why things are how they are. Generally agree though.

malcolmsparks16:07:08

@seancorfield what are you misgivings about it?

otfrom16:07:19

speaking of which... anyone here got lumo working with org-babel?

malcolmsparks16:07:43

On the microservices thing, I offer the thought experiment that if Rich released a Clojure 2.0 that was faster and more scaleable with the tradeoff that 0.01% of function calls hung, would you upgrade?

malcolmsparks16:07:31

Of course you wouldn't! So what is so cool about microservices again?

otfrom16:07:37

@malcolmsparks as always, it depends on the problems you are trying to solve, but for many the problem doesn't require microservices

yogidevbear16:07:38

@otfrom, what problems would you say require microservices?

malcolmsparks16:07:35

The technical tradeoffs with microservices are far more expensive than the (seemingly intractable) social reorganisation of development around monoliths. I fear this trend is accelerated by the ease of starting new projects. Optimising the first 2 weeks of an experience over the rest of the lifetime of an experience is proven to be a poor overall choice. Exhibit A: Microsoft software

malcolmsparks16:07:11

Exhibit B: Not learning to type

otfrom16:07:23

@malcolmsparks dunno. Unix seems like a nice collection of microservices to me. 😉

malcolmsparks16:07:58

Try using them over a wobbly NFS

malcolmsparks16:07:13

That is a closer analogy

otfrom16:07:16

and you are already doing distributed programming as soon as you hit a database and definitely when you hit a website

otfrom16:07:57

I'm not a big fan of making network calls invisible, but that is b/c I lived through CORBA/dce/xml-rpc/SOAP the first times

malcolmsparks16:07:12

And it has taken decades to figure out how to make that relatively simpler architecture to work...

otfrom16:07:28

but I can't think of a single bit of serious app dev where I haven't written code to talk to another process that was on another box

malcolmsparks16:07:51

The Network Is (Not) The Computer.

otfrom17:07:04

(and the erlangers have been doing it for ages and laughing at us) 😉

malcolmsparks17:07:24

Because maybe app dev in-process is trivially easy?

otfrom17:07:51

I'm a programmer archaeologist. I'm always going to be speaking to something else. I might as well make some of those things I'm talking to nicely decomposed

otfrom17:07:09

whether or not they live in process is something that I can make a decision on multiple times

malcolmsparks17:07:34

The Erlangers get it. They realise that if you want to do microservices, then you habe to throw out everything and start again

otfrom17:07:50

true enough

otfrom17:07:42

@yogidevbear I suppose a lot of times my microservices are bits of ETL or streaming pipelines that I don't want to have in a single process. Restarting and reprocessing in a monolith is a real pain, even with a repl

dominicm18:07:05

In the past I've just restarted the component from the repl. Short of a gui to do that, seems to work well

otfrom17:07:59

and being able to have dependencies move at different speeds is really nice

otfrom17:07:12

Most web apps don't need to be microservices

otfrom17:07:31

but a lot of data apps (the kind I tend to write) esp if they are getting data from multiple places fit well with it

otfrom17:07:34

does any of that make sense?

yogidevbear17:07:06

I wasn't asking to be funny or anything 🙂 Was just curious on opinions

otfrom17:07:17

most of what I do is just perl programming in a nicer language. 😉

yogidevbear17:07:54

Don't really get to do much microservices stuff in ColdFusion 😂 (Read as "...do any microservices...")

otfrom17:07:05

@yogidevbear didn't think you were being funny at all. Just wanted to make sure I was actually presenting something reasonable while also having fun trolling @malcolmsparks in a friendly way

otfrom17:07:49

was just thinking I didn't do much microservice stuff in salesforce, but in fact I did, and again it was all around data pipelines and integration

seancorfield17:07:04

@dominicm Every "literate program" I've ever seen makes the actual code impossible to read and it feels like it would get in the way of refactoring (you need to move code around -- what happens to the documentation around it?). I just can't imagine trying to maintain 10s of thousands of lines of code that has the same amount again as documentation all interspersed! /cc @malcolmsparks

dominicm18:07:36

For my particular use case, I'm working append only to a pair of blocks. There's definitely increased understanding by doing the breaking apart. I think a whole program would be difficult, and in some cases better served by comments. Knuths argument is that literate forces him to write those "comments". I think there are cases when you want to weave a program, or particular namespace, because it makes sense. Perhaps any changes to that program are rewrite only. I think literate eases read far more than write. And when it's time to maintain something certain things only grow.

rickmoynihan22:07:08

@seancorfield: Don’t forget Knuth was arguably more interested in writing papers and documenting algorithms than writing programs. Literate programming to me feels like a workflow optimised for his requirements.

seancorfield22:07:53

Yes. This, exactly!

rickmoynihan22:07:16

This said I think literate programming makes a lot of sense if you view it not as writing essays, but as structuring your program around the best way to explain it to a human, rather than having to structure it to please the computer and secondarily attempt to make it readable.

rickmoynihan22:07:18

It’s basically a movement to put communication first, rather than the computer. I find that ideal hard to argue with. Though can’t say I’ve ever practiced it beyond playing around with org-babel.

dominicm06:07:55

Algorithms are quite write once too. As they don't change much, if there's a bug, you will see the logical fallacy through the documentation around it. I'm sure there's something to be said about first principles and poking these days