Re: Metric units

2004-12-31 Thread John J Foerch
Thank you very much for the patch!I am going to study this program 
in more detail to find out what exactly would have to be changed to make 
it 100% compliant.

-John
Antonio Zerbinati wrote:
No need to argue... with this tiny patch wget will print nice and 
standard KiB MiB GiB binary units... A don't like ambiguity, not 
binary. Hope this will help futile discussion about 10 way of look at 
the world... and Merry Christmass to everyone, to people that 
understand binary, people doesn't and ambiguous one.





Re: Metric units

2004-12-26 Thread Antonio Zerbinati
No need to argue... with this tiny patch wget will print nice and 
standard KiB MiB GiB binary units... A don't like ambiguity, not binary. 
Hope this will help futile discussion about 10 way of look at the 
world... and Merry Christmass to everyone, to people that understand 
binary, people doesn't and ambiguous one.

Index: progress.c
===
RCS file: /pack/anoncvs/wget/src/progress.c,v
retrieving revision 1.43
diff -u -r1.43 progress.c
--- progress.c   2004/01/28 01:02:26   1.43
+++ progress.c   2004/12/26 15:25:21
@@ -727,7 +727,7 @@
  struct bar_progress_hist *hist = &bp->hist;
  /* The progress bar should look like this:
- xx% [===> ] nn,nnn 12.34K/s ETA 00:00
+ xx% [===> ] nn,nnn 12.34 KiB/s ETA 00:00
 Calculate the geometry.  The idea is to assign as much room as
 possible to the progress bar.  The other idea is to never let
@@ -739,13 +739,13 @@
 "xx% " or "100%"  - percentage   - 4 chars
 "[]"  - progress bar decorations - 2 chars
 " nnn,nnn,nnn"- downloaded bytes - 12 chars or very 
rarely more
- " 1012.56K/s" - dl rate  - 11 chars
+ " 1012.56 KiB/s"  - dl rate  - 14 chars
 " ETA xx:xx:xx"   - ETA  - 13 chars

 "=>..."   - progress bar - the rest
  */
  int dlbytes_size = 1 + MAX (size_legible_len, 11);
-  int progress_size = bp->width - (4 + 2 + dlbytes_size + 11 + 13);
+  int progress_size = bp->width - (4 + 2 + dlbytes_size + 14 + 13);
  if (progress_size < 5)
progress_size = 0;
@@ -831,10 +831,10 @@
  sprintf (p, " %-11s", legible (size));
  p += strlen (p);
-  /* " 1012.45K/s" */
+  /* " 1012.45 KiB/s" */
  if (hist->total_time && hist->total_bytes)
{
-  static const char *short_units[] = { "B/s", "K/s", "M/s", "G/s" };
+  static const char *short_units[] = { "Byte/s", " KiB/s", " 
MiB/s", " GiB/s" };
  int units = 0;
  /* Calculate the download speed using the history ring and
recent data that hasn't made it to the ring yet.  */
@@ -845,7 +845,7 @@
  p += strlen (p);
}
  else
-APPEND_LITERAL ("   --.--K/s");
+APPEND_LITERAL ("   --.-- KiB/s");

  /* " ETA xx:xx:xx"; wait for three seconds before displaying the ETA.
 That's because the ETA value needs a while to become
Index: retr.c
===
RCS file: /pack/anoncvs/wget/src/retr.c,v
retrieving revision 1.86
diff -u -r1.86 retr.c
--- retr.c   2004/11/18 21:05:30   1.86
+++ retr.c   2004/12/26 15:25:42
@@ -492,7 +492,7 @@
retr_rate (long bytes, double msecs, int pad)
{
  static char res[20];
-  static const char *rate_names[] = {"B/s", "KB/s", "MB/s", "GB/s" };
+  static const char *rate_names[] = {"Byte/s", " KiB/s", " MiB/s", " 
GiB/s" };
  int units = 0;

  double dlrate = calc_rate (bytes, msecs, &units);



Re: Metric units

2004-12-24 Thread John J Foerch
That story is hilarious.  Thanks for sharing!   As to kilo vs kibi, it's 
not the case that I can't think in binary (I use it all the time) or 
even that the use of kilo to mean 1024 troubles me in itself.   It is 
that I have found no consistency in the context in which the word kilo 
reliably means 210.   Transfer speeds, at the level of hardware are 
often referred to with metric kilobits or kilobytes.  In the world of 
hard disk manufacturers, the issue has even been brought to court, I 
hear.  And although a lot of programs do use the words kilo and mega to 
mean 210 and 220, the community is by no means consistent with these 
definitions.   Once I even did a crossword puzzle where the clue was 
"1,440,000 Bytes", and the only answer that fit was "MEG"  ** Gasp! **  
I should have ripped it up and wrote a nasty letter to the publisher!  
haha.   For these reasons, I think the IEC (I before E, to correct my 
last post...) kibi standard is a blessing.  It allows us to 
unambiguously use metric in most cases, and also gives us symbols to 
unambiguously use the base two numbers most convenient with machines, 
when we really need them.

-John

Post, Mark K a écrit :
No, but that particular bit of idiocy was the inspiration for my 
comment.  I
just took it one decimal point further.

 



Re: Metric units

2004-12-24 Thread patrick robinson
Hello,

On 24-Dec-04, you wrote:

> Yeah, you're both right.  While we're at it, why don't we just round off the
> value of pi to be 3.0.  Those pesky trailing decimals are just an accident
> of history anyway.

.sorry for my stupid interferrence - don't blame it on history, blame it
on Intel's first pentium!



merry christmas to all



Regards

Patrick Robinson



RE: Metric units

2004-12-23 Thread Post, Mark K
No, but that particular bit of idiocy was the inspiration for my comment.  I
just took it one decimal point further.


-Original Message-
From: Tony Lewis [mailto:[EMAIL PROTECTED] 
Sent: Friday, December 24, 2004 2:22 AM
To: wget@sunsite.dk
Subject: RE: Metric units


Mark Post wrote: 

> While we're at it, why don't we just round off the value of pi to be 
> 3.0

Do you live in Indiana?

Actually, Dr. Edwin Goodwin wanted to round off pi to any of several values
including 3.2.

http://www.agecon.purdue.edu/crd/Localgov/Second%20Level%20pages/Indiana_Pi_
Story.htm

Tony



RE: Metric units

2004-12-23 Thread Tony Lewis
Mark Post wrote: 

> While we're at it, why don't we just round off the value of pi to be 3.0

Do you live in Indiana?

Actually, Dr. Edwin Goodwin wanted to round off pi to any of several values
including 3.2.

http://www.agecon.purdue.edu/crd/Localgov/Second%20Level%20pages/Indiana_Pi_
Story.htm

Tony




RE: Metric units

2004-12-23 Thread Post, Mark K
Yeah, you're both right.  While we're at it, why don't we just round off the
value of pi to be 3.0.  Those pesky trailing decimals are just an accident
of history anyway.


-Original Message-
From: Carlos Villegas [mailto:[EMAIL PROTECTED] 
Sent: Thursday, December 23, 2004 8:22 PM
To: Tony Lewis
Cc: wget@sunsite.dk
Subject: Re: Metric units


On Thu, Dec 23, 2004 at 12:57:18PM -0800, Tony Lewis wrote:
> John J Foerch wrote:
> 
> > It seems that the system of using the metric prefixes for numbers 
> > 2^n is a simple accident of history.  Any thoughts on this?
> 
> I would say that the practice of using powers of 10 for K and M is a 
> response to people who cannot think in binary.

I would say that the original poster understands what he is saying, and you
clearly don't...

http://physics.nist.gov/cuu/Units/binary.html

kilo, mega, giga, tera and many others are standard in SI and widely used in
physics, chemistry, engineering by their real meaning (powers of 10). The
hole powers of 2 thing is just because 1024 is close to 1000 and computers
work in binary, so is logical to think in powers of 2 (so yes, a mere
accident of 20th century history).

Carlos


RE: Metric units

2004-12-23 Thread Tony Lewis
Carlos Villegas snidely wrote:

> I would say that the original poster understands what he is saying, and
you clearly don't...

I'll put my computer science degree up against your business administration
and accounting degree any day.

A kilobyte has always been 1024 bytes and the choice was not accidental.
Computer memory is laid out in bits, which are always powers of two.

There are 10 kinds of people in the world; those who understand binary and
those who don't.

Tony





Re: Metric units

2004-12-23 Thread Carlos Villegas
On Thu, Dec 23, 2004 at 12:57:18PM -0800, Tony Lewis wrote:
> John J Foerch wrote:
> 
> > It seems that the system of using the metric prefixes for numbers 2^n is a
> > simple accident of history.  Any thoughts on this?
> 
> I would say that the practice of using powers of 10 for K and M is a
> response to people who cannot think in binary.

I would say that the original poster understands what he is
saying, and you clearly don't...

http://physics.nist.gov/cuu/Units/binary.html

kilo, mega, giga, tera and many others are standard in SI and
widely used in physics, chemistry, engineering by their real
meaning (powers of 10). The hole powers of 2 thing is just
because 1024 is close to 1000 and computers work in binary, so is
logical to think in powers of 2 (so yes, a mere accident of
20th century history).

Carlos



RE: Metric units

2004-12-23 Thread Tony Lewis
John J Foerch wrote:

> It seems that the system of using the metric prefixes for numbers 2^n is a
> simple accident of history.  Any thoughts on this?

I would say that the practice of using powers of 10 for K and M is a
response to people who cannot think in binary.

Tony




Metric units

2004-12-23 Thread John J Foerch
Hi,
  I read in the list archives some discussion from 2002 of changing the 
units that wget uses in its output.  I too would very much like to see 
in the next version either metric units (K=10^3, M=10^6) or the EIC 
binary system (Ki=2^10, Mi=2^20).  It seems that the system of using the 
metric prefixes for numbers 2^n is a simple accident of history.  Any 
thoughts on this?

Happy holidays,
John J Foerch