Hey cool, I learned something. Thanks!
Hey cool, I learned something. Thanks!
This is what I’m talking about:
Code for copy-pasting:
type NonEmptyArray<T> = [T, ...T[]];
function neverEmpty<T>(array: T[]): NonEmptyArray<T> | null {
if (array.length === 0) return null
return array
}
I’ve tried to use that NonEmptyArray type in the past and it was a real pain in the ass getting the type checker to believe that no, for realsies this array is not empty I just checked the length two lines ago. Is there some trick I don’t know or has it gotten smarter about that in recent updates?
Got a 3 year old kid with another on the way. I just need it to be reliable so the kid can watch Sesame Street and the lights keep working.
I definitely see your point, but the difference is that it’s one thing to learn. Once you know docker, you can deploy and manage anything.
Cons of containers are slightly worse disk and memory consumption.
Pros:
Stick with the containers
Sqlite compiles to wasm, you can run it in the browser
but there is a reason i just explained it to you
Ok but is there room for the idea that your intuitions are incorrect? Plenty of things in the world are counter-intuitive. ‘docker-compose up -d’ works the same whether it’s one container or fifty.
Computer resources are measured in bits and clock cycles, not the number of containers and volumes. It’s entirely possible (even likely) that an all-in-one container will be more resource-heavy than the same services split across multiple containers. Logging from an all-in-one will be a jumbled mess, troubleshooting issues or making changes will be annoying, it’s worse in every way except the length of output from ‘docker ps’
I can see why editing config files is annoying, but why exactly are two services and volumes in a docker-compose file any more difficult to manage than one?
I disagree with pretty much all of this, you are trading maintainability and security for easy setup. Providing a docker-compose file accomplishes the same thing without the sacrifice
you scold people like this irl too?
Obviously I’m aware that people face all kinds of challenges and stressors, it’s the entire fucking point of my first paragraph. I wasn’t trying to start a “who’s more stressed” contest here, it was a throwaway half-joke attempt to make OP feel better.
Seriously, internet, can you chill? Do I have to speak with absolute precision and clarity at all times?
dude what the fuck
deleted by creator
I think in general people should be understanding of each others’ situations and make things easier on them where possible.
Speaking as a parent, I can pretty much guarantee that you are living a less stressful life than your coworkers with kids. Not sure it means much but hey
I mean I agree but you don’t have to be a dick about it
I don’t get the hatred for types, they have saved my ass so many times and saved so many headaches exactly like what the article describes. I used to write a lot of ruby and after getting decent at typescript I can’t go back.
It’s not just ceremony, types ensure some level of logical consistency in your app. They reduce how much of the world you need to keep in your head at one time, and they allow you to express your intent far more robustly than comments and naming can. I love rust’s approach of making invalid state not even representable.
Yeah, docker in a VM makes sense. Docker in docker in a vm in a vm though?
Agreed, that should be many tens of pages not one. Also the mobile layout isn’t very good. I think it’s important to remember that normies use their phones for almost everything.