Fork me on GitHub
#clojure-uk
<
2016-11-08
>
agile_geek08:11:17

Google cards found this blog for me this morning: https://blog.appcanary.com/2016/missing-clojure.html Makes interesting reading, more for what it doesn't say than what it does. I really, really want to hear the Ruby Conf talk now as, much as I love clj/cljs I recognise it's faults and I want to understand what makes ppl move away from it. Apart from types... @martintrojer

martintrojer08:11:10

yeah, doesn’t say why they left.

martintrojer08:11:06

like I stated before, I grew out of it. Types makes me a better, faster, more productive developer. Simple as that.

martintrojer08:11:30

‘Types’ <> ‘Java types'

agile_geek09:11:22

@martintrojer yeah, I see your point. I don't think Clojure will ever get types a la Hindley-Milner because of the JVM eco-system. I'm not sure you can reconcile H-M types and class files as implemented in JVM?

martintrojer09:11:03

Frege is a good attempt

agile_geek09:11:40

Only briefly seen Frege...at a Java conf if you can believe it.

martintrojer09:11:13

yeah, it comes a bunch of other problems 😞

thomas09:11:10

wasn't Bodol an attempt to do something like that?

agile_geek09:11:21

Given that types definitely bring something to the party, the majority of the issues in codebases I've seen throughout my career would not be solved by HM typing (or any other kind). They're much more fundemental and caused by lack of (human) communication, lack of developer discipline, etc.

agile_geek09:11:13

These issues are 'low hanging fruit' and can be tackled to a greater or lesser degree in any language. Although some are better suited than others.

thomas09:11:58

programming is mostly a cultural problem and not a technical problem IMHO

thomas09:11:34

ie the culture of your team has more influence on the outcome of a project compared to technical factors.

agile_geek09:11:12

@martintrojer Given your re-write of the UI in Elm I suspect you would have seen major improvements in the codebase regardless of what lang you used...simply because you were, consciously or subconsciously applying the lessons learned from the first attempt. Not to disregard the advantages of Elm but I suspect the larger gains would have been driven by this experience of having 'done it before'.

thomas09:11:22

and as @agile_geek says... some languages are better suited than others.

agile_geek09:11:30

@thomas absolutely! That's why, once I had full control over recruitment practices in my previous role as CTO, I abandoned experience and acronym filters for 'cultural fit' and 'aptitude' based on pairing with people during selection

agile_geek09:11:55

Still, back to my initial point, would love to know why Appcanary abandoned Clojure for Ruby....but it's telling that the company was initially a Ruby shop.

thomas09:11:07

I once read a story about Airbus where they build the fly-by-wire system in 3 different languages, just to make sure that any bugs in the system would be in different places and thus cancel each other out... (system took a vote I think). But during an investigation afterwards they found out that bugs where in the same area's of functionality, as those were the really hard bits... regardless of language.

thomas09:11:53

@agile_geek that makes great sense IMHO. if I were a hiring manager that is what I would look for as well.

thomas09:11:19

and yes. interesting to know why appcanay stopped using clojure

agile_geek09:11:01

Some of the best developers I've ever worked with don't have degrees and had some 'life experience' prior to taking up development. They were good at communication and empathy for users.

thomas09:11:57

yes.. empathy is a vital skill and not taught at uni.

martintrojer09:11:12

domain knowledge is what its all about.

thomas09:11:19

and I just send a tweet to appcanary asking them why they ditched clojure

martintrojer09:11:38

you have to understand what problem you are solving, that trumps all ‘mechanical’ code skills.

martintrojer09:11:08

there are plenty of 10x devs that doesn’t know anything but how to write code.

martintrojer09:11:27

they tend to do more damage than help

thomas09:11:55

true... and yet I'd rather with a humble person than a bastard who happens to know it all perfectly.

martintrojer09:11:04

Alan Kay brought this up at CodeMesh last week.

thomas09:11:17

those are not 10x devs in my opinion

martintrojer09:11:18

Our industry is jam packed with developers “who know nothing"

martintrojer09:11:43

“Inverse vandalism” <— Creating something because you can.

martintrojer09:11:57

We do that ALL. THE. TIME.

thomas09:11:05

as long as they admit that openly that doesn't have to be a problem.

martintrojer09:11:18

nobody admits their faults

Rachel Westmacott09:11:17

I’ve heard somewhere that the hardest problem in computer science is trying to solve the problem you’re supposed to be solving, rather than a tangential but more interesting one.

glenjamin09:11:12

The best type systems are for humans, not computers - so it seems logical that you could have a proper type system alongside the JVM’s in the same language

thomas09:11:28

@martintrojer maybe that is my fault then...

thomas09:11:56

as I have plenty of faults.

mccraigmccraig09:11:29

@agile_geek you can have a decent type-system in a language which spits out java classfiles. clojure doesn't have a decent type-system because clojure wasn't designed with a decent type-system, and it's hard to retrofit one

agile_geek09:11:31

@mccraigmccraig fair point. I have a follow on question (may even be slightly philosophical), given it would be hard...if not impossible(?) to retrofit one should we accept that the potential damage in trying is not worth the risk?

thomas09:11:06

is it possible to have a "decent" type system... yet still be dynamically typed?

mccraigmccraig09:11:06

@agile_geek i don't see any harm in trying - runtime boundary type-checking such as spec and schema is useful, and programming in clojure would be worse without it

mccraigmccraig09:11:17

but (and i might be wrong, it's above my paygrade) such approaches are sticking plasters and a clojure designed with static types would probably be a quite different language

thomas09:11:35

so my understanding is that Clojure uses the JVM type system and it is dynamically typed... but the JVM type system is not a HM type system.

thomas09:11:53

so that makes it a non-decent type system.

thomas09:11:05

but is it possible to have a language that is still dynamically typed yet builds on top of a HM (like) type system. now maybe these two things are incompatibly with each other. but I don't know enough about this.

glenjamin09:11:31

can anyone recommend a good starter template for a CLJS/reagent project that’ll need a small compojure api server component? I haven’t written a clojure app in ages!

martintrojer09:11:48

“JVM Type System” I think you mean “Java type system"

martintrojer09:11:05

most of the types only exists at compile-time

martintrojer09:11:22

Scala, Frege etc does it differently

thomas09:11:29

ok makes sense

martintrojer09:11:51

so its certainly possibly to have “Haskell types” on the JVM

martintrojer09:11:37

If you are interested on gradually-typed Lisps there is one source of truth; Racket

martintrojer09:11:47

Look there if you want to know what’s possible

martintrojer09:11:02

All this contract stuff (Schema, spec) is carbon copied from there.

mccraigmccraig09:11:30

@glenjamin i used https://github.com/martinklepsch/tenzing to get started a while back - @martinklepsch will perhaps be able to tell you whether that is still a good option

glenjamin09:11:39

that looks neat, I’m on the fence about forcing myself to brush up on my clojure vs just using all the modern JS stuff i normally do

thomas10:11:32

@glenjamin I have used tenzing in the passed and it is really good... unless you also want to role your own compojure server with an API you write and want to use from your CLJS app. I found that a bit hard to retro fit.

martintrojer10:11:44

go straight for Elm/Purescript

glenjamin10:11:22

The app involves doing client-side OAuth, Interacting with a Canvas, using map data and a bunch of other stuff that’ll be a pain in Elm

martinklepsch10:11:24

Tenzing is still good :)

martinklepsch10:11:54

You can retro fit a backend but it's not focused on that part

glenjamin10:11:59

Purescript would be cool, but I’m more interested in a working app than learning a new lang for this project

glenjamin10:11:10

which leaves me with JS vs CLJS

agile_geek10:11:33

@glenjamin given your wealth of experience in JS do you feel CLJS will be a better fit?

glenjamin10:11:13

i think it’s a better system, they’re both decent choices for the app. Sharpening up my clojure would be a nice side-benefit

martintrojer10:11:27

well done Prince Harry

martintrojer10:11:36

talk about hitting above your weight.

thomas10:11:54

the british press is the very worst.

martintrojer11:11:18

now the Mail and its army of brexiteers have something else to hate.

martintrojer11:11:59

(ex-olympian gay judges are safe for a day or two)

martintrojer11:11:44

they will scare her away no doubt, who wants all that hate in their life?

martintrojer11:11:29

will turn harry bitter and cynical. The circle of hate is complete.

thomas11:11:23

what makes you think he isn't that already?

martintrojer11:11:54

> “shit-on-absolutely-everything-to-sell-copies-journalism"

martintrojer11:11:08

reading the DM comment sections is like staring into the abyss.

thomas11:11:18

that sums it up basically.

martintrojer11:11:22

worse than youtube comments (not saying little)

thomas11:11:29

what is more worrying though that it does sell.

thomas11:11:35

ie there is a market for it.

martintrojer11:11:48

I think we have to close this internet-thing down, ‘they' turned it into a massive hate and stupidity chain reaction.

thomas11:11:37

makes perfect sense.

thomas11:11:44

or just shutdown twitter.

glenjamin11:11:45

the evening standard appears to be bucking the trend

thomas11:11:02

but is LDN only isn't?

martintrojer11:11:42

Its time for London to break out of whatever is left of the UK

thomas11:11:59

the un-united kingdom... with a queen.

martintrojer11:11:15

The Republic of London sounds good to me

martintrojer11:11:24

Currency; Euro.

dominicm11:11:17

Somebody proposed this. Fairly seriously too. Not sure if we're referencing it, or the idea is re-circulating.

minimal11:11:17

can we not have USD? (if hillary wins)

thomas11:11:29

in 1984 (the book that is) the UK was part if the same country (forgot its name) as the (former) US and it used $ I think.

thomas11:11:33

and was METRIC!

thomas11:11:11

and the rest of Europe was part of the country that also contained Russia I think

dominicm11:11:41

Apparently this was a more widespread idea than just the medium post I read...

korny12:11:01

re: earlier discussion, I’d go for empathy over domain knowledge any time. I’ve known far too many people who were great at their technical skills, but unable to accept when they made mistakes, or when their knowledge was out of date, or what their limitations were.

reborg12:11:38

Looking from a more bird's-eye perspective, Uncle Bob’s https://www.youtube.com/watch?v=ecIWPzGEbFc raises interesting points about why we are where we are in terms of quality of programmers. (you might like him or not, but judge the content here).

reborg12:11:42

He points out a specific point in time where women were kicked out from our industry (and why that might be the case is left to audience a bit). That contributes (IMHO) to the software engineers average quality today.

agile_geek12:11:26

@reborg much as I dislike some of Uncle Bob's political views I think he may have a point there.

martintrojer12:11:07

the problem ofc is that languages does matter.

martintrojer12:11:46

there is research in this area and stuff are moving forward (a bit slowly but still)

martintrojer12:11:14

I don’t agree the Uncle Bob’s ‘lets give up looking for something better and solve it with process’ mentality.

martintrojer12:11:36

If we agree with that argument why aren’t we all still using Java1.1 ?

reborg12:11:59

@martintrojer I agree with you… although I remember something along the lines of we are constantly re-inventing the wheel of languages when almost everthing important interesting was invented between the ‘50 and the ‘60

korny12:11:27

yeah - I think he’s over-reacting to people going a bit mad with polyglot programming. But languages are the tools of our trade, we should always be trying to use better tools

martintrojer12:11:42

Sure, there is alot of wheel re-inventing going on. But as I said, there is research in this area and not everything that happens to new languages is rehashing papers from the 50s and 60s.

martintrojer12:11:57

Haskell and Idris comes to mind.

glenjamin12:11:33

Also pretty much all human/team-focused stuff

korny12:11:01

Also sometimes a wheel needs better UX and good marketing to be useful 🙂

korny12:11:06

See also Clojure vs Common Lisp

glenjamin12:11:38

persistent immutable data structures are from the 90s iirc

thomas12:11:36

@glenjamin they are indeed. and I think Phil Bagwell's (?) is early 2000's

glenjamin12:11:03

tracing JIT compilation appears to be pretty new as well

thomas12:11:27

Re Uncle Bob... I suspect he makes controversial statements to get a discussion going and hence I would add some nuance to the things he says.

thomas12:11:28

one talk I saw was very black/white, which isn't true in my experience. most things are just a shade of grey. (even white and black are)

korny13:11:57

Black is more like #010101

glenjamin13:11:17

is that a slack feature, or did you add a black box on the end?

agile_geek13:11:40

that's awesome

dominicm13:11:07

inb4 someone builds art out of this

practicalli-johnny14:11:44

The colour of my highest number of github contributions this month #1e6823

thomas14:11:49

hmm dead beef is remarkably pinkish....

practicalli-johnny14:11:28

doesnt the colour of dead beef usually depend on how its cooked?

thomas14:11:18

before it is cooked it is just deadbeef I would have thought

keeds16:11:16

Interesting. I had a play wit Elm at the weekend to knock up a prototype for work and quite enjoyed it.

glenjamin16:11:04

the second link there is a nice example of what Evan suggests you don’t do

glenjamin16:11:19

he starts with “there’s no typeclasses” and spends ages in a rabbithole trying to make typeclasses

glenjamin16:11:31

he neglects to mention the concrete scenario where typeclasses were desired

glenjamin16:11:44

also, the Dict in elm is crap

minimal16:11:46

Sandy is angry

glenjamin16:11:54

inability to enumerate enum types is valid though afaik, I think @krisajenkins has a trick for that?

krisajenkins16:11:19

@glenjamin Sadly, no. But if we’re talking about the same thing, I don’t think Haskell is particularly great for that either...

krisajenkins16:11:08

> It’s such a shame that Elm is so terrible from a PL standpoint. This is desperately wrong. This man needs to be sent to the JavaScript mines for a month or two to straighten him out.

glenjamin16:11:36

interestingly, I handle that case via JS with flow

glenjamin16:11:55

If I define a map of Enum->String I can enforce that it is total

glenjamin16:11:59

and then I have my bijection

krisajenkins16:11:45

Hmm…smallcheck must have a way of doing it (in Haskell). I should look that up. :thinking_face:

glenjamin16:11:48

hang on, why does he need a bijection? Should have kept the enum value and closed over it for the event handler

minimal16:11:48

looks like you can do it in haskell by deriving from Enum and Bounded, but it only works with nullary types

minimal16:11:08

data Color = Red
           | Yellow
           | Green
           deriving (Enum, Bounded, Show)

allColors = [(minBound :: Color) ..]

minimal16:11:40

> allColors
[Red,Yellow,Green]
> allColors !! 0
Red

glenjamin16:11:59

ah, you can’t close over the enum because the change event is on the select