From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Oleksandr Gavenko Newsgroups: gmane.emacs.help Subject: Look for data serialisation format to implement communication between Emacs and external program. Date: Sun, 06 Jan 2013 23:44:46 +0200 Organization: Oleksandr Gavenko , http://gavenkoa.users.sf.net Message-ID: <87ehhyc7g1.fsf@gavenkoa.example.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1357508705 29218 80.91.229.3 (6 Jan 2013 21:45:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 6 Jan 2013 21:45:05 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jan 06 22:45:23 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Try1x-0000so-G3 for geh-help-gnu-emacs@m.gmane.org; Sun, 06 Jan 2013 22:45:21 +0100 Original-Received: from localhost ([::1]:45061 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Try1i-00062c-3y for geh-help-gnu-emacs@m.gmane.org; Sun, 06 Jan 2013 16:45:06 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:41340) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Try1c-00062N-KP for help-gnu-emacs@gnu.org; Sun, 06 Jan 2013 16:45:01 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Try1b-00032R-3d for help-gnu-emacs@gnu.org; Sun, 06 Jan 2013 16:45:00 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:52836) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Try1a-00032K-T0 for help-gnu-emacs@gnu.org; Sun, 06 Jan 2013 16:44:59 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Try1o-0000iz-Jz for help-gnu-emacs@gnu.org; Sun, 06 Jan 2013 22:45:12 +0100 Original-Received: from 37.229.4.200 ([37.229.4.200]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 06 Jan 2013 22:45:12 +0100 Original-Received: from gavenkoa by 37.229.4.200 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 06 Jan 2013 22:45:12 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 34 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 37.229.4.200 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) Cancel-Lock: sha1:BXNRtvYBKE8qZFYNeqY6LHVyOLo= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:88481 Archived-At: I know that XML is BAD so avoid it. My experience with 'expect' show me that simple string data communication is good but some times data have same pattern as _prompt_ so I can't distinct control data from regular data. Prefixes like in 'diff' file format resolve this issue. But this move us to TLV (table-length-value) format. Standard TLV format described by ASN.1 BER coding schema. Is that right to use ASN.1 BER as serialisation data format for communication between Emacs and external program? My external application is not jet written but I select Python as implementation language. Seems 'python-pyasn1' library make work from Python side: http://pyasn1.sourceforge.net/ How about Emacs? Is there any library for creating/parsing ASN.1 BER data? I need only basic types, like structure of numbers and UTF-8 strings (blogging software - pass command and data like article + title + list of tags)... Another formats like JSON or sexp also look nice but I don't know about Emacs support for this formats. I didn't look yet to projects like pymacs, which solved such task. Any advice is welcome! -- Best regards!