<commit_before># TelegramRb

This is the first cut of the rubygem for telegram. A lot of the native code here is picked up from telegram client. However, it should be rewritten as a proper library and not as a CLI port. Since this has been ported from the CLI, there have been a lot of global variables used and it causes problems in the library if we want to multiplex telegram messages i.e. send and receive messages in parallel. I am adding a work-around for this for now and it is good enough for basic testing from IRB.

## Installation Prerequisites (for Telegram)

On ubuntu use:

    sudo apt-get install libreadline-dev libconfig-dev libssl-dev
    
On gentoo:

    sudo emerge -av sys-libs/readline dev-libs/libconfig dev-libs/openssl

On Fedora:

    sudo yum install openssl-devel libconfig-devel readline-devel

On FreeBSD:

    pkg install libconfig libexecinfo

On OpenBSD:

    pkg_add libconfig libexecinfo
   
On OS x 
        
    brew install libconfig
    brew install readline
    
## Installation 

Add this line to your application's Gemfile:

    gem 'telegram_rb'

And then execute:

    $ bundle
    

## Trouble-shooting during installation. 

If while installing you get issues with native compilations, god help you. Here are some pointers though.

1.  `ld: 35 duplicate symbols for architecture x86_64`
    
    This is probably because of the compiler setting `-fno-common`. Open your rbconfig.rb file. This typically resides inside `<RUBY PATH>/lib/ruby/<version>/<architecture>/rbconfig.rb`. For example: `~/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-darwin13.0/rbconfig.rb`.
    
    In this file, edit `CONFIG["CFLAGS"]` and remove -fno-common
<commit_msg>Updated Readme: removed readline<commit_after># TelegramRb

This is the first cut of the rubygem for telegram. A lot of the native code here is picked up from telegram client. However, it should be rewritten as a proper library and not as a CLI port. Since this has been ported from the CLI, there have been a lot of global variables used and it causes problems in the library if we want to multiplex telegram messages i.e. send and receive messages in parallel. I am adding a work-around for this for now and it is good enough for basic testing from IRB.

## Installation Prerequisites (for Telegram)

On ubuntu use:

    sudo apt-get install libconfig-dev libssl-dev
    
On gentoo:

    sudo emerge -av dev-libs/libconfig dev-libs/openssl

On Fedora:

    sudo yum install openssl-devel libconfig-devel 

On FreeBSD:

    pkg install libconfig libexecinfo

On OpenBSD:

    pkg_add libconfig libexecinfo
   
On OS x 
        
    brew install libconfig
    
## Installation 

Add this line to your application's Gemfile:

    gem 'telegram_rb'

And then execute:

    $ bundle
    

## Trouble-shooting during installation. 

If while installing you get issues with native compilations, god help you. Here are some pointers though.

1.  `ld: 35 duplicate symbols for architecture x86_64`
    
    This is probably because of the compiler setting `-fno-common`. Open your rbconfig.rb file. This typically resides inside `<RUBY PATH>/lib/ruby/<version>/<architecture>/rbconfig.rb`. For example: `~/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-darwin13.0/rbconfig.rb`.
    
    In this file, edit `CONFIG["CFLAGS"]` and remove -fno-common

{'fraction_non_alphanumeric': 0.06450645064506451, 'fraction_numerical': 0.012001200120012, 'mean_word_length': 3.38107752956636, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6139999', 'n_tokens_mistral': 1061, 'n_tokens_neox': 959, 'n_words': 433}