418teapot

@418teapot@lemmy.world

This profile is from a federated server and may be incomplete. Browse more on the original instance.

418teapot,

Since I like to use bemenu I just wrote the derivation myself, it’s super short and simple especially borrowing from the build.sh script in wofi-emoji repository. You can get the emoji data like so:


<span style="color:#323232;">emoji-data = pkgs.runCommand "emoji-data" {
</span><span style="color:#323232;">        buildInputs = [ pkgs.cacert pkgs.curl pkgs.jq ];
</span><span style="color:#323232;">        outputHashAlgo = "sha256";
</span><span style="color:#323232;">        outputHash = "sha256-znAwFu0vq2B7lQ8uvG0xKv9j3jYr6P0CZpjoKMNPhZw=";
</span><span style="color:#323232;">      } ''
</span><span style="color:#323232;">        curl 'https://raw.githubusercontent.com/muan/emojilib/v3.0.6/dist/emoji-en-US.json' 
</span><span style="color:#323232;">            | jq --raw-output '. | to_entries | .[] | .key + " " + (.value | join(" ") | sub("_"; " "; "g"))' 
</span><span style="color:#323232;">            > $out
</span><span style="color:#323232;">      '';
</span>

And then write a small wrapper script of your liking. I’m using wtype and bemenu, but you could just as easily use wl-clipboard and rofi for instance. This is to me one of the huge benifits of nix, how you can slam these small scripts together and not worry about missing dependencies when taking the configuration to other systems.

418teapot,

Good for you, you have a short list of requirements out of a chat service and discord perfectly fills your niche. But different people have different requirements for chat, and they don’t align. And network effects force people who have differing requirements to use the service with the most users which sucks.

For instance here are things that I require from any chat service that I use that discord completely falls flat at:

  • Ability to run it on my linux machine without using an electron client (npm is a huge mess of supply chain attacks and I refuse to run any software that is likely to contain dependencies from it)
  • Ability to run it on my AOSP phone which does not have any google play services installed
  • Ability to write software to back up messages without fear of a company changing their API and breaking my backup system
418teapot,

Agreed, but my point is with a centralized network the lowest common denominator wins. There is no reason you can’t have QoL features on an open network, and thusly let everyone have the features that they care most about.

Can you imagine what a shithole the internet would have been if email wasn’t federated an open? There is absolutely no way that whatever centralized bullshit would have spawned instead would already be either long gone or enshittified to the point of being useless.

Scam Numbers - Reddit's (and possibly the internet's) largest scam number depository, now on Lemmy! (lemmy.zip)

With almost 40k subscribers on Reddit, r/ScamNumbers is one of the most useful online databases for tracking down scam phone numbers. Some use the information for awareness, while others take advantage by prank calling scammers to waste their time....

418teapot,

I hate that Google is exerting even more control on the internet with their TLD, but I don’t really think this attack is made all that much worse with .zip TLD. I can already bury a .com in a long URL and end it in .zip just fine like so:

github.com∕foo∕bar∕baz@example.com/foo/…/baz.zip

Or even use a subdomain to remove the @:

github.com∕foo∕bar∕baz.example.com/foo/…/baz.zip

The truth is most people don’t look much at URLs outside of a domain to verify its authenticity, at which point the .zip TLD does not do much more harm than existing domains do.

For mitigation, Firefox already doesn’t display the username portion of the URL on hover of a link and URL-encodes it if copy-pasted into the url bar. It also displays the punycode representation when hovering or navigating to the second example.

America needs more small cars!!

I’m currently driving around Iceland. I have seen a Renault Megane, a plethora of newer Yaris’, one Yaris Cross (I lost my damned mind) and a crap ton of Suzuki Jimnys. Now, I’ve driven in some awful conditions in the states. Blizzards in Montana, Tornadoes in Texas, hail storms in the South and ridiculous wind in Arizona....

418teapot,

Wtf does that even mean? Bigger cars are usually more durable in general.

This is pretty much what I expected from someone who likes large cars. The idea that their car does damage to the road doesn’t even enter their mind. Note the immediate jump to “my property is more durable, fuck your/public property”.

418teapot,

While I agree that first party systems suck, as someone with neither an iOS or Android device I personally prefer something work rather than a screen that says “connect iOS/Android”.

418teapot,

Definitely agree, but your link is protected by cloudflare (yet another centralized service destroying the internet) and therefore I’m unable to get through because I have privacy.resistFingerprinting enabled on my browser so cloudflare is unable to determine I’m human I suppose.

I despire youtube and it’s monopoly, and I think it get’s an appropriate amount of hate on here and HN, but what confuses me to no end are the people who complain about youtube turn right around and constantly recommend cloudflare. Can someone explain what I am missing?

Goodbye Youtube and thanks for all the fish (infosec.pub)

Youtube let the other shoe drop in their end-stage enshittification this week. Last month, they required you to turn on Youtube History to view the feed of youtube videos recommendations. That seems reasonable, so I did it. But I delete my history every 1 week instead of every 3 months. So they don’t get much from my choices....

418teapot,

I would have more sympathy for Youtube if 1. it wasn’t the de-facto standard where essentially all video media gets uploaded to (which Youtube itself has done everything in its power to make happen) and 2. the company that owned it didn’t also own the most popular phone OS, most popular search engine, most popular email provider, most popular ad network, most popular maps, most popular online office suite, most popular airline booking, 2nd most popular cloud hosting… The list goes on

Until a federated solution like peertube gains more traction I have no problem paying content creators directly via patreon, and do everything in my power to not pay Google a dime. Trust me, they can afford it just fine.

418teapot,

Can someone explain to me why I keep reading about people having problems plugging in USB A connectors upside down? I feel like I’m taking crazy pills. Per the spec, the holes always go up. They indicate the correct way to plug in the port. Not only that, but the printed logo on the connector also always goes up.

The only time this is SLIGHTLY confusing is if you have a desktop tower where the motherboard is essentially mounted sideways, but for that case it just takes an extra second to think which way is “up” from the perspective of the motherboard.

And before anyone says “who reads the spec?”, it feels like I subconsciously knew this for something like a decade before I even knew what a spec was.

418teapot,

Yeah that’s fair. But I feel like I’ve seen these “USB superposition” memes since before IoT was even a thing.

418teapot,

That’s wild, I’ve never seen an upside down port.

I agree reversibility is better and am happy usb c will finally kill this meme.

418teapot,

Yes, you are correct in that a single individual’s action will make no difference, just like your single vote makes no difference either. However if everyone does their part it can make a massive difference.

While your individual contribution makes no difference, you still should try to do your part. Yes, change takes work and a bit of sacrifice. Just like how it takes time out of your day to do research on candidates and go to the polls.

If you don’t do the work, it doesn’t make you smart or clever, it just makes you an asshole taking advantage of others.

418teapot,

If I super heat a metal and it turns visibly red what is happening? Was it already emitting infrared and as it gets hotter the frequency shifts up? Or is it still emitting infrared but has a wider band of frequencies it is emitting as well (i.e. is it emitting frequencies below infrared as well as visible red)?

Firefox not loading chrome CSS file

Greetings. Today I discovered the world of theming Firefox through something called CSS. I went to the store page, and I wanted to add the Opera GX theme. Therefore, I first enabled the legacy toolkit config in the about:config page. Then, I went to the UserChrome.css file found on github for that theme and copied the raw data....

418teapot,

The profile in about:profiles is just the default profile and not necessarily the one that instance of Firefox is currently using. For example you can launch a new firefox instance with something like mkdir /tmp/foo && firefox --profile /tmp/foo, but it will still show the firefox default profile in about:profiles for some reason. I believe the current active profile directory can be found under about:support under Profile Directory.

418teapot,

The problem isn’t the version control itself. Obviously git continues to function and I can commit things offline in a plane. What I can’t do is create/review PRs or read/open issues. That’s easy to brush off, but the most egregious thing is the fact that this used to be federated over email!

All we needed was more user-friendly tooling to make it easier for new college grads to start contributing to FLOSS, but instead of better email based tooling we got the centralized trash that github is today.

418teapot,

Yeah I’ve played with git-issue and agree it’s not ideal. Have you checked out Sourcehut? It is entirely email based but with some pretty great tooling around it to make it more accessible.

I agree that in a perfect world we have a separate open protocol for all of the non-repository related workflows/data, that has all the features we need. But the nice thing about email is it’s decentralized, and everyone already has it. And in my opinion, with the right tooling built around it, it can get pretty close to the same quality of life as a github PR, but also degrade gracefully without it.

418teapot,

The problem is all of these apps are using proprietary APIs to communicate to centralized backends, which then deprecate the APIs and the old versions cease to work. Back when software was largely communicating over standardized protocols it was feasible to run an old version of software for years after it had been stopped being maintained, but protocols don’t make money, APIs do.

418teapot,

I just tried subscribing to !sircmpwn, but it’s empty despite the peer tube channel having many videos. Any idea what’s going on?

Anyone else starting to favor Flatpak over native packages?

I am currently using Linux Mint (after a long stint of using MX Linux) after learning it handles Nvidia graphics cards flawlessly, which I am grateful for. Whatever grief I have given Ubuntu in the past, I take it back because when they make something work, it is solid....

418teapot,

I haven’t used any flatpacks, mostly because they don’t seem to have a good solution for running terminal programs. (Also I don’t like that the application developer chooses the permissions to expose rather than the user.

However, I have been using bubblewrap which is what flatpack uses under the hood to sandbox. This allows me to run both gui and non-gui programs, and I have the control of exposing the minimum required permissions that I’m comfortable giving an untrusted piece of software.

418teapot,

I seem to be in the minority here but I personally prefer using $ and # to denote root. I like this because not everyone uses sudo and might not even have it installed.

That being said, if you already have other commands that are using sudo -u … to run commands as a different user then it might be best to just be consistent and prefix everything with it, but if there is only a few of those maybe a # cp foo bar && chown www-data bar is an alternative.

Questions about how to organize custom types / structs

I’m wondering with my game project how best to handle types. I’m basically fetching all the rows in a particular table and creating a struct to represent that data. I then have like 5 or 6 sequential steps I’m trying to go through where I need to modify those initial values from the db....

418teapot,

Rust has a strong emphasis on strongly typing constraints. So if a collection of fields are always some/none together having them listed as separate options in the struct means there is some assumptions you are making that the type system isn’t aware of which can lead to pain and bugs in the future.

I agree that separate types with Into sounds like a nice solution to me, it would be good to see the error the compiler is giving you (or if you can a minimal reproducible repo). If you absolutely can’t make it work, a single Option<Inner> at least would be more correct as all the fields on the inner struct would be optional together.

418teapot,

Yeah, sort of. I probably didn’t explain super well, and also probably don’t fully understand the problem so here are some code snippets that might make things more concrete and you can tell me where my asumptions of your codebase are wrong

So first off we have what I assume you were suggesting with multiple options for the individual db props. I commented where things are painful and bug prone:

play.rust-lang.org/?version=stable&mode=debug&edi…

If Option is indeed the aproach you want to take we can solve a lot of these problems by moving all the fields that go optional together into a separate struct:

play.rust-lang.org/?version=stable&mode=debug&edi…

We get even more type safety and clarity by making them separate types (and have ArmyWithDbProps wrap Army):

play.rust-lang.org/?version=stable&mode=debug&edi…

Or we could use Into if it’s not appropriate for process_army_from_db to turn an ArmyWithDbProps into an Army:

play.rust-lang.org/?version=stable&mode=debug&edi…

Also this last example is using clone when if this is in-fact the direction you want to go we could be using pointers to avoid unnecessary clones. Let me know if this is the case and I can write a version with pointers and lifetimes.

I’m sure we’ve missed something here specific to your software (obviously the above links are all trivial examples), but I just wanted to help clarify my original point with some concrete code. If you can share some of your code we might be able to give you more specific advice.

418teapot,

Seriously, I can’t think of a single good reason to use amazon in 2023. Not only are they usually more expensive than buying directly from a manufacturer or other retailer, but you run the risk of getting a counterfeit item and not notice within the return window. Not to mention the fact that you’re contributing to the further monopoly they have on online retail. Support smaller online retailers, almost all of them have a return policy equal to amazon’s.

418teapot,

I never understand people’s obsession with buying things on amazon

  • Prices are usually worse than directly from vendors (even with prime)
  • Most items are mixed in the same bin so even if you buy from the “official seller” for an item your chances are good that it’ll be counterfeit
  • It uses dark patterns to entice people to buy more junk that they don’t really need
  • All
  • Subscribed
  • Moderated
  • Favorites
  • provamag3
  • rosin
  • thenastyranch
  • tacticalgear
  • InstantRegret
  • Durango
  • DreamBathrooms
  • ngwrru68w68
  • magazineikmin
  • khanakhh
  • Youngstown
  • mdbf
  • slotface
  • kavyap
  • JUstTest
  • modclub
  • ethstaker
  • cubers
  • normalnudes
  • everett
  • GTA5RPClips
  • cisconetworking
  • osvaldo12
  • megavids
  • Leos
  • tester
  • anitta
  • lostlight
  • All magazines