It’s safe to assume that any non-trivial program written in Go is multithreaded
It’s safe to assume that any non-trivial program written in Go is multithreaded
Definitely not a guarantee, bad devs will still write bad code (and junior devs might want to let their seniors handle concurrency).
Really? Huh, TIL. I guess I've just never run into a situation where that was the bottleneck.
… Is this a trick question? The object, provided by the library (net/http which is about as default as they come) sets “DefaultMaxIdleConnsPerHost” to 2. This is significant because if you finish a connection and you’ve got more than 2 idles, it slams that connection close. If you have a lot of simultaneous fast lived requests to the same IP (say a load balanced IP), your go programs will exhaust the ephemeral port list quickly. It’s one of the most common “gotchas” I see where Go programs work great in dev and blow themselves apart in prod.
https://dev.to/... is a fairly decent write up.
Key point: they're not threads, at least not in the traditional sense. That makes a huge difference under the hood.
Does Python have the ability to specify loops that should be executed in parallel, as e.g. Matlab uses parfor instead of for?
yup, that's true. most meaningful tasks are io-bound so "parallel" basically qualifies as "whatever allows multiple threads of execution to keep going". if you're doing numbercrunching in pythen without a proper library like pandas, that can parallelize your calculations, you're doing it wrong.
No, I'm not at university anymore.
I was telling a colleague about how my department started using Rust for some parts of our projects lately. (normally Python was good enough for almost everything but we wanted to try it out)
They asked me why we're not using MATLAB. They were not joking. So, I can at least tell you their reasoning. It was their first programming language in university, it's safer and faster than Python, and it's quite challenging to use.
"Just use MATLAB" - Someone with a kind heart who has never deployed anything to anything
Oooooh this is really cool, thanks for sharing. How could I install it on Linux (Ubuntu)? I assume I would have to compile CPython. Also, would the source of the programs I run need any modifications?
From memory I can only answer one of those: The way I understand it (and I could be wrong), your programs theoretically should only need modifications if they have a concurrency related bug. The global interlock is designed to take a sledgehammer at "fixing" a concurrency data race. If you have a bug that the GIL fixed, you'll need to solve that data race using a different control structure once free threading is enabled.
I know it's kind of a vague answer, but every program that supports true concurrency will do it slightly differently. Your average script with just a few libraries may not benefit, unless a library itself uses threads. Some libraries that use native compiled components may already be able to utilize the full power of you computer even on standard Python builds because threads spawned directly in the native code are less beholden to the GIL (depending on how often they'd need to communicate with native python code)
In this case, it's a feature of the language that enables developers to implement greater amounts of parallelism. So, the developers of the Python-based application will need to refactor to take advantage of it.
Oh wow, a programming language that is not supposed to be used for every single software in the world. Unlike Javascript for example which should absolutely be used for making everything (horrible). Nodejs was a mistake.
And some of those choices are mistakes.
I appreciate Typescript for addressing the sins of its predecessor.
Citations Needed: Episode 95: The Hollow Vanity of Libertarian "Choice" Rhetoric
Episode webpage: https://dts.podtrac.com/...
Fucking Citations Needed, every time I finish an episode, someone comment something related to it.
don't worry it'll use all the RAM anyway
I paid for all the memory. I'll use all the memory.
let's be honest here, he actually means 0.01 core performance
I prefer this default. Im sick of having to rein in Numba cores or OpenBlas threads or other out of control software that immediately tries to bottleneck my stack.
CGroups (Docker/LXC) is the obvious solution, but it shouldn't have to be
The documentation is kinda lacking, but if you could figure out how to set up Synapse then you can probably figure out Conduit too. https://conduit.rs/
I tough this was about excel and was like yeah haha!
But is about Python, so I'm officially offended.
Python
..so.. so you made it single threaded?
@programming.dev
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
go to feed...
@programming.dev
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
go to feed...
all programs are single threaded unless otherwise specified.
save