Bringing Clojure programming to Enterprise (2021)

(blogit.michelin.io)

94 points | by smartmic 4 hours ago

9 comments

  • killme2008 2 hours ago
    I wrote Clojure for about five years. Left when I changed jobs, not because I wanted to. It's genuinely one of the most productive languages I've used, and I still miss the REPL-driven workflow.

    One thing I built: defun https://github.com/killme2008/defun -- a macro for defining Clojure functions with pattern matching, Elixir-style. Still probably my favorite thing I've open sourced.

    • dgb23 2 hours ago
      I like it! Really nice API.

      I had an idea about writing something similar, but for multimethods, but never got around thinking it through and trying it out.

      The way defmulti and defmethod work is that they do a concurrency safe operation on a data structure, which is used to dispatch to the right method when you call the function.

      My hunch is that it should be possible to do something similar by using core match. What I don't know is whether it's a good idea or a terrible one though. When you're already doing pattern matching, then you likely want to see everything in one place like with your library.

  • LouDNL 3 hours ago
    It's good to read that Clojure is getting more and more exposure. I write Clojure fpr my day job and wouldn't want to swap it for anything. The community is small but very helpfull and easy reachable. The learning curve is steap indeed, but very much worth it!
    • thunky 56 minutes ago
      Clojure has some pretty big downsides last i looked:

      - syntax is hard to read unless you spend a lot time getting used to it

      - convention for short var names makes it even harder

      - function definition order makes it even harder

      - too dynamic for most people's taste

      - no type safety

      - the opposite of boring

      - no clear use case to show it clearly beating other languages

      - niche with small community and job market

      - JVM

      For all those reasons its a hard sell for most imo.

      • rockyj 13 minutes ago
        I am a Clojure fan and would love to use it. But you are right, we live in a real world where money talks and most organizations want to see developers as cheap, replaceable commodities.

        Not to mention in a post AI world, cost of code generation is cheap, so orgs even need even fewer devs, combine all this with commonly used languages and frameworks and you need not worry about - "too valuable to replace or fire".

        Having said that - there may be a (very) small percentage of orgs which care about people, code crafting and quality and may look at Clojure as a good option.

      • Antibabelic 12 minutes ago
        The JVM is one of the major selling points of Clojure. You can "write once, run anywhere" and benefit from Java's massive ecosystem, all without having to use a Blub language. Modern JVM implementations are also incredibly fast, often comparable in performance to C++ and Go.
        • thunky 5 minutes ago
          i don't think you're wrong necessarily...but rust, golang, zig, mojo, etc are gaining popularity and imo they wouldn't be if they were JVM languages.
      • jimbokun 48 minutes ago
        Most of those seem very subjective with many people having the exact opposite opinion.
      • greekrich92 40 minutes ago
        Moby Dick is too hard to read. They should make it shorter with a limited vocabulary.
        • Cthulhu_ 24 minutes ago
          I kinda get where you're trying to go, but is Moby Dick style writing the best way to convey information?

          That is, prose is good for entertainment, but less so for conveying information, even less so for exactness.

  • laszlojamf 1 hour ago
    Slightly off topic, but I find it to be a testament of how software has already eaten the world when friggin Michelin has a tech blog. What's next? General Electric releasing a frontend framework?
  • erfgh 23 minutes ago
    Can someone enlighten me about the REPL that lispers keep raving about? Isn't it more-or-less the same as the Python REPL?
    • fredrikholm 3 minutes ago
      You evaulate code within your editor against the REPL, seeing the output in the same window you're writing in (perhaps in a different buffer).

      The cycle is:

        1. Write production code.
        2. Write some dummy code in the same file (fake data, setup).
        3. Evaluate that dummy code. See what happens.
        4. Modify  code until satisfied.
      
      Your feedback loop is now single digit seconds, without context switching. It's extremely relaxing compared to the alternatives (rerunning tests, launching the program with flags, what have you).
    • sammy0910 21 minutes ago
      it is very similar, but it is easier to evaluate sub-expressions thanks to the unique syntax of lisp.

      there's a detailed explanation here: https://youtu.be/Djsg33AN7CU?t=659

    • whalesalad 13 minutes ago
      More or less, yes. It's more about the approach to the repl and how it is leveraged in development, or even jacking in to a running system and modifying it as it is running.
  • midnight_eclair 1 hour ago
    every time i go back to writing non-clojure code outside of repl-driven environment i feel like a cave man banging rocks against each other

    no amount of ide smartness or agentic shenanigans is going to replace the feeling of having development process in sync with your thought process

  • sswezey 3 hours ago
  • 0x1ceb00da 4 hours ago
    What is the y axis in first chart? What is the data source?
  • VMG 3 hours ago
    503
  • maximgeorge 4 hours ago
    [dead]