this post was submitted on 26 Mar 2025
546 points (97.1% liked)

Programmer Humor

23848 readers
2404 users here now

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.

Rules

founded 2 years ago
MODERATORS
 
(page 2) 23 comments
sorted by: hot top controversial new old
[–] [email protected] 13 points 2 months ago (4 children)

Do you mean Synapse the Matrix server? In my experience, Conduit is much more efficient.

load more comments (4 replies)
[–] [email protected] 7 points 2 months ago

I'll be honest, this only matters when running single services that are very expensive. it's fine if your program can't be pararlelized if the OS does its job and spreads the love around the cpus

[–] [email protected] 11 points 2 months ago* (last edited 2 months ago)

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

[–] [email protected] 9 points 2 months ago

Python

..so.. so you made it single threaded?

[–] [email protected] 147 points 2 months ago (12 children)

all programs are single threaded unless otherwise specified.

[–] [email protected] 49 points 2 months ago (7 children)

It’s safe to assume that any non-trivial program written in Go is multithreaded

[–] [email protected] 16 points 2 months ago (3 children)

And yet: You’ll still be limited to two simultaneous calls to your REST API because the default HTTP client was built in the dumbest way possible.

load more comments (3 replies)
[–] [email protected] 18 points 2 months ago (1 children)

But it's still not a guarantee

load more comments (1 replies)
load more comments (5 replies)
[–] [email protected] 23 points 2 months ago (3 children)

Does Python have the ability to specify loops that should be executed in parallel, as e.g. Matlab uses parfor instead of for?

[–] [email protected] 51 points 2 months ago (2 children)

python has way too many ways to do that. asyncio, future, thread, multiprocessing...

[–] [email protected] 42 points 2 months ago (1 children)

Of the ways you listed the only one that will actually take advantage of a multi core CPU is multiprocessing

[–] [email protected] 11 points 2 months ago (2 children)

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.

load more comments (2 replies)
[–] [email protected] 9 points 2 months ago (1 children)

I've always hated object oriented multi threading. Goroutines (green threads) are just the best way 90% of the time. If I need to control where threads go I'll write it in rust.

[–] [email protected] 7 points 2 months ago (2 children)

nothing about any of those libraries dictates an OO approach.

[–] [email protected] 1 points 2 months ago (1 children)

If I have to put a thread object in a variable and call a method on it to start it then it's OO multi threading. I don't want to know when the thread spawns, I don't want to know what code it's running, and I don't want to know when it's done. I just want shit to happen at the same time (90% of the time)

load more comments (1 replies)
[–] [email protected] 2 points 2 months ago (1 children)
load more comments (1 replies)
[–] [email protected] 8 points 2 months ago (2 children)

Are you still using matlab? Why? Seriously

[–] [email protected] 7 points 2 months ago (1 children)

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.

load more comments (1 replies)
[–] [email protected] 18 points 2 months ago (1 children)

No, I'm not at university anymore.

[–] [email protected] 5 points 2 months ago (1 children)
[–] [email protected] 5 points 2 months ago* (last edited 2 months ago) (1 children)

We weren't doing any ressource extensive computations with Matlab, mainly just for teaching FEM, as we've had an extensive collection of scripts for that purpose, and pre- and some post processing.

load more comments (1 replies)
[–] [email protected] 9 points 2 months ago (1 children)
[–] [email protected] 4 points 2 months ago
load more comments (10 replies)
load more comments
view more: ‹ prev next ›