Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-11-22

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:02 dha Huh. Interesting. Trying to install it with zef gives me "Expected MAST::Frame, but didn't get one" and failure. installing with panda succeeds.
00:02 skink timotimo, Any chance you know what Ubuntu/Debian package perf is in?
00:02 skink Kinda hard to search for :D
00:03 timotimo oof, good question
00:03 timotimo is that "gperftool"?
00:03 skink linux-tools-common apparently
00:03 timotimo wait, no
00:03 timotimo yeah, ok
00:05 skink Okay actually it's linux-tools-generic-lts-[release] in addition to that
00:06 timotimo mhm
00:06 AlexDaniel apt-file find /usr/bin/perf
00:06 AlexDaniel linux-base: /usr/bin/perf
00:07 canopus joined #perl6
00:07 AlexDaniel or linux-perf-x.x or linux-tools-x.x
00:08 kalkin- joined #perl6
00:08 kalkin- hi
00:08 skink AlexDaniel, trying to run it gave the apt-get autofind thing
00:09 AlexDaniel skink: autofind?
00:09 dha Ok, then. Installing Task::Star with zef bails on JSON::RPC, installing it with panda bails on OpenSSL (despite my having installed OpenSSL by itself with zef during this annoying process)
00:09 AlexDaniel u: combining
00:09 unicodable6 AlexDaniel, U+0300 COMBINING GRAVE ACCENT [Mn] (◌̀)
00:09 unicodable6 AlexDaniel, U+0302 COMBINING CIRCUMFLEX ACCENT [Mn] (◌̂)
00:09 unicodable6 AlexDaniel, U+0301 COMBINING ACUTE ACCENT [Mn] (◌́)
00:10 unicodable6 AlexDaniel, https://gist.github.com/67b91a6bf165abf0fbdf3445333c9213
00:10 skink In either your shell profile or some config file, you can define apt's command-not-found function
00:10 skink In Ubuntu it checks packages for what supplies that command
00:11 skink I forgot about it :)
00:11 kalkin- some time ago I was not satisfied with Software::License and wrote a replacement which allows a more exact application of software licenses + a perl6 script for generating license data . It is spitted in two modules: Legal::License and Legal::Licenses.
00:12 AlexDaniel u: Mc
00:12 unicodable6 AlexDaniel, U+0903 DEVANAGARI SIGN VISARGA [Mc] (◌ः)
00:12 unicodable6 AlexDaniel, U+093B DEVANAGARI VOWEL SIGN OOE [Mc] (◌ऻ)
00:12 unicodable6 AlexDaniel, U+093E DEVANAGARI VOWEL SIGN AA [Mc] (◌ा)
00:12 kalkin- Now i thought about submitting it to modules.perl6.org, but I'm not really satisfied with having two modules for this
00:12 AlexDaniel u: Me
00:12 unicodable6 AlexDaniel, U+0489 COMBINING CYRILLIC MILLIONS SIGN [Me] (◌҉)
00:12 unicodable6 AlexDaniel, U+0488 COMBINING CYRILLIC HUNDRED THOUSANDS SIGN [Me] (◌҈)
00:12 unicodable6 AlexDaniel, https://gist.github.com/c80b5e30bcee5d94782fde834c53c477
00:12 unicodable6 AlexDaniel, U+1ABE COMBINING PARENTHESES OVERLAY [Me] (◌᪾)
00:12 unicodable6 AlexDaniel, https://gist.github.com/fb8f083ad838e5778ba40d813f65418f
00:13 skink timotimo, I have no idea what I'm looking at in this perf report btw :)
00:13 kalkin- Actually Legal::License just provides a Legal::License::Software class and a few helper objects, while Legal::Licenses provides all the templates and has the script
00:14 kalkin- I'm thinking about merging it all in to one Legal::License::Software module, but isn't that a too deep nesting?
00:14 AlexDaniel will I ever see the day when combining characters will be rendered correctly on my computer? At least in the browser, please…
00:14 kalkin- https://github.com/kalkin/Legal-License https://github.com/kalkin/Legal-Licenses
00:15 timotimo skink: may want to also "perf report -g"
00:16 timotimo then you'll get "self" and "inclusive" (or what they are called)
00:16 timotimo self is the amount of samples that hit the function itself, inclusive is the amount of samples that hit while the function was anywhere on the call stack
00:16 timotimo so, like, "main" will usually be at 100% inclusive, but rarely a lot of "self"
00:18 skink I mean I see at the top a whole bunch of 'self' for the C lib
00:18 skink children being the other field
00:18 skink much more in children than in self
00:19 skink Those last lines sound like a markov chain based on a philosophy book
00:19 timotimo oh, it could be that your moarvm isn't compiled with debug symbols?
00:19 timotimo do you see any function names with MVM_ in the name?
00:20 skink only a few
00:20 skink Almost everything is addresses
00:20 timotimo ah, that's not so helpful, of course :)
00:22 skink :D
00:23 timotimo i've been meaning to implement improvements to the fixed size allocator inspired by the "hoard" allocator
00:23 timotimo it's just been kind of an overwhelming thing, not sure where to start, etc
00:23 timotimo but when i build that, we won't have trouble with that allocator being the bottleneck in multi-threaded situations
00:26 skink Is there any sneaky way around it for the time being?
00:26 timotimo hm
00:26 timotimo you could try using a multi-threaded malloc implementation and build rakudo with the fixedsize alloc debug thingie turned on
00:26 timotimo that will sidestep the fixedsize allocator completely and use malloc instead
00:26 skink @_@
00:27 frobisher joined #perl6
00:27 timotimo the fixedsize alloc debug is just a single #define
00:28 timotimo other than that, try to write your code in a way that it doesn't have to invoke as many subs/methods or embedded curly blocks
00:37 dalek doc: 21c1708 | ZzZombo++ | doc/Language/5to6-perlop.pod6:
00:37 synopsebot6 Link: http://doc.perl6.org/language/5to6-perlop
00:37 dalek doc: Small corrections.
00:37 dalek doc:
00:37 dalek doc: And the note about the complement is redundant and is out of place anyway.
00:37 dalek doc: review: https://github.com/perl6/doc/commit/21c1708e05
00:37 ZzZombo Here, I just vandalized the docs :0
00:41 dha Hm. How worried should I be that some modules seem to fail tests when using zef to install them but not when using panda (and possibly vice versa)?
00:41 dha That strikes me as an actual problem.
00:43 AlexDaniel ZzZombo: hey
00:43 ZzZombo wait, what, we still don't have proper multiline comments?
00:43 ZzZombo ye?
00:43 AlexDaniel context → concatenation is wrong I think
00:43 AlexDaniel m: dd ~25
00:43 camelia rakudo-moar ecc202: OUTPUT«"25"␤»
00:44 AlexDaniel that's 25 in string context, no concatenation
00:44 ZzZombo m: say 1~~5
00:44 camelia rakudo-moar ecc202: OUTPUT«False␤»
00:44 ZzZombo m: say 1~5
00:44 camelia rakudo-moar ecc202: OUTPUT«15␤»
00:44 ZzZombo err
00:44 AlexDaniel no-no it talks about prefix op
00:44 AlexDaniel there's infix ~ and prefix ~
00:44 ZzZombo ah
00:44 ZzZombo my bad then
00:45 timotimo we totally have multiline comments
00:45 AlexDaniel in fact it says “Unary C<~>”
00:45 dalek doc: 0b97454 | ZzZombo++ | doc/Language/5to6-perlop.pod6:
00:45 synopsebot6 Link: http://doc.perl6.org/language/5to6-perlop
00:45 dalek doc: Oops
00:45 dalek doc: review: https://github.com/perl6/doc/commit/0b97454d25
00:45 AlexDaniel m: say 25 #`{ multiline comment } + 50
00:45 camelia rakudo-moar ecc202: OUTPUT«75␤»
00:45 ZzZombo timotimo: syntax?
00:46 AlexDaniel
00:46 ZzZombo is it just PODs?
00:46 timotimo no
00:46 timotimo m: say #`(( multiline comment )) "hey"
00:46 camelia rakudo-moar ecc202: OUTPUT«hey␤»
00:46 ZzZombo ah
00:46 timotimo you can choose any delimiter you like
00:46 ZzZombo okay
00:46 AlexDaniel you can use any parens in any amounts
00:46 timotimo so it's even properer than many other langs
00:47 ZzZombo m: say 25 #`4 multiline comment 4 + 50
00:47 camelia rakudo-moar ecc202: OUTPUT«25␤»
00:47 timotimo right
00:47 AlexDaniel didn't expect that to work but yeah
00:47 ZzZombo m: say 25 #`| multiline comment | + 50
00:47 camelia rakudo-moar ecc202: OUTPUT«25␤»
00:47 mohae joined #perl6
00:47 timotimo m: say 99 #`# oh what # ~ 11
00:47 camelia rakudo-moar ecc202: OUTPUT«99␤»
00:47 ZzZombo m: say 25 #`{( multiline comment )} + 50
00:47 camelia rakudo-moar ecc202: OUTPUT«75␤»
00:47 AlexDaniel ZzZombo: what's the reason for removing “Assumes two's complement”, by the way?
00:48 timotimo when you have different opening braces, only the first set will be used
00:48 timotimo m: say 25 #`{( multiline comment } + 50
00:48 camelia rakudo-moar ecc202: OUTPUT«75␤»
00:48 timotimo ^- it won't pick up the ( for the delimiter there
00:49 cdg joined #perl6
00:50 ZzZombo is it really needed? I don't recall it being any different in P5.
00:51 AlexDaniel ah it's a 5to6 document
00:53 AlexDaniel perl -wE 'say ~0' # 18446744073709551615
00:53 AlexDaniel m: say +^0
00:53 camelia rakudo-moar ecc202: OUTPUT«-1␤»
00:54 timotimo i'm going to bed, have a good one!
00:55 AlexDaniel timotimo: have a nice night!
00:55 AlexDaniel ZzZombo: sooo, it seems to be different?
00:56 viki m: say eager ^0
00:56 camelia rakudo-moar ecc202: OUTPUT«()␤»
00:56 viki wtf does that give -1 :S
00:56 viki s: &prefix:<+>, \(^0)
00:56 SourceBaby viki, Sauce is at https://github.com/rakudo/rakudo/blob/ecc202e/src/core/Numeric.pm#L41
00:56 viki s: ^0, 'Numeric', \()
00:56 SourceBaby viki, Sauce is at https://github.com/rakudo/rakudo/blob/ecc202e/src/core/Range.pm#L551
00:57 AlexDaniel s: &prefix:<+^>, \(0)
00:57 SourceBaby AlexDaniel, Sauce is at https://github.com/rakudo/rakudo/blob/ecc202e/src/core/Int.pm#L401
00:58 viki :S
00:58 viki I see
00:58 viki AlexDaniel++
01:00 ZzZombo Holy hell, what??? Am I decieved?? I had to log onto my workplace, it behaves there differently in a project I booted up than my local perl that matches your output. What gives?
01:01 ZzZombo err, another dumb thing I did today. Horray!
01:02 finanalyst joined #perl6
01:02 dalek doc: aa09454 | ZzZombo++ | doc/Language/5to6-perlop.pod6:
01:02 synopsebot6 Link: http://doc.perl6.org/language/5to6-perlop
01:02 dalek doc: Err...
01:02 dalek doc:
01:02 dalek doc: Dumb me.
01:02 dalek doc: review: https://github.com/perl6/doc/commit/aa094546ff
01:02 ZzZombo Yes, don't tell me.
01:04 AlexDaniel ZzZombo: what about removing “right away”? :)
01:04 AlexDaniel perhaps reasonable, but why?
01:06 ZzZombo To put emphasis it's references that you get almost everywhere by default, so no need to try to get them specifically.
01:06 AlexDaniel ok
01:07 AlexDaniel 5to6 documents need more love :(
01:07 AlexDaniel so ZzZombo++
01:07 ZzZombo eh, thanks
01:07 ZzZombo unexpected but nice to hear :)
01:08 aborazmeh joined #perl6
01:08 aborazmeh joined #perl6
01:08 AlexDaniel m: sub foo { $++ < 5 }; 1 while foo()
01:08 camelia rakudo-moar ecc202: OUTPUT«WARNINGS for <tmp>:␤Useless use of constant integer 1 in sink context (use Nil instead to suppress this warning) (line 1)␤»
01:08 AlexDaniel /o\
01:08 AlexDaniel “Although it's not specifically documented, 1 while foo(); appears to work in this sense.”
01:08 AlexDaniel no, nope. No
01:10 pierre_ joined #perl6
01:12 dalek doc: b5aa558 | ZzZombo++ | doc/Language/5to6-perlvar.pod6:
01:12 synopsebot6 Link: http://doc.perl6.org/language/5to6-perlvar
01:12 dalek doc: Broken link
01:12 dalek doc: review: https://github.com/perl6/doc/commit/b5aa558ec7
01:13 ZzZombo it didn't work?
01:13 ZzZombo damn
01:14 BenGoldberg joined #perl6
01:14 ZzZombo why does Github not have POD previewer, BTW? So I could see my changes before saving them.
01:17 Actualeyes joined #perl6
01:19 canopus joined #perl6
01:19 kurahaupo__ joined #perl6
01:21 AlexDaniel ZzZombo: https://github.com/perl6/doc/issues/167
01:22 AlexDaniel ZzZombo: feel free to work on it
01:24 ZzZombo hm
01:24 ZzZombo L<< this page|/language/variables#The_<_Twigil >> generates almost correct link now, but with a space at the end, so it stll doesn't jump to anywhere.
01:26 dalek doc: f5020e2 | ZzZombo++ | doc/Language/5to6-perlvar.pod6:
01:26 synopsebot6 Link: http://doc.perl6.org/language/5to6-perlvar
01:26 dalek doc: Wait, used wrong character.
01:26 dalek doc: review: https://github.com/perl6/doc/commit/f5020e25d4
01:29 ZzZombo Where is the documentation for compunits? I can't figure it out myself.
01:36 AlexDaniel ZzZombo: what exactly do you want to know? For example, there's this: https://docs.perl6.org/language/modules
01:37 ZzZombo to start, learn about the 'unit' keyword. Or whatever it is.
01:42 cdg joined #perl6
01:45 Upasaka joined #perl6
01:51 kyclark_ joined #perl6
02:00 Juerd Suppose you override infix:<+> to mean something silly, as is commonly expected on Facebook, how would you access the original + from within the subroutine definition?
02:00 Juerd sum() is cheating :D
02:02 AlexDaniel without saving it first?
02:02 AlexDaniel oh wait, what would that even mean…
02:08 Juerd Saving it is fine, but how to do that?
02:09 AlexDaniel one idea:
02:09 AlexDaniel m: sub foo { sub infix:<+>($a, $b) { $a - $b }; say 50 + 20 }; foo; say 50 + 20
02:09 camelia rakudo-moar ecc202: OUTPUT«30␤70␤»
02:10 Juerd m: sub infix:<+> ($a, $b) { die "Looping" if $++ > 5; return 40 + 2; }; say 1 + 1
02:10 camelia rakudo-moar ecc202: OUTPUT«Looping␤  in sub infix:<+> at <tmp> line 1␤  in sub infix:<+> at <tmp> line 1␤  in sub infix:<+> at <tmp> line 1␤  in sub infix:<+> at <tmp> line 1␤  in sub infix:<+> at <tmp> line 1␤  in sub infix:<+> at <tmp> line 1␤  in sub infix:<+> at <t…»
02:10 Juerd I think - is cheating just like sum() :D
02:10 geekosaur subs are my by default. GLOBAL::infix:<+> ?
02:11 AlexDaniel m: my &plus = BEGIN &[+]; sub infix:<+>($a, $b) { $a - $b }; say 50 + 20; say &plus(50, 20)
02:11 camelia rakudo-moar ecc202: OUTPUT«30␤70␤»
02:11 geekosaur or some other scope
02:11 Juerd geekosaur: Could not find symbol 'infix:<+>'
02:11 geekosaur mrr, right there is some complication there because it only handles them exactly as defined or something
02:12 Juerd m: my &infix:<real+> = BEGIN &[+]; sub infix:<+> ($a, $b) { die "Looping" if $++ > 5; return 40 real+ 2; }; say 1 + 1
02:12 camelia rakudo-moar ecc202: OUTPUT«42␤»
02:12 Juerd Yay!
02:12 geekosaur and that might not be te right scope anyway
02:13 AlexDaniel I'd much rather prefer something involving GLOBAL or OUTER or whatever
02:13 AlexDaniel but have no idea how to make that work
02:13 kaare_ joined #perl6
02:14 Juerd AlexDaniel: Sure, a generic solution would be nice.
02:15 labster joined #perl6
02:15 viki Juerd: callsame/nextwith/samewith/callwith?
02:15 Juerd viki: Please provide a working example :)
02:15 Juerd I don't know how to use those without OO.
02:16 Juerd Or, actually, I don't know how to use those at all, and vaguely recall that they had something to do with OO, which might even be wrong.
02:17 viki m: multi infix:<+> (Int:D $a, Int:D $b) { say "the real answer is {callwith $a, $b}, but the override is..."; $a - $b }; say 2 + 2
02:17 camelia rakudo-moar ecc202: OUTPUT«Ambiguous call to 'infix:<+>'; these signatures all match:␤:(Int:D \a, Int:D \b --> Int:D)␤:(Int:D $a, Int:D $b)␤  in block <unit> at <tmp> line 1␤␤»
02:17 viki >:(
02:17 viki cheetsy doodle then
02:17 viki m: multi infix:<+> (Int:D $a where {True}, Int:D $b) { say "the real answer is {callwith $a, $b}, but the override is..."; $a - $b }; say 2 + 2
02:17 camelia rakudo-moar ecc202: OUTPUT«the real answer is 4, but the override is...␤0␤»
02:17 viki \o/
02:17 AlexDaniel m: multi infix:<+> (Int:D $a, Int:D $b) { say "the real answer is {callsame}, but the override is..."; $a - $b }; say 2 + 2
02:17 camelia rakudo-moar ecc202: OUTPUT«Ambiguous call to 'infix:<+>'; these signatures all match:␤:(Int:D \a, Int:D \b --> Int:D)␤:(Int:D $a, Int:D $b)␤  in block <unit> at <tmp> line 1␤␤»
02:18 AlexDaniel m: multi infix:<+> ($a, $b) { say "the real answer is {callsame}, but the override is..."; $a - $b }; say 2 + 2
02:18 camelia rakudo-moar ecc202: OUTPUT«4␤»
02:18 viki \o/
02:18 AlexDaniel /o\
02:18 viki |
02:18 viki /\
02:18 labster joined #perl6
02:19 viki But yeah, AlexDaniel's way is even shorter
02:19 AlexDaniel except that it doesn't work!
02:19 viki m: multi infix:<+> (Int:D $a where {True}, Int:D $b) { say "the real answer is {callsame}, but the override is..."; $a - $b }; say 2 + 2
02:19 camelia rakudo-moar ecc202: OUTPUT«the real answer is 4, but the override is...␤0␤»
02:19 viki Well, you just needed the cheetsy-doodle :)
02:19 AlexDaniel wtf is this I don't even
02:20 viki where makes this multi take precedence over the core Int:D Int:D one :)
02:20 AlexDaniel /o\
02:21 AlexDaniel Juerd: don't show this to anybody
02:21 AlexDaniel it makes sense, but uhhh…
02:21 AlexDaniel UUUUUHHHHH!
02:21 viki Juerd: they have to do with multies. callwith calls the next candidate with new args and returns; callsame calls the next candidate with same args as this candidate and returns; and the nextwith/nextsame work the same way, except they don't return
02:22 viki so the caller will receive whatever the next candidate gives
02:22 AlexDaniel viki: this kinda reminds me of this stuff: https://github.com/perl6/whateverable/blob/master/Committable.p6#L32-L33
02:22 AlexDaniel perhaps a similar hack can be used to trick it?
02:23 * viki doesn't follow what's stupid about that code
02:23 Juerd viki: Thanks for the explanation :)
02:23 Juerd AlexDaniel: Why not show it? I think it's beautiful :)
02:23 AlexDaniel viki: help|source|url processing is in the parent class
02:24 viki ooh
02:24 AlexDaniel viki: so we have to explicitly ignore messages like this to let the parent process it
02:24 viki right
02:24 viki no idea
02:24 viki At least at this time :)
02:24 * viki goes to bed
02:24 viki \o
02:24 AlexDaniel will more specific signature make it work or it always starts from the child?
02:25 pierre_ joined #perl6
02:27 viki Well, you can't make it more specific, I don't think. You got both candidates that take 1 arg and both have `where`s
02:27 viki The trick with infix:<+> worked, because the core one doesn't got :where
02:27 viki s/':'//
02:27 AlexDaniel :-/
02:28 viki m: subset Foo of Str where {True}; subset Bar of Any where {True}; multi foo(Foo $x) { say "in here" }; multi foo(Bar $x) { say "in there"}; foo "42"
02:28 camelia rakudo-moar ecc202: OUTPUT«in here␤»
02:28 viki oooh
02:28 viki m: subset Foo where {True}; subset Bar of Str where {True}; multi foo(Foo $x) { say "in here" }; multi foo(Bar $x) { say "in there"}; foo "42"
02:28 camelia rakudo-moar ecc202: OUTPUT«in there␤»
02:29 viki \o/
02:29 viki Maybe something with that can be done, 'cause it appears to prefer the one with "of Str" rather than "of Any".....
02:29 kalkin-_ joined #perl6
02:29 pierre_ joined #perl6
02:30 viki So you'd make the help one take a subset of IRC::Client::Message, while, the other... um... just where?
02:30 viki m: subset Bar of Str where {True}; multi foo($x where {True}) { say "in here" }; multi foo(Bar $x) { say "in there"}; foo "42"
02:30 camelia rakudo-moar ecc202: OUTPUT«in there␤»
02:30 viki Yeah
02:30 viki Somethign like that's worth trying
02:30 * viki really goes to bed
02:30 AlexDaniel or perhaps I can have it without where at all
02:30 AlexDaniel and instead call nextsame inside
02:31 AlexDaniel or… not
02:31 AlexDaniel wasn't IRC::Client doing some magic with it?
02:31 AlexDaniel viki: anyway, good night
02:38 cdg joined #perl6
02:39 eisen74 joined #perl6
02:47 ilbot3 joined #perl6
02:47 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
02:49 labster joined #perl6
02:57 eisen74 joined #perl6
03:08 geraud joined #perl6
03:14 kyclark_ joined #perl6
03:16 dalek doc: cfb08c8 | gfldex++ | doc/Language/typesystem.pod6:
03:16 synopsebot6 Link: http://doc.perl6.org/language/typesystem
03:16 dalek doc: show that methods overrule multis of parent classes
03:16 dalek doc: review: https://github.com/perl6/doc/commit/cfb08c8693
03:17 cpage joined #perl6
03:21 xtreak joined #perl6
03:23 canopus joined #perl6
03:24 ZzZombo joined #perl6
03:24 ZzZombo joined #perl6
03:29 kyclark_ joined #perl6
03:33 noganex joined #perl6
03:33 ZzZombo "Examples of organising modules"
03:33 ZzZombo has barely much value, IMO.
03:34 samcv would a Pull request for Rakudo that makes the perl6 REPL prompt go forward or back a word on Ctrl + <-  or -> arrow on keyboard like how linux shells do?
03:34 samcv well at least if you have Readline library installed
03:34 samcv err. i mean module
03:35 ZzZombo so, is the possibility of having multiple classes in one module still here, like in P5?
03:35 samcv you have have multiples classes in modules ZzZombo
03:36 samcv just make sure to use `is export`
03:36 ZzZombo on classes?
03:38 ilmari joined #perl6
03:38 samcv yes
03:39 ZzZombo alright, that's one question less.
03:39 ZzZombo still, where is are docs for the 'unit' keyword?
03:39 ZzZombo -is
03:41 geekosaur joined #perl6
03:45 pierre_ joined #perl6
03:45 gfldex ZzZombo: you can do a fulltext search on the docs at https://docs.perl6.org/perl6.xhtml
03:46 AlexDaniel samcv: huh?
03:46 samcv in linux terminal you can press Ctrl + left arrow to go back a word
03:46 samcv skip over text
03:46 ilmari joined #perl6
03:46 AlexDaniel samcv: I mean, that's already how it works if you have Readline module
03:47 samcv that works for you?
03:47 AlexDaniel yea
03:47 samcv must be your distro setting it that way maybe
03:47 samcv it's not the Readline defaults
03:47 samcv though there is a systemwide config file for readline that it will read. so yours must be set by your distro
03:48 gfldex m: UNIT.WHAT.say
03:48 camelia rakudo-moar ecc202: OUTPUT«(UNIT)␤»
03:48 gfldex m: UNIT.HOW.say
03:48 camelia rakudo-moar ecc202: OUTPUT«Perl6::Metamodel::ModuleHOW.new␤»
03:49 gfldex ZzZombo: ^^^ so the doc for «unit» should be under /type/Metamodel/ModuleHOW
03:49 gfldex and that is ENODOC
03:50 ZzZombo :(
03:58 pierre_ joined #perl6
04:08 kent\n joined #perl6
04:14 samcv AlexDaniel, so i made a config file for readline to set those bindings. but i didn't know that other distros had defaults.
04:15 AlexDaniel samcv: so does it mean that nothing should be done on rakudo side?
04:16 samcv well. i mean we could make it set that as well, for distros that don't have those added to the readline configuration file
04:17 samcv i figured out how to do it while i was trying to get it to do this
04:22 mr-foobar joined #perl6
04:34 AlexDaniel samcv: but does it mean that we will be overriding it for users who decided not to enable it on purpose?
04:35 briandfoy joined #perl6
04:40 samcv AlexDaniel, yeah this atm would. but there's a way to make it not override existing things, but the current Readline module doesn't really let that be used
04:41 samcv well the .named-function method to get a pointer to a function, and using that we could call the method to only set that binding if it's not already set
04:44 samcv i got it working in C though, i mean unless we can use what does work which is $read.parse-and-bind(Q「"\e[1;5D": backward-word」);
04:44 samcv if there's some form of syntax readline accepts that is similar to rl_bind_key_if_unbound
04:45 samcv the parse-and-bind reads a string and parses it like the config file.
04:49 samcv AlexDaniel, and i tried the tty-set-default-bindings, but it segfaulted
04:49 samcv when i tried that. i think that would be good, to just use the same settings the terminal has or whatever. but
04:53 pierre_ joined #perl6
04:55 kyclark_ joined #perl6
05:03 samcv AlexDaniel, so maybe if we could get that to work, that's what we want. at least every other language's prompt the ctrl left right has worked properly. not sure if they set it to the same as the terminal was or what
05:06 AlexDaniel samcv: that's a good question!
05:06 AlexDaniel what other languages do in this case
05:06 samcv let me see if i can get that function working in C. and then try doing it in perl
05:07 AlexDaniel personally I'd much rather have it configured system-wide, but if people expect it to be this way… well, why not
05:08 geekosaur as long as they're not in a context where it will never work
05:08 samcv well... this is the only program it hasn't worked in AlexDaniel
05:08 samcv every other program works without any config
05:08 AlexDaniel :-|
05:08 geekosaur (some terminal emulators, and any real terminal)
05:08 samcv so i will investigate
05:08 AlexDaniel samcv: yes please
05:08 geekosaur samcv, it might be useful to use ltrace and see if there is some common configuration they use
05:09 samcv they may be using tty_set_default_bindings to get the terminals bindings... but that's what i am just guessing
05:09 samcv but that would make sure that it always performed as 'expected'
05:13 rindolf joined #perl6
05:14 Cabanossi joined #perl6
05:38 Vynce joined #perl6
05:47 Actualeyes joined #perl6
05:54 pierre_ joined #perl6
06:13 pierre_ joined #perl6
06:25 xiaomiao joined #perl6
06:26 domidumont joined #perl6
06:30 labster joined #perl6
06:35 samcv how do i do a direct lookup, but also use methods as well?
06:35 samcv i can do: require Readline; my $read = $::Readline::Readline.new;
06:36 samcv but then how do i call methods on the resulting object?
06:36 psch isn't $read a Readline then?
06:36 samcv yes
06:36 psch then the normal methodop syntax should work, shouldn't it?
06:36 psch i mean, you instantiated it and all..?
06:38 samcv well, $read.read-init-file("/etc/inputrc"); this doesn't work. says no such method for invocant of type any
06:38 samcv so maybe my $read = $::Readline::Readline.new; this line didn't work
06:38 psch right, if the invocant is Any in that line you're not getting a Readline instance
06:38 samcv yeah
06:39 samcv not sure how to direct lookup for classes though, i've done it with functions before
06:44 psch well, that '$::' syntax seems weird from here
06:44 psch m: say $::FOO::BAR
06:44 camelia rakudo-moar ecc202: OUTPUT«(Any)␤»
06:44 psch as in, it doesn't complain when it doesn't find anything
06:44 psch so you'd have to check that first
06:44 samcv yes. well what's the syntax i need to do, to access a class?
06:45 samcv that's what i'm asking
06:45 psch well what did you use to access a function?
06:45 samcv require Readline <&function>;
06:46 psch okay, afaik that means "load Readline but only import &function"
06:47 samcv well require doesn't import anything in by default
06:47 psch right, but you're explicitly asking for &function
06:47 samcv yeah
06:47 psch which isn't default behavior anymore
06:47 samcv well i need it to compile even when the person doesn't have that library
06:47 samcv but have a codepath where it can be used for those who have it
06:48 psch so you're requiring a class but don't want to import it
06:48 psch right, because it might fail, yeah
06:49 wamba joined #perl6
06:50 psch star-m: constant URI = try { require URI }; say URI.^name
06:50 camelia star-m 2016.10: OUTPUT«URI␤»
06:50 psch m: constant URI = try { require URI }; say URI.^name
06:50 camelia rakudo-moar ecc202: OUTPUT«Nil␤»
06:50 psch samcv: ^^^ that looks about right, i think?
06:50 psch module loading stuff isn't my strong suite :)
06:50 [ptc] o/
06:51 RabidGravy joined #perl6
06:58 domidumont joined #perl6
07:02 dalek mu: 7c97a5a | nige123++ | misc/perl6advent-2016/schedule:
07:02 dalek mu: Contribute on the 19th
07:02 dalek mu: review: https://github.com/perl6/mu/commit/7c97a5a0dd
07:02 domidumont joined #perl6
07:06 bjz joined #perl6
07:09 neuraload joined #perl6
07:10 kurahaupo_ joined #perl6
07:14 darutoko joined #perl6
07:15 neuraload joined #perl6
07:17 pierre_ joined #perl6
07:30 firstdayonthejob joined #perl6
07:35 TEttinger joined #perl6
07:36 bjz joined #perl6
08:00 labster joined #perl6
08:03 geekosaur joined #perl6
08:06 * lizmat clickbaits https://p6weekly.wordpress.com/2016/11/21/2016-47-perl-6-入门/
08:09 psch lizmat++
08:09 samcv AlexDaniel, https://github.com/rakudo/rakudo/pull/922 made a PR
08:09 samcv for the readline thing. I think this seems like a good way to do it
08:10 psch m: say Nil.new
08:10 camelia rakudo-moar ecc202: OUTPUT«Nil␤»
08:10 samcv and I checked and I DO have config files (/etc/inputrc) but perl6 REPL using Readline wasn't loading them for whatever reason
08:10 AlexDaniel hmmm
08:10 psch samcv: i think you probably still want to check if you actually have Readline somewhere
08:11 psch that's to mean "check somewhere", actually :)
08:11 samcv hmm? i have Readline
08:11 samcv or you mean those files?
08:11 samcv well psch it already does
08:11 psch m: constant URI = try { require URI }; my $uri = URI.new;
08:11 camelia rakudo-moar ecc202: ( no output )
08:11 samcv psch, i did a brand new rakudo install, ran perl6 and REPL worked fine
08:12 samcv then installed Readline, and it also worked fine
08:12 psch samcv: okay, cool.  it is just looked like there might be a !=:= Nil check missing somewhere :)
08:12 samcv this was after removing Readline and changing the path to a new rakudo install directory
08:12 psch if it works it works vOv
08:12 seatek joined #perl6
08:13 samcv yeah it doesn't call that role unless it actually has it. otherwise it wouldn't have worked before either
08:13 psch right, if it's in a further-out scope i clearly couldn't have seen it
08:13 psch m: constant URI = try { require URI }; my $uri = URI.new; $uri.do-any-uri-thingy # it just looks like this could happen
08:13 camelia rakudo-moar ecc202: OUTPUT«No such method 'do-any-uri-thingy' for invocant of type 'Any'␤  in block <unit> at <tmp> line 1␤␤»
08:13 samcv and checked that it compiles without Readline as well
08:13 psch ah, but the call is in a method, missed that
08:14 samcv yeah
08:15 lizmat samcv: merged
08:15 psch samcv++
08:15 samcv thanks lizmat :)
08:22 ChoHag joined #perl6
08:24 zakharyas joined #perl6
08:30 yqt joined #perl6
08:30 dakkar joined #perl6
08:36 CIAvash joined #perl6
08:43 cognominal joined #perl6
08:48 g4 joined #perl6
08:51 girafe2 joined #perl6
08:55 brillenfux joined #perl6
08:55 mohae_ joined #perl6
09:20 cognominal joined #perl6
09:22 xtreak joined #perl6
09:25 jonas1 joined #perl6
09:30 neuraload joined #perl6
09:36 optikalmouse joined #perl6
09:36 optikalmouse ugh wrong chan, perl 5 *shudder* ;p
09:41 sunnavy joined #perl6
09:42 samcv hah
09:42 samcv their channel isn't always the nicest if that's what you are meaning optikalmouse
09:42 samcv well it depends on who you are talking to there
09:42 optikalmouse so I wrote 1 article on perl6, I wanted to write a 2nd where I'm do scraping/indexing and generally building a small search engine for a wiki site.
09:43 samcv nice
09:43 optikalmouse samcv, tbh I haven't hung out on #perl in a while :S
09:43 samcv same
09:43 gregf_ joined #perl6
09:44 optikalmouse all I need is an HTML parser I think to do this, also a thesaurus, I need to be able to get synonyms for some common words. is the a perl6 lib for that like hooking into a thesaurus api?
09:45 samcv perl 6 lib for html parsing? sorry is that what you mean
09:45 optikalmouse ^ yes
09:46 Ulti http://modules.perl6.org/dist/HTML::MyHTML http://modules.perl6.org/dist/HTML::Parser
09:46 optikalmouse awesome :D
09:46 samcv it should probably be fine optikalmouse
09:46 Ulti modules.perl6.org it has a search box...
09:47 timotimo o/
09:47 timotimo optikalmouse: i think on top of a thesaurus you'll also want a stemmer
09:48 Ulti optikalmouse: also https://github.com/Skarsnik/perl6-gumbo
09:49 geekosaur joined #perl6
09:53 optikalmouse timotimo, yes possibly, I wanted to hack up something for a work hackathon which is why I was considering just regexs
09:53 optikalmouse Ulti, my head's search box is broken at 5AM EST :'( :'(
09:54 timotimo OK
09:54 kent\n joined #perl6
09:54 timotimo but please, if you make a search thing, if the user puts quotation marks around their query or something like that, don't go and "be smart" about what they "probably meant" :)
09:56 arnsholt I think there's a Porter stemmer implementation
09:59 timotimo i think so, too
10:01 optikalmouse timotimo, hah ok
10:03 vytautas joined #perl6
10:07 kurahaupo__ joined #perl6
10:08 optikalmouse joined #perl6
10:18 wamba joined #perl6
10:23 zacts joined #perl6
10:25 salva joined #perl6
10:31 bjz_ joined #perl6
10:46 kurahaupo__ joined #perl6
10:49 zakharyas joined #perl6
11:04 AlexDaniel joined #perl6
11:09 pierre_ joined #perl6
11:12 ssm joined #perl6
11:12 ocbtec joined #perl6
11:12 rindolf joined #perl6
11:18 ZzZombo are multis the same in classes as anywhere else? https://docs.perl6.org/language/objects doesn't seem to recognize them, even.
11:19 gfldex ZzZombo: no, a multi method will ignore extra named args, multi subs will complain
11:20 jnthn To be fair, that's true of methods in general, not just multi methods :)
11:20 yoleaux 21 Nov 2016 19:09Z <viki> jnthn: is this a bug? A subset‒*located inside a class*‒with a WhateverCode that closes over an array doesn't get the values of that array: https://gist.github.com/zoffixznet/4cc505781009411d4f1b50915b0a5df9
11:20 ZzZombo uh oh
11:20 gfldex m: my method foo(){}; my $c; $c.&foo(:answer(42))
11:20 camelia rakudo-moar bbbb2b: ( no output )
11:20 gfldex m: my multi method foo(){}; my $c; $c.&foo(:answer(42))
11:20 camelia rakudo-moar bbbb2b: ( no output )
11:20 gfldex m: multi sub foo(){}; foo(:answer(42))
11:20 camelia rakudo-moar bbbb2b: OUTPUT«Unexpected named argument 'answer' passed␤  in sub foo at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
11:21 AlexDaniel joined #perl6
11:22 ZzZombo one thing I can't wrap my head around is the syntax for parameters and class attributes.
11:22 ZzZombo f(param:value) looks much better, than f(:param(value))
11:22 psch m: class A { method foo(:$a, *%a) { if %a.keys { X::AdHoc.new('Unexpecteed named arguments').throw } } }; A.foo :1a; # if you really want to break nextsame and all those
11:22 camelia rakudo-moar bbbb2b: ( no output )
11:22 psch m: class A { method foo(:$a, *%a) { if %a.keys { X::AdHoc.new('Unexpecteed named arguments').throw } } }; A.foo :1b;
11:22 camelia rakudo-moar bbbb2b: OUTPUT«Default constructor for 'X::AdHoc' only takes named arguments␤  in method foo at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
11:22 jnthn .tell viki Looks like it could be a code-gen issues, maybe not closure-capturing something right. That said, the better way to write all of those caeses imho is to use "constant" :-)
11:22 yoleaux jnthn: I'll pass your message to viki.
11:22 psch err, well, 'msg => ' is the missing bit :)
11:22 psch or "message" i think
11:23 jnthn psch: Pretty sure it's message
11:24 ZzZombo m: class X{sub XXX{}}
11:24 camelia rakudo-moar bbbb2b: ( no output )
11:24 ZzZombo huh
11:24 ZzZombo what does sub do?
11:24 psch m: class C { sub foo { say "bar" } }; C::foo
11:24 camelia rakudo-moar bbbb2b: OUTPUT«Could not find symbol '&foo'␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
11:24 psch err, 'our'
11:24 psch m: class C { our sub foo { say "bar" } }; C::foo
11:24 camelia rakudo-moar bbbb2b: OUTPUT«bar␤»
11:25 psch ZzZombo: it declares a Sub
11:25 psch m: sub f {}; say &f.WHAT
11:25 camelia rakudo-moar bbbb2b: OUTPUT«(Sub)␤»
11:25 dalek doc: 484e94a | gfldex++ | doc/Type/Method.pod6:
11:25 synopsebot6 Link: http://doc.perl6.org/type/Method
11:25 dalek doc: tell that Method ignores extra named args
11:25 dalek doc: review: https://github.com/perl6/doc/commit/484e94abc8
11:25 ZzZombo like in a package, I see
11:26 psch ZzZombo: point there is that a class is a module is a package
11:26 psch ZzZombo: subs are 'my' scoped by default, hence the error in the first one
11:26 ZzZombo w/o 'our' or otherwise it can be accessed only from within the class, yes?
11:26 ZzZombo there is still a lot for me to learn
11:28 psch m: class A { multi method m(:$a, :$b) { say "2 nameds" } }; class B is A { method m(:$a) { say "1 named"; nextsame } }; B.m( :1a, :2b )
11:28 camelia rakudo-moar bbbb2b: OUTPUT«1 named␤2 nameds␤»
11:28 psch gfldex: ^^^ that i think shows that it doesn't *ignore* additional nameds, but silently accepts them (and potentially passes them on)
11:30 gfldex psch: I shall rephrase
11:31 gfldex i get really odd errors when using modules
11:31 gfldex ===SORRY!===
11:31 gfldex Expected MAST::Frame, but didn't get one===SORRY!===
11:31 gfldex without the 2nd SORRY
11:31 gfldex didn't do that a few days ago
11:32 psch gfldex++ thanks
11:34 dalek doc: 9a43fbb | gfldex++ | doc/Type/Method.pod6:
11:34 synopsebot6 Link: http://doc.perl6.org/type/Method
11:34 dalek doc: better example and state forwarding
11:34 dalek doc: review: https://github.com/perl6/doc/commit/9a43fbbf87
11:36 tbrowder hi #perl6
11:36 samcv hi tbrowder :)
11:37 tbrowder did i see a discussion some days ago about making the best practice for public modules have a META.info instead of a META6.json?
11:37 tbrowder hi samcv!
11:39 dalek doc: f595b8f | gfldex++ | doc/Language/typesystem.pod6:
11:39 synopsebot6 Link: http://doc.perl6.org/language/typesystem
11:39 dalek doc: link to /type/Method and state our-scope default
11:39 dalek doc: review: https://github.com/perl6/doc/commit/f595b8ff13
11:40 viki tbrowder: considering META.info is an old format and META6.json is the new thing, I somewhat doubt there was a discussion about switching yet again
11:40 yoleaux 11:22Z <jnthn> viki: Looks like it could be a code-gen issues, maybe not closure-capturing something right. That said, the better way to write all of those caeses imho is to use "constant" :-)
11:40 gfldex ZzZombo: and there is much for me to doc too. Your questions are very helpful in that regard.
11:40 tbrowder hm, looks like the move was TO META6.json away FROM META.info, so I guess I'm still on track
11:41 tbrowder sorry for the noise...
11:41 gfldex better noisy then sorry
11:42 viki ZzZombo: would you add yourself to this file, unless you wish to appear as "ZzZombo" in credits: https://github.com/rakudo/rakudo/blob/nom/CREDITS
11:42 viki seatek: would you add yourself to this file, unless you wish to appear as "seatek" in credits: https://github.com/rakudo/rakudo/blob/nom/CREDITS
11:44 viki same applies to cpin and adaptiveoptics... (don't see nicks in the channel...)
11:47 viki .oO( I need a robot to do this stuff... )
11:47 viki NeuralAnomaly: ^ this. learn it
11:53 viki .seen MadCapJake
11:53 yoleaux I saw MadcapJake 17 Jun 2016 21:56Z in #perl6: * MadcapJake is off to dinner
11:56 gfldex i solved the MAST::Frame-problem by `rm -rf rakudo/install/*`
12:00 lucasb_ joined #perl6
12:00 viki Interesting :|
12:03 CIAvash joined #perl6
12:07 Khisanth joined #perl6
12:14 gregf_ joined #perl6
12:32 ZzZombo viki: that's fine.
12:35 ZzZombo 'sub f(&c:(Int)) { }'
12:35 ZzZombo interesting
12:36 gfldex Perl 6 is a Signature oriented programming language :)
12:37 DrForr I've been playing with doing Prolog as almost purely signature-based.
12:37 ZzZombo so, since Signature is just a class, is it possible to use a predeclared instance of it as signature for a sub?
12:38 gfldex not without EVAL
12:38 seatek viki: thanks - i added my info
12:39 gfldex m: sub foo(Int $i, Str $s){}; &foo.signature.perl.say
12:39 camelia rakudo-moar 4723b9: OUTPUT«:(Int $i, Str $s)␤»
12:39 gfldex ZzZombo: macros may make the prossible in the future
12:40 ZzZombo argh, I just caught myself adding 'my $self=shift' to a method...
12:42 ZzZombo I take it as there is no built-in to trim a string?
12:42 gfldex m: "  foo  ".trim.say
12:42 camelia rakudo-moar 4723b9: OUTPUT«foo␤»
12:42 ZzZombo Woohoo
12:42 ZzZombo it about time
12:43 psch m: say "   foo   ".trim.indent(2) # we're also left-pad safe :)
12:43 camelia rakudo-moar 4723b9: OUTPUT«  foo␤»
12:45 ZzZombo m: sub filename(Str $file where $x.trim ne '')
12:45 camelia rakudo-moar 4723b9: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '$x' is not declared␤at <tmp>:1␤------> 3sub filename(Str $file where 7⏏5$x.trim ne '')␤»
12:45 ZzZombo m: sub filename(Str $file where $file.trim ne '')
12:45 camelia rakudo-moar 4723b9: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 3lename(Str $file where $file.trim ne '')7⏏5<EOL>␤    expecting any of:␤        new name to be defined␤»
12:45 ZzZombo m: sub filename(Str $file where {$file.trim ne ''})
12:45 camelia rakudo-moar 4723b9: OUTPUT«5===SORRY!5===␤Expression needs parens to avoid gobbling block␤at <tmp>:1␤------> 3ename(Str $file where {$file.trim ne ''}7⏏5)␤Missing block (apparently claimed by expression)␤at <tmp>:1␤------> 3name(Str $file where {$file.trim ne …»
12:45 psch m: sub filename(Str $file where .so) { }
12:45 camelia rakudo-moar 4723b9: ( no output )
12:45 psch m: sub filename(Str $file where .so) { }; filename ''
12:45 camelia rakudo-moar 4723b9: OUTPUT«Constraint type check failed for parameter '$file'␤  in sub filename at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
12:46 psch ZzZombo: remember, '' is falsey :)
12:46 nine psch: but ' ' isn't
12:46 psch oh right
12:46 psch so .trim.so
12:46 psch :/
12:46 ZzZombo alright
12:46 nine m: sub filename(Str $file where $file.trim.chars)  { say $file; }; filename(' ')
12:46 camelia rakudo-moar 4723b9: OUTPUT« ␤»
12:47 psch hm
12:47 nine odd
12:47 psch $ touch ' ' # works fine fwiw
12:47 psch but yeah, i can see how people wouldn't want space-named files lying around
12:47 psch m: say ' '.trim.chars
12:47 camelia rakudo-moar 4723b9: OUTPUT«0␤»
12:48 jnthn Remember that where smartmathces the param against the expression
12:48 gfldex m: my $filename = "somefile-001.txt"; say $filename++ for 1..3;
12:48 camelia rakudo-moar 4723b9: OUTPUT«somefile-001.txt␤somefile-002.txt␤somefile-003.txt␤»
12:48 psch m: say ' ' ~~ $_.trim.chars
12:48 gfldex do we doc that ^^^ anywhere?
12:48 camelia rakudo-moar 4723b9: OUTPUT«True␤»
12:48 nine sub filename($file where {$_.trim.chars}) { say "<$file>" }; filename " "
12:48 nine m: sub filename($file where {$_.trim.chars}) { say "<$file>" }; filename " "
12:48 camelia rakudo-moar 4723b9: OUTPUT«Constraint type check failed for parameter '$file'␤  in sub filename at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
12:48 arnsholt *.trim.chars should work too, no?
12:48 nine m: sub filename($file where *.trim.chars) { say "<$file>" }; filename " "
12:48 camelia rakudo-moar 4723b9: OUTPUT«Constraint type check failed for parameter '$file'␤  in sub filename at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
12:48 nine yes
12:49 pierre_ joined #perl6
12:49 arnsholt Yaaaay, I remembered correctly for a change =D
12:49 arnsholt (Part of the reason I backed Learning Perl 6 is to get a chance to brush up on my Perl 6 =)
12:50 ZzZombo so is {$_.trim.chars} or .trim.so? :/
12:50 arnsholt Yeah. Just *.trim would work, I guess
12:50 arnsholt Or prefix:<?> instead of .so
12:51 psch m: say ' ' ~~ {.trim.so}; say so ' ' ~~ {.trim.chars}
12:51 camelia rakudo-moar 4a711b: OUTPUT«False␤False␤»
12:51 psch ZzZombo: TIMTOWTDI vOv
12:52 ZzZombo yeah, right, but I was worried one way has something over another that you wanted to show me, but I failed to see :v
12:53 psch well, one is "are there characters left after trimming" and the other is "is it truthy after trimming"
12:54 psch and, well, where does, in the end, check for truthiness itself
12:54 psch so arnsholt++ is right
12:54 psch ...i think
12:54 arnsholt About what?
12:54 psch m: sub f(Str $ where *.trim) { }; f ' '
12:54 camelia rakudo-moar 4a711b: OUTPUT«Constraint type check failed for parameter '<anon>'␤  in sub f at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
12:54 psch < arnsholt> Yeah. Just *.trim would work, I guess
12:55 arnsholt Right, that one]
12:57 dalek doc: 222d162 | coke++ | doc/ (2 files):
12:57 dalek doc: remove trailing whitespace
12:57 dalek doc: review: https://github.com/perl6/doc/commit/222d1625d2
12:57 dalek doc: b790d39 | coke++ | doc/ (2 files):
12:57 dalek doc: Fix pluralizations
12:57 dalek doc: review: https://github.com/perl6/doc/commit/b790d39170
12:58 dalek doc: ab292eb | gfldex++ | doc/Language/operators.pod6:
12:58 synopsebot6 Link: http://doc.perl6.org/language/operators
12:58 dalek doc: doc postfix:<++/-->(Str:D $s)
12:58 dalek doc: review: https://github.com/perl6/doc/commit/ab292ebed9
12:59 ZzZombo m: class A{};class B is A{};sub x(A:U $obj){$obj->new};x(B).say
12:59 camelia rakudo-moar 4a711b: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Cannot resolve caller trait_mod:<is>(B, A, Hash); none of these signatures match:␤    (Mu:U $child, Mu:U $parent)␤    (Mu:U $child, :$DEPRECATED!)␤    (Mu:U $type, :$rw!)␤    (Mu:U $type, :$nativesiz…»
12:59 psch spaces are free /o\
12:59 ZzZombo m: class A {};class B is A {};sub x(A:U $obj){$obj->new};x(B).say
12:59 camelia rakudo-moar 4a711b: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unsupported use of -> as postfix; in Perl 6 please use either . to call a method, or whitespace to delimit a pointy block␤at <tmp>:1␤------> 3};class B is A {};sub x(A:U $obj){$obj->7⏏5new};x(B).say…»
12:59 gfldex m: class A {};class B is A {}; sub x(A:U $obj){$obj.new}; x(B).say
12:59 camelia rakudo-moar 4a711b: OUTPUT«B.new␤»
13:00 ZzZombo pff
13:00 gfldex pointers aint pointy in Perl 6 :)
13:00 psch only Blocks can be pointy
13:03 AlexDaniel joined #perl6
13:04 dalek doc: 92b7ba4 | ZzZombo++ | doc/Type/Signature.pod6:
13:04 synopsebot6 Link: http://doc.perl6.org/type/Signature
13:04 dalek doc: Update Signature.pod6
13:04 dalek doc: review: https://github.com/perl6/doc/commit/92b7ba4299
13:04 ZzZombo Shh
13:04 ZzZombo hush
13:06 viki The next sentence is kinda weird. Failure ain't a Nil's subclass so while it's also ignored, the "This allows" bit is off
13:06 viki m: say Failure.new ~~ Nil
13:06 camelia rakudo-moar 4a711b: OUTPUT«True␤»
13:06 viki :o
13:06 viki dafuq
13:06 psch m: say Failure.^mro
13:06 camelia rakudo-moar 4a711b: OUTPUT«((Failure) Nil (Cool) (Any) (Mu))␤»
13:06 viki Well, I stand corrected :(
13:07 viki s: Failure, 'new'
13:07 SourceBaby viki, Sauce is at https://github.com/rakudo/rakudo/blob/4723b97/src/core/Mu.pm#L92
13:07 viki s: Failure, 'new', \()
13:07 SourceBaby viki, Sauce is at https://github.com/rakudo/rakudo/blob/4723b97/src/core/Failure.pm#L17
13:07 viki Weird, I thought it inherited Exception :\
13:07 viki m: Failure ~~ Exception
13:07 camelia rakudo-moar 4a711b: ( no output )
13:07 viki m: say Failure ~~ Exception
13:07 camelia rakudo-moar 4a711b: OUTPUT«False␤»
13:08 [Coke] sub first-parent-class-in-common($a, $b) { ... }
13:08 dalek doc: 815059e | coke++ | xt/code.pws:
13:08 dalek doc: learn new code sample text
13:08 dalek doc: review: https://github.com/perl6/doc/commit/815059eb31
13:09 viki m: sub foo { fail X::AdHoc.new }; say foo() ~~ Exception
13:09 camelia rakudo-moar 4a711b: OUTPUT«False␤»
13:10 viki m: use Test; sub foo { fail X::AdHoc.new }; throws-like { foo }, Exception
13:10 camelia rakudo-moar 4a711b: OUTPUT«    1..2␤    ok 1 - code dies␤    ok 2 - right exception type (Exception)␤ok 1 - did we throws-like Exception?␤»
13:10 viki ^ this is why I thought it was Exception.
13:10 moritz throws-like implies fatal, no?
13:10 moritz so it actually throws an exception, not a Failure
13:11 psch m: sub foo { fail X::AdHoc.new }; say foo().WHAT; say { foo() }().WHAT
13:11 camelia rakudo-moar 4a711b: OUTPUT«(Failure)␤(Failure)␤»
13:11 viki m: use Test; sub foo { fail X::AdHoc.new }; try foo.sink; say $!.^name
13:11 camelia rakudo-moar 080630: OUTPUT«X::AdHoc␤»
13:11 viki Now it makes sense :)
13:12 sufrostico joined #perl6
13:13 khw joined #perl6
13:13 viki Well! Learn something new every day.
13:14 ZzZombo m: say Int.new / Int.new
13:14 camelia rakudo-moar 080630: OUTPUT«Attempt to divide by zero using div␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
13:14 viki And I've been with Perl 6 for 1 year
13:14 ZzZombo I don't understand https://docs.perl6.org/type/Signature#Type_Captures then
13:14 ZzZombo what does that line do?
13:15 viki ZzZombo: try the actual code.
13:15 viki m: say (Int.new / Int.new).^name
13:15 camelia rakudo-moar 080630: OUTPUT«Rat␤»
13:16 viki It's only by trying to use the actual value that it explodes with zero divion.
13:16 ZzZombo huh
13:16 [Coke] lizmat: the p6 weekly shows up in my feedly feed as "PHA+WWVzLCA8aT5OYW91bSBIYW5rYWNoZTwvaT4mIzgyMTY7cyA8YSBocmVmPSJodHRwOi8vcGVybDZpbnRyby5jb20iPnBlcmw2aW50cm8uY29tPC9hPiBoYXMgYmVlbiA8YSBocmVmPSJodHRwOi8vemgucGVybDZpbnRyby5jb20iPnRyYW5zbGF0ZWQgdG8gQ2hpbmVzZTwvYT4gYnkgPGk" <elided>. click through, everything's fine on the site. just some weird interaction with my rss reader, I guess.
13:16 ZzZombo so... is it really needed to be that complicated then?
13:16 viki A Rat has a numerator and denominator. It's perfectly happy for those to be zeros, until you try to actually divide it
13:17 viki ZzZombo: prolly not :)
13:17 brrt A rat has a tail and a nose, two feet and two hands
13:18 gfldex [Coke]: it's not just you. pl6anet.org fails to link too. Likely some unicode accident.
13:18 ZzZombo IMO such constructions don't bode well, generally. They should be avoided, I believe.
13:18 gfldex stmuk_: please take note ^^^
13:18 ZzZombo Better to just place Rat there
13:18 viki I don't get that example at all TBH
13:19 ZzZombo than confuse readers, potentially.
13:19 viki Like, wtf is ::C involved at all
13:19 viki and why is it called $closure
13:19 ZzZombo because reasons.
13:20 viki m: https://gist.github.com/zoffixznet/5f5e6faf84ac4c141b174aa502fcec4e
13:20 camelia rakudo-moar 080630: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in argument list; couldn't find final ')' ␤at <tmp>:5␤------> 3    return sub(T7⏏5 $p1) {␤    expecting any of:␤        infix␤        infix stopper␤»
13:20 viki broken example too
13:21 viki And it might be old enough that Int.new was returning something else, I recall writing some code for it...
13:21 viki committable6: 2015.12 say Int.new
13:21 committable6 viki, ¦«2015.12»: 0
13:21 viki committable6: 2015.12 say Int.new: 5
13:21 committable6 viki, ¦«2015.12»: 5
13:21 * viki shrugs
13:22 viki Oh, I think it was the cloning bit
13:22 viki committable6: 2015.12 5 does role {}; dd Int.new: 5
13:22 committable6 viki, ¦«2015.12»: 5
13:22 viki committable6: 2015.12 dd Int.new: 5 but role {}
13:22 committable6 viki, ¦«2015.12»: 5
13:23 lizmat [Coke] perhaps having chinese characters in the URL is triggering some bug
13:23 ZzZombo m: sub named(:official($private)) { "Official business!" if $private }
13:23 camelia rakudo-moar 080630: ( no output )
13:23 ZzZombo named :official;
13:23 psch committable6: 2015.12 5 does role { method Str { "foo" } }; print 5
13:23 committable6 psch, ¦«2015.12»: fooo
13:23 ZzZombo m: sub named(:official($private)) { "Official business!" if $private }
13:23 ZzZombo say named :official;
13:23 camelia rakudo-moar 080630: ( no output )
13:24 psch m: 5 does role { method Str { "foo" } }; print 5
13:24 camelia rakudo-moar 080630: OUTPUT«foo»
13:24 viki m: 5 does role { method Str { "foo" } }; dd 5
13:24 camelia rakudo-moar 080630: OUTPUT«foo␤»
13:24 psch dunno tbh
13:24 viki m: 5 does role { method Str { "foo" } }; dd Int.new: 5
13:24 camelia rakudo-moar 080630: OUTPUT«foo␤»
13:24 viki /o\
13:24 psch i mean, i'm not even sure what "cloning bit" this is about :S
13:25 viki Well, the idea was that Int.new would create a new 5, and the old way was just passing it along
13:25 viki Unless I imagined this all :D
13:25 psch that doesn't look too much like it's happening...
13:25 viki s: Int, 'new', \()
13:25 SourceBaby viki, Sauce is at https://github.com/rakudo/rakudo/blob/080630c/src/core/Mu.pm#L93
13:25 viki s: Int, 'new', \(5)
13:25 SourceBaby viki, Sauce is at https://github.com/rakudo/rakudo/blob/080630c/src/core/Int.pm#L21
13:25 [Coke] lizmat: yah. no worries, just an FYI.
13:25 ZzZombo so, what is 'named :official' call even doing? What is ':official' for in the wild here?
13:26 viki ZzZombo: it's just a named argument
13:26 psch the Type Captures example is a bit dense, yeah, but mostly understandable i think
13:26 viki ZzZombo: so you pass :official, but the var is named $private
13:26 viki psch: but it's broken. it doesn't compile
13:26 ZzZombo m: sub named(:official($private)) { "Official business!" if $private } say named 'yes'
13:26 camelia rakudo-moar 080630: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Strange text after block (missing semicolon or comma?)␤at <tmp>:1␤------> 3e)) { "Official business!" if $private }7⏏5 say named 'yes'␤    expecting any of:␤        infix␤        infix stoppe…»
13:27 psch oh, right
13:27 ZzZombo m: sub named(:official($private)) { "Official business!" if $private } named('yes').say
13:27 camelia rakudo-moar 080630: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Strange text after block (missing semicolon or comma?)␤at <tmp>:1␤------> 3e)) { "Official business!" if $private }7⏏5 named('yes').say␤    expecting any of:␤        infix␤        infix stopp…»
13:27 viki ZzZombo: you need a semicolon after the }
13:27 ZzZombo m: sub named(:official($private)) { "Official business!" if $private }; named('yes').say
13:27 camelia rakudo-moar 080630: OUTPUT«Too many positionals passed; expected 0 arguments but got 1␤  in sub named at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
13:27 ZzZombo m: sub named(:official($private)) { "Official business!" if $private }; named(:official).say
13:27 camelia rakudo-moar 080630: OUTPUT«Official business!␤»
13:27 viki Right, 'yes' is a positional arg. You need :official<Yes>
13:27 viki or that :)
13:27 psch hm, that's a bit weird
13:27 moritz or official => 'yes'
13:28 viki or :42official
13:28 viki :D
13:28 ZzZombo RLY
13:28 ZzZombo m: sub named(:official($private)) { "Official business!" if $private }; named(:666official).say
13:28 camelia rakudo-moar 080630: OUTPUT«Official business!␤»
13:28 ZzZombo why
13:28 viki ZzZombo: :5th, :3rd
13:28 psch m: say "foo" ~~ s:2nd/o//
13:28 camelia rakudo-moar 080630: OUTPUT«Cannot modify an immutable Str␤  in block <unit> at <tmp> line 1␤␤»
13:28 viki our .subst method takes those
13:28 psch m: say "foo" ~~ S:2nd/o//
13:28 camelia rakudo-moar 080630: OUTPUT«Potential difficulties:␤    Smartmatch with S/// is not useful. You can use given instead: S/// given $foo␤    at <tmp>:1␤    ------> 3say "foo" ~~ 7⏏5S:2nd/o//␤False␤»
13:28 psch ...
13:29 viki m: say S:2nd/o// given "foo"
13:29 camelia rakudo-moar 080630: OUTPUT«fo␤»
13:29 * psch is clearly bad at Perl 6 /o\
13:29 psch viki: i think that the inner sub doesn't recognize T is buggy
13:29 psch consider the /me above though, i suppose :)
13:29 viki :D
13:29 psch bisect: sub f(::T $a) { sub(T $b) { $a ~ $b } }; f(2)(3).say
13:30 bisectable6 psch, On both starting points (old=2015.12 new=080630c) the exit code is 1 and the output is identical as well
13:30 viki And yeah, looks like my clone doesn't clone
13:30 bisectable6 psch, https://gist.github.com/5f4f9b9a2b3f7b9750aa0f7de4c20538
13:30 viki committable6: 2015.12 m: 5 does role { method Str { "foo" } }; dd Int.new: 5
13:30 committable6 viki, ¦«2015.12»: foo
13:30 viki ...at least I didn't make it worse ^_^
13:31 viki Or rather it does clone... but the wrong thing
13:31 psch m: sub f(::T $a) { -> T $b { $a ~ $b } }; f(1)(2).say
13:31 camelia rakudo-moar 080630: OUTPUT«12␤»
13:31 psch i mean, yeah
13:31 * viki leaves to do an honest day of work for a change
13:31 psch i suppose we lose lexical generics when parsing a new signature...
13:32 psch m: sub f(::T $a) { -> T $b { $a ~ $b } }; f(1)("2").say
13:32 camelia rakudo-moar 080630: OUTPUT«Type check failed in binding to $b; expected Int but got Str ("2")␤  in block <unit> at <tmp> line 1␤␤»
13:33 psch m: sub f(::T $a) { sub (T $) { $a } }; f(1)("2").say
13:33 camelia rakudo-moar 080630: OUTPUT«Type check failed in binding to <anon>; expected Int but got Str ("2")␤  in sub  at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
13:33 psch okay what
13:34 psch m: sub f(::T $a) { sub (T $b) { $a } }; f(1)("2").say
13:34 camelia rakudo-moar 080630: OUTPUT«Type check failed in binding to $b; expected Int but got Str ("2")␤  in sub  at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
13:34 psch oh ffs
13:34 psch sub()
13:34 psch m: sub()
13:34 camelia rakudo-moar 080630: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤    sub used at line 1. Did you mean 'sum'?␤␤»
13:34 psch m: sub($a) { }
13:34 camelia rakudo-moar 080630: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '$a' is not declared␤at <tmp>:1␤------> 3sub(7⏏5$a) { }␤»
13:34 psch m: sub(Int $a) { }
13:34 camelia rakudo-moar 080630: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in argument list; couldn't find final ')' ␤at <tmp>:1␤------> 3sub(Int7⏏5 $a) { }␤    expecting any of:␤        infix␤        infix stopper␤»
13:35 psch m: sub f(::T $a) { sub(T) { $a ~ $b } }; f(1)(2).say
13:35 camelia rakudo-moar 080630: OUTPUT«5===SORRY!5===␤Word 'sub' interpreted as 'sub()' function call; please use whitespace around the parens␤at <tmp>:1␤------> 3sub f(::T $a) { sub7⏏5(T) { $a ~ $b } }; f(1)(2).say␤Unexpected block in infix position (two terms in a row)␤at …»
13:35 gfldex you need a space between sub and (
13:35 psch *that* is the error i wanted
13:35 psch gfldex: yeah, my point is that we don't error because of that often enough apparently
13:35 psch gfldex: otherwise the problem with the example would've been clear way earlier... :)
13:36 psch m: https://gist.github.com/anonymous/13419e6ee718dde339dd9ad958fcaae7
13:36 camelia rakudo-moar 080630: OUTPUT«10␤»
13:38 ZzZombo why is it not described you can put type constraints on named parameters?
13:38 ZzZombo m: sub x(Int:D :$i){say $i}; x 'asd';
13:38 camelia rakudo-moar 080630: OUTPUT«Too many positionals passed; expected 0 arguments but got 1␤  in sub x at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
13:38 ZzZombo m: sub x(Int:D :$i){say $i}; x i=>'asd';
13:38 camelia rakudo-moar 080630: OUTPUT«Type check failed in binding to $i; expected Int but got Str ("asd")␤  in sub x at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
13:41 viki ZzZombo: well volunteered! ;)
13:41 ZzZombo heh
13:42 viki m: sub x(Int:D :$i where *.is-prime){say "$i is a prime number!"}; x :31337i;
13:42 camelia rakudo-moar 080630: OUTPUT«31337 is a prime number!␤»
13:42 viki Can also do this type of constraints
13:44 gfldex type constraints on named args is ENODOC too
13:44 gfldex i shall doc
13:47 ZzZombo Whatever?
13:47 ZzZombo LOL
13:48 viki m: say *.^name
13:48 gfldex ** <-- HyperWhatever
13:48 camelia rakudo-moar 080630: OUTPUT«{ ... }␤»
13:48 viki :(
13:48 psch m: say *.WHAT
13:48 camelia rakudo-moar 080630: OUTPUT«(Whatever)␤»
13:48 psch m: say **.WHAT
13:48 camelia rakudo-moar 080630: OUTPUT«(HyperWhatever)␤»
13:48 dalek doc: df6644f | (Zoffix Znet)++ | doc/Type/Signature.pod6:
13:48 synopsebot6 Link: http://doc.perl6.org/type/Signature
13:48 dalek doc: Fix compilation error in example
13:48 dalek doc:
13:48 dalek doc: psch++
13:48 dalek doc: review: https://github.com/perl6/doc/commit/df6644f9f4
13:51 viki m: say (1, 1, *+* … *)[^20]
13:51 camelia rakudo-moar 080630: OUTPUT«(1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181 6765)␤»
13:51 viki m: say (2, 2, * ** * … *)[^20]
13:51 camelia rakudo-moar 080630: OUTPUT«Numeric overflow␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
13:51 viki damnyouitshouldbeInf
13:51 viki m: say (2, 2, * ** * … *)[^10]
13:51 camelia rakudo-moar 080630: OUTPUT«Numeric overflow␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
13:52 viki m: say (2, 2, * ** * … *)[^5]
13:52 camelia rakudo-moar 080630: OUTPUT«(2 2 4 16 4294967296)␤»
13:52 viki \o/
13:52 DrForr Heh. I had someone at Cluj.pm specifically ask about Fibonacci.
13:52 ZzZombo how do I translate a P5 class that uses autoload to do its magic?
13:53 viki ZzZombo: we have FALLBACK
13:53 viki method FALLBACK
13:53 * viki does the gun stance
13:53 ZzZombo nice
13:54 viki https://docs.perl6.org/language/typesystem#index-entry-FALLBACK_%28method%29
13:54 ZzZombo Get outta my mind!
13:54 grondilu_ joined #perl6
13:54 ZzZombo how'd you know I was looking for it?
13:55 viki I'm very smrt
13:57 wamba joined #perl6
13:57 ZzZombo so f :foo is f foo=>True, don't see that mentioned anywhere
13:57 dalek doc: 6cb3ee8 | gfldex++ | doc/Type/Signature.pod6:
13:57 synopsebot6 Link: http://doc.perl6.org/type/Signature
13:57 dalek doc: doc type constraints on named parameters
13:57 dalek doc: review: https://github.com/perl6/doc/commit/6cb3ee80e4
13:58 viki m: say (1.1, 1.2, 1.3 * ** * ** * … *)[^5]
13:58 camelia rakudo-moar 080630: OUTPUT«*␤  in any  at /home/camelia/rakudo-m-inst-2/share/perl6/runtime/CORE.setting.moarvm line 1␤  in block <unit> at <tmp> line 1␤␤»
13:58 viki heh
13:58 viki it thinks … * is a stud
13:58 viki a *stub
13:58 gfldex ZzZombo: see https://docs.perl6.org/language/glossary#index-entry-Colon_Pair
13:59 gfldex i should link there I guess
14:00 viki m: say eager 1.1 .. 1.4'
14:00 camelia rakudo-moar 080630: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3say eager 1.1 .. 1.47⏏5'␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤        statement modifie…»
14:00 viki m: say eager 1.1 .. 1.4
14:00 camelia rakudo-moar 080630: OUTPUT«(1.1)␤»
14:00 viki m: say eager 1.1 ... 1.4
14:00 camelia rakudo-moar 080630: OUTPUT«(1.1)␤»
14:00 viki :(
14:00 psch m: say eager 1.1, * + .1 ... 1.4
14:00 camelia rakudo-moar 080630: OUTPUT«(1.1 1.2 1.3 1.4)␤»
14:00 Actualeyes joined #perl6
14:01 kalkin-_ Is there some guide with best practices on how to document Classes and methods in POD? I've read (parts) of S26, but it's too general
14:02 viki Don't think so..
14:02 viki I don't even think we support all of S26 entirely
14:02 viki m: say (|(1.1, * + .1 … 1.7), * ** * ** * ** * ** * ** * ** * … *)[^10]
14:02 camelia rakudo-moar 080630: OUTPUT«(1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.14214710482005 1.40899329027426 1.91186164454408)␤»
14:02 viki \o/
14:02 kyclark_ joined #perl6
14:02 viki m: say (|(1.1, * + .1 … 1.7), * ** * ** * ** * ** * ** * ** * … *)[^100]
14:02 camelia rakudo-moar 080630: OUTPUT«(1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.14214710482005 1.40899329027426 1.91186164454408 2.56762564221384 6.80825317520194 Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf In…»
14:02 viki And here we have an Inf instead of throwage
14:03 DrForr #| is used, at least I've used it for samples.
14:03 kalkin-_ m: sub foo( |#{A C<Str>} $b} { $b.say } foo.WHY
14:03 camelia rakudo-moar 080630: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Malformed parameter␤at <tmp>:1␤------> 3foo( |#{A C<Str>} $b} { $b.say } foo.WHY7⏏5<EOL>␤    expecting any of:␤        constraint␤»
14:03 kalkin-_ m: sub foo( |#{A C<Str>} $b} { $b.say }; foo.WHY
14:03 camelia rakudo-moar 080630: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Malformed parameter␤at <tmp>:1␤------> 3oo( |#{A C<Str>} $b} { $b.say }; foo.WHY7⏏5<EOL>␤    expecting any of:␤        constraint␤»
14:03 kalkin-_ m: sub foo( #|{A C<Str>} $b} { $b.say }; foo.WHY
14:03 camelia rakudo-moar 080630: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Malformed parameter␤at <tmp>:1␤------> 3sub foo( #|{A C<Str>} $b7⏏5} { $b.say }; foo.WHY␤    expecting any of:␤        constraint␤»
14:03 dalek doc: a7f6994 | gfldex++ | doc/ (2 files):
14:03 dalek doc: link to colon-pair
14:03 dalek doc: review: https://github.com/perl6/doc/commit/a7f6994e59
14:03 dalek doc: e91b7fd | gfldex++ | doc/Type/Pair.pod6:
14:03 dalek doc: index colon-pair in /type/Pair
14:03 synopsebot6 Link: http://doc.perl6.org/type/Pair
14:03 dalek doc: review: https://github.com/perl6/doc/commit/e91b7fdf05
14:04 psch m: sub foo( #|{A C<Str>}␤ $b} { $b.say }; foo.WHY
14:04 camelia rakudo-moar 080630: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Malformed parameter␤at <tmp>:2␤------> 3 $b7⏏5} { $b.say }; foo.WHY␤    expecting any of:␤        constraint␤»
14:04 psch m: sub foo( #|{A C<Str>}␤ $b) { $b.say }; foo.WHY
14:04 camelia rakudo-moar 080630: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Calling foo() will never work with declared signature ($b)␤at <tmp>:2␤------> 3 $b) { $b.say }; 7⏏5foo.WHY␤»
14:04 psch m: sub foo( #|{A C<Str>}␤ $b) { $b.say }; .say &foo.WHY
14:04 camelia rakudo-moar 080630: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Calling foo() will never work with declared signature ($b)␤at <tmp>:2␤------> 3 $b) { $b.say }; .say &7⏏5foo.WHY␤»
14:04 psch m: sub foo( #|{A C<Str>}␤ $b) { $b.say }; say &foo.WHY:
14:04 camelia rakudo-moar 080630: OUTPUT«Nil␤»
14:04 psch m: sub foo( #={A C<Str>}␤ $b) { $b.say }; say &foo.WHY:
14:04 camelia rakudo-moar 080630: OUTPUT«A C<Str>␤»
14:04 psch kalkin-_: ^^^ there you go :)
14:04 kalkin-_ psch: ahh, ok let's see if p6doc will display it
14:05 ZzZombo class A { method asd(-->A){ say self } }
14:05 ZzZombo class A { method asd(-->self){ say self } } # <-- doesn't work.
14:06 psch m: say say ""
14:06 camelia rakudo-moar 080630: OUTPUT«␤True␤»
14:06 psch ZzZombo: &say returns True
14:06 kalkin-_ psch: just a second. AFAIK #= assigns the documentation to the element before. so #= rightly assigns it to foo.WHY, but actually I want to document the parameters, simmilar to javadoc style
14:06 psch ZzZombo: True probably isn't a A
14:06 domidumont joined #perl6
14:06 ZzZombo well, it wasn't even the error I encountered
14:06 ZzZombo 'Type 'self' is not declared'
14:06 kalkin-_ and then display the .WHY text in pod (which is currently displayed correctly in p6doc)  and the documentation for the sub parameters
14:07 ZzZombo but good point nonetheless
14:07 viki m:  class A { method asd(-->self){ say self } }
14:07 psch m: sub foo( #|{A C<Str>}␤ $b) { $b.say }; say &foo.signature.params[0].WHY:
14:07 camelia rakudo-moar 080630: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Type 'self' is not declared␤at <tmp>:1␤------> 3class A { method asd(-->self7⏏5){ say self } }␤»
14:07 camelia rakudo-moar 080630: OUTPUT«A C<Str>␤»
14:07 psch kalkin-: well, #| assigns to the param, and it works too
14:08 psch ZzZombo: well, self is not a type.  there is ::?CLASS, which is the class of self
14:08 psch m: class A { method m(--> ::?CLASS) { self } }; class B is A { }; say A.new.m; say B.new.m
14:08 camelia rakudo-moar 080630: OUTPUT«A.new␤B.new␤»
14:09 kalkin- psch: ok,
14:09 psch m: class A { method m(--> A) { self } }; class B is A { }; say A.new.m; say B.new.m # or be explicit if you don't want to inherit it i guess?
14:09 camelia rakudo-moar 080630: OUTPUT«A.new␤B.new␤»
14:09 kalkin- then it's definitly a p6doc issue for not showing them
14:09 psch oh damn you liskov, foiled again!
14:09 kalkin- thank you guys for helping
14:09 ZzZombo beat me to it
14:09 ZzZombo thanks
14:10 ZzZombo m: class C {
14:10 camelia rakudo-moar 080630: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 3class C {7⏏5<EOL>␤»
14:10 ZzZombo my $.local = 42;
14:10 ZzZombo has $.x = self.local
14:10 ZzZombo };
14:10 ZzZombo say C.new.x
14:10 ZzZombo ugh
14:10 viki I've just made a program that takes ages to compile (dunno how long, still waiting) :(
14:10 viki m: https://gist.github.com/zoffixznet/d58450ab33744a27c48e98c1d9f42e81
14:10 ZzZombo m: class C { my $.local = 42; has $.x = self.local }; say C.new.x
14:11 camelia rakudo-moar 080630: OUTPUT«(timeout)»
14:11 camelia rakudo-moar 080630: OUTPUT«42␤»
14:11 ZzZombo why is self here visible then?
14:11 viki Good question!
14:11 psch m: class C { my self $x }
14:11 camelia rakudo-moar 080630: OUTPUT«5===SORRY!5===␤Type 'self' is not declared␤at <tmp>:1␤------> 3class C { my self7⏏5 $x }␤Malformed my␤at <tmp>:1␤------> 3class C { my7⏏5 self $x }␤␤»
14:12 psch visible as *what* is the question
14:12 psch self is not a type, nowhere
14:12 viki ZzZombo: I think the literals you can specify in --> thing just don't include `self`. You can't for example specify 2+2 either
14:12 cdg joined #perl6
14:13 psch self is not a literal in that sense, it's more of an automatically lexpad-inserted constant
14:13 viki m: class C { method foo (self) { say "w00t" } }; say .foo: $_ given C.new
14:13 camelia rakudo-moar 080630: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Invalid typename 'self' in parameter declaration.␤at <tmp>:1␤------> 3class C { method foo (self7⏏5) { say "w00t" } }; say .foo: $_ given C␤»
14:13 gfldex ZzZombo: the self is pointing at the type object while constructing objects
14:13 ZzZombo yes, I know.
14:14 kyclark_ joined #perl6
14:14 ZzZombo in a function I wanted to declare return type of the class.
14:14 viki m: class C { method foo (-> ::?CLASS) { self } }; say .foo given C.new
14:14 camelia rakudo-moar 080630: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 3class C { method foo (7⏏5-> ::?CLASS) { self } }; say .foo given ␤»
14:15 viki m: class C { method foo (--> ::?CLASS) { self } }; say .foo given C.new
14:15 camelia rakudo-moar 080630: OUTPUT«C.new␤»
14:15 viki m: class C { method foo (--> ::?CLASS:D) { self } }; say .foo given C.new
14:15 camelia rakudo-moar 080630: OUTPUT«C.new␤»
14:15 ZzZombo also apparently you can't do 'method foo returns Whatever{}'
14:15 viki m: class C { method foo (--> ::?CLASS:D) { self } }; say .foo given C
14:15 camelia rakudo-moar 080630: OUTPUT«(C)␤»
14:15 viki huh
14:15 psch m: sub f(--> Int:D) { Int }; f()
14:15 camelia rakudo-moar 080630: OUTPUT«Type check failed for return value; expected return type Int cannot be itself (perhaps returning a :D type object?)␤  in sub f at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
14:15 cdg joined #perl6
14:15 psch huh indeed
14:15 gfldex m: class C {...}; class C { method m returns C {} }
14:15 camelia rakudo-moar 080630: ( no output )
14:16 psch m: class C { method foo (--> ::?CLASS:D) { say self.defined; self } }; say .foo given C
14:16 camelia rakudo-moar 080630: OUTPUT«False␤(C)␤»
14:16 ZzZombo well, it didn't sneeze when I was returning bools, so...
14:16 psch do we not do that right?
14:16 viki m: class C { method foo () returns Whatever { * } }; say .foo given C.new
14:16 camelia rakudo-moar 080630: OUTPUT«*␤»
14:16 viki ZzZombo: ^ seems you can
14:16 psch m: class C { method foo (::?CLASS:D $ --> ::?CLASS:D) { say self.defined; self } }; say .foo(C) given C
14:16 camelia rakudo-moar 080630: OUTPUT«Parameter '<anon>' requires an instance of type C, but a type object was passed.  Did you forget a .new?␤  in method foo at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
14:17 psch curious
14:17 psch m: class C { method foo (--> ::?CLASS:D) { False } }; say .foo given C
14:17 camelia rakudo-moar 080630: OUTPUT«Type check failed for return value; expected C but got Bool (Bool::False)␤  in method foo at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
14:17 viki m: class C { method foo (--> ::?CLASS:D) { say ::?CLASS:D.HOW; self; } }; say .foo given C
14:17 camelia rakudo-moar 080630: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤You can't adverb ::?CLASS␤at <tmp>:1␤------> 3od foo (--> ::?CLASS:D) { say ::?CLASS:D7⏏5.HOW; self; } }; say .foo given C␤    expecting any of:␤        pair value␤»
14:18 ZzZombo viki: yup... seems the error message I've been getting related to self.
14:18 ZzZombo not to returns
14:18 viki m: class C { method foo (--> ::?CLASS:D) { say (::?CLASS:D).HOW; self; } }; say .foo given C
14:18 camelia rakudo-moar 080630: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤You can't adverb ::?CLASS␤at <tmp>:1␤------> 3d foo (--> ::?CLASS:D) { say (::?CLASS:D7⏏5).HOW; self; } }; say .foo given C␤    expecting any of:␤        pair value␤»
14:18 viki So it looks like it'd just not interpreting ::?CLASS:D as a :D smiley
14:19 ZzZombo D:
14:19 gfldex i would consider this a bug
14:19 * viki is reporting it
14:21 AlexDani` joined #perl6
14:21 viki https://rt.perl.org/Ticket/Display.html?id=130151
14:22 ZzZombo wanna one more? "class A { method asd returns A:D { say self } }" doesn't seem to catch anything violating the constraint.
14:23 ZzZombo > A.asd
14:23 ZzZombo (A)
14:23 ZzZombo > A.new.asd
14:23 ZzZombo A.new
14:23 ZzZombo > say A.asd
14:23 ZzZombo (A)
14:23 viki m: class A { method asd returns A:D { 42 } }; say A.asd
14:23 camelia rakudo-moar 080630: OUTPUT«Type check failed for return value; expected A but got Int (42)␤  in method asd at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
14:23 viki m: class A { method asd returns A:D { say self } }; say A.asd
14:23 camelia rakudo-moar 080630: OUTPUT«(A)␤Type check failed for return value; expected A but got Bool (Bool::True)␤  in method asd at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
14:23 viki Seems to catch fine.
14:23 ZzZombo huh
14:23 viki REPL issue?
14:24 viki Maybe you need to clear it?
14:24 viki Restart..
14:24 gfldex m: class A { method asd returns A:D { A } }; say A.asd
14:24 camelia rakudo-moar 080630: OUTPUT«Type check failed for return value; expected return type A cannot be itself (perhaps returning a :D type object?)␤  in method asd at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
14:24 ZzZombo I was just launched
14:24 viki Whatever the strange people who use REPL do :)
14:24 ZzZombo it*
14:24 viki Could be a bug in REPL :(
14:24 psch yeaah the REPL is weird
14:24 psch i think it's at least partly an architectural thing that makes it weird
14:24 * viki nods
14:25 ZzZombo c:\rakudo\bin>perl -e "class A { method asd returns A:D { say self } };A.asd"
14:25 ZzZombo WHAT
14:25 ZzZombo syntax error at -e line 1, near "returns A:"
14:25 ZzZombo Execution of -e aborted due to compilation errors.
14:27 ZzZombo dammit
14:28 ZzZombo indeed REPL is causing that
14:28 ZzZombo never again
14:29 awwaiid ZzZombo: perl vs perl6?
14:30 ZzZombo what?
14:30 timotimo yeah
14:30 awwaiid are you running perl6 code through perl5?
14:30 timotimo that's totally what's happening
14:31 * viki eyes the c: part....
14:31 viki Your Rakudo may also be old enough that it's missing some of the fixes
14:31 timotimo don't judge people who install stuff on their system partition …
14:31 viki Thanks to our ultra-rapid bug fixing and stuff
14:31 * viki wasn't :)
14:32 ZzZombo especially when the installer doesn't even ask you where to install things...
14:32 viki /o\
14:33 ZzZombo c:\rakudo\bin>perl6 -v
14:33 ZzZombo This is Rakudo version 2016.11 built on MoarVM version 2016.11 implementing Perl 6.c.
14:33 ZzZombo I'm not so sure, but I think it can't be old.
14:33 timotimo cool, that's the newest beta
14:33 timotimo i didn't know we had a .msi for that yet
14:34 timotimo i would really appreciate if someone could take the time to make the perl6 installation thing on windows relocatable ...
14:36 viki TBH, I thought it were :/
14:36 psch i wasn't aware it was relocatable anywhere
14:36 * viki downloads 2016.07 Star to try out
14:36 psch welp
14:37 psch moved my local, current build of nom around:
14:37 psch $ ./perl6-j -e'say "foo"'
14:37 psch Error: Could not find or load main class perl6
14:37 psch granted, maybe r-m has that solved..?
14:37 moritz nope
14:37 moritz rakudo isn't relocatable
14:38 psch and since C: is the mostly likely partition to exist...
14:38 titsuki joined #perl6
14:38 viki Well, what do you guys mean by "relocatable"? I meant that it doesn't force people to install to %HOME_DRIVE%:\rakudo\bin on Windows, not that you can move it anywhere ya want after you do
14:38 user9 joined #perl6
14:38 psch viki: well, it isn't relocatable after being compiled
14:38 viki Ah
14:39 psch and the .msi only unpacks it
14:39 psch afaiu
14:39 viki Yeah, the installer just says "Imma install stuff there" and no option to change anything
14:40 psch right, and since we probably don't want to package all the compile dependencies into the msi, someone builds it and makes an msi that unpacks the precompiled installation
14:40 ___crlz___ joined #perl6
14:40 viki :(
14:41 kalkin- Ohh, it looks like there is no general consents on which pod blocks are generated when. p6doc default formatted doesn't generate text for method parameters, Pod::To::Markdown skips  randomly methods and documentation
14:42 kalkin- I assume that the perfect POD Viewer would render all the documentation which does not start with #\s ?
14:42 kalkin- right?
14:42 kalkin- At least this is the impression i get from reading S26
14:43 * viki shrugs
14:44 viki the #'() stuff looks more like something for auto-doc-generators Doxygen-like stuff rather than Pod renderer. At least that's what they feel to me, since they're "attached" to bits of code
14:44 viki Just rendering them without rendering adjascent code may not prove useful
14:44 DrForr I use them pretty extensively as block commenets.
14:44 DrForr *comments
14:45 kalkin- viki: yeah that one also needs to be skipped. I use it for LICENSE headers in my files
14:46 viki You could ask ShimmerFairy, I recall they were heavily into Perl 6 pod stuff, so they would know all the details
14:46 viki .seen ShimmerFairy
14:46 yoleaux I saw ShimmerFairy 18 Oct 2016 04:22Z in #perl6: <ShimmerFairy> m: say "CEF" ~~ /<+alpha - [Ff]>+/
14:47 timotimo but #`() isn't even pod
14:48 viki Ah, OK :)
14:49 kalkin- Intersting if i hook in to the render method of Pod::To::Markdown and print out the ast, I'm missing elements, like the previously discussed pod in a subroutine parameter
14:50 kalkin- may be sub foo(#|{ ASD } $asd ) { $asd.say } isn't the right way to document parameters? may be there is another indented way?
14:50 kalkin- or is it a bug in perl6 --doc ?
14:51 viki kalkin-: but is #|{ ... } Pod at all?
14:52 timotimo that stuff at least gets attached to methods/subs/parameters/... via the .WHY
14:54 ZzZombo method FALLBACK ($name,|c) will capture everything after $name, so I can forward it to another routine?
14:54 ZzZombo like foo |c;
14:54 viki ZzZombo: yup, foo(|c)
14:54 viki It's a Capture
14:54 viki huggable: Capture
14:54 huggable viki, Argument list suitable for passing to a Signature: https://docs.perl6.org/type/Capture
14:55 kalkin- ahh I see it's not a bug
14:55 kalkin- You have to query the ast elements for the data
14:55 kalkin- at least this is what i read from Pod::To::Markdown
14:56 timotimo well, pod makes a tree-like structure
14:59 zakharyas joined #perl6
14:59 kalkin- if I have a Pod::Block::Declarator, i need to ask it for his .WHEREFORE, check if it's a Method, then check the signature parameters for .WHY
14:59 kalkin- (check the .WHY of the signature parameters)
14:59 timotimo ah
14:59 timotimo that makes sense, yeah
15:00 viki m: say WHY "Life, the Universe and Everything":
15:00 camelia rakudo-moar 080630: OUTPUT«42␤»
15:00 viki ^_^
15:01 kalkin- It would be nice if the AST which is provided to render would already have this kind of information, so that the renderer doesn't need to have a lot of custom logic, but I don't know how it will fit in to general Pod
15:01 ufobat joined #perl6
15:01 kalkin- viki: ^^
15:02 viki kalkin-: are you saying I should watch for a PR from you to improve Rakudo's Pod stuff? :)
15:04 viki It's probably all here: https://github.com/rakudo/rakudo/blob/nom/src/core/Pod.pm
15:04 kalkin- viki: I'm not sure if this needs to be patched
15:04 viki Oh, OK.
15:05 rindolf joined #perl6
15:06 kalkin- I don't understand Pod enough to make the decision if the current behavior is intended, or if Pod::Block::Declarator should by default encapsulute information of it's .WHEREFORE
15:07 foreignFunction joined #perl6
15:07 * viki doesn't know anything about Pod
15:07 foreignFunction Hi there.
15:07 viki foreignFunction: \o
15:08 foreignFunction Why does dir().iterator.count-only throw "Method 'count-only' not found for invocant of class '<anon|140689890204704>'"?
15:08 viki s: dir(), 'iterator', \()
15:08 SourceBaby viki, Sauce is at https://github.com/rakudo/rakudo/blob/080630c/src/core/Seq.pm#L52
15:08 timotimo count-only isn't necessary to be implemented
15:09 kalkin- may be i should patch the default pod renderer to show pod doc on method parameters, so people start using it, so we can have a better discussion about handling it in a year or two
15:09 foreignFunction But why is it not implemented for sequence returned from dir?
15:09 foreignFunction *dir()
15:10 viki Well, it doesn't seem to implemented on other Seqs either:
15:10 viki m: (1, 2 … 3).iterator.count-only.say
15:10 camelia rakudo-moar 080630: OUTPUT«No such method 'count-only' for invocant of type '<anon|456463536>'␤  in block <unit> at <tmp> line 1␤␤»
15:10 kalkin- wasn't the default renderer Pod::To::Text? I can't find the module for it
15:11 kalkin- ohh i see it's part of rakudo now
15:11 viki kalkin-: it's part of standard Rakudo modules: https://github.com/rakudo/rakudo/blob/nom/lib/Pod/To/Text.pm6
15:11 foreignFunction Uncool. How do I do what I intended, then?
15:11 foreignFunction (and why isn't there some kind of default implementation?)
15:12 gfldex foreignFunction: count-only is not defined in Iterable
15:12 gfldex foreignFunction: it may even be a leaking implemenation detail
15:12 gfldex m: say +dir();
15:12 camelia rakudo-moar 080630: OUTPUT«54␤»
15:13 kalkin- I think i just need to patch this subroutine https://github.com/rakudo/rakudo/blob/7af9ec9d90d4ec8e9732e979729df85a80f7ec11/lib/Pod/To/Text.pm6#L114 to include the WHY of parameters in the output
15:13 gfldex if count-only is called or not is up to Rakudo to decide
15:13 timotimo there is no default implementation for count-only because count-only existing is a flag for "can we get the number of things in it without actually calculating anything?"
15:13 timotimo a default implementation would probably be "calculate everything and count it"
15:13 timotimo which goes against what the method is meant for
15:14 foreignFunction gfldex: ah, so I am not supposed to call it?
15:14 user9 joined #perl6
15:14 foreignFunction Or use the Iterator methods directly at all?
15:14 viki foreignFunction: well, what were you trying to do exactly? Just get the number of files?
15:15 timotimo you're not supposed to use iterator methods directly, no.
15:15 timotimo only if you have very, very, very specific things you want to do with iterators
15:15 user9 joined #perl6
15:15 viki m: dir.elems.say
15:15 camelia rakudo-moar 080630: OUTPUT«54␤»
15:17 gfldex Rakudo will call count-only whenever possible
15:17 pierre_ joined #perl6
15:21 foreignFunction Okay, I've got this. I was sure I've tried dir().elems and it didn't work, but it works now, so it seems that I did something wrong the first time.
15:21 viki \o/
15:22 viki It returns a Seq, which does Cool, so along with using .elems you can just use it in numeric context to get the number of elements.
15:24 canopus joined #perl6
15:25 kalkin- Is it possible to shorten even more this statement: $foo ?? $foo !! 'NO FOO';
15:25 jnthn $foo || 'NO FOO'
15:26 kalkin- omg, yes of course. thanks jnthn
15:27 viki :)
15:32 timotimo NO SOUP FOR YOU
15:33 CIAvash joined #perl6
15:33 FROGGS joined #perl6
15:34 pierre_ joined #perl6
15:35 lucasb_ joined #perl6
15:36 lucasb_ m: Mu.Str
15:36 camelia rakudo-moar 080630: OUTPUT«Use of uninitialized value of type Mu in string context.␤Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful.␤  in block <unit> at <tmp> line 1␤»
15:37 [Coke] Wenzel P. P. Peppmeyer ?
15:37 lucasb_ just a nitpick... suggesting ".say" there is strange, because it is different from the others
15:37 viki [Coke]: it's gfldex
15:37 lucasb_ .say doesn't return a stringified version of the object
15:39 [Coke] gfldex: you just committed some sample code with "fortytwo" in it. Can you pick a different word so I don't have to whitelist the wrong way to spell forty-two?
15:39 timotimo right, it does read strangely
15:39 timotimo but it *is* helpful to also have .say in the suggestion
15:40 gfldex [Coke]: will do
15:40 [Coke] (or if forty-two works there, even better.)
15:41 viki haha, lucasb_ just made my prediction come true :)
15:41 [Coke] gfldex++
15:41 gfldex m: sub f(Int :$i){}; f :i<forty-two>;
15:41 camelia rakudo-moar 080630: OUTPUT«Type check failed in binding to $i; expected Int but got Str ("forty-two")␤  in sub f at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
15:41 lucasb_ viki: what prediction?
15:42 viki lucasb_: That time would come when we'd bikeshedding that warning again. (that was when I commited a fix to it last time and was ranting about that we don't have any "standard" for what errors/warnings are supposed to look like)
15:42 dalek doc: 6687e2d | gfldex++ | doc/Type/Signature.pod6:
15:42 synopsebot6 Link: http://doc.perl6.org/type/Signature
15:42 dalek doc: make spell checker happy
15:42 dalek doc: review: https://github.com/perl6/doc/commit/6687e2dbe2
15:43 [Coke] \o/
15:43 * [Coke] wonders he is now code named, "spell checker". :)
15:44 lucasb_ viki: sorry for the bikeshedding :D but, indeed, a standard on how to write the warnings/errors would be very interesting
15:45 lucasb_ for example, IMO, I really don't like to see newline characters inside those messages
15:45 lucasb_ see "perl6 -v"
15:45 viki Interesting
15:45 lucasb_ "\n" implementing Perl 6.c.
15:45 viki I, on the other hand, do. Otherwise, on my 1440p monitor they'd all be in 1 line
15:46 viki Well, yeah, perl6 -v is weird :)
15:47 gfldex -v may be processed by a non-human and they tend not to care much for newlines.
15:48 rindolf joined #perl6
15:48 gfldex i need to find 4 more doc-holes to fill the 600 commits before the year ends
15:49 viki Why 600?
15:49 gfldex because it's a nice round number
15:49 viki m: say 1337-1137
15:49 camelia rakudo-moar 080630: OUTPUT«200␤»
15:49 jnthn 600 doc commits total, or 600 by you? :)
15:49 FROGGS o/
15:49 viki Get 200 more and you'll have 1337 commits in a year :)
15:49 gfldex by me
15:49 jnthn gfldex++ # so commit!
15:50 gfldex total is at 5082 since it was created
15:50 gfldex that's a lot of man-hours
15:52 viki jnthn alone made 5,911 commits to rakudo since it was created :o
15:53 viki that's a lot of... superman-hours :)
15:54 viki I wish there were an easy way to see how many contributions you made to all repos in an organization
15:54 optikalmouse joined #perl6
15:57 jnthn viki: That's...quite a few :)
15:57 jnthn I think if you add NQP, Rakudo, and MoarVM I'm into 5 figures by now.
15:57 timotimo ah, figures.
16:01 kalkin- left #perl6
16:01 kalkin- joined #perl6
16:05 viki kalkin-: how can I generate what your PR produces?
16:06 viki kalkin-: I've tried with ./perl6 --doc=Text -e 'sub foo(#|{ Just some ASD param } $asd ) { $asd.WHY.say }'
16:06 viki but I get same output from normal Perl 6 and from your patch :/
16:18 zakharyas joined #perl6
16:24 ___crlz___ hi all!
16:25 ___crlz___ need help. i'm trying to compile rakudo-star-2016.10
16:25 ___crlz___ compilation stops with this message:
16:25 ___crlz___ == Installing modules for MoarVM
16:25 ___crlz___ cd modules/panda && sh -c "PATH=/usr/bin:/root/coding/dmd2/linux/bin32/:/root/.rakudobrew/bin/:/root/coding/Nim/bin/:/root/perl5/bin/:/opt/bin:/usr/local/sbin:/usr/local/bin:/sbin:/usr/sbin:/bin:/usr/bin /tmp/SBo/package-rakudo-star/usr/bin/perl6-m bootstrap.pl"
16:25 ___crlz___ Unhandled exception: While looking for '/usr/share/perl6/runtime/perl6.moarvm': no such file or directory
16:25 ___crlz___ Makefile:65: recipe for target 'modules-install-m' failed
16:25 ___crlz___ make: *** [modules-install-m] Error 1
16:27 moritz ___crlz___: have you intentionally configured rakudo star with prefix /usr/share ?
16:28 ___crlz___ i type:
16:28 ___crlz___ $ perl Configure.pl --prefix=/usr --backend=moar --gen-moar --gen-nqp
16:28 ___crlz___ $ make
16:28 ___crlz___ $ make DESTDIR=/tmp/SBo/package-rakudo-star
16:28 timotimo ah
16:28 timotimo i think rakudo star hasn't gotten the treatment for being destdir-aware yet?
16:29 ilmari ___crlz___: shouldn't the last one be 'make install DESTDIR=...'?
16:29 timotimo mst: what's the status of your patches for the makefile/configure stuff?
16:30 wamba joined #perl6
16:30 ___crlz___ ilmari, yes a made a typo
16:30 ___crlz___ here, not in terminal)
16:33 timotimo i personally would recommend against installing rakudo into the system like that. but i'm not up to date on how our makefiles and such behave
16:33 ___crlz___ timotimo, if so then how do I install in a specific directory?
16:33 timotimo i have --prefix=/home/me/perl6/install for example
16:34 stmuk_ is rakudo itself destdir-aware?
16:34 timotimo i think so
16:34 viki Yup.
16:35 timotimo does configure.pl also have to see the destdir for things to work right?
16:37 viki No idea. I just recall there was a DESTDIR issue with one of the releases and I had to do a point release after we fixed it... so that means it is DESTDIR-aware :)
16:37 viki I think it worked with just DESTDIR
16:38 viki (not making configure aware of anything)
16:39 timotimo ok
16:39 TEttinger joined #perl6
16:41 sufrostico joined #perl6
16:41 viki If I built both moarvm and jvm backends, can I tell it to re-build only jvm after I make source change?
16:42 timotimo make j-install
16:43 viki Thanks
16:47 skids joined #perl6
16:47 mohae joined #perl6
16:49 * viki has a newfound respect for psch and bartolin ....
16:50 viki This stuff's taking ages to compile!
16:50 wamba joined #perl6
16:52 [Coke] it's a bear, aye
16:53 brillenfux joined #perl6
16:53 * viki wonders how long bears take to compile...
16:53 timotimo are they a clang-bear, or a gcc-bear?
17:02 domidumont joined #perl6
17:02 kyclark_ joined #perl6
17:06 AlexDani` joined #perl6
17:23 acrussell_ joined #perl6
17:42 araujo joined #perl6
17:42 araujo joined #perl6
17:47 TEttinger worst compile times I ever had were trying out MLton, a Standard ML compiler. about 10 minutes for Hello World, admittedly on 2007 or so hardware
17:47 TEttinger it's a whole-program optimizing compiler, which apparently is a valid excuse
17:48 pierre_ joined #perl6
17:49 viki 10 minutes to optimize Hello World? :D
17:49 geekosaur whole-program includes the standard library, which if it's not split up could mean a lot of compiling/optimizing unnecessary code
17:50 TEttinger there was no unoptimized compilation at the time, I think? that I believe was only on the first compile since it needed to check where in the library hello world called, so what geekosaur said
17:52 sufrostico joined #perl6
17:58 lichtkind joined #perl6
18:02 vendethiel joined #perl6
18:04 ugjka joined #perl6
18:11 nowan joined #perl6
18:14 labster joined #perl6
18:22 zakharyas joined #perl6
18:34 sufrostico joined #perl6
18:40 ugjka joined #perl6
18:45 dp[m] joined #perl6
18:51 kalkin- viki: I ran  ./perl6 -Ilib --doc=Text foo.pm6
18:52 kalkin- with foo containing: #| Hahaha
18:52 kalkin- sub foo( #|{ Asd  } $ads ) {
18:52 kalkin- $ads.say
18:52 kalkin- }
18:53 wamba joined #perl6
18:54 viki kalkin-: and what was the output?
18:54 kalkin- sub foo(
18:54 kalkin- $ads, # Asd
18:54 kalkin- )
18:54 kalkin- Hahaha
18:54 kalkin- class $ads
18:54 kalkin- Asd
18:55 viki lemme fire up my VM and rebuild..
18:57 kalkin- The current default behaviour of Pod::To::Text is to skip printing out the anything related to subroutine if it doesn't have pod attached to it
18:57 kalkin- I probably should also supress the ouput of the signature pod
18:58 kalkin- Or may be there should be a more sensible default behavior for cases when there is no subroutine documentation but documentation on signagure elements
19:00 kalkin- IMHO Pod::To::Text should print all the exported methods/subroutines, even if they do not have any documentation attached
19:08 viki What I don't get is wtf it prints "class $ads
19:08 viki Asd
19:08 viki "
19:08 viki At the end. (and it's not your change, it was like that before)
19:09 viki Seems to think #|{ ... } is used for classes or something?
19:11 viki kalkin-: what's the fix for trailing commas look like? I rather leave the trailing commas in that add overly-complex code to avoid them
19:11 viki s/that/than/;
19:13 kalkin- just join on(,) after that add the parameters documentation and join on \n
19:13 kalkin- I just need to fix me EDITOR first
19:14 kalkin- s/me/my
19:18 Tonik joined #perl6
19:20 cdg_ joined #perl6
19:21 viki but it'd have to know if it's the last item, won't it? :)
19:21 * viki shuts up and waits...
19:27 viki m: sub pt { join ",", $^p.perl, ($_ ?? " # $_" !! "" given $p.?foo) }; ("foo", class { method foo { "MEOWS" } }, "moos").map(&pt).join("\n").chop.say
19:27 camelia rakudo-moar 17604e: OUTPUT«"foo",␤<anon|78647312>, # MEOWS␤"moos"␤»
19:27 viki \o/
19:29 kalkin- Ohh this is even smarter, my current solution tries to check if the current element is the last one
19:30 kyclark_ joined #perl6
19:32 El_Che ugexe: if you have the time, I have a problem when installing zef as a user (trying to write to a system location even when zef was installed with -install-to=home: https://gist.github.com/nxadm/853c962539121ab7e9e85005b6e886be
19:33 arnsholt Implementing join yourself is a useful learning exercise for this kind of stuff
19:33 arnsholt I prefer to print the first one and then print $separator$item from 1..*
19:35 viki In this case that would fail, 'cause in some cases the separator must go in the middle of $item :)
19:35 viki And preferrably the sub that generates $item doesn't need to be told whether or not it's generating the last item
19:43 kalkin- viki: your algo chops always of the last char
19:44 kalkin- (or may be I misunderstood it)
19:45 viki kalkin-: yeah, it always chops the last char and that last char is always a comma
19:45 viki .oO( or is it! Tun-tun-taaaaaann )
19:45 viki m: sub pt { join ",", $^p.perl, ($_ ?? " # $_" !! "" given $p.?foo) }; ().map(&pt).join("\n").chop.say
19:45 camelia rakudo-moar 17604e: OUTPUT«␤»
19:45 viki seems ok
19:49 viki kalkin-: oh, right,  my algo is crap :D
19:49 viki heh
19:49 pierre_ joined #perl6
19:49 viki m: sub pt { join ",", $^p.perl, ($_ ?? " # $_" !! "" given $p.?foo) }; ("foo", class { method foo { "MEOWS" } }).map(&pt).join("\n").chop.say
19:49 camelia rakudo-moar 17604e: OUTPUT«"foo",␤<anon|74735568>, # MEOW␤»
19:49 viki fail
19:52 lichtkind_ joined #perl6
19:53 ___crlz___ joined #perl6
19:56 kalkin- i think just passing a boolean to param2text would be simpler
19:57 viki m: sub pt { [$^p.perl, ($_ ?? " # $_" !! "" given $p.?foo)] }; say (|.[^(*-1)]».join(", "), .[*-1].join).join: "\n" given ("foo", class { method foo { "MEOWS" } }, "moos").map(&pt)
19:57 camelia rakudo-moar 17604e: OUTPUT«"foo", ␤<anon|66662512>,  # MEOWS␤"moos"␤»
19:57 viki Perfect amount of insanity :)
19:57 * viki still votes on leaving the trailing comma in
19:58 kalkin- ++1
19:58 viki Ok, then I'm merging :)
19:58 kalkin- perfect
19:59 viki done
19:59 kalkin- awesome thanks
19:59 viki kalkin-++ thank you!
20:01 dmaestro joined #perl6
20:06 kalkin- how would i go to switching my rakudo to nom with rakudobrew? Beside using rakudobrew tripple nom 2016.10 2016.10
20:06 kalkin- or is the tripple command the right one?
20:07 kalkin- AFAIK build only accept the backend type right?
20:07 eisen74 joined #perl6
20:07 geekosaur it's two steps actually. you build it with one, and rakudobrew select to specify which is default
20:07 geekosaur er rakudobrew switch
20:08 kalkin- yeah right
20:08 geekosaur hm, but that is choosing a branch you are talking about? or just the backend?
20:09 kalkin- the branch of rakudo
20:11 TimToady joined #perl6
20:11 viki kalkin-: `rakudobrew build moar` build HEAD
20:11 viki *builds HEAD
20:12 viki of nom branch
20:12 bjz_ joined #perl6
20:15 vike joined #perl6
20:15 kalkin- viki: thanks
20:16 kalkin- could the whole stack rakudo + moarvk + nqp be build without perl5? currently i know there are some perl5 dependencies, how important are they?
20:17 [Coke] it's theoretically possible. you'd have to replace it with some other thing that is available at configure time, though.
20:17 viki our Configure.pl is a Perl 5 script
20:17 kalkin- ic, thanks
20:18 [Coke] easier to depend on perl 5 so we can focus on perl 6.
20:18 kalkin- Coke: I understand completely, :)
20:20 [Coke] need 14 more slots filled on advent. I think folks are still hoping for a special day 1 post - mine is just there for a placeholder, but will include one paragraph on "hey, it's our first year" if needed.
20:22 kalkin- Why is it that perl6 programms on error output the Usage with the whole path prefixed with a hash to it?
20:22 kalkin- As far as I remmeber zef (or was it panda) had an empty MAIN for just printing the Usage which is readable
20:23 viki Yeah, it's LTAness :)P
20:23 kalkin- The Usage which is output on error is so long that it's unusable
20:23 kalkin- viki:?
20:23 viki The PRO argument is that you don't know where the thing actually is so saying "run blah whatever" may not actually work.
20:24 viki But in reallity: the output is unreadable :)
20:24 viki m: sub MAIN ($) {}
20:24 camelia rakudo-moar 689da7: OUTPUT«Usage:␤  <tmp> <Any> ␤»
20:24 viki well, it's cheating here
20:24 viki And it really affects installed binaries, dunnit?
20:24 kalkin- you can always print the whole path as a fallback
20:25 kalkin- also printing the whole path for _every_ subcommand doesn't make any sense at all
20:25 viki What do you mean as a fallback? Fallback to waht?
20:25 kalkin- fallback if you can't resolve any meaningful name
20:25 cdg joined #perl6
20:26 kalkin- even just printing the hash should be enough, because you know where your perl6 resources are
20:26 kalkin- something like $PERL6_RESSOURCES/$HASH would probably be enough
20:27 kalkin- The easiest solution would be to print the path only once. Something like this:
20:27 kalkin- Usage:
20:27 kalkin- LONG PATH
20:27 kalkin- -option1
20:27 kalkin- -option2
20:28 kalkin- Should i make a patch for that?
20:28 * kalkin- is on fire!
20:29 viki kalkin-: but how would that look for positional args?
20:29 viki Ironically, when I actually try to use the giant path, I'm getting a bash error:
20:29 viki bash: /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/resources/3DD33EF601FD300095284AE7C24B770BAADAF32E: Permission denied
20:30 viki 'cause you gotta use perl6 blah blah
20:30 kalkin- I would separate it
20:30 kalkin- Options:
20:30 kalkin- - op1
20:30 kalkin-
20:30 kalkin- POSITINAL FIELDS:
20:30 kalkin- $FOO
20:30 kalkin- @BAR
20:31 perlpilot kalkin-: yuck.
20:31 kalkin- I have something similar to the output of pythons argeparse in mind
20:32 kalkin- python prog.py -h
20:32 kalkin- usage: prog.py [-h] [--sum] N [N ...]
20:32 kalkin- Process some integers.
20:32 kalkin- positional arguments:
20:32 kalkin- N           an integer for the accumulator
20:32 kalkin- optional arguments:
20:32 kalkin- -h, --help  show this help message and exit
20:32 kalkin- --sum       sum the integers (default: find the max)
20:33 perlpilot kalkin-: and with subcommands?  (which are constant "positional fields")
20:33 viki kalkin-: and would the output be a mile long when you have a bunch of multies, like here: https://gist.github.com/zoffixznet/7a09ee86345f8e262b60fb84b9dfcf4a
20:33 [Coke] kalkin-: maybe gist that. :)
20:33 [Coke] viki: "multis"
20:34 [Coke] (only because I've made that edit several times to the doc site"
20:34 * [Coke] wonders of (" is a valid quote pair. :)
20:34 kalkin- This is output of one of command using argparse with subcommands https://gist.github.com/anonymous/98380b7a23e44538a68d531cacc5b708
20:35 kalkin- viki: your command line interface sucks, :D. I don't think any one in it's right mind would wright a command like that. I had too look twice at it to see the argument differences
20:35 kalkin- :)
20:36 viki That's not true. zef has similar assortiment of commands.
20:36 viki The point wasn't in their names, but in the presence of multiple ways to call the script.
20:37 viki Here's zef's Perl 6 generated usage if you toss the giant filename with the sha hash in it: https://gist.github.com/zoffixznet/f1208f68b534bbc41871f2fd87f1c85c
20:37 pyrimidine joined #perl6
20:38 viki And from what I undestand your proposal, *each line* in that output would be at least a screen long, because *for each of those multies* you'll ve listing the POSITIONAL FIELDS and the rest of the stuff
20:38 kalkin- viki in your case I would it to generate something like this this foo --meows=<Any> --foos=<Any> ABC [CZE|CDE]
20:38 kalkin- hmm
20:38 perlpilot kalkin-: If you can make it better, please submit a PR to do so.  The worst that can happen is that no one likes it.
20:39 viki yeah :)
20:39 kalkin- zef's case where I'm having multiple subcommands the proper way for the interaction is to allow to pass --help to each of this subcommands
20:39 kalkin- this is how git and many more do
20:40 viki FWIW, yes, the giant "/home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/resources/3DD33EF601FD300095284AE7C24B770BAADAF32E" in the Usage is very LTA and isn't helpful and makes the rest of the output unreadable... But, I'm fine with the rest of the output, even if I've not witnessed much of it
20:41 viki I wonder if that installation knows the original name the script was installed under and whether that can be queued up
20:41 kalkin- may be before rewriting the whole output it would be enough to print the program path once on a line belove "Usage:" and keep the rest as it is?
20:41 perlpilot kalkin-: also, an alternative auto-usage-generator would make a nice advent article  ;)
20:42 kalkin- perlpilot: last time i spoke about this topic here i got a similar hint :D
20:42 kalkin- I will think about it :)
20:44 viki kalkin-: yeah, maybe print the file once, then on new line, indent and show all options. Like this: https://gist.github.com/zoffixznet/c61e30315336a791c95ec8f6e93cecaf
20:44 viki Altough, on smaller screens those lines would wrap around and make it hard to see where one calling varian ends and other starts
20:44 * viki shrugs
20:44 perlpilot viki: yucl.
20:44 perlpilot er, yuck
20:44 viki haha :)
20:45 perlpilot I'd rather not ever see those long paths unless I've somehow asked for them.
20:46 viki What would you like to see instead?
20:46 viki https://gist.github.com/zoffixznet/0a2af23ebeeae20db7eb2ff4f8191261 ?
20:46 viki With "command" being literal... same for all scripts
20:46 ugexe El_Che: you have to `--install-to=home` for your `zef install Readline` command, or modify the config 'DefaultCUR" : ["site"]' to home (or inst#/my/target)
20:46 perlpilot viki: yes
20:47 viki Seems very unorthodox
20:47 * kalkin- doesn't care
20:47 kalkin- both seem ok
20:48 kalkin- I mean most of the time i know what command i run, and also there is always which foo
20:48 viki I wonder how much of that stuff is bolted down with roast
20:48 kalkin- that's what your shell is for
20:48 ugexe El_Che: you can also put a copy the config to $*HOME.child('.zef/config.json') combined with modifying DefaultCUR to have per-user settings
20:50 mspo joined #perl6
20:50 wamba joined #perl6
20:50 * viki doesn't see any giant shas or any other script names in https://github.com/perl6/roast/blob/master/S06-other/main-usage.t
20:50 ugexe the shas only show up because of the wrappers that get installed
20:51 viki kalkin-: FWIW, out of all the examples we've seen so far, I'd be +1 only on the one with the literal "command" but I still think it's unperfect.
20:52 kalkin- I'm ok with literal “command”, but what would your perfect solution look like?
20:52 viki In fact, "unperfect" is the perfect word for it... You kinda know what it means, but it's off :)
20:52 perlpilot What does "non-technical write up" mean for Advent Dec 24?   Is that "Perl 6 is awesome.  Here's where we are and here's what lies ahead..." ?
20:53 viki kalkin-: what's perfect... no idea... I could say what I typed on the terminal, which is somewhat true currently, but looks like crap for long pahts
20:53 ugexe the wrapper gets the original bin name, so bin/foo is just a wrapper that invokes /home/perl6/install/site/resource/salksjdfalkewjoj. MAIN_USAGE then prints the full path of this because bin/foo is shadowed in PATH
20:53 * viki relocates
20:54 AlexDani` joined #perl6
20:55 ugexe otherwise if you install 2 versions of a distribution with bin/foo, which one gets invoked with `foo`? if the newer one should be chosen and the older one ignored, then when you actually directly invoke the older one the help command would be lying to you
20:55 avalenn joined #perl6
20:56 kalkin- So should i print the full path to the binary?
20:56 ugexe there is no right answer >:)
20:57 kalkin- Or may be change "Usage:\n" to "Usage for command $LONGPATH:\n"
20:57 mspo kalkin-: how can you reliably know the full path to a binary?
20:57 mspo I mean really know
20:58 kalkin- mspo: I mean the same thing what currently is printed on each line
20:58 ugexe i think the easiest way would be to show the root directory once towards the top, and the filename/command everywhere else
20:58 kalkin- i think its $*PROGRAM-NAME currently
20:59 wamba1 joined #perl6
20:59 kalkin- ugexe: … the easiest way would be to show the root directory once towards the top … ← how do you mean this
21:00 mspo I mean it's not possible to 100% reliably show a full path of a running command in unix
21:01 ugexe kalkin-: for instance "ROOT: /home/nickl/.rakudobrew/moar-2016.06/install/share/perl6/site/resources/ .. USAGE: 5307F92100F994360D0C5D2C7F46DABA38C42FC4 --help"
21:02 kalkin- ugexe: yuck! it leaves all the rakudobrew users with long meaningless stuff in front of the option
21:03 zakharyas joined #perl6
21:03 ugexe yep. no way around that
21:03 kalkin- why don't do just `which my-perl6-command`?
21:04 kalkin- I mean yes it wouldn't be the actual command if there are wrappers around it, but still...
21:04 ugexe well the wrappers are the entire problem
21:04 kalkin- btw why wrappers and not symlinks?
21:04 kalkin- because of windows?
21:04 ugexe because the wrappers can invoke different versions
21:05 kalkin- You can just change the symlink to the bin directory to the proper version
21:05 ugexe and they also allow you (if you know how) to precompile your bin script by giving them a perl6 entry point to the precompiled code
21:05 kalkin- (when you execute rakudobrew switch)
21:05 ugexe you can install zef:ver<1.0> and zef:ver<2.0> into a single perl6 install
21:05 ugexe thats 2 different versions of the same bin/ script
21:06 ugexe now what?
21:06 kalkin- ok what would be executed normall if i call zef?
21:06 kalkin- s/normall/normally/
21:06 kalkin- ver 1 or 2? currently the wrapper would need to solve the same issue
21:07 kyclark_ joined #perl6
21:07 ugexe you send it --version=whatever or it choses the first one it finds
21:08 ugexe what probably needs to happen is a way for wrappers to pass in the original filename (the filename of the wrapper itself) to the actual script they invoke (which would then be shown in the USAGE)
21:08 kalkin- ugexe: i would assume that if i call zef --version it would be parsed by zef not by some wrapper, or am i wrong, and it currently implements the behaviour you explained?
21:08 dmaestro m: say so "\c[EM DASH]" ~~ /<:Line_Break<Break_Both>>/
21:08 camelia rakudo-moar 689da7: OUTPUT«False␤»
21:08 ugexe kalkin-: no it is parsed by the wrapper and yes this is not good
21:09 dmaestro m: say so "\c[EM DASH]" ~~ /<:Break_Both>/
21:09 camelia rakudo-moar 689da7: OUTPUT«True␤»
21:09 ugexe https://github.com/rakudo/rakudo/blob/nom/src/core/CompUnit/Repository/Installation.pm#L55
21:09 dmaestro m: say so "A" ~~ /<:Break_Both>/
21:09 camelia rakudo-moar 689da7: OUTPUT«True␤»
21:09 ugexe --name --auth and --ver all get removed by the wrapper
21:09 dmaestro What is going on here with Unicode property matching? I haven't been able to get what I want at all.
21:09 ugexe so if you install a script that requires one of those it will never get passed the argument
21:10 kalkin- left #perl6
21:10 kalkin- joined #perl6
21:11 kalkin- can't the information which version, author & Co to use for a module be stored in an environement variable?
21:11 kalkin- Because actually it's the information about your run time ENVIRONMENT
21:11 viki perlpilot, not at all! It's a story about sisters Meg and Lo who live in Perlandia. Lo "knows" there's no Santa and tries to prove it to younger Meg. Why does Santa only grant wishes for toys but not the real problems of Perlandia... Then something exciting happens and they find themselves on a journey! They meet a... um... odd elf who enjoys hunting buggers in the Bugger field, and then they get captured by
21:11 viki the Core Spinners... will they be OK? Find out on Dec 24!
21:12 kalkin- This is how i would handle such case in the shell normally. Let the shell set some ENV_VAR depending on the `pwd` and on execution an alias which stores the path to the right version is set
21:13 kalkin- so for zef i would expect rakudo to create (similar to how python is handled :D) zef → zef.2, zef1 & zef2
21:14 kalkin- your shell will pick the right version depending on your requirments
21:14 ugexe but perl6 isn't python, and our versions / filenames can contain all sorts of non-filesafe stuff
21:15 cdg joined #perl6
21:15 kalkin- ugexe: how you actually encode the binary -> to actual CompUnit(is this the right jargon?) should be part of logic of rakudobrew
21:16 kalkin- rakudobrew list bin zef should list all the available zef symlinks and their actual Perl6 version/auth/name combination
21:16 dmaestro How does one properly match a character based on a multi-valued Unicode property?
21:16 dmaestro say so "\c[EM DASH]" ~~ /<:Line_Break<Break_Both>>/
21:16 dmaestro m: say so "\c[EM DASH]" ~~ /<:Line_Break<Break_Both>>/
21:16 camelia rakudo-moar 689da7: OUTPUT«False␤»
21:16 kalkin- or am I bikeshading?
21:17 ugexe well rakudobrew should not have anything to do with precompilation
21:17 cdg_ joined #perl6
21:17 mspo is zef overtaking panda?
21:17 ugexe it could figure out every version of zef that is installed though
21:19 [Coke] m: say "\c[EM DASH]".ord;
21:19 camelia rakudo-moar 689da7: OUTPUT«8212␤»
21:20 hankache joined #perl6
21:21 dmaestro Using Inline::Perl5 with Unicode::UCD I do this:
21:21 dmaestro > say charprops_all("\c[EM DASH]".ord)<Line_Break> Break_Both
21:22 kalkin- so the general consensus on the whole zef/symlink/path length debacle is that removing wrappers from rakudobrew wouldn't be a bad idea?
21:23 [Coke] m: say "\c[EM DASH]".uniprop("Line_Break");
21:23 camelia rakudo-moar 689da7: OUTPUT«BK␤»
21:23 dmaestro m: say so "\c[EM DASH]" ~~ /<:Line_Break<BK>>/
21:23 camelia rakudo-moar 689da7: OUTPUT«True␤»
21:24 ugexe perl6 -MZef::Client -MZef::Config -e '.say for Zef::Client.new(config => Zef::Config::parse-file(Zef::Config::guess-path)).list-available().grep(*.dist.?scripts).map: { qq|{.dist.identity} -> {.dist.scripts.values.join(",")}| };'
21:24 dmaestro m: say so "A" ~~ /<:Line_Break<BK>>/
21:24 camelia rakudo-moar 689da7: OUTPUT«True␤»
21:24 ugexe kalkin-: ^ for instance, running that will list each version of a module and the bin/script-name it provide
21:24 perlpilot viki: Well ... as long as it's a good story that features Perl 6 ...  :-)
21:24 dmaestro m: say so "A" ~~ /<:BK>/
21:24 camelia rakudo-moar 689da7: OUTPUT«True␤»
21:25 [Coke] dmaestro: What is Break_Both? trying to find it in the 9 spec somewhere, but I'm a n00b.
21:25 hankache good evening #perl6
21:25 kalkin- ugexe: but  rakudo knows nothing about zef, so it can't use it to resolve the path
21:26 kalkin- I mean it would be nice if instead of literal “command” it would be something like “Zef::Cli::ver<123>”
21:26 dmaestro coke: It is a value of the line break property, like BA (Break_After), BB (Break_Before), etc.
21:26 [Coke] ;ah, and it's B2, whereas we have BK here.
21:26 dmaestro I want to use these, but can't seem to get anywhere in Perl6 ....
21:27 dmaestro coke: yeah, that's a clue ...
21:28 [Coke] can you point at something in the 9 spec that indicates that [EM DASH] is supposed to have B2?
21:30 dmaestro Code: Afraid not from any Perl6 spec; I find it in perl5 Unicode::UCD, though.
21:30 dmaestro I thought I found it in the 5 spec: Properties with arguments are passed as the argument to the pair:
21:31 dmaestro <:East_Asian_Width<Narrow>>     <:!Blk<ASCII>>
21:31 [Coke] dmaestro: not the perl 6 spec, the unicode 9 spec.
21:31 dmaestro Those don't seem to work exactly, either.
21:31 kalkin- so rakudobrew is just a big perl5 script o_O
21:32 dmaestro Oh, http://unicode.org/reports/tr14/#DescriptionOfProperties
21:32 kalkin- I bet it can be replaced by plain shell script
21:32 kalkin- .o0(What can go wrong?)
21:32 dmaestro coke: I've tried all the permutations I can think of ;-)
21:32 [Coke] (I'm trying to figure out the format on https://raw.githubusercontent.com/MoarVM/MoarVM/master/src/strings/unicode_db.c so I can see if we're trying to add that property.)
21:33 ugexe kalkin-: you dont "need" zef to do that, its just easier
21:33 ugexe m: say $*REPO.repo-chain.grep(*.?prefix.?e).map(*.prefix).map(*.child("dist")).grep(*.e).map(*.IO.dir.grep(*.IO.f).Slip).map({Rakudo::Internals::JSON.from-json($_.IO.slurp)}).map({.<name> ~ " -> " ~ .<ver> // .<version>}).join(", ")
21:33 camelia rakudo-moar 689da7: OUTPUT«CORE -> 6.c␤»
21:33 mspo kalkin-: get rid of perl5 from the perl6 bootstrap instead
21:33 ugexe star-m: say $*REPO.repo-chain.grep(*.?prefix.?e).map(*.prefix).map(*.child("dist")).grep(*.e).map(*.IO.dir.grep(*.IO.f).Slip).map({Rakudo::Internals::JSON.from-json($_.IO.slurp)}).map({.<name> ~ " -> " ~ .<ver> // .<version>}).join(", ")
21:33 camelia star-m 2016.10: OUTPUT«File::Find -> 0.1, Shell::Command -> *, JSON::Fast -> 0.4, File::Which -> *, panda -> 2016.02, XML::Writer -> *, SVG -> *, SVG::Plot -> *, Terminal::ANSIColor -> *, Test::Mock -> *, Grammar::Profiler::Simple -> 0.01, Grammar::Debugger -> *, MIME::Base64 -> 1.2…»
21:33 labster joined #perl6
21:35 kalkin- So replace the literal “command” with the proper module name <auth> version combination?
21:35 [Coke] dmaestro: pinged the moarvm folks to figure out the process for pulling data from the unicode spec for inclusion in moar, so I can make sure we're looking at that page.
21:35 ugexe kalkin-: rakudobrew *was* a shell script at one time
21:36 ugexe no, you would have to use that to create a rakudobrew wrapper to call the perl6 wrapper with some --vers --auth extracted from that
21:36 viki perlpilot, yeah, it's all a reflection on how throughout the past year folks voiced concerns over Perl 6 being slow, or buggy, or unpopular, or poorly marketed... And how those problems are exacerbated beyond what they really are and how the work of volunteers may be muted by time but is quite incredible... At least that's my exploration of the story as a writer.... The pharmaceuticals I'm abusing while
21:37 viki writing may make the parallels non-obvious to the reader :)
21:39 kalkin- ugexe: but you still would need to have short and meaningful paths to the wrappers no matter how the wrappers will work
21:41 ugexe kalkin-: you can cheat aroudn that https://github.com/rakudo/rakudo/blob/nom/src/core/CompUnit/Repository/Installation.pm#L86 by setting `my $env = $*ENV; $env<PATH> = join(":", $bin-script-path, $env<PATH>); run(..., :$env)`
21:41 ugexe by making sure the actual script path is not shadowed via putting it at the front of PATH for the instance run() executes
21:41 kalkin- ugexe: but wouldn't that break some users expectations about $*ENV?
21:42 ugexe like i said, there is no right answer
21:43 mniip_ joined #perl6
21:46 ugexe remember earlier i mention a possible solution is allowing the wrapper to pass this in - this is along those same lines. However the real solution would create different var (RAKUDO_BIN_PATH or some such) and then MAIN_USAGE would have to be updated to check PATH *after* RAKUDO_BIN_PATH (with the expectation that RAKUDO_BIN_PATH is only meant to be a single use thing and users should not be manually setting
21:46 ugexe it)
21:47 domidumont joined #perl6
21:49 ___crlz___ joined #perl6
21:55 ugexe or make the rakudobrew shim rename its bin/ directory to bin-bak/ immediately after being invoked, and renaming it back $x seconds later >:)
21:56 ugexe nothing can go wrong
21:56 [Coke] dmaestro: near as I can figure, we parse the PropertyValueAliases.txt which tells us what a B2 is, but we don't parse the LineBreak.txt, which tells us which characters have it.
22:00 dmaestro coke: I've found that most other properties can be recognized as either present or not, but trying to drill down on multivalued properties is hard - I wish the syntax shown in https://design.perl6.org/S05.html was working, but it doesn't seem to at all.
22:00 lichtkind__ joined #perl6
22:00 [Coke] dmaestro: those are ancient design docs.
22:00 dmaestro I understand, was just hoping ;-)
22:00 [Coke] you can only rely on what you see in roast.
22:00 [Coke] ah, ok.
22:01 [Coke] please feel free to open a rakudo ticket. Having dug this far, I might be able to patch MoarVM to add this info.
22:02 dmaestro Yeah, I'll probably consider that - thanks for the help.
22:07 [Coke] dmaestro: might be an easier fix than I anticipated (diakopter++)
22:10 bjz joined #perl6
22:12 kyclark_ joined #perl6
22:15 labster bisectable6: old=2016.10 my $v = rx/foo/; say("foobar" ~~ $v); say("foobar" ~~ /foo/)
22:15 bisectable6 labster, Bisecting by output (old=2016.10 new=689da7a) because on both starting points the exit code is 0
22:15 bisectable6 labster, bisect log: https://gist.github.com/347cf40a6b5abdc7feb2e3efaeeff330
22:15 bisectable6 labster, (2016-10-27) https://github.com/rakudo/rakudo/commit/5ac593ee098f204ea69ef57edd9ae0925c544ea4
22:17 labster Oh cool, thanks for the fix lizmat++.  Now to just add a test and close RT#127071.
22:17 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=127071
22:23 firstdayonthejob joined #perl6
22:25 viki labster: that's a dupe. There are already tests for that bug
22:25 viki labster: oh, now I remember. I thought there weren't a ticket. But the tests are there
22:25 seatek joined #perl6
22:26 viki labster: https://github.com/perl6/roast/commit/839566cfd6991d4f86af8f5d4bda38381fdfe75e
22:28 labster bisectable6: old=2016.10 my $r = rx/a/; my $a = "a" ~~ $r; say $a; say $/
22:28 bisectable6 labster, Bisecting by output (old=2016.10 new=689da7a) because on both starting points the exit code is 0
22:28 bisectable6 labster, bisect log: https://gist.github.com/6b22d4bff38e975147ba77091e2094d3
22:28 bisectable6 labster, (2016-10-27) https://github.com/rakudo/rakudo/commit/5ac593ee098f204ea69ef57edd9ae0925c544ea4
22:28 labster The $/ part of the ticket isn't tested, though.
22:29 viki ¯\_(ツ)_/¯ it tests the cause of the bug.
22:31 labster yeah, that's probably tested elsewhere.
22:32 kurahaupo__ joined #perl6
22:34 mohae_ joined #perl6
22:47 cooper_ joined #perl6
22:54 espadrine joined #perl6
22:59 firstdayonthejob joined #perl6
22:59 Vynce joined #perl6
23:03 cdg joined #perl6
23:05 itcharlie joined #perl6
23:15 pyrimidine joined #perl6
23:19 trnh joined #perl6
23:19 trnh joined #perl6
23:23 kurahaupo__ joined #perl6
23:35 kyclark_ joined #perl6
23:38 Vynce joined #perl6
23:44 samcv as a sidenote of my change viki, perl6 REPL no longer enters a streaming loop of error messages if it can't find readline library version 6 but still shows an error message, just only one time, and falls back
23:44 samcv that is nice
23:46 samcv it used to spew a stream of error messages never actually going into REPL if Readline failed
23:46 pyrimidine joined #perl6
23:49 samcv oh also what's the best way to install a perl 6 module from a directory? if i want to try and get the Readline library to fallback to some version other than version 6, since that's hardcoded in, and doesn't work for readline 7 without editing it
23:53 samcv hmm nice looks like i can just do: `zef install .` cool :)
23:56 pyrimidine joined #perl6

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

Perl 6 | Reference Documentation | Rakudo