From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.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 eOjCLMg3eGJmNwEAbAwnHQ (envelope-from ) for ; Sun, 08 May 2022 23:36:08 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id GAjwK8g3eGIjmgAAG6o9tA (envelope-from ) for ; Sun, 08 May 2022 23:36:08 +0200 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 5DFE92FADA for ; Sun, 8 May 2022 23:36:08 +0200 (CEST) Received: from localhost ([::1]:46924 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nnoZT-0001sl-AF for larch@yhetil.org; Sun, 08 May 2022 17:36:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41476) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nnoZO-0001rO-Rl for guix-patches@gnu.org; Sun, 08 May 2022 17:36:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:33245) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nnoZO-0004PH-I8 for guix-patches@gnu.org; Sun, 08 May 2022 17:36:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nnoZO-0006kS-Cj for guix-patches@gnu.org; Sun, 08 May 2022 17:36:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55030] [PATCH 00/30] gnu: elm: Update to 0.19.1. Add build system & importer. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 08 May 2022 21:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55030 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Philip McGrath Cc: 55030@debbugs.gnu.org Received: via spool by 55030-submit@debbugs.gnu.org id=B55030.165204570625865 (code B ref 55030); Sun, 08 May 2022 21:36:02 +0000 Received: (at 55030) by debbugs.gnu.org; 8 May 2022 21:35:06 +0000 Received: from localhost ([127.0.0.1]:55375 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nnoYT-0006j6-HH for submit@debbugs.gnu.org; Sun, 08 May 2022 17:35:05 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47928) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nnoYR-0006iY-Ce for 55030@debbugs.gnu.org; Sun, 08 May 2022 17:35:03 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:39658) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nnoYM-0003zd-41; Sun, 08 May 2022 17:34:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=vSbj2pz76KpDoQkNjcU0c2ZkuGkIz0GBKPT1mF02FMs=; b=UkGtG0DhYMmUUopo6dHg nquCQfzy0K+3m4cbEK4EGne73dXCDq/1khG9dRCfohyJ/LMXP07oWcQ5xEgZ+BYgAk6yUh5urUQVr UPHaBiJoszh9gf7yAb4jp4GRBfDdnhdfxFUI/qjEXuqRN4x6SrRVMwTB9gwIo0XsDo0n+z9Z0ugk0 5NJfl5ITVGCgd72InCZ/h2/lErAOaj54S8JMIpZWNlEw8CJhIABAyiT4ZJIdSNrcPp8qwmOqEypcd u4bayqt5XRDqJK5II2vm/a8tOSsm3EcfyR4TS0aYfZxfPCmkM53iLPbw4/Zd1oGCm1cLo0cTYno9X 9uxVx8VGY3ConA==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:64340 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nnoYL-0007hh-Nl; Sun, 08 May 2022 17:34:57 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20220419232736.272970-1-philip@philipmcgrath.com> <87k0b52ec3.fsf@gnu.org> <8bb2cf89-ae0e-cdcd-5149-a2d62aa3bbcc@philipmcgrath.com> Date: Sun, 08 May 2022 23:34:56 +0200 In-Reply-To: <8bb2cf89-ae0e-cdcd-5149-a2d62aa3bbcc@philipmcgrath.com> (Philip McGrath's message of "Sun, 1 May 2022 17:26:17 -0400") Message-ID: <87ee13wvwf.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1652045768; 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:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=vSbj2pz76KpDoQkNjcU0c2ZkuGkIz0GBKPT1mF02FMs=; b=C6zl1elMa/kSyElUWlaGYeerSAFjO5sVp6mJKBluL5S59ABE8eAEOb4aiifmdgA9VAkOhq Yv4gSFwpALd7uPorC/9zKaGDXuemGptHfHIO+afC/ad87cx4l2lDDIK5c4/Wrp3SFOpYU/ BEPxCwS923NzwV91/1YtLRbLHsHmLYWukBC2kz/3uZgMFFhxOEZeKYXQrusxXqi8aokj5c mkjTnWVSXgk6cNOqStYZ80B0l5U2Ah29tLI94yMEx1FlN5GEvDF64C39BZOwicXTkUmLZy bfRgR3EBkX6MaeXHh9HzWAYvzmj3A5MALq+Jwp6eYWaYY5KDiJv4PU/+rMYlrg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1652045768; a=rsa-sha256; cv=none; b=dDfBjLG3NS0NF4uB3vapPzrWAtKaUy/2yRZzYyty20GbMcGTKMn02wrDQDxDjYcWcaDCdS lQf9BSG2Q0dTdifEjhoqo2rYEczS3zCdoIo6T/vvHSfGi0oxgxdmE/cFrTkRKDJj0MZr3O xP51qdbiNHQ0aMv7EB7tYQUKR3acyXgrylCB+aF1cFd+iYecaVAJSVBkwLLwv+NVZT6AM4 m8q09obDNU8ap+R/4+ozhFMZc1prkm2cdToF8mKznYdSzwXx6sqJtJKER3joRWmT4zH+ym Oo/5si0XPtCXQEgdCqFj80CzaLtNwvmy7HpOBV+yafwVnhCx/2V9tl/2v5Jv1w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=UkGtG0Dh; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -4.81 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=UkGtG0Dh; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 5DFE92FADA X-Spam-Score: -4.81 X-Migadu-Scanner: scn0.migadu.com X-TUID: cjFfDApifsTP Hi Philip, Philip McGrath skribis: > Elm basically takes the view that the existing JavaScript/NPM thicket > should be considered harmful. It imposes a lot of very strict=20 > requirements on Elm "packages" (vs. "applications") to avoid whole > classes of problems. Not all of them are precisely the requirements I=20 > would have chosen, but I like them better than the alternative chaos. > > (One reason I gave this a try was to get some hands-on experience > writing a build system and importer in a simplified context before=20 > trying to write `racket-build-system`.) > > In particular, allowing arbitrary JavaScript would defeat the strong > guarantees Elm wants to offer as a statically-typed, purely-functional=20 > language with compiler-enforced semantic versioning (well, for a > decidable subset of "semantics") that can make runtime errors=20 > vanishingly rare in practice. To that end, Elm requires that > "packages"---the things `elm-build-system` knows how to build---be=20 > written in pure Elm, with no JavaScript at all. For "applications", > interop is limited to asynchronous message passing.[1] The only two=20 > "applications" in this series, the `elm reactor` frontend and > `elm-todomvc`, don't use any message passing. > > Of course, Elm needs some way to implement primitives. These are > provided by modules in the `Elm.Kernel.*` namespace, which are written=20 > in JavaScript with the undocumented, unsafe conventions expected by > the Elm compiler. The Elm compiler only allows kernel modules in > packages in the `elm/*` and `elm-explorations/*` namespaces, so users > can know that third-party packages won't break Elm's guaranteed, and > the compiler is free to change its internal APIs without breaking > anything. (This is free software, so you could patch the compiler to > do whatever you want: it's just a community norm so strong it's > expressed in code.) Even this is all source code with whitespace and > comments: it's written in a very stylized way, as an ASM file in > another compiler implementation might be, but it isn't generated code. > > For people who want to "minify", Elm suggests flags for UglifyJS that > can also do otherwise-unsafe whole-program optimization of the > compiled "application".[2] (Compiling "packages" emits only an > internal representation, not JavaScript.) In my own projects, I've > also done other post-processing, like adding LibreJS comments and > converting the output to an ES6 module. I haven't tried to make > `elm-build-system` do any of those kinds of things for "applications": > I think we should find more examples of Elm applications people would > want to package for Guix first, rather than trying to guess what they > might need. Thanks for explaining! Elm is fascinating in many ways. Ludo=E2=80=99.