skysight-inc/HackerNews huggingface dataset:
Here's one interesting application of a digit-count function.

The naive implementation of an integer-to-string conversion involves writing the number backwards, starting from the least significant digit, and then reversing the string at the end.

In a 2017 talk titled "Fastware"[1], Andrei Alexandrescu showed that it's faster to start by counting the number of digits you're going to print, and then you can print by working backwards from the least significant digit. It comes out in the correct order without any need to reverse at the end.

His implementation of the digit count was itself interesting, since it does 4 comparisons per loop and then a divide by 10000, instead of the naive single comparison and divide by 10.

uint32_t digits10(uint64_t v) {
uint32_t result = 1;
for (;;) {
if (v < 10) return result;
if (v < 100) return result + 1;
if (v < 1000) return result + 2;
if (v < 10000) return result + 3;
v /= 10000U;
result += 4;
}
}

IIRC, his insight was that smaller numbers tend to occur more often in the real world, so most calls to this function will not end up doing any divisions.

[1] https://www.youtube.com/watch?v=o4-CwDo2zpg
FreshSQL is a native application. Its performs extremely well for analyzing tens of thousands of rows using very small memory / cpu footprint
A great thing about a monadic operation that takes a 32-bit integer, like this one, is that you can also just exhaustively test it in reasonable time!
A quick search doesn't find me the duplicate?
Have you tried HN Aloglia?

https://hn.algolia.com/?dateRange=all&page=0&prefix=true&que...
This is the default format used by pandas.DataFrame.to_dict()

I usually need a less dense version, e.g. to send to a jinja2 template, so mostly use to_dict(orient='index').
This is going to be an unpopular opinion, but I believe that if you can't afford to teach your kids yourself and live in a country with a bad schooling system (nearly all of them) you probably should not have kids.
So is there a bug-free userChrome.css rule for auto-hiding the navbar in Firefox 89?
@Dang was this a user or a mod action?
>but at least American's have some say in what the US government does.

HAHAHAHAHA
China military uses AI to track rapidly increasing UFOs
> the slope of the unweighting curve prior to motion

What in the dickens is that? A graph of instantaneous force production?
Trump2024. Biden & friends are doing such a bad job no censorship will help them.
Are we discussing philosophy of morality, ethics, and self-determination vs. predetermination; or are we discussing the law?

If the law, I can't think of a single case citation I could give that would act as precedent for assigning responsibility to the federal prosecutor for Mr. Swartz taking his own life. I'd be interested to see any such citations people have found.

The philosophy of morality, ethics, and determinism is a much wider space where such a thing could be discussed.
So Aaron's other suicidal episodes, when no one was prosecuting him, aren't relevant to his final suicidal episode? Surely, the prosecution weighed on him, but no mentally healthy person would choose to commit suicide before the outcome of the charges was even determined.

It's not clear to me how one assigns blame for suicide in most cases, or what the options are for prosecutors. If a quasi-suicidal person cuts me off on the highway and I give them the middle finger, and they go home and commit suicide because of it - am I culpable? If, generally, a prosecutor thinks that a person is not mentally stable enough to face trial for their crimes without commiting suicide, are they just allowed to get away with what they want? Or should they be involuntarily committed?
TrueVault (YC W14) Is Hiring an Engineering Lead on a Data Privacy Product
Right, but a two-year suspension is essentially unheard of in the tech world. Generally temporary suspensions last up to one month then just go permanent with virtually no appeals.

This is still special treatment. If you or I were banned from Facebook, unless you're good friends with a staff member, we would likely be permanently banned.
Everyone may suffer from some kind of mental illness or depression at some point in their lives. We should probably care deeply about the kinds of things that might push those people over the edge.
Anyone know how to raise awareness for this issue? I’ve shared this friends/family but would be great to get the press/talking heads on this. Maybe the majority of Americans don’t care and this isn’t something that would gain traction but I sure do care a lot.
While college towns mostly fit the bill, what I think people really want are vibrant, small to medium sized towns, with a lot of money. Places such as Ashville, which is not a college town, is equally desirable
As a Facebook user I don't care about free speech there. It would be fine with me if they banned all political content and only allowed users to post pictures of their pets and kids or whatever. We have plenty of other platforms for political speech.
Anyone know the price of Confluent's control center product?
Did You Know Facts That Will Astonish You
Just have it so that any time a person or company's data is sold or leased, the company doing the selling must mail (via physical correspondence) the person or company with a notification of what data was sent and why.

People will get tired of the junk mail and companies will lose money trying to peddle data.
I'm interested in DeFi and have been hearing a lot about it as well but not sure where to get started. What would you suggest?
People should own the data about them, and should be free to rent or trade usage of it to companies in exchange for money or services. Actual ownership should continue to rest with the person, however, who can revoke access the same way that a landlord can evict tenants or a worker can quit.

The biggest barrier to this has been that lots of valuable data (eg. Facebook's social graph, Android contact data) is data about relationships between people, not the people themselves, and so would logically have multiple owners. But that's not really a big barrier with modern technology: the crypto world solved multi-person ownership with multisig wallets several years ago.
If you're a background check company, it seems like a dangerous game to attempt to systematically match data from such unofficial sources to potential employees.

Aren't they opening themselves up to lawsuits if they match the wrong person to the wrong potential employee?

Additionally, isn't it illegal to decide to hire/not-hire based on a bunch of protected traits? (age, sex, orientation, religion, etc.)

It seems like a lot of the quoted information would be off-limits.
Why do you consider flatpak as not having adequate sandboxing?
Ask HN: Workplace Bullying
I've been working for a startup for many years and it has been acquired by a Silicon Valley-based corporate a little more than a year ago.

Since then, my work experience has gone downhill: not getting credit for great work, critisized for warning about bad design, but blamed when things go wrong. Credit for my work is often stolen by colleagues, and even published under their name. I've raised complaints, but management doesn't mind, I am an outsider to their space (i.e. if I complain, they would consult the person I'm complaining about). It feels that getting promoted is out of the question.

Since I've only worked for startups previously, I'm wondering if what I'm experiencing is bullying, a toxic workplace, or something typical for a corporate environment? Anyone had a similar experience?

Bonus: What do you do assuming you can't leave because of RSU?
Most "dependencies" in the makefiles I see which are like this are just other phony targets. In bash you can do this with functions, and if you're worried they'll get ran more than once you can write another 1 line function which only runs a function if it hasn't been ran yet during that execution of the script.

In fact, nothing is stopping people from using make for some things and leaving the bulk of everything else to a separate shell script.
Disappointed in the flagging too
It's a bit ridiculous. I chose a system theme for a reason, ... because I like it. I don't want unique widgets. Certainly don't want tabs that look like buttons. Or color tinges or stripes added to things to distract from the content. Reminds me of the bad old skinz craze of the late 90s.

They also removed the icons in the menu that helped me navigate. Now I have to read the menu more carefully to see what I'm doing. Definitely slower than a few days ago.

Final insult, they hard coded the highlight colors in about:* to cyan! I hate cyan. Dark mode panels have a blue tinge to them. Is this amateur hour or what? I use warm colors with my dark mode, on purpose. Not anymore.

I had to disable the also ridiculous animated expanding url bar in the previous release with userChrome. I'm done with that. Designers, please go experiment on some other app, not the one I rely on every day.
Normally @dang turns up to clarify and fix things

Posts are flagged if a certain number of users flag them, not just mods/admins.
> What country would welcome investigators with open arms into one of their major research institutions to look for evidence that its scientists had screwed up and caused a major disaster?

A welcome with open arms was not what happened. Rather, said investigators were cherrypicked by the Chinese government. Of the four weeks in China, the delegation spent two in their hotel rooms because quarantine (sure can't test them right), and part of another day was spent in an exhibition about China's fight against the pandemic which was [totally not a propaganda affair](https://www.washingtonpost.com/wp-apps/imrs.php?src=https://...).
So this was not cash compensation? Should I put the pitchfork down now?
Yes, we have some horrid macros. I think the intent was to hide infrastructure details from business logic, but it turned into a big mess.
Maybe he'll be dead or otherwise incapacitated by then.
The Good, the Bad and the Ugly – The Danish National Symphony Orchestra [video]
Yes, I am actually surprised that Facebook decided that the response to Trump undermining the 2020 election was to ban him... until the run up to the 2024 election.
I found myself in a similar position a few years ago and had to deliberately choose to read more books. I had gone from someone who read multiple academic books a week (when I was in a humanities grad school program) to someone who struggled to make it all the way through long form articles.

I think the mind's natural inclination is to "snack" on things like blog posts, news articles, podcasts, etc, and only commit to a long text when it's engrossing or aligns very well with your natural interests. The trouble is that it can often take a substantial amount of text (much more than a blog post typically contains!) to establish that alignment of interests, especially if the writer is an expert in their field and not a master storyteller.

If you are looking to get back into reading books and are having trouble getting over the initial hump, I found that buying a Kindle and Audible version of the same book and switching between formats helps. (Amazon will give you a discount on the audiobook if you already own the ebook and will sync your place between the two.)
Why is having Terms Of Use 'censorship'? Like, Facebook isn't allowed to have rules on their own private property- which Trump voluntarily agreed to, in exchange for being allowed to use that property for free? Is a bar allowed to kick an obnoxious drunk out, or is that 'censorship' too?

I don't think that suspending private property rights is a particularly great idea for society. If we're suspending private property rights now, to copy your last sentence, everyone cheers but they don't seem to realize this will happen to their private property in the future once the other side controls these tools
Can users sue platforms to reinstate deleted content?
Bare metal generally means running on the host OS without any virtualization layer. Or used to mean that.
By utilization I actually meant the percentage of filled seats but yes that's also an advantage of supersonic planes. You need roughly half as many planes to service the same timetable (assuming turn around is roughly as fast and doesn't get drawn out by technical/maintenance requirements).
> When the suspension is eventually lifted, there will be a strict set of rapidly escalating sanctions that will be triggered if Mr. Trump commits further violations in future

We have the same policy in our kids middle school.
FB is dying. Not the company, but the product. I can't remember the last time I logged in. My parents still do, but even they are getting tired of it. I'm sure this isn't universal across the globe, but at least in my little portion of the U.S. it doesn't feel like it used to.
An amazing read.
Can you elaborate on DeFi? I work in a startup and my founder told me the same but I have very vague idea about it and looking to find something that can get me started.
It would be pretty cool if someone could create a package management-like tool where I could easily browse and install these little customizations…
Yeah but you can mitigate.
This is cool as shows the level of control is getting there to the stage that my dream of having a robot soldering arm to do all those ever decreasing component sizes is becoming more cost viable.
If you tell us a little about why you're asking the question, it might help to stimulate conversation.
No, it's not a duplicate at all. Curiouser and curiouser
The useless cat is actually very useful in practice - it is more readable and easier to modify.
Not only that, but the said-ancestors established a separate, impoverished, lower-quality education system to ensure that they'd be perpetually unskilled and incapable of competing for skilled jobs even if they wanted to talented. Diabolical.
Taking your comment at face value: because telemetry can lie even more easily than users, pointing the finger at entirely the wrong thing in the worst possible way: with cold, hard numbers to convince most people who don't want to deal with the issue.

Telemetry complements feedback, it should never replace it entirely.
For me it is approachability and not intimidating by how much coding you do outside of work. I felt like was gonna be fired every day cause my lead would do some crazy shit on his free time with JS, css, and math. I think maybe coding stuff should only be shown off if it's relevant to what's going on or for help. You can tell me all day you don't know something, but when you shows off advanced mathematic calculations using raw JavaScript to draw dynamic maps for a game you made as a "side project," I'm always gonna think you take your job too seriously.

The best lead codes because they're paid. They don't care about the hardcore "best practices" stuff because it really does not matter. Understanding how to do the job does.
That is sad. We have standards like SI units to help us communicate. Something as wide and non-specialized as Fox News should be using common standards.
I read fiction books.

I skim non-fiction, because many non-fiction books are composed primarily of filler material, presumably to boost a book's perceived value.

I'd pay +$1-2 per book for an official abridged book without the filler.
Yeah that's definitely an issue. I'm not sure how Adobe's subscription system works, I doubt it's too bad though.
> What will be the new factors in 2 years that aren't present now

The location of the Overton window. Facebook is just hedging it's bets. George Bush is largely accepted by Democrats now many of whom wore F bush t-shirts a decade or so ago.

https://en.m.wikipedia.org/wiki/Overton_window
Just because something is impractical or a solution is unknown doesn't make it valueless.

There are possible truths that exist in mainstream math formalisms[1]... for which the formalism says there may be no proof of. Just because the formalism can't explain everything doesn't mean we should throw it out!

I view communications like this as:
a. making ppl aware (who may not be technical)
b. doing the work that may not be worth $$$
c. avoiding future coordination failures of society

All of these in a hyper-optimized and hyper-educated societies may seem inefficient, but in a non-optimized and not highly educated world we live in they are the difference between chaos and not.

[1] https://en.wikipedia.org/wiki/G%C3%B6del%27s_incompleteness_...
Similar conversation happening in Canada (but no repayment):

"Bloc Québécois MP Xavier Barsalou-Duval put forward the motion, which states “that this House condemn the decision of senior management of Air Canada to pay themselves $20 million in executive bonuses when they’re received $6 billion in public assistance.”

Air Canada informed shareholders on Monday that its top executives and managers were getting a combined $10 million in stock options and bonuses for their response to the COVID-19 pandemic."

https://globalnews.ca/news/7918875/air-canada-executive-bonu...
Sure, good question. Have you ever built/audited IAM policies before? That helps with understanding the context.

You can get fired for HR reasons through a pattern of misbehavior. That misbehavior needs to be safely within legal territory such that a wrongful termination suit can't occur (to really generalize).

Prod example:

A not inconceivable pattern of misbehavior could be repeatedly causing prod events simply because the IAM allows the user to touch prod, because the user has an overly permissive IAM policy. Policies like that are very, very common in the wild, and almost equally at small or large companies (but for different reasons).

This could be hedged by an AUP or prod access policies, but then what wins out... the company might have an internal prod-access policy in place, but the laws, per this change, clearly state that if the IAM allows them to do it, it's not illegal to do so solely based on that reason. So, HR loses legal precedent to support their firing, which isn't an area HR loves being in I think.

You can generalize prod events to over-permissive IAM causing any number of moronic environment problems by a single user, but if they're only doing it because the IAM allows it and the user doesn't know any better, this legal change means it's not illegal (at least under the CFAA).
Is it possible to ban all users that flagged this post? Or at the very least permanently disable their downvoting and flagging power?
> This was probably said about tabs vs windows when tabs first appeared in browsers as well. Why introduce a different concept when you can already have many windows?!

You can justify any bad changes this way and "probably" means you don't know but you just made it up to justify. Tabs made things better we all new when that happend. What good thing the designers thought to introduce this change like in the tabs?

These designers have nothing to do at office if they don't. Basically we all are lab rats with every new shiny device or app version that hits now a days. Anyone having fun re-learning new gestures on mobile devices every 2 years?
If we do move to our glorious 100% remote future, then why should colleges be any different?

Why should students, who unlike workers don't even earn money, spend a significantly higher premium than workers pay to work in a big city, for the buildings and other auxiliary stuff that colleges have, when they can just take those classes from home remotely, and pay a fraction of the costs.
> ...the big issue is that this involves private property, and it's extremely hard convincing people...

Money helps.

Some locales in drier areas of the U.S. provide incentives for making changes to your property to reduce it's environmental impact. E.g. replacing a grass lawn with native desert plants, adding solar panels to the roof, capturing rainwater from driveways and roofs and using it to water plants and flush toilets, etc.
> Facebook is a public company and can do whatever it feels right to do as long as its legal.

Agreed.

> The concentration of power here is worrying.

Also agreed.

> The bias in their corrective action should worry us more, as should the possible extension of these type of actions to other groups.

Aaaaaaaand this is where you lost me. What sort of bias are we seeing here? If anything, Facebook has finally made it's first responsible choice in decades and had a sit-down discussion about a user who broke the rules on their platform. Their corrective action was pretty light too: they're only suspending him, and not even for a duration that could potentially interfere with a (god forbid) 2024 campaign. Only objectionable material has been removed, and his accounts are still up and publicly available.

> It will be interesting to see if this will increase Trump's popularity when he does return to social platforms since his fanbase has been starved of his attention.

Maybe, but the RNC is going to do everything in their power to stop it. You can expect the 2024 GOP lineup to start early and be furnished with crazy characters, because most of the RNC would rather endorse Kanye than give waste any more time with Trump in office.
it is a couple of the clojurewerkz libs.

the "I'm very clever" defns and macros that I'm referring to were written by our team.

Most of the 3rd party libs are pretty good. Except for them being not maintained and not keeping up with the latest versions of databases, etc.
I can't speak for this situation in Europe, but with the US PPP loans, companies basically had 2 months of their payroll paid for. This also means that got 2 months of free labor.

With the no payroll costs, where does that "extra" payroll money that would/should of gone to payroll go? Investors? Executives?
Varies by store.

The Walmart near me isn't like this. Only #2 is true.

Walmart is probably the #1 big box store where I live. Everyone shops there, rich and poor alike. It's clean, the people are fine and the staff are as happy as any other big box store staff. The Walmarts in the adjacent towns are similar. Most Walmarts I've seen are about like this. The tire center will have a Festiva in one bay and a Tesla in the nest

The Walmart near my work is very different. Way more dismal in all the ways you've described. I dunno about the gambling thing, that may vary by state and I've never seen it anywhere. But where I work has enough wealthy people to support other stores so the Walmart clientele is much poorer on average. I've been in probably a dozen Walmarts over the years and it's by far the worst.
>I am not sure what should be the appropriate reaction or corrective measure in these situations.

When it happens internally, i.e. I catch someone doing it, then either it is a "first time offense" of the clueless, or it is the act of an unethical person who will be unrepentant. For the clueless, it might be that they undervalue themselves, and therefore undervalue assigning credit. The unethical person, however, understands what they are doing and is simply untrustworthy. They will also likely have a lawyer, because they've done this before. So it can be pricey to get rid of them, but get rid of them you must. They are poison to your team.
> The issues I see are: very drab color palette. Working class shoppers. Sure, it’s elitist, but people like shopping alongside people in their own stratum.

That is just the store you went to. The company crunches tons of data before they decide on store placement, and grouping like-shoppers by socioeconomic status is absolutely a goal. My hometown for example - one side of town has a Walmart that is very run down and exactly as you describe, while on the other side of town the Walmart looks like an upscale Target on the inside and an REI on the outside.

They tried the "upscale" brand online with Jet.com and it was an absolute failure. Amazon owns almost all of the non-price-first shoppers and Marc Lore doesn't know how to run a business without oversight.