Welcome to the Functional Programming Zulip Chat Archive. You can join the chat here.
@Asad Saeeduddin We don't have Lambdabot yet - we would need some server to power zulip bot itself
@TheMatten Is it possible to run this server in a Docker container?
I have a VPS I can run it on, provided it can be resource limited and isolated from the rest of the system
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
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
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
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
that said if it's inside a container I don't really care whether it uses safe or unsafe features
is a hint based bot persistent, or can it be started up to serve a request and then disposed?
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
So if we ran every request in separate InterpreterT, it should "clean up" after itself?
i don't see the appeal to lambdabot
ghci is only four letters long :)
@Sandy Maguire I wanted to try out some free theorems, idk how you do that in ghci
how do you mean
The article I was looking at online said you can do it in lambdabot
Lambdabot has a feature where you can give it a type and it will tell you the free thorems of that type
they're not too much work to run the maze on
Okay guys, I have (maybe crazy) idea how to do this basically for free:
And I mean, it should be simple to generalize this to any of the supported languages
Worth noting that Google Cloud Run lets you run cloud functions from arbitrary Docker images with a generous free tier and built-in runtime restrictions
I think that could cover pretty much everything, the webhook could be directed towards the cloud run endpoint