in j803+ gethash is dyadic
'MD5'&gethash 'asdf'
A neat trick for simulating "break." tacitly with power is to modify the shape
of input on success/break condition. I.@(boolexp) returns 0 if true, or null
if not, and appending the result of I@:f, to next y can signal break with a
cheap test.
<:@{: 'bgvyzdsv' (>:@] ,~ I.@:('00000' -: 5 {. 'MD5'&gethash)@,&":)^:(0 <
{.@])^:(_) 1
----- Original Message -----
From: Joe Bogner <[email protected]>
To: [email protected]
Sent: Friday, December 4, 2015 12:05 PM
Subject: Re: [Jprogramming] adventofcode day 4
md5 addon doesn't work correctly on j64
gethash_jqtide_ 'md5';'abcdef609043'
000001dbbfa3a5c83a2d506429c7b00e
On Fri, Dec 4, 2015 at 12:03 PM, David Lambert <[email protected]> wrote:
> Test case in python and in j, am I misusing the j md5?
>
> load'/usr/share/j/8.0.4/addons/convert/misc/md5.ijs'
> md5'abcdef609043'
> a26563da313447e282c8212455525f33
>
>
>>>> import hashlib
>>>> hashlib.md5(b'abcdef609043')
> <md5 HASH object @ 0x7f6261e02d00>
>>>> hashlib.md5(b'abcdef609043').hexdigest()
> '000001dbbfa3a5c83a2d506429c7b00e'
>>>>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm