A few questiosn about encoding

  • Thread starter Íéêüëáïò Êïýñáò
  • Start date
N

Neil Cerutti

Now there is nothing wrong in being ignorant. The question is
how do you proceed from there. The answer is not by starting a
project that is far above your ability and pestering the
experts in the hope they will spoon feed you.

A major issue is this: the spoon-feeding he does receive is
unefficacious. Smart, well-meaning, articulate people's time is
getting squandered.

I read the responses. I've learned things from them. But Nikos
has not. And once a discussion devolves to reitteration even that
value is lost.

And perhaps worst of all, there's none of the closure or
vicarious catharsis that usually comes from a well-designed
educational transaction.
 
M

Mark Lawrence

Am 14.06.2013 14:45, schrieb Nick the Gr33k:

Let's nominate you for a nobel prize, saviour of python-list!

The Nobel prize is unsuited in a situation like this, maybe the ACM
Turing Award?

--
"Steve is going for the pink ball - and for those of you who are
watching in black and white, the pink is next to the green." Snooker
commentator 'Whispering' Ted Lowe.

Mark Lawrence
 
C

Chris Angelico

Well, my biggest successes up until now where to build 3 websites utilizing
database saves and retrievals

in PHP
in Perl
and later in Python

with absolute ignorance of

Apache Configuration:
CGI:
Linux:

with just basic knowledge of linux.
I'am very proud of it.

Translation:

"I just built a car. I don't know anything about internal combustion
engines or road rules or metalwork, and I'm very proud of the
monstrosity that I'm now selling to my friends."

Would you buy a car built by someone who proudly announces that he has
no clue how to build one? Why do you sell web hosting services when
you have no clue how to provide them?

ChrisA
 
D

D'Arcy J.M. Cain

Come on now, this is _so_ obviously trolling, it's not even remotely
funny anymore. Why doesn't killfiling work with the mailing list
version of the python list? :-(

A big problem, other than Mr. Support's shenanigans with his email
address, is that even those of us who seem to have successfully
*plonked* him get the responses to him. The biggest issue with a troll
isn't so much the annoying emails from him but the amplified slew of
responses. That's the point of a troll after all.

The answer is to always make sure that you include the previous poster
in the reply as a Cc or To. I filter out any email that has the string
"(e-mail address removed)" in a header so I would also filter out the
replies if people would follow that simple rule.

I have suggested this before but the push back I get is that then
people would get two copies of the email, one to them and one to the
list. My answer is simple. Get a proper email system that filters out
duplicates. Is there an email client out there that does not have this
facility?
 
C

Chris Angelico

The answer is to always make sure that you include the previous poster
in the reply as a Cc or To. I filter out any email that has the string
"(e-mail address removed)" in a header so I would also filter out the
replies if people would follow that simple rule.

I have suggested this before but the push back I get is that then
people would get two copies of the email, one to them and one to the
list. My answer is simple. Get a proper email system that filters out
duplicates. Is there an email client out there that does not have this
facility?

The main downside to that is not the first response, to
somebody@somewhere and python-list, but the subsequent ones. Do you
include everyone's addresses? And if so, how do they then get off the
list? (This is a serious consideration. I had some very angry people
asking me to unsubscribe them from a (private) mailman list I run, but
they weren't subscribed at all - they were being cc'd.)

I prefer to simply mail the list. You should be able to mute entire
threads, and he doesn't start more than a couple a day usually.

ChrisA
 
D

D'Arcy J.M. Cain

The main downside to that is not the first response, to
somebody@somewhere and python-list, but the subsequent ones. Do you
include everyone's addresses? And if so, how do they then get off the

No, I think Ccing the From is enough. Other than the OP who is already
*plonked* replies to the replies tend to have at least a modicum of
information.
I prefer to simply mail the list. You should be able to mute entire
threads, and he doesn't start more than a couple a day usually.

But then I have to deal with each thread. I don't want to deal with
them at all.
 
T

Tim Chase

But then I have to deal with each thread. I don't want to deal with
them at all.

At least Thunderbird had the ability to set up a filter of the form
"If the sender matches '(e-mail address removed)' then kill this thread" so
the thread-killing (or sub-thread killing) was automatic.

I set that up for Xah posts and my life was far better.

I've since switched to Claws for my mail and miss that kill-thread
functionality. :-/

-tkc
 
D

D'Arcy J.M. Cain

I set that up for Xah posts and my life was far better.

Has he disappeared or is my filtering just really successful?
I've since switched to Claws for my mail and miss that kill-thread
functionality. :-/

Heh. Exactly what I am using.
 
G

Grant Edwards

The main downside to that is not the first response, to
somebody@somewhere and python-list, but the subsequent ones. Do you
include everyone's addresses? And if so, how do they then get off the
list? (This is a serious consideration. I had some very angry people
asking me to unsubscribe them from a (private) mailman list I run, but
they weren't subscribed at all - they were being cc'd.)

I think the answer is to automatically kill all threads stared by
"him".

Unfortunately, I don't know if that's possible in most newsreaders.
 
G

Guy Scree

Your best bet would be to keep an eye on www.edx.org for the next
offerring of Introduction to Computer Science and Programming 6.00x
(probably starts in Sept). It's a no-cost way to take a Python course.
 
C

Cameron Simpson

| On 14/6/2013 1:14 μμ, Cameron Simpson wrote:
| >Normally a character in a b'...' item represents the byte value
| >matching the character's Unicode ordinal value.
|
| The only thing that i didn't understood is this line.
| First please tell me what is a byte value

The numeric value stored in a byte. Bytes are just small integers
in the range 0..255; the values available with 8 bits of storage.

| >\x1b is a sequence you find inside strings (and "byte" strings, the
| >b'...' format).
|
| \x1b is a character(ESC) represented in hex format

Yes.

| b'\x1b' is a byte object that represents what?

An array of 1 byte, whose value is 0x1b or 27.

| >>> chr(27).encode('utf-8')
| b'\x1b'

Transcribing the ESC Unicode character to byte storage.

| >>> b'\x1b'.decode('utf-8')
| '\x1b'

Reading a single byte array containing a 27 and decoding it assuming 'utf-8'.
This obtains a single character string containing the ESC character.

| After decoding it gives the char ESC in hex format
| Shouldn't it result in value 27 which is the ordinal of ESC ?

When printing strings, the non-printable characters in the string are
_represented_ in hex format, so \x1b was printed.

| > No, I mean conceptually, there is no difference between a code-point
| > and its ordinal value. They are the same thing.
|
| Why Unicode charset doesn't just contain characters, but instead it
| contains a mapping of (characters <--> ordinals) ?

Look, as far as a computer is concerned a character and an ordinal
are the same thing because you just store character ordinals in
memory when you store a string.

When characters are _displayed_, your Terminal (or web browser or
whatever) takes character ordinals and looks them up in a _font_,
which is a mapping of character ordinals to glyphs (character
images), and renders the character image onto your screen.

| I mean what we do is to encode a character like chr(65).encode('utf-8')
| What's the reason of existence of its corresponding ordinal value
| since it doesn't get involved into the encoding process?

Stop thinking of Unicode code points and ordinal values as separate
things. They are effectively two terms for the same thing. So there
is no "corresponding ordinal value". 65 _is_ the ordinal value.

When you run:

chr(65).encode('utf-8')

you're going:

chr(65) ==> 'A'
Producing a string with just one character in it.
Internally, Python stores an array of character ordinals, thus: [65]

'A'.encode('utf-8')
Walk along all the ordinals in the string and transribe them as bytes.
For 65, the byte encoding in 'utf-8' is a single byte of value 65.
So you get an array of bytes (a "bytes object" in Python), thus: [65]

--
Cameron Simpson <[email protected]>

The double cam chain setup on the 1980's DOHC CB750 was another one of
Honda's pointless engineering breakthroughs. You know the cycle (if you'll
pardon the pun :), Wonderful New Feature is introduced with much fanfare,
WNF is fawned over by the press, WNF is copied by the other three Japanese
makers (this step is sometimes optional), and finally, WNF is quietly dropped
by Honda.
- Blaine Gardner, <[email protected]>
 
C

Cameron Simpson

| So, a numeral = a string representation of a number. Is this correct?

No, a numeral is an individual digit from the string representation of a number.
So: 65 requires two numerals: '6' and '5'.
--
Cameron Simpson <[email protected]>

In life, you should always try to know your strong points, but this is
far less important than knowing your weak points.
Martin Fitzpatrick <[email protected]>
 
D

Denis McMahon

The only thing that i didn't understood is this line.
First please tell me what is a byte value

Seriously? You don't understand the term byte? And you're the support
desk for a webhosting company?
 
G

Grant Edwards

Seriously? You don't understand the term byte? And you're the support
desk for a webhosting company?

Well, we haven't had this thread for a week or so...

There is some ambiguity in the term "byte". It used to mean the
smallest addressable unit of memory (which varied in the past -- at
one point, both 20 and 60 bit "bytes" were common). These days the
smallest addressable unit of memory is almost always 8 bits on desktop
and embedded processors (but often not on DSPs). That's why when IEEE
stadards want to refer to an 8-bit chunk of data they use the term
"octet".

:)
 
N

Nick the Gr33k

There is some ambiguity in the term "byte". It used to mean the
smallest addressable unit of memory (which varied in the past -- at
one point, both 20 and 60 bit "bytes" were common). These days the
smallest addressable unit of memory is almost always 8 bits on desktop
and embedded processors (but often not on DSPs). That's why when IEEE
stadards want to refer to an 8-bit chunk of data they use the term
"octet".

What the difference between a byte and a byte's value?
 
R

Roy Smith

Grant Edwards said:
There is some ambiguity in the term "byte". It used to mean the
smallest addressable unit of memory (which varied in the past -- at
one point, both 20 and 60 bit "bytes" were common).

I would have defined it more like, "some arbitrary collection of
adjacent bits which hold some useful value". Doesn't need to be
addressable, nor does it need to be the smallest such thing.

For example, on the pdp-10 (36 bit word), it was common to treat a word
as either four 9-bit bytes, or five 7-bit bytes (with one bit left
over), depending on what you were doing. And, of course, a nybble was
something smaller than a byte!

And, yes, especially in networking, everybody talks about octets when
they want to make sure people understand what they mean.
 
N

Nick the Gr33k

And, yes, especially in networking, everybody talks about octets when
they want to make sure people understand what they mean.

1 byte = 8 bits

in networking though since we do not use encoding schemes with variable
lengths like utf-8 is, how do we separate when a byte value start and
when it stops?

do we need a start bit and a stop bit for that?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top