@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.
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...
@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).
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 π
(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)
@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.
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)
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?
Iβm a Ruby developer trying to get into Clojure, so Ruby it is!
@hewrin What's your opinion on JRuby? Possibly you can combine Clojure with it?
havenβt tried it to be honest, sounds like an idea to try out though!
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.
The reason for the port was that our customer demanded we use the JVM
and no additional installed binaries. They would run it on their JBoss server
How was it like maintaining long term?
As far as JRuby was concerned, we had no problems with it
@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.
Ah I see, didn't know that
(like Clojure CLR is second class and ClojureScript used to be)
It's slightly OT. It's just a framework
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
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.
We have to live with our choices.
@ales.najmann Thanks. That makes sense. We have different trade-offs.
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!
Most of the time it would be Python. If on the JVM would be Scala. π
Apart from some Java, I have done 1 project with jRuby. Clojure is probably 99% of the backends I've done on the JVM.
Oh yes, I've also done Scala, but somehow I didn't remember that ;)
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.
I'd be interested in trying Kotlin, but I have no experience with that so far
I would consider learning a new language for that - Kotlin, Ruby, Rust, Common Lisp, even Haskell. Python - not a chance.
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.
Not sure about Haskell. It's interesting, but personally I haven't found myself being very productive with it
If you're looking for something close to Clojure: Elixir or clojerl on the BEAM might also nice to try
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
I agree. It depends on what you need: low memory consumption, optimal performance, just a small thing in between: then Rust is fine
+1 to Elixir too! I love using it for high I/O use cases and is quite pleasant to write too!
Isnβt it kinda. Road question to give meaningful answers? What kind of app?
The experience using it is also extremely different from clojure. There's nothing like a repl based workflow
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)
Iβd definitely do Elixir
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.
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)
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 π
Our migration from Java to Kotlin was painless and very successful.
Of course, that's if I could not choose Clojure π
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
Thanks for the answers. Interesting no one mentioned GoLang
I would give OCaml a chance too but it seems pretty niche still
To be the weirdo here, I'd use Haskell or F# assuming I don't predict any hurdles.
(having used Scala in production, I would not use it again -- that's partly in response to @dharrigan π )
@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).
help, I can't stop getting in fights on the internet
This was the response to me defending Java records
(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)
Some people just can't be reasoned with π
I'm a consultant and my clients are usually big and/or old organizations which ends up resulting in them using Java + Springboot
This has to do with most of them being concerned with difficulties with hiring
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.
Which ends up turning into a vicious circle
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.
But it's still a lot of boilerplate though
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.
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 π
Anyway, my hypothesis was that Clojure developers would favor dynamic typed languages over statically typed ones.
Aside from a few Python/Ruby responses, that doesn't generally seem to be holding up? Interesting...
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
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.
> 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.
if all else fails. just remember its not your fault https://www.youtube.com/watch?v=3H61INFma8g (parody of good will hunting)
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).
Unfortunately most of the time we don't get to choose.
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
Considering getting a standing desk. Anyone have any favorites, or things to consider?
Thanks for the tips π
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.
I have a Jarvis and so far no complaints. https://www.fully.com/standing-desks/jarvis.html