This channel is intended for people just starting with the Raku Programming Language (raku.org). Logs are available at irclogs.raku.org/raku-beginner/live.html
Set by lizmat on 8 June 2022.
06:51 hudo joined 10:31 hudo left 12:55 avuserow left 12:56 avuserow joined
._taa_. Hi. I am learning how to use modules in Raku. I am following the example on raku.guide#_using_modules. however, my code does not work as I expected. I have done zef install Digest::MD5 All candidates are currently installed No reason to proceed. Use --force-install to continue anyway My code (same as the example in the guide) perl use Digest::MD5; my $password = "password123"; my $hashed-password 14:17
= Digest::MD5.new.md5_hex($password); say $hashed-password; Got: You cannot create an instance of this type (Digest::MD5) in method new at 'SETTING::'src/core.c/Mu.rakumod line 136 in block <unit> at D:\path\to\my\script\raku.raku line 3 Process finished with exit code 1 Where is the problem?
ab5tract It appears to be an issue with your environment 15:59
Does ‘raku -MDigest::MD5 -e “say <success!>”’ work? 16:00
You might also need to close and reopen your terminal if you’ve just installed zef (just a wild guess, haven’t used Raku on Windows much) 16:01
Also, what does ‘zef locate Digest::MD5’ say?
nahita3882 fwiw i tried with 2023.09 on WSL and the same error appeared 16:11
ab5tract Weird.. do other modules work? 16:16
nahita3882 yes i tried to install another module and it worked 16:25
ab5tract Thanks for checking! 16:31
github.com/hankache/rakuguide/issues/230
nahita3882 thanks for the issue
author writes there "orphaned" and I understand that as they meaning github.com/cosimo/perl6-digest-md5 <- this one is deserted 16:32
but when installing, zef says it installs that of grondilu: github.com/grondilu/libdigest-raku 16:33
if i recall fine, there were some interesting things going on with this latter one
i.e., module vs distribution stuff
i don't quite understand what is what there, nor if the issue author meant by "orphaned" that this latter module got into the umbrella of Digest 16:34
i also tried "zef install Digest" btw, and it does the same thing with "zef install Digest::MD5" and the same error appears 16:35
so, i guess it's to do with the module but idk really
ab5tract Also: github.com/cosimo/perl6-digest-md5/issues/26
Ah, just saw your additions nahita 16:37
Looks like there is a long history of installation issues across both editions 16:38
It’s a shame it’s the example at Raku.guide :( 16:39
._taa_. Thanks for investigating this. 16:53
ab5tract no problem! literally any other module should work fine :) 17:07
`Digest::SHA256`, for example
18:58 teatime left
librasteve okaaay - Digest::MD5 is a bit of an issue ... TLDR; go zef install 'Digest::MD5:ver<0.05>' 19:03
that pins the version to the github.com/cosimo/perl6-digest-md5 variant (which works fine although abandoned) 19:04
(fine on my mac, but there are some PRs (eg from JJ) to fix install issues that were never accepted) 19:05
there is another module github.com/grondilu/libdigest-raku that squats on all the various zef names Digest::MD5, Digest::SHA256, etc 19:07
this is the one that fails -- very oddly it says Nb. Since commit 911c292688ad056a98285f7930297c5e1aea3bfb, there is no Digest module anymore, the submodules, Digest::MD5, Digest::SHA1 and so on must be used directly. 19:08
and when you go zef install Digest::MD5, you get ===> Staging Digest:ver<1.1.0>:auth<zef:grondilu> ===> Staging [OK] for Digest:ver<1.1.0>:auth<zef:grondilu> ===> Testing: Digest:ver<1.1.0>:auth<zef:grondilu> ===> Testing [OK] for Digest:ver<1.1.0>:auth<zef:grondilu> ===> Installing: Digest:ver<1.1.0>:auth<zef:grondilu> 19:09
so zef is taking the request for Digest::MD5 and resolving it to the stated as abandoned Digest umbrella distribution that advises us to install the submodules directly (whatever that means) ... seems like a circular vortex of shit to me 19:12
tonyo: please can you take a look at this and maybe give us the best route forward (eg. adopt Digest::MD5 as a community module and uber-bump the version??) 19:13
ab5tract that would be my suggestion too 19:14
librasteve++
librasteve [me I would just delete Digest from zef] ... 19:19
tonyo is that on zef install? 20:05
librasteve tonyo: yes 20:06
tonyo can you post it in #raku and cc ugexe plz or make a ticket on the repo? 20:07
i'm on my phone, haven't had a lot of time for raku lately dealing with health and va stuff
librasteve sure
tonyo tyvm 20:14
librasteve there are two issues, one on zef for your advice github.com/ugexe/zef/issues/558 and one on grondilu to fix the docs example github.com/grondilu/libdigest-raku/issues/40 20:29
22:23 vms14 joined