From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id uAZVLVHH4WIwkQAAbAwnHQ (envelope-from ) for ; Thu, 28 Jul 2022 01:16:33 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id GJk6LVHH4WKkUQEA9RJhRA (envelope-from ) for ; Thu, 28 Jul 2022 01:16:33 +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 37BCF12FD for ; Thu, 28 Jul 2022 01:16:33 +0200 (CEST) Received: from localhost ([::1]:55142 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oGqGW-0004A0-B5 for larch@yhetil.org; Wed, 27 Jul 2022 19:16:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39282) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oGqFw-00049j-4Y for guix-devel@gnu.org; Wed, 27 Jul 2022 19:16:00 -0400 Received: from mail-40134.protonmail.ch ([185.70.40.134]:64776) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oGqFs-00080R-E2 for guix-devel@gnu.org; Wed, 27 Jul 2022 19:15:55 -0400 Date: Wed, 27 Jul 2022 23:15:14 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1658963724; x=1659222924; bh=zh66/kiOC0pS9/rDQUGlzeE4emcFjDLb3dwG1QjsyN8=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:In-Reply-To: References:Feedback-ID:From:To:Cc:Date:Subject:Reply-To: Feedback-ID:Message-ID; b=WyX32TJ1dOl0IcdnXwYQcDIzAatDazt0KCK+rQj6F14QLfYvfIvpmfNs2g3V33HN4 v4EER3YfQ8PF8zwE+qQ6VvHpgOdKBuvzFWi24hpgo4i1HOm/vVwZ0L5R9zUjOr9uUR 3xrXHQJthsHcAHXCJhqJrxDabFcmOW0qD9b0m3FD3Sbo+rv6dcPOjf8QtU31UbKvyh bvQQcEvBEYzkVAT//Ncstijd7xVJNvQvuM/3Z36H3ZR3finAZRKvGYql2g7Zd1ruAl WOsg0wHJY7So36HtqntbmLxmchUKCOzeQz61cu6KDOa43ShPYtZovDh/vZztPwzY6q pI1ReyCBA/jRw== To: jgart From: Ryan Prior Cc: Maxime Devos , Guix Devel Subject: Re: developing javascript with guix Message-ID: <7K0vjV4NvEKb0D-wEmmFrZrnJIJRCzAAPhxOe0b4qRqr10cYam8bO2M2mgiQcBD5tO08B7NqFBo_xn-LCDzg-sS_VKdzVhm4_cwpceZyi60=@protonmail.com> In-Reply-To: <20220727172517.GB4874@gac> References: <20220726192504.GB7293@gac> <8a535734-0a7d-9276-8091-4c4312abe8a3@telenet.be> <20220727172517.GB4874@gac> Feedback-ID: 7396961:user:proton MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.70.40.134; envelope-from=rprior@protonmail.com; helo=mail-40134.protonmail.ch 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, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: , Reply-To: Ryan Prior Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" 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=1658963793; h=from:from:sender:sender:reply-to: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=zh66/kiOC0pS9/rDQUGlzeE4emcFjDLb3dwG1QjsyN8=; b=N3L1p0FGWW4kt1iLt8MwCYOn6nY8f3stAMuEYC3NI2r4n2P6JiO08OrjD6vKMfdpPWJvLn LDdB1aPpIGxzPQ72J5FDNw+QEplHcjzORkD0EiCCqinM5Agn+K7xzkECA3DLTErbhAAzzT s4IMoygt5bceGkVonAmDZfzFOBqy2RPBYHVutMWqgKuQQGanNgyJqDflWZFLwJB/IHBb7/ +g4WU4tWZihHz0+pPZhVT2mnBQnCdaBIw1065kEwciTqFSt0nKfsvVFEVeAsU+/T0Jw+ZQ V6OIbG+eaDmB4kxf9zEG92o24wS5NDpfX9dtq+PK1zC9Ls3qjFPjst8SPa8Tmg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1658963793; a=rsa-sha256; cv=none; b=miat7EfJUZYwWfZsuZvxFFDj+O8QP4FWV42FdVgO3jnCm+EC1gOaEt25UZhrm+Yz+D2s0t GJNBW4NzcAgLSWz0DJYbsK7lQiJU4ivztn824ZD/T3iwS4RBhbhr5zBx62IZvni6+irxIk 5WBog6gU7/xZzgf//67ASTPIQFfm+QriS5Ud0z0yewA78Fx2GVA0Sqi+8cBVRoPXcctA+e tuMO5S8snQvif4Rf4B1uMugjGQPzaqxekw5lqodGVN86LhC8ilTdyKgQ89bPVxXpJEeIPh WDPaSh+f+en65y+kUK/1XYDH6VwEYce1ytymwV0K+H0Y2rP6EleI9hAbOmEi/g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=protonmail.com header.s=protonmail3 header.b=WyX32TJ1; dmarc=pass (policy=quarantine) header.from=protonmail.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-Migadu-Spam-Score: -3.93 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=protonmail.com header.s=protonmail3 header.b=WyX32TJ1; dmarc=pass (policy=quarantine) header.from=protonmail.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-Migadu-Queue-Id: 37BCF12FD X-Spam-Score: -3.93 X-Migadu-Scanner: scn1.migadu.com X-TUID: 6g/oO9ujquIK On Wednesday, July 27th, 2022 at 10:25 PM, jgart wrote: > > > On Wed, 27 Jul 2022 11:33:43 +0200 Maxime Devos maximedevos@telenet.be wr= ote: > > > Hi Maxime, > > Hope all is well. > > > Let's try not doing anything special: > > > Thanks for the repl example and for trying out a Guix developer js > workflow for me. Do you happen to know if the same approach works > for erlang? > > I think we should have language developer documentation for > general orientation of new Guix users. Ryan Prior, another Guix > contributor/developer has mentioned this idea to me before. Hey Guix! Since I'm mentioned here, I'll throw in a couple ideas. First, an issue about unexpected behavior. I tried running this: guix shell node-sqlite3 -- node <<<"console.log(require('sqlite3'))" It gave me an error saying it couldn't find the module sqlite3. Turns out i= t's because I was using node from my base profile and not from the shell. R= unning the shell with `--pure` makes it give a more helpful error, "node: c= ommand not found." Why isn't node a dependency for node-mersenne though? Is there really a use= case for shipping the source code of a JavaScript library without the inte= rpreter? At a minimum, can we make `guix shell` warn on stderr if you creat= e a shell with one or more libraries but no interpreter? Second, a point about documentation. It's pretty obvious to most of us how = to use JavaScript libraries (or Python, etc) with Guix, modulo small issues= like the above. But Guix has two weaknesses here in comparison to other la= nguage-specific package managers: ## Explanation in context The language-specific package managers generally don't take for granted tha= t people know anything about the language, because they're designed to be a= ccessible to learners of the language. For example, PyPI's explanation for = pip starts with the basic "can you even run Python?" and goes through a bun= ch of Python-specific package workflows: https://packaging.python.org/en/la= test/tutorials/installing-packages/ We could write a guide like that with information and example commands spec= ific to Python packaging, and another for JavaScript, etc. These provide ex= planation in context so beginners and people who are confused for whatever = reason can see concrete examples of what you're supposed to do. ## Specificity implies belonging A Python-specific package manager is full of references to Python, librarie= s for Python, tools for Python programmers. If you're doing Python, the PyP= I shouts loud and clear: "you are in the right place!" Likewise for JavaScript and npm, Ruby and gems, etc. Landing on the pages f= or any of those package managers confirms that you are in a place where you= will find information and tools that will help you with your language and = package commons of choice. When you do a search for "MySQL" on PyPI, you on= ly see Python MySQL packages, not random other stuff. The interface and sea= rch quickly confirm that you have found the right place with the right stuf= f for you. Meanwhile, in the Guix docs, everything is abstract. We don't name any spec= ific library commons or restrict package search to any specific namespace, = we don't even have tags or categories for them. There is no link to Guix do= cumentation I can give to a Python hacker that assures them, in the way PyP= I's website does, that Guix has the stuff they need and they can find it an= d make it work. So Guix requires more faith and experimentation from users,= which means a lot of people will just bounce off it. I talk to somebody about once a week who says "oh I've heard of Guix and ke= ep meaning to try it." The project has built up a lot of indistinct good fa= ith that it has yet to make good on, so to speak. I think we can make a muc= h better experience for users from the various language library commons if = we build language-specific landing pages with instructions, documentation, = and package search that affirm they are in the right place and will find th= e right stuff, and don't make much assumption that the person knows what th= ey are doing. I'll pitch in on this effort! I have experience with Ruby, JavaScript and P= ython packaging and tooling and am to help build out all those areas. Our e= merging teams can help lend some structure to this effort too, I imagine. Cheers, Ryan