@tekkie Just switched today to pagy after giving up on will_paginate due to a Ruby argument change that broke something deep in its guts (tried debugging but couldn’t figure out the context).

Working now, just need to do some style changes. And that calendar and uncounted paging could be useful for displaying threaded posts in my #RatingStone project.

I had a little bit of time for some progress on my #RatingStone reputation system prototype. Now you can edit opinions, if the default Up/Meh/Down one-click actions (sort of like Like buttons) don't convey your views.

For example, you can dislike the post but like the author, and specify the strengths of those opinions by choosing how many rating points to spend. There's also a Link option, where you can comment on someone else's opinion, but that's more for meta-moderators.

Ha! Someone wants a feature that #RatingStone has - disconnecting a reply you don’t like from your post.

https://chaos.social/@Uilebheist/109938365289616641
@Uilebheist

Replies are done with a link record between posts, and both ends (post authors) have to approve it. Of course your reply is automatically approved in the link, but the author of the original post has to approve their end. If the reply’s author is a member in the same group as the original post, group rules can automatically approve it for convenience.

Uilebheist 🏳️‍🌈 (@[email protected])

So question for anybody who may know. If I toot something and somebody replies with something homophobic / offensive etc I can block them, however that does not stop my own toot "advertising" their reply, it's still there, visible to anybody who reads my toot (except me, because I blocked them). I just "delete and re-drafted" something because that gets rid of that comment, but is there a better way to do this? (I also reported the toot, but looking at their instance, it won't do any good)

chaos.social
I wonder if I should implement that owner’s posts promotion in my #RatingStone prototype, since I’ll be doing “feed” code in the near future (after custom opinion ratings and media uploading). Nah, too much work and there aren’t any users anyway.🙂

Reading today (related to my #RatingStone reputation system prototype) a couple of articles about implementing Twitter, starting from a https://RubyWeekly.com/ newsletter pointing to:

https://thume.ca/2023/01/02/one-machine-twitter/
- How big a computer system would you need to run Twitter?

and

https://www.geeksforgeeks.org/design-twitter-a-system-design-interview-question/
- How would you design Twitter?

Both quite interesting. But then I'm working on a prototype social media web site, so maybe I'm a bit biased. 🙂

Ruby Weekly

Finally got the recursive #SQL code (WITH RECURSIVE magic phrase) for finding ancestors plus descendants of a post (tree determined by reply links) working in my #RatingStone project.

Can do each separately, but can’t pre-sort the inputs to a UNION (need sort by path to node to get depth first order, and ancestors is the opposite direction). After various attempts, used two path columns, each empty in one direction, as inputs to final UNION and its multi-sort.

Afternoon fighting with SQL for #RatingStone code that works on both PostgreSQL and Sqlite3 to pad a number with leading zeroes out to a fixed length. All so I could do a query that recursively finds a tree of posts, and labels each post with the path to it (a string of ID numbers).

Next up, fighting with CSS to get the vertical bar colour stripes (showing nesting order of the posts) to be full height of the post. height: 100% of course does not work, but specific numbers of pixels or Ems do.

Today I decided to look at making a “feed” of posts and replies in #RatingStone. I want replies in depth first order, so you see chains of replies related to a post first.

It’s more efficient to do it in the database, and yes there is a way of doing a depth first search query using “WITH RECURSIVE”. It feeds the results of a query back to the query again. If the query finds replies to a post, the accumulated results are the posts I was looking for!

@stephen I did think about federation for #RatingStone (via Database or BlockChain or even hacking Twitter). But for now, the plan is to work out the ideas, then throw it away and perhaps do some of it as a fork of Mastodon. Though if I get a job, it would have to go on hold, but then I'd have a job 🙂 .

BTW The essay on reputation systems is at https://web.ncf.ca/au829/WeekendReports/20190201/AGMSReputationSystem.html

AGMS Reputation System

An essay about the AGMS Reputation System. It uses time decay and periodic point awards to keep scores current, avoiding some of the traps seen in many science fiction stories. It is also strangely amenable to a block chain implementation.

@stephen Nice to see someone else inventing their own social media site. I got interested in doing a better reputation system (after seeing Black Mirror and Orville episodes about reputation systems going bad). Wrote an essay about it and decided to implement #RatingStone as a Ruby on Rails learning exercise in hopes of a job at Shopify.

Anyway, I wrote up a database design https://ratingstone.agmsmith.ca/docs/Database%20Design.html and started a prototype. Still working on it...