🦋 Welcome to Raku! raku.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: colabti.org/irclogger/irclogger_log/raku
Set by ChanServ on 14 October 2019.
Geth doc/finanalyst-patch-2: a3547c16fa | (Richard Hainsworth)++ (committed using GitHub Web editor) | doc/Language/typesystem.pod6
Adding more information about TWEAK

There is almost nothing about TWEAK in the documentation. Even when the TWEAK is mentioned, it is not clear why it is needed, until you get a compile error like the one shown in the example.
   Further, the documentation does not contain any reference to the signature of TWEAK.
A small test with `submethod TWEAK(|c) {say $c.raku}` shows that it is passed the same variables as are passed to BUILD.
14:13
doc: finanalyst++ created pull request #3502:
Adding more information about TWEAK
14:14
codesections I've got a couple of (possibly dumb) questions that I haven't been able to find answers to in the docs: first, is there a way to `use` a module that isn't currently in the module search path? For example, if I'm in the REPL and want to use a module that isn't in the current path, is there a Raku command that lets me do so, or do I need to exit the REPL and restart it with the correct `-I` argument? 15:43
Second, what does the `-o` flag do when invoking raku? The help output states " -o, --output=name specify name of output file". I thought that might be an output file for stdout, but `say` still prints to normal stdout. Or I thought it might be an output file for generated bytecode, but it doesn't seem to be (or, at least, I can't find the output if it is) 15:46
(in an effort to avoid an XY problem, the reason I was looking into the `-o` flag in the first place is that I was curious whether there's a way to output precompiled bytecode for a Raku script. Raku is *so nice* for writing bash-like utility scripts except for the startup time, so I've been looking into configuration options that might speed that up) 15:49
I know startup time is improving/will improve, but I'm looking at interim measures :)
timotimo ohai codesections 15:51
codesections hi :)
timotimo you can change the search path at any time with a "use lib '/foo/bar'" statement
-o is indeed for compiler's stages rather than for programs you run, and it's actually used to generate bytecode for big modules; the core setting is pre-compiled this way 15:52
the easiest way to get a "program" or "script" precompiled for faster startup is to move all of its functionality into a module and just "use TheModule" as the only thing in the script 15:53
or like rakudo -MTheModule -e ''
what's your startup time like at the moment? 15:54
codesections I have a really detailed answer to that :D 15:55
codesections I was playing around profiling startup times for "hello, world" programs in various languages on my development machine and got 117.63ms for Raku 15:56
which is not bad at all, but noticeable for interactive use 15:57
here are some other langs, if you're interested:
Shell (dash 0.5.10.2): 0.17 ms
Yash 2.49: 0.30 ms 15:58
Lua 5.3.3: 0.32 ms
Bash 5.0.16(1): 0.36 ms
Perl 5.30.0: 0.50 ms
ZShell 5.8: 0.54 ms
Tcl 8.6: 1.23 ms
CShell 20110502: 1.46 ms
Vimscript 8.1: 2.53 ms
Fish 3.1.0: 2.25 ms
Python2 2.7.18rc1: 3.87 ms
PHP 7.4.3: 3.94 ms
Elisp 26.3: 5.62 ms
Guile 3.0.1: 5.73 ms
Python 3.8.2: 5.78 ms
PyPy 7.3.1: 16.25 ms
Lisp SBCL 1.4.3: 22.11 ms
Fennel 0.4.1: 22.88 ms
JavaScript v14.5.0: 25.81 ms
Ruby 2.7.0p0: 30.53 ms
Factor 0.98: 71.96 ms 15:59
Racket v7.7: 77.22 ms
Julia 1.4.2: 97.18 ms
Raku 2020.01: 117.63 ms
Clojure 1.10.1: 811.87 ms
(after running that test, I switched to the 2020.06 version of Raku)
timotimo yeah that about matches what i get 16:11
the work jonathan is doing at the moment (the RakuAST thing) sounds like it can enable a decent start-up time decrease 16:12
sena_kun timotimo, how so? Isn't it adding up a layer for `parse -> RakuAST -> QAST -> bytecode`? 16:21
codesections if it does, that would be pretty great. I'm just starting to dip my toes into the Raku ecosystem, but it sure seems like Johathan is everywhere – that RakuAST, MoarVM, cro, Comma 16:22
I can't tell how much of that is because Raku really *is* as productive as y'all say, and how much he's just really impressive :D But I'm hoping it's at least a bit of both! 16:23
sena_kun codesections, to be precise, cro does not demand tremendous amounts of time these days and every release of Comma these days is mostly done by me, so jnthn can take the more interesting bits. :P 16:24
codesections Oh, thanks for the clarification! 16:24
I hope it didn't sound like I was minimizing your contribution (or anyone else's, for that matter). Like I said, I'm very new 16:25
sena_kun No problem. I mean, there are _indeed_ a lot of things on jnthn's shoulders, hard to say otherwise. But it is not a "almost one contributor project", there are people around, so it isn't "too" cruel. 16:27
codesections That makes sense, thanks for the clarification. (I like the implication that it's not too cruel – just cruel enough!) 16:29
re: "adding up a layer for `parse -> RakuAST -> QAST -> bytecode`", things like that *can* speed things up. I mostly program in Rust, and they had a similar addition: they previously went from src->HIR->LLVM IR->machine code, and changed to src->HIR->MIR->LLVM IR->machine code. And that resulted in a significant speedup 16:36
(even though it added a step, it saved enough work at the LLVM level to *much* more than pay for itself 16:37
)
sena_kun May be, would be rather cool if so. :)
Geth doc/finanalyst-patch-2-1: a101f8c393 | (Richard Hainsworth)++ (committed using GitHub Web editor) | doc/Language/typesystem.pod6
Update typesystem.pod6

There is almost nothing about TWEAK in the documentation. Even when the TWEAK is mentioned, it is not clear why it is needed, until you get a compile error like the one shown in the example.
   Further, the documentation does not contain any reference to the signature of TWEAK.
A small test with `submethod TWEAK(|c) {say $c.raku}` shows that it is passed the same variables as are passed to BUILD.
16:50
doc: finanalyst++ created pull request #3503:
Update typesystem.pod6
skaji_ Hi, 17:45
I tried making setup-raku-action for GitHub Actions: github.com/skaji/setup-raku
It seems it works fine. github.com/skaji/raku-Acme-Test-Mo.../158432076
I think I could transfer the repository to github.com/Raku, and we could maintain it as Raku community. 17:46
Any thoughts?
lizmat skaji_: excellent idea... please go ahead :-) 17:52
SmokeMachine skaji_: what about a mi6 release GitHub action? 18:14
codesections By the way, it looks like precompiling a "hello world" script as a module and en 18:16
*invoking it with -e '' (as discussed above) doesn't make the startup faster – though I bet it would for less trivial scripts 18:17
timotimo it should make a bigger difference if the module has more code in it 18:32
codesections Yeah, I figured as much :) Just adding to my chart for best-case/hello world times
skaji_ lizmat: Thanks! Done. github.com/Raku/setup-raku 18:33
I would like to publish setup-raku to github.com/marketplace. 18:36
For this, it seems that Raku org admins must accept the GitHub Marketplace Developer Agreement.
lizmat: Could you do that? 18:37
SmokeMachine: It's not difficult to create mi6 release GitHub actions. 18:39
I personally hesitate to store PAUSE password in GitHub Actions, though:)
SmokeMachine even with GH secrets?
skaji_ Personally, yes. 18:40
skaji_ A PAUSE account usually correspond to a real person, not to some organization. 18:48
If you store your PAUSE password in GitHub repository, then any collaborators can access your PAUSE password. 18:49
codesections The docs list several "module builder and authoring tools", docs.raku.org/language/modules-extra, and I don't really understand the difference between them. skaji, is your App::Mi6 a replacement/alternative to App::Assixt and/or Module::Skeleton? Or do the three serve different purposes, so that I'd use more than one at a time? 18:55
skaji_ As it says, Module::Skeleton only generates a skeleton module. 19:12
App::Assixt may have some useful features that mi6 does not have.
skaji_ I make mi6 intentionally simple and "self-assertive". 19:14
codesections Thanks! So, if I'm understanding correctly, App::Assixt and mi6 are alternatives (that is, I should use one or the other, but probably not both)? 19:15
And mi6 exists to be a simpler/more minimal alternative?
skaji_ Right, it does not make sense to use 2 authoring tools to the same 1 repository. 19:18
codesections Thanks, makes sense! And, in this context, I read "self-assertive" to mean something like "declarative" – that is, based on a config file that describes what you want, rather than a more procedural description of how to do it?
(Is that right? I haven't come across the term "self-assertive" in this context before) 19:19
skaji_ By "self-assertive", I mean: 19:22
"mi6 build" always regenerates META6.json and README.md. "mi6 release" always checks you have Changes entries, and creates git commit and tag. 19:23
codesections aha, I get it – "assertive" in the sense of test "assertions" 19:24
thanks for clearing that up
Sounds like just the right tool for me, then :D
One other quick question about mi6 while you're here: I notice that `mi6 new` creates a `.pm6` file with `use v6.c`. Is there a particular reason to use 6.c instead of 6.d? 19:27
skaji_ actually i'm thinking about removing "use v6" things 19:32
github.com/skaji/mi6/pull/93 19:33
(I'm going to go to bed. See ya) 19:34
codesections Thanks again :D
SmokeMachine I'm starting to explain the Red's architecture on documentation (still att the beginning) could some one take a look and give me some opinions/suggestions/ help on how it's going? fco.github.io/Red/tutorials/architecture 19:44
codesections I might not be the right audience for this – I'm very new to Raku and don't do a ton of work with ORMs in my main language. But I took a look at the page you linked and am happy help if I can 19:56
I thought that page was very clear and gave a nice overview :) 19:58
I have a few suggestions for the 2nd paragraph – mostly just tweaking the wording slightly to break up the concepts a bit. Would you like me to paste my suggestion in? 19:59
MasterDuke SmokeMachine: github.com/FCO/Red/pull/432 has some minor edits 20:01
codesections Oh, that's obviously a better approach than pasting suggestions in IRC. I'll also open a PR 20:03
rypervenche Is it safe to say that when using .kv on a hash, there would be no need to use a .map on it since the .kv already kind of does that? 20:52
timotimo i wouldn't say so? 20:55
i mean you'd put whatever code you like in the map, kv just gives you keys and values rather than pair objects which is the default listification of hashes 20:57
Xliff Ooh! VTE! 23:19
Xliff discoveres another GLib project for portin' 23:20
raku-bridge <DataKinds> has the file extension been officially changed to .rakumod yet? 23:21
<DataKinds> it seems my install (Rakudo version 2020.06-7-gf1960baa9 built on MoarVM version 2020.06-6-gbf6af07de) isn't recognizing some files unless they have .pm6 23:22
<DataKinds> despite my META6.json reporting otherwise
Xliff DataKinds: To my knowledge, .rakumod should work, but I don't know if all of the authoring tools have been updated to use it, yet. 23:23
raku-bridge <DataKinds> that's so bizarre Xliff, because I have a cro project here and a Routes.rakumod 23:36
<DataKinds> if I write it as Routes.rakumod (with the same in my META6), I get a Could not find Routes error 23:37
<DataKinds> whereas if I rename it Routes.pm6 and change the META6 accordingly, it works fine
AlexDaniel somebody please tell them? :) www.reddit.com/r/ProgrammerHumor/c...s/fx0zbyf/ 23:40