Hexadecimal conversions

Chris Pressey cpressey@REDACTED
Fri Nov 22 00:51:21 CET 2002


On Thu, 21 Nov 2002 21:49:31 +0100
Matthias Lang <matthias@REDACTED> wrote:

> Chris Pressey writes:
> 
>  > Seriously, it's a bit ridiculous, don't you think?  How is a
>  > dependency on httpd_util any cleaner than rolling your own string
>  > functions?  "Richer, saner standard libraries" is definately at the
>  > top of my Erlang wish-list this Christmas.
> 
> Depends on your priorities. Having someone else maintain the code for
> you is worth something too.

Yes, this sort of decision has to be made on a function-by-function basis
- although my point was more along the lines of, depending on the target
install (embedded systems?), it might not be a good idea to assume that
Inets is installed, just for string/hex manipulation... personally I try
to assume that all OTP applications except stdlib and kernel are optional.

> The standard libraries are of variable
> quality and there's no real way to know which bits are good and which
> leave a thing or two to be desired, apart from experience. 
>
> The hierarchical modules system (in R9) may make a cleanup less painful.

Brings me to my second wish: that, if (when!) stdlib is hierarchified, the
hierarchy doesn't get too deep... 3 or 4 levels is probably OK, but 5 or 6
levels would become more annoying than helpful IMHO.

I'd quite like to help reorganize and richen stdlib.  If someone has a
draft of the proposed tree, I'd be happy to provide critical feedback.
Also, FWIW, I'd be happy to 'donate' anything from my 'ce' helper app,
which is basically 'my stdlib' - the functions I need on a regular basis,
but aren't in stdlib.

http://kallisti.mine.nu/projects/ce-2002.1121/

I plan to 'support' it, sort of (since I use it in almost all of my own
projects) but I can't guarantee that the interface won't change.  Several
of the functions which have passed by this mailing list have found a place
in it, and although it doesn't have is_whitespace yet, it does contain a
(general-purpose, non-optimized) base converter:

Eshell V5.2  (abort with ^G)
1> ce_math:base(16, 8000).
"1F40"
2> ce_math:base(16, "1F40").
8000

-Chris



More information about the erlang-questions mailing list