GNU social JP
  • FAQ
  • Login
GNU social JPは日本のGNU socialサーバーです。
Usage/ToS/admin/test/Pleroma FE
  • Public

    • Public
    • Network
    • Groups
    • Featured
    • Popular
    • People

Conversation

Notices

  1. Embed this notice
    screwlisp (screwtape@mastodon.sdf.org)'s status on Thursday, 09-Jan-2025 16:48:51 JST screwlisp screwlisp

    (defmacro lets ((&rest substs) &body body)
    "Did someone write let-but-its-substs already? #commonLisp #macro #programming "
    (loop
    :for body1 := body :then body2
    :for body2
    :=
    (loop
    :for new-body := body1
    :then (subst new old new-body :test 'equal)
    :for (old new) :in substs
    :finally (return new-body))
    :when (equal body1 body2)
    :return (append '(progn) body1)))

    In conversation about a year ago from mastodon.sdf.org permalink
    • Embed this notice
      screwlisp (screwtape@mastodon.sdf.org)'s status on Friday, 10-Jan-2025 04:46:30 JST screwlisp screwlisp
      in reply to
      • Svante

      @Ardubal that's what I thought too.

      Then I floundered with macroexpand-1 a bit, and thought maybe I just wanted a conventional macro that does substs on body. Otherwise I would have to think about the read-table

      Interestingly this means the left half doesn't have to be a symbol.

      In conversation about a year ago permalink
    • Embed this notice
      Svante (ardubal@mastodon.xyz)'s status on Friday, 10-Jan-2025 04:46:31 JST Svante Svante
      in reply to

      @screwtape I am not sure, but all the use cases that I can think of here could probably be handled by macrolet and symbol-macrolet.

      In conversation about a year ago permalink

Feeds

  • Activity Streams
  • RSS 2.0
  • Atom
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.