Page 7 of 9

Posted: Sun May 20, 2018 3:21 pm
by Psyche
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.

Posted: Sun May 20, 2018 4:18 pm
by davesaz
Oh hey I see references to github?

Posted: Mon May 21, 2018 12:54 am
by tn5421
In post 151, davesaz wrote:Oh hey I see references to github?
https://github.com/MafiaScum-Unofficial/modbot

Posted: Mon May 21, 2018 10:57 am
by yessiree
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

Posted: Mon May 21, 2018 11:44 am
by davesaz
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.

Posted: Mon May 21, 2018 11:54 am
by Psyche
it sounds like your purpose with that is for scumhunting or something?

Posted: Mon May 21, 2018 12:34 pm
by davesaz
Dunno if it's useful for that, mainly to see what the result looks like. ;)

Posted: Mon May 21, 2018 12:48 pm
by Psyche
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

Posted: Mon May 21, 2018 1:03 pm
by davesaz
Oh, right didn't expect you to do anything, was just commenting on what i'm thinking of doing. :)

Posted: Mon May 21, 2018 1:20 pm
by Psyche
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...

Posted: Mon May 21, 2018 2:17 pm
by Flubbernugget
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.

Posted: Mon May 21, 2018 2:27 pm
by Flubbernugget
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.

Posted: Mon May 21, 2018 2:56 pm
by Psyche
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

Posted: Thu May 24, 2018 9:49 am
by yessiree
pull requests don't age like wine

Posted: Thu May 24, 2018 11:47 am
by tn5421
In post 163, yessiree wrote:pull requests don't age like wine

Posted: Sun May 27, 2018 11:18 am
by yessiree
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

Posted: Mon May 28, 2018 11:14 am
by Psyche
That's a lot, though!

Posted: Mon May 28, 2018 11:37 am
by Psyche
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.

Posted: Mon May 28, 2018 11:54 am
by Psyche
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.

Posted: Mon May 28, 2018 11:58 am
by davesaz
Would it help if the "server" part was integrated right into the site?
I don't know if that's possible, just asking...

Posted: Mon May 28, 2018 12:04 pm
by yessiree
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

Posted: Mon May 28, 2018 12:09 pm
by yessiree
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

Posted: Mon May 28, 2018 12:19 pm
by davesaz
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?

Posted: Mon May 28, 2018 12:26 pm
by yessiree
I dont know what you're confused on so idk what to say

Posted: Mon May 28, 2018 12:27 pm
by Psyche
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?)