Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-12-17

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 geekosaur perl 5 doesn't have true global variables either.
00:01 pmurias what are "true" global variables?
00:01 RabidGravy there are variables that can aooear to be glocal
00:01 geekosaur the special-character variables are special cased; anything else not "my" is a package variable (with "our" creating both a package variable and a lexical alias for it)
00:03 RabidGravy m: package FF { PROCESS::<$FOO> = "bar" }; say $*FOO;
00:03 camelia rakudo-moar 702186: OUTPUT«bar␤»
00:03 kcodrgkimd Ok Im back, so when I generate a list like so `my $somelist = (1, 2, &foo ... ^ * > 100)` where `sub foo($x) { $x²}` it will advance the sequence by squaring the same number. Is it possible to define a "step" here, like +1, so that it will square 1,2,3,4,5.. etc. ? Sorry for my bad vocabulary.
00:03 RabidGravy but you don't want to do that
00:03 geekosaur pmurias, neither lexical nor constrained by a namespace (package in p5 or p6). p6 has a hierarchy of scopes instead, and in theory you could treat the outermost (or outermost few) as "global"
00:05 loveperl If I have a variable in another file, how can I reference it?
00:05 RabidGravy too vague
00:06 RabidGravy you can't reference a 'my' variable at all
00:07 RabidGravy an 'our' variable you can reference fully qualified by package
00:07 RabidGravy or dynamic variables like $*FOO which are by, er, dynamic scope
00:09 RabidGravy read more of https://docs.perl6.org/language.html
00:10 RabidGravy anyway toodles
00:14 loveperl Function 'std' needs parents to avoid gobbling block? what its the error?
00:16 geekosaur show code
00:33 dataf3l joined #perl6
00:34 raiph loveperl: parens, short for parentheses
00:35 SmokeMachine if someone have some time, could, please, critic the code of this branch?
00:39 bpmedley joined #perl6
00:51 dalek specs: 61e3e6c | samcv++ | v6d.pod:
00:51 dalek specs: Add proposal to codify rules on matching brackets
00:51 dalek specs:
00:51 dalek specs: All matched delimiters to should be determined by their
00:51 dalek specs: Unicode properties. I propose two simple rules to adopt
00:51 dalek specs: for uniformity, elegance and clarity.
00:51 dalek specs: review: https://github.com/perl6/specs/commit/61e3e6c6fa
00:54 dalek specs: 7011417 | samcv++ | v6d.pod:
00:54 dalek specs: A few visual formatting changes for the last commit.
00:54 dalek specs: review: https://github.com/perl6/specs/commit/7011417670
00:55 samcv i think the final rules I settled on are quite good: https://github.com/perl6/specs/blob/master/v6d.pod#formal-rules-for-defining-matched-delimitersbrackets
00:57 AlexDaniel samcv++
00:58 aborazmeh joined #perl6
00:58 aborazmeh joined #perl6
00:59 pyrimidine joined #perl6
01:06 dj_goku joined #perl6
01:31 hank joined #perl6
01:34 BenGoldberg joined #perl6
01:40 hank Hi I'm totally new to perl and perl6. Would someone be willing to review some code I wrote? It's 50 lines and uses a grammar and action object to parse and evaluate simple math expressions. Tips or style comments would be great. I'm not sure if I'm using action objects idiomatically. Thanks. http://pastebin.com/p8702D7J
01:42 vendethiel- joined #perl6
01:44 AlexDaniel hank: it looks great
01:45 AlexDaniel there are tiny things that can be improved, probably, but I see no significant problems
01:45 AlexDaniel I did not really look at actions thought :)
01:46 hank AlexDaniel: Thanks! Is there a way I can reduce the code duplication in lines 30-41?
01:48 AlexDaniel not really
01:48 AlexDaniel m: my %h = ‘+’ => &[+], ‘-’ => &[-]; say (25, 30, 50).reduce(%h<+>)
01:48 camelia rakudo-moar 702186: OUTPUT«105␤»
01:48 AlexDaniel you can do something like this, but honestly it will just make it harder to read
01:49 TimToady I'd make those single-line blocks, so the whole thing is just 4 lines
01:49 dalek doc: f705a6f | (Zoffix Znet)++ | doc/Language/testing.pod6:
01:49 dalek doc: Reword `is-deeply`
01:49 dalek doc:
01:49 dalek doc: Do not say it uses `eqv` operator. What it uses is an internal detail.
01:49 dalek doc:
01:49 synopsebot6 Link: http://doc.perl6.org/language/testing
01:49 dalek doc: Addresses https://rt.perl.org/Ticket/Display.html?id=130362
01:49 dalek doc: review: https://github.com/perl6/doc/commit/f705a6fe00
01:49 AlexDaniel hank: one thing I tend to do is $<smth>».made
01:49 AlexDaniel not sure if there are any pitfalls associated with this, hmm…
01:50 hank What are those >> things called?
01:50 TimToady the other thing is that it looks like you don't allow spaces after an operator, since there isn't space in the rule after <op()> but before }
01:50 TimToady hypers
01:50 TimToady seems strange to allow spaces after terms but not after operators
01:51 hank Okay I see, I found the documentation on them
01:52 hank Hmm, so I would add \s* after <op()> to allow whitespace?
01:52 AlexDaniel hank: perhaps make exp a multi method
01:52 AlexDaniel <.ws> probably
01:52 TimToady it's in a rule, just add a normal space and it implies <.ws>
01:52 AlexDaniel ah, right
01:52 TimToady change <>} to <> }
01:53 hank So if there's a space between tokens in a rule, they'll skip over whitespace when matching?
01:53 TimToady nice use of parameterized subrules
01:53 hank Yeah I stole that from the Grammar tutorial and modified it
01:53 TimToady more specifically, space after any matching token
01:53 hank That's nifty
01:53 TimToady oh, if you want to allow space at the start, make your TOP a rule too, so that ^ looks for ws after it
01:54 labster joined #perl6
01:54 TimToady so inital space doesn't count, but the space after ^ would (if it were a rule)
01:54 hank Ah yes
01:54 TimToady since ^ is the first match
01:54 hank I see
01:54 TimToady the $ is somewhat unnecessary though, since .parse enforces that anyway
01:55 TimToady (and you're not relying on backtracking)
01:55 hank Okay, yeah, good to know
01:55 TimToady (to not enforce that, you'd use subparse instead)
01:55 AlexDaniel if I recall correctly it doesn't matter nowadays
01:55 TimToady the reason it's only ws after a matcher is that otherwise we can't actually do longest token matching on alternations
01:56 TimToady 'cuz half the tokens would start with \s* or so :)
01:56 TimToady so it's only trailing spaces that are auto-eaten
01:57 hank AlexDaniel: you said I could make exp a multimethod? How would I get it to pattern match on my conditions properly?
01:57 dataf3l joined #perl6
02:00 AlexDaniel hank: ($/ where { not $<exp> }), ($/ where { $<exp> and $<exp>.elems <= 1 }), and another one without where. Probably. Not sure if it will be significantly better this way, but at least you'd get rid of returns :)
02:01 hank So a where inside the parenthesis where the arguments go will do dynamic dispatch?
02:01 AlexDaniel yea
02:01 hank Okay, cool, I'm gonna try that
02:02 hank So many features in perl6 :^)
02:02 AlexDaniel hank: also, it seems like you're trying to calculate the result right away. I'm not sure what your final goal is, but perhaps you want to generate an AST?
02:03 pyrimidine joined #perl6
02:03 hank My eventual goal is to implement the 24 game (and a 24 game solver to ensure winning is always possible). I don't think I need an AST, but how would I make a tree structure in perl6? Nested hashes?
02:04 hank https://en.wikipedia.org/wiki/24_Game
02:05 AlexDaniel hank: That would be a bit messy. I'd create a couple of classes
02:06 hank So an AST class that contains children which are also ASTs?
02:06 rburkholder joined #perl6
02:07 AlexDaniel node class, yeah
02:07 AlexDaniel but if you don't need it then ????
02:09 hank Okay, I see. Thanks for all your help!
02:09 hank This is a really cool language
02:14 ugexe i dare you to post that on reddit
02:15 geekosaur (...you expect something else from reddit?)
02:17 BenGoldberg joined #perl6
02:25 BenGoldberg joined #perl6
02:27 FROGGS joined #perl6
02:31 pyrimidine joined #perl6
02:47 ilbot3 joined #perl6
02:47 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!
03:06 noganex joined #perl6
03:16 cooper_ joined #perl6
03:38 pyrimidine joined #perl6
03:39 bjz joined #perl6
03:46 dalek doc: 54ce95c | MasterDuke17++ | doc/Language/performance.pod6:
03:46 dalek doc: Update performance.pod6
03:46 dalek doc: review: https://github.com/perl6/doc/commit/54ce95c57d
03:46 synopsebot6 Link: http://doc.perl6.org/language/performance
04:04 Herby_ joined #perl6
04:04 Herby_ o/
04:07 bob777 joined #perl6
04:08 aborazmeh joined #perl6
04:08 aborazmeh joined #perl6
04:27 bjz_ joined #perl6
04:34 xtreak joined #perl6
05:00 leego joined #perl6
05:03 leego joined #perl6
05:05 cibs joined #perl6
05:33 pyrimidi_ joined #perl6
05:45 Cabanossi joined #perl6
05:50 raiph joined #perl6
05:54 susmus joined #perl6
05:56 geekosaur joined #perl6
06:00 rurban joined #perl6
06:38 samcv anybody here knowledgeable about NativeCall? I need to set a libraries variable to a pointer, this pointer needs to point to a function that the program will call
06:38 samcv so I need a way to set the libraries variable to a pointer, and that pointer must call a Perl 6 sub with a string as the 1st argument and an integer as the second argument
06:39 samcv if somebody can figure it out, I can hopefully add completion to Readline REPL for rakudo
06:39 mr-foobar joined #perl6
06:53 BenGoldberg joined #perl6
06:53 samcv oh hey i think i figured it out… let me see
06:55 darutoko joined #perl6
06:55 Ben_Goldberg joined #perl6
06:55 rurban joined #perl6
07:04 BenGoldberg joined #perl6
07:04 samcv Writing to C globals NYI. lame
07:09 moritz patches welcome :-)
07:11 * samcv has no clue how NativeCall even works
07:11 samcv I know C, but not sure how it actually… does its magic
07:12 samcv unless it's not as crazy as I'm thinking it is?
07:18 labster joined #perl6
07:24 pierre_ joined #perl6
07:24 pierre_ joined #perl6
07:29 cibs joined #perl6
07:35 xtreak joined #perl6
07:42 Tonik joined #perl6
07:43 _28_ria joined #perl6
08:06 moritz jnthn++ # advent post
08:08 nige_ joined #perl6
08:08 nige_ hi
08:13 moritz ho
08:13 nige1 joined #perl6
08:14 nige1 need a bit of help for my advent entry this year
08:14 nige1 i need to strip some control characters out of a string
08:15 nige1 cargo culting this rosettacode answer causes a warning to appear ...
08:15 nige1 https://rosettacode.org/wiki/Strip_control_codes_and_extended_characters_from_a_string#Perl_6
08:16 nige1 any ideas on the right way to do this now?
08:18 samcv you need to remove control characters? just strip them?
08:18 samcv deos that not work?
08:18 samcv what is the error?
08:18 samcv m: my $str = (0..400).roll(80)».chr.join; say $str.subst(/<[ ^@..^_ ]>/, '', :g);
08:18 camelia rakudo-moar 4d6854: OUTPUT«Potential difficulties:␤    Repeated character (^) unexpectedly found in character class␤    at <tmp>:1␤    ------> 0).roll(80)».chr.join; say $str.subst(/<7⏏5[ ^@..^_ ]>/, '', :g);␤ŜŻsuŇŨÊĦÆŐ³ĥ«ŧٖŭŷÉ®Ł{‚þŲŔbmŝ…»
08:20 samcv @ to ^ will also pick ones that are letters?
08:21 samcv or do you want that?
08:21 TEttinger isn't the leading ^ negate the character class?
08:21 TEttinger or is that different in p6?
08:22 samcv m: my $str = (0..400).roll(80)».chr.join; say $str.subst(/<[^@..^_ ]>/, '', :g);
08:22 camelia rakudo-moar 4d6854: OUTPUT«Potential difficulties:␤    Repeated character (^) unexpectedly found in character class␤    at <tmp>:1␤    ------> 0).roll(80)».chr.join; say $str.subst(/<7⏏5[^@..^_ ]>/, '', :g);␤űĀŸ
08:22 samcv it's not in p6...
08:22 samcv m: my $str = (0..400).roll(80)».chr.join; say $str.subst(/<![@..^_ ]>/, '', :g);
08:22 camelia rakudo-moar 4d6854: OUTPUT«êӕñúţĘ̙ªâ-Ō¢ç“�ôÆøŻõ¬ŮĸŎß éųœƂ�¶ŤóĂŊñïē�5ùˆö-ĆkŕuÓĂƈ>ĵŎŽd�²ľŒ�ĩ§Úį�·�»
08:22 nige1 yes - that's the error I see
08:22 TEttinger roll is random, right?
08:22 samcv m: my $str = (0..400).roll(80)».chr.join; say $str.subst(/<-[@..^_ ]>/, '', :g);
08:22 camelia rakudo-moar 4d6854: OUTPUT«EYRI␤»
08:22 samcv there you go
08:23 samcv m: my $str = (0..400).roll(80)».chr.join; say $str.subst(/< -[@..^_ ] >/, '', :g);
08:23 samcv oopsie
08:23 samcv m: my $str = (0..400).roll(80)».chr.join; say $str.subst(/<- [@..^_ ] >/, '', :g);
08:23 camelia rakudo-moar 4d6854: OUTPUT«[TUDENH␤»
08:24 TEttinger interesting that it's only gotten upper case so far. is ^ before the lower case ASCII?
08:24 samcv in perl 6 <  > form a token, so you negate the stuff. it works for like <-Alpha>
08:24 samcv idk why you're doing that tho
08:25 samcv m: my $str = (0..400).roll(80)».chr.join; say $str.subst(/<- [\x[0]..\x[1F]\x[78] ] >/, '', :g);
08:25 camelia rakudo-moar 4d6854: OUTPUT«        ␤»
08:25 samcv erm
08:25 TEttinger if you just wanted to strip control characters from a string, couldn't you match \P{C} (in unicode PCRE syntax)?
08:25 samcv oh it goes to 400?
08:25 samcv m: my $str = (0..400).roll(80)».chr.join; say $str.subst(/< [\x[0]..\x[1F]\x[78] ] >/, '', :g);
08:25 camelia rakudo-moar 4d6854: OUTPUT«ÁA␀ƉŽÝ´Íţ
08:26 samcv m: my $str = (0..400).roll(80)».chr.join; say $str.subst(/< [\x[0]..\x[1F]\x[7F]..\x[FFFF] >/, '', :g);
08:26 camelia rakudo-moar 4d6854: OUTPUT«ůƌıd`ùåØŲŊşŢčŁ¼>ƆĈŦ\ŊĥÀÕÔħ¬ĪŅƆƎ>þ‰¦Ú|Ăķ|ČĤĴĐ(öý@¶½êƇ?áŇþđčĬŀvIJhÀťÙwéě̜ó4<␤»
08:26 samcv m: my $str = (0..400).roll(80)».chr.join; say $str.subst(/< [\x[0]..\x[1F]\x[78]..\x[FFFF] >/, '', :g);
08:26 camelia rakudo-moar 4d6854: OUTPUT«Ķêr3”bN’š§ôŐťƋ␤ÎŨŽĥďðuāğť^Ň÷"u7"ęL‘œíşĬďĩ”Ěũiµ×ÚJâšZŇĸŗűņ›ŕRÉŃļûDëäƎ”ŧ–EÅă␤»
08:26 samcv m: my $str = (0..400).roll(80)».chr.join; say $str.subst(/<- [\x[0]..\x[1F]\x[78]..\x[FFFF] >/, '', :g);
08:26 camelia rakudo-moar 4d6854: OUTPUT«5===SORRY!5===␤Unrecognized regex metacharacter < (must be quoted to match literally)␤at <tmp>:1␤------> 3.subst(/<- [\x[0]..\x[1F]\x[78]..\x[FFFF7⏏5] >/, '', :g);␤Unrecognized regex metacharacter - (must be quoted to match literally)␤a…»
08:27 samcv m: my $str = (0..400).roll(80)».chr.join; say $str.subst(/<- [\x[0]..\x[1F]\x[78]..\x[FFFF] ]>/, '', :g);
08:27 camelia rakudo-moar 4d6854: OUTPUT«“žĘ¾ŎŞĨŇ�øƃ�ÙÄŚƎŞÖß�ėƃĮĎχô³á°ų—śí¹ ĪŀŴ��ŒÙĪĬƋ³£ÒŠ�óŘöƌĒ»Ŗ®�»
08:27 samcv m: my $str = (0..400).roll(80)».chr.join; say $str.trans(/<- [\x[0]..\x[1F]\x[78]..\x[FFFF] ]>/, '', :g);
08:27 camelia rakudo-moar 4d6854: OUTPUT«Only Pair objects are allowed as arguments to Str.trans, got Regex␤  in block <unit> at <tmp> line 1␤␤»
08:27 samcv m: my $str = (0..400).roll(80)».chr.join; say $str.trans(/<- [\x[0]..\x[1F]\x[78]..\x[FFFF] ]>/ => '', :g);
08:27 camelia rakudo-moar 4d6854: OUTPUT«µzĮŞ·ŠóĘĨįūıƆĶĒyť�ś¶İˆĈ��ęěðŕĤć§ŨƇśő�äöŊÒé‘ÅÊ�ŋêłIJÀ��»
08:27 xtreak joined #perl6
08:27 samcv m: my $str = (0..400).roll(80)».chr.join; say $str.trans(/<[\x[0]..\x[1F]\x[78]..\x[FFFF] ]>/ => '', :g);
08:27 camelia rakudo-moar 4d6854: OUTPUT«p62AQ*e^5rs6atlluI>r@QN`jMsvK␤»
08:28 samcv i think that's what you want
08:28 cibs joined #perl6
08:33 nige1 thanks for you suggestions - sadly it's still no worky here
08:33 samcv i mean what are you actually trying to do
08:33 nige1 s/you/your/
08:33 samcv what do you want to keep
08:33 samcv do you only want ascii letters?
08:33 nige1 I'm trying to parse the error output of perl 6
08:34 samcv do you want &^%$$ signs?
08:34 samcv oh
08:34 samcv i have a perl 6 module ;)
08:34 samcv well it converts the ansi color to irc coloring
08:34 nige1 oh - can you show?
08:34 samcv yes
08:34 samcv https://github.com/samcv/IRC-TextColor
08:34 xtreak joined #perl6
08:35 samcv could probably be a bit more elegant but i'm just impressed i actually got it working tbh
08:36 nige1 nice
08:36 samcv doing foreground _and_ background colors ....
08:36 samcv and dealing with the asci codes... some have leading zeros
08:36 samcv for the numbers
08:36 nige1 it looks like it preserves colours - in this case I wanna strip away the colour creating codes
08:36 samcv oh
08:36 samcv there's a module for that
08:36 samcv Terminal::ANSI
08:37 samcv stripcolors is the routine from that you want
08:37 samcv or you could do it yourself
08:37 samcv look at my ansi-to-irc since it will be a lot easier to understand... than the magic going on in the other one
08:37 samcv nige1, so you don't care about preserving state?
08:37 samcv just want to get rid of it?
08:38 nige1 yes
08:38 nige1 for example the program .... say "hello" say "world";
08:38 nige1 there is a missing ; there
08:39 nige1 perl6 will helpfully point out the location - and some of the console output is 'marked up' with highlighting colours
08:39 nige1 (normally I like this - just need it in plain text though on this occasion)
08:40 samcv my $escape = "\e[";
08:40 samcv my $end = 'm';
08:40 samcv and then between the $escape and $end is a number
08:40 samcv 0-9
08:40 samcv the \e in the "" will interpolate to the escape control code
08:41 samcv $string ~~ s:g/$escape\d+?$end//;
08:41 samcv that should probably do the trick
08:41 nige1 sec - gonna give it a whirl
08:42 wamba joined #perl6
08:44 samcv m: my $s = "\e[99mtext test \x[0m text"; $escape = "\e["; $string ~~ s:g/$escape\d+?m//; say $string;
08:44 camelia rakudo-moar 8940dc: OUTPUT«5===SORRY!5===␤Unrecognized backslash sequence: '\x'␤at <tmp>:1␤------> 3my $s = "\e[99mtext test \x[07⏏5m text"; $escape = "\e["; $string ~~ s:g␤Variable '$escape' is not declared␤at <tmp>:1␤------> 3my $s = "\e[99mtext test \x[0m t…»
08:44 samcv m: my $s = "\e[99mtext test \e[0m text"; $escape = "\e["; $string ~~ s:g/$escape\d+?m//; say $string;
08:44 camelia rakudo-moar 8940dc: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '$escape' is not declared␤at <tmp>:1␤------> 3my $s = "\e[99mtext test \e[0m text"; 7⏏5$escape = "\e["; $string ~~ s:g/$escape\␤»
08:44 samcv m: my $s = "\e[99mtext test \e[0m text"; my $escape = "\e["; $string ~~ s:g/$escape\d+?m//; say $string;
08:44 camelia rakudo-moar 8940dc: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '$string' is not declared. Did you mean 'Stringy'?␤at <tmp>:1␤------> 3t test \e[0m text"; my $escape = "\e["; 7⏏5$string ~~ s:g/$escape\d+?m//; say $stri␤»
08:44 samcv m: my $s = "\e[99mtext test \e[0m text"; my $escape = "\e["; $s ~~ s:g/$escape\d+?m//; say $string;
08:44 camelia rakudo-moar 8940dc: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '$string' is not declared. Did you mean 'Stringy'?␤at <tmp>:1␤------> 3 = "\e["; $s ~~ s:g/$escape\d+?m//; say 7⏏5$string;␤»
08:45 samcv m: my $s = "\e[99mtext test \e[0m text"; my $escape = "\e["; $s ~~ s:g/$escape\d+?m//; say $s;
08:45 camelia rakudo-moar 8940dc: OUTPUT«text test  text␤»
08:45 samcv ugh i'm tired. but it works
08:45 nige1 bingo - that did the trick :-)
08:45 nige1 thanks - much appreciated
08:45 samcv no problem :)
08:46 samcv can there be more than one advent per day?
08:46 samcv or is that not allowed ;P
08:47 lizmat I think traditionally, there's only 1 per day
08:47 lizmat and since this is a tradition  :-)
08:47 samcv could we extend into the new year? or more than one a day?
08:47 samcv whatever people think is good.
08:47 lizmat samcv: if you have a blog post, I will mention it in the next P6W, just like the advents ?
08:47 samcv i don't yet
08:48 lizmat well, I would be all for infinite advent, with one blog post per day until the end of time
08:48 nige1 would be happy to link to said post from the advent entry if it relates
08:49 lizmat but I'm afraid we will run out of posters / subjects in a year or 3  :-)
08:49 samcv hah
08:49 samcv i could probably make something about unicode properties and other things such as that. and the syntax highlighter isn't exactly perl 6 so doesn't really fit. or could make something else up
08:51 samcv can we do regex matches for unicode properties other than general category btw?
08:51 samcv in perl apparently you can do \p{Script=Hebrew}
08:51 samcv and it wil match the requested property
08:52 lizmat samcv: you can add any piece of code as a matcher, afaik
08:53 samcv ok i think i found it. going through the synopsis
08:55 samcv yeah that's what i thought you could do, i just haven't used it before. but i should tbh
08:56 lizmat hmmm... can't find the syntax for that in the docs  :-(
08:56 samcv i'm not sure if this works though…
08:57 samcv well at least for all the properties. even with full names
08:59 lizmat m: say "a".match( / . <?{ False }> / )'
08:59 camelia rakudo-moar 8940dc: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3say "a".match( / . <?{ False }> / )7⏏5'␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤        st…»
08:59 lizmat m: say "a".match( / . <?{ False }> / )
08:59 camelia rakudo-moar 8940dc: OUTPUT«Nil␤»
09:00 samcv ok wait maybe it works
09:00 samcv i need to check some things
09:00 lizmat m: say "a".match( / . <!{ True }> / )
09:00 camelia rakudo-moar 8940dc: OUTPUT«Nil␤»
09:01 mr-foobar joined #perl6
09:01 samcv m: say "11test" ~~ /  <:!Age<1.1>> /
09:01 camelia rakudo-moar 8940dc: OUTPUT«Nil␤»
09:01 samcv :(
09:01 samcv doesn't seem to work for arbitrary properties
09:01 wamba joined #perl6
09:02 samcv m: 'a'.uniprop('Script')
09:02 camelia rakudo-moar 8940dc: ( no output )
09:02 samcv m: 'a'.uniprop('Script').say
09:02 camelia rakudo-moar 8940dc: OUTPUT«Latin␤»
09:02 samcv m: 'a' ~~ / <:Script<Latin>>/
09:02 camelia rakudo-moar 8940dc: ( no output )
09:02 samcv m:say  'a' ~~ / <:Script<Latin>>/
09:02 samcv m: say  'a' ~~ / <:Script<Latin>>/
09:02 camelia rakudo-moar 8940dc: OUTPUT«「a」␤»
09:02 samcv hm
09:02 xtreak joined #perl6
09:03 samcv m: say '-a-' ~~ / <:Case_Ignorable> /
09:03 camelia rakudo-moar 8940dc: OUTPUT«Nil␤»
09:04 toolforger joined #perl6
09:04 Vynce joined #perl6
09:05 toolforger Hiya
09:05 samcv lizmat, how do i find where in the code handles the unicode properties for the tokens or whatever
09:05 lizmat samcv: I have no pointer other than saying "somwehere in src/Perl6/Grammar|Actions|World
09:06 * lizmat is a relative grammar noob
09:06 samcv yeah. that's what i thought
09:06 samcv but it's thousands of lines long. there's some bot that can do something…
09:07 samcv SourceBaby, help
09:07 SourceBaby samcv, Use s: trigger with args to give to sourcery sub. e.g. s: Int, 'base'. See http://modules.perl6.org/dist/CoreHackers::Sourcery
09:08 samcv ok actions is 9700 lines long :P haha
09:09 toolforger What repo is the Perl6 tree in?
09:09 * toolforger has only nqp
09:10 tadzik perhaps you're thinking of rakudo?
09:10 lizmat https://github.com/rakudo/rakudo.git
09:10 toolforger got it
09:15 rindolf joined #perl6
09:16 toolforger opener in Grammar is already pretty sick
09:16 toolforger a long list of binary codes without any reference to what they are, or why they "don't make sense to go in HLL::Grammar"
09:17 toolforger s/binary code/Unicode code points/
09:17 samcv are you looking at nqp?
09:17 samcv or rakudo
09:17 toolforger rakudo
09:17 toolforger just eyeballing the code for the first time :-/
09:18 samcv which file is that?
09:18 samcv grammar.nqp?
09:18 toolforger rakudo/Perl6/Grammar.nqp
09:18 samcv ah k
09:19 samcv u: 0xFF62
09:19 unicodable6 samcv, Found nothing!
09:19 samcv u: U+FF62
09:19 unicodable6 samcv, U+FF62 HALFWIDTH LEFT CORNER BRACKET [Ps] (「)
09:19 samcv yeah that's what i thought they were
09:19 toolforger Issue with the approach is that Unicode keeps adding new codepoints, so it's going to be updating and rechecking that list with every new Unicode revision
09:19 toolforger u: U+0028
09:19 unicodable6 toolforger, U+0028 LEFT PARENTHESIS [Ps] (()
09:20 samcv toolforger, https://github.com/perl6/specs/blob/master/v6d.pod#formal-rules-for-defining-matched-delimitersbrackets i just put this up
09:20 samcv proposed rule change for 6.d
09:20 rurban joined #perl6
09:21 toolforger Yeah, sticking with a category is much less maintenance-intense
09:21 samcv yeah
09:21 RabidGravy joined #perl6
09:21 samcv i actually made a test to locate every Ps/Pe or Pi/Pf character. and that's how i discovered that… the ornate parens
09:22 samcv 'problem'
09:22 samcv and also added the missing parens we didn't have to NQP project. so hopefully we can just remove those
09:22 toolforger I wouldn't expect more problems like that to pop up in the future, so adding some extra code for that would be okay in my book
09:23 samcv but the left ornate paren looks like a left paren but is the closing symbol
09:23 toolforger Well, that's confusables
09:23 samcv it was originally a RTL codepoint, but it's not a poir and doesn't reverse
09:23 samcv exactly
09:23 samcv it's just one clusterfuck
09:23 samcv and most text editors don't even render it correctly
09:23 toolforger To deal with confusables, you need to have a programmer-friendly font
09:24 samcv they're basically terrible and should never be used ;)
09:24 toolforger so it's not just editors
09:24 samcv well toolforger
09:24 samcv they're literally reversed
09:24 samcv but don't mirror differently in LTR or RTL text
09:24 samcv so it just is horrible
09:25 samcv everything else is fine though ;)
09:25 samcv i wonder if i can just search github for any perl files using those files cause there probably is just roast
09:25 toolforger Issue here is that we need somebody with Arabic knowledge to see how they deal with it
09:25 samcv they don't use them
09:26 samcv they just use normal parens, which just conform to the direction of the text they contain
09:26 samcv no matter if they type latin things or RTL text
09:27 toolforger Well, *somebody* was using them, else they wouldn't be in Unicode
09:27 samcv yeah. somebody. and only for RTL text not mixed
09:27 samcv also fyi. numbers inside RTL text are rendered LTR
09:27 toolforger I never looked into bidi rule details
09:28 * toolforger values his sanity
09:28 samcv yeah i've been making lots of fixes to the rakudo .uniprop and implemented .uniprops method/routine just this last month
09:28 samcv and been adding tons of tests to roasts for it.
09:28 toolforger I can imagine
09:28 samcv it starts out really crazy. but. it's becoming less hard as time goes on
09:28 samcv (which is a good thing)
09:28 toolforger I know
09:29 toolforger I tackled pluralization
09:29 samcv pluralization?
09:29 toolforger http://cldr.unicode.org/index/cldr-spec/plural-rules
09:30 samcv :)
09:30 toolforger And this: http://www.unicode.org/cldr/charts/29/supplemental/language_plural_rules.html
09:30 toolforger Particularly http://www.unicode.org/cldr/charts/29/supplemental/language_plural_rules.html#comparison if you want to impress people with how many special cases there are
09:31 toolforger Human language is just crazy...
09:31 samcv good thing unicode exists though
09:31 samcv otherwise it would be way harder
09:31 toolforger Nobody would even try getting it right
09:31 samcv well would only get it right for one language ;)
09:32 toolforger on the plus side, all languages would converge towards what programmers would do
09:32 samcv they already sort of have though
09:33 toolforger Well, many would consider that a minus, so... ;-)
09:33 samcv asian languages are usually written LTR now
09:33 samcv instead of top to bottom right to left
09:33 toolforger Oh
09:33 samcv mostly, i mean they used to be a lot of possible directions
09:33 toolforger I thought it's been top-down left-right
09:33 samcv but mostly was top to bottom right to left
09:33 toolforger ah
09:33 toolforger right
09:33 samcv well a lot of languages didn't have a strict direction to write them
09:34 toolforger I bet some lyrics was using unusual directions to express subtext
09:34 samcv some even older ones would be written mirrored when reversing the directions
09:34 samcv or alternate LTR RTL etc
09:34 samcv every other line
09:34 samcv you could probably read and write faster. but i guess it confused people idk
09:34 toolforger I dimly recall that being used in some ruins around the Mediterranean
09:34 samcv egyptian did it too
09:35 toolforger Most people couldn't read anyway
09:35 samcv well. sometimes. i mean. you would read the direction based on which way the symbols faced
09:35 toolforger In Medieval times, it was generally considered to be impossible to read a text without saying it loud
09:35 samcv why
09:35 toolforger It's a separate technique
09:36 toolforger children still do it today when learning to read
09:36 toolforger silent reading comes later
09:36 samcv hmm
09:36 toolforger and of course you never learn it if you don't know it's possible
09:36 samcv i guess that makes sense
09:37 toolforger besides, loud reading helps ignore spelling variations
09:37 toolforger ther were no orthography committees then
09:38 samcv hm this thing http://linguafranca.mirror.theinfo.org/9804/ip.html says that no spaces were really used either
09:38 toolforger matches my knowledge
09:38 samcv i saw the Magna Carta a week ago at a museum. can attest. text was tiny af and like
09:38 samcv no spacing
09:38 samcv also really weird script. could only make out like
09:38 samcv 1 letter lol.
09:39 RabidGravy I had a literature tutor who recommended reading old and middle English texts such as Chaucer out aloud in a sort of northern accent, as it made it easier to unerstand
09:40 toolforger More cultural differences in scripts :-)
09:40 samcv ithinkweshouldalljusttypelikethis
09:40 samcv muchbetterthisway
09:40 toolforger that's how I do my passwords
09:40 samcv makeitharderfortheplebianstoreadwhatwearesaying
09:40 toolforger diceware, but why type spaces...
09:40 toolforger heh
09:40 toolforger I just misread "plebian store"
09:40 samcv hah
09:40 toolforger though "dwhat" didn't parse, I had to backtrack
09:41 samcv yeah that plus different spellings would be so annoying
09:41 toolforger I think that's mostly a matter of practice
09:42 toolforger we deal with ambiguous pronounciation in oral communication every day and don't think much about that
09:42 samcv Clinical tests reveal that the brain processes the reading of spaced text--in which words are essentially digested whole--differently from the syllable-by-syllable decoding of continuous script. In fact, different parts of the brain handle these two tasks: Studies of brain-injured Japanese patients demonstrate that, depending on the site of a cerebral lesion, a person may lose the faculty for reading kanji ideographs, but not Japanese phonetic script,
09:42 samcv which lacks regular word separation--and vice versa. The implication is that, even if early medieval readers of scriptura continua somehow managed to keep their mouths shut, they were performing a mental task fundamentally different from that of contemporary readers.
09:42 samcv ^ that's really interesting
09:42 toolforger Makes sense
09:43 toolforger Comic reading is pretty different from book reading, too
09:43 toolforger particularly if the comic has little text
09:44 toolforger I'll still stick with the reading mode that I have most practice with :-)
09:44 xfix joined #perl6
09:44 toolforger Something entirely different
09:45 toolforger Anybody got ideas about how to best assign packages to NQP-on-JVM classes?
09:46 RabidGravy haven't the faintest
09:47 toolforger Right now everything goes into the root package
09:47 toolforger That's a no-go for Java types
09:47 toolforger Code isn't attributable, and it invites name clashes
09:48 samcv :(
09:48 toolforger so they can't have it
09:48 toolforger NQP could be put into org.perl6.nqp
09:48 toolforger so that's the easy part
09:49 toolforger Not sure about where modules should go
09:49 toolforger the package namespace in Java land is organized along the DNS
09:52 RabidGravy well more along the lines of X500 distinguished names or the thing that ja.net used before the DNS in that particular order :)
09:53 toolforger Nope, it's DNS
09:53 toolforger It's not enforced, so some well-known packages do not adhere to that
09:53 RabidGravy it's the wroong way round for DNS
09:53 toolforger That's just a mechanical change
09:54 toolforger they needed to be hierarchical
09:55 toolforger but the general rule is that if you own foo.com, then you can publish your packages under com.foo.whatever.you.like
09:57 toolforger How do people in Perl land organize their module namespace so there aren't clashes?
10:00 lukaramu joined #perl6
10:00 RabidGravy on a functional basis largely, though in P6 the "long name" takes care of the clashes (if people care to use it,)
10:01 RabidGravy an example would be HTTP::Request and HTTP::Response of which there are two  modules that provide those names and can be disambiguated by auth
10:05 RabidGravy right, better start writing this advent post I guess
10:05 toolforger (Backtracking to ornate parentheses) samcv, I fully agree that these shouldn't be made Perl parentheses. Unless the Perl community knows that it can do better than the Unicode Consortium, that is.
10:06 samcv yeah
10:09 toolforger (back to namespace organization) What's a long name? I see it as some grammar-related construct, but that's clearly not a namespace thing for modules
10:12 RabidGravy the long name for a module comprises  the name, version, auth (and theoretically,) the api
10:12 RabidGravy so "Foo:ver<0.1>:auth<someone>"
10:12 toolforger What's the form of an auth?
10:13 RabidGravy I think ugexe's advent post of yesterday explains it
10:15 toolforger Ah, so the "auth" above was meant as a literal
10:16 toolforger Hmm... so My::Module would map to my.module in the Java world
10:16 toolforger Except that it isn't guaranteed to be free from clashes
10:17 RabidGravy comparing it too directly to java like that is going to get you confused
10:18 toolforger Nah, I'm trying to find out how to best compile Perl to Java
10:18 toolforger s/Java/JVM bytecode/
10:18 toolforger putting everything into the anonymous root package works well enough for Perl code, but it won't do for Perl-Java interop
10:21 toolforger E.g. what's the name to call My::Module->new from Java?
10:23 toolforger Java coders would want to say "new My.Module()"
10:24 toolforger which is impractical because potential conflicts in the "My" namespace
10:27 toolforger Hmm... seeing that no good ideas are floating around here, where/when/with whom should I raise this?
10:30 lucasb joined #perl6
10:30 nige1 joined #perl6
10:31 domidumont joined #perl6
10:33 nige1 left #perl6
10:39 girafe joined #perl6
10:40 jjido joined #perl6
10:45 bjz joined #perl6
10:50 drrho joined #perl6
10:51 FROGGS joined #perl6
10:55 labster joined #perl6
10:55 labster joined #perl6
10:59 thalunil joined #perl6
11:05 rurban1 joined #perl6
11:05 toolforger left #perl6
11:07 drrho hi
11:07 drrho I am looking for Debian support (packaging, ...) for perl6 modules ...
11:08 drrho ... specifically something like dh-make-perl (which I love :-)
11:11 grondilu joined #perl6
11:11 moritz drrho: I'm not aware of such tooling
11:11 grondilu m: say 1 ... $++
11:11 camelia rakudo-moar c8b950: OUTPUT«(1 0)␤»
11:11 grondilu m: say 1, 2 ... $++
11:11 camelia rakudo-moar c8b950: OUTPUT«()␤»
11:12 grondilu ^that confuses me
11:12 xtreak joined #perl6
11:12 moritz m: say 1, 2 ... 0
11:12 camelia rakudo-moar c8b950: OUTPUT«()␤»
11:12 moritz same result
11:12 moritz that seems to be consistent
11:12 moritz m: say $++
11:12 camelia rakudo-moar c8b950: OUTPUT«0␤»
11:12 * moritz is confused by grondilu's confusion
11:13 grondilu why 1 ... $++ gives (1 0) then?
11:13 grondilu also shouldn't 1, 2 ... but the same as 1, 2 ... Inf?
11:13 grondilu s/but/be/
11:14 moritz forget $++, think 0
11:14 moritz m: say 1 ... 0
11:14 camelia rakudo-moar c8b950: OUTPUT«(1 0)␤»
11:14 moritz m: say 5 ... 0
11:14 camelia rakudo-moar c8b950: OUTPUT«(5 4 3 2 1 0)␤»
11:14 grondilu oh
11:14 grondilu yeah
11:14 moritz that's just how the series operator works
11:14 grondilu m: say 1, 2 ... { $++ }
11:14 camelia rakudo-moar c8b950: OUTPUT«(1 2)␤»
11:15 grondilu fair enough
11:15 grondilu I supposed $++ is not thunked or something
11:15 pierre_ joined #perl6
11:16 drrho moritz: ad tooling: thx :|
11:17 moritz $++ isn't thunked
11:18 grondilu I was looking at http://rosettacode.org/wiki/Lychrel_numbers and was a bit annoyed not to be able to write subset Palindrom of UInt where { .flip eq $_ }; say 55, { .flip + $_ } ... Palindrom;  The test is applied to the first term, reckognized a palindrom and stops.
11:18 grondilu m: subset Palindrom of UInt where { .flip eq $_ }; say 55, { .flip + $_ } ... Palindrom
11:18 camelia rakudo-moar c8b950: OUTPUT«(55)␤»
11:18 grondilu so I tried to use $++ to ignore the first term
11:19 grondilu m: subset Palindrom of UInt where { .flip eq $_ }; say 55, { .flip + $_ } ... $++ && Palindrom
11:19 camelia rakudo-moar c8b950: OUTPUT«(55 110 121 242 484 968 1837 9218 17347 91718 173437 907808 1716517 8872688 17735476 85189247 159487405 664272356 1317544822 3602001953 7193004016 13297007933 47267087164 93445163438 176881317877 955594506548 1801200002107 8813200023188 17626400046376 8499…»
11:19 grondilu m: subset Palindrom of UInt where { .flip eq $_ }; say 55, { .flip + $_ } ... { $++ && Palindrom }
11:19 camelia rakudo-moar c8b950: OUTPUT«(55 110 121 242 484 968 1837 9218 17347 91718 173437 907808 1716517 8872688 17735476 85189247 159487405 664272356 1317544822 3602001953 7193004016 13297007933 47267087164 93445163438 176881317877 955594506548 1801200002107 8813200023188 17626400046376 8499…»
11:19 grondilu m: subset Palindrom of UInt where { .flip eq $_ }; say 55, { .flip + $_ } ... { $++ && $_ ~~ Palindrom }
11:20 camelia rakudo-moar c8b950: OUTPUT«(55 110 121)␤»
11:20 gfldex last, next, redo <-- how do we call these?
11:20 grondilu m: given 6 { say so UInt }
11:20 camelia rakudo-moar c8b950: OUTPUT«False␤»
11:26 pecastro joined #perl6
11:28 rurban1 left #perl6
11:33 dalek doc: 082a560 | gfldex++ | doc/Type/List.pod6:
11:33 dalek doc: show relationship of map and return
11:33 dalek doc: review: https://github.com/perl6/doc/commit/082a560f66
11:33 synopsebot6 Link: http://doc.perl6.org/type/List
11:42 lucasb is there some ticket about state var '$' not retaining its value? I think I run into some bug of this sort
11:47 timotimo can you show some code so that we can tell if you're just expecting to behave differently than it's supposed to?
11:47 lucasb timotimo: sure, sorry, just a sec
11:47 timotimo no problem
11:47 timotimo also, o/
11:51 RabidGravy does anyone else have a problem with massive scope creep when they start writing an article?
11:51 gfldex If I write about Perl 6 I do.
11:52 lucasb m: say (loop (my $i = 0; $i < 3; $i++) { $++ })
11:52 camelia rakudo-moar c8b950: OUTPUT«(0 0 0)␤»
11:52 RabidGravy I start out with a basic and simple idea and then think of something cool and start implementing some new software ....
11:52 lucasb m: say (while $++ < 3 { $++ })
11:52 camelia rakudo-moar c8b950: OUTPUT«(0 0 0)␤»
11:53 lucasb ^^ state '$' doesn't persist its value when used in lisp comprehension
11:55 lucasb *list
11:55 pmurias joined #perl6
11:56 gfldex m: say do loop (my $i = 0; $i < 3; $i++) { state $a; $a++ }
11:56 camelia rakudo-moar c8b950: OUTPUT«(0 0 0)␤»
11:57 RabidGravy yeah it's not the state variable itself but the construct
11:57 RabidGravy m: say (for ^3 { $++ })'
11:57 camelia rakudo-moar c8b950: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3say (for ^3 { $++ })7⏏5'␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤        statement modifie…»
11:57 * gfldex hands lucasb a rakudobug form
11:57 RabidGravy m: say (for ^3 { $++ })
11:57 camelia rakudo-moar c8b950: OUTPUT«(0 1 2)␤»
12:01 wamba joined #perl6
12:07 bjz_ joined #perl6
12:15 RabidGravy I'm really surprised no-one has made a Graphviz module yet
12:18 moritz though the doc build uses some graphviz viz :-)
12:21 bhm joined #perl6
12:22 pecastro joined #perl6
12:36 RabidGravy isn't that the Perl 5 graphviz module though?
12:36 RabidGravy I haven't look recently
12:37 RabidGravy I could so easily get side-tracked by this, but won't
12:37 moritz no, it just generates text files and runs an external command on them
12:38 RabidGravy ah right, yeah the basic idea is quite simple really
12:41 espadrine joined #perl6
12:44 Ven joined #perl6
12:47 rburkholder joined #perl6
13:10 woolfy joined #perl6
13:10 woolfy left #perl6
13:11 woolfy joined #perl6
13:13 woolfy left #perl6
13:41 AlexDaniel joined #perl6
14:00 sena_kun joined #perl6
14:08 jnthn .tell AlexDaniel While reviewing commits in prep for this week's MoarVM release, I found something that introduced a memory leak. It's was reverted for the release. It may (or may not) have been the cause of leaking bots.
14:08 yoleaux jnthn: I'll pass your message to AlexDaniel.
14:08 AlexDaniel .
14:08 yoleaux 14:08Z <jnthn> AlexDaniel: While reviewing commits in prep for this week's MoarVM release, I found something that introduced a memory leak. It's was reverted for the release. It may (or may not) have been the cause of leaking bots.
14:08 jnthn Oh, you're right here :)
14:09 mawkish_ joined #perl6
14:09 cdg joined #perl6
14:11 sftp joined #perl6
14:11 AlexDaniel jnthn: Rakudo version 2016.11-147-g4fd6e94 built on MoarVM version 2016.11-25-g4be6b38
14:11 AlexDaniel jnthn: is it before the leak was introduced or after?
14:11 AlexDaniel I guess it's not after it was reverted
14:12 pecastro joined #perl6
14:15 jnthn AlexDaniel: Yes, it was introduced in one of the first 5 commits after 2016.11
14:15 jnthn So that version woulda had it
14:16 AlexDaniel ok, thanks
14:34 cibs joined #perl6
14:41 committable6 joined #perl6
14:41 evalable6 joined #perl6
14:41 bisectable6 joined #perl6
14:41 unicodable6 joined #perl6
14:41 benchable6 joined #perl6
14:41 statisfiable6 joined #perl6
14:41 bjz joined #perl6
14:42 NeuralAnomaly joined #perl6
14:48 statisfiable6 joined #perl6
14:49 RabidGravy jnthn++ # nice advent article, I just shouldn't have read it while I was writing mine as I want to change the code I'm writing about :)
14:50 pierrot joined #perl6
14:51 AlexDaniel jnthn: it is probably a bit better, but still leaking
14:51 jnthn AlexDaniel: OK...guess we've more leak hunting to do then
14:53 dalek joined #perl6
14:55 giraffe joined #perl6
14:58 giraffe joined #perl6
15:00 giraffe joined #perl6
15:02 cognominal joined #perl6
15:03 pierrot left #perl6
15:04 pierrot joined #perl6
15:09 cibs joined #perl6
15:14 NeuralAnomaly joined #perl6
15:19 mawkish_ left #perl6
15:20 wamba joined #perl6
15:21 CIAvash joined #perl6
15:22 NeuralAnomaly joined #perl6
15:32 nowan_ joined #perl6
15:37 nowan joined #perl6
15:45 pierre_ joined #perl6
15:45 pierre_ joined #perl6
15:51 NeuralAnomaly joined #perl6
15:53 dogbert17 AlexDaniel: are you there?
15:53 AlexDaniel yea
15:54 dogbert17 what do you thin about "Returns the size in bytes if the invocant is a path pointing to a file." for https://github.com/perl6/doc/issues/1054
15:57 AlexDaniel dogbert17: ok. Should probably also mention what it throws if it is not
15:57 AlexDaniel but again, I wonder if there are any tests for this…
15:58 dogbert17 AlexDaniel: sure I'll add that info
16:05 grondilu_ joined #perl6
16:16 dalek doc: 4ecae5a | dogbert17++ | doc/Type/IO/Path.pod6:
16:16 dalek doc: Corrected the docs for method s in IO::Path. This closes #1054.
16:16 dalek doc: review: https://github.com/perl6/doc/commit/4ecae5aeef
16:16 synopsebot6 Link: http://doc.perl6.org/type/IO/Path
16:20 AlexDaniel hm, this link does not seem to work
16:22 dogbert17 seems to be https://docs.perl6.org/type/IO$COLON$COLONPath
16:23 pyrimidine joined #perl6
16:32 pierre___ joined #perl6
16:33 khw joined #perl6
16:41 stmuk joined #perl6
16:43 [Coke] zoffix++ release
16:44 samcv morning everybody
16:48 domidumont joined #perl6
16:51 * [Coke] reads jnthn's advent post, and feels like he's really going to have to go back and read this 2 more times.
16:52 domidumont joined #perl6
17:04 dalek doc: 1ad734d | dogbert17++ | doc/Language/ipc.pod6:
17:04 dalek doc: Fix typo
17:04 dalek doc: review: https://github.com/perl6/doc/commit/1ad734dcf8
17:04 synopsebot6 Link: http://doc.perl6.org/language/ipc
17:11 dalek doc: 2146d99 | dogbert17++ | doc/Language/grammars.pod6:
17:11 dalek doc: Fix delimeter typo
17:11 dalek doc: review: https://github.com/perl6/doc/commit/2146d99c42
17:11 synopsebot6 Link: http://doc.perl6.org/language/grammars
17:17 travis-ci joined #perl6
17:17 travis-ci Doc build errored. Jan-Olof Hendig 'Fix delimeter typo'
17:17 travis-ci https://travis-ci.org/perl6/doc/builds/184796375 https://github.com/perl6/doc/compare/1ad734dcf89d...2146d99c42a8
17:17 travis-ci left #perl6
17:17 dalek doc: dcd5200 | coke++ | doc/Language/performance.pod6:
17:17 dalek doc: remove trailing whitespace
17:17 dalek doc: review: https://github.com/perl6/doc/commit/dcd5200e9b
17:17 dalek doc: 5c1b827 | coke++ | doc/Language/performance.pod6:
17:17 dalek doc: fix typo
17:17 synopsebot6 Link: http://doc.perl6.org/language/performance
17:17 synopsebot6 Link: http://doc.perl6.org/language/performance
17:17 dalek doc: review: https://github.com/perl6/doc/commit/5c1b8274b6
17:17 dalek doc: 7bce2d1 | coke++ | xt/ (2 files):
17:17 dalek doc: learn more words
17:17 dalek doc: review: https://github.com/perl6/doc/commit/7bce2d1992
17:19 dotness joined #perl6
17:28 pierre_ joined #perl6
17:29 wamba joined #perl6
17:29 pyrimidine joined #perl6
17:35 kalkin- joined #perl6
17:36 cowens joined #perl6
17:36 travis-ci joined #perl6
17:36 travis-ci Doc build passed. Will "Coke" Coleda 'learn more words'
17:36 travis-ci https://travis-ci.org/perl6/doc/builds/184797687 https://github.com/perl6/doc/compare/2146d99c42a8...7bce2d1992bb
17:36 travis-ci left #perl6
17:40 BenGoldberg joined #perl6
17:43 Ven joined #perl6
18:12 domidumont joined #perl6
18:13 RabidGravy there, that's the advent post scheduled totally out of character for me to have time to spare ;-)
18:14 mscha joined #perl6
18:16 mscha m: my $n = 5; my $s = 'Hello, World!'; say $s ~~ / \w ** 5 /; say $s ~~ / \w ** $n /;
18:16 camelia rakudo-moar 82e636: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Quantifier quantifies nothing␤at <tmp>:1␤------> 3say $s ~~ / \w ** 5 /; say $s ~~ / \w **7⏏5 $n /;␤»
18:16 grondilu joined #perl6
18:16 mscha Is there an elegant/efficient way to do this?  (Using a variable in a quantifier, that is.)
18:17 geekosaur wrap it in braces
18:17 mscha m: my $n = 5; my $s = 'Hello, World!'; say $s ~~ / \w ** 5 /; say $s ~~ / \w ** {$n} /;
18:17 camelia rakudo-moar 82e636: OUTPUT«「Hello」␤「Hello」␤»
18:17 mscha That was easy!  Thanks, geekosaur!
18:19 AlexDaniel joined #perl6
18:27 RabidGravy yeah that one bit me the first time I tried to use it
18:28 RabidGravy the best thing to remember is that the regex is a little language of its own and if you want to use anything from the Perl program in it you will generally need to use the braces like that
18:32 BenGoldberg . o O (little?)
18:32 RabidGravy well, in the relative sense
18:34 RabidGravy as much as there are people who like to think they can write their whole program in regex, it's definitely just a small part of the whole thing (leaving aside the thing about Perl6 being parsed by its own Grammar,)
18:45 * geekosaur thinks of it as any other lexical conflict...
18:46 geekosaur if it's not a simple number then it's ambiguous, use braces to disambiguate the count-expression from the rest of the regex
18:46 geekosaur (and yes, with braces it can be a complex expression, not just a variable)
18:53 lukaramu joined #perl6
18:56 Vynce joined #perl6
18:58 TEttinger joined #perl6
19:05 cibs joined #perl6
19:06 Ben_Goldberg joined #perl6
19:24 wamba joined #perl6
19:30 pyrimidine joined #perl6
19:39 pierre_ joined #perl6
19:45 domidumont joined #perl6
19:55 b2gills joined #perl6
20:00 Lucas_One joined #perl6
20:10 pierre_ joined #perl6
20:14 labster joined #perl6
20:46 Ven joined #perl6
20:56 samcv m: say "\n" ~~ /<:Word_Break<LF>>/
20:56 camelia rakudo-moar 82e636: OUTPUT«「␤」␤»
20:56 samcv ok so i can match unicode properties this way using pair notation. but how can i match property values which contain spaces?
20:56 samcv m: "a".uniprop('Script').say
20:56 camelia rakudo-moar 82e636: OUTPUT«Latin␤»
20:57 samcv m: "a".uniprop('Block').say
20:57 camelia rakudo-moar 82e636: OUTPUT«Basic Latin␤»
20:57 samcv m: say "a" ~~ /<:Block<Basic Latin>>/
20:57 camelia rakudo-moar 82e636: OUTPUT«Nil␤»
20:57 samcv that doesn't work.
20:58 samcv parens?
20:58 MasterDuke m: say "a" ~~ /<:Block('Basic Latin')>/
20:58 camelia rakudo-moar 82e636: OUTPUT«「a」␤»
20:58 samcv kk that's what i thought. ok coolio
20:58 samcv need to add this to the section on regexs for the docs
20:58 samcv atm it's not documented
20:58 samcv except in S05
20:59 Vynce joined #perl6
21:06 Ven joined #perl6
21:07 BenGoldberg joined #perl6
21:10 samcv saw this in the docs: https://github.com/perl6/atom-language-perl6/issues/14 this is valid pod6 right? having the styles span lines?
21:10 BenGoldberg joined #perl6
21:26 Ven joined #perl6
21:27 dalek doc: 6a10cf7 | samcv++ | doc/Language/regexes.pod6:
21:27 dalek doc: Regex: Add more info on matching Unicode Properties.
21:27 dalek doc:
21:27 dalek doc: Show how to match not only the General Categories
21:27 dalek doc: but also the values of Unicode Properties.
21:27 synopsebot6 Link: http://doc.perl6.org/language/regexes
21:27 dalek doc: review: https://github.com/perl6/doc/commit/6a10cf79f0
21:31 samcv how do i add words to the search?
21:32 moritz samcv: by inserting X<|search phrase here>
21:33 samcv so X<word to show on page|search phrase>
21:33 samcv like that?
21:35 samcv and « » are just one of the delimiters you can use for docs right? instead of using << >> or < >?
21:36 moritz yes to all, I think
21:37 grondilu_ joined #perl6
21:39 samcv moritz, you can nest inside of them too right?
21:39 samcv as long as it's balanced?
21:41 andrzeju_ joined #perl6
21:43 grondilu joined #perl6
21:46 Ven joined #perl6
21:49 moritz yes
21:52 dalek doc: f45db30 | samcv++ | doc/Language/regexes.pod6:
21:52 dalek doc: Add some documentation for <( and )> capture markers
21:52 dalek doc:
21:52 dalek doc: Issue #462
21:52 dalek doc: review: https://github.com/perl6/doc/commit/f45db30814
21:52 synopsebot6 Link: http://doc.perl6.org/language/regexes
21:52 timotimo .u 
21:52 yoleaux No characters found
21:52 timotimo what is this %)
21:52 timotimo unicodable6: help
21:52 unicodable6 timotimo, Just type any unicode character or part of a character name. Alternatively, you can also provide a code snippet or a regex
21:52 timotimo unicodable6: 
21:52 unicodable6 timotimo, U+E8D3 <Private Use> [Co] ()
21:52 timotimo ah, as i thought
21:55 samcv how do I do X<> and C<>
21:55 samcv C«++» how do i add an X to that
21:56 moritz X<C«++»|++>
21:56 samcv ++
21:56 samcv :D
22:01 girafe joined #perl6
22:02 * timotimo remembers implementing something in that general area
22:02 dalek doc: cad630c | samcv++ | doc/Language/operators.pod6:
22:02 dalek doc: Add -- and ++ operators to be able to be searched.
22:02 dalek doc: review: https://github.com/perl6/doc/commit/cad630c38b
22:02 synopsebot6 Link: http://doc.perl6.org/language/operators
22:04 dalek doc: 8a8f082 | samcv++ | doc/Language/regexes.pod6:
22:04 dalek doc: Add a newline so my regex text doesn't become the header
22:04 dalek doc: review: https://github.com/perl6/doc/commit/8a8f082623
22:04 synopsebot6 Link: http://doc.perl6.org/language/regexes
22:06 Ven joined #perl6
22:07 dalek doc: f622680 | samcv++ | doc/Language/regexes.pod6:
22:07 dalek doc: Make sure <( )> is in the regex category
22:07 dalek doc: review: https://github.com/perl6/doc/commit/f622680b4e
22:07 synopsebot6 Link: http://doc.perl6.org/language/regexes
22:09 TEttinger a flurry of daleks
22:22 Hotkeys joined #perl6
22:25 RabidGravy joined #perl6
22:26 pyrimidine joined #perl6
22:26 Ven joined #perl6
22:30 grumble joined #perl6
22:31 Vynce joined #perl6
22:37 BenGoldberg joined #perl6
22:37 pyrimidine joined #perl6
22:39 grondilu joined #perl6
22:46 Ven joined #perl6
22:55 pyrimidine joined #perl6
23:01 b2gills joined #perl6
23:05 Vynce joined #perl6
23:06 Ven joined #perl6
23:15 pyrimidine joined #perl6
23:33 pyrimidine joined #perl6
23:37 grondilu joined #perl6

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

Perl 6 | Reference Documentation | Rakudo