skysight-inc/HackerNews huggingface dataset:
>Conceptually, procedural languages like C are doing that too for files, they’re just writing object.Verb as object_verb(Handle instance).

The main problem with OOP is the promotion of mute-able state, this is what ties everything together and makes everything less modular. Though semantically equivalent object_verb(object) is actually better than object.verb when you consider mutations and side effects.

Seriously I want you to consider this: Two classes A and B.

class A:
def __init__(self, x):
self.x = x
heavy_computation()

def addOne(self):
self.x += 1

class B:
def __init__(self, x):
self.x = x

def addTwo(self):
self.x += 2

Let's say I want to write an addOne method for B. How do I reuse the code for addOne in A inside of B?

1. Inheritance. Make a base class have A and B inherit from it.
2. Duplicate code by writing a duplicate method.
3. Dependency injection, modify B so that it takes A and Does some crazy stuff:

class B:
def __init__(self, x, a):
self.a = a(x)
self.x = x

def addOne(self):
self.a.addOne()
self.x = self.a.x

def addTwo(self):
self.x += 2
self.a.x = self.x

All three options are bad for various reasons. There is no option where I can just add a method to B without modifying any other part of the program or duplicating code.

AddOne is not reuse-able because it's tied to mutable state and the constructor and all the methods that share that state. This happens regardless of whether or not it's A.addOne() or addOne(A).

The only universe where addOne can be reused is if it started off as a stateless function (addOneFunc)

def addOneFunc(x):
return x + 1

class B:
...
def addOne(self):
self.x = addOneFunc(self.x)

By making addOne a functional concept I am able to impliment B.addOne without modifying anything else and reusing code to maximum effect. You cannot do this easily with OOP and this is why OOP is bad.

If I want to deal with mutable state, it's actually not technically FP anymore. Inevitably I will have to and that's why many FP paradigms segregate IO with FRP patterns or the IO monad. Even still straight up procedural programming with mutability is still better than OOP because addOneFunc:

def addOneFunc(int& x):
x += 1

is more reusable than addOne:

class Jungle:
def __init__(self, x, gorilla, banana):
self.x = x
heavy_computation()
self.jungle = create_jungle(create_gorilla(banana))

def addOne(self):
self.x += 1

“… Because the problem with object-oriented languages is they’ve got all this implicit environment that they carry around with them. You wanted a banana but what you got was a gorilla holding the banana and the entire jungle. “ —Joe Armstrong

Many people will say don't design your programs this way. Well nobody has the foresight to know exactly how their primitives will compose for the design they have now and in the future. With OOP you will inevitably design your program into a wall because when it comes time to reconfigure the bricks in the wall you realize that OOP has super glued everything together. What happens IRL is that people eventually hit more complex versions of the example problem I gave you above.
Is the digital sensor more accurate than a human?
Caching is, in general, a good thing. But it's worth thinking about how you do it. I recently sped up a large system by dropping the use of redis entirely - because it was being badly used.

During a single request there might be 50+ cache-lookups, each taking a round-trip to a remote redis server to fetch a single key at a time. Batching those up to a set/hash would have been more efficient, but the codebase had evolved in such a way as to make that difficult.

Instead of making 50+ redis fetches it turned out that just fetching all the stuff from the database was faster.

(There will be refactoring to batch up the key fetches, but for the moment there was a measurable increase in performance under current loads just by removing redis.)
If the body can absorb vitamin D from supplements then it can absorb it from food as well so your statement is wrong. You can eat 2-3 eggs and you're done.
It's not surprising to me, but it is something very interesting to learn about. And it makes so much sense once you think about it. Why go through the trouble of finding a legitimate technical solution when something super simple like this works and is easier + cheaper to implement. It actually seems like a perfect fit for "hacker spirit."
So I was right about your malicious intent. You cherry picked 3 lines and twisted their meaning to suit your narrative.

Anything that didn't suit your malicious intent gets ignored totally while your try to divert attention.

> Protection for them has been around when the previous government was there too. FDI norms were eased only in the fag end of 2012.

And yet you totally neglect that when flipkart begged for speific ecommerce protection none was provided

Only when Ambani reacted to launch JioMart was the protection avoided

Also I love how to totally ignored the fact that Jio abused and how the entire govt machinery has favoured Jio

Also how Jio abused and flouted ALL regulatory things and gave free data calls for over one year when the law explicitly forbids it.

I also love how you ignore that the govt pressurized telcos to pay AGR dues while Jio was let out of the payment cycle

> Tesla went to China for cheap labor. Do you think ill-treatment of workers in Chinese factories will be reported by "Independent media" in China?

Well, Modi govt put red tape so much that Tesla chose to go to a country which blatantly copies IP and patents.

Things are that bad.
If your 55k MAU want uninterrupted service, they need to be paying for it (in dollars or monetisable attention and/or privacy).

On a site currently generating zero revenue, I hope the OP is happily enough paying most of that $145/month as a learning experience or for resume bullet points (which are perfectly valid was to spend your money). They've admitted elsewhere in the comments that the two $40/month droplets are way oversized (from an attempt to solve a problem that turned out not to be droplet size/resource related) - so without redundancy and without AWS hosted metabase, this would be about $100/month less expensive to run.

I still think that's over provisioned or under engineered. Like others have commented, I'd be surprised if the features you can see on the site require any more than the $15/month the FAQ claims it costs to run, plus perhaps the $10/month Discus expenses. That seems about where a hobby/side-gig project should sit for a lot of devs before you start thinking about how to make it pay for itself... YMMV, especially if you're not comfortable earning at least junior dev salary already in some reasonably well paying part of the world.
I'd say that's a good thing. I would further posit that some number above 90% of all apps on the respective app-stores are useless junk and need to be pruned immediately. Ads are a societal ill at this point (just look at what it's done to mobile gaming, or how somehow we have profitable websites seem to need to put ads on anyways e.g. Ebay).
Ask HN: What book/s do you recommend for learning computer architecture?
I want to revisit learning computer architecture from the ground up and I am wondering what book or books you recommend.
If you're going to take this approach, a bigger question is why bother running the SSH jumpbox 24/7 in the first place? Shut down the SSH jumpbox when you don't need it (thus achieving SSH isolation) and start it up with your public IP in user-data to enable access to you and only you when you do need it.
CloudFlare covers the media bandwidth costs for a mere $20 / month. The uploading and media conversion is the difficult and costly (in terms of CPU) portion.
DRM stuff does not really work outside US, especially in India. Most electric vehicles here are ebikes or small three wheel lorries. Many use recycled laptop batteries or even lead car batteries.
It's less sensitive, but more objective.
First of all kudos for putting something out there.

That said, are you making the right tradeoffs?
Most of your spend is going to 'luxury'. Dual overcapacitated deployments, hosted managed Postgress, hosted Metabase.

It does sound like you could very significantly reduce your spend almost instantly with just a few minor changes, and dramatically if you would do a rethink of your stack.
Many gaming streamers on Twitch play music (at least at a low volume) while they stream. A blanket ban like this doesn't make me think that Facebook is going to get a significant part of Twitch's market anytime soon despite their "Facebook Gaming" initiative.
Also to be clear I'm talking about image uploads, not video. Still more complicated than this app.
>You were the one stating that only FP has a perfect calculus representation, and have dismissed all the posts from everyone that that proved otherwise.

That's my opinion. That's not called trolling. Disagreeing with people respectfully is not called trolling. Saying the shit you said above: that you're out of food to continue trolling me IS trolling.

I'd flag you already but you need a certain rep to do that. I'm quite new.. but let's see if Dang actually does his job.
Yep, in broad strokes, randomisation removes any bias or confounding effects such as age, gender, behaviour, genetic disposition etc. The price you pay is in precision; randomisation and the best practice analysis (intention to treat) tend to produce weaker signals of effectiveness compared to the control treatment. But that price is worth paying because randomisation is really the only way to be sure that you are seeing a real effect caused by your treatment.
There were hundreds of comments about it on HN. One typical complain is it's not implemented according to the Unix philosophy: https://en.wikipedia.org/wiki/Unix_way#Do_One_Thing_and_Do_I...
Explaining jokes usually ruins them.
kind of an important emotional question as some couples have been trying to get pregnant for years

And for some just the opposite... like 19 year old me decades ago -- ambiguous test result, and no 24 hour drugstores at the time so led to a sleepless night for both of us until we could get a second test the next day. It was negative. Would have much rather had an unambiguous POS/NEG result.
Douglas Adams on the Internet in 1999:

"Newsreaders still feel it is worth a special and rather worrying mention if, for instance, a crime was planned by people ‘over the Internet.’ They don’t bother to mention when criminals use the telephone or the M4, or discuss their dastardly plans ‘over a cup of tea,’ though each of these was new and controversial in their day."
I can't type anything properly (subjectively) on a flat keyboard. For years I've used everything from Apple's slim keyboards, basic dell/hp, Microsoft's ergo series etc. and I always had the issue with hitting two keys with a finger or accidentally pressing down while moving my hands. It all changed when I got a MX blue keyboard.

The force needed for a key press has minimized the accidental pressings and only the keys I mean to press gets triggered. I was about to buy a MX Red from my buddy and I had to return it after a week when I started getting double presses again.

On Apple's wireless magic keyboard I type approx 90WPM and on Logitech's G710 blue 130WPM+.
Here is another example, when evaluating which language to pick for their security critical firmware, NVidia ended up picking Ada/SPARK.

At FOSDEM, Ada room has been a continuous presence for more than 10 years, or even longer, as the language still gets quite some use on high integrity computing around this side of the world.
Ask HN: Good text-based games like “A dark room” or “Dwarf fortress”?
I am doing some research around the simplest game interface (but the game doesn't have to be simple!), mostly strategy games but other types might work too.

A great example is "A dark room". Another example (although it's a bit too complex for what I'm researching) would be Dwarf fortress.

Any other intriguing games that you can share?

Also, if you were to build such a game from scratch, what languages/platforms would you use? e.g. "A dark room" is open source and uses mostly Javascript [0].

Thanks for any suggestion!

[0]: https://github.com/doublespeakgames/adarkroom
Create Photo Animations App with Huawei Image Kit
I'm not sure if it would be a logical fallacy, but you could bring up a list of other things that can (and are) be abused for nefarious purposes - cash money, ziplock bags, letters, phones, grannies, etc.

I mean ISIS uses the public internet and Facebook as well and neither of those are getting the same stigma for people being disparaging about Matrix or TOR or whatnot.
Dude, couple of weeks??

Please help the guy who wrote this article set his business up

https://news.ycombinator.com/item?id=24106545

It took him months and he is still waiting for the numerous licenses and approvals and signatures to get around the red tape

I love how you casually slip in fake propaganda without sounding like a blatant IT cell account
I charge £1/zone/month for DNS-hosting, and while most of my clients only have a single zone there are people with 50+

DNS hosting can be cheap (free if you use cloudflare, etc), or very expensive. My prices give me a 50% margin over the raw AWS Route53 costs, but the appeal is that I store records under revision control and let you make changes using git:

https://dns-api.com/
What's the shenanigans? Lots of lab tests run on paper, the skill is in interpreting the result.
So did Apple just bully Facebook into those additional election season changes?
I was looking for a reference to the physical size of the reactor and couldn't find it. The sites only say "smaller". Any links with size info and requirements for containing infrastructure?
NSA surveillance exposed by Snowden ruled unlawful
It's literally a big hole with water in it; what are you unsure about?
Nethack (https://www.nethack.org/) is a favorite classic and quite a challenging game.
That probably dovetails with the free minutes. If you want to benchmark it before making a commitment, you can.
Of course. Though with increasing deployment of intermittent sources like wind and solar, occasionally the wholesale price can drop lower than the marginal cost of the nuclear plant (or even negative, if said power sources receive production subsidies regardless of the wholesale price), in which case it makes sense to throttle down.

Future grids with more intermittent renewables will have increasingly volatile prices, but not necessarily lower on average. So generators that can produce during high price periods (e.g. if wind and solar aren't producing much) can make a lot of money then, compensating for less income during low price periods.
I put some VMs in Hetzner for a project I was working on, and found out you get what you pay for.

They mistakenly deleted all of my virtual machines and all of my backups.

If you host anything with them, or anyone I guess for that matter, make sure you have your backups hosted somewhere else.
I don't think that would solve the problem.

"The word "not" is faintly showing, what does that mean?"

It it was trivial to show a single clear indicator word, they could just show a clear indicator line, then there'd be no ambiguity. It's not the second line that confuses people, it's figuring out if that line is really visible enough.
I imagine Pihole is a just an example to illustrate a point. Once you have access to all network/http traffic, you can do an amazing amount of harm to ad-networks' ability to track and send you unwanted content. Imagine that kind of full access under the user's control. Not only that but you can cache/save/transform/manipulate how you receive the content you request on your device.

That's why the conspiracy-theorist in me thinks the tech companies have been pushing for HTTPs so heavily this past decade. It's "privacy" enabling sure, but at the same time makes it next to impossible to stop ad content and to break up tech data silos.
What you need is a union law similar to germany. In germany, when you apply to a job where a union has created a union employee contract (ie, standardized pay, standardized hours & benefits), then you can choose to use that contract even if you are not part of the union and you are entitled to still do your own contract even if you are in the union.

The only time you have to accept certain parts in your contract no choice is if they are mandated by the worker's council, which is voted for democratically by workers from and for a specific company and they can veto anything the company does or demand changes with a 50% share in board votes.
A recent article in the Emerging Infectious Diseases Journal details how a large COVID-19 outbreak in China was traced back to one asymptomatic individual who infected a neighbor when they used the same elevator in their apartment building — though they were not in the elevator at the same time.

https://wwwnc.cdc.gov/eid/article/26/9/20-1798_article
Yes, https://news.ycombinator.com/item?id=16442888
Yes and no.

I've had quite a few cats in my life.

In Belgium (w/ my parents) we had a (big) garden and our cats could always freely roam outside. Some of them stayed near, others disappeared for many hours and probably went relatively far.

It's true that they are fantastic hunters: it's in their genes. Even if they won't eat the prey, the amount of birds, mice, even small rabbits they returned was staggering. Cats are dicks though, they kill for fun and kill billions (?) of other animals every year. And won't eat them.

We also had a neighbour that thought it was fun to shoot animals (including cats) in his garden. Took a while before the neighbourhood found out why cats kept disappearing (having a cat come home with a tiny lead bullet wound gave it away).
There's also roadkill and thieves. I'd say for a long period (before we found out someone was shooting cats) cats we disappear quite regularly (every 2-3 years a cat would never come home).

But I still agree cats should be allowed to roam outside: they'll be less bored, less destructive, and less annoying.

I have now moved to Singapore and adopted a lost kitten ("Tofu") roughly 2 years ago and an abandoned ~1 year cat ("Taro") (left alone on a 7th floor balcony without food in 30°C sun while the owners were out of town for several days) roughly a year ago.

Cats in Singapore commonly "fall out of the sky" -- meshing and protecting windows is not that common here, yet. Cats (including mine) love to sit on the ledge and stare outside, and once in a while they slip.
I've moved from a 12th floor apartment to a 3rd floor apartment: in both cases you either keep the windows shut or make sure it's meshed up. It's a requirement here now before you're able to adopt a cat from a shelter. They come and physically inspect your home to make sure it's suitable, clear and big enough.

We're lucky both our cats are long-haired nice looking cats. There might be some pedigree in there, somewhere. We've had people randomly walk up to us and ask us how much we paid for the cats ($0) and if we'd be willing to sell them (no). That makes me believe if they were to walk alone they'd be stolen and sold off.

The abandoned-rescued cat is fine staying indoor -- he is pretty traumatised and scared of every tiny noise. The other cat we've taught from early on to walk with a leash.

We take her out anywhere between 1 to 3 times a day depending on whether she asks for it or not. Walks are unlike walking a dog: you follow the cat and the cat usually doesn't go very far (it'll often just sit in the grass and look at the birds/lizards). Once we reach a quiet area near the apartment I remove the leash, and she gets to hop or walk around a bit. She never goes far and actually waits for me.
Needless to say it's a very quiet, green area here without roads and very little passer-by's.

So I'd say it really depends on the circumstances whether the cat should be allowed out (unsupervised). Yes, it makes sense as they are semi wild, but also a living cat is probably better than a dead cat.

FWIW we've started an IG account, just because. https://www.instagram.com/tofurawr/
There's a really good gfx developer who live streams shader development who I stopped watching because of the keyboard noise. It's just so annoying.
Because you didn't say anything meaningful. Your comment said that you

* maybe possibly might think about someday driving around the US (with the implication that you've never been there)

* but since the current president came into office, despite being completely out of reach of him or his government in your foreign country ...

* ... you've decided to, well, no longer maybe possibly might think about someday driving around the US.

Congratulations.
Massive changes in quantity sometimes induce changes in quality.

You can't create a world movement if all your means of communication are non viral
Reducing SATA power consumption under Linux
I completely agree. It always breaks my heart to see locked up animals, be it a cat not allowed to go outside, a dog confined in an appartement with only one outing a day in the urban concrete or a bear in a cage in a zoo. Makes no difference to me.

I firmly believe animal rights movements should discourage pet owning but it's often the other way around, at least from where i'm from.
I've been using an Ergodox for a few years now, and the big thing I had to get used to is not cross-typing y. I still do it with a laptop keyboard, but after a week or so I got the hang of it. In the interim, I made the key I would accidentally hit a dead key.

It's a layer key now and I don't hit it accidentally in a typical day.

The ortholinear layout was dead simple for me, I gather that's not true for everyone but one way or the other, your fingers get used to it all after a couple weeks.

I don't have any data on them actually working. But I feel a lot better standing, with my upper arms parallel to the ground, and hands shoulder-width apart, wrists slightly supinated. My shoulders stay loose and my neck and back stay straight. Any number of random aches and pains don't happen any more.
Probably because the decentralization, reach, and scale make it materially different where the potential harms can be so much greater. That IS was able to recruit and inspire people across the world through their distribution of propaganda is a prime example of this.
There are a few problems in copyright laws:
- bad incentives (cf, "mickey mouse law"),

- one rule for all areas (music, movies, books, graphics) instead of different rules for different areas,

- not being fit to digital era.

This item emphasize the last one quite strongly, and it's only going to get worse.
I have a web app that's struggling if there are more than 2 concurrent users per CPU core. It's displaying incompressible large resolution images with <100ms latency

EDIT: not sure why I'm downvoted, I'm just presenting my use case. They are multigigabyte images encoded with custom wavelet compression that are cut into tiles (think google earth), each user needs 5-10 tiles every second
Reddit app got 50M downloads by making mobile web experience miserable
Custom Bullets with CSS "::marker"
The moment you're at your job is when your clock should start, unless your employer has demanded you do a 2+ hour commute or something. Ie, the moment they control what you do and can order you to do things like putting on a uniform.

And the moment they can no longer do that is when the clock stops, ie once you've finished getting out of uniform and left.
Key Concepts to Level Up Your JavaScript Skills
Not when it causes integer underflow.
Since learning Rust I wanted to learn some C to be better able to consume pure C libs or embed Rust into C apps.

Along Modern C I found these modern(ish) C books:

- C Programming: A Modern Approach, 2nd Edition by King

- 21st Century C by Ben Kelemens

- Learn C the Hard Way by Zed Shaw

Can anyone recommend some of these for my background?

Besides Rust I've mostly used Webdev languages JS (mostly TypeScript these days), Python, Ruby, PHP, some Java back in the day.
Facebook Messenger follows WhatsApp, adds limit on forwarding texts
Is There a Google-Free Future for Firefox?