From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tim Cross Newsgroups: gmane.emacs.devel Subject: Re: About implementing libre.js/el in Emacs Date: Sun, 30 Aug 2020 17:44:59 +1000 Message-ID: References: <791FBE67-B71F-4F80-810D-BE29B55FD10C@mit.edu> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000027cee205ae13775a" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16838"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Paul Eggert , "emacs-devel@gnu.org" To: Qiantan Hong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Aug 30 09:45:50 2020 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 1kCI29-0004Fj-A8 for ged-emacs-devel@m.gmane-mx.org; Sun, 30 Aug 2020 09:45:49 +0200 Original-Received: from localhost ([::1]:46604 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kCI28-0006PY-B9 for ged-emacs-devel@m.gmane-mx.org; Sun, 30 Aug 2020 03:45:48 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38908) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kCI1Z-0005vX-Bi for emacs-devel@gnu.org; Sun, 30 Aug 2020 03:45:13 -0400 Original-Received: from mail-oi1-x231.google.com ([2607:f8b0:4864:20::231]:39493) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kCI1X-00081m-IX for emacs-devel@gnu.org; Sun, 30 Aug 2020 03:45:13 -0400 Original-Received: by mail-oi1-x231.google.com with SMTP id z195so4484744oia.6 for ; Sun, 30 Aug 2020 00:45:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Wp/mo4rF7f7+arpIeTQ5HGjnrq2SDfMuGKJfZ2I1XUY=; b=gCn1XYHUEjngmHuVhxLWjdtFctUh89VEBtdC8ZtJwo4aRXrere4y19h5ZU5fKxO18u mRkQKEpoDGFqSk8zD3jCp4z9501d9U9voAkuwLEgwRAMwkYmATJg1R8K/f+XEKphTS30 DVMJQ3irynlZo275fJ+udRM/QyhGi8AGGfkc7iNQc5ubqXGdypUrsV/RTQgt6aY3PGPO +GbtteYT0ENcXiC4t7omgN/F1U9vBgyTixksy/S0vCBWnH7ojvpi2BZ4RuYfeDnaCfkp XiYoQQwg5g1ZnCQyZn6cTj/Jrd+AT1THxccKUmRmDbCSIdKwDsAJW0q/qTyHsEdXkLQg 1unw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Wp/mo4rF7f7+arpIeTQ5HGjnrq2SDfMuGKJfZ2I1XUY=; b=qXzokPeNyrtcdmONAQuBwcPrXAncx90RDmAUXOez8Uy6MGnk1EsfUTPorge95S/s/a vzYk59GTh32vcIVWf/wuj0C+lW/cTi5uWwwEh6HgyIOYtWNs+fHYT4TGD7LYE1NqMmV7 SaRTibWYKG0Ttiak013CRdqSV0FZcc98aeTymVn8FmleEiN18uy2WkmVcSkisleEDdM4 CVYiGBIoSeFoSdS+b+yCKtiOps1aj0PFgbLVQrj4lfgEdEGMd0lfflhPeQlFYF6z42dn CbGVfYVpZHgFwGsL2QbL8YlwNOrgTWPPCG318ZpngPHBQD5+FfiIvnpLXcqZ6V1K0q41 Cfnw== X-Gm-Message-State: AOAM532PoZptGk8RPjvBxysdp0Dhnrb+FoguC0OomcjAEl7grfP1n5aP QbPdlamnoPDKxLUT930YmqN3W4cE13+WAirJ2Cs= X-Google-Smtp-Source: ABdhPJz+UtBuPpZAYd82mEylSkWAPhffmuqN1ZB5UVXCIOgSCy3o9t7fawprNkcFRAoCtzOo7/64PHduwjf3+AMRMtc= X-Received: by 2002:aca:b48b:: with SMTP id d133mr782969oif.47.1598773510261; Sun, 30 Aug 2020 00:45:10 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::231; envelope-from=theophilusx@gmail.com; helo=mail-oi1-x231.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, HTML_MESSAGE=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:254406 Archived-At: --00000000000027cee205ae13775a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable OK, I don't see one as being worse than the other. They are different and have different benefits/drawbacks. WRT developing plugins in elisp, I wonder if using the Google Closure Compiler (Apache 2.0 License) could be useful. This is what Clojurescript does, allowing you to develop in Clojure Lisp and the output being optimised JS code. However, not sure how much demand there would be for writing browser (or node) extensions in elisp. While it is nice to write in lisp to develop JS, Clojurescript has already provided that wheel and it is quite mature. On Sun, 30 Aug 2020 at 12:45, Qiantan Hong wrote: > > > On Aug 29, 2020, at 10:26 PM, Tim Cross wrote: > > > > Just curious - in what ways is JS worse then Elisp? > There=E2=80=99re lots of other arguments, e.g. homoiconicity, typing (js = does lots > of > unreasonable type casts)=E2=80=A6 but in this context, I think the most i= mportant > point is that Emacs and Emacs Lisp give one of the most flexible and > self-descriptive programming system. If something is implemented in > Emacs lisp, we get M-x apropos, describe-function, describe-variable, > they can be overrode by just eval-defun, and can be advised. Customizing > or extending it is painless and trivial. However, those things become > much harder if the package is implemented in JS. > > > I agree Option 1 would give more bang for your buck - at least > initially. > > > I=E2=80=99ll take that. I imagine while implementing Web Extensions API f= or js > it will be trivial to also bring those to Elisp too, so finally we not on= ly > have those JS browser plugins to run but can also develop plugins > in Elisp. --=20 regards, Tim -- Tim Cross --00000000000027cee205ae13775a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
OK, I don't see one as being worse than the other. The= y are different and have different benefits/drawbacks.=C2=A0

=
WRT developing plugins in elisp, I wonder if using the Google Closure = Compiler (Apache 2.0 License) could be useful. This is what Clojurescript d= oes, allowing you to develop in Clojure Lisp and the output being optimised= JS code. However, not sure how much demand there would be for writing brow= ser (or node) extensions in elisp. While it is nice to write in lisp to dev= elop JS, Clojurescript has already provided that wheel and it is quite matu= re.=C2=A0

On Sun, 30 Aug 2020 at 12:45, Qiantan Hong <qhong@mit.edu> wrote:

> On Aug 29, 2020, at 10:26 PM, Tim Cross <theophilusx@gmail.com> wrote:
>
> Just curious - in what ways is JS worse then Elisp?
There=E2=80=99re lots of other arguments, e.g. homoiconicity, typing (js do= es lots of
unreasonable type casts)=E2=80=A6 but in this context, I think the most imp= ortant
point is that Emacs and Emacs Lisp give one of the most flexible and
self-descriptive programming system. If something is implemented in
Emacs lisp, we get M-x apropos, describe-function, describe-variable,
they can be overrode by just eval-defun, and can be advised. Customizing or extending it is painless and trivial. However, those things become
much harder if the package is implemented in JS.

> I agree Option 1 would give more bang for your buck - at least initial= ly.
>
I=E2=80=99ll take that. I imagine while implementing Web Extensions API for= js
it will be trivial to also bring those to Elisp too, so finally we not only=
have those JS browser plugins to run but can also develop plugins
in Elisp.


--
regards,

Tim

--
Tim Cross
--00000000000027cee205ae13775a--