From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 29 14:26:57 2020 Received: (at submit) by debbugs.gnu.org; 29 Apr 2020 18:26:57 +0000 Received: from localhost ([127.0.0.1]:44528 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTrQ8-0001BF-TH for submit@debbugs.gnu.org; Wed, 29 Apr 2020 14:26:57 -0400 Received: from lists.gnu.org ([209.51.188.17]:50440) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTrQ7-0001B8-KF for submit@debbugs.gnu.org; Wed, 29 Apr 2020 14:26:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36116) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jTrQ6-00048P-Su for bug-gnu-emacs@gnu.org; Wed, 29 Apr 2020 14:26:55 -0400 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jTrQ5-0007xg-Fy for bug-gnu-emacs@gnu.org; Wed, 29 Apr 2020 14:26:54 -0400 Received: from mail-oi1-x22d.google.com ([2607:f8b0:4864:20::22d]:44034) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jTrQ5-0007xQ-46 for bug-gnu-emacs@gnu.org; Wed, 29 Apr 2020 14:26:53 -0400 Received: by mail-oi1-x22d.google.com with SMTP id a2so2688758oia.11 for ; Wed, 29 Apr 2020 11:26:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=qtwHIwINeqGe35YK93kobOwYX5CzMXlK6azGqWxnfxw=; b=gcPE/yi+SKrKoQtXmEfKD+RwKNfk7TUCipGQ33CyzYRnFGHA0PT4zYz6wue4Aq7Q7Y 5VMhy0OwoTQ7YS/mTdoYxleKl9PR4+YI+yiNGI74VmZn42bVUCLN2wswXALb5C0LzI0m yOVcm0hsADY8dPZ/QEguyiCeY/i32M03jc1sBBn5LjTTEjOpF5UCUxqFsPSk7SPZ0fCV 0ryG322kkk8a/DHDrsLpZMGEoVSqCU5TUdjwI2BLkLW0ZkUOgh0SntUMBoryFjUNcAiM vRomc9jdKsamFDzz9hduAvDYRItj8HTfuWW7OBNykpkoULdILt8H19R7PO1rv4oM7208 ZINg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=qtwHIwINeqGe35YK93kobOwYX5CzMXlK6azGqWxnfxw=; b=fsRcqnxe1O40QimsW60uy79VgSIixHPyg4uBro7/FXiZP6Pn3CDfEhF+uH3iisFZGQ lMTAeiCD8H/SoG0QcdLvplqdySdS0CNIujpcgVHEIUH8Gay8GeQk5vVRWv7SUL1ilKa3 8Ll8kr51np2q/sdrDRntddxP2s4WP6Qc1f5RSCjaS/si7LsC3YYyXUZ2UmnG1q/QSFdV 4DhhGoaVI7nkrHVVhmqA7fTF/cmKzQghI28PchEaYOQf2DXi6F7aWqbXlAQLlLsx/+XI 8+1Hm2PQcQ7YJNCVoWbDkSFiPDSGHEQB4IFEnmDtUT123xR4wGv78dIvZvNyHEgxiQ5g dmAg== X-Gm-Message-State: AGi0PuZuDOzmB8ZbVt5IwJvuJXx9rYcLf0kbzY1ndhG2mLmljRbtYC0s vM1NdjMt4n6m1L4rmc+EhozAkT5Tpm3xZHEjbPNNXX69 X-Google-Smtp-Source: APiQypLn2PJiXq26WMvpis3uvbXaQhkM0BAGUiUg41qOwnytCs4KP/zLAOE2UQ8TxsEiL4mjtcy3ksNY5n3f6BtImww= X-Received: by 2002:aca:ec87:: with SMTP id k129mr2772711oih.44.1588184811205; Wed, 29 Apr 2020 11:26:51 -0700 (PDT) MIME-Version: 1.0 From: Pip Cet Date: Wed, 29 Apr 2020 18:26:15 +0000 Message-ID: Subject: 28.0.50; (apply nil) To: bug-gnu-emacs@gnu.org Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2607:f8b0:4864:20::22d; envelope-from=pipcet@gmail.com; helo=mail-oi1-x22d.google.com X-detected-operating-system: by eggs.gnu.org: Error: [-] PROGRAM ABORT : Malformed IPv6 address (bad octet value). Location : parse_addr6(), p0f-client.c:67 X-Received-From: 2607:f8b0:4864:20::22d X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) I'm very confused by the behavior of `apply' when given only a single argument: when it's a nonempty list, the argument gets spread out and passed to Ffuncall (I guess this might be useful sometimes). When it's nil, Ffuncall gets called with nargs == 0 and Emacs crashes, at least sometimes. Should we fix the special case or raise apply's minimum argument count to 2? From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 29 14:36:26 2020 Received: (at 40968) by debbugs.gnu.org; 29 Apr 2020 18:36:26 +0000 Received: from localhost ([127.0.0.1]:44567 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTrZK-0003X7-FT for submit@debbugs.gnu.org; Wed, 29 Apr 2020 14:36:26 -0400 Received: from mail-ot1-f52.google.com ([209.85.210.52]:45406) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTrZI-0003Wr-E7 for 40968@debbugs.gnu.org; Wed, 29 Apr 2020 14:36:24 -0400 Received: by mail-ot1-f52.google.com with SMTP id e20so2567334otk.12 for <40968@debbugs.gnu.org>; Wed, 29 Apr 2020 11:36:24 -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; bh=1nCC1pVCpo6a1FBtaf21dUN0TQ+qxWr9csbUN83atYg=; b=GgoO/17CfCBDz9WNEv807UJ6BKBMj0CxYBGBmDxYE1oGv4VleBnU7p6Xd89pCbvcrN OG9hr5/vCdkqlJ/OI0wN6hb77tAUsM2i24asznCyUlqoZulo8sntrOGwPxsY8g4jhJ1v KD9u4UVE8zcmp0IcANrn2Z6LbgI/D5d+TRDUprAE86932M5Fw/ahNfPIAYNu+1HMLyIz 2FYCXBWvDYnI5GqSCwTSJ/xfV0rzrKQx4iAF8xTGQMNZOghlF0gcJ1h3ZYBBT39fE5Rn XrOVgmKRTVB0S4Mms1PKU+qGlhOt9BhR1zM0N/f8kMz4iHMPAj+jIkoVldEaH/yG+x17 5myA== 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; bh=1nCC1pVCpo6a1FBtaf21dUN0TQ+qxWr9csbUN83atYg=; b=HIwYngCASQcd6oEK2fQnMkwEG9DOxCIVleDBHRynHNUTv/Fnxs5AzvtFGv2pocLpAJ Glk+0Q2ElmpWthI2hJd20ptIRmelDY98DjhEp+9Hi2gE7vk12LgBZiyOGOTXFYGsA9h2 M8E60J/t1sQVJ9cQ/0lmMMT6SCndu7nyFxqPGGzRK1fI8S8ouRog27YLmdzclDG6zoUc OoXzYNQDH64gBvVCLEc39LGFLwZJhU+U1gVzFSULm+k80fcbb/KTU8Iyy33dY6nDIcU4 ysvjd9cyf9iMUigxhcvkuWmlqq1kMGdGkpYQ85U9ngck8piLbi0/A/egazIMrTh3RwFw qPxA== X-Gm-Message-State: AGi0PubFyT0uynQTqU0gqXSqBRJ7MoRq5cgwr6+2LlS0j78P9LQ2Ggz6 vmBeaMad67c4Ourc9XSLmm7fHoZuK7B7AZCVyH6TMJvr X-Google-Smtp-Source: APiQypJfmrTpPPwmC5h8A6Da/Lt58VFmEHtEnSx1okwQKPFC+EhWwK7MqRCC4gHhrwUlV6uwDqpuLFMRIyhT/vJqqY8= X-Received: by 2002:a05:6830:1059:: with SMTP id b25mr10710746otp.292.1588185378394; Wed, 29 Apr 2020 11:36:18 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Pip Cet Date: Wed, 29 Apr 2020 18:35:42 +0000 Message-ID: Subject: Re: bug#40968: 28.0.50; (apply nil) To: 40968@debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 40968 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Wed, Apr 29, 2020 at 6:27 PM Pip Cet wrote: > Should we fix the special case or raise apply's minimum argument count to 2? The byte compiler also gets single-argument `apply' "wrong", so the latter would seem to be the best option, to me. From debbugs-submit-bounces@debbugs.gnu.org Tue May 05 21:51:19 2020 Received: (at 40968) by debbugs.gnu.org; 6 May 2020 01:51:20 +0000 Received: from localhost ([127.0.0.1]:37982 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jW9DT-0005yc-Mv for submit@debbugs.gnu.org; Tue, 05 May 2020 21:51:19 -0400 Received: from mail-yb1-f170.google.com ([209.85.219.170]:35280) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jW9DR-0005yH-Bi for 40968@debbugs.gnu.org; Tue, 05 May 2020 21:51:17 -0400 Received: by mail-yb1-f170.google.com with SMTP id d128so168500ybb.2 for <40968@debbugs.gnu.org>; Tue, 05 May 2020 18:51:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:user-agent :mime-version:date:message-id:subject:to:cc; bh=2Hw5VCec8FyQpBcHGoBKuPkY336Ezj7UdLrbEnFNSdE=; b=kcUy5G2Lys5lVImPLHekDRZUBG9FFd2QDzbg6u/M9NhzOyebfLHUYNxTAroP4x7CmJ HPe838ZeLAC0XnpDS3Q0Hm3+Fu2Miqc7cFVwQLMnvOanOvF5ANimpxANt/wti6gJOAqu viKu4P/2dvGfvmvSgAcA9eum6LATafkh8pHKFTSsyr8M0HkRZrLsn3HqgPl1rGsLVwsR Pbfxl0jj4FQlxHezSpiwtpyyfB52KX3f+LqL2rkPyTVsOve344RPv5PTRL08YsaQQnPT wXby07akh0qe4nYNdwlemLQmx3tBeX8PWI5dU2ACksjLpDhEJXcD/IKAAx2SM5c1eGjK JpTQ== X-Gm-Message-State: AGi0PuZaMJ5QA3uaAeJ3e/0tLkTRpViYxLEYd0G4ZZ9EHM3DffMxMznI qNIbmaQUr/MwLkQuRAWxSB9efZbZJU82sHmOMjg= X-Google-Smtp-Source: APiQypKlE+tMozxG/1MT2OSmQutyeu5po3nn/WUTk/r8if0TYdr+46WM+lYqWJVnGMzqNXE8vGhY81QH40QvE1skoSE= X-Received: by 2002:a25:fc08:: with SMTP id v8mr9851635ybd.389.1588729871642; Tue, 05 May 2020 18:51:11 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Tue, 5 May 2020 21:51:11 -0400 From: Stefan Kangas In-Reply-To: (Pip Cet's message of "Wed, 29 Apr 2020 18:26:15 +0000") References: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Date: Tue, 5 May 2020 21:51:11 -0400 Message-ID: Subject: Re: bug#40968: 28.0.50; (apply nil) To: Pip Cet Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 40968 Cc: 40968@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) Pip Cet writes: > I'm very confused by the behavior of `apply' when given only a single > argument: when it's a nonempty list, the argument gets spread out and > passed to Ffuncall (I guess this might be useful sometimes). When it's > nil, Ffuncall gets called with nargs == 0 and Emacs crashes, at least > sometimes. > > Should we fix the special case or raise apply's minimum argument count to 2? I'm personally not a big fan of raising the minimum argument count, thereby changing the function signature and making it harder to understand. We should just fix the bug, IMHO. Best regards, Stefan Kangas From debbugs-submit-bounces@debbugs.gnu.org Wed May 06 03:27:20 2020 Received: (at 40968) by debbugs.gnu.org; 6 May 2020 07:27:20 +0000 Received: from localhost ([127.0.0.1]:38421 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWESe-0001yc-G2 for submit@debbugs.gnu.org; Wed, 06 May 2020 03:27:20 -0400 Received: from mail-oo1-f44.google.com ([209.85.161.44]:34187) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWESc-0001yM-Ri for 40968@debbugs.gnu.org; Wed, 06 May 2020 03:27:19 -0400 Received: by mail-oo1-f44.google.com with SMTP id q204so288145ooq.1 for <40968@debbugs.gnu.org>; Wed, 06 May 2020 00:27:18 -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=0IicQivKJAJltDFn4w/hV1KxrsKMA3xPzakDe1+AmXA=; b=JbvR/0xWrO9Ns0/uW0RdFrUYgY8A8JHdMhKZZwwIld99ocviwcEmfDkm1RGs89zea1 bv+4Wq+QYo58gcQWLdBxBVDjGT2ipv4RTHydVnWOvJOawUj4NEkeexITjkdhLKiJIy0C MfEn1rg4hXyRIpSxdwgzJlz3ID5xehQ+uUvlJrkeiB4ZrJJY63M0Gr3t9nad0ZTBxDBr 7fc8HCrPN2jRam8CEy8cnvpW12EX45G8Q2ri8n/qvILe08Jd+7PqI/oZ406cUrMaxjs0 ughQkYU7xcxY//eILaVu57tNz1gugA2umhUW2uT8RDEjfzHAG2CGVcnAfCobHUexAGts QJhg== 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=0IicQivKJAJltDFn4w/hV1KxrsKMA3xPzakDe1+AmXA=; b=tImLTb7DT+0hJ7fgaHgXVJD0hv6b18v1DhPxxbiGpAwwpXJKPVb+a3D+Wn/iraetaP LvHKa3Mivt1YF114DMc6vMcnAFa+DXvuQOD0bZfQ84kZ+3N48n2sOtxAuUtzsNCcskgY hlPfXPfWqiBs29ahlJHGxd7qLf2w5DwJo0weJI20K+3wgbBvfVUkYiHFErhdyRIkX2+0 oUCkbOiDzbHojX84ITgUpyIeQhS7JKr7NNQXhrxkyi8trgAXz5qV9oyT2AQ1kU2wwy4x tyYqVQgQFPRdIYdPfu12PZnA0KMQMaPSuufrV6VLYXTRZT0ljooa8rmfYxAQU5SyGoO4 b3kA== X-Gm-Message-State: AGi0Puaq1vKX2re4bV/q1ikmXWugGyqEENbtk4drpfmmNOGd8oCPdkr0 qgp54Jk9PgyBglLlrQ7Kq8aG883NswF0gOc3uHxOFhHWDpA= X-Google-Smtp-Source: APiQypKfgSevJ5o3j5cd1Ff1tWQb/gQjH1+woRgzaE3vcnuPS3nBgBrwg4iGn73RhYieBk/5cnvGlMBFlSTmkPB8sWU= X-Received: by 2002:a4a:ba0b:: with SMTP id b11mr6235711oop.44.1588750033118; Wed, 06 May 2020 00:27:13 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Pip Cet Date: Wed, 6 May 2020 07:26:36 +0000 Message-ID: Subject: Re: bug#40968: 28.0.50; (apply nil) To: Stefan Kangas Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 40968 Cc: 40968@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Wed, May 6, 2020 at 1:51 AM Stefan Kangas wrote: > Pip Cet writes: > > I'm very confused by the behavior of `apply' when given only a single > > argument: when it's a nonempty list, the argument gets spread out and > > passed to Ffuncall (I guess this might be useful sometimes). When it's > > nil, Ffuncall gets called with nargs == 0 and Emacs crashes, at least > > sometimes. > > > > Should we fix the special case or raise apply's minimum argument count to 2? > > I'm personally not a big fan of raising the minimum argument count, > thereby changing the function signature and making it harder to > understand. Thanks. I disagree that it would be harder to understand, though: "the first argument is a function to call, the last argument is a list of arguments" is easy to understand when there are >= 2 arguments, but for a single argument they're in contradiction, aren't they? Indeed, I'd read Fapply's current docstring: Call FUNCTION with our remaining args, using our last arg as list of args. as implying that (apply FUNCTION) is equivalent to (funcall FUNCTION) > We should just fix the bug, IMHO. I don't think we can "just" fix the bug. We need to fix Fapply, change the byte compiler to accept single-argument apply, reformulate the docstring to describe this case, and probably fix the Lisp manual as well. I don't think all that is worth it, to be honest, to save someone the trouble of having to write (apply (car LIST) (cdr LIST)) rather than (apply LIST) (if that is, indeed, what they meant). From debbugs-submit-bounces@debbugs.gnu.org Wed May 06 06:19:00 2020 Received: (at 40968) by debbugs.gnu.org; 6 May 2020 10:19:00 +0000 Received: from localhost ([127.0.0.1]:38593 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWH8m-0008Ma-7H for submit@debbugs.gnu.org; Wed, 06 May 2020 06:19:00 -0400 Received: from mail227c50.megamailservers.eu ([91.136.10.237]:50440 helo=mail36c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWH8e-0008MJ-1h for 40968@debbugs.gnu.org; Wed, 06 May 2020 06:18:58 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1588760327; bh=9/ttqYoIiwv7PvaTcKNdH50urHAc2ad74LVBsz/tzjQ=; h=From:Subject:Date:Cc:To:From; b=dY5TGbpxqbay/g+XgfvjANzW4ByXrx431atXUXK7W/F/qS+m6zpFi+ma1Q3Fibaia mb6csggn/6b906p+1waQ6FXLy46v0sITma2Q2BCGfxBa46wdFmnvxTwFcu/zeo9nUL pb3E9Ir4p8Cj9y0/WFiFL6Blsijl9Pgbe74eP/yU= Feedback-ID: mattiase@acm.or Received: from stanniol.lan (c-4e4ae655.032-75-73746f71.bbcust.telenor.se [85.230.74.78]) (authenticated bits=0) by mail36c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 046AIi8A014015; Wed, 6 May 2020 10:18:46 +0000 From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.14\)) Subject: Re: bug#40968: 28.0.50; (apply nil) Message-Id: <69F27CB6-AB58-4E66-84FB-978278F7A757@acm.org> Date: Wed, 6 May 2020 12:18:44 +0200 To: Pip Cet X-Mailer: Apple Mail (2.3445.104.14) X-CTCH-RefID: str=0001.0A782F26.5EB28EC4.0092, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=PeiBeRpd c=1 sm=1 tr=0 a=klNLuyVZdLUgl+K5Uafb2A==:117 a=klNLuyVZdLUgl+K5Uafb2A==:17 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=6jRdl2Vi5790jQPiMSMA:9 a=CjuIK1q_8ugA:10 X-Spam-Score: 1.4 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: > The byte compiler also gets single-argument `apply' "wrong", so the latter would seem to be the best option, to me. Strong agreement! An 'apply' that actually does 'eval'... Will you write the patch or shall I? Content analysis details: (1.4 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: megamailservers.eu] 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.4 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-Debbugs-Envelope-To: 40968 Cc: 40968@debbugs.gnu.org, Stefan Kangas X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) > The byte compiler also gets single-argument `apply' "wrong", so the = latter would seem to be the best option, to me.=20 Strong agreement! An 'apply' that actually does 'eval'... Will you write the patch or shall I? From debbugs-submit-bounces@debbugs.gnu.org Wed May 06 06:46:20 2020 Received: (at submit) by debbugs.gnu.org; 6 May 2020 10:46:20 +0000 Received: from localhost ([127.0.0.1]:38648 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWHZ3-0000g2-DV for submit@debbugs.gnu.org; Wed, 06 May 2020 06:46:20 -0400 Received: from lists.gnu.org ([209.51.188.17]:52518) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWHYx-0000fk-Eh for submit@debbugs.gnu.org; Wed, 06 May 2020 06:46:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37810) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jWHYx-0000kR-5j for bug-gnu-emacs@gnu.org; Wed, 06 May 2020 06:46:03 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:52422) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jWHYw-0001DA-Gz; Wed, 06 May 2020 06:46:02 -0400 Received: from [176.12.151.155] (port=55162 helo=[10.161.128.100]) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1jWHYo-0006yv-8G; Wed, 06 May 2020 06:45:54 -0400 Date: Wed, 06 May 2020 13:45:51 +0300 User-Agent: K-9 Mail for Android In-Reply-To: <69F27CB6-AB58-4E66-84FB-978278F7A757@acm.org> References: <69F27CB6-AB58-4E66-84FB-978278F7A757@acm.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: bug#40968: 28.0.50; (apply nil) To: bug-gnu-emacs@gnu.org, =?ISO-8859-1?Q?Mattias_Engdeg=E5rd?= , Pip Cet , "Richard M. Stallman" From: Eli Zaretskii Message-ID: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit Cc: 40968@debbugs.gnu.org, Stefan Kangas X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) On May 6, 2020 1:18:44 PM GMT+03:00, "Mattias Engdeg=C3=A5rd" wrote: > > The byte compiler also gets single-argument `apply' "wrong", so the > latter would seem to be the best option, to me=2E=20 >=20 > Strong agreement! An 'apply' that actually does 'eval'=2E=2E=2E > Will you write the patch or shall I? Hmm=2E=2E=2E but Fapply clearly attempts to handle the case of zero argume= nts=2E Richard do you remember what use cases was that supposed to handle= ? From debbugs-submit-bounces@debbugs.gnu.org Wed May 06 06:58:04 2020 Received: (at 40968) by debbugs.gnu.org; 6 May 2020 10:58:05 +0000 Received: from localhost ([127.0.0.1]:38659 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWHka-0000zF-OW for submit@debbugs.gnu.org; Wed, 06 May 2020 06:58:04 -0400 Received: from mail-out.m-online.net ([212.18.0.10]:51409) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWHkY-0000yv-Kd for 40968@debbugs.gnu.org; Wed, 06 May 2020 06:58:03 -0400 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 49HD8S4yT4z1rxwG; Wed, 6 May 2020 12:58:00 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 49HD8S2KdYz1qv7j; Wed, 6 May 2020 12:58:00 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id CH2WjkLRoJwd; Wed, 6 May 2020 12:57:59 +0200 (CEST) X-Auth-Info: ibySsLlqDB5oBj0cMqfrpW1BfRSEerwR7oJ14HBgUWbvgWPkwv2iAsEdAHohALmZ Received: from igel.home (ppp-46-244-183-249.dynamic.mnet-online.de [46.244.183.249]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Wed, 6 May 2020 12:57:59 +0200 (CEST) Received: by igel.home (Postfix, from userid 1000) id BDDE82C0D4E; Wed, 6 May 2020 12:57:58 +0200 (CEST) From: Andreas Schwab To: Eli Zaretskii Subject: Re: bug#40968: 28.0.50; (apply nil) References: <69F27CB6-AB58-4E66-84FB-978278F7A757@acm.org> X-Yow: I'm reporting for duty as a modern person. I want to do the Latin Hustle now! Date: Wed, 06 May 2020 12:57:58 +0200 In-Reply-To: (Eli Zaretskii's message of "Wed, 06 May 2020 13:45:51 +0300") Message-ID: <87y2q572kp.fsf@igel.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.4 (/) X-Debbugs-Envelope-To: 40968 Cc: mattiase@acm.org, stefan@marxist.se, 40968@debbugs.gnu.org, rms@gnu.org, pipcet@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.4 (-) On Mai 06 2020, Eli Zaretskii wrote: > Hmm... but Fapply clearly attempts to handle the case of zero > arguments. I don't think it does. It handles (apply ... nil) (numargs is the length of the last argument), but mishandles the boundary case (when nargs is one). Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different." From debbugs-submit-bounces@debbugs.gnu.org Wed May 06 07:24:21 2020 Received: (at 40968) by debbugs.gnu.org; 6 May 2020 11:24:21 +0000 Received: from localhost ([127.0.0.1]:38733 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWIA1-0001j8-KV for submit@debbugs.gnu.org; Wed, 06 May 2020 07:24:21 -0400 Received: from mail-yb1-f180.google.com ([209.85.219.180]:34553) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWI9z-0001ij-BY for 40968@debbugs.gnu.org; Wed, 06 May 2020 07:24:20 -0400 Received: by mail-yb1-f180.google.com with SMTP id q206so810528ybg.1 for <40968@debbugs.gnu.org>; Wed, 06 May 2020 04:24:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:mime-version:date :message-id:subject:to:cc; bh=Qe407thnZL71Ihake5CzaYyajzjqNsbRVgTG8iSjIPA=; b=RP1n4U8wD9+1pYkUP5kfIYTbgsby4wyOB1LsYHCO7yFAsfZ+qaOScEI2YlEqZC1VZG vjKFCXRwAE0Dnhao6PbT+okkZuijB9lJiw3SUZpLWmjB8FNNG3LjNRuoUzHKqSsdbfPR VNyqh7R+8/RzMvpgCIQGmj3cndY7vPmigNxWjUX6pQc8W3iQkYsHOVqX32V7YWtFEk1J z2m66UFZ7m5uCVVCye2gr3/+1IVSCKYXOhO6TITP0cyb8Zm/we3LuW5k2TfKasebn1VH ZSu0rEP79OyynPqjm3U5KH2/2tcKrr5Rpc4MB+lQ+h6YeJhJi3ojJjZ6FJPT2noTJQN7 eoLw== X-Gm-Message-State: AGi0Pubj4QG2QLyaUViWR6wA3GuPpr3nQSdt5+/Vm8OVeipUneusLZM4 EzNNzM9i3aOPrqvfOoTBzKEbF7TIfsYujHYmABc= X-Google-Smtp-Source: APiQypLxdITlTYXnA2fkoDvbopUc18uPZtfmYrpOSf8zwOb35PoJj4BRrdmI0upNE7f3irIrnNVLklR5GplDtcf71NY= X-Received: by 2002:a25:e907:: with SMTP id n7mr12407942ybd.85.1588764253758; Wed, 06 May 2020 04:24:13 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Wed, 6 May 2020 07:24:13 -0400 From: Stefan Kangas In-Reply-To: References: MIME-Version: 1.0 Date: Wed, 6 May 2020 07:24:13 -0400 Message-ID: Subject: Re: bug#40968: 28.0.50; (apply nil) To: Pip Cet Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 40968 Cc: 40968@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) Pip Cet writes: > Thanks. I disagree that it would be harder to understand, though: "the > first argument is a function to call, the last argument is a list of > arguments" is easy to understand when there are >= 2 arguments, but > for a single argument they're in contradiction, aren't they? Indeed, > I'd read Fapply's current docstring: I have a feeling I'm missing something obvious here. The current function signature is: (apply FUNCTION &rest ARGUMENTS) How would your proposal change that? Best regards, Stefan Kangas From debbugs-submit-bounces@debbugs.gnu.org Wed May 06 07:26:03 2020 Received: (at 40968) by debbugs.gnu.org; 6 May 2020 11:26:04 +0000 Received: from localhost ([127.0.0.1]:38751 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWIBf-0001mg-Jn for submit@debbugs.gnu.org; Wed, 06 May 2020 07:26:03 -0400 Received: from mail-oi1-f194.google.com ([209.85.167.194]:45391) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWIBd-0001m5-Ks for 40968@debbugs.gnu.org; Wed, 06 May 2020 07:26:02 -0400 Received: by mail-oi1-f194.google.com with SMTP id k133so1174475oih.12 for <40968@debbugs.gnu.org>; Wed, 06 May 2020 04:26:01 -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=uEkhzfa4tHZ7MhGcLhcq4HC9eIC/WkqYi8A3WT73Puk=; b=tAsXNIuRdNIA4L1R9Y8dWlj4q3SxBze6RQxiP3L6hADClMRJv5pm2qoGdPzs1AfCkB vNbBqc2qaC9mxf25sQcOUd2BDJTNl1jIaMAekxsWITw5j3C5tDD5zmDggDXL1YYzMiHw YtRgkp5lVR0YC1Wf8Ol2UX1TP7vOktpLmsS9Yzsrv0jbvsEE3XoUWVVvhO3TbrAIrVQA 1goxnzuC6qGqT9MNSfP52/nmGQBa125LtZvFPhVd34LYYezrXInq2i53Q/xr7TQmROOF QvbF8Sv3iPgalL+53vlL0ptekhHCACfH9olHkq1sOIwPNgfkeY91/zMxMBpp2f8l3A0g zwkw== 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=uEkhzfa4tHZ7MhGcLhcq4HC9eIC/WkqYi8A3WT73Puk=; b=f0vZDNQXI/OZmTocDtbe5KC4VX7Vv622D5JxO2TxjyVvleeNOMnCI+6o05hHxrG6jn VyGFcqkeDPU+nnXlGh8ctdNMjj1qjf/HtXk1dZ9pa2+msmaYK8K8Q28Pew4iibcaHbLY WNcH2ZtDe4DtuDI5hq38VPS2fUASyllTVkESl4pk1shb4IFUMiw3ZtVqonzL5rbcTq6r HSl2nwnMBZ+wZX3I4LQi7U8v2WZRHDFgGhKPOnFnF3EZYM162ohh1SfMBMZEjPLim+7q XDafbqgx4Mnyo3ZnY8hdjKxKH7YzRF7eeMMxmxYXgg7cTopKhJz6fPGYzi3wltYfxipW wzZA== X-Gm-Message-State: AGi0PuZOiL7gPVbWV9DQ0/31qxDxK0Zn17k7XSazTLmNXQALMYpaPJdk /vJC7ROTcf7XZ15OvuS/Y1rSf17LRvFyZGd+cFg= X-Google-Smtp-Source: APiQypJgjQ5IQm4Ew1BjcE88F9E8kwvoHudgZQZzhrOQSuarWe4d6MgGfC8j/s4H1A8WFsyfuJsjR6VOqE79MrQq2Io= X-Received: by 2002:aca:5614:: with SMTP id k20mr2322307oib.30.1588764356072; Wed, 06 May 2020 04:25:56 -0700 (PDT) MIME-Version: 1.0 References: <69F27CB6-AB58-4E66-84FB-978278F7A757@acm.org> In-Reply-To: <69F27CB6-AB58-4E66-84FB-978278F7A757@acm.org> From: Pip Cet Date: Wed, 6 May 2020 11:25:19 +0000 Message-ID: Subject: Re: bug#40968: 28.0.50; (apply nil) To: =?UTF-8?Q?Mattias_Engdeg=C3=A5rd?= Content-Type: multipart/mixed; boundary="000000000000136f1b05a4f90760" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 40968 Cc: 40968@debbugs.gnu.org, Stefan Kangas X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --000000000000136f1b05a4f90760 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, May 6, 2020 at 10:18 AM Mattias Engdeg=C3=A5rd w= rote: > > The byte compiler also gets single-argument `apply' "wrong", so the lat= ter would seem to be the best option, to me. > > Strong agreement! An 'apply' that actually does 'eval'... Well, it's not quite `eval': the arguments aren't evaluated again. The obvious single-character patch results in four warnings when rebuilding Emacs, all of which seem to use the previous semantics, so I think it might be best to document this behavior and simply catch (apply nil). --000000000000136f1b05a4f90760 Content-Type: text/x-patch; charset="US-ASCII"; name="0001-Require-at-least-two-arguments-for-Fapply.patch" Content-Disposition: attachment; filename="0001-Require-at-least-two-arguments-for-Fapply.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_k9v98lr10 RnJvbSA4OThhZjM5NGZjYmRlNTdjYTNkMDhlMzY0OGI2MmZlMGIzZjQxOTExIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBQaXAgQ2V0IDxwaXBjZXRAZ21haWwuY29tPgpEYXRlOiBX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Z3MsIHVzaW5nIG91ciBsYXN0IGFyZyBhcyBsaXN0IG9mIGFyZ3MuCiBU aGVuIHJldHVybiB0aGUgdmFsdWUgRlVOQ1RJT04gcmV0dXJucy4KIFRodXMsIChhcHBseSBcXD0n KyAxIDIgXFw9JygzIDQpKSByZXR1cm5zIDEwLgotLSAKMi4yNi4yCgo= --000000000000136f1b05a4f90760-- From debbugs-submit-bounces@debbugs.gnu.org Wed May 06 07:49:22 2020 Received: (at 40968) by debbugs.gnu.org; 6 May 2020 11:49:22 +0000 Received: from localhost ([127.0.0.1]:38829 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWIYD-0004V0-Sq for submit@debbugs.gnu.org; Wed, 06 May 2020 07:49:22 -0400 Received: from mail76c50.megamailservers.eu ([91.136.10.86]:34526 helo=mail70c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWIYB-0004Up-1o for 40968@debbugs.gnu.org; Wed, 06 May 2020 07:49:20 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1588765757; bh=GhzeR3NS6zqnXL7sj8396Za23wq4JfuBePsRvPo1ExU=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=HRMi8hmNy6T+iviEBVw5vjyU1SHL2SjHQrf3CQJu4dVWPDGuNiSQXCvMLZO0gspc4 DJ8Y4EnSX3H8tyxZTcCTPLPVxtrphr/DgCm1S51pgIiYg9p3UQwruLYEO/1poB9kSb rTIbaxkQKbmw8jkxaTvP1byge1VTKLSA+GMtWeBw= Feedback-ID: mattiase@acm.or Received: from stanniol.lan (c-4e4ae655.032-75-73746f71.bbcust.telenor.se [85.230.74.78]) (authenticated bits=0) by mail70c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 046BnEWo018076; Wed, 6 May 2020 11:49:16 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.14\)) Subject: Re: bug#40968: 28.0.50; (apply nil) From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: Date: Wed, 6 May 2020 13:49:13 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <7D86D2CE-F7AE-479E-84E0-B818A4A9016D@acm.org> References: <69F27CB6-AB58-4E66-84FB-978278F7A757@acm.org> To: Pip Cet X-Mailer: Apple Mail (2.3445.104.14) X-CTCH-RefID: str=0001.0A782F26.5EB2A3FA.001F, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=OKBZIhSB c=1 sm=1 tr=0 a=klNLuyVZdLUgl+K5Uafb2A==:117 a=klNLuyVZdLUgl+K5Uafb2A==:17 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=pGLkceISAAAA:8 a=4ItPzPCIdB-RUGPpUtoA:9 a=CjuIK1q_8ugA:10 X-Spam-Score: 1.4 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 6 maj 2020 kl. 13.25 skrev Pip Cet : > The obvious single-character patch results in four warnings when > rebuilding Emacs, all of which seem to use the previous semantics, so > I think it might be best to document this behavior and simp [...] Content analysis details: (1.4 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: megamailservers.eu] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [91.136.10.86 listed in wl.mailspike.net] 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.4 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-Debbugs-Envelope-To: 40968 Cc: 40968@debbugs.gnu.org, Stefan Kangas X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) 6 maj 2020 kl. 13.25 skrev Pip Cet : > The obvious single-character patch results in four warnings when > rebuilding Emacs, all of which seem to use the previous semantics, so > I think it might be best to document this behavior and simply catch > (apply nil). There is one in cl-generic-tests.el, too. It appears in one GNU ELPA package as well, and in one other external = package where it seems to be a misunderstanding of apply: (cl-defun nim-log (&rest msg-and-rest) (apply `((lambda () (lwarn 'nim :debug ,@msg-and-rest))))) From debbugs-submit-bounces@debbugs.gnu.org Wed May 06 07:50:09 2020 Received: (at 40968) by debbugs.gnu.org; 6 May 2020 11:50:09 +0000 Received: from localhost ([127.0.0.1]:38833 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWIYz-0004We-5J for submit@debbugs.gnu.org; Wed, 06 May 2020 07:50:09 -0400 Received: from mail-oi1-f182.google.com ([209.85.167.182]:34345) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWIYx-0004W7-OV for 40968@debbugs.gnu.org; Wed, 06 May 2020 07:50:08 -0400 Received: by mail-oi1-f182.google.com with SMTP id c12so443322oic.1 for <40968@debbugs.gnu.org>; Wed, 06 May 2020 04:50:07 -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=VMYvqFcPsZo6gO5p1EvXJqw1wR1Yg5Eed5G+/v038DQ=; b=qeG6sHrAzWZv4xLg8et/zKm+s2cPshM8WZmw6eHjJCI1imiuodH2NR+k8kQoDqfXKS 3rN6X7WN/5IffmvZN81053mQagdL3e3UABn47afRbDttkGBNAD6t5Ee3dthVN3NnpDEe kYg3V3FnlOpRee3EEi1QAR/BtkrDJvUlXv60yrFJ9SIsmtZOwpxrqCocqQ59LAyyGybs evdqS3BQApOTIGuMt5GkLI3THhxN6WEeJcVs+Xm53aoQNDXKRCT9z7g4cMl3mfohvsls aQ+MX0FZvegWD0UgMGXz0npaFvip0v9VWSUqYnkwYwwj5f/cioLmQVFCrQepMC8sOAQT gO1Q== 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=VMYvqFcPsZo6gO5p1EvXJqw1wR1Yg5Eed5G+/v038DQ=; b=JDmVn2jX0XRk1F/FCPy+IA0pRxNBicuECn4v0c91K80qKQw/HfiMHPC4paIoBXPb73 u2Cmn855OU5hTCN2NRt06w0uPJrqtgR4sGtcgN/TCsfch9uDHxC/EsAfTRVr+dJ3yfj9 Ubjl0zSWxCqQiX4UALRnEOT4KciPEvFsMM1ll9MJkDt4/Ur3IGZkqZXyBSIpf3zhiJCy fA1QDTZd5hc8/W296JUnDGFY4hWMbNlhv0k1yat34f6ek3dg/PYKu6oDZkG6QCO1VC6K e1C+YPKLDeksh0LU3MOtussVI3R94ImhNO69Aw/bChxuiF2pjbh4DUiL1ogpxrKWDcP3 6oyA== X-Gm-Message-State: AGi0PuZforIKVNVTINQID3jQbVghl5zv6AgW8MIUJB/wY33aQAqLFvc5 pBS/iUR+uQn/MelmDvQxlBdFDAwpaqaKRgt5Gxm95Tk3Z1c= X-Google-Smtp-Source: APiQypL8fjp7DUp5vhJJ1m8rQUdXinYHErN2HvWyT0V5otBBXarYseFZlILceow2XGsN/tmoNRg4omeUax6C+8l5x5w= X-Received: by 2002:aca:6705:: with SMTP id z5mr2230869oix.122.1588765802115; Wed, 06 May 2020 04:50:02 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Pip Cet Date: Wed, 6 May 2020 11:49:26 +0000 Message-ID: Subject: Re: bug#40968: 28.0.50; (apply nil) To: Stefan Kangas Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 40968 Cc: 40968@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Wed, May 6, 2020 at 11:24 AM Stefan Kangas wrote: > Pip Cet writes: > I have a feeling I'm missing something obvious here. The current > function signature is: > > (apply FUNCTION &rest ARGUMENTS) > > How would your proposal change that? (apply FUNCTION ARGUMENT &rest ARGUMENTS), I guess. I missed it in the first patch. Note that the old signature suggests (apply FUNCTION) is equivalent to (funcall FUNCTION), which it isn't. (For example, that's what ElDoc indicates the first argument to apply is). Again, I'm no longer sure what the right thing to do here is. I think I'm up to five different interpretations of (apply ARG) here, depending on whether ARG is interpreted as FUNCTION, the last of the ARGUMENTS, an ARGUMENT but not the last one, or a combination thereof, and whether ARG is required to be a list or not... From debbugs-submit-bounces@debbugs.gnu.org Wed May 06 09:02:55 2020 Received: (at 40968) by debbugs.gnu.org; 6 May 2020 13:02:55 +0000 Received: from localhost ([127.0.0.1]:38918 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWJhP-0008PV-4c for submit@debbugs.gnu.org; Wed, 06 May 2020 09:02:55 -0400 Received: from mail-yb1-f180.google.com ([209.85.219.180]:45961) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWJhL-0008PI-ET for 40968@debbugs.gnu.org; Wed, 06 May 2020 09:02:52 -0400 Received: by mail-yb1-f180.google.com with SMTP id r14so924375ybm.12 for <40968@debbugs.gnu.org>; Wed, 06 May 2020 06:02:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:mime-version:date :message-id:subject:to:cc; bh=lHqOTKe2U9vmN/pJTeGz3lKGcrobARrewDb/ux/wqME=; b=Po6ND/8fo6UjfDjpSreAUyYF2TNBJD99m2bBzbGy2CO0gPmWAH1ju9dzQYHS0hcQeM t6YOyG6QDRtpBy1hD22H0mLYC3reIun0B4uuUH2IvVyLecIdt7S5H+Qg5fFrf0BTx88I gF6ioxX0DeUFaAohNnFEoUByfsumfpq6/Ck/tpyHMroksLKlW1BgLf+XU6ye2ZCjGXtv u5M9rW/LrMnaaHyBTjOPZL+drb/8/AF3czi9ycFJKqc2TeZmMcExJkCcwWW83d+T5C3s m2fizOxwrBUJf+Aa0WPhARFW/95ifICgHbneZW4A0WHig/CPZxqlpjc8Sdc9vMjCyrjH TdXg== X-Gm-Message-State: AGi0Pub2zBh/6/m5v+1bLggKgW3d+hmd+OqElorcuR2MAoTWXYGhbiMi ypDXkaQ+Te6vWytcuosMOR2IFCABjxw/HYBf5Lw= X-Google-Smtp-Source: APiQypK5xdvaWIqVgQTK52AN9k2yRzJN5kGuefYHBJcWO1d4D0TC1jiNNYqALJAHKGkA6md5R6qtI+QCC1tVFaAkASA= X-Received: by 2002:a25:e907:: with SMTP id n7mr13034924ybd.85.1588770165906; Wed, 06 May 2020 06:02:45 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Wed, 6 May 2020 06:02:45 -0700 From: Stefan Kangas In-Reply-To: References: MIME-Version: 1.0 Date: Wed, 6 May 2020 06:02:45 -0700 Message-ID: Subject: Re: bug#40968: 28.0.50; (apply nil) To: Pip Cet Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 40968 Cc: 40968@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) Pip Cet writes: > (apply FUNCTION ARGUMENT &rest ARGUMENTS), I guess. I missed it in the > first patch. Thanks. FWIW, I still think we should avoid changing the function signature if at all possible. apply is fundamental to Lisp, and has been defined like this for a long time. See the definition of "The Universal S-Function apply" in John McCarthy's paper: [1] apply[f;args] =eval[cons[f;appq[args]];NIL], Also note that it is still defined like this elsewhere: Scheme: (apply function argument-list) Common Lisp: apply function &rest args+ => result* Clojure: (apply f args) Best regards, Stefan Kangas Footnotes: [1] http://www-formal.stanford.edu/jmc/recursive.pdf From debbugs-submit-bounces@debbugs.gnu.org Wed May 06 09:56:40 2020 Received: (at 40968) by debbugs.gnu.org; 6 May 2020 13:56:40 +0000 Received: from localhost ([127.0.0.1]:40757 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWKXP-0001ka-Vn for submit@debbugs.gnu.org; Wed, 06 May 2020 09:56:40 -0400 Received: from mail-ot1-f43.google.com ([209.85.210.43]:42476) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWKXN-0001kU-Sm for 40968@debbugs.gnu.org; Wed, 06 May 2020 09:56:38 -0400 Received: by mail-ot1-f43.google.com with SMTP id m18so1383036otq.9 for <40968@debbugs.gnu.org>; Wed, 06 May 2020 06:56:37 -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=sj+oCTd4Lbb4I2CETalupYcABGxu1KrzgTVUZ764SSs=; b=OQxYvkJYRqbEz4MKT+fUxsMhRTg4HcrL3CbqAAYNrrjFEyCyMjT3bmqYdJiiGsBY6C bS7G1yx1okmv/FjI4EXel+ou1shtijuONbkLxq/hBYjjfTldF/PbSmdxmLV1SY/n4tFz AkyMlpo8nFSJPgSOuD1EfY6X2qTPMwNykyznVmXf+Pv1BouOTp94Nq44PlMi2/Bra3L0 RHwlvsoAAeA56HtSDCODPb5sLOznJt4tBzZTjyuTrRnMKSYmOdwwhY0HqKjFiQPbDYNo RQzT5jfrKAMct/ijYmt098RL1gchuGpR9d10qa+tWwYwxKUWERdondViCncw9pa/Ohus JAcA== 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=sj+oCTd4Lbb4I2CETalupYcABGxu1KrzgTVUZ764SSs=; b=ZFeqIJw1qR8MOfv4b75Q5iNlEQeo8WDN2JHt4kGprm6yo24kvlbIvALQ/LuQigcb/n aXE1wKgXNb+s0y57s+msy0mZxT4GbqoqRtY1YCbTSrZ9JMu6bHfZrhrsdIbITYXUElNu LkA8b2lKnKBhupeoC2ghWmEnC1NZKuNhEw15N57HawwtWKbpa3jOWh5KBYfh5wBW22ta pDYrvon00x+DVpDcBl6Hq3BMzBzYjynqcwc0DGli3MNnrovhXCGbaJFU2epR/MTwsmXO jqnDV7aXIS8PlkaCPCOjGEnCX8lUTjkk8Ld3miRMEr+yl0tSmQQRowSYUDElmLq2Mu1o 5XXw== X-Gm-Message-State: AGi0Pub+dpt26mZLCpKQIEcq4Q217+AXx4H0zWpzc4jet7ZKYipTD6fN us8KZ5QMldDBBHJJctFijOQK1eam4WYsx7q/i+1MuWcF X-Google-Smtp-Source: APiQypKc4Pmwkxy2d2g+j11nzkCsGChG0WVASdh87CzMpsOWam2zyM3amGDy+fkyr/aTZkLJbZYSD6jBkVWNWh2YJSQ= X-Received: by 2002:a9d:6b98:: with SMTP id b24mr6391732otq.287.1588773392054; Wed, 06 May 2020 06:56:32 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Pip Cet Date: Wed, 6 May 2020 13:55:55 +0000 Message-ID: Subject: Re: bug#40968: 28.0.50; (apply nil) To: Stefan Kangas Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 40968 Cc: 40968@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Wed, May 6, 2020 at 1:02 PM Stefan Kangas wrote: > Pip Cet writes: > > (apply FUNCTION ARGUMENT &rest ARGUMENTS), I guess. I missed it in the > > first patch. > > Thanks. > > FWIW, I still think we should avoid changing the function signature if > at all possible. Is the function signature relevant for anything but eldoc? > apply is fundamental to Lisp, and has been defined like this for a > long time. I don't know about that. Anything but the two-argument form of apply strikes me as rather dialect-dependent, but I may be wrong. > See the definition of "The Universal S-Function apply" in > John McCarthy's paper: [1] > > apply[f;args] =eval[cons[f;appq[args]];NIL], I must admit I don't know how appq is defined. > Also note that it is still defined like this elsewhere: I may be misreading your examples, but they seem to me to have different signatures from the one hitherto used in Emacs. > Scheme: (apply function argument-list) Precisely two args, right? > Common Lisp: apply function &rest args+ => result* At least two args. > Clojure: (apply f args) Precisely two args again? From debbugs-submit-bounces@debbugs.gnu.org Wed May 06 10:04:26 2020 Received: (at 40968) by debbugs.gnu.org; 6 May 2020 14:04:26 +0000 Received: from localhost ([127.0.0.1]:40761 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWKev-0001wi-Ny for submit@debbugs.gnu.org; Wed, 06 May 2020 10:04:26 -0400 Received: from eggs.gnu.org ([209.51.188.92]:49758) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWKet-0001wT-La for 40968@debbugs.gnu.org; Wed, 06 May 2020 10:04:24 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:55590) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jWKeo-0005rJ-2o; Wed, 06 May 2020 10:04:18 -0400 Received: from [176.228.60.248] (port=3368 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jWKen-0004Fm-FT; Wed, 06 May 2020 10:04:17 -0400 Date: Wed, 06 May 2020 17:03:59 +0300 Message-Id: <83lfm5kvn4.fsf@gnu.org> From: Eli Zaretskii To: Stefan Kangas In-Reply-To: (message from Stefan Kangas on Wed, 6 May 2020 06:02:45 -0700) Subject: Re: bug#40968: 28.0.50; (apply nil) References: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 40968 Cc: 40968@debbugs.gnu.org, pipcet@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Stefan Kangas > Date: Wed, 6 May 2020 06:02:45 -0700 > Cc: 40968@debbugs.gnu.org > > Pip Cet writes: > > > (apply FUNCTION ARGUMENT &rest ARGUMENTS), I guess. I missed it in the > > first patch. > > Thanks. > > FWIW, I still think we should avoid changing the function signature if > at all possible. I agree. I also think it isn't enough to check only here and in ELPA: 'apply' is a very popular function, and is used very widely. I won't be surprised if there were more of these usage cases that would be broken by such a change in the signature. Can we instead identify the problematic usage and signal an error? From debbugs-submit-bounces@debbugs.gnu.org Wed May 06 11:28:57 2020 Received: (at 40968) by debbugs.gnu.org; 6 May 2020 15:28:57 +0000 Received: from localhost ([127.0.0.1]:40882 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWLyi-00044W-QJ for submit@debbugs.gnu.org; Wed, 06 May 2020 11:28:56 -0400 Received: from mail-yb1-f175.google.com ([209.85.219.175]:41907) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWLyh-00044K-CQ for 40968@debbugs.gnu.org; Wed, 06 May 2020 11:28:55 -0400 Received: by mail-yb1-f175.google.com with SMTP id w137so1182149ybg.8 for <40968@debbugs.gnu.org>; Wed, 06 May 2020 08:28:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:mime-version:date :message-id:subject:to:cc; bh=rhe6p4UuBPxUa1Ps6MU3VSXRhRaAeaOhOTv71kMP8Lw=; b=RKNZ62pdzfPi2tasKa/w6rSlzUsn/jpB9BGWWj+5QCORNuHc2qN/e3fO3j66HQRuf/ wSw7MMBimiF7tlF5L5ODtVkDR0qvHzDMyQAk/kAVLGTZDAnONi2+lAVAp49XlxXS+R37 fFKRsHycLb9+L8qcR8XG6Nkt+pCwUJK9C/bdAlo/iece3/iw8WO/vx6N4u6YDY4zb/4A aClCV0PGIhiL8OyFKMJK/x2PIDmSQW7/XT7be+6tv5408LciBNjGi7BJ+zf1VUZ57poG b0l4x48aRm/Y1QVDDZ1c96JavIO2ckF8aTCVS9w9AqozAaS8ovsq7wr2ho5l4W4iNCsW Ehsw== X-Gm-Message-State: AGi0PuadgyZ4F2oJ3UfzsxbeOlL6ER2ym7uYTnTkRi6j9JCznuNJ40WY Hxe+6oYmbnIpdaODKkQosj/5gRXg4VFCl++f2vA= X-Google-Smtp-Source: APiQypLQnjjx/21n+s8tHJ5gK0CYi2vQJj14rxl7hnUallvsg4/KWK8BsGPvRh/uZ0oJ7jR4SH4QEdq8YQy/w0jOpYM= X-Received: by 2002:a25:bb08:: with SMTP id z8mr1612348ybg.129.1588778929630; Wed, 06 May 2020 08:28:49 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Wed, 6 May 2020 11:28:49 -0400 From: Stefan Kangas In-Reply-To: References: MIME-Version: 1.0 Date: Wed, 6 May 2020 11:28:49 -0400 Message-ID: Subject: Re: bug#40968: 28.0.50; (apply nil) To: Pip Cet Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 40968 Cc: 40968@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) Pip Cet writes: > Is the function signature relevant for anything but eldoc? Besides the docstring, the manual documents it. The suggested form is unusual and makes it harder to understand, IMHO. >> apply is fundamental to Lisp, and has been defined like this for a >> long time. > > I don't know about that. Anything but the two-argument form of apply > strikes me as rather dialect-dependent, but I may be wrong. If I understand correctly, you propose a three argument form: (apply FUNCTION ARGUMENT &rest ARGUMENTS) This is what I find unusual. It should really be either (apply FUNCTION &rest ARGUMENTS) or (apply FUNCTION ARGUMENTS) But since we already have the former, we are better to stick with that. Maybe there's a case to be made for a syntactic alternative to "&rest" which disallows nil, which I guess is the issue here? But we can also just signal an error in this case. Racket does the latter, as one data point: > (define foo (lambda () 1)) > (apply foo nil) ; nil: undefined; ; cannot reference an identifier before its definition ; in module: top-level ; [,bt for context] BTW, I don't see a big difference conceptually between '&rest ARGUMENTS' and 'ARGUMENTS'. The former is just syntactic sugar, right? >> See the definition of "The Universal S-Function apply" in >> John McCarthy's paper: [1] >> >> apply[f;args] =eval[cons[f;appq[args]];NIL], > > I must admit I don't know how appq is defined. My point is mainly that it has two arguments: f and args. Best regards, Stefan Kangas From debbugs-submit-bounces@debbugs.gnu.org Wed May 06 13:46:16 2020 Received: (at 40968) by debbugs.gnu.org; 6 May 2020 17:46:16 +0000 Received: from localhost ([127.0.0.1]:41128 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWO7c-0007cn-3Q for submit@debbugs.gnu.org; Wed, 06 May 2020 13:46:16 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:47692) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWO7Z-0007cZ-Af for 40968@debbugs.gnu.org; Wed, 06 May 2020 13:46:14 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 046HhFl9106704; Wed, 6 May 2020 17:46:07 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=fsR99cdI3IhFEYKdjT6EEgMjyvISuwhapiN0CvPQGg4=; b=OvZHAiG24vidr0UwNZA840IYCRILzxYSVsOOYGB0o0yluKmEbbjio377uCUs/QDixCIf IU/cAx15RCiLx2ROvIYCxl2BRoXQb4UHlNb9P2kFuOpLCMYnjQR5I998EdyLc+9TKYsC s9MJ+bSm+Byx3VotIbfcEG6FxA5lgNFxHcG9ugRb2O+BRNThlXt21y0QCFUz4+XRoeAU /uKf7X2oqzeYabsiaiUC7Dny2UcDkpmnIILND0Iigg6jmbtQw9oul/GjggOESmPpi+v4 BYPDN5zqlGBJ7KhWRJMKa/UiX8n42QX6cOUWJhxVzPyxiqinEQsnpKxuNAqBg4YfebUS vw== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by aserp2120.oracle.com with ESMTP id 30usgq2x72-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 06 May 2020 17:46:07 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 046Hgp5K181652; Wed, 6 May 2020 17:46:07 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserp3030.oracle.com with ESMTP id 30sjdw0wmq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 06 May 2020 17:46:07 +0000 Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 046Hk5wc004329; Wed, 6 May 2020 17:46:05 GMT MIME-Version: 1.0 Message-ID: <240afa71-7aaa-49b9-94b6-7d363a42b1cc@default> Date: Wed, 6 May 2020 10:46:04 -0700 (PDT) From: Drew Adams To: Pip Cet , Stefan Kangas Subject: RE: bug#40968: 28.0.50; (apply nil) References: In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4993.0 (x86)] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9613 signatures=668687 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 mlxscore=0 bulkscore=0 adultscore=0 phishscore=0 mlxlogscore=840 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2005060144 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9613 signatures=668687 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 impostorscore=0 mlxscore=0 priorityscore=1501 lowpriorityscore=0 malwarescore=0 clxscore=1011 mlxlogscore=887 spamscore=0 adultscore=0 bulkscore=0 phishscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2005060144 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 40968 Cc: 40968@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Dunno whether this has been mentioned in this thread (haven't followed it). The signature in Common Lisp (which is more or less the _common_ ground of several Lisps from the 70s & 80s) is this: (apply function arg &rest more-args) I don't see why Emacs Lisp should be different. Is there a good reason? Is there some advantage to being able to do just (apply #'foo)? Why do we use this signature: (apply FUNCTION &rest ARGUMENTS) https://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node81.html From debbugs-submit-bounces@debbugs.gnu.org Wed May 06 13:55:14 2020 Received: (at 40968) by debbugs.gnu.org; 6 May 2020 17:55:14 +0000 Received: from localhost ([127.0.0.1]:41136 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWOGI-0007q0-Aw for submit@debbugs.gnu.org; Wed, 06 May 2020 13:55:14 -0400 Received: from mail-ot1-f45.google.com ([209.85.210.45]:33887) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWOGA-0007pH-AK for 40968@debbugs.gnu.org; Wed, 06 May 2020 13:55:12 -0400 Received: by mail-ot1-f45.google.com with SMTP id 72so2112568otu.1 for <40968@debbugs.gnu.org>; Wed, 06 May 2020 10:55:06 -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=gLf1swf4ZJXXJhGaHoYxaT5V6VsJEBd3ddnRWReokcA=; b=HF7g396K1bOZlbWusoyZzohb2Jq3Y68krH7LAlXwVrN4k7U87HKLzVxKVY9ZMT9oLf mTpR95uIF2ascBuY8UZFEU3Y3DN9Scl3E3ziRqb+J/5FcISuVmKNYMjkNCIoTIvnZdaJ E4Dj1T2+RE1n6y7qn7luvc+bGBqqzxnAhlr2iFGaR+dXN1NKziwvfjO7DpVaCd6AckmK h5HnYkJSH1xIO7/S2Ys8pVx/qj2ulAk/s0i591uWO+SfnaKjS+7R9ldswfkFRgNg5Pf2 TF7+cJSLOzNDgQDwJCv6pE64l7SJBjmCeMb2nmcIX3GbUhd2HOAyGIFL61QUtQpx07FG moPg== 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=gLf1swf4ZJXXJhGaHoYxaT5V6VsJEBd3ddnRWReokcA=; b=Lfm8Xtzw3mQwtok4RU8rtfhUwoCuuqX9EmbEJ7fwd0t9vGTDRItUt1Yaez8p5iG/nh zbtwtN6h0rNuvtTDv9h1QpxYEjGXFAxygm2RCQroVa0FdXnrfBBuUizJvePJtil5tNj+ IS7CtV8Ad6KCrbF72AhKT4lpylulMZ4eKOxzfqqOaPFjmvGXSHD/DtwkxgDDU7jBHJFd I5ILabI89SyDkdMVD7ku250WSZLHg081dJVKY/uqdhdKHO8mmTQjR/O99+0uAyh2MpAk sIfyp6JNpPtkzkpK9vqOQNQfFl6KU2wFzYkROuRNIUfG79EDS0kA90pynG/+GYtFy4dp YjUg== X-Gm-Message-State: AGi0PubmQPd3yfsoctCuIBI1+IWOnRC6upOAJkl9gYqrhqIr494wweM7 1nc9MsThrBQo6dna9oejcGC3v+1h2W4wrhBMY78= X-Google-Smtp-Source: APiQypK0dLdnhX7FT1fQQpV0pGMCwBD7T2M6iAAFhBO62yrONmzUNYYCqE5+SOAmLiBJMti1igemrofjw0phXYav9wU= X-Received: by 2002:a9d:5f04:: with SMTP id f4mr8159390oti.154.1588787700191; Wed, 06 May 2020 10:55:00 -0700 (PDT) MIME-Version: 1.0 References: <83lfm5kvn4.fsf@gnu.org> In-Reply-To: <83lfm5kvn4.fsf@gnu.org> From: Pip Cet Date: Wed, 6 May 2020 17:54:23 +0000 Message-ID: Subject: Re: bug#40968: 28.0.50; (apply nil) To: Eli Zaretskii Content-Type: multipart/mixed; boundary="0000000000007e9c8f05a4fe76f8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 40968 Cc: 40968@debbugs.gnu.org, Stefan Kangas X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --0000000000007e9c8f05a4fe76f8 Content-Type: text/plain; charset="UTF-8" On Wed, May 6, 2020 at 2:04 PM Eli Zaretskii wrote: > 'apply' is a very popular function, and is used very widely. I won't > be surprised if there were more of these usage cases that would be > broken by such a change in the signature. > Can we instead identify the problematic usage and signal an error? Yes. What we also have to do is fix the documentation, and fix the byte optimizer. Here's a first suggestion. I'd particularly appreciate hints on better wording for the documentation. --0000000000007e9c8f05a4fe76f8 Content-Type: text/x-patch; charset="US-ASCII"; name="0001-Handle-single-argument-apply-consistently-bug-40968.patch" Content-Disposition: attachment; filename="0001-Handle-single-argument-apply-consistently-bug-40968.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_k9vn2mzh0 RnJvbSBmYTgxOTA0NTc2NmY1MGM1NWY5YmI1ODhlY2Y3ZTBiZWY2YTU2ZDQxIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBQaXAgQ2V0IDxwaXBjZXRAZ21haWwuY29tPgpEYXRlOiBXZWQs IDYgTWF5IDIwMjAgMTc6NDY6NTYgKzAwMDAKU3ViamVjdDogW1BBVENIXSBIYW5kbGUgc2luZ2xl LWFyZ3VtZW50IGBhcHBseScgY29uc2lzdGVudGx5IChidWcjNDA5NjgpCgotLS0KIGRvYy9saXNw cmVmL2Z1bmN0aW9ucy50ZXhpICB8ICA5ICsrKysrKysrKwogbGlzcC9lbWFjcy1saXNwL2J5dGUt b3B0LmVsIHwgMjkgKysrKysrKysrKysrKysrKy0tLS0tLS0tLS0tLS0KIHNyYy9ldmFsLmMgICAg ICAgICAgICAgICAgICB8ICA1ICsrKysrCiAzIGZpbGVzIGNoYW5nZWQsIDMwIGluc2VydGlvbnMo KyksIDEzIGRlbGV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BMaXNwX09iamVjdCAqYXJncykKQEAgLTIzNzMsNiArMjM3NSw5IEBAIERF RlVOICgiYXBwbHkiLCBGYXBwbHksIFNhcHBseSwgMSwgTUFOWSwgMCwKIAogICBwdHJkaWZmX3Qg bnVtYXJncyA9IGxpc3RfbGVuZ3RoIChzcHJlYWRfYXJnKTsKIAorICBpZiAobnVtYXJncyA9PSAw ICYmIG5hcmdzID09IDEpCisgICAgd3JvbmdfdHlwZV9hcmd1bWVudCAoUWNvbnNwLCBzcHJlYWRf YXJnKTsKKwogICBpZiAobnVtYXJncyA9PSAwKQogICAgIHJldHVybiBGZnVuY2FsbCAobmFyZ3Mg LSAxLCBhcmdzKTsKICAgZWxzZSBpZiAobnVtYXJncyA9PSAxKQotLSAKMi4yNi4yCgo= --0000000000007e9c8f05a4fe76f8-- From debbugs-submit-bounces@debbugs.gnu.org Wed May 06 14:02:42 2020 Received: (at 40968) by debbugs.gnu.org; 6 May 2020 18:02:43 +0000 Received: from localhost ([127.0.0.1]:41152 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWONW-000832-Lk for submit@debbugs.gnu.org; Wed, 06 May 2020 14:02:42 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:33080) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWONU-00082p-Ir for 40968@debbugs.gnu.org; Wed, 06 May 2020 14:02:41 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 046HxCMW134732; Wed, 6 May 2020 18:02:33 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=3OTRXy8bkNOnviyIEstWeMp2Mo2U4MxjUL8ymWiZoOc=; b=dLTxypbEc3gg26vPazP8+oUeYADZbo5pEtbkKMdu2RsH9nqW3xRdyFwO7FDQfixU36vz Gfn4kwhKipM1YIc54JkpDwTgI6Vs0m8eAxk+/LIwv/jk11Ofw15LkmMzqmF70LxcaxtQ HXu+Mdv3R/5eAH6nBwgdxnUQ1gP/vQTseyAMS6+dat3wyl0pXaOXuAGb0Va6LiE7pEYw xEtPB53f6q37fZXVhMz1pQqniJv7HuZSJ13S4nOYAHczE78cdc+u+W6dyw/QJo3BXB0O Fk6L2WlTv8IYX4lRbG7QGBHlIYbH2pcCuH2wSLtR36+qR+oLqCbI0Ecv6ZvzS9zDvvzi Jg== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by aserp2120.oracle.com with ESMTP id 30usgq30vy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 06 May 2020 18:02:33 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 046HufE2005755; Wed, 6 May 2020 18:00:32 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userp3020.oracle.com with ESMTP id 30us7n97ep-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 06 May 2020 18:00:31 +0000 Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 046I0UJA011663; Wed, 6 May 2020 18:00:31 GMT MIME-Version: 1.0 Message-ID: Date: Wed, 6 May 2020 11:00:30 -0700 (PDT) From: Drew Adams To: Stefan Kangas , Pip Cet Subject: RE: bug#40968: 28.0.50; (apply nil) References: In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4993.0 (x86)] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9613 signatures=668687 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 adultscore=0 suspectscore=0 mlxlogscore=999 malwarescore=0 phishscore=0 mlxscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2005060146 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9613 signatures=668687 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 impostorscore=0 mlxscore=0 priorityscore=1501 lowpriorityscore=0 malwarescore=0 clxscore=1015 mlxlogscore=999 spamscore=0 adultscore=0 bulkscore=0 phishscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2005060146 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 40968 Cc: 40968@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > > (apply FUNCTION ARGUMENT &rest ARGUMENTS), I guess. I missed it in > > the first patch. >=20 > FWIW, I still think we should avoid changing the function signature if > at all possible. >=20 > apply is fundamental to Lisp, and has been defined like this for a > long time. See the definition of "The Universal S-Function apply" in > John McCarthy's paper: [1] >=20 > apply[f;args] =3Deval[cons[f;appq[args]];NIL], >=20 > Also note that it is still defined like this elsewhere: >=20 > Scheme: (apply function argument-list) > Common Lisp: apply function &rest args+ =3D> result* > Clojure: (apply f args) Hm. CLTL2 shows the signature for Common Lisp as this: apply function arg &rest more-args ^^^ https://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node81.html On the other hand the CL HyperSpec agrees with you: apply function &rest args+ =3D> result* http://www.lispworks.com/documentation/HyperSpec/Body/f_apply.htm Dunno what the truth is. I've always considered CLTL the language spec. But that may be wrong. What's the use case for (apply FUN)? From debbugs-submit-bounces@debbugs.gnu.org Wed May 06 14:07:15 2020 Received: (at 40968) by debbugs.gnu.org; 6 May 2020 18:07:15 +0000 Received: from localhost ([127.0.0.1]:41156 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWORv-00089g-Ab for submit@debbugs.gnu.org; Wed, 06 May 2020 14:07:15 -0400 Received: from mail-ot1-f44.google.com ([209.85.210.44]:45719) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWORt-00089S-2q for 40968@debbugs.gnu.org; Wed, 06 May 2020 14:07:14 -0400 Received: by mail-ot1-f44.google.com with SMTP id e20so2112634otk.12 for <40968@debbugs.gnu.org>; Wed, 06 May 2020 11:07:13 -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=TqFecTA+r24vCr1dNBMw6erqiw+ipFF47fdvp/R13u0=; b=dv+A/vdjs0T4cDi5NQ7XnTWNyLBobvw3K6gJPrd6cZXz0rxNPjhWKq+duFPBZ9YABZ 3EHbvLcsIV8BpMjDFt4+2F2Ml6UwpNs/e7AWTdR9YJ1gAA5RXxF3eyQfxlKTY9FnmDTb TFv20V/4WERQRzuogyftGEOB8bMP9HfWTaHW41G1Z6XDtKMq9E7lfRKjwpIyjtTpmC8o SPFa8XOObCFFNwa8mIiVzKbXba4Mmplr4H9VkX+pODZcaeVB7B0d/G6Ot8JHmwXHdwH1 hRWriMix9VJjcFw4u3mBfFVn+Yh68fr2yY+TpFbiKJfN6xYANgUpMmUpEt9+dmKy7VGK PgDA== 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=TqFecTA+r24vCr1dNBMw6erqiw+ipFF47fdvp/R13u0=; b=U+wwI8QD95yginxT0kiMTQF4JWQy6pl/d3hXdsge3UDeBYps85kihJY15kmIF01I85 9j3kO8YQCh/Ok5IOoaqTfiaHLY4bMUCawpRxrBc3I0S9j741U+VwvzA7Ql0Hc3ZdE179 lYDCs5dMDPXG2N5ogmG836FEWrgbGoq/9R5P8BqDK46fkogVC+ihohffw3/4LfmTF5ic rccYk5oEH+S8YmjHn+0Qw5QvV1KHhGTKxjWDZgYqJ43f8Wx0sIoIW9CB6L5q4N7/X0fB QA40kTQ4rkLmfmtptoxuNok8yPcU+ddcxvJ5TjJYihGVPVco52VB0Hhf++NdlVjA8AVf QzdA== X-Gm-Message-State: AGi0Puaq8igzIxxfLdDBh/KDiQZMvyNG7cSvb0AS3AuXIF3hzQOp8obR BkcYznoycqFEJP3Ijo3qnIvP0xoCzTXHL9Y3cHU= X-Google-Smtp-Source: APiQypKCN1LRx5MhvMFYe6laAChyzYMQBlV38lM6FdVN9P1/HhL+70CuoojPGVdTTOUJJhH+1Njimr55nvDOzmZ0LEo= X-Received: by 2002:a9d:6b98:: with SMTP id b24mr7391337otq.287.1588788427453; Wed, 06 May 2020 11:07:07 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Pip Cet Date: Wed, 6 May 2020 18:06:31 +0000 Message-ID: Subject: Re: bug#40968: 28.0.50; (apply nil) To: Stefan Kangas Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 40968 Cc: 40968@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Wed, May 6, 2020 at 3:28 PM Stefan Kangas wrote: > Pip Cet writes: > > Is the function signature relevant for anything but eldoc? > > Besides the docstring, the manual documents it. The suggested form is > unusual and makes it harder to understand, IMHO. I think it's hard to understand Elisp apply from a standard signature, because it's really (apply FUNCTION &rest INDIVIDUAL-ARGUMENTS ARGUMENT-LIST) or (apply FUNCTION-AND-ARGUMENT-LIST) The latter (which takes a single argument) is not a special case of the former (which takes 2,3,4,... arguments). > >> apply is fundamental to Lisp, and has been defined like this for a > >> long time. > > > > I don't know about that. Anything but the two-argument form of apply > > strikes me as rather dialect-dependent, but I may be wrong. > > If I understand correctly, you propose a three argument form: > > (apply FUNCTION ARGUMENT &rest ARGUMENTS) That's a 2,3,4...-argument form. > This is what I find unusual. It should really be either > > (apply FUNCTION &rest ARGUMENTS) That's a 1,2,3...-argument form. > or > > (apply FUNCTION ARGUMENTS) That's a 2-argument form. > But since we already have the former, we are better to stick with > that. > > Maybe there's a case to be made for a syntactic alternative to "&rest" > which disallows nil, which I guess is the issue here? But we can also > just signal an error in this case. > > Racket does the latter, as one data point: > > > (define foo (lambda () 1)) > > (apply foo nil) > ; nil: undefined; > ; cannot reference an identifier before its definition > ; in module: top-level > ; [,bt for context] Doesn't that just say that "nil" isn't a valid Racket identifier? (apply foo '()) works fine, and Racket's apply requires at least two arguments if I'm reading the error message correctly. > BTW, I don't see a big difference conceptually between '&rest > ARGUMENTS' and 'ARGUMENTS'. The former is just syntactic sugar, > right? Not really, no. > >> See the definition of "The Universal S-Function apply" in > >> John McCarthy's paper: [1] > >> > >> apply[f;args] =eval[cons[f;appq[args]];NIL], > > > > I must admit I don't know how appq is defined. (It turns out my PDF viewer just refused to highlight the definition right there on the page). > My point is mainly that it has two arguments: f and args. I think we're all in agreement about 2-argument apply. 3,4,...-argument apply is an unfortunate legacy but one we're stuck with now. 1-argument apply is the issue here. From debbugs-submit-bounces@debbugs.gnu.org Wed May 06 14:09:31 2020 Received: (at 40968) by debbugs.gnu.org; 6 May 2020 18:09:32 +0000 Received: from localhost ([127.0.0.1]:41160 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWOU7-0008Cq-Om for submit@debbugs.gnu.org; Wed, 06 May 2020 14:09:31 -0400 Received: from eggs.gnu.org ([209.51.188.92]:52392) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWOU6-0008Cd-VB for 40968@debbugs.gnu.org; Wed, 06 May 2020 14:09:31 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:60550) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jWOU1-0002HA-NZ; Wed, 06 May 2020 14:09:25 -0400 Received: from [176.228.60.248] (port=2663 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jWOU1-0005vi-1w; Wed, 06 May 2020 14:09:25 -0400 Date: Wed, 06 May 2020 21:09:08 +0300 Message-Id: <83bln1kkaj.fsf@gnu.org> From: Eli Zaretskii To: Pip Cet In-Reply-To: (message from Pip Cet on Wed, 6 May 2020 17:54:23 +0000) Subject: Re: bug#40968: 28.0.50; (apply nil) References: <83lfm5kvn4.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 40968 Cc: 40968@debbugs.gnu.org, stefan@marxist.se X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Pip Cet > Date: Wed, 6 May 2020 17:54:23 +0000 > Cc: Stefan Kangas , 40968@debbugs.gnu.org > > > Can we instead identify the problematic usage and signal an error? > > Yes. What we also have to do is fix the documentation, and fix the > byte optimizer. > > Here's a first suggestion. I'd particularly appreciate hints on better > wording for the documentation. The documentation parts of the patch look fine to me, thanks. (The rest also looks fine.) Let's wait for a few days so others could comment. From debbugs-submit-bounces@debbugs.gnu.org Wed May 06 14:28:53 2020 Received: (at 40968) by debbugs.gnu.org; 6 May 2020 18:28:53 +0000 Received: from localhost ([127.0.0.1]:41165 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWOmr-0000FC-CG for submit@debbugs.gnu.org; Wed, 06 May 2020 14:28:53 -0400 Received: from mail-qt1-f181.google.com ([209.85.160.181]:39238) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWOmp-0000Ex-2g for 40968@debbugs.gnu.org; Wed, 06 May 2020 14:28:52 -0400 Received: by mail-qt1-f181.google.com with SMTP id o10so2340527qtr.6 for <40968@debbugs.gnu.org>; Wed, 06 May 2020 11:28:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=EuBKWM2S3n7xmTCoxJ0chxqHoeXijF6ZNpRO/DNbumg=; b=tl0jsyAGwYS4ffmmK8PtBXpv9fwBSS9hihbFVjcHMkd5yXZSnlF8Z/P3HLMdBDgIUQ P6LjvBXshICAUmtT0QOXm45UG5weRAqJ+cZz9s9q2yyVX0AIVHkyykj28tYwbzw7sJtb UKnTcQJj4XX2jWQAbqNLW+NIZymSb62Ovqv02s8e7l+AlvCxqFVyhGng/kcEPf7OK9cf KWamJZctCr7QfjJYLPwkj9RtKGNgnO0TSbAI4uJqvF2KuXwNkrb6Xks0MgzdY39AT3FE 6mUXoebvXR5v+Wi96ZsFLXf3SQSN17b4x5p1PSpxa6U4fxlDzQo0DxlRwUexXfeNNiNE k/Jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=EuBKWM2S3n7xmTCoxJ0chxqHoeXijF6ZNpRO/DNbumg=; b=LmivPogmYVSfcbEbEsT81fcyqAyzsyDDsJCE06VYPcGVmC9D7N9Gv4R6RNIhzybUbj ofw8r1s80qZ4qWTzbNzrVlzE1ZURl/+SZRKBlUm6rVelpWp/h4O0xhrpOXqInMex6AUl DJq4FPYObkGpq34414scyk2uVET5qVsOPm6Uaabb9HEm3QmXORkl6z9cooW5qnJ09RO4 JTCD0CSCyGFnon7frBPQQz3hZJaknuo+gaY7DHSfvu8Pk7TLuRzW6HUsP/uWNJKaxLCt DZHpOyCX/wrSe+r9tvJm3ImvBSAB/NKZKlko4HCkWVIs+8iqeJB8qV8Lo7pHvwoM7HPj ybLA== X-Gm-Message-State: AGi0Puaz5rBKO3xeHH6Bgs7HJKAJyQW0sHbBHokss9Pi4ObOn1SANhoo nfZ1b9CQC8oXLWDlDHpTOUmW25EO X-Google-Smtp-Source: APiQypLbcexH5JpX/S6k1js9fjUY5pLvbfvRL/L4STPRNtR2Sbzzvh6HoBcOC+Vr+p13Z/YxGa9KAQ== X-Received: by 2002:ac8:2c0c:: with SMTP id d12mr9821060qta.284.1588789725269; Wed, 06 May 2020 11:28:45 -0700 (PDT) Received: from vhost2 (CPE001143542e1f-CMf81d0f809fa0.cpe.net.cable.rogers.com. [99.230.38.42]) by smtp.gmail.com with ESMTPSA id b136sm2280822qkg.86.2020.05.06.11.28.44 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 06 May 2020 11:28:44 -0700 (PDT) From: Noam Postavsky To: Drew Adams Subject: Re: bug#40968: 28.0.50; (apply nil) References: Date: Wed, 06 May 2020 14:28:43 -0400 In-Reply-To: (Drew Adams's message of "Wed, 6 May 2020 11:00:30 -0700 (PDT)") Message-ID: <85a72khq90.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (windows-nt) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 40968 Cc: 40968@debbugs.gnu.org, Stefan Kangas , Pip Cet X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Drew Adams writes: > apply function arg &rest more-args > ^^^ > > https://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node81.html > > On the other hand the CL HyperSpec agrees with you: > > apply function &rest args+ => result* > > http://www.lispworks.com/documentation/HyperSpec/Body/f_apply.htm I think '&rest args+' is just BNF shorthand for 'arg &rest more-args' (i.e., both signatures above require a total of 2 or more arguments). http://www.lispworks.com/documentation/HyperSpec/Body/01_dab.htm From debbugs-submit-bounces@debbugs.gnu.org Wed May 06 14:42:47 2020 Received: (at 40968) by debbugs.gnu.org; 6 May 2020 18:42:47 +0000 Received: from localhost ([127.0.0.1]:41170 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWP0J-0000b2-Jt for submit@debbugs.gnu.org; Wed, 06 May 2020 14:42:47 -0400 Received: from mail83c50.megamailservers.eu ([91.136.10.93]:50850 helo=mail18c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWP0F-0000ao-QY for 40968@debbugs.gnu.org; Wed, 06 May 2020 14:42:46 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1588790558; bh=qiTwpwU1a5a+o0fN6Y5OIXqV4wmXsS4uJyf2kSa3XJ0=; h=From:Subject:Date:Cc:To:From; b=lbbWxbtKh6sRdLEF+NyhB8WpwxadpNq+mbM0LUC9kzJRVYooxHPOHb25ony0lZlmq btvzc+0wh55axmJZO5awbM8pI8LX2tZ4xQ2B3FfiB1IaZeDZlnHGEEZI3k1B01rAb0 Cd2BiAO6m+y5cmoCc7V7QnCM4aXiSbWDtxxo7bos= Feedback-ID: mattiase@acm.or Received: from stanniol.lan (c-4e4ae655.032-75-73746f71.bbcust.telenor.se [85.230.74.78]) (authenticated bits=0) by mail18c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 046IgZXk009332; Wed, 6 May 2020 18:42:36 +0000 From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= Content-Type: multipart/mixed; boundary="Apple-Mail=_53712A38-29AF-4BD9-A414-8027B7F4AB1F" Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.14\)) Subject: Re: bug#40968: 28.0.50; (apply nil) Message-Id: Date: Wed, 6 May 2020 20:42:34 +0200 To: Pip Cet X-Mailer: Apple Mail (2.3445.104.14) X-CTCH-RefID: str=0001.0A782F23.5EB304D5.0030, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=K8Zc4BeI c=1 sm=1 tr=0 a=klNLuyVZdLUgl+K5Uafb2A==:117 a=klNLuyVZdLUgl+K5Uafb2A==:17 a=M51BFTxLslgA:10 a=FyimMvxhTKJVWkl6uL8A:9 a=CjuIK1q_8ugA:10 a=DnGgYRmb9dQCi2FSDzUA:9 a=De_Ol2h6w80A:10 X-Spam-Score: 1.4 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: That patch is fine but perhaps incomplete, if we want (apply nil) to result in the same error when interpreted and byte-compiled. Suggested test case attached. The manual change is fine. Perhaps we should adopt a somewhat discouraging tone. You could also say that (apply X) is defined as (apply (car X) (cdr X)), and X must be a cons. Content analysis details: (1.4 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: megamailservers.eu] 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.4 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-Debbugs-Envelope-To: 40968 Cc: Stefan Kangas , Eli Zaretskii , 40968@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --Apple-Mail=_53712A38-29AF-4BD9-A414-8027B7F4AB1F Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii That patch is fine but perhaps incomplete, if we want (apply nil) to = result in the same error when interpreted and byte-compiled. Suggested test case attached. The manual change is fine. Perhaps we should adopt a somewhat = discouraging tone. You could also say that (apply X) is defined as (apply (car X) (cdr X)), = and X must be a cons. --Apple-Mail=_53712A38-29AF-4BD9-A414-8027B7F4AB1F Content-Disposition: attachment; filename=test.diff Content-Type: application/octet-stream; x-unix-mode=0644; name="test.diff" Content-Transfer-Encoding: 7bit diff --git a/test/lisp/emacs-lisp/bytecomp-tests.el b/test/lisp/emacs-lisp/bytecomp-tests.el index bfe2d06a61..65fd57b4e0 100644 --- a/test/lisp/emacs-lisp/bytecomp-tests.el +++ b/test/lisp/emacs-lisp/bytecomp-tests.el @@ -352,7 +352,14 @@ byte-opt-testsuite-arith-data ;; `substring' bytecode generation (bug#39709). (substring "abcdef") (substring "abcdef" 2) - (substring "abcdef" 3 2)) + (substring "abcdef" 3 2) + + ;; `apply' with single argument (bug#40968). + (apply '(+ 2 3 5)) + (condition-case nil + (apply nil) + (wrong-type-argument 'wrong-arg)) + ) "List of expression for test. Each element will be executed by interpreter and with bytecompiled code, and their results compared.") --Apple-Mail=_53712A38-29AF-4BD9-A414-8027B7F4AB1F-- From debbugs-submit-bounces@debbugs.gnu.org Wed May 06 15:17:38 2020 Received: (at 40968) by debbugs.gnu.org; 6 May 2020 19:17:38 +0000 Received: from localhost ([127.0.0.1]:41191 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWPY1-0001T5-Oz for submit@debbugs.gnu.org; Wed, 06 May 2020 15:17:38 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:43682) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWPXu-0001Sl-Uk for 40968@debbugs.gnu.org; Wed, 06 May 2020 15:17:35 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 046JDjIX074033; Wed, 6 May 2020 19:17:24 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=UfwNgXjMI8Ng2hPyvYXMPMNhXfFyUIJJirL/aNz3ELI=; b=Y/kJXjMOIsyRSdTiCgZdfqswwP12VGQoHCesPHdN2aD//uJI27AA0q4kqG9nFsptOaK3 bmhPIgUkZCMHnvCOLjDQK5jNaD20lxH4CANfcEjKsG0QAG5mRSVB9z+Svl2Zl/7RGffN WJpGeFPtA9L7YIkPdgZCUXbw5jG6nwZqMvfru6Qmkr66XTgDVGsePDUBHLFjo9cX3iOT ++yDDu58fI3TsZ1GxSvwjzTJO4xmaBbVk+unHliti5Zbyb2oJhGVE1U1V9RpFqULDy05 hO02y9wKMEZ+ta2A6APDGFJrZPuGxwFPVTlV8gI20Fv91vR6EsflYF5JfeqcL4xNnnON Fg== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by userp2120.oracle.com with ESMTP id 30s1gnc447-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 06 May 2020 19:17:24 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 046JChDe140937; Wed, 6 May 2020 19:17:23 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userp3020.oracle.com with ESMTP id 30us7ne6wf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 06 May 2020 19:17:23 +0000 Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 046JHMHB025516; Wed, 6 May 2020 19:17:22 GMT MIME-Version: 1.0 Message-ID: Date: Wed, 6 May 2020 12:17:21 -0700 (PDT) From: Drew Adams To: Noam Postavsky Subject: RE: bug#40968: 28.0.50; (apply nil) References: <85a72khq90.fsf@gmail.com> In-Reply-To: <85a72khq90.fsf@gmail.com> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4993.0 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9613 signatures=668687 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 adultscore=0 suspectscore=0 mlxlogscore=999 malwarescore=0 phishscore=0 mlxscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2005060155 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9613 signatures=668687 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 suspectscore=0 mlxscore=0 spamscore=0 clxscore=1015 priorityscore=1501 bulkscore=0 phishscore=0 impostorscore=0 malwarescore=0 lowpriorityscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2005060155 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 40968 Cc: 40968@debbugs.gnu.org, Stefan Kangas , Pip Cet X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > > apply function arg &rest more-args > > ^^^ > > > https://urldefense.com/v3/__https://www.cs.cmu.edu/Groups/AI/html/cltl/ > clm/node81.html__;!!GqivPVa7Brio!Kes9zsDqvdTyifr0LvhIg- > x3qHNl3XPQZaBRBxbjXsP-qGz7ieoaYPp6rfGGzbvg$ > > > > On the other hand the CL HyperSpec agrees with you: > > > > apply function &rest args+ =3D> result* > > > https://urldefense.com/v3/__http://www.lispworks.com/documentation/Hype > rSpec/Body/f_apply.htm__;!!GqivPVa7Brio!Kes9zsDqvdTyifr0LvhIg- > x3qHNl3XPQZaBRBxbjXsP-qGz7ieoaYPp6rY83YOj5$ >=20 > I think '&rest args+' is just BNF shorthand for 'arg &rest more-args' > (i.e., both signatures above require a total of 2 or more arguments). >=20 > https://urldefense.com/v3/__http://www.lispworks.com/documentation/Hype > rSpec/Body/01_dab.htm__;!!GqivPVa7Brio!Kes9zsDqvdTyifr0LvhIg- > x3qHNl3XPQZaBRBxbjXsP-qGz7ieoaYPp6rbGmUXoP$ Ah yes; thanks. So Common Lisp is unequivocally in the camp of requiring at least two args. And if Elisp follows that (which I think it should, unless someone can present a good use case for just (apply FUNCTION)), then it should raise an error if there are not at least two args. Just one opinion. From debbugs-submit-bounces@debbugs.gnu.org Wed May 06 15:22:38 2020 Received: (at 40968) by debbugs.gnu.org; 6 May 2020 19:22:38 +0000 Received: from localhost ([127.0.0.1]:41196 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWPcs-0001at-DO for submit@debbugs.gnu.org; Wed, 06 May 2020 15:22:38 -0400 Received: from mail-oi1-f170.google.com ([209.85.167.170]:39317) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWPcq-0001ad-18 for 40968@debbugs.gnu.org; Wed, 06 May 2020 15:22:36 -0400 Received: by mail-oi1-f170.google.com with SMTP id b18so2798376oic.6 for <40968@debbugs.gnu.org>; Wed, 06 May 2020 12:22:36 -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=MtwOr5PDmqk1FeW4N0XjfgTd/YrsUMYVQetdFOY3edw=; b=LNsSUQyAp+88e8I0f2M3kblD0QTYJwkepkhDJ/O9JUxity/FLgldMVBHs+StaV7/Jh xDiCz0fHINfZLfNhTqMLbfyZGU4lMiWVhibcDGYZi3fitU+piW6/rMN7qPqs5HY51GZp aeXKXlL/lzUSJBMrecdxXGPsTFGWkB0NxBbxFbewW4cSWQbHvGFeYefTJDkmqu7SjKnZ HMG8IDGpHI8TDY0XPpo3oS1q2naVnhQJ7yBJ50xLD2hnRPLeNv0I3i4suIqCqkxQephk gU2/EomTPXmUzIA4PpL8sG/TkuHh6c21CsDa5mEZiKDj9x+zBvXI2hKKAgo2v1CEuaLt TtXA== 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=MtwOr5PDmqk1FeW4N0XjfgTd/YrsUMYVQetdFOY3edw=; b=ioxKU5WkUw5LxplYMC7F7PlzuDP3JmdHclCoA/uW0ClyUIVyQWG7vvg9GOQRWdKD4X UnO9b0gBA0Cip+A4YjQcWg9FOwWepwsSiDWWUxiPOgcFrw0Cr7AqiBXdW7isgecLIil4 SGIXXEOeBbKOuif0qXSICWEMSdwf2cg0feWckbxvyYEIhSN4C4zM7DB9281zpWOAdsah saDrX/v0jHKlPvZbTqs6jESxYudIGG6pbF+D+bwaKxMYrIDVvVR13wQdCW4nCXH4Fg0X TQb208dVgXMOZukXqOf45B6RKCl4trtpT9S1CYhcDUTxfWmBM7fJbmJHSNyMtNa1JgDn D3Nw== X-Gm-Message-State: AGi0PuZ33OajXS17a4JwrWn8XUMUSCOLNXKxRdNYvxVrzrRq6ExJhUEY a1hTAGE/FxtWDVlnnMezmTqfUufD0Jfr66Y2cb0= X-Google-Smtp-Source: APiQypKWpB7NJxkD8CLmCdwvw89PGRhiUZkztV63tPD76S7ikYi0EMoRS7cngfL6Ke6+5xmqxNUBB35exYjVW/GUcPE= X-Received: by 2002:aca:6705:: with SMTP id z5mr3741428oix.122.1588792950449; Wed, 06 May 2020 12:22:30 -0700 (PDT) MIME-Version: 1.0 References: <85a72khq90.fsf@gmail.com> In-Reply-To: From: Pip Cet Date: Wed, 6 May 2020 19:21:54 +0000 Message-ID: Subject: Re: bug#40968: 28.0.50; (apply nil) To: Drew Adams Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 40968 Cc: 40968@debbugs.gnu.org, Stefan Kangas , Noam Postavsky X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Wed, May 6, 2020 at 7:17 PM Drew Adams wrote: > And if Elisp follows that (which I think it should, > unless someone can present a good use case for just > (apply FUNCTION)), then it should raise an error if > there are not at least two args. Note that single-argument apply in current Elisp is not (apply FUNCTION) but (apply LIST-OF-FUNCTION-PLUS-ARGS). (apply '+) is an error. (apply '(+)) is 0. That's why the problem with (apply nil) arose. From debbugs-submit-bounces@debbugs.gnu.org Wed May 06 15:26:19 2020 Received: (at 40968) by debbugs.gnu.org; 6 May 2020 19:26:19 +0000 Received: from localhost ([127.0.0.1]:41207 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWPgR-0001gv-2B for submit@debbugs.gnu.org; Wed, 06 May 2020 15:26:19 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:51098) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWPgP-0001gh-Kw for 40968@debbugs.gnu.org; Wed, 06 May 2020 15:26:18 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 046JNqXQ082905; Wed, 6 May 2020 19:26:11 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=FgQkf6VMDndpNeH4DutsMw8jGozXIwEvan2xJyU1Y7M=; b=0cBu42rISqab/RcdfDxRCM/zQrf84i+sCpZfwDanN2A39WWaDqBdm8bO47QmIVvR5ggZ bd8jBCa908K8BNa1BFL+AMnzobQ8Pu2HBtvxt21JSXLdSCtsN36KvD7ENJmUU3hembzk hw5/b2/WBoDyrwsRIRlSwCLBXzGTPbHdgxaCactXWZKyqKreQ7lXVxoOaG9F2jYPAOhz l5WiP5sZSa5hr+ErLMl0ZzNoEK8HJQXYbuWbVXgJfvGtvMS+7R7HVNNshVyeY+VhWtOb GqcG7syjtrUe5BR603Vg5lDEy8z/cIIPjwrB96zQ+KfZ17CLq4FyycPOSZ335QVaoUXs Pg== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by userp2120.oracle.com with ESMTP id 30s1gnc593-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 06 May 2020 19:26:11 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 046JMpvl170617; Wed, 6 May 2020 19:26:11 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserp3030.oracle.com with ESMTP id 30sjdw6g2c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 06 May 2020 19:26:11 +0000 Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 046JQAWF027804; Wed, 6 May 2020 19:26:10 GMT MIME-Version: 1.0 Message-ID: <01f325dd-c613-492c-b2c0-affd836e01c6@default> Date: Wed, 6 May 2020 12:26:09 -0700 (PDT) From: Drew Adams To: Pip Cet , Stefan Kangas Subject: RE: bug#40968: 28.0.50; (apply nil) References: In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4993.0 (x86)] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9613 signatures=668687 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 mlxscore=0 bulkscore=0 adultscore=0 phishscore=0 mlxlogscore=999 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2005060156 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9613 signatures=668687 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 suspectscore=0 mlxscore=0 spamscore=0 clxscore=1015 priorityscore=1501 bulkscore=0 phishscore=0 impostorscore=0 malwarescore=0 lowpriorityscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2005060156 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 40968 Cc: 40968@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > > > Is the function signature relevant for anything but eldoc? It should be relevant in terms of raising an error if the signature is not respected. > > Besides the docstring, the manual documents it. The suggested form > > is unusual and makes it harder to understand, IMHO. >=20 > I think it's hard to understand Elisp apply from a standard signature, > because it's really >=20 > (apply FUNCTION &rest INDIVIDUAL-ARGUMENTS ARGUMENT-LIST) > or > (apply FUNCTION-AND-ARGUMENT-LIST) >=20 > The latter (which takes a single argument) is not a special case of > the former (which takes 2,3,4,... arguments). (apply FUNCTION) and (apply) should raise an error, IMO (as in Common Lisp). Is there a good use case for either? > > If I understand correctly, you propose a three argument form: > > (apply FUNCTION ARGUMENT &rest ARGUMENTS) >=20 > That's a 2,3,4...-argument form. It's what Common Lisp prescribes. > > This is what I find unusual. It should really be either > > (apply FUNCTION &rest ARGUMENTS) > > or (apply FUNCTION ARGUMENTS) >=20 > That's a 2-argument form. That second form is the same as (apply FUNCTION ARGUMENT). And in that second form it's fine for ARGUMENT to be nil. The first form should raise an error if ARGUMENTS is nil. > > Maybe there's a case to be made for a syntactic alternative to > > "&rest" which disallows nil, which I guess is the issue here? An &rest which must not be nil is written as: ARGUMENT &rest MORE-ARGS &rest is just a list. It can always be nil. > > My point is mainly that it has two arguments: f and args. >=20 > I think we're all in agreement about 2-argument apply. > 3,4,...-argument apply is an unfortunate legacy but one we're stuck > with now. 1-argument apply is the issue here. I'm not in agreement, FWIW. The behavior and its description should be as for Common Lisp: require at least 2 args: FUNCTION and its first ARGUMENT. Is there some use case for (apply f) and (apply)? From debbugs-submit-bounces@debbugs.gnu.org Wed May 06 15:28:30 2020 Received: (at 40968) by debbugs.gnu.org; 6 May 2020 19:28:30 +0000 Received: from localhost ([127.0.0.1]:41212 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWPiY-0001jx-G4 for submit@debbugs.gnu.org; Wed, 06 May 2020 15:28:30 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:53100) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWPiX-0001jj-9S for 40968@debbugs.gnu.org; Wed, 06 May 2020 15:28:29 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 046JRjPJ100670; Wed, 6 May 2020 19:28:23 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=LhTjr9XaePT09Rp43j9YDDYYYNuawltu4JnDW7P3fHw=; b=XzzO5zGaxjGB5jcys3t7mqce6R8+3H8yKTmCrbob1dkrrSTOg40YsCuGq0g88k5UgyJw n9hCLRpyTtd9EcbIHv8xetkbzuOOEdwSgCn0YFAzIj2Rge7lmNDKao2d1Xa1EVxbOEG7 jyX4SxQ43l8WuQrQs+6ZKPS0pLJ/ol87UgLby7+VJUTyj/QxsW/zQ/92wXCwnRHSKRxJ hE2jMCcybqcCn0N15UW4PqpcG9iB0s7syNbVchTTGIY7CnvpqW3/H7v7L0RJ2STmn0Vj uP0MlT/M4Lal4nLtOePRcmz2WTAK9QLPHWrKKRgAazCHl8KDv5kUVTHBhPdT3g9eg7g/ sg== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by userp2120.oracle.com with ESMTP id 30s1gnc5kr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 06 May 2020 19:28:23 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 046JQqQu179283; Wed, 6 May 2020 19:28:23 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserp3030.oracle.com with ESMTP id 30sjdw6k3s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 06 May 2020 19:28:22 +0000 Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 046JSMrM001954; Wed, 6 May 2020 19:28:22 GMT MIME-Version: 1.0 Message-ID: Date: Wed, 6 May 2020 12:28:21 -0700 (PDT) From: Drew Adams To: Pip Cet Subject: RE: bug#40968: 28.0.50; (apply nil) References: <85a72khq90.fsf@gmail.com> In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4993.0 (x86)] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9613 signatures=668687 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 mlxscore=0 bulkscore=0 adultscore=0 phishscore=0 mlxlogscore=831 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2005060157 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9613 signatures=668687 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 suspectscore=0 mlxscore=0 spamscore=0 clxscore=1015 priorityscore=1501 bulkscore=0 phishscore=0 impostorscore=0 malwarescore=0 lowpriorityscore=0 mlxlogscore=885 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2005060157 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 40968 Cc: 40968@debbugs.gnu.org, Stefan Kangas , Noam Postavsky X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > > And if Elisp follows that (which I think it should, > > unless someone can present a good use case for just > > (apply FUNCTION)), then it should raise an error if > > there are not at least two args. >=20 > Note that single-argument apply in current Elisp is not (apply > FUNCTION) but (apply LIST-OF-FUNCTION-PLUS-ARGS). >=20 > (apply '+) is an error. > (apply '(+)) is 0. >=20 > That's why the problem with (apply nil) arose. I think (apply '(+)) should raise an error, because (a) the first arg is not a function and (b) it's missing a second arg. I think (apply ()) should raise an error for the same reason: nil is not a function, and there's no second arg. From debbugs-submit-bounces@debbugs.gnu.org Wed May 06 16:32:24 2020 Received: (at 40968) by debbugs.gnu.org; 6 May 2020 20:32:24 +0000 Received: from localhost ([127.0.0.1]:41307 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWQiN-0003Kf-Pm for submit@debbugs.gnu.org; Wed, 06 May 2020 16:32:23 -0400 Received: from smtp-3.orcon.net.nz ([60.234.4.44]:36361) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWQiM-0003KX-03 for 40968@debbugs.gnu.org; Wed, 06 May 2020 16:32:22 -0400 Received: from [10.253.37.70] (port=48740 helo=webmail.orcon.net.nz) by smtp-3.orcon.net.nz with esmtpa (Exim 4.90_1) (envelope-from ) id 1jWQiG-0007jC-DM; Thu, 07 May 2020 08:32:16 +1200 Received: from ip-101-53-216-155.kinect.net.nz ([101.53.216.155]) via [10.253.37.253] by webmail.orcon.net.nz with HTTP (HTTP/1.1 POST); Thu, 07 May 2020 08:32:16 +1200 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 07 May 2020 08:32:16 +1200 From: Phil Sainty To: Pip Cet Subject: Re: bug#40968: 28.0.50; (apply nil) In-Reply-To: References: Message-ID: X-Sender: psainty@orcon.net.nz User-Agent: Orcon Webmail X-GeoIP: -- X-Spam_score: -2.9 X-Spam_score_int: -28 X-Spam_bar: -- X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 40968 Cc: 40968@debbugs.gnu.org, Stefan Kangas X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On 2020-05-06 23:49, Pip Cet wrote: > Again, I'm no longer sure what the right thing to do here is. I think > I'm up to five different interpretations of (apply ARG) here, > depending on whether ARG is interpreted as FUNCTION, the last of the > ARGUMENTS, an ARGUMENT but not the last one, or a combination thereof, > and whether ARG is required to be a list or not... To my mind the nicest change would be to handle the two error cases, and keep everything else the same. 1. (apply nil) would signal an error. 2. (apply FUNC) would be equivalent to funcall, rather than signalling an error, when (functionp FUNC) -- or perhaps just (not (consp FUNC)). 3. (apply LIST) would remain equivalent to (apply (car LIST) (cdr LIST)) I don't feel strongly about #2. It seems like a nice enhancement to me, but if others feel that would be cause problems then I wouldn't argue. Existing uses of that in the wild are obviously signalling errors at present, so offhand it doesn't seem to me like a dangerous change, and it would match the existing signature. #3 just seems like the only useful thing that apply could possibly do with a single list argument, so I'd definitely keep that. #2 and #3 are surely both convenient for generated code which doesn't know how many arguments it's going to be dealing with. I would still use (FUNCTION &optional ARGS) as the signature, and just document what happens when FUNCTION is actually a list. -Phil From debbugs-submit-bounces@debbugs.gnu.org Wed May 06 17:37:51 2020 Received: (at 40968) by debbugs.gnu.org; 6 May 2020 21:37:51 +0000 Received: from localhost ([127.0.0.1]:41474 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWRji-00051n-W0 for submit@debbugs.gnu.org; Wed, 06 May 2020 17:37:51 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:56470) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWRji-00051a-35 for 40968@debbugs.gnu.org; Wed, 06 May 2020 17:37:50 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 046LbeOX117620; Wed, 6 May 2020 21:37:44 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=FOcHwtPYhfqq9pfza+O335y72pva6CJmJDbzDo3M8d0=; b=OWvUQuCW4ztKLWMDOb96u7xSoGoAYyyTcSGzMhvughR+fSCMsi8e9HLOZDgMsaHznVll HVtMwgjByt55oW0mLnVZC4IGiuuUFYLP+/0iISXH1jH2NcSYovY35ZYCpBRPLoxRD7G6 gNrpYIsCU1f6vpn4VCSSev1gpH7B8AYM45mQlr0ofk0phvRjkwez3x+xopC2nfv8j8xl 3hW/upFVwvl9zftmHhX7zMZhER8ROYZk1OFGpmc7H2IDHVzQEyMzh4BDSfafEVSAajtx kGULApLAhWuvR7mZBZVkE6N8eiVkYpZZCpmb/oK8Y0DeFCrVMTwUl9hL1xcaAjju5jEz Yw== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by userp2130.oracle.com with ESMTP id 30s09rcwrh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 06 May 2020 21:37:44 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 046LZckx072738; Wed, 6 May 2020 21:35:43 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserp3020.oracle.com with ESMTP id 30sjnksex3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 06 May 2020 21:35:43 +0000 Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 046LZgjT018106; Wed, 6 May 2020 21:35:42 GMT MIME-Version: 1.0 Message-ID: Date: Wed, 6 May 2020 14:35:41 -0700 (PDT) From: Drew Adams To: Phil Sainty , Pip Cet Subject: RE: bug#40968: 28.0.50; (apply nil) References: In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4993.0 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9613 signatures=668687 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 adultscore=0 phishscore=0 mlxlogscore=966 bulkscore=0 malwarescore=0 spamscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2005060172 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9613 signatures=668687 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 mlxscore=0 lowpriorityscore=0 spamscore=0 adultscore=0 clxscore=1011 suspectscore=0 priorityscore=1501 malwarescore=0 mlxlogscore=999 phishscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2005060173 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 40968 Cc: 40968@debbugs.gnu.org, Stefan Kangas X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > To my mind the nicest change would be to handle the two error cases, > and keep everything else the same. >=20 > 1. (apply nil) would signal an error. > 2. (apply FUNC) would be equivalent to funcall, rather than signalling > an error, when (functionp FUNC) -- or perhaps just (not (consp > FUNC)). > 3. (apply LIST) would remain equivalent to (apply (car LIST) (cdr > LIST)) >=20 > I don't feel strongly about #2. It seems like a nice enhancement to > me, > but if others feel that would be cause problems then I wouldn't argue. > Existing uses of that in the wild are obviously signalling errors at > present, so offhand it doesn't seem to me like a dangerous change, and > it would match the existing signature. >=20 > #3 just seems like the only useful thing that apply could possibly do > with a single list argument, so I'd definitely keep that. >=20 > #2 and #3 are surely both convenient for generated code which doesn't > know how many arguments it's going to be dealing with. >=20 > I would still use (FUNCTION &optional ARGS) as the signature, and just > document what happens when FUNCTION is actually a list. What's wrong with doing what Common Lisp does (apparently, per the doc'd signature)? (apply FUNCTION first-arg &rest other-args) The first arg to `apply' is required, and must be a function. The second arg to `apply' is required. Any arg after the second is optional. The last arg to `apply' must be a list. (This is true even if it is the second arg.) It can be nil. * If the last arg is the second arg, then its elements are the args passed to FUNCTION. (If it is the empty list then FUNCTION must be nullary.) * If the last arg is not the second arg, then its elements are the Nth args for FUNCTION, where N =3D 1+ the element index. FUNCTION must be able to accept M args, where M =3D 1+ the number of elements in the last arg. "Must" means an error is raised if not so. (apply) =3D> error (apply ANYTHING) =3D> error (apply FUNCTION '(x) ) =3D> (funcall FUNCTION x) ; last arg: singleton list of args (apply FUNCTION x ()) =3D> (funcall FUNCTION x) ; first arg: x ; last arg: empty list of other args (apply FUNCTION () ) =3D> (funcall FUNCTION) ; last arg: empty list of args (apply FUNCTION () ()) =3D> (funcall FUNCTION nil) ; first arg nil ; last arg: empty list of other args From debbugs-submit-bounces@debbugs.gnu.org Wed May 06 22:27:30 2020 Received: (at 40968) by debbugs.gnu.org; 7 May 2020 02:27:30 +0000 Received: from localhost ([127.0.0.1]:41640 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWWG2-0005tJ-1l for submit@debbugs.gnu.org; Wed, 06 May 2020 22:27:30 -0400 Received: from eggs.gnu.org ([209.51.188.92]:53920) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWWG0-0005t6-JN for 40968@debbugs.gnu.org; Wed, 06 May 2020 22:27:28 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:41420) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jWWFu-0007o2-Sp; Wed, 06 May 2020 22:27:22 -0400 Received: from [176.228.60.248] (port=1084 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jWWFu-0004zB-4a; Wed, 06 May 2020 22:27:22 -0400 Date: Thu, 07 May 2020 05:27:05 +0300 Message-Id: <837dxolbt2.fsf@gnu.org> From: Eli Zaretskii To: Drew Adams In-Reply-To: (message from Drew Adams on Wed, 6 May 2020 12:28:21 -0700 (PDT)) Subject: Re: bug#40968: 28.0.50; (apply nil) References: <85a72khq90.fsf@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 40968 Cc: 40968@debbugs.gnu.org, stefan@marxist.se, npostavs@gmail.com, pipcet@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Wed, 6 May 2020 12:28:21 -0700 (PDT) > From: Drew Adams > Cc: Stefan Kangas , 40968@debbugs.gnu.org, > Noam Postavsky > > I think (apply '(+)) should raise an error, because > (a) the first arg is not a function and (b) it's > missing a second arg. That'd be an incompatible change, so it is best not to make such a change. From debbugs-submit-bounces@debbugs.gnu.org Thu May 07 02:53:59 2020 Received: (at 40968) by debbugs.gnu.org; 7 May 2020 06:53:59 +0000 Received: from localhost ([127.0.0.1]:41899 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWaPv-0005Ay-0p for submit@debbugs.gnu.org; Thu, 07 May 2020 02:53:59 -0400 Received: from mail-oi1-f171.google.com ([209.85.167.171]:40838) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWaPt-0005Ab-3r for 40968@debbugs.gnu.org; Thu, 07 May 2020 02:53:57 -0400 Received: by mail-oi1-f171.google.com with SMTP id t199so4291180oif.7 for <40968@debbugs.gnu.org>; Wed, 06 May 2020 23:53:57 -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:content-transfer-encoding; bh=0/DYySZHjgOr6QJyiIXHlYwo9zrw0pMHQeTVu1lKCe4=; b=M3bZIQRPTrF90vmmORTxnuhw+lhi65EbkkE9aWJrvuQYj0kPfnsy8OqiDxHZvZspur bGQ4qnwIdn8hsXzLoGJmdrMaw8RHJdY8B8pCVeTHjRcKML/BEqtvmJzfV0r31Hbua+T7 ghtUoPuCmqzcP1JAshbN3ubjirRWZ8c4k1tDhMwZhGFdv5BDSvwQewtF8Ftv+/FT02DW fzPJc3WOXo4u9tXdOotzwunvA3JW4hZMpDlixCoBeqKgtmppghhIpd6FT821OdvBPz44 eNNfcf+cJH/YfpqGpbVAhg4htJUYvnzFUUtgPVBvl/VvvHQguMA659ejAuoKgFzFfXOX i+fQ== 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:content-transfer-encoding; bh=0/DYySZHjgOr6QJyiIXHlYwo9zrw0pMHQeTVu1lKCe4=; b=PBHIKEwa+A5Q460PFfhULnRrl0opaevaop9lOCnGRdB11Z+LA2N+pUC0h5miydy9lR 224DKNywf3jZlRrS5BCbHjsxi3ExH5d2csY86WM59TuvA9kOI2Rf1o5rzK8gWWX/Tfof FCFkq+eRrbHKI5z59saNcDtFnQCUDxEe2aAx7MKS7fvRRHfSNZ87OVt3Xa9n0LA64i6o bZQq3hTI9q1a4+sVnNKJOI6y4L4PJnegnabjwJoO21hZBI4OmFB9aUxlik1mt9fQA1AI jcHfu7YFc5gI3btIIO0RZbhWYQjRFUeRHHhiitD7E3ApiKD66YWyyxsNwZpT3Xba9qRu gcIA== X-Gm-Message-State: AGi0Pua1AvssP3C4Iu2Tok1g9Eb1hipYrdoUarBRrJRrCVUGRTAdDrsG a9wR2b+7hAPHO9bmj+fxEWlDdU+pPbeyGThJb3M= X-Google-Smtp-Source: APiQypLFQD6EnKZSLjjKVUp8hsu83bDGFpESrfETcHM5VAaEth1BDPNaZus6h/maj5F9jJCQhjd4y9X6bxsq/xl0Mgo= X-Received: by 2002:aca:5614:: with SMTP id k20mr5477822oib.30.1588834431447; Wed, 06 May 2020 23:53:51 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Pip Cet Date: Thu, 7 May 2020 06:53:15 +0000 Message-ID: Subject: Re: bug#40968: 28.0.50; (apply nil) To: =?UTF-8?Q?Mattias_Engdeg=C3=A5rd?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 40968 Cc: Stefan Kangas , Eli Zaretskii , 40968@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) enterOn Wed, May 6, 2020 at 6:42 PM Mattias Engdeg=C3=A5rd wrote: > That patch is fine but perhaps incomplete, if we want (apply nil) to resu= lt in the same error when interpreted and byte-compiled. It is incomplete. However, I've yet to find an elegant way to fix the byte compiler and get it to emit the right error message. Can you think of one? (apply nil) is easy to fix, of course, but (apply (function-returning-nil)) is more difficult. From debbugs-submit-bounces@debbugs.gnu.org Thu May 07 05:11:13 2020 Received: (at 40968) by debbugs.gnu.org; 7 May 2020 09:11:13 +0000 Received: from localhost ([127.0.0.1]:42066 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWcYi-0003n3-TR for submit@debbugs.gnu.org; Thu, 07 May 2020 05:11:13 -0400 Received: from mail1436c50.megamailservers.eu ([91.136.14.36]:33502 helo=mail263c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWcYh-0003mq-8h for 40968@debbugs.gnu.org; Thu, 07 May 2020 05:11:12 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1588842664; bh=S76w5kekKGk2ZrQHP+QCXi1eDkaDJro38TnLhz/thjE=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=CC2VvMEyy1HMSfS8+tWbpONIhoLqEc80SoBnh6UpGMQg9cqqKCuqIuoDmre4zYePb Y62OJ6qbCkfSVs5xILWsMHfZJeKjWRov1FJdjo4rXVyqcI3PV/tVVM+MifzHPXaKNc yAk/x4wradGHIq7W/Cr6HaTMLDOyQWMZW+xRWKuk= Feedback-ID: mattiase@acm.or Received: from stanniol.lan (c-4e4ae655.032-75-73746f71.bbcust.telenor.se [85.230.74.78]) (authenticated bits=0) by mail263c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 0479B1oA020897; Thu, 7 May 2020 09:11:03 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.14\)) Subject: Re: bug#40968: 28.0.50; (apply nil) From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: Date: Thu, 7 May 2020 11:11:00 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: To: Pip Cet X-Mailer: Apple Mail (2.3445.104.14) X-CTCH-RefID: str=0001.0A782F18.5EB3D04C.000E, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=e6d4tph/ c=1 sm=1 tr=0 a=klNLuyVZdLUgl+K5Uafb2A==:117 a=klNLuyVZdLUgl+K5Uafb2A==:17 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=pGLkceISAAAA:8 a=ue7Q5e8ETy580Tsobs0A:9 a=CjuIK1q_8ugA:10 X-Spam-Score: 1.4 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 7 maj 2020 kl. 08.53 skrev Pip Cet : > It is incomplete. However, I've yet to find an elegant way to fix the > byte compiler and get it to emit the right error message. Can you > think of one? Content analysis details: (1.4 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: megamailservers.eu] 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.4 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-Debbugs-Envelope-To: 40968 Cc: Stefan Kangas , Eli Zaretskii , 40968@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) 7 maj 2020 kl. 08.53 skrev Pip Cet : > It is incomplete. However, I've yet to find an elegant way to fix the > byte compiler and get it to emit the right error message. Can you > think of one? You are right, that's a puzzle. No, I cannot think of an elegant way = (but a few inelegant ones). It's probably not worth the trouble; just change the error test case to (condition-case nil (apply nil) (error 'some-error)) From debbugs-submit-bounces@debbugs.gnu.org Thu May 07 07:54:32 2020 Received: (at 40968) by debbugs.gnu.org; 7 May 2020 11:54:32 +0000 Received: from localhost ([127.0.0.1]:42296 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWf6m-0004al-7n for submit@debbugs.gnu.org; Thu, 07 May 2020 07:54:32 -0400 Received: from mail-qt1-f180.google.com ([209.85.160.180]:36996) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWf6l-0004aY-5O for 40968@debbugs.gnu.org; Thu, 07 May 2020 07:54:31 -0400 Received: by mail-qt1-f180.google.com with SMTP id k12so55739qtm.4 for <40968@debbugs.gnu.org>; Thu, 07 May 2020 04:54:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=+k6EryN+j1Lc2Nrx02ytCvSG5I3SJV6/Le9Pm9N3UZY=; b=kiXY6kwMkB8V3g7qqN1J3vb/LMAn5G3VysgtuWLcCo/ocuycAuSuQWWjFvWbLG6dAJ E8i5qcIFtLeCMDGdzPwslkBd+pKScspmo1/x0tJ203qSZSpPV5a8bAHvt3biaz7XZKt9 TYSDf7+ZooEVMAUVjKrOA+kBO6lOUeGftOpnQ9UMzCcGtsfPlo3WYwUv4V3g4F/crSy2 NvoMc9WVbfz2HiA5pEnMQHSMhHx/4+fJEzoupEkU7++UKkLCcaS8S3o8RkGKNgYIuqbV taXvKzYCJe4blKV/X9jcIXqyF7XfjkIfWS3tRbI6lq/hbGL9HJ3HCMGDD659M0nrNbtG Thow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=+k6EryN+j1Lc2Nrx02ytCvSG5I3SJV6/Le9Pm9N3UZY=; b=f5Bqv4s/RPLcA00/XLbg8qi94dGqhfMJra4lCC7ErYcTGLMplHegx/C4evs308okr5 bRpjeFidNLS+bVgGPQMgpyTdvzMJbKZglllO52/19VRvuKcsoNT2jfY2gEjdlY7F+a06 +3TJBoiCOPMiTlbkOR8Un6qbPpoxssIWoISFWWFWgyDv0tLgA1ZROXM2hFhKp3ozfZ6f DiLeXOemx/qyN1y41w+lHj7aauPAYzOyqGeGqLmDw7r2Hq2LM+RpAQwje3eXF0U8a0Nz nMYIx1cyVLR0Oc0fcZlotBjJSIeENgOlx0iNTRoDC7k5PIWnMnzs1mP/Y96UZkdiA72N GS7Q== X-Gm-Message-State: AGi0PuZqdkxqSqr5LtGslo35NKUFc1n3ubcdVOEAj+l1zL1szZlYYpSx D06J3HaN6jT+zSERiXt7ypDwtUAd X-Google-Smtp-Source: APiQypJpQCJm72GCQ3Z8appqm/pMMSHV+E0v7xL/P7NAheT90yz7aDWssp/1SSl1ll2jdDRAPD3tJQ== X-Received: by 2002:ac8:19fd:: with SMTP id s58mr14027118qtk.354.1588852465195; Thu, 07 May 2020 04:54:25 -0700 (PDT) Received: from minid (cbl-45-2-119-47.yyz.frontiernetworks.ca. [45.2.119.47]) by smtp.gmail.com with ESMTPSA id v4sm3973247qkv.43.2020.05.07.04.54.18 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 07 May 2020 04:54:24 -0700 (PDT) From: Noam Postavsky To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= Subject: Re: bug#40968: 28.0.50; (apply nil) References: Date: Thu, 07 May 2020 07:54:10 -0400 In-Reply-To: ("Mattias =?utf-8?Q?Engdeg=C3=A5rd=22's?= message of "Thu, 7 May 2020 11:11:00 +0200") Message-ID: <874kssm04d.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 40968 Cc: 40968@debbugs.gnu.org, Eli Zaretskii , Stefan Kangas , Pip Cet X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Mattias Engdeg=C3=A5rd writes: > 7 maj 2020 kl. 08.53 skrev Pip Cet : > >> It is incomplete. However, I've yet to find an elegant way to fix the >> byte compiler and get it to emit the right error message. Can you >> think of one? > > You are right, that's a puzzle. No, I cannot think of an elegant way > (but a few inelegant ones). The obvious solution is just to leave the weird single arg form unoptimized. Otherwise, what about your earlier suggestion? (apply X) =3D=3D (apply (car X) (cdr X)) > It's probably not worth the trouble; just change the error test case By the way, bytecomp-check-1 already ignores differences between error types. So the test case doesn't need a condition-case at all if we don't care about which particular error is signalled. --- i/lisp/emacs-lisp/byte-opt.el +++ w/lisp/emacs-lisp/byte-opt.el @@ -1100,7 +1100,7 @@ byte-optimize-apply ;; The funcall optimizer can then transform (funcall 'foo ...) -> (foo .= ..). (if (=3D (length form) 2) ;; single-argument `apply' is special (bug#40968) - (byte-optimize-apply `(apply #'funcall ,(cadr form))) + (byte-optimize-apply `(apply (car ,(cadr form)) (cdr ,(cadr form)))) (let ((fn (nth 1 form)) (last (nth (1- (length form)) form))) ; I think this really is fastest (or (if (or (null last) diff --git i/src/eval.c w/src/eval.c index 77f54ad7b1..836be7a906 100644 --- i/src/eval.c +++ w/src/eval.c @@ -2373,10 +2373,11 @@ DEFUN ("apply", Fapply, Sapply, 1, MANY, 0, Lisp_Object fun =3D args[0]; USE_SAFE_ALLOCA; =20 - ptrdiff_t numargs =3D list_length (spread_arg); + if (nargs =3D=3D 1) + /* Special case: FUN is really a list of (FUNCTION . ARGS). */ + return CALLN (Fapply, CAR (fun), CDR (fun)); =20 - if (numargs =3D=3D 0 && nargs =3D=3D 1) - wrong_type_argument (Qconsp, spread_arg); + ptrdiff_t numargs =3D list_length (spread_arg); =20 if (numargs =3D=3D 0) return Ffuncall (nargs - 1, args); From debbugs-submit-bounces@debbugs.gnu.org Thu May 07 07:59:31 2020 Received: (at 40968) by debbugs.gnu.org; 7 May 2020 11:59:31 +0000 Received: from localhost ([127.0.0.1]:42325 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWfBa-0004kg-TW for submit@debbugs.gnu.org; Thu, 07 May 2020 07:59:31 -0400 Received: from mail-oi1-f196.google.com ([209.85.167.196]:44647) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWfBZ-0004kS-Mg for 40968@debbugs.gnu.org; Thu, 07 May 2020 07:59:29 -0400 Received: by mail-oi1-f196.google.com with SMTP id a2so4709773oia.11 for <40968@debbugs.gnu.org>; Thu, 07 May 2020 04:59:29 -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=aM1JGxGhSLFgTeUAFMxMhK+n6p6nfJ2zTe8jCJK9NOg=; b=BDLlEbjmhZjPtSXvS4UpbSLnFzpv9OybRtOGFtnmI2c0CIKdVCDOQCnSJLEq5T5F3H Z+nCDk/fGGfDqH9gUBqq+oJIqUvPqeFvP4sg3lEfr2g3q470RmI/s5bbfKmYc870x6kY +7P4X0OLdENUm0YxiN7eeqWXOdyGoxl93w4n7VaDVKQHulrUBy79+g/pYeth5z0o3EaX sOCuKCn0+VUWGN48t9WPBR5xo3bb9EuFHAYDFtglJdUopO9G9FyI99z/MGZRYJN1s2LI fONTLCH4zQha76slRZ400yny61H7gN9leOZo6ey0weFaAlRy5xooB1TgggxSmOxkRILE V3SQ== 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=aM1JGxGhSLFgTeUAFMxMhK+n6p6nfJ2zTe8jCJK9NOg=; b=aSUNqkayfqhSEaMZfHZmt8CEwNx3nXD47YIFkHzeLUi403sc3lOYovUYrHmW0885Ge EumJtdA463KmkABgSU46wpe332jwJ6TJBaTKiG6vM15766Qyr6ff4rKdorSG03rDbimE J+AFbKKMBM1rlphE7ks1lqqxNfcsLgmqlKAOc48wULw8XsU8G/sAHePVQEUosnACOMn0 wTbKR3kYnX7VsIh7UgNG6gMa1MaimkVxYGrcLMNXoOcTARaHEiCj6PQqTIJ/mJ8NDaD3 0qVZxVbIu/PBDbPkkxl7dBa2E0c9rTx4L+JKZHMkLT+021AIL5tXx2Hjbl1h9POtbgP3 VUKw== X-Gm-Message-State: AGi0PubVycM5S2swsEM/Je/DfG49+Rmr8m4Z55ZFQPTlcL2Ryfb6KnQJ adoORtcaWnD6nD+CG7oBLGeXQK42O37jRBMEy44= X-Google-Smtp-Source: APiQypKhMGVqBrG07fJVPdySettXruPylK7dMzn9mdfdNqLGI6oB2s6UsNQ2KPto9mSJMjMW2FEKTgtFA1VAaKZiDlI= X-Received: by 2002:aca:6705:: with SMTP id z5mr5972358oix.122.1588852764079; Thu, 07 May 2020 04:59:24 -0700 (PDT) MIME-Version: 1.0 References: <874kssm04d.fsf@gmail.com> In-Reply-To: <874kssm04d.fsf@gmail.com> From: Pip Cet Date: Thu, 7 May 2020 11:58:47 +0000 Message-ID: Subject: Re: bug#40968: 28.0.50; (apply nil) To: Noam Postavsky Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 40968 Cc: =?UTF-8?Q?Mattias_Engdeg=C3=A5rd?= , Eli Zaretskii , 40968@debbugs.gnu.org, Stefan Kangas X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Thu, May 7, 2020 at 11:54 AM Noam Postavsky wrote: > - (byte-optimize-apply `(apply #'funcall ,(cadr form))) > + (byte-optimize-apply `(apply (car ,(cadr form)) (cdr ,(cadr form)))) That double-evaluates (cadr form), doesn't it? > - ptrdiff_t numargs = list_length (spread_arg); > + if (nargs == 1) > + /* Special case: FUN is really a list of (FUNCTION . ARGS). */ > + return CALLN (Fapply, CAR (fun), CDR (fun)); But what if someone defines nil as a function (not serious)? (apply nil) gets translated to (apply nil nil) which I guess will throw an error, so that's okay. From debbugs-submit-bounces@debbugs.gnu.org Thu May 07 08:21:01 2020 Received: (at 40968) by debbugs.gnu.org; 7 May 2020 12:21:01 +0000 Received: from localhost ([127.0.0.1]:42338 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWfWP-0005LO-0z for submit@debbugs.gnu.org; Thu, 07 May 2020 08:21:01 -0400 Received: from mail-qt1-f181.google.com ([209.85.160.181]:37257) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWfWN-0005L8-7j for 40968@debbugs.gnu.org; Thu, 07 May 2020 08:20:59 -0400 Received: by mail-qt1-f181.google.com with SMTP id k12so117799qtm.4 for <40968@debbugs.gnu.org>; Thu, 07 May 2020 05:20:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=p4f1gNtSi7SmtVkk+udCdPbIcjvUHEsdaQvIPBUYp8k=; b=YsSVCT+PR88s1dVDk/WXOPCu/7FxPWaUL+BP/7wGIhKohfa5+WVGBMXUtkQwpPOgAZ pUGHJK6D/czGCwH+/mP/b5V91gsJUgoJt7i9zKvjNA8sHOVl0+H5HgftTXn2fZGJ3CMa eaT8jwdhDxu6VxfHgWAx9loVtE3IpHE92/KdkpnDpc+Ivv1UPuZ3fcQ0rqtXwucIWR82 75GmUBHR6RbTvp+fUkxFZFhps5Nk0dS6sXb4VBrTPDhBo4UJBGYpiKyfLtaBtc+v6Q76 NxGolWOsmjPicqPtqmz1OGXs41OHwbJgKbN/E550C5ZbKXHBzpgAhEn67WrIpEw53CUV gpTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=p4f1gNtSi7SmtVkk+udCdPbIcjvUHEsdaQvIPBUYp8k=; b=WL2lcEdfiRHkpV8hC5PffUsGYoPp1cjA2hkubShGuJ/TGIkLg/CElC8Su0CQKVeoyF yBppN5oeIkHOlERg9pzZb1+VijNh2ZTejlpzFVmgvfeQ7rwNA4pyl5zxi6n2WCyyyxuS RfYYKr5eNSk5Cs4LDluPOinKq0dQs8MAl4SDVmAV9vQfWf0PP1L2R8qXY8Dgt82v5Wi3 qG88n976Yu3L7mx8OU/4F8QiRTrWbwmxVszIMs1QJ3lwCLpnZ9PpfbmJ8p8j3ntE74cp Nj3aGrQzmFcIsoGP6dnSH6CoHy6kbqQFESOLA1uXp79nL5mJXsClwPibM9d6TLxbT0Dk EhhQ== X-Gm-Message-State: AGi0Pub+yHQqtocQQg6LH/UlEPShk7TecGqu83qrkO/O1Ee2WxRuAy7B lHVg0oeCEvIO3ZkDtAWauh8= X-Google-Smtp-Source: APiQypJwd+twVvrzJgZGuc9NVrArKG2tNakD7SEy/XCpUJn2BK6ky3TJ2w5BaIOPcim0sVeZq0k4eg== X-Received: by 2002:ac8:39e5:: with SMTP id v92mr14106591qte.224.1588854050801; Thu, 07 May 2020 05:20:50 -0700 (PDT) Received: from minid (cbl-45-2-119-47.yyz.frontiernetworks.ca. [45.2.119.47]) by smtp.gmail.com with ESMTPSA id i82sm3759271qke.134.2020.05.07.05.20.48 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 07 May 2020 05:20:49 -0700 (PDT) From: Noam Postavsky To: Pip Cet Subject: Re: bug#40968: 28.0.50; (apply nil) References: <874kssm04d.fsf@gmail.com> Date: Thu, 07 May 2020 08:20:37 -0400 In-Reply-To: (Pip Cet's message of "Thu, 7 May 2020 11:58:47 +0000") Message-ID: <871rnwlywa.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 40968 Cc: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= , Eli Zaretskii , Stefan Kangas , 40968@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Pip Cet writes: > On Thu, May 7, 2020 at 11:54 AM Noam Postavsky wrote: >> - (byte-optimize-apply `(apply #'funcall ,(cadr form))) >> + (byte-optimize-apply `(apply (car ,(cadr form)) (cdr ,(cadr form)= ))) > > That double-evaluates (cadr form), doesn't it? Oops, right. Then let me go back to "don't optimize that case" (i.e., just return form). >> + if (nargs =3D=3D 1) >> + /* Special case: FUN is really a list of (FUNCTION . ARGS). */ >> + return CALLN (Fapply, CAR (fun), CDR (fun)); > > But what if someone defines nil as a function (not serious)? Emacs doesn't care if you're serious; it has an answer ready for you anyway: (defun nil () t) ;=3D> Cannot define =E2=80=99nil=E2=80=99 as a function From debbugs-submit-bounces@debbugs.gnu.org Thu May 07 09:54:10 2020 Received: (at 40968) by debbugs.gnu.org; 7 May 2020 13:54:10 +0000 Received: from localhost ([127.0.0.1]:42434 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWgyJ-0008CS-Gm for submit@debbugs.gnu.org; Thu, 07 May 2020 09:54:10 -0400 Received: from mail1441c50.megamailservers.eu ([91.136.14.41]:49020 helo=mail264c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWgyG-0008C4-SF for 40968@debbugs.gnu.org; Thu, 07 May 2020 09:53:54 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1588859626; bh=1hLdHjCfLRQ+efzPoQfYVHN0Ak7w1dBFMNTk11Qnb98=; h=From:Subject:Date:In-Reply-To:Cc:To:References:From; b=Lh6W98q2LvSAQxgkekbU17N+rqIbEVzTPDg/yA0YOSa6TTyrFv68K/kqrphBW5GKg 1AnDmOR9dnE1IiGRgCF0zI5FboGtFsOzIbwHbBLVJg65FXVU81BQafvN58VrDqCBOe 3HcWV1OUSmyhg9QRvOUK0rPfZNnr38zl8wu9jfps= Feedback-ID: mattiase@acm.or Received: from stanniol.lan (c-4e4ae655.032-75-73746f71.bbcust.telenor.se [85.230.74.78]) (authenticated bits=0) by mail264c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 047Drh4g017567; Thu, 7 May 2020 13:53:44 +0000 From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= Message-Id: <6ADF0807-7EBD-4054-8579-4D9AD3065D51@acm.org> Content-Type: multipart/mixed; boundary="Apple-Mail=_46137A13-F783-4F26-8E16-DE07A852C1EF" Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.14\)) Subject: Re: bug#40968: 28.0.50; (apply nil) Date: Thu, 7 May 2020 15:53:42 +0200 In-Reply-To: <874kssm04d.fsf@gmail.com> To: Noam Postavsky References: <874kssm04d.fsf@gmail.com> X-Mailer: Apple Mail (2.3445.104.14) X-CTCH-RefID: str=0001.0A782F21.5EB4129A.008B, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=PPNxBsiC c=1 sm=1 tr=0 a=klNLuyVZdLUgl+K5Uafb2A==:117 a=klNLuyVZdLUgl+K5Uafb2A==:17 a=M51BFTxLslgA:10 a=pGLkceISAAAA:8 a=Ju1UhzJ7G_x2rGT1ieEA:9 a=CjuIK1q_8ugA:10 a=bh93jhYcCVYJ-nYAWB4A:9 a=De_Ol2h6w80A:10 X-Spam-Score: 1.2 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 7 maj 2020 kl. 13.54 skrev Noam Postavsky : > The obvious solution is just to leave the weird single arg form > unoptimized. Otherwise, what about your earlier suggestion? > > (apply X) == (apply (car X) (cdr X)) Content analysis details: (1.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: megamailservers.eu] 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.3 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-Debbugs-Envelope-To: 40968 Cc: 40968@debbugs.gnu.org, Eli Zaretskii , Stefan Kangas , Pip Cet X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --Apple-Mail=_46137A13-F783-4F26-8E16-DE07A852C1EF Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii 7 maj 2020 kl. 13.54 skrev Noam Postavsky : > The obvious solution is just to leave the weird single arg form > unoptimized. Otherwise, what about your earlier suggestion? >=20 > (apply X) =3D=3D (apply (car X) (cdr X)) Yes, we are under no obligation to optimise this case in any way. > By the way, bytecomp-check-1 already ignores differences between error > types. So the test case doesn't need a condition-case at all if we > don't care about which particular error is signalled. It seems to treat all errors as producing the value nil, but that should = of course be fixed. --Apple-Mail=_46137A13-F783-4F26-8E16-DE07A852C1EF Content-Disposition: attachment; filename=bytecomp-tests.diff Content-Type: application/octet-stream; x-unix-mode=0644; name="bytecomp-tests.diff" Content-Transfer-Encoding: 7bit diff --git a/test/lisp/emacs-lisp/bytecomp-tests.el b/test/lisp/emacs-lisp/bytecomp-tests.el index bfe2d06a61..c235dd43fc 100644 --- a/test/lisp/emacs-lisp/bytecomp-tests.el +++ b/test/lisp/emacs-lisp/bytecomp-tests.el @@ -363,10 +363,10 @@ bytecomp-check-1 (byte-compile-warnings nil) (v0 (condition-case nil (eval pat) - (error nil))) + (error 'bytecomp-check-error))) (v1 (condition-case nil (funcall (byte-compile (list 'lambda nil pat))) - (error nil)))) + (error 'bytecomp-check-error)))) (equal v0 v1))) (put 'bytecomp-check-1 'ert-explainer 'bytecomp-explain-1) @@ -374,10 +374,10 @@ bytecomp-check-1 (defun bytecomp-explain-1 (pat) (let ((v0 (condition-case nil (eval pat) - (error nil))) + (error 'bytecomp-check-error))) (v1 (condition-case nil (funcall (byte-compile (list 'lambda nil pat))) - (error nil)))) + (error 'bytecomp-check-error)))) (format "Expression `%s' gives `%s' if directly evalled, `%s' if compiled." pat v0 v1))) @@ -402,10 +402,10 @@ test-byte-opt-arithmetic (dolist (pat byte-opt-testsuite-arith-data) (condition-case nil (setq v0 (eval pat)) - (error (setq v0 nil))) + (error (setq v0 'bytecomp-check-error))) (condition-case nil (setq v1 (funcall (byte-compile (list 'lambda nil pat)))) - (error (setq v1 nil))) + (error (setq v1 'bytecomp-check-error))) (insert (format "%s" pat)) (indent-to-column 65) (if (equal v0 v1) @@ -561,11 +561,11 @@ bytecomp-lexbind-check-1 (byte-compile-warnings nil) (v0 (condition-case nil (eval pat t) - (error nil))) + (error 'bytecomp-check-error))) (v1 (condition-case nil (funcall (let ((lexical-binding t)) (byte-compile `(lambda nil ,pat)))) - (error nil)))) + (error 'bytecomp-check-error)))) (equal v0 v1))) (put 'bytecomp-lexbind-check-1 'ert-explainer 'bytecomp-lexbind-explain-1) @@ -573,11 +573,11 @@ bytecomp-lexbind-check-1 (defun bytecomp-lexbind-explain-1 (pat) (let ((v0 (condition-case nil (eval pat t) - (error nil))) + (error 'bytecomp-check-error))) (v1 (condition-case nil (funcall (let ((lexical-binding t)) (byte-compile (list 'lambda nil pat)))) - (error nil)))) + (error 'bytecomp-check-error)))) (format "Expression `%s' gives `%s' if directly evalled, `%s' if compiled." pat v0 v1))) --Apple-Mail=_46137A13-F783-4F26-8E16-DE07A852C1EF-- From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 02 03:37:13 2020 Received: (at 40968) by debbugs.gnu.org; 2 Jun 2020 07:37:13 +0000 Received: from localhost ([127.0.0.1]:37765 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jg1U1-0008Vp-CH for submit@debbugs.gnu.org; Tue, 02 Jun 2020 03:37:13 -0400 Received: from mail-oi1-f175.google.com ([209.85.167.175]:33283) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jg1Ty-0008VY-CR for 40968@debbugs.gnu.org; Tue, 02 Jun 2020 03:37:11 -0400 Received: by mail-oi1-f175.google.com with SMTP id i74so121997oib.0 for <40968@debbugs.gnu.org>; Tue, 02 Jun 2020 00:37:10 -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=fMNFbXdrnKqvsfY0JuX68ZVKQa2Fh1ml4meklwwHlAM=; b=X27n/CRxINCyaCuuLUMx4GSGaCLooqErRNxIhRIWqBfRR2y5l23EjePxMCvtGI/7QR GihzspqijKVXYwDl1F70DgWlUKNzQ/H5J3atvqFSAZnefgy1zYlteT5PBLNs5NPOuGMU +ajOkkrRk9OkbDdmgOtXIprAHFR0D8QJpmejb78B3EPdhm4dGWw9xhtVCRiiQLZ3Y0wr lhKiBaSb9CeAwD86dZhdmPiUuY2VEHhHwzU2QXS0yA/4jU44N6ttpsDjCtt5v7W7TaOu dBSKWCX3SJSGHlOrVkFmVMm9ZsNEkSssjaFwxARMIDNKGN4YDiKTeW9CRd+YGkVpoMwx Uytw== 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=fMNFbXdrnKqvsfY0JuX68ZVKQa2Fh1ml4meklwwHlAM=; b=j471x8McXYa30YC4Vhyy0FTXX+r6WnT/Iz1i3+uvQaLFDhkXs0Q3julvNCu4D5sxME ENod2hCg2ZpbaDdSOHdsOY3+7WExEduS62UUh8QaDJ95DpNoz9vDk5ExbEvX6R38x92B LtwoU5F5aEitCwzWtP/Fky2OrddjbU2G7x8kn7S6i8YXRU43GgPLxMiIc+qtTKI3pqip H635f6vDIL9SFvw9FitsCMce9oOuNGQEv2szWeczHkNhDMjwRfb5VknqumC9HXMZ0J4I RslswSwXNQslGcGd80smzYfQ3P6igzHxDeZvepOYikN6ODy8tRzqyCnMi5bUWzg+xnFA vqXg== X-Gm-Message-State: AOAM531S8n+BwVVHYtnO3dKBXSk86K5An2hrzqtqx1WTvEtZLBUgKVwA tTaCwoLJ6cC8B4n06w2vfBvoLdFpp+3FSDKHeqs= X-Google-Smtp-Source: ABdhPJwdrXRtuOIaouNxPG2f4+F6COrOUpX5C1L+JtbmWmuR8go8qH0lztaYYrz2qZkGqamj/fgjXmuNjLFM82R3wRI= X-Received: by 2002:aca:c6d3:: with SMTP id w202mr2228078oif.44.1591083424570; Tue, 02 Jun 2020 00:37:04 -0700 (PDT) MIME-Version: 1.0 References: <874kssm04d.fsf@gmail.com> <6ADF0807-7EBD-4054-8579-4D9AD3065D51@acm.org> In-Reply-To: <6ADF0807-7EBD-4054-8579-4D9AD3065D51@acm.org> From: Pip Cet Date: Tue, 2 Jun 2020 07:36:26 +0000 Message-ID: Subject: Re: bug#40968: 28.0.50; (apply nil) To: =?UTF-8?Q?Mattias_Engdeg=C3=A5rd?= Content-Type: multipart/mixed; boundary="00000000000054761305a714fa43" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 40968 Cc: 40968@debbugs.gnu.org, Eli Zaretskii , Stefan Kangas , Noam Postavsky X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --00000000000054761305a714fa43 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, May 7, 2020 at 1:53 PM Mattias Engdeg=C3=A5rd wr= ote: > 7 maj 2020 kl. 13.54 skrev Noam Postavsky : > > > The obvious solution is just to leave the weird single arg form > > unoptimized. Otherwise, what about your earlier suggestion? > > > > (apply X) =3D=3D (apply (car X) (cdr X)) > > Yes, we are under no obligation to optimise this case in any way. I think there's consensus, then. I've updated the documentation, in the patch, to state that providing two or more arguments is faster. Patch attached. --00000000000054761305a714fa43 Content-Type: application/x-patch; name="0001-Handle-single-argument-apply-consistently-bug-40968.patch" Content-Disposition: attachment; filename="0001-Handle-single-argument-apply-consistently-bug-40968.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_kaxl4lf20 RnJvbSBkYmJkZjg3NmEzYWQ4MTQ0MWFlN2M3OGFhMmIyNTExNmJmZjgyNGM2IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBQaXAgQ2V0IDxwaXBjZXRAZ21haWwuY29tPgpEYXRlOiBXZWQs IDYgTWF5IDIwMjAgMTc6NDY6NTYgKzAwMDAKU3ViamVjdDogW1BBVENIXSBIYW5kbGUgc2luZ2xl LWFyZ3VtZW50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VuZ3RoIChzcHJlYWRfYXJnKTsKIAogICBpZiAobnVtYXJncyA9PSAwKQotLSAKMi4yNy4wLnJj MAoK --00000000000054761305a714fa43-- From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 02 12:32:26 2020 Received: (at 40968) by debbugs.gnu.org; 2 Jun 2020 16:32:26 +0000 Received: from localhost ([127.0.0.1]:40764 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jg9py-0001f3-8M for submit@debbugs.gnu.org; Tue, 02 Jun 2020 12:32:26 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:43776) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jg9pw-0001er-OW for 40968@debbugs.gnu.org; Tue, 02 Jun 2020 12:32:25 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 052GS4M5011786; Tue, 2 Jun 2020 16:32:14 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=uZc0T0/c8WH0JY2y5Rmm8/Ca0sxEAf95owxfJEywILo=; b=ep/kC5lWNi/NIvX3F1cHY0UmnLpHi6vFaSvm7z9ax5/a03sEg7gK39dlayrK1oajIE/4 kWiOZ42e9LGUonu1Ou1I/D1hQ0EO7U2O5NDe32A7l4mJARWpwy9GOGyo4DxsbVhgAIn/ pRnWGdY4EtJ4W2x7hIqX7vqePMZvLcak6/tIPoX0tPpJBVrF1YbEMiXT+ajAzwFjpUM9 O1B0ysLmm8SdJAHCZE3MhseopBV4Qs0qNU3pRXwD8p3c7J/7OerdMf5aDZ0NA6e+Vo1R 4L0GACHtxsDt996EOMlkqvVWRvra0ZU8s84xFEp5ketI+Hu7tEdr/W5HK4cTsWGOxHju uA== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by userp2120.oracle.com with ESMTP id 31dkruj1hf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 02 Jun 2020 16:32:14 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 052GRwf8179728; Tue, 2 Jun 2020 16:32:14 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userp3020.oracle.com with ESMTP id 31dju1scsp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 02 Jun 2020 16:32:14 +0000 Received: from abhmp0011.oracle.com (abhmp0011.oracle.com [141.146.116.17]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 052GWAHH023844; Tue, 2 Jun 2020 16:32:10 GMT MIME-Version: 1.0 Message-ID: Date: Tue, 2 Jun 2020 09:32:04 -0700 (PDT) From: Drew Adams To: Pip Cet , =?utf-8?B?TWF0dGlhcyBFbmdkZWfDpXJk?= Subject: RE: bug#40968: 28.0.50; (apply nil) References: <874kssm04d.fsf@gmail.com> <6ADF0807-7EBD-4054-8579-4D9AD3065D51@acm.org> In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.5005.0 (x86)] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9640 signatures=668686 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 mlxlogscore=999 phishscore=0 malwarescore=0 mlxscore=0 adultscore=0 bulkscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2006020117 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9640 signatures=668686 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 priorityscore=1501 mlxscore=0 lowpriorityscore=0 suspectscore=0 malwarescore=0 clxscore=1015 adultscore=0 mlxlogscore=999 cotscore=-2147483648 phishscore=0 bulkscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2006020117 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 40968 Cc: 40968@debbugs.gnu.org, Stefan Kangas , Noam Postavsky X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > I think there's consensus, then.=20 FTR, FWIW: Not a consensus that includes me. I'm in favor of making an incompatible change, to align Emacs with Common Lisp's more reasonable behavior. As I said: Common Lisp is unequivocally in the camp of requiring at least two args. And if Elisp follows that (which I think it should, unless someone can present a good use case for just (apply FUNCTION)), then it should raise an error if there are not at least two args. The only good case presented was to say that this would be an incompatible change. Yes, it would, and we should make it. If you want to, temporarily, issue a compile-time and runtime warning, instead of raising an error, OK. But Emacs should wean code and users off of the undesirable (IMO) behavior that's been allowed. The doc should be changed to discourage such use, and users should be warned that it's deprecated. Just one, non-consensual, opinion. From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 02 12:37:19 2020 Received: (at 40968) by debbugs.gnu.org; 2 Jun 2020 16:37:19 +0000 Received: from localhost ([127.0.0.1]:40781 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jg9uh-0001mh-K5 for submit@debbugs.gnu.org; Tue, 02 Jun 2020 12:37:19 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57378) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jg9ud-0001mQ-Pb for 40968@debbugs.gnu.org; Tue, 02 Jun 2020 12:37:19 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:47966) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jg9uY-0001pQ-7K; Tue, 02 Jun 2020 12:37:10 -0400 Received: from [176.228.60.248] (port=1699 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jg9uX-00017j-Ex; Tue, 02 Jun 2020 12:37:10 -0400 Date: Tue, 02 Jun 2020 19:36:52 +0300 Message-Id: <83sgfdctln.fsf@gnu.org> From: Eli Zaretskii To: Pip Cet In-Reply-To: (message from Pip Cet on Tue, 2 Jun 2020 07:36:26 +0000) Subject: Re: bug#40968: 28.0.50; (apply nil) References: <874kssm04d.fsf@gmail.com> <6ADF0807-7EBD-4054-8579-4D9AD3065D51@acm.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 40968 Cc: mattiase@acm.org, 40968@debbugs.gnu.org, stefan@marxist.se, npostavs@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Pip Cet > Date: Tue, 2 Jun 2020 07:36:26 +0000 > Cc: Noam Postavsky , Stefan Kangas , Eli Zaretskii , > 40968@debbugs.gnu.org > > +@code{apply} with a single argument is special: the first element of > +the argument, which must be a non-empty list, is called as a function > +with the remaining elements as individual arguments. Passing two or > +more arguments will be faster. This is okay, but I think the last sentence could be more explicit if reworded like this: However, we recommend always passing 2 or more arguments, as the function works faster in that case. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 02 12:44:03 2020 Received: (at 40968) by debbugs.gnu.org; 2 Jun 2020 16:44:03 +0000 Received: from localhost ([127.0.0.1]:40789 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jgA1D-0001xM-AP for submit@debbugs.gnu.org; Tue, 02 Jun 2020 12:44:03 -0400 Received: from eggs.gnu.org ([209.51.188.92]:58326) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jgA1C-0001wm-FI for 40968@debbugs.gnu.org; Tue, 02 Jun 2020 12:44:02 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:48010) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jgA16-0003T5-H4; Tue, 02 Jun 2020 12:43:56 -0400 Received: from [176.228.60.248] (port=2115 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jgA15-0001Xk-VI; Tue, 02 Jun 2020 12:43:56 -0400 Date: Tue, 02 Jun 2020 19:43:38 +0300 Message-Id: <83pnahctad.fsf@gnu.org> From: Eli Zaretskii To: Drew Adams In-Reply-To: (message from Drew Adams on Tue, 2 Jun 2020 09:32:04 -0700 (PDT)) Subject: Re: bug#40968: 28.0.50; (apply nil) References: <874kssm04d.fsf@gmail.com> <6ADF0807-7EBD-4054-8579-4D9AD3065D51@acm.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 40968 Cc: mattiase@acm.org, 40968@debbugs.gnu.org, stefan@marxist.se, npostavs@gmail.com, pipcet@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Drew Adams > Cc: Stefan Kangas , 40968@debbugs.gnu.org, > Noam Postavsky > > Common Lisp is unequivocally in the camp of > requiring at least two args. We will not require minimum 2 args because that would be backward incompatible. I'm quite sure I already said that before. From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 02 13:10:30 2020 Received: (at 40968) by debbugs.gnu.org; 2 Jun 2020 17:10:30 +0000 Received: from localhost ([127.0.0.1]:40819 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jgAQn-0002b8-VC for submit@debbugs.gnu.org; Tue, 02 Jun 2020 13:10:30 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:44540) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jgAQl-0002at-T4 for 40968@debbugs.gnu.org; Tue, 02 Jun 2020 13:10:28 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 052H84Es085749; Tue, 2 Jun 2020 17:10:19 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=9QcDiMGEWhAg9zthh41aXZG0KOppYseUv6CoUKbRsG8=; b=wAy00n1NULfKXExBzchnfGKCcCUIHCCnwFOCoCaskPdwHeByy0whv/CkhAcosTM0rorw 6ptpGKLr0oTiPupdjQAQDjndASreRwxpy1fqQrSdyZID/VLP3G293E2eLrKmTJyY509J /gjH2CWFejfOkyEflxoFUZY8AVn2TGp9e7sBqNLTiJjNIma1BblePz1HZv1ZO+/tSdtN 9rL3s9oWGB+IyU61Q2X6Xi2x2huPWre06PhPFIlIuLeXvdcitMOHGcvvW2/GrirQxjj3 p+a6MfNoR/z5NK9maa9BH7aigZyPjezHHbpCAxu87ODLL37mvli5NVCirHCkK2WEIHN4 dA== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by userp2120.oracle.com with ESMTP id 31dkruj7mp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 02 Jun 2020 17:10:19 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 052H81jI133990; Tue, 2 Jun 2020 17:10:18 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserp3020.oracle.com with ESMTP id 31c25pgv8b-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 02 Jun 2020 17:10:18 +0000 Received: from abhmp0003.oracle.com (abhmp0003.oracle.com [141.146.116.9]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 052HAFPQ015118; Tue, 2 Jun 2020 17:10:15 GMT MIME-Version: 1.0 Message-ID: Date: Tue, 2 Jun 2020 10:10:09 -0700 (PDT) From: Drew Adams To: Eli Zaretskii , Drew Adams Subject: RE: bug#40968: 28.0.50; (apply nil) References: <> <> <> <<874kssm04d.fsf@gmail.com>> <<6ADF0807-7EBD-4054-8579-4D9AD3065D51@acm.org>> <> <> <<83pnahctad.fsf@gnu.org>> In-Reply-To: <<83pnahctad.fsf@gnu.org>> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.5005.0 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9640 signatures=668686 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 suspectscore=0 spamscore=0 malwarescore=0 bulkscore=0 mlxscore=0 phishscore=0 mlxlogscore=939 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2006020123 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9640 signatures=668686 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 priorityscore=1501 mlxscore=0 lowpriorityscore=0 suspectscore=0 malwarescore=0 clxscore=1015 adultscore=0 mlxlogscore=981 cotscore=-2147483648 phishscore=0 bulkscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2006020123 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 40968 Cc: mattiase@acm.org, 40968@debbugs.gnu.org, stefan@marxist.se, npostavs@gmail.com, pipcet@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > We will not require minimum 2 args because that would be backward > incompatible. I'm quite sure I already said that before. Yes, you did, as I indicated: "The only good case presented was to say that this would be an incompatible change." In expressing my non-inclusion in the purported "consensus", that's all I did. And "because XYZ would be backward incompatible" has not stopped Emacs from sometimes breaking backward compatibility. That's a good reason, as I said, but there are also (IMO) good reasons not to go with that one good reason. My suggestion is to not only "recommend always passing 2 or more arguments" but to issue a warning when that's not the case. And to deprecate that use (letting users know that at some point it might no longer be supported). And (IMO) the reason given to users for the recommendation shouldn't be just because ("as") "the function works faster in that case". From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 02 14:41:23 2020 Received: (at 40968) by debbugs.gnu.org; 2 Jun 2020 18:41:23 +0000 Received: from localhost ([127.0.0.1]:40949 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jgBql-0006uF-Jx for submit@debbugs.gnu.org; Tue, 02 Jun 2020 14:41:23 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:40673) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jgBqk-0006u1-03 for 40968@debbugs.gnu.org; Tue, 02 Jun 2020 14:41:22 -0400 Received: by mail-wr1-f67.google.com with SMTP id h5so4428765wrc.7 for <40968@debbugs.gnu.org>; Tue, 02 Jun 2020 11:41:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=SFrRc8znkFdVawcMwnax08Q28kuN2b3/ytlOuy6gVZ0=; b=HqhiUogh5qDxO1mA8qdzQWsc4vD6lG5oJoNvKwi/CSmbMbROt7pkjBp1FRt8wUOfeV rnzcbq7MjQ8/sgw1JaK17bKAfUyKlCLZTFTwoMNEzXvsGAlrS2Fk1pYRKTbTOkN1EaKf r9wnjSa1tTd+g5EkJeYcE2HGphFK3/rkWuY3vAhDN3z3x+Gr2Pciat8GUg9BJGUBPtLx 2iHk+aEeROebW/PQ23o64Pcb0t/X7dqfHTZLtPimFGagbuOcJbp6oddlfPHfraMDhXpF RdsPc2vDg+sRhaej5LvIUGmeW9ik+VBeT3w3rOWLkuZW17Fp9Ak+6e86ECzedpYy0zGl 0cUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=SFrRc8znkFdVawcMwnax08Q28kuN2b3/ytlOuy6gVZ0=; b=Dem75/yu8XTl+dmNPXyYhA2ap9AV7c1EKi4YO04Ukxiz/3hbzw2n/gWSL6nyQQZtue TskB3AiBB2eFXTujvAIPWFmTYD4wpJXu3AdFr9gJfDn5mQEeEoCQOMGRVT8eLESMQOoN dkP7CGzeoGpyTSSfMN3BCcXSaKAeQw3msyaItIF7NHKslxccRWwuvOilf4DJrqVrVave MF1deu92DXA8+wdvi4gIGtb8qgtwg6Hs2EcT47JTe6dCLcbIYGX/B2og1jjSrQqbpq8W 6/WC6laGZP57WnOZTcNG4GxSgGeHMOHPx9cvdVAfwmio78+NIpOgtj/9chDRwUrTWvE/ p1Vw== X-Gm-Message-State: AOAM533yvk7e0L9Tr1c72/Mw1ZM0U1f0fwyU4GVfoMgZ8adI0jfNBz7i 98G8aWhngnA5WhYZLQxxMAg= X-Google-Smtp-Source: ABdhPJxpTpNqCWWXjUwctuEo06rNz1QQQ/hdeIo17eytR9+K4/pJF/bLduthFkbs4ydN0J5uV28pTw== X-Received: by 2002:a5d:6a4b:: with SMTP id t11mr27066081wrw.404.1591123275944; Tue, 02 Jun 2020 11:41:15 -0700 (PDT) Received: from chametz ([195.206.105.217]) by smtp.gmail.com with ESMTPSA id n23sm763383wmc.21.2020.06.02.11.41.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jun 2020 11:41:15 -0700 (PDT) From: Pip Cet To: Drew Adams Subject: Re: bug#40968: 28.0.50; (apply nil) References: > > > <874kssm04d.fsf@gmail.com>> <6ADF0807-7EBD-4054-8579-4D9AD3065D51@acm.org>> > > <83pnahctad.fsf@gnu.org>> Date: Tue, 02 Jun 2020 18:41:00 +0000 In-Reply-To: (Drew Adams's message of "Tue, 2 Jun 2020 10:10:09 -0700 (PDT)") Message-ID: <87y2p5xqdf.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 40968 Cc: mattiase@acm.org, Eli Zaretskii , 40968@debbugs.gnu.org, stefan@marxist.se, npostavs@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Drew Adams writes: >> We will not require minimum 2 args because that would be backward >> incompatible. I'm quite sure I already said that before. > > Yes, you did, as I indicated: "The only good > case presented was to say that this would be > an incompatible change." > > In expressing my non-inclusion in the purported > "consensus", that's all I did. Thank you for doing so. I think it's important to have a record of whether a decision was reached by consensus or not, and I had wrongly supposed this to be a case of the former. Sorry. > My suggestion is to not only "recommend always > passing 2 or more arguments" but to issue a > warning when that's not the case. And to > deprecate that use (letting users know that at > some point it might no longer be supported). A first step towards that would be to change our existing Lisp code not to use single-argument apply, which we could do in a follow-up patch. > And (IMO) the reason given to users for the > recommendation shouldn't be just because ("as") > "the function works faster in that case". I agree. I'll make another suggestion. From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 27 11:01:31 2020 Received: (at 40968) by debbugs.gnu.org; 27 Sep 2020 15:01:31 +0000 Received: from localhost ([127.0.0.1]:50149 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kMYB9-0008HQ-28 for submit@debbugs.gnu.org; Sun, 27 Sep 2020 11:01:31 -0400 Received: from quimby.gnus.org ([95.216.78.240]:38748) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kMYB6-0008H6-Ts for 40968@debbugs.gnu.org; Sun, 27 Sep 2020 11:01:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=PMGdvXxaiD1kvpVmg7VlaHKdQ/po7BPFDLLgcWbw4yo=; b=pjp7389ze5VlqmoX+TNoLXzL+f ToRvHsHiKFr0iWhfuPQBrXIyP5H5vSroPlJ9WwrdwRGV67bHUkpHp6Y4CVcfM6v69T7s7SBRzev4c mQmIaAfMA57X9F1fQkVsk3l5fxq8NuO2/OU4nM4LaYNmkcMSKm55pIJ2FK4YfPsETfkQ=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kMYAi-0005m2-SR; Sun, 27 Sep 2020 17:01:08 +0200 From: Lars Ingebrigtsen To: Pip Cet Subject: Re: bug#40968: 28.0.50; (apply nil) References: <874kssm04d.fsf@gmail.com> <6ADF0807-7EBD-4054-8579-4D9AD3065D51@acm.org> X-Now-Playing: Grace Jones's _Private Life: The Compass Point Sessions (2)_: "Nightclubbing" Date: Sun, 27 Sep 2020 17:01:03 +0200 In-Reply-To: (Pip Cet's message of "Tue, 2 Jun 2020 07:36:26 +0000") Message-ID: <87imbz1cy8.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Pip Cet writes: > * src/eval.c (Fapply): Handle (apply nil) without crashing. > Document single-argument form. > * lisp/emacs-lisp/byte-opt.el (byte-optimize-apply): Don't attempt > to optimize single-argument apply. [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 40968 Cc: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= , Eli Zaretskii , Stefan Kangas , 40968@debbugs.gnu.org, Noam Postavsky X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Pip Cet writes: > * src/eval.c (Fapply): Handle (apply nil) without crashing. > Document single-argument form. > * lisp/emacs-lisp/byte-opt.el (byte-optimize-apply): Don't attempt > to optimize single-argument apply. > * doc/lispref/functions.texi (Calling Functions): Document > single-argument apply. Provide example. It looked like most everybody was in agreement with this patch, and it fixes the (apply nil) crash, so I've applied it to Emacs 28 now. There was some followup on the details of the documentation, with several suggested patches, and now that this is on the trunk, people can go ahead and tweak it as they like, and I'm closing this bug report. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 27 11:01:24 2020 Received: (at control) by debbugs.gnu.org; 27 Sep 2020 15:01:24 +0000 Received: from localhost ([127.0.0.1]:50146 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kMYB1-0008H7-Ot for submit@debbugs.gnu.org; Sun, 27 Sep 2020 11:01:24 -0400 Received: from quimby.gnus.org ([95.216.78.240]:38746) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kMYB0-0008Gt-De for control@debbugs.gnu.org; Sun, 27 Sep 2020 11:01:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=ExnIlzGGx4+9kxzpllpDJsBkTf2Zjl/U+NSxdhwF3Wo=; b=chcZxM1yRK1GA2OT6Ao48yZOv9 7XQRucZecJ5KfFmJGzF4Lnj4blBTA3ZvYyOVbQsUdidC39Y3Ic3MrklIi/8GGAJss/kUApSLnw1Io 6ocXDOXsGy1mM3N3V/Ukf2SwOW150xmi6sDsT9Qdd1z1NRtTVK9WPSBfl6gnmOVg0mN0=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kMYAs-0005mJ-96 for control@debbugs.gnu.org; Sun, 27 Sep 2020 17:01:16 +0200 Date: Sun, 27 Sep 2020 17:01:13 +0200 Message-Id: <87h7rj1cxy.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #40968 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 40968 fixed close 40968 28.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 40968 fixed close 40968 28.1 quit From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 27 15:30:19 2020 Received: (at 40968) by debbugs.gnu.org; 27 Sep 2020 19:30:19 +0000 Received: from localhost ([127.0.0.1]:50490 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kMcNH-00028Q-41 for submit@debbugs.gnu.org; Sun, 27 Sep 2020 15:30:19 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:35606) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kMcNE-00028B-Rz for 40968@debbugs.gnu.org; Sun, 27 Sep 2020 15:30:17 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08RJTv2D070133; Sun, 27 Sep 2020 19:30:06 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=zl1h4iIa58FZMlZ+r2XHx9z/gLPg9RzyPlA8tnHiO0M=; b=crVke7FtfalGg3p/oy0pHkTIir1sDPf+4566SGc3ZoFWrGpBwQthj8CKh1i1s7n9Y4JV VWs51vI8PVTN02lEEJHoHkov57RP4kDTH8PT7PUJYTa7ii2GsH34FJH58UIA8MvEc2LS kts3peWs09ba2W7/5JYx53CUPgimd1WFIumGhtQXgGnC8mEzRIsXGV9mAiGaUpHkxNsW xY2wCsoPQ8OlUfVvp/V/frdtJpF/koTNy0iA/RmNsWicieR3fVcZvnX4CiOD74WJ+L1s NuDG25dvSibpKGT2XXFQ2SNQjtQ3dg2Mz2ROvRoN08U7z0rAZj/q9FHibWALVkAYWD9P bw== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by userp2120.oracle.com with ESMTP id 33sx9mtay8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Sun, 27 Sep 2020 19:30:06 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08RJPqjl094732; Sun, 27 Sep 2020 19:28:06 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userp3030.oracle.com with ESMTP id 33tfjtwmac-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 27 Sep 2020 19:28:06 +0000 Received: from abhmp0006.oracle.com (abhmp0006.oracle.com [141.146.116.12]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 08RJS2mU020400; Sun, 27 Sep 2020 19:28:02 GMT MIME-Version: 1.0 Message-ID: Date: Sun, 27 Sep 2020 12:28:01 -0700 (PDT) From: Drew Adams To: Lars Ingebrigtsen , Pip Cet Subject: RE: bug#40968: 28.0.50; (apply nil) References: <874kssm04d.fsf@gmail.com> <6ADF0807-7EBD-4054-8579-4D9AD3065D51@acm.org> <87imbz1cy8.fsf@gnus.org> In-Reply-To: <87imbz1cy8.fsf@gnus.org> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.5056.0 (x86)] Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9757 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 spamscore=0 mlxscore=0 phishscore=0 adultscore=0 bulkscore=0 mlxlogscore=865 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009270184 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9757 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=880 suspectscore=0 phishscore=0 mlxscore=0 lowpriorityscore=0 adultscore=0 clxscore=1011 spamscore=0 impostorscore=0 malwarescore=0 bulkscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009270185 X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 40968 Cc: =?iso-8859-1?B?TWF0dGlhcyBFbmdkZWflcmQ=?= , Stefan Kangas , 40968@debbugs.gnu.org, Noam Postavsky X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.8 (---) > It looked like most everybody was in agreement with this patch, and it > fixes the (apply nil) crash, so I've applied it to Emacs 28 now. >=20 > There was some followup on the details of the documentation, with > several suggested patches, and now that this is on the trunk, people can > go ahead and tweak it as they like, and I'm closing this bug report. Emacs Lisp should follow Common Lisp wrt `apply' behavior. `apply' is pretty central to Lisp, and Common Lisp is a better spec for what Lisp is than Emacs Lisp is. Lots of discussion has gone into every Common Lisp design decision. That doesn't mean its design is perfect, of course. But in the case of `apply' Emacs should follow CL. (Just one outlier opinion.) From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 28 23:00:31 2020 Received: (at 40968) by debbugs.gnu.org; 29 Sep 2020 03:00:31 +0000 Received: from localhost ([127.0.0.1]:54481 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kN5sV-0004WE-06 for submit@debbugs.gnu.org; Mon, 28 Sep 2020 23:00:31 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:50178) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kN5sQ-0004W0-Sv for 40968@debbugs.gnu.org; Mon, 28 Sep 2020 23:00:29 -0400 Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id C1418100271; Mon, 28 Sep 2020 23:00:20 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 6F2EF100227; Mon, 28 Sep 2020 23:00:19 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1601348419; bh=6kmoEGDoWz+MZQdfKN+gB9jmTAUrjfXqhR8t7bei+bk=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=UoP/Hk3b6H0D4y3XgL+7dKxBnkEhtomWzYEWCFUwrhKnL1cPJxLlCeWpm9czF6iFG OpE3IrMHbSrO4ERmQCo56gR8T6lSOBentbnxCrfXTtydnK2IF3l7PRfoA5poDu3p2P YdkndWe/+kvamlk8c1+nEqlPl53oaKWrbOtCYHoPErSBhkBr06VDLcYDPYwdJUleRR vzeUpXSKxc8P3xmufu18orFQzJwZlRmcLcFHaVjUfkX3NyPjtgeiLN70Sx7zpb2pOR qdAby6D/AlCCQQy0jij/UPO+O3/J5iDMKEtkP3NkDuDGyP5G8pNmiAaIRdsHXKwy4S i3lwt1SvNG37g== Received: from alfajor (unknown [45.72.232.131]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 1818A12024D; Mon, 28 Sep 2020 23:00:19 -0400 (EDT) From: Stefan Monnier To: Pip Cet Subject: Re: bug#40968: 28.0.50; (apply nil) Message-ID: References: Date: Mon, 28 Sep 2020 23:00:18 -0400 In-Reply-To: (Pip Cet's message of "Wed, 6 May 2020 07:26:36 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.054 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 40968 Cc: 40968@debbugs.gnu.org, Stefan Kangas X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > as implying that (apply FUNCTION) is equivalent to (funcall FUNCTION) I think the current half-broken semantics is a fairly natural generalization: (apply ... ARGS) is equivalent to (funcall ... ,@ARGS) so when `...` is empty it means that (apply ARGS) should be equivalent to (funcall ,@ARGS) aka (apply (car ARGS) (cdr ARGS)) When ARGS is the empty list we should probably signal an error (just like (apply (car ARGS) (cdr ARGS)) would, BTW). Stefan From unknown Sun Jun 22 03:55:49 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 27 Oct 2020 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator