HNHacker News
TopNewBestAskShowJobs

martijnarts

1,172 karma · joined December 10, 2017

My name is Martijn Arts (martijnarts.com), but I also still go by Totem or TotempaaltJ in places where I haven't been able/bothered to update my username yet.

[ proof: aspe:martijnarts.com:XYN5VR5KPKSK7CXLPD4S5ITHLI ]

submissionscomments
martijnarts··on A guide to error handling in Rust
For anyone interested in what this would look like in Rust now, there's two ways. For libraries, people tend to recommend the thiserror crate. Code sample[0]:

    #[derive(thiserror::Error, Debug)]
    enum Error {
        #[error("One")]
        One(#[from] Error1),
        #[error("Two")]
        Two(#[from] Error2),
    }

    fn foo(r1: Result<i32, Error1>, r2: Result<i32, Error2>) -> Result<..., Error> {
        let i1 = r1?;
        let i2 = r2?;
        // ...
    }
Whereas for binaries, people usually recommend anyhow. Code sample[1]:

    fn foo(r1: Result<i32, Error1>, r2: Result<i32, Error2>) -> anyhow::Result<...> {
        let i1 = r1?;
        let i2 = r2?;
        // ...
    }
[0]: https://play.rust-lang.org/?version=stable&mode=debug&editio... [1]: https://play.rust-lang.org/?version=stable&mode=debug&editio...
martijnarts··on OpenSSH switches to using gender-neutral language
In isolation, yes, but when you're actually using this sentence there will be context. "When you want to onboard a new developer, they will require access."

"There's a new person joining the team." "What do we need?" "They require access to the stack."

Both are obviously singular they.

martijnarts··on No cookie consent walls, scrolling isn’t consent, says EU data protection body
> Edit: Never mind, I guess that would violate Article 7's "It shall be as easy to withdraw as to give consent."

Wait--that exists? Then Oath _definitely_ is violating GDPR. Continuing without consent is basically impossible on their websites!

← PreviousPage 2 of 2