Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion md5sum, in parrot (library/tests)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Jens Rieks  
View profile  
 More options Apr 28 2004, 9:54 am
Newsgroups: perl.perl6.internals
From: par...@jensbeimsurfen.de (Jens Rieks)
Date: Wed, 28 Apr 2004 15:54:30 +0200
Local: Wed, Apr 28 2004 9:54 am
Subject: Re: md5sum, in parrot (library/tests)
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

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.