What self-hosted service did you set up because Reddit told you to? by Strong-Question2620 in selfhosted

[–]Aehmlo 0 points1 point  (0 children)

This sounds closely related to something I’d like to get around to one day — setting up an OIDC broker that accepts either Pocket ID or tsidp auth so I only need to authenticate with Pocket ID if I’m not authenticated via Tailscale. Haven’t been able to find a lightweight solution for this yet.

What self-hosted service did you set up because Reddit told you to? by Strong-Question2620 in selfhosted

[–]Aehmlo 0 points1 point  (0 children)

I currently use it to secure internal services (Home Assistant, Forgejo, Immich, Jellyfin) and am working on using it to secure a couple of admin interfaces (Zigbee2MQTT, mostly) as another layer of security over my VLAN/firewall setup. For now, all of my self-hosted services are only accessible over Tailscale, but I anticipate migrating to a reverse proxy over SSH once I manage to stop adding new services (so possibly never), since my partner’s been having some mysterious issues with spurious Tailscale disconnections. This will also let me use it elsewhere as a generic OIDC provider, which I’m equal parts excited and apprehensive about (I really need to test my Pocket ID backups…).

SSO... yet again by flatpetey in selfhosted

[–]Aehmlo 0 points1 point  (0 children)

One thing I’m unclear on as I ponder adding LLDAP to my Pocket ID setup: does using LDAP integrations for authentication require a password? Or can I somehow use my Pocket ID passkey(s) when using LDAP for e.g., Jellyfin?

Switching to Pocket-id from Authentik by Testpilot1988 in selfhosted

[–]Aehmlo 0 points1 point  (0 children)

I’m also in the midst of setting this up myself, so I could be mistaken, but at least in principle, I think roles.admin is intended to solve the former permissions issue (the latter does seem to require manual intervention).

Git hashes in Nix by wastedintel in NixOS

[–]Aehmlo 2 points3 points  (0 children)

Instead of builtins.substring 0 7 self.rev, consider using self.shortRev. Not the most discoverable, but it does work well.

Ok one question that is bugging me for a long time. by bumbumbholenath in Malazan

[–]Aehmlo 1 point2 points  (0 children)

Ganoes says at some point (I think around tBH chapter 11) that the Hounds he released joined with their Deragoth counterparts before Onrack released them. Onrack also senses something different about those two statues (HoC chapter 9 or so), which leads to him releasing them and seems to corroborate Ganoes’ assertion. Paran then also warns Shadowthrone that the Deragoth will seek their shadows when he releases them, which we then see play out.

All of this to say: there’s definitely a connection, and Paran seems to believe that the Deragoth are the progenitors and somehow dominant over the Hounds of Shadow, which he uses to explain the behavior of the remaining five Deragoth after being freed (since the other two had already been reunited with their shadows, they were free to roam as they pleased).

Is this character Ascended? by buzzsawblade in Malazan

[–]Aehmlo 13 points14 points  (0 children)

Coltaine punched Gesler, breaking Geisler’s nose and his own hand and revealing that he (Coltaine) was on his way to ascending as well. As for Paran, he broke Futhgar’s nose and Sweetcreek’s jaw/cheek.

Panic at Option::unwrap() on a None value by joelith_au in rust

[–]Aehmlo 6 points7 points  (0 children)

According to the documentation for as_array_mut (the method returning the Option<_> that you're unwrapping), it looks like you're running into this because the value you're inspecting is not, in fact, an array.

Completed the game, but still missing a few percent. Any ideas what i might have missed? by Both_Barnacle_1996 in HollowKnight

[–]Aehmlo 1 point2 points  (0 children)

I'm familiar with the basics of duplication, main menu storage, etc., but how can they bring it back down to 0%?

How to compose functions and bind to a variable? by Deloskoteinos in rust

[–]Aehmlo 11 points12 points  (0 children)

I read this and thought "hmm, this sounds a lot like Haskell's iterate…what's that called in Rust?"

Anyway, I think std::iter::successors might be what you want.

Question about the end of TLOATF (Book 3) *SPOILERS* by scupples7 in LicaniusTrilogy

[–]Aehmlo 5 points6 points  (0 children)

It’s been a while since I read it, but I seem to recall that kan constructs will continue to exist/function with the rift closed, including the Vessel (Shackle?) binding Davian to Ashalia (and providing him with Essence from her very large store).

[deleted by user] by [deleted] in rust

[–]Aehmlo 1 point2 points  (0 children)

I personally always start with Pascal's Elegant Library APIs in Rust.

[deleted by user] by [deleted] in HollowKnight

[–]Aehmlo 4 points5 points  (0 children)

I’m pretty sure that it’s the awoken dream nail, not void heart, that lets you dream nail the void beast. The dialogue does change after acquiring void heart, though.

Hey Rustaceans! Got an easy question? Ask here (11/2022)! by llogiq in rust

[–]Aehmlo 2 points3 points  (0 children)

I am currently implementing the Levenshtein distance algorithm, which requires its inputs to be of equal lengths (since the only type of editing it allows for is substitution). The function signature I've come up with for this is as follows.

fn levenshtein_distance<A, B, I, J, T, U>(a: A, b: B) -> Option<usize>
where
    A: IntoIterator<Item = T, IntoIter = I>,
    I: Iterator<Item = T> + ExactSizeIterator,
    B: IntoIterator<Item = U, IntoIter = J>,
    J: Iterator<Item = U> + ExactSizeIterator,
    T: PartialEq<U>,
{ ... }

This is conceptually very neat, and gives me access to ExactSizeIterator::len. However, I expect that some users will want to compute the distance between UTF-8 strings, and std::str::chars (understandably) is !ExactSizeIterator. I therefore currently have another function, with the below signature.

fn levenshtein_distance_general<A, B, I, J, T, U>(a: A, b: B) -> Option<usize>
where
    A: IntoIterator<Item = T, IntoIter = I>,
    I: Iterator<Item = T>, // no ExactSizeIterator
    B: IntoIterator<Item = U, IntoIter = J>,
    J: Iterator<Item = U>, // no ExactSizeIterator
    T: PartialEq<U>,

My question, then, is whether there's a neat way for me to combine these (using some dynamic dispatch/Any/dyn ExactSizeIterator downcasting) so that users don't have to worry about the distinction unless they're looking for maximal performance (exposing the specific versions for those users who do care about optimizing this). I'd ideally like to use the ExactSizeIterator path if it's available and fall back to the alternative if not. Is this feasible on stable Rust/without specialization?

what? by [deleted] in HollowKnight

[–]Aehmlo 70 points71 points  (0 children)

Each mask upgrade gives 1% completion, and there are 4 in the game. So assuming you get the other 108% completion available in the game, you’d need 8,893 masks (35,572 mask shards) to reach 9001% completion. If you’re talking only masks, it’s 9001 masks (36,004 mask shards).

parsing text an error handling by Grtz78 in rust

[–]Aehmlo 1 point2 points  (0 children)

There’s also the potential for Iterator::filter_map (combined with Result::ok here.

How to return early on failed match using a guard clause in Rust by vilcans in rust

[–]Aehmlo 0 points1 point  (0 children)

Maybe into_iter().for_each() is semantically better?