skysight-inc/HackerNews huggingface dataset:
At Notion, we re-type Object.keys and Object.entries for the situations where you want more specific key types. For example, iterating over a `Record<ThingyIdType, ThingyUpdate>` while preserving the well-typed ID key, or iterating over a `SchemaDefinition<Thingy>` which is known to be statically declared as an exact object.

/**
* Like Object.keys, but unsound in exchange for more convenience.
*
* Casts the result of Object.keys to the known keys of an object type,
* even though JavaScript objects may contain additional keys.
*
* Only use this function when you know/control the provenance of the object
* you're iterating, and can verify it contains exactly the keys declared
* to the type system.
*
* Example:
* ```
* const o = {x: "ok", y: 10}
* o["z"] = "UNTRACKED_KEY"
* const safeKeys = Object.keys(o)
* const unsafeKeys = objectKeys(o)
* ```
* => const safeKeys: string[]
* => const unsafeKeys: ("x" | "y")[] // Missing "z"
*/
export const objectKeys = Object.keys as <T>(obj: T) => Array<keyof T>

/**
* The type of a single item in `Object.entries<T>(value: T)`.
*
* Example:
* ```
* interface T {x: string; y: number}
* type T2 = ObjectEntry<T>
* ```
* => type T2 = ["x", string] | ["y", number]
*/
export type ObjectEntry<T> = {
// Without Exclude<keyof T, undefined>, this type produces `ExpectedEntries | undefined`
// if T has any optional keys.
[K in Exclude<keyof T, undefined>]: [K, T[K]]
}[Exclude<keyof T, undefined>]

/**
* Like Object.entries, but returns a more specific type which can be less safe.
*
* Example:
* ```
* const o = {x: "ok", y: 10}
* const unsafeEntries = Object.entries(o)
* const safeEntries = objectEntries(o)
* ```
* => const unsafeEntries: [string, string | number][]
* => const safeEntries: ObjectEntry<{
* x: string;
* y: number;
* }>[]
*
* See `ObjectEntry` above.
*
* Note that Object.entries collapses all possible values into a single union
* while objectEntries results in a union of 2-tuples.
*/
export const objectEntries = Object.entries as <T>(
o: T
) => Array<ObjectEntry<T>>
i got 11%
> So, is it now perfect? Well, sort of. We now have introduced a certain asymmetry into our number system

I think some systems use the INT_MIN bit pattern as a sort of not-a-number integer trap?
> ## Have you any legal background, are your changes sound?

> No I do not, and I have no idea.

> I would greatly prefer to have a legal professional draft these changes. In
lieu of that, I have tried to approach this by combining existing
professionally drafted texts, and minimised adding my own wording.

It’s an interesting idea for a license but no one should use this until it’s been reviewed by a competent lawyer.
Context always matters. Most people aren’t programmers or engineers and don’t appreciate or benefit from the level of micro-scoping that you crave.

A great example of when this does happen that you can google is parking signs in NYC. There’s a bunch of very specific rules that accommodate dozens of scenarios. As an engineer, I’d be hard pressed to actually determine the legality of a parking scenario in a more complex scenario.

At the end of the day, “No vehicles in the park” is a pretty clear instruction. The idea that first responders would be an exception is both covered in superseding law and a core principle. Preservation of human life supersedes the health of the turf.
The idea of making fuel on Mars was popular enough to have the calculations be part of undergraduate thesis' over 20 years ago, back when I was in college. I bet that people far more serious than Aerospace Engineering undergrads have been coming up with far more detailed versions decades before that. But those plans are no panacea: The fuel creation takes time, so you are either sending a mission first, just to make fuel, hoping it all goes well, and then send a second mission later, or you might end up having to keep your rocket in the surface of mars in good shape, still able to come back, for quite a bit. You also have to consider general timing: It's not as if efficient trips in either direction can be done any random day, of any random year, just due to orbits.

So yes, the mars fueling idea is compelling, but let's not assume that the people doing this for a living, and proposing this plan, are just worse at this than random undergrads.
THANK YOU for the book rec. i’ve been wondering how to spend an Amazon gift card and I just found it here

Here’s the book synopsis in case anyone else is interested:

How honeybees make collective decisions―and what we can learn from this amazing democratic process

Honeybees make decisions collectively―and democratically. Every year, faced with the life-or-death problem of choosing and traveling to a new home, honeybees stake everything on a process that includes collective fact-finding, vigorous debate, and consensus building. In fact, as world-renowned animal behaviorist Thomas Seeley reveals, these incredible insects have much to teach us when it comes to collective wisdom and effective decision making. A remarkable and richly illustrated account of scientific discovery, Honeybee Democracy brings together, for the first time, decades of Seeley's pioneering research to tell the amazing story of house hunting and democratic debate among the honeybees.

In the late spring and early summer, as a bee colony becomes overcrowded, a third of the hive stays behind and rears a new queen, while a swarm of thousands departs with the old queen to produce a daughter colony. Seeley describes how these bees evaluate potential nest sites, advertise their discoveries to one another, engage in open deliberation, choose a final site, and navigate together―as a swirling cloud of bees―to their new home. Seeley investigates how evolution has honed the decision-making methods of honeybees over millions of years, and he considers similarities between the ways that bee swarms and primate brains process information. He concludes that what works well for bees can also work well for people: any decision-making group should consist of individuals with shared interests and mutual respect, a leader's influence should be minimized, debate should be relied upon, diverse solutions should be sought, and the majority should be counted on for a dependable resolution.

An impressive exploration of animal behavior, Honeybee Democracy shows that decision-making groups, whether honeybee or human, can be smarter than even the smartest individuals in them.
A lot of Estadounidenses won't get this story. When I bought a car in Argentina, I walked into a Volkswagen dealership in San Antonio Oeste and bought the least fucked up of the 3 used cars for $3000. It died on us about 30 miles out in the desert in some place called Choele Choel. I kept fixing it and eventually we made it to Mendoza and after all this time, the license plate on the car was a Xerox paper, and the targeta verde was a picture of some lady. We went through probably 20 checkpoints, and no one said anything. We finally made it up to the Chilean border in that car, and the Chileans were like, this is a stolen car. You need to go back down the mountain.

We ended up at a police station in Mendoza where the cops did not want to handle our paperwork. A few months later, I parked the car in Buenos Aires and my girlfriend left a sandwich inside. It rained and the car got moldy. I wanted to sell it. So I called a number in the newspaper that said they buy cars. Some guys showed up, took it on a test drive, and didn't come back. They just took the car.

So I called my friend who knew a cop and she said, meet us in Plaza Serrano at 12:00, those guys will be there, and bring $100 for the policeman.

I did, the guys showed up, they paid me $1500 for the car and everything worked out. The cop just stood there watching.

Argentina is sort of how life is supposed to work. If you had the amount of guns like in the US it would much more fucked up. Also in a weird way people still have morals there, at least they are not as nihilistic as in the US. People still read fucking books and are educated. I think a lot has to do with having late night dinners and talking for hours instead of being on your phone. Taking your kids out to dinner and wine at 11pm is a really good value. Teaching them to talk and listen and be adults.
You really have to just grind through the first two seasons, as it's a ton of world bulding and character development, but that's the whole point of DS9. By the end of the series there are multiple incredible character arcs that put TNG to shame.
This is particularly grubby behavior by Toast. They are already charging restaurants to use their platform. Reaching into every customer’s wallet for $0.99 (hidden fee) per transaction > $10 is greedy. They know it’s disgusting, which is why users have to click the Info button to see details about the fee.

Most customers will not notice and just pay this hidden fee, but that doesn’t make the practice palatable. There have to be other ways for Toast to achieve profitability.
They have a billion homeless people?
Varicap
I'm less engaged with my current job than any other I've had in my whole career. Part of that is flaws specific to the company, but being remote definitely magnifies it. It's much harder to feel like I'm a part of something actually real. It feels like work for the sake of work, like I'm not a part of something with people. Seeing them in person occasionally doesn't change that.

I'm not so excessively introverted or withdrawn as to dislike being around people so I don't understand the things people complain about with regards to being in an office. Since I have free will I never chose an unacceptable commute. And yeah, open office plans sucked but this contrived zoom shit is worse.
Well yes so all of this "return to office" stuff from tech companies always seems to result in backlash from engineers and the majority of discussion on HN skews to people who are outraged or are quite happy with the comfortable remote work life now. I want to talk to people who have lived and done that but see the value of actually interacting with real human beings in a work context. I think it's only fair to hear the other side and then see how people went about doing that. Because the transition back isn't so simple.
Per the article, it goes into the HEPA filter. After that, recover it or dispose of it as you see fit.
I didn't know about swiftcentre, or metaculus and I'm fascinated by it. That's exactly the software engineer approach to this topic i like to see when i come here.
> There have been attempts at hybridization between sturgeon and paddlefish in the past

ref?

> 's not exactly mind-blowing

disagree
This is what is expected. This is what you as a business owner are required to do in order to please your investors and shareholders.

Otherwise, you will be replaced with somebody who will.

As it was in the beginning, and shall be always, world without end. Amen.
Sometimes it’s nice to have your feelings validated, especially when it feels that you are in the minority.
I have used FakeSMTP a long time ago, and it seems like it's still around. This one comes as a single jar.

http://nilhcem.com/FakeSMTP/
It's somewhat humorous that the most expensive part is the manual! And no wonder electronics nowadays stopped including comprehensive manuals like the Spectrum's in their aggressive cost cutting.
Last I checked, there aren't any Xeons with E-cores. However, you're right: the most direct competitor to Bergamo seems to be Sierra Forest, a chip that will have nothing but E-cores (and no AVX-512).
The article says the utility from sending the samples back is indeed limited, at least compared to the cost, which would likely exceed the (already astronomical) JWST cost substantially.
Atlas: Sequoia's interactive guide to Europe’s technical talent
Travel/tourism is what I like to call "rudeness in aggregate". What I mean with that is that single individual people are doing nothing egregiously wrong as such, but above a certain number all combined create a strong negative ("rude") effect.

The most obvious example of this in context of travel are these huge cruise ships. No one is really doing anything wrong with that, as such, but craptons of tourists descending on your comparatively little city or town can become quite disruptive (as I've experienced first-hand as a resident).

There's quite a few problems like this, from small to large. Humans don't seem very good at taking "collective responsibility" for these sort of things, "because I'm doing nothing wrong", which is true, but also not.
Is there any point though really? For 100USD while I’m in the UK probably adds even more paperwork
nope - 15 years remote :)

Honestly, I wouldn't mind office 1x a week or so if it was within 15 min of my house, but based on COL it really isn't worth it. Any commuting beyond that is a waste of time (not to mention the stress, environmental impact, etc involved)
There is a very real culture problem with hybrid environments, when other people are together and you are remote it's a problem. It can work, but my preference is to be full remote. I've been full remote for 13 years and I had to develop methods to satisfy interaction. When I do travel and go to the office its such a drag, I feel so drained after.

I really like having lunch at home, napping if I want, etc. It's not socially acceptable to be so relaxed in an office.
Replacements do exist both for the membrane as well as the rubber keys on top. The author lists it in the parts page under "Misc": https://www.lostretrotapes.com/zx-spectrum-issue-3b-parts-li...
I'm an introvert but completely isolating from the team and having professional-only meetings is draining too draining for me.
Are you saying that there are 42 million homeless people in California?

(10B / $6 / 4 quarters / 10 years)

Edit: fwiw, assuming 115k homeless in California (which incidentally is 1/3 of the US total), we get $2,170/person per quarter over ten years. Which does sound like enough to make a real difference in people's lives if you just handed it out.
> What makes the boat race irrelevant? Boat racing is a fairly long running tradition that is an important part of many cultures.

"Hey, Tatuco, didn't you have this custom tossing live people into that volcano ?

Yes, but not for 200 years.

Ever think of reviving that custom ?"
Buddy, Buddy
Behind the Curtains of Wikipedia Redesign
Spending money on third party development of tools to get to space is giving away free stuff to people (notably the part of the spend that is the profits of those third parties).
HN uses a font size of 14px, that's only slightly smaller than most browser's baseline of 16px (Vs. 12px for small). By any chance are you reading it on a 4K display?

In my opinion, HN and most websites, shouldn't be setting a baseline font size at all (least of all in pixels). Medium/default should be the baseline then large/larger etc should be used as-needed.
I'd rather a somewhat inflated cost to make the research public. Also private equity doesn't mean it's not wasted. 37 billion dollars for a forum.
There was a very detailed post with die shots etc on semi analysis a few weeks back https://www.semianalysis.com/p/zen-4c-amds-response-to-hyper...

In the subscriber only section it was mentioned there will be some Zen5 consumer parts using Zen5c as the equivalent of current Intel E-cores.
>Wagner is not a person

>He is alleged to have founded the Wagner Group, with his own call-sign reportedly being Wagner

https://en.wikipedia.org/wiki/Dmitry_Utkin
There's a big discussion about this: https://github.com/microsoft/TypeScript/issues/1897. The benefit seems extremely limited to me. Valid JSON is obviously a subset of `any`, but I can't think of a situation where that particular specificity provides any value. Can you?
If you live in the U.S., people flying very low over your house probably are trespassing, you have air rights. (True in other countries too.) https://en.wikipedia.org/wiki/Air_rights Before commercial flight was common, air rights used to extend into space. Now they’re limited, but you have at least a few hundred feet.

Parks do have airspaces, obviously and literally, and more to the point, in the U.S. there’s existing legislation defining the altitudes that are considered “in” and out of the park.
It has some of the same problems. It doesn't have the problem of being unable to read obj[key] because typescript doesn't realize it's the same object.
Does anybody else get nervous over architectural patterns that exist only/mainly to make unit testing easier?

My preference for these type of situations is to try to encapsulate as much logic as I can into pure functions. In addition to be being easy to test, they also have additional architectural benefits that go beyond testing.
Doherty Threshold
I think this is the reason: When you negate a number in two's complement, you take (a single) two to the power of the bit width and then subtract the number. For example, negating 0011b (4 bits) means taking 10000b and subtracting 0011b, giving you 1101b.

When you negate a number in ones' complement, you take as many ones (plural) as the bit width and then subtract the number. For example, negating 0011b (4 bits) means taking 1111b and subtracting 0011b, giving you 1100b.
I wish I'd been taught that as a child instead of the conventional method. I had no end of trouble with subtraction because we were taught ‘borrowing’, and being a moderately decent kid I always gave back what I borrowed.
What do you mean with "validated"? Nobody can tell you how to feel.
Their scientists were so preoccupied with whether they could, they didn't stop to think if they should. - Dr. Ian "Goldblum" Malcolm
i think this was a joke lol
These are two very extreme categories to box someone in. Everyone has a trait from both ends of the spectrum in different regards.
Prevjob was fully remote, one of my requirements for curjob was having a significant in-person component. I concentrate more effectively, I collaborate much more frequently, my team stays in sync better and our designs are better for it, I learn more from teammates, I know more about other teams’ work so I can contribute much more, I have meaningful relationships with the people I spend half my day with, I have better work/life separation at home, I get free food and La Croix, making friends across the company is good for my career and for my happiness.

Against that: commuting can and does suck ass. Having had jobs where I commuted 2+ hours each way some weeks (consulting lol) I know the pain is real. I’m lucky enough that my commute is manageable, and given that the choice is not even close for me.
> Since I have free will I never chose an unacceptable commute

Is your view that people take unacceptable commutes because they think they have to?
Its a reference to the movie "O Brother where art thou"
It's helpful to everyone to consider and realize what kind of working situation they want, what they need to work well (socially, professionally, etc.). This is a huge factor in deciding where to work - how you want to do it. For some personalities, they really enjoy the in-person team dynamic. It's not dangerous to realize that about yourself.
"We have only completed one percent of the journey".

I.e., the work is never done. Urgency is forever, because no matter how much you've done, most of the work is still ahead of you, so don't slack off.

I think the original quote was transcribed with a missing word: "This journey is one percent finished".
Well, avoiding the deeper philosophical waters, I would say whatever responsibility is there would depend on how democratic the country is. Russia is very far from being a functioning democracy at the moment. Sure they have elections, but they're likely partially fixed, freedom of the press is a joke, political protest is punished harshly(typically with violence), and opposing political candidates are prosecuted on false charges, jailed, even killed. Given this, I think holding the Russian people as a whole responsible for the war seems unreasonable. Certainly there's some responsibility there in various ways in terms of the personal contributions of individual people. But precisely because Russia is so undemocratic, the distribution of responsibility is heavily distributed onto the oligarchy and military leadership.

But like you say, genocide is never justified, no matter what. And that was mainly what I was reacting to.
Most places hire "at will" and can fire anyone for any reason or no reason unless prohibited by law.
Why does starting with ones' compliment make things easier? IMV, it makes it more confusing, because two's compliment seems like an arbitrary leap that happens to work.

If you're tasked with mapping a subset of bit-states to negative numbers, it's intuitively obvious that there's already a state that yields 0 when you add 1 to it, as long as you wrap on overflow. With four bits that's 1111. That's a great representation of -1.

If you want to get 0 by adding 2, you'd have to start from 1110, and so on.

Just because the top bit can be used to identify a negative number when you use up half the states, doesn't mean it should be thought of as a logical flag. That's how you invent ones' compliment.

I think of ones' compliment as a logical encoding, and two's compliment as an arithmetic encoding, and it shows in how easy negation is in ones' compliment, and how easy arithmetic is in two's compliment.

The fact that everyone tries to teach them as if one is a precursor to the other is what's confusing.
This is essentially the issue. Nobody expects life in these tubes. The project was designed to find it, and the assumption was made that a high confidence sample would fuel and expedite a return mission. With a very high price tag and a very low chance of finding life, it's better to spend money elsewhere.
You've described SQL :)
Fascinating exercise. During my first attempt I found that I had to look up the actual definition of vehicle.

I initially thought that a vehicle means someone is being transported by the vehicle, using an engine.

According to wikipedia vehicle also includes things being moved by muscle, and it is not limited to transporting persons, also wares.

I also changed my mind on whether a police or EMT falls under the rule. It obviously does. There has to be a second rule overriding this rule for those cases.

Also I changed my mind on the paraglider and the ISS. The ISS is a vehicle but it's over the park not in the park. The paraglider is a vehicle under my new understanding of the definition, and it does not matter whether the initial thrust came from when the paraglider was outside the park.

It also explains why the rules in the park near me prohibit _driving_ a bike in the park, not having one.
Uh, it's simpler than that. 0x0 is 0. 0xFF is -1. What more is there to "understand".
They don't have a lot to brag about there. I'm on an expensive Thinkpad with an AMD Ryzen 7 PRO 6850H, less than a year old... no AVX512. Chip was released Apr 2022, with AVX&AVX2 but no 512. (Also completely garbage unstable and unreliable driver & firmware support from both AMD and Lenovo, but that's another story).

I've been messing with SIMD optimizations recently in a datastructure library I wrote, and as tantalizing as the AVX-512 is, it'll be years before it can be used in production software on a real scale. Introduced in 2017, and still totally unusable in the wild.
Because NASA is absurdity inefficient when developing technology. That's why SLS is such a problem child, and why they abandoned their new space suits, which were already years in development and consumed billions of dollars. They were recently outsourced to a private company which is expected to do it in a fraction of the time at a fraction of the price.
Thank you! Language, specifically legalese, tries to make precise something that can't ever be. It's why "language prescriptivists" annoy me because it's not even a preference difference it's simply impossible, you can't define any word completely. Worse even if you could your definition is only good for a point in time.

Even simple things like chairs, you can't write down a definition that includes everything that humans consider chairs and excludes everything humans don't consider chairs.