Starting slowly and questions...

Rob <>
Fri Jul 2 14:38:26 CEST 2004


I have been slowly starting to try get productive with erlang,
I have been reading everything and I think it is a breath of fresh air
after being oppressed by the low productivity, high bloat,
XML/SOAP/WS-I/UDDI/Java/OO regime that I toil under currently.
To read about others thinking about large scale interconnected systems
is great, I think there could be great synergies between erlang and
ad-hoc, logical and physical mesh networks (wireless and wired). A
generalized man-in-middle is exciting and detaching it from tcp even better.

But to my questions, struggling along with learning basic functions, I
am stuck (I spent some time because I didn't realize that the crypto
module wasn't working on my werl.exe on Windows and thought I was doing
something wrong):

I got the following to work:

File = "C:/c.txt".
{_,Contents} = file:read_file(File).
Digest = erlang:md5(Contents).

io:format("~.16b\n", [Digest]).

I tried various format options, binary_to_string and some bit stuff but
clearly I am missing something.

I'd like to get it to output something like:
f28c94b1

maybe there is a function to turn a arbitrary length binary into a hex
string but

Also, I saw some mention in the archives about an interface with Sybase,
I would be very interested if someone had more info about that or any
other native db drivers/interfaces to any major dbs.

TIA,

Rob






More information about the erlang-questions mailing list