From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id iCgLCEJjzWM60wAAbAwnHQ (envelope-from ) for ; Sun, 22 Jan 2023 17:24:34 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id YOcPCEJjzWPQKAEA9RJhRA (envelope-from ) for ; Sun, 22 Jan 2023 17:24:34 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id EFC603E057 for ; Sun, 22 Jan 2023 17:24:33 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pJd8a-0000nD-QX; Sun, 22 Jan 2023 11:24:08 -0500 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 1pJd8X-0000mz-I8 for guix-devel@gnu.org; Sun, 22 Jan 2023 11:24:05 -0500 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pJd8V-00013j-FL for guix-devel@gnu.org; Sun, 22 Jan 2023 11:24:05 -0500 Received: by mail-wm1-x32d.google.com with SMTP id f12-20020a7bc8cc000000b003daf6b2f9b9so9003192wml.3 for ; Sun, 22 Jan 2023 08:24:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=iawtBuphQvMejcc5MWiecoFVawSHWGpu7kNO2HmRRYs=; b=g9516pYK76X1ZED9es7nU/N1AU5jtwzO3TM6jX90B8KbeSyd97Oa0weDnIDbVHcWsQ Ep38vxd7WflIzk09xtUJ+edEM8O2y3Ttj7aiF3+ZYOzvEgfHka31CJhFhGW3SCZYemo6 4UUegVnM7pTbiuOAUDVah5NRppT+mAEeHg67LQBAJujJFc1aNmjDqfz1iKXz+z2od1su 6EFdWtb5flV0WvOoM5UCxQ5Op6SR5a5US2UGgURE0hU9lR6hwpdX1m8iWDEHT5WimurM v2xxDMaUrRxsi0S59f9NuQ80eCHE9ZMGR4r7Ba1s3jSvFaNpvCHM4YcU/LdMbRDjydtX uyCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version: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=iawtBuphQvMejcc5MWiecoFVawSHWGpu7kNO2HmRRYs=; b=OkFvRAIZ2N06ZKBBVuFMLJcsL2xMrI5KeAdgL28yabcr1EpF+z6yDyBzZU2cjlkkSh aFBfZIy+jwivlT5Zm+zAr6NlUVysvz5ay46rMWINVeDozFpbFSFZEtXGdKKK91L5S0AX 5MuUVImTGeD/BhCSrGkjiPMzN5A2HTYto50N4pOF7RWymbeUpj+MmkxTlQl6+DS/yFDR +eibby3WHEchXdoOtFbiGE5GGDqlTeCdwYNEmBMGnl7ksRizfp/rr3NQ3JH3hHUVf05N fLMfsp4hmEQsiXA+UcsD6hM/i0qaRX9sGgsC/7mHq0IHcdNWlUVUcdnx66XL7ETxhkKv +LcA== X-Gm-Message-State: AFqh2kqjjrqXTKsMDaL+1rKqMWtAcGoMEU4sQj9HdwIyu2dyA2zGJPIE uAcvJf8g1Mo0RoQmZRv2NPg= X-Google-Smtp-Source: AMrXdXsSCr+2o8k+TQPzBVyObq5nVTPd7Czpd38FynYGBmvRn2BieDfcd0eTZVcAZlMwqWuATh7GXA== X-Received: by 2002:a05:600c:3b8c:b0:3c6:c5d9:dad3 with SMTP id n12-20020a05600c3b8c00b003c6c5d9dad3mr5738308wms.0.1674404641360; Sun, 22 Jan 2023 08:24:01 -0800 (PST) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id u13-20020a05600c19cd00b003cf71b1f66csm9283345wmq.0.2023.01.22.08.24.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Jan 2023 08:24:01 -0800 (PST) From: Simon Tournier To: Demis Balbach , guix-devel@gnu.org Cc: andrew@trop.in Subject: Getting tree-sitter grammars in Guix In-Reply-To: <87h6wycn8f.fsf@minikn.xyz> References: <87h6wycn8f.fsf@minikn.xyz> Date: Sun, 22 Jan 2023 16:38:39 +0100 Message-ID: <86fsc21sw0.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=zimon.toutoune@gmail.com; helo=mail-wm1-x32d.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: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1674404674; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=iawtBuphQvMejcc5MWiecoFVawSHWGpu7kNO2HmRRYs=; b=mafek4HD9bMm9Cai2KY0rw1Q4R/MEOU3+D6bM0u9sd6u64j4M7CIvfKW/pWvtpOksGPtOx CGjVsdLJ5s7pL9uuktk3a3E7qGDH+odYh2KtWLqbw5BWUjKXrHmvyIaHisyfNXFBJKUVGi UhdZol+rcopDPhQPEp69S3cqvMImjZfLKRB3zZPqjUecmuU/mpIjNRYW+S9pi3DoUymk3J 3UiaJ9Iu0GuUTQcGy8W9snFVCXiNTvhZCNqJgwseoJGZOm4D+4t7x7Obs2QIeqKbEV1MTh PuuL43nkBhpY/oDSZ2c8kSjPRw/nMYcmkLnzUPPT3hMwBkVGv8MxFDwLMijBoQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=g9516pYK; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1674404674; a=rsa-sha256; cv=none; b=an90lFRX+ot57AI0Rel533nnORHSWbHweEpNQihh90graa5fz/+lsuwjApZeE2fq9s/REC og0izPAU6m2JB3RKpM/6Zjk7IdRCjxaOgruhnGL0s0nRz4EWfyQOjo1kkb9aHmQ6vZh6mj NMmsZo3NlrhYL8J/Q5S1tK3TKgsNmIWrEAfoo1lO6yGHEYTyIpHg2JRhkmGG0V69dyukWO mjOWEFhlh9Uldl540CRszv5ScgBCLhK2wC3TkM7PngqW2xYWx4io/Qtnr46iHb5NNGTbGP 5dgAgVSde9jmnhIiJ68kWbmzRT5aYaZeYVMMJHq69DC7OJC/lUDumFqaqpr77g== X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -4.76 X-Spam-Score: -4.76 X-Migadu-Queue-Id: EFC603E057 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=g9516pYK; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-TUID: 8ELyJ5r3Oee7 Hi, On Tue, 10 Jan 2023 at 18:29, Demis Balbach wrote: > Hello, I was wondering what the "correct" way would be to get grammars > for the tree-sitter library available in Guix when using tree-sitter > with Emacs 29+. This raises a question about the bootstrap. >From my understanding, the inputs of Tree-sitter is the file =E2=80=99grammar.js=E2=80=99 and then using Node.js, it generates C files. = It is often these C files which are considered as the Tree-sitter parser. Many Tree-sitter parsers are available [1]. For example, Bash [2]. The grammar is described by =E2=80=99grammar.js=E2=80=99 [3] and then using it,= the file =E2=80=99src/parser.c=E2=80=99 [4] is generated (note the size 3.46MB!). T= hen, using this file =E2=80=99src/parser.c=E2=80=99 is generated a library which is ca= lled by the editor tool (say Emacs tree-sitter [5]). I am not aware if someone has tried to rebuild using Guix only from the grammar.js to a working tree-sitter editing experience. Well, considering the state of Node.js and Guix, it appears to me difficult to debootstrap. And maybe, we should accept a large unverified seed for Tree-sitter. Well, I do not know. What people think? What do we do with Tree-sitter? 1: 2: 3: 4: 5: Cheers, simon