From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.tangents Subject: Re: [External] : Re: Shrinking the C core Date: Sun, 17 Sep 2023 21:34:24 +0700 Message-ID: References: <87cyyje7hh.fsf@dataswamp.org> <871qezdw6a.fsf@dataswamp.org> <87h6ntcdt5.fsf@dataswamp.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31977"; mail-complaints-to="usenet@ciao.gmane.io" To: emacs-tangents@gnu.org Original-X-From: emacs-tangents-bounces+get-emacs-tangents=m.gmane-mx.org@gnu.org Sun Sep 17 16:34:53 2023 Return-path: Envelope-to: get-emacs-tangents@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qhsrN-00085X-Cx for get-emacs-tangents@m.gmane-mx.org; Sun, 17 Sep 2023 16:34:53 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qhsrE-0000LQ-IP; Sun, 17 Sep 2023 10:34:44 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qhsrB-0000HP-5v for emacs-tangents@gnu.org; Sun, 17 Sep 2023 10:34:41 -0400 Original-Received: from mail-vs1-xe35.google.com ([2607:f8b0:4864:20::e35]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qhsr7-0002bi-NK for emacs-tangents@gnu.org; Sun, 17 Sep 2023 10:34:39 -0400 Original-Received: by mail-vs1-xe35.google.com with SMTP id ada2fe7eead31-452664bba1dso5265137.2 for ; Sun, 17 Sep 2023 07:34:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1694961276; x=1695566076; darn=gnu.org; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=hSMM7SbN6ZP0doNYt0X0v4VSJEJ3qKiRPCOOqzG1iLI=; b=c0l97GxcBp5uc1jl+rnya3s7pq1mJ+YqH9jYbjjajQDRynPbyB5NeMhDHVkzpQEJE9 9PSmwrseObdRRWUbuzoE65IQs3HJocsVb4Pt4gPoMX0QmTa3hbU8yw1oF1EyvVf5O1wS sVfOwKCRpsonM2iRrW41aRYgFE7Qumn6y/maCS68Xm6Ea2Q45EfGw1xfBtK7T9Qeum1S xf1RH+jRJjFizyzJL9YRGr+CWUzxKe5Oq3OYa7sTyzUGJoXiQhPtL7ihEHKt3tQ+6ukh x4kpZCbYxkxkTsr6urx5aTEHQ/zU42HIfSh/5c2azhzT/tP783KsXsitEkfMY54lGZ2B 2g0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694961276; x=1695566076; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hSMM7SbN6ZP0doNYt0X0v4VSJEJ3qKiRPCOOqzG1iLI=; b=kxRfeqxrlpwduG5m93tMMFK9sdJW9tn7hzMpzF9Bou4MfHCWJN59GC+sCnAVbE/yig 2ndTm/akaxsROAoFdxbJSm1naUj+gc7oQn/AH7o6zeWdPhk6IWf84xYt2NDCALgqPgYg r4IQLUGJOwYIFbvnA8peRzmN3yP+i9CWoh4ua48nfT2GnOiP2JfxRXpraor3uLQxQYI5 HyfnI0vGDtfUpli5vqeim8rpr+2Q6gN9ISdRE8hBo8j4foeEIKoJTaNklz2kz8y2Vuim nUHkLeYolgfhu0hM/SXTcCcVKmcVs/WlDleXjpJJUO1AyP5l6EFcvZ4G94z/RXRllPAk VCrQ== X-Gm-Message-State: AOJu0YyMwnYKYgelUL5x/gBICT/f4RMcRMxyQQu1zTv6WOcWOSvrcEif dDq2ONb/UUdpNN0rKZHhzHpYjDwQrJ8ItgpG+YKhngVk X-Google-Smtp-Source: AGHT+IFjeHD+AQ+M4/JCuZSXq12YF9sKqEHI4XIJ7IaQE0GjB4zOw8pvo3Wp6aqden3yVOy6cr0oXlN2Nw5LrIeqr9E= X-Received: by 2002:a05:6102:3bcb:b0:44d:5104:ff2c with SMTP id a11-20020a0561023bcb00b0044d5104ff2cmr3345161vsv.26.1694961275834; Sun, 17 Sep 2023 07:34:35 -0700 (PDT) In-Reply-To: <87h6ntcdt5.fsf@dataswamp.org> Received-SPF: pass client-ip=2607:f8b0:4864:20::e35; envelope-from=yurivkhan@gmail.com; helo=mail-vs1-xe35.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-tangents@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Emacs news and miscellaneous discussions outside the scope of other Emacs mailing lists List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-tangents-bounces+get-emacs-tangents=m.gmane-mx.org@gnu.org Original-Sender: emacs-tangents-bounces+get-emacs-tangents=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.tangents:1099 Archived-At: On Sun, 17 Sept 2023 at 17:46, Emanuel Berg wrote: > For example, (+ ...), (- ...) etc are preferable to > (arithmetic :operation 'addition ...), > (arithmetic :operation 'subtraction ...) etc. Let=E2=80=99s reframe that in more real-life examples. What is preferable a= nd why: 1. a couple of functions a. =E2=80=98(my-sort-by SEQ LESSP)=E2=80=99 where LESSP is a function ac= cepting two elements X and Y and returning =E2=80=98t=E2=80=99 when X should be sorted = before Y, and b. =E2=80=98(my-sort-on SEQ KEY)=E2=80=99 where KEY is a function accept= ing an element X and returning a number such that sorting by that number yields the desired order; or 2. a single function that could be called as =E2=80=98(my-sort SEQ :by LESS= P)=E2=80=99 or =E2=80=98(my-sort SEQ :key KEY)=E2=80=99, with the same semantics as abo= ve? Does your answer change if we want to extend the API to also support sorting in descending order? If it does, how?