telepresence

joined 10 months ago
[–] [email protected] 1 points 4 months ago

lemmy devs/tchncs admins might be interested in cloudflare turnstile, captcha replacement which doesen't involve solving a puzzle. iirc it runs some proof-of-work and sometimes requries you to check a single checkbox.

[–] [email protected] 0 points 4 months ago

Thumb key started with a pretty small amount of layouts. While creating a variant and PRing it might not be the cleanest solution, it definitely works. There have even been rejected open PRs adding in-app layout customizaiton (to some degree), and they were rejected mainly due to unnecessary complexity.

Here are my few main reasons I think the current system is fine:

  • One of the only major downsides is that a new user might have a harder time finding the appropriate keyboard layout. However, if somebody is installing thumb-key, there's a 99% chance they're either a former MessagEase user (in which case they just select the MessagEase layout and continue with their life) or a curious person who is willing to experiment with a weird keyboard like this and try out 4 or 5 different layouts they find interesting. There are some ongoing discussions in the issues about a better naming scheme for the layouts, so new users can distinguish them better.
  • Implementing a in-app layout modification system with good UX would be very time consuming, and the developer's main project is working on lemmy and the Jerboa app - I imagine there isn't really that much time left to sink in hours for such a big feature. Most, if not all "bigger" features like slide gestures were several PRs from several differennt people, sometimes over the span of months.
  • Creating and maintaining your layout isn't that hard - it can even be done without android studio, and in 1-3-ish iterations over the course of a week or two you get a layout that you are likely to use for a long time (at least, that's how it was for me). Dessalines is, in my opinion, exceptionally quick in merging PRs and making new releases, so it's really not that bad.
 

i made a type-safe GroupBy function.

/**
 * Groups array of objects by a given key
 * @param arr array of objects to group
 * @param key must be present on every object, and it's values must be string|number
 * @author telepresence
 * @license CC-BY-4.0
 */
function groupBy(arr: T[], key: keyof T, defaultAcc: Record = {}) {
    return arr.reduce((acc, val, i) => {
        const compValue = val[key];
        if (typeof compValue !== 'string' && typeof compValue !== 'number') {
            throw new Error(`key ${key.toString()} has values other than string/number. can only group by string/number values`);
        }
        if (!acc[compValue]) acc[compValue] = []
        acc[compValue].push(val);
        return acc;
    }, defaultAcc);
}
  • like lodash's groupBy, but by key and not function
    • group an array of objects which all have a key in common into an object with keys matching all the different possible values of your common key
  • type-safe, no unknown's no any's
  • does not copy arrays ([...array]), uses push
  • supports selecting by keys, where the key values are string / number (although you can easily add symbol support)
  • shared for free under the CC BY 4.0 license - only attribution is requred (link to this post is fine)
  • custom default accumulator support, if you already know the groups beforehand and would rather have an empty array than undefined.

example:

const data = [{
  "name": "jim",
  "color": "blue",
  "age": "22"
}, {
  "name": "Sam",
  "color": "blue",
  "age": "33"
}, {
  "name": "eddie",
  "color": "green",
  "age": "77"
}];

groupBy(data, 'color') 

would result into:

{
  "blue": [
    {
      "name": "jim",
      "color": "blue",
      "age": "22"
    },
    {
      "name": "Sam",
      "color": "blue",
      "age": "33"
    }
  ],
  "green": [
    {
      "name": "eddie",
      "color": "green",
      "age": "77"
    }
  ]
} 

TL;DR i've sucessfully wrote something using generics in typescript for the first time, and i think it's pretty epic.

[–] [email protected] 4 points 10 months ago

Polyphia, Casiopea (Mint Jams album)

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

based based based i love this keyboard and your site too

[–] [email protected] 1 points 10 months ago (1 children)

from the error it looks like you're importing an es module inside a common.js environment. but as @[email protected] said, there are several things that could cause this.

[–] [email protected] 7 points 10 months ago (1 children)

good call asking for a proper venue to test this, but how do you mean you can't remove federated stuff? i was under the impression (from lemmy's homepage) that one of the features is 100% complete deletion by replacing post/comment content with 'removed by user'. is this not the case?

[–] [email protected] 12 points 10 months ago (1 children)

Check out some alternatives:
searXNG - open source & self-hosted meta-search engine (aggregates results from many others, like google, bing, qwant, duckduckgo - configurable which ones.) list of public instances just pick one that's close to you physically and has a good uptime.
duckduckgo - uses bing for most search results, but is way more private
brave search - uses their own index, has a privacy-respecting privacy policy and the results are pretty damn good

2
submitted 10 months ago* (last edited 10 months ago) by [email protected] to c/music
 

Banger i found randomly when checking the twitter of one of my favorite artists, @xyanaid. They made the album cover.

edit: Spotify link

[–] [email protected] 6 points 10 months ago (2 children)

spent a few hours yesterday sorting all of my subscriptions and moving them to newpipe. while having everything auto-backed up by google was convenient, newpipe is much better - i go in, watch some videos i saved into a playlist or that have come out from subscribed channels, then go out. it feels way better then being sucked in by the algorithm. i think i'll still use youtube's algorithm on my pc sometimes, as this setup hinders new content discovery. but overall, i'm really pleased so far with the new setup.

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

living the dream

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

Yes, if you buy product X tested on whatever YouTube channel, your mileage may vary.
However, LTT had several graphs where they showed egregious performance increases in newer models of graphics cards compared to older ones. Somebody drawing a conclusion just from the relative performance increase of over 200%, even if the numbers would've been slightly off otherwise, will be more likely to make a bad decision based on the relative (non-existent) insane performance increase.

[–] [email protected] 19 points 10 months ago (4 children)

Check out Gamers Nexus. In their last ITX case review, you can see just the level of immense detail, specifications and testing for a simple computer case.

view more: next ›