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=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 10560 invoked from network); 15 Apr 2021 03:52:02 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 15 Apr 2021 03:52:02 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1618458722; b=p+VxfgFYTsbo84NP4jz7gbw7Et8swDbCvpgB29Y21AinDOnNmtslVeVukNk9LpE3j6Pj5XP5J9 6g8cl9Cl/wrl/UVFTET/mzkgAwglqVBG6fB7e31gwiZc7U9sA0wEV+Dxt4+Dzdd2P/E5Zn9HVH 7w5KalkVEEBJtnzMUkL/9t8Zn/CBdSsSTqFOpfi3O57G2bTVU5mRrdtTQga9ruzJ6pCro/8/9t yLx/tvHJ6pcSkMsK4g7WYmUGav3jqqtlBfO1M9lpcL35/+OCwkM7B37q2yj0aZOMky7gvmNMIf cleNGCFujtOV6f3/mnOQkudJJXj+PkWu4BltQ+pzQ6QOTA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-lf1-f53.google.com) smtp.remote-ip=209.85.167.53; dkim=pass header.d=gmail.com header.s=20161025 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1618458722; bh=rVn3lQotuUTcCNNB4Dw8iOLFl6n2zh+bZGKMJ9q4qpU=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:Cc:To:Subject: Message-ID:Date:From:In-Reply-To:References:MIME-Version:DKIM-Signature: DKIM-Signature; b=vWlYJHLBa8sHsOI9e2vEUsbtenF+ut4NimdV0zulcvDd/wn802ScGAdZp/YO7F12a/yjON8syw mdscKmG33/E7sLSwRWIZ8dLI/e1AUbOeWNkJukWLZ7ActVs4zltjvcY7Bimp09RcnsJXsQSoIq kP6+BLLfjKVe5qYM2Q9/SgfNbYIe/0yYMHWvFKIXTXOKCX2TtKCJW56cJ6tSMpd/eKtcmKVqJ0 UaaTYP+eLLOg49TZ4e09QY812INHp60ImsVcNi48IMLWDy7Dl3f+lo03z4DpJcVGrMqZXwCCxC p/jL9BqFnxhq7pvsEp46A1ZkWCLBCU/U56lGzMOGkpFrvg==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Transfer-Encoding: Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To:References: MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=qThB63V6Ljpr1bhjLUxaUIXoY0C1S0B1uK7pZIy3cx4=; b=lfxW77DVtiOr3eZYBh8Tt3xdZ3 Sg4QQ/2U9/8+IjIF/8Ykf/x0pf9iFPsVTAYcIOo+//YlhLk37NOWrkfyhCQ13PTkJhnGmGr4vlRfi pNtkHzgyK6W0bbwR8QbqlLfKbHEYRy3tkVevNMtQtpvXRWcBOTHBbhENFR8iwuYsiAHzcxfGJHOOy AigPVaFahVkKNXFmPA+GSi2tar2hh3rxPOZKmhH/NfgiUiQ/hoWhEgTqeN+X1gjCyeEogf4YIzp5Y gfyOnrLMcO/3pnkddb4zaSFFbKHXpvVkjEbybaZb6u+An62fI5vIenmhsXYiudwKKug/HSCm4eWz/ dCOuVpLw==; Received: from authenticated user by zero.zsh.org with local id 1lWt2v-000KGh-0Z; Thu, 15 Apr 2021 03:52:01 +0000 Authentication-Results: zsh.org; iprev=pass (mail-lf1-f53.google.com) smtp.remote-ip=209.85.167.53; dkim=pass header.d=gmail.com header.s=20161025 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-lf1-f53.google.com ([209.85.167.53]:36640) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1lWt2L-000JQr-8h; Thu, 15 Apr 2021 03:51:26 +0000 Received: by mail-lf1-f53.google.com with SMTP id n138so36952898lfa.3 for ; Wed, 14 Apr 2021 20:51:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=qThB63V6Ljpr1bhjLUxaUIXoY0C1S0B1uK7pZIy3cx4=; b=kgZ1Hwm0FllE/GPDtlyUSZRrcMe+/Sf5eEiLW2s2jcmd2OwiNWNrWraGg6F1EAHwuO hZVbmvJ0b3d6K3KA6Y/T8BouPJYJbpVrGNy9L/1BNqMj5G+nnIEHKfHN0IPs81YP7f7t FwWTPRl6k4/UXJkj2yz+jg1S7ZJHec4QPz78rs9eyxQ5xKY7+q1RE1EsJGM8PSPLE72p Qf5bfRlao+n1NSyvBvq4IQloHV7dI48cqDSVN7fyLTP6YRZJpcskhDSp1rgJ/1DbVRcs QABGg+kX1Bb7n55MnCSBdzdJ53bvaPufBSlQeyGFAdoNDCmwmk64a3rAq7RsEsj9PsWM a6/Q== 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:content-transfer-encoding; bh=qThB63V6Ljpr1bhjLUxaUIXoY0C1S0B1uK7pZIy3cx4=; b=aQTRk5rFmeO5JJSwKoV4Vi227j9mc/wI+uVlhEbBtn5gDRzkzRhLRQ+UjtzosM2QWj V8F2vDmovLBNtW2AQMXhBOD68Ij+RqGYKF+WeEI9OvXhHY6jbC0yQ840g3X+cktqvpx+ An2mFvQDxa+BEqW5TKQZGFM7tvTOYgW2t+aeeLTXiesE0OAMY4l9qz4Fcdh56U92O6wB 4dOaKwByBrm566+q+K5SVY2MJj7N+J1KcTaqRWP1SS6yfcz4dXWfKKOID/2zSGO2/it4 BUTcOWjjhcz1nKIjQq2z6JXqdX/jN5Ji/k7whT+CrU/W8kGaltuOjRVUTjwcmzOD4TNU SfPA== X-Gm-Message-State: AOAM531yKFx1NCPfpOpgqovWRfotWnp9QFjyYVlOVfrTKKM4sM0qHgeM 6rj32qZ4nEgaIpLeXvwBeeJ7Vbaz1ZhZWqTmVc6VhCYypUy+SA== X-Google-Smtp-Source: ABdhPJweEkah4147WMjcYN4T7/I3EuiAJTExZUAgTIyRYag2AyA3//UiKCDj7bwYSNr8g8v4XthjSK7ACJlqYBd2kbY= X-Received: by 2002:ac2:4c01:: with SMTP id t1mr967594lfq.605.1618458684122; Wed, 14 Apr 2021 20:51:24 -0700 (PDT) MIME-Version: 1.0 References: <7E71FA83-356E-448B-9726-02DF3FF5BD14@gmail.com> <873D08A9-F321-474A-8440-CCE7DCCBA529@gmail.com> <20210414120551.GA3882@tarpaulin.shahaf.local2> <6CEA4F3E-9A64-44E1-9121-FA9D5E053AB5@gmail.com> <20210414140909.GG3882@tarpaulin.shahaf.local2> In-Reply-To: <20210414140909.GG3882@tarpaulin.shahaf.local2> From: Marlon Richert Date: Thu, 15 Apr 2021 06:50:47 +0300 Message-ID: Subject: Re: [RFC][PATCH] `newuser` prompt theme To: Daniel Shahaf Cc: Zsh hackers list Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Seq: 48583 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: On Wed, Apr 14, 2021 at 5:09 PM Daniel Shahaf wrot= e: > > Sure, but what should I call it, then? Just `marlon`? (Seeing as we alr= eady have `adam`, `bart`, etc. themes.) > > That'd work. A name that describes the theme itself rather than its > origin would be even better (if the theme is accepted into zsh.git). How about `simple` or `minimal` or something like that? > > > First, no other prompt theme sets styles, so I'm not sure prompt them= es > > > should be doing that. > > > > Please show me another way to theme the VCS part of the prompt and I wi= ll use that. > > You seem to have checked your manners in at the door. I don't know your background, but where I'm from, saying "please" means being polite. I don't think I've given you any reason to think otherwise. Have I? However, if you do think I'm doing something wrong, then please make your criticism more constructive. * You imply I was being rude, but what in my sentence made you think so? Without knowing that, I cannot correct the way I write. * You said my prompt theme should not set styles, but what methods should I then use to style the VCS part of the prompt? I cannot know how you want me to change my code, if you don't tell me. I would appreciate it if you could try to keep your code review comments actionable and on topic, please. Thank you. > In any case, what you've implemented is that you re-set a style on the > first precmd after every chdir. I don't think these semantics should be > implemented in the first place. So, what do you think I should I do instead? > > > Second, even if a prompt were to set styles, doing so in a precmd and > > > behind what _looks_ like a "first run" condition but is actually a "w= e > > > just changed directory" condition isn't exactly best practice. > > > > What would be a better practice? > > Don't surprise/mislead code readers. > > Don't surprise/mislead users. I would appreciate it if you could use less loaded words than "surprise" and "mislead". I am not trying to surprise my readers/users, let alone "mislead" them. Please try to stick to the facts and write actionable comments. How do you think I can improve my code to be less "surprising"? > Document your code. I try to write my code to be self-documenting. However, as with all writing, one easily becomes blond to one's own typos. It would help a lot if you could tell me exactly what parts of the code you think need comments. For which sections in particular would you like me to explain my motives? > Make defaults overridable. Did you read prompt_newuser_help() / the output of `prompt -h newuser`? It explains the mechanisms I've prodiv to override the defaults. > Don't trample user settings It's one thing to tell me not to override a user settings, but quite another to tell me that I "trample" them. > (e.g., someone explicitly setting that style > to a false value for that same context, or for the context =C2=AB:vcs_inf= o*=C2=BB, > which is less specific than the context you use and thus would be shadowe= d). This theme is intended for persons who don't want to manually configure their VCS info separately from their prompt. My theme is also setting [R]PS(1|2|4). Do you see that, too, as overriding the user's settings? If the user wants to configure those manually, then they can choose not to use this theme. > These are all such ground rules that I'm surprised I have to spell them o= ut. I would appreciate it if you could refrain from insulting my intellect. I am new as an open source contributor in general and to Zsh in particular. So, please bear in mind that I might not be used to the "ground rules" under which you operate. I have, however, written code for nearly 30 years and worked professionally in the software industry for over 20 years. Yet, I have never seen so much unconstructive criticism in a code review as I've now read in your email. I would appreciate it if you could adjust your tone of voice, please, and show a bit more respect for your fellow programmer. > > > That appears to be NIH. > > > > Sorry, but what does NIH stand for? (I=E2=80=99m guessing you don=E2=80= =99t mean the National Institutes of Health.) > > Not Invented Here syndrome; cf. EEE :P What exactly makes you think I have Not Invented Here syndrome? I am reusing vcs_info instead of rolling my own Git inspection code, am I not? To quote one famous comedic duo from New Zealand: "Be more constructive with your feedback, please." Also, I have no idea what EEE stands for. Should I look it up in the jargon file? You're not making it easy to understand you. > > > Why shouldn't the theme just advise people to set the vcs_info > > > directly? > > > > Because it=E2=80=99s a theme? If people wanted to style their vcs_info > > directly, then why would they use a theme? > > The point is, you're making people learn a different syntax for > identical functionality for zero benefit. "Zero" benefit? vcs_info's documentation is not easy to read. I am creating a simpler abstraction layer on top of a rather tricky API. If I thought there was "zero" benefit in what I was doing, then I wouldn't have programmed it that way, would? You said it yourself: "Make defaults overridable." That's what I'm trying to do here. I am open to suggestions for improvements, but simply telling me that it has "zero benefit" and leaving it at that is not being helpful. Overall, I have to say I'm quite disappointed with your tone of voice in this email. Perhaps you were having a bad day? I'm hoping that we can be more pleasant to each other again next time. Kind regards, =E2=80=94Marlon