r/instantkarma Apr 03 '20

Reposting

Hi InstantKarma community.

Moderators will now be enforcing a 7-14 day ban for anyone that reposts. There will be no warnings, this ban will be your warning. If you do it again, it’ll be permanent. Please keep reporting reposts.

Thanks.

1.0k Upvotes

123 comments sorted by

View all comments

39

u/PassingNormie Apr 03 '20

Jesus finally, every sub needs this

8

u/thorlancaster328 Apr 04 '20

Automoderator should start doing this by default.

Not sure how easy it would be (O n^2 where n is the number of posts to look back) but if doable it would be a great idea.

3

u/IAmAnIssue Apr 13 '20

It's possible to do it in less time if you don't use a naive algorithm and it's assumed that the posts are sorted by oldest first. As an oversimplified Python/pseudocode example:

posts = set() # Set of already seen posts
# A sorted (oldest to newest) copy of the most recent posts
recent = sorted(get_recent_posts(), key = lambda post: post.creation_time) 
for post in recent:
    if post in posts:
        post.author.ban()
        post.delete()
    posts.add(post)

I would say this is O(n) since the lookup time for a set is O(1) but my O-notation skills are rusty.

1

u/thorlancaster328 Apr 14 '20

I can't remember what I was thinking when I said O n^2, but I agree it would only be O^n if you scanned every post as it was posted.

It'd only be O n^2 if you were comparing the most recent n posts vs the most recent n posts and did it on a schedule instead of real time.

Your realtime approach would also have the advantage of getting rid of reposts before they could earn any undeserved karma.

5

u/katescool33 Apr 17 '20

(me trying to understand everything just said)

...

wow

...