Re: Digest module and Q:PIR blocks

2010-06-09 Thread Cosimo Streppone
On Wed, 09 Jun 2010 03:52:03 +0200, Will Coleda wrote: Here's my best guess: sub test (Str $test) { my $result = Q:PIR { # This loads into the /current/ HLL, but should probably load into # the /parrot/ HLL. load_bytecode 'Digest/MD5.pbc' .local pmc md5su

Re: Digest module and Q:PIR blocks

2010-06-08 Thread Will Coleda
On Tue, Jun 8, 2010 at 9:52 PM, Will Coleda wrote: > On Mon, Jun 7, 2010 at 5:56 AM, Cosimo Streppone wrote: >> On Mon, 07 Jun 2010 02:11:05 +0200, Patrick R. Michaud >> wrote: >> >>> On Sun, Jun 06, 2010 at 11:06:07PM +0200, Cosimo Streppone wrote: Hi all, Just for fun, I'm

Re: Digest module and Q:PIR blocks

2010-06-08 Thread Will Coleda
On Mon, Jun 7, 2010 at 5:56 AM, Cosimo Streppone wrote: > On Mon, 07 Jun 2010 02:11:05 +0200, Patrick R. Michaud > wrote: > >> On Sun, Jun 06, 2010 at 11:06:07PM +0200, Cosimo Streppone wrote: >>> >>> Hi all, >>> >>> Just for fun, I'm trying to write a Digest::MD5 module for Rakudo. >>> Right now

Re: Digest module and Q:PIR blocks

2010-06-07 Thread Cosimo Streppone
On Mon, 07 Jun 2010 02:11:05 +0200, Patrick R. Michaud wrote: On Sun, Jun 06, 2010 at 11:06:07PM +0200, Cosimo Streppone wrote: Hi all, Just for fun, I'm trying to write a Digest::MD5 module for Rakudo. Right now I'm stuck with something like: [...] The MD5.pbc module loads into a differe

Re: Digest module and Q:PIR blocks

2010-06-06 Thread Patrick R. Michaud
On Sun, Jun 06, 2010 at 11:06:07PM +0200, Cosimo Streppone wrote: > Hi all, > > Just for fun, I'm trying to write a Digest::MD5 module for Rakudo. > Right now I'm stuck with something like: > > sub test (Str $text) { > Q:PIR { > load_bytecode 'Digest/MD5.pbc' > $P0 = f

Digest module and Q:PIR blocks

2010-06-06 Thread Cosimo Streppone
Hi all, Just for fun, I'm trying to write a Digest::MD5 module for Rakudo. Right now I'm stuck with something like: sub test (Str $text) { Q:PIR { load_bytecode 'Digest/MD5.pbc' $P0 = find_lex '$text' $P1 = _md5sum($P0) $S0 = _md5_hex($P1)