[squeak-dev] [ANN] TelegramBot framework & @SqueakSmalltalkBot :-)

Thiede, Christoph Christoph.Thiede at student.hpi.uni-potsdam.de
Wed Mar 17 12:31:50 UTC 2021


Hi all!


After announcing SimulationStudio and Sandbox yesterday [3], today I'm happy to introduce you to two other repositories which I have been working at during the last months. Last week, I had the pleasure to present them during the German Squeak Winter Demos [4]. Drum roll, say hello to TelegramBot [1] & TelegramSmalltalkBot [2]! :-)


TelegramBot is a small framework I built to make it possible to implement bots for the Telegram messenger [5]. It uses the official Telegram Bot REST API [6] and maps it to an object-oriented design in Squeak, providing support for different bot capabilities such as message sending, receiving, and editing. It also allows sending multi-media message types such as pictures (Forms), formatted messages (Texts), audio messages (AbstractSounds), and some others. Last but not least, it comprises a small API to host your bots in a background process of the image. For more information, check out the README.md of the repository in [1].


TelegramSmalltalkBot is a second repository that implements a Telegram bot for evaluating Smalltalk expressions by using the TelegramBot framework from above. Do you know this situation when you wonder "how does XYZ work in Squeak" and cannot check it out because you do not have any PC or laptop at hand right now? This situation is history as of today, just send a message to the bot from wherever you are, just using your phone or even your watch! In a nutshell, TelegramSmalltalkBot is a simple REPL shell that utilizes the Squeak Compiler, but it's also packed with a number of convenient features that make remote access to your image much more pleasant. For example, the bot does not only answer plain text but also multi-media messages such as pictures or files depending on the results of your expressions. You can also use Workspace-like variable bindings or reply to older messages from the bot to bind the receiver of your message. For an exhaustive list of all features, visit the repository in [2] or just send /help to the bot. I also have uploaded a short video demo about it at [7].


Another important thing to note is that TelegramSmalltalkBot is able to evaluate every expression in a sandboxed execution environment by using the SimulationStudio library I announced yesterday [3]. While both projects have grown rather independently of each other, this usage fills an important gap for me and I think it is a relevant real-world use case of the Sandbox.


Please try it out! :-) All you need is a Telegram account for free and a client (Telegram is available cross-platform and can also be used from the web). I am hosting an instance of the bot myself on my raspberry pi and I feel confident enough about the isolation quality of my Sandbox that I dare to unlock public access to the bot for everyone. A small architecture diagram which I have shown at the Winter Demos is in the attachments (contains clickable links to the repositories), you can also find it in the wiki of [2].


Just search in the Telegram app for @SqueakSmalltalkBot or follow this link: https://t.me/SqueakSmalltalkBot [8] (QR code is also in the attachments)<https://t.me/SqueakSmalltalkBot>


I'm very much looking forward to your feedback! If you experience any problems or have new ideas, please let me know via squeak-dev or GitHub issues! I'm already planning many new features for the bot - be sure to watch the repository if you are interested in them. :-)


Best,

Christoph


[1] https://github.com/LinqLover/TelegramBot

[2] https://github.com/LinqLover/TelegramSmalltalkBot
[3] http://forum.world.st/ANN-SimulationStudio-and-sandboxed-execution-for-Squeak-td5127804.html

[4] http://forum.world.st/Squeak-Winter-Demos-2021-03-06-3-p-m-6-p-m-CET-virtual-tp5126913.html

[5] https://telegram.org
[6] https://core.telegram.org/bots/api
[7] https://youtu.be/HZCeThLqQmg
[8] https://t.me/SqueakSmalltalkBot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20210317/5a45171b/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TelegramSmalltalkBot Architecture.svg
Type: image/svg+xml
Size: 551107 bytes
Desc: TelegramSmalltalkBot Architecture.svg
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20210317/5a45171b/attachment-0001.svg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: qr_ at SqueakSmalltalkBot.png
Type: image/png
Size: 5817 bytes
Desc: qr_ at SqueakSmalltalkBot.png
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20210317/5a45171b/attachment-0001.png>


More information about the Squeak-dev mailing list