Modbot to Help You Run Games: Now With A Votecounter Demo!

This forum is for discussion related to the game.
Psyche
mr. personality
 
User avatar
Joined: April 28, 2011
Location: pacing the road to damascus
Pronoun: He

Post Post #150  (ISO)  » Sun May 20, 2018 9:21 pm

there's actually so much to do i've felt overwhelmed. instead of trying to make a list i'll just go through things one step at a time.
sufjan's gonna write a song about me

davesaz
Jack of All Trades
 
User avatar
Joined: August 25, 2014
Location: Class of 93
Pronoun: He

Post Post #151  (ISO)  » Sun May 20, 2018 10:18 pm

Oh hey I see references to github?
Playing modded minecraft: Dungeons & Dragons & Space Shuttles pack
Thread here

tn5421
Mafia Scum
 
User avatar
Joined: March 31, 2014
Location: Florida
Pronoun: He

Post Post #152  (ISO)  » Mon May 21, 2018 6:54 am

In post 151, davesaz wrote:Oh hey I see references to github?


https://github.com/MafiaScum-Unofficial/modbot
Recovering rageposter.

yessiree
Mafia Scum
 
User avatar
Joined: June 06, 2013
Pronoun: He

Post Post #153  (ISO)  » Mon May 21, 2018 4:57 pm

it occurred to me that we could just write batch scripts that run the python files, then WindowsTM users can download the source code with the .bat files, and simply run the batch scripts

this is much much simpler than the whole web app thing with flask

it's worth serious consideration

davesaz
Jack of All Trades
 
User avatar
Joined: August 25, 2014
Location: Class of 93
Pronoun: He

Post Post #154  (ISO)  » Mon May 21, 2018 5:44 pm

I'd be in favor of easy. Took a look at the github and I can recognize it as code but have not yet grokked how it works. (my server side background is a liability on this stuff lol)

It's not a mod bot item but I'm interested in making something that pulls all the posts in a thread and catches who mentions / references / quotes whom, by post number and/or date. So pulling posts and identifying player names within posts.
Playing modded minecraft: Dungeons & Dragons & Space Shuttles pack
Thread here

Psyche
mr. personality
 
User avatar
Joined: April 28, 2011
Location: pacing the road to damascus
Pronoun: He

Post Post #155  (ISO)  » Mon May 21, 2018 5:54 pm

it sounds like your purpose with that is for scumhunting or something?
sufjan's gonna write a song about me

davesaz
Jack of All Trades
 
User avatar
Joined: August 25, 2014
Location: Class of 93
Pronoun: He

Post Post #156  (ISO)  » Mon May 21, 2018 6:34 pm

Dunno if it's useful for that, mainly to see what the result looks like. ;)
Playing modded minecraft: Dungeons & Dragons & Space Shuttles pack
Thread here

Psyche
mr. personality
 
User avatar
Joined: April 28, 2011
Location: pacing the road to damascus
Pronoun: He

Post Post #157  (ISO)  » Mon May 21, 2018 6:48 pm

we have stuff in the repo that would support that and i can help you figure out how to use it
my vote extractor can probably be altered to find references to users in posts in general, and there's a couple of different versions of post scrapers in the thread
but it's not something we'll likely focus on in the short term since we're focused on modding tools
eventually i'll pivot to the sorts of questions ur interested in
sufjan's gonna write a song about me

davesaz
Jack of All Trades
 
User avatar
Joined: August 25, 2014
Location: Class of 93
Pronoun: He

Post Post #158  (ISO)  » Mon May 21, 2018 7:03 pm

Oh, right didn't expect you to do anything, was just commenting on what i'm thinking of doing. :)
Playing modded minecraft: Dungeons & Dragons & Space Shuttles pack
Thread here

Psyche
mr. personality
 
User avatar
Joined: April 28, 2011
Location: pacing the road to damascus
Pronoun: He

Post Post #159  (ISO)  » Mon May 21, 2018 7:20 pm

I'd really like to help, though! I would really like this repo and repos associated with it to help people with diverse goals related to the site.

Here's what I can give you right now:

My VoteExtracter class at the bottom of this notebook: https://github.com/MafiaScum-Unofficial ... nter.ipynb
It's currently designed to only work on stuff around vote tags (or broken vote tags), but the core of its functionality is to discern when a poster is using a mispelling, abbreviation or other reference to a user besides their username. I'll try to fix that up soon so that you have direct access to said functionality.

This notebook here: https://github.com/MafiaScum-Unofficial ... mals.ipynb
Modify start_urls to include the threads you're interested in, and it'll scrape posts super quickly, resulting in a file with all the key information about each post in that thread you'll need

once the VoteExtracter is repurposed, all you'll have to do is scan through each post in each thread you scrape (i'd recommend the threads described here: https://github.com/MafiaScum-Unofficial ... rchive.txt) and register if the repurposed function outputs a playername match or not. It'll be great...
sufjan's gonna write a song about me

Flubbernugget
Survivor
 
User avatar
Joined: June 26, 2014
Pronoun: He

Post Post #160  (ISO)  » Mon May 21, 2018 8:17 pm

In post 153, yessiree wrote:it occurred to me that we could just write batch scripts that run the python files, then WindowsTM users can download the source code with the .bat files, and simply run the batch scripts

this is much much simpler than the whole web app thing with flask

it's worth serious consideration

This is a good idea. One of my big concerns with the web gui interface was that it never seemed like it would make for good UX no matter how good the UI could be done. In the scheme of trying to attract more users to what is now a bit of a "clunky" site that was a bit of an issue. Now instead of trying to spin up a server it's literally just clicking an icon.

Flubbernugget
Survivor
 
User avatar
Joined: June 26, 2014
Pronoun: He

Post Post #161  (ISO)  » Mon May 21, 2018 8:27 pm

In post 119, Psyche wrote:push the code if you want; i have some ideas for figuring out what's wrong

Was there a resolution on this? I don't see anything on the activity overview as a github issue, but it was a bit of an upper bound anyway.

Psyche
mr. personality
 
User avatar
Joined: April 28, 2011
Location: pacing the road to damascus
Pronoun: He

Post Post #162  (ISO)  » Mon May 21, 2018 8:56 pm

i haven't had the chance to do as much work on the modbot project as i wanted to this weekend
i should be free for a bit after making a meeting this tuesday afternoon, and plan to focus it all on the bugs that have come up in the thread lately
sufjan's gonna write a song about me

yessiree
Mafia Scum
 
User avatar
Joined: June 06, 2013
Pronoun: He

Post Post #163  (ISO)  » Thu May 24, 2018 3:49 pm

pull requests don't age like wine

tn5421
Mafia Scum
 
User avatar
Joined: March 31, 2014
Location: Florida
Pronoun: He

Post Post #164  (ISO)  » Thu May 24, 2018 5:47 pm

In post 163, yessiree wrote:pull requests don't age like wine
Recovering rageposter.

yessiree
Mafia Scum
 
User avatar
Joined: June 06, 2013
Pronoun: He

Post Post #165  (ISO)  » Sun May 27, 2018 5:18 pm

cool. I see stuff being merged in.

In post 160, Flubbernugget wrote:
In post 153, yessiree wrote:it occurred to me that we could just write batch scripts that run the python files, then WindowsTM users can download the source code with the .bat files, and simply run the batch scripts

this is much much simpler than the whole web app thing with flask

it's worth serious consideration

This is a good idea. One of my big concerns with the web gui interface was that it never seemed like it would make for good UX no matter how good the UI could be done. In the scheme of trying to attract more users to what is now a bit of a "clunky" site that was a bit of an issue. Now instead of trying to spin up a server it's literally just clicking an icon.


i have the POC for this ready so will probably polish it then send it for review some time tomorrow
basically, as a user, you just need to:
1) download python
2) download the source code of this repo
3) change some settings in a text-based configuration file, such as thread url, username, pw, etc...
4) click on a .bat file to run a specific feature of donbot

Psyche
mr. personality
 
User avatar
Joined: April 28, 2011
Location: pacing the road to damascus
Pronoun: He

Post Post #166  (ISO)  » Mon May 28, 2018 5:14 pm

That's a lot, though!
sufjan's gonna write a song about me

Psyche
mr. personality
 
User avatar
Joined: April 28, 2011
Location: pacing the road to damascus
Pronoun: He

Post Post #167  (ISO)  » Mon May 28, 2018 5:37 pm

Ok, so let's take a step back for a moment. The UI for my flask strategy isn't good, and probably won't ever be super good. How can we make using my app an easier and more seamless experience but avoid maintaining some external server?

In my mind, and it pains me to say this, the most definite way to do this would be to translate our code base into JavaScript.
If we do that, the backend is totally taken out of the equation.
With a little extra work we can minimize the frontend too by putting everything into a much-easier-to-install browser extension that directly interacts with whatever thread a game moderator has open at the moment

I'm trying to think about an alternative product we can create for mobile users, but I'm sure we can think of something - a static network of webpages hosted on github at worst.
sufjan's gonna write a song about me

Psyche
mr. personality
 
User avatar
Joined: April 28, 2011
Location: pacing the road to damascus
Pronoun: He

Post Post #168  (ISO)  » Mon May 28, 2018 5:54 pm

Translating the code would be challenging, but perhaps not as challenging as you'd think.
There exists out there a variety of tools for translating Python code into Javascript code automatically, and I've found them pretty neat to use.

The big difficulty with them, though, is that in cases where we rely on Python modules to get work done, we will usually have to find an alternative Javascript library to support our work. Even in this case, we will still be able to do our coding work in Python if we want to - I believe that it's Brython that lets us write stuff in Python depending on Javascript libraries without much difficulty (but I might be wrong).

What'll happen, though, is that sometimes the js package we need either doesn't exist or outputs results in a somewhat different way than the original python module we were used to. So we'll have to modify our code to adapt to these circumstances.

The only place where I think this will be a substantial challenge is for my votecounter, as it relies in part on at least one pretty obscure module (this one: https://github.com/rfk/pyenchant/blob/m ... t/utils.py) that I probably won't find *quite* the same anywhere else. We'll have to also find something to replace our dependency on the requests and lxml packages, but some initial research suggests we have loads of options.
sufjan's gonna write a song about me

davesaz
Jack of All Trades
 
User avatar
Joined: August 25, 2014
Location: Class of 93
Pronoun: He

Post Post #169  (ISO)  » Mon May 28, 2018 5:58 pm

Would it help if the "server" part was integrated right into the site?
I don't know if that's possible, just asking...
Playing modded minecraft: Dungeons & Dragons & Space Shuttles pack
Thread here

yessiree
Mafia Scum
 
User avatar
Joined: June 06, 2013
Pronoun: He

Post Post #170  (ISO)  » Mon May 28, 2018 6:04 pm

I foresee some limitations but JS is my main language so im for it

also
In post 51, yessiree wrote:have you considered Node.js?

if there's a python package there's most likely an NPM equivalent

yessiree
Mafia Scum
 
User avatar
Joined: June 06, 2013
Pronoun: He

Post Post #171  (ISO)  » Mon May 28, 2018 6:09 pm

In post 169, davesaz wrote:Would it help if the "server" part was integrated right into the site?
I don't know if that's possible, just asking...

it's definitely possible, but it wouldn't benefit the average user at all, as it would only be useful for developers. So there isn't much value for something like that, especially given they are already short on resources, and the migration is probably the highest priority anyway

davesaz
Jack of All Trades
 
User avatar
Joined: August 25, 2014
Location: Class of 93
Pronoun: He

Post Post #172  (ISO)  » Mon May 28, 2018 6:19 pm

I was under the impression that the need for switching out of python was because a user of the bot needs a server. Did I miss something?
Playing modded minecraft: Dungeons & Dragons & Space Shuttles pack
Thread here

yessiree
Mafia Scum
 
User avatar
Joined: June 06, 2013
Pronoun: He

Post Post #173  (ISO)  » Mon May 28, 2018 6:26 pm

I dont know what you're confused on so idk what to say

Psyche
mr. personality
 
User avatar
Joined: April 28, 2011
Location: pacing the road to damascus
Pronoun: He

Post Post #174  (ISO)  » Mon May 28, 2018 6:27 pm

I have another idea, but it's kind of weird.
There's now a google docs for iPython notebooks, you see: https://colab.research.google.com/noteb ... come.ipynb
The big sell of these is that they enable realtime collaboration on iPython notebooks across the web, but we could *potentially* also use the runtimes that come with these notebooks to eliminate the need for any backend for our apps.

Unlike the static notebooks you've seen so far from me, there's *loads* of flexilibity we have when deciding what a dynamic one will look like.
we can hide code (or replace them with forms), we can intermix python with HTML and Javascript to produce interactive interfaces, and a lot more, all triggered once a user clicks play on the relevant cell
the result is that they can get all the functionality our code offers just by going to a link much like the one above, and we have a lot more tools to make the experience of accessing all that cleaner

some other cool features:
- code you start running from the notebook will keep running even if you close your browser window
- notebooks can be used on smartphones and similar mobile devices
- much easier transition from adding functionality to Modbot to having a client-side tool for using it (your notebook literally is the app!)

one thing currently kills this idea, though:
the virtual machine that get assigned to you when you start this notebook has a maximum lifetime enforced by the system (i'm not sure exactly how long it is - maybe a few hours?)
this means bots that are supposed to just work for hours and hours in the background will eventually be stopped after a certain amount of time running
i think this issue can be resolved with a simple chrome extension (one i believe already exists in the chrome store) that automatically restarts the server when this happens and resumes operation
an alternative is to have users interested in immortal bots set up their own local runtimes that will never expire. This creates the same ugly situation we have with my flask app, though.
finally, we can measure the maximum lifetime a runtime can have, and have our notebooks send reminders to users about their pending deaths to hurry and save them.
but i think a chrome extension would work!

there are other challenges of course
- connecting to a google cloud runtime and setting up a virtual server to run our app would take time - i'm not sure how long, especially if we work to keep our modules dependency-lite, but right now just connecting to the runtime seems to take ~5 seconds
- you guys don't have any experience with jupyter, i think (or frontend languages?)
sufjan's gonna write a song about me

PreviousNext
[ + ]

Return to Mafia Discussion