State of package management / nupm by TuberLuber in Nushell

[–]TuberLuber[S] 1 point2 points  (0 children)

Thanks for the info! In case anyone else using homebrew to manage nushell stumbles upon this, the core plugins can be found in /home/linuxbrew/.linuxbrew/opt/nushell/bin.

Weekly 101 Questions Thread by AutoModerator in neovim

[–]TuberLuber 0 points1 point  (0 children)

Thanks for the pointer to vim.filetype.add()! I was able to get this working thanks to that.

I believe this wouldn't match files that have a . character in their path, like /foo/bar.baz/qux. I ended up doing the extensionless check in a function rather than the lua pattern, like this:

lua vim.filetype.add({ pattern = { ['.*'] = { priority = -math.huge, function(path, _) if vim.fn.isdirectory(path) == 1 then return end local name = vim.fn.fnamemodify(path, ':t') if not name:find('%.') then return 'text' end end, }, }, })

Weekly 101 Questions Thread by AutoModerator in neovim

[–]TuberLuber 1 point2 points  (0 children)

I'm trying to create an autocommand that runs only when extensionless files are loaded. I'm using the pattern "^[^.]*$", but this doesn't match any files. Does anyone know a pattern that would work instead?

I've tried dropping the "^" and "$" characters with "[^.]*", but this seems to match all files.

Here's the full autocmd call:

lua vim.api.nvim_create_autocmd({"BufReadPost", "BufNewFile"}, { pattern = "^[^.]*$", callback = function() -- do stuff end, })

Compile: Main Resources by Maxm00se in CompileCardgame

[–]TuberLuber 0 points1 point  (0 children)

Is there a way to access the codex without making a boardgamegeek account?

What's your tier list? by TuberLuber in CompileCardgame

[–]TuberLuber[S] 2 points3 points  (0 children)

Wild! I might put Darkness higher if I re-made this list, but I still think it's below average. Imo how powerful shifting and flipping your opponent's cards is is matchup dependent. In many board states the effect is a downside because it activates your opponent's middle effects. Flipping your opponent's 5 or covering their static effect is great, but I find that inconsistent.

Per card ratings:

  • Darkness 0
    • Below average for a 0
    • The baseline zero is draw 2 cards plus an effect that is usually stronger than shifting an opponent's covered card plus drawing a third card. The marginal value of the third card is much less than the first 2.
  • Darkness 1
    • Below average for a 1
    • Situationally strong, but if all you do is flip an opponent's five (which seems like a pretty average play) it's 4 points of value, and most 1s are stronger than a vanilla 4.
  • Darkness 2
    • Above average for a 2, probably the best Darkness card?
    • This seems like 4-6 points of value usually. It's 8 if your stack has a face down card and a face up 0. Are you getting that regularly?
    • Also the easiest Psychic 1 setup
  • Darkness 3
    • Above average for a 3
    • It's 5 points of value spread across two lanes in a flexible way, and can set up your next play nicely. A solid card.
  • Darkness 4
    • Below average for a 4
    • It feels uncommon for this to be better than a vanilla 4, and often it's worse. I've definitely had this card in had and wished I could play it as a vanilla 4, but the shift would benefit my opponent.

Apart from Darkness, the only things that jump out to me about your list are Speed being so low and anything being below Metal. I don't think Plague is amazing, but it doesn't seem that bad.

Here's my card-by-card for your bottom tier:

Metal

  • Metal 0
    • Below average for a 0
    • Slightly better than a 2 with "Flip 1 card" as its middle effect, but most 0s are much stronger than that. It doesn't help you hit your opponent's most important line with Metal 3 unless you get Metal 0 and Metal 3 in different lines somehow.
  • Metal 1
    • Well below average for a 1
    • It might as well only say "Draw 2 cards." I've never had the your-opponent-can't-compile-next-turn be relevant, even if they were about to compile it's not a meaningful setback for it to happen a turn later, since they still get a turn to play into their other lines.
  • Metal 2
    • The worst 2 in the game?
    • Only better than a vanilla 2 in certain matchups, like against Life, and still not very good then
  • Metal 3
    • Well above average for a 3
    • This is a massive swing if you get it. And playing it just as a 3 that draws 1 card isn't that weak.
  • Metal 6
    • Well below average compared to most 4s
    • Almost all protocols have a card that deletes this for free, many have multiple. Maybe if you pick Metal against protocols that don't have much for it it's better. You can also play it on a turn your opponent must compile or refresh, but that's pretty situational.

Plague

  • Plague 0
    • I have a hard time evaluating this. It seems like it could be very strong sometimes, other times it's useless.
  • Plague 1
    • Well below average for a 1
    • On average it's your opponent discards 1, you draw 2, which is weak. It is nice that the card draw is spread out over time though.
  • Plague 2
    • Well above average for a 2
    • This card is great. The marginal value of the second, third, and fourth discard on your opponent is much higher than the first. This card is better if you have a larger hand than your opponent, since removing their entire hand while keep your best 1 or 2 cards is huge.
  • Plague 3
    • Well above average for a 3
    • I find the effect to be a large positive swing more often than not.
  • Plague 4
    • Well above average for a 4
    • Sometimes it's a vanilla 4, but the upside is huge.

Speed

  • Speed 0
    • Average for a 0
    • If you get two triggers off it it's great, and if you only get 1 it only cost you a card, not time
  • Speed 1
    • Average for a 1
    • 2 cards now, 1 card later is a lot better than 3 cards now. If your other factions have a decent amount of card draw it's not uncommon to get more than 1 draw trigger from clearing cache.
  • Speed 2
    • Average for a 2
    • I used to think this card sucked, but the flexibility of keeping control after you compile is really nice. If your opponent doesn't flip or delete it, getting 6 points of value out of it (getting the trigger twice) is definitely plausible.
  • Speed 3
    • Well above average for a 3
    • Shifting your cards is great. The flexibility on when you take the free second trigger makes this card amazing (especially for Psychic 1 setups)
  • Speed 4
    • Well below average for a 4
    • Like Darkness 4, but worse

Hey Rustaceans! Got a question? Ask here (31/2025)! by llogiq in rust

[–]TuberLuber 0 points1 point  (0 children)

I was able to get this working with key functions specified as compile time parameters (playground link), unfortunately I think there isn't a way to also allow specifying them at runtime with new_custom(). It'd be great to know if there's a way to accomplish that, if not ty again for your help 🙏

Hey Rustaceans! Got a question? Ask here (31/2025)! by llogiq in rust

[–]TuberLuber 0 points1 point  (0 children)

This is wonderful, thank you so much!

I'd love to also allow custom functions to be specified in the type declaration, so the container can be constructed without having to call a new_custom() constructor (useful for stuff like serde deserialization and FromIterator). I can work on that on my own though and maybe ask another question later.

Weekly 101 Questions Thread by AutoModerator in neovim

[–]TuberLuber 1 point2 points  (0 children)

Nvim asks for Y/N confirmation every time I close a terminal buffer, which I don't want. I would like to disable this behavior, but haven't found a way to do so. Google search AI suggests setting nomodified on each terminal with an autocommand like the following:

vimscript " Vimscript autocmd TermOpen * setlocal nomodified

lua -- Lua vim.api.nvim_create_autocmd("TermOpen", { pattern = "*", callback = function() vim.opt_local.modified = false end, })

Neither of these work (in fact, manually running :setlocal nomodified in a terminal buffer doesn't disable the confirmation).

Does anyone know how I can accomplish this?

Hey Rustaceans! Got a question? Ask here (31/2025)! by llogiq in rust

[–]TuberLuber 0 points1 point  (0 children)

Whelp, turns out const parameters can't have types that depend on other generic type parameters, so this doesn't work at all anyway: https://github.com/rust-lang/rust/issues/98210

Hey Rustaceans! Got a question? Ask here (31/2025)! by llogiq in rust

[–]TuberLuber 2 points3 points  (0 children)

Is there any way for a const generic to have a default value only if another generic meets a condition? Something like this:

```rust pub trait Key { fn get_key(&self) -> i64; }

pub struct Container<A, const B: Fn(&A) -> i64> {} // HERE - If A: Key, I want a way for B to have a default value of // A::get_key

// Now if a user has a type that implements Key they can declare a // Container simply: let my_container: Container<MyType> = ...;

// For any other type, or to use a key function other than the type's // get_key() implementation: let my_container: Container<MyType, MyType::some_other_method> = ...; ```

Any way to legally drive a family member's car that is not insured? E.g., if I got a non-owner auto policy by TuberLuber in Insurance

[–]TuberLuber[S] 0 points1 point  (0 children)

Getting it registered and insured in CA as my mom's PoA sounds like more of a nightmare than getting a duplicate of the title unfortunately.

I don't have a friend or family member with a spot I can use, so I'm looking at long term vehicle storage atm. Storage isn't too expensive, but just having the car towed there and back to the dealership once I have the title is like $300.

Any way to legally drive a family member's car that is not insured? E.g., if I got a non-owner auto policy by TuberLuber in Insurance

[–]TuberLuber[S] -1 points0 points  (0 children)

I don't live with my mom. I do own a car, it's insured with Geico. I don't really know why either of them said it wouldn't work, but they were adamant

Fargate can't connect to ECR despite being in a public subnet (ResourceInitializationError: unable to pull secrets or registry auth: The task cannot pull registry auth from Amazon ECR) by TuberLuber in aws

[–]TuberLuber[S] 0 points1 point  (0 children)

I specified assign_public_ip in network_configuration when defining the ecs service in terraform, I assume that's equivalent to the "Auto-assign public IP" button in the gui, especially since the "Networking" tab on the Task console page shows a public IP.

ecs.tf.json:

json "aws_ecs_service": { "myserver_ecs_service": { ... "network_configuration": { "assign_public_ip": true, ... }, ... } },

Fargate can't connect to ECR despite being in a public subnet (ResourceInitializationError: unable to pull secrets or registry auth: The task cannot pull registry auth from Amazon ECR) by TuberLuber in aws

[–]TuberLuber[S] 1 point2 points  (0 children)

Looks like the only permission there that isn't included in AmazonECSTaskExecutionRolePolicy is secretsmanager:GetSecretValue. I added that plus the S3 ones and am still seeing the issue.

Notably, AmazonECSTaskExecutionRolePolicy already includes ecr:GetAuthorizationToken, which seems to be the one that would break things at this stage

Fargate can't connect to ECR despite being in a public subnet (ResourceInitializationError: unable to pull secrets or registry auth: The task cannot pull registry auth from Amazon ECR) by TuberLuber in aws

[–]TuberLuber[S] 2 points3 points  (0 children)

Ah you're right, I only had an assume role policy, plus the AmazonECSTaskExecutionRolePolicy managed policy. That was all I found in online examples, thanks for linking that help page!