From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26712 invoked by alias); 16 Mar 2018 20:39:37 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 42473 Received: (qmail 10761 invoked by uid 1010); 16 Mar 2018 20:39:37 -0000 X-Qmail-Scanner-Diagnostics: from mail-pl0-f54.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(209.85.160.54):SA:0(1.6/5.0):. Processed in 1.131881 secs); 16 Mar 2018 20:39:37 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: * X-Spam-Status: No, score=1.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, FSL_HELO_FAKE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_PASS, T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.1 X-Envelope-From: joeypabalinas@gmail.com X-Qmail-Scanner-Mime-Attachments: |signature.asc| X-Qmail-Scanner-Zip-Files: | DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=bt946Us8sdfa1ji8Jc2ZjkplN6VgbpsDAd6eVzFr5qk=; b=hbXurNpFGyunEKcrmp60tH5eYSZ9BYclJRnmTGE2vIKlWOaF114oMiGCgGjjaZ5i7t NXFWOIXrAkql3rsyRJJAJR98mQCYM1EPcP5P86H+o/ONyecgq6GP0lXf0CgMkOGBh0A9 ncUeqJ45Ym0BSseuG8fpx44p38/oU07KEzPfchzepEN/8t50tlSRyeo341Ywm12btIpB P3J/bxHfL2rW6MoWZA0fx7U4UxwqWVUEUUzpITDz1g6bIJ+RSNx0PsabEsxWeHsZJDYi 6nVvdL5YNiugJemhL0NtOrWb71IuVWwh3KqTctTRUorkwdsq+v4mLubsryZXCMWCqmFy hmBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=bt946Us8sdfa1ji8Jc2ZjkplN6VgbpsDAd6eVzFr5qk=; b=FlwOsVORtcRlULc1+9/I3K2xGrTUAbODEpCc7NNr4ehb+vO7uL7Q4hG7JeFAms9mcv kiYfvUTqXJWuSGfWQecYqW5OOv3ZQGo70jS/O7P0mM4X4IxqTP8mt7TYlgTF0hmdm99V ckU5ZrJsezaVJa8WOEByBZxL8r0rxyWK348/YCeIWAenvyWpb+EpztBHrp8cwvMzthyT U9jUodaJd+IYdvB5OG/m8J1mWpAryfl5Nz95fo92q6w8pWUylkCNkrfMJB0NSnXmxMTY 2gB6B4y8jy23sNwzak5s+3StXRlMlX/GJ2GcDQuYjPbJstbg3qUimCpqNXjSV9wqYfNK sD9A== X-Gm-Message-State: AElRT7FGEYxM1FgDxE5woDwxRtOPNC978KOT3r0cYAZgCR5ClUvI9yUF hm7TEusds0GshvhrkqSdscCriQ== X-Google-Smtp-Source: AG47ELvP0hjp5ewymdbK+f87hi4tikYzl+WYbtMkPA1BQaV7iC1i9lAhve8U0kPsvlYKPW75iCJvTw== X-Received: by 2002:a17:902:7787:: with SMTP id o7-v6mr3519108pll.75.1521232773670; Fri, 16 Mar 2018 13:39:33 -0700 (PDT) Date: Fri, 16 Mar 2018 10:39:30 -1000 From: Joey Pabalinas To: "zsh-workers@zsh.org" Cc: Taylor West , Joey Pabalinas Subject: [RFC] Looking for opinions on accepting refactoring patches Message-ID: <20180316203930.f6mikhp7iiltgmpb@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="mi2odzha56zmogsy" Content-Disposition: inline User-Agent: NeoMutt/20180223 --mi2odzha56zmogsy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Recently I've become interesting in contributing to Zsh, and have already been submitting a few scattered patches here and there, but I will admit it's been a pretty trying experience overall. The reason is that many parts of the Zsh codebase are literally _byzantine_labyrinths_ of single-letter identifiers and uncommented shenanigans that were very confusing to figure out. It seems I'm not the only one with difficulties understanding many parts of the code, as a quick `git grep` for things like 'why' '??' and 'what' reveal gems like: > Src/Zle/computil.c:2850: * -->PLEASE DON'T ASK<-- > Src/Zle/complist.c:3431: * *** PLEASE DON'T ASK ME WHY THIS IS NECESSARY = *** > Test/E01options.ztst:879: # Goodness only knows why. > Src/glob.c:2488: /* please do not laugh at this code. */ > Src/params.c:4167: /* ??? error checking */ > Src/hist.c:3196: * However, I'm so confused it could simply be baking Bak= ewell tarts. > Src/Zle/computil.c-4240- > > * As there are virtually no comments in this file, I don't really > * know why we're doing this, but it's to do with a matcher which > * is passed as an argument to the utility compfiles -p/-P. > Src/Zle/zle_tricky.c-1080- > > /* Lasciate ogni speranza. > This function is a nightmare. It works, but I'm sure that nobody really * > understands why. The problem is: to make it cleaner we would need * > changes in the lexer code (and then in the parser, and then...). = */ Most of the offending code is part of the completion subsystem, and obviously being one of the central parts of Zsh, I can understand the reluctance on changing anything but what is absolutely needed to to avoid breaking things. But in my opinion this is probably why I haven't noticed as many people contributing to Zsh as I expect to (it really is an absolutely *amazing* piece of software engineering in my opinion), so I was interested in some comments about how patches concentrated only on refactoring the code with semantics changes whatsoever would be received? Is this something that would be encouraged? Or is the risk of bugs and regression just too heavy for this to be a realistic goal? Quite honestly I find either answers to be an understandable position, thus I figured it would be better to ask about it before attempting any patches like this. --=20 Cheers, Joey Pabalinas --mi2odzha56zmogsy Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEKlZXrihdNOcUPZTNruvLfWhyVBkFAlqsK4IACgkQruvLfWhy VBkUWhAAqrcSO3YfLGywpTXSKFrrqHHekVOXx0Mo54B/lqRfEIZ3cGmyD/6Hn8st PHw5YpNyv2nksvrT8etWNVdXkD+Aw1Nl0aDftE6BDozeoHbjITpCcceysZBjqhoD dkt302mTW0W2IZQHoXXFX4Mr8GzCvJG9+xAQdeAWnitlnofcGEATzCmi8tb+768a uRG1OSVsD230kM0ZCVQaCB+s6QOpgDnw+meyc6esRq8/bwsuv+7+lFtCD647uHEs XHPEU6V7flv6KWg3mgJyrFQGNa+jshDMpq2rYwR/SYH5XNORBrlfvF49s3pzSQTv Urub5vCh2jSvTlSGOKdHW2l/PKjRJtlB1AHGb9aplqzW5bjgk+0WLzQhBppQeK45 jKHxzhapkblfThzWC5MKk3idYfub9Zc63iaGwO+6Yz7luVu+Sw9gBfI2VVQslWzb eoUwOjU6FggF6i1CuWIpURs6m+gcftGKs6DOEuWHAlYNdgP6E5nlCCdFfd9G1yVx Pq6UVk74hrhCNUdRBz3hmSQ60VmKbedrQSvXGhEdNjaDy/JJoOpz97c/kvP1EHRe J8mYIdMRw+N5+YTYYSwbQZyEPieIhDnnXOYTTg+qesXahhDfIKZru6mHHXLoeKTU ophzOZIsA5E02FwltJ4wjGfEPIM/QYCI+TTH7ExmnJdZonO/XHQ= =LlwX -----END PGP SIGNATURE----- --mi2odzha56zmogsy--