From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Gerd_M=C3=B6llmann?= Newsgroups: gmane.emacs.devel Subject: Re: Gap buffer problem? Date: Fri, 13 Dec 2024 04:19:09 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29815"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: "emacs-devel@gnu.org" To: arthur miller Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Dec 13 04:20:33 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tLwED-0007Yn-M6 for ged-emacs-devel@m.gmane-mx.org; Fri, 13 Dec 2024 04:20:33 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tLwD9-0004wA-D6; Thu, 12 Dec 2024 22:19:27 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tLwD7-0004vb-PS for emacs-devel@gnu.org; Thu, 12 Dec 2024 22:19:25 -0500 Original-Received: from mail-ej1-x62d.google.com ([2a00:1450:4864:20::62d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tLwD2-0004A8-M7 for emacs-devel@gnu.org; Thu, 12 Dec 2024 22:19:25 -0500 Original-Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-a9e8522445dso252300866b.1 for ; Thu, 12 Dec 2024 19:19:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734059953; x=1734664753; darn=gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=gApoc/Ul/NpDjFaetQ25fdEEK+pm4A77mbfUqD4Q8KI=; b=bok2Vkd5QLRM14Izib7Nmk+JwCBCaS2A4/vsyZYP+C8YLjSPqqBB+dw3Dwg/cbw8MO nQIkWsum9rmveX4raC/A4hj2eRfgLRNPU/b1/RGxMiwDgyqB53ZvVxF61A6Pbyi4xsco xHfq9NOQOALA36sCSIlo6wjGRXtTfmXdvZMqWjy5bZifJen2Y0vwktcyZT5xV5VG9vxF 63ZWfgiDEJdNseR7t1qnZUHtfX0VK12rEmQ2wv1WE13juj0veScNZrOf8a2DkaWT838p jEV1FLO/XKNx7dFti+P5O+KoXHPMzddXeuuZ/r1ju3NCCjCZIVU3JSZ48i5xkFz2gsuH 9r8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734059953; x=1734664753; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=gApoc/Ul/NpDjFaetQ25fdEEK+pm4A77mbfUqD4Q8KI=; b=GLmTghuDt+WHEMGQmXoMZQqs6vZ6Xe/HyHo0bECypUQ6YwwxqW5coqT964yrZ5OvJz 7hC6rWiIoDr5tAMndvgAHcKUASrrpnZn8wbTY5FZqsgdXZrpYYQGwb8ZHPxZ7fpY1JG/ X60/FGsw99mU8ufQHg7Q07AHln//33XvsUYxVUEllylWHKse1nx4sj5bIJy+D6c5iAXo kLNlXlqBtBxnHirfbGDM9sTNLVd97lbi/w7yTVY0JqOS2jHh1VjV6koTbPOPmIJiOIIb ALwR40TBu40Y2r1xs9GgvQxzXimVpnWvW88zTBoEDmmebXD8SpnkjFduC3DH4AwNKoBJ cyhA== X-Gm-Message-State: AOJu0YxMgjK7NdP0OvM++3uXQX7cuDKD7VNIX1Amu29Bsg4REUrazMm2 R6USn5KzzVHkfHYp/AmM3Yc2+bDg7JC+O8XNsJNLquZaQDAP3+Q3u3Svyg== X-Gm-Gg: ASbGnctqTeGYxNrrEADQHAJOQTD7ZQV+rdQR/Mu5u+/JzAjkCRW8sQhCy8lQB75yru9 DNLIK0jjrXiCqHHSzTDElntb9UkjkD1fV+N5kRvTDxrL1FXAlfNGXymTjmokSfQ3Gzq5+jrxmod u8/uUeDG2CQFxYjIkTPpsWkXIKChWnOQGm77gMoTg12GzPRq+akEn+Ow1lKNpECGU6e3VnPO5nF Ngvghf7ubCmWiTnBvTIDKH1GLMq5/1mGUqboHeL3+o6NaTCrf96CEWHOvXHFsdnXvM/e+BxMgAJ fxCQPHhm85mUSPvfnQBBf/OiGP8OHArp3Hux9BZ85Vt9ODHK2hj349sUmutA57Uviw== X-Google-Smtp-Source: AGHT+IF2yXJRD47QuqCtyUCjz2yCKEsnlvnD1/70NgafoN+QJ4Ew/6kGxI9uEeSO0LrjPBC0NDDarQ== X-Received: by 2002:a17:906:7952:b0:aa6:7438:2a30 with SMTP id a640c23a62f3a-aab779c7204mr119288066b.29.1734059952611; Thu, 12 Dec 2024 19:19:12 -0800 (PST) Original-Received: from pro2 (p200300e0b7097800193cd38c2c718030.dip0.t-ipconnect.de. [2003:e0:b709:7800:193c:d38c:2c71:8030]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aa66b85efd8sm813738466b.171.2024.12.12.19.19.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Dec 2024 19:19:11 -0800 (PST) In-Reply-To: (arthur miller's message of "Thu, 12 Dec 2024 23:40:36 +0000") Received-SPF: pass client-ip=2a00:1450:4864:20::62d; envelope-from=gerd.moellmann@gmail.com; helo=mail-ej1-x62d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:326445 Archived-At: arthur miller writes: > There is a paper by R. Strandh & others from they work on Climacs.=20 > > They have, by now a 20 old year Flexichain implements a circular gap > buffer with the explicit goal to workaround that case. At the same time > it also turns gap buffer into a flexible array usable for other use-cases= =20 > like qeues and stacks. > > However, they have also gone away from the gap buffer, to something they > call "Cluffer", and which is a strategy where they use a double > linked list of lines. The "open" line is a gap buffer. As they say > in the introduction, the similiar strategy was used in Multics Emacs. > The idea is to allow for incremental editing, a l=C3=A1 > tree sitter I guess, and it is also suitable for multiple cursors. They > also say that for modern hardware the additional memory cost of double > linked lists is not prohibitive. > > For those interested relevant papers and sources are here: > > https://flexichain.common-lisp.dev/download/StrandhVilleneuveMoore.pdf > https://www.european-lisp-workshop.org/archives/2004/slides/Strandh-slide= s.pdf > https://github.com/robert-strandh/Flexichain > > http://metamodular.com/cluffer.pdf > https://hal.science/hal-01887230v1/file/5-incremental-parsing.pdf > https://research.gold.ac.uk/id/eprint/2351/1/climacssyntax.pdf > https://github.com/robert-strandh/Cluffer > > https://github.com/scymtym/text.editing <-- a text editor sans the > application based on the Cluffer > > https://github.com/robert-strandh/Second-Climacs <-- text editor > application based on the above text.editing and Cluffer > > There is also Lem which uses a similar strategy for its text representati= on > (if I am not misstaken, long time ago I looked at their code): > > https://github.com/lem-project/lem > > * GitHub=20=20 > - lem-project/lem: Common Lisp editor/IDE with high expansibility=20= =20 > Common=20=20 > Lisp editor/IDE with high expansibility. Contribute to lem-project/le= m development by creating an account on GitHub.=20=20 > github.com=20=20 > * > > Don't know if it is of use for you or not, but perhaps there is some > inspiration there. Haven't seen those papers mentioned anywhere > in this discussion, so thought they might be of interest to some of you. Thanks for the links! I find them interesting.=20