🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). Log available at irclogs.raku.org/raku/live.html . If you're a beginner, you can also check out the #raku-beginner channel!
Set by lizmat on 6 September 2022.
00:00 reportable6 left 00:01 reportable6 joined 00:05 deoac joined 00:40 habere-et-disper left 00:51 bigdata left 01:51 linkable6 left, coverable6 left, unicodable6 left, releasable6 left, shareable6 left, evalable6 left, sourceable6 left, notable6 left 01:52 unicodable6 joined 01:53 notable6 joined, shareable6 joined, releasable6 joined, coverable6 joined, sourceable6 joined 01:54 linkable6 joined, evalable6 joined, ProperN[out] joined, ProperNoun left 02:33 deoac left 02:40 MasterDuke joined 03:21 squashable6 left, squashable6 joined 03:37 razetime joined 03:43 merp left 03:45 merp joined 03:48 razetime left 04:48 squashable6 left, coverable6 left, benchable6 left, shareable6 left, nativecallable6 left, reportable6 left, releasable6 left, notable6 left, committable6 left, evalable6 left, sourceable6 left, quotable6 left, greppable6 left, unicodable6 left, linkable6 left, statisfiable6 left, tellable6 left, bloatable6 left, bisectable6 left, tellable6 joined 04:49 statisfiable6 joined 04:50 unicodable6 joined, committable6 joined, nativecallable6 joined, bisectable6 joined, benchable6 joined, greppable6 joined, shareable6 joined, linkable6 joined 04:51 notable6 joined, releasable6 joined, quotable6 joined, bloatable6 joined, squashable6 joined, evalable6 joined, reportable6 joined, sourceable6 joined, coverable6 joined 05:51 unicodable6 left, bloatable6 left, greppable6 left, notable6 left, releasable6 left, nativecallable6 left, statisfiable6 left, squashable6 left, reportable6 left, bisectable6 left, shareable6 left, evalable6 left, sourceable6 left, tellable6 left, committable6 left, benchable6 left, linkable6 left, quotable6 left, coverable6 left, squashable6 joined 05:52 shareable6 joined, releasable6 joined, notable6 joined 05:53 linkable6 joined, greppable6 joined, quotable6 joined, bloatable6 joined, sourceable6 joined, benchable6 joined, committable6 joined 05:54 statisfiable6 joined, reportable6 joined, evalable6 joined, tellable6 joined, nativecallable6 joined, unicodable6 joined, bisectable6 joined, coverable6 joined 06:00 reportable6 left 06:01 reportable6 joined 07:01 shareable6 left, bisectable6 left, squashable6 left, evalable6 left, statisfiable6 left, coverable6 left, benchable6 left, unicodable6 left, quotable6 left, nativecallable6 left, linkable6 left, notable6 left, sourceable6 left, committable6 left, bloatable6 left, greppable6 left, releasable6 left, tellable6 left, reportable6 left, reportable6 joined, tellable6 joined, evalable6 joined, sourceable6 joined, shareable6 joined, unicodable6 joined 07:02 committable6 joined, statisfiable6 joined, releasable6 joined, notable6 joined 07:03 bloatable6 joined, nativecallable6 joined, coverable6 joined, linkable6 joined, bisectable6 joined, squashable6 joined, benchable6 joined, greppable6 joined, quotable6 joined 07:09 siavash joined 07:18 euandreh left 08:06 siavash left, siavash joined 08:17 tea3po joined 08:20 teatwo left 08:22 sena_kun joined 08:28 siavash left 08:29 siavash joined 09:29 evalable6 left, linkable6 left 09:30 evalable6 joined 09:31 linkable6 joined 09:45 siavash left 09:46 NemokoschKiwi joined 10:25 Sgeo_ left 11:07 euandreh joined
tbrowder__ ugexe: what do you think about some new zef options: (1) remove all but the latest version of installed modules, (2) install the latest of all known modules, and (3), install modules named in a text (or JSON) file 11:21
nemokosch I think this is also a point that somebody must have raised earlier: zef install can install modules that it can't uninstall 11:33
the resolution is not the same
11:40 s3thi joined 11:41 s3thi left, s3thi joined
tbrowder__ an example? 11:41
11:42 s3thi left
nemokosch zef install IO::String installs Text::CSV 11:50
zef uninstall IO::String won't uninstall it
lizmat because Text::CSV depends on it? 11:53
tbrowder__ early on (and up until recently) i had the idea root could install system-wide modules for all users, but that turns out to be a nightmare. now i think the default is for whomever the user is, each user should manage his own.
nemokosch lizmat: because Text::CSV, the distribution exposed IO::String, a module 11:54
and it happens to have a higher version than IO::String, the distribution
lizmat does the Text::CSV version have an :auth? then maybe uninstall with that :auth? 11:55
tbrowder__ but i still have to test to see what happens when i, as root, install a module.
nemokosch I would be surprised if zef uninstall IO::String:auth<blah> would suddenly uninstall it but who knows 11:56
tbrowder__ originally, as root, i was installing to the site where rakudo was installed--bad juju for sure!
lizmat hmmm.. I guess you're right, you can only uninstall dists
nemokosch you know my opinion already 11:58
lizmat yes :-) 11:59
nemokosch The least controversial take is: it should be written with huge red bold letters that dependencies are not the distributions but modules which are associated to distributions
I'm willing to bet that most Raku users don't know it
hell, perhaps most Raku users don't know that there is a difference between "module" and "distribution" and why would they expect it 12:00
12:00 reportable6 left 12:03 reportable6 joined
tbrowder__ nemokosch: i have always made my META6.json files have "modules distros" as dependencies, not modules inside other modules. 12:19
a 12:20
otherwise it makes no sense to me
nemokosch so you mean that if you used Cro::HTTP::Client, you would declare Cro::HTTP as the dependency? 12:25
ugexe uninstalling modules in general is not something to be taken lightly, particularly when you can have multiple versions installed 12:29
it is very easy to think that way though if you are just thinking about one or two things in isolation
tbrowder__ i would look at raku.land looking for Cro::HTTP::Client. gonna do that now
yes 12:30
i would put Cro::HTTP as dependency
nemokosch now, if everyone just did that, there would be no need to present modules as dependencies 12:31
which would solve all the problems of "modules as dependencies" 12:32
tbrowder__ i don't understand. are you saying zef will suck out only that module?
nemokosch no, and that's why it was always a bad idea
it's as if we started using keywords in the place of URL's, saying that a Google search will resolve them either way 12:33
what gets installed is always the distribution
tbrowder__ well i'm just a simple man, the way i use it is the way i saw it being used. i started with panda and zef grew out of that 12:34
nemokosch to be honest, I don't think zef as a tool is at fault 12:35
the very idea zef is built upon is the problem
tbrowder__ some of the very old modules reflect the wild west nature of the ecosystem as it started.
nemokosch zef does a decent job at making a terrible idea work reasonably well
tbrowder__ i guess what i call a "module" is now a "distribution" 12:36
so i'm a "distro" author.. who woulda ever thunk it. ma!
nemokosch :DDD 12:37
12:38 razetime joined
what do META files look like in Perl? 12:38
ugexe if our Version object had a way to make a range that is less-than a version (similar to how e.g. 1.8+ is a range that is greater than a version) then the uninstall thing would Just Work via like `zef uninstall SomeThing:ver<1.8->` (which would theoretically uninstall all modules less than version 1.8) 12:39
nemokosch github.com/Grinnz/Mojo-DOM58/blob/...A.json#L72 this is what I'm thinking of 12:40
Perl wraps modules up into distributions BUT it lets you define individual metadata for each of them
tbrowder__ i was just going to say our zef/fez system is worlds above cpan. and from limited experience with ruby, python, npm, and rust: better than those, too
not to speak of modern fortran 12:41
nemokosch better in what regard?
tbrowder__ use, visibility,... 12:42
ease of use
nemokosch I don't know, I've never had any problems with npm 12:43
neither with pip but I admittedly barely used that
tbrowder__ raku.land needs some help, but getting better (needs to move to github imho)
nemokosch yeah that's a touchy topic 12:44
by the way, raku.land is also themed around distributions, not modules.
tbrowder__ yes, i see that, 'cause that's the way lizmat's old system worked, too 12:45
lizmat my old system ? 12:46
tbrowder__ i would like to help raku.land but gitlab is too much pain for me now
yes the search bar on raku.org (or wherever it was)
you were the only person i remember working with it 12:47
gotta go...
librasteve I would like to zef install a directory via the resources in META6.json, but get this: ===> Install [FAIL] for Dan::Polars:ver<0.0.3>:auth<zef:librasteve>:api<1.1>: 'resources/dan/src' is a directory, cannot do '.open' on a directory 12:51
12:51 MasterDuke left
here's the META6.json resources tag: "resources": [ "dan/src", "libraries/dan" ], 12:52
is this possible? if so how to do it?
(libraries/dan is actually the so file libraries/libdan.so ... that part works fine) 12:54
ugexe you have to declare every file, not directory 12:55
i.e. dan/src/myfile1.c, dan/src/myfile1.h, etc 12:56
librasteve well that's ok for the src files, but i would also like to bring in the deps creatd by rust cargo build during the build phase ... something like "resources": [ "dan/src", "dan/target/debug/deps", "libraries/dan" ], 12:58
BUT there are 289 of these and that makes it a tad tricky ;-) 12:59
ugexe write something to populate it for you
say CompUnit::Repository::FileSystem.new(prefix => $*CWD.add("lib")).distribution.meta<resources> 13:01
evalable6 ()
ugexe for instance
(point it at the lib directory specifically so it doesn't use the existing META6.json and has to generate one)
then we print the output of the resources section of the META6.json data it guesses for the lib dir 13:02
you might have to modify the things in libraries/ though, i dunno if it can properly guess those
modify the things prefixed with libraries/ rather 13:03
librasteve okay ... I think I get the drift here ... 13:04
13:07 razetime left
looks at the docs docs.raku.org/type/CompUnit/Reposi...FileSystem 13:07
so Build.rakumod is run # assuming one is cloned into the Dan::Polars git repository... i guess? 13:08
anyway I will make some attempt to try this and no doubt be back soon with more questions 13:10
ugexe Build.rakumod gets run when its associated distribution gets installed, or when someone runs `zef build .` in a distributions repo 13:11
13:11 Guest25 joined
ugexe i wonder though if you couldnt just populate those before you author the module 13:11
if the files will always be the same for everyone then it shouldnt be done in Build.rakumod 13:12
although you still would probably run e.g. `make` that uses those files in Build.rakumod 13:13
librasteve the build process runs cargo build based on the Cargo.toml and this pulls in the rust deps for the rust source and that is when the deps are made (specifics would depend on the version of rust and all the deps that the rust polars library needs and will no doubt vary over time) 13:14
ugexe i suppose if some rust tool is generating those files at build time you'd have to generate in Build.rakumod, so nevermind all of that lol
librasteve and the rust deps are pinned with names like ffi_convert-8a839fdf5c77098d.d so I can't predict those either and you tell me that META6.json cannot have wildcards afaict 13:16
must dash 13:17
thanks for the pointer so far ... that will certainly open up a new front
13:28 Xliff joined
Xliff \o 13:28
13:29 sena_kun left 13:31 sena_kun joined
tbrowder__ on another subject, the "distro" i was having trouble with the last few days is Font::FreeType which does have a Build.rakumod at the top level. it builds and tests fine on three of my 4 debian hosts running raku. until yesterday it would not install on my new main host. it would get to a point and complain about a Slip that wasn't an IO path. that "slip" was triggered somehow by an exported variable pointing to a %?RESOURCES 13:33
file which is a system libray: libft6.so
late yesterday the installation finally worked. i do not understand Slips at all, but i hope someone can shed light on the problem. i wonder if i'm having a corrupted file somewhere or a system failure. 13:37
ugexe i think there code might be wrong
tbrowder__ i will ask on the debain list and hope a raku person is watching 13:38
ugexe %?RESOURCES<libraries/ft6>
they have that in their code
but the file name listed in there (for linux) is libfreetype.so
%?RESOURCES<libraries/ft6> would point at like libraries/libft6.so 13:39
tbrowder__ yes, i changed that to <libraries/libft6.so> in their repo but didn't get far there.
ugexe it'd need to be changed to libraries/freetype
%?RESOURCES<libraries/freetype> 13:40
tbrowder__ well they point to both libraries. the freetype on works
it uses both libraries, one as a resource for generating the other 13:41
ugexe ah ok, so it does generate a libft.so file 13:42
libft6.so rather
tbrowder__ yes
so there is some guessng magic going on i can't get a "handle" on 13:43
i'll have to keep working with david the "distro" author 13:44
thanks for taking a look, nick 13:45
ugexe you might want to debug some of the values here -- github.com/pdf-raku/Font-FreeType-...od#L33-L34 13:46
you can clone that repo, cd into it, add some debug statements to print out what %vars is getting populated with, then run `zef build .`
or you could just run those freetype-config commands explicitly i suppose 13:48
that'll be useful to pass to the author
13:48 Guest25 left 14:06 jpn joined
Geth ecosystem/main: d97d3700a4 | (Elizabeth Mattijsen)++ | META.list
Remove Term::termios

Now lives in the zef ecosystem
14:23 jpn left 14:29 euandreh left 14:48 markb17 joined
markb17 why dies True ~~ Int return True is this a bug? 14:50
nemokosch Bool descends from Int, it seems 14:52
hm, maybe all enums do 14:53
markb17 is this an issue with all enums?
nemokosch m: enum Direction <Left Right>; say Direction ~~ Int; 14:54
Raku eval True
nemokosch I suspect this is deliberate
markb17 then how do you tell the difference 14:55
nemokosch what would you like to do? 14:57
markb17 I need to tell if somethin is an Int and not a Bool 15:00
i guess i could use $x ~~ Int and $x !~~ Bool 15:01
15:06 jpn joined
nemokosch you could use .^name that returns a string or .WHAT that returns a type object 15:07
smartmatch is rather a match, not an equivalence check. If something is derived from Int it is an int
markb17 btw how do you submit bugs for the new doc site? 15:09
15:11 jpn left
nemokosch there is a repo for content and one for the website 15:15
github.com/Raku/doc github.com/Raku/doc-website 15:16
15:19 NemokoschKiwi left
lizmat m: True.WHAT =:= Int 15:28
camelia WARNINGS for <tmp>:
Useless use of "=:=" in expression ".WHAT =:= Int" in sink context (line 1)
lizmat m: my $a = 42; $a.WHAT =:= Int
camelia WARNINGS for <tmp>:
Useless use of "=:=" in expression ".WHAT =:= Int" in sink context (line 1)
lizmat m: my $a = 42; say $a.WHAT =:= Int 15:29
camelia True
lizmat m: my $a = True; say $a.WHAT =:= Int
camelia False
lizmat markb17 ^^
tbrowder__ ugexe: thanks. i'll wait on that for now. i got the repo to build fine on my "problem" host after i corrected the lib name we saw plus commenting out what i think is an incorrect test causing one failure. i've submitted a PR to the author 16:02
16:24 gabiruh joined
Xliff m: say False ~~ (True, False).any 16:52
camelia True
Xliff ^^ markb17, also
16:54 jpn joined 16:59 jpn left 17:21 deoac joined 17:23 wayland joined, wayland76 left 18:00 reportable6 left 18:01 reportable6 joined
nemokosch that's not a good idea 18:01
True smartmatches anything to True, and False smartmatches anything to False
this is in order to support when in place of if 18:02
18:43 jpn joined 18:48 jpn left 18:52 abraxxa-home joined 18:53 Sgeo joined, smarton joined 19:06 jpn joined 19:14 jpn left
tbrowder__ ugexe: david says he was referring to your 2016 Advent article on the 19:14
special nature of RESOURCES<libraries> and I saw that's what he's counting on. somehow, it didn't work reliably on my one host. when i made the library name the actual name all was well on my main host. 19:17
thebb hope someone does a raku implementation of bluesky soon atproto.com/community/projects#at-...mentations 19:21
19:27 abraxxa-home left
nemokosch well volunte- 19:32
tbrowder__ ugexe: david says he's keeping the repo as is (bummer). since it does rely on zef's magic, is it possible it's too much magic for some systems? in the meantime, i'll try your debugging suggestion. 20:00
20:00 jpn joined 20:04 jpn left
ugexe that functionality is built into the core 20:11
m: say $*VM.platform-library-name("ft6".IO) 20:12
camelia "libft6.so".IO
20:16 teatwo joined 20:17 teatwo left, teatwo joined
ugexe tbrowder__: I think you should in that issue 1) the generated Makefile and 2) the output of `tree` inside the repo (so we can see all the files that exist and were generated 3) the output of running `zef build . --debug` inside the repo 20:19
i think you should post in that issue^
20:19 tea3po left 20:26 MasterDuke joined
tbrowder__ will do 20:32
SmokeMachine lizmat: for splitting those method arguments, I'm thinking on doing something like this: 20:57
m: gist.github.com/FCO/56139e86d474cb...ace31fa293
camelia {a => 1, c => 2}
21:02 sena_kun left
tbrowder__ ugexe: using zef and the current version of Font::FreeType, i have removed and successfully installed it 3 out of 4 times. it's installed now, i closed the PR. i did look at the vars, tree, and Makefile and all looked as expected. i must have bit flips from space radiation or something. keeping fingers crossed. 21:04
21:23 jpn joined 21:27 ProperN[out] left 21:28 jpn left 21:30 ProperNoun joined 22:05 jpn joined 22:10 jpn left
tbrowder__ and thank you very much for your help! 22:11
22:12 habere-et-disper joined 22:47 Guest39 joined 22:50 habere-et-disper left 23:32 Guest39 left 23:46 jpn joined 23:51 jpn left