From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Helmut Eller Newsgroups: gmane.emacs.devel Subject: Re: Make peg.el a built-in library? Date: Sun, 10 Oct 2021 07:49:41 +0200 Message-ID: References: <875yvtbbn3.fsf@ericabrahamsen.net> <87a6jjc7c8.fsf@web.de> <87zgri22e2.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11827"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Oct 10 07:51:01 2021 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 1mZRjh-0002tX-LK for ged-emacs-devel@m.gmane-mx.org; Sun, 10 Oct 2021 07:51:01 +0200 Original-Received: from localhost ([::1]:52916 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mZRjg-0003Np-0t for ged-emacs-devel@m.gmane-mx.org; Sun, 10 Oct 2021 01:51:00 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55506) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mZRiW-0002iL-5f for emacs-devel@gnu.org; Sun, 10 Oct 2021 01:49:48 -0400 Original-Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]:39693) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mZRiU-0006jR-BE for emacs-devel@gnu.org; Sun, 10 Oct 2021 01:49:47 -0400 Original-Received: by mail-ed1-x52f.google.com with SMTP id ec8so3678929edb.6 for ; Sat, 09 Oct 2021 22:49:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=2KiRFWGE5eHipNzJtMcvZQMFYtftDctUQFe/xFQIXXA=; b=iwQNRdqaeRCkQpl0PLd1ZFtyxCOAILWVt8Ai7W7cGuRxTlJta5WHSimk4KlwdMcyB9 4kl4keDACbsG9I+BFWfyYtJA0MgXDGh9IVneHfo8UAirX3pa98rwOZzYhEj0yUG4mapP rzbgMLi6dowNNX/csnJcuUj30D/QduEkoQLpgnbLUon6/zCzeBCwB9Prl2nhPpzHUNkd VgTFGBob6rEo60PSk0ExWdI4eXuWbyp1XFE3fpgQmuTIr/VX0dR27dbXvfS0PvjXbc/+ 75V7d9LNBdXjrSdwgPgd7F/UabnUyFaI+UcocFSPAngvI12AB0h+L8YXRfd36gDkvm5f zQ1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=2KiRFWGE5eHipNzJtMcvZQMFYtftDctUQFe/xFQIXXA=; b=pP9NX2Y0oT/d50m649YttR0UBPyDzLheIsn8sn/iZpKyZoIIcWTzuD5kWEpqecbMJD 9f4sv9jv4SX7UQUh7O8G/EikZeJqONJ7L6aZqtjZEVQg8UR5irm39ljeVnFzciLEcbDm xRdGe3ip+M40edoN0dlGfrW9eORT6+U30wuLY69wj9rR9Xi48nVC8HMhi/lT2W8osuuW p92eqmn2ghVallzJDOVepLUFwr1APnA1s/b+5wFlw+mOYrTZRxUqvDGGE0dNQ+LvwAgi /K2q7WDGowb5BNntc0srylPUSXoc3XC0eTJaFmcxeAQVXmLg6zcX8x9MLK6QFBvyiGTV 6Ebw== X-Gm-Message-State: AOAM5309JHDAZobtbnbcRftwQjPaQgSQRbXIWXWbndC7cVEyj8jzk1Wu pWGbasr/WU6MB/kcZyDNCFMYIhhiTnk= X-Google-Smtp-Source: ABdhPJwc2d57Y2tF2mbQwHA3xgrtt23UoDVCMsYf3djn6o1JhyL/hw/5slTgDbny/YWGhu0IOVaDzQ== X-Received: by 2002:a50:e00b:: with SMTP id e11mr29981220edl.359.1633844983492; Sat, 09 Oct 2021 22:49:43 -0700 (PDT) Original-Received: from caladan (dial-185031.pool.broadband44.net. [212.46.185.31]) by smtp.gmail.com with ESMTPSA id f1sm2090358edz.47.2021.10.09.22.49.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 09 Oct 2021 22:49:42 -0700 (PDT) In-Reply-To: (Stefan Monnier's message of "Sat, 09 Oct 2021 08:52:51 -0400") Received-SPF: pass client-ip=2a00:1450:4864:20::52f; envelope-from=eller.helmut@gmail.com; helo=mail-ed1-x52f.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.23 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" Xref: news.gmane.io gmane.emacs.devel:276637 Archived-At: On Sat, Oct 09 2021, Stefan Monnier wrote: >> For the general case, peg.el would need some form of proper tail calls. > > Maybe we could (re)use the tail-call elimination that I implemented for > `named-let`. This reminds me of a question I wanted to ask. Suppose we want to implement a LPeg-like virtual machine[*] as a dynamic module. Is there a reasonably efficient API to read a buffer's content? Maybe something like a FILE* stream backed by an Emacs buffer? Helmut [*] http://www.inf.puc-rio.br/~roberto/docs/ry08-4.pdf