FEATURE: Improve dice rolling for discourse-narrative-bot (PR #7381)

GitHub

You’ve signed the CLA, neemiasvf. Thank you! This pull request is ready for review.

This pull request has been mentioned on Discourse Meta. There might be relevant details there:

I am definitely not comfortable pulling in a whole gem dependency here for this feature. Not against making it a bit better as long as we don’t carry too much extra code.

Yeah a whole new dependency for this is no bueno

On Mon, Apr 15, 2019 at 9:55 PM Sam notifications@github.com wrote:

I am definitely not comfortable pulling in a whole gem dependency here for this feature. Not against making it a bit better as long as we don’t carry too much extra code.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/discourse/discourse/pull/7381#issuecomment-483510693, or mute the thread https://github.com/notifications/unsubscribe-auth/ABc7VaNwiHP9wuLpgW3jkYQeaBPu10bZks5vhVeygaJpZM4cxVId .

Then I guess I’ll have to publish a plugin. The “problem” is way more complex than it seems and I’m not interested in reimplementing everything… :confused:

Sorry about it @neemiasvf I am just super protective about adding more dependencies to Discourse if you can think of a hook on narrative bot that makes implementing your plugin easier feel free to submit a patch

That’s okay @SamSaffron. I understand how dependencies can be a headache.

The “problem” is way more complex than it seems and I’m not interested in reimplementing everything… :confused:

Is it really though? I guess you could just start with the most used notations?

It kind of is. Not the actual calculation of the result itself, but the parser. Plus, the gem is beautifully written. In fact, I could integrate the gem implementation to the core code. I’m not up to implementing a new solution to the same problem, but I could recycle the same code. Would that be acceptable? :slight_smile:

I’d be very interested in the enhanced dice rolling as well. I’ve converted from vBulletin 4 a couple of days ago where I had a dice roller plugin that could do math as well. A plugin would be neat as well.