Skip Navigation

Are Lemmy sorting types just broken?

You might remember this post where I asked about how sorting by "Hot" gives you a lot of new posts that were posted in quick succession, making it look like "New".

I was recommend by a few to use "Scaled", so recently I did. Except this felt even worse: I saw new posts that were posted in succession with 0 upvotes, one having 1 upvote.

Isn't this weird? Or am I doing it wrong?

13 comments
  • No, it is not weird. Scaled, according to the docs, is like Hot, but less active communities' posts get a boost.

    Edit: here's a bit more detail

    The exact function to calculate the scaled rank is this one:

     sql
        
    CREATE OR REPLACE FUNCTION scaled_rank (score numeric, published timestamp with time zone, users_active_month numeric)
        RETURNS float
        AS $$
    BEGIN
        -- Add 2 to avoid divide by zero errors
        -- Default for score = 1, active users = 1, and now, is (0.1728 / log(2 + 1)) = 0.3621
        -- There may need to be a scale factor multiplied to users_active_month, to make
        -- the log curve less pronounced. This can be tuned in the future.
        RETURN (hot_rank (score, published) / log(2 + users_active_month));
    END;
    
      

    The hot rank is calculated like this:

     sql
        
    CREATE OR REPLACE FUNCTION hot_rank (score numeric, published timestamp without time zone)
        RETURNS integer
        AS $$
    BEGIN
        -- hours_diff:=EXTRACT(EPOCH FROM (timezone('utc',now()) - published))/3600
        RETURN floor(10000 * log(greatest (1, score + 3)) / power(((EXTRACT(EPOCH FROM (timezone('utc', now()) - published)) / 3600) + 2), 1.8))::integer;
    END;
    
      
    • Exactly. In a small community that usually doesn't see much activity, if a post gets even one upvote, scaled might consider it relevant.

    • But these are 3 posts with 0 upvotes that recently have been posted, how is that "Hot", let alone at the top of "Hot"?

      • "Hot" is a mix of recency and votes. The posts in your example score low on votes but very high on recency (<1 hour ago) and extremely high on the size scaling because that community ( !hp_fanfiction@literature.cafe ) is tiny with only two subscribers.

        You may consider Scaled to be a more appropriate sorting option for when you're viewing the communities that you've subscribed to, rather than the firehose of /all

      • Ranking:
        Hot = Upvotes / Age
        Scaled = Hot / Community size

        Hpfanfiction must be a fresh community with no one joined yet and the creator posting a lot immediately. Alternatively, it just federated to LW.

        On hot, I guess you managed to open it with the exact same second?

  • Scaled is unfortunately useless for /all, it gets flooded with posts from communities with like 5 subscribers. I don't understand why they didn't implement a simple minimum upvote filter on it, would have made it so much more useful.

13 comments