Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lvyfq-0006XV-4X for pgsql-hackers@arkaria.postgresql.org; Wed, 23 Jun 2021 08:55:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lvyfo-0000wC-JL for pgsql-hackers@arkaria.postgresql.org; Wed, 23 Jun 2021 08:55:52 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lvyfn-0000q9-M6 for pgsql-hackers@lists.postgresql.org; Wed, 23 Jun 2021 08:55:52 +0000 Received: from forward4-smtp.messagingengine.com ([66.111.4.238]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lvyfj-00053j-59 for pgsql-hackers@postgresql.org; Wed, 23 Jun 2021 08:55:50 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailforward.nyi.internal (Postfix) with ESMTP id A8415194053E; Wed, 23 Jun 2021 04:55:44 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 23 Jun 2021 04:55:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=B1qDSPdf0J6h8kXgjYjWyJbHMo0kWrOYsIkmoROgg 90=; b=tV8JIhfQ638bSLpe3tZsVpe5RVuWArJeFZqgZchvmziK5qjTIgUqNZwnj 9sG5IEbBmeZr0RvvmHS/3gMYyT0xBZqEdUdQPGiydPlbyF61bKxQv6T1p4xXf72h XJY8yhkR7/0ro0VMUY3aRI7rgSsFGGFuxNkv1/crZofC7EM3yxJ2DItVAv/Peplm 6Leabqo4rZlM7DaT/pvxXW4SkMM2KYGgCO4nFurZXAofFa90rkSeQ5ybT3RmWw9t gQyfMlUsiPUr55i+Beyq0DN2RBItEZypqlgjoFuZwjCKSMYPTMFjDhwNBri7fxbU VDE6ZCIoGx8lMKUefxpZ6hhnfEPZQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrfeegfedgudduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffvfhfhkffffgggjggtgfesthekredttdefjeenucfhrhhomheprfgvthgv rhcugfhishgvnhhtrhgruhhtuceophgvthgvrhdrvghishgvnhhtrhgruhhtsegvnhhtvg hrphhrihhsvggusgdrtghomheqnecuggftrfgrthhtvghrnhepkeehieehvdegueeghfff ueeliedvgfeigffhheevvdegfefgfeetgeejudejjeehnecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomhepphgvthgvrhdrvghishgvnhhtrhgruhht segvnhhtvghrphhrihhsvggusgdrtghomh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 23 Jun 2021 04:55:43 -0400 (EDT) Subject: Re: improvements in Unicode tables generation code To: Heikki Linnakangas , pgsql-hackers References: <22016aa9-ca59-15c7-01df-f292cb558c4d@enterprisedb.com> From: Peter Eisentraut Message-ID: <294cd3ee-7988-9ce2-87e2-5acaac8db01c@enterprisedb.com> Date: Wed, 23 Jun 2021 10:55:41 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.10.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 22.06.21 10:20, Heikki Linnakangas wrote: > On 22/06/2021 10:20, Peter Eisentraut wrote: >> I have accumulated a few patches to improve the output of the scripts in >> src/backend/utils/mb/Unicode/ to be less non-standard-looking and fix a >> few other minor things in that area. >> >> v1-0001-Make-Unicode-makefile-more-parallel-safe.patch >> >> The makefile rule that calls UCS_to_most.pl was written incorrectly for >> parallel make.  The script writes all output files in one go, but the >> rule as written would call the command once for each output file in >> parallel. > > This could use a comment. At a quick glance, I don't understand what all > the $(wordlist ...) magic does. > > Perhaps we should change the script or Makefile so that it doesn't > create all the maps in one go? I agree, either comment it better or just write one file at a time. I'll take another look at that. >> v1-0003-Remove-some-whitespace-in-generated-C-output.patch >> >> Improve a small formatting issue in the output. > > I'm surprised the added \n in the perl code didn't result in extra > newlines in the outputs. True, I'll have to check that again. I suspect that \n actually belongs to patch 0004. >> v1-0004-Simplify-code-generation-code.patch >> >> This simplifies the code a bit, which helps with the next patch. > > If we do that, let's add the trailing commas to the other arrays too, > not just the combined maps. > > No objection, but how does this help the next patch? Mainly it just moves things around so that each print normally starts at the beginning of a line and concludes with a \n.