Re: Unix History: Why does hexdump default to word alignment?

2011-12-02 Thread geoffrey mendelson
On Dec 2, 2011, at 9:28 AM, guy keren wrote: you can use a debugger only for the basic code. you cannot use a debugger when you're dealing with multiple threads that access the same shared data and could have race conditions. in those cases you need to run a test, find that the eventual

Re: Unix History: Why does hexdump default to word alignment?

2011-12-01 Thread Nadav Har'El
On Thu, Dec 01, 2011, Elazar Leibovich wrote about Unix History: Why does hexdump default to word alignment?: The default behaviour of hexdump is to align data word-wide. For instance Just as a comment, if I remember correctly, hexdump isn't actually part of ancient Unix history - the original

Re: Unix History: Why does hexdump default to word alignment?

2011-12-01 Thread Elazar Leibovich
On Thu, Dec 1, 2011 at 10:10 AM, Nadav Har'El n...@math.technion.ac.ilwrote: When you say words and word aligned here, you mean historic 2 byte words. Indeed. Is there any other meaning for word other than two bytes? This is indeed *NOT* a very useful default on any modern computers. In

Re: Unix History: Why does hexdump default to word alignment?

2011-12-01 Thread guy keren
On 12/01/2011 10:10 AM, Nadav Har'El wrote: On Thu, Dec 01, 2011, Elazar Leibovich wrote about Unix History: Why does hexdump default to word alignment?: The default behaviour of hexdump is to align data word-wide. For instance Just as a comment, if I remember correctly, hexdump isn't

Re: Unix History: Why does hexdump default to word alignment?

2011-12-01 Thread geoffrey mendelson
On Dec 1, 2011, at 10:28 AM, Elazar Leibovich wrote: Indeed. Is there any other meaning for word other than two bytes? This is indeed *NOT* a very useful default on any modern computers. In some old computers, like the PDP11 2 byte words were common and useful. Well, let's see, going

Re: Unix History: Why does hexdump default to word alignment?

2011-12-01 Thread Elazar Leibovich
On Thu, Dec 1, 2011 at 11:32 AM, geoffrey mendelson geoffreymendel...@gmail.com wrote: Well, let's see, going back to the 1960's, IBM 1401, word size set by a bit in memory, a word mark on a digit. Thanks for educating me, you need to get a job in CS archaeology. But what did the word mark

Fwd: Unix History: Why does hexdump default to word alignment?

2011-12-01 Thread geoffrey mendelson
On Dec 1, 2011, at 12:00 PM, Elazar Leibovich wrote: But what did the word mark mean? In my ignorance I thought that work meant to imply amount of bits. The IBM 1401 and similar series of computers used DECIMAL not binary numbers and the word mark was the extra bit turned on to indicate

Re: Unix History: Why does hexdump default to word alignment?

2011-12-01 Thread Oleg Goldshmidt
On Thu, Dec 1, 2011 at 12:25 PM, geoffrey mendelson geoffreymendel...@gmail.com wrote: Turbo Pascal for the IBM PC had a decimal mode were it would store numbers as decimal digits and do decimal arithmetic on them. I never used TP, so I don't know much more about it. Any Pascal programmers

Re: Unix History: Why does hexdump default to word alignment?

2011-12-01 Thread geoffrey mendelson
On Dec 1, 2011, at 12:51 PM, Oleg Goldshmidt wrote: I don't recall ever using BCD explicitly, but I may have been too inexperienced to notice. Never programmed in Pascal since. Oleg, One used BCD for money. I once worked at a place where one of the programmers wrote the pension reporting

Re: Unix History: Why does hexdump default to word alignment?

2011-12-01 Thread Oleg Goldshmidt
On Thu, Dec 1, 2011 at 12:58 PM, geoffrey mendelson geoffreymendel...@gmail.com wrote: One used BCD for money. I once worked at a place where one of the programmers wrote the pension reporting programs for the IBM 370 in PL/I using floating point arithmetic. When people saw the reports and

Re: Unix History: Why does hexdump default to word alignment?

2011-12-01 Thread Omer Zak
On Thu, 2011-12-01 at 12:51 +0200, Oleg Goldshmidt wrote: IIRC, all x86 processors provided BCD-related instructions (conversions to and from), but I think even then it was slower than straightforward binary arithmetic. It was slow because the machine instructions were for single bytes only,

Re: Unix History: Why does hexdump default to word alignment?

2011-12-01 Thread Nadav Har'El
On Thu, Dec 01, 2011, guy keren wrote about Re: Unix History: Why does hexdump default to word alignment?: apparently, you did not use binary data serialization in the past two decades. when you serialize data and store it into a file (also on the network), it is very useful to be able to see

Re: Unix History: Why does hexdump default to word alignment?

2011-12-01 Thread Yedidyah Bar-David
On Thu, Dec 01, 2011 at 01:55:24PM +0200, Nadav Har'El wrote: On Thu, Dec 01, 2011, guy keren wrote about Re: Unix History: Why does hexdump default to word alignment?: apparently, you did not use binary data serialization in the past two decades. when you serialize data and store

Re: Unix History: Why does hexdump default to word alignment?

2011-12-01 Thread guy keren
On 12/01/2011 01:55 PM, Nadav Har'El wrote: On Thu, Dec 01, 2011, guy keren wrote about Re: Unix History: Why does hexdump default to word alignment?: apparently, you did not use binary data serialization in the past two decades. when you serialize data and store it into a file (also

Re: Unix History: Why does hexdump default to word alignment?

2011-12-01 Thread Elazar Leibovich
On Fri, Dec 2, 2011 at 9:28 AM, guy keren c...@actcom.co.il wrote: you can use a debugger only for the basic code. you cannot use a debugger when you're dealing with multiple threads that access the same shared data and could have race conditions. in those cases you need to run a test, find

Unix History: Why does hexdump default to word alignment?

2011-11-30 Thread Elazar Leibovich
The default behaviour of hexdump is to align data word-wide. For instance printf '\xFF\xFF\x01' | hexdump 000 0001 003 This makes little sense to me. In C, structs are not necessarily aligned to words, and it doesn't seems useful to view about any data format for which

Re: Unix History: Why does hexdump default to word alignment?

2011-11-30 Thread Valery Reznic
History: Why does hexdump default to word alignment? The default behaviour of hexdump is to align data word-wide. For instance     printf '\xFF\xFF\x01' | hexdump     000 0001     003 This makes little sense to me. In C, structs are not necessarily aligned to words