MyNixOS website logo
Description

Lambdabot core functionality.

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

Manage plugins, network connections, configurations and much more.

lambdabot Build Status

Lambdabot is an IRC bot written over several years by those on Libera's (formerly 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 >= 8.2. 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-8.10.5"

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 <[email protected]>
    aka mokus on #haskell

REPOSITORY

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

CONTRIBUTING

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

Metadata

Version

5.3.1.2

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows