From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?Q?Aur=C3=A9lien_Aptel?= Newsgroups: gmane.emacs.devel Subject: Re: Dynamic loading progress Date: Thu, 24 Sep 2015 14:45:37 +0200 Message-ID: References: <55DB7C3D.4090106@cs.ucla.edu> <55DE75FD.8020308@cs.ucla.edu> <55F5DD8C.70506@dancol.org> <55F62C16.4000105@dancol.org> <55F64F04.9030002@dancol.org> <55F6E43E.9030502@dancol.org> <55F70C4E.8030805@dancol.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1443098788 18037 80.91.229.3 (24 Sep 2015 12:46:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 24 Sep 2015 12:46:28 +0000 (UTC) Cc: Daniel Colascione , Emacs development discussions , Philipp Stephani , Paul Eggert , Tom Tromey , Stephen Leake To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Sep 24 14:46:20 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Zf5uX-0007wb-5u for ged-emacs-devel@m.gmane.org; Thu, 24 Sep 2015 14:46:05 +0200 Original-Received: from localhost ([::1]:33037 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zf5uR-0004Em-FA for ged-emacs-devel@m.gmane.org; Thu, 24 Sep 2015 08:45:59 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53769) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zf5u8-0004DR-BI for emacs-devel@gnu.org; Thu, 24 Sep 2015 08:45:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zf5u6-0005m6-K9 for emacs-devel@gnu.org; Thu, 24 Sep 2015 08:45:40 -0400 Original-Received: from mail-io0-x230.google.com ([2607:f8b0:4001:c06::230]:34079) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zf5u6-0005ly-DO for emacs-devel@gnu.org; Thu, 24 Sep 2015 08:45:38 -0400 Original-Received: by iofb144 with SMTP id b144so75126042iof.1 for ; Thu, 24 Sep 2015 05:45:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=3jRsaLq/z8DKAPBCB5qrM4DDwV/FiIV4emMPIqp2V2A=; b=onloql43rpqVDDA/rPpNzo9pxRlsOZM00/DeXaJbjfDw1oFdZeqZTdR4dadmXFpbtn qCLRrDKp9nheN5/KxdW6cWRWslc0pou3jesqUC8Fe79A/27Qhma6dPDrfWrXTWAaOWfa VFUl8GCsHfokE1UZXCUqkErUvTOaAXd9yHqdJG/4PLEB7XLME5M71Cn4j3uupGDjiDxZ xOxvAiAzYnRfRPMLFhfA6zLx+MY+g+ejVWr9Ll3sj178CYiqBDGA4Uw+OmymGSqZWhf+ Rli/tBQ65GDbQzAwlVJ0+lbM6+0DWVbSawWZOUTr8loDLCrPVM/afYlPMsqYHhocUdaD kc+A== X-Received: by 10.107.9.194 with SMTP id 63mr282503ioj.122.1443098737630; Thu, 24 Sep 2015 05:45:37 -0700 (PDT) Original-Received: by 10.36.146.193 with HTTP; Thu, 24 Sep 2015 05:45:37 -0700 (PDT) In-Reply-To: X-Google-Sender-Auth: SMjTBvskVEjAo1XzGnOk9Es7u8U X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4001:c06::230 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:190328 Archived-At: Some updates. I haven't made any progress on errors. I was reading on condition-case, setjmp/longjmp and how it's used for signaling/throwing. I actually knew very little about it. I shouldnt be the one writing this stuff I think... Anyway I was looking into how I would set up a "catch-all" wrapping code so that we can implement a funcall that always returns and I still haven't figured it out. You said you would rather have an "unsafe" funcall that sometimes not return to module code so I will try to do that. And realisticly if we want this in emacs 25 it's the only way (I don't feel confident enough to do that bit properly and I'm the only one working on this). We can always fix it afterwards or simply have a "safe" and an "unsafe" version of funcall in the API. I personally think having a clean simple API from the module writer POV is better (least surprise principle) so I'm in favor of wrapping, in the long term. I think changing the API in the early stage is fine and I don't worry too much about binary API changes because it's only going to be used with GPL plugins (i.e. modules can be fixed and recompiled, most of the time). I've added [1] a tool that can generate modules basic code from templates (Makefile, source file, ERT test file) and can run module tests in batch. It's going to be easier to get started and easier for me to write tests. I've put everything in the modules/ subdir, I know its a bit messy having a python script there along with a lisp file (common elisp functions for module test) but it's my setup right now and it saves me time (i.e. deal with it! :). We can remove or change it afterwards if we want. Here's how you use it: # after successfully compiling emacs % cd modules % ./modhelp.py init modt-mymod writing modt-mymod/test.el... writing modt-mymod/Makefile... writing modt-mymod/modt-mymod.c... done! you can run ./modhelp.py test modt-mymod % ./modhelp.py test modt-mymod [*] ./modt-mymod: ------- start ------- [*] ./modt-mymod: running make gcc -ggdb3 -Wall -I../../src -fPIC -c modt-mymod.c gcc -shared -o modt-mymod.so modt-mymod.o ../../lib-src/make-docfile modt-mymod.c > modt-mymod.doc rm modt-mymod.o [*] ./modt-mymod: running test ../src/emacs -batch -L . -l ert -l ./modt-mymod/test.el -f ert-run-tests-batch Running 1 tests (2015-09-24 14:33:44+0200) passed 1/1 modt-mymod-fun-test Ran 1 tests, 1 results as expected (2015-09-24 14:33:44+0200) [*] 1/1 MODULES OK Running the `test` command without specifying the module tests all module. (Hm.. I just noticed modules makefiles were ignored/not commited by git. I've just fixed it) I've started working on the configure.ac to make module a build time option (still a WIP, I've only commited it to be able to work on it from other computers). 1: https://github.com/aaptel/emacs-dynamic-module/commit/46c5f032ebf49275e346cae015dc39cbe3f8ebea