Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-04-23

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:01 eater how can I for loop with a regex over a string?
00:02 eater m: for "aaa" ~~ m:c/./ -> $match { say ~$match; }
00:02 camelia rakudo-moar ce41e4: ( no output )
00:02 eater does nothing e.g.
00:02 gfldex m: for "aaa" ~~ m:c:g/./ -> $match { say ~$match; }
00:02 camelia rakudo-moar ce41e4: OUTPUT: «a␤a␤a␤»
00:02 eater oh
00:02 eater a g
00:03 eater thanks gfldex :D
00:03 gfldex also, you should not need that
00:10 TimToady that :c, I think you mean
00:11 samcv nice, that's fun to look over the regex, i'll have to try that sometime :)
00:11 gfldex the whole looking over a regex. We tend to use that indirectly with &split and friends
00:11 gfldex is zef supposed to understand module versions?
00:12 samcv yes
00:12 samcv i think you can only install two versions if they both have entries in the ecosystem though?
00:12 samcv maybe? i'm not totally sure...
00:14 gfldex it's not finding a module that is in the ecosystem with the correct version
00:14 gfldex i will worry about that tomorrow.
00:14 gfldex good *
00:14 TimToady did you try 'zef update'
00:15 gfldex travis should do that automatically
00:15 * TimToady didn't realize travis was in play :)
00:17 astj joined #perl6
00:30 Mithaldu joined #perl6
00:45 Cabanossi joined #perl6
00:45 eater how "expiremental is Blob.unpack?"
01:13 Juerd eater: Quite
01:13 Juerd It's incomplete and hard to fix without breaking compatibility.
01:14 Juerd Its interface and semantics are likely to change
01:15 Cabanossi joined #perl6
01:20 aborazmeh joined #perl6
01:20 aborazmeh joined #perl6
01:26 gdonald joined #perl6
01:26 eater ah
01:26 eater ack
01:28 eater well then
01:28 eater running 'my ($k, $v) = ("a");'
01:28 eater just kind of pauses moar :')
01:28 eater no cpu usage
01:28 eater it just does nothing
01:29 eater oh...
01:29 eater maybe I shouldn't put a space between - and e :')))
01:29 AlexDaniel m: my ($k, $v) = ("a");
01:29 camelia rakudo-moar ce41e4: ( no output )
01:30 cyphase joined #perl6
01:30 eater I did perl - e 'my ($k, $v) = ("a")'
01:30 AlexDaniel ah
01:30 eater so it wanted to read STDIN
01:30 AlexDaniel haha
01:30 eater :')
01:35 BenGoldberg joined #perl6
01:41 Ben_Goldberg joined #perl6
01:47 Ben_Goldberg joined #perl6
01:48 ilbot3 joined #perl6
01:48 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
01:55 u-ou hi
01:55 AlexDaniel hello
01:56 u-ou :)
02:05 noganex_ joined #perl6
02:07 iyra joined #perl6
02:08 iyra how do I check if a hash has all specified keys? for example, I want to check if 'm' and 'y' are keys of the hash %params
02:12 MasterDuke_ m: y %h = :1m, :2y; say so all %h<m y>:exists; say so all %h<m b>:exists;
02:12 camelia rakudo-moar ce41e4: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Unsupported use of y///; in Perl 6 please use tr///␤at <tmp>:1␤------> 3y7⏏5 %h = :1m, :2y; say so all %h<m y>:exist␤»
02:12 gdonald joined #perl6
02:12 MasterDuke_ m: my %h = :1m, :2y; say so all %h<m y>:exists; say so all %h<m b>:exists;
02:12 camelia rakudo-moar ce41e4: OUTPUT: «True␤False␤»
02:12 MasterDuke_ iyra: ^^^
02:13 iyra thanks, do I need the all in front?
02:13 iyra because this is what I tried (without the all) and it didn't seem to be working hah
02:14 MasterDuke_ m: my %h = :1m, :2y; say so %h<m b>:exists; # yeah, you need all
02:14 camelia rakudo-moar ce41e4: OUTPUT: «True␤»
02:15 MasterDuke_ m: my %h = :1m, :2y; dd %h<m b>:exists;
02:15 camelia rakudo-moar ce41e4: OUTPUT: «(Bool::True, Bool::False)␤»
02:15 Cabanossi joined #perl6
02:15 MasterDuke_ m: say so (False, False)
02:15 camelia rakudo-moar ce41e4: OUTPUT: «True␤»
02:16 iyra thanks a lot, it works :)
02:16 MasterDuke_ np
02:36 atweiden joined #perl6
03:00 Cabanossi joined #perl6
03:44 Cabanossi joined #perl6
03:54 poohman joined #perl6
03:57 poohman m: say "hello";
03:57 camelia rakudo-moar ce41e4: OUTPUT: «hello␤»
04:05 u-ou does use trace only work one file deep?
04:05 u-ou because I'm trying to use it with a module but it's not going
04:11 poohman m: my @a[2,2];@a[2,2]=44;say @a;
04:11 camelia rakudo-moar ce41e4: OUTPUT: «Partially dimensioned views of shaped arrays not yet implemented. Sorry. ␤  in block <unit> at <tmp> line 1␤␤»
04:11 kaare_ joined #perl6
04:13 geekosaur joined #perl6
04:14 poohman m: my @a[2,2];@a[1,1]=33;dd @a;
04:14 camelia rakudo-moar ce41e4: OUTPUT: «Partially dimensioned views of shaped arrays not yet implemented. Sorry. ␤  in block <unit> at <tmp> line 1␤␤»
04:16 poohman m: my @a; @a[2,2]=55;say @a;
04:16 camelia rakudo-moar ce41e4: OUTPUT: «[(Any) (Any) (Any)]␤»
04:18 poohman m: my @a; say @a;
04:18 camelia rakudo-moar ce41e4: OUTPUT: «[]␤»
04:19 poohman m: my @a; @a[6]=6; say @a;
04:19 camelia rakudo-moar ce41e4: OUTPUT: «[(Any) (Any) (Any) (Any) (Any) (Any) 6]␤»
04:20 poohman m: my @a; @a[2;2]=55; say @a;
04:20 camelia rakudo-moar ce41e4: OUTPUT: «[(Any) (Any) [(Any) (Any) 55]]␤»
04:22 poohman m: my @a; @a[2;2]=55; say @a.shape;
04:22 camelia rakudo-moar ce41e4: OUTPUT: «(*)␤»
04:23 MasterDuke_ m: my @a[2;2]; say @a.shape
04:23 camelia rakudo-moar ce41e4: OUTPUT: «(2 2)␤»
04:24 poohman m: my @a; @a[2]=55; say @s.shape;
04:24 camelia rakudo-moar ce41e4: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Variable '@s' is not declared␤at <tmp>:1␤------> 3my @a; @a[2]=55; say 7⏏5@s.shape;␤»
04:25 poohman m: my @a; @a[2]=55; say @a.shape;
04:25 camelia rakudo-moar ce41e4: OUTPUT: «(*)␤»
04:25 poohman Hi MasterDuke
04:26 MasterDuke_ hey
04:27 ugexe gfldex: its handling the versions fine, but the error check that kills it is failing to note the difference in Git::Config and Git::Config:ver<0.1.1> (something else depends on and pulls in 'Git::Config')
04:27 poohman is there a difference in how single and multidimensional arrays work
04:28 poohman I mean without declaring the size beforehand
04:29 poohman for a single dimensional array if I give a value to the Nth element it displays it till there
04:31 poohman but does not display a square one when done with Two dimensional
04:32 MasterDuke_ yeah, don't think you can shape an array after the fact
04:33 MasterDuke_ but i'm off to sleep...
04:33 u-ou wow zsh just saved me. I did `rm *>tar` instead of `rm *.tar` and it asked me if I surely wanted to delete everything
04:34 u-ou </offtopic>
04:34 ugexe --no-preserve-root
04:34 geekosaur zsh asks by itself :)
04:35 u-ou if it'd been bash i'd have lost all files in .
04:39 nadim joined #perl6
05:02 wamba joined #perl6
05:06 ugexe thats not everything
05:07 samcv well if you do rm -rf * in / then you don't need no preserve root
05:07 samcv since it uses shell expansion
05:08 samcv and is like doing rm -rf /home /usr /blah /blah /blah /blah
05:08 samcv but yeah. be safe everyone!
05:12 kyan joined #perl6
05:14 Cabanossi joined #perl6
05:33 u-ou :)
05:42 kurahaupo joined #perl6
05:44 CIAvash joined #perl6
05:55 kurahaupo_ joined #perl6
05:56 parv joined #perl6
06:14 Cabanossi joined #perl6
06:32 gdonald joined #perl6
06:34 domidumont joined #perl6
06:39 domidumont joined #perl6
06:56 parv joined #perl6
06:59 Cabanossi joined #perl6
06:59 setty1 joined #perl6
07:23 bjz joined #perl6
07:48 rindolf joined #perl6
07:49 xfix joined #perl6
07:49 wictory[m] joined #perl6
07:53 tadzik joined #perl6
07:56 poohman joined #perl6
07:56 kent\n joined #perl6
07:57 poohman m: my @a;@a[2;2];say @a;
07:57 camelia rakudo-moar f9ebd2: OUTPUT: «[]␤»
07:57 BinGOs joined #perl6
07:58 poohman m: my @a;@a[2;2]=55;say @a;
07:58 camelia rakudo-moar f9ebd2: OUTPUT: «[(Any) (Any) [(Any) (Any) 55]]␤»
08:01 M-Illandan joined #perl6
08:02 poohman m: my @a;@a[2,2]=55;say @a;@a[1;1]=11;say @a;
08:02 camelia rakudo-moar f9ebd2: OUTPUT: «[(Any) (Any) (Any)]␤[(Any) [(Any) 11] (Any)]␤»
08:02 timotimo joined #perl6
08:03 darutoko joined #perl6
08:04 poohman m: my @a;@a[2;2]=55;say @a; @a[1;2]=11;say @a;
08:04 camelia rakudo-moar f9ebd2: OUTPUT: «[(Any) (Any) [(Any) (Any) 55]]␤[(Any) [(Any) (Any) 11] [(Any) (Any) 55]]␤»
08:07 TBSliver joined #perl6
08:08 poohman m: my @a;@a[2;2]=55;say @a.shape;@a[1;2];say @a.shape;
08:08 camelia rakudo-moar f9ebd2: OUTPUT: «(*)␤(*)␤»
08:09 wamba joined #perl6
08:14 Cabanossi joined #perl6
08:17 poohman m: my @a; @a[2;2]=55;say @a.shape;@a[1;2]=11;say @a.shape;
08:17 camelia rakudo-moar f9ebd2: OUTPUT: «(*)␤(*)␤»
08:44 poohman m: my @a[2;2]; say @a.shape
08:44 camelia rakudo-moar f9ebd2: OUTPUT: «(2 2)␤»
08:44 nadim_ joined #perl6
08:47 u-ou hi
08:47 samcv hi u-ou
08:48 u-ou hey samcv
08:49 samcv working more on case insensitive matching of expanding characters
08:50 samcv so that we can pass back how many codepoints were matched in the haystack, because with case insensitive we can't assume the number of codepoints we matched is the same as the needle
08:50 samcv m: say 'sta' ~~ m:i/st/
08:50 camelia rakudo-moar f9ebd2: OUTPUT: «「sta」␤»
08:50 samcv i hope to one day get this to return 'st' and know that the match was only one codeponit there
08:51 samcv and also account for when needle changes size as well as haystack. many things cannot be assumed anymore when your strings change length while you are indexing them :)
08:52 u-ou nice
08:54 Mithaldu joined #perl6
09:14 Cabanossi joined #perl6
09:20 samcv three letter variable names are not fun
09:20 samcv i don't know what these hold :(
09:20 u-ou I read your blog post on that
09:20 samcv oh cool
09:20 u-ou looks like tricky work
09:20 samcv yeah
09:55 AlexDaniel joined #perl6
10:09 pmurias joined #perl6
10:19 u-ou night
10:20 timotimo u-ou: "use trace" is, like all "use" statements, lexical in scope
10:23 isBEKaml joined #perl6
10:23 u-ou I can't remember the problem I was having specifically, but I couldn't get it to work with a module that i "used"
10:24 u-ou anyway, going to bed :I night
10:24 u-ou I think I didn't need it in the end
10:25 timotimo yeah
10:25 timotimo you need to put "use trace" into the module you're using
10:25 timotimo that's what "lexical scope" means
10:25 timotimo in the same file, and also in between the same pair of { }
10:25 u-ou I think I did, not sure though
10:25 timotimo then you might have to do some extra work to make sure that version of the file actually gets used
10:25 timotimo i.e. not one installed with zef earlier or something
10:57 DrForr o/
10:59 DrForr Pluggable seems a touch bitrotted as it uses @*INC which is deprecated. Is there a replacement handy?
11:00 sena_kun joined #perl6
11:01 DrForr (for either Pluggable or @*INC)
11:05 timotimo it depends on how it uses @*INC
11:05 timotimo m: say $*REPO.next-repo.installed>>.meta
11:05 camelia rakudo-moar f9ebd2: OUTPUT: «({auth => github:niner, author => github:niner, authors => [Stefan Seifert], depends => [LibraryMake], description => Use Perl 5 code in a Perl 6 program, files => {resources/libraries/p5helper => 2F6B236B77BC9D0E77C1B73DBAFA53E81D238E83.so}, license => …»
11:06 timotimo this could get you a piece of the way there?
11:06 DrForr Okay, backstory first.
11:08 DrForr I'm a bit tired of a Dist::Zilla-ish thing not existing for perl6, so I'm writing my own. I'd prefer it to be entirely plugin-driven, so all the main code has to do is load a list of stuff from Six::Zilla::Plugins::* and go from there.
11:08 timotimo right
11:09 DrForr The catch is, of course, knowing where Six::Zilla is on the file system, and by extension Six/Zilla/Plugins/.
11:09 timotimo "on the file system" is already wrong :)
11:10 DrForr Figured as much when I read the documentation. I suspect I'm going to run headlong into precompilation and caching issues.
11:10 DrForr That's why I stepped in to get a bit of advice first.
11:12 DrForr I'm happy with just punting on this for the time being an acting as if my Plugins/ directory was already dynamically loaded, I'll probably roll with that for the time being.
11:14 DrForr Right now getting something done so that others can populate the appropriate Plugins:: namespace is what I'm after.
11:15 timotimo that seems easy
11:15 eater #| isn't documentated somewhere?
11:15 timotimo the others just have to provide it via their META6.json
11:16 robertle DrForr: http://semistable.com/files/perl6-pluggable-g22a9c79f.tar.gz
11:16 robertle this is a modified version of https://github.com/tony-o/perl6-pluggable, which had some issues last time I looked
11:17 DrForr The internals look trivial enough that when the time comes I'll just rewrite it, I think.
11:17 timotimo eater: i don't see it docced in perl6-doc, but it does appear a crapton of times, basically in every single Type/ document
11:17 timotimo https://docs.perl6.org/type/Any#(Mu)_method_WHY
11:17 timotimo in fact, this is exactly what you're after, i'd say
11:18 eater ah yes
11:18 eater POD doesn't apply the formatting rules on it :(
11:18 timotimo i love how "do not use for" is a string of keywords and that's why it's boldface
11:18 eater oh
11:18 eater thats why :')
11:19 timotimo m: #= Do the C<Thing>␤sub test() {}; say &test.WHY.perl
11:19 camelia rakudo-moar f9ebd2: OUTPUT: «Nil␤»
11:19 timotimo m: #$ Do the C<Thing>␤sub test() {}; say &test.WHY.perl
11:19 camelia rakudo-moar f9ebd2: OUTPUT: «Nil␤»
11:19 timotimo bleh
11:19 timotimo m: #| Do the C<Thing>␤sub test() {}; say &test.WHY.perl
11:19 camelia rakudo-moar f9ebd2: OUTPUT: «Pod::Block::Declarator.new(WHEREFORE => sub test () { #`(Sub|44003672) ... }, config => {}, contents => [])␤»
11:19 timotimo m: #| Do the C<Thing>␤sub test() {}; say &test.WHY.Str
11:19 camelia rakudo-moar f9ebd2: OUTPUT: «Do the C<Thing>␤»
11:19 eater :(
11:19 timotimo it's strange that the .perl doesn't output the contents at all
11:19 timotimo but the contents are clearly there
11:20 timotimo m: #| Do the C<Thing>␤sub test() {}; say &test.WHY.contents.perl
11:20 camelia rakudo-moar f9ebd2: OUTPUT: «["Do the C<Thing>"]␤»
11:20 timotimo yeah, seems like it just treats it as a string
11:21 eater which is wrong!!!
11:21 eater well let's see where this is done
11:21 timotimo in src/Perl6/Grammar.nqp in rakudo
11:22 timotimo attach_trailing_docs and attach_leading_docs is one interesting bti
11:22 timotimo bit*
11:22 eater thanks
11:22 timotimo oh yeah
11:22 timotimo look how it's called, it just stringifies the attachment's nibble
11:22 timotimo that way no formatting codes can survive
11:23 eater :(
11:23 eater hmm
11:23 eater #= does formatting??
11:24 timotimo well, i think it should? perhaps?
11:24 timotimo oh, no it doesn't even
11:24 eater my Pod doesn't even see it :')
11:25 timotimo m: #| Do the C<Thing␤sub test() {}; say &test.WHY.contents.perl>␤say "this should be the only thing that runs"
11:25 camelia rakudo-moar f9ebd2: OUTPUT: «this should be the only thing that runs␤Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5[\"Do the C<Thing\"]' (indicated by ⏏)␤  in block <unit> at <tmp> line 2␤␤Actually thrown at:␤  in block <…»
11:25 timotimo what the ...
11:25 timotimo that's an impressive failure mode
11:25 timotimo m: #| Do the C<Thing>␤say "this should be the only thing that runs"
11:25 camelia rakudo-moar f9ebd2: OUTPUT: «this should be the only thing that runs␤»
11:26 timotimo m: #| Do the C<␤Thing␤>␤say "this should be the only thing that runs"
11:26 camelia rakudo-moar f9ebd2: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Preceding context expects a term, but found infix > instead␤at <tmp>:3␤------> 3>7⏏5<EOL>␤»
11:26 timotimo when there's an unclosed formatting code, it ought to nom multiple lines
11:26 timotimo but at the moment it just goes "parse a string of non-newlines"
11:26 timotimo m: #=( Do the C<␤Thing␤>)␤say "this should be the only thing that runs"
11:26 camelia rakudo-moar f9ebd2: OUTPUT: «this should be the only thing that runs␤»
11:26 timotimo this works, however
11:26 eater m: #| C<help␤#| >␤say "ayy"
11:26 camelia rakudo-moar f9ebd2: OUTPUT: «ayy␤»
11:27 eater get rekt
11:27 eater altho I don't know how this ends up
11:27 timotimo it doesn't know about the formatting code at all
11:27 eater ye
11:27 timotimo m: #| C<help␤#| no closer!␤say "ayy"
11:27 camelia rakudo-moar f9ebd2: OUTPUT: «ayy␤»
11:29 eater I need to rebuild rakudo when I change the grammar right?
11:29 timotimo yep
11:29 timotimo sadly it'll have to re-parse the whole core setting
11:29 timotimo so you'll be waiting more than one minute each time ;(
11:29 eater :(((
11:30 eater I ~could~
11:30 timotimo i've tried in the past to create a much shorter core setting, but that's a huge undertaking
11:30 eater just use the NQP
11:30 eater and show the AST
11:30 masak hi, #perl6
11:30 eater hi masak
11:30 masak today's autopun spotting: https://twitter.com/vornietom/status/855858519626596352
11:30 timotimo you can try to use the perl6 parser without a core setting, but please be aware that if you don't have a core setting, you don't have the Pod:: classes, and the parse will definitely fail at the point it tries to create one of these to hold your results
11:36 masak timotimo: that sounds... weird. :)
11:36 timotimo yeah, i don't recommend it
11:36 eater I'll just be patient
11:36 grondilu joined #perl6
11:36 masak sounds like "the core setting is designed to be pluggable -- but be careful, removing it won't work!"
11:36 timotimo well, you can replace it with another core setting
11:36 timotimo it's just that the other core setting has to set up a few things really early, too
11:38 eater then I still like my AST idea better :')
11:41 Zoffix joined #perl6
11:42 Zoffix .tell El_Che seems I lied. We ended up cutting yet another point release. The 2017.04.3 is latest release now with 2017.04.2 having a couple of large bugs 2017.04.3 fixes
11:42 yoleaux Zoffix: I'll pass your message to El_Che.
11:42 Zoffix left #perl6
11:43 AlexDaniel c: releases say rand
11:43 committable6 AlexDaniel, https://gist.github.com/d4bd00f2444206ebc402ee7a50e0cd95
11:43 AlexDaniel committable6 :S
11:44 eater timotimo: nice, now #| don't even have functionality anymore:') im very good at customimzing perl6
11:44 timotimo :D
11:44 AlexDaniel ah, it is still building it… but tags are pulled ahead of time
11:46 timotimo pod is notoriously tricky, eater
11:48 eater oh sweet, it only builds the changed nqp files :>
11:52 AlexDaniel c: releases say rand
11:52 committable6 AlexDaniel, https://gist.github.com/51782b9747fa16d317d28ed26e928311
11:52 AlexDaniel \o/
11:53 pmurias masak: you can plugin in a different core setting, but with an empty one almost nothing parses
11:55 masak pmurias: I'm both very non-surprised and a little bit disappointed at that ;)
11:57 timotimo benchable6: sleep rand * 1.5
11:57 benchable6 timotimo, ¦sleep: «Cannot find this revision (did you mean “all”?)»
11:57 timotimo benchable6: all sleep rand * 1.5
11:57 benchable6 timotimo, starting to benchmark the 40 given commits
11:57 timotimo :P :P
11:59 Cabanossi joined #perl6
11:59 pmurias masak: there are a bunch of places where rakudo assumes something that's not used in the parsed program exists in the setting that could be (fairly easily) removed
12:00 pmurias would anything be gained from supporting tiny settings?
12:00 timotimo faster development turn around time for grammar-only changes
12:00 benchable6 timotimo, benchmarked the given commits, now zooming in on performance differences
12:01 timotimo i'm so sorry, poor benchable6
12:01 pmurias lunch&
12:01 benchable6 timotimo, «hit the total time limit of 240 seconds»
12:02 timotimo also i'd be interested to see how low the memory usage gets by removing a few classes
12:02 timotimo like, Bag*, Set*, Mix* perhaps
12:02 timotimo just as an example
12:10 eater lol, now whenever you define an #| comment it will throw "Too many positionals passed; expected 1 argument but got 2"
12:12 AlexDaniel m: my $x; #| foo
12:12 camelia rakudo-moar c0c408: ( no output )
12:12 eater AlexDaniel: in my own build :p
12:12 eater trying to fix #|
12:13 AlexDaniel timotimo: goddamn issue https://github.com/perl6/whateverable/issues/113
12:14 timotimo the what now?
12:37 eater timotimo: it's currently just kind of saving the pod string and in theory it should reparse that if we want something useful :s
12:38 iyra joined #perl6
12:42 kaare__ joined #perl6
12:42 eater well lets break the whole compiler then :>
12:47 timotimo reparsing is a big no-no
12:47 eater yea
12:47 eater I understand that
12:47 timotimo we pride ourselves on our "single-pass parsing"
12:47 eater so Im just kind of breaking everything
12:48 eater oh? single-pass parsing isn't normal?
12:48 timotimo nope
12:48 timotimo consider perl5 regexes where the modifiers go at the end of the regex
12:53 eater how to get the length of an NQPArray? :')
12:55 timotimo nqp::elems i believe
12:56 eater thanks :D
13:07 eater I might have fixed #| but in the mean time I broke my whole rakudobrew env :')
13:14 Ven joined #perl6
13:15 eater hgn
13:15 eater debugging this stuff is hard
13:15 timotimo yup
13:20 eater oh
13:20 eater wow
13:20 eater it runs even deeper
13:23 eater Pod::Block::Declarator has an trailing array, but it will never return the array itself nor are you able to access it because it's hidden :')
13:23 eater and if you want to access it you just get @!trailling.join(' ')
13:26 nhywyll joined #perl6
13:29 Cabanossi joined #perl6
13:29 MilkmanD1n joined #perl6
13:30 timotimo yeah :\
13:30 timotimo ugly
13:31 Zoffix joined #perl6
13:31 eater I just made an method to debug raw_leading :')
13:31 Zoffix .tell El_Che I fucked up the 2017.04.3 release >_<
13:31 yoleaux Zoffix: I'll pass your message to El_Che.
13:33 timotimo *sigh*, i'm not really good at NativeCall
13:33 eater timotimo: what are you trying to do?
13:33 timotimo well, i have a function here that takes a the_struct** and allocates it for me
13:33 timotimo so i have a class the_struct is repr('CPointer'), right?
13:33 timotimo and i set that parameter to "the_struct $foo is rw"
13:34 timotimo the next thing i do after that function that allocates for me is i increase its reference count
13:34 timotimo which immediately segfaults because my $the_thing is a null pointer
13:34 noganex joined #perl6
13:35 timotimo the annoying thing is that there are functions that return the struct i want, but they are deprecated
13:35 timotimo only the functions that take a ** and set that, and then return a status code, are acceptable
13:36 eater bleh
13:57 titsuki joined #perl6
14:01 eater it really feel atm that I'm some car engineer, trying to repair a plane :')
14:01 eater *feels
14:04 bjz_ joined #perl6
14:11 kent\n joined #perl6
14:16 timotimo grml. why do we cut off the message of a typecheck error
14:17 timotimo "Type check failed in assignment to $encoder; expected NativeCall::Types::CArray[sixel_encoder] but got NativeCall::Types::CA..."
14:17 eater :')))
14:17 eater that's really funny
14:17 timotimo got => NativeCall::Types::CArray[sixel_encoder].new, expected => NativeCall::Types::CArray[sixel_encoder]
14:20 * eater rage quits
14:20 eater fuck this
14:22 timotimo i didn't have to put a type annotation on the variable, so i could get it to work
14:22 timotimo but the output is still corrupted
14:22 Zoffix timotimo: I know that error
14:23 Zoffix timotimo: I know the fix too. How to repro it tho?
14:23 timotimo yeah, i do, too
14:23 timotimo let's see
14:23 Zoffix timotimo: there was a ticket, but I left it unfixed because I couldn't write the test for the issue.
14:23 kaare__ joined #perl6
14:24 Zoffix Don't see the ticket, but I remember it was by titsuki
14:25 timotimo the obvious way to reproudce it doesn't work
14:29 timotimo i think i have an idea why i'm seeing corruption; that'd have nothing to do with how i allocate this sturcture ...
14:29 timotimo sturcture? nice one.
14:30 timotimo fantastic
14:31 timotimo it's because the library expects stdout to be harmless, but libuv had a different opinion
14:49 gfldex m: my IO::Handle $h = $*OUT;
14:49 camelia rakudo-moar c0c408: OUTPUT: «Type check failed in assignment to $h; expected IO::Handle but got IO::Handle.new(:path(...␤  in block <unit> at <tmp> line 1␤␤»
14:50 Zoffix restricted bot
14:50 timotimo m: say $*OUT.perl
14:50 camelia rakudo-moar c0c408: OUTPUT: «IO::Handle.new(:path(IO::Special.new(what => "<STDOUT>")),:chomp)␤»
14:51 timotimo m: say $*OUT ~~ IO::Handle
14:51 camelia rakudo-moar c0c408: OUTPUT: «False␤»
14:51 timotimo m: say $*OUT.WHAT.perl;
14:51 camelia rakudo-moar c0c408: OUTPUT: «IO::Handle␤»
14:51 timotimo well ...
14:51 Zoffix IO::Handle is a different type than $*OUT.WHAT. It's from RESTRICTED
14:52 timotimo right
15:22 skids joined #perl6
15:24 pmurias what's a correct way to describe a "function" that doesn't have side effects but returns a different value every time it's called?
15:25 gfldex generator
15:26 pmurias would generator be a good way to describe something like clone or random?
15:29 Cabanossi joined #perl6
15:30 ufobat_ joined #perl6
15:32 ggoebel joined #perl6
15:41 timotimo clone is a pure function, as it depends only on what you're passing it
15:41 timotimo i wouldn't call random side effect free. or any function that "returns a different value every time it's called"
15:41 timotimo because random(); random() will give you the same sequence of two numbers, except if something else called random() in the middle
15:43 khw joined #perl6
15:45 pmurias timotimo: clone returns a different value every time it's called
15:47 pmurias timotimo: I'm looking for a word to describe function that don't have side effects but aren't pure
15:48 Zoffix Isn't that just "function"? With side-effect-causing ones being "procedures"?
15:48 Zoffix .oO( or is it the other way around )
15:49 pmurias Zoffix: a function in maths has no side effects, ones in programming often have them
15:51 pmurias Zoffix: I want a word to describe nqp ops that have no side effects but return a different value every time
15:55 ilbelkyr nullipotent, perhaps?
15:57 sena_kun I am not a professor, but if the arguments are the same and the return values are different every time, there *are* side effects inside. Result of random is based on some IO call, it is a side effect.
15:59 pmurias in terms of the implementation they *are* side effects but it's not a part of the model
16:00 pmurias a nqp::clone can be optimized away if it's result is not used a nqp::writefh shouldn't be
16:00 sena_kun ah, here comes optimisation
16:04 pmurias sena_kun: there is (or at least I want it to be) a distinction between how are the nqp ops documented to work and the precise way they are implemented
16:06 sena_kun well, in that case my knowledge is not enough to be helpful here
16:06 gfldex sena_kun: i know that feeling :)
16:07 Zoffix m: say now
16:07 camelia rakudo-moar c0c408: OUTPUT: «Instant:1492963681.978784␤»
16:07 * pmurias hates the feeling when he doesn't know how to name a function/method/concept
16:07 Zoffix sena_kun: ^ that now call has no sideeffects and returns different value (almost) every time
16:08 domidumont joined #perl6
16:08 sena_kun Zoffix, but a call to IO is already a side-effect, isn't it?
16:09 Zoffix sena_kun: there's no IO call
16:10 sena_kun Zoffix, the value comes from some libastral? Not a joke or sacrasm, just asking.
16:12 pmurias sena_kun: libastral is a astrology library?
16:13 sena_kun pmurias, yes, you can directly connect to astral world and get something mysterious from there. :)
16:13 sena_kun now I'm curious about how `now` implemented...
16:13 timotimo i'm wondering how to build something robust that can give me a perl6 object when i got something passed through a "user value" pointer for a callback
16:14 timotimo but actually, i can just use a closure over the value
16:15 pmurias sena_kun: stuff like adding two numbers has side effects (like using up electricity and accessing memory) but that's not part of how things are documented/specced
16:16 sena_kun pmurias, yep, changing CPU/memory state for sure, but I'm not about it.
16:19 b2gills antonyms of "specific": ambiguous indistinct imprecise fuzzy similar
16:29 Cabanossi joined #perl6
16:31 ugexe DrForr: there are lots of modules in the ecosystem that implement plugin systems. they only require a few lines of code. zef is one such example, but there is also crust and sparrowdo
16:32 ugexe two of those examples are even entirely plugin driven
16:33 timotimo this library has a little bit of callback hell %)
16:35 ugexe and one of those even lets you dynamically add arguments to your MAIN commands
16:35 ugexe for your plugins
16:38 BenGoldberg joined #perl6
16:40 winnie_ joined #perl6
16:40 winnie_ m: say "Hello";
16:40 camelia rakudo-moar c0c408: OUTPUT: «Hello␤»
16:42 Zoffix m: say "Hi \c[BLACK HEART SUIT]"
16:42 camelia rakudo-moar c0c408: OUTPUT: «Hi ♥␤»
16:42 Zoffix New blog post: "The Failure Point of a Release": https://perl6.party/post/The-Failure-Point-of-a-Release
16:45 Zoffix left #perl6
16:50 winnie_ i still have 2017.1 from fedora rawhide
16:51 gdonald joined #perl6
16:56 bvbfr65bv joined #perl6
16:56 bvbfr65bv hi all
16:56 eater hey
16:56 bvbfr65bv please give me info
16:56 eater info
16:57 bvbfr65bv have fuzzer's to perl?
16:58 bvbfr65bv with support SYN/ACK
16:59 b2gills There are people who fuzz Perl, as in Perl 5. The rest of what you are saying doesn't make much sense to me.
17:00 zapwai joined #perl6
17:08 bvbfr65bv ok
17:09 eater this is the iirc second time someone comes with questionable reasons asking for fuzzing
17:10 geekosaur there's a tendency for a certain group of people to think the only use IRC has or can possibly have is hax0r discussion
17:15 eater luckily we know better, that IRC is actually only used for C&C
17:20 grondilu joined #perl6
17:21 * TimToady does C&C with jokes
17:32 tyil joined #perl6
17:37 gfldex U
17:42 espadrine joined #perl6
17:50 tyil joined #perl6
18:03 kurahaupo joined #perl6
18:05 labster joined #perl6
18:06 poohman joined #perl6
18:09 eater http://act.perlconference.org/tpc-2017-amsterdam/ is down :(
18:11 TreyHarris Are TODO's in parts of subtests notionally supported in Test? The overall core behavior is correct (TODO tests are run but their n/ok status doesn't affect the overall pass/fail), but prove misses accidental success because it doesn't look like a passing TODO test because of the indentation.
18:12 TreyHarris you can TODO an entire subtest and if ALL tests inside pass, you still get an unexpected success
18:12 TreyHarris but if you try to TODO tests inside a subtest, unexpected successes are missed
18:13 TreyHarris (I mention just because this breaks the way I usually separate NYI tests that I just thought of: I put them in the right place logically in the suite but mark them TODO.)
18:19 samcv TreyHarris, yeah TODO's have always worked for me
18:19 samcv with prove
18:19 samcv how do you mark them todo?
18:20 TreyHarris samcv: OH, TODO's work, but... uh, let me compose a camelia example. one sec.
18:22 TreyHarris m: use Test; subtest { pass; todo 'not yet done'; pass; }; done-testing;
18:22 camelia rakudo-moar 1bce2e: OUTPUT: «    ok 1 - ␤    ok 2 -  # TODO not yet done␤    1..2␤ok 1 - ␤1..1␤»
18:22 TreyHarris samcv: that isn't recognized as an unexpected success because it's on an indented line
18:22 zaltekk joined #perl6
18:23 TreyHarris if you read it scanning for ok...TODO, you'll find it. But prove doesn't catch it
18:23 TreyHarris As it does when the todo() is at the top level of the test
18:25 eliasr joined #perl6
18:25 TreyHarris I think the required logic is: if any TODO-marked test in a subtest passes, then the entire surrounding subtest must get marked TODO, recursively to the top-level if you have nested subtests.
18:26 DrForr Including the tests that are in the top-level subtest that ran before the first TODO?
18:27 TreyHarris DrForr: no, just the overall subtest n?ok
18:27 labster joined #perl6
18:27 DrForr subtest { ok 1; subtest { TODO 'foo' } };
18:27 DrForr Wasn't trying to poke holes, just thinking out loud.
18:28 TreyHarris DrForr: in that case, no plan nor done-testing, so I'm not sure the behavior is defined
18:29 TreyHarris currently, Test seems to implicitly stick in a done-testing in that case, so that should just be an outright fail
18:29 TreyHarris not even a TODO fail
18:30 TreyHarris if you pu that todo (it's lowercase) between the ok and the subtest, then you should get a TODO fail
18:31 DrForr Was just thinking out loud.
18:32 TreyHarris if right after the TODO where you had it was a pass inside the sub-subtest, then both the sub-subtest and the subtest should 'ok # TODO', leading to an unexpected success
18:33 TreyHarris here's a more interesting question, though: subtest { ok 1; subtest { todo 'foo'; pass; fail; } }
18:34 TreyHarris oops, sorry, no, that's not interesting. what i mean was:
18:34 TreyHarris subtest { ok 1; subtest { todo 'foo', 2; pass; fail; } }
18:34 TreyHarris subtest { ok 1; subtest { todo 'foo', 2; pass; fail; done-testing; # for explicitness} done-testing; } done-testing;
18:35 TreyHarris That is a weird case bacause you said to sub-subtests would fail, but one succeeded, and one failed... bubbling TODO up is arguable
18:35 TreyHarris s/to/two/
18:37 TreyHarris if the numeric optional positional argument is simply shorthand for repetitively typing the line without a number before each of that next number of tests, then it should. if the numeric argument defines a notional test group that isn't quite a subtest, then it shouldn't.
18:40 TreyHarris but this: subtest { plan 2; ok 1; todo 'b0rken subtest'; subtest { plan 2; pass; fail; }; }; done-testing;
18:40 Zoffix joined #perl6
18:41 Zoffix TreyHarris: bubbling the TODO will mask all failures in the subtest
18:41 TreyHarris that shouldn't bubble-up the TODO because you merely asserted that the sub-subtest's contents were, as a whole, unreliable yet.
18:41 Zoffix TreyHarris: also subtests aren't part of the TAP spec
18:42 Zoffix This should be handled by harness instead of the TAP generator, which generates everything fine.
18:42 stmuk http://pl6anet.org/drop/rakudo-star-2017.04-RC0.tar.gz
18:43 * moritz downloads and builds
18:43 stmuk I suppose I have to soil my hands with a windows VM :(
18:43 winnie_ joined #perl6
18:44 moritz can we make an NQP point release and base another rakudo point release on it?
18:44 moritz I need to recommend a rakudo version for my book, and I have to do it soon
18:44 Zoffix I'd also need a MoarVM point release.
18:45 moritz and I'd like to be a solid one; basing it on a non-released NQP doesn#t seem very solid :/
18:45 moritz can anyone do that besides jnthn++?
18:45 Zoffix Cutting 4th point release just because someone wants to recommend something in a book seems sily to me.
18:45 moritz is "because we want a solid release" a better reason?
18:46 timotimo you do realize perl5 (or was it 4?) got turned into a proper release becaues of a book? :)
18:46 stmuk I kinda wish there was a Long(ish) Term Support release based on a R*
18:46 DrForr Perl has a history of cutting 5th verion releases for the same reason.
18:46 Zoffix moritz: what's unsolid about the Star?
18:46 stmuk but we aren't really there yet
18:46 moritz the book recommendation just amplifies my desire to have a solid release
18:46 Zoffix "solid release" is just a buzzword
18:47 El_Che moritz: tell people where to get and/or build
18:47 yoleaux 11:42Z <Zoffix> El_Che: seems I lied. We ended up cutting yet another point release. The 2017.04.3 is latest release now with 2017.04.2 having a couple of large bugs 2017.04.3 fixes
18:47 yoleaux 13:31Z <Zoffix> El_Che: I fucked up the 2017.04.3 release >_<
18:47 yoleaux 16:56Z <Zoffix_> El_Che: basically Rakudo 2107.04.3 is out, but it references a non-release version of NQP. I dunno if it's a major problem. Also, wrote a blog post about this release issues business: https://perl6.party/post/The-Failure-Point-of-a-Release
18:47 El_Che moritz: rakudo is a moving target
18:47 stmuk there does need to be a slower moving one
18:47 moritz Zoffix: it's something we don't have experience with
18:47 Ven joined #perl6
18:47 Zoffix Literally nothing will change with it, except we'll have to do acrobatics to cherry pick the commits and two teams will need to cut releases of 3 software projects, hoping not to fuck it up the 5th time.
18:48 winnie_ joined #perl6
18:49 El_Che Zoffix: I download each component separedly (rakudo, nqp, moarvm), so it needs to be a released version of each
18:49 moritz distributions are squemish when it comes to packaging non-released versions
18:49 El_Che Zoffix: the release themselves can be different
18:50 stmuk El_Che: it's easy to build your own nqp-2017.04-24-g87501f7b.tar.gz and MoarVM-2017.04-44-gf0db8822.tar.gz
18:50 El_Che stmuk: I know, it's how the image works atm
18:51 stmuk I hope we don't get into the habit of doing this but as a one off fix for an exceptional release it seemed the least worst option
18:51 El_Che Zoffix: shall I retract the 2017.04.2 pkgs?
18:51 zaltekk i'm getting 'MoarVM panic: MVM_platform_alloc_pages failed: 12' when trying to build rakudo. am i right to assume that means the box is running out of RAM?
18:52 Zoffix zaltekk: yes, you need about 1.2GB just for the build itself. Adding more swap also works
18:52 Zoffix zaltekk: alternatively, install a distro package instead of building.
18:52 zaltekk thanks. 1GB box so that makes sense
18:53 timotimo we already print "this step can take a long time" before the core setting build
18:53 setty1 joined #perl6
18:53 Zoffix El_Che: they're just buggy releases. I'd keep them.
18:53 timotimo we might want to add "this takes at least one gigabyte of ram"
18:53 samcv Zoffix, can i copy this post to make a Camelia wants YOU to add license fields to your Dist's?
18:53 samcv https://perl6.party/post/Tag-Your-Dists
18:53 samcv heh
18:53 samcv gonna make a blog post about license in meta files
18:53 Zoffix samcv: sure
18:55 pmurias will we have separate meta files meta-license?
18:56 moritz stmuk: the star RC0 passed all module tests and installed fine here (current Ubuntu 64bit)
18:56 stmuk great I'm just trying on Windows now
18:58 El_Che Silly question, can a http://rakudo.org/downloads/nqp/nqp-2017.04-24-g87501f7b.tar.gz be put in place in the meanwhile? Otherwise I need to rebuild all the docker images.
18:59 Zoffix El_Che: moritz Well, if jnthn cuts 2017.04.1 MoarVM release with regex fixes in it, I'll cut—and I can't believe I'm saying this—5th release of Rakudo this week. But IMO enough is enough. Trying to go through unbeaten path right now and mess with cherry picks and tags is just asking to make the problem worse. The next release is in less than 4 weeks. The world isn't going to end if distros don't package
18:59 Zoffix polished 2017.04 release.
18:59 Zoffix El_Che: no
18:59 Cabanossi joined #perl6
18:59 Zoffix Use github links to archives. You'll also need whatever MoarVM version it references
19:00 Zoffix left #perl6
19:02 TreyHarris Zoffix: thanks, P5 Test2 does the same thing with subtests and the harness also doesn't catch it, I just never noticed it before. The other ways to group tests based on P5 Test::More all flatten down at the file level so they catch *any* single passing test with a surrounding TODO context--which I guess is another reason todo_skip is necessary in Test::More.
19:03 ChoHag joined #perl6
19:03 TreyHarris I guess I just never noticed that indented subtests weren't a thing prove pays attention to because I never had code that created them before.
19:06 El_Che Ok, I fixed by marking it as "pre-release"
19:09 TreyHarris easy enough to write my own checker: perl6 -ne '.say if m/^<ws> "ok" .* "# TODO"/'
19:10 samcv .tell DrForr the Readline module cannot be installed, this PR needs to be accepted https://github.com/drforr/perl6-readline/pull/17
19:10 yoleaux samcv: I'll pass your message to DrForr.
19:11 eater im pretty suprised, I've already used [R//]= more than //= :')
19:11 DrForr o/ # done. Thanks for the warning.
19:11 yoleaux 19:10Z <samcv> DrForr: the Readline module cannot be installed, this PR needs to be accepted https://github.com/drforr/perl6-readline/pull/17
19:12 ugexe m: 42 [R//]= my $foo; say $foo;
19:12 camelia rakudo-moar 1bce2e: OUTPUT: «Cannot modify an immutable Int␤  in block <unit> at <tmp> line 1␤␤»
19:12 ugexe m: 42 = my $foo; say $foo;
19:12 camelia rakudo-moar 1bce2e: OUTPUT: «Cannot modify an immutable Int␤  in block <unit> at <tmp> line 1␤␤»
19:12 ugexe m: 42 R= my $foo; say $foo;
19:12 camelia rakudo-moar 1bce2e: OUTPUT: «42␤»
19:13 eater m: "my $foo = 42; $foo [R//]= $bar; say $foo; my $bar = 6; $foo [R//]= $bar; say $foo;"
19:13 camelia rakudo-moar 1bce2e: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Variable '$foo' is not declared␤at <tmp>:1␤------> 3"my 7⏏5$foo = 42; $foo [R//]= $bar; say $foo; m␤»
19:15 eater m: my $foo = {a => 42}; $foo<a> [R//]= $foo<b>; say $foo<a>; $foo<b> = 6; $foo<a> [R//]= $foo<b>; say $foo<a>; say "look ugexe";
19:15 camelia rakudo-moar 1bce2e: OUTPUT: «42␤6␤look ugexe␤»
19:15 ugexe wondering why `42 [R//]= my $foo` doesnt work (even if it doesnt make sense
19:15 eater because you're assigning $foo to 42
19:15 eater with [R//]= you only flip the arguments for //
19:15 ugexe ah yes good call
19:15 eater no the whole statement
19:16 eater it's really useful
19:17 ugexe m: 42 [R[R//]=] my $foo; say $foo
19:17 camelia rakudo-moar 1bce2e: OUTPUT: «42␤»
19:18 eater m: 42 [R=] my $foo; say $foo;
19:18 camelia rakudo-moar 1bce2e: OUTPUT: «42␤»
19:21 ugexe no need for []
19:22 eater m: my $d = {d => "help"}; $d ~
19:22 camelia rakudo-moar 1bce2e: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Missing required term after infix␤at <tmp>:1␤------> 3my $d = {d => "help"}; $d ~7⏏5<EOL>␤    expecting any of:␤        prefix␤        term␤»
19:22 eater m: my $d = {d => "help"}; $d<d> ~R[//]= $d<a>; $d<d> ~R[//]= $d<d>; say $d<d>;
19:22 camelia rakudo-moar 1bce2e: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Null regex not allowed␤at <tmp>:1␤------> 3my $d = {d => "help"}; $d<d> ~R[//7⏏5]= $d<a>; $d<d> ~R[//]= $d<d>; say $d<d>␤»
19:22 eater :(
19:23 eater can't stack
19:23 eater wait
19:23 eater m: my $d = {d => "help"}; $d<d> ~[R//]= $d<a>; $d<d> ~[R//]= $d<d>; say $d<d>;
19:23 camelia rakudo-moar 1bce2e: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Thunky pattern t. for &METAOP_REDUCE_RIGHT not yet implemented. Sorry. ␤at <tmp>:1␤------> 3my $d = {d => "help"}; $d<d> ~[R//]7⏏5= $d<a>; $d<d> ~[R//]= $d<d>; say $d<d>;␤    expecting any of:…»
19:26 DrForr Whew, thought I found a new parser test case :)
19:32 tyil eater: https://github.com/scriptkitties/p6-Config and https://github.com/scriptkitties/p6-Config-Parser-yaml
19:34 tyil or anyone else who wants to take a look at it and check for mistakes
19:34 tyil its my first attempt at a p6 module
19:44 DrForr 'github:kitties' in your META6.json, tyop there :)
19:45 gfldex tyil: you may want to add 1 b to "auth": "githu:scriptkitties"
19:45 DrForr Also you've got more .pm6 files than you're listing in the JSON.
19:45 tyil that may be worthwhile indeed
19:46 tyil I updated the auth part, I'll continue on listing the other files
19:47 gfldex you could safe you some trouble with your next module with https://github.com/gfldex/perl6-meta6-bin
19:47 eater why do you need to explicitly say which files you provide?
19:47 DrForr For the installer.
19:47 eater gfldex: <3
19:47 gfldex eater: you may want to keep some files around that you don't want zef to install (yet)
19:50 tyil https://github.com/scriptkitties/p6-Config/blob/master/META6.json
19:50 tyil updatered
19:52 TreyHarris I'm blanking (and this is strangely difficult to search even in my clone of perl6/doc): how do you obtain the capture of the current subroutine's call while it's executing?
19:54 moritz TreyHarris: declare your subroutine with a caputre argument, |c
19:54 moritz m: sub f(|allargs) { say allargs.perl }; f a, b => 42
19:54 camelia rakudo-moar 1bce2e: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤    a used at line 1␤␤»
19:54 geekosaur joined #perl6
19:54 moritz m: sub f(|allargs) { say allargs.perl }; f 'a', b => 42
19:54 camelia rakudo-moar 1bce2e: OUTPUT: «\("a", :b(42))␤»
19:54 tyil if there's nothing else wrong with it, I'll go see if I can get it submitted on modules.perl6
19:55 TreyHarris moritz: yes, but if I want to add a diagnostic to an existing routine with a normal signature, can't I get it inside the code block too?
19:55 TreyHarris I can wrap it I guess
19:56 moritz iirc there's a nqp:: op for that
19:56 TreyHarris but I thought there was a method call on the routine and a way for a routine to get a handle on itself, but i can't recall either
19:57 TreyHarris wrap seems like the easiest option then, since i need to do it for several methods to trace an argument flow
19:57 * samcv clickbaits new post https://cry.nu/perl6/ecosystem-license-module-tagging/
19:58 TreyHarris samcv++
19:59 moritz samcv: btw Artistic License 2.0 isn't the same as the "perl" license
19:59 samcv yes i know. i'm refering to ones that had Artistic 2.0 as their LICENSE file
20:00 Geth ¦ ecosystem: Tyil++ created pull request #328: Add Config
20:00 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/pull/328
20:00 samcv the list only contains things that were listed for proveablely artistic 2.0 licensed modules
20:00 samcv some listing perl for the license field didn't have a LICENSE file, so the bot did not make PR to those ones
20:00 samcv since it's ambiguous what it actualy is as the license
20:01 gfldex tyil: please setup travis if you add modules to the ecosystem
20:01 tyil o-okay
20:01 tyil the docs said "consider", so I was already considering
20:01 samcv moritz, should i add a caption that says that list only refers to what was on provably artistic 2.0 modules? so it's not confusing?
20:09 Geth ¦ ecosystem: 3933701cf1 | (Patrick Spek)++ (committed by Zoffix Znet) | META.list
20:09 Geth ¦ ecosystem: Add Config (#328)
20:09 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/3933701cf1
20:11 TEttinger joined #perl6
20:12 moritz samcv: your choice
20:12 samcv k. i'm gonna add a little comment
20:13 samcv there are definetly some in the eco that may be under Artistic 1.0 and they put "Artistic" but. luckily most of the ones with "Artistic" or perl had LICENSE files and i was able to figure out what they were
20:13 samcv but the ones without license files, could vary well not be artistic 2.0
20:17 zakharyas joined #perl6
20:20 samcv good to make it clear that i'm not 'guessing' what peoples licenses are when the names are ambiguous. since that would be very bad
20:20 tyil that'd amke some people very upset
20:20 samcv yes
20:20 tyil resulting in removal before the clock strikes 8
20:20 samcv lol
20:20 samcv too soon
20:30 labster joined #perl6
20:32 samcv we're now at 20.4% of modules having license fields
20:32 samcv \o/
20:33 Geth ¦ ecosystem: 63cf3f86ca | eater++ (committed using GitHub Web editor) | .travis/testpackagemeta.pl
20:33 Geth ¦ ecosystem: Travis: Actually skip 5 lines and not 6...
20:33 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/63cf3f86ca
20:37 Geth ¦ ecosystem: the-eater++ created pull request #329: Add PostCocoon::Url
20:37 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/pull/329
20:39 TreyHarris erm, how can I wrap a BUILD submethod? inside the class, '::<&BUILD>.wrap(...' compiles but has no effect, outside I can't figure out how to get a routine object suitable for wrapping out of My::Class at all.
20:41 geekosaur isn't the whole point of sub,method that it's not accessible outside the class?
20:41 geekosaur *submethod
20:42 eater hmm, can you wrap wrap?
20:42 TreyHarris geekosaur: agreed, but I don't mind doing it inside the class either
20:43 moritz TreyHarris: methods live in method tables, where ::<...> can't find it
20:44 eater TreyHarris: if you don't mind doing it inside the class, why not just define BUILD?
20:44 moritz TreyHarris: I think your best shot is mucking with $class.^submethod_table
20:44 TreyHarris eater: I am defining BUILD. Now I want to wrap it.
20:45 moritz m: class A { submethod BUILD() { say "BUILD" } }; A.new()
20:45 camelia rakudo-moar 1bce2e: OUTPUT: «BUILD␤»
20:45 eater m: class A { submethod BUILD() { say "BUILD" } }; A.&new.wrap({ say "NO BUILD" }); A.new;
20:45 camelia rakudo-moar 1bce2e: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤    new used at line 1 (in Perl 6 please use method call syntax instead)␤␤»
20:45 moritz m: class A { submethod BUILD() { say "BUILD" } }; A.^submethodtable<BUILD> = sub(|c) { say "wrapped!"; A.^submethodtable<BUILD>(|c) };  A.new()
20:45 camelia rakudo-moar 1bce2e: OUTPUT: «5===SORRY!5===␤Word 'sub' interpreted as 'sub()' function call; please use whitespace around the parens␤at <tmp>:1␤------> 3ILD" } }; A.^submethodtable<BUILD> = sub7⏏5(|c) { say "wrapped!"; A.^submethodtable␤Unexpected block in infix po…»
20:46 moritz m: class A { submethod BUILD() { say "BUILD" } }; A.^submethodtable<BUILD> = sub (|c) { say "wrapped!"; A.^submethodtable<BUILD>(|c) };  A.new()
20:46 camelia rakudo-moar 1bce2e: OUTPUT: «No such method 'submethodtable' for invocant of type 'Perl6::Metamodel::ClassHOW'␤  in block <unit> at <tmp> line 1␤␤»
20:46 moritz m: class A { submethod BUILD() { say "BUILD" } }; A.^submethod_table<BUILD> = sub (|c) { say "wrapped!"; A.^submethod_table<BUILD>(|c) };  A.new()
20:46 camelia rakudo-moar 1bce2e: OUTPUT: «Cannot modify an immutable Submethod␤  in block <unit> at <tmp> line 1␤␤»
20:46 moritz m: class A { submethod BUILD() { say "BUILD" } }; A.^submethod_table<BUILD> := sub (|c) { say "wrapped!"; A.^submethod_table<BUILD>(|c) };  A.new()
20:46 camelia rakudo-moar 1bce2e: OUTPUT: «BUILD␤»
20:46 moritz m: class A { submethod BUILD() { say "BUILD" } }; A.^submethod_table<BUILD> := sub (|c) { say "wrapped!"; A.^submethod_table<BUILD>(|c) }; A.^compose;  A.new()
20:47 camelia rakudo-moar 1bce2e: OUTPUT: «(timeout)wrapped!␤wrapped!␤wrapped!␤wrapped!␤wrapped!␤wrapped!␤wrapped!␤wrapped!␤wrapped!␤wrapped!␤wrapped!␤wrapped!␤wrapped!␤wrapped!␤wrapped!␤wrapped!␤wrapped!␤wrapped!␤wrapped!␤wrapped!␤wrapped!␤wrapped!␤wra…»
20:47 eater :')
20:47 eater nice busy
20:47 Geth ¦ ecosystem: 2067da6183 | eater++ | META.list
20:47 Geth ¦ ecosystem: Add PostCocoon::Url
20:47 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/2067da6183
20:47 Geth ¦ ecosystem: 4e64f2cc1b | eater++ (committed using GitHub Web editor) | META.list
20:47 Geth ¦ ecosystem: Merge pull request #329 from the-eater/add-postcocoon-url
20:47 Geth ¦ ecosystem:
20:47 Geth ¦ ecosystem: Add PostCocoon::Url
20:47 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/4e64f2cc1b
20:48 gfldex how do I say "a module of version x.y.z or younger" in a META6.json?
20:49 moritz m: class A { submethod BUILD() { say "BUILD" } }; A.^submethod_table<BUILD>.wrap({say 'wrapped'});  A.new()
20:49 camelia rakudo-moar 1bce2e: OUTPUT: «wrapped␤»
20:49 moritz m: class A { submethod BUILD() { say "BUILD" } }; A.^submethod_table<BUILD>.wrap({say 'wrapped'; callsame});  A.new()
20:49 camelia rakudo-moar 1bce2e: OUTPUT: «wrapped␤BUILD␤»
20:49 eater moritz: nice
20:49 moritz TreyHarris: ^^
20:49 moritz finally :-)
20:50 TreyHarris moritz: yup, just got that myself after you suggested ^submethod_table. Thanks!
20:50 TreyHarris can I do it inside the unit class?
20:50 bjz joined #perl6
20:51 eater m: &rand.wrap({ 4; #`(decided by diceroll) }); say rand;
20:51 camelia rakudo-moar 1bce2e: OUTPUT: «4␤»
20:51 eater can't go wrong
20:52 gfldex m: say Version.new(1..*);
20:52 camelia rakudo-moar 1bce2e: OUTPUT: «v1.*␤»
20:52 eater is there a way to turn off wrap?
20:52 moritz m: unit class A; submethod BUILD() { say 'BUILD' }; &?CLASS.^submethod_table<BUILD>.wrap({say 'wrap!'; callsame}); &?CLASS.new
20:52 camelia rakudo-moar 1bce2e: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Undeclared name:␤    ?CLASS used at line 1␤␤»
20:52 moritz m: unit class A; submethod BUILD() { say 'BUILD' }; &?CLASS.^submethod_table<BUILD>.wrap({say 'wrap!'; callsame}); ::?CLASS.new
20:52 camelia rakudo-moar 1bce2e: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Undeclared name:␤    ?CLASS used at line 1␤␤»
20:52 moritz m: unit class A; submethod BUILD() { say 'BUILD' }; ::?CLASS.^submethod_table<BUILD>.wrap({say 'wrap!'; callsame}); ::?CLASS.new
20:52 camelia rakudo-moar 1bce2e: OUTPUT: «wrap!␤BUILD␤»
20:52 TreyHarris I can do it inside the unit class using the literal name, but $?CLASS doesn't... yeah
20:52 TreyHarris ah-hah
20:52 moritz TreyHarris: ::?CLASS it is
20:53 gfldex m: my $handle = &rand.wrap({ 4; #`(decided by diceroll) }); &rand.unwrap($handle); say rand;
20:53 camelia rakudo-moar 1bce2e: OUTPUT: «0.850251792911329␤»
20:53 gfldex eater: ^^^
20:54 eater :")
20:55 eater you have to have the handle?
20:55 gfldex eater: yes
20:56 * eater looks forward to some unique wrap exploits
21:00 TreyHarris Style question: I'm trying to port a P5 constructor that has two optional boolean args, one which defaults true, one false. Assuming I want the null-arg behavior to be identical (and cognizant that the way it would be called in Perl 5 requires the truthy or falsy value to be explicit, i.e. ->new(enable-normal => 0, verbose => 1) when you want to flip both from their defaults), should I 1) make the attributes
21:00 TreyHarris identically-named and defaulted and thus require the slightly-awkward .new(:!normal-behavior), 2) change the default-true attribute to 'has Bool $.disable-normal;' instead, or 3) keep the same-named and defaulted attributes and add a BUILD arg :disable-normal so that both :!enable-normal and :disable-normal work?
21:01 TreyHarris s/be explicit/explicit when named at all/
21:04 gfldex TreyHarris: do I undestand you right, that you want mutual exclusive Bools?
21:04 TreyHarris gfldex: no, they are independent things. but in the original, one is default 1, the other default 0
21:05 moritz TreyHarris: it really depends on how awkward the negated thing is
21:05 moritz if it's not awkward, I'd prefer the named to default to False
21:06 TreyHarris moritz: it's literally :enable-ptys, so it can be :!enable-ptys or :disable-ptys
21:07 moritz TreyHarris: then i'd go with :disable-ptys
21:09 ufobat___ joined #perl6
21:12 BenGoldberg joined #perl6
21:15 kent\n joined #perl6
21:16 kurahaupo joined #perl6
21:16 samcv ok we're from 13% of all modules having license fields to 20.5% :) that's really awesome
21:17 samcv just checked what it was before this push i've been making :)
21:17 samcv very encouraging!
21:18 TreyHarris moritz: agreed, just didn't know if that so-far singular divergence from naming from the CPAN module (except for a global _ -> -) was too weird to claim under the same rationale of changing to non-naming Perl 6-isms.
21:20 kent\n joined #perl6
21:22 tyil samcv: did you run an automated PR on all lacking modules?
21:22 samcv no
21:22 samcv only automated correcting them
21:22 samcv but i have done PR to add fields as well
21:23 samcv so that 13% included ones with incorrect values
21:23 samcv as does the 20.5%, but that's a very big increse in 4 days
21:24 samcv but the percentage of incorrect data has been cut almost in half i think. i haven't checked the stats on that tho
21:24 eater is at least 56 packages
21:24 eater which is pretty nice
21:24 samcv ok 38 have been fixed, out of 105 that had inaccurate info
21:24 samcv plus! the ones that didn't have one before
21:24 samcv so very very good!
21:25 eater :)
21:25 samcv let's get to 100!
21:25 samcv *99.9%
21:25 samcv heh. 100% would honestly be best
21:25 samcv but there may be some modules the authors have disapeared or something
21:31 kurahaupo joined #perl6
21:31 El_Che samcv: do you have a status page for that?
21:31 samcv i do not
21:31 samcv but i could maybe make one
21:32 samcv or someone. or something. i have a script that will give me stats on the usage of various tags
21:40 labster joined #perl6
21:42 gfldex El_Che: https://gist.github.com/gfldex/0a3c115276301a062564e7f57703de27
21:42 gfldex El_Che: perl6 -e 'use META6::bin :HELPER; for fetch-ecosystem().sort(*.<license> // "") { say [.<name>, .<license>] }' > ~/tmp/ecosystem-by-license.txt
21:44 El_Che thx
21:46 n3m0_G7x joined #perl6
21:46 El_Che samcv: where is the doc again for the meta file changes needed
21:46 samcv https://design.perl6.org/S22.html#license
21:47 dct joined #perl6
21:49 El_Che I see a module thx
21:49 El_Che fixed one :)
21:49 samcv yay!
21:49 samcv also this: https://gist.github.com/2c87aec0c687c3224531d4e994cd27c6
21:49 El_Che mostly written by gfldex :)
21:49 samcv will show you the % of modules with metadata, and also a distribution as well as the numbers of modules and ones with license metadata
21:50 samcv this is us currently https://gist.githubusercontent.com/samcv/06b4e4779eab60599e1637fd0828d0d8/raw/95165437441d021ff3b96ede710b237b597d1795/a.rb
21:50 samcv i made PR to the two packages with misspelled "license" as "licence" so ignore those
21:50 samcv uhm
21:51 samcv the script can also output non-compliant package names, that have weird fields that aren't in spec
21:52 samcv lots of source-type hm maybe that's a real thing? it's not in meta spec tho
21:53 samcv oh there's 4 with licence not license
22:01 gdonald joined #perl6
22:02 samcv seems "author" is a very commonly incorrect tag. since the correct is authors
22:02 samcv or maybe that needs to be added to the meta spec. idk
22:02 samcv see list here https://gist.githubusercontent.com/samcv/b7785ded237a92a254d4298881a1eed8/raw/f089f8f751492b472d7c031fcec3e441f60af8fe/-
22:03 samcv ugexe, can you weigh in?
22:06 gfldex samcv: this propaganda material may be of use to you: https://i2.wp.com/gfldex.files.wordpress.com/2017/04/bad-license.png
22:06 samcv hehe
22:06 TreyHarris Does GitHub have something in their terms of service about the licensing for otherwise-unmarked uploads to public repos?
22:07 samcv i think you give permission for it to be copied and forked
22:07 samcv but. distribution outside github is unlear *i think*
22:08 TreyHarris I mean, I assume (but wouldn't be 100% certain) that you can't upload commercial code to a public repo, wait for someone to fork it and send the first PR, and then use that as proof of infringing use
22:10 bjz joined #perl6
22:10 samcv ok apparently you have no right to use the code
22:10 samcv but you do have the right to fork it
22:10 samcv on github
22:10 samcv or something weird like that
22:10 samcv so it's all rights reserved but you allow for it to be copied and viewed *on github* but not neccisarily modified
22:11 samcv which basically means you have no rights becuase what is forking different than viewing the original project if you can't modify it
22:11 nadim_ jnthn: in the advent calendar 2011 you introduced Grammar::Trace, in the code some result, off the application of a token, is returned. the result has method MATCH, what other methods is there? is it documented somewhere?
22:15 nadim_ does someone have a biggish Grammar and an example text to match, I need it for some test
22:16 MasterDuke_ nadim_: can you just add a `.name.say for $result.^methods` to see what there are?
22:17 nadim_ right, but I'd like the documentation too, when I asked I wanted the interesting ones ;)
22:18 pmurias samcv: re misspelled license vs licence, don't some people feel strongly enough about the spelling to threaten module deletion?
22:19 pmurias ;)
22:19 timotimo lisens
22:21 lucs lye scents
22:21 MasterDuke_ lie sense
22:22 sammers joined #perl6
22:22 tyil for atom users: https://github.com/0tho/atom-nav-panel-plus/pull/8
22:23 samcv pmurias, uhm that wasn't the thing
22:23 samcv all of their modules have "license" as a key
22:24 timotimo so, which one is the one we're going with now?
22:24 samcv it's just the value that's non-standard. though many of their projects do have a LICENCE file in the projject, the metedata key is the right one, just the value isn't
22:24 samcv it's always been license
22:24 timotimo OK
22:24 samcv i don't care if they name their file LICENCE or license.txt or COPYING
22:25 samcv i'm not sure what that dispute was over even. :\ something about not enough discussion or something
22:26 samcv but no argument was given about the actual standardized license values or anything or alternatives
22:26 tyil only a few people agreed on what to use in the field
22:26 tyil it needed more people to agree, apparently
22:27 samcv and it's been on ecosystem issues and i've made PR and updated docs.perl6.org and S22. and nobody had complaints about the fundamentals of it. using SPDX standardized names
22:28 samcv dunno we should have a mailing list announcement too? i'm not on the ML though. so not sure how that works
22:29 timotimo hm. speaking of the ML, has ToddAndMargo not posted in a whole while?
22:30 timotimo they were keeping the mailing list alive for a long while
22:30 samcv where are the archives of the ML?
22:30 samcv i see some really old ones only talking about Parrot.. and
22:30 samcv that seems not up to date
22:30 timotimo hah
22:30 timotimo let me have a look
22:31 samcv now i have a blog post and posted it on reddit channel, and uhm
22:31 timotimo i don't see an archive link in the mail headers
22:32 samcv hm
22:32 timotimo http://www.nntp.perl.org/group/perl.perl6.users/
22:32 samcv should i send a message to perl.perl6.users?
22:32 samcv is that the list i should use?
22:33 timotimo i'd use that one
22:34 samcv then after that i'll get an arrow http://www.greenhousesign.com/images/arrow-spinner-sign.jpg
22:34 samcv or sign and walk around a populated area to make sure everybody has the chance to discuss it
22:34 samcv and can't be accused of not disseminating it as widely as possible
22:36 MasterDuke_ https://perl6.org/community/ has links to the various lists
22:37 timotimo http://lists.perl.org/tag/perl6.html - i found stuff here
22:38 samcv oh looks like http://www.nntp.perl.org/group/perl.perl6.language/
22:38 samcv some changes were already sent out mailing list
22:38 samcv nice
22:38 samcv not sure if anybody is subscribed to that list but
22:38 samcv that's nifty
22:39 samcv brb lunch
22:39 samcv heh timotimo http://www.nntp.perl.org/group/perl.perl6.announce/
22:39 samcv maybe we should remove this list from the page?
22:44 Cabanossi joined #perl6
22:53 timotimo https://perl6.org/compilers/features - still has niecza in it
22:53 timotimo and it still refers to "LoL args/params"
22:54 samcv doesn't have green for unicode properties for mvm either
22:54 timotimo yeah, that's because we're not feature complete yet
22:55 samcv what more features do we need
22:55 timotimo "set operations"
22:55 samcv oh. k
22:55 timotimo "match all symbols, except 'other'"
22:55 samcv we can do that with regex though right
22:55 timotimo "match all letters, or 'other', but not 'letter other'"
22:55 samcv i mean i have done it
22:56 samcv ok you got me there
22:57 timotimo ugh. i started on partial views for native arrays, but i didn't get it into a working proof-of-concept stage yet
22:59 MasterDuke_ partial views?
22:59 timotimo yeah
23:00 timotimo well, views in general
23:00 timotimo given a native array with 10x5 elements, get one with 10 elements. or with 5x10 elements. or with 10x10 elements of half integer size, or 10x5 elements but transposed, reversed, or flipped
23:01 timotimo given a native array of 8 uint8, get one with one int64, or a num64
23:01 MasterDuke_ @a[2;*2]? that?
23:01 MasterDuke_ @a[2;*;2]
23:01 timotimo something like that
23:02 timotimo also, we don't have a syntax for "reversed along axis n"
23:02 timotimo or "axis x and y are exchanged"
23:02 timotimo would be fine if those were methods, i think
23:06 jeek joined #perl6
23:59 Actualeyes joined #perl6

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo