skysight-inc/HackerNews huggingface dataset:
In a similar vein is Commonplace by Cedric Chin. Think a Stratechery that analyzes individuals, not corporations. Has great summaries and read/don't read recommendations on book. One of the few blogs I didn't end up unsubscribing from in annoyance.

https://commoncog.com/blog/
Interesting, I wonder if you can somehow pay after you're locked out.
The whole "ends justify the means" thing stirred up a lot of controversy, both then and now, but Machiavelli meant it in a very limited and specific context. Namely, that the ethics we apply to individuals do not necessarily apply in the same way to the "princes" who rule principalities. Machiavelli argued that well-being of a principality's people was of greater importance than the honour of its prince.

For example, say you are a prince and your little city state signs a mutual defence pact with a neighbouring city that has been friendly for ages. That neighbour grows and prospers, and starts throwing its weight around. Another one of your neighbours, a small and weak one that has been your city's habitual enemy for ages, attacks your ally and friend. Your ally calls for your aid. What should you, as prince, do?

The honourable prince aids his powerful friend in the coming war. His smaller neighbour is vanquished, his powerful friend becomes even more powerful and, as so often happens, turns it's eye upon his lands and invades. Against this powerful foe the honourable prince doesn't stand a chance.

The devious prince swaps allegiances, allies himself with his smaller neighbour, takes down the big neighbour, and swallows up as much territory as he can in the process. Then he can deal with the smaller neighbour however he wishes, for the smaller neighbour is in no position to resist. This prince knows that you can't trust your friends, so take down anyone big enough to cause you harm when the opportunity presents itself. Do unto others first.

The subjects of the honourable prince are invaded and miserable. The subjects of the devious prince profit. Who has best served the public good?

This all sounds very hypothetical to us today but, for Machiavelli, this wisdom was the fruit of lived experience. Renaissance Italy really was that chaotic.
Alerts can also fail to be timely due to mail/SMS/other delivery issues, or the right people being in the middle of something else. This delay means it is still possible to rack up and unexpected cost.

Or they can fail completely.

And the alerts themselves cost if you want something reliable so you have to weight that against the danger. Pay as you go cloud can be a maze of costing concerns..

> The only thing that would really help were a hard spending limit that stops all services except storage.

Yep. Though that is small comfort if you need to guarantee more than a couple if 9s of uptime, hopefully those with that requirement can soak up the unexpected billing blips.
>What we're talking about here is egress bandwidth for data being sent out of Microsoft's Azure infrastructure (priced at AU$0.014 per GB).

AUD $0.014 is roughly USD $0.01. Which I thought was reasonable. But on [1] only "Data transfer between Availability Zones(Egress and Ingress)" cost $0.01. Do transferring from Azure to CF count as that? Other Internet egress (routed via Routing preference transit ISP network) starts at $0.08

I hope someone from Azure CS could give him a custom discount.

It is also worth thinking, the cost HIBP saved on Cloud / Serverless over the years could have wiped out ( if not more ) by this single incident.

[1] https://azure.microsoft.com/en-au/pricing/details/bandwidth/...
As soon as I saw "17GB file" i thought "that's what torrents are for". Otherwise one mistake and... Well this happens.

Or someone maliciously bypasses CF cache e.g. by parameters.

Cloud just is not suitable for any kind of volume egress. It's a death trap. Like going on vacation with data roaming enabled.
> The above code is bad because it makes unnecessary copies. plus doesn’t need its own copies of s and t; it can get by with just references to its caller’s strings.

I was under the impression the compiler was smart enough to 'move' rather than 'copy' a value if it can prove it's not reused. And also to infer a 'const' reference if it can prove the reference is not modified.
DeFi - Decentralized financial instruments that are implemented via Smart Contracts on a Blockchain.
I didn't forget memory management, point 2 in my list is about the tradeoffs involved in GC. What you and 37ef_ced3 are giving me here is a list of reasons why it's OK for Go to be slow or at least slower than C++, which is fine. Go inhabits a particular point in the design space and it balances performance against other factors - great. My beef was with the statement that Go is known to be "unusually both fast and easy". It's not known for that. It's known to be a sort of middle-ground jack of all trades. If someone told me they were using Go because it was fast, I would think they didn't know much about programming languages, or I'd have to read a lot of context into what they were saying (maybe they only had experience with Python before, as is the case for many Go programmers).
I have kids, and my experience perfectly matches the empirics on this one: There is no such thing as a sugar high. You may just have a wrong perfection of the "normal" state of you kid. The "hyperactive" version of your kid is just the normal way your kid behaves. What you observe if the blood sugar level of your kid wanes is fatigue, nor calmness.

Edit: I can also see this with aquaintances who also believe in sugar highs: They only report this for the sugars perceived as worse than the "healthy" sugar sources, e.g. they project a sugar high if the kid gets a piece of cake, but not if it drinks 300ml of undiluted apple juice.
I put together performance metrics that showed my team members were less than 5% deviation from each other, thus I couldn't grade on the curve. HR couldn't argue against that.
Insulation is great if your goal is to keep the heat from escaping. With this solution, the goal is usually the exact opposite.

For example, you don't wrap your laptop in a blanket to keep it nice and cozy. Likewise you don't wrap insulation around the motor block in an ICE vehicle. And if you pump coolant around through pipes, the whole point is to radiate out the heat so that it cools down. That heat is actually a problem that you are trying to get rid off.

The example of a heating pipe in the article is a bit unfortunate of course. Isolating those would be a good idea. Unless they are interior pipes in which case the heating system heating the house would not be that big of a deal.
I still use MilkDrop to this day!
A dope idea.
I am in the same situation. Singed up in South east asia and haven't received the notification. It is confusing.
Occam's Razor: no need for the K or H. Just double the C.
> Secondly, there's cost alerts. I really should have had this in place much earlier as it helps guard against any resource in Azure suddenly driving up the cost.

He did not enable alerts.
This is something to be mindful of when using datadog synthetics monitors as well - if you have a short interval, or many locations being tested from they can become expensive quickly
But they've used this combination for a long time as far as I know. So why the difference?

There was a period in which CCC experimented with sucralose instead of aspartame+acesulfame P, as I recall the "diet coke" got sucralose and the "coke zero" got aspartame+acesulfame P. But they went back to only one thing, and ditched the sucralose variant.
I still can’t understand what exactly people saw (still see) in Neon Genesis Evangelion.
TUIs over ssh/telnet can be a lot of fun. Especially in cases where multiple people can interact with each other on the server. It simplifies the programming model as you only have one state on the backend that you render to multiple connections. Syncing up everyone becomes trivial. You can also use some React concepts, like rendering a virtual TUI and sending just the right set of minimal escape sequences back to the user to bring their display up to date.

A few months ago I implemented a telnet chat server[0] for fun and it was surprisingly easy to do so. Even by using a wasm vm that I was still working on at the same time.

[0]: https://github.com/lunatic-solutions/chat
That sounds like a job for a browser extension... A quick search comes up with Anki Quick Adder [0] for Chrome, but nothing equivalent for Firefox.

[0] https://chrome.google.com/webstore/detail/anki-quick-adder/g...
I'd be annoyed if I had to open a machine. Then again, I don't think I've ever updated a BIOS in the first place.

Enabling it in a machine-controlled menu that can't be navigated except by the physical keys might be better
It’s funny to think that my pet, without having the ability to vocalize a human language or think abstractly, still manages to communicate more effectively than this pile of words arranged into a simulation of ‘deep thought.’
The compiler isn't allowed to move instead of copy if the code implies a copy. What it can do however is completely elide the copy, and not call the copy constructor.

Const isn't really useful to the optimiser in any way, roughly all it does really is effect the overload resolution rules, and how the compiler maps statically initialized data in to your final binary.
Any effeciency numbers? Mindful how ineffeceint peltiers are and this reads like it is nothing new beyond adding liquid metal heat-pipes and an array of lots of them so you can wrap around a non-flat surface more easily.

Also - not aware of many hot pipes of waste heat. beyond some power stations and then they already use that heat for things like heating green houses and other initiatives.

Heck even my fridge and freezer's waste heat (probably best source in a home) is only waste in the summer, otherwise is passively warms my home. Then you have heat exchanges.

So really would love to see the numbers and the waste heat they are on about and compared to existing less technical solutions - like using it to heat a greenhouse.
Oyster mushrooms too, apparently.
"Nobody ever got fired for buying an IBM."
I meant to emphasize frequency, not eval period. Apologies. That said I took a look at the pricing docs and didnt see frequency mentioned, so hopefully I am in the wrong about the price.

As an aside, their (Azure's) pricing docs are written in the same fishy way their technical docs are written (my opinion only)...
Disclaimer: I work at AWS, but not in any of the groups that build and maintain any of the infrastructure components. My team is on the B2B applications side of the house.

We can be just as affected by an AWS infrastructure outage as anyone. However, we also have the possibility of seeing some of the things that are going on internally to fix the problems. So, we can at least feel better about not being able to do our work for the day.

I can tell you this — being multi-region is a lot harder to get right than anyone gives it credit for. Even just plain multi-AZ is harder than most people give it credit for. There’s a lot of stuff going on under the hood. And there’s all sorts of unintentional dependencies between systems that you didn’t realize until things broke just the right way.

Trying to do multi-cloud? I wouldn’t wish that on my worst enemy.

The way cloud-scale works, there’s always something weird going on somewhere. Always.

A well-architected system will try to be rugged and resilient to those failures, but there’s always going to be a limit to the kinds of failure modes you can predict and prepare for.

We saw that when I was the Sr. Internet Mail Administrator at AOL from 95-97, we see this today in our group at AWS, and my friends at Google have reported the same.
Building Setf
Recently heard tell of places that sell failed products in bulk on discount; but they are determined as failed before they reach this stage. Wouldn't seem surprising if grocers and distributors sell failing products on discount in areas less sensitive to social pressures. Seems this would be the inevitable outcome.

If they knew what they were doing, these researchers would have controlled for distribution, price, and so on.
> Sustainable investors

Why is this a thing? Sounds like something that limits the investor in his investment choices.
I had this happen to me once on Digital Ocean, and I contacted them - they were rather understanding that the bill I had was clearly "atypical for my account and not intended" and refunded it.
Shameless plug: https://CloudAlarm.in (in beta), sends you real alerts usually faster than azure with multiple reminders. It does this daily unless you tell it to shut up for the month for the given exceed.
I call it real alerts because it doesn't wait for consumption threshold to reach the way Azure cost alerts do; as soon as it detects that your current cost * remaining days > the budget amount, it'll send you an alert [1].

The alert emails are way more meaningful (with projected amount in subject for example) unlike generic ones from Azure Alerts, so
you see a real alert and prompted to take immediate action.

1: https://cloudalarm.in/Home/Docs/#how-is-budget-alarm-differe...
But if take it away, cooling the pipe, more will make it out of the water and into the pipe (and so not back to the boiler).

That's no different to turning up your radiator.
What does that mean? Sorry, but can you elaborate?
One thing I hate about the cloud providers is that there isn't an option to set a maximum cost. I would prefer to plug the cable of my side project than just receive an email saying me that next bill is going to be over my cost. I understand not everyone would like to do that, but I would like to have that option.
It still should radiate into the house, helping to bring the temperature up to the thermostat point. If you're capturing any of that heat and converting it for any reason, your boiler's simply going to have to work harder to do its job.

It's the first law of thermodynamics, isn't it? I'm not a physicist.
My tips would be (a bit different than those maybe):

- Fall of Civilizations podcast (Has few but some absolutely gorgeous, long episodes).

- People I mostly admire

- Freakonomics (earlier episodes better than current IMO)

- The Joy of X

- Numberphile and The 3b1b podcast

- In Our Time (BBC)
El Salvador's President Says the Country Is Buying the Bitcoin Dip
If you look at the failed attempts in the article, you'll see it's not so easy to get 100% correct with 6 guesses. For example:

SLATE, CRONY, HOUND, BOUND, POUND, MOUND (correct: WOUND)

SLATE, SHARE, SHAME, SHAPE, SHAKE, SHADE (correct: SHAVE)

...so sometimes even if it gets 4 of 5 letters right on the second try, it still has too many options left. Of course in cases like this it could go "one step back" and try a word with (most of) the letters that are different between these words (HBPMW or MPKDV). So try different words until the number of options is narrowed down sufficiently.
Like the $10k/day bills? Odd definition of 'worry free'
You are probably using terminal software that has memory corruption bugs trivially exploitable by the remote end.

Also these https://marc.info/?l=bugtraq&m=104612710031920&w=2
> I know nothing about geopolitics in Africa, but I'd also wish that a few large companies (e.g. Tesla) would source their minerals from countries that can demonstrate political stability and avoid violence

For some minerals, e.g. cobalt, there's simply no such option. Unless they decide to go with it United Fruit Company/banana republic style, but benevolently. What's worse, a corporation or a military dictatorship?
My understanding is you hit your bandwidth cap and that's it, no more bandwidth.

(edit) looks like that's not the case, I'm sure I used to have to buy a second instance a few years ago if I did want to use more bandwidth that was allocated
Ask HN: In Git, how do you “insert” a blob at an arbitrary position in a tree?
Note: let's just say that the normal way of doing things, I.e. through git porcelain, are not an option.
FWIW, yes, I've read the git internals documentation, and they were helpful but very brief. They explained blobs, trees, and working directories, but I think for me to figure out on my own how to do what I want to do I would have to read some of the code for how git porcelain is implemented, which is fine.

My question:

Let's say I have a file that represents an array, where each element of the array is separated by a new line character. How would I append a new line to the end of that file, without actually editing the file directly? Just by creating a new blob, and associating that blob with a tree?

Then, imagine if the file began and ended with square brackets, so now to append to this "array" I need to insert at one line minus the end of the file (you can assume the brackets have a new line after/before, respectively)

The bonus round is taking the same logic from above, but applying it to just arbitrary lines within a file. This isn't so necessary for what I'm working on, but git obviously has a way of doing this, so I'd like to understand the general solution.

For context why I even want to do this:

I'd like to update a file that's in a GH repo, without actually pulling the file to do it. GH has a low level API that's basically an HTTP interface exposing many low-level GitHub operations. So, I'd like to just say "add this line, to this file", without having to clone the repo or do a bunch of back and fourth over the network.
I miss a search function, but thanks for your client.
I may write one a la av98, but with jimtcl instead of Python3.
It makes really easy to write networked stuff, either with
TLS or not. I wrote a finger client in minutes.
A reference is just a pointer in disguise, and so can still be null if created from a pointer.

The rationale behind passing by ptr is at the call site you have to use the & operator, which makes it immediately obvious to the reader that it's possible the argument is being mutated (because it's not passed by value).

In general it's even better to avoid out parameters entirely, although there are cases where you want to reuse a containers memory where it's a useful technique.
How is surprise billing not a worry?
It's a load of clickbait nonsense by someone with one foot in the crackpot bin.
Zero-knowledge proofs. Several major cryptographic achievements have been unlocked only in recent years, facilitating both privacy and efficiency for certain setups that were only theorized before. There’s still a lot to be done for developer tooling and libraries. The foundation is solid but the ecosystem is nascent.

So far real-world applications have been mostly in the blockchain/cryptocurrency space (privacy/anonymity for Zcash and Tornado/AZTEC, Ethereum L2s, Bulletproofs in Monero, etc) but there’s so much untapped potential for other domains still.
2 more instructions in GodBolt for the second version, in the end the urge to look cool and "elite" more often than not causes trouble. Unless there really is a need for complexity, it's almost always better to follow KISS principle
This uses WebAssembly so it can preserve PNG transparency for example, which the canvas method loses.
A developer on a team I worked with many years ago accidentally committed our AWS keys in a repo. Got a $30k bill due to a an enormous amount of EC2-instances being spawned. We contacted AWS and they were very understanding and reduced the bill to $50.
Ask HN: Staying fit whilst working from home?
I’ve been working from home for the past 18 months now and at present there’s no indication from my employer that I’ll be going back to full time work any time soon.

Before the pandemic I used to cycle to work and also practiced yoga at a studio close to my office which kept me feeling fit and active through the week. Since working from home though my weekly physical activity has gradually decreased - partly due to no longer needing to cycle to work and I’m no longer feeling so motivated by the yoga classes I’ve been following on YouTube compared to the routine I had with the physical studio. Cycling for me was also primarily transport so filling that gap with plain exercise has been a struggle.

Is anyone in a similar position that has made a new routine work for them?
Poll HN: What operating system do you primarily develop on?
outbound transfer cost is one of the most expensive things in cloud computing, it's much better when you can pay for allocated bandwith.
Zlib – a spiffy yet delicately unobtrusive compression library
Each of those conjugations has a different subject. By standardising them all into the same word, it's possible that you make it more efficient for the producer (speaker or writer), but the receiver (listener or reader) has to put more effort into understanding.

This is why languages evolve. If something is pointless, it tends to disappear from the language over time. And it's why artificially produced languages just don't seem to work - they are perhaps more efficient at communicating across boundaries, but less efficient in the primary use case of communicating within a boundary.
Plants Fight for Their Lives – Science Connected
I got an $800 aws expense (one line item) waived after I contacted them and they asked me to explain why it happened and how I’ll prevent it from happening in the future. I think it’s a once per account thing they’d probably do and Troy should definitely do it.
The article is paywalled so I can't tell if it's reliable or not. My prior expectation is that it's not reliable, because:

a. The NYT has been a prime pusher of conspiracy theories about Russian foreign influence on US elections, none of which turned out to be reliable. Claims of Chinese foreign influence are very similar.

b. The media have published a great number of stories on supposed Russian/foreign conspiracies to use "social bots" and on investigation they are invariably relying on third party research of the sort that this paper shows aren't reliable.

c. The New York Times has become extremely biased in the last decade, especially post 2016 and especially on anything related to why people vote the way they do.

I would say though, that 10 accounts per day doesn't seem like enough to have much impact on anything at the scale of social networks. The claim the paper is making is twofold:

1. The research asserting the existence of large scale social bots is all flawed and doesn't really show that.

2. Even if there are people trying to do such things, there's no evidence to suggest it would or could work.

Given the saturation level media coverage of this topic and the widespread ideological belief in certain political quarters that you can rewrite people's politics with hashtags, I'm sure there must be some people, somewhere, trying it out. But if there are, the academic papers claiming to have spotted them aren't really doing so.
Because the market (= retail investors and "green" companies) demands it.
Do you also make sure you never go on vacation, never go anywhere that doesn't have a phone signal, never turn off your phone, that your alerts have multiple levels of redundancy, and that you always have access to a computer to modify settings?
> Pass out-parameters by pointer: Widget*.

OP says this like this is an industry rule of sorts but I've pretty much always seen non-const references for this. Using pointers is terrible because now you have to add a check for null inside your function, as its API contract says "I can accept null values", while references make it clear that it does not make sense to call if you don't have a correct object to pass it.

> That’s right: the point of making a class with private members is to preserve invariants among those members.

How would OP make a class, which loads content on construction which must absolutely not being changed after construction then, even within its implementation ? "Being careful" is really not sufficient in my experience, and introducing child classes just to enforce the invariant that "const" provides is actively harmful to readability.
China's Big State-Owned Firms Begin New CSP for 2024