Authentication-Results: mail-b.sr.ht; dkim=pass header.d=gmail.com header.i=@gmail.com Received: from mail-io1-f47.google.com (mail-io1-f47.google.com [209.85.166.47]) by mail-b.sr.ht (Postfix) with ESMTPS id D11D911EE9A for <~sircmpwn/public-inbox@lists.sr.ht>; Fri, 18 Nov 2022 03:51:24 +0000 (UTC) Received: by mail-io1-f47.google.com with SMTP id p184so2974885iof.11 for <~sircmpwn/public-inbox@lists.sr.ht>; Thu, 17 Nov 2022 19:51:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:to:subject:message-id:date:from :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=bL+l40m5+FGj3MvK5rJhDhpC15N3qqFvK6XDCY2w05A=; b=SCod82ZAKDH+ZkBICyOITDBlfzFDvQqIrug9Vxh2DR5DgMuv5BRxH41PSjmJ/vlPAn EyZvOjbNBxcEAb2xT7jrX+6ToVUtYEGidsNK7k0fVp7RbUVGjb/Ll/8mHcqzhUH1Myc4 +BGCm9KVZyy0XAypidsT1s47XqhJaLHjhYc49bXf9vn25XLhzaNPEc/nH7pf8HATTzU8 Kal+hLHmgJwMcBfbOaGkO1ZSrxcyPZkizgGJGQnFUJw2X2A1sdx8877bzLQb+9LzD/yW q+16jEYEsoVEbisYKV68eGToKJL+7K6QNOWeRZFMCSOEh7k8cTtJ20aYfUWwR2YDKD7f D0dg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:to:subject:message-id:date:from :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=bL+l40m5+FGj3MvK5rJhDhpC15N3qqFvK6XDCY2w05A=; b=KJZyuJeU3xKXtHYz/eOK3SJjKtQ4R4spqGB5Y/i1IEWzASxobTViTUM5DLHwFjen1f +e2VG3njr+F4w7QsBhxgtvx6dRhF8PrGsLaoBjuRDvBpn1qq4CBy1zLUClQ+uMLmnuWm hqNkdq7N9pUM9rs3aBYnCrgmBVmzBiF7354juX3DPV/h3fqS6ST09zvoZJwOQU2/iDti o0v0NZPAOjmOTbaxVMtEKIeC8MvOzYIC3ahamA/V65RJb+zzk/9TnuevFymiRjLUXeq2 GNrIghNwoReejfO2PdOhL0w6f7VngxtfD8XVkg202+kYvTFkU4j1KvYMTP11vZaI/kTn eS0A== X-Gm-Message-State: ANoB5pn+vcKxPUWIGJd5sUOXqlSyZTcaFDhKH96cV3jGEHrHDpuQhEZn pUCThi6/mmDiQa2KT7zCu750/ASbMh6IC4cENJVqxp5lv90mrA== X-Google-Smtp-Source: AA0mqf74LK+AMRGVf+dIrCzylL/fWmyYrIQicAhNnYCAYyj/t3MVzLYMGViuvJFKNcDoJr1amxr3mopfV9eya0uaM/g= X-Received: by 2002:a5d:9443:0:b0:6cd:c485:2c9e with SMTP id x3-20020a5d9443000000b006cdc4852c9emr2666802ior.138.1668743483631; Thu, 17 Nov 2022 19:51:23 -0800 (PST) MIME-Version: 1.0 From: Askar Safin Date: Fri, 18 Nov 2022 06:51:12 +0300 Message-ID: Subject: Re: In praise of Plan 9: Plan 9 doesn't have true "mv"! To: ~sircmpwn/public-inbox@lists.sr.ht Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi. This letter is mostly not for Drew himself, but for everybody else. I hope that Drew's readers will read this mail and will know how bad Plan 9 actually is. Plan 9 is not a good OS by modern standards (UNIX-like systems are not, either). For example, let's consider "mv" util. Here is its Plan 9 (more precisely: 9front) sources: http://git.9front.org/plan9front/plan9front/30c5296f32b87d83529d77273272689= 1e1261c9c/sys/src/cmd/mv.c/f.html . As you can see by carefully reading this source, "mv" always unconditionally COPIES file data (as opposed to Linux: Linux and all sane OS move files without copying when on the same file system)! I once asked somewhere (as well as I remember in IRC) why Plan 9 doesn't have a true mv. As well as I remember I got this answer: this is because the 9P protocol (core file protocol in Plan 9) doesn't have move operation. It doesn't have this operation because of some fundamental reason related to the beautiful Plan 9 file model. I think this is a very bad design. If Plan 9 folks always copy files instead of moving, what can be said about all other performance-oriented features? I'm nearly sure that every time Plan 9 authors have a chance to add some performance-oriented feature, they simply deny it arguing "this will destroy our nice abstractions". (But if you cannot add performance-oriented features because of abstractions, it means something is wrong with your abstractions.) Now let me move to the next point. Here is a quote from Drew's article: > Plan 9 is much more Unix in its approach: you open /net/tcp/clone to rese= rve a connection, and read the connection ID from it. Then you open /net/tc= p/n/ctl and write =E2=80=9Cconnect 127.0.0.1!80=E2=80=9D to it, where =E2= =80=9Cn=E2=80=9D is that connection ID. Now you can open /net/tcp/n/data an= d that file is a full-duplex stream. Aaaaaaaah! This is a very bad interface. It is slow, it requires a lot of syscalls. It requires producing text and then parsing this text at other side. (And parsing is always error-prone.) This interface requires user to write "magic" text to "magic" files instead of simply issuing apropriate syscall. In this video: https://www.youtube.com/watch?v=3D9-IWMbJXoLM Rice describes why such magic files are bad (from 0:00 to 11:00). Then Drew says: > No magic syscalls, and you can trivially implement it in a shell script. ????? So Drew thinks that the ability to do TCP from shell script is somehow a feature? Shell script is one of the worst programming languages, shell scripts should not be used at all. --=20 Askar Safin