From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id B7CD147D89 for ; Sun, 26 Nov 2023 14:58:38 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D264168CBF2; Sun, 26 Nov 2023 16:58:35 +0200 (EET) Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2030368B8B6 for ; Sun, 26 Nov 2023 16:58:29 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=s31663417; t=1701010708; x=1701615508; i=eclipse7@gmx.net; bh=3QIjKFA/T9W/VuA68uyD9EsfhAB8It4ViM2pN8/SPQo=; h=X-UI-Sender-Class:Date:From:To:Subject:References:In-Reply-To; b=Xu5+VUr2q/Op0TcrCru5C0Ov2JnhIMoUfCC5lclzt2992aL7uvpNUCLoM8ZRgyAC vN2OnMivxElS/RIpFx/45UMbv9BSTn/+I0U17qCGA66kMgB43QWD9wz244sGWYb06 n2afqZBoy3c/xzE67fAXBkyTPJAEARKk3sYDBqy1Quv/DSlLMEcgifFSffH6gZrsA 4UGpN249UZfmcoUie4WE9NYFj2XAqq1wYHwAdMwNjaH/+1aIoz4lpFUk3cJD5kjHQ 4CFUrL0ehhIUTSPYAxk4uq5q9cbd2vQVXwz+JmIlJUFkCNypF5y/dSLfVAupXVAl9 sQax0Hytj1Dim3jXHA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from metallschleimette ([91.12.119.98]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MTzfG-1qgHp81D98-00QzPb for ; Sun, 26 Nov 2023 15:58:28 +0100 Date: Sun, 26 Nov 2023 16:08:42 +0100 From: Alexander Strasser To: FFmpeg development discussions and patches Message-ID: References: <20231123091424.25640-1-anton@khirnov.net> <170099033001.8914.10786614189489946675@lain.khirnov.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <170099033001.8914.10786614189489946675@lain.khirnov.net> X-Provags-ID: V03:K1:61zNTV4liQTWGy4KePk8evScWGCJ/dgd/lFpSwE4ZB0N8QE7ld8 LuTNtuoljIkES0gV3yzHK4+4vrjC3fDm7Rh+N4Vo0Q3OjC4YxAgnUb4A1o7aiHSiKrQkhGU YjVCHA2jhMqTGm4zXrUWiaqhzZb77Xrbq9VOZh+f4VYHkGRF326OJdmhcxAGsDDQTdghA6l 8a0bMVyz3tH0nCltPyb1A== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:hxNxwltl44I=;+GhWWzGh+UTG7+NO9zxQREpVw7P F214Zsa5wjKgm0t3+8c8kOFIde5+1Z/vmfGpzFwd+6zUdpp4ZbLbXkDCFUYgUUVIDOABizGjk +mpIcRZn4FijiN7yagbyzvn0BcqvZgtFdpvANGiKGx1nVnwqxtqfztnxRUwhVqmc+LYFebpL8 0sXUrvKs68ALb1lDd/6kwE8eRy3W2HdgWP+jhxzH0atv7lYbwSnMP56XLokuMBOZkWabNkXSO Bn/Oa/asahlRL4+Yc/2zM286wHD5UnudTvGU7u8iOF3kEy1yRZcUmqdZzdmfaMS3WY7J2qH8a AWbD/Yn76tuT4DbRv1c8++4XFERdv6yfIpW+OKd7eCtIQnUMxU9ni2m76qeTcAnbWo2qin0sb P/X/mhqjMD5tSpdtA3j2ZqMCL8MeUIOpw2zKvRkWUXrTjnWHAck7101oiK/zn2u9+6peG+e3w tQLPfA8W06/aphTYVNxtVYUlSHbx9TbgUXae2LrGYucPCuA4hKuxoKg5AdPhZ2gyTta74taN/ rGVn09oylUK2hUHAIIOk5EtIGoFvbdMH1ujsGYCcTsupAM62ZE3d3oM+WvXHIaeZr3gzf4Iua xNBFNwBaB0svQEotszVSycCbAjaAn9HYHKRlMil+s+WxvEa51LEaC4BlX21+1HHKQL6FvEG7q 9cLjPPWEM1Wk3jsUHCmh/Mvdo4H8wKZ8VsatUaFeFgb2HuG7BxuINFViUFMbOsfSzMYhndtf+ xtGg0p+ljMDfcJWkSAK4mtqDUkG8aCHlrNXb4hcUc/JoCg+Q5hXWYX/z7A2JFq4BgJ1Rahgh5 1jHz0heYRLnSYR7KT7QVbSer+DQ7TMnCksCdzPeP+NMMNDdnTZmmkdTLfFQUzLLZp/a2oCkUc XuiBLg39VZdn5GNsK9MYtl/rseSQ9YwJkum7YakR7RHbfkNmdIwicvWqwnjay4l8JRUx4JGC4 E1slFw== Subject: Re: [FFmpeg-devel] [PATCH 1/2] tools/general_assembly: implement extra GA members X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On 2023-11-26 10:18 +0100, Anton Khirnov wrote: > Set pushed. > > The general_assembly.pl script should now be usable as the authoritative > source for GA members. The patches mostly LGTM. My Perl knowledge in general is really mostly from 20 years ago. So if there is any Perl-ish devil in the details I surely have overlooked it. Please pardon me if I missed any details on how the program works. The edge cases are always the tricky stuff... One thing about this patch and that program in general is a bit unfortunate: The use of PerlDate is_between. Here is the doc I found for it: $dt->is_between( $lower, $upper ) Checks whether $dt is strictly between two other DateTime objects. "Strictly" means that $dt must be greater than $lower and less than $upper. If it is equal to either object then this method returns false. AFAIU it affects the script in 2 places: 1. In subroutine get_date_range: Here the exact day matching date_ga_rule is treated like anything >= date_first_regular 2. In the loop adding the extra member. The member would not be added on both, the day they were elected nor the day 2 years after. Case 1 should be "strictly academical" and thus not really important because to my knowledge no vote was started on that day. For case 2 it will be not important on most days, but it would seem more common and intuitive to use either the closed interval or a half open interval. Where including the first and the last day or including the first and excluding the day seem most natural to me. Best regards, Alexander P.S. As date calculations always turn out nightmares if you look at them long enough, it would possible be a good idea to always use UTC and review how time zones are handled in git CLI. P.P.S. For quick reference follow copies for both places referenced above: Case 1: sub get_date_range { my ($now) = @_; # date on which the GA update rule was established, and the voter list # was extraordinarily updated; cf.: # * http://lists.ffmpeg.org/pipermail/ffmpeg-devel/2023-October/316054.html # Message-Id <169818211998.11195.16532637803201641594@lain.khirnov.net> # * http://lists.ffmpeg.org/pipermail/ffmpeg-devel/2023-November/316618.html # Message-Id <5efcab06-8510-4226-bf18-68820c7c69ba@betaapp.fastmail.com> my $date_ga_rule = DateTime->new(year => 2023, month => 11, day => 06); # date when the regular update rule is first applied my $date_first_regular = DateTime->new(year => 2024); if ($now->is_between($date_ga_rule, $date_first_regular)) { return ($date_ga_rule->clone()->set_year($date_ga_rule->year - 3), $date_ga_rule); } if ($now < $date_ga_rule) { print STDERR "GA before $date_ga_rule is not well-defined, be very careful with the output\n"; } my $cur_year_jan = $now->clone()->truncate(to => "year"); my $cur_year_jul = $cur_year_jan->clone()->set_month(7); my $date_until = $now > $cur_year_jul ? $cur_year_jul : $cur_year_jan; my $date_since = $date_until->clone()->set_year($date_until->year - 3); return ($date_since, $date_until); } Case 2: foreach my $entry (@extra_members) { my $elected = $entry->[2]; if ($date->is_between($elected, $elected->clone()->set_year($elected->year + 2))) { $assembly{$entry->[0]} = $entry->[1]; } } _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".