"Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearUN
Unixporn sajran 1mo ago 97%
[Hyprland] Tokyo Night themed NixOS setup

This setup is a result of months of learning about NixOS and tinkering. There is always something more to polish but I'm at a point where I'm actually satisfied. ![Screenshot of desktop with floating terminal window and sway notification center](https://lemm.ee/api/v3/image_proxy?url=https%3A%2F%2Flemmy.ml%2Fpictrs%2Fimage%2F3791cf7e-ff4f-422b-bd14-a436afeeb2e2.jpeg) ![Screenshot of desktop with tiled firefox and terminal emulator running btop windows](https://lemm.ee/api/v3/image_proxy?url=https%3A%2F%2Flemmy.ml%2Fpictrs%2Fimage%2F0869c721-83b7-435e-b339-08fe6d47b4d1.jpeg) - My [nix-config](https://github.com/bcyran/nix-config) - [The wallpaper by Marek Piwnicki on Unsplash](https://unsplash.com/photos/a-close-up-view-of-a-colorful-background-gcax6fGcg8k)

128
4
cpp
C++ 2mo ago
Jump
Checking if a hash is collision free on a limited domain
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearSA
    sajran
    2mo ago 100%

    I like the problem solving description, I actually went through a similar learning process leading to bitset recently. It was very satisfying!

    However, I just have to ask a question: What is the reason you didn't just use UUID?

    2
  • How should I deal with multiple imports having the same name?
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearSA
    sajran
    4mo ago 100%

    Since you have all your shutil.copytrees and sys.path manipulation at the top level of the test modules, they are executed the moment those modules are imported. unittest likely imports all discovered test modules before actually executing the tests so the set up of both modules is executed in random order before the tests are run. The correct way to perform test setup is using setUp and setUpClass methods of unittest.TestCase. Their counterparts tearDown and tearDownClass are used to clean up after tests. You probably will be able to get this to work somehow using those methods.

    However, I'm fairly certain that this entire question is an example of the XY problem and you should be approaching this whole thing differently. Copying the modules and their mock dependencies into a temporary directory and manipulating sys.path seems like an absolute nightmare and it will be a massive PITA even if you get it to a working state. I don't know what problem exactly you're trying to solve but I think you should really read up on unittest.mock and even more importantly on dependency injection.

    4
  • If you didn't have to work, how would you spend your time?
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearSA
    sajran
    4mo ago 100%

    Software development and computer stuff in general is my passion. I enjoy doing it as a hobby even after doing it at work. If I didn't have to work for money, I would probably work on some open source software. In fact that's kinda my dream / goal - achieve financial independence and work on open source as I please.

    7
  • Ant smell
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearSA
    sajran
    5mo ago 100%

    But... How do you even know you can smell ants? Why did you try it? Or can you smell them from meters away?

    4
  • Ant smell
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearSA
    sajran
    5mo ago 100%

    But... How do you even know you can smell ants? Why did you try it? Or can you smell them from meters away?

    2
  • Study Finds That 52 Percent of ChatGPT Answers to Programming Questions Are Wrong
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearSA
    sajran
    5mo ago 100%

    I don't see how this supports your point then. If "setting up proxy" means "packaging it to run on thousands user machines" then isn't there obvious and huge potential for a disastrous fuckup?

    1
  • This product will eliminate odours in your home, but only in one plane
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearSA
    sajran
    5mo ago 100%

    I might be wrong but I assumed it's perfectly obvious to OP and it's the kind of joke where something is funny because you stretch the meaning to read it literally. I chuckled actually, despite it making perfect sense.

    13
  • Not really sure whether S-expressions or Python indentation-based scoping get more hate...
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearSA
    sajran
    5mo ago 100%

    It's probably more prone to mistakes like that, true. But in practice I really never witnessed this actually being a problem. Especially with tests and review.

    1
  • De-Google Your Life - Part 1 - YouTube LTT
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearSA
    sajran
    5mo ago 100%

    Ente is as close as you can get to Google Photos with E2EE right now. I recently migrated there. The migration wasn't painless and involved some scripting to handle albums and duplicates but the service itself is really good. Can recommend!

    3
  • De-Google Your Life - Part 1 - YouTube LTT
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearSA
    sajran
    5mo ago 66%

    I really hope this happens. NFC payments are the only thing that keeps me from switching to GrapheneOS. Seeing how the situation with big tech unfolds, it's not impossible that I will decide to give up this convenience though.

    1
  • Not really sure whether S-expressions or Python indentation-based scoping get more hate...
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearSA
    sajran
    5mo ago 87%

    So I'm going to say what I always say when people complain about semantic whitespace: Your code should be properly indented anyway. If it's not, it's a bad code.

    I'm not saying semantic whitespace is superior to brackets or parentheses. It's clearly not. But it's not terrible either.

    As someone who codes in Python pretty much everyday for years, I NEVER see indentation errors. I didn't see them back when I started either. Code without indentation is impossible to read for me anyway so it makes zero difference whether the whitespace has semantic meaning or not. It will be there either way.

    18
  • How are Microchips Made? | Branch Education
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearSA
    sajran
    5mo ago 100%

    I absolutely love the videos on this channel, this one being one of the best published yet. I'm literally blown away by the level of detail and clarity. I think I'm going to watch it more one time...

    9
  • Maybe an injection or pill?
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearSA
    sajran
    5mo ago 72%

    Exactly this worked for me. Just be consistent until it sticks. It can take months, easily. But it works in the end. 10:30 pm - 6:00 am is now baked into my mind and I usually just wake up naturally like 10 minutes before the alarm. I actually love it 😁

    5
  • 9to5google.com

    Was very excited about this but turns out I can only use DuckDuckGo app, not DuckDuckGo in Firefox. I'm afraid this feature won't really be usable for me since I rely on FF add-ons and synchronization.

    90
    29

    cross-posted from: https://lemmy.ml/post/9581183 >My first ever bulid and I'm so excited! It's not trivial to build a perfect keyboard just from parts you can order in Europe. This is one doesn't look exactly how I imagined it but I love it anyway. If anyone is interested - it's a [Sofle Choc V3 kit from 42. Keebs](https://42keebs.eu/shop/kits/pro-micro-based/sofle-choc-hotswap-split-ergo-50-kit-black/). > > The first few days were a bit hard but after just a week of using it I was able to beat my monkeytype high score. I'm still not really fluid in using it for programming and vim in general though.

    64
    2
    https://lemmy.ml/pictrs/image/c3dc7d25-ee0e-4c64-9c86-2e003ff7f678.jpeg

    My first ever bulid and I'm so excited! It's not trivial to build a perfect keyboard just from parts you can order in Europe. This is one doesn't look exactly how I imagined it but I love it anyway. If anyone is interested - it's a [Sofle Choc V3 kit from 42. Keebs](https://42keebs.eu/shop/kits/pro-micro-based/sofle-choc-hotswap-split-ergo-50-kit-black/). The first few days were a bit hard but after just a week of using it I was able to beat my monkeytype high score. I'm still not really fluid in using it for programming and vim in general though.

    80
    7
    "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearAP
    Apple sajran 12mo ago 85%
    Affordable MacBook for building a Flutter application

    Hi guys, I'm currently building a mobile application using Flutter. Until now my target platform was Android but I'd like to build and publish it for iOS as well. For this I need access to macOS environment, both to build the application and to test it in iOS Simulator. Please note that I don't intend to actually develop on this machine. I'm considering a few options like running macOS VM on my machine (no luck so far) or using some kind of cloud VM. The most obvious option is to just buy a Mac of course. However, I really don't want to spend a lot on this and Apple computers aren't exactly known for being affordable. Here's my question: which MacBook would you recommend to buy used just for the purposes I listed above? I tried googling this of course but it's really hard for me to find any useful advice. Please note that I have no knowledge about Apple devices and ecosystem whatsoever, I never used any of them.

    5
    9
    "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearUN
    Unixporn sajran 1y ago 99%
    [Hyprland] Tropical summer setup

    Current daily driver. So comfy! - [dotfiles](https://github.com/bcyran/dotfiles) - [wallpaper](https://www.freepik.com/free-psd/tropical-foliage-background_4264977.htm)

    135
    10
    "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearBA
    Cozy station where I code for fun and profit

    Posted this to reddit some time back, reposting here because I want to contribute some content and help lemmy gain popularity. I hope that in a few weeks I will be posting an updated version of the setup with the laptop replaced by a third monitor and a few other modifications.

    78
    16