tdlib / td

Cross-platform library for building Telegram clients
https://core.telegram.org/tdlib
Boost Software License 1.0
7.23k stars 1.47k forks source link

Ruby example information #151

Closed isopen closed 6 years ago

isopen commented 6 years ago

Leo is a dangerous example in the main repository. Of course good but require 'tdlib-ruby' Not cool! In my opinion it is better to open the module. This is not an example. https://github.com/tdlib/td/blob/master/example/ruby/example.rb Here is a sample of how to make examples: https://github.com/tdlib/td/blob/master/example/python/tdjson_example.py

This example is safe: https://github.com/tdlib/td/blob/master/example/go/main.go But in it it is necessary to supplement the functional https://github.com/tdlib/td/blob/master/example/python/tdjson_example.py

Not for ordinary people who want to try the interface: https://github.com/tdlib/td/blob/master/example/csharp/TdExample.cs

Have you checked tdlib-ruby? (even this can not. at any time the author can bring to this level an extraneous code. eg: while true do end). Examples for Android? Examples for Javascript in the browser? Examples for WebAssembly?

I did not think at all that it could pass into your prod...In this case, you can classify examples by authors. It is generally better to bring this part into a separate repository. Create something like google play. Organize something like a code review in it. Perhaps many will want to share examples of implementation.

In the examples folder, there is no structuring. Regards

levlam commented 6 years ago

Yes, you are right in both cases. That will be covered in README.md for these examples.

I've added both examples, because to have any example is better than to have nothing. I've seen a lot of misunderstanding that TDLib can be used only from C++ (or Java). So they primary purpose is to show that TDLib can be used from any programming language.

isopen commented 6 years ago

I agree with you, but it's time to discuss in README.

Examples for Android? Examples for Javascript in the browser? Examples for WebAssembly?

isopen commented 6 years ago

Using the example for javascript in browser and webassembly, you show the real class. All misunderstandings will end automatically.

isopen commented 6 years ago

Initially, it was necessary to focus on emscripten. The rest itself would have turned out. Or to write your own translator in js (which would be generally epic)