From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_PASS, SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 7616F1F5AE for ; Fri, 24 Jul 2020 23:46:11 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E22233842421; Fri, 24 Jul 2020 23:46:09 +0000 (GMT) Received: from mx0b-00364e01.pphosted.com (mx0b-00364e01.pphosted.com [148.163.139.74]) by sourceware.org (Postfix) with ESMTPS id EB6873858D35 for ; Fri, 24 Jul 2020 23:46:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org EB6873858D35 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=columbia.edu Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=fd1@columbia.edu Received: from pps.filterd (m0167073.ppops.net [127.0.0.1]) by mx0b-00364e01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 06ONbl7P020663 for ; Fri, 24 Jul 2020 19:46:01 -0400 Received: from sendprodmail12.cc.columbia.edu (sendprodmail12.cc.columbia.edu [128.59.72.20]) by mx0b-00364e01.pphosted.com with ESMTP id 32bvye70qy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 24 Jul 2020 19:46:01 -0400 Received: from mail-io1-f72.google.com (mail-io1-f72.google.com [209.85.166.72]) by sendprodmail12.cc.columbia.edu (8.14.4/8.14.4) with ESMTP id 06ONk0wJ039123 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NOT) for ; Fri, 24 Jul 2020 19:46:00 -0400 Received: by mail-io1-f72.google.com with SMTP id 127so7332745iou.1 for ; Fri, 24 Jul 2020 16:46:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=rrj3OoC7AM0ojmVOvwNj8fM79rNzcwyIIR4YuXDbRiI=; b=Xl1eBNteo08lqFhnyEhJhpdcth11N1fOlYm/Ngk29zlcwhOwiY2wOGFQfFZlcaq4HR evRa1HkLhk9JR7O5nJtR2gXrcgf5HbpqYbkBXlYN7T1Kr86mdM/Jx5T8JProCeKsal+h 4idyzzCAXjWaiWirQ/RR09dDYZ3YEbfsRpdoP8CSTqlCniOBNfGlnOQiJKx2jPrSIIZn HAHKof9u+B4f5J11GAGiyBvW5I3joPmn4puvp1S2mRD+rY456d5B61Nu1j/1f1TKOXft 2jqK+Ejfcp4Gre7ySAFtCOLd+wQVIPS3T5RFP/LLOyIqG41gOynROMHl/EnIYMPUv0Xb USHA== X-Gm-Message-State: AOAM530JtcGqiTtUcJ6ErFNSAY0kl7rEz1itmnrSFpGIf3Kh77u04p7I 5v7LcGSffLlIgadCV0o04ocOs2s6nOmrwU1egmXMrKxGChwE4Dx82CnwnWnuyAqoevbJ9+iJDO0 TDgXfdwAF0hOc2TDdRQeTynpf0dO65C8tTEEbAuhXS6aX X-Received: by 2002:a05:6638:1649:: with SMTP id a9mr4052477jat.115.1595634360176; Fri, 24 Jul 2020 16:46:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz0y1qFKRjpJMLh7gwDQeEdkVC1jEoBy1C9qb4ZOOEPGebWQ9llxZzG3OOQhsPjabQ7RS7XuxfSuVyZ6lmmWqs= X-Received: by 2002:a05:6638:1649:: with SMTP id a9mr4052454jat.115.1595634359877; Fri, 24 Jul 2020 16:45:59 -0700 (PDT) MIME-Version: 1.0 References: <10CAD3CD-0170-4182-A920-EE825EBAF6B0@rmrco.com> <95d9170b-d925-5037-c841-e1fd17bb680f@cs.ucla.edu> In-Reply-To: From: Frank da Cruz Date: Fri, 24 Jul 2020 19:45:47 -0400 Message-ID: Subject: Re: C-kermit fails To: Paul Eggert X-CU-OB: Yes X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-07-24_10:2020-07-24, 2020-07-24 signatures=0 X-Proofpoint-Spam-Reason: safe Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Liam Stitt , Frank da Cruz , Mike , GNU C Library Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" The reason I use getchar/getc is that Kernighan and Plauger recommend it because it's buffered and avoids needless context switches. I'm sure you guys don't care much about the efficiency of character loops, but some of the ancient machines where C-Kermit runs are pretty slow. Computers and operating systems are supposed to serve the needs of human beings. But when you make non-backward-compatible changes to operating systems that break existing applications, you force people to stop what they are working on (a cure for some deadly disease, perhaps) and search for a new version of the application they were using that "complies" with the new "standard", and then, not finding one, hunt down and contact the developers, if they are still alive, and beg them to "update" their software. When you think of a more "correct" way of accomplishing something, by all means add it to the system, but without removing the old way, so existing software continues to run. Unix is supposed to be a family of operating systems among which software source code is portable, allowing a degree of freedom in computer purchases. It's not perfect, to be sure, as anyone who looks at the #ifdef soup in the C-Kermit code can attest, but it sure beats the situation back in the early 80s, when most universities had DECSYSTEM-20s and all the software was written in languages that didn't exist on any other platform and certainly don't exist today (Macro-20, SAIL, BCPL..). At Columbia U the transition from DEC-20 to Unix (DEC Ultrix at first) was a massive job; NO software could be ported, all the applications had to be rewritten from scratch, in C of course. But going from Ultrix to SunOS to Solaris and finally to Linux was relatively painless. So I think the objective of Unix OS developers should be *towards* compatibility rather than away from it, as seems to be the case with glibc. - Frank On Fri, Jul 24, 2020 at 5:07 PM Paul Eggert wrote: > On 7/24/20 12:41 PM, Frank da Cruz wrote: > > So casually removing something from > > your header files is kind of like a COVID-19 virus > > This strikes me as a bit unfair, as those parts of the header files have > always > been explicitly private. > > Zack is right that C-Kermit's best bet for portability/reliability is to > remove > uses of getchar/getc. This would render unnecessary that unportable cruft > in > ckucmd.c. > > If age and experience is a qualification for an opinion here, I will > confess > that I've also been writing code since the 1960s, and my opinion is that > programs that stick their fingers into stdio's internals bear the > responsibility > for the consequences. And I write this despite helping to maintain code > (Gnulib) > that does exactly what C-Kermit's ckucmd.c does. When the new glibc came > out the > Gnulib developers didn't complain that glibc's changes were "like a > COVID-19 > virus"; we simply adapted Gnulib and moved on. >