3,226 karma · joined Jun 14, 2019 (7y ago) · 4,043 submissions
comment 5y ago · link · parent
Two points: a) native threads switching overhead is extremely low, probably lower than usermode Go thread overhead; b) the utility of usermode threads isn't to lower overhead.
It's a given that usermode threads introduce lots of overhead, if only because you're reimplementing the scheduling machinery that already exists in the kernel and that you're already paying the performance penalty for.
But theoretically, you could implement specially tailored scheduling algorithms specific for your app and gain an advantage there - kernel schedulers are general-purpose and can introduce latencies, starvation and other undesired special effects.
P.S. The Linux kernel also has interfaces for changing the thread scheduler algorithms. This gets you 99% of the way there - native threads + round-robin realtime thread scheduler gets you the performance benefits you want without having to rewrite schedulers and context switchers in usermode for every language runtime.
comment 5y ago · link · parent
"Threads" are nothing but kernel-mode coroutines with purpose-built schedulers in the kernel.
Redoing the same machinery except in usermode is not the way to get performance.
The problem is that scripting languages don't let you access the kernel API's cleanly due to various braindead design decisions - global locks in the garbage collector, etc.
But the solution isn't to rewrite the kernel in every scripting language, the solution is to learn to make scripting languages that aren't braindead.
comment 5y ago · link · parent
The pandemic proved to me that remote work does not work.
Or, rather, it works when employees have a home office and set office hours. Which most people don't.
And it only takes one team member to ruin productivity for everyone.
In other words, remote work only works when you can force your employees to pay for office space out of pocket. Maybe Dropbox can do that; I certainly can't.
(Or maybe productivity for Dropbox employees was already close to zero so any change is imperceptible; it's a fact that many companies don't hire developers to actually make stuff, they hire them so they don't make stuff for competitors. Maybe Dropbox is that sort of company.)
comment 5y ago · link · parent
No, Java is still pointers to Object and dynamic dispatch under the hood. Generics didn't change this at all.
> Still can't see why C++ is closer to ML than C, since it's literally an almost compatible superset of C.
ATS is also 'literally an almost compatible superset of C'.
comment 5y ago · link · parent
But getting funding through finances for 'a few hundred EUR' in a largish company could be nearly impossible. It's not a thing that can go into your yearly budget and it's not attached to any project. You'll have to pay out of your own pocket for that.
comment 5y ago · link · parent
There is no evidence for this, you're claiming this purely out of personal bias.
Just because nobody bothered yet to define a rigorous mental model of 'Ship of Theseus' doesn't mean such a model doesn't exist in principle.
(In fact, the job of programmers is exactly that - to define rigorous models for things that nobody bothered to define before.)
comment 5y ago · link · parent
What do you mean 'beyond'? It's not like there are many other languages that have compile-time polymorphism. (Java, Go, C, etc., don't.)
> memory safety, sum types (don't tell me std::variant is a valid replacement), move semantics, having pointers, classes, GC vs RAII, statement vs expressions... That's a lot of differences.
ML ignores the real performance and architecture considerations, so yeah, of course it is a simpler and more 'elegant' language. As a teaching aid, yeah, I think all C++ programmers should be forced to program something in an ML-derived language.
But once you start handling the real-world edge cases and requirements you'd end up in a place very similar to C++.
comment 5y ago · link · parent
Yes, if it can be made into some objective standard, and not just another "trust me, I'm Google".
> But when they are trying to market it to us as users, as a ‘privacy win’, that’s hard to swallow when you’re saying their end goal is some sort of ‘govtech’ or ‘social credit’ system.
Yes, because Google is not just an adtech company. Obviously they are more than that. (Or at least they want to be.)
comment 5y ago · link · parent
I.e., you claim that identities don't (really) exist.
Do triangles exist? Is the definition of triangle "bereft of any definition that can be objectively measured"?
Is the Ship of Theseus fundamentally different than a triangle, or is it merely a difference of degree?
Ask any random human to define some extremely complex mathematical entity, and you'll get various fuzzy answers.
Does that mean complex math doesn't really exist?
comment 5y ago · link · parent
Are you implying identies don't exist? Because that either has to be sophistry (i.e. trolling) or insanity.
comment 5y ago · link · parent
Advertisers and publishers don't really want tracking and data collection. It carries huge costs (technical as well as social) with very little benefit for advertising. Advertisers want statistically significant and unbiased population samples, and that's not something you can arrive at by blindly throwing more data at it.
Data collection by Google et al., is really because they eventually want to pivot from adtech to govtech - think "social credit" or "Minority Report". From their vantage point of course it's a much more lucrative and advantageous place to be than a mere seller of internet clickbait.
comment 5y ago · link · parent
Advertising is just applied sociology, and sociology is just applied statistics. So statistically significant and unbiased sampling is what makes advertising work.
Highly-targeted and personalized ads are a crutch due to the fact that unbiased sampling is pretty much impossible on the internet. (There's a joke about this: "an online poll has shown that internet penetration has now reached 100 percent".)
Neither advertisers nor publishers actually want to collect high-resolution data, it's a huge cost with very little benefit.