Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-06-21

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:10 BenGoldberg joined #perl6
00:17 mcmillhj joined #perl6
00:29 lookatme joined #perl6
00:29 lookatme morning
00:33 mcmillhj joined #perl6
00:36 BenGoldberg m: sub foo( &bar (Int) ) { say "bar(): ", bar(42) }; foo( -> Int $a { $a * 2 } );
00:36 camelia rakudo-moar b45612: OUTPUT: «Too few positionals passed to 'foo'; expected 1 argument but got 0 in sub-signature of parameter &bar␤  in sub foo at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
00:36 awwaiid joined #perl6
00:36 BenGoldberg I seem to be unable to count today.  I see one argument, not zero arguments.
00:37 timotimo m: sub foo( &bar:(Int) ) { say "bar(): ", bar(42) }; foo( -> Int $a { $a * 2 } );
00:37 camelia rakudo-moar b45612: OUTPUT: «bar(): 84␤»
00:37 BenGoldberg :?
00:37 timotimo yes :
00:37 BenGoldberg Thanks timotimo++
00:38 timotimo &bar (Int) is syntax for "i want &bar to unpack to something that has one positional paramer that's an Int"
00:46 BenGoldberg Ok, but now I'm differently confused:
00:47 BenGoldberg m: sub foo( &bar:(Int --> Int) ) { say bar(42) }; dd &foo.signature.params[0].sub_signature;
00:47 camelia rakudo-moar b45612: OUTPUT: «Any␤»
00:47 BenGoldberg m: sub foo( &bar (Int --> Int) ) { say bar(42) }; dd &foo.signature.params[0].sub_signature;
00:47 camelia rakudo-moar b45612: OUTPUT: «:(Int $ --> Int)␤»
00:47 BenGoldberg Without the :, sub_signature returns something like a subroutine's signature.
00:47 BenGoldberg With the :, it's missing.
00:47 awwaiid joined #perl6
00:48 BenGoldberg Hmm, nevermind, I understand.
00:50 lookatme m: sub foo( &bar (Int --> Int) ) { say bar(42) }; dd &foo.signature.params[0]
00:50 camelia rakudo-moar b45612: OUTPUT: «Parameter &bar = &bar (Int $ --> Int)␤»
00:50 lookatme m: sub foo( &bar:(Int --> Int) ) { say bar(42) }; dd &foo.signature.params[0]
00:50 camelia rakudo-moar b45612: OUTPUT: «Parameter &bar = &bar where { ... }␤»
00:52 mcmillhj joined #perl6
00:52 bpmedley joined #perl6
00:56 awwaiid joined #perl6
01:02 Cabanossi joined #perl6
01:03 awwaiid joined #perl6
01:09 awwaiid joined #perl6
01:10 unop joined #perl6
01:14 BenGoldberg What's the easiest way to upgrade rakudo on windows?   Reinstall?
01:14 Actualeyes joined #perl6
01:15 awwaiid joined #perl6
01:16 lookatme I think so, do we have other way to do it ?
01:18 BenGoldberg The reason I ask is I'm trying to create a modified NativeCall.pm6, and it makes more sense to base it on the most up-to-date version.
01:20 BenGoldberg Now that I think of it, I should probably (learn to) use git, check out the entire source, do tests, etc.
01:20 BenGoldberg I think I'll be better off learning this sillyness under wsl bash, instead of command.com
01:21 timotimo github offers a "github for windows" tool that's quite nice
01:21 timotimo it also comes with a "git bash" or something?
01:22 BenGoldberg For reasons which now seem stupid, I chose to make my usename on my computer "Ben (user)" ... many naive tools don't work, due to the spaces in the path.
01:23 timotimo they ought to be robust enough to handle it
01:23 timotimo though of course you'll have to put quotation marks when you're using cmd.exe
01:24 BenGoldberg No, the quotation marks also need to go around "ought to" ;)
01:24 cpage_ joined #perl6
01:25 timotimo :)
01:26 BenGoldberg From within the linux subsystem, my badly chosen "C:\Users\Ben (User)\..." is close enough to invisible to not matter.
01:27 awwaiid joined #perl6
01:28 BenGoldberg So, what's the first step for git to download from https://github.com/rakudo/rakudo ?  Would I be better off asking this on #git ?
01:29 timotimo github will show you a "clone url", there's a button for that near the top right of the repo's view
01:29 timotimo it's green, it says "clone or download"
01:29 kurahaupo BenGoldberg: usually "git clone $url $targetdir"
01:29 timotimo targetdir is optional, it'll use the basename of the git repo if you say nothing
01:29 kurahaupo true
01:30 mcmillhj joined #perl6
01:30 mr-foobar joined #perl6
01:30 BenGoldberg Doing 'git clone https://github.com/rakudo/rakudo' ...
01:30 unop joined #perl6
01:31 Cabanossi joined #perl6
01:32 * BenGoldberg wonders what's the point of Checking Connectivity *after* it's just downloaded everything.
01:38 geekosaur it's building local indexes of how commits, branches, tags, etc. relate to each other
01:40 BenGoldberg After cloning, how do I compile and test?
01:46 awwaiid joined #perl6
01:46 BenGoldberg I see, there's an INSTALL.txt ...
01:48 ilbot3 joined #perl6
01:48 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
01:50 rouking joined #perl6
01:50 rouking Hello peeps
01:51 rouking What does the "is rw" attribute do when applied to a subroutine parameter?
01:51 awwaiid joined #perl6
01:52 ugexe perl Configure.pl --gen-nqp --gen-moar and then nmake test
01:53 ugexe vs2013 cross tools command prompt - i use this instead of cmd.exe as it has the visual studio compiler stuff in the path which rakudo needs to build
01:54 rightfold rouking: the caller will observe reassignment that occur in the caller
01:54 rightfold in the callee*
01:55 rouking_ joined #perl6
01:55 MasterDuke m: sub a($b is rw) { $b = 2 }; my $c = 0; say $c; a($c); say $c
01:55 camelia rakudo-moar b45612: OUTPUT: «0␤2␤»
01:55 rouking_ Okay, just got dc'd for some eason
01:56 rouking_ Thanks
01:57 BenGoldberg So, attempting to compile and install on wsl bash, and got this familiar looking error message:
01:58 BenGoldberg Cleaning up ...
01:58 BenGoldberg Err
01:58 BenGoldberg /home/goldbb/rakudo/install/bin/moar: error while loading shared libraries: libmoar.so: cannot enable executable stack as shared object requires: Invalid argument
01:59 * BenGoldberg only really silly people type stuff which starts with a directory path in IRC without putting /say in front.
01:59 lookatme BenGoldberg, this need some tweak on dynamic lib
02:00 BenGoldberg Yeah, I guessed that -- I think that the tweak should be part of the build process.
02:00 MasterDuke BenGoldberg: there's some command to run that will fix that. i believe it hasn't been added to the build process because upstream (microsoft) is going to fix the root problem eventually
02:01 geekosaur http://linux.die.net/man/8/execstack
02:01 lookatme BenGoldberg, Separate install MoarVM first
02:02 BenGoldberg How do I do that, with Configure.pl --something?
02:03 MasterDuke quotable6: execstack
02:04 awwaiid joined #perl6
02:04 quotable6 MasterDuke, https://gist.github.com/cd1b62f802eb262492dc29182bf077a9
02:04 lookatme just `sudo execstack -c /mnt/opt/rakudo-star-2016.11/lib/libmoar.so`
02:05 BenGoldberg The only things in /mnt/ are c d and e
02:05 lookatme Try that command After you install MoarVM over
02:06 lookatme `*/libmoar.so`
02:06 lookatme sorry
02:06 BenGoldberg How do I install MoarVM?
02:07 MasterDuke were you trying to build rakudo with --gen-moar?
02:07 lookatme enter nqp/MoarVM, separate compile MoarVM
02:08 MasterDuke ^^^ what he said
02:09 lookatme And when you success install MoarVM, remove --gen-moar from rakudo install command: perl Configure.pl --gen-nqp
02:10 BenGoldberg No suitable nqp executables found! Please specify some --backends, or a --prefix that contains nqp-{p,j,m} executables
02:12 MasterDuke --backends=moar
02:12 lookatme Try this `perl Configure.pl --gen-nqp --backends=moar`
02:12 BenGoldberg Ok, I think this is working... (maybe)
02:12 lookatme Oh, :)
02:13 BenGoldberg Things are compiling, anyway.
02:15 BenGoldberg On a vaguely unrelated note, here's something interesting:
02:15 BenGoldberg m: use NativeCall; my $errno_rw := cglobal(Str, "errno", CArray[int32]).AT-POS(0); my $errno_r := cglobal('libc.so.6', 'errno', int32); say $errno_r; ++$errno_rw; say $errno_r;
02:15 camelia rakudo-moar b45612: OUTPUT: «2␤3␤»
02:23 lookatme awesome, I think NativeCall document said that it's not support write global variable yet
02:24 BenGoldberg Which is silly, since if you support writable arrays, thenyou support writable global data, simply by treating it as an array with one item in it.
02:25 noganex joined #perl6
02:32 Cabanossi joined #perl6
02:47 mcmillhj joined #perl6
02:53 awwaiid joined #perl6
03:02 Cabanossi joined #perl6
03:03 awwaiid joined #perl6
03:08 Actualeyes left #perl6
03:09 mr-foobar joined #perl6
03:09 geekosaur joined #perl6
03:16 Ben_Goldberg joined #perl6
03:19 robinsmidsrod joined #perl6
03:44 Cabanossi joined #perl6
03:50 kurahaupo_ joined #perl6
03:54 awwaiid joined #perl6
03:54 andrei_ joined #perl6
03:57 andrei_ How can I get a list of all methods in an object, like   dir(x)   in Python ?
03:59 BenGoldberg m: say Int.^methods;
03:59 camelia rakudo-moar b45612: OUTPUT: «(Int Num Rat FatRat abs Bridge chr sqrt base polymod expmod is-prime floor ceiling round lsb msb narrow Range atanh sign asech sin tan atan2 acosech truncate asinh conj acosh pred asec cosec acotan cosh acos acosec sech unpolar log exp roots cotan sinh t…»
03:59 BenGoldberg andrei_, Is that what you meant?
04:01 awwaiid joined #perl6
04:03 andrei_ Yes, this is what I wanted.  Is there any logic in figuring out such things, or should I just RTFM ?
04:03 BenGoldberg Perl6 tries to name things fairly obviously.  But the manual definitely helps ;)
04:04 andrei_ Method starting with ^ means what?
04:05 BenGoldberg A method starting with ^ is called on the meta-object for the object.
04:06 BenGoldberg m: say Int.HOW.methods(Int)
04:06 camelia rakudo-moar b45612: OUTPUT: «(Int Num Rat FatRat abs Bridge chr sqrt base polymod expmod is-prime floor ceiling round lsb msb narrow Range atanh sign asech sin tan atan2 acosech truncate asinh conj acosh pred asec cosec acotan cosh acos acosec sech unpolar log exp roots cotan sinh t…»
04:06 BenGoldberg It's equivilant to what I just typed above, but naturally shorter.
04:08 andrei_ Nice. I will go read about meta-objects
04:09 BenGoldberg Just in case I decide to give up on compiling and testing rakudo (which I'd really prefer to do before doing a pull-request), my modified NativeCall.pm6 can be seen here <https://gist.github.com/BenGoldberg1/599eb2cb4a89db8ca7e3709e252c4568>, including several variants of cglobal, with Proxy objects whose STORE actually does something useful.
04:10 BenGoldberg andrei_, Here's a good start: https://docs.perl6.org/language/mop
04:14 Cabanossi joined #perl6
04:25 mr-foobar joined #perl6
04:46 Actualeyes joined #perl6
04:49 mr-foobar joined #perl6
04:51 andrei_ m: say Str.^method_table{'trim'}.signature
04:51 camelia rakudo-moar b45612: OUTPUT: «(Str:D $: *%_)␤»
04:51 andrei_ m: say Str.^method_table{'split'}.signature
04:51 camelia rakudo-moar b45612: OUTPUT: «(Mu $: | is raw)␤»
04:51 andrei_ Why I cannot get the signature for   split   method of strings ?
04:54 curan joined #perl6
04:57 b2gills m: say Str.^method_table{'split'}.candidates.map: *.signature
04:57 camelia rakudo-moar b45612: OUTPUT: «((Str:D $: Regex:D $pat, $limit is copy = Inf;; :$v is copy, :$k, :$kv, :$p, :$skip-empty, *%_) (Str:D $: Cool $match;; :$v is copy, :$k, :$kv, :$p, :$skip-empty, *%_) (Str:D $: Cool $match, $limit is copy = Inf;; :$v is copy, :$k, :$kv, :$p, :$skip-empt…»
04:57 b2gills You got the signature for the proto method
04:59 andrei_ WOW
05:01 astj joined #perl6
05:03 andrei_ why typing     p6doc Method.signature     responds  No documentation found for method 'signature'    ?
05:14 Cabanossi joined #perl6
05:16 xtreak joined #perl6
05:20 espadrine joined #perl6
05:29 astj joined #perl6
05:43 wamba joined #perl6
05:44 lowbro joined #perl6
05:44 lowbro joined #perl6
05:44 cpage_ joined #perl6
05:56 xinming joined #perl6
06:00 moritz .tell andrei_ p6doc Code.signature works; it's not smart enough to walk the inheritance hierarchy
06:00 yoleaux moritz: I'll pass your message to andrei_.
06:04 astj joined #perl6
06:04 astj joined #perl6
06:07 andrzejku joined #perl6
06:13 Cabanossi joined #perl6
06:31 xtreak joined #perl6
06:32 moritz is there a way I can inspect the declarative prefix of a regex that's used for LTM?
06:37 andrzejku joined #perl6
06:39 ufobat joined #perl6
06:39 Entonian joined #perl6
06:44 parv joined #perl6
06:45 moritz also, S05 talks about PEG tie breakers, including: 2) Longest token matching: food\s+ beats foo by 2 or more positions
06:45 moritz and later says
06:45 moritz Note that in this case, a character class is not treated the same as an alternation.
06:45 moritz All character classes are considered too generic to include in a longest literal string.
06:46 moritz oh, this is about tie breaker 3
06:47 moritz so character classes *are* part of the LTM declarative prefix that's parsed by an NFA, right?
07:01 moritz it seems rakudo does not implement the tie breaker that prefers literals over char classes
07:01 moritz m: say 'abc' ~~ /$<one>=[a\w] | $<two>=[ab]/
07:01 camelia rakudo-moar b34237: OUTPUT: «「ab」␤ one => 「ab」␤»
07:03 TEttinger m: say 'abc' ~~ / $<one>=[ab] | $<two>=[a\w]/
07:03 camelia rakudo-moar b34237: OUTPUT: «「ab」␤ one => 「ab」␤»
07:03 TEttinger seems to just prefer order there
07:12 abraxxa joined #perl6
07:20 [ptc] joined #perl6
07:24 konsolebox joined #perl6
07:36 breinbaas joined #perl6
07:41 domidumont joined #perl6
07:47 domidumont joined #perl6
07:59 zakharyas joined #perl6
08:01 mcmillhj joined #perl6
08:08 jonas1 joined #perl6
08:12 mcmillhj joined #perl6
08:20 dakkar joined #perl6
08:23 |oLa| joined #perl6
08:29 pmurias joined #perl6
08:31 mcmillhj joined #perl6
08:41 mcmillhj joined #perl6
08:41 robertle joined #perl6
08:43 tbrowder cschwenz: have you looked at all the meta data? i tried but didn't see anything like that
08:51 scimon joined #perl6
08:52 mcmillhj joined #perl6
08:52 scimon Morning all.
08:54 scimon I'm having a weird issue with Travis integration in my new (terrible) Perl6 module that I'm writing while finishing up my notice period.
08:54 scimon zef is installing modules and then the test suite isn't finding them.... though I may have a thought on why.
08:55 scimon (Wondering if it's the PERL6LIB ENV var clashing with use lib). Hmmm.
08:56 parv interesting reply about perl6 being slower than perl5: https://www.reddit.com/r/perl6/comments/6hagwm/performance_concern_with_respect_to_gnu_yes/
08:56 scimon Anyone got any thoughts on what I can poke?
08:59 scimon (Interesting @parv)
09:00 parv scimon, you may find other interestings things at https://p6weekly.wordpress.com/2017/06/19/2017-25-perl-6-books/
09:00 scimon I'm keeping an eye on the books
09:01 zengargoyle scimon: have a link for the module to peek at the travis file?
09:04 * zengargoyle notices YAPC videos are going up.  new Damian vim talk probably means i'll be fiddling with my vim config again. :)
09:08 parv i would have preferred append() to just flatten any & all arrays unlike in "examples/append_2_arrays.pl6" (http://perl6maven.com/push-vs-append-on-arrays-in-perl6).
09:23 AlexDaniel joined #perl6
09:24 ChoHag joined #perl6
09:29 Cabanossi joined #perl6
09:31 Actualeyes left #perl6
09:32 scimon https://travis-ci.org/Scimon/Statico/jobs/245271957 (Sorry Standup)
09:36 mscha joined #perl6
09:38 mscha Quick question: when using multiple promises (as in for ^10 { @promises.push: start { ... } }), is it possible to limit the number of simultaneous threads?  Or is this by definition running 11 threads (10 + the main one) simultaneously?
09:39 robertle I think it is running the promises on the default thread pool, which has a number of threads depending on RAKUDO_MAX_THREADS or so and your hardware
09:40 robertle it may also low-cap the number of threads from your hardware to 16
09:41 geekosaur joined #perl6
09:49 mscha robertle: that seems to work, thanks.  Do you know if there's an in-script way to set max-threads, apart from setting an environment variable?
09:53 geekosaur joined #perl6
09:54 mscha m: CurrentThreadScheduler.max_threads = 3;
09:54 camelia rakudo-moar b34237: OUTPUT: «No such method 'max_threads' for invocant of type 'CurrentThreadScheduler'␤  in block <unit> at <tmp> line 1␤␤»
09:54 mscha m: CurrentThreadScheduler.max-threads = 3;
09:54 camelia rakudo-moar b34237: OUTPUT: «No such method 'max-threads' for invocant of type 'CurrentThreadScheduler'␤  in block <unit> at <tmp> line 1␤␤»
09:54 mscha :-(
09:56 rindolf joined #perl6
09:58 jameslenz joined #perl6
10:02 scimon joined #perl6
10:02 parv mscha, apparently you could specify while creating ThreadPoolScheduler: https://docs.perl6.org/type/ThreadPoolScheduler
10:02 eveo joined #perl6
10:05 eveo scimon: that's weird. Wonder if that's some breakage in recent zef/rakudo
10:05 eveo parv: that response is outdated. Just yesterday .say got 55% faster
10:07 eveo mscha: set $*SCHEDULER = ThreadPoolScheduler.new: :42max_threads
10:07 mscha joined #perl6
10:08 eveo mscha: set $*SCHEDULER = ThreadPoolScheduler.new: :42max_threads
10:08 parv eveo, ok
10:09 mscha eveo: thanks, exactly what I needed.
10:10 eveo Or rather my $*SCHEDULER
10:11 mscha Why max_threads, though?  Doesn't Perl 6 usually use kebab-case?
10:11 parv how could i modify the following to remove empty lines?
10:11 parv m: ThreadPoolScheduler.^methods.map( { .perl ~~ /max/ ?? .perl !! [] } ).sort.join( "\n" )
10:11 camelia rakudo-moar 30619e: ( no output )
10:11 parv m: say ThreadPoolScheduler.^methods.map( { .perl ~~ /max/ ?? .perl !! [] } ).sort.join( "\n" )
10:11 camelia rakudo-moar 30619e: OUTPUT: «␤␤␤␤␤␤method max_threads (ThreadPoolScheduler $: *%_) { #`(Method|44882008) ... }␤submethod BUILD (ThreadPoolScheduler $: Int :initial_threads($!initial_threads) = 0, Int :max_threads($!max_threads) = { ... }, *%_ --> Nil) { #`(Submethod|44…»
10:12 parv i thought Nil would do better than [] but that just produces warning messages.
10:13 eveo mscha: the things you shouldn't really touch use snake case
10:14 mscha Ah, makes sense.
10:14 eveo parv: what are you trying to do?
10:15 parv print only those .perl output that have "max" in them
10:15 eveo m: .say for ThreadPoolScheduler.^methods».perl.grep(/max/).sort
10:15 camelia rakudo-moar 30619e: OUTPUT: «method max_threads (ThreadPoolScheduler $: *%_) { #`(Method|43558728) ... }␤submethod BUILD (ThreadPoolScheduler $: Int :initial_threads($!initial_threads) = 0, Int :max_threads($!max_threads) = { ... }, *%_ --> Nil) { #`(Submethod|43559640) ... }␤»
10:18 Geth ¦ doc: 13e0fc442a | (Jan-Olof Hendig)++ | doc/Type/Blob.pod6
10:18 Geth ¦ doc: Link to utf8-c8
10:18 Geth ¦ doc: review: https://github.com/perl6/doc/commit/13e0fc442a
10:19 parv eveo, thanks. is there not a perl6 construct that would  cause no output similar to in perl 5 of "empty list" that collapses to nothing. e.g. map { 2 > $_ ?  $_ : () }  (...) -- to print numbers only less than 2.
10:23 * parv misabused the quotes there. sorry.
10:24 DarthGandalf joined #perl6
10:25 eveo parv: Empty
10:25 eveo m: say ThreadPoolScheduler.^methods.map( { .perl ~~ /max/ ?? .perl !! Empty } ).sort.join( "\n" )
10:25 camelia rakudo-moar 30619e: OUTPUT: «method max_threads (ThreadPoolScheduler $: *%_) { #`(Method|60475480) ... }␤submethod BUILD (ThreadPoolScheduler $: Int :initial_threads($!initial_threads) = 0, Int :max_threads($!max_threads) = { ... }, *%_ --> Nil) { #`(Submethod|60476392) ... }␤»
10:25 eveo Which is an empty Slip
10:25 eveo huggable: Slip
10:25 huggable eveo, A kind of List that automatically flattens into an outer container: https://docs.perl6.org/type/Slip
10:26 parv eveo, huggable: oh, sweet! thanks much.
10:29 Cabanossi joined #perl6
10:30 parv i cannot tell if doc changes for "Routines supplied by" Mu or Any for the class they are supplied to. also, is there really a need to repeat such doc for a class that is not Any or Mu?
10:32 eveo scimon: no idea why your travis fails. Just re-ran mine and it succeeded. Looking at the commands, they're pretty much the same: https://travis-ci.org/zoffixznet/perl6-WWW except mine does install without --depsonly. Trying another run with --depsonly now: https://travis-ci.org/zoffixznet/perl6-Proc-Q
10:32 eveo parv: all classes are Mu
10:34 parv eveo: say there is class A. Then there is B which is also A. Does B need to have full doc of methods of A, not just a pointer to that doc?
10:35 scimon Thanks eveo
10:35 scimon I am confused. It WAS working and then it... stopped.
10:35 scimon But running the tests locally is fine.
10:36 eveo parv: why not? Why would I need to follow a pointer somewhere instead of just looking at all the methods? This is entirely just a presentation problem. The methods aren't re-documented, those pages are assembled during site generation
10:37 mcmillhj joined #perl6
10:38 eveo Especially since some classes don't override an ancestor's method but just add more candidates. So without listing them all on the same page, you're jumping through hoops trying to find all the candidates
10:38 parv eveo: agree about presentation problem.
10:39 eveo By problem I meant a "thing" I don't consider the current presentation problematic, other than having atrocious typography.
10:40 parv oh. in that case, we just disagree (have no opinon abiut typography)
10:42 * parv curses typos
10:42 parv on that note, time to go is here ...
10:47 eveo scimon: nope, still works fine (other than two flopping tests): https://travis-ci.org/zoffixznet/perl6-Proc-Q Here's my travis file; note that it doesn't have the `script` line and uses the default script from perl6 language, although it's basically the same as yours: https://github.com/zoffixznet/perl6-Proc-Q/blob/master/.travis.yml
10:47 eveo scimon: maybe try catching ugexe and ask for opinion? They're the author of zef
10:47 scimon I'll try. I'll keep poking it.
10:48 eveo \o
10:48 eveo left #perl6
10:53 lowbro joined #perl6
10:53 lowbro joined #perl6
10:56 zengargoyle scimon: pretty much what eveo said.  i noticed your travis link on `zef install --debug --depsonly .` stopped after the 'Filtering' steps and never did the Testing an Install phase of the depsonly modules.  not sure what the glitch is though.
10:57 scimon Might it be one of the deps?
10:57 zengargoyle did you use the --debug after having problems?
11:00 * zengargoyle has never used either --debug or --depsonly.  i usually just do `zef --verbose install .` and let zef test/install deps and test/install the dist, and then let the empty script: default to the prove command.  (this actually i guess runs the module tests twice...)
11:03 timotimo PSA, the p6profiler-graphviz tool now understands the newer sql profile output names
11:06 timotimo wow, this one has a moiree pattern to it
11:07 timotimo http://hack.p6c.org/~timo/moiree_graph.png
11:08 scimon I originally had --depsonly and added --debug
11:08 travis-ci joined #perl6
11:08 travis-ci Doc build errored. Jan-Olof Hendig 'Link to utf8-c8'
11:08 travis-ci https://travis-ci.org/perl6/doc/builds/245305365 https://github.com/perl6/doc/compare/1bbf3a880f5e...13e0fc442ade
11:08 travis-ci left #perl6
11:09 scimon I'll try various options and see what happens.
11:10 scimon going to try --verbose --/test . (to skip the testing in zef and test in the test stage)
11:11 zengargoyle i had a working travis fail a couple of days ago.  just a minor bug between the 'latest' rakudo and zef for a day.  it can be a bit of a problem when the standard-ish travis basically builds the very latest of everything and can fail for mysterious temporary reasons that somebody fixes by the next day. :)
11:12 scimon (Looks like the issue is YAMLish, when I took that out of META6.json zef built all the things.)
11:12 scimon Cheers.
11:15 zengargoyle cool.  but a bit weird. :)
11:18 scimon I think the travis that mi6 made was --depsonly --/test I modified that because I wasn't sure what it was doing.
11:19 scimon Hopefully soon I can get back to writing bad Perl6 code instead. And possibly documenting it.
11:28 araraloren joined #perl6
11:29 araraloren evening
11:34 scimon Ciao.
11:35 scimon Ok so that didn't work. First up going to try picking the 2017.06 build rather than latest.
11:42 nebuchadnezzar m: ($a, @c, $b) = 1..5; say "\$a = '$a', \$b = '$b', \@c = '{@c}'"
11:42 camelia rakudo-moar 30619e: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Variable '$a' is not declared␤at <tmp>:1␤------> 3(7⏏5$a, @c, $b) = 1..5; say "\$a = '$a', \$b␤»
11:42 nebuchadnezzar m: my ($a, @c, $b) = 1..5; say "\$a = '$a', \$b = '$b', \@c = '{@c}'"
11:42 camelia rakudo-moar 30619e: OUTPUT: «Use of uninitialized value $b of type Any 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␤$a = '1', $b = '', @c = '2 3 4 5'␤»
11:43 timotimo yeah, we don't have support for that
11:43 scimon hmmm that's kind of what I would expect.
11:43 scimon Lists are slurpy.
11:43 zengargoyle scimon: hrmmm, my simple test with YAMLish as a dep and `--verbose install .` just worked....
11:43 nebuchadnezzar scimon: looks like ;-)
11:43 scimon I think it hates me. That's the next most obvious option.
11:44 Cabanossi joined #perl6
11:44 scimon nebuchadnezzar from a Perl5 perspective that's 100% what I'd expect to happen.
11:45 nebuchadnezzar I don't remember how it was in Caml, but I liked the pattern matching
11:45 timotimo if you use := there it's different
11:46 timotimo but i still believe you can't have backtracking
11:46 timotimo hm, however
11:46 timotimo m: my ($a, @b (:tail($c))) = 1..5; dd $a, @b, $c
11:46 camelia rakudo-moar 30619e: OUTPUT: «Int $a = 1␤Array @b = [2, 3, 4, 5]␤Mu␤»
11:46 timotimo nope.
11:48 scimon zengargoyle: https://travis-ci.org/Scimon/Statico/jobs/245327549 Sigh.... Hmmmm. Something Something dark side.
11:48 scimon I think I shall return to it post lunch.
11:48 scimon If it's not something people have seen before I'll poke at it and if I work it out I'll tell people.
11:51 timotimo only works for attributes or with custom .Capture
12:08 timotimo i just saw SPVM, it might be interesting to compare performance between rakudo/moar and spvm for calculation tasks
12:08 raschipi joined #perl6
12:11 Ulti found a great niche for Perl 6, Apache Spark with the perf of Scala and ease of programming of the Python version
12:11 yoleaux 9 Jun 2017 17:21Z <eveo> Ulti: Sent some PRs to fix BioInfo breakage: https://github.com/MattOates/BioInfo/pulls
12:11 Ulti wuh oh
12:13 raschipi eveo is Zoffix
12:15 Ulti how do I leave messages for later?
12:18 Ulti but also thats awesome eveo++ for the how to do Slangs with back compat too
12:18 Ulti I had a gist with my failed attempt for ages
12:18 moritz .tell Ulti like this
12:18 yoleaux moritz: I'll pass your message to Ulti.
12:19 Ulti .tell eveo Thanks so much for the slang commit, I've applied your changes
12:19 yoleaux 12:18Z <moritz> Ulti: like this
12:19 yoleaux Ulti: I'll pass your message to eveo.
12:20 * Ulti is currently learning Scala, I'm not sure I like it :< I really want to though
12:20 eveo joined #perl6
12:20 raschipi Ulti: If you write "Zoffix" in the message, ZofBot will deliver it to him as a github message
12:20 eveo And raschipi is Fhantomas!
12:20 yoleaux 12:19Z <Ulti> eveo: Thanks so much for the slang commit, I've applied your changes
12:20 eveo m: class pop {}; my ($a, *@b, pop() :$c = @b) := |(1..5); dd $a, @b, $c
12:20 camelia rakudo-moar 30619e: OUTPUT: «1␤[2, 3, 4]␤Int $c = 5␤»
12:21 eveo Hahaha :)
12:21 eveo (don't actually use that; it will stop working eventually)
12:21 timotimo haha
12:24 eveo left #perl6
12:34 mr-fooba_ joined #perl6
12:36 Util The Perl 6 BOF was great last night!
12:36 Util https://github.com/dcbpw/tpc-2017-dc/wiki
12:37 perlpilot joined #perl6
12:39 eiro joined #perl6
12:47 mcmillhj joined #perl6
12:49 moritz so, what did you talk about there?
12:59 unop joined #perl6
13:07 Util moritz: We do not have as good a record of *that* :)
13:08 Util Off the top of my head:
13:08 Util * whether we need a 6->5 tool or docs (the Pythonistas at OSCON said they were surprised at the need for a 3->2 tool). [No]
13:08 Util * whether we need a new doc indexing all the symbols, for another kind of lookup [maybe not, since the docs site search tool is great]
13:08 Util * The problem with `eqv` defaulting to "compare the .perl strings" [*lots* of discussion of the depth of the issue, and possible fixes; ctilmes plans to write one of the fixes for review]
13:08 Util * The not-introspectability of Junctions, since bduggan's talk showed him having to run a regex against the .perl of a Junction to get at its single value [probably just fix the MAIN options parser to not use Junctions]
13:08 Util * The need to document module management, or at least move mentions of `zef` closer to a brand-new user on the Docs site [Actually, it is probably OK; lembark may review]
13:08 Util * The need for videos.perl6.org, maybe providing the same kind of self-population as modules.perl6.org. [Instead, maybe just move Resources->Screencasts to its own page off of the home page]
13:08 Util * Semi-Planning for a Perl 6 Hackathon [most participants are in Dominus' class tomorrow, so we will move the Hackathon to just outside the class exit :^) ]
13:09 Util Hopefully others attendees will remember more.
13:09 mcmillhj joined #perl6
13:09 raschipi joined #perl6
13:12 perlpilot That looks like something I'd normally see in a blog post  :)
13:14 eiro left #perl6
13:14 khw joined #perl6
13:16 Util perlpilot: good point.
13:23 [Coke] ffffff
13:27 Util Also:
13:27 Util * vrurg showed how Perl 6 already beats Perl 5 in BigInt performance (and another category I am not remembering)
13:27 Util * We reviewed awwaiid's upcoming lightning talk on the numerous uses of colons in Perl 6. [I think he missed 2 out of Inf-1]
13:27 Util * We explored why `$_ *= 10 for 1..9;` did not complain in Perl 5, but does in Perl 6.
13:28 Util perlpilot: I will try to make this my first ever blog post.
13:30 scimon On the "Why is my travis build failing?" question. https://travis-ci.org/Scimon/Statico/jobs/245356622 AND https://travis-ci.org/Scimon/Statico/jobs/245356619
13:30 scimon Renaming YAMLish in META6.json to yamlish fixed it in OSX but not Linux.
13:30 scimon (note the Repo is called yamlish)
13:33 [Coke] (oops, accidentally sent my "am i still connected" typing. :)
13:39 eveo joined #perl6
13:39 eveo scimon: that looks like a bug. YAMLish has "YAMLish" listed as name, so that name should work.
13:43 zengargoyle weird, my super simple YAMLish as a dep test passed both linux and osx: https://travis-ci.org/zengargoyle/p6-TestMe
13:43 eveo Ulti: do you remember what code was used to produce a Junction from MAIN? I didn't think we used any. Also, the gather/take hack is much more palatable than a .perl hack, I'd think
13:44 eveo m: my $j = any(<a b>) | "c"; dd gather $j.map: *.take
13:44 camelia rakudo-moar 0d053a: OUTPUT: «("a", "b", "c").Seq␤»
13:44 eveo m: my $j = any(<a b>) | "c"; dd gather $j».take
13:44 camelia rakudo-moar 0d053a: OUTPUT: «("a", "b", "c").Seq␤»
13:44 Util [Coke]: Oh! I thought you were doing a spit-take :)
13:45 Util eveo: was that to me, or Ulti ?
13:46 eveo Util: you
13:47 Utli The madness is now complete.
13:47 Util eveo: I do not, but if I see the author, or his video is posted, I will find out for you.
13:47 Utli Thanks.
13:48 Util eveo: the gather/take hack is new to me. Thanks!
13:49 Utli Generally, you're not meant to introspect Junctions.
13:49 moritz m: sub eigenstates(Junction $j) { my @r; sub (Any $x) { @r.push(@x) }($j); @r }; say eigenstates 1&2&3
13:49 camelia rakudo-moar 0d053a: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Variable '@x' is not declared. Did you mean '$x'?␤at <tmp>:1␤------> 3ion $j) { my @r; sub (Any $x) { @r.push(7⏏5@x) }($j); @r }; say eigenstates 1&2&3␤»
13:49 Util Ulti: Yes, the docs specifically say so, and Larry confirmed it.
13:49 moritz m: sub eigenstates(Junction $j) { my @r; sub (Any $x) { @r.push($x) }($j); @r }; say eigenstates 1&2&3
13:50 camelia rakudo-moar 0d053a: OUTPUT: «[1 2 3]␤»
13:50 moritz that's what I've answered in the past
13:50 Utli Don't see any use of Junctions in https://github.com/rakudo/rakudo/blob/nom/src/core/Main.pm that would seep into userland, so I'm surprised that person needed a .perl hack
13:50 moritz same principle as gather/take, but maybe a makes it more obvious what's going on
13:55 eveo m: my &eigenstates = { my @a; sub { @a.push: $^x }($^j); @a }; say eigenstates 1&2&3
13:55 camelia rakudo-moar 0d053a: OUTPUT: «[1 2 3]␤»
13:55 eveo ^_^ default type constraint :)
13:55 eveo s
13:57 eveo m: use nqp; dd nqp::getattr(1&2&3, Junction, q|$!storage|
13:57 camelia rakudo-moar 0d053a: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in argument list; couldn't find final ')' ␤at <tmp>:1␤------> 3p::getattr(1&2&3, Junction, q|$!storage|7⏏5<EOL>␤»
13:57 eveo m: use nqp; dd nqp::getattr(1&2&3, Junction, '$!storage')
13:57 camelia rakudo-moar 0d053a: OUTPUT: «(1, 2, 3)␤»
13:57 eveo gutted
13:57 eveo left #perl6
14:07 moritz using nqp:: ops is cheating :-)
14:08 moritz m: my $junction = 1&2; say $junction.^attributes[0].get_value($junction)
14:08 camelia rakudo-moar 0d053a: OUTPUT: «(1, 2)␤»
14:13 AlexDaniel joined #perl6
14:20 keylet joined #perl6
14:23 colomon joined #perl6
14:25 keylet left #perl6
14:26 domidumont joined #perl6
14:26 prodotiscus joined #perl6
14:28 prodotiscus I have my own repo with some perl6 coding samples on GitHub
14:28 prodotiscus https://github.com/prodotiscus/perl6-samples
14:28 Geth ¦ doc: 110aac8cce | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/phasers.pod6
14:28 Geth ¦ doc: Use proper POD6 comments
14:28 Geth ¦ doc:
14:28 Geth ¦ doc: Otherwise the commented stuff still shows up in rendered text
14:28 Geth ¦ doc: review: https://github.com/perl6/doc/commit/110aac8cce
14:28 prodotiscus can I add it to perl6 organization?
14:29 prodotiscus if the organization needs it, of course :)
14:29 moritz prodotiscus: we already have a perl6-examples repo
14:29 moritz prodotiscus: want to contribute your examples there?
14:30 moritz (you should be able to push directly, no PRs necessary)
14:31 prodotiscus I have the push right, yes
14:32 prodotiscus ok, I'll try to add the examples from my repo to perl6/perl6-examples
14:33 moritz thanks prodotiscus++
14:36 raiph joined #perl6
14:51 mr-foobar joined #perl6
14:54 Geth ¦ perl6-examples: a31dc23689 | prodotiscus++ | categories/other/array-contains-a-value.pl
14:54 Geth ¦ perl6-examples: new example: determine whether an array contains a value
14:54 Geth ¦ perl6-examples: review: https://github.com/perl6/perl6-examples/commit/a31dc23689
15:05 keylet joined #perl6
15:05 keylet m: my Int, Str $foo = 'foobar'; say $foo;
15:05 camelia rakudo-moar 0d053a: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Malformed my␤at <tmp>:1␤------> 3my Int7⏏5, Str $foo = 'foobar'; say $foo;␤»
15:06 keylet can I set more than one type for a variable, so that all types except Int or Str (for example) are prohibited?
15:06 araraloren you can use subset
15:08 araraloren m: my $foo where Int | Str = "123";
15:08 camelia rakudo-moar 0d053a: ( no output )
15:08 araraloren m: my $foo where Int | Str = 1;
15:08 camelia rakudo-moar 0d053a: ( no output )
15:08 araraloren m: my $foo where Int | Str = 0.1;
15:08 camelia rakudo-moar 0d053a: OUTPUT: «Type check failed in assignment to $foo; expected <anon> but got Rat (0.1)␤  in block <unit> at <tmp> line 1␤␤»
15:08 rindolf joined #perl6
15:08 araraloren This will work too
15:09 keylet thank you araraloren
15:10 araraloren ^_^
15:14 bwisti joined #perl6
15:14 domidumont joined #perl6
15:18 travis-ci joined #perl6
15:18 travis-ci Doc build errored. Zoffix Znet 'Use proper POD6 comments
15:18 travis-ci https://travis-ci.org/perl6/doc/builds/245394217 https://github.com/perl6/doc/compare/13e0fc442ade...110aac8cce51
15:18 travis-ci left #perl6
15:23 kurahaupo joined #perl6
15:23 jameslenz joined #perl6
15:30 [Coke] [docs] will add this to contributing.md, but when adding samples to docs, use (=begin code :lang<perl5>), e.g. if it's not a perl6 snippet.
15:30 [Coke] (or <haskell>, or <ruby>, etc.)
15:32 [Coke] I'd also like to encourage skip-test<reason> so we can keep track of why something is being skipped. will help us tag some samples for special processing later (would let us deal with things that need to run in a standalone file, e.g.)
15:33 Geth ¦ doc: eeee090e72 | (Jonathan Worthington)++ | doc/Type/Encoding.pod6
15:33 Geth ¦ doc: Add some basic documentation for the Encoding role
15:33 Geth ¦ doc: review: https://github.com/perl6/doc/commit/eeee090e72
15:37 [Coke] jnthn: those examples have {Encoding}:D as a method param. is that legal syntax? (fails here with a week old rakuo)
15:37 [Coke] er, {Encoding}:D:
15:37 moritz the curlies look wrong to me
15:38 [Coke] oh, I bet it's actually just not triggering our normal "is this really a method def." check in the examples compilation.
15:40 jnthn Don't blame me, blame util/new-type.p6
15:41 jnthn Which CONTRIBUTING.md told me to use
15:41 [Coke] ah, nope, it's:
15:41 jnthn It put the curlies in :)
15:41 jnthn I just left 'em :)
15:41 [Coke] ok. if you fix the doc, I'll take the "new-type" bug.
15:41 jnthn I thought maybe it was syntax to get it into the index or something
15:42 jnthn I don't know much about how p6doc works, just figured I'd try and help a little on the new encoding API :)
15:42 [Coke] nah, it was written in 2014, probably not touched much since.
15:42 [Coke] Super appreciate it.
15:42 Geth ¦ doc: 695ebf5d21 | (Moritz Lenz)++ | doc/Type/Encoding.pod6
15:42 Geth ¦ doc: Fix type names in signatures
15:42 Geth ¦ doc: review: https://github.com/perl6/doc/commit/695ebf5d21
15:42 moritz easy karma :-)
15:42 jnthn heh, I'd just done it locally too :)
15:43 jnthn [Coke]++ and moritz++
15:44 jnthn I'll try and fill out a few more of them in the coming days
15:45 * [Coke] adds https://github.com/perl6/doc/issues/1392 , easy lift for someone.
15:45 jnthn :)
15:45 cdg joined #perl6
15:53 keylet m: say so 'string' !~ /\w+/;
15:53 camelia rakudo-moar 86e7b2: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Unsupported use of !~ to do negated pattern matching; in Perl 6 please use !~~␤at <tmp>:1␤------> 3say so 'string' !~ 7⏏5/\w+/;␤»
15:53 cdg_ joined #perl6
15:53 keylet m: say so ! ('string' ~~ /\w+/);
15:53 camelia rakudo-moar 86e7b2: OUTPUT: «False␤»
15:55 keylet m: my %var; say %var.WHAT;
15:55 camelia rakudo-moar 86e7b2: OUTPUT: «(Hash)␤»
15:56 keylet m: say so not ('string' ~~ /\w+/);
15:56 camelia rakudo-moar 86e7b2: OUTPUT: «False␤»
15:58 keylet m: my %foo = lorem => 'ipsum';
15:58 camelia rakudo-moar 86e7b2: ( no output )
15:59 keylet m: my %foo = lorem => 'ipsum', dolor => 'sit';
15:59 camelia rakudo-moar 86e7b2: ( no output )
15:59 keylet is there a nice way to say it like: lorem=ipsum, dolor=sit
15:59 keylet ?
16:01 keylet m: my %foo = lorem => 'ipsum', dolor => 'sit'; for %foo -> $k, $v { say "$k=$v, " }
16:01 camelia rakudo-moar 86e7b2: OUTPUT: «lorem      ipsum=dolor     sit, ␤»
16:02 keylet m: my %foo = lorem => 'ipsum', dolor => 'sit'; for @foo -> $k, $v { say "$k=$v, " }
16:02 camelia rakudo-moar 86e7b2: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Variable '@foo' is not declared. Did you mean '%foo'?␤at <tmp>:1␤------> 3= lorem => 'ipsum', dolor => 'sit'; for 7⏏5@foo -> $k, $v { say "$k=$v, " }␤»
16:02 keylet m: my %foo = lorem => 'ipsum', dolor => 'sit'; for %foo.kv -> $k, $v { say "$k=$v, " }
16:02 camelia rakudo-moar 86e7b2: OUTPUT: «lorem=ipsum, ␤dolor=sit, ␤»
16:02 keylet wow! it works
16:04 jnthn m: my %foo = lorem => 'ipsum', dolor => 'sit'; say %foo.fmt('%s=%s', ',')  # I think maybe this too
16:04 camelia rakudo-moar 86e7b2: OUTPUT: «lorem=ipsum,dolor=sit␤»
16:05 araraloren awesome fmt
16:05 ruoso How do I lookup a multi that was declared in a class? I want to get a reference to the multi from outside it...
16:05 ruoso I tried TheClass::<&themulti>
16:05 ruoso but that seem to just return Any
16:06 jnthn multi sub or multi method?
16:06 jnthn Subs are lexical by default, so if sub you'll have to mark it `our`
16:06 jnthn If method, then .^lookup('themulti')
16:07 ruoso multi sub
16:07 ruoso m: class Foo { multi bar() { } }; say Foo::<&bar>
16:07 camelia rakudo-moar 86e7b2: OUTPUT: «(Any)␤»
16:07 araraloren m: class F { multi f() { } }; # what's the multi mean ?
16:07 camelia rakudo-moar 86e7b2: ( no output )
16:07 araraloren sub or method ?
16:07 jnthn araraloren: always sub
16:07 ruoso m: class Foo { our multi bar() { } }; say Foo::<&bar>
16:07 camelia rakudo-moar 86e7b2: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Cannot use 'our' with individual multi candidates. Please declare an our-scoped proto instead␤at <tmp>:1␤------> 3class Foo { our multi bar() { }7⏏5 }; say Foo::<&bar>␤    expecting any of:␤ …»
16:08 jnthn Correct error is correct :)
16:08 jnthn m: class Foo { our proto bar(|) {*}; multi bar() { } }; say Foo::<&bar>
16:08 camelia rakudo-moar 86e7b2: OUTPUT: «sub bar (| is raw) { #`(Sub|41318656) ... }␤»
16:08 jnthn m: class Foo { our proto bar(|) {*}; multi bar() { } }; say Foo::<&bar>.candidates
16:08 camelia rakudo-moar 86e7b2: OUTPUT: «(sub bar () { #`(Sub|34257752) ... })␤»
16:08 ruoso thanks... that's indded it
16:09 ruoso what's the meaning of having the | in the proto?
16:09 ruoso (in the signature of the proto, that is)
16:09 jnthn It means "accept any arguments"
16:09 jnthn And that you don't need a way to talk about them
16:10 jnthn proto foo($, $) {*} would mean that anything without exatly two args would fail at the proto point without even considering the multis
16:10 ruoso ah, so if I say `our proto bar() {*}` I'm telling I need at least an argument
16:10 jnthn It's usually not important, but it can be when you want to use a set of multis in a context where arity or count matter
16:10 jnthn No, that means "no arguments"
16:11 jnthn our proto bar($) {*} would mean one argument
16:11 mcmillhj joined #perl6
16:11 jnthn The * means "and now call the multi-dispatcher"
16:11 ruoso ah, got it
16:11 ruoso was thinking exactly reversed
16:12 raschipi joined #perl6
16:15 keylet m: my Str $content = 'lorem ipsum'; my Str $foo = "[*]$content[/*]"; say $foo;
16:15 camelia rakudo-moar 86e7b2: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Quantifier quantifies nothing␤at <tmp>:1␤------> 3em ipsum'; my Str $foo = "[*]$content[/*7⏏5]"; say $foo;␤    expecting any of:␤        list composer␤        term␤»
16:15 keylet m: my Str $content = 'lorem ipsum'; my Str $foo = "[*]$content[\/*]"; say $foo;
16:15 camelia rakudo-moar 86e7b2: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Quantifier quantifies nothing␤at <tmp>:1␤------> 3m ipsum'; my Str $foo = "[*]$content[\/*7⏏5]"; say $foo;␤    expecting any of:␤        list composer␤        term␤»
16:15 keylet m: my Str $content = 'lorem ipsum'; my Str $foo = "[*]{$content}[\/*]"; say $foo;
16:15 camelia rakudo-moar 86e7b2: OUTPUT: «[*]lorem ipsum[/*]␤»
16:15 keylet m: my Str $content = 'lorem ipsum'; my Str $foo = "[*]{$content}[/*]"; say $foo;
16:15 camelia rakudo-moar 86e7b2: OUTPUT: «[*]lorem ipsum[/*]␤»
16:16 ruoso I'm getting 'Serialization Error: missing static code ref for closure '' (src/Perl6/World.nqp:2211)
16:16 ruoso in some cases when doing that lookup
16:17 Geth ¦ doc: e542e3c84d | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/PositionalBindFailover.pod6
16:17 Geth ¦ doc: PositionalBindFailover doesn't care for Iterables
16:17 Geth ¦ doc:
16:17 Geth ¦ doc: - Remove prose that talks about Iterables
16:17 Geth ¦ doc: - Clarify what happens in the Seq example
16:17 Geth ¦ doc: - Provide example with custom class doing PositionalBindFailover
16:17 Geth ¦ doc: review: https://github.com/perl6/doc/commit/e542e3c84d
16:17 keylet m: say True ?? 'foo';
16:17 camelia rakudo-moar 86e7b2: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Confused: Found ?? but no !!␤at <tmp>:1␤------> 3say True ?? 'foo'7⏏5;␤»
16:17 keylet m: say True ?? 'foo' !!;
16:17 camelia rakudo-moar 86e7b2: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Missing required term after infix␤at <tmp>:1␤------> 3say True ?? 'foo' !!7⏏5;␤    expecting any of:␤        prefix␤        term␤»
16:17 keylet can I do a void !! ?
16:18 araraloren m: say 'foo' if True;
16:18 camelia rakudo-moar 86e7b2: OUTPUT: «foo␤»
16:18 eveo joined #perl6
16:18 eveo keylet: what are you trying to do?
16:18 araraloren Why not using `if`
16:19 eveo m: say ?'foo'
16:19 camelia rakudo-moar 86e7b2: OUTPUT: «True␤»
16:19 eveo m: say True if 'foo'
16:19 camelia rakudo-moar 86e7b2: OUTPUT: «True␤»
16:19 eveo m: 'foo' and say True
16:19 camelia rakudo-moar 86e7b2: OUTPUT: «True␤»
16:19 keylet sorry :)
16:20 keylet you should really use inline `if`
16:20 keylet * I
16:20 eveo Sometimes `with` is more appropriate; for example an empty string and number 0 are false
16:20 eveo `with` checks if the item is .defined
16:21 eveo ruoso: which code produces that error?
16:23 ruoso I'm trying to nail it down to a smaller code, but haven't succeeded
16:23 eveo and `andthen` is the operator form for `with`, same as `and` is for `if`
16:23 eveo m: 0 andthen .say
16:23 camelia rakudo-moar 86e7b2: OUTPUT: «0␤»
16:23 eveo ruoso: what's the bigger code?
16:23 ruoso let me push the latest version...
16:24 travis-ci joined #perl6
16:24 travis-ci Doc build errored. Jonathan Worthington 'Add some basic documentation for the Encoding role'
16:24 travis-ci https://travis-ci.org/perl6/doc/builds/245421231 https://github.com/perl6/doc/compare/110aac8cce51...eeee090e72e7
16:24 travis-ci left #perl6
16:26 ruoso hm, it stopped failing altogether now...
16:26 araraloren night
16:26 eveo night
16:27 ruoso eveo: https://github.com/ruoso/perl6-web-multi-dispatch is what I'm working on
16:28 ruoso I was seeing the error whne trying to have the subclass (TestApp) offer a version of generate_dispatcher which did the lookup
16:28 ruoso but now I can't reproduce it anymore
16:28 mcmillhj joined #perl6
16:29 eveo hm, OK. If you reproduce it again, report it
16:29 eveo huggable: rakudobug
16:29 huggable eveo, Report bugs by emailing to <rakudobug@perl.org>, please include [BUG] at the start of the subject for it to be automatically tagged by the RT system.
16:29 ruoso yeah, it may be something more delicate, and I was trying to nail it down to a simpler code to report I inadvertedly made it no longer be there
16:33 travis-ci joined #perl6
16:33 travis-ci Doc build errored. Moritz Lenz 'Fix type names in signatures'
16:33 travis-ci https://travis-ci.org/perl6/doc/builds/245424787 https://github.com/perl6/doc/compare/eeee090e72e7...695ebf5d2181
16:33 travis-ci left #perl6
16:44 mcmillhj joined #perl6
16:46 ruoso huh... it definitely is transient
16:46 ruoso the error just happened and then didn't happen in two consecutive runs of the same code
16:49 eveo ruoso: the "serialization" usually something with precomp. Try nuking .precomp or lib/.precomp (whereever it is)
16:51 pilne joined #perl6
16:51 ruoso yeah, I haven't seen it since
16:51 ruoso maybe I had a bad cashed precomp
16:55 ruoso do we have a inversion-of-control framework already?
16:55 ruoso I see IoC, but that seems stale since 2014
16:56 colomon_ joined #perl6
16:56 tadzik maybe it's perfect :)
16:58 ruoso heh, unlikely...
16:58 ruoso tests seem to fail dramatically
16:58 raschipi Not even TeX is perfect.
17:00 mcmillhj joined #perl6
17:04 eveo left #perl6
17:06 mcmillhj joined #perl6
17:07 |oLa| joined #perl6
17:08 travis-ci joined #perl6
17:08 travis-ci Doc build errored. Zoffix Znet 'PositionalBindFailover doesn't care for Iterables
17:08 travis-ci https://travis-ci.org/perl6/doc/builds/245438739 https://github.com/perl6/doc/compare/695ebf5d2181...e542e3c84d08
17:08 travis-ci left #perl6
17:09 tadzik I remember fixing it at some point, it was quite pleasant to work with
17:10 Geth ¦ doc: c128bfe132 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/PositionalBindFailover.pod6
17:10 Geth ¦ doc: s/once/anon var/;
17:10 Geth ¦ doc:
17:10 Geth ¦ doc: `once` is antipattern here, as it'll run once ever, even
17:10 Geth ¦ doc: when multiple instantces are created.
17:10 Geth ¦ doc: review: https://github.com/perl6/doc/commit/c128bfe132
17:13 kurahaupo_ joined #perl6
17:14 Cabanossi joined #perl6
17:15 tadzik yeah, it required little fixing :0
17:17 TimToady joined #perl6
17:17 tadzik ruoso: https://github.com/tadzik/perl6-ioc/commit/eb742cf447f02ac658e444789eb07e47cb7a4b04 was what it needed
17:18 tadzik I'd open a PR but seems like my master had some commit that was completely unrelated, so it'd probably require cherry-picking and argh, I'll let someone else do it :P
17:23 kurahaupo joined #perl6
17:23 kurahaupo_ joined #perl6
17:23 st_elmo joined #perl6
17:25 AlexDaniel joined #perl6
17:36 wamba joined #perl6
17:52 |oLa| joined #perl6
17:54 [Coke] huggable: no, rakudobug is Report bugs by emailing to <rakudobug@perl.org>
17:54 huggable [Coke], nothing found
17:54 [Coke] huggable: rakudobug is Report bugs by emailing to <rakudobug@perl.org>
17:54 huggable [Coke], nothing found
17:54 timotimo i think it wants ":is:"
17:54 [Coke] eveo : can you fix the huggable rakudobug fact so that it doesn't say to use [BUG] ?
17:55 [Coke] huggable: rakudobug :is: Report bugs by emailing to <rakudobug@perl.org>
17:55 huggable [Coke], Added rakudobug as Report bugs by emailing to <rakudobug@perl.org>
17:55 [Coke] rakudobug?
17:55 [Coke] huggable, rakudobug?
17:55 huggable [Coke], nothing found
17:55 eveo joined #perl6
17:55 [Coke] huggable, rakudobug
17:55 huggable [Coke], Report bugs by emailing to <rakudobug@perl.org>
17:55 [Coke] eveo: never mind
17:55 eveo OK :)
17:55 eveo left #perl6
18:00 travis-ci joined #perl6
18:00 travis-ci Doc build errored. Zoffix Znet 's/once/anon var/;
18:00 travis-ci https://travis-ci.org/perl6/doc/builds/245456907 https://github.com/perl6/doc/compare/e542e3c84d08...c128bfe1327d
18:00 travis-ci left #perl6
18:03 [Coke] timotimo++ eveo++
18:18 raiph joined #perl6
18:27 * [Coke] attempts to use filter-branch to expunge a file.
18:28 [Coke] (for $dayjob)
18:29 moritz [Coke]: it's probably overkill for this simple job, but there's the "bfg repo cleaner" which you can use for such tasks
18:30 moritz (also expunging single lines from all history, and stuff like that)
18:31 [Coke] moritz: saw that on the SO page I'm looking at, nice to know it is recommended by humans.
18:31 moritz https://rtyley.github.io/bfg-repo-cleaner/
18:31 kaare_ joined #perl6
18:33 [Coke] ... *facepalm* I didn't take a copy of the repo before running filter-branch (and it's a new copy of an svn conversion. crap.)
18:33 [Coke] moritz++
18:33 moritz [Coke]: you can still get to the old version through git reflog
18:34 moritz (unless you already explicitly expired the reflog)
18:45 sufrostico joined #perl6
18:48 sjoshi joined #perl6
18:50 arnsholt_ The reflog saves
18:50 arnsholt Got me out of a botched rebase once
18:50 arnsholt Sadly, it doesn't fix filename limitations on Windows =(
18:50 [Coke] moritz: does it -have- to run on a bare repo?
18:51 cowens joined #perl6
18:51 andrzejku joined #perl6
18:51 moritz [Coke]: I don't think so
18:52 cowens m: "\x[d800]".say
18:52 camelia rakudo-moar 86e7b2: OUTPUT: «Error encoding UTF-8 string: could not encode Unicode Surrogate codepoint 55296 (0xD800)␤  in block <unit> at <tmp> line 1␤␤»
18:53 cowens m: "\x[d800]".ord.say
18:53 moritz my last use of bfg at least two years ago, I don't remember all the gory details
18:53 camelia rakudo-moar 86e7b2: OUTPUT: «55296␤»
18:53 cowens Why does "\x[d800]" fail (as I expect), but "\x[d800]".ord not?
18:53 moritz just that your HEAD must not contain the files (or lines) you want to remove from history
18:54 moritz cowens: it fails at the encoding step when it tries to print to STDOUT
18:54 moritz cowens: when you do .ord, it never tries to encode the string into a buffer
18:54 cowens ah
18:55 cowens so it fails in the REPL
19:03 kurahaupo joined #perl6
19:03 kurahaupo joined #perl6
19:05 kurahaupo__ joined #perl6
19:05 cdg joined #perl6
19:05 sjoshi joined #perl6
19:12 cog_ joined #perl6
19:17 kurahaupo joined #perl6
19:20 jaush joined #perl6
19:42 TEttinger joined #perl6
19:44 ruoso is there a name for the programming pattern of using the pattern matching of multi subs to implement a sort of list reduce?
19:48 ruoso (with each multi slurping the remaining arguments then recursing)
19:48 perlpilot ruoso: when you say "pattern matching", you mean "signatures", right?
19:48 ruoso yes
19:48 ruoso mixing haskell terminology
19:48 perlpilot so, like having sigs of ($a,$b,$c), ($a,$b), ($a), ()  ?
19:49 ruoso well, more like ("a", *@r), ( "b", *@r ), ($c)
19:49 perlpilot oh, yeah ... like (x:xs) in haskell
19:50 perlpilot I don't know of a name for that
19:50 ruoso right, but in practice it would be ("a", *@r), (AContext, "b", *@r), (BContext, "c")
19:51 ruoso where the recusion would include a new argument to encode the "reduction" of the list up to that point
19:52 ruoso more importantly, because we could also have a (AContext, "d", *@r) candidate
19:52 perlpilot feels more like something you'd see in prolog in a way.
19:53 perlpilot I mean "unification" is what my brain says that "pattern" should be called.
19:55 TimToady am in the other corner of the room discussing the same thing with Morris Siegel :)
19:57 ruoso I guess I should walk over
20:17 raschipi git and apt call that "subcommands"
20:18 raschipi so by extension they should be subsubroutines
20:20 xzhao joined #perl6
20:25 xzhao joined #perl6
20:31 * zengargoyle cargo-cults `git commit --allow-empty -m '[empty] initial commit' because somewhere, somewhen, read that some things are easier *if* there's an empty commit at the start.
20:33 espadrine joined #perl6
20:39 AlexDaniel joined #perl6
20:44 j-david-lowe joined #perl6
20:49 awwaiid joined #perl6
21:03 AlexDaniel joined #perl6
21:10 awwaiid joined #perl6
21:16 |oLa| joined #perl6
21:19 awwaiid joined #perl6
21:29 Cabanossi joined #perl6
21:34 ufobat joined #perl6
21:36 setty1 joined #perl6
22:35 rurban joined #perl6
22:44 mcmillhj joined #perl6
23:05 sufrostico joined #perl6
23:08 BenGoldberg joined #perl6
23:09 BenGoldberg m: multi foo(Int) { 'boxed' }; multi foo(int) { 'native' }; say foo(1);
23:09 camelia rakudo-moar 86e7b2: OUTPUT: «boxed␤»
23:10 BenGoldberg m: multi foo(Int) { 'boxed' }; multi foo(int) { 'native' }; my int $x = 1; say foo($x);
23:10 camelia rakudo-moar 86e7b2: OUTPUT: «native␤»
23:10 * BenGoldberg wonders why it must be a variable in order to be native.
23:29 Cabanossi joined #perl6
23:54 cyphase joined #perl6

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

Perl 6 | Reference Documentation | Rakudo