skysight-inc/HackerNews huggingface dataset:
Author here. I thought I'd post this since "Reproducible builds for Debian"[1] is being discussed on the front page.

I wrote apt2ostree. It applies the cargo/npm lockfile idea to debian rootfs images. From a list of packages we perform dependency resolution and generate a "lockfile" that contains the complete list of all packages, their versions and their SHAs. You can commit this lockfile to git.

You can then install Debian or Ubuntu into a chroot just based on this lockfile and end up with a functionally reproducible result. It won't be completely byte identical as your SSH keys, machine-id, etc. will be different between installations, but you'll always end up with the same packages and package versions installed for a given lockfile.

This has saved us on a few occasions where an apt upgrade had broken the workflow of some of our customers. We could see exactly which package versions changed in git history and roll-back the problematic package before working on fixing it properly. This is vastly better than the traditional `RUN apt-get install -y blah blah` you see in `Dockerfile`s. You know exactly what was installed before an update and exactly what is installed after and you can rebuild old versions.

IMO it's also more convenient than debootstrap as you don't need to worry about gpg keys, etc. when building the image. Dependency resolution and gpg key stuff is done at lockfile generation time, so the installation process can be much simpler. In theory it could be made such that only dpkg is required to do the install, rather than the whole of apt, but that's by-the-by.

apt2ostree itself is probably not interesting to most people as it depends on ostree and ninja but I think the lockfile concept as applied to debian repos could be of much broader interest. The lockfile generation could be easily separated from apt2ostree. Most of it is implemented in a custom fork of aptly anyway. Actually applying the lockfiles and creating a rootfs from it is much more apt2ostree specific and would probably need to be reimplemented separately to be more generally useful. Ideally that would be built in to dpkg, but I don't think I'm the man to drive that consensus.

[1]: https://news.ycombinator.com/item?id=28837690

[2]: https://ostreedev.github.io/ostree/
To retain facts and terminology, do you simply translate to native language to retain it?
The article is quite negative and assumes that Western ideas are inherently superior, all monarchies are bad, etc. To be expected for a left-wing literature journal, obviously, but that doesn’t make it any less culturally imperialistic.
Organization & Repetition.

Any material which is worth knowing, but that will not become part of a routine (i.e coding patterns or structures that would be used everyday) which would enforce the learning through repetition will need to be reviewed/used/consumed at regular artificial interval instead.

I've had a personal wiki for years, and moved to Obsidian.md two years ago. Content that I find usefull or worth keeping is broken down and rewritten into my wiki.

Here it is important to note that simply copy pasting long form text from a source does not work as well as writing the content in your own style. Writing it down, and having to reason about the content as I am doing so helps me retain it for longer.

I then have a list of content that I review at regular intervals (weekly, monthly, quarterly, yearly, 3/5 years). These are simply links within my wiki.

The tricky part here is to not overload your future self. Sure I can write down pages and pages of information and just expect future me to consume it. But in reality I know there is a limit.
:) Fair enough:

function isHuman(obj: unknown): obj is Human {
return !!obj &&
typeof obj === 'object' &&
typeof (obj as any).name === 'string' &&
typeof (obj as any).age === 'number';
}

This checks the shape of the object, and returns true if it's a `Human`. This will work for array or objects or classes or anything.
> We pay for our national health insurance too and probably comparable to what Americans pay for their private.

That's not saying much since the NHS covers far more than what private insurance does in the US. Furthermore, in the US we have to deal with the absurdities of deductibles, co-insurance and "out of pocket" maxes (private insurance in the US does not kick in 100% until all of these are met). So on top of high monthly premiums, you still wind up with large bills and even larger if you go to a facility that is "out of network". Also dental/eye care are most often separate insurance policies with different companies. I'd take the NHS any day over the asinine system we have here in the US.
The test code is quite small and might not benefit from R2R that much, libs it relies on are already jitted. Ditching Newtonsoft would affect response time though.
If the naturally immunity wanes quickly then that would be a good reason. Having said that, I do agree that advice and regulations around vaccination ought to be different for those who have previously been infected with the disease.
In my own life, the consumerism thing that has given me the most headaches lately is that people have figured out the easiest way to make money, a lot of money, really quickly, in the area I live, is to start a storage unit business. They're full almost immediately.

People have so much stuff they will rent multiple empty garages just to store shit no one cares about. I'm talking furniture, electronics, household white goods, clothes, all kinds of stuff. Just clutter and hoard.

It honestly, genuinely, blows my mind.
I haven’t watched the video yet, so I don’t know if he addresses this, but: considering many devices with a switching PSU support “universal” voltage, plugging a US style plug into a 220/240V source would probably be fine.
You don't really need to choose.

In many places, you can live in a smaller town and be within an hour or so of a city. It doesn't need to be a choice between living in Manhattan or the middle of nowhere in Wyoming.
The thing is, now there are a lot of ways to earn interest on your crypto holdings, not just yield farming but simple products like exchanges offering compound interest on your balances.

You have to weigh the risk of theft vs the financial losses from holding your money in a place that it does not earn interest (and in fact loses value to inflation). I say that as someone that lost quite a bit when Cryptsy went down.
2 Points

1. Vaccinated people still spread covid, Vaccination primary effect makes a person asymptomatic, this has been proven.

2. "Large portion" is false, it is children under 12, who have a lower chance of serious illness than a vaccinated person. That said if you as a parent feel that risk to do high then you as a parent can take measures to ensure you children only come in contact with vaccinated person, this however does not mean you can impose that desire via government. To be clear I am fine with parents advocating business require vaccinations of their own business policy, I am not fine with government telling a Bar that is for adults they also must require vaccinations. Government mandates bad, private business choices good.
It's ok man, it's not a religion. You can skip those if you don't like them. He's also had James Gosling, Don Knuth (x2), James Keller (x2), Brian Kernighan and a bunch of other legends.
I've always liked the two-nulls solution in JS. `undefined` is a runtime-generated missing value, whereas `null` is a compile-time author-supplied missing value. In other words `undefined` is a "pulled" missing value, `null` a "pushed" missing value. Any feature can be misused, but having the distinction is certainly helpful.
It’s not true that Record will result in a type where any key is valid. If you pass in a primitive like string, then of course any string will be valid. That’s not Record’s fault; what you’re doing is essentially creating an index signature [1]. If you pass a more restrictive type in as the key, it works as expected:

type Tips = Record<“foo”, TipObject>;
const tips: Tips = {}; // error, needs key “foo”
tips["foo"]; // fine
tips["bar"]; // error, no key “bar” in tips

It’s worth mentioning that this isn’t just an issue with objects. For example, by default, the index type on arrays is unsafe:

const arr: number[] = [];
const first: number = arr[0]; // actually undefined, but typescript allows it

If you do need an index type and want to account for undefined keys, the idiomatic way is the noUncheckedIndexAccess compiler flag [2], which will automatically make any index property access a union with undefined.

[1] https://www.typescriptlang.org/docs/handbook/2/objects.html#...

[2] https://www.typescriptlang.org/tsconfig#noUncheckedIndexedAc...
Chicken pox/varicella is another disease to which a lot of children gained natural immunity prior to vaccination being an option (“chicken pox parties” were still a thing when I was a kid in the 90s). We now know that the virus can lay dormant for years after the initial infection and come back later in life as shingles which, while not deadly, can be extremely painful and debilitating.
And yet ML had to raise almost $5B to get to around ballpark with the Hololens which I assure you Microsoft invested substantially less money into and already has tens of billions in government contracts committed to use the thing.
Sam Altman's blogposts in audio version
As others have noted, Spaced Repetition (I use Readwise, Anki is good too) is a good starting point. My workflow for trying to learn new concepts looks like this:

1. Have a habit to review 10 flashcards in Readwise [0] every day
2. As I read, stash snippets of interesting things into Readwise
3. If there are bigger insights I want to digest, I take notes using Dendron [1] and link those insights into other things I'm studying

Eventually, I want to integrate my markdown notes in Dendron with Readwise so that it's easy to block out something I want to review with Readwise in my notes, and for that to automatically show up in Readwise.

[0] https://readwise.io
[1] https://dendron.so
As other posters have commented, hashing schemes like this are not really robust to a few very simple transformations, such as slight offsets in time, and cannot detect if one video is a clip from another.

Practically you can only expect such a tool to match up "reencodings" from one format to another.

Because of this IMO it's worth including the video length as a separate field within the hash. That way when you are doing a search you can sort the videos by length then only calculating the hamming distance for videos of similar length (a short video will never be a duplicate of a long one even if the perceptual hashes are close)

Unfortunately when all videos are the same length this doesn't change the O(n*2) time complexity, but assuming that they are not, this optimization should give a significant search time benefit and false positive reduction for large datasets.

I haven't actually checked what the author is doing, but for the sake of not having to decode entire videos (very CPU intensive) it's worth limiting the hash generation process to a small portion from the start of the video (somewhere between 30 seconds and 5 minutes has worked for me depending on the content). As well as being saving time this helps you detect reencodings where the time base is slightly altered (the frames will diverge more and more as time goes on)

(just adding some of my own experience from my own similar video hashing project!)

edit: inb4 someone complains about O(n*2) and mentions BK trees, for numbers up to ~500k hashes in my own testset a BK tree has always been slower than doing the naive search over a neatly aligned stripe of sorted-by-video-length hashes in memory. (Maybe I need to learn how to do memory arenas for cache locality) (or maybe I need to make my own video hashes be not 500 bits long)
I've been using 10+ years and have definitely considered that a lot over the years. It's a valid point. I used to be concerned with that, but now I think that is not a big issue for two reasons:

1. Vendor lockin when you are a startup should be a low priority in my opinion. Your priority should be moving fast and getting customers.

2. To expand on 1. It's not really vendor lockin, the only things vendor specific are your infrastructure templates and interface code. Rewriting the interface for another cloud provider takes a fraction of the time of rewriting your codebase (source: I've done it many times).

To come full circle to the question, one thing you should probably not do as a solo-prenuer is concern yourself pre-maturely with vendor lockin at the expense of getting a working product.

Edit/Example: The code for interfacing with AWS Aurora is the same as any other MySQL or PostgreSQL code except for authentication. Switching to a non-IaaS database WILL take time but no more time than rolling your own. So your choices are not "lock in" or "freedom".., it's, spend lots of time setting up databases now or later when you have proven your business model (and potentially never)

Edit 2: This is an anecdote certainly but... of the dozens of startups I've worked on and with, some of which have grown pretty large. The only vendor lock-ins I've ever found to be issues have been with software frameworks (especially ERPs). Never infrastructure. I used to be worried about infrastructure lockin, now I prioritize product market fit.
Never use Basic SKU, plan your network carefully before you even create the vnets, monitor NAT capacity, beware undocumented ARM rate limits. Good luck
Its a cost of corruption but its marketed as a commodity industry wide cost of production.

So enormous herds of cattle in the desert in CA owned by extremely politically connected ranchers will get enormous subsidies resulting in all this "Big Macs should cost $45" stuff.

Meanwhile I live in a civilized area that gets near five feet of rain per year. The cows reproduce and eat infinite free grass and water. Essentially all I pay my organic farmer buddy for is his labor, everything else is rounding error. His land is geologically unsuitable for factory style farming so there's no opportunity cost. I pay less than $3/lb live weight and some pittance to his buddy the butcher to process and freeze my half cow every year or two. Short of massive government intervention its hard to imagine how he'd go out of business; he's not getting any subsidies to be taken away.

I suspect the future is going to be much less level and much less equal. If you live in an area where infinite free water falls from the sky, even the poor people are going to have a high-ish standard of living. If you live in a desert... maybe not so comfortable of a life anymore... Note this also applies to plants, not just meats.
Yes the error reporting is why I prefer interfaces over types since a long time now. The definition is useless in many cases
Contact your lawyer and have them craft the letter. It will include a threat of lawsuit if they fail to act on factual information.
Sure, and I like my nature walks as much as the next person. I just find it weird that after pushing animals into what amounts to a reservation and doing as we please to the environment outside of these carefully drafted borders we worry so much about a stack of rocks. You know, a squirrel can carry an acorn around too and have an effect on where an oak tree will grow. The only way to not affect the environment is to not exist. The so-called home for these animals is as much our artificial creation as a factory or a nuclear power plant.
Snapshooter
I recently saw a code example in the VSCode repository where Extract was used in a really awesome way. Say you have a complex class with lots of fields and methods, and you want something that's a specifier for either a constructor's parameter or a query system. Often times, that will be very similar to the underlying class, but just the fields in it - excluding every member that's not a function. Instead of rewriting every single field name for your new type, just have your new type be Exclude<MyType, Function> or Partial<Exclude<MyType, Function>> and the resulting type is perfect for your needs.

Pick is also really useful if you have an interface that passes down a subset of complex things you get from a library; no need to retype their types, just extend a Pick of the library type.

In short, utility types are awesome!
One example in networking of a "best practice" that quickly turned into a "worst practice" is disabling auto negotiation. Back in the mid 1990's when 100 mbps nic's first came out implementation of the new auto negotiation protocol was quite buggy. The workaround at the time was to "lock down" network ports by disabling auto negotiation. Somehow this quickly became canon and an entire generation of network engineers swore this as their first commandment.

Meanwhile the bugs with auto negotiation were worked out within a few years and by year 2000 there was no reason to do this anymore and every reason not to:

Disabling auto negotiation causes duplex mismatches. If not immediately then eventually it always does. There are too many ways one side of a link can get reset to the industry default (auto negotiation enabled): Replacing hardware, automatic nic driver updates, staff turnover, and simply not checking each and every interface every time a change is made to the network. There is no practical way to keep such an inherently unstable system in sync long term.

Ironically these inevitable duplex mismatches only seem to reinforce the belief that you must "lock down" every port everywhere resulting in a vicious cycle of bad practice.

The best way to avoid duplex mismatches is to never disable auto negotiation unless you are absolutely forced to by some very old or very poorly designed device.
I use Netlify serverless functions (which is just a wrapper around AWS Lambda) because it basically fits the criteria for me. I have a low but bursty access pattern that fits into the free tier, and there's a static SPA page that can serve up instantly while the XHR triggers to do the cold start fetch. I don't think I would use it for anything consumer facing though. This is just a backend where an extra 300ms isn't going to make a big difference to the admins.
What's an "inefficient electric heater"? Is that a device that generates more light than heat?

Surely all the energy you put into any machine is eventually going to turn into heat? Hmm - perhaps there are heaters that generate heat mechanically, and the resulting losses are sonic.
Gazprom's unwillingness to send gas in transit through eastern Europe where it could theoretically run is indeed a real thing, and you're right that Nord Stream 2 would alleviate only political capacity limitations. (And FWIW, I'm against it, because I'm against Vladimir Putin, but I don't get to make these decisions.)

It's still limiting capacity. There's still lots of gas in Russia. Heck, there's still lots of gas in Groningen, they've just stopped pumping it. In neither case are we staring down a net energy cliff™.
MCAS in itself doesn't seem to have been the problem. The fact that MCAS relied on a single sensor (no idea how that got certified in the first place) and that pilot were not aware of MCAS and how it worked were the problems. The latter was due to Boeing trying to avoid re-training and re-certification of air crew.
Itasha
Yesterday's discussion on the actual article:
https://news.ycombinator.com/item?id=28824971
For the backend of my app[1] I'm mainly using Google Cloud:

* Database: CloudSQL/PostgresQL (with Query Plan for analysis)

* Services: Kubernetes (Services in Go)

* CI: Cloud Build

It's pretty easy to maintain.

[1] https://stockevents.app
Some if the comments here are way over the top IMO. Like a full time DevOps person went solo and spent a few weeks setting up their perfect deployment process.

If we're talking a plain saas type deal, I'd keep it simple, elastic bean stalk, or use a heroku or render.com like setup until you grow to the point of hiring a team. If it's just a basic saas, I don't see how a 1 man team could really out grow this setup. I've seen 100 person teams using heroku.

K8s is just way too much work. Even cloud formation is to much for my tiny show.

Use the automated backups setup by your host for your db. If you need to roll back, just redeploy your previous git hash. I typically use GitHub actions to deploy, so rolling back is just a matter of force pushing the prod branch to the sha I want to deploy

Skip micro services, they are too much work for a small time thing, and don't really provide much benefit.
You’re looking for the noUncheckedIndexAccess compiler option: https://www.typescriptlang.org/tsconfig#noUncheckedIndexedAc...
Curious how it will be priced. Can it be dynamically inserted for specific sessions only? Is there an API to grab a link to the current session’s recording? Can you watch a session “live” like with FullStory?
>1. ...put 2x hours into it. isn't that wonderful?

That's what horrors are made of. You absolutely do not wish your people overworked for any extended period of time. And if there is an drawback, hurdle down the road, instability, etc...
If you have substantial traffic, the cost savings of Lambda are gone, and you can just use ECS or something.
> Many were increasingly of the opinion that they'd all made a big mistake in coming down from the trees in the first place. And some said that even the trees had been a bad move, and that no one should ever have left the oceans
> childcare here in Dublin is something on the order of $250/week

This is crazy low, it's more like 300+ euro per week, which is a lot of money.
Might I ask why do you not consider the reverse order of events?

Get the vaccine first and then natural immunity should a breakthrough infection occur. Seems like a much safer way to go about it.
Common Trevor..

https://pics.me.me/im-telling-you-the-man-and-the-dog-are-de...
The problem in my opinion is accumulating lung tissue damage over a lifetime. I

If you have one covid infection per year with long damage, your life expectancy and quality drops quite a bit, even if covid is not killing you. The damage may only be perceivable to athletes and in later years though.
This strikes me as very cynical.

In my own life experience, the majority of my employers have genuinely wanted to work together to improve things for a large group of people.

I have never worked for an employer where it was obvious that everyone was only out for themselves.
This is an interesting theory because I wonder if people would start growing and butchering their own animals again if it ever gets to that point. It is much more gruesome than having your own veggie garden, though, so I wonder if Americans would take to it.
Thought in Oz (their home market) Quorn is fully vegan already, and they are working on it everywhere else.

(Just hearsay, haven't been to Oz in a while and with the current political climate I'm not too interested)
> I don't get why they can't make efficient GPUs

They do make efficient GPUs, see smartphones. Even current desktop cards are efficient considering their computational power, but they are increasingly tuned to run with higher power budgets. Turns out people care more about FPS than power consumption I guess? Also consider that winning the performance crown has a halo effect for the rest of the portfolio, so the performance / high-end models are tuned towards that.
Yup, same here.

I absolutely don't memorise things on purpose. I just use them, and try to remember where to look them up again.

Memorisation is a fancy tricky that doesn't gain you that much over knowing where to find the answer.
That last anecdote is quite funny and ironic.

Give it a few weeks or a month and people would mostly get used to it.

It’s like when revolutions happen and all that you depended on pretty much collapses (Afghanistan today) or losing rights (China and maybe Australia), people soon enough get used to not having things. Initially it’s shocking but people get on with life and make do where necessary.