From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jim Porter Newsgroups: gmane.emacs.devel Subject: Re: continuation passing in Emacs vs. JUST-THIS-ONE Date: Tue, 14 Mar 2023 11:58:53 -0700 Message-ID: <1c6fedae-10b4-5d97-5036-eaa736e1b816@gmail.com> References: <627090382.312345.1678539189382@office.mailbox.org> <87sfe7suog.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29923"; mail-complaints-to="usenet@ciao.gmane.io" Cc: monnier@iro.umontreal.ca To: Karthik Chikmagalur , Thomas Koch , "emacs-devel@gnu.org" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Mar 14 19:59:27 2023 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 1pc9rq-0007cQ-OX for ged-emacs-devel@m.gmane-mx.org; Tue, 14 Mar 2023 19:59:26 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pc9rM-0003If-Au; Tue, 14 Mar 2023 14:58:56 -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 1pc9rL-0003IT-Hk for emacs-devel@gnu.org; Tue, 14 Mar 2023 14:58:55 -0400 Original-Received: from mail-pj1-x1031.google.com ([2607:f8b0:4864:20::1031]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pc9rK-00081Y-2O for emacs-devel@gnu.org; Tue, 14 Mar 2023 14:58:55 -0400 Original-Received: by mail-pj1-x1031.google.com with SMTP id f6-20020a17090ac28600b0023b9bf9eb63so7864266pjt.5 for ; Tue, 14 Mar 2023 11:58:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678820332; h=content-transfer-encoding:in-reply-to:cc:from:references:to :content-language:subject:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=8VF0Ib+TnbGj3iYVJz5rtFzduHm0QrtcrxCvEOET2D4=; b=qGNtQwLYb2Giz5mbDY64fKfi7T3dq1XjI/M83e4OGVnB7SczoRGfP4YkXPV4jTsDYI m6sWjcoszcJRwE09X3dpWaM0Ce3zWFTiSVErfgiyrf1TxKvf5shoL8wkCDiMM4BRNIzh +MS6LQp4wX2slE4cThvHbmn721g81nnRv4mordOgW7mAirumBpM3XzjMYUDyLu6OhL10 DOslYT2f8J7mQ3F65ZY1TGqk1udpMUaUnwticvyl3P0O/QZ7vGpuLmAHeI2yT3Tsssyf 1kE5jLx1XDYUADFoQ1WKqzL5dYFqoiH/cWcqRcXHoo5u1B4BLNqzbGQ+XOMcc546XYgf DvMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678820332; h=content-transfer-encoding:in-reply-to:cc:from:references:to :content-language:subject:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=8VF0Ib+TnbGj3iYVJz5rtFzduHm0QrtcrxCvEOET2D4=; b=L8Ci2FKxAkZxh6o8ppw64XI8ud01H9IzcLQ3OsRw3ZnkB6jMa7oPgYNDVZKHg6vzVA djM/yNuySbr0Mn468gR3gJp18gECdDVNH19MUzU/8L8/KjYEC8yR77uZCyrv+5P923CX nDnqhw1aTVRLni08nJjOSv9pXh1D0V65q9+pJp7C9FV7Lx+gYHgnzeFk7YYgl4Awonbj N9Z65XjicoglVjlT9iU7dV7dG2pYclmaj5+zNcZca4oztqa7aOsoZ7RXWoLpwhY82+/C QzbGd2W+L69ooktnJm28AWpbIxUZaxp3GLYdOQjFQ35gMjhB5V3fn9hMG3js/69MBxbU jysg== X-Gm-Message-State: AO0yUKUwzVXG3KMDv1R24Ti7XBE9a9sIlb4NfVNSWeZbdB0az7X1uz+9 zyeHLyqysSW3oNgaTGWn9Sw= X-Google-Smtp-Source: AK7set/0drXIzkIsX21vhUDSiXdT+tTRPj7TaIBv/6MvqN/9YvHzEw4rayIUVGyyK9aTeCAmToMt3w== X-Received: by 2002:a05:6a21:788b:b0:cb:77f0:9a27 with SMTP id bf11-20020a056a21788b00b000cb77f09a27mr44043219pzc.24.1678820332433; Tue, 14 Mar 2023 11:58:52 -0700 (PDT) Original-Received: from [192.168.1.2] (cpe-76-168-148-233.socal.res.rr.com. [76.168.148.233]) by smtp.googlemail.com with ESMTPSA id q25-20020a62e119000000b005d6999eec90sm1947583pfh.120.2023.03.14.11.58.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 14 Mar 2023 11:58:52 -0700 (PDT) Content-Language: en-US In-Reply-To: <87sfe7suog.fsf@gmail.com> Received-SPF: pass client-ip=2607:f8b0:4864:20::1031; envelope-from=jporterbugs@gmail.com; helo=mail-pj1-x1031.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-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:304458 Archived-At: On 3/13/2023 11:39 PM, Karthik Chikmagalur wrote: >> It would probably be reasonable to add a more asynchronous-oriented way >> of working with generator.el's CPS machinery, but I think the bigger >> problem is just the time to fix existing code that's not doing the right >> thing. > > What needs to be fixed in generator.el for this? I was thinking something like the emacs-aio library you mentioned, actually. It's less that generator.el is broken (I don't think it is, at least), and more that it's not the interface I'd use for writing asynchronous code. That said, something that looks like emacs-aio might not be the best answer either; it will probably take some experimentation to see what would be most usable (and what would have acceptable performance). I seem to recall that Stefan Monnier (CCed) mentioned having some WIP code to make generator.el easier to use for asynchronous code...