peterthehacker
Joined 6 years ago
Joined 6 years ago
If FP was the norm, then you could make the same argument for OO.
> Come on, most of us are writing SAASes, APIs/backends and basic frontends here (yes, the rest of you do exist), and even for shitty O(n^2) algos, your n is probably in the 10-20 range. Your bad algorithm will not take down the server.
This isn’t related to the earlier point but I’ll bite. This thought process assuming “Your bad algorithm will not take down the server” is a recipe for bad engineering.
For example, we had a bulk action (1-500 records) in our API where the first implementation pulled all the data into memory and processed the data in the request. This ended up being disastrous in prod. It took down our server many times and was tricky to track down because the process would be killed when it maxed out memory.
The solution wasn’t to switch languages or anything. It was just to move the operation to our async worker queue and stream through chunks of data to avoid running out of memory. It cause a lot of headaches for devops that should have never happened.
While you’re right that there are many cases where n is not large, engineers must consider how large n can be or explicitly restrict n before pushing a bad algo to prod.
This is only true if immutability is enforced. In js you see map used to mutate variables outside the scope of the map closure all the time.
const o = {}
const d = [1, 2, 3, 4]
d.map(i => o[i] = i**2)
Which is equivalent to this python. o = {}
d = [1, 2, 3, 4]
for i in d:
o[i] = i**2
The cognitive load is the same in both. The strength of pure FP languages come from enforced immutability, but that constraint often adds cognitive load in other ways.Can you elaborate on this? I’ve written in both Python and Ruby, but I’m not sure what you mean by this critique of python. I wouldn’t characterize either language as “inconsistent.”
Error occured while trying to proxy: hf.space/Zuckerberg is 37 years old, so he’d probably be lumped into “the old folks” category. Why would he get it and not us?
I’m, a decade younger than Mark, so idk if I’m young enough by your standards to get it, but my sister and her friends are in college and think this is all a joke. None of them are interested in putting on VR goggles, let alone joining the “metaverse.” None of them had heard of it until Facebook’s name change.
The Metaverse is a top-down Wall Street sponsored hype cycle. It’s not a matter of “old folks” not getting it. It’s Zuckerberg’s attempt to distract Wall Street investors and consumers from Facebook’s growing problems.
This makes sense in the context of the example the author copied from [0], where the dataset is sports equipment. Often purchased in bundles of related products for a specific sport.
[0]https://pandas.pydata.org/docs/reference/api/pandas.read_sql...
I was thinking read uncommitted, but they might allow dirty writes. Maybe there’s some CRDTs under the hood… I can’t find any documentation on consistency though, anyone here know?
That’s not what the article is about. It’s about bad governing and policing as the primary cause of SF’s homelessness problem.
> He[Michael Shellenberger] blames San Francisco’s woes on a culture of permissive lawlessness and a mistaken view of what constitutes moral policymaking. For example, many on the left believe the lax prosecution of laws is compassionate.
The article also mentioned that this is a problem that’s specific to SF and homelessness in the rest of the country is not as bad.
While I’m as much of a fan of philosophical rants about the decline of human civilization as the next guy, that’s not what the article is about. Also, some comments are unrealistically pessimistic
> The family is the center of a human’s life, and we’ve destroyed it… We look away from our families and attach ourselves to a reactionary “culture” that’s completely…
I see where you’re coming from, but many people’s lives are not like this. The world might be heading this way with all the challenges we’ve faced transitioning society online, but the internet is still very young. We can learn from our mistakes and build healthier social systems.