Fork me on GitHub
#clojure-uk
<
2017-05-19
>
thomas07:05:42

morning 😼 mogge

thomas07:05:32

@maleghast I have been known to think about thinks for years before finally starting on it (partly because I had no clue where to start).

thomas07:05:42

I call it extended-hammock time

yogidevbear07:05:20

>extended-hammock time I like that. Sounds very similar to parenthood.

mccraigmccraig07:05:54

@thomas although if you start on it you will very quickly acquire a comprehensive appreciation of how not to start on it !

thomas07:05:08

@mccraigmccraig good point... maybe I just love to procrastinate

maleghast07:05:36

Yeah, I am going to get started on it today - no more time to spend... 😉

maleghast08:05:44

@peterwestmacott - Good morning, Sir 🙂

agile_geek08:05:25

@thomas @mccraigmccraig the trick is to get comfortable with the fact that you will disabuse yourself of your assumptions while implementing and be happy with chucking stuff away having learned.

thomas08:05:33

I am very happy to chuck stuff away 😉

mccraigmccraig08:05:53

yep, i love killing code 🔨 :dagger_knife:

dominicm08:05:43

deleting code > writing code

thomas09:05:50

I delete quite a few lines of Java code earlier this week... felt very good!!!

mccraigmccraig09:05:28

i had to debug and write some java last week. didn't feel so good. fortunately it only turned out to require 4 lines, but yuck

jasonbell09:05:08

Am I the only person in the room that doesn’t have a problem with Java?

mccraigmccraig09:05:28

@jasonbell any language which doesn't have lexical closures and macros can go burn imuo (and i know java has lexical closures now, 20 years after it's inception, but it's way too little way too late)

jasonbell09:05:24

@mccraigmccraig that’s just splitting hairs…. LOL

agile_geek09:05:32

Java's not my favourite language but you can't fault the utility it brought or the ecosystem it spawned. Remember ppl see it through the lens of history...in 95/96 it was pretty cool. Contentiously, I don't think Java would have been so successful if it hadn't been quite restrictive and a bit formulaic. It's what enable millions of people to be somewhat effective writing it... although we all know there are more powerful and pleasant languages!

jasonbell09:05:55

It gave me a good career so I’m not complaining 🙂

glenjamin09:05:14

PHP gave me my start in software dev, I can complain about it very articulately - and also list some pros

mccraigmccraig09:05:29

to be fair, java brought garbage collection to the world, and i should add garbage collection to my list [lexical-closures, macros, garbage-collection]

glenjamin09:05:31

something being useful/effective doesn’t mean we shouldn’t complain

glenjamin09:05:10

Java being a great step forward in the mid 90s and a weight around your neck in 2017 can both be true

agile_geek09:05:12

@glenjamin I agree, but Java's not the devils spawn...and I complain about Clojure!

maleghast09:05:06

@glenjamin - Me too! PHP is a steaming pile of foetid dingos' kidneys and I am pleased to say that in the short term at least I can ignore it completely!

maleghast09:05:40

@glenjamin - ...but yes, there are some pros even to PHP... 😞

glenjamin09:05:49

PHP as a language has gained lots of good features and libraries. But all the existing horrible code, libraries and features still exist

glenjamin09:05:56

But back-compat is generally a good thing

agile_geek09:05:03

My biggest worry is that we (as an industry) don't learn the lessons of the past...we seem to keep repeating mistakes from 20 years ago!

thomas09:05:52

or ignoring things that were learned/discovered even longer ago

mccraigmccraig09:05:00

@agile_geek cf. homeopathy, astrology and the advancement of science in funereal increments

maleghast09:05:02

I think that's all fair comment, for sure, but I have to say that I've had some positive experiences of Java and while they are few in number I think that it's hard not to recognise Java's contribution to the "now" or indeed write it off completely

glenjamin09:05:00

IME Java is easy to write badly, and tricky to write well

mccraigmccraig09:05:00

plus those smalltalk peeps really knew what they were doing, and the jvm platform is still awesome

maleghast09:05:05

That having been said, I am pleased that the only code I am writing at the moment is Clojure, and that is notwithstanding my own difficulties with it and the issues I face as a keen amateur who is trying to become a pro in this wonderful language

maleghast09:05:03

@glenjamin - Absolutely true, and also true to a lesser degree of almost all programming languages, but you are right; Java suffers from being easy to use badly. The only language that is easier to use badly is PHP 😉

agile_geek09:05:12

I would say that Java is no more prone to being written badly than C++ and C#. Why do you think it's worse @glenjamin ?

glenjamin09:05:40

But it’s harder to write bad clojure

glenjamin09:05:46

it’s also harder to write clojure at all

agile_geek09:05:51

@glenjamin true - I made an assumption!

maleghast09:05:53

Yes! That I completely agree with on both counts 🙂

mccraigmccraig09:05:53

"if C gives you enough rope to hang yourself with then C++ gives you enough rope to rig a tea-clipper and then hang yourself from one of the yardarms"

glenjamin09:05:03

it’s easy to write bad go, but also easy to write go

agile_geek09:05:29

Is there a theme there?

agile_geek09:05:55

i.e. if it's 'easy' in a 'familiar' sense it's easy to write badly?

glenjamin09:05:05

Languages with more modern features and/or strong abstractions make it hard*er* to write badly imo

glenjamin09:05:23

i often see nested for loops with “business logic” inside them in Java code

agile_geek09:05:25

Has Clojure got more modern features? Most date back to early Lisps?

agile_geek09:05:43

It has some more modern features

maleghast09:05:44

@glenjamin - nested loops are one of my big gripes with so-called "professional" PHP developers who don't even see what they are doing wrong...

glenjamin09:05:37

features from early lisps are unfortunately modern by comparison to popular languages

agile_geek09:05:26

I think what @glenjamin is alluding to is similar to my comments in the past that "more restrictions" can be good (if they're the right restrictions!). I.e. they make it hard to write code badly.

glenjamin09:05:45

but they increase the barrier to entry, which puts people off

agile_geek09:05:33

That leads me to posit if static typing (done well) is better than dynamic?

maleghast09:05:49

Even just really strong community conventions that drive good decisions in code, like the ones that I have encountered in the Python community, can be more helpful than the "everyone does it their way" that I have encountered in PHP and Java devs...

agile_geek09:05:12

Static typing is more restrictive

mccraigmccraig09:05:41

@agile_geek i find it hard to argue against the assertion that the compiler should be checking more stuff automatically so that you don't have to

maleghast09:05:20

I had a play with Haskell last year and I did enjoy the certainty, but even "at play" I was aware that it was hampering my ability to experiment in some cases.

mccraigmccraig09:05:28

static typing is not entirely more restrictive @agile_geek - the type annotations are also data which gives you additional processing possibilities which are not present in dynamically typed languages

maleghast09:05:42

There is a part of me that wants to be all for static typing, but I get so much out of Clojure not being...

glenjamin09:05:06

I don’t think many people would argue with “static typing (done well) is better than dynamic”, they’d just debate what it means to be done well

agile_geek09:05:19

I think my ambivalence comes from this...when exploring a problem I want dynamic typing but once I begin to understand it and/or there's more than me working on the problem I want static.

agile_geek09:05:10

I guess spec is a compromise...not sure how reasonable it is yet as my experience isn't extensive enough.

maleghast09:05:16

@agile_geek - Does that just translate to "I don't trust other developers"?

mccraigmccraig09:05:18

sounds like you just want an easy to hack statically checked type-system @agile_geek - have you tried kotlin ?

agile_geek09:05:37

I've looked (briefly) at Kotlin

agile_geek09:05:01

@maleghast not at all. It's true of me working on other ppls code

glenjamin09:05:08

having a fast-feedback check which tells you your functions don’t actually compose like you thought they did is really useful

glenjamin09:05:24

having to write loads of annotations to get that cancels out some benefits

maleghast09:05:37

@agile_geek - I was being facetious, and I do get it really - apologies.

agile_geek09:05:57

@maleghast It's fine it was a very valid challenge .I meant that I like having something that allows me to codify data 'shapes' in a way that both acts as documentation and catches mistaken assumptions early (at compile time is good)

thomas09:05:41

@mccraigmccraig re JVM... the JVM is a good piece of technology, but at the same time failed one of its objectives-> write once, run everywhere. in reality it is write once, test everywhere.

agile_geek09:05:42

Once more that one person works on the same code you have more than one set of asumptions

maleghast09:05:42

I can see the benefits of that, indeed - I even quite like the idea of what you are describing

agile_geek09:05:02

and the more than one person can be the future me

glenjamin09:05:27

I also tend to see JVM apps be very RAM heavy, I have no idea if this is down to the platform, libraries or coding practices

glenjamin09:05:48

I was trying out the Rancher server the other day, and it was using 4GB of RAM in a demo install with no data in it

mccraigmccraig09:05:19

@thomas write-once->test-everywhere is >> write-many-times->still-test-many-times

thomas09:05:21

@glenjamin try and install an average IBM product that runs on the JVM 😉

agile_geek09:05:43

It's still the closest we've come to write-once->run everywhere

thomas09:05:59

@mccraigmccraig but that isn't what was promised... so in that sense one can say it failed.

agile_geek09:05:14

I don't think JS in different environments is much better?

mccraigmccraig09:05:23

@glenjamin my API processes are using about 70MB of heap as an un-collectable base, while my onyx processes are all the way up to 80MB... all of them obviously use a load more memory for servicing requests, but they can all quite comfortably run with 1GB heap

glenjamin09:05:50

yeah, I’m pretty sure that these things can be lightweight, but rarely seem to be in practice

glenjamin10:05:09

generally NodeJS processes are light-ish without major effort

glenjamin10:05:18

with effort, JVM can probably get lighter

agile_geek10:05:36

Maybe that suggests it's platforms? too many features?

thomas10:05:37

they can be... WebSphere uses loads of memory, the so called Liberty profile from WebSphere uses a lot less.

agile_geek10:05:01

Liberty is still pretty bloaty

agile_geek10:05:14

Just nothing compared with WAS!

mccraigmccraig10:05:30

@thomas true - but what was promised was either hopelessly naive or insane marketing fluff

agile_geek10:05:57

Websphere Application Server

agile_geek10:05:05

my enterprise roots are showing!

mccraigmccraig10:05:08

mmm. application servers... what do those do again ?

mccraigmccraig10:05:30

(apart from make IBM a load of cash)

agile_geek10:05:32

Great question....nothing anyone really needed!

thomas12:05:42

just learned that Ulysses S. Grant was the youngest president ever when he was inaugurated, yet he had already been the commanding general of he US army at that time. quite an accomplishment if I may say so.

maleghast12:05:14

He was quite an impressive individual on many fronts.

otfrom13:05:30

and an alcoholic and terrible president (tho not as bad as some of the other post Lincoln ones)

djtango13:05:11

quick question guys - does anyone have any boilerplate for reading bytea type from Postgres in Clojure?

djtango13:05:24

need to convert to string

djtango14:05:20

(-> bytes byte-array String.) seemed to do the trick

maleghast14:05:58

@otfrom - USG definitely liked a drink (isn't there an apochryphal story about Lincoln sending him a case of whisky..? I may be misremembering), and yeah he was not a good President, but still an impressive figure in history.

agile_geek14:05:01

Lots of 'impressive figures in history' were not nice people. Churchill was arguably a good war time Prime Minister (although he was a bit of a disaster as First Sea Lord in WWI) but he wasn't great in his second term (after WWII - 1951-55)

agile_geek14:05:34

He was also a drunk of course

agile_geek14:05:53

Trump doesn't drink...perhaps he should?

alexsays14:05:48

I feel like if he was to drink he'd at least have an excuse for acts of brevity

maleghast15:05:49

@agile_geek - A lot more people are alleging that Trump's "tipple" is the old Columbian Marching Powder these days, and I don't find it hard to believe...