From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Damien Cassou Newsgroups: gmane.emacs.devel Subject: Re: [ELPA] New package: hierarchy Date: Mon, 23 Oct 2017 10:05:48 +0200 Message-ID: <87po9ewaoz.fsf@cassou.me> References: <87sheh8wuv.fsf@cassou.me> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1508746110 12956 195.159.176.226 (23 Oct 2017 08:08:30 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 23 Oct 2017 08:08:30 +0000 (UTC) To: Stefan Monnier , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 23 10:08:26 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 1e6XmR-0001pt-1r for ged-emacs-devel@m.gmane.org; Mon, 23 Oct 2017 10:08:15 +0200 Original-Received: from localhost ([::1]:37346 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e6XmY-0002HU-DA for ged-emacs-devel@m.gmane.org; Mon, 23 Oct 2017 04:08:22 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48146) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e6XkG-0000f8-MO for emacs-devel@gnu.org; Mon, 23 Oct 2017 04:06:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e6XkD-0000sy-H5 for emacs-devel@gnu.org; Mon, 23 Oct 2017 04:06:00 -0400 Original-Received: from mail.choca.pics ([2001:bc8:20ab::1]:36220) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e6XkD-0000rT-72 for emacs-devel@gnu.org; Mon, 23 Oct 2017 04:05:57 -0400 Original-Received: from localhost (localhost.localdomain [IPv6:::1]) by mail.choca.pics (Postfix) with ESMTP id 0CA9D232DFAF; Mon, 23 Oct 2017 10:05:55 +0200 (CEST) Original-Received: from mail.choca.pics ([IPv6:::1]) by localhost (mail.choca.pics [IPv6:::1]) (amavisd-new, port 10032) with ESMTP id axrm1rwoBDsR; Mon, 23 Oct 2017 10:05:54 +0200 (CEST) Original-Received: from localhost (localhost.localdomain [IPv6:::1]) by mail.choca.pics (Postfix) with ESMTP id 12969232DFB0; Mon, 23 Oct 2017 10:05:54 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.choca.pics 12969232DFB0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cassou.me; s=9EA44F5C-DEF4-11E6-A83F-A08DF322D8FB; t=1508745954; bh=oeZbWZ8pcfAS8yPQ9d0QKT7CJNtsm81XysqxeYX1ZSc=; h=From:To:Date:Message-ID:MIME-Version; b=YiXf7iDeVZg5SeYKF/89pKTBehTvz1Vpgl6JlnHp/uYRHfVxMGYE24yLUEMhBsx9F 7OdEX3sazeOIz4mfRN+O5rEqBCbCZ+U6TO5+6ayJs3VsmJb09DiHukd3aV1a47m7Rh kJYLHCoiYpHe0YiV5vaS0q1EFNEWqoie157nxGYUZFZhebIhFLw0iusHnY5nxlSDy4 xlQ3gSpwCtf9cPcY8bfvdVsWBkGoczE+qz592TjKS/da9l/KEyf8Q+kFYOz1f8Zq40 P6QPUu5HSL/WEEVo/z5I3WaK7ELHxXzaN2lSLuuo003Th35rfgyfmPzMG7ABUUkUKy 7LX4zPfM8TMuQ== X-Virus-Scanned: amavisd-new at choca.pics Original-Received: from mail.choca.pics ([IPv6:::1]) by localhost (mail.choca.pics [IPv6:::1]) (amavisd-new, port 10026) with ESMTP id DnQkoIYDw7zR; Mon, 23 Oct 2017 10:05:53 +0200 (CEST) Original-Received: from luz4 (31-211-216-84.customers.ownit.se [31.211.216.84]) by mail.choca.pics (Postfix) with ESMTPSA id B6856232DFAF; Mon, 23 Oct 2017 10:05:53 +0200 (CEST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:bc8:20ab::1 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:219695 Archived-At: Stefan Monnier writes: > Glancing at the code, I wonder how the JSON and Javascript class > navigators work, tho: do they first convert the original tree to > a `hierarchy` struct? they do. That's fast enough for every day use. > How would it work if you wanted to use it to navigate your local > file-system (where the complete hierarchy might be extremely and > costly to create)? This is implemented here https://github.com/DamienCassou/hierarchy/blob/master/examples/hierarchy-examples-fs.el. But, as you expect, this is not usable for a complete file system (displaying ~/.emacs.d takes 4 seconds on my fast computer). > Is there some way to construct (and display) it > lazily? could you please share your ideas at https://github.com/DamienCassou/hierarchy/issues/49? > Looking at the code I get the impression that it would be nice to split > it into 3 parts: by parts, you mean files? The code is currently split into pages. I don't mind separating into files if that's what people want. > - 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. it makes sense even though I need to look deeper into it to have a clue about what this would mean in practice. -- Damien Cassou http://damiencassou.seasidehosting.st "Success is the ability to go from one failure to another without losing enthusiasm." --Winston Churchill