lambdabot: Lambdabot is a development tool and advanced IRC bot

[ development, program, web ] [ Propose Tags ]

Lambdabot is an IRC bot written over several years by those on the #haskell IRC channel.

It operates as a command line tool, embedded in an editor, embedded in GHCi, via internet relay chat and on the web.


[Skip to Readme]

Modules

[Index]

Downloads

Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 4.0, 4.1, 4.2.1, 4.2.2, 4.2.2.1, 4.2.3.0, 4.2.3.1, 4.2.3.2, 4.2.3.3, 4.3, 4.3.0.1, 5.0, 5.0.1, 5.0.2, 5.0.2.1, 5.0.2.2, 5.0.3, 5.1, 5.1.0.1, 5.1.0.2, 5.1.0.4, 5.2, 5.3, 5.3.0.1, 5.3.0.2, 5.3.1, 5.3.1.1, 5.3.1.2 (info)
Dependencies array (>=0.4), arrows (>=0.4), base (>=4.4 && <5), binary (>=0.5), brainfuck (==0.1), bytestring (>=0.9), containers (>=0.4), data-memocombinators (>=0.4), dependent-map (>=0.1 && <0.2), dependent-sum (>=0.2 && <0.3), dependent-sum-template (>=0.0.0.1), dice (>=0.1), directory (>=1.1), edit-distance (>=0.2), filepath (>=1.3), haskeline (>=0.7), haskell-src-exts (>=1.14.0), hoogle (>=4.2), hslogger (>=1.2.1), hstatsd (>=0.1), HTTP (>=4000), IOSpec (>=0.2), lambdabot, lifted-base (>=0.2), logict (>=0.5), misfortune (>=0.1), monad-control (>=0.3), MonadRandom (>=0.1), mtl (>=2), mueval (>=0.9), network (>=2.3.0.13 && <2.6), numbers (>=3000), oeis (>=0.3.1), parsec (>=3), pretty (>=1.1), process (>=1.1), QuickCheck (>=2), random (>=1), random-fu (>=0.2), random-source (>=0.3), regex-tdfa (>=1.1), SafeSemaphore (>=0.9), show (>=0.4), split (>=0.2), syb (>=0.3), tagsoup (>=0.12), template-haskell (>=2.7), time (>=1.4), transformers (>=0.2), transformers-base (>=0.4), unix (>=2.5), unlambda (>=0.1), utf8-string (>=0.3), vector-space (>=0.8), zlib (>=0.5) [details]
License LicenseRef-GPL
Author Don Stewart
Maintainer James Cook <mokus@deepbondi.net>
Revised Revision 1 made by AdamBergmark at 2015-10-16T15:44:50Z
Category Development, Web
Home page http://haskell.org/haskellwiki/Lambdabot
Source repo head: git clone https://github.com/mokus0/lambdabot.git
Uploaded by JamesCook at 2013-09-14T16:52:29Z
Distributions Debian:5.3.0.1, NixOS:5.3.1.2
Reverse Dependencies 1 direct, 0 indirect [details]
Executables lambdabot
Downloads 18823 total (70 in the last 30 days)
Rating 2.0 (votes: 1) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]

Readme for lambdabot-4.3.0.1

[back to package description]

lambdabot Build Status

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

PREREQUISITES

You'll need GHC >= 7.4. cabal-install is highly recommended.

External executable dependencies:

  • aspell for the "spell" spell-checking plugin. This is not a Haskell program, but is available in pretty much all Linux, BSD and Mac OS package managers.
  • bf for interpreting brainfuck programs. This is a provided by the "brainfuck" package on Hackage.
  • djinn for the "djinn" plugin, which tries to find Haskell functions matching arbitrary types. Available on Hackage.
  • ghc and mueval for the "eval" plugin, which evaluates Haskell expressions in chat (when prefixed with "> "; e.g. > 1 + 1). GHC is available from haskell.org (the Haskell Platform is recommended). Mueval is available on Hackage.
  • hoogle for the "hoogle" plugin, which provides a command for searching Haskell APIs. Available from Hackage.
  • GNU talk-filters (optional) for the "filters" plugin. Available via most package managers, I believe.
  • unlambda for executing unlambda programs. Available on Hackage.

Some of these dependencies (those with corresponding hackage libraries) will be installed by cabal, but not all of them will. In all cases, cabal does not actually track the executables so if they have previously been installed and deleted on your system (without unregistering the matching library), you will have to manually reinstall them.

RUNNING

Lambdabot can be installed system-wide or per user, but currently the lambdabot binary makes certain assumptions about what directory it is being run in & where files it needs can be found. (This is the subject of future work.)

Your best bet is currently to read the code and see what it does, and decide for yourself whether that's what you want.

OFFLINE MODE

lambdabot

CONNECTING

lambdabot -e 'rc online.rc'

SSL MODE (with stunnel)

append the following to your stunnel.conf:

client = yes
[irc]
accept = 6667
connect = ssl-irc-server.org:6667

and edit online.rc to use localhost as server, then restart the stunnel server and restart lambdabot with:

./lambdabot -e 'rc online.rc'

SCRIPTS

The scripts directory contains some shell scripts for Vim editor support
They are self-explanatory

CONFIGURING

Lambdabot uses an extensible configuration system which allows plugins to define their own configuration variables. The lambdabot core system defines several, listed in the module Lambdabot.Config.Core. The default lambdabot executable provides a command-line interface to set some of the most common ones, but currently the only way to set others is to define your own executable (which you must currently do anyway to change the default set of modules).

When doing so, configuration is passed in to the lambdabotMain function as a list of bindings. Configuration variables are bound using the :=> operator (actually the data constructor of the DSum type), for example:

ghcBinary :=> "ghc-7.4.2"

So a typical custom lambdabot executable might look something like:

module MyBot where

import Lambdabot.Main
{- import your plugins here -}

main = lambdabotMain myPlugins 
    [ configKey  :=> value
    , anotherKey :=> anotherValue
    ]

BUGS

Bug reports, patches, new modules etc., open issues on GitHub or contact:

    James Cook <mokus@deepbondi.net>
    aka mokus on #haskell

REPOSITORY

git clone https://github.com/mokus0/lambdabot

CONTRIBUTING

Send pull requests to mokus0 on github. Add yourself to the AUTHORS file if you haven't already.