🦋 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:42 evalable6 left, notable6 left, tellable6 left, bisectable6 left, unicodable6 left, nativecallable6 left, bloatable6 left, squashable6 left, committable6 left, shareable6 left, releasable6 left, greppable6 left, statisfiable6 left, sourceable6 left, benchable6 left, coverable6 left, quotable6 left, linkable6 left, reportable6 left, evalable6 joined, nativecallable6 joined, committable6 joined, releasable6 joined, reportable6 joined 00:43 unicodable6 joined, tellable6 joined, statisfiable6 joined, quotable6 joined, squashable6 joined 00:44 bisectable6 joined, bloatable6 joined, linkable6 joined, shareable6 joined, greppable6 joined 00:45 coverable6 joined, notable6 joined, benchable6 joined, sourceable6 joined 00:47 chloekek left 00:48 aborazmeh left 00:52 rbtca left, rbtca joined 01:01 caterfxo joined 01:08 Skarsnik left 01:09 xinming_ left, xinming_ joined 01:40 molaf left 01:52 molaf joined 01:54 pecastro joined 02:15 AlexDani` left 02:16 AlexDani` joined 02:39 xelxebar left 02:40 xelxebar joined 03:10 aborazmeh joined, aborazmeh left, aborazmeh joined 03:18 colomon left 03:19 colomon_ joined 03:23 colomon_ left 03:31 MasterDuke left 03:37 colomon_ joined 03:41 Sgeo__ left 03:44 Sgeo joined 04:02 pecastro left 04:15 pilne left 04:32 mniip left 04:37 Kaiepi left 04:47 Kaiepi joined 05:09 aborazmeh left 05:20 aborazmeh joined, aborazmeh left, aborazmeh joined 05:26 aborazmeh left 05:48 niceperl joined 05:58 niceperl left 06:16 ensamvarg_ joined, ensamvarg_ left, xelxebar left 06:17 xelxebar joined 06:42 ensamvarg_ joined, ensamvarg left, ensamvarg_ left 06:43 ensamvarg joined 06:44 MasterDuke joined 06:50 ensamvarg_ joined 06:56 ensamvarg left, ensamvarg joined 07:10 rbtca left, rbtca joined 07:12 Redfoxmoon left, Redfoxmoon joined 08:12 shareable6 left, notable6 left, evalable6 left, releasable6 left, nativecallable6 left, benchable6 left, tellable6 left, statisfiable6 left, greppable6 left, bisectable6 left, unicodable6 left, quotable6 left, committable6 left, reportable6 left, squashable6 left, linkable6 left, sourceable6 left, bloatable6 left, coverable6 left 08:13 releasable6 joined, bisectable6 joined, nativecallable6 joined, notable6 joined, unicodable6 joined, cpan-raku left, statisfiable6 joined, linkable6 joined 08:14 coverable6 joined, quotable6 joined, sourceable6 joined, tellable6 joined, benchable6 joined, evalable6 joined, cpan-raku joined, cpan-raku left, cpan-raku joined, squashable6 joined 08:15 shareable6 joined, bloatable6 joined, greppable6 joined, reportable6 joined, committable6 joined 08:19 Redfoxmoon left, Redfoxmoon joined 08:22 stoned75 joined 08:41 rindolf joined
Geth_ doc: 19aa6de6f1 | (JJ Merelo)++ | 2 files
Adapts definition to reality #2632
08:43
doc: b38f74d7bc | (JJ Merelo)++ | doc/Type/List.pod6
Sum with Junctions #2632
linkable6 DOC#2632 [open]: github.com/Raku/doc/issues/2632 [Hacktoberfest][RFE][big][docs][good first issue][help wanted][new][⚠ Top Priority ⚠] Checklist for 6.d
linkable6 Link: docs.raku.org/type/List
08:45 Summertime joined 08:55 slucx joined 08:58 rbtca left, rbtca joined 09:15 sena_kun joined 09:17 xelxebar left, xelxebar joined
tbrowder hi, #raku 09:19
does a module released to cpan have to have a zip file and a tgz file? 09:20
the reason i ask is all my releases up to now have been via a github release which generates both archives. 09:22
but yesterday, for the first time, i used App::Mi6 which only uses the tgz archive.
does that cause problems with a windows installation? 09:23
consider the above question 1. 09:24
lizmat has only ever used App::Mi6 so has no idea 09:25
tbrowder question 2: regarding published modules: can i delete a published module? 09:26
i jumped the gun yesterday and would like to start over with a new name. 09:27
lizmat: thnx. have you any experience with windows raku?
lizmat tbrowder: re 2: generally a bad idea to remove published modules, but you can make it just use the new module name 09:28
re windows: I stopped doing Windows in 2003 09:29
tbrowder i keep meaning to try it but haven't yet. i guess i should just do it and try zef on my tgz-only module.
well, as the saying goes, "i don't do windows", but in my world i do have to keep it around to maintain comm with others... 09:33
ok, deprecate and new name it is. thanks. 09:34
09:37 stoned75 is now known as stoned, stoned is now known as Guest5417, molaf left 09:38 Guest5417 left, stoned75 joined 09:47 chloekek joined 09:49 grumble joined 09:52 slucx left 10:09 Black_Ribbon left 10:13 Kaiepi left 10:14 Kaiepi joined 10:16 xelxebar left 10:17 xelxebar joined 10:21 aborazmeh joined, aborazmeh left, aborazmeh joined 10:29 stoned75 left
El_Che "I stopped doing Windows in 2003" <-- the 12 steps helped 10:37
:)
10:39 Altai-man_ joined
cpan-raku New module released to CPAN! Excel::Text::Template (0.0.2) by 03TBROWDER 10:40
10:41 sena_kun left 10:44 Kaiepi left, Kaiepi joined
Kaiepi what determines if an exception is resumable or not? are there ways to write your own unresumable exceptions? 10:45
10:46 stoned75 joined
lizmat write your own "resume" method on the exception ? 10:46
Kaiepi ahh didn't think of that 10:49
still, what about some exceptions is different that prevents them from being resumable? 10:51
11:10 |Sno| joined, [Sno] left 11:15 mowcat joined 11:16 poohman joined
poohman hi 11:16
m:grammar test {token TOP {\.*}}; say test.parse("sddsd");
evalable6 Nil
poohman should that not give an output other than Nil 11:17
chloekek There is no match, so it returns Nil. 11:18
m:grammar test {token TOP {\.*}}; say test.parse("sd..d..sd"); 11:19
evalable6 Nil
chloekek lol
poohman m:grammar test {token TOP {\d*}}; say test.parse("3"); 11:20
evalable6 「3」
poohman m:grammar test {token TOP {\.*}}; say test.parse("3");
evalable6 Nil
poohman m:grammar test {token TOP {\.*}}; say test.parse("s");
evalable6 Nil
poohman m:grammar test {token TOP {\w*}}; say test.parse("s");
evalable6 「s」
chloekek p6: say '.' ~~ /\.*/ 11:21
camelia 「.」
chloekek p6: say '.' ~~ /^\.*$/
camelia 「.」
poohman m:grammar test {token TOP {.*}}; say test.parse("sddsd");
evalable6 「sddsd」
chloekek m:grammar test {token TOP {\.*}}; say test.parse("..");
evalable6 「..」
AlexDani` m: use v6.d; grammar test {token TOP {\.*}}; say test.parse("sddsd");
camelia Don't know setting RESTRICTED
at gen/moar/ModuleLoader.nqp:257 (/home/camelia/rakudo-m-inst-1/share/perl6/lib/Perl6/ModuleLoader.moarvm:previous_setting_name)
from gen/moar/ModuleLoader.nqp:261 (/home/camelia/rakudo-m-inst-1/share/perl6/lib/…
chloekek Right, grammars require the entire string to match.
Not just a part of the string.
AlexDani` e: use v6.d; grammar test {token TOP {\.*}}; say test.parse("sddsd");
evalable6 Nil
11:22 AlexDani` is now known as AlexDaniel, AlexDaniel left, AlexDaniel joined
chloekek \.* only matches dots, not sddsd. 11:22
poohman sorry
AlexDaniel chloekek: so what, where's the helpful message? :)
poohman LTA?
AlexDaniel e: use v6.e.PREVIEW; grammar test {token TOP {\.*}}; say test.parse("sddsd");
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling <anon>
Confused
at <anon>:1
------> 03<BOL>08⏏04sddsd
Actually thrown at:
in block <unit> at /tmp/QMsKtns2Gc line 1
AlexDaniel ah there it is
chloekek Grammars not matching the input not giving any helpful error message is a long-standing issue.
AlexDaniel it's fixed in 6.e
chloekek Nice. 11:23
poohman when can we expect 6.e?
AlexDaniel poohman: you can `use v6.e.PREVIEW` now at your own risk :)
poohman next Christmas?
AlexDaniel IIRC there's currently nothing groundbreaking planned for it, just an assortment of helpful improvements 11:24
poohman it should be out in one of the Eids
;)
AlexDaniel: ok
AlexDaniel chloekek: we had a fix for it before 6.d, but it was breaking too many modules 11:25
poohman Thanks people, but was a stupid question to start with
Kaiepi m: CATCH { .^name.say; .resume }; class X::Foo is Exception { method message(--> 'foo') { } }; die X::Foo.new 11:26
camelia X::Foo
Kaiepi m: CATCH { .^name.say; .resume }; class X::Foo is Exception { method message(--> 'foo') { } }; X::Foo.new.throw
camelia X::Foo
This exception is not resumable
in block <unit> at <tmp> line 1

X::AdHoc
AlexDaniel chloekek: I sent a bunch of PRs to all the modules that were affected, but still didn't feel comfortable forcing the change into the wild
Kaiepi ah hah!
11:26 aborazmeh left
AlexDaniel chloekek: at the time there was no way to make it work differently with `use v6.d` only 11:26
chloekek: now there is thanks to vrurg and everyone else :)
cpan-raku New module released to CPAN! Geo::Hash (0.0.2) by 03TITSUKI
11:27 ensamvarg_ left, perlmaros joined
chloekek AlexDaniel: coolio 11:27
11:28 aborazmeh joined, aborazmeh left, aborazmeh joined
AlexDaniel vrurg: speaking of which, should we release v6.e maybe? 11:28
chloekek v6.easter released on Easter :)
AlexDaniel chloekek: I hope we don't associate it with any holiday 11:29
the first time it was hell to just meet an arbitrary deadline, the second time there was a lot of unnecessary bikeshedding 11:30
chloekek XD
AlexDaniel and I still hope that we can just move to something conventional (like semver or something semver-like) 11:32
MasterDuke chloekek: if you didn't know, there's subparse which doesn't need the whole string to match 11:34
11:40 pecastro joined 11:41 Xliff joined
cpan-raku New module released to CPAN! Excel (0.0.1) by 03TBROWDER 11:42
11:45 Kaiepi left 11:51 Kaiepi joined 11:53 Kaiepi left 11:54 Kaiepi joined 11:59 Kaiepi left 12:00 Kaiepi joined 12:02 aborazmeh left
Geth_ doc: 31bc418e7e | (JJ Merelo)++ | doc/Type/Signature.pod6
Type smileys on subsets #2632
12:08
linkable6 Link: docs.raku.org/type/Signature
DOC#2632 [open]: github.com/Raku/doc/issues/2632 [Hacktoberfest][RFE][big][docs][good first issue][help wanted][new][⚠ Top Priority ⚠] Checklist for 6.d
12:10 rbtca left, rbtca joined 12:13 rindolf left 12:16 rindolf joined 12:27 Kaeipi joined, Kaiepi left 12:30 Failure joined 12:34 oneeggeach joined, Success left 12:40 sena_kun joined 12:41 Altai-man_ left
chloekek p6: try { die }; say "$!" 12:41
camelia Died
chloekek I get this error somewhere: Use of uninitialized value element of type Any in string context. 12:43
What does “element” mean in this message? 12:44
Geth_ doc: eaefb748ce | (JJ Merelo)++ | 2 files
First part of new MAIN features refs #2632: where
doc: 8b0fa342f7 | (JJ Merelo)++ | doc/Language/create-cli.pod6
First part of new MAIN features refs #2632: Enumeration
linkable6 DOC#2632 [open]: github.com/Raku/doc/issues/2632 [Hacktoberfest][RFE][big][docs][good first issue][help wanted][new][⚠ Top Priority ⚠] Checklist for 6.d
Link: docs.raku.org/language/create-cli
chloekek Ah I used $! instead of $_ where I had to use $_ instead of $!. 12:45
12:52 stoned75 left, oneeggea_ joined
chloekek mst: You said you did some work on CPAN to support Raku right? 12:55
mst chloekek: mostly I argued with people and also helped co-ordinate the perl5 people doing cpan uploads until the raku community remembered it existed and started doing their own 12:56
12:56 oneeggeach left
mst a lot of the community contributions are either cat herding or grabbing people and saying "you're being an arsehole, and this is ME saying that, knock it off" 12:57
chloekek Ah ok. :p
mst I mean, I know my way around the PAUSE source code and the mirroring system
chloekek Do you know if there are rate limits for archive downloads via HTTP?
mst there aren't
chloekek Cool. 12:58
mst though if you're trying to mirror a large chunk of it then why would you use http over an rsync mirror?
12:58 stoned75 joined
chloekek Yeah I should probably switch to rsync. 12:58
Using HTTP was just easy since I already need code to download archives using HTTP from GitHub. 12:59
mst generally cpan mirrors are "Just" an apache/nginx install somewhere
it is an extremely stupid system, in the "good sort of stupid for reliability" sort of way 13:00
13:00 mowcat left
chloekek For now I will *at least* not start a new TCP connection for every HTTP request. 13:00
13:01 rbtca left
chloekek After N downloads all others start failing with “Couldn't resolve host name” which is bizarre. 13:02
Geth_ doc/comp-backend: 0b5ba69307 | (Stoned Elipot)++ | doc/Type/Compiler.pod6
Add Compiler.backend()
doc: stoned++ created pull request #3324:
Add Compiler.backend()
13:03
13:04 rbtca joined
chloekek mst: Sounds like good old solid 90s software. 13:05
13:07 Kaeipi left
mst chloekek: I will take cpan's "deliberately sysadmin-style stupid" over web scale clever any day :D 13:09
chloekek At my job I frequently have to worry about uptime and deployment atomicity.
At my previous job I did not, because it was a system for a 9-to-5 company, and I could deploy and break things between 5 and 9 because nobody was using it then. 13:10
13:11 Kaiepi joined
mst that's a luxury I don't think I've ever had 13:11
chloekek Also between 12 and 1 because then the customer was having lunch.
mst ... *envy*
chloekek Another project was a system for selling fireworks.
Uptime requirements from January till November were non-existent, in December they were near 100%. 13:12
mst hah, yeah
13:14 Kaiepi left, Kaiepi joined
chloekek My goodness, my VSCode snippet for POD has been using head2 for DESCRIPTION. 13:14
mst oh *my* 13:15
Geth_ doc: Kaiepi++ created pull request #3325:
Clarify how control flow is handled in CATCH blocks
13:16
lizmat Jonathan on macros and stuff: twitter.com/jnthnwrthngtn/status/1...0666461185 13:17
13:21 oneeggea_ left
mst slide 67 is GLORIOUS 13:27
jnthn: there's something nicely zen about the fact that after PAST and QAST, RakuAST can be appreviated to RAST 13:30
jnthn ;) 13:31
Failure mst slide 67 where i wanna see
13:31 Failure is now known as Success 13:38 Kaiepi left
mst Success: liz' link to the tweet links to the slides 13:44
13:44 Kaiepi joined
mst jnthn: also, there's something kinda funny about comparing damian's "add another layer of abstraction" talks and your "I know, I'll write yet another compiler" :D 13:44
poohman hello all - is there any case where the token {.\n} will match but {.*\n} will not work 13:51
13:54 Redfoxmoon left 13:55 Redfoxmoon joined 13:56 Redfoxmoon left, Redfoxmoon joined
poohman {q\n} matches - as the line has just a q, {.\n} matches but {.*\n} fails to match 13:59
13:59 aborazmeh joined, aborazmeh left, aborazmeh joined
poohman or does .* also gobble up \n leading to the failure 14:01
lucs poohman: Can you tweak this example to make it fail?: 14:04
m: print so "q\n" ~~ /.*\n/;
camelia True
14:06 Kaeipi joined 14:07 Kaiepi left
chloekek .* will first consume \n, then it tries to match \n and there is no more input, so it backtracks, trying .* with a shorter input. 14:08
poohman i changed the token to a regex and then it did not fail but captured the rest of the text as well 14:09
lucs poohman: Please show an example?
chloekek .*\n will match all of the input until the last \n, even if the input contains more \ns
poohman lucs: Need some time for that - will try 14:10
chloekee: yes, may have to try with \N*\n or something
lucs poohman: Okay. When you (fail to, it will turn out) to build a failing example, you will have understood your problem :) 14:11
(pardon the grammar there)
poohman lucs: I think it is not working as a token 14:12
m: print so "q\n" ~~ /.*\n/;
camelia True
poohman in this above example - can we make it a token instead of a regex
?
lucs Ah, no backtrack, yes:
m: print so "q\n" ~~ m:r/.*\n/; 14:13
camelia False
poohman Thanks lucs & chloekek - was breaking my head for the past 2 hrs 14:15
lucs m: my token t1 {.*\n}; print so "q\n" ~~ / <t1> /;
camelia False
lucs m: my regex t1 {.*\n}; print so "q\n" ~~ / <t1> /;
camelia True
14:19 Hexeratops joined
lucs What would be an idiomatic way of testing for "exists" and "is a file" for something like "some-string".IO...? (would like to avoid having repeating the string to test for .e and .f) 14:24
(or is using only .f sufficient?) 14:25
chloekek ~~ all(:e, :f) will test both.
But .f should be sufficient, I think.
lucs Aha, okay, thanks.
14:26 xi left
chloekek .f will fail if the file doesn’t exist. 14:26
lucs Yeah, not sure what I want with .e :)
chloekek ?'some-string'.IO.f should do the trick, though, converting the Failure to a Boolean.
This is actually something I just wrote, but with .s instead of .f. 14:27
return { :present } if $archive-path.s;
14:27 xi joined
lucs Speaking of file tests, I'm surprised there isn't one for "is a symlink". 14:28
No, sorry (.l)
chloekek More surprised there is no readlink function. :)
(It’s in the P5readlink dist.)
lucs I seem to remember some basic test was missing (thought it was symlink, not sure anymore). 14:29
mst chloekek: IIRC a lot of raku APIs have been designed to be generalised, it's not as unix centric as perl5 is 14:31
I'm not sure that's always the right answer, but it's a fairly consistent aesthetic, and "having a consistent aesthetic" is important even if one can nitpick the details 14:32
14:34 poohman left
chloekek I wonder what would be the best way to find the META6.json file in a tarball, given it’s sometimes in the root, sometimes in an arbitrarily-named subdirectory, and there may be multiple in there in deeper subdirectories that are not relevant. 14:35
Perhaps tar -- "$path" META6.json || tar --strip-components=1 -- "$path" META6.json 14:37
14:39 Altai-man_ joined
chloekek No, strip-components does not influence the list of files to extract, only where they are extracted into. 14:41
14:42 sena_kun left 14:51 poohman joined
chloekek Ah, just have to use two tar commands: gist.github.com/chloekek/9d81b3a04...be6b879743 14:56
mst honestly, I'd expect META6 to be in the root 15:01
chloekek Sometimes there is an additional directory.
mst nine: did we ever standardise this stuff?
chloekek So it’s not in /META6.json, it’s in Email-MIME-2.0.2/META6.json, along with all other files.
But this is not always the case, it’s just random. 15:02
mst oh, wait, you mean ... ah
to me Email-MIME-2.0.2/ *is* the root
chloekek Yeah, but to tar it isn’t. :þ
mst sure. but I'm used to the idea that Email-MIME-2.0.2.tar.gz should contain a directory called Email-MIME-2.0.2 and if it doesn't it's not a tarball, it's a tarbomb, and I'm going to send a mallet gnome after the developer 15:03
chloekek Tarbomb nightmares are also why I’m not extracting to disk, but to stdout. :þ 15:05
jdv79 chloekek: iirc META6.json can only be in that one place 15:07
at least as far as being "pauseable" 15:08
are you seeing it elsewhere? 15:09
chloekek I don’t have any examples at hand, but I recall so.
Perhaps those generated by GitHub do that, but I’m not sure.
(github.com/user/repo/archive/v1.0.0.tar.gz) 15:10
15:19 melezhik joined
Geth_ doc: 97089e8aaa | Coke++ | doc/Type/Signature.pod6
Fix compilation error
15:25
linkable6 Link: docs.raku.org/type/Signature
jdv79 well. I'm not sure if anything is looking at the pause p6 indexes so who knows
nine mst: I don't think we'll ever look for a META6.json in some subdirectory 15:34
Except of course that top level directory named after the dist :) 15:35
mst nine: I think the issue isn't subdirectories but the top level directory being used normally but also people shipping tarbombs
[Coke] yawns. 15:42
15:48 k-man_ joined 15:49 k-man left 15:51 patrickb joined 15:52 Tirifto joined 15:56 aborazmeh left
chloekek Rewrote my code to index META6.json files into SQLite, should be more robust and complete now. All that’s left to do is make a nice web interface for browsing/searching it. :) 16:00
jdv79 how come one can't bind to an aggregate attr? 16:07
i'm trying to avoid the cost of copying into an array attr since i already have an array ready to go 16:08
ah, nm. i'm an idiot. . vs ! 16:09
odd disparity though
i also, to chime in on something from a day or two ago - been under the weather - have been tripped up by that odd "can't grep with Bool" error 16:18
poohman m: grammar test {regex TOP {<line>*}; regex line {\V*\v}; regex BT {\h*BT\h*\v}}; say test.parse("first line\nsecond line\nBT\nthird line\n"); 16:19
camelia 「first line
second line
BT
third line

line => 「first line

line => 「second line

line => 「BT

line => 「third line
poohman m: grammar test {regex TOP {<line>*}; regex line {\V*\v && <-BT>}; regex BT {\h*BT\h*\v}}; say test.parse("first line\nsecond line\nBT\nthird line\n"); 16:20
camelia Nil
poohman m: grammar test {regex TOP {<line>*}; regex line {\V*\v && <!BT>}; regex BT {\h*BT\h*\v}}; say test.parse("first line\nsecond line\nBT\nthird line\n");
camelia Nil
poohman m: grammar test {regex TOP {<line>*}; regex line {\V*\v && -<BT>}; regex BT {\h*BT\h*\v}}; say test.parse("first line\nsecond line\nBT\nthird line\n");
camelia 5===SORRY!5===
Unrecognized regex metacharacter - (must be quoted to match literally)
at <tmp>:1
------> 3gex TOP {<line>*}; regex line {\V*\v && 7⏏5-<BT>}; regex BT {\h*BT\h*\v}}; say test
Unrecognized regex metacharacter < (must be…
poohman m: grammar test {regex TOP {<line>*}; regex line {\V*\v && !<BT>}; regex BT {\h*BT\h*\v}}; say test.parse("first line\nsecond line\nBT\nthird line\n"); 16:21
camelia 5===SORRY!5===
Unrecognized regex metacharacter ! (must be quoted to match literally)
at <tmp>:1
------> 3gex TOP {<line>*}; regex line {\V*\v && 7⏏5!<BT>}; regex BT {\h*BT\h*\v}}; say test
Unrecognized regex metacharacter < (must be…
poohman hello
any way of matching the regex line only if it was not matching regex BT
? 16:22
m: grammar test {regex TOP {<line>*}; regex line {\V*\v}; regex BT {\h*BT\h*\v}}; say test.parse("first line\nsecond line\nBT\nthird line\n"); 16:23
camelia 「first line
second line
BT
third line

line => 「first line

line => 「second line

line => 「BT

line => 「third line
phogg chloekek: if you know you have GNU tar: tar xf whatever.tar --no-anchored META6.json 16:25
rbtca chloekek: I packed Email-Mime 2.0.2. Did I do something wrong? 16:26
Or was that just an example of challenges?
chloekek That was just the tarball I randomly picked from the 1823 tarballs in this directory. :) 16:27
--no-anchored looks neat, thanks! I’ll check that out 16:28
16:30 vike joined
Success oh hey i just read your twitter thing 16:30
16:30 rbtca is now known as rbt
jdv79 anyone know what gens the eco jsons? 16:33
Altai-man_ jdv79, you mean github.com/ugexe/Perl6-App--ecogen ? 16:34
jdv79 ah, yes, thanks 16:35
i skimmed his repos but didn't find it:( 16:36
stoned75 looking at Str match mmd for :st, :nd, ...: is the reason why argument aliases are not used has to do with faster processing ? has hinted, may be, in github.com/rakudo/rakudo/commit/b7...e8f5c77f41
16:40 sena_kun joined 16:41 Altai-man_ left
stoned75 ... yes looks really like it 16:50
16:57 girafe left 17:04 rbt left, rbt joined 17:08 melezhik left 17:11 kst left
poohman m: grammar test {regex TOP {<line || BT>*}; regex line {\V*\v && <!BT>}; regex BT {\h*BT\h*\v}}; say test.parse("first line\nsecond line\nBT\nthird line\n"); 17:16
camelia Too many positionals passed; expected 1 argument but got 2
in regex line at <tmp> line 1
in regex TOP at <tmp> line 1
in block <unit> at <tmp> line 1
17:16 stoned75 left
moritz phogg: you likely want regex TOP { [<BT> | <line>]* } 17:18
17:21 girafe joined
poohman moritz: then <BT> will have preference because of its position?? 17:22
m: grammar test {regex TOP {<BT>|<line>*}; regex line {\V*\v}; regex BT {\h*BT\h*\v}}; say test.parse("first line\nsecond line\nBT\nthird line\n"); 17:23
camelia 「first line
second line
BT
third line

line => 「first line

line => 「second line

line => 「BT

line => 「third line
poohman m: grammar test {token TOP {<BT>|<line>*}; token line {\V*\v}; token BT {\h*BT\h*\v}}; say test.parse("first line\nsecond line\nBT\nthird line\n"); 17:24
camelia 「first line
second line
BT
third line

line => 「first line

line => 「second line

line => 「BT

line => 「third line
poohman moritz: Thanks 17:25
moritz poohman: actually | decides by which matches more text (the "longest token") 17:30
if you use || then the first one that matches wins
17:38 aborazmeh joined, aborazmeh left, aborazmeh joined 17:41 caterfxo left
cpan-raku New module released to CPAN! Data::Record (0.2.2) by 03KAIEPI 17:42
New module released to CPAN! Geo::Hash (0.0.3) by 03TITSUKI
17:43 caterfxo joined 17:48 poohman left 17:50 poohman joined
poohman how did <BT> get matched when | was used? did both match the same length and then it took position into consideration? 17:52
18:09 AlexDaniel left 18:10 guifa2 joined, aborazmeh left
moritz there are some other disambiguations first, like prefering to match a literal over a character class 18:10
at least, if I remember correctly
m: say 'a' ~~ / $<charclass>=\w | $<literal>=a / 18:11
camelia 「a」
charclass => 「a」
moritz nope, seems to prefer position, never mind me
18:16 [Sno] joined 18:19 |Sno| left
moritz weekly: twitter.com/jnthnwrthngtn/status/1...0666461185 18:21
notable6 moritz, Noted! (weekly)
[Coke] is there a way to programmatically list what nqp opcodes are available? (Preferably from nqp itself) 18:22
18:32 guifa2 left 18:34 guifa2 joined
moritz [Coke]: I'd recommend you look into t/docs/opcodes.t and t/docs/tests.t in nqp; that seems to compare available and documented ops somehow 18:35
maybe one of them contains the inspiration you need to answer that question
18:39 pilne joined, Altai-man_ joined
MasterDuke pretty sure he's asking because he's trying to make those tests better 18:42
18:42 sena_kun left 18:43 aborazmeh joined, aborazmeh left, aborazmeh joined
moritz then I don't know, sorry :/ 18:44
18:45 guifa2 left
moritz it's handled in erm:sym<nqp:op>, and effective creates a QAST::Op 18:47
maybe QAST::MASTOperations is the place to look for the translation? 18:49
that seems to be build hashes of known operators in %core_ops and %hll_ops 18:51
[Coke] moritz: ... I wrote those tests. :)
They are cheating by looking in the source, but the source itself has lots of "cheats"
(the problem is that you can create them programmatically with nqp, so catching all the ways to do that isn't easy) 18:52
[Coke] IS pagliacchi.
MasterDuke find the longest op name, create every combination of characters that length and see if calling it dies with whatever the error is when you call a non-existent op? 18:57
Altai-man_ [Coke], AFAIK, there is no such way. In Comma we are actually parsing docs, and giving jnthn has not suggested anything better...
[Coke] OK. hopefully your parsing and the t/docs/op* parsing aren't disagreeing. 18:58
18:59 Some-body_ joined, DarthGandalf left 19:00 Some-body_ is now known as DarthGandalf 19:05 stoned75 joined 19:10 Tirifto left 19:26 ofperfection joined
ofperfection Hello- I'm playing with the Comma IDE, and it seems the 'Use ModuleName' in /bin doesn't see the 'Modulename.pm6' file in /lib 19:27
I'm an absolute noob, so I'm sure it's just my understanding of how the default 'application' structure works 19:28
I get an 'error while compiling /path/to/bin/script.p6' 19:29
nevermind, looks like I missed a line in the docs: 19:30
export PERL6LIB=/path/to/my-modules,/path/to/more/modules
or I could install my modules with zef, looks like. I'd need to reinstall frequently since my understanding is the .pm6 is the best place to manage application behavior from a performance aspect 19:32
actually, looks like 'use lib 'lib'' line performs what I was after 19:35
lizmat ofperfection++ 19:36
19:44 cpan-raku left 19:46 cpan-raku joined, cpan-raku left, cpan-raku joined 19:51 aborazmeh left 19:53 aborazmeh joined, aborazmeh left, aborazmeh joined 19:57 poohman left 19:58 aborazmeh left
girafe now it's amiga demos at revision party 20:03
www.twitch.tv/revisionparty
20:10 AlexDaniel joined, AlexDaniel left, AlexDaniel joined 20:14 rindolf left
ofperfection if I have a '$coerced-str' that returns (Array) on .WHAT and 10 for .elems, why would 'for' iterate only a single time? 20:22
20:22 |Sno| joined 20:23 [Sno] left
ofperfection (each element is a hash, if that matters) 20:23
20:26 aborazmeh joined, aborazmeh left, aborazmeh joined
ofperfection looping with the manual 'loop' construct works fine 20:28
20:34 AlexDaniel left
cpan-raku New module released to CPAN! Template::Classic (0.0.3) by 03CHLOEKEK 20:35
20:40 sena_kun joined 20:41 Altai-man_ left
chloekek jnthn: Saw your talk and now I have a similar use case for macros, where I currently build code with string concatenation: compiling HTML templates with Raku snippets inside them. :) 20:46
It’s very hacky: template :(:%archive!, :$nix, :$zef), q:to/HTML/; uses .raku on the Signature object. 20:47
Then those parameters become available in the template.
jdv79 jnthn++ # thanks for the presentation 20:49
20:50 ofperfection left, ofperfection joined 20:51 aborazmeh left 21:01 Sgeo_ joined 21:02 aborazmeh joined, aborazmeh left, aborazmeh joined 21:05 Sgeo left 21:09 wamba joined 21:10 AlexDaniel joined, AlexDaniel left, AlexDaniel joined 21:18 Kaeipi left 21:19 Kaeipi joined 21:20 Itaipu joined 21:22 AlexDaniel left 21:24 AlexDaniel joined 21:28 AlexDaniel left 21:29 wamba left
[Coke] m: my $a = <1 2 3 4 5>; for $a -> $b { say $b } ; for @$a -> $b { say $b } #ofperfection 21:37
camelia (1 2 3 4 5)
1
2
3
4
5
[Coke] docs.raku.org/language/list#index-...ument_Rule 21:38
ofperfection Thank you Coke, I'm reading that now! 21:39
21:40 AlexDaniel joined, AlexDaniel left, AlexDaniel joined
vrurg .tell AlexDaniel with regard to the release – I'm afraid that I won't have time until the end of June. I applied for a talk at the conference but have to make two projects ready before that. Then I should be able to fully focus on the release. 22:12
tellable6 vrurg, I'll pass your message to AlexDaniel
AlexDaniel .
vrurg: sounds awesome
vrurg: thank you for your work!
vrurg My pleasure. :) BTW, I gonna publish one of the projects next week. Test::Async for thread-safe and concurrent testing. 22:14
AlexDaniel vrurg: any inspiration from Testo? 22:15
vrurg AlexDaniel: more from perl's Test2. 22:16
22:16 ofperfection left
vrurg I think, testo is not really extensible, if memory serves me right. 22:16
22:17 ofperfection joined
jdv79 it appears setting an obj attr to Nil sets it to its type constraint object but how to do that when slipping a hash into the constructor cause Nil on a hash key sets it to Any 22:17
vrurg And I'm aiming at being full drop-in replacement of the standard Test. 22:18
jdv79 i guess it makes sense that would have to be manually handled
AlexDaniel vrurg: yeah, but IIRC the point was that Test is less than awesome 22:19
jdv79 is there a way to literally have Nil in a hash val?
vrurg AlexDaniel: ok, extensions could solve this. 22:20
AlexDaniel vrurg: not so much
vrurg AlexDaniel: not Test, but Test::Async extensions. I provide a framework, basically. And one extensions Test::Async::Base which is Test compatible. 22:21
AlexDaniel vrurg: yes that sounds pretty cool :)
22:22 aborazmeh left
vrurg Say, Testo group might be introduced with `test-bundle Test::Async::Testo { method group(...) is test-tool { ... } } – that's all. 22:22
AlexDaniel “Some portions of this software may be based on or re-use code of Test.pm6 module shipped with Rakudo 2107.04.03” 22:23
hah
vrurg is back to writing tests for the framework...
Ah, one more thing: `plan $count, :parallel`, `plan $count, :random` affect how subtests are run. 22:24
vrurg must remember to make random support seeding for reproducible outcomes...
chloekek renames CRAI =~ s/Comprehensive/Cryogenic/ to clarify intent and avoid confusion with CPAN. 22:25
jdv79 i think almost any acronym starting with C and being related to eco stuff will have potential to be confused 22:26
chloekek I don’t want to rename the repository. :( 22:27
brb sleep 22:29
22:32 aborazmeh joined, aborazmeh left, aborazmeh joined 22:33 chloekek left 22:39 Altai-man_ joined 22:42 sena_kun left 22:48 patrickb left 22:54 k-man_ is now known as k-man 23:02 cognominal joined 23:05 cognomin_ left 23:33 ofperfection left 23:34 ofperfection joined 23:49 pecastro left