🦋 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.
00:04 zacts left 00:07 zacts joined 00:08 zacts left 00:13 zacts joined
[Coke] I'm about 75% done on my article - is there pressure to get it done before midnight? 00:20
00:25 aborazmeh joined, aborazmeh left, aborazmeh joined 00:35 Doc_Holliwood joined 00:39 Kaeipi joined, Kaiepi left 00:52 epony left 00:53 epony joined 01:00 __jrjsmrtn__ joined 01:01 _jrjsmrtn left 01:14 Altai-man joined 01:17 sena_kun left 01:28 aborazmeh left 01:33 Doc_Holliwood left
Geth doc: 99a5f62f16 | Coke++ | doc/Language/quoting.pod6
fix spelling
01:40
linkable6 Link: docs.raku.org/language/quoting
01:42 MilkmanDan left 01:43 molaf left 01:44 MasterDuke left 01:56 telex left, molaf joined 01:58 telex joined
guifa Is there anyway a module can insert a dynamic variable into the same scope as the ‘use’ statement so it can have lexically scoped values? 02:21
02:26 AlexDaniel joined, AlexDaniel left, AlexDaniel joined 02:27 aborazmeh joined, aborazmeh left, aborazmeh joined 02:29 fooist joined 02:35 fooist left 02:38 fooist joined 02:43 fooist left 02:44 fooist joined
fooist guifa: is this what you’re looking for? docs.raku.org/language/modules#EXPORT 02:44
02:55 fooist left 02:57 MilkmanDan joined 03:08 zacts left 03:13 zacts joined 03:15 aborazmeh left 04:15 unicodable6 left, benchable6 left, quotable6 left, coverable6 left, notable6 left, linkable6 left, bloatable6 left, releasable6 left, nativecallable6 left, reportable6 left, statisfiable6 left, evalable6 left, shareable6 left, sourceable6 left, committable6 left, greppable6 left, bisectable6 left, tellable6 left, squashable6 left, coverable6 joined, benchable6 joined 04:16 sourceable6 joined, linkable6 joined, releasable6 joined, unicodable6 joined, shareable6 joined, evalable6 joined, nativecallable6 joined, bisectable6 joined, greppable6 joined, tellable6 joined, bloatable6 joined, quotable6 joined 04:17 ensamvarg3 joined, statisfiable6 joined, squashable6 joined, reportable6 joined 04:18 notable6 joined, committable6 joined, cpan-raku left 04:19 cpan-raku joined 04:20 cpan-raku left, cpan-raku joined 05:15 sena_kun joined 05:16 Altai-man left 05:27 gnufr33dom joined 05:46 bocaneri joined 05:48 ab5tract left, ab6tract left 05:59 Grauwolf_ is now known as Grauwolf 06:11 Doc_Holliwood joined 06:19 ab5tract joined, ab6tract joined
ab6tract hey timotimo, great! except I have the complete edition of Comma so was planning to use the opportunity to explore the extended profiling options there :D 06:20
I just want to take a bit of a break from the rational topic, definitely planning to post a follow-up on the personal blog 06:21
06:23 sjm_uk joined 06:26 skids left 06:34 JJMerelo joined 06:36 zacts left 06:37 zacts joined 06:47 zacts left 07:16 MilkmanDan left 07:17 MilkmanDan joined
Geth advent: eb7f7bd6fa | (JJ Merelo)++ | 20th/articles/rfc307.html
Starting RFC 307, just in case
07:22
07:35 Sgeo left 07:36 leont joined
Geth advent: 691fb5732d | (JJ Merelo)++ | 20th/articles/rfc307.html
Finishing draft
07:55
JJMerelo OK, finished this draft which I'll hold as reserve, or schedule it for today if nothing shows up earlier. Comments and suggestions are welcome.
08:00 JJMerelo left 08:35 Doc_Holliwood left 08:39 squashable6 left, squashable6 joined 08:41 kensanata joined 08:43 wamba joined 08:51 Doc_Holliwood joined 09:04 molaf left
Geth advent: taboege++ created pull request #60:
20th: Write about RFC 190
09:11
09:14 Altai-man joined 09:16 sena_kun left 09:47 molaf joined 09:49 ab6tract left, ab5tract left 09:57 wamba left 09:59 molaf left 10:03 bocaneri left, Doc_Holliwood left 10:06 wamba joined, rindolf joined, ab5tract joined, ab6tract joined 10:07 ab5tract_ joined
Geth advent: c49ded740b | (Tobias Boege)++ | 2 files
20th: Write about RFC 190
10:11
advent: 51b45d72de | (Tobias Boege)++ | 20th/articles/rfc190.md
Linkify RFC 190
advent: fb27f4443a | (Tobias Boege)++ (committed using GitHub Web editor) | 2 files
Merge pull request #60 from taboege/master

20th: Write about RFC 190
10:11 ab5tract left, ab6tract left 10:12 ab5tract joined 10:14 molaf joined 10:18 cpan-raku left 10:19 cpan-raku joined, cpan-raku left, cpan-raku joined 10:34 molaf left 10:42 dolmen joined
Geth advent: 538971c610 | (Tobias Boege)++ | 20th/articles/rfc190.md
Add halfsentence to article
10:42
10:44 Black_Ribbon left 10:48 JJMerelo joined 11:02 JJMerelo left 11:09 stoned75 joined
Geth doc/setbagmix-op: c032704ed8 | (Stoned Elipot)++ | 6 files
Simplify and uniformize sections on set operators

While here tweak examples' output to match current rakudo behavior and remove (now?) inaccurate mention about results' type with SetHash operands.
11:36
doc: stoned++ created pull request #3557:
Simplify and uniformize sections on set operators
11:37
11:39 wamba left 11:51 wamba joined 12:14 rindolf left 12:16 Doc_Holliwood joined 12:23 molaf joined 12:31 stoned75 left 12:34 rindolf joined 12:40 dolmen left 12:51 molaf left 13:00 dolmen joined 13:04 Doc_Holliwood left 13:06 skids joined 13:10 stoned75 joined 13:15 sena_kun joined 13:17 Altai-man left 13:28 keutoi joined
keutoi Is there a reference manual for raku? 13:28
codesections keutoi: I'm not quite sure what you mean by "reference manual". The language documentation is at docs.raku.org If that isn't what you're looking for, can you be a bit more specific about what you'd like? 13:30
keutoi This is what I am looking for, docs.raku.org/language.html. Thanks. 13:32
Is there any offline pdf version of it?
13:36 squashable6 left
codesections I'm not aware of a PDF version. The p6doc tool (which I believe is installed by default with the toolchain?) has an offline plaintext version 13:36
I'm pretty sure that tool is in the process of being upgraded/rewritten as rakudoc, but I'm not positive of the status of that process 13:37
13:37 squashable6 joined
codesections You can also build the HTML documentation locally using github.com/Raku/Documentable 13:39
(which is how it's built for the site)
keutoi Things would be a lot easier if these were available for default: github.com/Raku/doc/tree/master/doc/Language 13:40
something like perldoc
13:40 molaf joined 13:42 molaf left
codesections I'm not quite sure I follow (others probably would – many people have experience with perl that I lack). But my understanding was that p6doc/rakudoc were intended to be direct equivalents to perldoc 13:42
keutoi codesections: So rakudoc/p6doc is equivalent to perldoc? Is it packaged separately or does it come with raku itself? 13:45
tobs I only know that once upon a time I `zef install p6doc`d and got the pod files for offline documentation in the perldoc manner. 13:46
But there have been changes. I don't know how it works nowadays and I couldn't find out tracing these repositories.
codesections I *thought* it was came with Raku, but I can't remember 100% (it might be packaged with Rakudo Star, which is Rakudo + some helpful packages, but doesn't release as often)
s/was came/came/ 13:47
tobs In any case, in your stead I would try to install the new rakudoc with zef and see if it brings the documentation files with it, and if not open an issue.
codesections Oh, if tobs had to install it with zef (the raku package manager) then it must not have come with Raku
tobs this was in 2017 :) 13:48
codesections My (maybe wrong) understanding is that rakudoc isn't really released yet, and you should still use p6 doc
*p6doc
keutoi I found p6doc using zef. Let me try install and see... 13:49
rypervenche p6doc should work for you. rakudoc is not yet ready. 14:00
codesections rypervenche: do you know what advantages rakudoc will provide (other than the updated name, I mean :D) 14:02
?
rypervenche codesections: What I know is the current documentation roadmap here: github.com/Raku/doc/issues/2983 14:06
keutoi Hmm, `zef install p6doc` fails with permissions requiring /usr/share/perl6/doc/site: mkdir failed. A defaulting to home directory installation would have been nice.
codesections hmm, agreed, keutoi. I'm not sure if that's a p6doc issue or a zef one 14:07
rypervenche keutoi: Yes, that's unfortunately the current state of p6doc, it needs to be run as root. I'm also a fan of keeping things inside my home directory.
codesections rypervenche: thanks, I'd seen that roadmap but wasn't sure if it was still the current plan. So it's helpful to hear that it is :) 14:08
tbrowder leont: you here? 14:21
14:22 Sgeo joined
leont Busy with $work, but otherwise yes 14:26
tellable6 2020-08-12T17:10:30Z #raku <JJMerelo> leont still nothing scheduled for today. I'm gonna upload your article. Please accept the invitation and I'll assign authorship to you.
2020-08-13T06:45:37Z #raku-dev <JJMerelo> leont I still need you to accept the invitation so that the article carries your byline (and you can edit it if necessary)
tbrowder .ask leont how can i, using Path::Finder, limit a base :name to the dos glob "[A-Z]*"?
tellable6 tbrowder, I'll pass your message to leont
leont I'm here ;-)
tbrowder ok! i'm trying out path::finder for first time and all is well except the globbing prob ^^ 14:27
i live the depth restiction File::Find doesn't have 14:28
*love
*restriction
leont Passing it like that should work, it will convert a Str argument to an IO::Glob
tbrowder but it seems IO::Glob has the same problem 14:29
i see no test in either module for that case, or how to implement it 14:30
i can do it after the fact but thought you could show how to do it 14:32
if we could "use module" here (hint, hint) it would be "usefu" 14:33
14:33 dogbert17 joined 14:34 skids left
tbrowder maettu: is there any way to load more modules into camelia? 14:35
codesections tbrowder: the other day AlexDaniel showed a way to load modules into one of the other evalbots (evalable?) 14:37
tbrowder m: use IO::Glob
camelia 5===SORRY!5=== Error while compiling <tmp>
Could not find IO::Glob in:
inst#/home/camelia/.raku
inst#/home/camelia/rakudo-m-inst-2/share/perl6/site
inst#/home/camelia/rakudo-m-inst-2/share/perl6/vendor
inst#/home/camelia/…
codesections You can search the logs for the details
AlexDaniel I should make it simpler :)
tbrowder but we were told that would be a security problem for the bots to do it
AlexDaniel no? Who told you that? You can already run arbitrary code x) 14:38
codesections Well, it's a security *concern* certainly. And I think whoever maintains camelia said they didn't want the maintainence burden of adding that feature 14:39
but I guess that's why we have multiple bots :)
AlexDaniel huh? where have you all heard all that weird stuff? x)
14:39 Doc_Holliwood joined 14:40 Sgeo left
tbrowder well go look back at the log. i then asked why most all the modules couldn't be available on the server and... 14:40
AlexDaniel the current situation is that all bots allow you to do a bit too much. Respect them and don't break them. That's about it.
all except perlbot, that one is sandboxed properly, but then you get all the limitations 14:42
codesections AlexDaniel: the conversation tbrowder mentioned was at colabti.org/irclogger/irclogger_lo...08-05#l501
guifa Let’s say I have a dynamic variable 14:43
Is there a way I can get a (pref ordered) list of all matching ones up the call chain? 14:44
AlexDaniel “I don't want camelia's build process to get any more complicated” – I don't see anything about security
and that's right, because the bot is not secure by itself
14:45 molaf joined
lizmat guifa: not without the use of nqp ops 14:46
afaik
codesections Yeah, you're right. I guess it was a bit later (colabti.org/irclogger/irclogger_lo...08-05#l651 ) when _rba speculated about security issues. But I guess that isn't quite right. Thanks for the correction :)
tbrowder ok, so how do we use a module with camelia? 14:47
guifa lizmat: ah okay. I was experimenting around with scoping overrides/fallbacks for UserLanguage and UserTimezone, and things work perfectly … until an override is cleared and then it goes to the normal setting, rather than grabbing any enclosing override. 14:48
that said, that’s probably a much more manageable quirk than having fallback/overrides be global only
lizmat dynamic variables have been good enough to make parsing Raku actually work... so I guess you need to look at what you're trying to achieve 14:49
guifa lizmat: no doubt. I think actually I should probably include the whole override chain with each use * :override statement instead of trying to do a single variable 14:52
When you add a custom operator, that scope basicallt gets a cloned copy of the grammar, plus the new operator, yeah? 14:53
codesections guifa: I'm slightly confused – I thought CALLERS did what you're asking about?
or OUTERS 14:54
Oh, I guess they don't return a list? Just the first match? That's a shame 14:55
guifa CALLERS and OUTERS go up the chain but will only return the first value — at least in my first implementation attempt, the issue would be when one of them was undefined, I’d want to progress to the *next* one up, and if it......
yeah that :-) 14:56
lizmat guifa: did you try CALLERS::CALLERS:: ? 14:57
vrurg CALLERS flatten down the call stack contexts. It's CALLER which gives exactly one.
codesections vrurg: that's what I thought too. But actually, CALLERS gives exactly one result from any number of stacks 14:58
guifa m: my $a = 1; { my $a = 2; { my $a = 3; { my $a = 4; { say $OUTERS::a } } } };
camelia 4
guifa (as opposed to (4, 3, 2, 1) )
vrurg Besides, I had to rewrite the PseudoStash for 6.e because in 6.c there was too many flaws. 14:59
guifa agrees that 4 is the best DWIM result, for the record
vrurg codesections: I didn't follow the whole discussion, just was passing by. What one result do you mean? 15:00
guifa vrurg: basically, getting just scalar 4, as opposed to listy (4,3,2,1) in the above example
codesections yeah, that
I would have thought this would work, but it seems not to: 15:02
m: {my $*a = 1; { my $*a is default(CALLERS::<$*a>) = 2; $*a = Nil; { say OUTERS::('$*a')}}}
camelia Nil
15:02 MilkmanDan left
vrurg Any pseudostash is looking for the first occurence only. I.e. it gives you the symbol visible in a particular context. To get a list one would have to traverse the contexts manually. 15:02
15:02 MilkmanDan joined
guifa I’ll probably do something akin to my @*override .= append: CALLERS::<@*override>, $new-override; 15:06
at each level
codesections Any idea why the `is default(OUTERS::<@*override>)` approach doesn't seem to work? 15:07
Will traits just not work with dynamic variables?
Or variables at all, I guess. 15:10
vrurg I guess the confusion comes from the plural for of CALLERS/OUTERS names. But the point of it is to make distinction between CALLER/OUTER which give exactly and only the requested scope contrary to collecting data from all upstream frames.
codesections m: {constant $a=1; {my $b is default(OUTERS::<$a>); say $b}}
camelia 1
vrurg is afk for a while.
guifa Having an ALL-CALLERS and ALL-OUTERS could be cool, but would probably be of very limited used and definitely has workarounds 15:11
15:12 aluaces left 15:14 stoned75 left 15:18 MilkmanDan left, squashable6 left
lucs Does having 'use v6.e' mean "This code requires at least version 6.e of Raku to run correctly" or rather "This code can only use features that are present in version 6.e (although I'm running 6.f for example)"? 15:19
15:20 squashable6 joined
[Coke] if something is only defined in 6.f, and you are in a block that has 6.e, it is expected to fail. 15:22
(if you use the aforementioned something)
if you don't specify, you get latest, which in your example, I assume is 6.f 15:23
15:23 ab5tract_ left, ab5tract left
lucs So more the latter, eh. Thanks. 15:26
By the way, that sounds painful to maintain for the developers. 15:27
[Coke] "torture the implementors on behalf of the users" was a motto
lucs :)
15:27 molaf left, MilkmanDan joined
AlexDaniel [Coke]: I think language switching can only be done in files, not in blocks 15:28
[Coke] m: use v6.d; say "hi"; {use v6.c; say "I think it works, maybe it doesn't restrict?"} 15:32
camelia Don't know setting RESTRICTED
at gen/moar/ModuleLoader.nqp:249 (/home/camelia/rakudo-m-inst-2/share/perl6/lib/Perl6/ModuleLoader.moarvm:previous_setting_name)
from gen/moar/ModuleLoader.nqp:254 (/home/camelia/rakudo-m-inst-2/share/perl6/lib/…
[Coke] oops. 15:33
so, s/block/file/ in my statement. 15:34
AlexDaniel++
lucs Okiedoke
AlexDaniel e: use v6.d; say "hi"; {use v6.c; say "I think it works, maybe it doesn't restrict?"}
evalable6 (exit code 1) 04===SORRY!04=== Er…
AlexDaniel, Full output: gist.github.com/e062001407aaa70c68...92ca5833f4
AlexDaniel “Too late to switch language version. Must be used as the very first statement.”
Geth doc: a0e2aa0fb3 | stoned++ (committed using GitHub Web editor) | 6 files
Simplify and uniformize sections on set operators (#3557)

While here tweak examples' output to match current rakudo behavior and remove (now?) inaccurate mention about results' type with SetHash operands.
15:38
linkable6 DOC#3557 [closed]: github.com/Raku/doc/pull/3557 Simplify and uniformize sections on set operators
15:39 keutoi left
codesections m: my &*a= {1}; { my &*a is default( { say CALLER::CALLER::<&*a>()}) = { 2 }; say &*a(); &*a = Nil; say &*a() } 15:41
camelia 2
1
True
codesections guifa: ^^^^ works (I realize I spent far too long thinking about that, esp. considering it's not even my code, it doesn't generate an elegant solution, and you already have a (probably better) workaround) 15:42
*but* it was helpful in understanding what Raku is doing at compile time vs runtime, so not *entirely* a waste :) 15:43
er, there's any extra `say` I didn't mean to have
m: my &*a= {1}; { my &*a is default( { CALLER::CALLER::<&*a>()}) = { 2 }; say &*a(); &*a = Nil; say &*a() } 15:44
camelia 2
1
Geth advent: cf33725412 | (Elizabeth Mattijsen)++ (committed using GitHub Web editor) | 20th/README.md
Claim #159

Turns out that the intro to #200 is worth a blog post of its own
15:46
15:54 demostanis joined
demostanis Hello everyone! I am trying to install GPGME module, but it is failing with this error: ===> Failed to find dependencies: gpgme:from<native> 15:54
What does this mean?
15:54 Chi1thangoo left
codesections demostanis: it means that it expected you to have a non-Raku package `gpgme` installed, but you don't 15:55
(e.g., though your package manager)
s/you don't/it can't find it/
demostanis I did as they adviced, sudo apt install libgpgme11, but it doesn't change anything. 15:56
Or do I need libgpgme-dev?
codesections I'm not sure. I can interpret the error msg, but that's about it :) 15:57
demostanis I believe that was the error. 15:58
They should change their README, but it has been 2 months seen the project had a change. 15:59
codesections 2 months isn't that long :) 16:01
Geth doc/mix-op-ref: 0a9d217b35 | (Stoned Elipot)++ | 2 files
More on { } and < > operators for Mix and MixHash

  - mention <> postcircumfix
  - add ref to operators' description
16:01 stoned75 joined
tbrowder e: use IO::Glob; 16:01
evalable6 (exit code 1) 04===SORRY!04=== Er…
tbrowder, Full output: gist.github.com/619b0a2d065cd30b5b...68de84d102
Geth doc: stoned++ created pull request #3558:
More on { } and < > operators for Mix and MixHash
tbrowder e: use NativeCall; 16:02
evalable6
tbrowder m: use NativeCall; 16:03
camelia ( no output )
tbrowder e: require IO::Glob
evalable6 (exit code 1) Could not find IO::Glob in:
f…
tbrowder, Full output: gist.github.com/c2e8f5fb5eb40ccc16...3738bd0df4
guifa codesections: hmm that’s a really creative solution. I wonder though if upper levels change if the default there will change as well (e.g. if they’re bound or not, and if not if they can be) 16:04
tbrowder i still haven't heard why more published modules can't be made available. need volunteers? need resources? security? 16:05
codesections tbrowder, I thought we established that they could be, as shown here: colabti.org/irclogger/irclogger_lo...08-12#l189 16:07
AlexDaniel tbrowder: for whateverable, it just needs code to make that process ↑ easier 16:08
tbrowder ok, so i should fork and take a look. thanks, AlexDaniel 16:09
sena_kun releasable6, status
releasable6 sena_kun, Next release in ≈9 days and ≈2 hours. 1 blocker. Changelog for this release was not started yet
sena_kun, Details: gist.github.com/e357de4caf55a3fd29...7cc2cfa9f5
sena_kun ouch, that's close
AlexDaniel tbrowder: for example: detect use statements automatically, build the dependency tree, find the required modules in perl6-all-modules, create a PERL6LIB string
tbrowder: you can prototype this without forking, I'll help to bring your code into whateverable 16:10
there are easier approaches but they might not exactly work. For example, we can ask `zef` to install detected modules into a separate directory
that's very easy to implement 16:11
… but then it'd probably take minutes before it can actually run anything…
16:11 gnufr33dom left
AlexDaniel that said, we can perhaps cache some stuff to make further commands faster 16:11
actually, try it?
tbrowder to me, though, looking at the path, someone running the server could have them loaded already. why that can't be done is a mystery to me. 16:12
AlexDaniel tbrowder: no no
that'd mean having 1000+ modules in your PERL6LIB
I doubt that's going to work well
tbrowder ok, that's what i don't understand is where this is all happening. where is home? 16:14
16:14 Doc_Holliwood left
AlexDaniel tbrowder: what exactly? 16:14
tbrowder well, everytime i do a use i see evidence that the code is looking in all the usual places and can't find. so where is the file system it's looking at? 16:16
m: use IO::Glob
camelia 5===SORRY!5=== Error while compiling <tmp>
Could not find IO::Glob in:
inst#/home/camelia/.raku
inst#/home/camelia/rakudo-m-inst-2/share/perl6/site
inst#/home/camelia/rakudo-m-inst-2/share/perl6/vendor
inst#/home/camelia/…
AlexDaniel e: use IO::Glob 16:17
evalable6 (exit code 1) 04===SORRY!04=== Er…
AlexDaniel, Full output: gist.github.com/d2e4f8218850cdb365...131805ba1b
tbrowder see the paths? where are they?
AlexDaniel tbrowder: on the server
I don't really understand the question :( 16:18
tbrowder so what does PERL6LIB have to do with it? color me dumb, but i don't understand why the modules can't be installed there. 16:19
Geth doc: f547ef406f | stoned++ (committed using GitHub Web editor) | 2 files
More on { } and < > operators for Mix and MixHash (#3558)

  - mention <> postcircumfix
  - add ref to operators' description
linkable6 DOC#3558 [closed]: github.com/Raku/doc/pull/3558 More on { } and < > operators for Mix and MixHash
AlexDaniel tbrowder: as I said, because we can't really install 1612 modules there
tbrowder in camelia's home dir unless it's ephemeral or something. 16:20
16:20 Doc_Holliwood joined
AlexDaniel you can try it on your own machine and then tell us if this affects anything in a negative way :) 16:20
preferably in a vm…
I doubt it's going to work well, but maybe somebody can share their experience and let me know if it should be ok 16:21
for example, will it affect startup time? 16:22
tbrowder ok, i asked why couldn't we get or vote for a subset, anything
AlexDaniel I have a hunch that it will
tbrowder: OK, I can give you very actionable steps: detect use statements in code, run `zef` to install detected modules into a specific directory (preferably in /tmp), construct a PERL6LIB string so that these modules are included, send me the code for all that and all whateverable bots will support modules 16:23
codesections re: subset: isn't that basically how the current manual approach works? Just the "subset" is "any modules people have bothered to install manually"
and by "people" I just mean "anyone who understands the (slightly involved, but not hard) process for doing it"
tbrowder i'll stop bugging y'all about this--seems to be too hard to do, but it could be very useful. 16:24
AlexDaniel you've got to be kidding me
“too hard to do” I gave you three freaking steps
which translate to… actually about three lines of code give or take 16:25
tbrowder AlexDaniel i know, but you indicated that that was temporary and would't last. i'm happy to load a bunch of modules here.
AlexDaniel what do you mean wouldn't last
where have I said that 16:26
I said that the idea of loading hundreds of modules isn't going to fly, but installing the ones you can autodetect and including just them is perfect
16:26 dolmen_ joined 16:27 dolmen left
tbrowder we obviously are talking around each other, sorry. i'll just do what you said when it's quiet. 16:27
AlexDaniel not sure about the each other part. When it comes to whateverable, I tend to provide very clear actionable tasks. See my first reply in this discussion. 16:29
I can expand on any specific one if you want. For example, for the first part you don't need to have a very accurate parser, just a regex to find ‘use ……;’ in text is going to be OK. Perfect is the enemy of good in this case. 16:32
for zef to install into a specific location use `--to` parameter when running zef 16:33
btw /tmp is isolated for every bot, so it sounds like a good location to use for now 16:34
here's example usage: github.com/Raku/Blin/blob/9ad9b7d2...g.pm6#L405
and for the last part just `run <perl6>` with a modified ENV 16:35
16:36 molaf joined
AlexDaniel after that's done, give me an hour or two and we'll be able to test it on the bots 16:36
16:43 Xliff joined
Xliff \o 16:43
codesections o/ 16:44
Xliff Any thoughts on the best way to package up a Raku module distribution? Particularly if I want to convert that to something digestable to the major Linux distro package managers?
deb, rpm, etc 16:45
timotimo nine has implemented stuff for packaging raku modules on suse with rpm 16:51
so i guess steal all of that :)
AlexDaniel Xliff: yeah, see OBS and nine's efforts. Ideally it shouldn't even be something you'd do, that is we can just build all modules 16:55
tbrowder AlexDaniel: thank you 17:00
17:00 skids joined
codesections AlexDaniel: when you say "not something you do" do you mean "you don't do it, distro maintainers do" or "no one needs to do it, users just install with zef or something similar?" 17:01
AlexDaniel codesections: my hope is that OBS will be able to build all modules automatically
codesections: so as a module author you'd just go to obs and see your module already built for at least one distro, hopefully more 17:02
that is, it shouldn't be your worry
module author's worry I mean
nine: feel free to correct me if I'm wrong :) 17:03
codesections But how do you go from there to "can be installed with apt/yum/pacman/etc"? Unless I'm missing something, *someone* still has to do the packaging work (even if it's much easier at that point) and approve the package, right?
AlexDaniel codesections: well, we can provide packages. Each distro has its own rules for what's included and how 17:04
codesections Fair enough. I'm with you now. Thanks for clarifying :)
AlexDaniel Xliff: my understanding is that the question is “how do I generate .deb .rpm etc. of my modules”, and that's something we should do with OBS for all modules 17:05
codesections: ↑ :)
El_Che I think it's a terrible idea
AlexDaniel El_Che: honest and direct, I like it :) 17:06
El_Che: why
El_Che best to leave debs/rpms for modules packages and used by the OS itself
for starters, it requires root to install
AlexDaniel so? All system packages require root on most distros? 17:07
El_Che packaged modules can not just be upgraded as they are used as dependencies 17:08
those modules are global
and one of the nice things of raku is local as default
(in constrast with other dynamic languages where you get global as default) 17:09
AlexDaniel I don't understand… you're against modules being packaged altogether?
El_Che not at all
I think modules should be packaged by distros
and their upgrades within their rules 17:10
also security
AlexDaniel that's true, but if you need a module that's not in your distro?
Xliff AlexDaniel: OK. So I need to read up on OBS. Is that the same thing timotimo was talking about?
El_Che and for regular apps, I would like to see their deps in their repo
AlexDaniel Xliff: yes 17:11
El_Che as a vendor dir
for for now, zef-able will do
Xliff AlexDaniel++ timotimo++
El_Che Xliff: OBS is very capable
Xliff: too capable for me. I tried it and stopped somewhat with a 1994 feeling
very non intuitive 17:12
17:14 Altai-man joined
Xliff El_Che: 1994 or 1984? Huge difference. :) 17:16
17:17 sena_kun left
El_Che hehe 17:17
I don't think they are evil :) 17:18
17:18 timlegge left 17:20 Sgeo joined
Xliff AlexDaniel: What about RakuDist? 17:29
AlexDaniel Xliff: I don't know 17:30
Xliff Where can I read up on Raku OBS? 17:31
AlexDaniel Xliff: for RakuDist, get in contact with melezhik. For OBS, talk to nine 17:34
17:56 bocaneri joined 18:03 stoned75 left, bocaneri left 18:14 xinming joined 18:16 xinming_ left
demostanis How do I merge two hashes in Raku? Something like Object.assign() in JavaScript 18:17
Nevermind, I've found
stackoverflow.com/questions/608741...-hash-raku 18:18
18:21 dolmen_ left, dolmen_ joined
AlexDaniel demostanis: which of the answer did you choose? :) 18:31
answers*
18:32 dolmen_ left 18:35 Xliff left 18:36 skids left 18:39 vrurg left 18:43 squashable6 left 18:46 squashable6 joined 18:50 xinming left, Kaiepi joined 18:52 Kaeipi left
codesections I really like the %(|%h1, |%h2) approach. It shows off a bit of how well-designed Raku is: because we have the Pair concept, a Hash is built on top of a List of pairs. (I'm not saying it *really* is implemented that way, but it is semantically). 18:52
18:53 xinming joined
codesections That means it makes perfect sense that %h.List gives you a List of Pairs. And that %h.Slip (or `|%h`, which is the same thing) gives you a Slip of Pairs 18:53
and, *of course* concatinateing two Slips of Pairs gets you a List of Pairs. 18:54
And, a List of Pairs is all you need to build a new Hash out of
And all that *just falls out* of Raku's basic semantics 18:55
Compare to JavaScript, which had to add a bunch of hard-to-remember APIs to do the same thing (Object.entries(hash) is `|%h`, Object.assign(hash) is %(|%h, |$h), etc) 18:56
18:58 wamba left
codesections Also, minor note: the first `|` isn't required. `%(%a, |%b)` works just as well (which, again, makes semantic sense) 18:59
19:04 vrurg joined
tobs I like the flustered face operator too: 19:08
AlexDaniel codesections: but it's slower compared to `my %c = %a, %b`
tobs m: my %foo = :42a, :50b; my %bar = :10b, :12d, :1c; say %foo »//« %bar
camelia {a => 42, b => 50, c => 1, d => 12}
AlexDaniel tobs: yeah I can kinda guess the performance of that 19:09
AlexDaniel measures
tobs note that in this case %foo's keys win over %bar's
AlexDaniel actually, it's pretty fast!
nice
as fast as |%a, |%b is 19:10
codesections AlexDaniel: When I care enough about performance to sacrifice good/ergonomic semantics for perf, I write Rust (my other main language) :D 19:12
(Mostly joking)
19:12 molaf left
codesections By the way, what's a good way to micro-benchmark things like that? 19:12
You measured »//« super quickly :) 19:13
tobs: I had to think through the semantics of »//« for a minute but, after giving it some thought, I like it too. It also makes perfect semantic sense 19:17
19:24 ensamvarg3 left 19:30 sjm_uk left 19:32 rindolf left 19:34 seanrobert joined
AlexDaniel codesections: it's not about microbenchmarking, most perf differences in rakudo are very significant and require no accurate tooling 19:38
which is why you can even bisect for perf regressions and stuff like that
m: my %a = (1..200000); my %b = (1..200000); say %(|%a, |%b).keys.elems; say now - INIT now 19:41
camelia 100000
2.4014804
AlexDaniel m: my %a = (1..200000); my %b = (1..200000); my %c = %a, %b; say %c.keys.elems; say now - INIT now
camelia 100000
1.812962
AlexDaniel keep in mind though that a lot of that time is spent on constructing the hashes
codesections I see, thanks. (I didn't know INIT worked in a REPL; interesting) 19:43
AlexDaniel: And you're not worried about misleading results from Rakudo optimizing out operations in a simple loop yet because that level of optimization work hasn't yet been done? 19:44
AlexDaniel codesections: yeah, it rarely does anything that smart 19:49
codesections: camelia is not REPL, it's just executing a file
codesections Fair enough. I'm sure we'll get there. 19:50
AlexDaniel codesections: also note that in this case I *am* using the result, it can't exactly just optimize it away
well, maybe something built on llvm can, I'm not sure 19:51
codesections (INIT now works in the local REPL too. Which also isn't quite as statefull as it could be, e.g., with not persisting syntax changes, so I guess I shouldn't be too surprised)
Yeah, things built on LLVM definitely do – it's a real issue with Rust benchmarks. But Rakudo has an optimizer, and I'm pretty sure it could do the same sort of tricks. It's just a matter of investing the time in writing it (and making sure the code complexity doesn't get out of hand – it's easy for that sort of code to turn into special-case spaghetti 19:53
)
AlexDaniel everything is a matter of investing the time 19:58
codesections Well, I plan to do so :)
AlexDaniel question is, will it be wiser to just rebuild it on top of llvm, or spend time trying to optimize it for all architectures and stuff… 19:59
codesections I guess that *is* a question. Has anyone proposed rebuilding on LLVM? That seems like… not a great fit for how dynamic Raku is 20:00
AlexDaniel codesections: why? Seems to be no problem for Rust and Julia 20:01
ok maybe Rust is not the best example, but Julia is 20:02
20:03 seanrobert left
codesections AlexDaniel: Yeah, that's a fair point – I hadn't really thought about the Julia example. They compile to LLVM but also run code via an interpreter. I guess the idea you're floating would be to do something similar for Raku? Have the LLVM output replace the precompiled bytecode, but still have non-modules run via the existing interpreter? 20:04
20:05 xinming left
AlexDaniel codesections: I don't know what's the easiest approach. Forking Julia is probably going to be faster 20:06
20:06 xinming joined
AlexDaniel codesections: note that it already has most of the cool features, multiple dispatch, rats, etc. 20:06
codesections I could see that working, though it would be a big undertaking that wouldn't have any payoff until it's complete. I'd prefer to be more incremental and follow a similar model to the Dyalog APL interpreter. They've build up a list of commonly used idioms that get optimized by the compiler (they keep the same semantics, just run faster)
AlexDaniel idioms is exactly the problem. You step outside and suddenly it's a lot slower 20:07
rypervenche Question here: What is the logic of: say now - INIT now; ?
AlexDaniel for example, a lot of Raku functionality is available through both methods and subs at the same time
it's not uncommon to have sub vs method to be twice or more times faster/slower 20:08
and depending on which sub we're talking about it's can be other way around
s/it's/it/
codesections: the immediate downside of forking Julia is that the startup time is actually worse. It's close, but it's worse. 20:09
rypervenche: INIT blocks run as soon as possible during execution
rypervenche: is INIT { now } is executed immediately and it's value is placed into the expression, pretty much 20:10
s/is/so
rypervenche: it looks cool because you can avoid the brackets in this case :)
codesections Yeah, that's the sort of idiom work I'm talking about. If two forms have exactly the same meaning but one is faster, there's no reason at all for the optimizer not to be able to replace the slower one with the faster one. It's just a matter of building/maintaining that list
AlexDaniel codesections: well, it's more complicated 20:11
rypervenche AlexDaniel: Ahhh, that makes much more sense now. Thanks.
AlexDaniel codesections: for example, when'd be that I'd be able to write some Raku code and have the compiler use SIMD instructions?
codesections: looking at the current development pace I'd say in 5 years or later. Probably later 20:12
codesections: for example, we don't even have JIT for arm or other archs
codesections AlexDaniel: Ohhh, I was confusing INIT for $*INIT-INSTANT! Which is why I was surprised it worked. rypervenche, thanks for asking about that – you saved me from some confusion later 20:13
AlexDaniel codesections: and then compare it to Julia which can do it right now…
it's not very nice from what I can see, but it's a lot better than nothing
codesections Those are all fair points. I'd still prefer the more incremental approach but (luckily for all concerned!) that's not my call to make :) 20:15
20:16 MilkmanDan left, MilkmanDan joined 20:17 aluaces joined
demostanis Due to a lot of testing for HubToDate, it looks like GitHub rate limited me... 20:17
==> Fetching sharkdp/bat on github...
[!!!] Failed to fetch: (HANDLED) Error 403: 403 Forbidden
y
API rate limit exceeded for 134.19.189.190. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.) 20:19