[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#727833: ITP: node-bytes -- Byte string parser and formatter - Node.js module



Le 27/10/2013 15:37, Jérémy Lal a écrit :
> Package: wnpp
> Severity: wishlist
> Owner: "Jérémy Lal" <kapouer@melix.org>
> 
> * Package name    : node-bytes
>   Version         : 0.2.1
>   Upstream Author : TJ Holowaychuk <tj@vision-media.ca>
> * URL             : https://github.com/visionmedia/bytes.js
> * License         : Expat
>   Programming Lang: JavaScript
>   Description     : Byte string parser and formatter - Node.js module
> 
> This module parses strings representing an amount of bytes, like
> 1kb, 2mb, 1gb; and inversely converts positive integers to a readable
> format representing an amount of bytes.
> It is useful for parsing or writing log files.
> .
> Node.js is an event-based server-side javascript engine.
> 
> 

I have looked at the code, and it seems to me that, again, we introduce
some code in debian that decide they can name the units any way they
like (see http://en.wikipedia.org/wiki/Binary_prefix).

They decide, for example, to use k, m and g prefixes for 2^10, 2^20 and
2^30, where usage should point to at least k, M and G and correct usage
to Ki, Mi, Gi. They also call bytes 'b' (usage is more 'B').

Of course, this is a library, it may be used to scan other (external)
data, I understand this may be part of something bigger, but:
1. This is a bad habit
2. This is bad code
3. Seriously, one package for _18_ lines of code?

Sincerely,
-- 
Jean-Christophe Dubacq

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: