skysight-inc/HackerNews huggingface dataset:
Like proto I've never had this happen, even though I was initially sceptical until I found myself writing stuff like (real examples more complicated hence decision to break them down)

let geese = something(lots_of_birds).bunch().of_chained().functions();

let geese = geese.somehow().just().count_them(); // We don't actually need geese, just #

Could you name that first variable something else? Yeah. But, it's geese, it's not the number of geese, it's a different type, but it is just geese, that's the right name for it. OK, maybe rename the second variable? But number_of_geese is a stupid variable name, I would push back on a patch which tried to name a variable that because it's stupid. n_geese isn't stupid, but it is ugly and Rust is OK with me just naming it geese, so, geese it is.

However, if you do run into trouble those Clippy rules can save you. You probably will find you don't want them all (or perhaps any of them) at deny, but Rust is content for you to decide you only want a warning (which you can then suppress where appropriate) and importantly these are three rules, you might well decide you only hate shadow_same or shadow_reuse or something. Here's the link specifically for shadow_reuse as an example:

https://rust-lang.github.io/rust-clippy/master/#shadow_reuse
This will sound harsh but I just want cheap gas. And I am not the only one. So many families are struggling to get by and anything that adds to the cost of things going up would immediately oppose it. I am all for freedom oil but not when it would likely cost me more.
Welding giant blocks of metal together in one go is scary enough for me :)
Obama would say "we"
more like, it's time to kill texting.

how many times can we attempt to patch new features on top of a protocol that was never intended for those purposes and is fundamentally insecure.
Well, yeah. Back in 1975, we weren't generally using our phones for authentication. The environment has changed and the security issues are far more important now.
What kind of boards are you making? I used skidl a lot but I ran into two challanges, wondering if you have run into these also:
1) There was no easy way to combine schematic and skidl-based circuits. This was a problem at a company environment where design reviews become impossible because nobody else could write their heads around a power converter circuit made in skidl.
Ideally I would have wanted to be able to drop in a "skidl-block" that would just have a fabric of a bunch of digital connections, and let analog circuits remain as graphical schematics.
2) I really like KiCad's backannotation feature for adjusting BGA fanouts and whatnot from the layout. It is really fast and makes doing layout much more pleasurable (that is a standard feature also in all the big name commercial ECAD suites). Using skidl broke my backannotation flow, at least that was the case ~6 months ago which is the last time I used skidl.
I like the way Axum for Rust handles this. All response handlers return something that implements IntoResponse. Lots of types implement IntoResponse, thus making the simple cases really streamlined.

async fn create_user(
Json(payload): Json<CreateUser>,
) -> impl IntoResponse {

let user = User {
id: 1337,
username: payload.username,
};

// this will be converted into a JSON response
// with a status code of `201 Created`
(StatusCode::CREATED, Json(user))

}

If the handler is complex enough that branches can't all return the same type, you can just add .into_response() to each return site, and now you're just returning a response, which also implements IntoResponse (as a no-op).

This avoids the problem discussed in this article while also avoiding much of the boilerplate of manually building responses.
It’s a balance. You don’t want so many repercussions that a manufacturer would rather deal with the fallout rather than doing a recall but at the same time you don’t want total acceptance where quality control is ignored completely. We don’t want to have a situation where cars are going to need day zero fixes.
Just to clarify, I don't believe it's too late to make changes, and I am trying to do my part. But it's too late for these changes to prevent what we're currently and about to go through. The climate and environment are massive, dynamic systems.

It's just dangerous. For example, native plants are absolutely imperative. There is very little movement for this. All of my neighbors are cutting down trees, replacing it with lawns that do nothing but sit there (and for this summer die or take on disproportionate amounts of water) and also plant non-native plants that also require a lot of water.

I planted native plants, but the new plantings are struggling due to the severe drought we are going through (with not much end in sight). It's clear that the native plants that are doing well are helping, because the pollinator activity is insane around them, but it's not enough. One household out of a thousand isn't going to help. This is the systematic nature of things that show this can't be solved by flipping a switch. We need drastic measures, and I just do not see us enacting solutions until things become very serious.

I think many underestimate just how short-term humans are. It's never too late until it is.
It really is god-awful. RCS is a technology that benefits mobile operators, not users.

Also, Google really aren't in a position to lecture anyone on this topic, given their N+1 approach to messaging services.
"In the HTTP handlers it makes sense that you don't have return values, because: What would you do with that value exactly?"

I agree that the baseline net/http implementation is correct. There is no appropriate default error (return) handler that the framework could implement, at the level it lives at, that would be correct and wouldn't be limiting.

However I very often in my own Go code immediately create an abstraction that does exactly this, because it is a good default for everything I'm doing. It just isn't suitable for everything (e.g., what do you do with this in the case of a protocol upgrade to websockets? the HTTP handlers need to be able to just terminate gracefully without being forced to "return" something).

What I would say is, net/http is a little too low level to directly use. You don't need a full framework necessarily, though if you want to use one that does this more power to you. But if you understand HTTP, it doesn't take much wrapping to make net/http useful for "normal" APIs or websites. It takes a little, though.
I thought your title and tagline were kind of clickbait-y, but you really inspired me to try what you suggested. I haven't yet overcome the feeling that anything I write to my wife needs to be an elaborate carefully constructed love note to be worthwhile. What you outlined sounds like just writing down some of the contents of regular conversations is what I usually talk about with her in the evenings (since we have no kids yet).

... it also made me think about one of the interesting balances I have to strike in our evening conversations, where I need to remember to stop rambling about technical details of work I'm excited to tell her about but are selfish to monopolize the conversation with (even though I know she does want to hear sometimes). The idea of transferring aspect of conversation to writing is very interesting, and seems like a good opportunity for self examination on my part to be a better spouse.

Anyway, thank you for writing!
Gen Nakasone: "Cybersecurity is a critical priority for the nation."

You: You're disgusting and atrocious!

Seems like you're the one who has a problem.
This isn't so much a critique of the HTTP handlers themselves but relying on (and stuffing a ton of shit into) context as a way of dealing with complex request/response patterns was a major headache.

Trying to implement a circuit breaker against multiple upstreams for a single request in Go was a nightmare.
Show HN: Recode – Free, open-source, community-driven Codespaces alternative
Hey HN,

As most of you (I think?), I cannot learn something without having a project, on the side, to implement what I’ve just learned.

Recode is the project that I've used to learn Go. It lets you create a development environment in your cloud provider account easily.

You can think of it as a desktop version of Gitpod / Coder / GitHub Codespaces less polished and with less features but 100% free, 100% open-source and 100% community-driven.

At the time of writing, it only works with Visual Studio Code and AWS.

In order to let you configure your development environments easily, I’ve chosen to use Docker with some Dockerfiles:

- One for your user configuration.

- One for your project.

The user configuration corresponds to the tools / settings that you use in all your projects like your timezone / locale, your preferred shell or your dotfiles.

The project configuration corresponds to the tools / settings that you use in a specific project like Go >= 1.18 and Node.js >= 14.

As you may have guessed, the project configuration inherits from the user one.

> Why Docker and not something like NixOS, for example?

I know that containers are not meant to be used as a VM like that, but, at the time of writing, Docker is still the most widely used tool among developers to configure their environment (even if it may certainly change in the future :-)).

> Given that my dev env will run in a container does it mean that it will be limited?

Mostly not.

Given the scope of this project (a private instance running in your own cloud provider account), Docker is mostly used for configuration purpose and not to "isolate" the VM from your environment.

As a result, your development environment container runs in privileged mode in the same network than the host.

----

I post this here, because, you know, even learning project could be useful to someone.

Still learning Go by the way, so I'm open to any suggestions to improve.
Does she write notes to him? It would feel a little weird to me if this was one-sided.
How much oil does the US consume, and how much American money goes to OPEC governments?

How much oil could be saved if the US decided to abandon this failed experiment called "American Suburbia" and started to plan for a urban environment that is not car-dependent?
Oh the exquisite joy of having to talk a friend or loved one out of buying the thing that you got them for Christmas without giving it away.
I argue random mutations applied to software does not create any new fonctions, it breaks eveverything.
Also that any usable software was designed by a mind.
Where comes this mind from is another question.
Which random mutated software are you using ?
I believe this hyperlink might have a sanctioned address in it, and therefore puts HN and readers at risk of violating US sanctions, or creating reporting requirements, if distributed...

Sanctions list excerpt: https://home.treasury.gov/policy-issues/financial-sanctions/...
I would say "your brakes might fail because of a design error" is a pretty severe safety issue.
> Does Tornado being sanctioned mean that everyone who has contributed in the past also needs to be blocked?

I'd say that this is a significant risk that people doing DeFi need to have a long, hard think about. Without a clear organization, without clear leadership, one cannot draw a bright line around those who deserve sanctioning. In court, efforts made towards plausible deniability might pay off. But github is not the courts, its interest is its own liability.
So I'm actually interested in these figures.

Bitcoin alone is estimated to use 150 terawatt-hours of electricity annually.

The US Department of Energy estimates that there are 80 million households with dishwashers in the US (although they believe 16m never use them, but we will ignore that). It appears that the average dishwasher uses 251kWh annually (at the avg of 215 cycles per year).

So this would put the US annual dishwasher power consumption to around 20 terawatt-hours. This would mean that the rest of the world would need approximately 518 million household dishwashers used 215 times a year each, to make up the rest of the power usage for just Bitcoin.

When you start factoring in the size difference in dishwashers between countries, the power usage differences between 120v and 220v in different parts of the world, the overall adoption rate of dishwashers etc... it makes it hard to believe that they could compete with crypto power usage.
intel's comet lake or whatever is pretty comparable to M1 imo
You definitely don't remember how bad Flash was on mobile. It was a security nightmare, and a battery-drainer.

Flash devs would have coded circles around objective C devs

Wow. Bold statement.

I don't doubt that there were many talented Flash developers. All the ones I encountered were... not that.

Not that they were bad people, but they were mostly designers new to software dev, slapping together code as fast as possible to make it work.

Also, an interpreted runtime was never going to run circles around native code.

This could have screwed over the entire ios ecosystem

There was no ecosystem at that point.
Judges don't run code, so a dusting attack isn't going to magically obfuscate anything. The blockchain record is public and it's clear "to a reasonable person" that this is just a smokescreen.

That's really what's missing from web3: the concept of what a reasonable person [1] would believe - not a code-based contract.

[1] https://www.courthouselibrary.ca/how-we-can-help/our-legal-k...
https://en.wikipedia.org/wiki/Natural_arch

Nature has no problem building an arch through a long series of small changes, no keystone required.
Link has been updated: https://blog.upbound.io/succeeding-as-a-fully-remote-product...
Banks are in the smartphone game for a few more reasons other than tracking:

1. They tend to trust a locked-down, reasonably secured environment more than a hackable, general-purpose operating system, especially for 2FA.

2. They’re under pressure from fintech, so they have to focus more on things customers want.
Apple, pointing to all the happy children in the iMessage pool: "nah, we good, thanks"
The fact that none of the popular crypto projects have this mechanism just goes to show that nobody was thinking all that deep about the human level of it.
func (api \*App) HandleOnError(w http.ResponseWriter,
err error, status int, context string) bool {
if err != nil {
api.logging.Error(err, context)
http.Error(w, err.Error(), http.StatusInternalServerError)
return true
}
return false
}

and then it's used in the handler funcs

if api.HandleOnError(w, err, http.StatusInternalServerError, "Getting stuff for things") {
return
}

Makes the logging verbose and handling always properly taken care of, makes the error handling in handlers verbose enough from the caller but abstract enough to not be a majority of the handlers body.
> Juries are finders of fact

There are "facts" and facts. The undisputed facts are those where both parties "stipulate" - neither party intends to adduce evidence that the claim is false. Juries aren't at liberty to make up their own minds about facts that haven't been disputed.

It's the disputed "facts" that juries weigh - that is, the evidence and testimony.

> Lawyers instruct juries on the law

That's rather slippery; I think that technically, the lawyers are "servants of the court", so they really instruct the court on the law. And "the court" means the judge. The judge then instructs the jury on the law.

But in fact, these lawyers are advocates; their business is to expose those parts of the law and the evidence that are advantageous to their client, and damaging to their adversary. It's not reasonable to assume that the judge is unbiased (any more than the advocates).
The search would be much better, too.
Indeed! The difference this time is the weight of mathematical rigor.
Hmm Javascript has async though, no?
I would be totally OK with doing this if those people who want a more social office atmosphere would be willing to pool together and pay for the gasoline I would have to use to commute 2-3 hours each way to the office. If it cost them real money, would they be willing to pay for those "magical hallway conversations" and "office buzz"?
For anyone else who can't get the LLCoolJ popup player to work while reading the article: https://www.youtube.com/watch?v=vimZj8HW0Kg
Java's adequate. It's like a Toyota Corolla (insert your boring car of choice here if you don't feel this one works for the analogy). Not the prettiest, not the fastest, not the most efficient. But it gets you from point A to point B with little fuss or muss. I totally get why companies adopt and standardize on it.

Do I use it for personal projects? Nope. Because it's not fun to "drive". For that, I pick the equivalent of a Mazda Miata (insert exciting car of choice), which for me is usually a Lisp.
Morally speaking? Yeah, you should probably not use those banks if you care about the ramifications of money laundering.

Practically speaking? HSBC laundered $881 million in 2012 – but they had trillions of dollars of assets under custody. They may have to pay a big fine, but your ability to get at your money will not be impacted.

And even if you deposited your money into your account at "Money Laundering Bank N.A." where everyone but you was a specially designated national, you still have legal recourse to those funds backed by decades of case law. That same case law might help you if you keep money from a mixer in stablecoin that becomes frozen, but it's going to get way hairier.
The AMD offerings are still very far from the M1. Try comparing the 6800U to the now 2-year old M1 in Geekbench. The M2 widens the gap even more.

The Ryzen chips are already clocking over 3 GHz, so there isn't much more scaling from power left. That's why 5nm Zen4 probably won't move the needle too much.
I’d say it probably applies more since they have more money and probably less specific Ferrari knowledge. Better to trust the experts!
*Leclerc (pet peeve of mine).
> Good! If you bought your home as shelter nothing has changed for you.

Property taxes
It is all about tangibility. That is why we install car reverse parking sensors. If people had glasses that see air pollution, they would revolt. If people had access to a very accurate live and high-res computer simulation of climate-change, or anything, they would take it more seriously. People are spoiled with regard to the level of accuracy and tangibility they require to be convinced.
Precisely where you said it "tumbles". If not in air, then where were you refering to this tumbling occurring?
How data entry is done at the IRS
> such as LSD-trips for your lunch break, I truly wonder how people can be so f-ed up that they consider that a good idea.

What does this mean? Are you against psychedelics, but only if its time for lunch?
Not if they are instructed or for other reasons believe that their job is to make a strictly legal finding. I.e. to decide only the question "did $DEFENDANT violate $LAW". As opposed to the broader questions: whether $LAW is good; whether it is being applied fairly, and so on. It's not uncommon for people to disagree with an outcome but decide it's acceptable because of the way it was reached: "This sucks but it's the rules/my duty". Jury nullification makes considering the rightness of the outcome part of the rules.
So that's how a packer thinks! I'm a mapper[1], and it's always been a mystery to me as to how packers got that way.

When I was an IT Admin, I worked with woman who VERY competent at her job, but always needed help using the computer, for even basic tasks, even with a list instructions. It took time before it dawned on me she was a packer, and my instructions weren't specific enough.

I started making exact instructions for her, accounting for any possible variance in each step. (As you would in a program) Once I did that, she was thrilled, and we got along very well after that.

An example of things that can throw off a packer... in Windows Explorer, drag a file from one window to another... depending on context, there are 3 possible outcomes (move, copy, shortcut creation)... that confuses the heck out of people, especially packers.

https://wiki.c2.com/?MappersVsPackers
Ok, but the west isn't doing enough and could very easily have done more, and in doing so would have made it easier for everyone else to do more.
In cuneiform they probably had.
The National Academy of Sciences is a rather odd club (notably Feynman refused membership and there's a general suspicion they spend most of their time deciding who else to elect to the membership). That's not 'anti-science', although it might be 'anti-august-institution'. In particular don't members get to skip the normal peer review process with their publications?

See:

Dear Prof. Handler:

My request for resignation from the National Academy of Sciences is based entirely on personal psychological quirks. It represents in no way any implied or explicit criticism of the Academy, other than those characteristics that flow from the fact that most of the membership consider their installation as a significant honor.

Sincerely yours,
Richard P. Feynman
Being taught intro Java in high school (mid 2000s for me) was excruciatingly boring and caused me to write off majoring in computer science or working as a programmer.

Today I'm a software engineer with experience in JavaScript, Ruby, Python, Elixir... maybe it's time for me to give Java another try.
This is pretty disingenuous I think. Other than Android who is using RCS?

Why can't I message between WhatsApp and an RCS client. Or any other chat technology, how about Google Chat to RCS, or Slack to RCS, or anything else.

Their examples for 'the modern standard adopted by most of the mobile world': Motorola, OnePlus, Google Pixel, Samsung, Snapdragon are all providers of Android phones, so clearly they would use the default Android messaging service.

I have a few folk (mostly family) who uses Apple messaging, everyone else seems to be on WhatsApp.
> Both are terrible for consumers/developers.

Unfortunately they don't get to vote on it.
You haven't heard people say we should burn less fossil fuel, and use more solar, wind and nuclear energy? That people should have better insulated homes? That we should fly less and eat less meat? That we should plant more trees? That large corporations exploiting externalities should be better regulated?

If that's the case, you might want to read "sustainable energy without the hot air" [1] which is available free online. It's slightly dated with regards to the cost of solar panels, but a good introduction to the area IMHO.

[1] https://www.withouthotair.com/
> Who uses sms anymore these days?

Most people? But yeah, it's a local thing. Denmark have had free SMS for something like 20 years, at least as an optional add-on to your subscription. So there where never a reason to move to something else. If you frequently used SMS you just paid the small free for a large number of SMS message, or even unlimited. Current subscriptions pretty much all have free SMS.

When smartphones arrived, most just use the built in messing app. On the iPhone that means that you use iMessage, but it's not something you think about. If you took the average Danish iMessage user and asked them, they'd just say it's SMS.

I don't know that I would want Apple to just dominate the messaging market, but iMessage on Android would kill of many of the existing platforms pretty quickly.
GTK or QT with python. Electron is probably fine if you want to use web technologies/JS ecosystem instead
It’s different if you’re a foreign national.

In ‘05 I was traveling in the EU, across the open borders, and got checked by customs agents because of a bombing in, I believe, London. Thought it was weird but, whatever… Later on I pieced together what happened because even if they were only doing spot checks it’s not like I don’t perfectly blend in with Europeans.

A bit of an aside, custom agents absolutely loved my customs stamp from Iraq back then. Well, aside from the Dutch.
Maybe Google should enable push notification support again for Mail.app Gmail users too.