toosuto-r / qchat

KDB+ end-to-end RSA encrypted chat fun
8 stars 3 forks source link

Change configuration of bot names #30

Open jonathonmcmurray opened 6 years ago

jonathonmcmurray commented 6 years ago

Currently all the bots are named in code like so:

workernames,:`news`music`bitcoin`defino`stock`shame`wiki`urbd`ant`syn`rhym`stream`buyr`aoc`simp`clng!"[",/:$[10;("NEWSBOT";"LASTFMBOT";"BTCBOT";"DICTBOT";"STOCKBOT";"SHAMEBOT";"WIKIBOT";"URBANBOT";"ANTONYMBOT";"SYNONYMBOT";"RHYMEBOT";"STREAMBOT";"INVESTOBOT";"AOCBOT";"REFBOT";"CLNGBOT")],\:"]:" / bot names used when printing to chat

This seems unwieldy and is perhaps a prime candidate for movement into a config file? Should be simple to convert enough to convert to e.g. a CSV & parse.

There are potentially other candidates of mappings like this that could be in configs rather than defined inline in the code

Thoughts? Or a better way to do this?

ThomasSmyth commented 6 years ago

Config for the worker functions may help keep them separated (related to my other comment).

ThomasSmyth commented 6 years ago

Chat action dictionary tf is also quite large, may be a candidate too. Although it is quite fractured across the codebase.

jonathonmcmurray commented 6 years ago

Counter point - if (as discussed in issue #31) we have a separate script for each worker, could worker name be set by a callback function (similar to my suggestion there for an addapi function)? This would mean everything is completely contained within the q script for a given worker, so adding/removing a worker is a single file job

jonathonmcmurray commented 6 years ago

Help message?

EDIT: Gonna open a new issue related to help messages... -> #34