»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
geekosaur perl 5 doesn't have true global variables either. 00:00
pmurias what are "true" global variables? 00:01
RabidGravy there are variables that can aooear to be glocal
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)
RabidGravy m: package FF { PROCESS::<$FOO> = "bar" }; say $*FOO; 00:03
camelia rakudo-moar 702186: OUTPUT«bar␤»
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.
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"
loveperl If I have a variable in another file, how can I reference it? 00:05
RabidGravy too vague
you can't reference a 'my' variable at all 00:06
an 'our' variable you can reference fully qualified by package 00:07
or dynamic variables like $*FOO which are by, er, dynamic scope
read more of docs.perl6.org/language.html 00:09
anyway toodles 00:10
loveperl Function 'std' needs parents to avoid gobbling block? what its the error? 00:14
geekosaur show code 00:16
raiph loveperl: parens, short for parentheses 00:34
SmokeMachine if someone have some time, could, please, critic the code of this branch? 00:35
dalek ecs: 61e3e6c | samcv++ | v6d.pod:
Add proposal to codify rules on matching brackets

All matched delimiters to should be determined by their Unicode properties. I propose two simple rules to adopt for uniformity, elegance and clarity.
00:51
ecs: 7011417 | samcv++ | v6d.pod:
A few visual formatting changes for the last commit.
00:54
samcv i think the final rules I settled on are quite good: github.com/perl6/specs/blob/master...rsbrackets 00:55
AlexDaniel samcv++ 00:57
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. pastebin.com/p8702D7J 01:40
AlexDaniel hank: it looks great 01:44
there are tiny things that can be improved, probably, but I see no significant problems 01:45
I did not really look at actions thought :)
hank AlexDaniel: Thanks! Is there a way I can reduce the code duplication in lines 30-41? 01:46
AlexDaniel not really 01:48
m: my %h = ‘+’ => &[+], ‘-’ => &[-]; say (25, 30, 50).reduce(%h<+>)
camelia rakudo-moar 702186: OUTPUT«105␤»
AlexDaniel you can do something like this, but honestly it will just make it harder to read
TimToady I'd make those single-line blocks, so the whole thing is just 4 lines 01:49
dalek c: f705a6f | (Zoffix Znet)++ | doc/Language/testing.pod6:
Reword `is-deeply`

Do not say it uses `eqv` operator. What it uses is an internal detail.
Addresses rt.perl.org/Ticket/Display.html?id=130362
synopsebot6 Link: doc.perl6.org/language/testing
AlexDaniel hank: one thing I tend to do is $<smth>».made
not sure if there are any pitfalls associated with this, hmm…
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 }
hypers
seems strange to allow spaces after terms but not after operators
hank Okay I see, I found the documentation on them 01:51
Hmm, so I would add \s* after <op()> to allow whitespace? 01:52
AlexDaniel hank: perhaps make exp a multi method
<.ws> probably
TimToady it's in a rule, just add a normal space and it implies <.ws>
AlexDaniel ah, right
TimToady change <>} to <> }
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
hank Yeah I stole that from the Grammar tutorial and modified it
TimToady more specifically, space after any matching token
hank That's nifty
TimToady oh, if you want to allow space at the start, make your TOP a rule too, so that ^ looks for ws after it
TimToady so inital space doesn't count, but the space after ^ would (if it were a rule) 01:54
hank Ah yes
TimToady since ^ is the first match
hank I see
TimToady the $ is somewhat unnecessary though, since .parse enforces that anyway
(and you're not relying on backtracking) 01:55
hank Okay, yeah, good to know
TimToady (to not enforce that, you'd use subparse instead)
AlexDaniel if I recall correctly it doesn't matter nowadays
TimToady the reason it's only ws after a matcher is that otherwise we can't actually do longest token matching on alternations
'cuz half the tokens would start with \s* or so :) 01:56
so it's only trailing spaces that are auto-eaten
hank AlexDaniel: you said I could make exp a multimethod? How would I get it to pattern match on my conditions properly? 01:57
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:00
hank So a where inside the parenthesis where the arguments go will do dynamic dispatch? 02:01
AlexDaniel yea
hank Okay, cool, I'm gonna try that
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?
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:03
en.wikipedia.org/wiki/24_Game 02:04
AlexDaniel hank: That would be a bit messy. I'd create a couple of classes 02:05
hank So an AST class that contains children which are also ASTs? 02:06
AlexDaniel node class, yeah 02:07
but if you don't need it then 🤷
hank Okay, I see. Thanks for all your help! 02:09
This is a really cool language
ugexe i dare you to post that on reddit 02:14
geekosaur (...you expect something else from reddit?) 02:15
dalek c: 54ce95c | MasterDuke17++ | doc/Language/performance.pod6:
Update performance.pod6
03:46
synopsebot6 Link: doc.perl6.org/language/performance
Herby_ o/ 04:04
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
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
if somebody can figure it out, I can hopefully add completion to Readline REPL for rakudo 06:39
samcv oh hey i think i figured it out… let me see 06:53
samcv Writing to C globals NYI. lame 07:04
moritz patches welcome :-) 07:09
samcv has no clue how NativeCall even works 07:11
I know C, but not sure how it actually… does its magic
unless it's not as crazy as I'm thinking it is? 07:12
moritz jnthn++ # advent post 08:06
nige_ hi 08:08
moritz ho 08:13
nige1 need a bit of help for my advent entry this year 08:14
i need to strip some control characters out of a string
cargo culting this rosettacode answer causes a warning to appear ... 08:15
rosettacode.org/wiki/Strip_control...ing#Perl_6
any ideas on the right way to do this now? 08:16
samcv you need to remove control characters? just strip them? 08:18
deos that not work?
what is the error?
m: my $str = (0..400).roll(80)».chr.join; say $str.subst(/<[ ^@..^_ ]>/, '', :g);
camelia rakudo-moar 4d6854: OUTPUT«Potential difficulties:␤ Repeated character (^) unexpectedly found in character class␤ at <tmp>:1␤ ------> 030).roll(80)».chr.join; say $str.subst(/<7⏏5[ ^@..^_ ]>/, '', :g);␤ŜŻsuŇŨÊĦÆŐ³ĥ«ŧÙŭŷÉ®Ł{þŲŔbmŝ…»
samcv @ to ^ will also pick ones that are letters? 08:20
or do you want that? 08:21
TEttinger isn't the leading ^ negate the character class?
or is that different in p6?
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␤ ------> 030).roll(80)».chr.join; say $str.subst(/<7⏏5[^@..^_ ]>/, '', :g);␤űĀŸ
samcv it's not in p6...
m: my $str = (0..400).roll(80)».chr.join; say $str.subst(/<![@..^_ ]>/, '', :g);
camelia rakudo-moar 4d6854: OUTPUT«êÓñúţĘĚªâ-Ō¢çÏôÆøŻõ¬ŮĸŎß éųƂĝ¶ŤóĂŊñïēĝ5ùö-ĆkŕuÓĂƈ>ĵŎdƐ²ľĐĩ§Úį·␤»
nige1 yes - that's the error I see
TEttinger roll is random, right?
samcv m: my $str = (0..400).roll(80)».chr.join; say $str.subst(/<-[@..^_ ]>/, '', :g);
camelia rakudo-moar 4d6854: OUTPUT«EYRI␤»
samcv there you go
m: my $str = (0..400).roll(80)».chr.join; say $str.subst(/< -[@..^_ ] >/, '', :g); 08:23
camelia rakudo-moar 4d6854: OUTPUT«Ğ÷ ½ĮÙr´9āéhƍDřĞņĶŚįūF³ĆſÏC_->łƋt ètĐÂ$ƎþĝVļñÈęªƐrźƎŚËăLgnŷú)ìĦìĚ_ĬĴAÀŇMň␤»
samcv oopsie
m: my $str = (0..400).roll(80)».chr.join; say $str.subst(/<- [@..^_ ] >/, '', :g);
camelia rakudo-moar 4d6854: OUTPUT«[TUDENH␤»
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>
idk why you're doing that tho
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« ␤»
samcv erm
TEttinger if you just wanted to strip control characters from a string, couldn't you match \P{C} (in unicode PCRE syntax)?
samcv oh it goes to 400?
m: my $str = (0..400).roll(80)».chr.join; say $str.subst(/< [\x[0]..\x[1F]\x[78] ] >/, '', :g);
camelia rakudo-moar 4d6854: OUTPUT«ÁA␀ƉŽÝ´Íţ
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<␤»
samcv m: my $str = (0..400).roll(80)».chr.join; say $str.subst(/< [\x[0]..\x[1F]\x[78]..\x[FFFF] >/, '', :g);
camelia rakudo-moar 4d6854: OUTPUT«Ķêr3bN§ôŐťƋ␤ÎŨŽĥďðuāğť^Ň÷"u7"ęLíşĬďĩĚũiµ×ÚJâZŇĸŗűņŕRÉŃļûDëäƎŧEÅă␤»
samcv m: my $str = (0..400).roll(80)».chr.join; say $str.subst(/<- [\x[0]..\x[1F]\x[78]..\x[FFFF] >/, '', :g);
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…»
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«žĘ¾ŎŞĨŇāøƃĐÙÄŚƎŞÖßƍėƃĮĎĎô³á°ųśí¹ ĪŀŴÐŒÙĪĬƋ³£ÒŠóŘöƌĒ»Ŗ®␤»
samcv m: my $str = (0..400).roll(80)».chr.join; say $str.trans(/<- [\x[0]..\x[1F]\x[78]..\x[FFFF] ]>/, '', :g);
camelia rakudo-moar 4d6854: OUTPUT«Only Pair objects are allowed as arguments to Str.trans, got Regex␤ in block <unit> at <tmp> line 1␤␤»
samcv m: my $str = (0..400).roll(80)».chr.join; say $str.trans(/<- [\x[0]..\x[1F]\x[78]..\x[FFFF] ]>/ => '', :g);
camelia rakudo-moar 4d6854: OUTPUT«µzĮŞ·ŠóĘĨįūıƆĶĒyťďś¶İĈŏ^WęěðŕĤć§ŨƇśőäöŊÒéÅÊÝŋêłIJÀŝ␤»
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␤»
samcv i think that's what you want 08:28
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/
samcv what do you want to keep
do you only want ascii letters?
nige1 I'm trying to parse the error output of perl 6
samcv do you want &^%$$ signs? 08:34
oh
i have a perl 6 module ;)
well it converts the ansi color to irc coloring
nige1 oh - can you show?
samcv yes
github.com/samcv/IRC-TextColor
samcv could probably be a bit more elegant but i'm just impressed i actually got it working tbh 08:35
nige1 nice 08:36
samcv doing foreground _and_ background colors ....
and dealing with the asci codes... some have leading zeros
for the numbers
nige1 it looks like it preserves colours - in this case I wanna strip away the colour creating codes
samcv oh
there's a module for that
Terminal::ANSI
stripcolors is the routine from that you want 08:37
or you could do it yourself
look at my ansi-to-irc since it will be a lot easier to understand... than the magic going on in the other one
samcv nige1, so you don't care about preserving state? 08:37
just want to get rid of it?
nige1 yes 08:38
for example the program .... say "hello" say "world";
there is a missing ; there
perl6 will helpfully point out the location - and some of the console output is 'marked up' with highlighting colours 08:39
(normally I like this - just need it in plain text though on this occasion)
samcv my $escape = "\e["; 08:40
my $end = 'm';
and then between the $escape and $end is a number
0-9
the \e in the "" will interpolate to the escape control code
$string ~~ s:g/$escape\d+?$end//; 08:41
that should probably do the trick
nige1 sec - gonna give it a whirl
samcv m: my $s = "\etext test \x 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 = "\etext test \x[07⏏5m text"; $escape = "\e["; $string ~~ s:g␤Variable '$escape' is not declared␤at <tmp>:1␤------> 3my $s = "\etext test \x t…»
samcv m: my $s = "\etext test \e text"; $escape = "\e["; $string ~~ s:g/$escape\d+?m//; say $string;
camelia rakudo-moar 8940dc: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '$escape' is not declared␤at <tmp>:1␤------> 3my $s = "\etext test \e text"; 7⏏5$escape = "\e["; $string ~~ s:g/$escape\␤»
samcv m: my $s = "\etext test \e text"; my $escape = "\e["; $string ~~ s:g/$escape\d+?m//; say $string;
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 text"; my $escape = "\e["; 7⏏5$string ~~ s:g/$escape\d+?m//; say $stri␤»
samcv m: my $s = "\etext test \e text"; my $escape = "\e["; $s ~~ s:g/$escape\d+?m//; say $string;
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;␤»
samcv m: my $s = "\etext test \e text"; my $escape = "\e["; $s ~~ s:g/$escape\d+?m//; say $s; 08:45
camelia rakudo-moar 8940dc: OUTPUT«text test text␤»
samcv ugh i'm tired. but it works
nige1 bingo - that did the trick :-)
thanks - much appreciated
samcv no problem :)
can there be more than one advent per day? 08:46
or is that not allowed ;P
lizmat I think traditionally, there's only 1 per day 08:47
and since this is a tradition :-)
samcv could we extend into the new year? or more than one a day?
whatever people think is good.
lizmat samcv: if you have a blog post, I will mention it in the next P6W, just like the advents ?
samcv i don't yet
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
lizmat but I'm afraid we will run out of posters / subjects in a year or 3 :-) 08:49
samcv hah
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
can we do regex matches for unicode properties other than general category btw? 08:51
in perl apparently you can do \p{Script=Hebrew}
and it wil match the requested property
lizmat samcv: you can add any piece of code as a matcher, afaik 08:52
samcv ok i think i found it. going through the synopsis 08:53
yeah that's what i thought you could do, i just haven't used it before. but i should tbh 08:55
lizmat hmmm... can't find the syntax for that in the docs :-( 08:56
samcv i'm not sure if this works though… 08:56
well at least for all the properties. even with full names 08:57
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…»
lizmat m: say "a".match( / . <?{ False }> / )
camelia rakudo-moar 8940dc: OUTPUT«Nil␤»
samcv ok wait maybe it works 09:00
i need to check some things
lizmat m: say "a".match( / . <!{ True }> / )
camelia rakudo-moar 8940dc: OUTPUT«Nil␤»
samcv m: say "11test" ~~ / <:!Age<1.1>> / 09:01
camelia rakudo-moar 8940dc: OUTPUT«Nil␤»
samcv :(
doesn't seem to work for arbitrary properties
samcv m: 'a'.uniprop('Script') 09:02
camelia ( no output )
samcv m: 'a'.uniprop('Script').say
camelia rakudo-moar 8940dc: OUTPUT«Latin␤»
samcv m: 'a' ~~ / <:Script<Latin>>/
camelia ( no output )
samcv m:say 'a' ~~ / <:Script<Latin>>/
m: say 'a' ~~ / <:Script<Latin>>/
camelia rakudo-moar 8940dc: OUTPUT«「a」␤»
samcv hm
samcv m: say '-a-' ~~ / <:Case_Ignorable> / 09:03
camelia rakudo-moar 8940dc: OUTPUT«Nil␤»
toolforger Hiya 09:05
samcv lizmat, how do i find where in the code handles the unicode properties for the tokens or whatever
lizmat samcv: I have no pointer other than saying "somwehere in src/Perl6/Grammar|Actions|World
lizmat is a relative grammar noob 09:06
samcv yeah. that's what i thought
but it's thousands of lines long. there's some bot that can do something…
SourceBaby, help 09:07
SourceBaby samcv, Use s: trigger with args to give to sourcery sub. e.g. s: Int, 'base'. See modules.perl6.org/dist/CoreHackers::Sourcery
samcv ok actions is 9700 lines long :P haha 09:08
toolforger What repo is the Perl6 tree in? 09:09
toolforger has only nqp
tadzik perhaps you're thinking of rakudo? 09:10
lizmat github.com/rakudo/rakudo.git
toolforger got it
toolforger opener in Grammar is already pretty sick 09:16
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"
toolforger s/binary code/Unicode code points/ 09:17
samcv are you looking at nqp?
or rakudo
toolforger rakudo
just eyeballing the code for the first time :-/
samcv which file is that? 09:18
grammar.nqp?
toolforger rakudo/Perl6/Grammar.nqp
samcv ah k
u: 0xFF62 09:19
unicodable6 samcv, Found nothing!
samcv u: U+FF62
unicodable6 samcv, U+FF62 HALFWIDTH LEFT CORNER BRACKET [Ps] (「)
samcv yeah that's what i thought they were
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
u: U+0028
unicodable6 toolforger, U+0028 LEFT PARENTHESIS [Ps] (()
samcv toolforger, github.com/perl6/specs/blob/master...rsbrackets i just put this up 09:20
proposed rule change for 6.d
toolforger Yeah, sticking with a category is much less maintenance-intense 09:21
samcv yeah
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:21
'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
samcv but the left ornate paren looks like a left paren but is the closing symbol 09:23
toolforger Well, that's confusables
samcv it was originally a RTL codepoint, but it's not a poir and doesn't reverse
exactly
it's just one clusterfuck
and most text editors don't even render it correctly
toolforger To deal with confusables, you need to have a programmer-friendly font
samcv they're basically terrible and should never be used ;) 09:24
toolforger so it's not just editors
samcv well toolforger
they're literally reversed
but don't mirror differently in LTR or RTL text
so it just is horrible
everything else is fine though ;) 09:25
i wonder if i can just search github for any perl files using those files cause there probably is just roast
toolforger Issue here is that we need somebody with Arabic knowledge to see how they deal with it
samcv they don't use them
they just use normal parens, which just conform to the direction of the text they contain 09:26
no matter if they type latin things or RTL text
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
also fyi. numbers inside RTL text are rendered LTR
toolforger I never looked into bidi rule details
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
and been adding tons of tests to roasts for it.
toolforger I can imagine
samcv it starts out really crazy. but. it's becoming less hard as time goes on
(which is a good thing)
toolforger I know
I tackled pluralization 09:29
samcv pluralization?
toolforger cldr.unicode.org/index/cldr-spec/plural-rules
samcv :) 09:30
toolforger And this: www.unicode.org/cldr/charts/29/supp...rules.html
Particularly www.unicode.org/cldr/charts/29/supp...comparison if you want to impress people with how many special cases there are
Human language is just crazy... 09:31
samcv good thing unicode exists though
otherwise it would be way harder
toolforger Nobody would even try getting it right
samcv well would only get it right for one language ;)
toolforger on the plus side, all languages would converge towards what programmers would do 09:32
samcv they already sort of have though
toolforger Well, many would consider that a minus, so... ;-) 09:33
samcv asian languages are usually written LTR now
instead of top to bottom right to left
toolforger Oh
samcv mostly, i mean they used to be a lot of possible directions
toolforger I thought it's been top-down left-right
samcv but mostly was top to bottom right to left
toolforger ah
right
samcv well a lot of languages didn't have a strict direction to write them
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
or alternate LTR RTL etc
every other line
you could probably read and write faster. but i guess it confused people idk
toolforger I dimly recall that being used in some ruins around the Mediterranean
samcv egyptian did it too
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
toolforger In Medieval times, it was generally considered to be impossible to read a text without saying it loud
samcv why
toolforger It's a separate technique 09:36
children still do it today when learning to read
silent reading comes later
samcv hmm
toolforger and of course you never learn it if you don't know it's possible
samcv i guess that makes sense
toolforger besides, loud reading helps ignore spelling variations 09:37
ther were no orthography committees then
samcv hm this thing linguafranca.mirror.theinfo.org/9804/ip.html says that no spaces were really used either 09:38
toolforger matches my knowledge
samcv i saw the Magna Carta a week ago at a museum. can attest. text was tiny af and like
no spacing
also really weird script. could only make out like
1 letter lol.
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:39
toolforger More cultural differences in scripts :-) 09:40
samcv ithinkweshouldalljusttypelikethis
muchbetterthisway
toolforger that's how I do my passwords
samcv makeitharderfortheplebianstoreadwhatwearesaying
toolforger diceware, but why type spaces...
heh
toolforger I just misread "plebian store" 09:40
samcv hah
toolforger though "dwhat" didn't parse, I had to backtrack
samcv yeah that plus different spellings would be so annoying 09:41
toolforger I think that's mostly a matter of practice
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,
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.
^ that's really interesting
toolforger Makes sense
Comic reading is pretty different from book reading, too 09:43
particularly if the comic has little text
I'll still stick with the reading mode that I have most practice with :-) 09:44
toolforger Something entirely different 09:44
Anybody got ideas about how to best assign packages to NQP-on-JVM classes? 09:45
RabidGravy haven't the faintest 09:46
toolforger Right now everything goes into the root package 09:47
That's a no-go for Java types
Code isn't attributable, and it invites name clashes
samcv :( 09:48
toolforger so they can't have it
NQP could be put into org.perl6.nqp
so that's the easy part
Not sure about where modules should go 09:49
the package namespace in Java land is organized along the DNS
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:52
toolforger Nope, it's DNS 09:53
It's not enforced, so some well-known packages do not adhere to that
RabidGravy it's the wroong way round for DNS
toolforger That's just a mechanical change
they needed to be hierarchical 09:54
but the general rule is that if you own foo.com, then you can publish your packages under com.foo.whatever.you.like 09:55
How do people in Perl land organize their module namespace so there aren't clashes? 09:57
RabidGravy on a functional basis largely, though in P6 the "long name" takes care of the clashes (if people care to use it,) 10:00
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:01
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.
samcv yeah 10:06
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:09
RabidGravy the long name for a module comprises the name, version, auth (and theoretically,) the api 10:12
so "Foo:ver<0.1>:auth<someone>"
toolforger What's the form of an auth?
RabidGravy I think ugexe's advent post of yesterday explains it 10:13
toolforger Ah, so the "auth" above was meant as a literal 10:15
toolforger Hmm... so My::Module would map to my.module in the Java world 10:16
Except that it isn't guaranteed to be free from clashes
RabidGravy comparing it too directly to java like that is going to get you confused 10:17
toolforger Nah, I'm trying to find out how to best compile Perl to Java 10:18
s/Java/JVM bytecode/
putting everything into the anonymous root package works well enough for Perl code, but it won't do for Perl-Java interop
E.g. what's the name to call My::Module->new from Java? 10:21
toolforger Java coders would want to say "new My.Module()" 10:23
which is impractical because potential conflicts in the "My" namespace 10:24
Hmm... seeing that no good ideas are floating around here, where/when/with whom should I raise this? 10:27
drrho hi 11:07
I am looking for Debian support (packaging, ...) for perl6 modules ...
drrho ... specifically something like dh-make-perl (which I love :-) 11:08
moritz drrho: I'm not aware of such tooling 11:11
grondilu m: say 1 ... $++
camelia rakudo-moar c8b950: OUTPUT«(1 0)␤»
grondilu m: say 1, 2 ... $++
camelia rakudo-moar c8b950: OUTPUT«()␤»
grondilu ^that confuses me 11:12
moritz m: say 1, 2 ... 0 11:12
camelia rakudo-moar c8b950: OUTPUT«()␤»
moritz same result
that seems to be consistent
m: say $++
camelia rakudo-moar c8b950: OUTPUT«0␤»
moritz is confused by grondilu's confusion
grondilu why 1 ... $++ gives (1 0) then? 11:13
also shouldn't 1, 2 ... but the same as 1, 2 ... Inf?
s/but/be/
moritz forget $++, think 0 11:14
m: say 1 ... 0
camelia rakudo-moar c8b950: OUTPUT«(1 0)␤»
moritz m: say 5 ... 0
camelia rakudo-moar c8b950: OUTPUT«(5 4 3 2 1 0)␤»
grondilu oh
yeah
moritz that's just how the series operator works
grondilu m: say 1, 2 ... { $++ }
camelia rakudo-moar c8b950: OUTPUT«(1 2)␤»
grondilu fair enough 11:15
I supposed $++ is not thunked or something
drrho moritz: ad tooling: thx :| 11:16
moritz $++ isn't thunked 11:17
grondilu I was looking at 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
m: subset Palindrom of UInt where { .flip eq $_ }; say 55, { .flip + $_ } ... Palindrom
camelia rakudo-moar c8b950: OUTPUT«(55)␤»
grondilu so I tried to use $++ to ignore the first term
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…»
grondilu m: subset Palindrom of UInt where { .flip eq $_ }; say 55, { .flip + $_ } ... { $++ && Palindrom }
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…»
grondilu m: subset Palindrom of UInt where { .flip eq $_ }; say 55, { .flip + $_ } ... { $++ && $_ ~~ Palindrom } 11:20
camelia rakudo-moar c8b950: OUTPUT«(55 110 121)␤»
gfldex last, next, redo <-- how do we call these?
grondilu m: given 6 { say so UInt }
camelia rakudo-moar c8b950: OUTPUT«False␤»
dalek c: 082a560 | gfldex++ | doc/Type/List.pod6:
show relationship of map and return
11:33
synopsebot6 Link: doc.perl6.org/type/List
lucasb is there some ticket about state var '$' not retaining its value? I think I run into some bug of this sort 11:42
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
timotimo no problem
also, o/
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.
lucasb m: say (loop (my $i = 0; $i < 3; $i++) { $++ }) 11:52
camelia rakudo-moar c8b950: OUTPUT«(0 0 0)␤»
RabidGravy I start out with a basic and simple idea and then think of something cool and start implementing some new software ....
lucasb m: say (while $++ < 3 { $++ })
camelia rakudo-moar c8b950: OUTPUT«(0 0 0)␤»
lucasb ^^ state '$' doesn't persist its value when used in lisp comprehension 11:53
*list 11:55
gfldex m: say do loop (my $i = 0; $i < 3; $i++) { state $a; $a++ } 11:56
camelia rakudo-moar c8b950: OUTPUT«(0 0 0)␤»
RabidGravy yeah it's not the state variable itself but the construct 11:57
m: say (for ^3 { $++ })'
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…»
gfldex hands lucasb a rakudobug form
RabidGravy m: say (for ^3 { $++ })
camelia rakudo-moar c8b950: OUTPUT«(0 1 2)␤»
RabidGravy I'm really surprised no-one has made a Graphviz module yet 12:15
moritz though the doc build uses some graphviz viz :-) 12:18
RabidGravy isn't that the Perl 5 graphviz module though? 12:36
I haven't look recently
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
RabidGravy ah right, yeah the basic idea is quite simple really 12:38
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.
AlexDaniel .
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.
jnthn Oh, you're right here :)
AlexDaniel jnthn: Rakudo version 2016.11-147-g4fd6e94 built on MoarVM version 2016.11-25-g4be6b38 14:11
jnthn: is it before the leak was introduced or after?
I guess it's not after it was reverted
jnthn AlexDaniel: Yes, it was introduced in one of the first 5 commits after 2016.11 14:15
So that version woulda had it
AlexDaniel ok, thanks 14:16
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:49
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
dogbert17 AlexDaniel: are you there? 15:53
AlexDaniel yea
dogbert17 what do you thin about "Returns the size in bytes if the invocant is a path pointing to a file." for github.com/perl6/doc/issues/1054 15:54
AlexDaniel dogbert17: ok. Should probably also mention what it throws if it is not 15:57
but again, I wonder if there are any tests for this…
dogbert17 AlexDaniel: sure I'll add that info 15:58
dalek c: 4ecae5a | dogbert17++ | doc/Type/IO/Path.pod6:
Corrected the docs for method s in IO::Path. This closes #1054.
16:16
synopsebot6 Link: doc.perl6.org/type/IO/Path
AlexDaniel hm, this link does not seem to work 16:20
dogbert17 seems to be docs.perl6.org/type/IO$COLON$COLONPath 16:22
[Coke] zoffix++ release 16:43
samcv morning everybody 16:44
[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:51
dalek c: 1ad734d | dogbert17++ | doc/Language/ipc.pod6:
Fix typo
17:04
synopsebot6 Link: doc.perl6.org/language/ipc
dalek c: 2146d99 | dogbert17++ | doc/Language/grammars.pod6:
Fix delimeter typo
17:11
synopsebot6 Link: doc.perl6.org/language/grammars
travis-ci Doc build errored. Jan-Olof Hendig 'Fix delimeter typo' 17:17
travis-ci.org/perl6/doc/builds/184796375 github.com/perl6/doc/compare/1ad73...46d99c42a8
dalek c: dcd5200 | coke++ | doc/Language/performance.pod6:
remove trailing whitespace
17:17
c: 5c1b827 | coke++ | doc/Language/performance.pod6:
fix typo
synopsebot6 Link: doc.perl6.org/language/performance
c: 7bce2d1 | coke++ | xt/ (2 files):
learn more words
travis-ci Doc build passed. Will "Coke" Coleda 'learn more words' 17:36
travis-ci.org/perl6/doc/builds/184797687 github.com/perl6/doc/compare/2146d...ce2d1992bb
RabidGravy there, that's the advent post scheduled totally out of character for me to have time to spare ;-) 18:13
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 /;␤»
mscha Is there an elegant/efficient way to do this? (Using a variable in a quantifier, that is.) 18:16
geekosaur wrap it in braces 18:17
mscha m: my $n = 5; my $s = 'Hello, World!'; say $s ~~ / \w ** 5 /; say $s ~~ / \w ** {$n} /;
camelia rakudo-moar 82e636: OUTPUT«「Hello」␤「Hello」␤»
mscha That was easy! Thanks, geekosaur!
RabidGravy yeah that one bit me the first time I tried to use it 18:27
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:28
BenGoldberg . o O (little?) 18:32
RabidGravy well, in the relative sense 18:32
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:34
geekosaur thinks of it as any other lexical conflict... 18:45
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
(and yes, with braces it can be a complex expression, not just a variable)
samcv m: say "\n" ~~ /<:Word_Break<LF>>/ 20:56
camelia rakudo-moar 82e636: OUTPUT«「␤」␤»
samcv ok so i can match unicode properties this way using pair notation. but how can i match property values which contain spaces?
m: "a".uniprop('Script').say
camelia rakudo-moar 82e636: OUTPUT«Latin␤»
samcv m: "a".uniprop('Block').say 20:57
camelia rakudo-moar 82e636: OUTPUT«Basic Latin␤»
samcv m: say "a" ~~ /<:Block<Basic Latin>>/
camelia rakudo-moar 82e636: OUTPUT«Nil␤»
samcv that doesn't work.
samcv parens? 20:58
MasterDuke m: say "a" ~~ /<:Block('Basic Latin')>/
camelia rakudo-moar 82e636: OUTPUT«「a」␤»
samcv kk that's what i thought. ok coolio
need to add this to the section on regexs for the docs
atm it's not documented
except in S05
samcv saw this in the docs: github.com/perl6/atom-language-perl6/issues/14 this is valid pod6 right? having the styles span lines? 21:10
dalek c: 6a10cf7 | samcv++ | doc/Language/regexes.pod6:
Regex: Add more info on matching Unicode Properties.

Show how to match not only the General Categories but also the values of Unicode Properties.
21:27
synopsebot6 Link: doc.perl6.org/language/regexes
samcv how do i add words to the search? 21:31
moritz samcv: by inserting X<|search phrase here> 21:32
samcv so X<word to show on page|search phrase> 21:33
like that?
and « » are just one of the delimiters you can use for docs right? instead of using << >> or < >? 21:35
moritz yes to all, I think 21:36
samcv moritz, you can nest inside of them too right? 21:39
as long as it's balanced?
moritz yes 21:49
dalek c: f45db30 | samcv++ | doc/Language/regexes.pod6:
Add some documentation for <( and )> capture markers

Issue #462
21:52
synopsebot6 Link: doc.perl6.org/language/regexes
timotimo .u 
yoleaux No characters found
timotimo what is this %)
unicodable6: help
unicodable6 timotimo, Just type any unicode character or part of a character name. Alternatively, you can also provide a code snippet or a regex
timotimo unicodable6: 
unicodable6 timotimo, U+E8D3 <Private Use> [Co] ()
timotimo ah, as i thought
samcv how do I do X<> and C<> 21:55
C«++» how do i add an X to that
moritz X<C«++»|++> 21:56
samcv ++
:D
timotimo remembers implementing something in that general area 22:02
dalek c: cad630c | samcv++ | doc/Language/operators.pod6:
Add -- and ++ operators to be able to be searched.
synopsebot6 Link: doc.perl6.org/language/operators
dalek c: 8a8f082 | samcv++ | doc/Language/regexes.pod6:
Add a newline so my regex text doesn't become the header
22:04
synopsebot6 Link: doc.perl6.org/language/regexes
dalek c: f622680 | samcv++ | doc/Language/regexes.pod6:
Make sure <( )> is in the regex category
22:07
synopsebot6 Link: doc.perl6.org/language/regexes
TEttinger a flurry of daleks 22:09