gasolin / webbybot

chatterbot written in es6 (es2015), fork from hubot
68 stars 11 forks source link

Porting motivations #21

Closed jrburke closed 8 years ago

jrburke commented 8 years ago

I saw a note somewhere about "porting Hubot from coffeescript to es6". What are the motivations for doing so vs just building on top of Hubot as-is?

gasolin commented 8 years ago

I've traced hubot and create a bot with some adapter and integrate with several plugins for test purpose: https://github.com/gasolin/huhu

But during the experiment, I got several critics:

  1. the core is not actively maintained
  2. It's express.js version is old
  3. coffeescript is not the future
  4. the response is done by regex parsing by each plugins, its not ideal for quick parsing and conversational interface

As we planned some features that can't be fulfilled and not easy to patch the hubot without breaking its compatibility. Since the hubot core is compact and can be converted in ~1 week, we decide to port it to es6, learn more around chatbot framework then build new features.

What's in my mind to make improvement from hubot:

  1. multiple adapters (so bots can listen to every user preferred messaging apps)
  2. nature language processing / centralized command parser instead of regex parsing by each plugins
  3. conversation
  4. command alias
  5. commands combination (piping, batching)
  6. Web config/dashboard integration
  7. OAuth web services via web interface ...
jrburke commented 8 years ago

OK, it just seemed secondary to proving out webbybot. And while I am not a fan of coffeescript, the experiment I did was fine to just let that core part be in coffeescript but writing my bot specific code in the JS of my choice. It seemed more beneficial to help extend hubot directly, given its larger community vs creating something that may diverge at some point.

But I can see the technical interest in getting to know how the bot stuff worked on a lower level. Closing as not a bug ticket, just a discussion ticket.

gasolin commented 8 years ago

thanks for rising the question, it still worth to add more references for record:

By the way it might be possible to load hubot .coffee modules through require.extensions magic, so webbybot might still benefit hubot directly at its early stage.

gasolin commented 8 years ago

We've ported hubot to ES6, compatible with all coffeescript plugins, and learned how chatbot works

related post here http://blog.gasolin.idv.tw/2016/03/how-we-ported-hubot-from-coffeescript.html