418teapot

joined 1 year ago
[–] [email protected] 8 points 1 month ago (1 children)

It is likely not worth your effort as whatever you come up with will likely result in discord deactivating your account for breaking their ToS, or them breaking their API forcing you to constantly play catch-up.

This is why open communication protocols are so important. Email is still as ubiquitous as it is because it's a protocol, not an API.

I personally think it would be less overall effort to get your friends to switch to an open protocol like matrix, or XMPP than it would playing cat and mouse with proprietary APIs. But you do you, I wish you the best of luck!

[–] [email protected] 5 points 2 months ago* (last edited 2 months ago)

Best I can do is

"\ude41🙂".split("").reverse().join("")

returns "\ude42🙁"

[–] [email protected] 2 points 2 months ago* (last edited 2 months ago)

I would probably try running

strace okular | grep openat

to see all the files it's trying to read and see if any aren't managed by your package manager and move those.

But the latest reply by felixernst in the kde discuss also looks helpful.

[–] [email protected] 22 points 2 months ago

Who controls the British pound? Who keeps the metric system down? We do! We do!

[–] [email protected] 15 points 3 months ago

Yeah good point. I suppose the problem is this function that operates on numbers allows numeric strings to be passed in in the first place. The only place where I would really expect numeric strings to exist is captured directly from user input which is where the parsing into a numeric data type should happen, not randomly in a library function.

[–] [email protected] 17 points 3 months ago* (last edited 3 months ago)

On my machine at least man openssl shows that -k is for specifying the password you want to derive the key from, so in that case I think you are literally using the string /etc/ssl/private/etcBackup.key as the password. I think the flag you want is -kfile.

You can verify this by running the command in strace and seeing that there is no openat call for the file passed to -k.

Edit: [email protected] beat me to it while I was writing out my answer :)

[–] [email protected] 30 points 3 months ago* (last edited 3 months ago) (2 children)

It's kind of insane how bad this whole is-number thing is. It's designed to tell you if a string is numeric, but I would argue if you're ever using that you have a fundamental design problem. I hate dynamic typing as much as anyone else, but if forced to use it I would at least try to have some resemblance of sanity by just normalizing it to an actual number first.

Just fucking do this...

const toRegexRange = (minStr, maxStr, options) => {
  const min = parseInt(minStr, 10);
  const max = parseInt(maxStr, 10);
  if (isNaN(min) || isNaN(max)) throw Error("bad input or whatever");
  // ...

Because of the insanity of keeping them strings and only attempting to validate them (poorly) up front you open yourself up to a suite of bugs. For example, it took me all of 5 minutes to find this bug:

toRegexRange('+1', '+2')
// returns "(?:+1|+2)" which is not valid regexp
[–] [email protected] 1 points 3 months ago* (last edited 3 months ago)

Ah yeah I don't know how I would do that easily on a phone. Do those in my example above render for you? You should probably be able to just copy/paste them on a phone if they do.

[–] [email protected] 6 points 3 months ago* (last edited 3 months ago) (2 children)

I can't find a keyboard with them, or a copy/pastable line where they've been typed

Maybe use combining diacritical marks?

I'm using 0x326 (Combining Comma Below), but you may need the CGJ in there to render correctly in all contexts

e.g.

Foo!̦ Bar?̦

Edit: Combining grapheme joiner, not zero width joiner

[–] [email protected] 24 points 5 months ago (5 children)

Wait, is he serious? I thought for sure this sign was satire...

[–] [email protected] 1 points 5 months ago

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:

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

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.

[–] [email protected] 1 points 8 months ago

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.

view more: next ›