Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Reactor error - core dumped!


devel / comp.lang.python / Re: some problems for an introductory python test

SubjectAuthor
* some problems for an introductory python testHope Rouselle
+* Re: some problems for an introductory python testChris Angelico
|`* Re: some problems for an introductory python testHope Rouselle
| `* Re: some problems for an introductory python testChris Angelico
|  `- Re: some problems for an introductory python testHope Rouselle
+* Re: some problems for an introductory python testMats Wichmann
|`* Re: some problems for an introductory python testHope Rouselle
| +- Re: some problems for an introductory python testStefan Ram
| +* Re: some problems for an introductory python testChris Angelico
| |`* Re: some problems for an introductory python testHope Rouselle
| | `* Re: some problems for an introductory python testDennis Lee Bieber
| |  `* Re: some problems for an introductory python testHope Rouselle
| |   `- Re: some problems for an introductory python testHope Rouselle
| `* Re: some problems for an introductory python testTerry Reedy
|  `* Re: some problems for an introductory python testHope Rouselle
|   +* Re: some problems for an introductory python testTerry Reedy
|   |+* Re: some problems for an introductory python testGreg Ewing
|   ||`* Re: some problems for an introductory python testHope Rouselle
|   || `* Re: some problems for an introductory python testCameron Simpson
|   ||  `- Re: some problems for an introductory python testGreg Ewing
|   |`- Re: some problems for an introductory python testHope Rouselle
|   +- Re: some problems for an introductory python testWolfram Hinderer
|   +- Re: some problems for an introductory python testMRAB
|   +- Re: some problems for an introductory python testRob Cliffe
|   `- Re: some problems for an introductory python testChris Angelico
+- Re: some problems for an introductory python testChris Angelico
+- Re: some problems for an introductory python testMats Wichmann
+* Re: some problems for an introductory python testChris Angelico
|+* Re: some problems for an introductory python testHope Rouselle
||+* Re: some problems for an introductory python testChris Angelico
|||`* Re: some problems for an introductory python testHope Rouselle
||| +* Re: some problems for an introductory python testDennis Lee Bieber
||| |`* Re: some problems for an introductory python testHope Rouselle
||| | `* Re: some problems for an introductory python testDennis Lee Bieber
||| |  `- Re: some problems for an introductory python testHope Rouselle
||| `* Re: some problems for an introductory python testChris Angelico
|||  `- Re: some problems for an introductory python testHope Rouselle
||+* Re: some problems for an introductory python testChris Angelico
|||`* Re: some problems for an introductory python testHope Rouselle
||| +* Re: some problems for an introductory python testChris Angelico
||| |`* Re: some problems for an introductory python testHope Rouselle
||| | `* Re: some problems for an introductory python testChris Angelico
||| |  `- Re: some problems for an introductory python testHope Rouselle
||| +- Re: some problems for an introductory python testChris Angelico
||| +- Re: some problems for an introductory python testMRAB
||| +- Re: some problems for an introductory python testDennis Lee Bieber
||| +- Re: some problems for an introductory python testGrant Edwards
||| +- Re: some problems for an introductory python testDennis Lee Bieber
||| `- Re: some problems for an introductory python testCameron Simpson
||`- RE: some problems for an introductory python testAvi Gross
|`* Re: some problems for an introductory python testGrant Edwards
| +- Re: some problems for an introductory python testGreg Ewing
| `- Re: some problems for an introductory python testHope Rouselle
`- Re: some problems for an introductory python testAbhiram R

Pages:123
Re: some problems for an introductory python test

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

  copy mid

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

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: abhi.dar...@gmail.com (Abhiram R)
Newsgroups: comp.lang.python
Subject: Re: some problems for an introductory python test
Date: Tue, 17 Aug 2021 00:58:43 +0530
Lines: 56
Message-ID: <mailman.403.1629142163.4164.python-list@python.org>
References: <868s1acoo1.fsf@jevedi.xotimo>
<CADgpKWaBwtyBv_zPDX_uqM_YAx4ZQhoWygRQt1y_GoDqr0AfCg@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Trace: news.uni-berlin.de d42ZMTWe1j8XkvhDrVG51wd7FumrNj4mxZFIehIa0VVQ==
Return-Path: <abhi.darkness@gmail.com>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
reason="2048-bit key; unprotected key"
header.d=gmail.com header.i=@gmail.com header.b=hpeJLH6m;
dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.002
X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'absolute': 0.05;
"python's": 0.05; 'string': 0.05; 'subject:python': 0.06;
'hopefully': 0.07; 'real-world': 0.07; 'solving': 0.07; 'python.':
0.07; 'url:mailman': 0.09; 'aug': 0.09; 'cc:addr:python-list':
0.09; 'other.': 0.09; 'subject:test': 0.09; "can't": 0.14;
'questions.': 0.14; "(there's": 0.16; '...]': 0.16; 'assuming':
0.16; 'idea.': 0.16; 'input.': 0.16; 'limits.': 0.16; 'loops':
0.16; 'loops,': 0.16; 'oop': 0.16; 'parsing': 0.16; 'procedures,':
0.16; 'python!': 0.16; 'required.': 0.16; 'size.': 0.16; 'solved':
0.16; 'strings,': 0.16; 'subset': 0.16; 'tuples,': 0.16; 'wrote:':
0.16; 'url:listinfo': 0.16; 'values': 0.16; 'python': 0.16;
'tue,': 0.18; 'uses': 0.19; 'cc:addr:python.org': 0.19; 'url-
ip:188.166.95.178/32': 0.20; 'url-ip:188.166.95/24': 0.20; 'url-
ip:188.166/16': 0.23; "i'd": 0.23; 'probably': 0.24; 'cannot':
0.24; 'cc:2**0': 0.27; 'course.': 0.27; 'length': 0.27;
'programming,': 0.27; 'default': 0.28; 'error': 0.28; 'url-
ip:188/8': 0.29; 'input': 0.29; 'think': 0.31; 'but': 0.31;
'fixed': 0.31; 'question.': 0.31; 'question': 0.32; "i'm": 0.32;
'cool': 0.32; 'fields': 0.32; 'ton': 0.32; 'message-
id:@mail.gmail.com': 0.33; 'using': 0.33; 'skip:" 20': 0.33;
'header:In-Reply-To:1': 0.33; 'subject:for': 0.33;
'received:google.com': 0.34; 'example,': 0.35; 'following': 0.35;
'from:addr:gmail.com': 0.35; 'lists': 0.37; 'really': 0.37;
'received:209.85': 0.38; 'url-ip:185.199.108.153/32': 0.38; 'url-
ip:185.199.108/24': 0.38; 'url-ip:185.199.109.153/32': 0.38; 'url-
ip:185.199.109/24': 0.38; 'url-ip:185.199.110.153/32': 0.38; 'url-
ip:185.199.110/24': 0.38; 'url-ip:185.199.111.153/32': 0.38; 'url-
ip:185.199.111/24': 0.38; 'url-ip:185.199/16': 0.38; "it's": 0.38;
'something': 0.38; 'received:209': 0.38; 'use': 0.38; '8bit%:12':
0.39; 'put': 0.39; 'students': 0.40; 'test': 0.40; 'could': 0.40;
'skip:h 10': 0.61; 'hope': 0.61; '10,': 0.61; 'check': 0.62;
'gives': 0.63; 'world': 0.64; 'experience': 0.64; 'look': 0.66;
'times': 0.66; 'url:net': 0.66; 'less': 0.68; 'site': 0.69;
'subject:some': 0.69; '8bit%:6': 0.71; 'quickly': 0.81; '2021':
0.84; 'consuming': 0.84; 'go.': 0.84; 'maths': 0.84; 'procedures':
0.84; 'prototype': 0.84; 'received:209.85.216': 0.84; 'strings':
0.84; 'stuff,': 0.84; 'stuff.\xc2\xa0': 0.84; 'tiny': 0.91;
'produces': 0.93
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; bh=1Nx2YyLlH0yrA90TlNkGjaq4zYckaAYI22p1Ura1LC8=;
b=hpeJLH6mylMkQUgnuytG4wRvZ/oqZzeDOcSEwF4+yEsUxdGm5ZwikAup8DADgLKevG
WL67lPYG0yp+9qhe7aV1HUZLLRaefhYv496XQ1dGhGp9TpN9vVcOhLHkBjwHVzmTHC+t
djIHlS1t7bq+l8Usf9vhOMyo13pPcnHZffuJWXxKYQRi9Lf1roWds5M/kJe6FoqURbRw
lvdjMqmpIYEL3zvEBq3n5tUwAPHUHaHvjyPHCpcVJ45puCkQK8W/ICirxmg7okTHbfbB
OxqRm9QzYRk/wI9gWvqvJhnnGR2ocLWwvVIxI3PsFUZg2ZqrCMlrrYWTcuIu58HkQkPQ
8CQA==
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;
bh=1Nx2YyLlH0yrA90TlNkGjaq4zYckaAYI22p1Ura1LC8=;
b=VroO74LxTFRxeTtNWX/o2UcGlubpk6E4AOL2uM8THcu4AjhG4lseKZj0o/tqKWWpN/
yiUZ9O877WkExJqhf4/lBH43jDuji5NRHn+TXVfiFsngcI/MEktJHgZi+oq5jNIE2A0Z
RqhfUhHvV3c2QYl72OmCTiz9U4SUboVXpZY/q2k3j97WjDKMW9W4h+W55HBxIpJIlAMO
ZFhiaTQqTQFgPe+xvEtEI41fXnV98JULXxJBlYfE9CMnXB2DbH1JsengcX34H0v9mwOW
kzz+K+9Ukpshd4K52zMjY3SxxOrUsrPXAi1CpicGprreaBUlQ/FYZzFqnjljHXl2agpR
/1AA==
X-Gm-Message-State: AOAM531l4ztShhr2RYHnxpYN3spYuh3EKUViwc1fYXivc3M/xAwBDo2s
lc2HD6YC8dVuwpT7n+uW5F8pFo5JwANR+8SZa/8=
X-Google-Smtp-Source: ABdhPJwdMMlr50ApY3snPEBwsqHd11vC8L4vvggw2IHm9I57cLb2if2DYN/6l+uaCXJqpzNqcdH/kMgam+0HS5caDMA=
X-Received: by 2002:a17:902:a604:b029:12c:dda2:30c4 with SMTP id
u4-20020a170902a604b029012cdda230c4mr309133plq.73.1629142160461; Mon, 16 Aug
2021 12:29:20 -0700 (PDT)
In-Reply-To: <868s1acoo1.fsf@jevedi.xotimo>
X-Content-Filtered-By: Mailman/MimeDel 2.1.34
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.34
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: <CADgpKWaBwtyBv_zPDX_uqM_YAx4ZQhoWygRQt1y_GoDqr0AfCg@mail.gmail.com>
X-Mailman-Original-References: <868s1acoo1.fsf@jevedi.xotimo>
 by: Abhiram R - Mon, 16 Aug 2021 19:28 UTC

Hello,
One of my absolute favorite places to go to practice Python questions from
is https://projecteuler.net . It's just Maths based questions that cannot
be solved by hand without consuming a Ton of time because of the high
limits.
This is how I learnt Python. By solving problems from the site in Python!
Happy to provide more tips wrt this if required.

Regards
Abhi R <http://abhiramr.com>

On Tue, Aug 10, 2021 at 2:56 AM Hope Rouselle <hrouselle@jevedi.xotimo>
wrote:

> I'm looking for questions to put on a test for students who never had
> any experience with programming, but have learned to use Python's
> procedures, default arguments, if-else, strings, tuples, lists and
> dictionaries. (There's no OOP at all in this course. Students don't
> even write ls.append(...). They write list.append(ls, ...)).
>
> I'd like to put questions that they would have to write procedures that
> would would be real-world type of stuff, without error checking,
> exceptions and such. So if you think of something more or less cool
> that uses loops, we can sometimes simplify it by assuming the input has
> a certain fixed size.
>
> I came up with the following question. Using strings of length 5
> (always), write a procedure histogram(s) that consumes a string and
> produces a dictionary whose keys are each substrings (of the string) of
> length 1 and their corresponding values are the number of times each
> such substrings appear. For example, histogram("aaaaa") = {"a": 5}.
> Students can "loop through" the string by writing out s[0], s[1], s[2],
> s[3], s[4].
>
> I'd like even better questions. I'd like questions that would tell them
> to write procedures that would also have inverses, so that one could
> check the other of the other. (A second question would ask for the
> inverse, but hopefully real world stuff. One such question could be
> parsing a line separate by fields such as "root:0:0:mypass:Super User"
> and another that gives them ["root", 0, 0, ...] and asks them to write
> "root:0:0:mypass:..." You get the idea.)
>
> Students know how to use str(). But they don't know how to use type(),
> so they can't really check for the type of the input. I probably
> couldn't ask them to write a prototype of a tiny subset of pickle, say.
>
> I think you get the idea. I hope you can provide me with creativity. I
> have been looking at books, but every one I look at they introduce loops
> very quickly and off they go. Thank you!
> --
> https://mail.python.org/mailman/listinfo/python-list
>

--
-Abhiram R

Re: some problems for an introductory python test

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

  copy mid

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

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: wlfr...@ix.netcom.com (Dennis Lee Bieber)
Newsgroups: comp.lang.python
Subject: Re: some problems for an introductory python test
Date: Mon, 16 Aug 2021 21:28:10 -0400
Organization: IISS Elusive Unicorn
Lines: 81
Message-ID: <mailman.406.1629164180.4164.python-list@python.org>
References: <mailman.341.1628569106.4164.python-list@python.org>
<86lf599zse.fsf@jevedi.xotimo>
<CAPTjJmp9OvxGuMH9Mj66Ha19zf8xjaBsBGOy-gdaeVKu9v+9Ww@mail.gmail.com>
<mailman.344.1628623474.4164.python-list@python.org>
<868s18b1p7.fsf@jevedi.com>
<CAPTjJmoDofU-X3Q7+j1E5_G-d=evsgbsWdbeHNDBBiBprt3v2A@mail.gmail.com>
<k5k8hgt6apk88p4pat8m25t67rgbaqhkkc@4ax.com>
<mailman.356.1628724134.4164.python-list@python.org>
<86o89zz9ch.fsf@jevedi.com>
<rc0mhg19k4ebtnqfkhri571j501lrd3r86@4ax.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: news.uni-berlin.de Xva82K2jmQHOffKv60d6iAayod1cxC/nq7OBXB/iLM6A==
Return-Path: <python-python-list@m.gmane-mx.org>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=none reason="no signature";
dkim-adsp=none (unprotected policy); dkim-atps=neutral
X-Spam-Status: OK 0.004
X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'indicate': 0.05; 'thread':
0.05; 'subject:python': 0.06; 'explicitly': 0.07; 'linux': 0.07;
'returning': 0.07; 'sun,': 0.07; 'wanting': 0.07; 'api,': 0.09;
'aug': 0.09; 'messages.': 0.09; 'nasty': 0.09; 'overhead': 0.09;
'ports': 0.09; 'received:ciao.gmane.io': 0.09;
'received:gmane.io': 0.09; 'received:list': 0.09; 'subject:test':
0.09; 'writes:': 0.09; "can't": 0.14; '"data': 0.16; '(closer':
0.16; "(i'm": 0.16; '(when': 0.16; 'declared': 0.16; 'granted,':
0.16; 'ignored': 0.16; 'message-id:@4ax.com': 0.16; 'passed.':
0.16; 'queues': 0.16; 'received:116.202': 0.16;
'received:116.202.254': 0.16; 'received:116.202.254.214': 0.16;
'reused': 0.16; 'sent,': 0.16; 'sockets': 0.16; 'sounds': 0.16;
'spoke': 0.16; 'system;': 0.16; 'tour': 0.16; 'memory': 0.16;
'api': 0.18; 'applications': 0.18; "aren't": 0.20; "i've": 0.22;
'basically': 0.23; 'bit.': 0.23; 'focused': 0.23; 'problem,':
0.23; 'to:addr:python-list': 0.23; 'probably': 0.24; 'anything':
0.24; 'written': 0.24; 'purpose': 0.26; 'seems': 0.26; 'space':
0.26; 'normally': 0.27; 'party': 0.27; 'port': 0.27; 'header:User-
Agent:1': 0.31; 'header:Organization:1': 0.31; 'there': 0.31;
'but': 0.31; 'fact': 0.31; 'looked': 0.31; 'shared': 0.31;
"doesn't": 0.32; 'difference': 0.32; 'structure': 0.32; 'program':
0.33; 'using': 0.33; 'requires': 0.33; 'work.': 0.33;
'subject:for': 0.33; 'same': 0.34; 'year': 0.35; 'running': 0.35;
'book': 0.35; 'track': 0.35; 'windows': 0.36; 'close': 0.36;
'two': 0.37; 'way': 0.37; 'guide': 0.37; 'hard': 0.38; 'those':
0.38; 'read': 0.38; 'though': 0.38; "it's": 0.38; 'something':
0.38; 'use': 0.38; 'does': 0.38; 'list': 0.39; 'means': 0.40;
'called': 0.40; 'messages': 0.40; 'require': 0.40; 'ago': 0.40;
'valid': 0.40; 'common': 0.60; 'light': 0.60; 'feel': 0.61;
'days': 0.61; 'search': 0.61; 'well.': 0.61; 'hope': 0.61;
'entire': 0.61; 'gave': 0.61; 'online': 0.62; 'skip:b 10': 0.62;
'data,': 0.63; 'internal': 0.63; 'true': 0.63; 'named': 0.63;
'your': 0.64; 'seen': 0.65; 'only,': 0.65; 'let': 0.65; 'look':
0.66; 'decided': 0.67; 'free': 0.68; 'virtual': 0.69; 'change.':
0.69; 'changing': 0.69; 'creator': 0.69; 'impressed': 0.69;
'mailboxes': 0.69; 'subject:some': 0.69; 'writers': 0.69;
'received:116': 0.71; 'easy': 0.75; 'treat': 0.77; 'quick': 0.78;
'client': 0.79; '2021': 0.84; 'allocated': 0.84; 'inherent': 0.84;
'mapped': 0.84; 'pipes': 0.84; 'presumed': 0.84; 'qualify': 0.84;
'url-ip:76/8': 0.84; 'tiny': 0.91
X-Injected-Via-Gmane: http://gmane.org/
User-Agent: ForteAgent/8.00.32.1272
X-Mailman-Approved-At: Mon, 16 Aug 2021 21:36:19 -0400
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.34
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: <rc0mhg19k4ebtnqfkhri571j501lrd3r86@4ax.com>
X-Mailman-Original-References: <mailman.341.1628569106.4164.python-list@python.org>
<86lf599zse.fsf@jevedi.xotimo>
<CAPTjJmp9OvxGuMH9Mj66Ha19zf8xjaBsBGOy-gdaeVKu9v+9Ww@mail.gmail.com>
<mailman.344.1628623474.4164.python-list@python.org>
<868s18b1p7.fsf@jevedi.com>
<CAPTjJmoDofU-X3Q7+j1E5_G-d=evsgbsWdbeHNDBBiBprt3v2A@mail.gmail.com>
<k5k8hgt6apk88p4pat8m25t67rgbaqhkkc@4ax.com>
<mailman.356.1628724134.4164.python-list@python.org>
<86o89zz9ch.fsf@jevedi.com>
 by: Dennis Lee Bieber - Tue, 17 Aug 2021 01:28 UTC

On Sun, 15 Aug 2021 00:15:58 -0300, Hope Rouselle <hrouselle@jevedi.com>
declaimed the following:

Giganews seems to have just vomited up three days worth of traffic...

>Dennis Lee Bieber <wlfraed@ix.netcom.com> writes:
>
>>
>> Granted, the fact that the Amiga used a shared common address space for
>> all running applications made IPC quite easy -- one looked up the
>> application message port, then added a small packet to the linked list
>> associated with the port. That small packet basically held the address of
>> the message port for returning data, and the address of the data being
>> passed. The closet thing I've seen to that capability on systems with
>> process-isolated virtual memory is (Open)VMS "mailbox" structures. The
>> difference being that the entire data had to be written (QIO) to the
>> mailbox, and the receiver had to read (another QIO call) the message --
>> this allowed the address space to change.
>>
>> I've not seen anything equivalent in my light perusal of the Win32 API
>> (the various guide books aren't layed out in any way to be a reference),
>> and Linux seems to use UNIX sockets for IPC... No way to search for a
>> connection point by name...
>
>I don't know anything about Amiga, REXX et cetera, so I might be totall
>off here. But since you spoke of your perusal of the Win32 API, let me
>add a tiny bit. I gave myself a quick tour through the Win32 API using
>Pavel Yosifovich's book ``Windows 10 System Programming''. It's a two
>volume work. The thing that impressed me the most was the many ways to
>do the IPC. The purpose the work is clearly to show what is available
>and it it probably does the job well. (I ignored Windows for most of my
>life and now I decided to take a look at it. I don't feel it has much
>of the elegance of UNIX. It's what it is.)

For a book that was published only a year ago -- it seems to be hard to
find... Amazon has v1, but not v2.

I have the "Windows Internals 6th" both volumes.

The closet those get to IPC is something called ALPC -- and that is
declared to be internal only, not available to third party programmers.

"Programming Windows 6th" is focused on using C# (which, for the most
part, means using the "managed" API, not the Win32 API directly).

"Mailslots" (I'm using Google to find Windows IPC options) initially
sound close to Amiga message ports... Except there is no status return
inherent to the system; Amiga messages contain a return address so a
program can wait for the status of processing by the destination address.
They also don't qualify as VMS mailboxes as there can only be one reader
(the creator of the mailslot). VMS mailboxes allow multiple writers and/or
multiple readers.

"File mapping" doesn't provide any form of queuing -- multiple
"writers" would require manually implementing some protocol to track "next
available space" in the mapped file. It would allow bidirectional message
passing, but again that requires some rather nasty overhead information
(when is the return status valid -- it is presumed the client wanting the
return status would get it from the same memory space as the message it
sent, and that space can't be reused until the client explicitly frees it
-- again by some overhead protocol changing headers of free space.

"Data Copy" also sounds close to Amiga message ports (closer than
"Mailslots"), but the online documentation doesn't indicate if it queues
messages. The documentation doesn't illustrate HOW to return TRUE or FALSE
(processed/rejected). It advices that the receiver should treat the data as
read-only -- though I have to wonder if it /could/ write a return status
into the same message structure before "returning TRUE".

Named Pipes and Sockets both have the "tied to endpoints" problem, and
in the case of Pipes, may only allow one sender to connect at a time
(sockets are also one connection, but normally the receivers spawns a
thread for each active connection and the connections are made using
different allocated sockets).

--
Wulfraed Dennis Lee Bieber AF6VN
wlfraed@ix.netcom.com http://wlfraed.microdiversity.freeddns.org/

Re: some problems for an introductory python test

<86eeapfhsz.fsf@jevedi.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!aioe.org!jAy809o/BiVBNYBZ1AI+qA.user.46.165.242.75.POSTED!not-for-mail
From: hrouse...@jevedi.com (Hope Rouselle)
Newsgroups: comp.lang.python
Subject: Re: some problems for an introductory python test
Date: Thu, 19 Aug 2021 14:47:08 -0300
Organization: Aioe.org NNTP Server
Message-ID: <86eeapfhsz.fsf@jevedi.com>
References: <868s1acoo1.fsf@jevedi.xotimo>
<9e930795-7664-4e75-48b6-afa03c666e48@wichmann.us>
<CAPTjJmoQqPErXw2WAN-FgjZq3k2AnZLEYvOruyRJ0r7nNcRCnA@mail.gmail.com>
<c495f0ee-cc76-709c-e2fb-7dde4567d853@wichmann.us>
<CAPTjJmo_zoqB1MbbmzsAMLUGVcevs1Nz-cJk0Y6-Q7typbP3Mw@mail.gmail.com>
<mailman.341.1628569106.4164.python-list@python.org>
<86lf599zse.fsf@jevedi.xotimo>
<CAPTjJmp9OvxGuMH9Mj66Ha19zf8xjaBsBGOy-gdaeVKu9v+9Ww@mail.gmail.com>
<mailman.344.1628623474.4164.python-list@python.org>
<868s18b1p7.fsf@jevedi.com>
<CAPTjJmoDofU-X3Q7+j1E5_G-d=evsgbsWdbeHNDBBiBprt3v2A@mail.gmail.com>
<mailman.351.1628712943.4164.python-list@python.org>
<868s16zol5.fsf@jevedi.com>
<CAPTjJmrG=+3EHBr=18k5M4d+p2Evd3HW9mpb2CjnRu5C0KeG4Q@mail.gmail.com>
<mailman.369.1628793716.4164.python-list@python.org>
<86sfzbwdyl.fsf@jevedi.com>
<CAPTjJmoTgNrFAFCexmZ2eVq67gi2bdimhO+rth=K2DhrpimKDw@mail.gmail.com>
<mailman.400.1629141677.4164.python-list@python.org>
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: gioia.aioe.org; logging-data="51392"; posting-host="jAy809o/BiVBNYBZ1AI+qA.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
X-Notice: Filtered by postfilter v. 0.9.2
Cancel-Lock: sha1:oR3N5W5F9x9hMotReACmbZWYo1k=
 by: Hope Rouselle - Thu, 19 Aug 2021 17:47 UTC

Chris Angelico <rosuav@gmail.com> writes:

> On Tue, Aug 17, 2021 at 3:51 AM Hope Rouselle <hrouselle@jevedi.com>
> wrote:
>>
>> Chris Angelico <rosuav@gmail.com> writes:
>> >> Wow, I kinda feel the same as you here. I think this justifies
>> >> perhaps
>> >> using a hardware solution. (Crazy idea?! Lol.)
>> >
>> > uhhh........ Yes. Very crazy idea. Can't imagine why anyone would
>> > ever
>> > think about doing that.
>>
>> Lol. Really? I mean a certain panic button. You know the GNU Emacs.
>> It has this queue with the implications you mentioned --- as much as it
>> can. (It must of course get the messages from the system, otherwise it
>> can't do anything about it.) And it has the panic button C-g. The
>> keyboard has one the highest precedences in hardware interrupts,
>> doesn't
>> it not? A certain very important system could have a panic button that
>> invokes a certain debugger, say, for a crisis-moment.
>>
>> But then this could be a lousy engineering strategy. I am not an
>> expert
>> at all in any of this. But I'm surprised with your quick
>> dismissal. :-)
>>
>> > Certainly nobody in his right mind would have WatchCat listening on
>> > the serial port's Ring Indicator interrupt, and then grab a paperclip
>> > to bridge the DTR and RI pins on an otherwise-unoccupied serial port
>> > on the back of the PC. (The DTR pin was kept high by the PC, and
>> > could
>> > therefore be used as an open power pin to bring the RI high.)
>>
>> Why not? Misuse of hardware? Too precious of a resource?
>>
>> > If you're curious, it's pins 4 and 9 - diagonally up and in from the
>> > short
>> > corner. http://www.usconverters.com/index.php?main_page=page&id=61&chapter=0
>>
>> You know your pins! That's impressive. I thought the OS itself could
>> use something like that. The fact that they never do... Says
>> something,
>> doesn't it? But it's not too obvious to me.
>>
>> > And of COURSE nobody would ever take an old serial mouse, take the
>> > ball out of it, and turn it into a foot-controlled signal... although
>> > that wasn't for WatchCat, that was for clipboard management
>> > between my
>> > app and a Windows accounting package that we used. But that's a
>> > separate story.
>>
>> Lol. I feel you're saying you would. :-)
>
> This was all a figure of speech, and the denials were all tongue in
> cheek. Not only am I saying we would, but we *did*. All of the above.

Cool! :-)

> The Ring Indicator trick was one of the best, since we had very little
> other use for serial ports, and it didn't significantly impact the
> system during good times, but was always reliable when things went
> wrong.
>
> (And when I posted it, I could visualize the port and knew which pins
> to bridge, but had to go look up a pinout to be able to say their pin
> numbers and descriptions.)

Nice!

>> I heard of Python for the first time in the 90s. I worked at an ISP.
>> Only one guy was really programming there, Allaire ColdFusion. But,
>> odd enough, we used to say we would ``write a script in Python'' when
>> we meant to say we were going out for a smoke. I think that was
>> precisely because nobody knew that ``Python'' really was. I never
>> expected it to be a great language. I imagined it was something like
>> Tcl. (Lol, no offense at all towards Tcl.)
>
> Haha, that's a weird idiom!

Clueless people --- from Rio de Janeiro area in Brazil. :-) It was
effectively just an in-joke.

> Funny you should mention Tcl.
>
> https://docs.python.org/3/library/tkinter.html

Cool! Speaking of GUIs and Python, that Google software called Backup
and Sync (which I think it's about to be obsoleted by Google Drive) is
written in Python --- it feels a bit heavy. The GUI too seems a bit
slow sometimes. Haven't tried their ``Google Drive'' as a replacement
yet.

Re: some problems for an introductory python test

<861r6oja8u.fsf@jevedi.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!aioe.org!uJcc3KkFbqlcwieF25NGwQ.user.46.165.242.75.POSTED!not-for-mail
From: hrouse...@jevedi.com (Hope Rouselle)
Newsgroups: comp.lang.python
Subject: Re: some problems for an introductory python test
Date: Fri, 20 Aug 2021 14:29:05 -0300
Organization: Aioe.org NNTP Server
Message-ID: <861r6oja8u.fsf@jevedi.com>
References: <mailman.341.1628569106.4164.python-list@python.org>
<86lf599zse.fsf@jevedi.xotimo>
<CAPTjJmp9OvxGuMH9Mj66Ha19zf8xjaBsBGOy-gdaeVKu9v+9Ww@mail.gmail.com>
<mailman.344.1628623474.4164.python-list@python.org>
<868s18b1p7.fsf@jevedi.com>
<CAPTjJmoDofU-X3Q7+j1E5_G-d=evsgbsWdbeHNDBBiBprt3v2A@mail.gmail.com>
<k5k8hgt6apk88p4pat8m25t67rgbaqhkkc@4ax.com>
<mailman.356.1628724134.4164.python-list@python.org>
<86o89zz9ch.fsf@jevedi.com>
<rc0mhg19k4ebtnqfkhri571j501lrd3r86@4ax.com>
<mailman.406.1629164180.4164.python-list@python.org>
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: gioia.aioe.org; logging-data="25398"; posting-host="uJcc3KkFbqlcwieF25NGwQ.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
Cancel-Lock: sha1:jnuwm7m9o1btMYMv7xd/yWu2atA=
X-Notice: Filtered by postfilter v. 0.9.2
 by: Hope Rouselle - Fri, 20 Aug 2021 17:29 UTC

Dennis Lee Bieber <wlfraed@ix.netcom.com> writes:

> On Sun, 15 Aug 2021 00:15:58 -0300, Hope Rouselle <hrouselle@jevedi.com>
> declaimed the following:
>
> Giganews seems to have just vomited up three days worth of traffic...
>
>>Dennis Lee Bieber <wlfraed@ix.netcom.com> writes:
>>
>>>
>>> Granted, the fact that the Amiga used a shared common address space for
>>> all running applications made IPC quite easy -- one looked up the
>>> application message port, then added a small packet to the linked list
>>> associated with the port. That small packet basically held the address of
>>> the message port for returning data, and the address of the data being
>>> passed. The closet thing I've seen to that capability on systems with
>>> process-isolated virtual memory is (Open)VMS "mailbox" structures. The
>>> difference being that the entire data had to be written (QIO) to the
>>> mailbox, and the receiver had to read (another QIO call) the message --
>>> this allowed the address space to change.
>>>
>>> I've not seen anything equivalent in my light perusal of the Win32 API
>>> (the various guide books aren't layed out in any way to be a reference),
>>> and Linux seems to use UNIX sockets for IPC... No way to search for a
>>> connection point by name...
>>
>>I don't know anything about Amiga, REXX et cetera, so I might be totall
>>off here. But since you spoke of your perusal of the Win32 API, let me
>>add a tiny bit. I gave myself a quick tour through the Win32 API using
>>Pavel Yosifovich's book ``Windows 10 System Programming''. It's a two
>>volume work. The thing that impressed me the most was the many ways to
>>do the IPC. The purpose the work is clearly to show what is available
>>and it it probably does the job well. (I ignored Windows for most of my
>>life and now I decided to take a look at it. I don't feel it has much
>>of the elegance of UNIX. It's what it is.)
>
> For a book that was published only a year ago -- it seems to be hard to
> find... Amazon has v1, but not v2.

Indeed. I believe it's because it's not quite released yet. I had
found it here:

https://leanpub.com/windows10systemprogrammingpart2

And this seems to be a sort-of-early-release. I'm not really sure.

> I have the "Windows Internals 6th" both volumes.
>
> The closet those get to IPC is something called ALPC -- and that is
> declared to be internal only, not available to third party programmers.
>
> "Programming Windows 6th" is focused on using C# (which, for the most
> part, means using the "managed" API, not the Win32 API directly).

Makes sense.

> "Mailslots" (I'm using Google to find Windows IPC options) initially
> sound close to Amiga message ports... Except there is no status return
> inherent to the system; Amiga messages contain a return address so a
> program can wait for the status of processing by the destination address.
> They also don't qualify as VMS mailboxes as there can only be one reader
> (the creator of the mailslot). VMS mailboxes allow multiple writers and/or
> multiple readers.
>
> "File mapping" doesn't provide any form of queuing -- multiple
> "writers" would require manually implementing some protocol to track "next
> available space" in the mapped file. It would allow bidirectional message
> passing, but again that requires some rather nasty overhead information
> (when is the return status valid -- it is presumed the client wanting the
> return status would get it from the same memory space as the message it
> sent, and that space can't be reused until the client explicitly frees it
> -- again by some overhead protocol changing headers of free space.
>
> "Data Copy" also sounds close to Amiga message ports (closer than
> "Mailslots"), but the online documentation doesn't indicate if it queues
> messages. The documentation doesn't illustrate HOW to return TRUE or FALSE
> (processed/rejected). It advices that the receiver should treat the data as
> read-only -- though I have to wonder if it /could/ write a return status
> into the same message structure before "returning TRUE".
>
> Named Pipes and Sockets both have the "tied to endpoints" problem, and
> in the case of Pipes, may only allow one sender to connect at a time
> (sockets are also one connection, but normally the receivers spawns a
> thread for each active connection and the connections are made using
> different allocated sockets).

Thanks for these summaries!

Pages:123
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor