From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: joaotavora@gmail.com (=?utf-8?B?Sm/Do28gVMOhdm9yYQ==?=) Newsgroups: gmane.emacs.devel Subject: Re: [ELPA] New package: hierarchy Date: Sat, 21 Oct 2017 09:52:34 +0100 Message-ID: <87h8us51d9.fsf@gmail.com> References: <87sheh8wuv.fsf@cassou.me> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1508575985 25507 195.159.176.226 (21 Oct 2017 08:53:05 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 21 Oct 2017 08:53:05 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Oct 21 10:52:57 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e5pWP-0004Pk-EI for ged-emacs-devel@m.gmane.org; Sat, 21 Oct 2017 10:52:45 +0200 Original-Received: from localhost ([::1]:57119 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e5pWW-0001s9-UP for ged-emacs-devel@m.gmane.org; Sat, 21 Oct 2017 04:52:52 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53252) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e5pWN-0001rz-BK for emacs-devel@gnu.org; Sat, 21 Oct 2017 04:52:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e5pWK-0008TL-7S for emacs-devel@gnu.org; Sat, 21 Oct 2017 04:52:43 -0400 Original-Received: from mail-wr0-x22a.google.com ([2a00:1450:400c:c0c::22a]:44767) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e5pWK-0008T0-1M for emacs-devel@gnu.org; Sat, 21 Oct 2017 04:52:40 -0400 Original-Received: by mail-wr0-x22a.google.com with SMTP id z55so7049821wrz.1 for ; Sat, 21 Oct 2017 01:52:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=1D0tZe3hVIWyQONGAjziA7pcyjmtwc2mBD4Wj0NK7oA=; b=N3VyjR8twCXlTLfgDqKct3KRwRoDroh26K1MwrbwLvUO1SaajaCshFlR3tM+itFyvG PAK2qm2galGWA1xQEKO5rQ1wNxpA4FbN3HWc/j8VRItID/BnqONIdGPeismAXXBWX95T 4pP8WnB7GDPluRv2EQhTPb61ThAbOBGfg29uxDUjecPWzSQc05IdjTXY0CWft0iHF3it eSyPQle0rsJoIWGLQvA++X0PufSxBGJJG3pz7Ivs26A534XMvG5cNELoYHDdPB8HWqZP Mi1FRGzM0LNGb6llB1TLtUoedBHS0NFJXITxDXE0aV0wNhMmh7av2Ll+VeEynhlzzo4x EJ4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=1D0tZe3hVIWyQONGAjziA7pcyjmtwc2mBD4Wj0NK7oA=; b=YOlM7LP5aRDE7ou/swDZs7w7CqAbaCSzmEDdoJZ8baVp0r+saWIk+pXN1gvgip14ps 9gQWsAcx/dLEAPWpXcGWfDtwMT/PjTyw1f9pDIJdTd7nlc1JFiXla9mpw2AqNKbf4ObP Td5zy3K31+Vhetm1cBWMSughgKYwqNyfc5ZSn+TBGf8zbmrRB8eacN+Tr9n6Ta/8n6YG RB2zE4KnwBbVA4LwV1YagS+/nE+SoXwUCCo3wwo01NL5PxU0rUoK71WM2GEGop2OMFI7 VAkP709YU1xzRXJxylXIDsS7zepygOU5khQwm0vcFE/bAzhFq0TSNkZEjLpvWNSjxB05 PPmQ== X-Gm-Message-State: AMCzsaXj7gSaeQEBpLUkN4iiOlLXgsXZk6RjYtAXhMWEe9wTTcfid/+e PGTwT4xmk+9YNk+CMmak3W/DHYwD X-Google-Smtp-Source: ABhQp+QDGUyO6rm0bkuHOC6NBZzgYUkrM91FH8pgAoUv/A4rR7x9OiKFRihvRyoSI2fENtPt9fKNxA== X-Received: by 10.223.186.20 with SMTP id o20mr7272725wrg.3.1508575957369; Sat, 21 Oct 2017 01:52:37 -0700 (PDT) Original-Received: from lolita.yourcompany.com (188.139.62.94.rev.vodafone.pt. [94.62.139.188]) by smtp.gmail.com with ESMTPSA id s38sm1846446wrc.83.2017.10.21.01.52.36 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 21 Oct 2017 01:52:36 -0700 (PDT) In-Reply-To: (Stefan Monnier's message of "Fri, 20 Oct 2017 16:26:17 -0400") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::22a X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:219663 Archived-At: Stefan Monnier writes: > Looking at the code I get the impression that it would be nice to split > it into 3 parts: > - the `hierarchy` defstruct with associated manipulation functions. > - the display code. > - an API between the two, which we could call `tree`, a bit like `seq.el` > defining the tree navigation primitives needed by the display code > and which could be implemented by all kinds of data types, including > the `hierarchy` struct. FWIW there's also: https://www.emacswiki.org/emacs/tree-mode.el (and maybe some other similar package that I can't find right now). Anyway, when I implemented a structured "trace" facility for Common Lisp[1]] these libraries werent' very useful and I had to bake my own. I had two (extraordinary?) requirements: (1) that it should work asynchronously (i.e. updates to any arbitrary node in the hierarchy can come at any time and out of order) and (2) that display is lazy (i.e. collecting an update to an arbitrary part in the tree doesn't necessarily display it). This is why I favour Stefan's separation and I would love to replace my library with a decent one. Jo=C3=A3o [1] https://github.com/joaotavora/sly/blob/master/contrib/sly-trace-dialog.el