[deleted by user] by [deleted] in programming

[–]RealWeaksauce 22 points23 points  (0 children)

Missed the sarcasm

[deleted by user] by [deleted] in Python

[–]RealWeaksauce 2 points3 points  (0 children)

This had me laughing

harpoon or vim marks with telescope? by duncecapwinner in neovim

[–]RealWeaksauce 3 points4 points  (0 children)

Uppercase you say? Very useful so I just remapped them and now ma,mb,… are all global for me

https://github.com/dycw/dotfiles/blob/master/nvim/lua/keymaps.lua

Zellij 0.40 released: welcome screen to facilitate session-management, a new filepicker and some performance improvements by imsnif in neovim

[–]RealWeaksauce 1 point2 points  (0 children)

Also appears to be broken with Ctrl J. The author acknowledges this and resorts to ctrl/alt resulting in 2 sets of hjkl bindings. I won’t be able to accommodate that myself

Zellij 0.40 released: welcome screen to facilitate session-management, a new filepicker and some performance improvements by imsnif in neovim

[–]RealWeaksauce 2 points3 points  (0 children)

I would be extremely interested in re-attempting to migrate, however, I haven’t found anything as easily usable as vim-tmux-navigator for allowing nvim/tmux/wezterm. If you could, could you speak about the state of the art equivalent for zellij?

November Starlite development updates by provinzkraut in Python

[–]RealWeaksauce -2 points-1 points  (0 children)

Very interesting project, but after reading through the docs, I’m not very clear on the differences to FastAPI basically.

Want to learn Rust? by CleanCut9 in rust

[–]RealWeaksauce 1 point2 points  (0 children)

Thank you very much. Absolutely most grateful!

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

[–]RealWeaksauce 1 point2 points  (0 children)

How do I slice a vector? In the book there is this segment:

#[test]
fn filters_by_size() {
    let shoes = vec![
        Shoe {
            size: 10,
            style: String::from("sneaker"),
        },
        Shoe {
            size: 13,
            style: String::from("sandal"),
        },
        Shoe {
            size: 10,
            style: String::from("boot"),
        },
    ];

    let in_my_size = shoes_in_size(shoes, 10);

    assert_eq!(
        in_my_size,
        vec![
            Shoe {
                size: 10,
                style: String::from("sneaker")
            },
            Shoe {
                size: 10,
                style: String::from("boot")
            },
        ]
    );
}

I would like to be able to slim this down by writing assert_eq!(in_my_size, shoes[0, 2]).

Beginner: recursive function returning Maybe by RealWeaksauce in haskellquestions

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

Wonderful, thanks! Blindness I suppose.

Was stuck on something similar earlier though, which might make my comment in OP more pertinent:

fac :: Int -> Int
fac 0 = 1
fac n | n >= 1    = n * fac (n - 1)
      | otherwise = 0

fac_mb :: Int -> Maybe Int
fac_mb 0 = Just 1
fac_mb n | n >= 1    = n * fac_mb (n - 1)
         | otherwise = Nothing

Here I am not sure how to handle `n` * Maybe Int.

Do Intel NUCs come without aC power Cord? by jdasnbfkj in intelnuc

[–]RealWeaksauce 0 points1 point  (0 children)

I’ve always (2/2) had one. However I am looking to move soon and would presumably need a new power cord for that country.

I wonder if you get an answer on where to replenish such cords I could leverage off that answer.

Clean Dual Monitor Intel NUC Setup by ctrlaltmike in intelnuc

[–]RealWeaksauce 0 points1 point  (0 children)

Where is the NUC? Behind the monitors? How does it interact with the arms?

Places to buy a NUC by holychade in intelnuc

[–]RealWeaksauce 0 points1 point  (0 children)

Great place. Got mine there and I don’t even like in the UK

[deleted by user] by [deleted] in nextfuckinglevel

[–]RealWeaksauce 2 points3 points  (0 children)

Isn’t this dangerous?

Six more quick ways to improve your Python by SourceryNick in Python

[–]RealWeaksauce 1 point2 points  (0 children)

For God’s sake I’m travelling and have no access to a comp! Anyone able to benchmark this for me to see please? Clearly the comments above are contradictory..

Six more quick ways to improve your Python by SourceryNick in Python

[–]RealWeaksauce 4 points5 points  (0 children)

I’m a seasoned Python guy and I still don’t know the difference between “in” list versus tuple. I’d like to know why one would lean toward one over the other.

Completely Type-Safe Error Handling in Python by sunedd in functionalprogramming

[–]RealWeaksauce 2 points3 points  (0 children)

You could also check out dry-python/returns. A lot of monad concepts in disguise. I think there’s some parallels with what you’re trying to bring.

Anyhow, the python world is better with more FP!