mogge
Morning
I really like this defence of dynamic typing that Rich made on Reddit on the other day: https://www.reddit.com/r/Clojure/comments/1sn9255/rich_is_joining_us_in_the_chat_on_youtube_for_the/ogm8dcu/ > In Clojure, you always program as if over wires, i.e. using simple data structures and checking things dynamically. There’s a reason that the internet application tier is not statically typed. You can’t have rigid contracts and the concomitant synchrony required to adopt changes all at once. I even watched the infamous HttpServletRequest rant multiple times, but for some reason it never clicked with me that this is (of course) the core of Clojure’s type system.
What's the infamous HttpServletRequest rant?
Thanks!
Yeah, that "program over the wire even when you're not" was really illuminating to me, I remember thinking about this a lot when I first learned Clojure and taught it to students
Its interesting how a lot of paradigms are like «programming locally even if you're not» and the pain it incurs when you follow them. Like micro services.
Basically trying to abstract away the network. Which always leak.
how are microservices trying to abstract away the network?
I mean, you can make microservices in Clojure?
I forgot what the difference was between regular services and microservices at this point btw
Yah, but you start out with microservices, and you just consider a network call to be the same as a local function call. And then the real world hits you.
Or you started out with SOAP or Corba or any RPC tech that tries to abstract away the networky bits.
I can see that last bit. But wouldn't you be using messages/queues to communicate between microservices?
is microservies like corba or RPC? I never really saw it that way, but maybe I don't have a good mental model of what they are. I always thought they just were services, like any service
Not the point I was trying to make. I guess what I liked was Rich was saying something like programming as if over the wire, even if you're not, whereas a lot of tech is like programming as if your local even if you're not. So a bit contrarian.
optimize for the worst everywhere... it sounds like. :P
Or «build resilient systems»
But clojure being a pragmatic language, you take in IO calls as local calls when doing network and especially database. You don't program as over the network then.
Just generate a system with AI ad-hoc on every request (OMG no)
(i might be missing the point here entirely, @slipset)
@gar you're at least missing my point :)
I think it's fair to say you're not in concomitant synchrony
That's too many words I don't understand :)
They are from Rich's quote
Haha, I had to look them up 🙂
I kinda understood it in his post. Basically, both sides have to evolve the types in synchronicity. Which is super hard in a distributed system.
oh yes... this is where typed systems have this "types" library which is used in all the microservices and they all have to be updated to vnext
I think we (as web devs) deal with that all the time, we just don't think about it, because we speak in json.
"You have to update your microservice, because I changed a String to a Maybe[String] here"
"No I don't, because I wrote mine in Clojure 😎 "
"But, ... that's against our policy." "Nah, it's just a jar man. ☺️ "
Yes that comment hit a real nerve, the same one that led me to clojure after a few years of java starting with EJB 1.0! Back then most people believed in the EJB brochure, but the more I used EJB, the more it felt cumbersome and over the top to have objects talk to each other. I could not see it scale up to and was somehow bemused to see the industry pushing for a software and component factory model, I could not see it work. Spring did not help, it mostly simplified DX but did not fight the idea of objects talking over the network with shared types. Eventually XML was inserted into the communication with SOAP and WS-* , mainly to facilitate firewall traversal and still not to fight the idea of sharing a type system over the network. XML was however a foot in the door for text/human readable exchange formats, an opening through which JSON quickly spread. It's definitely better today but I'm still amazed how much inertia there is from that time.
This conversation reminds me of https://grugbrain.dev/#grug-on-microservices: > grug wonder why big brain take hardest problem, factoring system correctly, and introduce network call too > seem very confusing to grug
Morning
good morning!
Good morning
@reefersleep your pavlovian training is taking hold. Just came in from a lunch walk! Delightfully sunny today. ☀️
I too had a lunch walk, but mostly because I wanted to see what they had in the canteen at the far end of campus.
as good an excuse as any! Did you get anything interesting?
There was some kind of lentil & pumpkin stew that looked more appetising on the menu than it looked in real life, so I opted for spicy carrot soup and sourdough bread instead (AKA the budget option).
That's a great excuse!
I didn't get to walk yesterday, but I'm going to right now 🙂 Let's go! 😎
I finished mine before 12! 😁
Being held accountable for taking sunny walks is a kind of funny side effect of hanging around in an online programmer community 😂
good morning
Good morning