skysight-inc/HackerNews huggingface dataset:
C++ lambdas do solve the problem, I'm not sure why I didn't include that.

However, unit testing them is not the only concern. There are reasons for using nested functions, class methods, file global, or program global functions.

If you make them global or methods, you lose control of how and when they're called. This can break invariants. So some functions can be hoisted up, but others oughtn't be (in particular, any pure function can be made global without any concern other than occupying a name, side effecting functions should be more carefully considered).

The interface to the functions may change if they capture any variables. If they capture nothing in the local scope, then hoisting them doesn't impact their interface. If they do capture something, hoisting them means adding parameters (complicating the interface) or making them observe variables either in the class (complicating the class) or file/program globals (bad practice).

Regarding unit testing. Nesting functions (or lambdas) are essentially a wash. You were, hopefully, testing the host function to begin with so nothing is changed if you use nesting functions as your first pass refactoring approach. You can then examine those functions and consider which should be moved out and why, and then add tests to any that have been pulled out of the host function.
Ask HN: Google Docs Spam?
Has anyone else here started to see more Google Docs spam recently (as in, in the last month or so)? I hadn't seen this spam vector before, but suddenly I'm seeing my account get @mentioned on docs that are clearly spam. I've tried to report through official channels but it doesn't seem to help, either the spammers are rotating accounts, or else the "report" button is not monitored.

(Also, it's just awful that they make you click through to the spam document before you can report it. Why don't I have an option to report spam in the notification email?)

I don't want to turn off my notifications outright but I'm not sure what else to do at this point.
Relevant to Systems Programming Languages today, or even modern operating systems. Sorry my English is bad but basically are these books about general principles that don't get outdated.
If that's real, the guy should not conclude he still likes Apple: he should definitely hate it for being so deceptive, first of all.

Some say free market will solve the environment crisis because customers will turn away from polluting companies to virtuous ones. They just won't.
Qualtrics CEO Ryan Smith is buying majority stake in the Utah Jazz for $1.6B
And their platforms would all devolve into 4/8chan. No thanks.
I fancied myself a future game designer when I was starting out, so I spent a lot of time while playing games trying to figure out how they ticked, what made them work or unravel over time, especially in multiplayer.

Deflation in a game economy is a sure way to ruin things for everyone. Soon every new character is running around with the third-best hat on, and the fourth best sword. With such a compressed distance between typical and exceptional, everyone becomes muted. What's there to hope for? Why do I even bother to try, when good enough takes no effort at all?

There were several points where my decision to play a game came down to my read of the game economy. If they had no coherent solution to the deflation problem, thanks but no thanks.

I don't know how directly these motivators translate to the real world, but people are people and I can see things getting pretty bad.
>Well, when the overwhelming majority of experts in the field agree

You're conflating some issues here. Experts inform policy, not set policy. Democratically elected representatives should use experts but not delegate decision making to experts. Take climate change, even if 100% of scientist believe in climate change and certain outcomes of climate change, because any climate mitigations are going to drastically impact my life and the lives of all my fellow-citizens, I sure as heck want to hear alternatives and understand the full implications. I don't want climate scientists deciding climate policy (only informing it), because the cost for stemming climate change may be too high and when balancing all the other factors, we may instead decide instead to focus on mitigating the effects of climate change.

We see this with Coronavirus policy as well. Certain public health officials only focus on stemming the pandemic (a noble goal in a vacuum), but ignore the cost associated with some of the drastic measures to stem the pandemic (like lockdowns). Put another way, even if every single epidemiologist argues that lockdown is the best way to 'flatten the curve', we may decide to do something else because we need to balance all kinds of other factors in addition to 'flattening the curve'. The Great Barrington Declaration [1], for example, which presents an alterative coronavirus policy by all kinds of public health officials makes this case and has been censored by Twitter, and others, for it. Don't you think their point of view is a worthy topic for discussion? Or is this one of those things where you are afraid of 'platforming' an alternative lest it convinces some people?

[1] https://gbdeclaration.org/
Intersting idea yes, and I will make sure I will never go back to that website. Identifying fire hydrants or bicycles is annoying enough, but it takes 3-4 seconds. Setting up a chess board for 10 seconds? No thank you. If it is a service I use I will only write them once to complain, and if that doesn't go away I will drop them off (aka stop paying them)(and make sure they know why).

Security and Convenience are (most times) opposites. I don't want to spend 10-20secs to log in to a site. Especially if I am paying them.
That’s not true. A moderation-free platform can still get in trouble for defamation posted on their platform if 230 was removed.
I am curious, what are the others?

When XFree86 was forked to X.org, is that what you call the first?
Its not always binary. You want to throw an error at even the slight amount of error. This will annoy users, but over time as bugs and edge cases are fixed - it will lead to a very robust program.

Meanwhile you want to save time/work for the caller. You dont want the caller to need many lines of boilerplate just to setup the call.
Literally, I Ctrl+F'ed to look for a comment to this effect. Preach on. I would buy one if I could run it reliably in my Linux setup.
I was working at a large corporation a couple of years ago and looked out over the parking lot which covered many acres - there were roughly 3000 cars there. And this was just one of 4 campuses of said corporation in my area. In total they have well over 10,000 cars parked on those parking lots every day (prior to covid, anyway). At an average cost of $25,000 there were around $250M worth of cars parked on those lots. And they sit Idle there for 8 hours/day. Most cars are sitting idle 95% of the time. That's a lot of capital just sitting doing nothing most of the time not to mention all of the land required to store them.
1000 cycle lifetime would mainly be if you were doing full charges and discharges (10-90% charge/discharge or worse).

This is from mid 2018, but you can see that model s/x batteries were hitting about 90% capacity after 250,000km which is verrryy roughly 700-800 charge cycles. https://electrek.co/wp-content/uploads/sites/3/2018/04/scree...

Grid storage batteries are going to be charged and discharged at more reasonable rates than cars. Tesla's superchargers run at 50-250kW and discharging is going to be above 1MW at times, which is not kind to batteries.

I think you can expect quality grid storage setups to last 2000-3000 cycles at this time depending on their environment.

Keep in mind that these cycle lifetimes are to 80% life, so if you're willing to go down to 50% capacity you can expect longer lifetimes, probably closing in on 15-20 years of use.
I'm generally okay with that tradeoff too, but we tried it early on at our company and the juice was not worth the squeeze, at least in our case.

Designers and even many developers found it essentially impossible to use and the developers who were reasonably comfortable with it spent way too much time assisting others in attempting to use it.

(fwiw I found myself somewhere in the middle - I like the model and understood the ideas but also found it annoying to work with in practice)
"C is not actually a small language, it is not super simple."

Can you expand on that? Clearly C moves a lot of complexity to other areas, or hides complexity by using subtle semantics. But in the context of learning/hacking that isn't necessarily bad.
No, GGP is saying that we (users) have no right to complain about a FOSS developer abandoning their project since we don't compensate them for it.

GP is saying yeah, that's great and all, but other people try to push everyone to switch to Wayland because <reasons>. The Wayland ecosystem simply isn't there yet though; they're hawking a broken solution.

It's perfectly fine for a FOSS developer to walk away from any given project. When third parties come along and frame things as though the only option is to switch to a broken "solution" it derails the discussion. We (ie the community at large) should be having much broader discussions about both how to keep maintenance going as well as what's needed to actually make the replacement viable (so we can maybe switch to it later).
Given that Google also pays Mozilla about the same amount, it would be hard to prove that Apple's "extracting" it from them. Google very much wants to be able to pay all the browser makers to be the search engine of choice. Nobody has to extract anything from them.
Of course, GOP Senate can't do anything to stop them since the Dems not only enjoy the benefits of the censorship but they are encouraging more of it. All the R's can do is grandstand about it.
How is this piece, in any way, fascistic?
A little bit of awareness of cause and effect goes a long way.

If your speech center is damaged, your speech is impaired. If your audio processing center is damaged, your hearing is impaired. If your visual cortex is damaged, your vision is impaired. If your hippocampus is damaged, memory formation is impaired. If your frontal lobes are damaged, your judgement is impaired. If your cerebellum is damaged, physical coordination is impaired. If your reasoning ability is damaged, you believe in woo.
Sony knows that XORG is dead...
These platforms are already censored. It's not that hard to get a Tweet annulled or kicked off FB.

The issue is that right now, it's just 'opaque, private policy', mostly concerned with over violence, literally hate speech, that kind of stuff.

Twitter's banning of The NY Post a few days before an election though is quite problematic.

If there were some reasonable guidelines it might be a good idea, but I'm not sure how it would work.

The only answer I see is for Social Media to be very transparent about their policies, very consistent, probably have an external board and commit to some common standard approach.

It's one thing for FB/Twitter, altogether more difficult for Google though they've managed to stay out of it mostly.
> “Who the hell elected you and put you in charge of what the media are allowed to report and what the American people are allowed to hear,” Cruz said.

That's such a ridiculous thing to say. Twitter has the unanimous consent of everyone who is subject to their rules. Every Twitter user became a Twitter user by choice and no-one is going to use violence against them for no longer using Twitter or for creating an alternative. That couldn't be further from the situation with the government.

Cruz and other politicians impose their rules on people who never had a choice. The US government did not create the land it claims as its territory, it took control of it by force killing thousands of people. The government is both willing and able to use extreme violence to prevent people from avoiding it or creating alternatives to it.

A Twitter user who is angry about Twitter's censorship only has to spend a few minutes to delete their account and create an account with another service (Gab, mastodon, etc.). A US citizen who is angry about the US government's censorship have to abandon their home and be accepted by another government. Even then, the US government may still demand their money and loyalty.
Yeah, the gist of what he was saying probably should have been worded as "who made you king?"
Having owned an X600, X800, X850XT, X1900XT, 3850, 4870, 7850, RX580, and 5700XT, I can say I have rarely if ever had driver issues with ATI/AMD.

Historically, I did use nvidia when I wanted to do native linux on desktop/media center, because their closed source drivers were supported much better (even FreeBSD had hardware media decoding support). This was before nouveau.
"Big chunks of the US are too cold to want to be outside that much, a lot of the year."

There are surely limits to everything and not everyone is into extreme sports, but even in the winter I really like cycling. Much, much more, than the virus infested public transport.

There is a saying, there is no such thing as bad weather, just bad clothing.
I'm genuinely curious what the republicans want here. I get that they're mad because they think big tech is out to get them. And I don't even expect a policy proposal or bill at this stage. But is there even a paper from a think tank, or a right-wing law professor, who has put forward a coherent framework for how to regulate social media?

My understand is that if you repeal section 230, social media sites would either have to be completely unmoderated (like 4chan) or really heavily moderated (as they'd be liable for everything people post). Is that their goal here? Or if they want to replace 230, what would they replace it with?
Either social media is a Platform and respects the First Ammendment and the right to free speech) OR it is a Publisher that can choose what to publish or censor and is thus subject to litigation. Blatant falsehoods about Trump have been published in social media for the past 3 years but verified documents showing Biden family colusion and pay to access to the office of the Vice President is deemed "misinformation"? A blatant double standard that is completely untenable in a free society.
I'd love to hear more about Xwayland, a project the OP talks about. It sounds like a way to run X on wayland, or maybe the other way around. It sounds like a really nice way to bridge the gap while wayland is still working out some of its kinks and providing backwards compatibility for X apps.
This requires asking for a specific number of license seats for your open source project and that's impossible to work with. Every possible user account/contributor takes up a license. How many contributors will I have tomorrow? Don't know. How many spam accounts will I have that waste license seats? Too many, and they're impossible to clean up.
I think you are asking exactly what efforts are put into the board once someone designs it in ALC. To be honest: it primarily goes through the same general steps as most of our boards - ALC Operations Team designs it; PCBs are ordered; once PCBs are received, it goes through the pick & place, reflow, inspection, and packaging; finally, the boards are sent using our standard fulfillment/shipping. Does that help?
Too bad Android diverged too far from the rest of the Linux world and isn't using Wayland.
X11 (X version 11) is the protocol that controls most the graphics stuff in traditional Linux systems. It employs a client-server architecture.

The windows (clients) send their local framebuffers to the X server, X sends them to a compositor, the compositor joins them together into a big framebuffer that has the different windows in their respective positions and sends them to the X server. The X server then displays them on your screen.

There's a relatively new (~10 years old) protocol, called Wayland, which will replace X. The architecture is better and it has some other constraints (vsync is always on, so there's no screen tearing). Some distributions are using it by default (Fedora), but most are still sticking to X, since Wayland is not completely ready yet (in practice) and other projects are still transitioning into Wayland.

Maybe I got some technical details wrong, but that's the basic idea.
Is that a real option? Could there be an HN without any moderation?
>
It's more naive to treat the CCP like some kind of horrible boogeyman

This is a valid point some of the time, but I don't think it really applies here. First off, the Wikipedia has had problems with censorship by various states, China being the most notable by a long shot (https://en.wikipedia.org/wiki/Censorship_of_Wikipedia).

It's very much true that the US government (or some other non-China state) could be a threat to the Wikipedia in the future, and I'm sure the folks at Wikimedia are aware of that too.
"Hello...? Is that Gmail? I was just calling to let you know that I don't need Uncle Franks email anymore. He comes up whenever I press "F" for frank, but he's dead now so it doesn't make sense. Auntie Anna sees the same, so it must be a problem with your computers or something. Whenever I type Frank in on the Chrome he pops up on everything!"
> expecting answers for questions that were asked and answered thousands of times before

I don't mean to seem ungrateful for the work that open source maintainers do every day, but I think this sort of complaint is usually a symptom of a problem with either the documentation or the interface being unclear. These pain points are usually an opportunity for improvement in the product. On the other hand, there are probably more such opportunities than there are available maintainers...
Hero or scoundrel? An iconoclastic biography of Winston Churchill
I have at least one customer who is stuck on Server 2012 (not even R2). I hope they will be able to upgrade their servers soon. In the meantime, if I need to update my driver, I'll have to replace my HCK test suite with the HLK test suite, learn the new process, and hope the driver passes.
AMD purchases Xilinx for 35B in stock
Well, if the prices are

1. the legal tools to make Spotify not lockin ones personal content and
2. Read some random article on the internet where the publisher actively does not want to protect the readers privacy

then I think I know what price I want.
I agree, I was reminded of the days of custom anti-Tesla news sites funded by short sellers, actually.

"We assume these systems need full driver attention as their only important baseline, and regardless of how they perform, score them on that assumption."

There is no way Cadillac can take an on-ramp to a highway, safely change lanes for an exit and take the exit without drama, but my Model 3 does that very nicely right now.
Jack Dorsey seems to have lied to Cruz. He said that it was now possible to tweet the NY Post story (at 4:41):

https://youtu.be/EsE3mnzgpQM?t=281

But it apparently is not:

https://twitter.com/abigailmarone/status/1321476036211757056...
I watched Jack's testimony in part to try to take a lesson in handling the heat. He did very well and stayed cool.

Myself, I don't think I handle the heat very well. In executive reviews, I never quite understand what VPs are asking, because the way they phrase questions is always kind of flawed and it makes me think of 5 ways to answer based on 5 possible interpretations of their question, and invariably (every time!) I start answering and then am asked to stop because that's not what they asked. I also get pretty stressed/nervous before big exec reviews (it just always feels like an exposition of any personal failure), and my brain has seized once or twice. I supposed I'm not cut out for being in the line of fire. So much for my dreams of being CEO of a mega- tech company! :-)

Maybe goes without saying that I'm envious of my peers who can waltz into the fiercest review and not flinch while they state their case.

I'd love to hear from others on this.
I totally want to study this and see if it's just me and then publish.

Oh well, if I ever jump to academia.
Floating Offshore Wind Turbines Set to Make Inroads in U.S.
I feel like anybody really searching for speed is using something other than Python. I don't use Python for speed, but for ease-of-use.

It took me some clicks to see it's supposed to be a drop-in replacement, so that's good.
These freaks love freedom and private industry until it doesn't go their way.
For local news organizations who don't get any revenue from foreign viewers, it's much cheaper (and more profitable) to just block Europeans than to try and comply with GDPR.
As Climate Disasters Pile Up, a Radical Proposal Gains Traction
Salt Lake City to Lose Its Two Daily Print Newspapers
Good! Xorg needs to become a community project again. The current maintainers are almost without exception full time paid employees and act solely in the interest of their employers and NOT in the interest of the FOSS community. Their employers have decided to sabotage the ecosystem by breaking established community standards. Maintaining backwards compatibility is the most important thing to keep any ecosystem alive. This means the community should abandon their software (e.g. Wayland) and put people in charge of X11 that start acting in their interest.
Exactly. On the one hand they are well established with TSMC, on the other hand, they are trying to meet demand for both CPUs and GPUs simultaneously.

Who knows what they'll decide from a business perspective? I wonder how the margins compare between CPUs and GPUs? They could, say, plan on limiting their higher end GPU SKUs which gives them temporary bragging rights in the GPU space but reserves capacity for CPUs.
how hard would it be to learn BASIC using Google? "Basic Programming" is going to have a lot of irrelevant results.
I mean, from my perspective, they're literally prioritizing the things that I want my display manager to do well

- Handle rendering things to screen

- Handle user input

My issue is that while X has a LOT of other things it also happens to do, it just doesn't do those two primary things very well on modern hardware.

As an aside -

This reminds me of the systemd arguments all over again, but the same crowd that was ready to crucify systemd for all the things it does are now bemoaning all the things Wayland doesn't do.

But really, I think there are just a lot of folks who aren't willing to try something new, or to re-evaluate some of the toolchains they've made for themselves.

Now - I'm not going to blame them for that, having a working system change under you isn't fun, and it eats up time and resources some people don't have. But it also doesn't stop the new thing from replacing the old thing.

Particularly if the new things happens to be genuinely better in many respects.

And while I can certainly understand the pain point of missing features in Wayland, The way it gets user input and display output right are just delightful.

So delightful that I actually prefer it to my work macbook, which is not something I could ever say about X.
Yann LeCun, Facebook’s Chief AI Scientist, on GPT-3
> where the publisher actively does not want to protect the readers privacy

You don't know that. They may take privacy very seriously, but don't see any point in risking possible GDPR issues, especially if they get no income from people in Europe.
LinkedIn Looks Like Facebook Now. Here's Why
> but it learned what I actually wanted it started letting me just type in the term elixir without specifying it was a programming language

Oh, you know what, this might be largely my own fault. I purposefully use Startpage.com as my search engine in order to avoid getting customized results (while still using Google's index).

I worry that customized results put me in a filter bubble—but they certainly have their advantages!
clipman, for a clipboard manager.

Also here's a oneliner for color picking:

grim -g "$(slurp -p)" - -t png -o | convert png:- -format '%[pixel:s]\n' info:- | awk -F '[(,)]' '{printf("#%02x%02x%02x\n",$2,$3,$4)}'
Metamorphic Testing (2019)