From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42048) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1et9u6-0005cJ-PM for guix-patches@gnu.org; Tue, 06 Mar 2018 05:33:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1et9u2-00074Z-Oi for guix-patches@gnu.org; Tue, 06 Mar 2018 05:33:06 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:38960) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1et9u2-00074R-Li for guix-patches@gnu.org; Tue, 06 Mar 2018 05:33:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1et9u2-0000gv-Ex for guix-patches@gnu.org; Tue, 06 Mar 2018 05:33:02 -0500 Subject: [bug#30711] [PATCH 1/1] guix: graph: Add Trival Graph Format (TGF) backend. Resent-Message-ID: From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <20180305114136.7207-1-h.goebel@crazy-compilers.com> <87h8pu8msv.fsf@gnu.org> Date: Tue, 06 Mar 2018 11:32:31 +0100 In-Reply-To: (Hartmut Goebel's message of "Mon, 5 Mar 2018 22:12:44 +0100") Message-ID: <87po4hxznk.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Hartmut Goebel Cc: 30711@debbugs.gnu.org Hi, Hartmut Goebel skribis: > Am 05.03.2018 um 18:17 schrieb Ludovic Court=C3=A8s: >> Can you tell us more about the Trivial Graph Format?=20 > > This is a *very* simple format, see > https://en.wikipedia.org/wiki/Trivial_Graph_Format. You can only define > nodes, edges and labels. Edges are always directed. I don't know whether > it is wide-spread. By chance I used it to import data into yEd > (non-free, by chance mentioned in the Wikipedia-article), which allows > to select quite some different graph layouts. > > So the first decision should be whether TFG should be included. I must say I=E2=80=99m skeptical, in large part because the dot format is already simple enough and implement by a number of graph-processing tools, not just Graphviz. > TGF requires all nodes to be defined prior to any of their edges, > otherwise the edge's Ids will be taken as labels. Thus the export-graph > needs to be changed to first emit all nodes and then the edges. Due do > my little guile-knowledge I did not manage to change the code accordingly. The issue is that the API currently assumes that backends are stateless: they can just emit a node or an edge anytime we ask them, without prior knowledge. That doesn=E2=80=99t work for TGF. TGF alone may not warrant a change in the backend API, if you ask me ;-), but there may be other things that would require the backend API to be less stupid. An ASCII rendering of the graph would need to be stateful, for instance. Needs more thought=E2=80=A6 Ludo=E2=80=99.