ArtemGr / Sidekick

Dice and LFG bot for Discord.
MIT License
250 stars 39 forks source link

Merge Sidekick into another bot? #289

Open Omio opened 3 years ago

Omio commented 3 years ago

Heya. As you've recommended, you were encouraging users to use other dice-rolling bots.

I know of another bot that is both smaller (in terms of how many servers it's on) and larger (in terms of the versatility of its toolkit). Would you be opposed with having another few developers look over and salvage Sidekick's code, for implementation in 42? They easily have the resources to scale her up, with a larger appeal than just the D&D sect, AND they already have a strong tie to Discord internal staff. It would also mean that you can leave the project in capable hands, and make other projects into reality.

Said developers are unlikely aware that I am asking on their behalf, but if the approval happens now, I will be flinging them a Discord "feature request" to further build the bridge. You've mentioned wanting to see someone "resurrect Sidekick." I have a marginally different idea that will accomplish the spirit of this goal.

As my closing point, I'd also be incredibly excited to see my two favorite bots merge. <3

ArtemGr commented 3 years ago

Something I consider looking into is NodeJS WASM packages. (Porting some of the https://github.com/trachten/cpisync into WASM was on the plate, for example).

(https://www.npmjs.com/package/lz4-wasm is an example of how NOT to do it - it requires webpack instead of talking with WASM directly)

Publishing the Rust dice engine as a WASM package might be an interesting experiment therefore. But it would require some work here first and not in the codebase of some other bot.

Omio commented 3 years ago

If there's an implementation of the Rust dice engine that's even remotely readable, I'll see what I can then do to solve the network troubles with Cloudflare being potato. It might just be that the bot needs to just auto-restart/rebuild at an arbitrary time.

Just keep in mind, my native language is Python. Anything outside of that is going to be a "dirty" fix for me. D:

ArtemGr commented 3 years ago

to solve the network troubles with Cloudflare being potato

No, providing a service is not something I'm focusing on.

We're at a point where people loose their personal capacity for tools and tinkering, in favor of convenient services "in the cloud" (cf. https://youtu.be/pW-SOdj4Kkk). One of my interests presently is in going backwards towards tinkerable tools.

Releasing parts of Sidekick means spending my time to slice and dice at the code again, and I want it to be aligned to some of the directions I'm currently interested in.

p.s. Using the Sidekick engine from an ObservableHQ page (loaded as a WASM library), and making a canvas graphics of the randomness, might be an interesting beacon.

Just keep in mind, my native language is Python

Can you run WASM from Python?

nitz commented 3 years ago

Hey y'all. Sidekick was long one of my favorite bots and I was sad to see the issues you've run into over the end months of it's life.

As a bit of a personal project, but also as a desire to "get sidekick back", I've spent a bit writing in C# what is effectively a functional doppelganger of Sidekick, which I'm currently calling MathRox. I've split the dice expression parsing and random generation off to a separate library called NumberStones, and MathRox just serves as the Discord frontend.

It's not at all nearly "production ready", and is still missing several of the things I used Sidekick for (cards, remembering rolls, etc.) I plan to continue tinkering on it, but it's stable enough that I thought I'd share with anyone interested. It handles almost all of the complicated math & dice rolls you can throw at it, but the interface/presentation leaves a lot to be desired. For instance, the parser/roller supports things like checking for successes, but the bot just plops everything to the channel as the same text right now:

image

If you're interested in running your own instance, spin up the code and get API keys set, and you should be off to the races. I'm going to be leaving my personal instance running, which you're welcome to add to your server. I'm just running it on my local machine for now, so odds are it'll be up and down randomly, so don't rely on it that heavily. That said, if you break it I'd love feedback!

Thanks for the fantastic bot in the past, @ArtemGr; I definitely understand where you're coming from with your motivations. Hope all is well.

Monadic-Cat commented 3 years ago

It's been months since you asked this, but...

Can you run WASM from Python?

You can. There are bindings for Wasmtime and Wasmer (the two big standalone WASM engines I'm aware of) on Python, along with a host of other languages.