wulf

joined 1 year ago
[–] [email protected] 4 points 1 week ago

Vast majority of sites work for me (librewolf), but for the few that don't I also have Vivaldi installed

[–] [email protected] 1 points 1 week ago (1 children)

Both of these are on f-droid

My favorite e-reader is Cool Reader(granted, it was last updated 3 years ago)

My favorite music player is innerTune (however that is more for playing YouTube vids as music)

[–] [email protected] 6 points 1 week ago

Second impression of Garuda (Arch based). My first impression was the dragonized version, which is KDE with lots of mods to make it Mac like, but with extra window animations.

I like things simple, so when I tried Garuda again, I installed the Gnome version. Other than some weirdness getting my Nvidia card working with Wayland, it has run better than anything else on my laptop.

[–] [email protected] 13 points 2 weeks ago

Fully agree with this. There will be a slight learning curve since it will be different from what your used to, but it's friendly enough to figure out.

If you know the windows program you want to use just search something like "Linux alternative for x" (sometimes there is specific KDE or Gnome progs)

[–] [email protected] 6 points 2 weeks ago

Invidious is awesome, if possible, self hosting one in docker is great and keeps it up to date

[–] [email protected] 14 points 8 months ago (2 children)

Call me a socialist, but the moment the tech was proven either the US or some UN based org should have eminent domained and brought Starlink.

That way there wouldn't be multiple companies sending tens of thousands of satellites into space. And hypothetically there would be a greater expectation of equal access. Oh and access wouldn't be at the whim of a pretty billionaire.

[–] [email protected] 5 points 10 months ago

Ha, I did the same thing. Was getting really tired of pip issues and attempting to use pyenv and messing up a lot. Figured I'd start clean.

Didn't realize so much depended on python and ended up needing to rebuild the whole thing.

Now I don't mess with python on my host and only use VMs for Dev or messing around.

[–] [email protected] 1 points 10 months ago

This was my problem, it's enabled by default, so double check that

[–] [email protected] 2 points 11 months ago

SOLUTION:

Here is the solution I came up with:

pub struct Configuration {}

impl Configuration {
    fn get std::str::FromStr>() -> Result {
        Ok(T::from_str("1234");
    }
}

fn main() {
    let my_conf_val = Configuration::get();
}
[–] [email protected] 2 points 11 months ago* (last edited 11 months ago)

Afraid this might have been the case, if Ogeon's suggestion doesn't work out, I'll probably end up with multiple getters, one per type. There aren't that many anyway

Thank you!

[–] [email protected] 2 points 11 months ago

Correct, I would want the caller to know what they're getting, I'll see if this works, Thank you!

16
submitted 11 months ago* (last edited 10 months ago) by [email protected] to c/[email protected]
 

Background: I have a large serde_json value that I want to be read-only (the authoritative source is an encrypted SQLite DB and should only be updated when that gets updated)

The issue, I would like a single get function that returns a generic type

use serde_json;

pub struct Configuration {
    config: serde_json::Value,
}

impl Configuration {
    async fn get(&self, key: &str) -> Result {
        let tmp_value: = &self.config["test"];

        // This would be repeated for String, bool, etc
        if tmp_value.is_i64() {
            match tmp_value.as_i64 {
                Some(x) => Ok(x),
                Err(e) => Err(()),
            }
        } else {
            Err(())
        }
    }
}

However I get: "mismatched types expected type parameter T found type i64"

Is it even possible to return multiple types from a single function?

EDIT: SOLUTION

Here is the solution I came up with:

pub struct Configuration {}

impl Configuration {
    fn get std::str::FromStr>() -> Result {
        Ok(T::from_str("1234");
    }
}

fn main() {
    let my_conf_val = Configuration::get();
}
[–] [email protected] 7 points 11 months ago (3 children)

Yes! It shouldn't be difficult to purchase a house, but when we were looking, none of the seller agents would even talk to us until we had a buyers agent 🙄

6
Purchase Advice (lemmy.world)
submitted 1 year ago* (last edited 1 year ago) by [email protected] to c/[email protected]
 

Looking to get new headphones since the battery is now shot in my Corsair

I'm looking for:

  • Mostly listening to music, some online meetings, some single player games (I am not an audio file)
  • Bluetooth that can save multiple devices
  • Over ear
  • Noise cancelling (preferably adjustable, but not necessary)
  • Microphone (preferred but not necessary)
  • Under 300 (preferably under 200)

Whenever I search online the lists are always "here is the best for 500 - 1000, or really affordable, but with no features"

Thank you in advanced!

 

So for our kids, who are still quite young, instead of opening an entire other savings account for them, we decided to do "virtual" savings accounts.

Essentially, we have a spreadsheet with what money they have gotten from birthdays and other events, then we just deposit it in our savings. They can withdraw whenever they want.

In this spreadsheet, I've been trying to keep track of interest (in a basic way), to show how saving can also help them "earn" money. However, I don't think I'm doing it correctly.

See Google sheet: dates are not correct and interest rates are not accurate. I just wanted to show that we are attempting to give the "correct" interest rate for the given date. (I know interest rates fluctuate all the time, just trying to not make it not too difficult to maintain)

https://docs.google.com/spreadsheets/d/1rwwIFVOGYt-lIx8Dtuv_6PGz28jSNQbH7LcZG2qKlfg/edit?usp=sharing

Thank you for taking a look, I've been trying to get this right for a while.

view more: next ›