From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Christopher Dimech Newsgroups: gmane.emacs.devel Subject: Re: Contributing to Emacs Date: Wed, 7 Sep 2022 23:33:17 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27178"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: =?UTF-8?Q?Jo=C3=A3o_Paulo_Labegalini_de_Carvalho?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Sep 07 23:34:22 2022 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 1oW2gg-0006pp-0I for ged-emacs-devel@m.gmane-mx.org; Wed, 07 Sep 2022 23:34:22 +0200 Original-Received: from localhost ([::1]:50592 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oW2ge-0001Ch-QI for ged-emacs-devel@m.gmane-mx.org; Wed, 07 Sep 2022 17:34:20 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36106) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oW2fm-0000WH-Dm for emacs-devel@gnu.org; Wed, 07 Sep 2022 17:33:26 -0400 Original-Received: from mout.gmx.net ([212.227.15.15]:48283) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oW2fk-0006rR-DX for emacs-devel@gnu.org; Wed, 07 Sep 2022 17:33:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1662586397; bh=fN4o2iLmU/U6UxBVkuElDntiMPEiMXgjWc/oVOFWJHc=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=hmuRLFVmzGxQJPkq10VPQmhnQLcaCrC0zIr0KNHXHEPAMEmeTjLdhg5pIOnFdk9o1 tqrwJIJfADjlFUd0/84DhAbNAek+5i0Tscasb27jwIuZvL7ZBnziPgqhXsYPUYa8rs UHcRYkX+QSlStKNhou0ajoXbRQaQqZaWUaFdj8ZU= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [92.251.127.164] ([92.251.127.164]) by web-mail.gmx.net (3c-app-mailcom-bs08.server.lan [172.19.170.176]) (via HTTP); Wed, 7 Sep 2022 23:33:17 +0200 Importance: normal Sensitivity: Normal In-Reply-To: X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:zGJKGbWLLRfkeZV0JNQuPdA1VNd9SU0KHwAwgSv4mQskuJlC8OKIpXVGaomSllltiiCiv 8WVfcGipVkX67y5uJiU3+oIOHd9n5nbqoZtEi6sf4HYF7+0RuE+8DcWO76qyncOqjc+SHRHgMSoq 0On6KfdmX+CbkwVva9a5s3sLahFH3T68EzY5vLQY0wkcG8/wYhq4BNmHTgedkvdN8CGHsYAnwe8U O6z1ixShAgk4ejVk9KMT9n/S1fTAS7kb/6XH9spWW7FL+4mN3k5JumitpWw7DRd5WNWYYYT0sas5 TU= X-UI-Out-Filterresults: notjunk:1;V03:K0:9qQgvozvPI0=:GVWA8z5MF2gF/hdFnFITRI B41O2gQ0V5lEvPL+7vqaHJBJc+cvjSjr04tmKH1n/WYmVjclzT26/KTxjOlyV8U6MS2vOHLCn biOD1cmPk5L5LK/jgMRzgKACRinLKfKv+OuCTCLVBwcdDXiC4cOVTwU/rQNW1mONtyfAeIZdf FVOUIQuCn9/eLOFpK4sjr7LN1tJmQlJchumkrDmvDVmYjDT7qDxV0GY4H/yG5/gKRozq2rfHY HbEcwxlHGUrN2fHSaBq7mnkfaLzhMqmPEqcKY3XnR07KIALXojoLzv3sz6CFvLX9XP2P8PLVb 7nqiYMaTEPIyeYPTtOZTxGkcN7HXoU2JYrIYiIzy5rgHqJbzM7jSf3JnVPlbME3kZDMY4CFKS H0GkYHtNKkcq4t2seENDlQhLMb4pnCjGQjI8R+yG5tmAU6Cr8pTBSg7m4xNVmzmAPBkibmH7L UljURXdONMNlGpNQFSz+D6PxEO0AEqlgyIYXM5aULwQ6tx8/ChMBKE6eeklEMQkW3K4FNjzP7 UZnHUI3pFncH9k+rhNqAbA8QaOyHI1CxfCirahnW8EFN7Sb1ukTCX0F0QdBkXA5HRGxUE0nwL YMrSJj1wj7u12aIVqGTgZDjo+11D+zRtpS6g5yY4JeIdpJl/6XCgAs6UF0O6Y7NOr5Yn5KZOi PS0rkHKLxikRqgPfkgm5TucU4pG/E6CWSftwDvr4anyBX++O7QMeQrnp2KAuBsNdLHwdFNnH4 geSKKTVNdSwg2EMM5aMZsRyAgGrFv7FNrvQm8nwxN95rkNj5KlXPVEXwLJXh3oTgCg+NMH0L Received-SPF: pass client-ip=212.227.15.15; envelope-from=dimech@gmx.com; helo=mout.gmx.net X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, MIME_HTML_ONLY=0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=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: 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" Xref: news.gmane.io gmane.emacs.devel:294883 Archived-At:
There are a number of things that would be valuable to users. 
 
1.  Text Scaling
****************
 
a.  When resizing windows and frames, scale the font size of text accordingly.
b.  When scaling the font size of text, scale the windows and frames accordingly.
c.  Scale the font size of text to fit the window or frame size.
 
2.  cdlatex
***********
 
a.  Optimise the interaction between texmathp and cdlatex.
b.  Release a stand-alone package for cdlatex functionality.
c.  Refactor tex-mode and latex-mode for modularity.
d.  Integrate tools provided by TeX-mode and LaTeX-mode into tex-mode and latex-mode.
There should be only a single major mode for tex and only a single major mode for latex.
 
Felicitations
Kristof
 
 
 
 
Sent: Thursday, September 08, 2022 at 8:01 AM
From: "João Paulo Labegalini de Carvalho" <jaopaulolc@gmail.com>
To: emacs-devel@gnu.org
Subject: Contributing to Emacs
Hi,

I started using Emacs about 2 months ago. Now that I am comfortable with customizing Emacs, getting help, and Elisp, I would like to contribute to the project.

 I was looking at the file etc/TODO in the repo, and some items there caught my attention. For example, under 'Important Features'  I found 'Add an "indirect goto" byte-code'. Is this still a desired feature or is it not required due to recent efforts towards native compilation? (In the negative case, please feel free to suggest another item for me to work on)

If it is still desired I would like to work on it and would appreciate guidance. After taking a look at lisp/emacs-lisp/bytecomp.el,it seems that forms such as
 
 (let ((foo (lambda (x) bar)))
     (dosomething
       (funcall foo toto)
       (blabla (funcall foo titi))))


are compiled by calling byte-compile-let. Before generating the binding for foo, #'(lambda (x) bar) is compiled by calling byte-compile-push-binding-init, which in turn compiles the lambda to bytecode and pushes it to the stack.

So to make it more concrete for my sake, I wrote the following form

(let ((foo (lambda (x) (- x 1))))
  (* (funcall foo 2)
     (- (funcall foo 3) 2)))


and with disassemble inspected the generated bytecode by Emacs 28.1

byte code:
  args: nil
0       constant  <compiled-function>
      args: (x)
    0       varref    x
    1       sub1      
    2       return    

1       dup      
2       varbind   foo
3       constant  2
4       call      1
5       varref    foo
6       constant  3
7       call      1
8       constant  2
9       diff      
10      mult      
11      unbind    1
12      return    


As far as I understood,  the idea of the "indirect goto" here is to eliminate the calls on lines 4 and 7 and replace them with an indirect goto. And as per the TODO entry, the return in line 2 of the compiled lambda would also need to be replaced by a jump back.

So here is where I am a bit lost. Currently, the compiled lambda bytecode lives in the constant vector and a reference(?) to it is pushed into the evaluation stack in line 0 (constant <compiled-function>). Thus, for the indirect goto idea to work, the bytecode of the lambda would need to be part of the bytecode of the let's body**. That way, a computed branch can branch into the lambdas code and it is possible to branch out of it when returning.

Aside from guidance on implementing this, I would appreciate any pointers on how to adequately test it.

Regards,
--
João Paulo L. de Carvalho
Ph.D Computer Science |  IC-UNICAMP | Campinas , SP - Brazil
Postdoctoral Research Fellow | University of Alberta | Edmonton, AB - Canada
joao.carvalho@ic.unicamp.br
joao.carvalho@ualberta.ca

** Forgive me for the lack/miss use of terminology.