[HN Gopher] Free applicatives, the handle pattern, and remote sy...
       ___________________________________________________________________
        
       Free applicatives, the handle pattern, and remote systems
        
       Author : _jackdk_
       Score  : 88 points
       Date   : 2025-10-16 03:33 UTC (19 hours ago)
        
 (HTM) web link (exploring-better-ways.bellroy.com)
 (TXT) w3m dump (exploring-better-ways.bellroy.com)
        
       | rich_sasha wrote:
       | Bellroy, the maker of quirky travel accessories and wallets, has
       | a software stack written in Haskell?? TIL
        
         | titanomachy wrote:
         | The second-to-last post[0] talks about how they decided to
         | migrate their stack from Ruby on Rails to Haskell, and are now
         | in the seventh (!) year of that migration.
         | 
         | [0] https://exploring-better-ways.bellroy.com/designing-for-
         | the-...
        
           | oncallthrow wrote:
           | Seems like an insane choice to me
        
             | bobnamob wrote:
             | They're based in Collingwood, any Australian would tell you
             | that an n year Haskel rewrite is the most normal thing
             | about them
        
               | rswail wrote:
               | Speaking as someone from there (Collingwood), we're
               | proudly weird.
        
               | pklausler wrote:
               | Hello from Portland, Oregon!
        
             | cosmic_quanta wrote:
             | I'd love to hear more about why you think this is insane.
        
           | internet_points wrote:
           | My first thought was: does that mean they've been actively
           | migrating for seven years, or just "we migrated the most
           | important stuff and can't see any strong business reasons to
           | move some of these microservices that do their job just
           | fine"? But reading the post, it seems the main reason is they
           | no longer understand all the Ruby code!
        
             | bobbylarrybobby wrote:
             | I thought this couldn't be correct, but... nope:
             | 
             | > We adopted a pragmatic approach: maintain the Ruby code
             | but only port functionality to Haskell when we could add
             | meaningful value in the process. This meant our Ruby
             | codebase gradually became legacy code, maintained but not
             | actively developed. This transition -- which we expected to
             | take a couple of years -- has now stretched into its
             | seventh year. > > Here's where the Clean Architecture
             | approach began to work against us. As we hired more
             | Haskell-focused developers and our institutional knowledge
             | of Ruby faded, those carefully crafted abstraction layers
             | became archaeological puzzles. Reverse-engineering what a
             | piece of code actually did -- especially complex, multi-
             | step operations with side effects -- became a nightmare.
        
         | riwsky wrote:
         | So is Costar, the horoscope app, of all things
        
           | rich_sasha wrote:
           | At least the product is pretty esoteric too.
        
         | throwthrow0987 wrote:
         | They must be making a lot of money!
        
         | nikita2206 wrote:
         | Also was surprised to see their logo on the blog website.
         | 
         | I have had one of their cardholders for 10 years now, it is
         | incredible how durable and practical that thing is.
        
         | spiffytech wrote:
         | I'm very happy with my Bellroy Card Sleeve wallet. You know,
         | just in case anyone's checking the comments on a functional
         | programming article for wallet recs. As one does.
        
           | PaulHoule wrote:
           | My Bellroy wallet is great too.
        
         | leohonexus wrote:
         | And they even use Nix, to add to the craziness.
         | 
         | [0] https://flox.dev/nixinthewild/nix-in-the-wild-bellroy/
        
           | cosmic_quanta wrote:
           | Nix isn't so exotic anymore. Every company for which I
           | interviewed about a year ago used Nix
        
             | YuukiRey wrote:
             | And every person I met today had a parrot on their
             | shoulder. Doesn't really mean it applies to the general
             | public (here meaning most developers out there).
             | 
             | I'd say <1% of all developers world wide have even heard of
             | Nix.
        
               | ameliaquining wrote:
               | It is used in production much, much more widely than
               | Haskell is, though it remains far from the most common
               | way to do builds or deployments.
        
         | chaboud wrote:
         | I thought this was a joke about two things having the same
         | name... nope!
         | 
         | One funny thing about software is that beautiful things can
         | emerge from the most unexpected places. I appreciate that there
         | are folks out there with the bravery to share their journey.
        
       | ksec wrote:
       | I am really really surprised Bellroy could afford to hire
       | developers for their own store. I guess they are now much bigger
       | than I thought? I watch them grow from an unknown brand that
       | focus on slimming your wallet in the early 10s, to now I bump
       | into people who have actually heard of used it. Or at least seen
       | the online ads. Pretty amazing.
       | 
       | I remember Gwyneth Paltrow said something along the line moving
       | away from Shopify was the biggest mistake she made with her
       | online shop. I think that was before Pandemic and Shopify have
       | improved a lot since then.
       | 
       | Which makes me wonder if it make sense for Bellroy to continue
       | their path.
        
         | fwlr wrote:
         | I believe this is a case of "developers who went into the
         | wallet business", actually.
        
       | farhanhubble wrote:
       | I have loved their bags and mobile cases for their aesthetics and
       | their website too and now the blog!
        
       | tinyspacewizard wrote:
       | Weird feeling knowing that an ecommerce / wallet store has
       | employees with more advanced programming knowledge than most
       | financial institutions.
        
       | vjerancrnjak wrote:
       | A recurring problem, somehow making it very easy to write code
       | that deals with 1 thing from start. When time comes , somehow
       | hard to write code that deals with N things.
       | 
       | I wonder how different the code would look if it was just written
       | to deal with N things from the start.
       | 
       | I'm also not sure how far this code can go, if I have queries
       | that depend on responses of preceding queries , how will my
       | runAp_ give me this? It probably won't.
       | 
       | always wondered where are http frameworks that just give me a
       | batch of requests to deal with from the start.
        
       | Joker_vD wrote:
       | > We want to build a structure that is essentially a syntax tree
       | of the operations we want to perform.
       | 
       | A-a-and so we went from programming in Haskell to creating a new
       | DSL, with an interpreter for it in Haskell, and programming in
       | that DSL. Which kinda begs a question: you already have a
       | perfectly serviceable programming language (i.e. Haskell) at
       | hand; why not just use it?
        
         | kqr wrote:
         | That's what I also don't quite get. I would build it as the
         | parsing step mapped directly over the query. I suppose their
         | approach lets them build a tree of operations but I'm skeptical
         | it provides all that much benefit.
        
         | lkey wrote:
         | Creating specialized and constrained DSLs is a common and
         | useful pattern for folks that write Haskell (or really any FP
         | lang that has ADTs).
        
           | cryptonector wrote:
           | jq was originally a Haskell-coded, in-Haskell DSL.
        
         | marcosdumay wrote:
         | I don't understand your complain. Haskell is entirely aimed at
         | creating those small languages and interpreting them. While at
         | the same time the compiler they have in hand implements a DSL
         | for describing imperative programs that do not allow the kind
         | of analysis the author is doing.
         | 
         | What exactly you expected them do write?
        
           | cryptonector wrote:
           | Eh, Haskell is not "entirely" aimed at creating DSLs.
        
             | marcosdumay wrote:
             | Ok, it's not entirely.
             | 
             | It's just its main differentiator. But there's way more to
             | the language.
        
       | munchler wrote:
       | I love me some functional programming, and spend most of days
       | happily immersed in F#, but when I see Haskell programmers
       | casually discussing the lengths they'll go to to avoid side-
       | effects, I am always in awe. It's like overhearing monks in the
       | Middle Ages talking about their favorite techniques for copying
       | the Bible by hand.
        
       ___________________________________________________________________
       (page generated 2025-10-16 23:02 UTC)