Lambdabot - Haskell

Welcome to the Functional Programming Zulip Chat Archive. You can join the chat here.

TheMatten

@Asad Saeeduddin We don't have Lambdabot yet - we would need some server to power zulip bot itself

Asad Saeeduddin

@TheMatten Is it possible to run this server in a Docker container?

Asad Saeeduddin

I have a VPS I can run it on, provided it can be resource limited and isolated from the rest of the system

TheMatten

It think it shouldn't be a problem - though I would like to create our own bot based on hint if possible, because original Lambdabot is a little bit buggy and has limited imports

TheMatten

We should be able to limit resources through GHC flags - then there's Safe flag to limit unsafe features of language, plus we could provide some fake IO with limited functionality

TheMatten

And it would be nice to be able to import some restricted set of common packages, or at least have them available - like, most of Kmett's stuff

Asad Saeeduddin

I'm not sure I trust resource limiting at the application level that much. If I run it on my VPS I'd want to put it in a Docker container and enforce network/file/resource access using the standard containerization primitives

Asad Saeeduddin

that said if it's inside a container I don't really care whether it uses safe or unsafe features

Asad Saeeduddin

is a hint based bot persistent, or can it be started up to serve a request and then disposed?

TheMatten

We can do both - it could potentially limit amount of needed restarts if users try something fancy, and one never knows if there isn't something Docker could potentially miss
Not sure how hint handles it precisely - but looking at code it seems like it's InterepreterT is run by initializing new GHC session?: https://www.stackage.org/haddock/lts-14.25/hint-0.9.0.2/src/Control.Monad.Ghc.html#rawRunGhcT

TheMatten

So if we ran every request in separate InterpreterT, it should "clean up" after itself?

Sandy Maguire

i don't see the appeal to lambdabot

Sandy Maguire

ghci is only four letters long :)

Asad Saeeduddin

@Sandy Maguire I wanted to try out some free theorems, idk how you do that in ghci

Asad Saeeduddin

The article I was looking at online said you can do it in lambdabot

Asad Saeeduddin

Lambdabot has a feature where you can give it a type and it will tell you the free thorems of that type

Sandy Maguire

they're not too much work to run the maze on