Both mutate o. If you ignore the array returned by map then they’re equivalent.
HN user
peterthehacker
Say hi: peterthehacker3 at gmail.com
Look up any programming language popularity survey. Pure FP languages are substantially less popular, therefore less commonly understood and harder for the average dev to work with.
If FP was the norm, then you could make the same argument for OO.
I think most programmers would disagree with you on this. Perhaps after enough FP experience the cognitive load that comes from the language’s constraints fade away, but I haven’t seen this in practice. FP is less commonly understood and harder for the average dev to work with.
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.
After spending years in functional-land, I find the for loop (and while loop) construct maddening; you have to maintain the state of the entire enclosing scope system in your head.
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.I've tried Python, hated the inconsistency of it
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.”
Tried with Elon and Gates, but both threw this error
Error occured while trying to proxy: hf.space/we, “the old folks,” just don’t get it
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.
It recommends products that were most frequently included in the same order. So it’s not recommending similar or related products, but products frequently purchased with the product in question, so the wine use-case wouldn’t recommend wine, but it would recommend cheese, bottle openers, chocolate, etc.
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.
Sounds like an inexperienced data engineer. One of the first things you learn is to read tabular data into a DataFrame, like pd.read_csv. So, there’s a natural progression to pd.read_sql [0], which default behavior loads SELECT * FROM t without any filters into a DataFrame. But, it also accepts a raw sql query or SQLAlchemy selectable, which should be used to join/filter data before loading into python.
[0]https://pandas.pydata.org/docs/reference/api/pandas.read_sql...
Thanks! Very cool. I haven’t used couchdb in prod. I’ll read into this more.
What kind of consistency models [0] do Offline-first databases like RxDB and PouchDB have?
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?
Whenever this topic comes up the conversation always centers around money or housing or other brute physical facts
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.
Awesome! I wish you well too. I hope today is a better day :)
So much flamebait. These kinds of comments aren’t good for anyone.
A “dang-chain”
Damn. I know you don't know me, but this is unnecessarily condescending and off the mark.
I’m truly sorry you feel that way. My intent was sincerely to provide another point of view.
I'm (perhaps naively) shocked at how opposed to this people are on Reddit, but especially on HN
I've worked with and mentored a lot of minority candidates (who often have trouble with the cultural test that is getting and passing interviews)
Maybe have an open, empathetic mind for those people that are so upset? Or ask a minority friend of yours what they think?
From my personal XP: Many black and brown friends of mine think that entrepreneurship is a rich kid’s game because the common first step of raising a “friends and family round” is an absurd notion to them. Most of their friends and family barely have enough money to pay the bills, so the idea of raising $100k+ from them is silly. When I read the angry responses in this thread (and see a price tag like $10k) I think about those friends. I’m sure they’d laugh at the idea of asking friends/colleagues to help them raise $10k to “skip the interview” for similar reasons.
Empathy is hard, especially over the internet and across socioeconomic bubbles, but it’s essential when seeing outrage that you don’t understand.
According to this article https://blog.ycombinator.com/meet-the-people-taking-over-hac... dang has worked for YC full time since 2014, so I’d assume that dang is “in the know.” But sometimes I wonder if dang is more than one person.
Yeah, it sounds so bad that it’s probably made up. It implies that the company has 46% turnover or firing rate (29+17), but average turnover for tech companies is 10%-15% [0].
[0] https://www.linkedin.com/feed/news/is-everyone-replaceable-a...
Hub disappearing would be a 100 times worse than the left pad incident in the npm world
This is really overdramatic. If Docker Inc. went out of business and Docker Hub was shutdown then the void would be filled very quickly. Many cloud providers would step in with new registries. Also, swapping in a new registry for your base images is really easy. Not to mention the tons of lead time you’d get before docker hub goes down to swap them. Maybe they’d even fix https://github.com/moby/moby/issues/33069 on their way out, so we can just swap out the default registry in the config and be done with it.
You mean without a deployment or statefulset? How would you connect to the DB without a service providing a persistent DNS name?
Awesome! Thank you for sharing. This helps.
…
…
What scale have you tested the UI at? Do you have any demo / benchmarks for over 1M rows for example?
Reading through the infinite scrolling PR [1] it looks like scrolling isn’t virtualized (like Airtable’s) so the browser will start choking when it has too many elements in the DOM.
Another open source airtable alternative on the top of HN this year.
NocoDB (https://news.ycombinator.com/item?id=27303783)
BaseRow (https://news.ycombinator.com/item?id=26448985)
Any idea why these projects are so popular in HN? What are the big pain points / problems these address?
None have template libraries like Airtable or Smartsheet do, so it’s hard to get a sense of the use cases these tools specialize in.
It's just my opinion, by I find things like this always reflect incredibly poorly on the author
Ironic considering the comments that follow. Like
basically just comes off as a bitch session
I do think your points could have merit but you’re articulating them in a rude way that detracts from your argument.
Yes, the love bombing approach to corporate culture in trendy tech startups is a nasty manipulation technique we should all watch out for, but we should also have some respect and compassion for employees that buy into it and get their hearts broken. Should they have known better? Yes. Is this not that bad in the grand scheme of things? Probably. But comments like this don’t help.
Just a bit of (unsolicited) advice: articulate criticism respectfully with empathy for the criticized. It will make your arguments much more effective.
300M Americans are on FB[0]
7/10 Americans are Christian[1]
So, there are around 210M American Christians on FB.
So, these posts reached roughly 60% of Christians. Sounds feasible to me. Top brands in a niche like Christians can get broad reach.
[0] https://www.statista.com/statistics/408971/number-of-us-face...
[1] https://en.m.wikipedia.org/wiki/Christianity_in_the_United_S...
I meant how the implementation works behind the scenes.
Like what’s the persistence layer? How are changes subscribed to and persisted? ACID transactions? ect.
Looks like we’ll have to wait and see what the author publishes later.
Interesting and very mysterious.
How does the data syncing work? Can the developer hook into changes to execute business logic? How are changes to the same data point from different users handled?