Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-06-07

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:00 lizmat joined #perl6
00:03 MasterDuke joined #perl6
00:07 pilne the more i tinker around with perl6, the more i get the feeling that it either has a way to do anything, or using what it does have, to create any known (maybe not "optimized, or perfectly idiomatic" but "usable") abstraction in computer science i.e: monads, and maybe some unknown, it just seems stupidly flexible in allowing one to define both data, and how you work with that data.
00:08 pilne like, it defaults to rats, which is stupidly smart. but there is a very complete numeric tower available explicity, and if some kind you want isn't already there, defining it should be trivial if you can define the way a math function would work on it.
00:09 mcmillhj joined #perl6
00:13 pochi_ joined #perl6
00:16 Cabanossi joined #perl6
00:17 itaipu joined #perl6
00:20 Geth ¦ DBIish: 90b5f294b5 | (Zoffix Znet)++ (committed using GitHub Web editor) | README.pod
00:20 Geth ¦ DBIish: Fix word
00:20 Geth ¦ DBIish:
00:20 Geth ¦ DBIish: `data` is already a plural; singular being `datum`
00:20 Geth ¦ DBIish: review: https://github.com/perl6/DBIish/commit/90b5f294b5
00:29 mcmillhj joined #perl6
00:38 lookatme joined #perl6
00:38 lookatme morning .o/
00:41 lizmat joined #perl6
00:45 itaipu joined #perl6
00:45 Geth ¦ doc: 87c5c64231 | (Will "Coke" Coleda)++ | 2 files
00:46 Geth ¦ doc: test examples on doc/Language/5to6-perlvar.pod6
00:46 Geth ¦ doc: review: https://github.com/perl6/doc/commit/87c5c64231
00:54 Geth ¦ doc: 53d9ad5b02 | (Will "Coke" Coleda)++ | 2 files
00:54 Geth ¦ doc: pass xt/aspell.t
00:54 Geth ¦ doc: review: https://github.com/perl6/doc/commit/53d9ad5b02
00:58 pecastro joined #perl6
01:09 Actualeyes joined #perl6
01:13 hartenfels joined #perl6
01:16 Cabanossi joined #perl6
01:22 aborazmeh joined #perl6
01:22 aborazmeh joined #perl6
01:24 mcmillhj 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!
02:00 mcmillhj joined #perl6
02:16 Cabanossi joined #perl6
02:17 mcmillhj joined #perl6
02:33 pecastro joined #perl6
02:42 noganex_ joined #perl6
02:55 BenGoldberg ZofBot, It's actually easy to take Data (singular) and make it (him?) plural.  Just grab the Star Trek android, and clone him.  Now you have Datas.
03:13 itaipu joined #perl6
03:16 raschipi joined #perl6
03:16 raschipi BenGoldberg: Just FYI, data is plural, datum is the singular.
03:16 Cabanossi joined #perl6
03:17 raschipi As Zoffix said above, saw the commit now.
03:17 lucs Meh, data is English, datum is Latin.
03:18 raschipi It's a word in English that came from Latin. It keeps it's singular and plural declinations.
03:19 Actualeyes left #perl6
03:19 raschipi Like 'campus', plural is 'campi'.
03:20 TEttinger dataz
03:37 BenGoldberg But, if Data is a *name*, and you've got more than one of that person, then what?
03:38 lucs BenGoldberg: What TEttinger said :)
03:40 * BenGoldberg is surpised that nobody pointed out that Data, being an android, is not clonable.
03:42 raschipi Just use dd to clone an android. rsync works too.
03:59 Cabanossi joined #perl6
04:06 BenGoldberg Heh :)
04:21 geekosaur has everyone forgotten the replacement TNG doctor (3rd season iirc) arguing with Data over his name?
04:24 geekosaur My take is that, while the English word "data" did in fact have the Latinate usage through early 20th century, it became a collective noun after that.
04:30 geekosaur (Quite a few words related to computing changed meaning and/or usage in that period. Including "computing" itself, for that matter.)
04:32 * geekosaur is also considering pointing at "Shatterday" re "then what?"
04:38 xtreak joined #perl6
04:41 pecastro joined #perl6
04:43 mcmillhj joined #perl6
04:46 curan joined #perl6
04:50 fatguy joined #perl6
04:51 Actualeyes joined #perl6
05:01 astj joined #perl6
05:02 mcmillhj joined #perl6
05:06 lookatme joined #perl6
05:07 mcmillhj joined #perl6
05:11 kurahaupo joined #perl6
05:21 kyan joined #perl6
05:22 mcmillhj joined #perl6
05:26 astj joined #perl6
05:44 wamba joined #perl6
05:45 Cabanossi joined #perl6
05:46 simonm joined #perl6
06:07 lookatme joined #perl6
06:07 domidumont joined #perl6
06:13 domidumont joined #perl6
06:38 xtreak joined #perl6
06:41 lowbro joined #perl6
06:41 lowbro joined #perl6
06:43 xtreak joined #perl6
06:54 rindolf joined #perl6
06:55 awwaiid joined #perl6
07:03 lookatme joined #perl6
07:04 Actualeyes joined #perl6
07:12 lizmat joined #perl6
07:25 espadrine_ joined #perl6
07:26 vetmaster joined #perl6
07:27 fatguy can i store db handle in class attribute ? is it best practice ?
07:28 masak fatguy: re "can" -- sure
07:28 masak fatguy: re "best practice" -- that's less about db handles and more about class attributes, if you ask me
07:28 masak a class attribute is basically a global variable
07:28 masak and so all lessons about testability and dependency injection apply
07:31 fatguy masak: i'm in doubt on how to manage my dbh, do you have any general tips ?
07:33 vetmaster how to set a rule/token in grammar, that can get another token and match something in it?
07:33 fatguy masak: currently i private my dbconfig and connection method and only allow statement to be passed from other class
07:34 masak fatguy: not sure I have any general tips. "keep database handling fairly separate from other stuff", maybe?
07:35 masak m: grammar G { token TOP { <foo> }; token foo { "foo" } }; say ?G.parse("foo")
07:35 camelia rakudo-moar f974dc: OUTPUT: «True␤»
07:35 masak vetmaster: ^ like that?
07:36 vetmaster no, meant something like this: grammar A { rule TOP { <a> } token a { <-[/]>+ } };
07:36 vetmaster and token b
07:37 vetmaster like token b ( -> a ) { $a ~~ /\w/ }
07:37 vetmaster it's pseudocode, i know
07:37 masak ...I'm sorry, I don't understand
07:37 masak are you talking about passing a rule/token to another as a parameter?
07:38 * masak .oO( Higher Order Tokens )
07:38 vetmaster i. e. I have a substring matched by <-[/]>+
07:38 moritz HOT, sounds like a great companion to HOP :-)
07:38 wamba joined #perl6
07:38 vetmaster and I want to match another substring from the above substring :-)
07:38 zengargoyle_ HOP probably could use a p6 version.   that might rock.
07:39 moritz zengargoyle_: write it! :-)
07:39 masak vetmaster: I still don't understand, but I can start somewhere that I do understand, and hopefully that'll help
07:39 masak vetmaster: you can pass strings to regexes
07:39 moritz vetmaster: I don't understand what you mean by "match another substring from the above substring"
07:39 moritz vetmaster: regexes can match strings
07:40 masak m: my $str = "fo+"; say "this is foolish" ~~ /<$str>/
07:40 camelia rakudo-moar f974dc: OUTPUT: «「foo」␤»
07:40 moritz vetmaster: maybe it's it's easier if you start by describing what problem you want to solve
07:40 masak vetmaster: does this mechanism help with what you want to do?
07:40 vetmaster example string: "abc /def, aff/ test"
07:41 vetmaster '/<-[/]>+' will match '/def, aff'
07:41 zengargoyle_ i would think of it as what bits of your <-[/]>+ do you want.?
07:41 vetmaster \w+
07:41 zengargoyle_ and rewrite it as a combination of the bits you want vs the whole <-[/]>+ bit.
07:42 vetmaster I want to match all \w+ in '/def, aff'
07:42 moritz and what do you want to do with the stuff in there that's not \w+ ?
07:42 rindolf joined #perl6
07:42 darutoko joined #perl6
07:43 vetmaster it can be ignored
07:43 vetmaster so, it's not important
07:43 moritz in general, something like [ /<-[/]>+ ] & [(\w+) .*?]
07:43 domidumont joined #perl6
07:44 moritz wait, '/' [ <-[/]>+ ] & [(\w+) .*?]
07:44 vetmaster will that match both 'def' and 'aff'?
07:44 moritz that extracts the first word from the match
07:44 moritz no, just def
07:44 vetmaster but how to match all \w+?
07:45 vetmaster what if '/' [ <-[/]>+ ] & [(\w+) .*?] +
07:45 moritz [ [\w+]* % [<-alnum-[/]>+] ]
07:45 moritz that's a different approach
07:45 moritz words separated by characters that are neither words nor /
07:46 moritz [ (\w+)* % [<-[/]>+?] ] # with non-greedy regexes and captures
07:47 moritz m: say '/abc def' ~~ / '/' [ (\w+)* % [<-[/]>+?] ] /
07:47 camelia rakudo-moar f974dc: OUTPUT: «「/abc def」␤ 0 => 「abc」␤ 0 => 「def」␤»
07:47 moritz you can see that it caputres abc and def separately
07:51 zengargoyle_ m: my $toss = /<[/]>/; 'abc /def, aff/ test' ~~ /(<-[/]>+)* % <$toss>/
07:51 camelia rakudo-moar f974dc: ( no output )
07:51 zengargoyle_ m: my $toss = /<[/]>/; say 'abc /def, aff/ test' ~~ /(<-[/]>+)* % <$toss>/
07:51 camelia rakudo-moar f974dc: OUTPUT: «「abc /def, aff/ test」␤ 0 => 「abc 」␤ 0 => 「def, aff」␤ 0 => 「 test」␤»
07:51 * zengargoyle_ probably missing something while on wild goose chase. :)
07:55 g4 joined #perl6
07:58 pecastro joined #perl6
08:10 vetmaster why it doesn't work? http://ideone.com/azSvMK
08:14 dakkar joined #perl6
08:15 zengargoyle_ i only know about '<' and '>' being used with other rules.  what do you expect?
08:16 * zengargoyle_ thinks it just looks wrong but not sure ...
08:18 vetmaster_ joined #perl6
08:18 zengargoyle_ ^ [ \w+ || \s ] + $
08:19 lookatme joined #perl6
08:26 zengargoyle_ m: grammar A { rule TOP { ^ <word>* %% <space> $ }; token word { \w+ }; token space
08:26 camelia rakudo-moar f974dc: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Malformed regex␤at <tmp>:1␤------> 3ce> $ }; token word { \w+ }; token space7⏏5<EOL>␤»
08:26 zengargoyle_ { \s }; }; my $str = 'the quick brown fox jumps over the lazy dog'; say A.parse
08:27 zengargoyle_ m: grammar A { rule TOP { ^ <word>* %% <space> $ }; token word { \w+ }; token space { \s }; }; my $str = 'the quick brown fox jumps over the lazy dog'; say A.parse($str).gist;
08:27 camelia rakudo-moar f974dc: OUTPUT: «「the quick brown fox jumps over the lazy dog」␤ word => 「the」␤ space => 「 」␤ word => 「quick」␤ space => 「 」␤ word => 「brown」␤ space => 「 」␤ word => 「fox」␤ space => 「 」␤ word => 「jumps」␤ space => …»
08:29 goon_ joined #perl6
08:29 robertle joined #perl6
08:30 aborazmeh joined #perl6
08:30 aborazmeh joined #perl6
08:35 pmurias joined #perl6
08:35 pmurias is &foo := &bar supposed to work?
08:35 lookatme rule TOP {
08:35 lookatme ^ <string> $ <?{ say $/; }>
08:35 lookatme }
08:35 lookatme token string {
08:35 lookatme [ \w || \s ]+
08:35 lookatme }
08:35 lookatme }
08:35 lookatme my $str = "the quick brown fox jumps over the lazy dog";
08:35 lookatme say A.parse($str);
08:36 evalable6 lookatme, Full output: https://gist.github.com/434338ad132e408319d493b794acfeb9
08:36 evalable6 lookatme, rakudo-moar f974dcc63: OUTPUT: «(exit code 1) ===SORRY!=== Error while compiling /tmp/z7AeMHJef3␤Variabl…»
08:36 masak lookatme: please don't paste big chunks of code into the channel. use gist or some other pastebin service, and link to it ;)
08:37 lookatme pmurias, why not ~~
08:37 lookatme masak, oh, sorry
08:37 masak pmurias: yes, I think `&foo := &bar` is supposed to work
08:37 masak m: sub bar { say "OH HAI" }; my &foo := &bar; foo()
08:37 camelia rakudo-moar f974dc: OUTPUT: «OH HAI␤»
08:37 masak pmurias: ...and it does, in Rakudo
08:38 pmurias m: my sub bar {say "OH HAI" };my sub foo {"will be rebound"}; &foo := &bar; foo()
08:38 camelia rakudo-moar f974dc: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Cannot use bind operator with this left-hand side␤at <tmp>:1␤------> 3ub foo {"will be rebound"}; &foo := &bar7⏏5; foo()␤»
08:39 lookatme ...
08:39 masak pmurias: hm. not sure I'd expect that one to work.
08:39 lookatme In your situation &foo not a container, I think
08:39 vetmaster_ m: say '/substring ' ~~ /<-[/]>+/;
08:39 camelia rakudo-moar f974dc: OUTPUT: «「substring 」␤»
08:40 masak pmurias: mostly because we make certain static assumptions/guarantees about subs.
08:40 vetmaster_ m: say '/substring ' ~~ /<-[/]>+ <after \s>/;
08:40 camelia rakudo-moar f974dc: OUTPUT: «「substring 」␤ after => 「 gnirtsbus/」␤»
08:40 lookatme It's a item in symbol table, I guess
08:41 vetmaster_ m: say '/substring ' ~~ /<-[/]>+ (?=\s)/;
08:41 camelia rakudo-moar f974dc: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Quantifier quantifies nothing␤at <tmp>:1␤------> 3say '/substring ' ~~ /<-[/]>+ (?7⏏5=\s)/;␤»
08:41 vetmaster_ what is equvalient to (?=\s) ?
08:42 lookatme It's like function in C, you can not modify a function name in run time.
08:42 masak vetmaster_: <?before \s>
08:42 lookatme Or point to other function.
08:43 nadim joined #perl6
08:45 mcmillhj joined #perl6
08:49 vetmaster_ m: say '~/~/~/~/ substring ' ~~ /<-[\/~]>+/;
08:49 camelia rakudo-moar f974dc: OUTPUT: «「 substring 」␤»
08:50 vetmaster_ m: say '~/~/~/~/substring ' ~~ /<-[\/~]>+ <?before \s>/;
08:50 camelia rakudo-moar f974dc: OUTPUT: «「substring」␤»
08:57 holyghost joined #perl6
09:13 Actualeyes left #perl6
09:16 lookatme joined #perl6
09:18 samcv how do i find the source file of a link using perl 6?
09:18 samcv i know how to create links. but how do i find out where a link links to
09:21 lookatme A link?
09:21 lookatme symbol link under linux ?
09:22 lookatme or something else ?
09:22 nowan joined #perl6
09:31 zengargoyle_ samcv: it looks like it's not brought up to perl 6 level, but there's nqp::readlink.
09:32 mr-foobar joined #perl6
09:34 zengargoyle_ it may be method 'resolve' in IO::Path, but i can't figure how to make it go from "alink" -> "notalink" when `ln -s notalink alink`
09:37 zengargoyle_ samcv: IO::Path.new('alink').resolve --> "/opt/rakudobrew/git_reference/notalink".IO
09:38 zengargoyle_ where `ln -s notalink alink`
09:39 * zengargoyle_ yay, ack + guesswork wins!
09:39 AlexDaniel joined #perl6
09:41 sivoais joined #perl6
09:41 lookatme m: say ".".IO ~~ :l;
09:41 camelia rakudo-moar f974dc: OUTPUT: «False␤»
09:46 zengargoyle_ lookatme: i think '.' is a hardlink....
09:47 zengargoyle_ 'alink'.IO ~~ :l --> True for me
09:48 zengargoyle_ haven't played with hardlinks enough to know if they're porable or even exposed by the libuv that does all the file stuff.
09:50 lookatme zengargoyle_, no, it's symlink
09:51 vetmaster joined #perl6
09:51 vetmaster m: say 'string' ~~ /[g-x]/;
09:51 camelia rakudo-moar f974dc: OUTPUT: «5===SORRY!5===␤Unrecognized regex metacharacter - (must be quoted to match literally)␤at <tmp>:1␤------> 3say 'string' ~~ /[g7⏏5-x]/;␤Unable to parse expression in metachar:sym<[ ]>; couldn't find final ']' ␤at <tmp>:1␤------> 3say…»
09:51 vetmaster m: say 'string' ~~ /[g..x]/;
09:51 camelia rakudo-moar f974dc: OUTPUT: «Nil␤»
09:51 lookatme Create with .link or .symlink, check with :l for symlink,
09:52 vetmaster how to match all symbols from "g" to "x" in 'string'?
09:52 vetmaster [g-x] in PCRE
09:52 lookatme m: say 'string' ~~ /[a..z]/;
09:52 camelia rakudo-moar f974dc: OUTPUT: «Nil␤»
09:52 lookatme m: say 'string' ~~ /[a .. z]/;
09:52 camelia rakudo-moar f974dc: OUTPUT: «Nil␤»
09:52 zengargoyle_ lookatme: i've never really looked but `ls` shows soft-links differently so i assumed . was a hard link.
09:53 lookatme zengargoyle_, oh I misunderstand you, but directory not support hardlink
09:54 zengargoyle_ i sorta guess it's neither and special-cased in filesystem management stuff.
09:54 zengargoyle_ ah, that's more like my thinking.
09:55 vetmaster > how to match all symbols from "g" to "x" in 'string'
09:55 vetmaster is it impossible in Perl6 regex?
09:55 zengargoyle_ m: 'the quick brown fox jumped over the lazy dog' ~~ /<[g..x]>/
09:55 camelia rakudo-moar f974dc: ( no output )
09:56 lookatme m: say 'string' ~~ /<[a..z]>/;
09:56 camelia rakudo-moar f974dc: OUTPUT: «「s」␤»
09:56 lookatme m: say 'string' ~~ /[a s .. z]/;
09:56 camelia rakudo-moar f974dc: OUTPUT: «Potential difficulties:␤    Space is not significant here; please use quotes or :s (:sigspace) modifier (or, to suppress this warning, omit the space, or otherwise change the spacing)␤    at <tmp>:1␤    ------> 3say 'string' ~~ /[a7⏏5 s .. z]/…»
09:56 lookatme m: say 'as..z' ~~ /[as..z]/;
09:56 camelia rakudo-moar f974dc: OUTPUT: «「as..z」␤»
09:57 zengargoyle_ m: 'the quick brown fox jumped over the lazy dog'.comb: /<[g..x]>/
09:57 camelia rakudo-moar f974dc: ( no output )
09:57 * zengargoyle_ huh..
09:57 lookatme vetmaster, it's <[]>, not [], <[]> is character set, [] is non-capture group
09:58 zengargoyle_ m: say 'the quick brown fox jumped over the lazy dog'.comb: /<[g..x]>/
09:58 camelia rakudo-moar f974dc: OUTPUT: «(t h q u i k r o w n o x j u m p o v r t h l o g)␤»
09:59 lookatme bye, off work :)
09:59 zengargoyle_ m: say 'the quick brown fox jumped over the lazy dog' ~~ m:g/<[g..x]>/
09:59 camelia rakudo-moar f974dc: OUTPUT: «(「t」 「h」 「q」 「u」 「i」 「k」 「r」 「o」 「w」 「n」 「o」 「x」 「j」 「u」 「m」 「p」 「o」 「v」 「r」 「t」 「h」 「l」 「o」 「g」)␤»
10:00 * zengargoyle_ the 'say' gets me every time. :/
10:03 vetmaster is there any special characters to match only upper-case \w ?
10:03 vetmaster * are
10:03 zengargoyle_ i think \w covers things that may not have 'upper' at all.
10:04 salv0 joined #perl6
10:04 zengargoyle_ because \w is 'word' and some characters in other languages don't have upper/lower.
10:05 zengargoyle_ you might have to go to the unicode thingies and craft your own \w like thing if you want specifics.
10:06 vetmaster m: say 'abbr. sec.' ~~ /[ \w+\. || <[A..Z> ] + % [" "+]/
10:06 camelia rakudo-moar f974dc: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in metachar:sym<assert>; couldn't find final '>' ␤at <tmp>:1␤------> 3 'abbr. sec.' ~~ /[ \w+\. || <[A..Z> ] +7⏏5 % [" "+]/␤»
10:06 vetmaster m: say 'abbr. sec.' ~~ /[ \w+\. ] + % [" "+]/
10:06 camelia rakudo-moar f974dc: OUTPUT: «「abbr. sec.」␤»
10:07 vetmaster m: say 'C' ~~ /<[A..Z]>/
10:07 camelia rakudo-moar f974dc: OUTPUT: «「C」␤»
10:07 vetmaster m: say 'c' ~~ /<[A..Z]>/
10:07 camelia rakudo-moar f974dc: OUTPUT: «Nil␤»
10:07 vetmaster m: say 'UPPER' ~~ /<[A..Z]>/
10:07 camelia rakudo-moar f974dc: OUTPUT: «「U」␤»
10:07 vetmaster m: say 'lower' ~~ /<[A..Z]>/
10:07 camelia rakudo-moar f974dc: OUTPUT: «Nil␤»
10:07 vetmaster m: say 'КАПС' ~~ /<[А..Я]>/
10:07 camelia rakudo-moar f974dc: OUTPUT: «「К」␤»
10:08 vetmaster m: say 'некапс' ~~ /<[А..Я]>/
10:08 camelia rakudo-moar f974dc: OUTPUT: «Nil␤»
10:08 vetmaster ok, it works
10:09 zengargoyle_ not going to support ぜん :P
10:09 vetmaster m: say 'abbr. sec.' ~~ /[ [ \w+\. ] + % [" "+] || <[A..Z]>/
10:09 camelia rakudo-moar f974dc: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in metachar:sym<[ ]>; couldn't find final ']' ␤at <tmp>:1␤------> 3' ~~ /[ [ \w+\. ] + % [" "+] || <[A..Z]>7⏏5/␤    expecting any of:␤        infix stopper␤»
10:09 vetmaster m: say 'abbr. sec.' ~~ /[ [ \w+\. ] + % [" "+] || <[A..Z]> ]/
10:09 camelia rakudo-moar f974dc: OUTPUT: «「abbr. sec.」␤»
10:09 vetmaster m: say 'C' ~~ /[ [ \w+\. ] + % [" "+] || <[A..Z]> ]/
10:09 camelia rakudo-moar f974dc: OUTPUT: «「C」␤»
10:13 zengargoyle_ vetmaster: there probably are unicode properties that match what you want, you could build a 'is-alphanumeric and is-not-lower' sort of character class, but it is too hard to come up with off the top of my head. :)
10:15 Cabanossi joined #perl6
10:22 TEttinger Ll is lower-case letters, but you don't want title case letters either
10:23 TEttinger (since they kinda contain lower case letters)
10:24 TEttinger Lu is upper case letters
10:27 TEttinger m: say "Mario Mario & Luigi Mario in Super Mario Brother 3" ~~ /[ <:Lu+Nd> ]/
10:27 camelia rakudo-moar f974dc: OUTPUT: «「M」␤»
10:28 TEttinger not sure how to get all matches
10:28 cognominal joined #perl6
10:28 TEttinger m: say "Mario Mario & Luigi Mario in Super Mario Brother 3".comb /[ <:Lu+Nd> ]/
10:28 camelia rakudo-moar f974dc: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Missing required term after infix␤at <tmp>:1␤------> 3per Mario Brother 3".comb /[ <:Lu+Nd> ]/7⏏5<EOL>␤    expecting any of:␤        prefix␤        term␤»
10:28 TEttinger m: say("Mario Mario & Luigi Mario in Super Mario Brother 3".comb /[ <:Lu+Nd> ]/)
10:28 camelia rakudo-moar f974dc: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Missing required term after infix␤at <tmp>:1␤------> 3per Mario Brother 3".comb /[ <:Lu+Nd> ]/7⏏5)␤    expecting any of:␤        prefix␤        term␤»
10:28 TEttinger hmmmmm
10:29 TEttinger m: say("Mario Mario & Luigi Mario in Super Mario Brother 3".comb: /[ <:Lu+Nd> ]/)
10:29 camelia rakudo-moar f974dc: OUTPUT: «No such method 'Nd' for invocant of type 'Match'␤  in block <unit> at <tmp> line 1␤␤»
10:29 TEttinger m: say("Mario Mario & Luigi Mario in Super Mario Brother 3".comb: /[ <:Lu+:Nd> ]/)
10:29 camelia rakudo-moar f974dc: OUTPUT: «(M M L M S M B 3)␤»
10:30 TEttinger there we go.
10:34 zengargoyle_ m: say 'ぜん三'.comb: /[ <:Lu+:Nd> ]/
10:34 camelia rakudo-moar f974dc: OUTPUT: «()␤»
10:39 jameslenz joined #perl6
10:41 astj joined #perl6
10:44 zengargoyle_ m: say 'Mario Mario & Luigi Mario in Super Mario Brother 3 ぜん三'.comb: /[ <-:Ll+:Nd> ]/
10:44 camelia rakudo-moar f974dc: OUTPUT: «(M   M   &   L   M     S   M   B   3   ぜ ん 三)␤»
10:45 Cabanossi joined #perl6
10:45 * zengargoyle_ not going to try for all of the ands and ors to get everything to work. :P
11:09 itaylor57 joined #perl6
11:16 nadim joined #perl6
11:27 xtreak joined #perl6
11:28 cdg joined #perl6
11:30 Cabanossi joined #perl6
11:30 domidumont joined #perl6
11:31 bioduds joined #perl6
11:31 bioduds Hello, everyone
11:31 bioduds Can someone please understand why this does not work?
11:32 vetmaster what?
11:32 bioduds grammar DIG {   token TITLE { ( .* ) }   token URL { ( .* ) }   rule TOP { '; <<>> ' <TITLE> ' <<>> ' <URL> } }  class DIG::Actions {   method TOP ($/) {     say "TITLE: " ~ $/<TITLE>;     say "URL: " ~ $/<URL>;   } }
11:32 bioduds DIG.new.parse(   '; <<>> DiG 9.10.3-P4-Ubuntu <<>> seed.bitcoin.sipa.be',   :actions( DIG::Actions.new ) ).made;
11:32 moritz bioduds: please use a nopaste service
11:33 bioduds I can get the url but not the title
11:33 moritz bioduds: don't use .*
11:34 bioduds what should I use, moritz?
11:34 moritz bioduds: what does the data format say?
11:35 bioduds DiG 9.10.3-P4-Ubuntu
11:35 moritz then token TITLE { 'DiG 9.10.3-P4-Ubuntu' }
11:36 vetmaster m: grammar A { rule TOP { [ \w+ || \d+ ] }; token a { \w+ }; token a.b { \d+ }; };
11:36 camelia rakudo-moar b838c7: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Malformed regex␤at <tmp>:1␤------> 3\w+ || \d+ ] }; token a { \w+ }; token a7⏏5.b { \d+ }; };␤»
11:36 apfel joined #perl6
11:39 vetmaster m: say 'abcd2' ~~ /\w+<?before \d>/
11:39 camelia rakudo-moar b838c7: OUTPUT: «「abcd」␤»
11:39 vetmaster m: say 'abcde' ~~ /\w+<?before \d>/
11:39 camelia rakudo-moar b838c7: OUTPUT: «Nil␤»
11:41 apfel hi there, im playing with perl6 for the first time and im confused, i guess i missed something, https://pastebin.com/XxiuCWzF this failes to receive messages from the server, it just prints IO::Socket::Async.new ...
11:41 vetmaster m: say 'Яблоко' ~~ /<[А..ЯЁа..я]>/;
11:41 camelia rakudo-moar b838c7: OUTPUT: «「Я」␤»
11:42 vetmaster m: say 'zблоко' ~~ /<[А..ЯЁа..я]>/;
11:42 camelia rakudo-moar b838c7: OUTPUT: «「б」␤»
11:46 lizmat apfel: that looks like *very* perl 5 centric code
11:46 lizmat did you have a look at https://docs.perl6.org/type/IO::Socket::Async ?
11:48 bioduds let me try
11:50 apfel i have some perl5 experience, and yes, i took a look at IO::Socket::Async
11:51 bioduds nope, none of these work
11:51 bioduds I'm confused. RegExes always drive me nuts
11:52 cdg joined #perl6
11:52 bioduds it's a simple string, I just wanna catch that
11:52 bioduds DiG 9.10.3-P4-Ubuntu
11:52 bioduds I already delimited it
11:52 bioduds I don't understand why it does not fetch it
11:54 vetmaster m: say 'word' ~~ /\w+ % [\s+]/
11:54 camelia rakudo-moar b838c7: OUTPUT: «「w」␤»
11:54 vetmaster m: say 'word' ~~ /[\w+] % [\s+]/
11:54 camelia rakudo-moar b838c7: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Missing quantifier on the left argument of %␤at <tmp>:1␤------> 3say 'word' ~~ /[\w+] %7⏏5 [\s+]/␤»
11:54 vetmaster m: say 'word' ~~ /<\w+> % [\s+]/
11:54 camelia rakudo-moar b838c7: OUTPUT: «5===SORRY!5===␤Unrecognized regex metacharacter < (must be quoted to match literally)␤at <tmp>:1␤------> 3say 'word' ~~ /<7⏏5\w+> % [\s+]/␤Unrecognized regex metacharacter \ (must be quoted to match literally)␤at <tmp>:1␤------> 3s…»
11:56 nine apfel: what rakudo version are you using?
11:57 araraloren joined #perl6
11:57 bioduds me?
11:57 araraloren evening o/
11:57 bioduds bioduds@BITWORKERS ~/bitworkers/EscrowChain/dev $ perl6 -version This is Rakudo version 2017.04.3 built on MoarVM version 2017.04-53-g66c6dda implementing Perl 6.c.
11:59 apfel nine: i used rakudobrew to install it, perl6 -V -> https://pastebin.com/HMrYv1kp
12:00 araraloren ^_^
12:00 nine apfel: perl6::version=2015.11 that's the beta?!
12:01 apfel nine: oh, ok, then i try to get a newer one and check again, thank you
12:01 araraloren Em, the last version is 2017.04 or 05
12:01 nine apfel: on the current version it sorta works. But it will only print once I press ^D, i.e. once STDIN gets closed. So I'm not sure the asynchronous stuff works well with STDIN.
12:02 apfel nine: wired, with the version i have STDIN works fine, but the receiving part is not working
12:02 apfel i will try a newer version
12:05 kyan joined #perl6
12:06 vetmaster how to parse 'expr- ession' as 'expression' inside a grammar
12:06 vetmaster ?
12:08 raschipi joined #perl6
12:08 araraloren A word contain hyphen ?
12:09 vetmaster yes
12:12 araraloren m: say 'expr-ession' ~~ /<[\w\-]>+/; # ?
12:12 camelia rakudo-moar b838c7: OUTPUT: «「expr-ession」␤»
12:14 vetmaster joined #perl6
12:14 cyphase joined #perl6
12:15 Cabanossi joined #perl6
12:16 vetmaster but it matches 'expr-ession'
12:16 cdg_ joined #perl6
12:16 bioduds nope
12:17 araraloren m: say 'expr- ession' ~~ /<[\w\ \-]>+/;
12:17 camelia rakudo-moar b838c7: OUTPUT: «「expr- ession」␤»
12:17 araraloren m: say 'expr- ession' ~~ /<[\w\s\-]>+/;
12:17 camelia rakudo-moar b838c7: OUTPUT: «「expr- ession」␤»
12:18 araraloren I dont' know what you want to do. So I just write regex match that string you offered
12:20 bioduds do I need to put it inside parenthesis in order to capture it?
12:21 raschipi Parenthesis make capture groups, yes.
12:21 raschipi And [ ] is non-capturing groups
12:22 bioduds ok
12:22 bioduds it does capture the string
12:22 bioduds I mean if I put it literally
12:22 vetmaster m: say 'aql' ~~ /<[abcd]>+/;
12:22 camelia rakudo-moar b838c7: OUTPUT: «「a」␤»
12:22 bioduds why can't I use .* ?
12:22 bioduds shouldn't it simply catch all inside there?
12:23 moritz .* catches the outside too
12:24 Geth ¦ doc: 23790123c7 | (Jan-Olof Hendig)++ | doc/Type/Pair.pod6
12:24 Geth ¦ doc: Fixed a few example outputs
12:24 Geth ¦ doc: review: https://github.com/perl6/doc/commit/23790123c7
12:24 domidumont1 joined #perl6
12:26 vetmaster say ' - test' ~~ /\s*-\s*.*/
12:26 evalable6 vetmaster, Full output: https://gist.github.com/2da3dbfac2612dc13d34aceaa4e20b9d
12:26 evalable6 vetmaster, rakudo-moar b838c7305: OUTPUT: «(exit code 1) ===SORRY!===␤Unrecognized regex metacharacter - (must be q…»
12:26 vetmaster m: say ' - test' ~~ /\s*-\s*.*/
12:26 camelia rakudo-moar b838c7: OUTPUT: «5===SORRY!5===␤Unrecognized regex metacharacter - (must be quoted to match literally)␤at <tmp>:1␤------> 3say ' - test' ~~ /\s*7⏏5-\s*.*/␤Unable to parse regex; couldn't find final '/'␤at <tmp>:1␤------> 3say ' - test' ~~ /\s*-7…»
12:27 vetmaster m: say ' - test' ~~ /\s*\-\s*.*/
12:27 camelia rakudo-moar b838c7: OUTPUT: «「 - test」␤»
12:27 vetmaster "-" should be escaped when matching literally!
12:29 bioduds say 'no quotes' ~~ /  <-[ " ]> + /;  # matches characters except "
12:29 evalable6 bioduds, rakudo-moar b838c7305: OUTPUT: «「no quotes」»
12:29 Juerd Escaped or quoted. I find it easier to read when quoted: /\s* '-' \s* .*/
12:29 pecastro joined #perl6
12:29 bioduds I used this and it doesn't work
12:29 Juerd bioduds: Can you be more specific? "Doesn't work" doesn't work :)
12:30 jnthn The rule in Perl 6 regexes is fairly simple: everything except alphanumeric chars should be escaped or quoted
12:30 nadim hi, can one define multies depending on the calling context ?
12:30 bioduds yes
12:31 kerosene joined #perl6
12:31 bioduds I'm trying this: rule TOP { '; <<>> ' <-[ " ]> + ' <<>> ' <URL> }
12:31 bioduds which according to documentation, <-[ " ]> + should match anything except "
12:31 bioduds but it does not
12:31 bioduds prints nothing
12:32 bioduds when I do say "URL: " ~ $/<URL>;
12:32 bioduds Is that more clear now
12:32 vetmaster another question: is it possible to import token only if all symbols of it are non-numbers (<-[\d]>) ?
12:32 bioduds I'm sorry if I'm not passing the message through
12:33 vetmaster don't worry, both our questions will be answered :-)
12:34 Juerd bioduds: Try printing $/ first, to see if the regex matched at all
12:35 perlpilot vetmaster: btw, \D is an easier way to say "not digit"
12:35 Juerd bioduds: Can you give an example of the string you're matching against?
12:35 zengargoyle_ bioduds: can you post the thing you're trying to parse somewhere?  i'm not sure why you would match not quote when the next match starts with a space.....
12:36 bioduds no and yes
12:36 zengargoyle_ becase no quote includes spaces and the <<>> thing as well.
12:36 Juerd I'm staring at that "; <<>> " and wonder what kind of program generates output like that, and why.
12:36 bioduds here is the string to match: ; <<>> DiG 9.10.3-P4-Ubuntu <<>> seed.bitcoin.sipa.be
12:36 Juerd Ah, dig!
12:36 bioduds the DiG 9.10.3-P4-Ubuntu is a variable
12:36 perlpilot bioduds: have you tried Grammar::Debugger?
12:37 bioduds I want to load both DiG 9.10.3-P4-Ubuntu and the url
12:37 raschipi Grammar::Debugger is borked
12:37 zengargoyle_ it look like you would be matching '; <<>> somethinghere <<>> URLHERE
12:37 bioduds on different variables
12:37 itaipu joined #perl6
12:37 Juerd bioduds: Since that does match your regex up until <URL>, I think your definition of URL might be broken.
12:37 bioduds precisely zengargoyle
12:37 bioduds that is exactly what I want, for start, this is only DIG first line
12:38 bioduds I was able to get the URL
12:38 moritz so what can be inside the somethinghere?
12:38 zengargoyle_ <-[ " ]> does not only match something, it matches everyting else unless URL has a "
12:38 bioduds but the somethinghere you pointed does not load
12:38 perlpilot raschipi: is it?  That's a pity.
12:38 zengargoyle_ i would guess something is \S+
12:38 wamba joined #perl6
12:38 bioduds ok, I understande that zen
12:39 raschipi Zoffix, do you know what's worng with Grammar::Debugger?
12:39 zengargoyle_ since you're looking for the spaces on either side of the something.
12:39 bioduds how would I go around that blind matching approach, I was under the impression that since I delimited it, it would be wise enough to only match inside the delimiter
12:40 eveo joined #perl6
12:40 perlpilot bioduds: are you using token or rule in your grammar?  rule has significant whitespace and since they don't backtrack, if your whitespace gets eaten, you won't match
12:40 bioduds I tried both perlpilot
12:40 eveo How can I get the same version string as in perl6 -v output?  $*PERL.compiler.version.Str gives "2017.05.297.g.608.e.886" but I want "2017.05-297-g608e886"
12:41 bioduds I'm on trial and error now which makes me feel stupid, lol :)
12:41 zakharyas joined #perl6
12:41 perlpilot bioduds: well, perhaps it's just the not-backtracking of token that's causing your problem?  Try regex instead?
12:42 eveo raschipi: nothing's wrong with Grammar::Debugger
12:43 bioduds regex? inside grammar?
12:43 vetmaster why perl6 doesn't like this: <meaning>+ % [;\⏏s*] ?
12:43 bioduds regex TOP { ... } ?
12:43 perlpilot yeah, instead of:  token { ... },   use regex { ... }
12:43 mcmillhj joined #perl6
12:44 vetmaster "?" sign is not a part of the given regex
12:44 perlpilot vetmaster: `;` is non-alphanumeric
12:44 bioduds oh, it worked
12:44 eveo vetmaster: what does the error message say?
12:44 zengargoyle_ m: say '; <<>> DiG 9.10.3-P4-Ubuntu <<>> seed.bitcoin.sipa.be' ~~ rx { '; <<>> ' (\S+) \s (\S+) ' <<>> ' (.*) }
12:44 camelia rakudo-moar b838c7: OUTPUT: «「; <<>> DiG 9.10.3-P4-Ubuntu <<>> seed.bitcoin.sipa.be」␤ 0 => 「DiG」␤ 1 => 「9.10.3-P4-Ubuntu」␤ 2 => 「seed.bitcoin.sipa.be」␤»
12:44 vetmaster eveo: couldn't find final ']'  at /home/sivan/selkup-perl6/SRDS_Main_Parser.p6:49
12:45 bioduds that is regex zengargoyle, right?
12:45 eveo vetmaster: that's a poor error message. Should say this:
12:45 eveo m: /;/
12:45 camelia rakudo-moar b838c7: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Unrecognized regex metacharacter ; (must be quoted to match literally)␤at <tmp>:1␤------> 3/7⏏5;/␤    expecting any of:␤        term␤»
12:45 vetmaster eveo: yeah, I see it in the top of error list
12:45 zengargoyle_ should translate pretty well, not much difference except for whitespace and backtracking between regex, rule, token.
12:46 vetmaster Unrecognized regex metacharacter ; (must be quoted to match literally) at .../SRDS_Main_Parser.p6:49
12:46 zengargoyle_ just harder to test on one line. :)
12:46 vetmaster so, ";" must be quoted
12:46 eveo Yeah, or you can escape it with a backslash
12:47 zengargoyle_ non-alphanumeric needs quotes... or escape.
12:47 zengargoyle_ i'd probably put '<<>>' in a token and re-use it
12:47 zengargoyle_ and maybe 'DiG'
12:48 perlpilot That's a little weird that the unquoted ; would cause the other error.  I guess it treats the ; as a sequence point and things go wonky.
12:48 bioduds I worked but I can't isolate it
12:48 zengargoyle_ rule { ^ ';' <angles> <dig> <title> <dig> <angles> <url> $ }
12:49 zengargoyle_ rule  { ^ ';' <angles> <dig> <title> <angles> <url> $ }
12:49 raschipi zengargoyle_: I think that won't match because nothing matches the whitespace.
12:49 Juerd "$input = %commands{$input} // Entity.load($input) // $input;" bothers me because $input is repeated. Is there a form of assignment that only assigns if the RHS is defined?
12:50 zengargoyle_ gives .wh (whitespace) instead of single space, but you can fix that other ways, or use \s
12:50 zengargoyle_ and title and url are just \S+
12:51 [Coke] eveo: the version method is called on Perl6::Compiler, which inherits from HLL::Compiler in nqp, and is defined here: https://github.com/perl6/nqp/blob/05e5d75c728d7bb11c7b124fd130af4f2584cf81/src/HLL/Compiler.nqp#L545-L558
12:51 perlpilot raschipi: rules have significant whitespace, so the whitespace in the rule should match the whitespace in the string.
12:51 eveo Juerd: you can write that as $_ = %commands{$_} // Entity.load($_) // $_ given $input;
12:51 Juerd eveo: Still repeats something, and I'd like to avoid every use of $_ that I can :)
12:51 bioduds it is confusing when to use rule token regex
12:51 Juerd eveo: By the way, it's not the $input in {} or () that bother me, but the // $input at the end.
12:52 eveo Juerd: $input = $_ with %commands{$input} // Entity.load($input)
12:52 bioduds \S+ won't work
12:52 Juerd eveo: Nice one!
12:53 geekosaur joined #perl6
12:53 perlpilot bioduds: mostly, you start off with `token` and remember that they don't backtrack (that means that greedy regex like .* will keep what they match)
12:53 Juerd eveo: I wrote it as with %commands{$input} // Entity.load($input) -> $object { $input = $object }
12:53 perlpilot bioduds: IMHO of course
12:54 eveo Juerd: can write it as with %commands{$input} // Entity.load($input) -> { $input = $^object }
12:54 [Coke] eveo: (that said, I can't see immediately where $!backend is coming from.)
12:54 Juerd Hm, could even just use "if"...
12:55 eveo [Coke]: I guess I'll just parse $*PERL.compiler.version to something github would accept as a commit reference
12:55 eveo Oh! It's already done somewhere
12:55 zengargoyle_ i think..... token doesn't backtrack.  rule makes whitespace very flexible.  regex is regex. :)
12:55 eveo buggable: eco Sourcery
12:55 buggable eveo, CoreHackers::Sourcery 'Helper for showing actual source code locations of core subs and methods': https://github.com/zoffixznet/perl6-CoreHackers-Sourcery
12:55 eveo there
12:55 xtreak joined #perl6
12:55 zengargoyle_ bioduds: https://gist.github.com/6c3732e6a688a07aa5740a5b06db4039
12:55 bioduds I don't understand this backtrack concept
12:55 vetmaster m: say 'food, fast' ~~ /\w+ % [\s+]/
12:55 camelia rakudo-moar b838c7: OUTPUT: «「f」␤»
12:56 Geth ¦ doc: d973eb02ae | (Jan-Olof Hendig)++ | doc/Type/Parameter.pod6
12:56 Geth ¦ doc: Added a few more examples
12:56 Geth ¦ doc: review: https://github.com/perl6/doc/commit/d973eb02ae
12:56 bioduds could you please try to explain me what is backtrack? :)
12:56 rindolf joined #perl6
12:56 wamba joined #perl6
12:56 bioduds thanks for the link zen, trying it here
12:57 vetmaster m: say 'food, fast' ~~ /[\w+ % [\s+]]/
12:57 camelia rakudo-moar b838c7: OUTPUT: «「f」␤»
12:57 eveo bioduds: token = whitespace is ignored; rule = it inserts <ws> token where you have whitespace between atoms; regex = backtracking; backtracking = "going back and retrying another combination instead of failing a match"
12:57 vetmaster m: say 'food, fast' ~~ /[\w+ % [\s+]]+ % [\,\s*]/
12:57 camelia rakudo-moar b838c7: OUTPUT: «「f」␤»
12:57 zengargoyle_ if it is matched once, it is matched always, if some further match fails, the testing can't go back and undo the token and try something else.
12:57 vetmaster m: say 'food, fast' ~~ /[[\w+] % [\s+]]+ % [\,\s*]/
12:57 camelia rakudo-moar b838c7: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Missing quantifier on the left argument of %␤at <tmp>:1␤------> 3say 'food, fast' ~~ /[[\w+] %7⏏5 [\s+]]+ % [\,\s*]/␤»
12:58 bioduds I have a lot to learn
12:58 bioduds thank you guys
12:58 * zengargoyle_ thinks token turns off backtracking and it's the default so regex does it.
12:59 eveo rules also don't backtrac
12:59 bioduds one question: you do like new RegEx system in Perl6, right? Or are you not satisfied?
12:59 zengargoyle_ you can tell a regex to ignore ws and to not backtrack effectivly making it the same as token.
12:59 eveo bioduds: it felt overly verbose when first switching to it, but now I feel it's much clearer, especially when writing large grammars
12:59 zengargoyle_ it's just what the default behavior is without adding a bunch of flags to pick exactly what you want.
13:00 perlpilot bioduds: totally satisfied  :)
13:00 bioduds ok, thanks. So I will invest time in learning it through ;)
13:00 bioduds Cheers, guys.
13:00 eveo bioduds: In fact, I still pause for a bit when trying to remember if it's (?<=) for lookbehind, but in Perl 6 it's <after>. Like a proper english word
13:00 perlpilot I do feel a little pang of longing for Perl 5 regex sometimes when my character classes get a little verbose and would be expressed more simply in P5
13:01 eveo There's :P5 adverb for taht ;)
13:01 perlpilot indeed.
13:01 eveo left #perl6
13:01 araraloren m: say "ab" ~~ m:P5/a(?=b)/;
13:01 camelia rakudo-moar b838c7: OUTPUT: «「a」␤»
13:04 zengargoyle_ bioduds: the Grammar section in the Think Perl 6 book might help a bit.
13:05 rouking joined #perl6
13:05 rouking Hey guys
13:05 * zengargoyle_ skipped over it but guesses it does a decent job of explaining things.
13:06 raschipi rouking: hello
13:06 * zengargoyle_ can only read a JSON parser so many times
13:06 rouking I'm just getting into Perl 6 from Perl 5, and I'm wondering what the proper way to include multiple files for a module is (some files need to be publicly exposed, some don't, if that makes a difference)
13:08 zengargoyle_ not sure what 'include' means in this context.
13:09 zengargoyle_ nor 'publicly exposed' ...
13:09 rouking Should I just use a `require` for files that don't have any exported subs/vars, or make it a submodule and `use` that? I guess what I really want to know is, how does Perl search for files that are part of any fiven module?
13:09 rouking given*
13:10 zengargoyle_ ah, sorry, i don't know how that works myself. :)
13:10 raschipi rouking: what problems are you facing when you tried?
13:11 rouking I haven't begun writing anything yet. Wanted to know more about it before I dove in
13:11 rouking I've just got a basic file structure down that follows the recommendations on the ecosystem github page
13:12 araraloren rouking, have you read document: https://docs.perl6.org/language/modules#Distributing_Modules
13:12 rouking Yes, read that page
13:12 raschipi And this one: https://docs.perl6.org/language/modules#Exporting_and_Selective_Importing
13:13 Ulti ^ that one is more relevant
13:13 rouking Read that as well
13:13 rouking I think I get the exporting thing, just don't know the proper way to structure something with multiple files
13:13 perlpilot rouking: like Perl 5,  `require` is still runtime and `use` is still compile time.
13:14 perlpilot rouking: largely you do it the same as you would in Perl 5
13:14 rouking right
13:15 araraloren What yuo mean multiple files ? The file your module depend on ?
13:15 Ulti require is also now lexically scoped so if you dont use something at runtime you dont necessarily have to import it
13:15 zengargoyle_ my rough understanding is that everything in a module is private.  except there are things that are exported.
13:15 araraloren s/file/files/
13:16 zengargoyle_ i.e. no sneaky My::SubModule::unexported_method($stuff)
13:16 rouking Yes
13:16 perlpilot zengargoyle_: unless it's declared as and `our` sub  :)
13:16 perlpilot (and it wouldn't be a method then in any case)
13:16 zengargoyle_ but i forget the disctinction between our and 'is export'
13:17 araraloren our is package variable
13:18 rouking So I'm getting the impression that I treat every file as if it were its own independent module/submodule, and then have the public-facing API files `use` them like `Use MyModule::MyModuleComponent`?
13:18 zengargoyle_ i.e. no sneaky My::SubModule::unexported_method($object, $stuff)  ---- presto method :P
13:18 skids joined #perl6
13:19 zengargoyle_ rouking: yeah, i just don't know about the not public part.
13:19 araraloren rouking, just put them in submodule
13:20 rouking I mean, I guess there's no problem with submodules exporting things as long as I make it clear in the documentation which parts the user should access
13:21 rouking does anyone happen to know where zef throws the actual code for installed modules?
13:21 araraloren The document said: In the provides section, include all the namespaces provided by your distribution and that you wish to be installed, only module files that are explicitly included here will be installed and available with use or require in other programs.
13:21 araraloren In META6.json file ,there is a `provides` field
13:21 zengargoyle_ i think i ran into this ages ago when asking about testing functions.... you have to export them to actually be able to test them.... :(
13:21 rouking Ah okay, that makes sense
13:22 cdg joined #perl6
13:22 araraloren rouking, so  other can not access you private module
13:22 araraloren s/other/others/
13:22 zengargoyle_ if not in the provides, i'm not sure it gets installed.
13:23 rouking and I assume my own code will be able to access the module, but why? does it search the whole module's lib directory or something?
13:23 rouking private modules*
13:24 rouking I will try and look at some larger projects in the ecosystem to get an idea
13:24 nine There are no private modules
13:24 nine It's the same as with Perl 5
13:24 zengargoyle_ rouking: where the modules go is sorta a long story.... mine are in /opt/perl6/share/perl6/site but you'll only see a *whole* lot of SHA1 like filenames with some extensions.
13:25 nine That said, there actually are: module Foo { my module Bar { #`( Bar is lexically scoped, and thus only visible in Foo) } }
13:25 rouking Right
13:25 bioduds what is the best approach to use self local written modules?
13:25 pecastro joined #perl6
13:26 bioduds I mean, if I have a center grammars.pm6 for instance
13:26 bioduds where I want to put all my grammars and use around
13:26 Ulti rouking OO is now a much bigger deal for dealing with these sorts of exposed footprint problems too
13:26 zengargoyle_ PERL6LIB
13:27 nine bioduds: please put each grammar into its own file. You'll thank yourself later on :)
13:27 rouking Right, so if I had several internal files that were not listed in the provides section, and I added my module to the ecosystem, those would also be downloaded but not listed publicly?
13:28 rouking that is, available for `use`
13:28 nine rouking: no, there are not internal files
13:28 bioduds ok, but how do I go around reusing them?
13:28 nine rouking: we only install what's listed in "provides". So if you want it installed, you have to list it there. Then it can be loaded by anyone.
13:29 nine bioduds: with "use"? :)
13:29 perlpilot bioduds: "use MyGrammar;"  (I don't understand your question)
13:29 rouking Right okay
13:29 rouking that's fine
13:29 bioduds Do I need to use lib 'PATH' ?
13:29 bioduds cause I'm trying on a pm6 file
13:29 zengargoyle_ bioduds: you can make like ~/perl6/lib/MyGrammar.pm6  and use PERL6LIB env variable to add ~/lib/perl6
13:29 perlpilot bioduds: if it's not in the default search path, yes
13:30 bioduds I wanted to make sure I'm struturing my project cleverly
13:30 bioduds *structuring
13:30 perlpilot oh no!  Don't do things "cleverly", do them in a way that makes the most sense  ;)
13:30 nine bioduds: follow https://docs.perl6.org/language/modules#Distributing_Modules
13:31 zengargoyle_ or zef can install to 'vendor' instead of 'site' if you want to keep your private stuff separate from everybody elses stuff.
13:31 nine bioduds: even if you don't plan on distributing the code, the structure makes sense
13:31 nine zengargoyle_: vendor is meant for distro packages.
13:31 Ulti then at the top of that structure you just need to do `perl6 -I ./lib`
13:32 zengargoyle_ yeah, meant for and used for are two different things. :P
13:32 araraloren nine, But I wonder if a pm6 file in my module don't provides anything for user, just reference by other file in my module ?
13:32 rouking Right. I'm not too concerned about some code being public, just making sure that all my code will be there and linked together
13:32 nine araraloren: how do you know that no user ever will find that module useful?
13:33 nine araraloren: and even if, where's the harm in exposing something noone is interested in?
13:33 bioduds great, thanks mans
13:33 kyclark joined #perl6
13:34 nine zengargoyle_: there's also the ~/.perl6 repo for your private stuff.
13:34 xtreak joined #perl6
13:35 zengargoyle_ is ~/.perl6 installable into via zef?  i thought it was just precomp for random scripts, -I. etc.
13:36 rouking So I'm looking at this file here: https://github.com/tokuhirom/p6-WebSocket/blob/master/lib/WebSocket.pm and I feel like that's not the appropriate place for the pod stuff?
13:36 rouking That should be under doc, right?
13:36 araraloren nine, yeah, you are right, it's no harm :)
13:39 xtreak joined #perl6
13:40 nine zengargoyle_: ~/.perl6 is a full repository. You can install into it with zef --install-to=home
13:40 araraloren rouking, yeah, I think perl5's module author is like write document in main pm file ? I don't know ~~
13:41 araraloren Maybe I should extract my module document to doc/xx.pod6 .
13:42 rouking araraloren: I get the impression that's the right thing to do, yeah
13:43 aborazmeh joined #perl6
13:43 aborazmeh joined #perl6
13:43 zengargoyle_ nine: cool, just figured that out the hard way.
13:44 zengargoyle_ makes me not dislike ~/.perl6 so much.
13:49 vetmaster m: say 'some words 2) another pair 3) yet another group' ~~ <\w || \s> + % [\s*\d\)\*]
13:49 camelia rakudo-moar e538cb: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Missing infix inside []␤at <tmp>:1␤------> 3) yet another group' ~~ <\w || \s> + % [7⏏5\s*\d\)\*]␤    expecting any of:␤        bracketed infix␤        infix␤        infix stopper␤»
13:49 vetmaster m: say 'some words 2) another pair 3) yet another group' ~~ /<\w || \s> + % [\s*\d\)\*]/
13:49 camelia rakudo-moar e538cb: OUTPUT: «5===SORRY!5===␤Unrecognized regex metacharacter < (must be quoted to match literally)␤at <tmp>:1␤------> 3another pair 3) yet another group' ~~ /<7⏏5\w || \s> + % [\s*\d\)\*]/␤Unrecognized regex metacharacter \ (must be quoted to match …»
13:49 vetmaster m: say 'some words 2) another pair 3) yet another group' ~~ /<\w || \s> + % [ [\s*\d\)\s* ] *]/
13:49 camelia rakudo-moar e538cb: OUTPUT: «5===SORRY!5===␤Unrecognized regex metacharacter < (must be quoted to match literally)␤at <tmp>:1␤------> 3another pair 3) yet another group' ~~ /<7⏏5\w || \s> + % [ [\s*\d\)\s* ] *]/␤Unrecognized regex metacharacter \ (must be quoted to…»
13:49 vetmaster m: say 'some words 2) another pair 3) yet another group' ~~ /<\w || \s> + % [ [\s*\d\)\s* ] ]/
13:49 camelia rakudo-moar e538cb: OUTPUT: «5===SORRY!5===␤Unrecognized regex metacharacter < (must be quoted to match literally)␤at <tmp>:1␤------> 3another pair 3) yet another group' ~~ /<7⏏5\w || \s> + % [ [\s*\d\)\s* ] ]/␤Unrecognized regex metacharacter \ (must be quoted to …»
13:50 vetmaster m: say 'some words 2) another pair 3) yet another group' ~~ /<\w || \s> + % [ <\s*\d\)\s* >* ]/
13:50 camelia rakudo-moar e538cb: OUTPUT: «5===SORRY!5===␤Unrecognized regex metacharacter < (must be quoted to match literally)␤at <tmp>:1␤------> 3another pair 3) yet another group' ~~ /<7⏏5\w || \s> + % [ <\s*\d\)\s* >* ]/␤Unrecognized regex metacharacter \ (must be quoted to…»
13:50 vetmaster m: say 'some words 2) another pair 3) yet another group' ~~ /<\w || \s> + % [ (\s*\d\)\s*)* ]/
13:50 camelia rakudo-moar e538cb: OUTPUT: «5===SORRY!5===␤Unrecognized regex metacharacter < (must be quoted to match literally)␤at <tmp>:1␤------> 3another pair 3) yet another group' ~~ /<7⏏5\w || \s> + % [ (\s*\d\)\s*)* ]/␤Unrecognized regex metacharacter \ (must be quoted to …»
13:50 zengargoyle_ try [] instead of <>
13:50 vetmaster m: say 'some words 2) another pair 3) yet another group' ~~ /<\w || \s> + % [ [\s*\d\)\s*]* ]/
13:50 camelia rakudo-moar e538cb: OUTPUT: «5===SORRY!5===␤Unrecognized regex metacharacter < (must be quoted to match literally)␤at <tmp>:1␤------> 3another pair 3) yet another group' ~~ /<7⏏5\w || \s> + % [ [\s*\d\)\s*]* ]/␤Unrecognized regex metacharacter \ (must be quoted to …»
13:50 vetmaster zengargoyle_: doesn't work
13:50 zengargoyle_ well < sure is never going to. :{
13:52 vetmaster m: say 'some words 2) another pair 3) yet another group' ~~ /<\w || \s> + % [ [\d\)] * ]/
13:52 camelia rakudo-moar e538cb: OUTPUT: «5===SORRY!5===␤Unrecognized regex metacharacter < (must be quoted to match literally)␤at <tmp>:1␤------> 3another pair 3) yet another group' ~~ /<7⏏5\w || \s> + % [ [\d\)] * ]/␤Unrecognized regex metacharacter \ (must be quoted to match…»
13:52 zengargoyle_ vetmaster: <\w is nothing that is valid.
13:52 vetmaster m: say 'some words 2) another pair 3) yet another group' ~~ /[\w || \s] + % [ [\s*\d\)\s* ] *]/
13:52 camelia rakudo-moar e538cb: OUTPUT: «「some words 2) another pair 3) yet another group」␤»
13:53 araraloren m: say 'some words 2) another pair 3) yet another group' ~~ /[\w || \s]+ % [ \s* \d \)]*/
13:53 camelia rakudo-moar e538cb: OUTPUT: «「some words 2) another pair 3) yet another group」␤»
13:53 zengargoyle_ < is used for sub-rules and variable interpolation and bunches of stuff but not just chars.
13:53 vetmaster zengargoyle_: thank you!
13:54 araraloren I think you should careful reading document about regex first
13:58 avalenn joined #perl6
14:00 bwisti joined #perl6
14:01 bioduds if I use PERL6LIB it interferes with code hinting in Atom
14:01 bioduds I mean, Atom IDE codehinting does not get it
14:02 lucasb joined #perl6
14:02 zengargoyle_ totally believable.  had similar issues with vim and PERL5LIB at times. :/
14:03 bioduds I had to restart it
14:03 bioduds and worked
14:03 bioduds but, since I am under dev, it may get confused as I go messing code around
14:03 bioduds at least syntax is clean
14:13 hchienjo joined #perl6
14:13 hchienjo Hello everyone. I have a simple question concerning IO.watch
14:15 zengargoyle_ vetmaster: yay
14:15 Cabanossi joined #perl6
14:15 hchienjo react {   whenever $f.IO.watch -> $change {     say "{$change.path} with event {$change.event}";   } } this simple code for watching and reporting changes in a directory produces lots of repetitive output for once file in case one adds a file in the watched directory
14:15 zengargoyle_ m: say 'some words 2) another pair 3) yet another group' ~~ /[[<[\w]-[\d]>*]* %%\s]* %% [\d\)]/
14:15 camelia rakudo-moar dbd0f8: OUTPUT: «「some words 2) another pair 3) yet another group」␤»
14:16 hchienjo Like for instance, I can see /data/projects/perl/URA/html_files/chi with event FileChanged several times in a row if chi is created in the watched directory. Is this standard behaviour?
14:16 zengargoyle_ same \w+ will end up matching the \d of 2)
14:17 Juerd An idea for a next version of Perl 6: a keyword "just" that does something and then leaves the current block, as in "just print 'Nope' if expr;", doing a return or next or whatever is appropriate in its context.
14:17 Juerd Went through some of my recent code and it'd save me quite some code where I have conditional block just to group a print and a return/next together.
14:21 AlexDaniel “leave”?
14:22 lizmat yeah, feels like the first legit usage of "leave" to me
14:22 Juerd The thing is, once it is its own statement, it no longer functions as a shortcut
14:22 araraloren m: { { { LEAVE { "LEAVE NOW".say; } }}};
14:22 camelia rakudo-moar dbd0f8: OUTPUT: «LEAVE NOW␤»
14:23 AlexDaniel not LEAVE :)
14:23 Juerd I have code where I do stuff like "return reply 'hi'" because the return value is ignored anyway
14:23 Juerd Saves me from doing { reply 'hi'; return; }
14:23 araraloren What leave ?_?
14:23 AlexDaniel a NYI thingy
14:23 araraloren oh.
14:23 AlexDaniel m: if True { leave; say 42 }
14:23 camelia rakudo-moar dbd0f8: OUTPUT: «leave not yet implemented. Sorry.␤  in block <unit> at <tmp> line 1␤␤»
14:24 Juerd I have a few if/else's that I could easily rewrite for 'just' too.
14:25 lizmat Juerd: isn't 'just' the unimplemented 'leave' ?
14:25 Juerd lizmat: If leave takes an arbitrary expression that is consequently ignored, then yes.
14:25 lizmat ah, yes, good point
14:26 hchienjo__ joined #perl6
14:26 itaipu joined #perl6
14:26 Juerd just note "Meh" if cond;
14:26 Juerd # followed by 10 lines of actual code
14:27 lizmat leave is specced to take parameters
14:27 Juerd Most code that I write must ignore most failure modes, but not without logging them
14:27 lizmat 'just note "Meh" if $cond' would return True though
14:27 Juerd So I have a lot of unless (assertion) { log ...; return; }
14:27 Juerd And the same with s/return/next/
14:28 wamba joined #perl6
14:28 Juerd lizmat: The 'just' that I'm thinking of, would return the same as a bare return;
14:28 zengargoyle_ macros!
14:28 hchienjo__ joined #perl6
14:28 lizmat m: for ^10 { LEAVE .say }   # would work already
14:28 camelia rakudo-moar dbd0f8: OUTPUT: «0␤1␤2␤3␤4␤5␤6␤7␤8␤9␤»
14:28 nine Why not log ... and return if cond;?
14:30 Juerd nine: Because I want control flow to be at the start of the line for easier scanning
14:30 zengargoyle_ log might fail. :P
14:30 zengargoyle_ log ... || True and return
14:31 Juerd Well, log typically doesn't fail because of logarithms :(
14:31 Juerd So it's often called printlog, logline, etc.
14:31 pmurias m: multi foo(int $x) {say "doesn't work"};foo(123)
14:31 camelia rakudo-moar dbd0f8: OUTPUT: «Cannot resolve caller foo(Int); none of these signatures match:␤    (int $x)␤  in block <unit> at <tmp> line 1␤␤»
14:32 pmurias m: sub foo(int $x) {say "doesn't work"};foo(123)
14:32 camelia rakudo-moar dbd0f8: OUTPUT: «doesn't work␤»
14:32 pmurias isn't it a bit strange that a sub takes a Int in place of an int while a multi doesn't?
14:33 araraloren m: sub foo(int $x) {say "doesn't work"};foo(int.new(123))
14:33 camelia rakudo-moar dbd0f8: OUTPUT: «doesn't work␤»
14:33 araraloren 123 is Int, not int
14:34 araraloren Oh, that's strange. :P
14:38 araraloren m: sub foo(int $x) {say "doesn't work"}; say &foo.signature ~~ \(123); foo(123)
14:38 camelia rakudo-moar dbd0f8: OUTPUT: «False␤doesn't work␤»
14:38 domidumont joined #perl6
14:38 araraloren Maybe this is a BUG
14:38 lucasb m: multi foo(int $x) { "works now" }; say foo(123)  # :D
14:38 camelia rakudo-moar dbd0f8: OUTPUT: «works now␤»
14:39 araraloren The signature not match, but sub call successed
14:39 lizmat araraloren: agree that looks like a bug
14:39 araraloren m: multi sub foo(int $x) {say "doesn't work"}; say &foo.signature ~~ \(123); foo(123)
14:39 camelia rakudo-moar dbd0f8: OUTPUT: «False␤Cannot resolve caller foo(Int); none of these signatures match:␤    (int $x)␤  in block <unit> at <tmp> line 1␤␤»
14:40 araraloren buggable: help
14:40 buggable araraloren, tags | tag SOMETAG | eco | eco Some search term | speed
14:40 lizmat m: multi sub a(int $a) { say $a }; a(42)   # bug I would say
14:40 camelia rakudo-moar dbd0f8: OUTPUT: «Cannot resolve caller a(Int); none of these signatures match:␤    (int $a)␤  in block <unit> at <tmp> line 1␤␤»
14:41 araraloren pmurias, I think you can report it via .. Em I don't know .. haha
14:41 apfel joined #perl6
14:41 eveo joined #perl6
14:41 eveo pmurias: no, it's not a bug.
14:42 eveo m: multi sub foo(int $x) {say "doesnt work"}; say &foo.candidates».grep: *.cando: \(my int $ = 123)
14:42 camelia rakudo-moar dbd0f8: OUTPUT: «(())␤»
14:42 eveo ^ that might be
14:43 lucasb m: multi f(int) {'i'}; multi f(Int) {'I'}; say f(1)
14:43 camelia rakudo-moar dbd0f8: OUTPUT: «i␤»
14:43 lucasb m: multi f(int) {1+2}; multi f(Int) {'I'}; say f(1)
14:43 camelia rakudo-moar dbd0f8: OUTPUT: «I␤»
14:44 araraloren Em O_O
14:44 lucasb ^^ showing that the function block matters
14:44 eveo inlining
14:45 eveo pmurias: here's a ticket: https://rt.perl.org/Ticket/Display.html?id=129844#txn-1433016 and here's explanation why it isn't: https://irclog.perlgeek.de/perl6-dev/2016-10-25#i_13462673
14:45 Cabanossi joined #perl6
14:46 eveo Basically. I've learned there are no bugs in dispatch. Nothing this obvious, at least. It's been worked on for ~10 years and the things that may seem LTA or puzzling have a reason behind them, because of another interaction in args.
14:47 eveo We just need to well-document the dispatch rules so they could be refered to.
14:47 * eveo &
14:47 eveo left #perl6
14:49 pecastro joined #perl6
14:52 zengargoyle_ m: say ²²; say '²²'.Int
14:52 camelia rakudo-moar dbd0f8: OUTPUT: «4␤Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5²²' (indicated by ⏏)␤  in block <unit> at <tmp> line 1␤␤»
14:52 zengargoyle_ yep, totally obvious. :P
14:53 eveo joined #perl6
14:53 eveo P.S.: I meant dispatch rules, not the bug lucasb showed above.
14:54 eveo Pretty sure there's a ticket for it and there are some native candidates in rakudo that are commented out due to it.
14:54 domidumont joined #perl6
14:54 eveo zengargoyle_: ² is not a digit
14:55 eveo Here's the ticket for lucasb's bug: https://rt.perl.org/Ticket/Display.html?id=128655
14:55 eveo left #perl6
14:56 Juerd "===SORRY!===\nCannot invoke this object (REPR: Null; VMNull)"
14:56 Juerd Any way to get a file name or line number from that? :)
14:56 araraloren m: multi f(int) {'i'}; multi f(Int) {'I'}; say f(1)
14:56 camelia rakudo-moar dbd0f8: OUTPUT: «i␤»
14:57 araraloren m: multi f(int) {1+2}; multi f(Int) {'I'}; say f(1)
14:57 camelia rakudo-moar dbd0f8: OUTPUT: «I␤»
14:57 araraloren haha :(
14:57 Geth ¦ doc: 522455afba | (Jan-Olof Hendig)++ | doc/Type/CallFrame.pod6
14:57 Geth ¦ doc: Fixed a couple of broken links
14:57 Geth ¦ doc: review: https://github.com/perl6/doc/commit/522455afba
14:58 xtreak joined #perl6
15:01 lizmat Juerd: if you could golf that, we could figure out what's going on
15:01 lizmat Juerd: in general, you should never see that error
15:02 jnthn Juerd: It's probably an internal compiler error; --ll-exception will likely give some explanation
15:02 alimon joined #perl6
15:04 jnthn Or at least show where it's going on
15:05 jnthn pmurias: The multi/only discrepancy is correct and I must have explained it half a dozen times by now.
15:05 jnthn (So it'll be in the logs somewhere :))
15:06 sufrostico joined #perl6
15:06 kyan joined #perl6
15:07 mcmillhj joined #perl6
15:09 Juerd lizmat: Hard to golf, as it happened when I moved a class to its own .pm file...
15:09 lizmat :-(
15:10 Juerd https://gist.github.com/anonymous/91c67f4bd1080a8a0c4034e592dece30 with --ll-exception
15:11 ggoebel joined #perl6
15:13 Juerd I'll try upgrading perl6 first :)
15:15 skids joined #perl6
15:20 fatguy joined #perl6
15:20 Juerd Nope, still breaks
15:21 tony-o http::server::async now times out connections and successfully closes them at the end of the client interaction
15:21 yoleaux 30 May 2017 22:23Z <Zoffix> tony-o: you got unmerged PR: https://github.com/tony-o/perl6-data-dump/pull/28
15:21 yoleaux 30 May 2017 22:41Z <Zoffix> tony-o: and one more: https://github.com/tony-o/perl6-data-dump/pull/29
15:21 Juerd https://gist.github.com/anonymous/643c652f2282b1be314d54d779f3c1a4  # updated --ll-exception
15:21 tony-o oh dear
15:22 tony-o .tell Zoffix data-dump PRs merged ..
15:22 yoleaux tony-o: I'll pass your message to Zoffix.
15:26 Juerd Problem golfed to: perl6 -I. -MFoo -e'my @foo is Foo where Str'   with in Foo.pm: "unit class Foo is Array;"
15:26 Juerd Should I send this to rt? :)
15:26 Celelibi joined #perl6
15:27 domidumont joined #perl6
15:28 jnthn Juerd: Yes, please
15:29 Juerd Sent
15:30 pmurias jnthn: one of Zoffix++ alter egos explain the reason for that to me
15:30 jnthn Ah, cool :)
15:31 lizmat pmurias: link ?
15:35 aborazmeh joined #perl6
15:35 aborazmeh joined #perl6
15:36 itaipu joined #perl6
15:37 araujo joined #perl6
15:37 araujo joined #perl6
15:43 pecastro joined #perl6
15:47 robertle is it just me, or are perl6 regexes really slow (compared to perl5)?
15:48 robertle I am doing quite a bit of digging in logfiles for correlations, and because I had to change one of my existing script, I rewrote it in perl6
15:48 pecastro joined #perl6
15:49 robertle and it's about 50 times slower. now I know that all of this is work in progress, but isn't that surprising?
15:50 AlexDaniel robertle: well, a lot of things in rakudo are slower than in perl 5. Maybe if you show us the code, we'd be able to find some easy ways to improve the performance
15:52 AlexDaniel robertle: there's also this thing which attempts to track performance of rakudo against perl5: https://github.com/japhb/perl6-bench
15:52 khw joined #perl6
15:54 robertle not really looking for a fix, I can get a coffe while it does the work. but I was surprised. I have done some other bits in perl6 and while it wasn't super-crazy fast, I also never experienced anything really slow
15:55 robertle this one goes through a file and matches each line against a number of regexes
15:55 robertle I did a --profile out of curiosity, but I am not sure I interpret this correctly
15:56 robertle thinking about it, I guess my surprise was because I assumed that the regex macth would just be handed down to the VM and then done there natively, but now that I think about it that is obviosuly not what is happening
15:57 AlexDaniel doesn't mean that it has to be slow :)
16:00 robertle nope. I need to play with this a bit more...
16:02 raschipi TimToady already said that his next focus will be making it fast
16:03 raschipi Said he already knows how to do it, just lacking a round tuit.
16:04 robertle eh, now I got something interesting: https://pastebin.com/v2A9LKAS
16:04 robertle I added a fast-path using Str.index to each match
16:04 robertle this cuts execuion time against a 100k line file into a quarter!
16:06 raschipi print "1\n"; --> Which language is this?
16:06 moritz the engine is currently mostly used as a grammar engine, so things like scanning and fixed-substring optimizations aren't necessarily very fast or present
16:06 cdg joined #perl6
16:06 robertle raschipi: bad perl5
16:07 raschipi heh
16:07 moritz robertle: python2
16:07 robertle but that's not the problem, it happened when making a perl5 case to compare against
16:08 robertle but isn't it interesting that using index() helps? shouldn't a regex engine do pretty much that anyway for any regex that starts with a defined character sequence?
16:08 itaipu joined #perl6
16:08 raschipi Yes it should, but no one went and implented it yet.
16:09 robertle interesting stuff!
16:10 moritz I thought I implemented such an optimization
16:10 moritz but it might not work in all cases (like case-insensitive pattern)
16:10 raschipi robertle: Which version are you running?
16:11 raschipi benchable6: https://pastebin.com/raw/v2A9LKAS
16:11 benchable6 raschipi, I cannot recognize this command. See wiki for some examples: https://github.com/perl6/whateverable/wiki/Benchable
16:14 Unavowed joined #perl6
16:15 robertle raschipi: 2017.05-358-g8efffb1 on MoarVM 2017.05-59-gf17adad
16:16 robertle the script needs a large input file, so not directly executable
16:16 robertle I could come up with a more synthetic case...
16:21 pmurias lizmat: https://irclog.perlgeek.de/perl6/2017-06-07#i_14699088
16:22 lizmat pmurias++
16:28 Actualeyes joined #perl6
16:41 AlexDaniel benchable6: releases https://pastebin.com/raw/v2A9LKAS
16:41 benchable6 AlexDaniel, Successfully fetched the code from the provided URL.
16:41 benchable6 AlexDaniel, starting to benchmark the 19 given commits
16:41 AlexDaniel not sure if this will work, there were some open issues for benchable6
16:41 raschipi It also doesn't have input
16:42 benchable6 AlexDaniel, benchmarked the given commits, now zooming in on performance differences
16:42 raschipi m: say (4.0 + 3i).cis
16:42 camelia rakudo-moar dbd0f8: OUTPUT: «MoarVM panic: Memory allocation failed; could not allocate 79872 bytes␤»
16:43 fatguy how can i check whether its the last loop in hash ?
16:46 robertle joined #perl6
16:49 AlexDaniel fatguy: LAST ?
16:50 kyclark joined #perl6
16:50 AlexDaniel fatguy: but actually I don't understand your question fully. What do you mean by “in hash”?
16:53 * lucs guesses: iterating over hash keys, wants to know when the iteration hits the last key.
16:53 fatguy AlexDaniel: i hv something like : for sort %result.keys -> $key { .say for @a; say 'last' if 'last item in $key ???'}
16:53 pilne joined #perl6
16:53 raschipi m: my %h = 1=> 'a', 2 => 'b', 3=> 'c'; for %h.keys { LAST { say "last! "}; say %h<<$_>>; }
16:53 camelia rakudo-moar c9dfa8: OUTPUT: «(a)␤(c)␤(b)␤last! ␤»
16:54 AlexDaniel m: my %h = <a 1 b 2 c 3>; for %h.keys { .say; LAST { say “Okay, $_ was the last one” } }
16:54 camelia rakudo-moar c9dfa8: OUTPUT: «a␤c␤b␤Okay, b was the last one␤»
16:55 AlexDaniel raschipi: are you sure %h<<$_>> is correct?
16:56 fatguy great thanks !
16:57 lucs How to go about to get something like  «a␤c␤Last is b␤» ?
16:57 pilne note: if i had money like trump, i'd be throwing it at capable and willing people who are working on perl6, since i'm currently only slowly moving towards understanding how to do it myself.
16:57 * lucs asks, because it's there.
16:58 raschipi AlexDaniel: << >> is called "qqww" "Word quoting with interpolation and quote protection"
16:58 raschipi < > doesn't interpolate
16:59 AlexDaniel raschipi: which means that it doesn't work and you shouldn't use it like this
16:59 AlexDaniel unless you put quotes
16:59 AlexDaniel but then it is even more pointless
17:00 AlexDaniel use %h{$_} instead
17:00 fatguy what if its the first one ? is it FIRST ?
17:01 AlexDaniel yea
17:01 raschipi Why do you say it doesn't work?
17:01 AlexDaniel m: my %h = ‘hello world’ => 42; my $x = ‘hello world’; say %h<<"$x">>
17:01 camelia rakudo-moar c9dfa8: OUTPUT: «42␤»
17:01 AlexDaniel m: my %h = ‘hello world’ => 42; my $x = ‘hello world’; say %h<<$x>>
17:01 camelia rakudo-moar c9dfa8: OUTPUT: «((Any) (Any))␤»
17:01 AlexDaniel well it does work, but doesn't do what you want
17:01 mcmillhj joined #perl6
17:02 lizmat m: my %h = ‘hello world’ => 42; my $x = ‘hello world’; say %h{$x}
17:02 camelia rakudo-moar c9dfa8: OUTPUT: «42␤»
17:02 _cronus joined #perl6
17:02 AlexDaniel yes, %h{}
17:03 raschipi I don't understand the docs, then: https://docs.perl6.org/language/operators#postcircumfix_%C2%AB_%C2%BB
17:03 _cronus hello everyone. Could someone please explain to me the difference between the following:
17:03 _cronus for 'data.txt'.IO.lines { .say; .chars.say };
17:03 _cronus my $data = 'data.txt'.IO.lines; for $data  { .say; .chars.say };
17:03 AlexDaniel raschipi: the docs are wrong. Should be %color«cherry "$fruit"»
17:04 _cronus I would expect these to be the same, but I get different result.
17:04 raschipi Thanks for correcting me, I got it from the docs.
17:07 pilne _cronus=> why would you expect them to be the same?
17:07 raiph _cronus: the `$` in `$data` tells P6 to assume `$data` is to be primarily treated as a single thing
17:07 pilne one is just a loop, the other is asking for data to be stored a certain way (:
17:07 AlexDaniel _cronus: “for @$data” should work
17:07 AlexDaniel _cronus: or maybe use @data instead?
17:08 raiph _cronus: the method name `.lines` is intended to imply the result is to be treated as a plural thing
17:10 _cronus pilne: since $data is set to 'data.txt'.IO.lines I would expect it to behave the same. please note that it's the 3rd day trying to learn the language.
17:10 pilne oh, i'm not being critical, i'm just trying to see how you saw it is all.
17:11 pilne i'm pretty green with it as well, it surprises me, but it has been very consistent about using what surprised me. so it's not like the same thing surprises me over and over by doing different things in different contexts.
17:11 setty1 joined #perl6
17:12 AlexDaniel raschipi: I've created this: https://github.com/perl6/doc/issues/1369
17:13 pilne the only negative for me from learning perl6 is that i find myself wrinkling my nose at idiomatic code in other languages because it feels like i am having to think around how the language wants me to program, instead of implementing it how i think about the problem.
17:13 raiph _cronus: in Perl 6 `$` denotes Singular Item. (Note how `$` is an `S` overlaying an `I`)
17:13 raschipi AlexDaniel: I don't see it as a trap, because I'm used to this kind of interpolation in the shell. Well, it's a trap on both.
17:13 AlexDaniel raschipi: yup
17:13 _cronus pilne, AlexDaniel: thanks, I still need to get my head around $@%.
17:13 espadrine_ joined #perl6
17:14 raschipi AlexDaniel: I just copied the usage from the docs, so if it were clarified in the docs it would be enough.
17:14 pilne $ is a singular context, kinda like "i have one of these" (granted, it could be one thing, that holds multiple other things... etc.)
17:14 pilne @ is a "counting indexed" thing, and % is a map indexed thing.
17:15 pilne at least that's how i see and use them so far.
17:18 _cronus pilne: perl6 seems to be a great language, but comming from python/javascript sometimes it seems confusing ( albeit not as confusing as python when I was trying to learn it).
17:18 eveo joined #perl6
17:21 raiph _cronus: an `@` denotes a Plural list of Items each of which is at (one reason for the `@`) an integer Position (0, 1, 2 etc.)
17:22 raiph _cronus: an `%` denotes a Plural list of pairs of objects (note the two little `o` things in `%`)
17:23 _cronus raiph: nice explanation - very easy to remember, thanks.
17:23 pilne freedom, and a lot of "operators/symbols" can be a bit overwhealming at first, but i have found them logical once i know what they are doing (when looking at rosetta code).
17:24 rightfold m: class Hole { has Str $.name; method ACCEPTS(Mu $other) { die "Matched hole {$.name.perl} against {$other.perl}" } }; sub hole($name) { Hole.new(:$name) }; sub square(Int:D $x) { $x * $x }; square(hole("x"))
17:24 camelia rakudo-moar af85d5: OUTPUT: «Type check failed in binding to parameter '$x'; expected Int but got Hole (Hole.new(name => "x"))␤  in sub square at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
17:26 raschipi What's the difference between using @ and | before a variable?
17:26 raiph _cronus: yw :)
17:27 raschipi He's gone.
17:27 raiph raschipi: ah. thx.
17:28 vetmaster joined #perl6
17:28 eveo speaking of Seqs and for loops. Does `for` always turn a Seq into a list?
17:29 eveo iterating over one and looking at RAM climb suggests it's keeping old values
17:29 raschipi No, there wouldn't be much point for Seqs then.
17:29 raiph raschipi: I'd say `@` means treat variable as a single thing that contains a list of items.
17:29 raschipi It will only free memory when the GC runs.
17:30 eveo raschipi: and that happens when? I just had to restart my box because looping over a seq of generated strings nommed all my RAM
17:30 raschipi Wll, something else might be keeping the values around.
17:31 eveo Like what? It's just a Seq and a for loop
17:31 raschipi 'for' itself doensn't.
17:31 Geth ¦ doc: 4d55691f48 | (Aleks-Daniel Jakimenko-Aleksejev)++ | 5 files
17:31 Geth ¦ doc: Attempt to improve the situation with issue #1369
17:31 Geth ¦ doc:
17:31 Geth ¦ doc: Please revise.
17:31 Geth ¦ doc:
17:31 Geth ¦ doc: Generally, we shouldn't show wrong usage anyway, but it may be
17:31 Geth ¦ doc: possible that I misunderstood some of the examples.
17:31 Geth ¦ doc: review: https://github.com/perl6/doc/commit/4d55691f48
17:31 andrzejk_ joined #perl6
17:31 raiph raschipi: I'd say `|` in arglist context means splat variable into a list of arguments
17:31 andrzejk_ hi
17:31 andrzejk_ :)
17:31 andrzejk_ what's up?
17:32 raschipi Up is a Pixar film
17:32 andrzejk_ :)
17:32 andrzejk_ I miss perl6 :<
17:32 andrzejk_ no have time to look here
17:33 eveo Ah OK
17:34 eveo Damn. My faulty test setup prevented me from telling _cronus not to use the @$lines
17:35 raiph eveo: yeah, `@` means caching
17:37 eveo .tell _cronus people told you to use @$lines the other day. Don't. .IO.lines gives you a Seq, which doesn't keep its values around after you iterate over them, which is a handy thing to do if you're, say, iterating over 10GB file. The reason for $lines {} iterates over the entire Seq is because it's containerized. Use for $lines<> {} to decont it and then it'll iterate a line at a time AND won't keep the lines
17:37 yoleaux eveo: I'll pass your message to _cronus.
17:37 eveo around. See more at https://docs.perl6.org/language/glossary#index-entry-Reify and https://docs.perl6.org/language/containers
17:37 eveo .tell _cronus around. See more at https://docs.perl6.org/language/glossary#index-entry-Reify and https://docs.perl6.org/language/containers
17:37 yoleaux eveo: I'll pass your message to _cronus.
17:37 eveo m: say (4.0 + 3i).cis
17:37 camelia rakudo-moar 8791b4: OUTPUT: «-0.0325429996401541-0.0376789775748652i␤»
17:37 eveo raschipi  ^
17:38 fatguy if i have 2 nested loop, how can i check in the second loop if the item in first loop is the last one ?
17:38 eveo raschipi: where in the docs is «» used for hash?
17:39 perlpilot fatguy: whyfor would you do this?  :)
17:39 raschipi https://docs.perl6.org/language/operators#postcircumfix_%C2%AB_%C2%BB
17:40 eveo Thanks
17:41 lizmat joined #perl6
17:42 AlexDaniel raschipi: I've just fixed that example
17:42 AlexDaniel raschipi: https://github.com/perl6/doc/commit/4d55691f48
17:43 raschipi It could use some explanation about expansion, that it will look for multiple values if there are multiple words in the variable
17:43 raschipi Because that's useful sometimes... I use it in shell, could come in handy in perl6.
17:44 zakharyas joined #perl6
17:44 raschipi Just like in the shell, got to know when to do direct interpolation and when to quote.
17:44 fatguy perlpilot: i hv dd like this: {:Linux($["http_proxy=10.0.0.1:3128", "dns=10.0.0.254"]), :Linux_Webserver($["ansible_connection=ssh", "http_port=80", "http_user=heman"])}
17:45 Cabanossi joined #perl6
17:45 fatguy perlpilot: i just need to print the second group with "\n" but not for the last one
17:46 eveo fatguy: just join with "\n"
17:46 perlpilot fatguy: usually ... what eveo said
17:47 perlpilot fatguy: or you could iterate to the penultimate item and then output the last one separately
17:47 perlpilot fatguy: or you could keep a "look ahead" item in a $var
17:47 eveo m: say join "♥", (for ^3 -> $n { (for "a".."c" { "$n:$_" })})
17:47 camelia rakudo-moar 8791b4: OUTPUT: «0:a♥0:b♥0:c♥1:a♥1:b♥1:c♥2:a♥2:b♥2:c␤»
17:48 fatguy i need to have double "\n\n" between the group but not the last one
17:49 perlpilot then join with "\n\n" insted
17:49 eveo fatguy: ok... well, join on "\n\n"
17:49 eveo left #perl6
17:51 fatguy perlpilot: my expected output: [Linux]\nhttp_proxy=xxx\ndns=xxx\n\n[Linux_Webserver]\n...http_port=80\n
17:53 timotimo raschipi: do you still have the code around that grew boundlessly?
17:53 timotimo oh
17:53 timotimo it was actually eveo who said that?
17:54 raschipi It was me at first, then he did it again and it worked
17:55 raschipi In my computer it still eats all memory
17:55 raschipi m: say (4.0 + 3i).cis
17:55 camelia rakudo-moar 4139b9: OUTPUT: «-0.0325429996401541-0.0376789775748652i␤»
18:05 eveo joined #perl6
18:05 eveo raschipi: it eats memory because your perl6 is too old :)
18:07 raschipi Did you just fix it?
18:07 eveo Yes.
18:07 raschipi Nice eveo++
18:09 andrei joined #perl6
18:10 andrei Hi ! I see something strange.
18:10 andrei m: sub infix:<w> { $^a + $^b } ; 1 w 2
18:10 camelia rakudo-moar 4139b9: ( no output )
18:10 andrei sub infix:<w> { $^a + $^b }
18:11 andrei and then later:    1 w 2
18:11 eveo Yeah?
18:11 andrei I get "two terms in a row"
18:11 eveo m: sub infix:<w> { $^a + $^b } ; say 1 w 2
18:11 camelia rakudo-moar 8c7e4e: OUTPUT: «3␤»
18:11 eveo andrei: you sure you got spaces around the w?
18:11 eveo m: sub infix:<w> { $^a + $^b } ; say 1 w2
18:11 camelia rakudo-moar 8c7e4e: OUTPUT: «5===SORRY!5===␤Argument to "say" seems to be malformed␤at <tmp>:1␤------> 3sub infix:<w> { $^a + $^b } ; say7⏏5 1 w2␤Two terms in a row␤at <tmp>:1␤------> 3sub infix:<w> { $^a + $^b } ; say 7⏏1 w2␤    expecting any of:␤ …»
18:12 eveo Only infixes that aren't made out of the same characters that can be used for terms are allowed to be without spaces
18:12 andrei m: sub infix:<w> { $^a + $^b } ; say 1 w 2
18:12 camelia rakudo-moar 8c7e4e: OUTPUT: «3␤»
18:13 andrei spaces where?
18:13 eveo andrei: around `w`
18:13 andrei It all works fine if I use this my infix in the same line where I define it. I am talking about Perl6 REPL
18:13 Celelibi joined #perl6
18:13 eveo Ah
18:14 andrei It seems like REPL fails to remember. This only happens with infix
18:14 eveo andrei: seems that doesn't work in REPL
18:15 eveo (yet)
18:15 eveo andrei: you should report it as a bug
18:15 eveo huggable: rakudobug
18:15 huggable eveo, Report bugs by emailing to <rakudobug@perl.org>, please include [BUG] at the start of the subject for it to be automatically tagged by the RT system.
18:15 andrei OK
18:16 andrei what is the right procedure to dump the info regarding the details of my installation? (I installed by rakudobrew)
18:16 eveo perl6 -v
18:17 eveo Well, there's also perl6 -V, tho in this case it's not really needed
18:17 timotimo yeah, this is an artifact of how the repl is implemented ... it's basically one big hack ;)
18:17 eveo :)
18:18 andrei I checked it works OK if I save in file and execute normally. Problem only present in REPL.
18:18 timotimo yup
18:19 timotimo we can probably grab the perl6 braid at the end of compiling the individual lines and re-use it at the start of the new ones
18:19 timotimo that would allow infix operators like that to continue existing, i expect
18:22 bioduds hi guys, I'm progressing on grammars
18:22 bioduds I hit a spot now I don't know what to do
18:22 bioduds where can I post code?
18:22 perlpilot bioduds: gist is fine
18:24 bioduds here https://gist.github.com/bioduds/409bee9f1ff8db16116af58cffef8221
18:24 eveo left #perl6
18:24 bioduds so, the thing is
18:24 bioduds I managed to read the line
18:24 bioduds but the line repeats
18:24 bioduds and I would like to get all in an array
18:25 bioduds but now I only get the last IP
18:25 bioduds did I make myself clear?
18:27 AlexDaniel bioduds: can you post the full code?
18:27 AlexDaniel bioduds: not just the grammar
18:27 bioduds yes, just a second
18:29 perlpilot bioduds: btw, when you get the kinks worked out, consider making this into a module and adding it to the ecosystem  (you may already be thinking that, but I thought I'd mention it anyway)
18:29 andrei my @a=1..*  ;   reduce({last if $^b > 100 ; $^a.say ; $^a + $^b },   0 ,  |@a  )
18:29 andrei freezes with heavy smoke from CPU
18:29 andrei is there any way to reduce over infinite list?
18:29 andrzejk_ what relation has perl6 and weed?
18:30 moritz andrzejk_: try (1..*).reduce(...)
18:30 moritz sorry, meant andrei
18:30 st_elmo joined #perl6
18:30 andrei this answers his question, too :)
18:31 moritz the two of you do make it hard, requiring 5 characters before tab completion is unambiguous
18:31 andrzejk_ andrei ye perfect
18:31 bioduds there, complete code https://gist.github.com/bioduds/409bee9f1ff8db16116af58cffef8221
18:31 bioduds yes, perlpilot, this might be an actual useful module, right? parsing the dig command
18:32 bioduds I will yes. I also have some others that when are done I will make public such as Blake SHA-3
18:33 bioduds I'm happy now cause I'm getting the hang of Grammars, something I was willing to learn for sometime but never actually could put my hands on
18:33 andrei andrzejk_ , this works, thanks.  This kind of makes sense even...
18:34 bioduds so, what I could not grasp how to do is, I have this list of URL, PORT... AND IP and I want all the info in an array, not just the first or the last
18:34 bioduds cause when I parse <ANSWER> I get the first and if I do <ANSWER>+ it handles me the last
18:34 andrzejk_ andrei ye, I got high too
18:35 bioduds ops, I am wrong
18:35 bioduds sorry guys
18:35 perlpilot when you match with <ANSWER>+, you should get an array
18:35 bioduds <ANSWER>+ actually gets me all of them
18:35 bioduds COOL
18:35 raschipi bioduds: Have you tried https://docs.perl6.org/routine/subparse
18:35 bioduds I knew Grammars was a way to go, thanks for incentivizing me to learn it earlier mans :D
18:36 bioduds I actually got it saspchipi please disconsider my help ask :D
18:37 bioduds I'm seeing now why Grammars is powerful
18:37 bioduds and why even the compiler uses it, correct?
18:40 jnthn Yes, a Perl 6 grammar is used to parse Perl 6. :)
18:41 perlpilot bioduds: behold the wonder of a domain specific language  ;-)
18:42 bioduds yeah, man. It's a thrilling experience! This is the reason I'm building a blockchain in Perl6! Quite audacious, I know! :D But so far it has beeing paying off eversince
18:45 Cabanossi joined #perl6
18:47 moritz m: say 'abcdefg' ~~ /.**4/
18:47 camelia rakudo-moar 8c7e4e: OUTPUT: «「abcd」␤»
18:50 bioduds P6 is so cool
18:50 bioduds ;)
18:50 bioduds got it all parsed!!
18:50 moritz m: say 'abcdefg' ~~ /.**?4/
18:50 camelia rakudo-moar 8c7e4e: OUTPUT: «「abcd」␤»
18:50 moritz m: say 'abcdefg' ~~ /.**?4..5/
18:50 camelia rakudo-moar 8c7e4e: OUTPUT: «「abcd」␤»
18:50 moritz m: say 'abcdefg' ~~ /.**4..5/
18:50 camelia rakudo-moar 8c7e4e: OUTPUT: «「abcde」␤»
18:50 bioduds Would someone be interested in revising my newbie code so I can upload this module to modules.perl6.org ?
18:50 moritz bioduds: cool!
18:50 bioduds I will place in gist in a minute
18:52 bioduds Here it is: https://gist.github.com/bioduds/409bee9f1ff8db16116af58cffef8221
18:53 bioduds parses dig [website]
18:53 Brumbass joined #perl6
18:54 Brumbass Hi guys.  I've implemented a DESTROY method on my perl6 class - however the method is never called.  Doesn't the destroy method exist in perl6 ?  Is there another way to make a destructor ?
18:54 Brumbass Thanks in advance :)
18:55 perlpilot bioduds: don't worry if it's too newbie.  If the code does something useful people will use it and some of those people will have suggestions on how to improve the code and then you've made a community :-)
18:55 moritz Brumbass: DESTROY is only called when the GC actually collects objects, which doesn't happen at program exit for performance reasons
18:56 moritz Brumbass: if you actually need code to be called, LEAVE or END phasers might be an option
18:56 lichtkind joined #perl6
18:56 moritz (though many cleanup tasks, such as closing file handles, don't actually need to happen at program exit time, since the OS does them for you)
18:57 bioduds okey, perlpilot
18:57 Brumbass hm I see, I see. Thanks moritz  :)
18:57 bioduds let me wrap it then the way it should
19:00 perlpilot moritz: LEAVE phasers are nice, but it would be nicer still perhaps if there was a phaser you could set on your objects that gets run when they go out of scope
19:01 moritz perlpilot: something like python's "with" context manager, maybe?
19:07 perlpilot I dunno.  That's still coming at the problem from the "right" end (where the scope is located)   I think it would be interesting if you could set it on the object for any time a scope is exited.
19:07 perlpilot Sounds expensive though
19:08 moritz also, even though the scope might be exited, the object itself could still be referenced
19:16 lizmat m: my $a will leave { say "goodbye" } = 42; say $a
19:16 camelia rakudo-moar 8c7e4e: OUTPUT: «42␤goodbye␤»
19:16 lizmat perlpilot: ^^^
19:17 lizmat my $dbh will leave *.disconnect = DBIish.connect("foo")   # intent
19:17 moritz I know that this works, but it shifts the work to the user
19:17 moritz first of all, she has to know which method to call
19:17 lizmat ah, you mean that the .connect would do this automatically ?
19:18 moritz second, has to take care to only do it if the corresponding open/connect etc. worked
19:18 moritz python's model is that there's a fixed method that's called when a "managed" context is left
19:19 lizmat and how do you indicate a managed context ?
19:19 moritz so you can write   with open(fielname) as file: ....
19:19 moritz and when the of the with .... is left, there's a method (iirc) __EXIT___ called on the variable (here "file")
19:19 lizmat I mean, the only thing we really need is a way to indicate that a scope must run its phasers even if it doesn't find any at compile time
19:20 Geth ¦ doc: de19b020b8 | (Jan-Olof Hendig)++ | doc/Language/control.pod6
19:20 Geth ¦ doc: A few tiny corrections
19:20 Geth ¦ doc: review: https://github.com/perl6/doc/commit/de19b020b8
19:20 lizmat then the .connect could add the necessary phaser through introspection
19:20 moritz so, the user is responsible for saying "use this in a managed context", and the library author is responsible for responding to that
19:21 cdg joined #perl6
19:21 wamba joined #perl6
19:21 moritz lizmat: adding phasers to existing, already compiled (possibly precompiled and JITted) code sounds pretty hairy to me
19:22 TEttinger joined #perl6
19:22 lizmat moritz: atm it's all about calling Block.fire_phasers
19:22 lizmat afaik
19:23 lizmat :-)
19:23 jnthn Something like Python's with, or C#'s using, plus a Closable or whatever role is likely the way to go
19:23 jnthn It's a well understood solution.
19:23 moritz +1
19:24 lizmat jnthn: but would that allow .connect to return something that would do the right thing without the user needing to do anything else ?
19:24 cdg joined #perl6
19:24 moritz lizmat: no, and I don't think that's desirable
19:24 jnthn lizmat: That isn't the problem I'm proposing we solve. I'm proposing we solve the "standard way to do the resource release"
19:25 jnthn In genearl we don't know the user's intent in .connect
19:25 lizmat true
19:25 jnthn What if they are returning the thing .connect returned? :)
19:27 lizmat yeah  :-)
19:27 jnthn So I think the intent has to be indicated. Making that not involve much boilerplate (for example, needing to know close vs disconnect vs whatever) is desirable.
19:28 lizmat my $a is managed = DBIish.connect()  ???
19:28 jnthn There's two ways, I think. One is to do the using (C#) or with (Python) style approach. This has the upside of introducing a scope, and the downside of introducing a scope. :)
19:29 jnthn An alternative would be something on a variable declaration
19:29 jnthn Yeah, though I wonder if we can't do better than a trait
19:29 moritz note that the resource release action doesn't have to be tied to a variable
19:30 moritz it could hang on an anonymous object
19:30 jnthn Yeah, this is the advantage of a with/using that I have seen put to good use
19:30 moritz (coud use "my $ is managed = ..." there, might feel a bit jucky)
19:30 jnthn using (new TransactionScope()) { ... } to indicate a transaction scope for example, which is rolled back if uncommitted.
19:32 jnthn It's kinda nice that in the Perl 6 case, when you *do* want a variable, then we can do `using open('foo') -> $fh { }`
19:32 moritz I'm warming up to the idea :-)
19:32 jnthn I'm not sold on "using" at all though
19:32 jnthn (as a name)
19:32 jnthn Skype call; bbiab
19:33 moritz knowing TimToady, he'll likely come up with a name that no language uses for that yet :-)
19:35 lizmat ,oO( tracking open('foo') -> $fh { } )
19:35 rightfold Haskell did that, calling it "bracket" ????
19:35 moritz managed open('foo') -> $fh { }
19:36 moritz .oO( open('foo') as a service -> $fh { ... }  )
19:36 lizmat which would imply the parameters to the block would get a method called on them on scope exit ?
19:38 andrzejk_ joined #perl6
19:39 rightfold borrow
19:40 moritz lizmat: yes
19:41 lizmat that could almost be done with a module in the ecosystem
19:41 moritz apart from the syntax, it's a one-liner
19:42 moritz m: sub using($obj, &code) { LEAVE $obj.LEAVE; code($obj };
19:42 camelia rakudo-moar 8c7e4e: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in argument list; couldn't find final ')' ␤at <tmp>:1␤------> 3j, &code) { LEAVE $obj.LEAVE; code($obj 7⏏5};␤»
19:42 moritz m: sub using($obj, &code) { LEAVE $obj.LEAVE; code($obj) };
19:42 camelia rakudo-moar 8c7e4e: ( no output )
19:42 rightfold moritz: will this work with return?
19:43 moritz rightfold: you mean if &code return()s through the scope? yes
19:43 lostinfog joined #perl6
19:43 rightfold Ok
19:43 perlpilot LEAVE is already nice that way
19:43 rightfold Nice
19:43 moritz the value comes from making the IO handles in core respond to that kind of API
19:44 moritz (so mostly method LEAVE() { self.close })
19:45 cdg joined #perl6
19:48 AlexDaniel .oO( cork open(…) { … } )
19:49 patrickz joined #perl6
19:54 [Coke] huggable: stop telling people to use [BUG]
19:54 huggable [Coke], nothing found
19:54 nine keep open $file { }
19:55 moritz nine: more like undo open $file { ... } :-)
19:57 perlpilot keep/undo are more about success/failure than just scope exit though
19:58 moritz right
20:01 nowan joined #perl6
20:04 * perlpilot imagines a LEAVE method that gets attached to the LEAVE phaser of any block in which an object gets instantiated
20:04 nine I got to admit that Python's "with" seems to fit the purpose very well
20:05 perlpilot I didn't like it at first, but it's growing on me.
20:07 nowan joined #perl6
20:09 nowan joined #perl6
20:15 * [Coke] wonders if we have a p6 impl of PSGI.
20:16 [Coke] \o/
20:16 lizmat ,oO( beleave open('foo') -> $fh { } )
20:17 moritz [Coke]: we do, in fact
20:17 zengargoyle_ .oO( behave open('foo') -> $fh { } )
20:19 lizmat ,oO( consider open('foo') -> $fh { } )
20:19 moritz .oO( begone open('foo') -> $fh { } )
20:20 lizmat ,oO( deem open('foo') -> $fh { } )
20:20 [Coke] now to figure out how to .. psgi.
20:22 lizmat https://github.com/tokuhirom/p6-Crust   # [Coke]
20:24 [Coke] lizmat: oh, thanks, I was looking at a different module!
20:29 raiph joined #perl6
20:30 brrt joined #perl6
20:31 AlexDaniel wha… what? What security hole…
20:33 [Coke] so, with mod_perl, I can do something that just modifies the http headers; is that possible with PSGI? Or am I required to serve the content of the page as well at that point?
20:38 zengargoyle_ i've only used p5 PSGI stuff.  you generally return [ $code, [ @headers ], $content ] or something similar.  content can be a string or array or some sort of stream.
20:40 zengargoyle_ usually wrapped up a bit nicer (just returning content, everything else automatic).  i'd think PSGI should let you controll everything from the status code on down the line.
20:41 [Coke] $content: right, I have an app somewhere else; I'm trying to inject an http header on the reverse proxy that is sitting in front of it. Guessing something like mod_perl is a better fit there than PSGI.
20:41 lizmat [Coke]: nginx probably is
20:42 perlpilot mod_perl is almost never the answer
20:42 [Coke] lizmat: we already have an apache install here.
20:44 lizmat [Coke]: in my (rather limited) experience, Apache / mod_perl is basically superseded by nginx / PSGI
20:45 lizmat performance wise and memory usage wise
20:46 itaipu joined #perl6
20:46 * zengargoyle_ clueless about advanced web-scale stuff. :/
21:00 rightfold Don't use Apache if you don't have to
21:00 brrt heh, that's not fair at all
21:01 brrt apache is a well-engineered web server
21:02 jnthn [Coke]: There's a way to configure an apache reverse proxy to inject a header, iirc
21:02 jnthn Just as a directive in the reverse proxy config
21:02 jnthn Pretty sure I did that last autumn
21:03 brrt i suspect the question is how much dynamic do you need
21:03 brrt if a lot, mod_perl might be a decent solution
21:03 jnthn Ah, true :-)
21:03 jnthn Yeah, I didn't need anything dynamic
21:03 brrt alternatively you can have lua scripting in nginx
21:04 lizmat afaik, you can also execute perl code inside nginx
21:05 lizmat http://nginx.org/en/docs/http/ngx_http_perl_module.html
21:07 brrt that is pretty cool
21:07 lizmat basically mod_perl for nginx
21:09 pilne This really is odd to me: http://perl6maven.com/benchmarking-crypt-in-perl6
21:09 pilne i've played with the code with the "bench" module
21:09 pilne and "0" trips runs significantly slower than anything from 1-1000.
21:10 pilne after about 1,000 there is a slowdown, but it seems to be "as expected"
21:10 pilne (and i bumped iterations to 10,000.
21:11 SCHAPiE joined #perl6
21:11 [Coke] this has to be pretty dynamic (e.g. look stuff up in a DB)
21:11 bioduds question: unit package allows me to re-use the namespace?
21:12 bioduds so that I may re-use the same unit package?
21:12 jnthn It's kinda funny to benchmark cryptographic hash algorithms, in that being hard to run fast, especially on specialized hardware, is considered a feature. :)
21:12 lizmat bioduds: package is something that is rarely needed for "ordinary" usage
21:13 jnthn bioduds: Yes, the unit shouldn't change the semantics of package otherwise
21:14 pilne i just found the article poking around, and crypto being an interest of mine, as well as things that would benefit from benchmarking, said "what the hell" and managed to perplex myself! lol.
21:15 bioduds so I may have, for instance in two modules: unit package EC::Grammars; and in each one I declare, for instance grammar DIG and grammar OTHER that will be able to be imported later simply by use EC:Grammars if both modules are installed?
21:17 Voldenet Is there some website that can be used to run perl6 in the browser with js backend or would i have to compile it?
21:20 Voldenet I've seen it used in nodejs and probably a lot of methods won't work on a browser, but something might work
21:24 Spot___ joined #perl6
21:24 tbrowder_ joined #perl6
21:24 itaipu joined #perl6
21:24 peteretep_ joined #perl6
21:24 PotatoGim_ joined #perl6
21:24 jnap__ joined #perl6
21:26 lucs_ joined #perl6
21:27 petercom1and joined #perl6
21:27 lucasb specs commits is not getting logged to the channel like the other repos?
21:27 lizmat Voldenet: there's at least one: https://glot.io/new/perl6
21:28 lizmat lucasb: maybe on #perl6-dev ?
21:28 lucasb oops, sorry, it is :)
21:29 leego_ joined #perl6
21:33 lucasb I wonder if the <space> charclass is the same as \s ?
21:33 stux|RC-only joined #perl6
21:33 lucasb I think yes. I'm saying this because I just noticed this latest commit the specs repo
21:33 lucasb "Remove <sp> as an alias for \s"
21:33 Voldenet lizmat: it's only running server-side perl, not browser-side
21:33 lizmat Voldenet: I'm afraid we won't have any browser-side Perl 6 until the js backend is in good enough shape
21:33 lizmat Voldenet: what's wrong with it being server-side?
21:33 itaipu joined #perl6
21:33 Voldenet lizmat: if you want to run client-side UI code then _a lot_ ?:)
21:34 Voldenet s/\?//
21:34 Voldenet but I'm patient, I'll wait
21:34 lizmat Voldenet: unless pmurias can tell you otherwise, we're not there yet
21:34 lucasb Voldenet: there is http://fglock.github.io/Perlito/perlito/perlito6.html
21:35 lucasb but idk its current state
21:35 Voldenet lucasb: Wow, thank you, that what I was looking for!
21:35 Voldenet Back to tinkering then
21:36 Actualeyes joined #perl6
21:39 ggoebel joined #perl6
21:39 bioduds Can someone please take a quick look at https://gist.github.com/bioduds/409bee9f1ff8db16116af58cffef8221 and tell me if this code is good to upload to modules.perl6.org ? I want to make a nice contribution
21:40 lizmat Voldenet: fwiw, perlito is an implementation of Perl 6 completely separated from Rakudo
21:41 mcmillhj joined #perl6
21:42 Voldenet lizmat: Yeah, but it's good enough. Far better than regular JS (needs a few wrappers, but it compiles into decent js) :)
21:43 pmurias joined #perl6
21:44 toolforger joined #perl6
21:44 toolforger p6: say ²³
21:44 camelia rakudo-moar bba6de: OUTPUT: «8␤»
21:44 SCHAPiE joined #perl6
21:44 timotimo i think it's been quite a while since perlito6 was last touched, i think it was considered "finished", though?
21:44 toolforger p6: say ³²
21:44 camelia rakudo-moar bba6de: OUTPUT: «9␤»
21:45 pmurias timotimo: fglock++ focuses his effort on the Perl 5 version
21:47 toolforger p6: say 3^2
21:47 camelia rakudo-moar bba6de: OUTPUT: «one(3, 2)␤»
21:48 toolforger say 3***2
21:48 evalable6 toolforger, Full output: https://gist.github.com/e3d192d9549921d592199f7b0f6c39ca
21:48 evalable6 toolforger, rakudo-moar bba6de5f4: OUTPUT: «(exit code 1) ===SORRY!=== Error while compiling /tmp/OleGZTqEjD␤Two ter…»
21:48 toolforger p6: say 3**2
21:48 camelia rakudo-moar bba6de: OUTPUT: «9␤»
21:50 Voldenet m: given Channel.new { .send("a"); say .receive }
21:50 camelia rakudo-moar bba6de: OUTPUT: «a␤»
21:51 lucasb oh, "say" triggers the bot?
21:51 lucasb say wat
21:51 lucasb no
21:51 toolforger It's the p6: prefix
21:51 toolforger oh right
21:51 Voldenet welp, perlito6 is not very having much features from perl6 apart from the syntax
21:51 toolforger the "say 3***2" somehow triggered a large response
21:52 AlexDaniel toolforger: well, it shouldn't've worked in the first place :)
21:52 AlexDaniel say 42
21:52 Voldenet they can be implemented, but eh, i'll wait for moar ;-)
21:52 evalable6 AlexDaniel, rakudo-moar bba6de5f4: OUTPUT: «42»
21:52 lucasb say NaN
21:52 evalable6 lucasb, rakudo-moar bba6de5f4: OUTPUT: «NaN»
21:52 toolforger Eh. Why doesn't "say wat" give an output then?
21:52 toolforger p6: say wat
21:52 camelia rakudo-moar bba6de: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤    wat used at line 1. Did you mean 'WHAT'?␤␤»
21:52 toolforger say wat
21:53 toolforger ... strange...
21:53 Voldenet p6: say .WHAT
21:53 camelia rakudo-moar bba6de: OUTPUT: «(Any)␤»
21:53 AlexDaniel toolforger: evalable6 guesses if it is code or not :)
21:53 AlexDaniel say .WHAT
21:53 evalable6 AlexDaniel, rakudo-moar bba6de5f4: OUTPUT: «(Any)»
21:53 toolforger Ah, the good old DWIM effect :-)
21:53 AlexDaniel toolforger: but evalable6 works a little bit differently than camelia, it gists large output
21:53 AlexDaniel maybe it shouldn't, I don't know
21:54 AlexDaniel people get too surprised with non-camelia-like output
21:54 Voldenet say .WHAT.WHAT
21:54 evalable6 Voldenet, rakudo-moar bba6de5f4: OUTPUT: «(Any)»
21:54 Voldenet That's not the answer I expected.
21:57 mcmillhj joined #perl6
21:57 toolforger left #perl6
21:59 jnthn .WHAT gives a type object, and .WHAT on a type object is identity
21:59 jnthn So .WHAT and .WHAT.WHAT.WHAT.WHAT mean the same thing
22:01 rouking What's the idiomatic way to get the difference of two lists? that is, one list excluding any elements repeated in another list? Like (1, 2, 3) - (1, 3) == (2)
22:03 eveo joined #perl6
22:03 eveo m: say keys (1, 2, 3) ∖ (1, 3)
22:03 camelia rakudo-moar bba6de: OUTPUT: «(2)␤»
22:03 jnthn m: say (1, 2, 3) (-) (1, 3)
22:03 camelia rakudo-moar bba6de: OUTPUT: «set(2)␤»
22:03 TEttinger m: say keys (1, 2, 3, 1, 2, 3) ∖ (1, 3)
22:03 camelia rakudo-moar bba6de: OUTPUT: «(2)␤»
22:04 jnthn <-- too lazy to Unicode :P
22:04 eveo I think there was a nicer way without sets, but I forget what it was
22:04 TEttinger m: say keys (1, 2, 3, 1, 2, 3) (-) (1, 3)
22:04 camelia rakudo-moar bba6de: OUTPUT: «(2)␤»
22:04 firstdayonthejob joined #perl6
22:04 TEttinger oops
22:04 TEttinger m: say (1, 2, 3, 1, 2, 3) (-) (1, 3)
22:04 camelia rakudo-moar bba6de: OUTPUT: «set(2)␤»
22:04 TEttinger huh
22:04 jnthn The keys makes it not a set any more :)
22:05 TEttinger is there a way to keep duplicates?
22:05 jnthn (-) is just the texas spelling of ∖
22:05 TEttinger wat
22:05 jnthn Not if you're using a set operation, no.
22:05 TEttinger that's not a \
22:05 eveo or maybe I'm thinking of something else
22:05 eveo nope
22:05 eveo u: ∖
22:05 unicodable6 eveo, U+2216 SET MINUS [Sm] (∖)
22:05 eveo Looks very different from \ on my font
22:05 TEttinger my font shows them as identical... that's a homograph attack waiting to happen
22:06 jnthn Mine doesn't render them... :/
22:06 eveo hah
22:06 eveo Yeah, hide your sets! They might get divided :P
22:06 jnthn Pretty sure my other machine gets them right :)
22:06 rouking m: (1, 2, 3) ∖ (1)
22:06 camelia rakudo-moar bba6de: OUTPUT: «WARNINGS for <tmp>:␤Useless use of "∖" in expression "(1, 2, 3) ∖ (1)" in sink context (line 1)␤»
22:06 TEttinger https://en.wikipedia.org/wiki/IDN_homograph_attack
22:06 rouking m: say (1, 2, 3) ∖ (1)
22:06 camelia rakudo-moar bba6de: OUTPUT: «set(3, 2)␤»
22:07 TEttinger it's just silly that unicode even hs that as an option
22:07 eveo jnthn: Failure.self => { self!throw unless $!handled; self } yey or nay? :)_
22:07 rouking is there a way of doing it without special chars
22:07 rouking oh (-)
22:07 eveo So you could do `has $.some-value = 'blah'.IO.mkdir.self;` and have it explode right there and then if it is a falure
22:07 rouking m: say (1, 2, 3, 4) (-) (2, 4)
22:07 camelia rakudo-moar bba6de: OUTPUT: «set(1, 3)␤»
22:07 rouking nice
22:08 eveo rouking: yeah, (almost) all the special chars have alternatives: https://docs.perl6.org/language/unicode_texas.html
22:08 jnthn eveo: Hmmmm...but is there a method self outside of Failure, for if the value is fine?
22:08 eveo jnthn: Mu.self returns self
22:08 eveo m: dd 42.self
22:08 jnthn m: say 42.self
22:08 camelia rakudo-moar bba6de: OUTPUT: «42␤»
22:08 camelia rakudo-moar bba6de: OUTPUT: «42␤»
22:08 eveo lol
22:09 jnthn I think that seems fine enough
22:09 eveo cool
22:09 jnthn m: sub f { fail 'oops' }; say f().item
22:09 camelia rakudo-moar bba6de: OUTPUT: «oops␤  in sub f at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
22:09 jnthn m: sub f { fail 'oops' }; say f().item.WHAT
22:09 camelia rakudo-moar bba6de: OUTPUT: «(Failure)␤»
22:09 jnthn Yeah, .item does The Other Thing
22:09 jnthn So we're not removing the choice :)
22:11 pmurias m: my sub bar() {};my multi foo(int $foo) {456;}; say foo(123)
22:11 camelia rakudo-moar bba6de: OUTPUT: «456␤»
22:12 pmurias jnthn: ^^ I should fix that?
22:12 pmurias * should I fix that?
22:13 mcmillhj joined #perl6
22:13 jnthn pmurias: Ah, that's the one what with --optimize=0 the dispatch fails?
22:14 pmurias yes
22:14 pmurias m: my sub bar() {};my multi foo(int $foo) {bar(); 456;}; say foo(123)
22:14 camelia rakudo-moar bba6de: OUTPUT: «Cannot resolve caller foo(Int); none of these signatures match:␤    (int $foo)␤  in block <unit> at <tmp> line 1␤␤»
22:14 jnthn Yeah, I think that's an accident :)
22:14 jnthn I suspect it inlines the first
22:14 jnthn And not the second
22:15 Cabanossi joined #perl6
22:15 pmurias I'll fixed that after some sleep, good night everyone
22:15 jnthn 'night
22:19 mcmillhj joined #perl6
22:19 AlexDaniel m: my $aaa = 42; my $aаa = 69; say $aaa × $aаa
22:19 camelia rakudo-moar bba6de: OUTPUT: «2898␤»
22:20 AlexDaniel TEttinger: ↑ basically any language that supports non-ascii characters in identifiers
22:20 TEttinger heh true
22:20 TEttinger it's mostly a quirk of unicode I guess
22:22 TEttinger m: my $a = 42; my $a = 69; say $a × $a
22:22 camelia rakudo-moar bba6de: OUTPUT: «5===SORRY!5===␤Bogus postfix␤at <tmp>:1␤------> 3my $a = 42; my $a7⏏5 = 69; say $a × $a␤    expecting any of:␤        constraint␤        infix␤        infix stopper␤        postfix␤        statement end␤        statement…»
22:22 eveo left #perl6
22:22 TEttinger aw
22:22 TEttinger JVM allows BOM in identifiers
22:22 TEttinger j: my $a = 42; my $a = 69; say $a × $a
22:22 camelia rakudo-jvm bba6de: ( no output )
22:23 TEttinger odd
22:23 jnthn In .Net it's quite common to use e for the name of a caught exception. But it's also common to use it as the name for an event in an event handler. I noticed that you could use е for one and e for the other. :P
22:25 El_Che jnthn: isn't e the thing you're suppose to ignore in Java? :)
22:26 mcmillhj joined #perl6
22:27 jnthn All I know is NIO is the thing I *wish* I could ignore in Java :P
22:32 El_Che jnthn: there is nio2
22:34 cdg_ joined #perl6
22:40 geekosaur joined #perl6
22:42 mcmillhj joined #perl6
22:49 mcmillhj joined #perl6
22:49 Actualeyes joined #perl6
22:55 TimToady joined #perl6
22:57 greatflamingfoo joined #perl6
23:11 raschipi joined #perl6
23:18 Actualeyes joined #perl6
23:19 greatflamingfoo I'm having some problems overriding ws in a grammar. It's causing an otherwise matching sting to not match and I don't know why. https://gist.github.com/anonymous/6a0cfa870759761d18aa365784984869
23:20 skids joined #perl6
23:21 chansen_ joined #perl6
23:21 rodarmor joined #perl6
23:22 bioduds Hello, friends. My module is ready to upload. https://github.com/bioduds/EC-Grammars-DIG Can someone please help me to upload it?
23:30 BenGoldberg joined #perl6
23:30 Cabanossi joined #perl6
23:30 Actualeyes joined #perl6
23:30 AlexDaniel bioduds: you should create a pull request for https://github.com/perl6/ecosystem
23:30 bioduds Let me do it AlexDaniel, can you please guide me?
23:31 bioduds I clicked on New Pull request
23:32 bioduds now I don't know what to do
23:33 AlexDaniel bioduds: I think this guide should give enough information: https://docs.perl6.org/language/modules.html#Distributing_Modules
23:33 AlexDaniel bioduds: but possibly not
23:33 AlexDaniel “Create a PR on ecosystem adding your module to META.list, or ping someone on IRC (#perl6 at freenode) to get help having it added.”
23:33 bioduds I read that already, and it actually says there go to the irc to get help to upload, lol
23:33 AlexDaniel well, that doesn't really help :)
23:33 AlexDaniel yeah
23:34 bioduds nope, lol
23:34 raschipi bioduds: Open the META.list file and click in the pencil icon in the top right
23:34 AlexDaniel bioduds: well, you just have to change the META.list list file and add a link to your repo
23:34 AlexDaniel you can do it on github directly just like raschipi said
23:34 raschipi Then add a link to the raw meta6.json in you module at the end.
23:34 bioduds oh, quite easy
23:35 bioduds that's it?
23:35 AlexDaniel or, you can fork it, then clone the repo, change the file, commit it, push it, and then make a pull request :)
23:35 raschipi Then submit and it will be a PR
23:35 raschipi AlexDaniel: Clicking in the pencil will fork it automatically.
23:35 AlexDaniel yes-yes, I'm just talking about a harder way…
23:36 AlexDaniel the pencil should submit a pull request automatically too I think, no?
23:36 * AlexDaniel is definitely not a pencil guy
23:36 bioduds so I just paste the git address there in?
23:36 AlexDaniel bioduds: well, similarly to other links there, yeah
23:36 bioduds to the META5.json?
23:36 raschipi bioduds: It should look like the other links, with the "raw." at the start.
23:36 AlexDaniel bioduds: yes
23:37 raschipi Doesn't send the PR automatically, no.
23:37 bioduds great
23:37 bioduds done
23:38 bioduds Should it list on modules.perl6.org automatically?
23:38 AlexDaniel I see no PR yet
23:38 AlexDaniel bioduds: yes, once the PR is there and once somebody merges it, it should appear
23:39 bioduds great, thanks
23:39 bioduds I hope my efforts help the ecosystem
23:39 AlexDaniel wait but, there's no PR yet :)
23:41 raschipi bioduds: You changed just your own copy of the file. That's what git is all about, after all.
23:41 raschipi Now you need to send a special message in github so people can pull your changes.
23:41 AlexDaniel raschipi: I don't think he did, not yet: https://github.com/bioduds/ecosystem/commits/master
23:42 ergaerfjngoaiwef joined #perl6
23:42 AlexDaniel ah, I see
23:42 AlexDaniel patch-1 branch
23:42 ergaerfjngoaiwef left #perl6
23:42 raschipi Yeah, I'm looking at his repo and I don't see the changes.
23:43 ergaerfjngoaiwef joined #perl6
23:43 AlexDaniel no, the change is there: https://github.com/bioduds/ecosystem/commit/6e8f335db0cdaf9921621b6ca49765df61c1be9e
23:44 raschipi Did it for you
23:45 raschipi Ops, no you need to accept the terms...
23:45 raschipi Then send it to the main ecosystem
23:46 mcmillhj joined #perl6
23:47 raschipi bioduds, now go back to https://github.com/perl6/ecosystem and click the "Create pull request" button
23:48 raschipi "New Pull Request", even
23:49 raschipi Then the link "compare across forks" at the top. Find your own copy in the box in the left.
23:50 raschipi The second box is the patch-1 branch github created for you

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

Perl 6 | Reference Documentation | Rakudo