Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

<Overfiend> Joy: Hey, I'm an asshole. Assholes emit odious gas. That's what we do.


devel / comp.lang.python / Re: xor operator

SubjectAuthor
o Re: xor operatorMats Wichmann

1
Re: xor operator

<mailman.232.1699922002.3828.python-list@python.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=24452&group=comp.lang.python#24452

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!paganini.bofh.team!2.eu.feeder.erje.net!feeder.erje.net!fu-berlin.de!uni-berlin.de!not-for-mail
From: mat...@wichmann.us (Mats Wichmann)
Newsgroups: comp.lang.python
Subject: Re: xor operator
Date: Mon, 13 Nov 2023 17:33:06 -0700
Lines: 30
Message-ID: <mailman.232.1699922002.3828.python-list@python.org>
References: <2624DD04-097A-48B1-9F05-C6EF30F4C82D@gmail.com>
<6552a859.020a0220.8cb14.012f@mx.google.com>
<78B43ECD-2EFC-4CDF-99C4-DC310F0B26DE@gmail.com>
<CAPTjJmr+AthCgZWkkehL3i=wCywGG+ShUiBcKtkhZxYdFgy+ow@mail.gmail.com>
<FCFD8802-9FE9-48E0-B453-F9C22121EDF9@gmail.com>
<2f915cf1-c8ca-4db4-87a7-4597d5209b71@wichmann.us>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: quoted-printable
X-Trace: news.uni-berlin.de +96Ll+nOi/6OJPAu7vuu/Qjj6IyjSRR7q5K2qNcE72TA==
Cancel-Lock: sha1:T+7hWgmJqEfeKM59R5TsV6WYP4M= sha256:5BiHG5KoVoL038xSehnjXzgJJaxCdC3asZfjyRMMr5k=
Return-Path: <mats@wichmann.us>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
reason="1024-bit key; unprotected key"
header.d=pobox.com header.i=@pobox.com header.b=KPh4iYy3;
dkim-adsp=none (unprotected policy); dkim-atps=neutral
X-Spam-Status: OK 0.044
X-Spam-Evidence: '*H*': 0.91; '*S*': 0.00; 'fairly': 0.05; 'is.':
0.05; 'python.': 0.08; 'didn\xe2\x80\x99t': 0.09; 'mechanism':
0.09; 'those.': 0.09; 'received:173': 0.13; 'anything,': 0.16;
'forums': 0.16; 'mean.': 0.16; 'perhaps,': 0.16; 'somewhat': 0.16;
'terribly': 0.16; 'wrote:': 0.16; 'problem': 0.16; 'python': 0.16;
'hardware': 0.19; 'to:addr:python-list': 0.20; 'views': 0.23;
'clicked': 0.26; 'bit': 0.27; 'folks': 0.28; 'suggest': 0.28;
'header:User-Agent:1': 0.30; 'seem': 0.31; 'think': 0.32;
'question': 0.32; 'encountered': 0.32; 'python-list': 0.32; 'but':
0.32; 'there': 0.33; 'particular': 0.33; 'header:In-Reply-To:1':
0.34; 'complex': 0.35; 'one.': 0.35; 'people': 0.36; 'those':
0.36; 'using': 0.37; "it's": 0.37; 'received:192.168': 0.37;
'could': 0.38; 'means': 0.38; 'two': 0.39; 'added': 0.39; 'least':
0.39; 'people,': 0.40; 'something': 0.40; 'want': 0.40; 'provide':
0.60; 'here': 0.62; 'true': 0.63; 'great': 0.63; 'once': 0.63;
'skip:b 20': 0.63; 'clear': 0.64; 'bad': 0.67; 'times': 0.69;
'took': 0.69; 'interesting': 0.71; 'combination': 0.76;
'combinations': 0.84; 'dom': 0.84; 'dozen': 0.84; 'convey': 0.91;
'me:': 0.91
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=pobox.com; h=message-id
:date:mime-version:subject:to:references:from:in-reply-to
:content-type:content-transfer-encoding; s=sasl; bh=JR9i/ROxIrK9
m83vS3jPIQU/S70bKS7S2m1wtvvqwAQ=; b=KPh4iYy3wioi4Z8fIgtyz+zloKRh
zAZF0vErCpUEzEZxRoHU5MmNuJM7Sgtufg/dZB2TrGTB1uXCbBtF/krsrAYnnlBo
evj1ZYl4HpJ85zk1pH+tfsPl59R0jiqGlFz/KvuQPZPjcEbmzdOWFq2aLchHTSPN
8o2uzBXNEbBHVuw=
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=wichmann.us;
h=message-id:date:mime-version:subject:to:references:from:in-reply-to:content-type:content-transfer-encoding;
s=2018-07.pbsmtp; bh=z9zKcjAQ01dFEmOpxwhqLesU1IN3MaOP6uTuPkEgy1Y=;
b=Ot3s9FpZAAUTRPJ1rLxDX7H0EFwT0eF/vuyHNDPQXpKvMPBVZFvKfaZO2d6BYsDiVXzrYbMHrUgYG3MkI8/Ln0BsBlMhRJdjb3UKCpoGZSYkFsa2OVUUTH1TiAnUxROSJ31SNuQVqb2sQYxZ8yEWDPkrG0Qin2znwze1CL8jgAA=
User-Agent: Mozilla Thunderbird
Content-Language: en-US
Autocrypt: addr=mats@wichmann.us; keydata=
xsDiBD9xp6oRBAC1vd3YI8Gcr1CxpV1gldNQu0uQsNaICDk+Ai3+R163s/P83JOYG+SBEA3P
v7iZx70qpQ3RzP7KrjF1Nm6j0em9ccUX2fPQUCAxXw5Hiq7CSMiwQQZRI6shcnyMh9XTKViT
WK5MrKDyvjDEn7epjKzKwPS5SG039l6XaOKU0A4uGwCgsNqUQqC0gMMcbKlJV8ql58iKmbMD
/ii8FPQrXmyS/FnsPs7UddV5qMHKm7NUH5oiKuMVyakInRyq9iIxuu3D4Ec6mWRKcGsjmIkW
HXCSz0aefs6dsqNqpU54cYioJ3wP5LzHK7oclgJPryVt5Qezbdutf8SQf8gVkaNIlkxwGUzi
bKTZ6CHzwlz9nNgeel0XPUcZzFxGA/4paeCg2rMSVuAhUQbsLYHu4XzTs9P16zaXkrtxc4m5
b+BF5xsLgTpyO5l859XudS2Gp+7/Y37dAU4QlyGGOboWmF1y9U5DnzBwG8ghsnym+ga58MJh
LdRdQQ6xQolCpEXOuzm40f2r5uMxF3KOJ7WpIPuGAkeCPru9BmlATH+zOs0gTWF0cyBXaWNo
bWFubiA8bWF0c0B3aWNobWFubi51cz7CYQQTEQIAIQIbAwYLCQgHAwIDFQIDAxYCAQIeAQIX
gAUCT0VyZwIZAQAKCRDAMaCQc9hUxiZBAJ9cWziGp7hVfsu5T+cQptc3rLNndQCgrZh8u5LW
BfJ5e/Y+3PwZ8UEm+ELOwE0EP5is8BAEAMtwzcA8TYf5UTjDMgwcSNoErTc9ag+IX05QFgL8
aF8sfJRv5atcitqQy0gSIsOzI+L/AFdPN/+QQI3dL1tCq14t32KPDtigDhzm6jVPXX5z+V9u
xnD8XTp+ZvNcWoHXjViM8aXeLLEiCpiVCho307h3XShvqoKINWRQWeAsKKDDAAMFA/48zaey
wiiEyvI0meJ1KkNHxdLP0yLODr1WV6j9xkPkLWOaIDw7dlwEOlF1N1YtZ2wa0p1wsttdIbIx
ffgwXmcH4zrdxUIMz3U0BqYzk5H+5cYFXECXTFVOmweS+JECYMj80PjRoKCO1eVO1N30zksB
36NnhZWPRWIhjK3ZarIYH8JGBBgRAgAGBQI/mKzwAAoJEMAxoJBz2FTG6VEAoKDYHfDp5Q3q
PuPvPahCE9HsXMgAAJ9INTqcLSJrOfyJ8q95nBO1T26H2Q==
In-Reply-To: <FCFD8802-9FE9-48E0-B453-F9C22121EDF9@gmail.com>
X-Pobox-Relay-ID: 626701F6-8285-11EE-BE11-A19503B9AAD1-81526775!pb-smtp21.pobox.com
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <2f915cf1-c8ca-4db4-87a7-4597d5209b71@wichmann.us>
X-Mailman-Original-References: <2624DD04-097A-48B1-9F05-C6EF30F4C82D@gmail.com>
<6552a859.020a0220.8cb14.012f@mx.google.com>
<78B43ECD-2EFC-4CDF-99C4-DC310F0B26DE@gmail.com>
<CAPTjJmr+AthCgZWkkehL3i=wCywGG+ShUiBcKtkhZxYdFgy+ow@mail.gmail.com>
<FCFD8802-9FE9-48E0-B453-F9C22121EDF9@gmail.com>
 by: Mats Wichmann - Tue, 14 Nov 2023 00:33 UTC

On 11/13/23 16:24, Dom Grigonis via Python-list wrote:
> I am not arguing that it is a generalised xor.
>
> I don’t want anything, I am just gauging if it is specialised or if there is a need for it. So just thought could suggest it as I have encountered such need several times already.
>
> It is fairly clear by now that it is not a common one given it took some time to even convey what I mean. Bad naming didn’t help ofc, but if it was something that is needed I think it would have clicked much faster.

There are things that If You Need Them You Know, and If You Do Not You
Do Not Understand - and you seem to have found one. The problem is that
forums like this are not a statistically great sampling mechanism - a
few dozen people, perhaps, chime in on many topics; there are millions
of people using Python. Still, the folks here like to think they're at
least somewhat representative :)

Hardware and software people may have somewhat different views of xor,
so *maybe* the topic title added a bit to the muddle. To me (one of
those millions), any/all falsy, any/all truthy have some interest, and
Python does provide those. Once you get into How Many True question -
whether that's the odd-is-true, even-is-false model, or the
bail-after-X-truthy-values model, it's not terribly interesting to me:
once it gets more complex than an all/any decision, I need to check for
particular combinations specifically. Two-of-six means nothing to me
until I know which combination of two it is.

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor