Re: [Python-Dev] Re: Python 0.9.1

2021-02-18 Thread Dan Stromberg
On Thu, Feb 18, 2021 at 9:39 PM David Mertz  wrote:

> As Skip pointed out to me privately, there are some minor limitations with
> this version.  E.g.:
>
> % python
> >>> import glob
> >>> import sys
> >>> print 'hello'
> hello
> >>> print 2+2
> 4
> >>> print 2*2
> Unhandled exception: run-time error: integer overflow
> Stack backtrace (innermost last):
>   File "", line 1
>

Huh.  I wonder what's different about my build:
$ /usr/local/cpython-0.9/bin/python
below cmd output started 2021 Thu Feb 18 10:24:00 PM PST
>>> 2*2
4
>>> print 2*2
4
>>>

You can download a script to build it and a bunch of other python versions
at https://stromberg.dnsalias.org/~strombrg/cpythons/
It includes all the tarballs you should need, at least for Debian. I
believe I used it on CentOS recently as well.  I haven't tried it on Ubuntu
in a while.
It depends on https://stromberg.dnsalias.org/~strombrg/cobble.html - and
I'd like to think that's its only external dependency.

HTH
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: [Python-Dev] Re: Python 0.9.1

2021-02-16 Thread Skip Montanaro
> Also mind
> http://www.dalkescientific.com/writings/diary/archive/2009/03/27/python_0_9_1p1.html
> for result comparison.

Thanks, Paul. I had lost track of Andrew. Good to know he's still out
there. I wonder why his tar file was never sucked up into the
historical releases page.

Whew! My stupid little extraction script did a reasonable job. I see
plenty of differences, but a cursory examination shows they are only
in leading whitespace. Where I translated "\t" to TAB, it seems Andrew
used a suitable number of spaces. Python modules/scripts seem more
plausibly indented, and the couple I tried worked, so I'm a bit more
confident I have things right:

% PYTHONPATH=lib ./src/python
>>> import string
>>> print string.upper('hello world!')
HELLO WORLD!
>>>
% ./src/python lib/fact.py
9
[3, 3, 41, 271]
4096
[2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]

The tests don't pass though. 1 * 1 raises an integer overflow exception:

>>> 1 * 1
Unhandled exception: run-time error: integer overflow
Stack backtrace (innermost last):
  File "", line 1

I'll let someone figure that out. :-)

At any rate, the git repo has been updated.

Skip
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: [Python-Dev] Re: Python 0.9.1

2021-02-16 Thread Skip Montanaro
> If someone knows how to get the original Usenet messages from what Google 
> published, let me know.

Seems the original shar is there buried in a Javascript string toward
the end of the file. I think I've got a handle on it, though it will
take a Python script to massage back into correct format.

Skip
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: [Python-Dev] Re: Python 0.9.1

2021-02-16 Thread Skip Montanaro
>
> Wow. Was white-space not significant in this release of Python? I see the
>> lack of indentation in the first Python programs.
>>
>
> Indentation most certainly was significant from day 0. I suspect what
> happened is that these files got busted somehow by the extraction process
> used by Skip or Hiromi.
>

Yes, that's certainly possible. While it's nice that Google has archived
this stuff, their faithfulness to the original formats leaves a bit to be
desired (and gmane still doesn't work for me, eliminating that option). Guido's
messages are displayed as HTML, and I saw no way to get at the raw Usenet
messages. I just copied the shar data and saved the result. It seems clear
that tabs copied as spaces. The Makefile indentation was hosed up. It
should have dawned on me that the .py, .c and .h files would be messed up
as well. I was only concerned with building the interpreter.

If someone knows how to get the original Usenet messages from what Google
published, let me know.

Skip

>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: [Python-Dev] Re: Python 0.9.1

2021-02-16 Thread Guido van Rossum
On Tue, Feb 16, 2021 at 2:59 PM Senthil Kumaran  wrote:

> On Tue, Feb 16, 2021 at 1:58 PM Skip Montanaro 
> wrote:
>
>>
>> I then pushed the result to a Github repo:
>>
>> https://github.com/smontanaro/python-0.9.1
>>
>
> Wow. Was white-space not significant in this release of Python? I see the
> lack of indentation in the first Python programs.
>

Indentation most certainly was significant from day 0. I suspect what
happened is that these files got busted somehow by the extraction process
used by Skip or Hiromi.

-- 
--Guido van Rossum (python.org/~guido)
*Pronouns: he/him **(why is my pronoun here?)*

-- 
https://mail.python.org/mailman/listinfo/python-list