other-languages

here be heresies and things we have to use for work
borkdude 2017-11-20T15:23:20.000351Z

Interesting insight from @ericnormand : https://clojureverse.org/t/worried-about-types-clojure-elitism/616/25?u=borkdude

seancorfield 2017-11-20T16:24:22.000232Z

@borkdude fascinating piece about Haskell! It reflects how I feel any time I try to build anything more than Hello World with it:grinning:

borkdude 2017-11-20T16:24:55.000770Z

@seancorfield Can you explain what exactly you feel/think/experience?

borkdude 2017-11-20T16:26:08.000174Z

Are you responding to the post Eric wrote?

seancorfield 2017-11-20T17:00:26.000537Z

@borkdude I was one of the PhD researchers developing his own FP language back in the early 80's -- many British universities were doing that. When Haskell appeared, as a collection of "best of breed" features from all our languages, I was very excited and really thought Haskell would break out and take FP mainstream. It combined a lot of ideas that everyone had been working on and it was just so obviously the "right way" to build software. Of course, it stayed resolutely academic. So, over the 25 years it's been around, I've taken several runs at building something with it, something useful, non-academic, something real-world. Every time I've gotten incredibly frustrated with the state of tooling, libraries, the difficulty of doing certain basic thing (as the slide deck indicates, doing anything non-trivial with databases is still pretty painful in Haskell, as one example).

seancorfield 2017-11-20T17:02:27.000532Z

The academics never cared much about a good ecosystem, of course, and the non-academic portion of the community has often gotten too frustrated to overcome that inertia -- and given that absolutely everything has to be built from scratch in Haskell it's a huge amount of work trying to replicate what's available in other communities.

seancorfield 2017-11-20T17:03:23.000271Z

As Saurab said in that preso, they'd find half-baked / abandoned libraries -- or a complete lack of a solution -- and often build their own.

seancorfield 2017-11-20T17:04:01.000247Z

And this is after a lot of commercial usage of Haskell has really improved the ecosystem and made it much more practical for writing real-world applications.

borkdude 2017-11-20T17:17:10.000673Z

Kris Jenkins (yesql author) mostly moved to Haskell. I asked him if he missed something from the JVM ecosystem. He said no. I wonder what kind of apps he builds.

mpenet 2017-11-20T17:54:17.000594Z

Depending on the goal you dont need a large ecosystem. Haskell excels at some tasks sucks at others, same is true for clojure or any other language

seancorfield 2017-11-20T18:08:32.000411Z

@mpenet Yes, that's very true. And when I've talked to Haskell folks working in specific areas, they've usually settled on a set of libraries and tools that work for them but, when pushed, will admit to rough edges or omissions that they've just had to deal with and then that's their new "normal".

seancorfield 2017-11-20T18:10:27.000073Z

Logging and instrumentation (e.g., New Relic) are things we take for granted on the JVM but they are hard in Haskell (because they are impure actions that apply across "all" aspects of your applications. Companies seem to either write their own or simply not do those things (sometimes with elaborate justifications of why Haskell "doesn't need" those things -- which feels like Stockholm Syndrome to me!).

borkdude 2017-11-20T18:13:17.000164Z

Interesting critique of SBT (informally known as Scala’s Build Tool): http://www.lihaoyi.com/post/SowhatswrongwithSBT.html

seancorfield 2017-11-20T18:14:40.000142Z

Does anyone actually love SBT?

borkdude 2017-11-20T18:16:18.000215Z

Martin Odersky wrote an elaborate critique on SBT six years ago (see comments) but nothing got fixed

mpenet 2017-11-20T18:24:42.000185Z

@seancorfield logging and instrumentation is useless in some domains

mpenet 2017-11-20T18:25:18.000414Z

There's more than the vanillia app/service out there

mpenet 2017-11-20T18:26:02.000259Z

For general purpose tasks the jvm makes it easy for sure

seancorfield 2017-11-20T18:26:17.000356Z

@mpenet Right, but using Haskell for web apps -- which was the context of that slide deck -- means that logging and instrumentation are important and Haskell makes those very hard.

mpenet 2017-11-20T18:27:09.000659Z

Sure that s my point, moving from rails to haskell for this is a mistake imho

mpenet 2017-11-20T18:27:22.000248Z

There are better choices

mpenet 2017-11-20T18:31:48.000165Z

Hell, even scala would fit better ;)

borkdude 2017-11-20T18:32:19.000228Z

Play2 😛

borkdude 2017-11-20T18:34:41.000453Z

They could’ve also gone for JRuby if they needed something JVM specific

borkdude 2017-11-20T18:35:27.000062Z

But their needs were “refactoring confidently”, which doesn’t solve that

mpenet 2017-11-20T18:35:27.000277Z

Seems they were after code safety etc

mpenet 2017-11-20T18:35:58.000480Z

So yeah, prolly scala or even java/kotlin would fit the bill

borkdude 2017-11-20T18:36:18.000174Z

Their slide of Ruby code shows something that doesn’t necessarily have to do with static typing though. More with functional vs. RoR mutable magic

mpenet 2017-11-20T18:36:29.000263Z

True

borkdude 2017-11-20T18:37:32.000478Z

However, their JavaScript mentions: “what’s the shape of this JSON”, not much different from Clojure

mpenet 2017-11-20T18:38:34.000515Z

Yup no need to go full monads for that either, even go lang has this covered. Clojure with some spec could prolly do the same too

borkdude 2017-11-20T18:39:05.000252Z

How does go lang solve that?

mpenet 2017-11-20T18:40:52.000420Z

You declare structs with tags for json mapping

mpenet 2017-11-20T18:41:30.000141Z

It s somewhat composable via embedding too

borkdude 2017-11-20T18:41:51.000273Z

similar to Java + annotations I guess?

mpenet 2017-11-20T18:42:11.000035Z

Yes kinda

mpenet 2017-11-20T18:42:31.000496Z

Slightly more elegant imho, it s simpler

borkdude 2017-11-20T18:46:32.000066Z

type Response2 struct {
    Page   int      `json:"page"`
    Fruits []string `json:"fruits"`
}