Everything2
Near Matches
Ignore Exact
Full Text
Everything2

Donginger

"Donginger" is also a: user

created by Senso

(person) by Senso (4.7 hr) (print)   ?   8 C!s I like it! Thu Mar 20 2008 at 18:59:37

A bot is born

Donginger is a bot written in Python by yours truly. The inspiration came after a discussion in the chatterbox about chatbots, near the end of February 2008. Its original name was going to be Buttbot (after seeing an IRC buttbot in action) but gnarl suggested Donginger and it stuck.

Its first function was to quote, every 10 minutes, the last message in the catbox and randomly replace words with one of the following: butt, dong, crotch, wang. Evidently, this generated a few laughs here and there but mostly a lot of complaining from all the unfunny users of the chat. Eventually, people started suggesting new features and I've tried to implement most of them.

Due to bugs and poor testing of my part, there have been stories of Donginger flooding the catbox with nonsense until forcibly stopped. I believe that right now, most bugs have been corrected and I test all the new features in the Political Asylum.

Donginger now has a Facebook account: http://www.facebook.com/profile.php?id=1188676721
Friend him up!

Features

  • New: donginger random USERNAME will return a random quote by that user.
  • New: donginger last USERNAME will return the last thing say by this user.
  • New: Karma counter. It keeps track of all "++" and "--" said. You can check the current karma of something/someone by asking Donginger: karma WORD
  • Placing the word "cool" anywhere in a sentence will make him reply with a random recently Cooled write-up.
  • "Tell me/us about X" will generate a random markov chain sentence (completely unrelated to X) from its database archive.
  • "Tell me/us about [link]" will generate a random markov chain sentence taken from the text of the node linked.
  • He will reply to questions with a random reply.
  • He will reply to any and all mentions of Bag of Crushed Child. He likes that little fellow.
  • Anything else directed at him will be "buttified": random swapping of words with random stupid words.
  • Other minor secret functions and easter eggs.
Most of Donginger's actions are triggered by starting your message with "Donginger:"

Technical stuff

Donginger keeps its own archive of the catbox, using an SQLite database. As of this writing, there are 14,000 lines of chat in it. This body of text is splitted into separate sentences and stored into a dictionary for later use by the Markov Chain function, which uses a modified version of Greg McFarlane's Python port of the Mark V. Shaney program.

Originally, the catbox parsing was done by fetching the HTML source code of the page, isolating the DIV containing the chat messages, removing all tags and looping over all the lines one by one, keeping the author and the message.

That was quite impractical but I thought it was the only way to go. That is, until kthejoker asked me if I was aware of all the XML tickers available. After a good five minutes of stunned silence, I rewrote everything to take advantage of this - halving the total code length in the process.

In order to parse the catbox, Donginger now uses the xml.dom.minidom Python module to go through the obsolete chatterbox xml ticker.

Todo list

  • Make him take orders from private messages.
  • Make him parse homenodes.
  • Use the other XML tickers to allow more "useful" features.

Source code

I am not going to release the source code, firstly because I don't want to see 15 different bots in the chat. Secondly, I want to keep development to myself. Finally, I'm not a professional programmer and I'm always a bit shy to show my work.

The source code has 520 lines.


printable version
chaos

E2 Explorer I hate this god damn robot Bag of Crushed Child Choking on the miasma of Geek Pride
Facebook Seth Rogen Mutual masturbation Hoodoo of limited efficacy (a love story)
Technically, it's unlikely you were dropkicked by Jesus The fall and rise of online community Nerds, geeks, dorks and losers Hope Sandoval and the Warm Inventions
The TADS at Shenanigans Facebook destroys real relationships Why you are unlikely to meet a Shia Muslim named Omar I REALLY hate this god damn robot
Donginger, draped in the apocalypse When the lion feeds Bad Quality mentally handicapped
Julie Ruin School-age teenagers should be given compulsory spelling and grammar lessons March 20, 2008 Emacs
Y'know, if you log in, you can write something here, or contact authors directly on the site. Create a New User if you don't already have an account.
  Epicenter
Login
Password

password reminder
register

Everything2 Help

Cool Staff Picks
Look at this mess the Death Borg made!
Extracting pure caffeine from tea
The Gospel-Blues Continuum
How the Alphabet Began
Jean-Paul Sartre
Harry's Bar
In Memoriam
Dracula
London's calling, and it's calling you gay
Peanuts
Charles M. Schulz
Everything Daylogs
The Ten Commandments Judge
Buying an electric guitar
New Writeups
Wuukiee
May 15, 2008(idea)
locke baron
Kuznetsov class aircraft carrier(thing)
_lesra
for abby(thing)
Adaptive Child
Annie's garden salsa(recipe)
Simulacron3
Zig-Zag(thing)
Ouzo
questions(idea)
Ouzo
Special Grilled Cheese(fiction)
Noung
Tiananmen Square Massacre(idea)
aneurin
Lord St Clair(person)
artman2003
Assholes and Douchebags: A Comparison(person)
locke baron
Tyan Thunder K8WE(thing)
locke baron
Udaloy class destroyer(thing)
Scaevola
Same-sex marriage(idea)
SteveMurrayFromNZ
British Standard Handful(idea)
nailbiter
nerve stapling(thing)
This affordable entertainment brought to you by The Everything Development Company