From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Philipp Stephani Newsgroups: gmane.emacs.devel Subject: Re: Dynamic loading progress Date: Sun, 04 Oct 2015 14:38:32 +0000 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: multipart/alternative; boundary=047d7bb0405878dd8a0521485a11 X-Trace: ger.gmane.org 1443969558 22541 80.91.229.3 (4 Oct 2015 14:39:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 4 Oct 2015 14:39:18 +0000 (UTC) Cc: Paul Eggert , Daniel Colascione , Emacs development discussions , Stefan Monnier , Tom Tromey , Stephen Leake To: =?UTF-8?Q?Aur=C3=A9lien_Aptel?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Oct 04 16:39:02 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 1ZikRJ-0000ps-Sy for ged-emacs-devel@m.gmane.org; Sun, 04 Oct 2015 16:39:02 +0200 Original-Received: from localhost ([::1]:42723 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZikRJ-0008M2-Be for ged-emacs-devel@m.gmane.org; Sun, 04 Oct 2015 10:39:01 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59536) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZikR2-0008Lu-TV for emacs-devel@gnu.org; Sun, 04 Oct 2015 10:38:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZikR1-00073f-M8 for emacs-devel@gnu.org; Sun, 04 Oct 2015 10:38:44 -0400 Original-Received: from mail-wi0-x22f.google.com ([2a00:1450:400c:c05::22f]:38642) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZikR1-00073X-Cn for emacs-devel@gnu.org; Sun, 04 Oct 2015 10:38:43 -0400 Original-Received: by wiclk2 with SMTP id lk2so83492029wic.1 for ; Sun, 04 Oct 2015 07:38:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-type; bh=PZa06HnzOmGxrvpjulObfb2yaX/dz0MOEsK6FLH85oE=; b=z5p8sVUmZWKSDkVN9lUOHG6Qr4cKiHOQl4OEXRb6kN9GR+NLtObZShPM6pUiPgJIpd ej6Yk+F5WvvUrAFo5rgLy4HxTZEw4SRNvNdlQfVFzt6Hwej9a3gmokU5RQV4Y7OnJGMa Q2ZbyaJcYMakem3tdD6WU2WSxlxWY2ubl2uegrWBGlk8r+5DcF+DOp56wxKfQGhnGiER EefoPx/eDSXV/Amdt2N9woG9cyCL5m5UOVHkVjRtl4x5706xn+VYhYR7wbAGCsQrr08N eMKt1fPmsT62l1xCcxD6yJZRV959YN26iCXspaXMHv/OTIkYO+fef+t2Ftg4ks1H5T0c nq6Q== X-Received: by 10.194.82.198 with SMTP id k6mr24978876wjy.139.1443969522783; Sun, 04 Oct 2015 07:38:42 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c05::22f 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:190887 Archived-At: --047d7bb0405878dd8a0521485a11 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Aur=C3=A9lien Aptel schrieb am So., 4. Okt= . 2015 um 15:25 Uhr: > First of all thank you for actually contributing with code, Philip. > Very much appreciated. > > On Mon, Sep 28, 2015 at 5:35 PM, Philipp Stephani > wrote: > > I have implemented this in a private fork: > > > https://github.com/phst/emacs-dynamic-module/commit/b14073ef8a522bdb90a8d= 7f0edc575edfd75da26 > > Note that code is only a suggestion how it could be implemented. It > deviates > > from Daniel's design by using return parameters instead of TLS, but > that's > > only a minor difference. The important part is the addition of > > protected_call_n to eval.c. > > I've looked at both branch. The one using an in-out return parameter > looks really annoying to use though. I think I prefer the "minimal" > implementation [1]. That's fine, it's Daniel's design, after all, and using TLS for error reporting is common (e.g. errno). I've added a pull request for this: https://github.com/aaptel/emacs-dynamic-module/pull/7 Another pull request implements checking whether calls are only made on the main thread: https://github.com/aaptel/emacs-dynamic-module/pull/8 > Using that version, we could add an > unsafe_funcall() to the API that doesnt do any signal checking so that > we have both. > Daniel, what do you think about that? --047d7bb0405878dd8a0521485a11 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


Aur=C3= =A9lien Aptel <aurel= ien.aptel+emacs@gmail.com> schrieb am So., 4. Okt. 2015 um 15:25=C2= =A0Uhr:
First of all thank you for = actually contributing with code, Philip.
Very much appreciated.

On Mon, Sep 28, 2015 at 5:35 PM, Philipp Stephani <p.stephani2@gmail.com> wrote:<= br> > I have implemented this in a private fork:
> htt= ps://github.com/phst/emacs-dynamic-module/commit/b14073ef8a522bdb90a8d7f0ed= c575edfd75da26
> Note that code is only a suggestion how it could be implemented. It de= viates
> from Daniel's design by using return parameters instead of TLS, bu= t that's
> only a minor difference. The important part is the addition of
> protected_call_n to eval.c.

I've looked at both branch. The one using an in-out return parameter looks really annoying to use though. I think I prefer the "minimal&quo= t;
implementation [1].

That's fine, it'= ;s Daniel's design, after all, and using TLS for error reporting is com= mon (e.g. errno). I've added a pull request for this:=C2=A0https://github.com/aa= ptel/emacs-dynamic-module/pull/7
Another pull request impleme= nts checking whether calls are only made on the main thread:=C2=A0https://github.c= om/aaptel/emacs-dynamic-module/pull/8
=C2=A0
Using that version, we could add an
unsafe_funcall() to the API that doesnt do any signal checking so that
we have both.

Daniel, what do you think= about that?=C2=A0
--047d7bb0405878dd8a0521485a11--