From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Okamsn Newsgroups: gmane.emacs.devel Subject: Re: Adding package "Loopy" to Non-GNU Devel? Date: Thu, 22 Feb 2024 03:20:18 +0000 Message-ID: References: <871ec398-df6a-44a1-a149-d0014f99b756@protonmail.com> <87wmqz1rr7.fsf@posteo.net> 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="16041"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Philip Kaludercic Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Feb 22 07:16:22 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rd2NX-0003ql-Ue for ged-emacs-devel@m.gmane-mx.org; Thu, 22 Feb 2024 07:16:19 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rd2Mp-0006QQ-H8; Thu, 22 Feb 2024 01:15:35 -0500 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 1rczdf-0004oF-Tm for emacs-devel@gnu.org; Wed, 21 Feb 2024 22:20:48 -0500 Original-Received: from mail-40134.protonmail.ch ([185.70.40.134]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rczdd-0003zN-Gr for emacs-devel@gnu.org; Wed, 21 Feb 2024 22:20:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1708572039; x=1708831239; bh=zhnqgG5njLNMcKKzsRWBQR3/J5SPIj1M9IB97IYp+SA=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=KBf/I9QSa7yUYwG/ciqG1KEtSepJiMwq4MsSfwn0afhozuLq/2abdEvSWVkbDYUin XeqcNNHv1nJ3ybBTtt78ltAB9q6LXlh1pXZNfMtyLHxcYpcCH1LKdLxKVM3VF9UwLb UcNnHzsQI44aYzmAoOXrDU0oHXV1T6Pqq570XQQDg0f88FmGiVJsYPlmMQzmDz2n4E fPtDITQsmo2fW6yNv0Dj0/mjENvFEU6tNMFYfhC1FjVsG+m6YlCvOEdngLkxiAQMnu 5MKCjXTnWw4TZlQwyHIqvirFsFe10EpbVRtGYj5G5OaLyfazDUutUlJApjhaLa3vGi AUlkcvL8NZPoA== In-Reply-To: <87wmqz1rr7.fsf@posteo.net> Feedback-ID: 25935600:user:proton Received-SPF: pass client-ip=185.70.40.134; envelope-from=okamsn@protonmail.com; helo=mail-40134.protonmail.ch 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_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Thu, 22 Feb 2024 01:15:28 -0500 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:316437 Archived-At: Philip Kaludercic wrote: > Okamsn writes: >=20 >> Hello, >> >> I am the author of the package "loopy", which provides macros similar to >> ~cl-loop~ and Common Lisp's =3Diterate=3D. It is located here: >> >> https://github.com/okamsn/loopy >=20 > (Obligatory question here, as to why we don't also name the package > iterate?) To be clear, Loopy isn't a copy of Iterate. I originally set out to make=20 a more featureful version of something like `cl-loop` and learned about=20 Iterate the first time I asked that Loopy be added to MELPA=20 (https://github.com/melpa/melpa/pull/7253). Note that Loopy is much=20 improved since that discussion. The macro for embedding the loop constructs in arbitrary code (see my=20 previous e-mail for an example) I called `loopy-iter`, because I learned=20 about the idea from Iterate (and because naming is hard), but it was=20 written a few months after that MELPA discussion. >> - Better destructuring than =3Dcl-lib=3D, in that it can destructure arr= ays and >> supports destructuring in accumulations (like ~collect~) as well as = in >> iteration. I recently added a Pcase pattern for this outside of the >> ~loopy~ macro. >> >> #+begin_src emacs-lisp >> ;; =3D> (8 10 12 14 16 18) >> (loopy (list list-elem '(([1 2 3] [4 5 6]) >> ([7 8 9] [10 11 12]))) >> (sum ([sum1 sum2 sum3] [sum4 sum5 sum6]) >> list-elem) >> (finally-return sum1 sum2 sum3 sum4 sum5 sum6)) >> #+end_src >=20 > Where is pcase being used here? It is being use underneath, via `pcase-compile-patterns` on modern=20 Emacs. Previously, I was using custom functions to destructure the=20 value. I am currently making an effort to simplify the package by=20 removing the (then- or now-) re-invented wheels. The Pcase pattern can be used directly in `pcase`: #+begin_src emacs-lisp ;; =3D> (1 2 3 ;; 4 5 t ;; (:k1 111 :k2 222) ;; 111 t ;; 222 ;; 111 ;; 333 nil ;; 4444 5555) (pcase (list 1 2 3 4 5 :k1 111 :k2 222) ((loopy ( a b c &optional d (e nil e-supplied) &rest r &key ((:k1 k1) nil k1-supplied) k2 &map (:k1 map1) [:k3 map3 333 map3-supplied] &aux [x1 4444] (x2 5555))) (list a b c d e e-supplied r k1 k1-supplied k2 map1 map3 map3-supplied x1 x2))) #+end_src See the file `loopy-destructure.el` for its current implementation. >> I am asking about Non-GNU Devel instead of just the normal Non-GNU archi= ve >> because I am still making breaking changes to the package as I reduce >> duplication and improve on the ideas, but those changes are coming less >> frequently now. >=20 > If you want to prevent a package from being released, you just need to > make sure keep some negative version suffix like -rc in the version tag. Would the workflow be to commit a change to increase the stable-version=20 number and then to commit another change to change the version number to=20 one with an "-rc" suffix to continue development? > But in general, I wouldn't advise regarding NonGNU ELPA devel as a > proper package archive for users, but more as a preview for developers > to see how the ELPA build server is processing your package. Or that is > at least my take. OK. Thank you for the explanation. >> Is it possible to add this package and the extension package to the arch= ive? >> >> I keep the extension package in the same GitHub repo as the main package= for >> testing purposes. The Dash functionality was requested by a user, but >> Dash is >> not used by the rest of the package. Because of that, I put the Dash >> functionality in a small separate package. >=20 > You are talking about the loopy-dash.el file in the same branch, right? Yes. > If possible, it would be better if you could at least maintain it in a > separate branch. If I added the file "loopy-dash.el" to an ".elpaignore" file in the main=20 branch and used GitHub Actions to push any changes from the main branch=20 to another branch containing the file "loopy-dash.el", would that be=20 acceptable?