Mailing List Archive

OT: AttributeError
On 29/09/2021 10.50, Stefan Ram wrote:
> (For Python programmers who have watched "Game of Thrones".)
>
> |>>> class girl:
> |... pass
> |...
> |>>> girl = girl()
> |>>> print( girl.name )
> |Traceback (most recent call last):
> | File "<stdin>", line 1, in <module>
> |AttributeError: A girl has no name.


For oldies, who remember the musical "South Pacific" (to say nothing of
calculating addresses on a backing-store):
sing "on a clear disk, you can seek forever..."

For C programmers who are fans of pirate stories:
long John # Silver

For those of us who remember/can compute in binary, octal, hex, or
decimal as-needed:
Why do programmers confuse All Hallows'/Halloween for Christmas Day?

--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
Re: OT: AttributeError [ In reply to ]
On 2021-09-29 at 11:38:22 +1300,
dn via Python-list <python-list@python.org> wrote:

> For those of us who remember/can compute in binary, octal, hex, or
> decimal as-needed:
> Why do programmers confuse All Hallows'/Halloween for Christmas Day?

That one is also very old. (Yes, I know the answer. No, I will not
spoil it for those who might not.) What do I have to do to gain the
insight necessary to have discovered that question and answer on my own?
--
https://mail.python.org/mailman/listinfo/python-list
Re: OT: AttributeError [ In reply to ]
On Wed, Sep 29, 2021 at 9:10 AM <2QdxY4RzWzUUiLuE@potatochowder.com> wrote:
>
> On 2021-09-29 at 11:38:22 +1300,
> dn via Python-list <python-list@python.org> wrote:
>
> > For those of us who remember/can compute in binary, octal, hex, or
> > decimal as-needed:
> > Why do programmers confuse All Hallows'/Halloween for Christmas Day?
>
> That one is also very old. (Yes, I know the answer. No, I will not
> spoil it for those who might not.) What do I have to do to gain the
> insight necessary to have discovered that question and answer on my own?

You'd have to be highly familiar with numbers in different notations,
to the extent that you automatically read 65 and 0x41 as the same
number. Or, even better, to be able to read off a hex dump and see E8
03 and instantly read it as "1,000 little-endian".

ChrisA
--
https://mail.python.org/mailman/listinfo/python-list
Re: OT: AttributeError [ In reply to ]
On 29/09/21 12:21 pm, Chris Angelico wrote:
> to the extent that you automatically read 65 and 0x41 as the same
> number.

Am I too geeky for reading both of them as 'A'?

--
Greg
--
https://mail.python.org/mailman/listinfo/python-list
Re: OT: AttributeError [ In reply to ]
On Wed, Sep 29, 2021 at 10:06 AM Greg Ewing <greg.ewing@canterbury.ac.nz> wrote:
>
> On 29/09/21 12:21 pm, Chris Angelico wrote:
> > to the extent that you automatically read 65 and 0x41 as the same
> > number.
>
> Am I too geeky for reading both of them as 'A'?
>

Not even slightly, and I did deliberately choose a printable ASCII
value for that parallel. If E8 03 can be 1000, then 41 68 20 79 65 73
can be "Ah yes".

ChrisA
--
https://mail.python.org/mailman/listinfo/python-list
Re: OT: AttributeError [ In reply to ]
On 29/09/2021 12.21, Chris Angelico wrote:
> On Wed, Sep 29, 2021 at 9:10 AM <2QdxY4RzWzUUiLuE@potatochowder.com> wrote:
>>
>> On 2021-09-29 at 11:38:22 +1300,
>> dn via Python-list <python-list@python.org> wrote:
>>
>>> For those of us who remember/can compute in binary, octal, hex, or
>>> decimal as-needed:
>>> Why do programmers confuse All Hallows'/Halloween for Christmas Day?
>>
>> That one is also very old. (Yes, I know the answer. No, I will not
>> spoil it for those who might not.) What do I have to do to gain the
>> insight necessary to have discovered that question and answer on my own?
>
> You'd have to be highly familiar with numbers in different notations,
> to the extent that you automatically read 65 and 0x41 as the same
> number. Or, even better, to be able to read off a hex dump and see E8
> 03 and instantly read it as "1,000 little-endian".

Now, now, young-Chris, make way for those of us who are qualified to
carry walking-sticks!


...or see "C1" and recognise that also to represent an "A"?


To continue, to the bit-ter end:

Sometimes I think you are a bit too much - said the 0 to the 1.

If I hold up two fingers, am I insulting you, or asking for three of
something?

Programming in Java is the process of converting source code into core
dumps.

and, the Dijkstra quotation:
"If debugging is the process of removing bugs, then programming must be
the process of putting them in"

--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
Re: OT: AttributeError [ In reply to ]
On Wed, Sep 29, 2021 at 11:59 AM dn via Python-list
<python-list@python.org> wrote:
> If I hold up two fingers, am I insulting you, or asking for three of
> something?
>

A Roman soldier walked into a bar holding up two fingers. "Five beers, please"

ChrisA
--
https://mail.python.org/mailman/listinfo/python-list
Re: OT: AttributeError [ In reply to ]
On 2021-09-29 at 09:21:34 +1000,
Chris Angelico <rosuav@gmail.com> wrote:

> On Wed, Sep 29, 2021 at 9:10 AM <2QdxY4RzWzUUiLuE@potatochowder.com> wrote:
> >
> > On 2021-09-29 at 11:38:22 +1300,
> > dn via Python-list <python-list@python.org> wrote:
> >
> > > For those of us who remember/can compute in binary, octal, hex, or
> > > decimal as-needed:
> > > Why do programmers confuse All Hallows'/Halloween for Christmas Day?
> >
> > That one is also very old. (Yes, I know the answer. No, I will not
> > spoil it for those who might not.) What do I have to do to gain the
> > insight necessary to have discovered that question and answer on my own?
>
> You'd have to be highly familiar with numbers in different notations,
> to the extent that you automatically read 65 and 0x41 as the same
> number ...

I do that. And I have done that, with numbers that size, since the late
1970s (maybe the mid 1970s, for narrow definitions of "different").

There's at least one more [sideways, twisted] leap to the point that you
even think of translating the names of those holidays into an arithmetic
riddle.

> ... Or, even better, to be able to read off a hex dump and see E8 03
> and instantly read it as "1,000 little-endian".

59535 big endian. Warningm flamebait ahead: Who thinks in little
endian? (I was raised on 6502s and 680XX CPUs; 8080s and Z80s always
did things backwards.)
--
https://mail.python.org/mailman/listinfo/python-list
Re: OT: AttributeError [ In reply to ]
On 2021-09-29 at 09:21:34 +1000,
Chris Angelico <rosuav@gmail.com> wrote:

> ... read off a hex dump and see E8
> 03 and instantly read it as "1,000 little-endian".

ITYM 000,1 little-endian. ;-)

(Or possibly 000.1, depending on your locale.)
--
https://mail.python.org/mailman/listinfo/python-list
Re: OT: AttributeError [ In reply to ]
On Wed, Sep 29, 2021 at 12:06 PM <2QdxY4RzWzUUiLuE@potatochowder.com> wrote:
> > ... Or, even better, to be able to read off a hex dump and see E8 03
> > and instantly read it as "1,000 little-endian".
>
> 59535 big endian. Warningm flamebait ahead: Who thinks in little
> endian? (I was raised on 6502s and 680XX CPUs; 8080s and Z80s always
> did things backwards.)

I do, because most of the file formats I've had to delve into have
been little-endian. It seems to be far more common to have
undocumented file formats created by Windows programs than, say,
undocumented network packet formats (which would use network byte
order, naturally).

ChrisA
--
https://mail.python.org/mailman/listinfo/python-list
Re: OT: AttributeError [ In reply to ]
On 29/09/21 3:03 pm, 2QdxY4RzWzUUiLuE@potatochowder.com wrote:
> Who thinks in little
> endian? (I was raised on 6502s and 680XX CPUs; 8080s and Z80s always
> did things backwards.)

The first CPU I wrote code for was a National SC/MP, which doesn't
have an endianness, since it never deals with more than a byte at
a time. The second was a 6800, which is big-endian. That's definitely
more convenient when you're hand-assembling code! I can see the
advantages of little-endian when you're implementing a CPU, though.

--
Greg
--
https://mail.python.org/mailman/listinfo/python-list
Re: OT: AttributeError [ In reply to ]
On 2021-09-29 03:03, 2QdxY4RzWzUUiLuE@potatochowder.com wrote:
> On 2021-09-29 at 09:21:34 +1000,
> Chris Angelico <rosuav@gmail.com> wrote:
>
>> On Wed, Sep 29, 2021 at 9:10 AM <2QdxY4RzWzUUiLuE@potatochowder.com> wrote:
>> >
>> > On 2021-09-29 at 11:38:22 +1300,
>> > dn via Python-list <python-list@python.org> wrote:
>> >
>> > > For those of us who remember/can compute in binary, octal, hex, or
>> > > decimal as-needed:
>> > > Why do programmers confuse All Hallows'/Halloween for Christmas Day?
>> >
>> > That one is also very old. (Yes, I know the answer. No, I will not
>> > spoil it for those who might not.) What do I have to do to gain the
>> > insight necessary to have discovered that question and answer on my own?
>>
>> You'd have to be highly familiar with numbers in different notations,
>> to the extent that you automatically read 65 and 0x41 as the same
>> number ...
>
> I do that. And I have done that, with numbers that size, since the late
> 1970s (maybe the mid 1970s, for narrow definitions of "different").
>
> There's at least one more [sideways, twisted] leap to the point that you
> even think of translating the names of those holidays into an arithmetic
> riddle.
>
>> ... Or, even better, to be able to read off a hex dump and see E8 03
>> and instantly read it as "1,000 little-endian".
>
> 59535 big endian. Warningm flamebait ahead: Who thinks in little
> endian? (I was raised on 6502s and 680XX CPUs; 8080s and Z80s always
> did things backwards.)
>
6502 is little-endian.
--
https://mail.python.org/mailman/listinfo/python-list
Re: OT: AttributeError [ In reply to ]
On 29/09/2021 19.16, Greg Ewing wrote:
> On 29/09/21 3:03 pm, 2QdxY4RzWzUUiLuE@potatochowder.com wrote:
>> Who thinks in little
>> endian?  (I was raised on 6502s and 680XX CPUs; 8080s and Z80s always
>> did things backwards.)
>
> The first CPU I wrote code for was a National SC/MP, which doesn't
> have an endianness, since it never deals with more than a byte at
> a time. The second was a 6800, which is big-endian. That's definitely
> more convenient when you're hand-assembling code! I can see the
> advantages of little-endian when you're implementing a CPU, though.


Oh yes! The D2 kit - I kept those books for years...
https://www.electronixandmore.com/adam/temp/6800trainer/mek6800d2.html
--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list
Re: OT: AttributeError [ In reply to ]
Ah, Z80s (deep sigh).  Those were the days!  You could disassemble the
entire CP/M operating system (including the BIOS), and still have many
Kb to play with!  Real programmers don't need gigabytes!

On 29/09/2021 03:03, 2QdxY4RzWzUUiLuE@potatochowder.com wrote:
> On 2021-09-29 at 09:21:34 +1000,
> Chris Angelico <rosuav@gmail.com> wrote:
>
>> On Wed, Sep 29, 2021 at 9:10 AM <2QdxY4RzWzUUiLuE@potatochowder.com> wrote:
>>> On 2021-09-29 at 11:38:22 +1300,
>>> dn via Python-list <python-list@python.org> wrote:
>>>
>>>> For those of us who remember/can compute in binary, octal, hex, or
>>>> decimal as-needed:
>>>> Why do programmers confuse All Hallows'/Halloween for Christmas Day?
>>> That one is also very old. (Yes, I know the answer. No, I will not
>>> spoil it for those who might not.) What do I have to do to gain the
>>> insight necessary to have discovered that question and answer on my own?
>> You'd have to be highly familiar with numbers in different notations,
>> to the extent that you automatically read 65 and 0x41 as the same
>> number ...
> I do that. And I have done that, with numbers that size, since the late
> 1970s (maybe the mid 1970s, for narrow definitions of "different").
>
> There's at least one more [sideways, twisted] leap to the point that you
> even think of translating the names of those holidays into an arithmetic
> riddle.
>
>> ... Or, even better, to be able to read off a hex dump and see E8 03
>> and instantly read it as "1,000 little-endian".
> 59535 big endian. Warningm flamebait ahead: Who thinks in little
> endian? (I was raised on 6502s and 680XX CPUs; 8080s and Z80s always
> did things backwards.)

--
https://mail.python.org/mailman/listinfo/python-list
Re: OT: AttributeError [ In reply to ]
On 30/09/21 7:28 am, dn wrote:
> Oh yes! The D2 kit - I kept those books for years...
> https://www.electronixandmore.com/adam/temp/6800trainer/mek6800d2.html

My 6800 system was nowhere near as fancy as that! It was the
result of replacing the CPU in my homebrew Miniscamp.

--
Greg


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