»ö« 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.
00:01 cyphase joined 00:05 aries_liuxueyang left 00:13 aries_liuxueyang joined 00:16 vike left 00:18 vike joined 00:23 pierre_ joined 00:25 pierre_ left, pierre_ joined
grondilu hello 00:26
with a module like 'unit module Foo; our @some-really-big-array = do {...};' if I import Foo without actually using @some-really-big-array, will that array be loaded in memory? 00:27
TimToady the mainline of a module gets run once on first use (though after INIT time, iirc) 00:33
so yes, it'll be loaded 00:34
unless the do returns something that .is-lazy
00:40 cdg left
grondilu ok 00:42
00:42 dataangel joined 00:46 cyphase left
AlexDaniel dalek: bye-bye. 00:48
dalek ateverable: a4a2f51 | (Aleks-Daniel Jakimenko-Aleksejev)++ | Bisectable.p6:
Sometimes $old-dir is unset too

Gets rid of Nil warnings
ateverable: 9b78f79 | (Aleks-Daniel Jakimenko-Aleksejev)++ | Bisectable.p6:
Vertical alignment

Make “*6:” shortcuts a thing
I used to write “commit6:” sometimes, so why not make it work?
00:48 dalek left 00:49 dalek joined, ChanServ sets mode: +v dalek
AlexDaniel MasterDuke: 🎉 tests! 00:50
00:51 cyphase joined 01:01 cyphase left
dataangel When am I required to use parentheses when calling a function and when do I not need to? 01:03
01:04 pierre_ left 01:06 cyphase joined 01:07 pierre_ joined
TimToady you need to use parens if there is ambiguity with a reserved word (the reserved word will require whitespace, in that case) 01:08
m: sub if ($x) { say "Interface is $x" }; if('impressive') 01:09
camelia rakudo-moar ef98f8: OUTPUT«Interface is impressive␤»
TimToady m: sub if ($x) { say "Interface is $x" }; if 'impressive'
camelia rakudo-moar ef98f8: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 3say "Interface is $x" }; if 'impressive'7⏏5<EOL>␤ expecting any of:␤ block or pointy block␤»
TimToady other than that, when you mention a noun like &foo, it will not be called unless you use explicit parens 01:10
m: say &infix:<+>
camelia rakudo-moar ef98f8: OUTPUT«sub infix:<+> (Mu $?, Mu $?) { #`(Sub+{<anon|74582304>}+{Precedence}|40058080) ... }␤»
TimToady m: say &infix:<+>()
camelia rakudo-moar ef98f8: OUTPUT«0␤»
dataangel TimToady: with-suffix($target, ".cpp") # works like this but does not work with spaces... Don't think reserved words are an issue here though. Just a normal function that takes two arguments 01:11
AlexDaniel dataangel: are you sure that 「with-suffix $target, ".cpp"」 does not work?
dataangel I still need to , ?
01:12 pierre_ left
AlexDaniel sure 01:12
dataangel Mistakenly thought it was like Haskell
01:12 pierre_ joined
dataangel oops 01:12
TimToady perl almost never allows two terms in a row
so args need commas 01:13
AlexDaniel dataangel: by the way, note that when calling a method you can omit parens, but you will need :
m: say 42.base(2)
camelia rakudo-moar ef98f8: OUTPUT«101010␤»
AlexDaniel m: say 42.base: 2
camelia rakudo-moar ef98f8: OUTPUT«101010␤»
AlexDaniel m: say 42.base 2 # ← and this is not going to work
camelia rakudo-moar ef98f8: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3say 42.base7⏏5 2 # ← and this is not going to work␤ expecting any of:␤ infix␤ infix stopper␤ postfix␤ statement end…»
MasterDuke AlexDaniel: hot damn! very nice 01:15
re tests 01:16
TimToady yes, methods default to no args (since they already have an invocant, and are often used to access attributes as if they were variables) 01:17
dataangel What is the right way to combine paths, like os.path.join in python? 01:25
Nevermind just found it :p
Didn't expect the name child
MasterDuke there's also join, catfile, catdir, and catpath 01:29
dataangel Join doesn't appear to be a method on IO::Path 01:30
MasterDuke IO::Spec 01:31
01:33 pierre_ left 01:34 pierre_ joined 01:37 cyphase left 01:42 cyphase joined
dataangel I have two sets that each have the same and only one element, "bin/editor.o".IO. When I use the (|)= operator to combine them, I expect the left-hand side of the assignment to stay the same since the sets are identical... But instead the set grows another copy every time. Why is that? 01:42
01:42 poohman_ joined 01:45 poohman left, buharin left
TimToady m: my $s = set 42; $s ∩= 42; $s.ay 01:46
camelia rakudo-moar ef98f8: OUTPUT«Method 'ay' not found for invocant of class 'Set'␤ in block <unit> at <tmp> line 1␤␤»
TimToady m: my $s = set 42; $s ∩= 42; $s.say
camelia rakudo-moar ef98f8: OUTPUT«set(42)␤»
TimToady m: my $s = set 42; $s (|)= 42; $s.say
camelia rakudo-moar ef98f8: OUTPUT«set(42)␤»
TimToady looks okay to me
but maybe something is fouled up in the object identity of a .IO 01:47
dataangel m: my $s = set "bin/editor.o".IO; $s ∩= "bin/editor.o".IO; say $s;
camelia rakudo-moar ef98f8: OUTPUT«set()␤»
dataangel m: my $s = set "bin/editor.o".IO; $s (|)= "bin/editor.o".IO; say $s; 01:48
camelia rakudo-moar ef98f8: OUTPUT«set("bin/editor.o".IO, "bin/editor.o".IO)␤»
dataangel There we go
That looks wrong
TimToady looks buggy some way or tother
geekosaur m: say "bin/editor.o".IO.WHICH; say "bin/editor.o".IO.WHICH
camelia rakudo-moar ef98f8: OUTPUT«IO::Path|68690048␤IO::Path|68690136␤»
TimToady there you go 01:49
.IO is being some kind of constructor
dataangel Sure
TimToady dinner &
dataangel But how do you get a set that is actually a set then?
I usually care about value equivalence not whether something under the hood shares the same memory address 01:50
TimToady in OO, different objects are different values even if they happen to have the same innards 01:51
so don't call .IO if you don't want that
01:52 cyphase left
TimToady it has to be that way for mutable objects to exist; don't use mutable objects as if they were FP objects, is all... 01:52
dinner really & :)
dataangel TimToady: I've been doing OO in C++ for years with value equivalence. Everything is an object in python too and doesn't have this behavior either.
01:56 cyphase joined
BenGoldberg m: my $beo = "bin/editor.o".IO; my $s = set $beo; $s (|)= $beo; say $s; 01:59
camelia rakudo-moar ef98f8: OUTPUT«set("bin/editor.o".IO)␤»
01:59 AlexDaniel left
BenGoldberg dataangel, ^ is that what you want? 01:59
dataangel BenGoldberg: yes but that only works because you only constructed the object once 02:00
02:01 buharin joined
BenGoldberg Do you really believe that two different filehandles, even if they point to the same underlying file, should be considered equivilant? 02:01
geekosaur theyre not filehandles though
dataangel BenGoldberg: depends on how you are defining file handle, I am only using in this instance to get a stronger type than string, i.e. to indicate that the string actually contains a path 02:02
geekosaur that said, they should probably not be the same thing. (I think they're stat caches or something?)
dataangel I think they are just paths 02:03
geekosaur which would also mean you shouldn't persist them as they may not refer to the same file later
dataangel I think they are just paths, at least that is what the documentation makes me believe, in which case I really do think they should be considered the same thing
I mean the name of the class is IO::Path, not IO::File or IO::FileDescriptor or anything like that 02:04
02:05 cyphase left
dataangel C++ lets you define custom comparators for your sets to control what kind of identity you want, is there a way to do that? 02:05
BenGoldberg Yeah, my mistake, they are paths not file handles. 02:08
geekosaur then they'd have to implement a path cache
BenGoldberg I'm quite certain perl lets you create custom comparators. 02:09
dataangel geekosaur: or a set type that uses value equivalents instead of memory addresses, which is what I'm really looking for
02:09 cyphase joined
BenGoldberg m: say( "bin/editor.o".IO eqv "bin/editor.o".IO ); 02:11
camelia rakudo-moar ef98f8: OUTPUT«True␤»
02:12 LegalResale joined
dataangel Can't find anything about custom comparators in the documentation here docs.perl6.org/language/setbagmix 02:13
BenGoldberg m: say( set( 1, 1, 2, 2, 2 ) );
camelia rakudo-moar ef98f8: OUTPUT«set(1, 2)␤»
BenGoldberg m: say( 1 ~~ 1 ); 02:15
camelia rakudo-moar ef98f8: OUTPUT«True␤»
BenGoldberg m: say( "bin/editor.o".IO ~~ "bin/editor.o".IO );
camelia rakudo-moar ef98f8: OUTPUT«True␤»
geekosaur yeh. no way to specify a comparator, it's wired to === 02:17
BenGoldberg Maybe you could override .WHERE ? 02:20
Err, .WHICH
m: .WHICH.say for "bin/editor.o".IO, "bin/editor.o".IO; 02:21
camelia rakudo-moar ef98f8: OUTPUT«IO::Path|74692768␤IO::Path|74692856␤»
BenGoldberg m: .WHICH.perl.say for "bin/editor.o".IO, "bin/editor.o".IO;
camelia rakudo-moar ef98f8: OUTPUT«ObjAt.new("IO::Path|51521056")␤ObjAt.new("IO::Path|51521144")␤»
BenGoldberg m: use MONKEY-TYPING; class IO::Path { method WHICH { .gist } }; .WHICH.perl.say for "bin/editor.o".IO, "bin/editor.o".IO; 02:22
camelia rakudo-moar ef98f8: OUTPUT«ObjAt.new("IO::Path|78647760")␤ObjAt.new("IO::Path|78647848")␤»
BenGoldberg m: use MONKEY-TYPING; class IO::Path { method WHICH { .gist } }; IO::Path.^compose; .WHICH.perl.say for "bin/editor.o".IO, "bin/editor.o".IO;
camelia rakudo-moar ef98f8: OUTPUT«ObjAt.new("IO::Path|71928080")␤ObjAt.new("IO::Path|71928168")␤»
02:22 cyphase left
BenGoldberg headscratches 02:22
MasterDuke how do i add an option to the perl6 binary? i added it to github.com/perl6/nqp/blob/master/s...r.nqp#L26, but it still complains if i try to use it (after rebuilding nqp and rakudo) 02:23
BenGoldberg m: .gist.say for "bin/editor.o".IO, "bin/editor.o".IO;
camelia rakudo-moar ef98f8: OUTPUT«"bin/editor.o".IO␤"bin/editor.o".IO␤»
02:23 grondilu_ joined
MasterDuke m: use MONKEY-TYPING; augment class IO::Path { method WHICH { self.gist } }; IO::Path.^compose; .WHICH.perl.say for "bin/editor.o".IO, "bin/editor.o".IO; 02:25
camelia rakudo-moar ef98f8: OUTPUT«ObjAt.new("IO::Path|52317384")␤ObjAt.new("IO::Path|52317472")␤»
MasterDuke odd, that works locally 02:26
02:26 grondilu left
MasterDuke m: use MONKEY-TYPING; augment class IO::Path { method WHICH { self.gist } }; IO::Path.^compose; .WHICH.say for "bin/editor.o".IO, "bin/editor.o".IO; 02:27
camelia rakudo-moar ef98f8: OUTPUT«IO::Path|84611384␤IO::Path|84611472␤»
02:28 cyphase joined
MasterDuke maybe something to do with the restricted settings? 02:28
ugexe zef now has support for consuming meta data and distributions from the cpan PSIXDISTS experiment alongside our current p6c ecosystem 02:30
02:31 sftp left, canopus left, sftp joined 02:32 noganex joined 02:34 noganex_ left
BenGoldberg Derp, I forgot 'augment', now I feel silly. 02:36
m: use MONKEY-TYPING; augment class IO::Path { method WHICH { self.gist } }; IO::Path.^compose; say( set("bin/editor.o".IO, "bin/editor.o".IO ) ); 02:37
camelia rakudo-moar ef98f8: OUTPUT«set("bin/editor.o".IO, "bin/editor.o".IO)␤»
02:37 cyphase left, canopus joined 02:42 cyphase joined 02:48 canopus left 02:55 canopus joined 02:56 grondilu_ is now known as grondilu, grondilu left, grondilu joined 03:14 cyphase left
timotimo ^- that set only has one value locally, so it *is* the restricted setting that's breaking things here 03:16
03:19 poohman_ left 03:23 vapace joined 03:28 vapace left 03:32 vike left 03:34 wamba joined, cyphase joined 03:40 cog__ left 03:42 pierre_ left 03:43 vike joined 03:47 zengargoyle left 03:48 pierre_ joined 03:49 pierre_ left, pierre_ joined, itaipu joined, zengargoyle joined 03:52 yadongz left 04:00 pierre_ left 04:03 cyphase left, lucs left 04:04 poohman joined 04:07 pierre_ joined 04:08 cyphase joined, edenc_ left 04:10 Cabanossi left 04:12 Cabanossi joined, poohman left 04:15 poohman joined 04:18 skids left 04:19 cyphase left 04:23 cyphase joined 04:27 BenGoldberg left 04:29 khw left 04:32 pierre_ left 04:33 itaipu left 04:34 cyphase left 04:36 elohmrow left 04:38 cyphase joined 04:40 wamba left 04:41 pierre_ joined 04:45 pierre_ left 04:47 vike left 04:52 cyphase left 04:53 yadongz joined 04:56 cyphase joined 04:58 yadongz left 04:59 vike joined 05:03 atta left 05:08 cyphase left 05:10 quester joined 05:12 cyphase joined 05:18 pierre_ joined 05:23 pierre_ left 05:24 poohman left 05:26 pierre_ joined
dalek osystem: c8e4282 | (Sterling Hanenkamp)++ | META.list:
Adding HTTP::Request::Supply to the ecosystem
05:35
05:36 pierre_ left 05:38 pierre_ joined 05:48 mohae left, buharin left 05:50 cyphase left 05:54 yadongz joined 05:55 cyphase joined 05:56 domidumont joined, domidumont left 05:58 yadongz left 05:59 nige1 joined 06:02 jonas2 joined 06:05 buharin joined 06:07 CIAvash joined 06:20 firstdayonthejob joined 06:28 nige1 left 06:40 nadim joined
Glitchy Does perl6 have interfaces? 06:42
06:43 firstdayonthejob left
CIAvash Glitchy: docs.perl6.org/syntax/role 06:54
06:55 yadongz joined
Glitchy CIAvash: Thanks, so a role fills many... roles? 06:55
It's like a mixin, and an interface?
nine yes 06:56
06:57 pierre_ left 06:58 cyphase left 06:59 yadongz left, brrt joined
brrt dataangel: your issue is not that perl6 doesn't allow overloading but that Set objects use object identities 07:01
07:01 RabidGravy joined
brrt imo that is the sane behaviour 07:01
07:02 cyphase joined
brrt we can quibble if Io::Path objects are values or not 07:03
07:03 pierre_ joined
Glitchy Are there any good tutorial resources yet? Just looking for a kindof 'quickstart' to get a web router running. 07:03
07:04 labster joined
brrt one other way to do what you want would be to use strings that are subtyped to coerceable to IO::Path 07:04
Glitchy: i'm not sure if/whether we have that yet 07:05
Glitchy brrt: A web router, or a tutorial resource?
brrt but that is also becausr our web toolchain is very much early adopter 07:06
we have tutorials but i dont think we have them at the level you are looking fot
judging from the web router example 07:07
07:07 pierre_ left
Glitchy brrt: The more important thing I guess from my perspective is finding the new equivelant to plackup/Starlet (if there is one) 07:08
brrt although some people have implemented web frameworks so you'd have to check there
have you chevked modules.perl6.org?
07:09 bjz joined
Glitchy Yes, I've found web routing frameworks (there's one that's basically a port of Dancer, seems like a good place to start) 07:09
brrt then that is probably your answer :-) 07:10
07:11 bjz left
Glitchy I'm maybe not asking clearly (still haven't had morning coffee). I guess what I'm looking for is the stack that sits between code and nginx/whatever web server I'm using. 07:11
brrt i dont think the perl6 website maintains web-focussed documentation.
07:11 bjz joined
Glitchy For perl 5 you had the whole PSGI stack, usually plack & Star* 07:11
brrt fairly sure we have a PSGI module 07:12
Glitchy So, you'd run the server with 'plackup ... someport ... someserver ... mycode.pl'
I'm looking for how I do that bit now
brrt hmm. can't really help you there, sorry 07:13
Glitchy OK thanks
brrt good luck 07:14
07:14 brrt left 07:17 bjz left 07:18 darutoko joined 07:20 pierre_ joined 07:24 leont_ joined
nine Glitchy: there's a PSGI implementation called Crust 07:26
07:27 bjz joined
Glitchy nine: Thanks, that's probably what I'm looking for. 07:28
nine Glitchy: also you could just use starman or starlet ;) 07:34
timotimo the sidebar of the perl6 subreddit has a little section called "install"; it mentions R* as recommended and then directly rakudobrew without additional verbiage 07:37
maybe we want to put more stuff in there? 07:38
nine and remove rakudobrew
timotimo i wasn't going to suggest such a drastic step right away :) 07:39
also, some more places will want to get the additional verbiage that warns about --gen-moar installing stuff into a --prefix if it's specified 07:40
of note, perl6.org/downloads could get it, and how-to-get-rakudo on rakudo.org could also get it
07:42 wamba joined 07:44 Actualeyes left 07:45 zakharyas joined, leont_ left
Glitchy nine: Thanks for the help, I've got a 200 returning now :) 07:48
nine \o/ 07:49
07:54 domidumont joined
timotimo seems like we've got some optimization opportunity 07:55
having a subsignature with $a1 through $a9 is slower than having my ($a1 ... $a9) = @array 07:56
08:02 Actualeyes joined 08:04 leont_ joined 08:06 bjz left, NEveD_ left, NEveD joined 08:12 pierre_ left
lizmat timotimo: please elaborate ? 08:12
BooK nick's talk at the alpine perl workshop reminds me of a lightning talk long ago :-) 08:13
rather, one of the gimmicks in the talk 08:14
timotimo www.reddit.com/r/perl6/comments/51..._overkill/ - you see the declaration of the elements $a0 through $a8 here? 08:16
if you put the $a0 through $a8 as a subsignature for @array in the signature itself - and it doesn't seem to matter if it's (...) or [...] - it gets noticably slower
08:19 pierre_ joined
timotimo and writing it out as my $a0 = @array[0]; my $a1 = @array[1]; ... is noticably faster again 08:20
lizmat timotimo: that's because STORE needs to be pessimistic 08:21
I've looked at that before, but at runtime, there's not much that can be done
so it builds two iterators, and then assigns the result of the next iteration of the first to the next iteration of the second 08:22
that's quite a lot of overhead
timotimo OK, what can we do at compile time? or maybe in the optimizer?
lizmat the case of "my ($a0, $a1, $a2, $a3, $a4, $a5, $a6, $a7, $a8) = @array" should be compile time optimisable to $a0 = @array.AT-POS(0), $a1 = @array.AT-POS(1) etc 08:23
I think that would make that an order of magnitude faster
08:23 pierre_ left
timotimo going from [0] to .AT-POS(0) makes barely a difference 08:25
08:25 pierre_ joined
lizmat yeah, it gets optimised away quickly :-) 08:25
timotimo ````````````````````````` 08:26
oops
08:27 dakkar joined
timotimo i posted on that reddit thread 08:30
08:30 yadongz joined 08:32 cyphase left 08:34 rudolfochrist joined, yadongz left 08:36 TEttinger left, pierre_ left, cyphase joined
lizmat timotimo: gist.github.com/lizmat/b3fe91c5be7...fdf2821cb4 # 25 secs versus 35 08:38
timotimo i put my current solution under it as a gist comment 08:43
08:44 pierre_ joined
timotimo it seems like we're spending most of the time inside push-all, pull-one, and postcircumfix:<[ ]> 08:44
but apparently not the one from our user code
08:48 nadim left, pierre_ left 08:49 leont_ left 08:50 nadim joined 08:52 AlexDaniel joined, woolfy left 08:57 canopus_ joined, canopus left 09:01 pierre_ joined
lizmat commute& 09:01
09:01 lizmat left
El_Che The first textual app quit message I see without "MacBook" in it. \o/ for lizmat! 09:06
llfourn m: say [+] (1,2)|(3,4) # [+] doesn't autothread? 09:12
camelia rakudo-moar ef98f8: OUTPUT«Type check failed in assignment to $sum; expected Numeric but got Junction (any(2, 2))␤ in block <unit> at <tmp> line 1␤␤»
llfourn oh wait I may have confused myself
hmm no it seems what I did should work 09:14
m: say ((1,2)|(3,4)).reduce(&[+])
camelia rakudo-moar ef98f8: OUTPUT«any(3, 7)␤»
09:14 nadim left
llfourn ^ that's what I thought it should do 09:14
09:17 nadim joined
nadim Morning P6! 09:22
09:23 bjz joined, labster left 09:24 vytas left
El_Che hi nadim 09:27
moritz \o nadim
09:27 araujo_ left 09:29 vytas joined 09:35 AlexDaniel left 09:41 lambd0x joined
lambd0x Hello everyone! 09:41
09:46 bjz left
El_Che hi lambd0x 09:48
lambd0x El_Che: \o/ 09:49
09:49 rudolfochrist left
nine -win 13 09:50
lambd0x Guys, how long an array must be for it to fail getting flatten? 09:52
09:53 rindolf joined
lambd0x It's happening to one of my algs when using a 75k input... 09:53
El_Che 75k elements? 09:55
09:58 heatsink joined
lambd0x El_Che: yes. It's a sorting alg, quicksort 09:58
09:59 zakharyas left 10:00 zakharyas joined 10:01 quester left
dalek c: 0296c98 | (Jan-Olof Hendig)++ | doc/Language/objects.pod6:
Fixed some code sample indentation problems
10:02
lambd0x e.g.,: bpaste.net/show/1849795c2214 (input); bpaste.net/show/9965889fd01f (quickSort)
10:03 pierre_ left 10:06 pierre_ joined 10:15 holyghost joined, bjz joined 10:16 travis-ci joined
travis-ci Doc build failed. Jan-Olof Hendig 'Fixed some code sample indentation problems' 10:16
travis-ci.org/perl6/doc/builds/158127574 github.com/perl6/doc/compare/ba1af...96c989f6ee
10:16 travis-ci left
dogbert17 o/ #perl6 10:20
looks as if the precomp problem from yesterday is still lingering: travis-ci.org/perl6/doc/builds/158127574 10:21
grondilu how do I export an enum? 10:27
m: module { enum <foo bar> is export }
camelia rakudo-moar ef98f8: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3module { enum <foo bar>7⏏5 is export }␤ expecting any of:␤ infix␤ infix stopper␤ postfix␤ statement end␤ sta…»
moritz grondilu: I guess it needs to be named 10:28
jnthn m: module A { enum Baz is export <foo bar> }
camelia ( no output )
grondilu m: module { enum :: is export <foo bar> }
camelia ( no output )
grondilu thanks
DrForr Heh, Perl6::Tidy can finally tidy what jnthn is pasting :) 10:29
jnthn But my pastes are beautiful already! :P
10:30 rindolf left 10:31 aries_liuxueyang left
moritz s/pasts/pastries/ 10:31
lambd0x any ideas about flat current limitations? 10:36
jnthn does rather little bakery... 10:37
lambd0x: Flat as in .flat, or as in argument passing?
10:37 xfix joined
jnthn That's limited by how many arguments the underlying VM can handle. MoarVM can handle around 2**16 though it depends on stuff like if they're named or not. JVM can only handle up to 256. 10:38
I've no plans to lift this limit in MoarVM. Note that as well as flattening the array, it also is producing a callsite object with flags for every item passed, which than has to be thrown away. 10:40
And flattened things disabled a bunch of optimizations.
*disable 10:41
10:41 aries_liuxueyang joined, TheLemonMan joined
lambd0x jnthn: I've impl. a quicksort and tested it with 75K int input and it gave me a flat related issue. 10:42
jnthn: e.g.,: bpaste.net/show/1849795c2214 (input); bpaste.net/show/9965889fd01f (quickSort)
nine lambd0x: so why don't you create a @results array, append to it and return the whole array? 10:44
jnthn Hmmm
jnthn tries to spot where the flattening actually happens in there
lambd0x jnthn: hahah 10:45
jnthn I wonder if something inside Rakudo is trying to do something weird with an argument list
lambd0x nine: I could try doing this. Must learn my way there though.. 10:46
10:46 Gothmog_ left, yoleaux left
lambd0x jnthn: as the input sizes increase for any alg that would augment a list of arrays let's say... it would give a " Too many arguments in flattening array." at some point 10:47
jnthn lambd0x: Yeah, that suggests something somewhere is trying to actually pass those all as function arguments. 10:48
I'm curious what... I guess an --ll-exception backtrace would show it up if the normal backtrace doesn't 10:49
It's worth an RT, anyway.
nine It's the multi dispatch 10:51
10:52 salva left, yadongz joined 10:53 rindolf joined, eliasr joined
nine m: multi foo([]) {}; my @a = 1..75000; foo(@a) # golfed version 10:55
camelia rakudo-moar c08285: OUTPUT«Too many arguments in flattening array.␤ in sub foo at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
jnthn Hmm
Or the unpack maybe?
But I didn't think unpacks would do that...
10:57 yadongz left
nine Well the error comes from gen/moar/m-BOOTSTRAP.nqp:933 (/home/nine/rakudo/install/share/nqp/lib/Perl6/BOOTSTRAP.moarvm:vm_capture) 10:57
jnthn Hmm 10:58
This probably means we might have some perf improvements to come on upacks :P 10:59
*unpacks
10:59 pierre_ left
jnthn (Together with the bug fix :P) 10:59
nine Wow, 2 for the price of 1!
timotimo the F? i just had a person with indian accent call from microsoft to tellme about my windows
11:00 Gothmog_ joined
nine timotimo: I'd stall them as long as possible until after half an hour on the phone they discover that I don't have any Windows at all 11:00
11:00 bartolin joined
timotimo no want 11:00
stmuk_ is anyone else getting slow dl times from GH?
lambd0x nine: haahh 11:01
TheLemonMan timotimo, maybe your windows were just dirty :D 11:02
timotimo heh 11:06
11:07 canopus_ left
stmuk_ hmm fixed using https not git 11:09
11:14 canopus joined 11:16 salva joined 11:22 bjz_ joined 11:23 bjz left 11:26 holyghost left 11:29 holyghost joined 11:35 cyphase left
gregf_ microsoft already have your details.. the call was merely to confirm you're not planning on suing them ;) 11:39
11:39 cyphase joined 11:57 skids joined
heatsink was the indian guy a Microsoft Certified Window Cleaner (MSWC) :) 12:02
12:05 cyphase left
grondilu sneaked an ad for Perl 6 on HN: news.ycombinator.com/item?id=12441886 12:06
(and for his Clifford module, kind of his pride and joy ;) )
12:09 cyphase joined
[Coke] timotimo: common spam call here in the US 12:17
I've gotten them several times. I've tried various tactics from innovative cursing, to faux excitement followed by a suggestion to question their life choices. They keep calling back. :| 12:18
Glitchy [Coke]: Next time, pick up the phone and pretend to be a cop. Tell them they've called the scene of a murder and you're currently tracing their location because you suspect they were involved. 12:20
gregf_ haha, remote execution *chuckles* 12:21
timotimo m)
dogbert17 stupid question time: docs.perl6.org/routine/spurt#(IO)_sub_spurt mentions the dynamic var $*ENC. Does that really exist? 12:22
timotimo source: &spurt 12:27
s: &spurt
SourceBaby timotimo, Sauce is at github.com/rakudo/rakudo/blob/c082...rs.pm#L150
timotimo it seems to just default to utf8 instead of $*ENC 12:28
jnthn Not a single mention of $*ENC in Rakudo. So, no. :) 12:29
dogbert17 jnthn: thanks will change the doc from 'Str :$enc = $*ENC' to 'Str :$enc = 'utf8' 12:32
ShimmerFairy I think $*ENC doesn't exist yet because we've not really done much with the idea of not defaulting to Unicode :P 12:33
timotimo $*ENC = 'EBCDIC' 12:34
moritz that's not an encoding, it's an abdomination
DrForr Naah, UTF-9 :) 12:35
timotimo nobody has been fired for buying EBCDIC
ilmari UTF-EBCDICF
-F
moritz timotimo: there's always a first time :-) 12:37
12:37 holyghost left
jast UTF-EBCDIC is amazing 12:37
12:40 skids left
dalek c: d8c7dc9 | (Jan-Olof Hendig)++ | doc/Type/IO.pod6:
Removed reference to bogus dynvar ENC. jnthn++
12:40
dogbert17 moritz: let's see if this build works 12:41
moritz dogbert17: nine++ just pointed out another problem in rakudo, over in #perl6-dev 12:42
12:42 yoleaux joined, ChanServ sets mode: +v yoleaux
dogbert17 in the meantime, stupid question #2. If I have a method object, how can I figure out which class the method belongs to? 12:43
timotimo it might have a .package?
12:43 pierre_ joined
dogbert17 moritz: ah, nine++ is on the job 12:43
timotimo m: class test { method meth { } }; my &m = test.^find_method('meth'); say &m.^methods
camelia rakudo-moar c08285: OUTPUT«(gist <anon> <anon> <anon> soft <anon> <anon> yada perl <anon> onlystar candidates unwrap wrap <anon> <anon> package leave <anon> <anon> cando <anon> <anon> <anon> <anon> multi <anon> <anon> add_phaser has-phaser phasers assuming WHY set_why perl of <anon>…»
timotimo m: class test { method meth { } }; my &m = test.^find_method('meth'); say &m.^methods.grep(*.name ne '<anon>') 12:44
camelia rakudo-moar c08285: OUTPUT«(gist soft yada perl onlystar candidates unwrap wrap package leave cando multi add_phaser has-phaser phasers assuming WHY set_why perl of returns fire_phasers has-phasers count line perl file of ACCEPTS signature Str arity returns new outer static_id)␤»
timotimo m: class test { method meth { } }; my &m = test.^find_method('meth'); say &m.package
camelia rakudo-moar c08285: OUTPUT«(test)␤»
timotimo dogbert17: ^
dogbert17 timotimo++ to the rescue
12:45 holyghost joined, g4 left
dogbert17 m: for 12.can("sqrt") {say .package} 12:47
camelia rakudo-moar c08285: OUTPUT«(Int)␤(Cool)␤»
dogbert17 cool
12:47 travis-ci joined
travis-ci Doc build failed. Jan-Olof Hendig 'Removed reference to bogus dynvar ENC. jnthn++' 12:47
travis-ci.org/perl6/doc/builds/158162748 github.com/perl6/doc/compare/0296c...c7dc9ed695
12:47 travis-ci left
dogbert17 boom 12:48
timotimo not problematic
taht's just the recent change to PrecompilationID that nine made
the patch for that just landed in rakudo
dogbert17 timotimo: cool, it will soon be put to the test when the next doc change goes in 12:50
timotimo good to hear
12:51 pierre_ left 13:00 Praise- joined, Praise- left, Praise- joined 13:03 mcmillhj joined 13:04 holyghost left, Praise- is now known as Praise 13:09 jonas2 left 13:10 madrudik joined 13:11 madrudik left 13:14 pierre_ joined 13:20 cdg joined 13:21 sakuya joined
dalek c: 70e6cc5 | (Jan-Olof Hendig)++ | doc/Language/ipc.pod6:
Fixed two code examples which didn't compile
13:26
13:26 TheLemonMan left 13:27 TheLemonMan joined
timotimo good 13:27
gregf_ m: <Str shift>.map: { [].^lookup($_).package.say} 13:29
camelia rakudo-moar f0bb58: OUTPUT«(Mu)␤(Array)␤»
13:29 wamba left
timotimo just called lenovo support to get two kinds or repair done 13:32
it's always super nice :3 13:33
13:33 TheLemonMan left
dogbert17 the build process work now it seems, nine++ 13:39
13:39 holyghost joined
nadim Hi, I haven't seen much about Ties but I guess one can derive from Int, Hash and such and find accessors, ..., right? 13:42
moritz nadim: right 13:43
timotimo "find" accessors?
moritz also one can just give classes hash-like or array-like behavior 13:44
without subclassling
ShimmerFairy you would have to do the Positional or Associative roles if you want to bind them to @ and % variables though, IIRC 13:48
13:49 travis-ci joined
travis-ci Doc build passed. Jan-Olof Hendig 'Fixed two code examples which didn't compile' 13:49
travis-ci.org/perl6/doc/builds/158174319 github.com/perl6/doc/compare/d8c7d...e6cc5d6f91
13:49 travis-ci left
llfourn ^ that's correct 13:49
13:53 cyphase left 13:57 cyphase joined
nadim moritz, timotimo: any article somewhere, or a doc, showing examples? 13:58
13:59 zacts joined
moritz nadim: docs.perl6.org/language/subscripts 14:00
in particular docs.perl6.org/language/subscripts#Custom_types
nadim cool, thanks 14:01
14:01 canopus left 14:06 cyphase left 14:08 canopus joined 14:09 Actualeyes1 joined, Actualeyes left
timotimo yay, i can see nine's talk from the APW 14:10
llfourn m: say (Real,) ~~ (Real,), (Real,) ~~ (Real).list # Bug?
camelia rakudo-moar f0bb58: OUTPUT«TrueFalse␤»
timotimo www.youtube.com/watch?v=ZRkots5Am1U 14:11
14:11 cyphase joined 14:12 TheLemonMan joined 14:13 skids joined 14:14 wamba joined
llfourn m: say (Real,) ~~ (Real,), (Real,) ~~ (Real).List # .List seems to work.. 14:14
camelia rakudo-moar f0bb58: OUTPUT«TrueFalse␤»
llfourn hmm or not
14:20 rindolf left, dogbert17 left, imcsk8 left, xinming left, stmuk_ left, kshannon left, jervo left, ufobat left, eyck left, nine left, jdv79 left, broquaint left, xdbr left, TheDir_ left, jeek left, gypsydave5 left, jast left 14:22 cyphase left 14:25 M-Illandan left 14:26 cyphase joined 14:30 canopus left, M-Illandan joined 14:35 chris2 left, canopus joined 14:36 Lee__ joined, Lee__ is now known as leejo
leejo github.com/leejo/geo-ip2location-l...3cfcdc29c2 # can anyone confirm if i'm DTRT here? ( still need to kill a couple of unpack calls in the module as well) 14:37
14:39 cyphase left, stmuk_ joined 14:40 rindolf joined 14:41 mohae joined 14:42 jervo joined, dogbert17 joined, imcsk8 joined, xinming joined, kshannon joined, ufobat joined, eyck joined, nine joined, jdv79 joined, broquaint joined, xdbr joined, TheDir_ joined, jeek joined, gypsydave5 joined, jast joined 14:43 cyphase joined 14:49 pierre_ left, pierre_ joined 14:50 pierre_ left 14:51 wamba left 14:56 sufrostico left 14:58 user10 joined
gregf_ m: for [(Real,), (Real).List] { .^name.say } 14:58
camelia rakudo-moar f0bb58: OUTPUT«List␤List␤»
timotimo nine: do you remember what the problem was of the person who said they can't get rakudo to run any code in parallel?
m: m: for [(Real,), (Real).List] { .perl.say }
camelia rakudo-moar f0bb58: OUTPUT«$(Real,)␤$(Real,)␤»
14:58 user9 left, user10 is now known as user9 14:59 zacts left, user9 left, acrussell joined 15:00 sakuya left
llfourn timotimo: it seems it's because Real is a role and when you do Real.list i puns Real into a class and then makes a list from that 15:00
15:00 rindolf left, khw joined
timotimo oh, that makes sense 15:00
a lot of sense, really
llfourn m: say (Real,)[0] ~~ (Real)[0] 15:01
camelia rakudo-moar f0bb58: OUTPUT«True␤»
llfourn m: say (Real,)[0] ~~ Real.List[0]
camelia rakudo-moar f0bb58: OUTPUT«False␤»
llfourn ya
15:01 cyphase left 15:02 user9 joined
llfourn m: Real ~~ Real.^pun 15:03
camelia ( no output )
llfourn m: say Real ~~ Real.^pun
camelia rakudo-moar f0bb58: OUTPUT«False␤»
llfourn m: say Real.^pun ~~ Real
camelia rakudo-moar f0bb58: OUTPUT«True␤»
15:04 rindolf joined
llfourn I guess that's notabug then 15:04
m: say Real ~~ List.new(Real) 15:05
camelia rakudo-moar f0bb58: OUTPUT«False␤»
llfourn hmmm
15:05 cyphase joined
llfourn m: say (Real,)[0] ~~ List.new(Real)[0] 15:06
camelia rakudo-moar f0bb58: OUTPUT«True␤»
llfourn I guess that's what I have to do to make a list from some arbitary value without punning it in the case it's a role 15:07
15:09 buggable left, buggable joined 15:10 buggable left, buggable joined 15:13 lichtkind_ joined 15:17 lichtkind__ left
nine timotimo: that was most probably just a misinterpretation of the output of the test script 15:20
timotimo ah 15:21
well, sleeping won't show a core as utilized
so they were probably expecting like 400% cpu usage or something
nine and the test script prints one number per second because it starts 10 runs in parallel with increasing sleep times.
doesn't look very parallel though :)
15:23 yadongz joined
gregf_ is there any method like instance_variable_get(Ruby) or __getattribute__(python)? 15:27
timotimo right, because each echo is supposed to come in about a second after the other until the size of the pool is hit
gregf_: you can $object."$name-of-attribute"() 15:28
15:28 yadongz left
gregf_ ah - ok. looks a bit ugly tho' :/ 15:28
timotimo make it a sub of your own choice :) 15:29
nine gregf_: well you are doing something very unusual. Arguably it _should_ stand out
gregf_ also, for comparing two objects, should ~~ be enough or does one need to provide an == or eq method?
nine: heh
timotimo eqv is for object equivalence
gregf_ ok, nice
15:30 cyphase left
gregf_ timotimo: no such method :/ 15:30
15:31 zacts joined
gregf_ m: class Foo { has Str $.a; has Int $.b; }; Foo.new(a => "foo", b => 100).eqv(Foo.new(a => "foo", b => 100)) 15:31
camelia rakudo-moar f0bb58: OUTPUT«Method 'eqv' not found for invocant of class 'Foo'␤ in block <unit> at <tmp> line 1␤␤»
timotimo yeah, it's not a method :) 15:32
gregf_ oh, a global function?
timotimo operator
gregf_ ok
yay! 15:33
timotimo: ta!
15:35 domidumont left, heatsink left, cyphase joined
gregf_ m: gist.github.com/anonymous/82e9f1fc...3612e10e69 15:37
camelia rakudo-moar f0bb58: OUTPUT«True␤»
gregf_ looks neater :)
timotimo well, to perl programmers, "eq" will signify "string equivalence" 15:39
so you might cause confusion there
gregf_ true that 15:40
15:44 cyphase left
[Coke] .ask pmurias src/vm/js/Chunk.nqp uses nqp::list_s - where is list_s defined for the js backend? 15:45
yoleaux [Coke]: I'll pass your message to pmurias.
dogbert17 m: module Foo; use NativeCall; our sub init() is native('foo') is symbol('FOO_INIT') { * } # fails 15:46
camelia rakudo-moar f0bb58: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Semicolon form of 'module' without 'unit' is illegal. You probably want to use 'unit module'␤at <tmp>:1␤------> 3module Foo;7⏏5 use NativeCall; our sub init() is nativ␤»
dogbert17 m: unit module Foo; use NativeCall; our sub init() is native('foo') is symbol('FOO_INIT') { * } # is this how it's supposed to be?
camelia ( no output )
timotimo yeah 15:47
dogbert17 timotimo: look here: docs.perl6.org/language/nativecall...ging_names should I change it?
15:49 cyphase joined 15:51 MilkmanDan left, MilkmanDan joined 15:53 araujo joined
dalek c: 2c41d82 | (Jan-Olof Hendig)++ | doc/Language/nativecall.pod6:
Fixed error in code example
16:06
16:09 acrussell left 16:11 atta joined 16:13 mcmillhj left 16:17 atta left
timotimo dinner time \o/ 16:19
16:19 ptolemarch joined 16:20 cyphase left, cognominal joined, acrussell joined 16:24 cyphase joined 16:25 atta joined 16:26 MilkmanDan left 16:27 MilkmanDan joined 16:40 zacts left
masak greetings, #perl6 16:41
16:44 mcmillhj joined
timotimo masak, greetings: 16:46
masak I think I will start greeting people with a colon like that 16:48
makes them come back for more :)
timotimo Indirect Greeting Notation :) 16:50
masak .oO( the greeting that leaves you hanging, and here's why: )
16:53 dakkar left 16:55 canopus left
DrForr #`[ How to drive Perl 6 hacker crazy. 17:00
17:01 cyphase left, canopus joined 17:02 MetaZoffix joined
MetaZoffix m: say "7\x[308]" ~~ /^ \d+ $/ 17:02
camelia rakudo-moar f0bb58: OUTPUT«「7̈」␤»
MetaZoffix Is there an easy way to make it look for *just* numbers without combiners?
m: "\x[308]".uninames.say 17:03
camelia rakudo-moar f0bb58: OUTPUT«(COMBINING DIAERESIS)␤»
17:04 sufrostico joined 17:05 pyrimidine left
MetaZoffix m: say "7\x[308]" ~~ /^ <:N>+ $/ 17:05
camelia rakudo-moar f0bb58: OUTPUT«「7̈」␤»
MetaZoffix :/
17:05 cyphase joined
MetaZoffix Doesn't seem to be anything in docs.perl6.org/language.html on the topic 17:08
17:08 stux|RC-only left
mst ... MetaZoffix 17:10
timotimo MetaTrout?
mst did something make you go .WHAT ?
MetaZoffix mst: what?
timotimo well, actually it'd be .HOW :)
MetaZoffix Ah the name
17:10 stux|RC-only joined
mst if what I say doesn't make sense, first check to see if it was a terrible joke that you were lucky enough to miss the first tame 17:12
*time
Xliff .seen grondilu
yoleaux I saw grondilu 10:28Z in #perl6: <grondilu> thanks
MetaZoffix m: say "7\x[308]".NFC ~~ /^ \d+ $/ 17:13
camelia rakudo-moar f0bb58: OUTPUT«「7̈」␤»
MetaZoffix m: say "7\x[308]".NFD ~~ /^ \d+ $/
camelia rakudo-moar f0bb58: OUTPUT«「7̈」␤»
MetaZoffix m: say "7\x[308]".NFJUSTWORKDAMMIT ~~ /^ \d+ $/
camelia rakudo-moar f0bb58: OUTPUT«Method 'NFJUSTWORKDAMMIT' not found for invocant of class 'Str'␤ in block <unit> at <tmp> line 1␤␤»
geekosaur heh
.NFWTF
(used, of course, with WTF-8) 17:14
17:16 cyphase left, firstdayonthejob joined
DrForr I'd still prefer the default to be UTF-9 :) 17:16
MetaZoffix Well, I get the bytes from .NF stuff, but I've no idea how to make them match the regex properly :/ 17:17
17:17 stux|RC-only left
geekosaur sends DrForr TOPS-20 17:18
MetaZoffix m: say "7\x[308]" ~~ /^ [0..9]+ $/
camelia rakudo-moar f0bb58: OUTPUT«Nil␤»
MetaZoffix (can't use this, I need all the numbers)
17:18 stux|RC-only joined
MetaZoffix m: say "7\x[308]" ~~ /^ [\d]+ $/ 17:18
camelia rakudo-moar f0bb58: OUTPUT«「7̈」␤»
MetaZoffix ~_~ 17:19
17:20 cyphase joined
MetaZoffix m: "\x[308]".uniprop.say 17:21
camelia rakudo-moar f0bb58: OUTPUT«Mn␤»
MetaZoffix m: say "7\x[308]" ~~ /^ <:N-:Mn>+ $/
camelia rakudo-moar f0bb58: OUTPUT«「7̈」␤»
MetaZoffix bruh
m: say "7\x[308]" ~~ /^ [<:N><!before <:Mn>]+ $/ 17:22
camelia rakudo-moar f0bb58: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in metachar:sym<assert>; couldn't find final '>' ␤at <tmp>:1␤------> 3say "7\x[308]" ~~ /^ [<:N><!before <:Mn>7⏏5]+ $/␤ expecting any of:␤ infix stopper␤»
MetaZoffix m: say "7\x[308]" ~~ /^ [<:N><!before <:Mn>>]+ $/
camelia rakudo-moar f0bb58: OUTPUT«「7̈」␤»
MetaZoffix Great. Fuck it. 17:23
MetaZoffix picks another ticket to fix
timotimo maybe looks like we're emitting nqpordbaseat or something even though we should be mindful of accents and other combiners that should make our matches fail? 17:24
geekosaur was wondering where :ignoremark went
I think that was it
timotimo ignoremark only means you want to match something even though it has marks on it 17:25
17:27 araujo_ joined
geekosaur yes, the implication being that the behavior MetaZoffix wants is when ignoremark is not in effect --- but I see no ignoremark on docs.perl6.org and it appears to be the default behavior currently 17:28
17:28 cyphase left
geekosaur which makes me wonder if it got made the default and de-specced 17:28
MetaZoffix It is in the roast 17:29
timotimo no, it's not supposed to be the default
MetaZoffix m: say "7\x[308]" ~~ m:!ignoremark/^ \d+ $/
camelia rakudo-moar f0bb58: OUTPUT«「7̈」␤»
MetaZoffix m: say "7\x[308]" ~~ m:ignoremark/^ \d+ $/
camelia rakudo-moar f0bb58: OUTPUT«「7̈」␤»
17:29 araujo__ joined 17:30 lambd0x left
MetaZoffix bisect: m: say "7\x[308]" ~~ /^ \d+ $/ 17:30
bisectable6 MetaZoffix, On both starting points (good=2015.12 bad=77d9d41) the exit code is 0 and the output is identical as well
MetaZoffix, Output on both points: 「7̈」
17:30 araujo left 17:31 araujo_ left 17:32 shlomif joined
geekosaur ok, so bug, and timotimo's sugestion about nqpordbaseat is probably near the mark (another bug of that sort was recently fixed iirc) 17:32
17:33 cyphase joined 17:34 shlomif left
MetaZoffix OK. Created the ticket: rt.perl.org/Ticket/Display.html?id=129221 17:36
m: say "a\x[308]" ~~ /^ \w+ $/ 17:37
camelia rakudo-moar f0bb58: OUTPUT«「ä」␤»
MetaZoffix is still unsure if that's the way it's supposed to be or not
But if it is, there should be an easy way to disable this behaviour IMO
timotimo i think you would be supposed to :ignoremark around things you want to match even with marks 17:38
MetaZoffix m: say "a\x[308]" ~~ /^ 'a'+ $/ 17:41
camelia rakudo-moar f0bb58: OUTPUT«Nil␤»
MetaZoffix m: say "a\x[308]" ~~ m:ignoremark/^ 'a'+ $/
camelia rakudo-moar f0bb58: OUTPUT«「ä」␤»
MetaZoffix hm
yeah
17:43 cyphase left 17:47 cyphase joined
MetaZoffix .seen psch 17:49
yoleaux I saw psch 4 Aug 2016 16:33Z in #perl6: <psch> it's not compile time though, but that seems to be a thing we general don't do
17:50 lizmat joined
[Coke] jnthn++ fixed my weird socket/async issue (which turned out to be GC related, not IO related) 17:51
MetaZoffix \o/ 17:52
17:56 cyphase left 17:57 chris2 joined 18:00 cyphase joined 18:04 woolfy joined
timotimo yeah, when a thread was accepting a socket, it wasn't properly marked as "won't raise its hand when threads co-ordinate to start a GC run" 18:07
so when a thread thought a gc run ought to be started, all other threads would wait for the accept-ing thread
and until a new connection came in, the GC run wouldn't start, thus blocking all other threads from progressing
18:09 cyphase left
pmichaud m: say "7\x[308]".chars 18:10
yoleaux 30 Aug 2016 15:40Z <[Coke]> pmichaud: that question predates you fixing the thing I couldn't fix
camelia rakudo-moar f0bb58: OUTPUT«1␤»
yoleaux 30 Aug 2016 15:41Z <[Coke]> pmichaud: regarding segregating roast queue vs. rakudobug queue - no, I don't think it's worth our time necessarily to force the tickets into the right queues. We can probably do just as well by having some metadata about tickets in RT
30 Aug 2016 15:42Z <[Coke]> pmichaud: for some tickets, it's easy or obvious to move them; but anyone working on anything in the toolchain or lang spec is going to deal with RT.
timotimo greetings pmichaud 18:12
MetaZoffix m: say "7\x[308]" eq "7"
camelia rakudo-moar f0bb58: OUTPUT«False␤»
18:13 xinming left
pmichaud right, they're both strings with the same number of graphemes (1), but they contain different graphemes. 18:13
18:13 xinming joined, cyphase joined
pmichaud I'm guessing that "7\x[308]" ~~ / ^ \d+ $ / returns a match because the \d is able to match the "7\x[308]" grapheme. 18:14
18:14 spider-mario joined 18:15 sufrostico left, wamba joined
MetaZoffix m: say "١\x[308]" ~~ / ^ \d+ $ / 18:15
camelia rakudo-moar f0bb58: OUTPUT«「١̈」␤»
pmichaud m: my $m = "7\x[308]" ~~ /^\d+$/; say $m; say $m.chars; say $m eq '7';
camelia rakudo-moar f0bb58: OUTPUT«「7̈」␤1␤False␤»
MetaZoffix But what about <:N> shouldn't it only match N stuff?
m: m: say "١\x[308]" ~~ / ^ <:N>+ $ / 18:16
camelia rakudo-moar f0bb58: OUTPUT«「١̈」␤»
mst works through the docs complaining about things
pmichaud I don't recognize <:N>, sorry.
(looking)
MetaZoffix we have docs that complain about things
pmichaud: from the docs, that's supposed to only match chars with N unicode property: docs.perl6.org/language/regexes#Un...properties 18:17
m: say "١\x[308]" ~~ / ^ <!M>+ $ /
camelia rakudo-moar f0bb58: OUTPUT«Method 'M' not found for invocant of class 'Cursor'␤ in block <unit> at <tmp> line 1␤␤»
MetaZoffix m: say "١\x[308]" ~~ / ^ <:!M>+ $ /
camelia rakudo-moar f0bb58: OUTPUT«「١̈」␤»
18:17 leont_ joined
pmichaud m: say "١".ord 18:18
camelia rakudo-moar f0bb58: OUTPUT«1633␤»
MetaZoffix m: say "١".uniprop
camelia rakudo-moar f0bb58: OUTPUT«Nd␤»
MetaZoffix m: say "\x[308]".uniprop 18:19
camelia rakudo-moar f0bb58: OUTPUT«Mn␤»
MetaZoffix m: say "١\x[308]" ~~ / ^ <:!Mn>+ $ /
camelia rakudo-moar f0bb58: OUTPUT«「١̈」␤»
MetaZoffix m: m: say "١\x[308]" ~~ / ^ <:Nd>+ $ /
camelia rakudo-moar f0bb58: OUTPUT«「١̈」␤»
18:19 zakharyas left
MetaZoffix m: m: say "١\x[308]" ~~ / ^ <:Nd+:!Mn>+ $ / 18:20
camelia rakudo-moar f0bb58: OUTPUT«「١̈」␤»
pmichaud so yes, it looks to me as though "١" has the N property.
MetaZoffix Yeah. And I'm asking for a match with <start of string> <some N chars> <end of string> and it still matches the Mn 18:21
timotimo i suppose our combined graphemes just derive the properties of their base char?
pmichaud timotimo: I believe that's correct, yes.
MetaZoffix m: "١\x[308]".uniprop 18:23
camelia ( no output )
MetaZoffix m: "١\x[308]".uniprop.say
camelia rakudo-moar f0bb58: OUTPUT«Nd␤»
pmichaud m: say "7\x[308]7" ~~ / ^ <:Nd+:Mn>+ $ /
camelia rakudo-moar f0bb58: OUTPUT«「7̈7」␤»
mst m: my @name = <John Smith>; { "$^surname, $^firstname" }(|@name)
camelia ( no output )
mst oh 18:24
pmichaud m: say "7\x[308]7" ~~ / ^ <:Mn>+ $ /
camelia rakudo-moar f0bb58: OUTPUT«Nil␤»
mst m: my @name = <John Smith>; { "$^surname, $^firstname" }(|@name).say
camelia rakudo-moar f0bb58: OUTPUT«Smith, John␤»
mst suspect that counts as $^ abuse
timotimo m: say "7\x[308]" ~~ / <[0..9]> /
camelia rakudo-moar f0bb58: OUTPUT«Nil␤»
pmichaud m: say "77\x[308]7" ~~ / ^ <:Mn>+ $ /
camelia rakudo-moar f0bb58: OUTPUT«Nil␤»
pmichaud m: say "77\x[308]7" ~~ / ^ <:Mn>+ /
camelia rakudo-moar f0bb58: OUTPUT«Nil␤»
pmichaud m: say "77\x[308]7" ~~ / ^ <:!Mn>+ /
camelia rakudo-moar f0bb58: OUTPUT«「77̈7」␤»
18:25 cyphase left
pmichaud yeah, it looks as though combined chars just have the properties of their base grapheme and not the combining marks. I don't know if that's correct or not. 18:25
geekosaur the problem is that at NFG level you do not have a mark, you have a synthetic of the base and the mark that is not itself considered a mark
MetaZoffix m: my @name = <John Smith>; { "$^surname, $^fir\x[308]stname" }(|@name).say
camelia rakudo-moar f0bb58: OUTPUT«Smith, John̈stname␤»
MetaZoffix lol 18:26
geekosaur and I think this is correct; I do not want ş to be considered a mark
timotimo i don't think we'd find any combined numbers + marks in unicode already declared
18:26 pyrimidine joined
geekosaur (note I chose one that at least currently has no single-char definition, the way e.g. iso8859-1 chars do) 18:27
pmichaud geekosaur: should the properties of a combined char be a combination also, though?
MetaZoffix m: say "_\x[308]" ~~ /\w+/
camelia rakudo-moar f0bb58: OUTPUT«「_̈」␤»
geekosaur I suspect the properties for a synthetic should be those of the base plus a prop that says that it is synthetic/composed 18:28
pmichaud that makes sense.
I agree that "7\x[308]" is no longer a Mark.
geekosaur because otherwise you break usages that expect that e.g. mark only matches actual marks, not marks composed onto other chars
pmichaud so it shouldn't have the :M property.
so that seems to me that Rakudo is correct heere. 18:29
18:29 cyphase joined
MetaZoffix OK. What's the way to regex-match digits-only for example? Without any combinators or anything else what will mess up SoftwareXYZ I'm about to send this data to? 18:29
18:29 FROGGS joined
geekosaur it's arguably not correct in considering the synthetic to match \d though, unless :ignoremark is in effect (so, :ignoremark becomes ignore chars with the synthetic prop) 18:30
mst MetaZoffix: [0-9] ?
MetaZoffix mst: really?
geekosaur er, :!ignoremark becomes
ShimmerFairy P6 regex has it as <[0..9]>
MetaZoffix m: say '١' ~~ /^ [0-9] $/
camelia rakudo-moar f0bb58: OUTPUT«5===SORRY!5===␤Unrecognized regex metacharacter - (must be quoted to match literally)␤at <tmp>:1␤------> 3say '١' ~~ /^ [07⏏5-9] $/␤Unable to parse expression in metachar:sym<[ ]>; couldn't find final ']' ␤at <tmp>:1␤------> 3say '…»
MetaZoffix m: say '١' ~~ /^ [0..9] $/
camelia rakudo-moar f0bb58: OUTPUT«Nil␤»
geekosaur I am under the impression Zoffix wanted to match NLS digits as well
MetaZoffix m: Date.new('١١١١-١١-١١').say 18:31
camelia rakudo-moar f0bb58: OUTPUT«1111-11-11␤»
MetaZoffix Well, my actual usecase depeneds on whether the above is valid.
And if it isn't, I can get away with 0..9
pmichaud To my knowledge, that date is valid. 18:32
mst if you're trying to get 'only digits and no clever unicode stuff that will confuse other software' [0-9] is the usual answer
certainly it's what I do over in p5world
pmichaud basically <[0..9]> means "ASCII digits only"
masak mst: re irclog.perlgeek.de/perl6/2016-09-07#i_13166424 -- I don't think it counts as abuse
mst masak: well it does kinda only work because 'f' < 's' 18:33
MetaZoffix m: say "7\x[308]\x[308]\x[308]\x[308]\x[308]\x[308]\x[308]\x[308]\x[308]\x[308]\x[308]\x[308]\x[308]\x[308]\x[308]" ~~ /^ \d**1 $/
camelia rakudo-moar f0bb58: OUTPUT«「7̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈」␤»
MetaZoffix yeah, that's trouble waiting to happen
masak mst: yes, but you're expected to know that whenever you use more-than-one implicit parameter
ShimmerFairy You might want a Uni or other non-Str string to work on codepoints, though I'm not sure if regexes are able to match non-Strs yet.
pmichaud mst/masak: That looks to me like "abuse consistent with language design" :)
mst doing it with $^a, $^b wouldn't seem abusive, using the fact that the words I wanted *happen* to be in the right order seems less right
pmichaud: yes. *that* I'll happily stipulate to :D
masak I like pmichaud's phrasing too 18:34
but I don't see much wrong with doing it
mst the awesome thing is 'm' is also in the right place
MetaZoffix I do. It's using semantical naming where positional naming needs to be used 18:35
mst m: { "$^surname, $^firstname $^middlename" }(|<Matt S Trout>).say
camelia rakudo-moar f0bb58: OUTPUT«Trout, Matt S␤»
FROGGS o/
yoleaux 4 Aug 2016 15:43Z <Xliff> FROGGS: all tests in 07dtd now pass. Thanks!
moritz in *m*st, *m*asak and p*m*ichaud :-)
MetaZoffix As silly as using sub ($first-arg, $second-arg, $third-arg) { ... }
ShimmerFairy mst: try $familyname instead :P
MetaZoffix FROGGS: !
FROGGS: I need your keys! :)
masak mst: clearly someone thought about this when they designed English :P
mst masak: and then the americans undesigned it, hence ShimmerFairy's problem
pmichaud one could always do { "$^arg2, $^arg0 $^arg1" }(|...) 18:36
FROGGS .tell Xliff Can you merge (after sqashing) the PR please? I'm back from vacation but still lacking Perl 6 tuits...
yoleaux FROGGS: I'll pass your message to Xliff.
mst pmichaud: yeah, or { "$^c, $^a $^b" } which would be my first thought for "real" code
MetaZoffix FROGGS: well, I actually forget what and if you told me anything, but one release (2016.06) you uploaded shows up as unverified because GitHub doesn't have your public key: github.com/rakudo/rakudo/tags
mst but this still makes me happy
pmichaud we like making programmers happy. :)
mst ShimmerFairy: WELL, ACTUALLY
18:36 lizmat left
mst m: { "$^firstname $^middlename $^familyname" }(|('Trout', <Matt S>)).say 18:37
camelia rakudo-moar f0bb58: OUTPUT«Too few positionals passed; expected 3 arguments but got 2␤ in block <unit> at <tmp> line 1␤␤»
mst bah
m: { "$^firstname $^middlename $^familyname" }(|('Trout', |<Matt S>)).say
camelia rakudo-moar f0bb58: OUTPUT«Matt S Trout␤»
FROGGS MetaZoffix: ohh
mst ShimmerFairy: see, totally works fine :P
pmichaud also
{ "$^givenname $^middlename $^clan" }(|...)
FROGGS MetaZoffix: where do I upload my public key to? 18:38
pmichaud also $^tribe
mst :D
MetaZoffix FROGGS: bottom of page here: github.com/settings/keys
pmichaud alas, I have to run off again.
MetaZoffix FROGGS: and you can generate one with gpg --armor --export <email>
18:38 zacts joined 18:39 cyphase left
FROGGS MetaZoffix: done \o/ 18:39
MetaZoffix: thank you
MetaZoffix FROGGS++ \o/ 18:40
timotimo oh hey FROGGS :)
18:40 cdg left
MetaZoffix m: { "$^Δ $^Ε $^Ζ" }(|('Trout', |<Matt S>)).say 18:40
camelia rakudo-moar f0bb58: OUTPUT«Trout Matt S␤»
MetaZoffix m: { "$^Ζ $^Η $^Θ" }(|('Trout', |<Matt S>)).say 18:41
camelia rakudo-moar f0bb58: OUTPUT«Trout Matt S␤»
MetaZoffix ^_^
m: { "$^Ζ $^Η $^Ι" }(|<a b c>).say 18:42
camelia rakudo-moar f0bb58: OUTPUT«a b c␤»
FROGGS hi timotimo :o)
MetaZoffix Where's your god now? :)
masak $^? was new to me
DrForr Entwining his noodly apendages in your code. 18:43
MetaZoffix masak: get a better terminal :P
DrForr++
masak oh noes, not again
anyway, I'm slightly relieved we don't actually use $^? for that :P
18:43 cyphase joined, zacts left
MetaZoffix masak: i.imgur.com/CBTQIWK.png 18:44
m: "ΖΗΙ".uninames.say
camelia rakudo-moar f0bb58: OUTPUT«(GREEK CAPITAL LETTER ZETA GREEK CAPITAL LETTER ETA GREEK CAPITAL LETTER IOTA)␤»
18:44 rockworldmi joined 18:45 rockworldmi left
masak nodnod 18:46
yeah, I see it fine in the irclog, too
since I switched from hack.p6c.org to irc.p6c.org, Unicode hasn't rendered correctly. I don't know why; the settings seem fine 18:47
hm, didn't moritz++ have a blog post of an entry somewhere about this? :)
moritz masak: perlgeek.de/en/article/set-up-a-cl...nvironment ? 18:48
18:48 cyphase left 18:50 labster joined
moritz masak: if tere are locales you're missing, let me know and I'll add them 18:54
18:56 domidumont joined 18:59 domidumont left
El_Che my 2 utf-8 ¢: besides the shell, make sure your irssi has utf8 enabled, start en attach screen with -U 19:04
timotimo or use tmux :) 19:05
moritz El_Che: I do mention those points on perlgeek.de/en/article/set-up-a-cl...nvironment :-)
masak moritz: thank you -- will check now 19:06
El_Che moritz: you post is the full $/€/£/¥ ;)
masak El_Che: yes, I always start and attach screen with -U. it worked on hack 19:07
[Coke] masak: I'm using irc.p6c, I have unicode ok in my irc. 19:08
El_Che crap, backup ext usb disk dead after 4 years.
masak [Coke]: weird.
19:08 RabidGravy left
[Coke] masak: feel free to dig through my . files 19:08
moritz masak: what locale do you use? 19:11
masak let me paste what I see from `locale`
gist.github.com/masak/530052eea9f9...f8c0e6b052 19:12
yes, LC_ALL is empty. I can fill it in with the `export` command from moritz++' blog post, but that does not fix the problem.
moritz installs nb_NO.UTF-8 19:13
[Coke] what's your TERM?
masak [Coke]: 'xterm' 19:14
[Coke] mine is 'screen'. (even though I'm using tmux)
nemo timotimo: yeah non-existent support for unicode outside of BMP was why I ditched irssi
er
ditched screen 19:15
masak `perl -Mcharnames=:full -CS -wle 'print "\N{EURO SIGN}"'` works fine after I set LC_ALL
(but irssi still doesn't)
moritz masak: you might need to restart irssi 19:16
nemo mm
moritz (you can start a second instance of irssi to test)
masak oki, good 19:17
19:17 darutoko left
nemo I think avoiding restarting irssi is the main reason I put off reboot ☺ 19:17
masak moritz: yay, that works
brb
19:18 masak left 19:19 masak joined
masak yayyy ☺☺☺☺ 19:19
moritz yow! \o/
nemo stress test.... for i in {0..100};do printf "\U`printf %x $((128000+i))` ";done
/exec -out ☺
MetaZoffix :D
nemo 🐀 🐁 🐂 🐃 🐄 🐅 🐆 🐇 🐈 🐉 🐊 🐋 🐌 🐍 🐎 🐏 🐐 🐑 🐒 🐓 🐔 🐕 🐖 🐗 🐘 🐙 🐚 🐛 🐜 🐝 🐞 🐟 🐠 🐡 🐢 🐣 🐤 🐥 🐦 🐧 🐨 🐩 🐪 🐫 🐬 🐭 🐮 🐯 🐰 🐱 🐲 🐳 🐴 🐵 🐶 🐷 🐸 🐹 🐺 🐻 🐼 🐽 🐾 🐿 👀 👁 👂 👃 👄 👅 👆 👇 👈 👉 👊 👋 👌 👍 👎 👏 👐 👑
👒 👓 👔 👕 👖 👗 👘 👙 👚 👛 👜 👝 👞 👟 👠 👡 👢 👣 👤
oups 19:20
shoot. I should have realised 0..100 was too much for one line
masak in other words -- pro tip -- remember to restart screen/irssi after doing the language settings
nemo masak: that's true of basically any app and any env change
moritz nemo: I'm kinda proud the the IRC logs show that :-)
19:21 zacts joined
masak nemo: yes. in retrospect it was easy and I was silly not to realize :) 19:21
19:21 RabidGravy joined
nemo masak: now you need to make sure you have true colour enabled 😃 19:21
masak: curl m8y.org/tmp/256color.ansi 19:22
well actually that one isn't true colour. just 256 colour
MetaZoffix heh neat. curl -s m8y.org/tmp/256color.ansi shows coloured things! 19:23
nemo 0@1@2@3@4@5@6@7@8@9@10@11@12@13@14@15@16@17@18@19@20@21@22@23@24@25@26@27@28@29@30@31@32@33@34@35@36@37@38@39@40@41@42@43@44@45@46@47@48@49@50@51@52@53@54@55@56@57@58@59@60@61@62@63@64@65@66@67@68@69@70@71@72@73@74@75@76@77@78@79@80@81@82@83@84@85@86@87@88@89@90@91@92@93@94@95@96@97@98@99@ 19:25
that's a test of moritz' irssi... /exec -out for i in {0..99};do echo -n $'\003'"${i}@";done
m8y.org/tmp/unicodesilliness.txt screwing around in #hedgewars
er. masak's 19:26
masak: if your irssi is up to date, you should see distinct colours without repeating above. including a grey ramp at the end
masak: if it isn't up to date, you'll see the same 16 repeating over and over
masak nemo: yeah, works fine. 19:27
please never do that again :P
nemo MetaZoffix: it was just the output of someone's ansi test, I just found it was easier to host it than explain to people how to run the script ☺ 19:29
gist.github.com/XVilka/8346728
MetaZoffix So you own m8y.org?
19:30 Actualeyes1 left
nemo MetaZoffix: yeh 19:30
MetaZoffix neat.
nemo MetaZoffix: it's just my personal lil' internet gateway. Have had it for, well, almost 2 decades
MetaZoffix: I mostly use it to host files and for email, and for silly things like ಠ_ಠ.m8y.org/ಠ_ಠ 19:31
or ☠.m8y.org
MetaZoffix My perl6.party and perl6.fail look much less cool in comparison :)
nemo MetaZoffix: way back when there weren't any of those newfangled domains 😝
MetaZoffix :)
nemo we had to make do w/ .org and we liked it
#getoffmylawn
☠.m8y.org is for September 19th of course! 19:32
moritz kinda likes .org domains, but gets .de domains dirt cheap
19:32 MetaZoffix_ joined
MetaZoffix_ Note to self: don't visit ☠.m8y.org if you're running Palemoon :P 19:33
Crashed and burnt
nemo hahaha
timotimo oops
pretty flag
nemo MetaZoffix: sounds like your graphics driver needs blacklisting 19:35
FROGGS Aaaarrr!
nemo MetaZoffix: you can disable webgl in about:config ofc
webgl.disabled;true
MetaZoffix_ meh. I don't wanna change anything :) 19:36
timotimo just never visit that particular site ever again
MetaZoffix_ Yeah :D
19:36 MetaZoffix left, MetaZoffix_ is now known as MetaZoffix
nemo MetaZoffix_: front page of m8y.org is also webgl. just fyi 19:36
MetaZoffix That doesn't crash anything
nemo also obv maps.google.com - that's the one that crashes for me periodically on my crappy card at work 19:37
but is kinda random
presumably based on texture sizes
19:37 TEttinger joined
nemo codeflow.org/entries/2011/nov/10/we...d-erosion/ this one uses some largish textures - maybe would crash for you? does it from time to time on aforementioned sucky work machine 19:37
MetaZoffix nope 19:38
timotimo try looking at some things in shadertoy? :P
to really stress the poor machine
nemo heh
19:39 girafe joined, MetaZoffix left
timotimo that seems to have worked? 19:39
nemo lol. 19:42
he visited shader toy?
timotimo perhaps
nemo m8y.org/tmp/testcase429.xhtml just a couple of large textures shifting around in CSS. but depending on suckiness of browser might crash and/or suck up a lot of CPU 19:43
or in case of chrome, look like crap
IE and Safari did best at this. Firefox wasn't too bad either 19:44
Chrome was abysmal
timotimo interesting
nemo in IE and Safari took basically 0% of CPU (all accelerated) 19:45
Firefox depended on the platform, but still managed to be 10% CPU on my awful work linux machine w/ sucky graphics card and ~3% on windows version of same machine
timotimo sad performance, chrome
nemo timotimo: Chrome used 200% - 2 cores
and looked awful due to no dithering
unattractive banding
kinda like scaling doing gradients in photoshop (banded) vs gimp (smooth) 19:46
timotimo so the gimp lies about the pixels? 19:47
19:48 hankache joined
hankache good evening #perl6 19:49
19:51 AlexDaniel joined
timotimo heyo hankache 19:52
19:52 kyclark_ joined
kyclark_ Today I want to learn about grammars. Can someone tell me what I’m doing wrong here? lpaste.net/186125 19:52
hankache hi timotimo
kyclark_ I based the grammar on Bio::Grammar::Fasta
Right now I just want to parse two kinds of lines, a header and not-header 19:53
timotimo kyclark_: without looking, it's almost surely going to be whitespace trouble :)
perl6-debug lets you single-step through regexes, btw. just have to install the ::Commandline module for it
DrForr It looks that way; lots of references to ^ and ^^, which I don't really think you need. 19:55
kyclark_ I was guessing based on this example:
github.com/cjfields/bioperl6/blob/.../Fasta.pm6
FASTA format is very close to this. Headers start with “>”, so I was hoping ^^ meant start-of-line
Just now checking out the stepping debugger — nice. 19:56
DrForr I'd say token TOP { <record>* } token record { <cluster-id> <sequence>+ } token cluster-id { '>' (\w+) } # and so on. 19:57
Perl6 is very lenient about whitespace; I'd toss most of the ^^ and ^ and so on, because they seem to cause more problems than they solve. 19:58
masak I'd also advise against writing any non-trivial grammar code without test-driven development
I *think* sometimes it's a good idea... but it never is
19:59 acrussell left
kyclark_ masak, I would be keen to know more of your method. 20:00
masak let me try to demonstrate it here on channel 20:01
DrForr Well, I do something similar at theperlfisher.blogspot.ro which has been somewhat neglected as of late.
masak m: use Test; grammar G { regex TOP { \d } }; ok G.parse("4"); nok G.parse("F"); done-testing 20:02
camelia rakudo-moar f0bb58: OUTPUT«ok 1 - ␤ok 2 - ␤1..2␤»
masak kyclark_: note how I write one test case with something that's supposed to match, and one with something that isn't
kyclark_: in a real situation I'd also have written excellent test descriptions (optional second argument to `ok` and `nok`) 20:03
kyclark_ Yes, nice.
masak kyclark_: I could go on, but the principle is just to keep adding positive and negative examples like that -- in small increments
you'll thank yourself as soon as the tests catch a regression for you 20:04
arnsholt Which will happen surprisingly early
masak yes, because parsing is gnarly
arnsholt And then, down the line, something you do will cause a regression you'd never have thought of
masak aye
which is even better feedback
arnsholt The spectests have been invaluable for me in that regard 20:05
Most recently when I refactored some bit of the grammar engine
masak kyclark_: also -- this probably doesn't need stating, but just in case -- it's almost always a good idea to put the grammar in a .pm file in a lib/ directory, and the tests in a .t file in a t/ directory 20:06
Xliff nemo: Chrome and Firefox output here is identical. 20:10
yoleaux 18:36Z <FROGGS> Xliff: Can you merge (after sqashing) the PR please? I'm back from vacation but still lacking Perl 6 tuits...
Xliff Running Windows 7 though.
20:10 cdg joined, cdg left
Xliff .tell FROGGS Welcome back! Will do. 20:10
yoleaux Xliff: I'll pass your message to FROGGS.
20:10 cdg joined
Xliff And no truecolor for putty. :( 20:10
20:11 canopus left
Xliff WOI! 20:12
There's a patched version out.
20:12 zacts left 20:13 zacts joined
hobbs nemo: behaves okay here, chrome 53 linux. Smooth colors, and about 45% of one CPU. Which is a bit much, but this laptop doesn't have the best graphics. 20:13
mst docs.perl6.org/language/grammars <- doesn't explain make or .made, where would I look for those? 20:17
20:17 canopus joined 20:18 hankache left
FROGGS mst: docs.perl6.org/type/Match#method_make 20:18
yoleaux 20:10Z <Xliff> FROGGS: Welcome back! Will do.
kyclark_ OK, here’s a start at a better infrastructure: github.com/kyclark/cdhit-parser
So far my grammar seems to be matching the header (e.g., “>foo”) and then stopping. Why would it do that? 20:19
Xliff \o/
FROGGS: Enjoy your vaca?
It's been ages since we've both been on at the same time.
mst FROGGS: ta
FROGGS Xliff: I did :o)
timotimo kyclark_: most usually sigspace eating too much and then other stuff hoping to match ,for example, start of line, but it's too late
and token won't backtrack
Xliff FROGGS: Cool deal!
mst FROGGS: admittedly, that doesn't explain anything at all to me of why my rules want to say 'make $/' 20:20
kyclark_ Got it! rule vs token
FROGGS Xliff: I've build a treehouse for my kids... so I'd say it was an awesome time :o)
DrForr kyclark_: I'd also look at dumping \n as well. Again, P6 is pretty good about finding reasonable boundaries for your rules. 20:21
20:21 setty1 left
FROGGS mst: I'm not sure what you mean... do you have some code to show? 20:23
mst FROGGS: no
FROGGS: I have no idea where to even start
that's rather the problem
docs.perl6.org/language/grammars 20:24
basically the 'make' and '.made' bit, I ... have no idea what it's even doing
kyclark_ Guys, my stuff is WORKING! Fantastic. Thanks. 20:25
arnsholt They attach an object to serve as the AST for that particular place in the tree
DrForr Also, as others have been alluding to, it's very instructional to find ways to break your file once you've managed to parse something. I'd actually start by just capturing the cluster_id and breaking that with bogus text afterwards.
kyclark_ Now to figure out this “made” stuff...
timotimo mst: you know how you can access $/<foobar> if you had a match like <foobar> in your regex?
arnsholt (.made used to be called .ast [which still works for backwards compat], a name I much prefer)
FROGGS m: grammar G { token TOP { \w+ } }; class A { method TOP($/) { make "foo" } }; say G.parse("WAT", :actions(A)).made
camelia rakudo-moar f0bb58: OUTPUT«foo␤»
timotimo mst: if you have a piece of code that runs "make 123" inside the matching part of foobar, or inside the action method foobar, then you can get 123 by calling $/<foobar>.made
that's all there is to it 20:26
kyclark_ BTW, what exactly is \N? Where can I find a list of all those escape chars?
mst timotimo: *blink*
DrForr Or, looking at it the other way 'round, make() is how you turn the text you've arsed into the tree tructure you want. 20:27
kyclark_ Wait, found it: \N matches a single character that's not a logical newline.
mst arnsholt: ooooh, right, so basically '.made' is the capture of the rule, kinda?
20:27 rindolf left
arnsholt mst: Exactly. It's whatever object you want to represent (ie, in practice serve as the AST) that particular node in the parse tree 20:27
Action methods are called when a rule is done matching, and rules are matched top-down, which means that action methods are called *bottom-up* 20:28
mst right. I think either the grammar doc needs to explain this concept space
or there needs to be a separate 'writing an actions class' doc
because ... I think I sort of get it now
arnsholt So the AST of a rule can be built from AST of the subrules
20:28 mcmillhj left
arnsholt A slightly larger example (in prose, because tuits): 20:28
FROGGS m: grammar G { token TOP { <char>+ }; token char { \w } }; class A { method TOP($/) { make $<char>».made.join('') }; method char($/) { make uc $/ } }; say G.parse("wat", :actions(A)).made
camelia rakudo-moar f0bb58: OUTPUT«WAT␤» 20:29
arnsholt Let's say you want to parse infix notation math expressions
FROGGS m: grammar G { token TOP { <char> }; token char { \w } }; class A { method TOP($/) { make $<char>.made }; method char($/) { make uc $/ } }; say G.parse("a", :actions(A)).made
camelia rakudo-moar f0bb58: OUTPUT«A␤»
arnsholt So you'll have a number rule, which matches \d+ and whose action method just does "make +$/" (ie, numify whatever was matched)
20:30 cdg left
arnsholt And a number of op rules, a la "rule add { <lhs=.number> '+' <rhs=.number> }" 20:30
mst the two interleaved explanations between them I think just gave me a lightbulb moment
SmokeMachine____ is anyone using ctags with perl6 and vim tagbar?
arnsholt And "method add($/) { make Operation.new(~$/, $<lhs>.made, $<rhs>.made) }" 20:31
DrForr If you have a rule like 'rule eq { <lhs> '=' <rhs> }' # then method eq($/) { make { op => "assign", lhs => $/<lhs>, rhs => $/<rhs> } } # returns three-address coe for the assignment o.
arnsholt Where operation has the fields operator, lhs and rhs
20:31 iH2O joined
arnsholt (Not included in this example: operator precedence; because irrelevant to ASTs per se) 20:31
mst: But you're entirely correct; this needs to be properly documented 20:32
Sadly, working on a compiler means this particular concept gets ramrodded into your brain pretty early on, which tends to make you forget it's not at all obvious =)
20:32 mcmillhj joined
DrForr I have blog post on this subject at theperlfisher.blogspot.ro, but it does need to be expanded into proper documentation. 20:33
mst well, stick some notes on github.com/perl6/doc/issues/897 ?
I would try and add notes but, er, still confused enough I'm not sure what to add
20:34 iH2O left
mst sorry. I'm too lost to really know exactly how/why I'm lost 20:34
although ... I think I might get it now
I'll have to experiment
mst is working through docs.perl6.org/language.html in order jamming it into his head
(this is my favourite way to consume docs once I decide I'm serious about something, I'll end up re-reading things later)
hm 20:35
where do I find the reference docs for 'run; ?
FROGGS class Proc? 20:36
20:36 imcsk8 left
mst ah, 'run' as a sub call is Proc.run(...) ? 20:36
FROGGS aye 20:37
DrForr Oh. That relies on some things the match object does silently for you, it's collapsing (essentially) $0,$1... ito a list and then running [+] to reduce the list. It helps if you've got a better idea of what $/ has in it befor getting that deep in.
And god *damn* is lag bad tonight.
mst right, ok, so maybe the grammars thing should have a 'you really should read this first' note 20:38
20:38 imcsk8 joined
DrForr What I need to do is get finished with my other projects so I can ound out an official-looking tutorial :) 20:38
20:44 rgrinberg joined
rgrinberg so conjunctions never made it to perl6 re's right? 20:45
moritz rgrinberg: you mean & ? 20:47
rgrinberg moritz: yeah
arnsholt Perl 6 has & both in grammars and as a junction operator =) 20:48
rgrinberg arnsholt: but not in regular expressions though? 20:49
arnsholt Grammars being the extended regular expression syntax =) 20:50
So you can do /<foo> & <bar>/
I've never had need to do it, but it's there
I think there's even a sequential && version, to mirror | vs. ||
rgrinberg arnsholt: ah thank you. does that backtrack btw? 20:51
Xliff nemo, masak and anyone else interested in truecolor: gyazo.com/cc4395e73c1c7cceaeb7519dacbe38aa
20:52 kaare_ left
Xliff Now I wonder if I can get it for HexChat... 20:52
arnsholt rgrinberg: Can't see why not
20:52 setty1 joined
rgrinberg arnsholt: ah sorry, my question was more about efficiency. does it take exponential time in some cases? 20:56
20:56 skids left, nicq20 joined
nicq20 hello 20:57
moritz rgrinberg: I don't see why it should ever take more than O(n^(number of branches)) 20:58
\o nicq20
actually, really depends on what's inside the branches :-) 20:59
nicq20 moritz: o/ 21:01
21:04 Xliff left
nicq20 Any ideas as to why a multi sub made in a '.pm' would not show up when 'use'-d? 21:05
To be fair though I'm most-likely doing it wrong.
tailgate you need to put 'is export'
multi sub foo($arg) is export {} 21:06
nicq20 Oh, gee whiz. Well, I'm dumb. Thank you very much. 21:08
21:13 wamba left 21:18 zakharyas joined 21:19 FROGGS left, cdg joined, CIAvash left 21:24 mcmillhj left 21:27 jimlenz joined 21:34 kyclark_ left, lizmat joined
tadzik m: gist.github.com/tadzik/2185a2420a1...1d8f5b6dce # shouldn't this output something? 21:36
camelia rakudo-moar f0bb58: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Confused␤at <tmp>:1␤------> 3https:7⏏5//gist.github.com/tadzik/2185a2420a18046␤ expecting any of:␤ colon pair␤»
tadzik nooo
m: gist.github.com/tadzik/2185a2420a1...1d8f5b6dce
camelia ( no output )
21:39 danlei joined 21:45 edehont joined
nicq20 tadzik: if you get rid of the ' "oneX" if ' part of those lines, it shows that all of the values in the junction became true. 21:45
21:46 ptolemarch left
nicq20 tadzik: It never flatens to a Bool value and just stays a Junction. If you put '?( )' around one of the operations, it sems to work the way you want. 21:49
p6: my $var = 1 ^ 2 ^ 3; say (0 <= $var < 10); 21:50
camelia rakudo-moar f0bb58: OUTPUT«one(True, True, True)␤»
nicq20 p6: my $var = 1 ^ 2 ^ 3; say (?(0 <= $var) < 10);
camelia rakudo-moar f0bb58: OUTPUT«True␤»
TEttinger what is ^ there? intersection? 21:51
avuserow m: say (1 ^ 2).WHAT 21:54
camelia rakudo-moar f0bb58: OUTPUT«(Junction)␤»
avuserow m: say (1 ^ 2).perl
camelia rakudo-moar f0bb58: OUTPUT«one(1, 2)␤»
nicq20 TEttinger: It's an operator to make a junction. See this link for all of the different ones: docs.perl6.org/type/Junction
dalek c: 55f3138 | (Zoffix Znet)++ | doc/Type/IO/Socket/INET.pod6:
Add explicit :localhost<>

Without it. The example doesn't work on OSX and some Debian configurations.
  irclog.perlgeek.de/perl6-dev/2016-0...i_13167984
danlei is there a way to manually invoke the autogenerated USAGE? 21:55
yoleaux 5 Sep 2016 11:38Z <mst> danlei: if you have a problem with RT still, please mail [email@hidden.address] as the rt.perl.org front page suggests and then /msg me the ticket id so I can chase it up
5 Sep 2016 11:38Z <AlexDaniel> danlei: This problem is rather common. In order to fix it, please write an email to perlbug-admin at perl.org with as many details you have (but chances are you don't have many, that's ok). When it's fixed, you'll get an email with a ticket id. Please this ticket ID to me or mst, so that we have more chances to track the problem down.
hoelzro danlei: it's in $?USAGE 21:59
TEttinger nicq20, thanks, I can't remember all the operators in perl6
danlei hoelzro: ah, great. thanks!
nicq20 TEttinger: Yeah, same here. They are pretty useful when I do remember though. 22:00
dalek c: 2c8406d | (Armand Halbert)++ | doc/ (16 files):
Converted -- to –
22:04
c: 028194a | (Aleks-Daniel Jakimenko-Aleksejev)++ | doc/ (16 files):
Merge pull request #890 from ahalbert/888

Converted -- to –
avar I realize this is ancient, but design.perl6.org/S19.html says -a (autosplit) is one of the p5 things that didn't change, rakudo doesn't have it, is there an equivalent feature? 22:09
AlexDaniel avar: hmm, what about splitting it yourself? 22:13
avar sure, just wondering if there was a shortcut 22:14
perl6 -ne 'our %LINE; my @F = $_.split(/\s+/); %LINE{@F[0]}{@F[1]}{@F[2]}++; END { say %LINE.perl }'
perl -ane'$_{$F[0]}{$F[1]}{$F[2]}++; END{ print Dumper(\%_) }'
much shorter in v5
AlexDaniel fwiw, you can probably 「dd %LINE」 instead of 「say %LINE.perl」 22:16
you can also omit { } like 「END dd %LINE」
instead of 「$_.split(/\s+/)」 you can write just 「.split(/\s+/)」 22:17
22:17 zakharyas left
avuserow you can also use `.words` instead of splitting on space. 22:18
tailgate is there a way to set a debug flag on the commandline, and define functions diffrently if it's set? 22:19
like, if you added --debug as an option and had a Debug sub that's empty in normal use but does stuff if the flag is invoked 22:20
avuserow you can also use `no strict` to get rid of those pesky declarations, not that I'd recommend it
timotimo "no strict" will give you an incredible performance hit on your variable accesses currently 22:22
avuserow oh well. not like it saves much there anyway
lizmat timotimo: it should :-)
timotimo it'd just be nice if everything was fast ;) 22:23
22:23 TheLemonMan left 22:24 aries_liuxueyang left
dalek c: 945fd30 | (Armand Halbert)++ | doc/Language/glossary.pod6:
Moved Thunk out of IRC lingo.
22:25
c: 9312a62 | RabidGravy++ | doc/Language/glossary.pod6:
Merge pull request #899 from ahalbert/896

Moved Thunk out of IRC lingo.
avar AlexDaniel: thanks for the golfing, but END dd != END { dd } 22:27
22:27 firstdayonthejob left
AlexDaniel m: my @a = 5, 6; END dd @a; @a.push: 42 22:27
camelia rakudo-moar c98ab9: OUTPUT«Array @a = [5, 6, 42]␤»
AlexDaniel m: my @a = 5, 6; END { dd @a }; @a.push: 42 22:28
camelia rakudo-moar c98ab9: OUTPUT«Array @a = [5, 6, 42]␤»
AlexDaniel avar: and what's the difference?
avar just try it 22:29
$ cat /etc/hosts | perl6 -ne 'my %X; %X{.words[0]}++; END { dd %X }'
Hash %X = {"#" => 3, "#DO" => 1, "10.189.96.163" => 1, "10.252.13.10" => 1, "127.0.0.1" => 1}
$ cat /etc/hosts | perl6 -ne 'my %X; %X{.words[0]}++; END dd %X'
Hash %X = {}
22:29 leont_ left
AlexDaniel avar: how old is your rakudo? 22:30
avar: perl6 --version 22:31
avar this is rakudo star 2016.07
AlexDaniel um… interesting… I see exactly the same output here
commit: 2016.07 my @a = 5, 6; END dd @a; @a.push: 42 22:32
committable6 AlexDaniel, ¦«2016.07»: Array @a = []
AlexDaniel commit: releases my @a = 5, 6; END dd @a; @a.push: 42
committable6 AlexDaniel, ¦«2015.10,2015.11»: Array $var = $[]␤¦«2015.12,2016.02,2016.03,2016.04,2016.05,2016.06,2016.07.1»: Array @a = []␤¦«2016.08.1,HEAD»: Array @a = [5, 6, 42]
AlexDaniel wow, really? 22:33
bisect: my @a = 5, 6; END dd @a; @a.push: 42
bisectable6 AlexDaniel, Exit code is 0 on both starting points (good=2015.12 bad=77d9d41), bisecting by using the output
AlexDaniel, bisect log: gist.github.com/8e415c55ef942f7011...80cb51ba2d
AlexDaniel, (2016-08-03) github.com/rakudo/rakudo/commit/5e61516
AlexDaniel avar: alright, so according to this ↑ it was a bug in previous versions
avar ah,
nicq20 I don't seem to have trouble with it. Version: This is Rakudo version 2016.08.1-123-gef98f8f built on MoarVM version 2016.08-32-ge52414d 22:35
22:35 aries_liuxueyang joined
avar "This is Rakudo version 2016.07.1 built on MoarVM version 2016.07" 22:36
AlexDaniel well, if you take a close look at this message you'll see which versions are affected and which ones are not: irclog.perlgeek.de/perl6/2016-09-07#i_13168242 22:37
22:37 TEttinger left
AlexDaniel ;) 22:37
22:38 TEttinger joined, cpage_ left
avar such a neat robot 22:40
nicq20 AlexDaniel: Oops, missed that message!
AlexDaniel MasterDuke: and again whateverables save the world :) 22:43
22:44 Xliff joined
Xliff just spent the last hour or so trying to hack truecolor support into HexChat. 22:45
It's easier to do for anything but windows.
22:48 nicq20 left, mcmillhj joined
Xliff Now that I look at what nemo did above, it would be easier than I thought since the '\003' scheme is basically a palette. 22:49
22:50 bjz_ left 22:53 mcmillhj left 22:58 RabidGravy left 23:04 bjz joined 23:09 yadongz joined, cpage_ joined 23:11 cpage_ left, cpage_ joined 23:13 yadongz left 23:15 skids joined 23:19 bjz left, TimToady left 23:20 TimToady joined 23:31 yadongz joined 23:33 spider-mario left 23:38 canopus left 23:40 yadongz left 23:43 canopus joined 23:44 zacts left, Xliff left, TEttinger left, Xliff joined 23:45 TEttinger joined 23:47 aries_liuxueyang left
dalek rl6-most-wanted: bec3ed2 | (Tom Browder)++ | most-wanted/modules.md:
change name and scope of module, subset of Net::IP for now
23:47
23:49 aries_liuxueyang joined 23:53 cdg left 23:54 nadim left