danse / meta

A repo about other repos
0 stars 0 forks source link

unlaud #10

Open danse opened 7 years ago

danse commented 7 years ago

A Twitter bot that answers to an @unlaud me request by telling the three most frequent twitter publishers in an user's feed, as in:

20% of the tweets you see come from @someuser, 15% from @another_user, 10% from @yet-another-user
danse commented 7 years ago

Another name was Tiversify

danse commented 7 years ago

created accounts unlaud, tiversify, tiplicity

danse commented 7 years ago

Brooke suggested unlaud, i should delete the other accounts

danse commented 7 years ago

https://twittercommunity.com/t/how-to-make-a-twitterbot/2884

danse commented 7 years ago

Useful Haskell libraries:

danse commented 7 years ago

There doesn't seem to be documentation from Twitter specifically for bots. The only reference seems to be the REST and streaming interfaces guide

danse commented 7 years ago
danse commented 7 years ago

Queue management

It looks like i'm limited to one request per minute. In this case, it's highly likely that an user might have to wait before getting their answer from Unlaud. It seems rather simple to calculate the time needed for an answer, but i will need to keep a queue.

As an intermediate step, i could keep state to the minimum. Not keeping a queue, but only a semaphore indicating whether the bot is calculating something or it's free to perform a new request. This limits a lot the reach of the bot, but puts us in a good position to eventually extend features if desired

danse commented 7 years ago

Rate limiting

I started to write the high level code. The sequence of actions would be simpler if i hadn't to include the rate limiting logic. I am studying how rate limiting would work with Haskell libraries like http-client, in order to structure the code in a way that is easy to develop, understand and maintain