From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,HTML_MESSAGE,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2 autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 29140 invoked from network); 25 Jan 2022 12:51:58 -0000 Received: from tb-ob1.topicbox.com (64.147.108.173) by inbox.vuxu.org with ESMTPUTF8; 25 Jan 2022 12:51:58 -0000 Received: from tb-mx0.topicbox.com (tb-mx0.nyi.icgroup.com [10.90.30.73]) by tb-ob1.topicbox.com (Postfix) with ESMTP id 46FF3284D5 for ; Tue, 25 Jan 2022 07:51:57 -0500 (EST) (envelope-from bounce.mM810ea0adc28e1ab2b77de79c.r522be890-2105-11eb-b15e-8d699134e1fa@9fans.bounce.topicbox.com) Received: by tb-mx0.topicbox.com (Postfix, from userid 1132) id 443E81308B91; Tue, 25 Jan 2022 07:51:57 -0500 (EST) ARC-Authentication-Results: i=2; topicbox.com; arc=pass; dkim=pass (2048-bit rsa key sha256) header.d=gmail.com header.i=@gmail.com header.b=FUBamU2f header.a=rsa-sha256 header.s=20210112 x-bits=2048; dmarc=pass policy.published-domain-policy=none policy.published-subdomain-policy=quarantine policy.applied-disposition=none policy.evaluated-disposition=none (p=none,sp=quarantine,d=none,d.eval=none) policy.policy-from=p header.from=gmail.com; spf=pass smtp.mailfrom=ole.hjalmar.kristensen@gmail.com smtp.helo=mail-lf1-f42.google.com; x-internal-arc=fail (as.1.topicbox.com=pass, ams.1.topicbox.com=fail (message has been altered)) (Message modified while forwarding at Topicbox) ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d= topicbox.com; h=mime-version:references:in-reply-to:from:date :message-id:subject:to:content-type:list-help:list-id:list-post :list-subscribe:reply-to:content-transfer-encoding :list-unsubscribe; s=sysmsg-1; t=1643115117; bh=zCS1nX3u04iot8r1 3CIMEjblI13vwwgIddQZ1a0TZQ4=; b=OWu54Sz9u5bXMZNSEjHbOFhns4uEfXYz sHlKGfN/lZiMMMTO53vwgZ3Ovwra/REjsaRz+yVC/yDOYhnsr4ofraioJFVhYcFH T6lDp3AHrv4My3jW8VdBD1UNcXJ4XIIHpbkU3TV0K/6gDHERy8bdX25CHlE6ICAO RBOZW8qev40= ARC-Seal: i=2; a=rsa-sha256; cv=pass; d=topicbox.com; s=sysmsg-1; t= 1643115117; b=BVQuXvanuGE+e2tLuuIkNZIYReHUc7y9B/S4VdtUaWq2647TQM jojCSkXWIyinnH2wjqZzreCRMB4xX8Dnu1jv2TcQ9Mtv9KcV965He4hvaHEb7HPg 73b8dNreB+d/AWyZ/dwODVqyfrLnyGffHHnX3auTKQ17AHKEahnaOMiMM= Authentication-Results: topicbox.com; arc=pass; dkim=pass (2048-bit rsa key sha256) header.d=gmail.com header.i=@gmail.com header.b=FUBamU2f header.a=rsa-sha256 header.s=20210112 x-bits=2048; dmarc=pass policy.published-domain-policy=none policy.published-subdomain-policy=quarantine policy.applied-disposition=none policy.evaluated-disposition=none (p=none,sp=quarantine,d=none,d.eval=none) policy.policy-from=p header.from=gmail.com; spf=pass smtp.mailfrom=ole.hjalmar.kristensen@gmail.com smtp.helo=mail-lf1-f42.google.com; x-internal-arc=fail (as.1.topicbox.com=pass, ams.1.topicbox.com=fail (message has been altered)) (Message modified while forwarding at Topicbox) X-Received-Authentication-Results: tb-mx1.topicbox.com; arc=none (no signatures found); bimi=skipped (DMARC Policy is not at enforcement); dkim=pass (2048-bit rsa key sha256) header.d=gmail.com header.i=@gmail.com header.b=FUBamU2f header.a=rsa-sha256 header.s=20210112 x-bits=2048; dmarc=pass policy.published-domain-policy=none policy.published-subdomain-policy=quarantine policy.applied-disposition=none policy.evaluated-disposition=none (p=none,sp=quarantine,d=none,d.eval=none) policy.policy-from=p header.from=gmail.com; iprev=pass smtp.remote-ip=209.85.167.42 (mail-lf1-f42.google.com); spf=pass smtp.mailfrom=ole.hjalmar.kristensen@gmail.com smtp.helo=mail-lf1-f42.google.com; x-aligned-from=pass (Address match); x-google-dkim=pass (2048-bit rsa key) header.d=1e100.net header.i=@1e100.net header.b=Eo/sTQQy; x-me-sender=none; x-ptr=pass smtp.helo=mail-lf1-f42.google.com policy.ptr=mail-lf1-f42.google.com; x-return-mx=pass header.domain=gmail.com policy.is_org=yes (MX Records found: alt4.gmail-smtp-in.l.google.com,alt3.gmail-smtp-in.l.google.com,alt2.gmail-smtp-in.l.google.com,alt1.gmail-smtp-in.l.google.com,gmail-smtp-in.l.google.com); x-return-mx=pass smtp.domain=gmail.com policy.is_org=yes (MX Records found: alt4.gmail-smtp-in.l.google.com,alt3.gmail-smtp-in.l.google.com,alt2.gmail-smtp-in.l.google.com,alt1.gmail-smtp-in.l.google.com,gmail-smtp-in.l.google.com); x-tls=pass smtp.version=TLSv1.2 smtp.cipher=ECDHE-RSA-AES256-GCM-SHA384 smtp.bits=256/256; x-vs=clean score=0 state=0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=9fans.net; h= mime-version:references:in-reply-to:from:date:message-id:subject :to:content-type:list-help:list-id:list-post:list-subscribe :reply-to:content-transfer-encoding:list-unsubscribe; s=dkim-1; bh=Yre+9Re0rZArK9DSvB5z8K87e20bEbokLOs9AOpl9TU=; b=EIu5b98c5rfi OxlRZkyO9wYfsSu21kwDi+252jouDjjh72mlLjWNemOu2SIrN6gd8lwjTOkxr8kG V2ViLkJAUanleja0tKJCoqYxWn5k3UU6okwDvQpDySkl1A2wesHbpUcrsrKhXyVC GHJFhtdsxK58iF4tupP2tH+Tw8t5fV4= Received: from tb-mx1.topicbox.com (localhost.local [127.0.0.1]) by tb-mx1.topicbox.com (Postfix) with ESMTP id 53F27F32229 for <9fans@9fans.net>; Tue, 25 Jan 2022 07:51:40 -0500 (EST) (envelope-from ole.hjalmar.kristensen@gmail.com) Received: from tb-mx1.topicbox.com (localhost [127.0.0.1]) by tb-mx1.topicbox.com (Authentication Milter) with ESMTP id 34A87B05069; Tue, 25 Jan 2022 07:51:40 -0500 ARC-Seal: i=1; a=rsa-sha256; cv=none; d=topicbox.com; s=arcseal; t= 1643115100; b=yKciohUPYW296o6d80nYGhur8LM6+6VyA5hsXh8/W9zcDg6Dek AXzB+apgUhGiQKixOfdKHloUhZZV0djvOrF4UO5e8myf7itG8XIYkuBCHEX+epHC LMd8HITJjKzLSJE7rn9AmbMwQNMtw+ESVgykbGmQpTOH9QN7iDoxzCPGHdpmCJRf oGHQB58fuO3pS59I5Fl+kyAQmmcqCAF7L04izXpR7OX5M6b8ZxVJppU4U9P7mTR+ Uq00BgZ4BvRzLxqZhgiaawINOGTRJ5ReofpFJDvmiefPBsecfyY98oFY2oo2YSRS +Jp+q8jgBe1KIjmC4NLFwtpf6qdKg2OZDLPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d= topicbox.com; h=mime-version:references:in-reply-to:from:date :message-id:subject:to:content-type; s=arcseal; t=1643115100; bh=1MjgJ/XIVY7jevTmboO18BqWsMPz9H5/F9LSM6h39vA=; b=wtd2Obicw88K mvaPI/FJ/LhYRDU1POQBT9aJyvEiPX3nOd3+B1UBtIcqOQH0ViOtBcD0L+49seiy gOqA+0fbeOuRSnEJTecAqTkHwECtQs9GlNISjdMnO396wLMLplDNPCatHtHDdvL2 GU1y7S+E46+PENXFdsqD+VND+DA2AuwTSVX5j0JEqnqZtsk3MUVLlRvN/iIDRMmN 2ZNK/zOvlsffmACbJms39BbU4fu9SmWq/UzZRMCjHoqXMQQR0NBxk/Yuag89I/wQ 0u7WJrh1QlfxarDcAOdp8sJd8L+ga8x+rWlpqrZFX45QiztvP7WAZ4aEpsmtZBJQ ZfI1t6oLFQ== ARC-Authentication-Results: i=1; tb-mx1.topicbox.com; arc=none (no signatures found); bimi=skipped (DMARC Policy is not at enforcement); dkim=pass (2048-bit rsa key sha256) header.d=gmail.com header.i=@gmail.com header.b=FUBamU2f header.a=rsa-sha256 header.s=20210112 x-bits=2048; dmarc=pass policy.published-domain-policy=none policy.published-subdomain-policy=quarantine policy.applied-disposition=none policy.evaluated-disposition=none (p=none,sp=quarantine,d=none,d.eval=none) policy.policy-from=p header.from=gmail.com; iprev=pass smtp.remote-ip=209.85.167.42 (mail-lf1-f42.google.com); spf=pass smtp.mailfrom=ole.hjalmar.kristensen@gmail.com smtp.helo=mail-lf1-f42.google.com; x-aligned-from=pass (Address match); x-google-dkim=pass (2048-bit rsa key) header.d=1e100.net header.i=@1e100.net header.b=Eo/sTQQy; x-me-sender=none; x-ptr=pass smtp.helo=mail-lf1-f42.google.com policy.ptr=mail-lf1-f42.google.com; x-return-mx=pass header.domain=gmail.com policy.is_org=yes (MX Records found: alt4.gmail-smtp-in.l.google.com,alt3.gmail-smtp-in.l.google.com,alt2.gmail-smtp-in.l.google.com,alt1.gmail-smtp-in.l.google.com,gmail-smtp-in.l.google.com); x-return-mx=pass smtp.domain=gmail.com policy.is_org=yes (MX Records found: alt4.gmail-smtp-in.l.google.com,alt3.gmail-smtp-in.l.google.com,alt2.gmail-smtp-in.l.google.com,alt1.gmail-smtp-in.l.google.com,gmail-smtp-in.l.google.com); x-tls=pass smtp.version=TLSv1.2 smtp.cipher=ECDHE-RSA-AES256-GCM-SHA384 smtp.bits=256/256; x-vs=clean score=0 state=0 X-ME-VSCause: gggruggvucftvghtrhhoucdtuddrgedvvddrvdejucdltddurdegudehrddttddmucetuf doteggodetrfdotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgs shgtrhhisggvpdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenuc fjughrpeggfhgjhfffkffuvfgtsegrtderredttdejnecuhfhrohhmpefqlhgvqdfjjhgr lhhmrghrucfmrhhishhtvghnshgvnhcuoeholhgvrdhhjhgrlhhmrghrrdhkrhhishhtvg hnshgvnhesghhmrghilhdrtghomheqnecuggftrfgrthhtvghrnhepkeegheeuudeglefg vedvudeghfevgfdvudfhueffveetiedvffetieevtdelfeffnecuffhomhgrihhnpehgih hthhhusgdrtghomhdpmhgrihhlqdgrrhgthhhivhgvrdgtohhmpdhtohhpihgtsghogidr tghomhenucfkphepvddtledrkeehrdduieejrdegvdenucevlhhushhtvghrufhiiigvpe dtnecurfgrrhgrmhepihhnvghtpedvtdelrdekhedrudeijedrgedvpdhhvghlohepmhgr ihhlqdhlfhduqdhfgedvrdhgohhoghhlvgdrtghomhdpmhgrihhlfhhrohhmpeeoohhlvg drhhhjrghlmhgrrhdrkhhrihhsthgvnhhsvghnsehgmhgrihhlrdgtohhmqe X-ME-VSScore: 0 X-ME-VSCategory: clean Received-SPF: pass (gmail.com ... _spf.google.com: Sender is authorized to use 'ole.hjalmar.kristensen@gmail.com' in 'mfrom' identity (mechanism 'include:_netblocks.google.com' matched)) receiver=tb-mx1.topicbox.com; identity=mailfrom; envelope-from="ole.hjalmar.kristensen@gmail.com"; helo=mail-lf1-f42.google.com; client-ip=209.85.167.42 Received: from mail-lf1-f42.google.com (mail-lf1-f42.google.com [209.85.167.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tb-mx1.topicbox.com (Postfix) with ESMTPS for <9fans@9fans.net>; Tue, 25 Jan 2022 07:51:39 -0500 (EST) (envelope-from ole.hjalmar.kristensen@gmail.com) Received: by mail-lf1-f42.google.com with SMTP id x23so9593351lfc.0 for <9fans@9fans.net>; Tue, 25 Jan 2022 04:51:39 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=1MjgJ/XIVY7jevTmboO18BqWsMPz9H5/F9LSM6h39vA=; b=Eo/sTQQyD6RyYjQZVlFslqJ8sJjTRWjcHuucue6fBKwpHYo3jQaGMo/B8pr3rhAf/f a5wb9t2zEV0bHpi08sCF+KNKGeXh78CPlRq/qqs/UX7gLkEnxofb2eDrck9MoEkg3RrY FUt9uY9xvXx9630nKNu2/5Irh+v0+gNUB6V0iEvk9XfZgk4UfwUxRq6EY7VmvHv6d/VN Vayl7MTSFBy8dHXg9vghwYZeYAadjlYhPAGKLr0z3QxOeuxevn4JpE4bHd19+69ZrAPT iXSSJpcuTHrweiX7nYlLE2ryknaGJAxIfFLUFd3yXIIMWVtQHYVUBVeZVHfM6poKcPUy Vydg== X-Gm-Message-State: AOAM5320n3pnHL/vqdRwdA1bubUOaQkUzQpqfxsluOrLRaejh1OgvlQn ZQ2vhsLlJGOamlWvvuGc8sbzw4IjOacaFToz8wneNszW X-Google-Smtp-Source: ABdhPJz/L7WBhA6D3ZbeH0X1mHbTqmtFxQniKPSt168wWt0UX43c1QGq5Gmrx/4moKGtqRoJ+OPna6ZZtKMKgTyWnDk= X-Received: by 2002:a05:6512:32c9:: with SMTP id f9mr15930616lfg.184.1643115098190; Tue, 25 Jan 2022 04:51:38 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Ole-Hjalmar Kristensen Date: Tue, 25 Jan 2022 13:51:27 +0100 Message-ID: Subject: Re: [9fans] The development environment from Hell To: 9fans <9fans@9fans.net> Content-Type: multipart/alternative; boundary=000000000000c0b70505d6678b55 Topicbox-Policy-Reasoning: allow: sender is a member Topicbox-Message-UUID: 8e2c432c-7ddd-11ec-a79b-9628a72c5d5a Archived-At: =?UTF-8?B?PGh0dHBzOi8vOWZhbnMudG9waWNib3guY29tL2dyb3Vwcy85?= =?UTF-8?B?ZmFucy9UNzNmYmI3YTUzM2FlZjc0My1NODEwZWEwYWRjMjhlMWFiMmI3N2Rl?= =?UTF-8?B?NzljPg==?= List-Help: List-Id: "9fans" <9fans.9fans.net> List-Post: List-Software: Topicbox v0 List-Subscribe: Precedence: list Reply-To: 9fans <9fans@9fans.net> Content-Transfer-Encoding: 7bit List-Unsubscribe: , Topicbox-Delivery-ID: 2:9fans:437d30aa-c441-11e9-8a57-d036212d11b0:522be890-2105-11eb-b15e-8d699134e1fa:M810ea0adc28e1ab2b77de79c:1:Rr5g6MUGw6WK8nrz4B7PHLpkcKhPZq2NHDatUIDuZPY --000000000000c0b70505d6678b55 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Seems to work very well. Excellent! There is one thing that is a bit strange, though. Unless I explicitly list my home directory as one of the remote paths, acme simply does not connect to the remote machine at all. No big deal, though. Another slight issue is that because acme loads whole files, opening a huge file may take quite a bit of time. Sam avoids this issue by only loading the file on the remote, and transfers only what is needed to refresh the display. But that's just a different tradeoff. All in all I think I prefer your acme, especially since it can run acme-lsp on the remote. On Wed, Jan 12, 2022 at 5:06 AM marius a. eriksen wrote: > > So I thought about sam, which I also like, although I have not used it > as much as acme. Sam has remote editing, which solves the latency and > bandwidth problem, but I prefer the acme right-click to navigate > compilation errors and grep results. So, can we combine acme and sam in a > meaningful way? It turns out we can. From a local acme, I connect to the > remote Docker in one or more acme windows. This is for compilation and > grep. By adding plumber rules which sends any file which cannot be found > locally to the remotely connected sam, I can right-click on errors and gr= ep > results and get sam to go there. The only thing is that to avoid recursion > in the plumber, I must specifically route the message to the sam named pi= pe > instead of to the edit port, which means I need to start sam before the > plumber. Also, I have not investigated how I can access the remote clangd > from my local acme. > > An alternative is this patch > which > implements a proper remoting layer for Acme. (Very similar to the way Sam > does it: it starts a server over ssh, and then ferries 9p back and forth.) > > I use this as my daily driver, and it's _very_ close to a local experienc= e. > > See this thread > for some > more details. > > > > > On Thu, Oct 21, 2021 at 11:16 AM Ole-Hjalmar Kristensen < > ole.hjalmar.kristensen@gmail.com> wrote: > >> Not exactly Hell, but rather close: >> ISPOrganizationLatitudeLongitude >> NTE Marked AS Not Available 63.4333 10.6833 >> =F0=9F=98=80 >> >> This is the tale of a convoluted development environment, not >> specifically Plan9, but Plan9port, sam, and acme. >> >> I am working on a largish system, with about 5M LOC. The setup is as >> follows. I have a Windows laptop. It needs to be Windows, because of the >> office automation applications. It is also the only machine I have at ho= me >> which can connect to the company VPN. The office desktop is a nice modern >> AMD Ryzen 9 16-core processor with plenty of RAM running Ubuntu. The sys= tem >> cannot (for reasons beyond my control) be compiled on the Ubuntu, it nee= ds >> specifically CentOS 7, so we run a Docker image with CentOS 7 on the Ubu= ntu >> machine. Compiling on the laptop is a no-go anyway, it is much too slow,= so >> I have not bothered installing WSL and Docker on it. >> >> I started out running VSCode, which is available both on Windows and >> Ubuntu, and which has nice remote editing capabilities a la sam, and tons >> of plugins. It is a better experience then Visual Studio, in my opinion.= It >> has a clangd plugin which can be used to navigate the code, but for some >> reason clangd chokes on some submodules. acme with acme-lsp gives me the >> same navigation capabilities, and I prefer the user interface of acme, s= o I >> have reverted to acme on the Ubuntu machine. Works great, I use acme-lsp= on >> the modules clangd manages to compile, and ag (parallel grep-like tool) = on >> the rest. So in the office, everything is hunky-dory. I connect to the >> Docker image from acme by running win docker exec, and since both Docker >> and the Ubuntu machine has the same view of the files, everything works >> seamlessly. >> >> When working from home, acme is not an ideal solution, since the VPN >> network has high latency and relatively low bandwith (a fraction of my >> 500Mbit fiber connection). I run an X server on Windows, and start acme = on >> the Ubuntu machine. Editing files works fairly well, but commands which >> spew large amounts of text really bogs acme down. I could switch to VSCo= de, >> but I would prefer not to. >> >> Now, I have experimented with other solutions which could give me a >> better experience. Running sshfs and a local acme would be one possibili= ty, >> but it is not really fast enough for searching through the code. (I can >> search the 5M lines code base in about 2 seconds with ag on the desktop >> machine). Copying the whole system to the local machine and do the editi= ng >> locally, then run Unison to synchronize, is another possibility, but not >> ideal. >> >> So I thought about sam, which I also like, although I have not used it as >> much as acme. Sam has remote editing, which solves the latency and >> bandwidth problem, but I prefer the acme right-click to navigate >> compilation errors and grep results. So, can we combine acme and sam in a >> meaningful way? It turns out we can. From a local acme, I connect to the >> remote Docker in one or more acme windows. This is for compilation and >> grep. By adding plumber rules which sends any file which cannot be found >> locally to the remotely connected sam, I can right-click on errors and g= rep >> results and get sam to go there. The only thing is that to avoid recursi= on >> in the plumber, I must specifically route the message to the sam named p= ipe >> instead of to the edit port, which means I need to start sam before the >> plumber. Also, I have not investigated how I can access the remote clangd >> from my local acme. >> >> What do you think? Suggestions? >> > *9fans * / 9fans / see discussions > + participants > + delivery options > Permalink > > ------------------------------------------ 9fans: 9fans Permalink: https://9fans.topicbox.com/groups/9fans/T73fbb7a533aef743-M810ea= 0adc28e1ab2b77de79c Delivery options: https://9fans.topicbox.com/groups/9fans/subscription --000000000000c0b70505d6678b55 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Seems to work very well. Excellent! There= is one thing that is a bit strange, though. Unless I explicitly list my ho= me directory as one of the remote paths, acme simply does not connect to th= e remote machine at all. No big deal, though.
Another slight issu= e is that because acme loads whole files, opening a huge file may take quit= e a bit of time. Sam avoids this issue by only loading the file on the remo= te, and transfers only what is needed to refresh the display. But that'= s just a different tradeoff. All in all I think I prefer your acme, especia= lly since it can run acme-lsp on the remote.

On Wed, Jan 12, 2= 022 at 5:06 AM marius a. eriksen <m= arius@monkey.org> wrote:
> So I thought about sam, which = I also like, although I have not used it as much as acme. Sam has remote ed= iting, which solves the latency and bandwidth problem, but I prefer the acm= e right-click to navigate compilation errors and grep results. So, can we c= ombine acme and sam in a meaningful way? It turns out we can. From a local = acme, I connect to the remote Docker in one or more acme windows. This is f= or compilation and grep. By adding plumber rules which sends any file which= cannot be found locally to the remotely connected sam, I can right-click o= n errors and grep results and get sam to go there. The only thing is that t= o avoid recursion in the plumber, I must specifically route the message to = the sam named pipe instead of to the edit port, which means I need to start= sam before the plumber. Also, I have not investigated how I can access the= remote clangd from my local acme.

An alternative is <= a href=3D"https://gist.github.com/mariusae/a7b13730b7c5aa08f32b30a64f31856b= " target=3D"_blank">this patch which implements a proper remoting = layer for Acme. (Very similar to the way Sam does it: it starts a server ov= er ssh, and then ferries 9p back and forth.)

I u= se this as my daily driver, and it's _very_ close to a local experience= .

See this thread for some mor= e details.



On Thu= , Oct 21, 2021 at 11:16 AM Ole-Hjalmar Kristensen <ole.hjalmar.kristensen@gma= il.com> wrote:
Not exactly Hell, but rather close: NTE Marked AS
ISPOrganiz= ationLatitudeLongitude
Not Available63.433310.6833
😀

This is the tale of a convoluted development environment, not specifical= ly Plan9, but Plan9port, sam, and acme.

I am working on a largis= h system, with about 5M LOC. The setup is as follows. I have a Windows lapt= op. It needs to be Windows, because of the office automation applications. = It is also the only machine I have at home which can connect to the company= VPN. The office desktop is a nice modern AMD Ryzen 9 16-core processor wit= h plenty of RAM running Ubuntu. The system cannot (for reasons beyond my co= ntrol) be compiled on the Ubuntu, it needs specifically CentOS 7, so we run= a Docker image with CentOS 7 on the Ubuntu machine. Compiling on the lapto= p is a no-go anyway, it is much too slow, so I have not bothered installing= WSL and Docker on it.

I started out running VSCode, which is av= ailable both on Windows and Ubuntu, and which has nice remote editing capab= ilities a la sam, and tons of plugins. It is a better experience then Visua= l Studio, in my opinion. It has a clangd plugin which can be used to naviga= te the code, but for some reason clangd chokes on some submodules. acme wit= h acme-lsp gives me the same navigation capabilities, and I prefer the user= interface of acme, so I have reverted to acme on the Ubuntu machine. Works= great, I use acme-lsp on the modules clangd manages to compile, and ag (pa= rallel grep-like tool) on the rest. So in the office, everything is hunky-d= ory. I connect to the Docker image from acme by running win docker exec, an= d since both Docker and the Ubuntu machine has the same view of the files, = everything works seamlessly.

When working from home, acme is not= an ideal solution, since the VPN network has high latency and relatively l= ow bandwith (a fraction of my 500Mbit fiber connection). I run an X server = on Windows, and start acme on the Ubuntu machine. Editing files works fairl= y well, but commands which spew large amounts of text really bogs acme down= . I could switch to VSCode, but I would prefer not to.

Now, I ha= ve experimented with other solutions which could give me a better experienc= e. Running sshfs and a local acme would be one possibility, but it is not r= eally fast enough for searching through the code. (I can search the 5M line= s code base in about 2 seconds with ag on the desktop machine). Copying the= whole system to the local machine and do the editing locally, then run Uni= son to synchronize, is another possibility, but not ideal.

So I = thought about sam, which I also like, although I have not used it as much a= s acme. Sam has remote editing, which solves the latency and bandwidth prob= lem, but I prefer the acme right-click to navigate compilation errors and g= rep results. So, can we combine acme and sam in a meaningful way? It turns = out we can. From a local acme, I connect to the remote Docker in one or mor= e acme windows. This is for compilation and grep. By adding plumber rules w= hich sends any file which cannot be found locally to the remotely connected= sam, I can right-click on errors and grep results and get sam to go there.= The only thing is that to avoid recursion in the plumber, I must specifica= lly route the message to the sam named pipe instead of to the edit port, wh= ich means I need to start sam before the plumber. Also, I have not investig= ated how I can access the remote clangd from my local acme.

What= do you think? Suggestions?
= --000000000000c0b70505d6678b55--