skysight-inc/HackerNews huggingface dataset:
Ask HN: How do you check for free space on your lap-top?
I have these 2 aliases to check the free space and the size of folders on my Mac
alias space='diskutil info /dev/disk1 | grep "Volume Free Space"'
alias size='du -h -d 1'
There's a difference in observing (your quote) and claiming to explain (and in the critic's eye: excuse) such data.
There are lots of those footguns in shellscript. One should always try to avoid any shell and rather use python, tcl, perl or powershell. Any criticism one might have about insecure and broken by design languages apply doubly to shell.

A short list of possible problems (of course depending on the shell in question):

spaces in filenames

newlines in filenames

nonprintables in filenames

empty variables and their expansion ([ x$foo = "xsomething" ])

errors in pipes

environment madness

/bin/bash ?= /bin/sh

Arrays or the lack of it

Space separates lists as arrays

#!bash vs. #!/bin/bash vs. #!/usr/bin/env bash vs. #!/usr/sfw/bin/bash vs. ...

Unwritable and unreadable control structures (if [], case, &&,...)

Information leaks via ps

and many others...

Never use shell except to search for and invoke a sensible language. And anything is more sensible, including C, Perl, brainfuck and Basic.
1. Every child is different. For the first kid, you'll often blame or credit your parenting for some of your child's positive and negative traits. For example, our son (oldest), has always been a great eater. Tries all new foods, loves his vegetables, eats healthy portions. We thought it was because of our "baby-led weaning". Then we had our 2nd and she is a very picky eater (better now than before, but still a big difference) and we often struggle to get her to eat enough. Our 3rd is in between the two, eating wise. More or less a similar environment growing up. The other area this comes up a lot is sleep. Some children sleep terribly, others sleep well. Some parents have a few children who sleep well and feel that they made that happen. Some parents have children that don't sleep well and feel cursed. Try not to be too hard on yourself or too high on yourself.

2. They are a lot more durable, and less fragile than you'll initially feel. I stressed a ton over our first child. I tried not to be a helicopter parent, but still, in relative terms, every health issue stressed me out a lot. In fact, I stressed so much during the first weeks of our first child's life that I got stress-induced shingles! For the 2nd and 3rd, I'm much more relaxed and I simply have less time and attention to hover over everything that happens to them. Let them fall, get hurt, etc - they can handle it and they learn from it. Injuries, scars, etc all heal for the most part. Obviously this does not apply to truly serious conditions of incidents, but those are rare relative to your worrying.
> ostracizing them from society doesn't fix them

But it can be necessary to prevent others from concluding that their viewpoints are acceptable and creating snowball adoption thereof.
Thanks so much for this.
I love listening to Carmack babble.
No, I don't think so. If you look at the good ole' Volvo 940 wagon, you get 990 L cargo capacity with all seats in use. A new RAV4 (big crossover) has 580 L in the configuration with the biggest trunk. It's shrunk by 40%.
Coding a Landing Page from Scratch Using HTML and CSS
Re: unsold condos, anyone want to try explaining how withholding stock makes sense? I understand flooding the market would depress prices further, but I don’t understand what market would buy up all this stock. If these units can’t sell in what seems to be a nicely growing market, isn’t it going to be a long time before they sell at all? Like, so long that just sitting on them and paying taxes doesn’t make sense?
I see the future as grim anti-utopia:

Further advancements in AI and automations will make more and more jobs obsolete. Therefore, we will end up with high unemployment, low pay jobs, and fierce competition for decreasing number of available positions. The owners of businesses will mostly benefit from the automation. It would be a good solution to introduce convenient life long education and universal basic income. Since businesses benefited most from the progress it is reasonable to tax them in order to pay for social policies.

I am afraid, as soon as we tax businesses more they will move to the countries with low taxes, that are less social towards their citizens. The automation actually can make that move fast and not expensive.

In the end, it will be win for companies and loss for the citizens of both countries.

Is such scenario realistic? What can we do to counter it?
> My revenue for all

Your revenue may be, but people behind Gstreamer, Linux and other important serious opensource product do it for money (sometimes pretty big money, Linus has $2millions income).

> When was the last time any of us looked something up in Encyclopedia Brittanica instead of Wikipedia?

Wikipedia is looking for money constantly, the have sponsors, donators, without them it would cease to exist.

Also Wikipedia's quality often is pretty abysmal, especially when it's not in English.

> The carrot-and-stick incentive model doesn't work for fully self-actualized adults.

Sure, let's suggest to abolish patent system and see how many fully self-actualized adults will oppose.
Tyler Cowen interviews Sam Altman — https://medium.com/conversations-with-tyler/tyler-cowen-sam-...

Naval’s “You Won’t Get Rich Renting Out Your Time” (and the whole series) — https://nav.al/renting-time

The Portal: Werner Herzog — https://m.youtube.com/watch?v=Eua5iPUKw6Y
Is Kate Tempest a Poet?
> Long term career success has a lot to do with parents, friends, spouses, and children as well as a large helping of luck.

Long term failure also has a lot to do with parents, friends, spouses, and children as well as a large helping of luck.
If I am not mistaken, I think NetBSD was the first to add Linux binary compatibilty. It is certainly useful. It is easy to exclude when compiling the kernel if it is not needed. I have used /emul/linux for running closed source Linux binaries.
> using vanilla sources, without neccessary patches

Why is that a problem? From a 3rd benchmark point of view testing the official tarball is the most relevant point to test for a Linux using audience. Different distros has different patches. Some don't even patch the software.
They also built a solar-powered plastics interceptor boat to clean at the source.

https://theoceancleanup.com/rivers
Or later, if your program grows from a small hack to an important application.
God damn, I wish I read more articles like that one. That guy is objective and not a fanboy even with him working on FreeBSD.

We need more such critical thinking and insight. Kudos to him.
Yes that's unnecessarily complicated due to the naming. I can't find anything on the Cloud Run add-on for GKE by searching "GKE Anthos".

This doc suggest you just need to enable Cloud Run add-on on your GKE cluster to use it: https://cloud.google.com/run/docs/gke/setup
> You can't run a whole economy on altruism

You don't need altruism. You just need autonomy, mastery, and purpose. Those are incentive enough for meaningful work so long as the worker's basic needs are met.
In Europe revolut has virtual cards with monthly spending limits. Cash App must have a similar feature in the US.
> would be expand the Federal's reserves responsibilities into the fiscal space.

This is a very complex solution for a problem we already have the tools to solve. Politicians should just execute proper fiscal policy instead of leaning on the fed for every solution. We already have a decent system for this, which has historically worked, but no one is using it.

Other countries are able to execute proper fiscal policy without complex central banking paradigms or measures.

The real issue is our inability to plan long term fiscal policies at almost every level of our political system.
And the abstractions are not abstracting over the correct things so they are actually a net negative. One has to reason about the abstraction AND the problem domain.

I find it helpful to work with ADTs of values, lists and maps. No OO, just functions for selection and projection. The majority of programming is figuring out the nuances of the domain and getting something working. Code is actually an impediment to that.
The article doesn't mention it, but very similar syntax is also used for arrays.

For example:

arr=(a b c)
arr+=(d)
ls "${arr[@]}" # ls "a" "b" "c" "d"
ls "${arr[*]}" # ls "a b c d"

This has quite nice symmetry with the fact that the 1st argument is "$1", and you replace the number with these symbols, and for arrays you access elements with "${arr[1]}", and again replace the number with the same symbols for the same behaviour.

If you do a lot of bash scripting, arrays are invaluable.
You're talking about something completely different, and casting the question in zero-sum terms when it is not fundamentally a zero-sum question.

If in the future a machine is built that can build other machines that can build shelter and grow food and provide medical care for humans, assuming we don't run out of space, the people who decide not to work (or, possibly, to work on something "non-productive" like art) are not "taking from the productive". "The productive" can completely ignore them, and dance Moloch's tune to their hearts' content on another planet somewhere far away.

Halfway to that, in a theoretical society where those needs can be satisfied for the entire population by a relatively small workforce, there's no fundamental reason the members of that workforce can't be incentivized with economic privilege. There's also no fundamental reason that people who do want to work at solving new problems can't do so, whether their reward is economic or personal and intangible (or both).

People stuck in soul-sucking jobs in our make-work services economy aren't being productive—they're just hamsters in a wheel, printing money for the oligarch class via our insanely unsustainable consumer economy. All of it is stupid bullshit and all of it will inevitably fall over, and industrial society with it, if it doesn't change.

> All attempts turn into coercion and atrocity, because it's only natural to want to be rewarded for one's work, and the alternative is slavery.

Or, alternately, because sociopaths always rise to the top and become jealous of their power and position, and we're only just now reaching the point where something like my second paragraph is technologically feasible. Lots of "collectivist" models assume the necessity of a "means of production" powered by labor, but in a sufficiently advanced society, that need for labor will be diminished or outright deleted.

> It really amazes me how many people in tech push for a social system that would have prevented tech emerging in the first place and that would have led for lower status for themselves. It's fundamentally unserious.

Temporarily embarrassed billionaires, that's us.
https://scaleway.com prices their base compute very cheap [0]. They have got DCs in AMS and CDG, but unfortunately, I've not got to use them since their DCs are a bit far from customers.

[0] €2.99 for 2vCPU, 2GB RAM, 200Mbits/s bandwidth.
In which case, UBI might increase the baseline for what is considered to be "subsistence". If all are entitled to UBI and can simultaneously earn income on top of that, then the base line cost for goods in demand increases so that all that UBI has done is ratcheted up the baseline for what is considered subsistence, i.e., a form of inflation.
I'm a big fan of using Plumbum [0] for writing more complex shell-script-like logic as Python.

[0] https://plumbum.readthedocs.io/en/latest/
Messaging != sleeping with
Have you seen Azure Container Instances (I just posted another comment about it just now, before I saw your comment).

An aside, but I totally agree that App Service is way too expensive for the piffling amount of CPU/RAM they provide, even though I acknowledge the platform side of the offering is excellent.
As someone who has done quite a bit of patentable work in the past 10 years, I would applaud abolishing patents.

Cryptography patents makes us all less secure, because nobody uses patented cryptography. It's a net-negative in my industry.
> Grocery checkout automation is atrocious, which is why higher end chains like Whole Foods don’t have them, even though they’re better able to afford automation.

No, Costco for example I expect to not have automation because I'm bulk buying and don't want to deal with trying to fit all that on their weight scale for self checkout.

Also, Whole Foods doesn't SKU on all their produce products which makes this a pain for anyone trying to use self checkout.

Stores here in Canada like Loblaws, Metro, IGA, etc are rolling out self checkout. Thank goodness, I don't want to talk to people, asked if I'll donate $1 to something, etc.

Today, I went through Walmart cash checkout because I was buying 7 storage bins for a move. The entire thought process why I didn't go through self checkout:

- Don't have handheld bar scanner

- Someone probably going to stop me because they'll think I've put something inside of bins.

- There's almost no space on the self checkout to actually do large purchases.

People want convenient experiences. I saw older generations +65 starting to use self checkouts at grocery chains.

Spend time watching behavior. Same repeat that happened when McDonald's kiosks rolled out. Now, people get pissed when other people go to use the cash because it pulls someone off the line to deal with someone not using mobile order or the kiosk.
And that is precisely what you should not. The dist-upgrade is something you can plan for and set time aside for. The risky rolling mini upgrade every couple of weeks you can not. That is a huge difference!
How about illegal drugs and human trafficking, if you're going down the rabbit hole of false equivalency?
Isn’t that the epitome of starting a conspiracy based on flimsy accusation? And the conspiracy kept alive for 2 years, by whom?
Pigliucci on Skepticism, Science, Pseudoscience, Cultural Evolution, & Mysteries
So why are you being particularly lax about the parasitic wealthy who inherited the vast majority of their assets?
That barely qualifies as cheese.
Not sure what happened to your associate but this sounds way, way out there. I run a fairly resource intensive SaaS on AWS (lots of background jobs generating data) and we barely go over $600 a month.

People should not be scared of by these anecdotes, however true they may be. It’s perfectly possible to run a very cost effective business on AWS.
> public schools are effectively free

It's actually even worse than that because you pay for public education even if you don't use it.

So in that regard, if you send your kids to private schools, you're paying for their education twice.

This makes it very difficult to compete, and as a rayiner pointed out, isn't a real market.

I think the best solution to this is vouchers, which is a nice blend of public dollars but competitive schools.
My book, Principles of PM, helps new product managers launch their careers
Here - https://news.ycombinator.com/item?id=22025893 - there is an illustration of different points of view in the same - but modified - texts. Perhaps it partially explains difference in opinions on seemingly the same facts.
JavaScript has it covered pretty well.

http://www.jsfuck.com/
"2 requests/minute on average to your site" is a bad assumption for a relatively unpopular side project.

More importantly, with those hypothetical numbers, you'd stay well within the free tier for compute.
I still do face ridicule. While HN might be a bit behind one of us that was already suspicious of Google, the average developer is still loving Chrome and will look at you like you're a maniac if you breach the topic of ditching the browser.
Yeah, so here's the problem. We now, more than ever, have a key metric for measuring the economy that doesn't really measure the right thing. Just like in every other situation, businesses and startups included, this leads to gamification and optimization for that metric.

"Oh, you want more jobs, great! here you go! We'll cut the hours by 1/2 and employee twice as many people!"

Unemployment goes to 0% but so does quality of life. So the real question remains, what are the metrics we really value as a society and what do we need to do in order to optimize for them?
I'm not sure that "at scale" means anything if the author has never had one of their projects scale.
For what it's worth, I offer my entire book [0] online for free, and I am very happy with both the print and eBook sales.

[0]: https://gameprogrammingpatterns.com/
Disclaimer: I work on cloud run

Another advantage not stated by others is that cloud run (mostly) adheres to the KNative API spec. This allows you lift-and-shift your application from cloud run to a Kubernetes cluster with the KNative plugin installed, a feature you can’t find with any other serverless product
No, the programming that is fundamentally similar is carried out by a compiler or by parameterizing a subroutine. What's left over for the humans is the novel part.
To clarify, are you suggesting that current “low wages” or “wage inequality” are not that important because they fail to account for quality of life (food, shelter, entertainment), which is still achievable, especially by global standards, on a “low” American wage?
Deadly ‘ghost gear’ haunts seas and coastlines
> The dist-upgrade is something you can plan for and set time aside for. The risky rolling mini upgrade every couple of weeks you can not.

I can plan for it? You can see if you're upgrading your kernel. Nothing breaks if you decide not to run an upgrade.
First thing I would do is to merge the bsd distros and have an installer that could pick configurations like hardened or not. Add a cool name.

No reason so few folks should be pulling in different directions.
me: What if there was a programming language as inconsistent and terrible as English, maybe it would be uniquely easy for humans to understand?

bfox (wrote bash): Nah, Bash disproves that.
In aggregate, perhaps yes, less children leads to a healthier planet today. But individually, was it worse for the planet you or I were born? Your comment doesn't help us reach any useful conclusion. The reality is complex. Like with most health related topics, individual decisions don't count for much in defining populational growth. Policy and economics and religion control.
That's a good point, and a really interesting blog post.
As part of an industry that was started by Ada Lovelace, I don't think I could write an article entitled "Why Women Don't Code."
You speak as though change moves in one direction, and that there is a mainly additive "correct" one. That speaks of the over-confidence of youth, sorry. I will try and answer as an enthusiastic reader of history rather than as of a particular generation as frankly, I see that as utterly irrelevant. Both your comments assign blame to boomers in a way that implies no other generation before or since has ever made an insulting denigration of those that follow. "Kid's these days" has probably been a universal comment of the parental generation of the kids, and "parents just don't get it" the comment of their kids since the stone age.

The only thing that marks boomers as different is the technological leverage available to them. Meaning each and every succeeding generation since the industrial revolution can do more good and vastly more harm, than the one that went before. WW1 was so much worse than the Napoleonic war as technological leverage brought industrial slaughter. Similar comments were heard in Dickens day, in pre-WW1 Edwardian era, and I have no doubt will continue to be heard in 30 when it'll be the ageing Millennials being denigrated, and 300 years, etc.

Just to put your "only divisive because boomers" issues into context, ALL of them were divisive in the eras they were restricted, except the pendulum was swinging the other way. There were moral panics and outrages over all these in Elizabethan, Victorian, Edwardian times and still today. So that's 400 years. You'll find similar going back to ancient Rome and Greece.

We are going through a pendulum swing of relaxing attitudes to all of these, and decline of regulation. Regulation declines due to the rise of the cargo cult of neoliberalism 1980 on, attitudes due to the rise of individual consumerism 1960 on. Give it fifty or a hundred years and there will be a "universal" clamour for greater restriction, perhaps with a new spin, perhaps in forms of regulation commonly tried across the millennia. Perhaps religion or abstinence will see a revival. Perhaps something completely new, whether environmentalism or something we can't yet conceive.

At some point in the swing to relaxed, low regulation, rebelling against parents will necessarily spawn a more community, collective, or restrictive reaction.
How HTTPS Works in a Comic
"It's not something most people would have encountered on their own, since it took navigating to a Page, viewing an edit history, and realizing that there shouldn't be a name and profile picture assigned to edits to exploit it."

All someone had to do was click "Edit history" when viewing a post. As if no one ever does that. The Edit history link is included on even on their most basic mobile interfaces. Am I reading this wrong. This sounds like backpeddling.
It would be nice to have three caps:

1. notify me so I can ok continued service
2. start throttling usage
3. turn off if #1 has not responded and set new limits etc.
Hello all, I just published a book to help new and aspiring product managers launch their careers - https://amzn.to/37wflQ0. The book includes 200 pages of best practices from what I learned on the job at Amazon, Facebook, and other companies on:

1. Principles: When your product fails to get traction, when your team falls apart, or when you get tough feedback - these are all opportunities to learn principles to become a better PM.

2. Product Development: Learn how to work backwards from the customer problem, identify the right product to build, and execute with your team to bring the product to market.

3. Getting the Job: Understand how to transition to PM from another field, select the right company, and prep for the three most common types of PM interviews - product sense, execution, and behavioral.

The book also includes interviews with product leaders at Airbnb, Amazon, Google, and more.

I dislike business books that repeat one idea ad nauseum or are written by consultants with no practical experience. Hope that you think my book is different :)
Photographer Melanie Dunea Undercover in Search of Saffron in Afghanistan
Shell scripting is absolutely still relevant. The rule of thumb should not be about length but about complexity, specifically if you absolutely need something like a real array or a hash then move onto a different language. Use shellcheck and avoid bash for scripting. I use bash or pdksh interactively but stick to POSIX shell for scripting. I am finding myself writing POSIX shell all the time and having great success with it.
The nuclear bombs were an analogy, and the point it is trying to prove is not "danger", but "powerful".
We have prosperous people today and while many of them are engaged in some form of philanthropy, we still have lots of poverty and other social ills. So “compassion” alone seems like a weak guarantee.