tNew post: So tox me maybe - monochromatic - monochromatic blog: http://blog.z3bra.org
 (HTM) git clone git://z3bra.org/monochromatic
 (DIR) Log
 (DIR) Files
 (DIR) Refs
       ---
 (DIR) commit e97aa66e857d3934fab42a40a077db5d98b7e8b6
 (DIR) parent 7f83fbfd1cddac8a25c2e38c70cb413c67d986ef
 (HTM) Author: z3bra <willy@mailoo.org>
       Date:   Fri, 12 Dec 2014 00:47:25 +0100
       
       New post: So tox me maybe
       
       Diffstat:
         A 2014/12/so-tox-me-maybe.txt         |     163 +++++++++++++++++++++++++++++++
         M config.mk                           |       3 ++-
         M index.txt                           |       1 +
       
       3 files changed, 166 insertions(+), 1 deletion(-)
       ---
 (DIR) diff --git a/2014/12/so-tox-me-maybe.txt b/2014/12/so-tox-me-maybe.txt
       t@@ -0,0 +1,163 @@
       +# [So tox me maybe](#)
       +## &mdash; 11 December, 2014
       +
       +Microsoft. I don't really like their policies, or softwares, or operating
       +systems. But I must say that they *were* (this word is important) the only to
       +propose a nice text/audio/video instant messenger: "*Skype*".
       +
       +Skype brought many nice features to online chat. It allows free
       +(not as in freedom) audio communications, and video calls. It is fairly easy to
       +add friends on it, and chat with them around the world. The idea behind it is
       +quite nice.
       +But as for many softwares, the implementation sucks.
       +
       +### The itch
       +
       +Skype relies on a centralised platform, which means that ALL your
       +conversations go through a few servers around the world, and get re-routed to
       +your friends.  
       +
       +The drawback is that you can experience consequent lags within
       +your calls, because all the data have to go through the server instead of being
       +sent directly to your friend.
       +
       +There is an advantage though: it makes your conversations easier to [record by other
       +entities](http://www.zdnet.com/article/fbi-nsa-said-to-be-secretly-mining-data-from-nine-u-s-tech-giants/).
       +
       +### The antidot
       +
       +I'm not putting forward the griefs I have against skype without providing a
       +solution. Some people concerned about freedom and privacy decided to provide a
       +free (as in freedom) replacement for the microsoft software.
       +
       +They ended up with [tox](https://tox.im/). Check their homepage at least, they
       +will sell the product better than I'll do.
       +
       +Tox is a library allowing encrypted peer-to-peer communication between you and
       +the world. It comes with a lot of client, each of them having its set of
       +features. If you want to try tox quickly, consider [utox](http://utox.org/),
       +it is light, fast, featureful and easy-to use. Download it, launch it, and start
       +toxing. It can't be simpler...
       +
       +Each user is assigned a tox ID (which is a randomly generated sequence of
       +alphanumeric chars) that you can share with your friends to add them in your
       +client of choice.
       +
       +[![an utox window](/img/thumb/2014-12-11-utox.png)](/img/2014-12-11-utox.png)
       +
       +<span class="caption">An [utox](http://utox.org) window. As you can see, the
       +friend list is on the right, and the chat happens on the right pane. Fairly easy
       +:)</span>
       +
       +### The Unix way
       +
       +Now that you know what tox is, what about trying a client that will turn your
       +whole system into an interface to the tox library ?
       +
       +[Ratox](http://ratox.2f30.org), a FIFO based tox client. A
       +FIFO (First In First Out) is, in the Unix context, a file that can be used
       +by two different programs to communicate. It works kinda like pipes on the
       +shell, but using a physical file.
       +
       +When you start `ratox`, it will create the following tree in the current
       +directory:
       +
       +    $ tree
       +    .
       +    ├── id
       +    ├── name
       +    │   ├── err
       +    │   ├── in
       +    │   └── out
       +    ├── nospam
       +    │   ├── err
       +    │   ├── in
       +    │   └── out
       +    ├── request
       +    │   ├── err
       +    │   ├── in
       +    │   └── out
       +    ├── state
       +    │   ├── err
       +    │   ├── in
       +    │   └── out
       +    └── status
       +        ├── err
       +        ├── in
       +        └── out
       +
       +The `id` file contain your tox ID. Send it to your friends so they can add you !
       +Then there are 3 other files: 
       +
       +* `in`  : A FIFO. Use it to set values
       +* `out` : A Text file, or a directory. Use it to read values
       +* `err` : A Text file. It will contain the last error generated
       +
       +They are fairly straighforward to use. Here is an example to set your nickname:
       +
       +    $ echo $USER > name/in
       +    $ cat name/out
       +    z3bra
       +
       +I bet you already know how to set your status ;)
       +
       +Let's see how to add people to your friend list now ! All the magic happen in
       +the `request` directory. To send a request, use the in file with your friends
       +tox ID. On the other hand, friends request will be represented as FIFO in the
       +`out` directory. To accept them, just write '1' into those files.
       +
       +When you accept or request, or someone accept your, a directory gets created,
       +named after the tox ID (tox IDs are shortened here to improve readability).
       +
       +    $ echo $TOXID > request/in
       +    $ echo 1 > request/out/E05A5[...]9F02064
       +
       +    $ ls
       +    E05A50[...]CEAA6EB7E
       +    6B2197[...]966341980
       +    id
       +    name
       +    nospam
       +    request
       +    state
       +    status
       +
       +    $ tree $TOXID
       +    6B2197[...]966341980
       +    ├── call_in
       +    ├── call_out
       +    ├── call_state
       +    ├── file_in
       +    ├── file_out
       +    ├── file_pending
       +    ├── name
       +    ├── online
       +    ├── remove
       +    ├── state
       +    ├── status
       +    ├── text_in
       +    └── text_out
       +
       +The files in there are pretty self-explanatory. Using the `*_in` FIFOs, you can
       +send data to your friends. The `*_out` files are used to receive data.
       +
       +This simplicity allow many possibilities ! You can write a bot, that would read
       +`text_out` and reply on `text_in`. You could record your desktopn and stream it to
       +`file_in`, to share your screen. You could stream music to `call_in`, or maybe
       +read `text_out`, and have a program like `espeak` read the text on `call_in`.
       +
       +Because of how it is designed, `ratox` is only limited by your imagination...
       +Check out the [ratox-nuggets](http://git.2f30.org/ratox-nuggets) for a few neat
       +scripts related to ratox.
       +
       +Oh, and by the way... Here is the mandatory screenshot ;)
       +
       +[![ratox in action](/img/thumb/2014-12-11-ratox.png)](/img/2014-12-11-ratox.png)
       +
       +<span class="caption">Ratox in action. A terminal multiplexer is of good help
       +with it. It is also pretty easy to create an input bar for your `text_in`
       +file</span>
       +
       +Be creative, and keep tweaking !
       +
       +<!-- vim: set ft=markdown ts=4 et tw=80: -->
 (DIR) diff --git a/config.mk b/config.mk
       t@@ -21,7 +21,8 @@ PAGES   =   index.html \
                    2014/08/im-back-up.html \
                    2014/08/shred-configh.html \
                    2014/09/backup-someone.html \
       -            2014/11/avoid-workspaces.html
       +            2014/11/avoid-workspaces.html \
       +            2014/12/so-tox-me-maybe.html
        
        FEEDS = rss/feed.xml
        EXTRA = css img vid errors favicon.ico
 (DIR) diff --git a/index.txt b/index.txt
       t@@ -1,3 +1,4 @@
       +* 0x0012 - [So tox me maybe](/2014/12/so-tox-me-maybe.html)
        * 0x0011 - [Avoid workspaces](/2014/11/avoid-workspaces.html)
        * 0x0010 - [Backup, someone ?](/2014/09/backup-someone.html)
        * 0x000f - [shred config.h](/2014/08/shred-configh.html)