Hi!

On Wednesday 28 April 2004 14:31, Nick Glencross wrote:
> Time for an update.
>
> I've now split the code into a library, an example and a test.
>
>   * runtime/parrot/include/Digest_MD5.imc (_md5sum and _md5_print calls)
runtime/parrot/library/Digest/MD5.imc should IMO be better.
You should put the functions into a seperate namespace with

.namespace["Digest::MD5"]

to avoid problems with duplicated function names.
I would also remove the underscore from "_md5sum" and "_md5_print".
If you load the code with load_bytecode, you can call the sub with

$P0 = find_global "Digest::MD5", "md5sum"
$P0( ... )

which is AFAIK the offical way to call external functions.


>   * examples/assembly/md5sum.imc
>   * imcc/t/syn/md5.t
>
> I don't know if the test lives in the most appropriate directory.
It has nothing to do with imcc.
Library tests will go into t/library: t/library/Digest/MD5.t

> Investigating why some checksums were coming out wrong, I've now seen
> that 'read' operation only reads at max 64K of data, so I've now limited
> the file size that the example runs on.
>
> Also, I tried using the @MAIN pragma, this seemed to break with JIT
> (I've left it in the example harness, but not the tests). Should I have
> expected this to work? If not, I'll remove it from the example.
>
> Could I be getting close to having this included with parrot?
Of course!

Leo, what is the status of the pending changes WRT library paths?
Can I help somehow?

> Cheers,
>
> Nick
jens

Reply via email to