🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). This channel is logged for the purpose of keeping a history about its development | evalbot usage: 'm: say 3;' or /msg camelia m: ... | Log inspection is getting closer to beta. If you're a beginner, you can also check out the #raku-beginner channel!
Set by lizmat on 25 August 2021.
00:02 reportable6 left 00:05 reportable6 joined 00:26 MasterDuke92 left
[Coke] Using iterm2, and it's Readline, yes 00:31
00:31 dextercd left
japhb [Coke]: Hmmm, I shouldn't have made much of any difference to Readline support ... is there a "golf"? Or does it literally require two ^C's and leave the terminal in a bad state *every time*? 00:47
00:52 lichtkind_ left 01:13 melezhik18 joined 01:16 melezhik18 left 01:27 monkey_ left 01:44 gordonfish- joined 01:47 gordonfish left 02:47 notable6 left, committable6 left, shareable6 left, statisfiable6 left, reportable6 left, benchable6 left, evalable6 left, sourceable6 left, nativecallable6 left, coverable6 left, linkable6 left, unicodable6 left, quotable6 left, squashable6 left, releasable6 left, bloatable6 left, tellable6 left, greppable6 left, bisectable6 left, evalable6 joined, linkable6 joined, nativecallable6 joined 02:48 greppable6 joined 02:49 tellable6 joined, squashable6 joined, benchable6 joined 02:50 unicodable6 joined
Geth vim-raku: flwyd++ created pull request #34:
Set keywordprg=rakudoc
03:20
03:48 sourceable6 joined, shareable6 joined 03:49 coverable6 joined, notable6 joined, bloatable6 joined 04:44 melezhik left 04:47 quotable6 joined 04:49 committable6 joined 05:49 quotable6 left, benchable6 left, bloatable6 left, squashable6 left, shareable6 left, greppable6 left, notable6 left, nativecallable6 left, linkable6 left, coverable6 left, sourceable6 left, evalable6 left, unicodable6 left, committable6 left, tellable6 left, sourceable6 joined, tellable6 joined, shareable6 joined 05:50 coverable6 joined, committable6 joined, nativecallable6 joined 05:51 notable6 joined, bloatable6 joined 05:52 benchable6 joined 06:05 reportable6 joined 06:12 swaggboi left 06:23 swaggboi joined 06:49 bisectable6 joined, releasable6 joined, evalable6 joined, unicodable6 joined, greppable6 joined 06:50 linkable6 joined 06:51 squashable6 joined, quotable6 joined 07:23 seednode left 07:24 seednode joined
Geth doc: dd6e4a3a86 | (Peter du Marchie van Voorthuysen)++ | 11 files
Improve documentation of the list routine

The documentation of the list subroutine is a good place to explain the single argument rule yet again.
Most core types implementing a .list method only accept an object instance as the invocant. If the core type implements .list as a multi method, listing the type object is handled by
   multi method list(Any:U: --> List)
07:36
doc: 35665aa862 | (Peter du Marchie van Voorthuysen)++ | doc/Type/List.pod6
Improve wording and formatting.
linkable6 Link: docs.raku.org/type/List
doc: 8c3e724fdb | (Peter du Marchie van Voorthuysen)++ (committed using GitHub Web editor) | 11 files
Merge pull request #3975 from dumarchie/master

Improve documentation of the list routine
07:47 statisfiable6 joined
Geth doc: dumarchie++ created pull request #3980:
Talk about collections rather than containers
08:09
08:14 sm1 joined 08:25 sm1 left 08:30 lichtkind_ joined 08:35 seednode left 08:36 seednode joined 08:55 lichtkind_ left 09:12 Sgeo left 09:16 zostay left 09:19 leont left, leont joined 09:20 zostay joined 09:23 rjbs left 09:27 rjbs joined 09:40 patrickb joined 09:52 squashable6 left 10:30 A26F64 joined 11:09 A26F64 left
patrickb o/ 11:12
I have a project that reproducibly uses a stale precomp file and doesn't recompile the changed source. 11:14
Since it's so nicely reproducible, I'd say it's a good place to debug the behavior. 11:15
Anyone around to give me some hints of where to look?
lizmat fwiw, I see this behaviour when I'm reinstalling a module from source with --force, while running tests on a dependency with -Ilib 11:23
I would have to nuke the lib/.precomp in the dependency to "see" the newly installed module
patrickb: does that match any of your situation ?
patrickb In this case it's the script I'm calling itself 11:29
so not a module. I'm pretty sure I did change the -I parameters before it started doing this. 11:30
Sadly adding RAKUDO_MODULE_DEBUG causes a ton of output but then segfaults. 11:31
lizmat segfaults? interesting... I've never seen that
patrickb I'm on 2021.09
lizmat I'm sure we could need some precomp sanity checker logic... nine ugexe might know if that already exists 11:32
patrickb <hanging the version will probably spoil the reproducibility though.
12:02 reportable6 left 12:03 reportable6 joined
patrickb I give up for now. :-( 12:08
ugexe patrickb: the RMD output might be useful to show anyway 13:00
13:03 evalable6 left, linkable6 left 13:05 evalable6 joined
ugexe i usually forget most of what i know about precomp days after i do anything with it, so when i debug its generally just placing print statements in the various CU::* classes but that would kill your reproducibility 13:09
you might also try to whittle down your script / dependencies to the bare `use` statements required to reproduce (to potentially reduce RMD output) 13:11
patrickb thanks. This is helpful. 13:17
Let's see when this comes up again.
ugexe adding a new path to the includes via e.g. -I parameters will change which precomp gets used as well 13:19
raku -I. bin/zef --help
raku -Ixxx -I. bin/zef --help 13:20
one will precomp into ./, one into ./xxx
Geth App-Rakubrew: 36171e2b44 | (Patrick Böker)++ | 2 files
Fix `register` with relative paths
13:29
App-Rakubrew: a1de52d9d0 | (Patrick Böker)++ | 3 files
Version 22
ugexe CUR.install(..., :force) will leave the old precomp files behind. perhaps it should remove those, but then thats really just making :force an alias for uninstall + install (i.e. maybe use uninstall before installing instead of force) 13:37
13:53 squashable6 joined 14:06 linkable6 joined 14:19 monkey_ joined 14:21 abraxxa-home joined 14:24 abraxxa-home left 14:26 casey joined 14:53 A26F64 joined 15:02 Xliff joined
patrickb When seeing "const_iX NYI" that's definitely a compiler bug, because that OP shouldn't show up in compilation, correct? 15:04
patrickb sees those on latest master.
tonyo patrickb: does the module have a `use lib` init? 15:24
Xliff I am currently working on a program that needs to pull a type off of an attribute. However, when I do so I am getting a "MyType(Any)" rather than a "MyType" 15:29
How can I get rid of the "(Any)"
Geth doc: bb1a934fe2 | Coke++ | doc/Type/List.pod6
Fix example compilation
15:31
doc: 51182b9d84 | Coke++ | xt/pws/code.pws
learn new word
linkable6 Link: docs.raku.org/type/List
tonyo example? 15:56
patrickb tonyo: The thing that causes const_iX NYI? I've seen them in the tests of Cro::HTTP:ver<0.8.4> and Red:ver<0.1.47>. 15:59
tonyo your precomp issue 16:01
16:02 evalable6 left, linkable6 left 16:03 linkable6 joined 16:37 MoC joined
patrickb tonyo: It's possible it was a false report. /o\ 16:54
16:54 MoC left 17:07 MoC joined 17:10 casey left 17:25 jess joined 17:35 autarch joined 17:36 autarch left 17:38 gordonfish- is now known as gordonfish 17:42 sm2 joined 17:50 monkey_ left 17:55 monkey_ joined 18:02 reportable6 left, evalable6 joined 18:08 simcop2387 left, perlbot left 18:12 melezhik joined, melezhik left 18:19 simcop2387 joined 18:20 perlbot joined
SmokeMachine m: say Int().^target_type.^name # Xliff 18:33
camelia Int
18:48 perlbot left, simcop2387 left 18:51 perlbot joined 18:56 simcop2387 joined 18:58 Sgeo joined 19:03 reportable6 joined
A26F64 I'm wondering if someone could recommend a straightforward tutorial explaining how to distribute several modules, classes, subsets, etc. in separate files and then execute them locally as a module. Basically, how to create a working module that may or may not end up deployed into the broader Raku module ecosystem. I feel that the official 19:23
documentation, while overall excellent, is not particularly clear on that.
(Definitely a beginner's question. I did ask in #raku-beginner once earlier without seeing a response.)
In Perl packages are placed in files, identified with the `package` keyword with double-colon separators, and then imported by `use`ing that full identifier. Raku is (I am to understand) not that simple.
There's quite a bit of discussion in the documentation about actually using the elements of a module once installed via zef. But there's little about setting this up locally yourself. The "modules" page contains paragraphs about META6.json and something called "compunits" and the -I switch and who knows what else. All of which (at first, anyway) 19:24
seems relatively complicated for just creating a set of interrelated files.
ugexe so dont overcomplicate it 19:26
it sounds like most of what you are asking would be the same as in perl 19:27
gfldex A26F64: we tend to use tools like raku.land/cpan:SKAJI/App::Mi6 and raku.land/github:gfldex/META6::bin
A26F64 I did find those listed at docs.raku.org/language/modules-extra. But those represent very simple repositories. 19:28
Uploaded file: uploads.kiwiirc.com/files/cc879228...pasted.txt 19:30
I didn't mean to send that as a file.
I eventually found out that you need to use the -I switch to use CompUnit::Repository::FileSystem instead of CompUnit::Repository::Installation. In fact the CompUnit::Repository::FileSystem method of doing things seems to be incompatible with the Installation method that is the preferred ultimate form of the module since the former uses Perlian
filesystem references and the latter META6.json.
For example, do you have to temporarily specify directories in your `use` statements during development and then convert all such statements to call whatever is defined in META6.json's `provides` attribute once you are ready to release the thing to the module ecosystem? (Assuming, of course, that you even intend to do so?) 19:31
ugexe there is a lot wrong with that statement. first -I isn't tied to a specific compunit repo, it could very well point to a installation. secondly i'm not what you mean by its not compatible... it very much is compatible
and indeed a ::FileSystem will use a META6.json assuming one exists at whatever directory you point at 19:32
A26F64: i would suggest trying whatever you think would work in perl
A26F64 Please correct me if I'm wrong about this observation: I discovered that specifying a filesystem file in META6.json's `provides` attribute seems to load the whole file without respect to the module name used as the corresponding key. Which means that a file `use`ing one class in that file suddenly has access to all classes in it. I thought that 19:36
META6.json was intended to limit access to packages in the namespace.
ugexe a whole file always gets loaded regardless of what is loading it 19:38
so if youre asking if you can have `package Foo { class Foo1 { } }; package Bar { class Bar1 { } };` in a single file yet load/expose only one of Foo or Bar, then no that doesnt work 19:39
regardless if its ::FileSystem or ::Installation
A26F64 I had kind of assumed that META6.json restricted the packages themselves mainly because docs.raku.org/language/modules says: "In the provides section, include all the namespaces provided by your distribution and that you wish to be installed". That doesn't exactly say that other namespaces won't be installed, I guess, but it wasn't a leap 19:43
to infer that.
ugexe yeah thats not exactly an accurate statement 19:44
all the files and namespaces get installed. the namespace part of the provides just provides the namespace to load with, and may not neccesarily match any namespaces in the file 19:46
i mean ideally sure it'd be great if it could do what you suggest though (and I think the original design docs suggest this) 19:47
but if you list `"A1":"lib/Foo.rakumod", "A2":"lib/Foo.rakumod"` then you just precompile Foo.rakumod twice and make it `use`able via `use A1` or `use A2` 19:48
A26F64 I suppose that we can be somewhat minimalist, then, in what we supply to `provides`. 19:50
Allow me also to (try to) explain my earlier comment that the compunit modes are inconsistent....
ugexe for provides you generally want one entry for each file, and given each file some namespace you will `use` (which generally matches whatever the top level namespace declared in the file is, but might not be) 19:51
A26F64 (I thought that I had an expressive example for my comment but need to review that. Sorry.) 19:54
I can experiment with the file namespaces given your explanation above; thank you. 19:55
20:03 linkable6 left, evalable6 left 20:04 linkable6 joined
Xliff How is CoercionHOW exposed in raku? "Perl6::Metamodel::CoercionHOW" doesn't work. 20:08
A26F64 ugexe I'll experiment further with the file structure given your responses. Thank you for the clarification and for your patience. 20:09
Xliff m: say Metamodel::CoercionHOW
camelia No such method 'gist' for invocant of type
'Perl6::Metamodel::CoercionHOW'. Did you mean 'isa'?
in block <unit> at <tmp> line 1
Xliff Ah. that works. 20:10
20:18 dextercd joined 20:44 A26F64 left 20:45 squashable6 left, squashable6 joined 21:16 monkey_ left 21:23 monkey_ joined 22:06 evalable6 joined 22:14 monkey_ left 22:40 melezhik joined 22:41 melezhik left 23:04 colemanx joined 23:51 sm2 left 23:54 Xliff left