From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id qMfVLXGQ2GEu1gAAgWs5BA (envelope-from ) for ; Fri, 07 Jan 2022 20:11:45 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id eN0+KnGQ2GFUHAAAauVa8A (envelope-from ) for ; Fri, 07 Jan 2022 20:11:45 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 222AA27B0E for ; Fri, 7 Jan 2022 20:11:45 +0100 (CET) Received: from localhost ([::1]:34822 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n5ueN-0006pt-Gu for larch@yhetil.org; Fri, 07 Jan 2022 14:11:43 -0500 Received: from eggs.gnu.org ([209.51.188.92]:39784) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n5uRB-0000g8-4G for emacs-orgmode@gnu.org; Fri, 07 Jan 2022 13:58:05 -0500 Received: from [2607:f8b0:4864:20::132] (port=37833 helo=mail-il1-x132.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n5uR9-0007PQ-Hh for emacs-orgmode@gnu.org; Fri, 07 Jan 2022 13:58:04 -0500 Received: by mail-il1-x132.google.com with SMTP id 2so1157217ilj.4 for ; Fri, 07 Jan 2022 10:58:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version:content-transfer-encoding; bh=o4OZO+DtQ0/ANEcpfZNPuGGmbY/pBZsksrvfW58mswo=; b=Gs0hfa1Yh2htVkMGzlfUD7286l1ZBf+1aACq+wFNcT1NctsDJPtaRc8vmF8UggvxCN sbOzxBVhgyE1gQOM+7QZc5AEmkNTqsa1cxC88YNmxhkQ+zobCCOuQEuYLaQ2yeR4i5+W 9gAfxt0pzo23K5ufCJ/sNiJF6DJnIsyozb1M54R0poeSKuASPoh8c8S7LOmRKG60k9zK DaPVFBCPlALQR8SN9oBmZT4RfF8fl8BX3aQ1zvEa4Oj1Z+8Dbh/teHVN+oUfr2pbhiG4 Q3574CMgkE1bofsa3kywtDvE6yPM0chsjwrEGZhyyweW56YXI07Pn9Rrza5DyECp8pXj ePXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version:content-transfer-encoding; bh=o4OZO+DtQ0/ANEcpfZNPuGGmbY/pBZsksrvfW58mswo=; b=wGozkAsUzIPF2eGNFyGUlm5Vcu5/yJp32fwM6WlBB3/yIP+hTSDHz8wBU+sa9UkLzx sKVBeqydoZQQzgO7TNl1G6yscsd0mm/gTGYwSJvz5lDkNBhBe8KGDYX14pZj9CxmpTu/ qDbiXzwUr4lzE6OQw+IO1fDCzt8RY7xxO/nYJUJN6V76P8l/x37ph1CY1ZNa2Cs3fb3D AGhhZwjlMSjTXERdTbf9AKtxfByi9MPVuMiAGJuSiPah6FwOZhg/EGQ+r2NOcNdmLQDV yDz+e/MZqsWiMYL2sWFkqLGoCji0+R99VPbSTvJod+d7K0sBhJEEVsUsCyoJuUNxtXOr YOnQ== X-Gm-Message-State: AOAM53292YSuOUKHDhO00i+PzLyQz9L0/WbraBvN9TuC96k3CPb4Quv7 YZK02bIY2aqynY3GcdTN3iUi9NnLzrY= X-Google-Smtp-Source: ABdhPJygbWYJz69oJcmM7zrsHMD2A6AXTxSDaHWdDjtbJFfnJuZboBHa2vZA3c70+WBr7Jd3G59hDA== X-Received: by 2002:a05:6e02:1c27:: with SMTP id m7mr31047633ilh.114.1641581881991; Fri, 07 Jan 2022 10:58:01 -0800 (PST) Received: from entropy ([2601:241:8c80:25a0::22a4]) by smtp.gmail.com with ESMTPSA id n10sm2538107ioz.17.2022.01.07.10.58.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jan 2022 10:58:01 -0800 (PST) References: <87o84rkru0.fsf@gmail.com> <15302A63-FD67-4754-A32E-46EE40AD4076@block-party.net> User-agent: mu4e 1.4.15; emacs 27.1 From: Nathaniel Nicandro To: David Dynerman Subject: Re: Feedback on Emacs-Jupyter In-reply-to: <15302A63-FD67-4754-A32E-46EE40AD4076@block-party.net> Date: Fri, 07 Jan 2022 12:57:59 -0600 Message-ID: <87h7afl6fc.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::132 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::132; envelope-from=nathanielnicandro@gmail.com; helo=mail-il1-x132.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 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, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Org Mode List Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1641582705; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=o4OZO+DtQ0/ANEcpfZNPuGGmbY/pBZsksrvfW58mswo=; b=pjpsbj1T9jNejyN5zRDtiXkICR03H8QaFMuSuAH2oEJAgedlO50Hh/1PkNeCw0Y/HmXUsT L56SEg+kepm6GTI6nmg49WQ0/ZlvK04PtXFsKNDVMJMF5VmAcz2W6cTuWdF36qLsR3kI40 04aQ9W60NjNrjhVD8Qz+FtWXmbOva4vjpIusKSGvCCvsoEb3R24qonsEkq2T2RzcDNEbBN FnvvkAyMF+24MiYKF6b3K1CUfuXK5Vnzh+xUW8CRCtvjtaCrv9P41PM+v+kvprzfDLYThH DLS3zosh+OThMnWEVZuoHRyidsnUmR9JuvNiZeMHy/v48R3a69Be56GolBSl6w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1641582705; a=rsa-sha256; cv=none; b=GA0hpNUQVAf/540frxoz7gL7wQxvLOB2cF9vhjf6b8UR5KdLSa6b0bhXKdmq07UABDdGOm YAvDMcewVxr8/eGgpAoB2Y01ILqmE8AdIE5zYrSGEXk604fHcfUmlY57TQjN/dfEf2TQQc I/VgP+1yA/Of6zLsN9WEvdFldZhIXBKX8qJS7o3q6+y2FdsMzjqg/S8mIYhZ8Cup3K8P4G Fn0CbnDOEviJntIjxUCm2BUAHv/yPiB8WxGxY7mD19sQ6WvI0QvnOCKdOOP497/brxffRQ IrRnrrXsb9AnzX5CFktrOcqXirB+o8dFqvhcDWrZ2TDOtk30lq/LPDOtQdasbg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=Gs0hfa1Y; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -9.10 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=Gs0hfa1Y; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 222AA27B0E X-Spam-Score: -9.10 X-Migadu-Scanner: scn0.migadu.com X-TUID: +d0BYzEHMdFw > Let me echo others=E2=80=99 comments by saying how much I appreciate your= work > on emacs-jupyter. I use the package daily in my work and it=E2=80=99s been > really fantastic. Thank you very, very much for your huge efforts and > time investment in creating and maintaining this package. Your welcome, I've enjoyed my time learning about Emacs, Org, and Jupyter in the process. > (is there an emacs-jupyter mailing list or preferred venue?) No mailing list. Currently just using GitHub. A mailing list sounds interesting though. I wonder if people would be more willing to contribute pull requests in that case? > It would be great to be able to re-establish the connection to the > REPL without discarding the buffer. I like this idea. When a connection to a kernel is lost for some reason we can reset the connection. For ZMQ based connections I think it would be as simple as shutting down and starting up new ZMQ sockets. For notebook based connections, closing and then re-opening the WebSocket that represents the connection. > 2) Getting results from a running block after > disconnecting/reconnecting. Currently it=E2=80=99s difficult to manage > long-running code blocks using emacs-jupyter if I disconnect from > the remote server while the code block is running. The work around > in #1 above to re-connect to a remote kernel doesn=E2=80=99t work if t= he > kernel is still executing a block. If the kernel has completed > executing the block, then the results are not populated back into > the notebook (the execution UUID populated when the code block > began executing remains). I wonder if the issue has to do with the fact that a new session ID is created every time you reconnect to the kernel using workaround #1. The function jupyter-api-get-kernel-ws is responsible for returning a new WebSocket when connecting to a kernel and using your workaround would mean the session ID associated with the WebSocket connection would be different after reconnecting. That may be why the messages don't get handled. That's just my initial guess though. Could you open up an issue over at emacs-jupyter about this? > 3) Similarly, improving feedback from a long-running block would be > very helpful. Currently you can use print statements in a long > running block to report progress, but these are lost after > disconnecting (maybe they are buffered on the jupyter server side > and could be replayed on reconnect?). Further, I don=E2=80=99t know if > this is feasible, but it would be amazing to have support for > progress bars for long-running tasks (e.g., have a tqdm progress > bar render in the org notebook). I'll have to investigate the buffering of messages on the Jupyter server side of things. I do think there is some message buffering going on and that they get replayed to the client, but I'll have to double check. I did play play around with tqdm, and it works mostly. What about the behavior with tqdm do you not see. When I was testing it, it seemed that the previous progress bars would stack up instead of being removed from the buffer. But then I M-x eval-defun on jupyter-org--handle-control-codes and everything worked as it should, that is only one progress bar gets refreshed on every iteration. Not sure what is happening there. Thanks for your feedback, --=20 Nathaniel