Difference between revisions of "Lambdabot"

From HaskellWiki
Jump to navigation Jump to search
(update links, sp)
(+small section on building)
Line 40: Line 40:
 
* [http://tinyurl.com Tiny URL] generation
 
* [http://tinyurl.com Tiny URL] generation
 
* Much more...
 
* Much more...
  +
  +
=== Installing ===
  +
If you are using GHC 6.8.x, just <tt>[[cabal install]] lambdabot</tt>. 6.10.x support is forthcoming; see [[/Building]] for details on that.
   
 
=== Interacting with the Bot ===
 
=== Interacting with the Bot ===

Revision as of 19:02, 8 December 2008

Lambdabot

Lambdabot is an IRC bot written over several years by those on the #haskell IRC channel. It also operates in an offline mode as a Haskell development tool, and embedded as an extension to ghci.

Lambdabot lives here. Lambdabot's source is available via a darcs repository, here

Lambdabot is written in Haskell, and supports plugins for adding new commands. It has many plugins, including:

  • Haskell evaluation (with persistent declarations)
  • Hoogle interface
  • Pointfree refactoring
  • A theorem prover, Djinn.
  • Two free theorems generators
  • A testing rig using QuickCheck
  • Another test rig using SmallCheck
  • A lambda calculus interpreter
  • A Unlambda interpreter
  • A Brainfuck interpreter
  • Haskell type and kind checking
  • Dynamic plugin composition
  • Haskell library source lookup
  • Language translation
  • Quotes
  • Todo lists
  • Irc functions
  • Darcs patch tracking
  • A vixen/eliza personality
  • Random dice
  • Project database
  • Dictionary lookups
  • Karma tracking
  • User poll and election support
  • Search Google, Wikipedia and more
  • Spell checking
  • Tiny URL generation
  • Much more...

Installing

If you are using GHC 6.8.x, just cabal install lambdabot. 6.10.x support is forthcoming; see /Building for details on that.

Interacting with the Bot

Almost all commands start with an @ or ?. A command is invoked by writing @<command-name> [args]. For example @type map will make lambdabot respond with (a -> b) -> [a] -> [b].

The special command @run has a synonym >, meaning that you can evaluate Haskell expressions dynamically with:

 > map (+1) [1..10]
 [2,3,4,5,6,7,8,9,10,11]

Good commands to know are @help and @list. The full command list is here.

Contributing

Lambdabot is an open-source application. The @version command provides details on where to find the source. Anyone may write a plugin. To submit a plugin, use darcs send to submit it to the bot's current maintainer.

For more info, see the sources or ask the bot itself. If you have any questions about Lambdabot, ask on the #haskell irc channel.

How can it securely execute Haskell, on the Web?

See Safely running untrusted Haskell code

@version

A list of various lambdabots over time.

  #haskell                       lambdabot 4p534, GHC 6.6 (Linux i686 2.66GHz)
  #haskell                       lambdabot 4p255, GHC 6.5 (OpenBSD i386)
  #haskell                       lambdabot 4p172, GHC 6.5   (OpenBSD i386)
  #haskell                       lambdabot 3p396, GHC 6.4.1 (Linux i686 3.20GHz)
  #haskell                       lambdabot 2p200, GHC 6.4 (OpenBSD i386)
  #haskell                       lambdabot ghc-6.2.2 (Mar 30 20:48:23 EST 2005)  (OpenBSD i386)
  #maya                          lambdabot 3.1p48, GHC 6.5   (OpenBSD i386)
  #dutchhack (irc.cyberarmy.net) lambdabot 3p399, GHC 6.4.1 (Linux sparc64)

Lambdabot 2

Sketch of design for a new lambdabot, smaller, more maintainable, more reliable. Features:

Core:

  • highly concurrent, as for lambdabot 1
  • multiple servers
  • configuration scripts
  • reliable, robust state checkpointing
  • command line, irc, and ide interface
  • simple plugin api
  • single cabalised bundle

New plugins:

  • beta reduction/term rewriting
  • hackage search
  • rss subscription

Improved plugins:

  • Hoogle