Skip to content(if available)orjump to list(if available)

GNU Emacs Telegram Client

GNU Emacs Telegram Client

35 comments

·January 18, 2022

miki123211

It's amazing how versatile the Telegram API is.

I think the reason why it's that good is that it's literally the same API that the official apps use. There's no separate, restricted API for external developers, your app is treated in the exact same way as the official ones are. Even things like account creation and payments are exposed.

The protocol is very esoteric and hard to understand, though. It wouldn't necessarily have to be that way, it just feels like their documentation is aimed at mathematicians, not developers, especially the parts concerning binary serialization. They definitely suffer from a "reinvent the wheel" syndrome, they have a proprietary client-server encryption layer where plain old HTTPS would do, same for data serialization. Things are reasonably well documented, though, and implementing a fully-featured client with 0 external dependencies is feasible. Voice calls are a notable exception here, the calls API has very little documentation and all it gives you is an opaque blob that you're expected to give to their own voip library.

kitsunesoba

It’s really nice being able to use a Cocoa client on macOS, a UWP client on Windows, and a Qt client (and possibly soon a GTK client) on Linux. It’s becoming a rare luxury to have apps that do their best to be good citizens of their host desktops instead of throwing their backs into establishing a brand.

tanduv

This isn't completely accurate.

This client and all other 3rd party clients use tdlib, which is Telegram's open source client library to their servers. tdlib's development is notoriously behind compared to the client library used by their 1st party apps (which isn't tdlib). A good chunk of Telegram's modern features (voice chats, voice calling, chat reactions) aren't available on tdlib.

anthk

This. Compared to XMPP, Telegram is nothing.

I say this as a TG user under Bitlbee-libpurple.

tazjin

Well, compared to the quality of Telegram clients, XMPP is nothing.

This is a matter of perspective. Personally, emoji reactions aren't a big enough draw for me to switch to or from any platform.

Klonoar

Are you sure? The native Cocoa client seems to never lack feature-parity - and in fact is one of the clients to actually support encrypted messaging.

Or is that specific client just a unique case of the devs going above and beyond?

indrora

Something I realized early on when I was implementing the basic parts of mtproto for a project is just how Goddamn Fucking Resilient it is to network issues and the like.

Networks which are extremely adversarial, such as walled gardens, seen to have no clue what to do with it, but even in a situation where it gets RST flooded, it keeps on chugging.

noufalibrahim

> It's amazing how versatile the Telegram API is.

It's rare to read this in a thread about Emacs where something other than Emacs is described at versatile.

nine_k

The thing being impressive as it is, I could understand how most things work in it.

But they support animated stickers! This is both wonderful and terrifying. Verily, Emacs is an operating system (with a decent editor built in). What next, a DAW?

cle

Emacs is a great environment for live coding music (not exactly a DAW, but more like a music REPL I suppose).

https://www.youtube.com/watch?v=Ix2b_qFYfAA

https://www.youtube.com/watch?v=Tjf-NJNfOP4

https://www.youtube.com/watch?v=imoWGsipe4k

duncan-donuts

I recently was talking to a coworker about moving all of my music stuff to org mode, and rendering it with lilypond. Obviously not a DAW but I won’t be surprised to see reaper-mode or something in the future.

Edit: welp https://github.com/actonDev/s7-reaper

agumonkey

Someone on #emacs wrote a eieio (elisp oo) GUI to process audio samples (beatmatching or similar)

HeckFeck

I'm starting to doubt my doubt I have for the Church of Emacs. It seems anything really is possible for those who repent, memorise the collected essays of Richard Stallman and pray in Lisp.

DerArzt

I know this is a joke, but in all seriousness any editor with built in moding support probably could have a Telegram Client since it's nothing but api calls.

That being said:

I shall repent once more and go back to the Stallman scriptures. Maybe then I can find where I went wrong.

d99kris

The fact that Telegram provides an API enabling third-party clients (like this one) is the main thing that sets it apart from the other big mobile chat platforms (WhatsApp, Messenger, Signal) for me.

It's really nice to have access to a wide variety of client softwares, and the ability to build ones own (shameless plug - I built https://github.com/d99kris/nchat which is a simple TUI client).

theshrike79

And they extend se same kind of support for bots too.

Coming from IRC I got really used to having my own utility bot and others around. Not having them in Signal / WA is a kind of a blocker for me.

Took me a two beers to mod my IRC bot to connect to Telegram and Discord. APIs matter.

smegsicle

> Telegram requires third-party clients to show ads > https://news.ycombinator.com/item?id=29324478

uh-oh

theshrike79

Wouldn't say it's a huge issue for regular users:

> Sponsored messages on Telegram are displayed in large public one-to-many channels with 1000+ subscribers and are limited to 160 characters. Sponsored Messages are based solely on the topic of the public channels in which they are shown.

yewenjie

Telega lets you write messages in org markup, which I wish I could do everywhere.

james-redwood

Emacs extensions never fail to astound me. It’s almost an OS in a sense within a text editor.

jeofken

It quite literally is a lisp runtime with text editing stuff. There are many resources on how to implement lisp, but for the text editor part, this book “The craft of text editing” was very good http://www.finseth.com/craft/

xvilka

Problem it's an OS without multithreading[1]. One of the biggest Emacs problems, IMHO.

[1] https://www.reddit.com/r/emacs/comments/ghq1yx/lets_get_real...

kunagi7

Well, it's not exactly a great idea but you can replace init with Emacs and it will boot [1]. You have basic utilities like a shell, file manager and with plugins you can run a music player...

[1] http://www.informatimago.com/linux/emacs-on-user-mode-linux....

ska

> It’s almost an OS in a sense within a text editor.

That's actually not a terrible articulation of its design philosophy.

necrotic_comp

I was going to say - that's basically what emacs is. It's a LISP machine that has an initial set of applications built in for editing text.

lispm

to me it looks like a programmable text editor

qwerty456127

By the way, what is the easiest (to understand and extend the code and also to use) Telegram client out there? I want to add some features lacking in all the clients I've seen. Emacs-based client sounds cool but requires to learn Emacs (and its internals given the intention to extend it). Default clients are mindbogglingly complex for a person who never did web front end. Is there something basic based on Tkinter, WinForms or WPF?

d99kris

I don't have a concrete answer, but I'd suggest checking https://github.com/topics/telegram-client and filter it based on programming language preferences.

tazjin

telega is amazing. One of the overall best chat clients I've used.

marcodiego

This may use Telegram's own API implementation, but it is always important to remember the joy of open protocols.

theshrike79

Open Protocol > Open API > all

WhatsApp and Signal don't allow unofficial clients at all :/

null

[deleted]

null

[deleted]