python

joined 2 years ago
MODERATOR OF
[–] python@lemmy.world 7 points 9 hours ago

I'd love to be on a tops lap rn

[–] python@lemmy.world 4 points 16 hours ago

+1 for Purelymail! Cool thing is that the 10$/year is also for unlimited domains and subdomains, so I have split my mails into a bunch of different inboxes. Makes it a lot easier to filter out spam and figure out which services sell email addresses to advertisers

[–] python@lemmy.world 3 points 1 day ago

Is it essential if you already have 5 other machines that do the same thing tho

[–] python@lemmy.world 15 points 1 day ago (2 children)

All the suggestions in this thread are good, but for anyone who doesn't want to self-host or change providers entirely (because changing your email is an absolute pain in the ass):

At least get a different mail client. You don't have to use the official Gmail App to access Gmail! I personally really like FairEmail, because it's open source, has no unnecessary bells and whistles, and just works. It takes less than 5mins to download it and move Gmail over there completely, with no risk of losing any data or missing any mails.

[–] python@lemmy.world 11 points 1 day ago

I'm also quite fond of

  • Bum friend
  • Infamy
  • Juicy Sack
  • Mysterious Liquid
[–] python@lemmy.world 24 points 1 day ago (4 children)

We need more mainstream banana varieties :c I don't want to die only having tried the Canvendish

[–] python@lemmy.world 6 points 1 day ago

That's kinda obvious though, isn't it? I don't think many people are choosing to move to the USA nowadays. And the ones that already live there can't really just move out - either due to family ties, bureaucracy or lack of resources to do so. I'm guessing that the last one is the biggest factor.

America seems pretty big on making their citizens under-educated and deeply indebted. Most other countries don't let you migrate into them unless you can prove that you're financially stable and can hold down employment. My parents moved from Russia to Germany about 20 years ago, and that was only possible because they were highly educated and the company that my father was brought in to work for could prove that literally no other candidate in Europe could do the job.

Now imagine you're an american kid, either fresh out of college with a ton of debt or never having done college with no proof of education. Either way, there's a good chance your only previous employment was in the gig economy. The chance that any other country would happily let you move in is pretty slim..

[–] python@lemmy.world 3 points 2 days ago

I miss Ugandan Knuckles :(

[–] python@lemmy.world 3 points 2 days ago

Oh, good to know! :o I guess I misremembered it

[–] python@lemmy.world 9 points 2 days ago (2 children)

Kinda! The Yellow V-Label actually does have more components to it than just what the food is made of. For example, coconut milk that is made from coconuts that were harvested by trained monkeys would not receive that label. Neither would products that use animal products in their packaging (like Casein-based glue).
The term a lot of labelling actually prefers nowadays is "Plant-based". That term only refers to whether the product itself contains animal derivatives and nothing more and has much less legal protection.

There's also a weird bonus safeguard in place - Donald Watson, the guy who coined the term "vegan" did so specifically because he was pissed about Ovo-Lacto-Vegetarians changing the meaning of the word. Most vegans are aware of that, and do take care to not change the meaning any further

[–] python@lemmy.world 3 points 2 days ago (4 children)

I've been liking it! So far, I've tried Mint, Zorin, Bazzite, Endeavour and Cachy. All were pretty nice, but I think Cachy is my favorite so far, even if my main machine is running Bazzite atm (I just didn't have the time to swap the distro yet).

There's actually a lot of features that are much cooler than anything I ever did on Win10 (I probably could have used them there too, but I didn't). Like KDEConnect! It's super convenient! And doing stuff like running Android Apps via Waydroid (I ran Revanced that way for a while because I'm just not used to watching Youtube in a browser).
I'm also starting to get used to installing things via the software center instead of just googling "Software X download" and clicking on the first .exe file I find (yup, I'm aware of the security implications of that, I just uninstalled the Microsoft store from my Win10 very early on so I never really had a dedicated software store... and was too dumb for things like UnigetUI)

The performance for games has also been crazy good. My laptop couldn't run Sekiro on Win10, now it runs completely fine on high graphical settings. Even Cyberpunk works somehow! I didn't think that my 2018 Laptop had this much life left :0

[–] python@lemmy.world 21 points 2 days ago (5 children)

Vegetarian is the dietary restriction, Vegan is more of a moral stance. As is, the definition of Vegan that most go by isn't about not eating any animal products, but about reducing animal exploitation and harm as far as possible and practicable. I don't think Hippos have any issue with harming anyone haha

Also, fun fact: The original definition of Vegetarian actually did exclude eating dairy or eggs. The Vegetarians that did eat those were called Ovo-Lacto-Vegetarian, but there were so many of them that the term got abbreviated to just Vegetarian, which basically made Ovo-Lacto-Vegetarians the default definition. Language is fun like that

 

I mean, if I'm not gonna have a good match anyway might as well embrace the fact it doesn't match lol

 

As in, either at an early age or early in their career.
Because I'm 26 with about 3-4 years of experience (maybe 5 if I count my apprenticeship), and my company keeps reiterating how they promote based on skill and knowledge, and not based on age. I know that I fit the soft skill requirements for senior dev on the internal checklist. And I know that I could absolutely handle the 6-week project that potential Seniors are asked to do, because all of my experience is extremely specialized into the exact current field and position I work at.

So I'm playing with the idea of asking to become a senior next year, because I plan on leaving the company and the title would look good on my resume.

Does anyone around here have experience with doing something like that?

 

I installed Linux Mint for the first time on my personal Laptop just a few months ago, and it ran so well that I didn't want to mess with it to try out different distros.

But today, my company's IT department announced that they have some spare old Laptops to give away (technically because they didn't meet the specs for Windows 11, didn't stop the IT department from giving them out with Windows 11 pre installed though)

So now I got a few devices to play around with!! They're a Precision 7530 and a Latitude 7390 2-in-1!

I already got ZorinOS running on the little guy because apparently Zorin is nice for Touchscreen support. For the big guy I was initially thinking that I could try Bazzite, but the installer was like "Intel UHD Graphics aren't really recommended" so I might try something else first. Any recommendations? I mainly just want to try as many different flavors of Linux as I can haha

 

Not really a shower thought, but a "spraying my hair with dry shampoo before a Teams meeting" thought.

 

That is such a cursed combination of words. She climbed into my credit card holders metal loop while I was answering a Teams message and got stuck. Only started backing out voluntarily when I lubed her up. She's all right now, there was only a slight hint of a dent about 5 minutes later and it's all gone by now.

This is a shitpost because I realize that this situation is fertile grounds for puns and innuendos. Go ahead.

 

Okay so, context, I've come across this video last night. It's a short comparison between React and Svelte. Point 9 - Shared state (6:20) mentions that React doesn't really have a primitive way to share state between nested components and that you basically need to use something like Redux to get that working.

But... I've been sharing state between nested Components in just React for a while now and didn't know that I can't?? But I also don't remember where I learned to do it, so the chances are high that I just hallucinated up this method as a Junior.

Basically, when I want to share state I just make a new Context and ContextProvider, wrap it around the highest level Component I need it in, and use it lower down in the component tree.
If I need a state, I put the two outputs of the useState hook into the context (which feels nice because when I look through the code, I can see right away which children only read the value in the state and which children actually take the setter and have the capacity to change that state). Sometimes I don't even hand out the actual setter from the state, but a new function that also does some input validation before calling the setState itself. Doing it this way has always felt pretty clean to me.

From the React documentation, it seems to me like that's exactly how you're supposed to use Context. But I've also never seen anyone else do it like that. So is it incredibly ill advised and I've been shooting myself in the foot this whole time?

As a more specific example, my most common use case is that I need to render fetched data in a grid. This data can be filtered, but the component that sets the filter state is either on the same level as the grid (the grid's built in filter menu) or above it (a button that sets a predefined quick filter) or even further above that (a useEffect that looks for query parameters in the URL and sets those before the data is fetched for the first time).
So what I'd do is const [filterModel, setFilterModel] =useState() at the highest level and pass it to <FilterContext value={{filterModel, setFilterModel}}>. Then, I'd just use const {setFilterModel} = useContext(FilterContext) within all the components that write the filter and const {filterModel} = useContext(FilterContext) everywhere where I just need to read the filter, like in the hook that actually fetches my data. Does that make sense? Is there an easier/safer way to do it that doesn't involve adopting yet another external library?

 
 

I'd give laser pointers to Neanderthals. Even if they did figure out some useful application for them (maybe hunting?) they'd run out of batteries eventually.

 

On a touchscreen !!
Within a pan-pinch resizeable container !!
With a weirdly-shaped Grid !!

(Didn't know where else to post this, since it doesn't seem very relevant to !webdev@programming.dev, but I needed to exclaim this somewhere haha)

7
submitted 4 months ago* (last edited 4 months ago) by python@lemmy.world to c/webdev@programming.dev
 

Hello! I'm messing around with some PWA features and getting really stuck when it comes to display modes. Basically every browser and device I test on behaves wildly differently, and I'm having a hard time distinguishing which of those behaviors are errors on my part and which are just browser funkiness.

(Link to my PWA if you want to check the manifest or see how it displays for you)

In my manifest, I try to set the display mode to fullscreen. This setting seems to only be properly and consistently applied when I test on my Lenovo Tab 11 running Chrome. Firefox on the same tablet does not respect it and starts in standalone mode, unless I also have the Chrome Version of the PWA installed. Once that is the case, Firefox is beautiful and consistent. I have no idea why the different versions installed by the different browsers would interact with each other like this.

When I install the PWA on my phone (Pixel 9 Pro running GrapheneOS), via Chrome or Vanadium, the site thinks it's running in fullscreen, but I still have a black bar at the top (it doesn't apply the theme color set in the manifest!). This wouldn't be a problem per se, but the browser also sets a safe-area-inset parameter, which, when I respect it, leads to a very fat distance from the top (the safe inset is green):

spoiler

When I install it on my phone via Firefox, the app sometimes thinks it's display-mode:browser but displays perfectly fine as fullscreen, and sometimes it thinks it's fullscreen but displays more like a standalone. It seems completely random and can change any time I close the app or navigate away from it:
spoiler

When I install the PWA on my secondary phone (Moto G100) via Chrome, it has similar issues as on my main phone (it thinks it's fullscreen but is actually standalone) but it does not apply that ridiculous safe-area-inset. That backfires sometimes as navigating back via gesture will catapult the page to take up the full height, so the header shifts into the top bar. Would have been nice to have that safe-area here...
When I install it via Firefox on the Moto G100, it looks good about half of the time! Actual fullscreen with proper safe-area that doesn't break on navigation. Sometimes it randomly starts in standalone mode, but with the proper theme color applied to the top bar. Everything breaks if I have the Chrome version installed at the same time though. Then, the firefox version will never show up as proper fullscreen, but always have almost the same display issues as the Chrome version on that same phone.

I haven't even tested the PWA on iOS yet (I'll have access to an iPhone in about 2 weeks though so I'll test it then) but I'm guessing it will have its own display challenges as well. I'm also still battling the display issues from swapping my SVGs to generate with colors from the OKLCH system (it seems to really mess with any open source browser I've tried). So maybe, I should just ignore the browser display issues for now and focus on my color display issues instead?

Also, does anyone know if I can just let the user decide on their own preferred display mode? It would probably be the best solution to just let the user set the display mode that actually works in their specific browser. But as far as I understand how manifest files work, I can't really change much once the app is already installed, and I haven't found any online documentation that would suggest that I could programatically change the display property in the manifest based on user input :( But maybe there's some workaround you know about?

I would be very happy about some pointers and feedback on how I might get this display thing halfway consistent!

 

We might not live in the best timeline, but we sure live in the funniest one.

(no idea if it's satire, but I appreciate the dedication to the bit, especially when he started stealing merch right after)

Link to the videos Knowyourmeme page

 

Sorry, might be a stupid question, I have literally no idea about bikes!

What I'm looking to do is figure out whether there are any modern-ish ebike motors on the market that I could swap my current motor with (I'm assuming I'd be swapping all the other innards to fit that motor too, so dw about battery compatibility and the like). All I know about the current Motor is that it's a 250W Panasonic motor from around 2011. I asked the mechanic at my bike shop whether I could just toss one of those Bafang conversion kits on the bike but he said the way that my pedals sit within the motor would be incompatible with that and I'd need to get an actual ebike motor, not a conversion motor.

So now I'm trying to find information on current Panasonic motors and what sort of frames they need to fit, but I'm having a hard time because I have no idea how to even call this kind of spacing on the frame. Does anyone have an idea on what to call it/describe it as? Or is is a proprietary thing that I'd need a welder to rework? (Totally an option if push comes to shove, I know a guy)

Some more pictures from as many angles as I could get into (should I be getting measurements of any of these?):

spoiler

view more: next ›