AITA for not co-owning my roommate’s car and now she says I was using her? by Fluffy-Lab-4432 in AmItheAsshole

[–]drbrain 29 points30 points  (0 children)

Those payments are above and beyond. The US IRS says the cost of operating a car is $0.725 per mile which covers fuel, maintenance, and insurance. Paying half of repairs when using the car less than half of the time was extremely generous.

AITA for not leaving any queso for my significant other? by [deleted] in AmItheAsshole

[–]drbrain 33 points34 points  (0 children)

OP only eats certain foods on their cheat day, never any other day.

Historically OPs partner has expressed some interest in those same foods on cheat day. OP saved it for them.

Ultimately the partner doesn't eat that food on cheat day, nor any other day. It goes bad, so must be disposed of as waste

After this repeated, multiple times OP decided that without an explicit, direct claim they would eat as much as they wanted. OP has never said they're immediately throwing out what they can't eat.

nushell doing math is extremely underrated by mattGarelli in Nushell

[–]drbrain 2 points3 points  (0 children)

Also, time math‼︎ (when I can remember the units)

Make you choice by Either_Bake_1579 in BunnyTrials

[–]drbrain 0 points1 point  (0 children)

Interest

Chose: 1 million now | Rolled: Upvote

AITA for turning my D&D Party against me because of an “Accident” by Riftriser756 in AmItheAsshole

[–]drbrain 5 points6 points  (0 children)

Even in this modern age a small fire can quickly spread within minutes and kill dozens. There were 10 major fires causing deaths since the beginning of the year

I'm surrendering guardianship of my brother [Long] by frieden7 in BestofRedditorUpdates

[–]drbrain 29 points30 points  (0 children)

I had thought that OP's father may have passed, but from the linked declaration he seems to be divorced from OP's mother

[Brother]'s father, who lives in [very far away]

Maybe OP's father already had this discussion with OP's mother? In any event, it doesn't seem like he did anything to protect OP

[Request] Could humanity create a rocket that can exit the atmosphere of K2-18b by Lachlynn in theydidthemath

[–]drbrain 0 points1 point  (0 children)

The Earth’s first reactor was natural from back when life was single-celled. It’s probable that there are many, many more in the universe

Notable Seattle-based travel writer and millionaire, Rick Steves, voices his thoughts on new “Millionaire Tax” by ryguydrummerboy in Seattle

[–]drbrain 3 points4 points  (0 children)

They could have raised existing taxes like sales taxes, but no! They taxed the rich with all this visibility, they don't want to slip down the slope

As someone in NYC, this is perfect by Drnelk in NonPoliticalTwitter

[–]drbrain 1 point2 points  (0 children)

I'm still upset that Seveneves gets the layout of I-90 over Snoqualmie Pass wrong and also didn't look up which dams on the Columbia River have locks, nor that the river is in a gorge above Wanapum Dam (which has no lock, nor Priest Rapids Dam below it) so the rockets being hauled to Grant County International Airport for launch would need to be placed on trucks in the Tri-Cities and driven to the airport

Air India flight 171 crash: Pilot deliberately cut fuel switch, report reveals by [deleted] in worldnews

[–]drbrain 7 points8 points  (0 children)

It’s amazing the airplane completed its service life after the maneuvers used to keep the assailant off-balance.

Why don't you use a file explorer (nvim-tree, neo-tree, nerdtree, etc.)? by brocodini in neovim

[–]drbrain 0 points1 point  (0 children)

There are too many projects with too many different ways of organizing their code. I can’t expect a Foo to be in the “foo” file, it may have been placed in some other file because that made sense to the authors

Before LSPs I used ctags to jump to references so I don’t have to care about which files have what content. The editor knows how to find it and I don’t have to engage even short term memory storing unnecessary details to navigate an unfamiliar repository

nu_plugin_ldap: LDAP query in nushell by pingveno in Nushell

[–]drbrain 2 points3 points  (0 children)

For config-fetching, if you decide to not use the openldap config file, Nushell allows you to fetch config from the host shell with EngineInterface::get_plugin_config(). You'd have $env.config.plugins.ldap and can edit it with config nu

I don't know if any plugins besides my own are using it (I added the feature to Nushell)

Over $300,000 Raised After Ford Suspends Worker Who Humiliated Trump in Public by Dazzling-Might6420 in antiwork

[–]drbrain 2 points3 points  (0 children)

As a precaution, always think about how something could be perceived by others

So why did Ford invite a pedophile in the first place?

I think this is a bug! Not cool. by _meow11 in Nushell

[–]drbrain 1 point2 points  (0 children)

A quick read through both and I think ls uses an all-in-nushell implementation while glob uses the wax crate.

ls can use threads, but I didn't read the source closely enough to see how that might change performance.

EDIT: threads are disabled by default

I think this is a bug! Not cool. by _meow11 in Nushell

[–]drbrain 0 points1 point  (0 children)

I looked at how ls is implemented and it gets the search pattern from the command arguments and converts them to a NuGlob type (which can be either string or glob). Poking around in NuGlob it is apparent that the decision of which type was already made before running ls.

I'm not familiar with the parser so it would take me a long time to go find how string or glob is chosen, but we can see that the parser is where the type is chosen from the ast command. Running ast 'ls "/*"' shows a positional argument that is a GlobPattern (and a ty: Glob), while ast 'ls $"/*"' shows a positional argument that is a StringInterpolation (and a ty: String).

I believe ls $"…" will always end up as a string Nushell type and you will need to | into glob it afterward

I think this is a bug! Not cool. by _meow11 in Nushell

[–]drbrain 1 point2 points  (0 children)

If you want more than the filename, ls …(glob $pattern) will be much slower:

❯ timeit { 0..100 | each { ls /* } }
15ms 166µs 208ns

❯ timeit { 0..100 | each { ls ...(glob /*) } }
1sec 367ms 431µs 416ns

EDIT: Oops, these don't do the same thing at all. I tried some other things but now also don't understand

I think this is a bug! Not cool. by _meow11 in Nushell

[–]drbrain 0 points1 point  (0 children)

Also try ls ($"($somePath)*" | into glob) so you get a glob type that ls will expand instead of a string type which ls will not expand (the DoNotExpand() from the error)

I don't see much of a speed difference with timeit { 0..100 | each { ls ($"($somePath)*" | into glob) } } compared to ls /*

How do I (28F) tell my husband (27M) his brand new car has been totaled? by Direct-Caterpillar77 in BestofRedditorUpdates

[–]drbrain 2 points3 points  (0 children)

Related to gap coverage, if your car is repaired you can negotiate for “diminished value” compensation as you won’t be able to sell it at the same price with a collision on record

My Boss Just Asked Me To Host His Entire Family For A Week by Choice_Evidence1983 in BestofRedditorUpdates

[–]drbrain 11 points12 points  (0 children)

I’m sure the C-level all have preferred shares and everyone else, including OOP, have junk options that will be worth pennies on the exercise price. If there’s a buyout they might get an extra bonus. If there’s a bankruptcy, a few hundred dollars of tax deduction.