Better HN
topnewbestaskshowjobs
Log inSign up

bruce_one

267 karma · joined Apr 19, 2013 (13y ago) · 147 submissions

Submissions

1.

The cost of caring about software(alexriosme.substack.com ↗)

3 points · by bruce_one · 3mo ago · 1 comment

comment 8mo ago · link · parent

eBPF is a great tool to use for debugging this kind of thing too, e.g. [bpftrace](https://bpftrace.org) has an [execsnoop](https://github.com/bpftrace/bpftrace/blob/master/tools/execs...) script for looking at everything being exec'd on the system :-)

(No need to use bpftrace, just an easy example :-) )

comment 1y ago · link · parent

https://explore.openelectricity.org.au and https://www.nem-watch.info/widgets/reneweconomy/ are a bit fun to look at to see where Australian power is coming from :-)

comment 2y ago · link · parent

We've had success using Flowbite :-)

We're using it with React and occasionally find the docs lacking (and go looking in the component source for the answers), but otherwise have been happy with it, fwiw :-)

comment 2y ago · link · parent

One common suggestion is to not set Bash/shell options in the shebang because if someone runs the script with the interpreter explicitly (e.g. `bash my_script.sh`, rather than `./my_script.sh` (which, ime, is quite common as many people to seem to do it to avoid setting the execute bit, sometimes due to a lack of understanding ime)) then the options won't apply - which isn't fun...

Using `set` (e.g. `set -euo pipefail` as the first line after the shebang) is a common suggestion due to this, and similarly it helps with the `#!/usr/bin/env bash` case where the shebang can't handle additional arguments :-)

comment 3y ago · link · parent

You're looking for [strict tables](https://www.sqlite.org/stricttables.html) and they do already exist :-)

Added in 3.37.0 (2021-11-27), apparently :-)

comment 3y ago · link · parent

There are alternative C libraries that are worth considering, e.g. Zig (which is what Bun itself is written in, afaiu) supports using [musl](https://musl.libc.org) as an alternative to glibc, and musl can be statically linked as well (by contrast to the glibc quasi-static-linking).

comment 4y ago · link · parent

We do - and have found it very reliable and I really like it :-)

One of the members of our team finds it more complex when it comes to diagnosing why things aren't running/starting as expected, but that's also down to the complexity we have around s6 with other setup scripts (we use it to manage the full suite of processes in our product).

Hence, they're not the biggest fan of it (and would talk negatively about it), but I _think_ s6 isn't really the culprit and instead the other complexity is.

Although, when things go wrong it can be a little bit harder to chase down than it was with our former manual "start this process" type scripts... But, you can just `./run` the run script which may tell you enough :-)

comment 4y ago · link · parent

OpenSSH also supports using a script to get the password if using the `SSH_ASKPASS` environment variable, and being invoked under a non-tty input e.g.

  { echo '#!/bin/sh' ; echo 'echo my_password' ; } > password.sh # don't do it like this :-p
  chmod +x password.sh

  SSH_ASKPASS=./password.sh DISPLAY= setsid ssh user@host /bin/id

In newer SSH versions `DISPLAY` is not required (but there is a new `SSH_ASKPASS_REQUIRE` environment variable), but in older (e.g. 8.x) versions, then it needs to be set as the default ssh-ask-password was an X11 command, and I believe the logic assumed that scenario.

comment 4y ago · link · parent

In Australia you can buy pasteurised egg whites in the refrigerated section at the supermarket, could possibly be useful as an alternative :-)

(Not sure if it would be available where you are or not)

comment 5y ago · link · parent

> they get declined if your account is empty too AFAIK but haven't tested it ;P

Not always, at least some banks will allow you to go into overdraft and then charge a fee (e.g. $15 for Commbank) - so it's worth being cautious about running out.

I remember miscalculating and going into overdraft by a very small amount (e.g. a dollar or two) and then being slugged the overdraft fee - I would've much preferred the transaction to be declined, but that isn't/wasn't the default behaviour.

For example: https://www.commbank.com.au/support.banking.explain-account-... -> `CommBank may allow you to overdraw transaction accounts for the following payment types... Spend using your linked CommBank card`

(It used to be enabled by default with Commbank, not sure if that's still the case; but I'd kinda guess "yes"...)

comment 5y ago · link · parent

When we first got it, I used one Easiyo sachet to make one container of yogurt. From then on, I've used 1 heaped tablespoon of the last batch of yogurt and then just milk powder.

My steps:

- Mix ~500ml tap water with 150g of milk powder (just put the lid on and shake vigorously, I always put the water in first as the mixing is much easier).

- Add 1 heaped tablespoon of existing yogurt (the previous batch, or I've used Chobani successfully (I've heard some commercial yogurts work and some don't)).

- Fill (leave 5mm gap at the top) the container with tap water.

- Shake again to mix (less vigorously).

- Add boiling water to maker.

- Put jar in.

- Generally I try to wait 12 hours, sometimes up to 18 when I'm not home.

- Refrigerate and enjoy :-)

I enjoy the yogurt straight, but I wouldn't expect everyone to (it may not be sweet enough) - my wife adds honey or jam and fruit when serving.

(I now actually freeze one tablespoon of yogurt as soon as a batch is done, and use it for the next batch after thawing in the fridge (overnight).)

comment 5y ago · link · parent

We have an [Easiyo](https://easiyo.com/collections/frontpage/products/black-yogu...) that cost ~$20AUD, and we use one tablespoon of existing yogurt and ~150grams of milk powder (slightly more than suggested for milk, to make it thicker) to make 1 litre of yogurt at a time. (Just mix those bits; put boiling water in the Easiyo, put the container with the mixture in, wait 12 hours, done - no scolding, no temperature monitoring, super simple :-) )

It's incredibly easy, and now I search for more and more recipes that use yogurt to make different things (eg, flatbreads, cakes, pasta sauces, among lots of other things).

It's super easy and really awesome having yogurt forever available :-)

comment 5y ago · link · parent

I believe probonopd is maintaining that fork as part of their work on AppImage - so it does have an active user group, which is great.

(The AppImage docs suggest using zsync as a mechanism for making images updateable: https://docs.appimage.org/packaging-guide/optional/updates.h...)

comment 5y ago · link · parent

(iirc) It was originally slid.es and the slides.com domain was added later, I know it's not an answer to your exact question, but slid.es was a pretty good start point too :-)

(It became a defacto go-to tool for slide decks for me because it was so memorable)

comment 5y ago · link · parent

LXCFS can be used with Docker as well (although the integration is manual) which can be quite helpful (eg we're using it with docker-compose and find it very helpful)

comment 6y ago · link · parent

Yes it does, but it's very transparent - until you run into a few things that make it obvious, eg if you disk-image size limits, or memory limits.

I work with a few people who believed it was native, and used it for quite a while, until things started going wrong and we logged in to the vm to fix them.

comment 6y ago · link · parent

`readlink -e /proc/$$/exe` would be a simple solution on linux -> /proc is such a fun treasure trove of process info :-)

(Not sure it macOS has as much info in /proc?)

comment 6y ago · link · parent

The useful thing I've found from this is that "AEG" in Australia is the same as "RIDGID" (orange) in the US and the batteries are compatible.

So I've been able to buy tools that are not available as AEG tools in Australia (ie they're not offered in the product range here). I purchased them skin only to avoid any charger incompatibilities (and use the AEG batteries and charges with the RIDGID tools).

It might work in reverse that buying AEG from Australia is now a cheaper way to get RIDGID tools because the Australian dollar is quite weak compared to the US dollar.

comment 6y ago · link · parent

I didn't know the `CTRL-x * ` expansion; it appears to work in zsh for brace expansion:

  $ touch asdf-{gh,jk}-l
  # CTRL-x *
  $ touch asdf-gh-l asdf-jk-l

comment 6y ago · link · parent

A related article and associated discussion: https://news.ycombinator.com/item?id=22220342

comment 6y ago · link · parent

What is the reasoning for implying that Japan are handling the problem more effectively than others?

A friend of mine living in Japan thinks there's a "burying their head in the sand" type mentality going on.

They've only performed 32,000 tests (which is 16,484 people); which makes it hard to know exactly how the disease is spreading there.

https://www.reuters.com/article/us-health-coronavirus-japan-...

comment 6y ago · link · parent

It would be an acceptable reason for cancellation coverage with a lot of travel insurance (ymmv, but I know of less-logical reasons for cancellation that were covered).

comment 6y ago · link · parent

My favourite technique for remembering this is to say "it is an apostrophe" (because it's is "it is", and has the apostrophe (in case that isn't clear :-) )).

comment 6y ago · link · parent

I would also be genuinely curious whether the water usage numbers have reduced as the east cost (the majority of the population) has been impacted by long droughts since that research.

comment 6y ago · link · parent

This doesn't feel like a fair response because the article isn't saying "cull the camels because there isn't enough water for humans and camels to be able to drink, it's us or them". Also that statistic will be incredibly skewed for the urbanised nature of most of the Australian population, whilst the article is talking about a remote Aboriginal community (of ~2300 people over 102650km).

Some quotes:

> A recent feral-camel-population boom is exacerbating the need for water, threatening damage to infrastructure and putting communities in Anangu Pitjantjatjara Yankunytjatjara, an Aboriginal district, at risk...

> “Some people, in this sort of weather, are unable to put their air conditioners on, for fear that the animals are going to attack their air conditioners for their moisture.”

(Honestly, to me, this is a very first-world-problem feeling reason... But it's too fun to not quote :-) )

> The DEW noted that camels who do not survive the extreme arid conditions also put locals at risk. > > “In some cases, dead camels have contaminated important water sources and cultural sites,” the spokesperson said.

> “And in that time we’ve got to feed them . . . The reality is, we just can’t do that,” he said.

The article is a bit dishonest feeling saying:

> professional snipers will take to helicopters to hunt 4,000 to 5,000 camels in South Australia’s remote northwest, adjacent to the wildfires that have raged since September in New South Wales

The closest NSW fire is something like 1650km away, and that's being fairly generous.

comment 6y ago · link · parent

Feral animals do a lot of damage; and the article alludes to more than just water being the reason for the cull.

> A recent feral-camel-population boom is exacerbating the need for water, threatening damage to infrastructure and putting communities in Anangu Pitjantjatjara Yankunytjatjara, an Aboriginal district, at risk, according to South Australia’s Department for Environment and Water.

In Victoria, I've heard estimates that there are 1.5 million feral deer in the Alpine National Park (this article talks about a million plus https://vnpa.org.au/dealing-with-deer/, I heard the 1.5 million verbally as a Parks Victoria estimate).

I can't speak for the camels in particular, but these feral animals don't belong in these habitats and are causing damage that causes issues for native wildlife, and apparently other issues.

That makes me sad; but I also know destroying/killing/culling animals is often not well perceived. It feels like a very tough problem to solve in a way that keeps everyone happy.

comment 6y ago · link · parent

Something that is often missed is that the number of lives saved numbers are often low - eg NSW apparently had "only" 354 deaths in 2018; but the under-reported number (imo, as an Australia) is the number of injuries (whether serious or not) which are not talked about.

Apparently NSW had ~10950 serious road injuries in 2018. That's a lot more. And, at least to my perception, the impact of serious injuries is under-appreciated (wrt it be under-reported) - in some ways it can be more impactful to those around the victim than death.

Then there are minor (or unreported) injuries which can often align well with the mobile-phone-usage/distraction type cause. Anecdotally, about a month ago I was nearly hit by a car that went through a very red light (ie had been red for a long time, it hadn't just changed) at a pedestrian crossing in front of me and I could see that they were looking at a phone. Luckily they didn't hit anyone. But depending on timing; they may have hit me (probably a non-serious-but-not-fun-injury) or they could have hit a child (probable death to my very untrained eye - it was after-school time and there were a lot of (young) primary school students on the same street).

I don't see how 88 million dollars is going to stop cars from injuring or killing the things they hit.

Who knows the actual efficacy of the 88 million; but the costs of car injuries/deaths look pretty expensive on the after-the-fact side (just found some US stats):

> On average, each crash-related ED visit costs about $3,300 and each hospitalization costs about $57,000 over a person’s lifetime

> There were more than 32,000 crash deaths in the US in 2013. These deaths cost more than $380 million in direct medical costs.

Of note, I'm very anti phones-while-driving, because to my (biased) perception, whenever I see a car doing something that seemed dumb/unsafe/ill-considered, I very (very) often see them using a phone or playing with a gps etc at the same time.

https://www.budgetdirect.com.au/car-insurance/research/car-a...

https://www.cdc.gov/vitalsigns/crash-injuries/index.html

https://www.cdc.gov/vitalsigns/motor-vehicle-safety/index.ht...

comment 7y ago · link · parent

The extension is included in the standard sqlite [amalgamation](https://www.sqlite.org/amalgamation.html), hence it's basically always available (ie you'd have to manually disable it) (ime).

It's worth noting that sqlite's typing is very flexible, so you probably want to add a `check (data is null or json_valid(data) = 1)` to ensure the data is _actually_ valid json.

You can then index based on json queries, eg `create index some_index on something((json_extract(data, '$.someField')))` and then do an indexed query, eg `select * from something where json_extract(data, '$.someField') = 'blah'`.

In our experience it's all working quite well :-)

(Groking json_each and json_tree took a few goes, but now is working well (eg we join onto json_each to allow a row "labels" containing a list of label (rather than a one-to-many table join for something_labels)).)

12345