off-topic

https://github.com/clojurians/community-development/blob/master/Code-of-Conduct.md Clojurians Slack Community Code of Conduct. Searchable message archives are at https://clojurians-log.clojureverse.org/
mauricio.szabo 2020-09-06T00:21:21.383500Z

@p-himik although I mostly agree with you, there's a crucial point we disagree - that the issues would manifest in Clojure. Most things in the Rails world are closely tied - some specific version of Rails depends on a specific version of Ruby, and most libraries also depend on a specific version. Also, Rails have zero worries about backward compatibility, and is itself composed by 5-7 libraries, and all versions should match.

mauricio.szabo 2020-09-06T00:24:23.383700Z

So, if you want to upgrade Rails (the framework) you have to upgrade 5-7 libraries, all that have slightly different APIS for each version bump even when no feature really changed - most of the times is just a change in the methods. Also... the test libraries' versions also are tied with specific Rails versions, so you can't really depend on your tests...

seancorfield 2020-09-06T04:35:25.384200Z

@gbson We still have code in production that we wrote in 2009 (legacy code, prior to our adoption of Clojure, that we still plan to rewrite to Clojure at some point). A lot of projects I've seen over my career have survived for a decade (or more).

seancorfield 2020-09-06T04:36:18.384400Z

An insurance company that I worked at, as one of my first jobs, had projects that had been in continuous production usage for close to twenty years πŸ‘€

seancorfield 2020-09-06T04:37:46.384600Z

(COBOL code that had been written in the very early days of the language that still ran, although it had been ported to more modern servers)

seancorfield 2020-09-06T04:45:20.384800Z

@drewverlee Looking at that diagram, I can only assume that he didn't want to make the diagram more complex by adding a D (circle) with an h (function) from C to D. He shows f ; g going from A to C, and illustrates the identity functions, and then associativity.

seancorfield 2020-09-06T04:48:36.385Z

This page has notes on the talk that confirms that https://www.infoq.com/presentations/category-theory-propositions-principle/ -- "Another law states that if you compose three functions, it doesn't matter what order you compose them, i.e., composition is associative." (a law not illustrated by the diagram)

πŸ‘ 1
JP Silva 2020-09-06T16:31:26.392100Z

Hi folks, quick question/survey: If you were not allowed to use Clojure when working on a backend application (non-user-facing) what language would you choose? In other words, what's your first alternative to Clojure?

Faris 2020-09-07T07:49:26.425300Z

I’m a Ruby developer trying to get into Clojure, so Ruby it is!

borkdude 2020-09-07T07:53:34.425500Z

@hewrin What's your opinion on JRuby? Possibly you can combine Clojure with it?

Faris 2020-09-07T07:55:22.425700Z

haven’t tried it to be honest, sounds like an idea to try out though!

borkdude 2020-09-07T07:56:36.425900Z

I once ported from an MRI based project to a JRuby project. The only thing that we couldn't use was some native binary based image converter, so we switched to java AWT. The rest of the experience was seamless. I don't know why @seancorfield calls it second class. Granted, this was also my only serious Ruby project, so my exposure to this is fairly limited.

borkdude 2020-09-07T08:01:05.426200Z

The reason for the port was that our customer demanded we use the JVM

borkdude 2020-09-07T08:01:21.426400Z

and no additional installed binaries. They would run it on their JBoss server

Faris 2020-09-07T08:03:06.426600Z

How was it like maintaining long term?

borkdude 2020-09-07T08:03:42.426800Z

As far as JRuby was concerned, we had no problems with it

seancorfield 2020-09-07T16:54:19.428800Z

@borkdude I meant "second class" in terms of how, for a long time, JRuby lagged behind Ruby in terms of features: right now the latest JRuby is still at 2.5.x language level, whereas Ruby is up to 2.7.x, with the 3.x coming this year. So JRuby is lagging by a couple of versions and a few years.

borkdude 2020-09-07T16:54:42.429Z

Ah I see, didn't know that

seancorfield 2020-09-07T16:54:46.429200Z

(like Clojure CLR is second class and ClojureScript used to be)

mpenet 2020-09-08T08:03:32.438100Z

It's slightly OT. It's just a framework

mpenet 2020-09-08T08:07:49.438300Z

if on the jvm clojure, otherwise it depends on a lot of things for the choice: like hw requirements/limitations, domain etc. I have a thing for Erlang for having used it in the past for work, but it's highly situational again

littleli 2020-09-09T09:35:38.111200Z

It's difficult to compare. Scala ZIO is obviously focusing on Statically-typed Functional Programming. You simple model things differently with different approaches. Author once stated, that with Clojure there are things possible which are impossible in Scala/ZIO because it just constraint you on purpose. You'll face different challenges even among statically typed languages if the evaluation strategy is normal order vs applicative order. I like ideas of ZIO, they're just not applicable in Clojure.

πŸ’― 1
littleli 2020-09-09T09:36:06.111400Z

We have to live with our choices.

Ahmed Hassan 2020-09-10T03:01:45.119100Z

@ales.najmann Thanks. That makes sense. We have different trade-offs.

adamtait 2020-09-11T20:56:34.221600Z

I’m surprised that ClojureScript hasn’t been mentioned 😎 If you’re just building a web app where consistent performance isn’t required, or you’re running on AWS Lambda, then CLJS on Node could be a great choice!

lispyclouds 2020-09-06T16:34:52.392200Z

Most of the time it would be Python. If on the JVM would be Scala. πŸ™‚

borkdude 2020-09-06T16:36:13.392400Z

Apart from some Java, I have done 1 project with jRuby. Clojure is probably 99% of the backends I've done on the JVM.

borkdude 2020-09-06T16:37:11.392600Z

Oh yes, I've also done Scala, but somehow I didn't remember that ;)

borkdude 2020-09-06T16:38:14.392800Z

I guess it depends on what kind of project it is. If it's a simple CRUD app jRuby on rails might not be that bad.

borkdude 2020-09-06T16:38:56.393Z

I'd be interested in trying Kotlin, but I have no experience with that so far

p-himik 2020-09-06T16:39:31.393200Z

I would consider learning a new language for that - Kotlin, Ruby, Rust, Common Lisp, even Haskell. Python - not a chance.

borkdude 2020-09-06T16:40:17.393500Z

Oh, wait, I thought we were limited to the JVM. Depending on the size and type of work, Rust might also be a nice choice.

borkdude 2020-09-06T16:41:27.393700Z

Not sure about Haskell. It's interesting, but personally I haven't found myself being very productive with it

borkdude 2020-09-06T16:42:36.393900Z

If you're looking for something close to Clojure: Elixir or clojerl on the BEAM might also nice to try

2020-09-06T16:47:08.394100Z

Honestly, I wouldn't recommend Rust unless your app really needs to avoid a garbage collector for some reason. For your typical backend service rust is overkill

borkdude 2020-09-06T16:48:21.394300Z

I agree. It depends on what you need: low memory consumption, optimal performance, just a small thing in between: then Rust is fine

lispyclouds 2020-09-06T16:48:55.395Z

+1 to Elixir too! I love using it for high I/O use cases and is quite pleasant to write too!

Josef Richter 2020-09-06T16:49:00.395300Z

Isn’t it kinda. Road question to give meaningful answers? What kind of app?

2020-09-06T16:49:14.395500Z

The experience using it is also extremely different from clojure. There's nothing like a repl based workflow

JP Silva 2020-09-06T16:56:00.395700Z

Let's say a web api (rest or gRPC) or an event-driven service (think consuming messages from a queue doing some processing then publishing the result to another queue and/or database)

orestis 2020-09-06T19:00:09.396100Z

I’d definitely do Elixir

seancorfield 2020-09-06T19:40:44.396500Z

If I were to pick a language that I've already used in production, I'd probably just hold my nose and use Java or CFML depending on the context. If I could use any language that I've experimented with (for the purposes of Pragmatic Programmer learn-a-new-language-every-year), I'd probably pick Kotlin so that I could get solid production experience with it.

dharrigan 2020-09-06T20:04:35.396700Z

I use Kotlin on the backend, along with Clojure. Kotlin has been deployed in multiple microservices. I find it a very pleasant language to use (if I couldn't use Clojure)

dharrigan 2020-09-06T20:05:42.396900Z

IMHO, whereas Scala was designed in Academia (and thus shows it), Kotlin was designed to be a working, practical language that scratches a lot of Java's itches πŸ™‚

dharrigan 2020-09-06T20:06:06.397200Z

Our migration from Java to Kotlin was painless and very successful.

dharrigan 2020-09-06T20:06:22.397700Z

Of course, that's if I could not choose Clojure πŸ™‚

2020-09-06T20:07:05.398600Z

The real reason turning computers off and on again so often helps. And here with my primitive computer scientists belief that it was because of programmers often making mistakes in managing state: https://www.smbc-comics.com/comic/on

πŸ˜‚ 1
JP Silva 2020-09-06T20:12:44.398800Z

Thanks for the answers. Interesting no one mentioned GoLang

πŸ‘† 1
borkdude 2020-09-06T20:14:36.399Z

I would give OCaml a chance too but it seems pretty niche still

Cameron 2020-09-06T20:48:58.399200Z

To be the weirdo here, I'd use Haskell or F# assuming I don't predict any hurdles.

seancorfield 2020-09-06T21:27:01.399800Z

(having used Scala in production, I would not use it again -- that's partly in response to @dharrigan πŸ™‚ )

seancorfield 2020-09-06T21:28:20.400Z

@jplfdsilva Go was one of the languages I learned as part of my PragProg practice and I really did not like it at all. I much preferred Rust (which I learned later, and was much more what I had hoped Go might be).

emccue 2020-09-06T21:29:03.400500Z

help, I can't stop getting in fights on the internet

emccue 2020-09-06T21:29:25.400600Z

emccue 2020-09-06T21:29:37.401200Z

This was the response to me defending Java records

seancorfield 2020-09-06T21:30:09.401300Z

(if you were not "allowed" to use Clojure, I suspect you would not be "allowed" to use any number of minority languages -- unless you were joining a shop that already used such a language and used only that one language for backend work)

seancorfield 2020-09-06T21:32:21.401500Z

Some people just can't be reasoned with πŸ™‚

JP Silva 2020-09-06T21:34:06.401700Z

I'm a consultant and my clients are usually big and/or old organizations which ends up resulting in them using Java + Springboot

JP Silva 2020-09-06T21:35:52.401900Z

This has to do with most of them being concerned with difficulties with hiring

2020-09-06T21:35:57.402100Z

I mean, there is a ton of history and systems that are mutable-by-default, and it sometimes does help, IMO when the mutability is limited to a small enough part of a system that can be easily reasoned about. Some people have either not hit that pain point, or they are mired in it, but see it as a necessary part of software development.

JP Silva 2020-09-06T21:37:00.402300Z

Which ends up turning into a vicious circle

seancorfield 2020-09-06T21:37:56.402500Z

Yeah, and modern Java + Spring Boot isn't horrible so if that's what I had to use because of a client, I'd hold my nose and do it.

JP Silva 2020-09-06T21:38:28.402700Z

But it's still a lot of boilerplate though

seancorfield 2020-09-06T21:38:30.402900Z

It certainly wouldn't be my first choice, after Clojure πŸ™‚ I don't think it would even be in my top five at this point.

seancorfield 2020-09-06T21:39:18.403100Z

True, even modern Java + Spring Boot is still pretty repetitive. Maybe I'd write a Clojure program to generate some of the Java / Boot stuff πŸ™‚

JP Silva 2020-09-06T21:44:53.403300Z

Anyway, my hypothesis was that Clojure developers would favor dynamic typed languages over statically typed ones.

seancorfield 2020-09-06T21:45:49.403500Z

Aside from a few Python/Ruby responses, that doesn't generally seem to be holding up? Interesting...

borkdude 2020-09-06T21:49:11.403700Z

I would favor functional over OO, dynamic vs static is almost secondary to me, although I do prefer Clojure over Haskell / F# / OCaml in the end

2020-09-06T21:51:29.403900Z

Having a goal for the interaction tends to help increase the likely hood it wont be frustrating. What do you hope is going to happen here? On the specific's of the problem at hand. Just calmly explain the relationship between clojures immutable data structures and what their currently using. Let them sleep on it a couple times. Hopefully, In a week they will be telling you how useful they are.

2020-09-06T21:57:55.404200Z

> I have never seen a real world bug caused by a mutable object. This indicates they're under some amount of stress, as i doubt many OO experts/ thought leaders would attempt this line of reasoning.

2020-09-06T22:01:42.404500Z

if all else fails. just remember its not your fault https://www.youtube.com/watch?v=3H61INFma8g (parody of good will hunting)

seancorfield 2020-09-06T22:02:11.404800Z

Yeah, if my client was a Microsoft shop, I'd probably push for F# rather than C# (I've learned a little of the former, again for my PragProg practice, by attending workshops on F# at conferences and hanging around F# programmers for a week πŸ™‚ ; I don't know any C# but I suspect I could pick it up, based on my Java knowledge, if I really had to). To be honest, as a consultant working for a big client, I could probably muster up enough knowledge quickly to be able to tackle whatever language they mandated -- but I would prefer clients that let me use languages I actually know well (and like).

JP Silva 2020-09-06T23:12:08.406400Z

Unfortunately most of the time we don't get to choose.

pfeodrippe 2020-09-06T23:13:02.407500Z

A online TLA+ REPL (not the Clojure kind, of course) I have been working on, made with Fulcro, but as this is not the point, I put it here. https://bit.ly/2QYNDoH

cjsauer 2020-09-06T23:41:00.408200Z

Considering getting a standing desk. Anyone have any favorites, or things to consider?

cjsauer 2020-09-07T16:58:56.429400Z

Thanks for the tips πŸ™

gklijs 2020-09-07T18:14:38.430Z

I previously had my monitor on some books, conbined with the standing desk they would increase the wobbliness. Got two monitor arms, and really like how it turned out. Also got a desk bike to verify ways of working.

gklijs 2020-09-07T18:14:51.430200Z

Mario C. 2020-09-08T17:30:46.084100Z

I have a Jarvis and so far no complaints. https://www.fully.com/standing-desks/jarvis.html