skysight-inc/HackerNews huggingface dataset:
It's a shame that someone can become so misguided about functional programming. Functional programming isn't about destroying readability. It's actually the opposite; it enhances the ability to reason about code by (a) being disciplined about where side effects are allowed to happen, and (b) leveraging reusable abstractions for common patterns (e.g., transforming each element of a list, building a generic container that can be used for arbitrary types without sacrificing type safety, etc.) rather than re-inventing them every time with copying and pasting. Generally, functional programs are safer and shorter than their procedural/OOP alternatives, which is a good thing. Less code means fewer places for bugs to hide.
I used to feel the same. For a long time I got away with using C and python for everything. They paired well and I always came away feeling that my code was expressed elegantly enough for me. C was for stuff that had to be fast, python for things that were more functional or meta.
Then I started a project that needed to be faster than python but also required some heavy-ish meta-programming. I wrangled for way too long with the C preprocessor, and while way more powerful than I had imagined, still fell well short of being able to do what I needed without it looking and feeling like a dog that had to be put down. I think I would have needed a code-generating script to do it and to me that sounds disgusting. But C++ templates did exactly what I needed. They look awful and I still don't even understand my own code when I try to go back and read it. But it made me understand and appreciate that C++ does have a place, and for certain projects it might actually be the best choice. I'm sure some fan boys of the newer C++ descendents (rust/golang/zig/et al) will disagree.
> Remember when this claim was made about a now sitting SCOTUS justice?

Remember, indeed?

https://news.ycombinator.com/item?id=27299548
Well you've certainly convinced me that this is a drama that I will never rightly apprehend—it's like looking into a kaleidoscope while on acid. But does that mean the post should be taken down? I'm not sure. A post being on HN's front page does doesn't imply either that it's true or that we're in any way officially condoning it. At most it implies that there's an interesting discussion to be had. If you want an official position, here's my take after a minute of skimming: there are at least two sides to every story, and I have no idea what really happened.

It's to be predicted that nearly everyone commenting will take a side based on their pre-existing view on the pre-existing issue. I say "nearly" for form's sake, but actually I'm not sure there is a single exception.

From an HN moderation point of view the question is whether the general phenomenon is interesting (there the answer is clearly yes, even if no one knows what to make of it) and whether the specific post can support a substantive discussion. On the latter point I'd say it's borderline.
Mistake #0: Working at the wrong level of abstraction.

There are perfectly good library functions (in python, and I assume in C) for loading a wav file into a simple array of values, and writing an array back into a new wav file... Load the data, skip the zeros, and write.
This is great! I got a chuckle though that this is for the US only, but it shows distance in km instead of miles. I'd love it if we changed to metric but I don't see that happening any time soon.
New Features of JavaScript 2021
For all the criticism HN might not be the target audience/market. So advise is very difficult. Generally I think it is a marketing problem. There are a lot of successful authors who only became successful after a couple of books and the books that didn't sell were also fine. (after the author beeing known the book sell)

For an unknown author marketing is important (and for this book putting it in the shops at airports, railway station where people just want some 3h entertainment). So I think you shouldn't self publish but sell it through a publisher who has access to these channels.
Yes, there is a housing shortage in many major US cities. This is evident both from the high rent in these cities, and the large share of workers who commute long distances to work in these cities.

It can be hard to immediately see that there is a shortage of something like housing, because it’s rare that people will actually end up without housing because there isn’t enough to go around. But this is because people will rationally choose to live further and further from their jobs and commute longer and longer distances as the shortage drives prices up near their workplace, rather than choosing to go without housing.
It's a typo. "...about a kilometer or half a mile ..."
You had to apply and be accepted to the university, and their confidence that you won't turn your apartment into a crack den is factored into the monthly rent.
It is completely possible to have a parent corp in the US that owns a subsidiary in the country you live and employs you. Europe (post brexit) attracts approximately 1/10th the VC compared to the US. Valuations are also 1/10th on average, and sadly this is because E[value(European Startup)] is also 1/10th. Having a US parent parent makes it easier to raise from US investors and make the move once you can sort out visas.
Last year I went from making $20K/mo to <$2K/mo, for quite a while. As my money was drying up, I didn’t have a lot of options. I had credit but I didn’t want to use it. I had a kid, but I couldn’t promise him future school supplies. I was a “professional” type, so I could get house sitting gigs (via online) far and wide. I drove 10 hours for some of them and gigged online, still collected $1900/mo pre-tax from a client — I’d have to make good on the taxes eventually. Eventually I found a gig back in SF, starting salary was $200K. Then I landed a consulting gig at $250K. I finally took an FTE role at $200K with a 20% bonus and strong promotion probability. I made it. That part of the story took 18+ months and I struggled to make sub-rental deposits.

I’m 50 years old. I had no one to draw from, I had no more debt I could create, aside for obscene %APR credit card options.

Now imagine that I can’t draw 6 figures, I still pulled $2K in my worst months, I still had to move out of my home and live in my car and visit my partner who crashed on couches from friends who could only reasonably accommodate one of us… my ex- let me visit my kid as much as possible and sleep in his bedroom, but I couldn’t land a 6 figure job at the end of the narrative. The options aren’t awesome, nor sufficient, and the cruelty and neglect, even from other friends, is mortifying. It was really fucking hard for me, but I’m fine again. I don’t see how it’s humane for the likes of those who don’t have my arc as their probability. My European friends shake their heads and know the US is really broken.
That’s how it used to be. The reason behind the shift is the rapid increase in the amount of research output in the past decades. The reason that “arXiv + quality check” won’t work is that the amount of research funding and permanent positions (related) did not increase accordingly. (Think of all the people producing science for low wages as Phds and postdocs and then quitting.) Right now the burden of the (unfair?) selection is mostly on the publishers and their prestigious journals/conferences, which then funding agencies/institutions take into account when funding research/hiring people. If we switch “arXiv + quality check”, that burden will just move to the funding agencies/institutions, but it won’t solve the underlying fundamental problem.
Did something similar to OP. I was writing a controller for a streaming system and managed to accidentally set the volume to 100. This was with speakers not headphones. I had to pull the power plug to stop it. Just about gave me a heart attack.

The bug was a feedback loop in the volume control code that somehow ramped the volume up without any way to stop it. After that I always tested with a physical volume control later in the audio chain, with the volume set to a medium level.
> Religion is about having faith, and faith is about not doubting

Here you are giving a definition of "faith" which many religious people would disagree with. Faith is compatible with doubt, and I don't think "absence of doubt" is a very good definition of "faith".

You can't doubt everything. At some point you have to just accept that some doubts are not worth entertaining, at least not for you. Philosophers produce all kinds of doubts–e.g. doubting whether other minds exist, doubting that I am just a brain in a vat (or a Boltzmann brain), or that this universe is actually a computer simulation, or that we are being actively deceived by superintelligent aliens who find deception entertaining (I actually read that example in a philosophy book recently, although obviously it is just a slight updating of Descartes' malin génie). Scientists choose to ignore doubts that philosophers entertain, all the time. Scientists also choose to ignore doubts about theories that are outside their area of professional expertise – maybe some mainstream theory in astrophysics is completely wrong, and the fringe voices saying it is wrong are actually right, but if you are a biologist, that's completely outside your field of expertise, so it isn't worth your while to even consider the question.

And it is totally possible to believe in a religion yet still experience periods of doubt about whether its doctrines are true. Many religious leaders will say that's not a sin at all, just one of the trials of this life. (Of course, are others who say doubting is a sin – I think that's a pretty sure sign that one is in a harmful group and one ought to get out.) But, on the other hand, if someone doesn't experience doubt about some religious idea in which they believe, and they choose to disregard those doubts when expressed by others, how is what they are doing fundamentally different from the doubt-ignoring scientists I mentioned above?
Assuming most homeless people are chronically homeless seems reasonable too. But it's wrong. Let's have more data and fewer assumptions.
Letter to Freenode – Post Mortem of May 25, 2021
>Unless you place a lot more moral weight on helping Californians than Midwesterners, what's the difference?

The difference is that housing costs take up a much higher percentage of wages in California than Ohio and as a result there are many many more homeless people in California than Ohio.

Sure, if you want to take a holistic view of the entire planet, the people have to come from somewhere and there is a finite demand for global housing. However that just isn't a practical way to look at it when the problems are localized. Different cities and regions have varying levels of desirability. It makes sense to build housing in those cities and regions for a wide spectrum of the population. The solution shouldn't just be "if you are poor, move to Ohio".
Because it's practically being used to restrict travel, employment and access to many things.

What if you've already developed immunity through infection? Why should you be forced into it?

This received emergency authorisation when public debate on the matter was heavily censored through government and big tech partnerships and complicit centralized media outlets.

If treatments with drugs like invermectin were given a fair consideration then it's likely these vaccines couldn't have been authorised under the emergency use protocols. More on this here: https://www.nakedcapitalism.com/2021/05/i-dont-know-of-a-big...
Given the current state of the job market, you are underpaid, even by startup standards. At FAANG companies (& similar) an engineer with a year's worth of (paid) professional experience implementing DL & CV should easily be able to clear top-of-band new grad compensation (which is already over 200k, not counting signing bonuses). With a Masters degree & good interview performance hitting mid-level at some places isn't totally out of the question; top-of-band there is ~300k (a couple places where it's higher, but not many).

Jemaclus' recommendations are good and I second them. But unless you're so happy with the team & work that you feel like it's worth giving up on potentially millions of dollars of lifetime income to stay there, I'd encourage you to start looking around after you hit your first anniversary.
"big dongle hehe" is not something that should have any sort of meaningful consequences. That's not normal and it bothers me that you consider it normal to lose a job over it.
Agree to an extent, but people are throwing it around in the context of vaccine passports and other state actions that are pretty reasonable.

Frankly the tossing around of 1984 has degraded discourse because its used way too much and often ignores nuance in favor of a slippery slope argument.
I'm not sure that is an equivalent example. The previous example was housing falling into a lower tier of the market through lack of maintenance. Your example is actively retrofitting a place to be in a different tier of the market. That isn't really the same thing because your example requires new investments and is actively creating new housing at the bottom of the market rather than just allowing a place to deteriorate through inaction.
Some exploit Link I guess? I flagged it as fake.
A company that never issues dividends (or equivalents) has a net present value of 0.
Percentage wise, few transiently homeless people become chronically homeless. Far more people each year cycle through a period of transient homelessness than the average number of transiently homeless people at any point in time.
If you want RAII, then use C++--no one is stopping you.

A lot of embedded developers STRONGLY disagree with you.

There is a reason why embedded developers tend to turn off a whole bunch of C++ features. Note all the: "No RTTI. No templates. No exceptions." flags that embedded folks always engage.

Now that VSCode is getting actual support for embedded (see all the work the Rust Embedded guys did, for example) as well as official ARM support (Eclipse Theia), various languages can be used for development.

Thanks to this, people no longer need to force things because "If it's not in the C toolchain, nobody will support it." People don't need to torture C anymore to use their favorite language feature on their hardware of choice.
With this logic, it’s not necessary to build housing at all. There’s plenty of extremely low cost housing available in South Dakota.
I honestly wonder if creating dikes to protect these areas might someday make sense. Humans created this mess, and perhaps humans can help repair and/or save some of it.

If the Dutch can reclaim land from the sea, perhaps we must as well.
I think the stasi world was actually more terrifying than an AI eye in the sky.

Because you couldn't trust anyone, not your friends or family. Everyone was part of a big network out to get you, so you were sort of locked in your own head.

The more realistic fear for me is ending up in a cyberpunk dystopia where the world is run by 3-4 big corporations. Which is ofc not something they like to bring up.
Absolutely. I live in West LA, one of the places in the US worst hit by the housing shortage and it is hard to even find an apartment and vacancies are filled quick.

Luckily, I haven't had to move in a while, but it was bad enough that when I got my place, I signed for it purely based on the opinion of a friend who could go see it for me. If I had waited the extra week to come home from the trip I was on, it almost certainly would not have been vacant.
Bars and restaurants are unmoderated discussion forums that have been used to organize violence and real-life crimes since forever. Who exactly do you think is wise and moral enough to police what everyone talks about?
In this article, which code sample would you say is more readable? The imperative style or the functional style?
It's probably way better for taxes. If you have to pick why not pick something cheap?
The bureaucracy. I understand that they want some rules and processes, but their community is extremely hostile towards newcomers who don't do things correctly.
I think you're seriously underestimating how many Chinese people -- not just the government -- will get seriously pissed off at someone who proclaims that Taiwan should be its own independent country.

There's a saying that if China's government is democratic, then they would've launched an invasion yesterday.
None of the articles support a narrative that there is an epidemic of vacancies among high-end housing.

Vancouver: The article claims that there is ~5% vacancy rate. This is actually below the normal rate for vacancies in the US. Condos have a higher vacancy rate, but the article offers a reasonable explanation.

Manhattan: Ultra-luxury home vacancies aren't the same as luxury apartment buildings. Most people are not buying $5-$10 million condos. And even if the buildings are unsold, they aren't necessarily unoccupied.

Seattle: Again focuses on "foreign investors" and unsold apartments. No concrete data on how many those apartments are actually empty.

Melbourne: > Prosper Australia project director Karl Fitzgerald said, based on the water data, Melbourne's actual vacancy rate was closer to 7 per cent.

7% is on the high-end of vacancy rates, but if you reduced that down to 5% then the effect on prices would still be low.

Boston: No data on vacancy rates. Again, sale != occupancy. There are plenty of property management companies that build out luxury apartment buildings and directly rent to people.

The real issue is lack of housing, which can be fixed by letting developers build more housing, including high-end housing.
One key problem see is your blurb says "twist ending"... You already ruined some of your book with me. Maybe the whole thing at a fundamental level.
I agree, but I don't think they'll ever see any need. From their perspective, The Science said one thing back then, and then The Science changed its mind and is saying something else now. As long as you're obeying The Science, you can do no wrong.
It's partly composition, partly RAW + post-processing.
If you spend over a hundred times as much on coffee than on water every month, and you find yourself chronically under-hydrated, then you may indeed prioritize coffee over water.

Coffee contains water, which makes this a strange analogy. Just saying.

The observation that you are trying to refute is that the FDA falls short of accomplishing its mission and receives remarkably less funding than other agencies of the government that also intend to ensure the safety and well-being of Americans.

In fact, about half of the FDA's funding comes from drug companies. That seems strange considering how the FDA is supposed to regulate those very companies.
I do exactly this when I'm doing complex commands and want to select-verify-run. Most commonly, something like vi(c where I want to confirm how the parentheses are nested before the operation.
Allow me to present Triple Divide Peak, from whence you may urinate simultaneously into the Atlantic, Pacific, and Arctic oceans. https://en.wikipedia.org/wiki/Triple_Divide_Peak_(Montana)
A leetcode thing? Most of leetcode solutions I've seen are terse and over optimised for a specific problem, don't think I've seen any functional programming when I was doing them.
Big yawn. Imagine suggesting that the hundreds -that we know about- of folks killed while just trying to live their damn lives constitute "a terrorist state"

If I was that bad at basic logic, I'm not sure I'd tell on myself like that.
> The problem is that people state things like "Java doesn't have implicit casts for correctness." But then it does have implicit casts, so now is there still correctness?

I am a bit too tired to engage with this kind of outright insanity. If you have a problem with what "people state", but not specifically with what I state or what has been stated in this conversation, then go have arguments with "people".

The idea that "Java has correctness" or "Java does not have correctness" does not make any sense. Java is a language, it's the programs that you write with it that are correct or incorrect.

> This is obviously also an implicit cast, because Haskell has type inference.

Incorrect, it is an explicit conversion. There is no such thing as a "cast" in Haskell, there are only functions which convert values of one type to values of another type. (well, in FFI code, there are functions which "cast" pointers and the like, but that's FFI.)

And yes, you're not writing a proof that the conversion is correct. This is... blindingly obvious, so I have no idea what kind of point you are trying to make. "Ordinary Haskell code is not formally verified" is not news.
Which part is that? I can't find it on the map. Just want to see the twisty windy path.
Dank Mono: https://gumroad.com/l/dank-mono
I think people have a habit of taking relatively surface-level features of functional programming and focusing on them to the exclusion of the real benefits of functional programming. The use of something like compose3 in the "functional" example here is a perfect example. Sure, function composition is a "functional" thing, but I don't see why you wouldn't instead write something like (handwaving wildly on the specifics, since I know barely any Go and certainly am not up to speed on the generics proposal):

func getTopUsers(posts []Post) []UserLevelPoints {
return posts.GroupBy(func (v Post) string { return v.Level })
.Values()
.Map(getTopUser)
}

This pipeline style is significantly easier to read (especially without having to put all those extraneous type parameters in your call to compose3!) and doesn't actually lose any of the core advantages of the functional style: purity, testability in isolation, equational reasoning, and so forth. Sure, the Haskell equivalent might use composition… but composition reads more or less naturally in Haskell, and I don't think it does at all here in Go. If your specific approach to "functional programming" makes your code theoretically easier to reason about but practically harder to both read and write, then is it really helping you much?
Downloading Ubuntu from BItTorrent is a DMCA crime now? Who filed the DMCA complaint? SCO?
I'm not disagreeing at all. But I know of enough unusual vacancies in SF among the rich that it strikes me as a small corner factor. In another city (smaller, parents live there) EVERYONE rents when they are not in their space. I mean, even just for summer if traveling. But when you come back, the tenant must leave (and does).

I know someone who sublet an extra room to someone, a year later her wonderful lease was destroyed, landlord sued her and the women never paid a dime, could not be evicted, claimed she felt unsafe and got a restraining order against the person actually paying rent etc so they ended paying rent on two places, one to live in and one for the women.

I mean - this stuff does turn you off renting a small bit.

That said, supply is REDICULOUSLY constrained around here, red tape is nuts, minimum requirements crazy, affordability payments high etc. So yeah, no question that there is artificial scarcity.
They personally screened them out without a call. Actually it's also possible that the ATS screened them out.

however, I just dug everyone up from the applicants pool. Why? directly related talents were kind of rare for me.
Plant trees. Never thought of becoming a "tree hugger" but I've recently setup a recurring donation to a few charities - Ecologi, EdenProjects.org, OneTreePlanted, TreeNation, NationalForests.org. Spreading it across several orgs as I don't know yet which ones are more efficient than others.

It's nice to think that somewhere in Amazonia my small forest will be offsetting tons of CO2 produced by driving around and consuming products, and it will live long after I'm gone.

I wish that $100M "Carbon Capture" prize by Musk would go to planting a billion trees, the perfect carbon capture machines.
Medium - please don't.
Did we just come up with a trillion dollar idea - Personalized NFTs? :)