1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[node.js] interesting chat bot

Discussion in 'General Programming Chat' started by Rushdie, Oct 26, 2011.

  1. Rushdie

    Rushdie BANNED BANNED

    Joined:
    Feb 2, 2009
    Messages:
    1,378
    Likes Received:
    1,720
    http://hubot.github.com/

    maybe some of you will use it by thinking outside of a box.

    really cool stuff.
     
    • Thanks Thanks x 4
  2. fimms

    fimms Junior Member

    Joined:
    Apr 30, 2009
    Messages:
    178
    Likes Received:
    59
    Location:
    Fineland
    Home Page:
    Interesting, got wings to thoughts.
     
  3. Rushdie

    Rushdie BANNED BANNED

    Joined:
    Feb 2, 2009
    Messages:
    1,378
    Likes Received:
    1,720
    there are also similar projects in other languages (ive seen python and ruby on github)
     
  4. fimms

    fimms Junior Member

    Joined:
    Apr 30, 2009
    Messages:
    178
    Likes Received:
    59
    Location:
    Fineland
    Home Page:
    So much wind I got, that decided to install tons of libraries and decencies and deploy my version of the bot to the Heroku clouds. What I did was to add own spinner script to the bot which takes multiline nested spin tax and spins it and returns answer in no time. It truly was fun and exciting to do. At the moment I can only share a screenshot of output:

    [​IMG]

    Hopefully other people get some inspiration from the system too. Think of getting your own SEO and content bot spread over the net :)

    Oh, I think I found a public channel to join and test it: https://www.hipchat.com/goasmLl6g

    Just pass message:

    HTML:
    @article spin me {Hi there|Greetings|Hi|Hello|Hello There}{!|,}
    
    I {really|simply|totally} {love|respect|admire} your {blog|article|post|opinion} and {will tell all my friends about it|will be back again tomorrow|also the design of your website}.
    
    {Thanks|Thank you|Cheers|Bye for now}!
    
     
    • Thanks Thanks x 1
    Last edited: Oct 30, 2011
  5. Rushdie

    Rushdie BANNED BANNED

    Joined:
    Feb 2, 2009
    Messages:
    1,378
    Likes Received:
    1,720
    nice good job man i played with it a little :))
     
  6. fimms

    fimms Junior Member

    Joined:
    Apr 30, 2009
    Messages:
    178
    Likes Received:
    59
    Location:
    Fineland
    Home Page:
    Cool, I noticed from logs :) hubot-scripts on github turns out to provide a lot of additional scripts for the bot. On example I use hipchat, but I guess any XMPP/Jabber compliant service can be used.
     
    • Thanks Thanks x 1
  7. fimms

    fimms Junior Member

    Joined:
    Apr 30, 2009
    Messages:
    178
    Likes Received:
    59
    Location:
    Fineland
    Home Page:
    I added few other useful commands for bot:

    spin me <query> - Returns a spun version of the input.
    spun me <query> - Returns a spintax version of the input using API.
    spun and spin me <query> - Returns a spun version of the input using spun me command first.
    spin the last spun - Returns a spun version of the input generated by the last spun me call.

    For example:

    Code:
    spun me Below it sat a wooden case of trophies and other awards. Several more were stacked into other corners, joining marble statues, weapon stands and a flat screen television. They all shined in the fire's light. At least he knew his mother and sister, who were overseas visiting the Queen of England, would be proud. He settled on calling them later, envisioning how they would congratulate him on bringing even more fame and wealth to the family. The invention cooking up in his basement right now was going to make him bigger than the internet.
    
    And then:

    Code:
    spin the last spun
    
    And repeat it to get different random versions.

    https://www.hipchat.com/goasmLl6g

    And please note, chat is open like 3 more weeks and article bot might be down at times because of development cycles.

    Now the coolest part is yet to be done: add hubot to gtalk account so there is no need for chat channel to use spin service.

    I have to say node.js is quickly becoming my favorite spare time programming language!
     
    Last edited: Nov 6, 2011
  8. frozenocean

    frozenocean Junior Member

    Joined:
    Sep 30, 2011
    Messages:
    100
    Likes Received:
    11
    Location:
    both arctic
    looks very interesting...I am also flapping my wings....
     
  9. Rushdie

    Rushdie BANNED BANNED

    Joined:
    Feb 2, 2009
    Messages:
    1,378
    Likes Received:
    1,720
    node is great, but im having problem with the so called callback spaghetti, and i dont really need realtime concurrent stuff so much, besides other languages have frameworks which do the same.
     
  10. fimms

    fimms Junior Member

    Joined:
    Apr 30, 2009
    Messages:
    178
    Likes Received:
    59
    Location:
    Fineland
    Home Page:
    node.js creator talks about it on http://nodejs.org/

    Idk, it might be code frustrating to carry cb thru every function, but it really will be seen with bigger projects, if its any problem. Web framework done with node.js resembled me about Clojure I played year or so ago.
     
  11. jorgos88

    jorgos88 Newbie

    Joined:
    Nov 8, 2011
    Messages:
    2
    Likes Received:
    0
    Interesting, I will take a look for this project :)
     
  12. deziner

    deziner Newbie

    Joined:
    Oct 22, 2010
    Messages:
    25
    Likes Received:
    15
    the nice github bot hehe :)