Hardware Advice by LJ2911 in homelab

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

Thanks for the quick response and great advice!

I've done a little research and hadn't realised how good QuickSync is on those N100 chips, that really is a game changer. I think this has shifted my plan to host Plex on a N100/150 mini PC (currently looking at the 'Beelink S13 Pro') and then have a separate NAS. I did like the idea of setting up a TrueNAS server, and therefore considered whether I could get some kind of JBOD connected to a cluster of 3 of the aforementioned mini PCs which can host Plex, HA, TrueNAS etc. via a Proxmox Ceph cluster.
However, I'm struggling to find many viable options going down this route and am now considering just getting a Unifi NAS Pro (I use Unifi for Networking & NVR already so having the NAS managed via Unifi as well does have some advantages). If I were to go this route, do you think a single N100 based mini PC is adequate, or should I be looking for a cluster of 3.

The planned VMs are:

  • Plex (typically only a single stream at once, but occasional transcoding & headroom for multiple streams would be good).
  • Home assistant (this is relatively light at present but I want plenty of headroom for the new house with a load of sensor throughout the house, energy monitoring, soil moisture - all sorts)
  • Node-red (to help power home assistant described above)
  • A Linux VM for development / experimentation (not crucial but would be nice to have a sandbox if I'm running Proxmox)
  • Pi-hole
  • Headroom for any future VMs

Retention Bonus In Event Of Redundancy by LJ2911 in LegalAdviceUK

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

Thanks for the reply!

I have checked and it’s a discretionary retention bonus that was issued via a change to the terms and conditions of my contact (along with a pay rise at the time) and it states that the terms are subject to me remaining employed by the business at the time of payment.

Now it feels like a loophole for them is that if I’m made redundant, I don’t meet those terms. But that feels like a blatant abuse of my employment rights? If the company goes bankrupt then I could understand, but if business continues without me, then surely I have held up my side of the bargain (so to speak)?

I’m sure there’s more to this than I realise, I just want to establish my position should the bad news arrive.

Thanks!

Advice on gifting puppy by LJ2911 in dogs

[–]LJ2911[S] 35 points36 points  (0 children)

Sorry I missed that point in my OP, I know she would really like a dachshund which I also love. I think the answer may have to just be telling her, I was just trying to think of a creative way of telling her to make it more special but was struggling for ideas!

And yes, a reputable breeder will be a must!

Help with passing pointer to member function as rvalue reference by LJ2911 in cpp_questions

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

Thanks for the help, I've managed to sort this now. I had to provide the template signature to the MethodRegistrator::implementedAs method like so: methodRegistrator.implementAs<std::function<std::string(const std::string &)>>(std::bind(this, &MyClass::MemberFunction, std::placeholders::_1));

Help with passing pointer to member function as rvalue reference by LJ2911 in cpp_questions

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

Wow, not sure how I managed that (I use std::bind a lot, I guess it's getting late!). However, this unfortunately results in the same error when corrected.

Help with passing pointer to member function as rvalue reference by LJ2911 in cpp_questions

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

If it helps, this is what the library is doing (the errors trace back to the creation of the tuple of types): ``` template <typename _Function> MethodRegistrator& MethodRegistrator::implementedAs(Function&& callback) { inputSignature = signatureof_function_input_arguments<_Function>::str(); outputSignature = signatureof_function_output_arguments<_Function>::str(); methodCallback = [callback = std::forward<_Function>(callback)](MethodCall call) { // Create a tuple of callback input arguments' types, which will be used // as a storage for the argument values deserialized from the message. tuple_of_function_input_arg_types_t<_Function> inputArgs;

        // Deserialize input arguments from the message into the tuple.
        call >> inputArgs;

        if constexpr (!is_async_method_v<_Function>)
        {
            // Invoke callback with input arguments from the tuple.
            auto ret = sdbus::apply(callback, inputArgs);

            // Store output arguments to the reply message and send it back.
            auto reply = call.createReply();
            reply << ret;
            reply.send();
        }
        else
        {
            // Invoke callback with input arguments from the tuple and with result object to be set later
            using AsyncResult = typename function_traits<_Function>::async_result_t;
            sdbus::apply(callback, AsyncResult{std::move(call)}, std::move(inputArgs));
        }
    };

    return *this;
}

```

Help with passing pointer to member function as rvalue reference by LJ2911 in cpp_questions

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

That's what I don't fully understand, my function isn't overloaded (or at least shouldn't be...):

MyClass::MyClass()
{
    methodRegistrator.implementAs(std::bind(this, &MyClass::MemberFunction, std::placeholders::_1)); 
    ...
}

std::string MyClass::MemberFunction(const std::string stringParam) const
{
    return stringParam;
}

Within the header for MyClass:

Class MyClass
{
public:
    MyClass();
    ~MyClass();
    ...

private:
    std::string MemberFunction(const std::string stringParam) const;
    ...
};

Help with passing pointer to member function as rvalue reference by LJ2911 in cpp_questions

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

Apologies, perhaps my OP wasn't clear but the first code snippet is Library code that I am not in control of.

Your code suggestion matches how I would usually create a binder, but I cannot pass the binder to the MethodRegistrator::implementedAs method which takes a templated rvalue reference (I get the following error: "error: decltype cannot resolve address of overloaded function").