sneerclub SneerClub Why are our enemies so pathetic and stupid when we're so handsome and smart?
Jump
  • bobtreehugger bobtreehugger 5 months ago 100%

    Not to mention a lot of the first part is just honestly beautiful shots of nature, while showing the curve of the earth. There's very little that's dunking on flat-earthers. In fact, focusing on dunking on flat-earthers is something he criticizes other youtubers for in the video.

    8
  • technology Technology Google Podcasts to shut down in 2024 with listeners migrated to YouTube Music
    Jump
  • bobtreehugger bobtreehugger 12 months ago 100%

    Pocket casts has a webapp that works pretty well.

    Not sure if you need to pay for it though, I'm grandfathered in

    2
  • technology Technology Linus Torvalds Comments on ARM: Did he lose touch with reality?
    Jump
  • bobtreehugger bobtreehugger 12 months ago 85%

    It's tough to debug issues when you can't run on the same hardware directly.

    There's a reason that arm support in open source software has exploded in the past few years, and it's because of apple silicon.

    I'll agree that it's easier now, with most developers using higher level runtimes, but someone's got to get those runtimes working, and it's much easier to develop if you have a laptop running that hardware.

    14
  • bobtreehugger bobtreehugger 1 year ago 100%

    Why leave paradise?

    9
  • cocktails
    Vieux Carré

    Made in honor of the latest how to drink (though this is the traditional recipe, not the one on that episode) 0.5 Benedictine 0.5 rye 0.5 cognac 0.5 sweet vermouth 2 dashes each peychouds and angostura Stirred, up Very interesting drink. Almost tastes like coffee.

    22
    4
    albumartporn Album Art - Share your favourite music album cover Emerson Lake and Palmer - Brain Salad Surgery - 1973
    Jump
  • bobtreehugger bobtreehugger 1 year ago 100%

    Great music, great art, but I'm not sure if the album art matches the music

    3
  • techtakes TechTakes upside-down thinking: the law is not for entrepreneurs
    Jump
  • bobtreehugger bobtreehugger 1 year ago 100%

    That line stuck out to me as well -- the law isn't some holy Grail of ethics, it's literally the bare minimum.

    6
  • rust Rust Where do I put stuff in a growing codebase?
    Jump
  • bobtreehugger bobtreehugger 1 year ago 100%

    Functions are fine, don't move to struct impls unless it makes sense (but do if the functions all take the same struct as a param).

    You can go pretty far with modules and functions. Group related functions and move them to new modules. You can also hide functions that are only used inside one of the submodules by just not marking them as pub.

    One thing that comes to mind is that if the steps of your algorithm all take and return the same data, you can have a trait that expresses that (possibly one of the Fn traits if you're going to just use functions), and you can define and rest each step separately.

    It's hard to give more concrete advice without knowing more about your project

    8
  • cocktails
    Mellow Manhattan

    2oz mellow corn 1oz sweet vermouth 2 dashes angostura Stirred Luxardo cherry

    11
    1
    techtakes TechTakes Urbit 2.0 just dropped
    Jump
  • bobtreehugger bobtreehugger 1 year ago 100%

    Just visually, that looks like some unholy forth dsl, rather than lisp.

    6
  • techtakes TechTakes Urbit 2.0 just dropped
    Jump
  • bobtreehugger bobtreehugger 1 year ago 100%

    Tired of dealing with shitcoins from the crypto currency world? Too bad, because we're making shit-urbits now.

    At least "Plunder" is an honest name.

    9
  • rust Rust What's the procedure for mocking structs?
    Jump
  • bobtreehugger bobtreehugger 1 year ago 100%

    Just FYI -- your test isn't going to run, you need to mark it with #[test].

    So if you're used to a language like JS or python, or even Java, you're going to be a bit frustrated at how to mock things in rust. In those languages everything is boxed. In JS or python, because they're dynamically typed, you don't have to do anything special to mock, and in Java you can either play nice and use interfacees everywhere, or else you can do some runtime magic to mock an object of a regular class.

    You can do something similar in rust -- e.g. you can have a trait Cat and a struct RealCat and a (or possibly many) struct FakeCat. (There are crates that will help you with this). Then you need to either accept a Box or a &dyn Cat, or make your code under test generic (which can infect the rest of your code if you aren't careful), something like fn uses_a_cat(cat: C) {}

    So there's not quite as easy of an answer. You also have several more options, for example you can

    pub struct FakeCat;
    
    pub struct RealCat;
    
    #[cfg(test)]
    pub type Cat = FakeCat;
    
    #[cfg(not(test))]
    pub type Cat = RealCat;
    

    and get a fake (or mock, or spy, whatever test double you'd like) in all test code in your same crate. This doesn't work well across crate boundaries though, and it only lets you provide one double, so it makes sense for that double to be very generic (there are crates to do this for you as well).

    So there's not really a one-size-fits-all approach. You have to think about the tradeoffs.

    However I think the best overall test strategy (and it doesn't always apply, but it should be preferred when it does), is the same one used for functional programming: just accept and return values. Pure functions don't need mocks, and even impure functions can easily be tested if they don't have other side effects that you need to prevent during tests. Obviously you still need to deal with side effects if your program is going to work, but if you have lots of pure unit tests that don't need any fancy test doubles you can do end-to-end testing for all of your I/O and other messy side effects. Which as I said, doesn't always apply (sometimes you really need test doubles), but it's good to use whenever possible.

    2
  • techtakes TechTakes You can't take my land from me without giving me investment advice
    Jump
  • bobtreehugger bobtreehugger 1 year ago 100%

    The anti bussing stuff higher in the thread is super common. It's incredibly frustrating how people can't look past their own narrow idea of their self interests. And I guarantee you that they'd be pissed if you called them pro segregation even though they literally are.

    The landlord shit is just funny because it's so stupid.

    6
  • techtakes TechTakes my chatbot is so efficient it only needs one $2000 GPU per user
    Jump
  • bobtreehugger bobtreehugger 1 year ago 100%

    And this isn't even the expensive part -- training, this is just inference.

    Can't wait for this fad to be over

    3
  • sneerclub SneerClub Sure, castles are good for villains, but any supervillain worth their salt knows you need to dream bigger
    Jump
  • bobtreehugger bobtreehugger 1 year ago 100%

    This is an especially stupid prepper plan

    1. You're totally safe on a Pacific island, it's not like sea levels are going to rise.

    2. Genetic engineering is totally possible when the vast majority of humanity has been wiped out.

    3. What apocalypse scenario is solvable via genetic engineering? Maybe a super pandemic, but a vaccine is way easier.

    The obsession with genetic engineering all comes back to eugenics

    8
  • sneerclub SneerClub Richard Hanania: rich people are biologically superior
    Jump
  • bobtreehugger bobtreehugger 1 year ago 100%

    George W. Bush is another example of class privilege that people bring up. But whatever you think of his policies, winning the presidency twice is quite the accomplishment...

    Charles II of Spain is another example of noble privilege that people bring up, but whatever you think of his reign, being that inbred and still living to 38 is quite the accomplishment.

    4