From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.devel Subject: Re: ELPA submission: mathjax.el Date: Wed, 23 Oct 2024 19:04:11 +0000 Message-ID: <87sesmhc9g.fsf@posteo.net> References: <87ldytjso0.fsf@gmail.com> <87bjzbi8pj.fsf@posteo.net> <87ed466dpe.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19886"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Stefan Kangas , "emacs-devel@gnu.org" , Stefan Monnier To: Augusto Stoffel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Oct 23 21:04:59 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 1t3gfC-0004wS-Rg for ged-emacs-devel@m.gmane-mx.org; Wed, 23 Oct 2024 21:04:58 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t3gee-0007mG-3m; Wed, 23 Oct 2024 15:04:24 -0400 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 1t3geY-0007kS-Kf for emacs-devel@gnu.org; Wed, 23 Oct 2024 15:04:19 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t3geV-0004iA-Tr for emacs-devel@gnu.org; Wed, 23 Oct 2024 15:04:18 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 2FFB6240103 for ; Wed, 23 Oct 2024 21:04:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1729710253; bh=WsldIK73/9V9NMfFOF/c1/+1WAHLpORGhkNgAeH04uA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=ERiiJ1UwU/X6cO1LJKA4fBkzXWjuE8GPWX5o+pLWdsPhQYp8pZGyc3epXzfii823K Wr4INAq3sVOaX075Xvl5ULDA48Dn8pToAZkfHRM7zZdQJGx03f83YfM+MrEfe9dVff 1Ykq5f/SLnd2YmYTsxofFKDrkQKYCUjtB/ig8BidhbYbdnbGo71lyAtI9zBMJQ9x6R lQShhC1AQMDmkmNtH/OIuJkzrKh2bkbuFwVxV67LJKjfOgbOzu4XlU4GvXeCzKJi8x yC640VbROT+2fMHTlYxH6gseDHrlheuucaIbsKNUlEcOzAvjuE1xA2zJk85SLRUPhM aTOjULvazF20A== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4XYdkh1v82z6tvn; Wed, 23 Oct 2024 21:04:12 +0200 (CEST) In-Reply-To: <87ed466dpe.fsf@gmail.com> (Augusto Stoffel's message of "Wed, 23 Oct 2024 17:28:29 +0200") X-Hashcash: 1:20:241023:emacs-devel@gnu.org::BdH0Po74prm22Hnd:1Ynv X-Hashcash: 1:20:241023:arstoffel@gmail.com::N0Qum5wmpV0arXlS:3xOx X-Hashcash: 1:20:241023:stefankangas@gmail.com::CKKTgw5xJ5jaoIHb:8n1t Received-SPF: pass client-ip=185.67.36.66; envelope-from=philipk@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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:324801 Archived-At: Augusto Stoffel writes: > On Wed, 23 Oct 2024 at 07:02, Stefan Kangas wrote: > >> Philip Kaludercic writes: >> >>>> More specifically, there's a 2.3 MB minified JavaScript file that is >>>> committed to the repo and I will take care to update when the "real" >>>> source (also in the repo, of course) changes. >>> >>> Is there any reason to choose the minified version? Also, do you know >>> if you could support KaTeX as well? AFAIK it is more lightweight >>> (though the package name might be confusing in that case). >> >> I don't feel comfortable with distributing a 2.3 MB minified JavaScript >> file, unless it is generated from source code either as part of the >> package build process on GNU ELPA, > > Ah sure, what you suggest is of course much better -- I didn't think > ELPA might be capable of building stuff. Either of those would be > possible in my case: > > A. If the build environment has Node/npm, all that is needed is to run > make math2svg.js. That could be arranged, but it wouldn't be a recent version of node. But I'd like to double-check with Stefan Monnier (in the CC's) before proceeding with this. > B. If the build environment can run containers, I can include a suitable > Dockerfile. > >> or during the package installation on users' machines. > > This is not an option in my opinion. It doesn't "just work", instead > requiring the user to execute a build step, and the download is 40 times > larger than the minified JS. Some systems[0] appear to have mathjax as a package they can install. In their case, they could load the code they have installed locally. But I agree that this would incur an annoyance for all other users. [0] https://pkgs.org/download/mathjax >> Could we work on resolving that? > > I'd be happy to. If neither options A. or B. are currently available, I > would say implementing B. is a good approach in general for packages > that require a build step. Augusto Stoffel writes: > On Wed, 23 Oct 2024 at 07:23, Philip Kaludercic wrote: > >> Also, do you know if you could support KaTeX as well? AFAIK it is >> more lightweight (though the package name might be confusing in that >> case). > > I must confess I made the choice for mathjax out of sheer ignorance of > KaTeX's existence. Too bad I linked the package name with the backend > library. :-) If you want, it is not too late to rename the package to "shr-math" or something like that. >> I have tried QuickJS, but it didn't work either. That being said, I am >> not a JS expert so what I do I know :) > > Okay, this looks like an option if we wanted to turn the minified JS > into a binary executable, but this would then be platform-dependent. I > guess it's not in the plans to make ELPA capable of distributing > binaries... or is it? No, it is not. But QuickJS is also usable just as an interpreter. -- Philip Kaludercic on icterid