Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-02-04

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:20 pyrimidine joined #perl6
00:23 pyrimidine joined #perl6
00:32 geekosaur joined #perl6
00:41 bjz joined #perl6
00:48 jeff_linahan joined #perl6
00:48 jeff_linahan Hi
00:49 brokenchicken \o
00:50 jeff_linahan I'm interested in peel 6
00:50 jeff_linahan *peel 6
00:50 TEttinger perl 6, understood
00:50 jeff_linahan *Perl 6 lol
00:50 brokenchicken heh
00:50 * brokenchicken actually lives in "Peel Region" :P
00:51 brokenchicken jeff_linahan: cool. Do you know any other programming languages?
00:51 TEttinger is it near the Rhined, brokenchicken?
00:51 jeff_linahan I'm best at c++ but I've been wanting to get better at scripting
00:51 brokenchicken TEttinger: no idea: https://www.google.ca/maps/place/Peel+Regional+Municipality,+ON/@43.7352859,-79.9835201,11z/data=!3m1!4b1!4m5!3m4!1s0x882b3c30c9eb87ab:0x3bec33bf3e68e6a3!8m2!3d43.6766398!4d-79.7848422
00:52 jeff_linahan Mostly have been doing bash, perl 5, python
00:52 brokenchicken jeff_linahan: ah, this may be a good way for you to start with Perl 6: https://learnxinyminutes.com/docs/perl6/
00:52 TEttinger heh, bad joke about the large river in central Europe called tthe Rhine, sounds like rind, peel, rind
00:52 brokenchicken jeff_linahan: more resources listed here in "For Newcomers" section: https://perl6.org/resources/
00:52 jeff_linahan Lol
00:52 brokenchicken TEttinger: heh :) never heard of that sorry :)
00:53 jeff_linahan Actually I wanted to know about contributing
00:53 TEttinger there's a lotta contributors from what I can tell
00:53 jeff_linahan What do you guys think perl 6 needs most now?
00:53 brokenchicken Lots of things :)
00:54 brokenchicken Hm. Do we have a contributing doc?
00:54 TEttinger I'd imagine docs are the biggest thing that can be improved in almost any language
00:55 samcv damn. i made checking character class alphabetic 10-20% faster, but there's a lot of overhead in our <alpha> because it's actually a method
00:55 samcv so it ends up making <alpha> only like 3% faster
00:56 jeff_linahan Yeah I looked at the compiler a couple years ago but it perl 5 was still much faster so I started using that
00:57 MasterDuke jeff_linahan: i started contributing by looking at bug tickets, finding some that looked approachable, and just trying to fix them
00:57 jeff_linahan Anyway, based on the docs I've read so far it sounds like a wonderful language in need of more users
00:57 MasterDuke some were too hard initially, but you ramp up eventually
00:58 jeff_linahan Do any of you work on perl 6 full time?
00:59 pyrimidine joined #perl6
01:00 brokenchicken Some people are sponsored through the grants from the Perl Foundation. Don't think anyone has that as sole source of income. But if you mean by time and not money, many spend "full time" amount of hours every week on hacking on Perl 6 core.
01:01 jeff_linahan Oh cool
01:02 jeff_linahan So documentation and optimization...
01:03 jeff_linahan I think I'm going to have a hard time convincing other people to learn p6 over python though...
01:04 jeff_linahan I used to write tutorials for dark basic, so if you guys see somewhere the documentation could be improved by a p6 noob let me know
01:04 daxim joined #perl6
01:05 jeff_linahan I like teaching stuff
01:05 pyrimidine joined #perl6
01:06 samcv what do you guys think Perl 6's Bus Factor is?
01:06 samcv https://en.wikipedia.org/wiki/Bus_factor
01:07 skids joined #perl6
01:12 davido joined #perl6
01:13 brokenchicken jeff_linahan: "LHF" stands for Low Hanging Fruit: https://github.com/perl6/doc/issues?q=is%3Aopen+is%3Aissue+label%3ALHF
01:13 brokenchicken jeff_linahan: you could also read the docs and find what's unclear from your perspective as a begginer and improve that :)
01:14 jeff_linahan OK cool
01:15 davido joined #perl6
01:15 brokenchicken jeff_linahan: the compiler lives in https://github.com/rakudo/rakudo and the leading VM for it in https://github.com/MoarVM/MoarVM  There are a couple of "Core Hacking" tutorials on perl6.party website + https://perl6advent.wordpress.com/2016/12/11/day-11-perl-6-core-hacking-it-slipped-through-the-qasts/ and on perl6.fail website you can see the full list of currently-open tickets :)
01:18 davido joined #perl6
01:21 jeff_linahan joined #perl6
01:22 AlexDaniel samcv: not sure if it applies here. The development may slow down, but eventually somebody will pick up the work
01:22 samcv so how many people
01:22 samcv would end the project if they got hit by a bus?
01:22 samcv give me a ballpark
01:23 samcv minimum number of bus indidents to stall the project
01:23 brokenchicken samcv: based on current trend I observed, I'd say it's pretty bad; like 1 (jnthn++) or 2 (TimToady++). But there's a bit of a bias since there are probably more people who know all of the components and just don't have time to work on them and they likely would put more effort into training some extra people should the bus event occur.
01:25 samcv m: say 'ↈ' ~~ /<:alpha>/
01:25 camelia rakudo-moar f799a0: OUTPUT«「ↈ」␤»
01:25 samcv m: say 'ↈ' ~~ /<alpha>/
01:25 camelia rakudo-moar f799a0: OUTPUT«Nil␤»
01:25 * teatime throws some salt over his shoulder.
01:26 travis-ci joined #perl6
01:26 travis-ci Doc build passed. Altai-man 'Language/ examples output unification (last part)'
01:26 travis-ci https://travis-ci.org/perl6/doc/builds/198191921 https://github.com/perl6/doc/commit/08b2fcbb918d
01:26 travis-ci left #perl6
01:26 samcv hmm making this 10-25% speed boost and making charclass = alpha in moarvm <:alpha>
01:27 samcv seems we are failing tests that the jvm is also failing regarding Nl's likee ↈ
01:27 brokenchicken samcv: + the bus event would cause some people to reach deeper into the guts to try to fix the bugs that are no longer getting fixed. Whereas right now those people might be messing about with trying to make .subst return all matches in $/ :)
01:28 samcv if TimToady says ok, and we can set charclass alphabetic == unicode property alphabetic, and can fix 'Nl's, it may fix it on JVM too
01:29 MasterDuke samcv: any way you can make ws and/or _ws faster?
01:29 samcv j: say 'ↈ' ~~ /<:alpha>/
01:29 camelia rakudo-jvm fb4f16: OUTPUT«「ↈ」␤»
01:29 samcv maybe can make ws faster
01:29 samcv sadly <alpha> is a method not a token
01:29 samcv not sure why the hell. but. that is how it is
01:29 samcv when i removed the method and made a token the same place token ws is defined it wouldn't compile. said wrong version of some file
01:30 samcv but changing from <alpha> to <:alpha> has a like 8-12x speed boost
01:30 samcv oh looks like ws has a method too
01:30 samcv and it has a token hmm
01:31 samcv i guess token is for regex
01:31 MasterDuke samcv: if you look here https://gist.github.com/MasterDuke17/7723025658833476d5f312805c3274b5, _ws and ws are 7th and 17th most expensive functions during a rakudo compile
01:31 samcv what is _ws
01:31 samcv -ws?
01:32 MasterDuke i think it's the moarvm op
01:32 samcv the mvm op that's slow?
01:32 samcv which op?
01:32 MasterDuke nm, it's a token in the rakudo grammar
01:32 samcv yeah, but how is \s defined
01:32 samcv can you find where \s is defined?
01:33 samcv and i will work on it :)
01:33 MasterDuke don't really know that
01:34 MasterDuke but i'll look
01:34 samcv should be the place all the backslashed ones are defined
01:34 samcv wow <ws> is soo slow
01:34 MasterDuke heh, i don't know where any are defined
01:35 marocco joined #perl6
01:36 marocco p6: say 'hello'
01:36 camelia rakudo-moar f799a0: OUTPUT«hello␤»
01:37 MasterDuke p6: say ', world'
01:37 camelia rakudo-moar f799a0: OUTPUT«, world␤»
01:38 geekosaur joined #perl6
01:39 jeff_linahan joined #perl6
01:45 samcv m: say ' ' ~~ /<ws>/; say now - INIT now
01:45 camelia rakudo-moar f799a0: OUTPUT«「 」␤ ws => 「 」␤0.00465426␤»
01:45 samcv m: for ^100 { ' ' ~~ /<ws>/}; say now - INIT now
01:45 camelia rakudo-moar f799a0: OUTPUT«0.0087044␤»
01:47 pyrimidine joined #perl6
01:51 SmokeMachine I'm a little drunk, so, please, bony take me too seriously...
01:52 SmokeMachine Does any one have any job to offer me? I just want to leave Brazil...
01:55 SmokeMachine I have 2 douthers and I don't want they growing up here...
01:57 TimToady well, California has its problems too right now, not the least of which is being part of much different country than it was a month ago...
01:57 brokenchicken SmokeMachine: as a professional ex-acoholic, I can advise you to not ponder such decisions while drunk :P
01:59 mspo douthers?
02:00 brokenchicken daughters :)
02:01 MasterDuke that reminds me, time to open that Glenlivet i just got earlier today
02:06 SmokeMachine I did not take that decision while drunk, but thanks! I'll talk about that when I'm sober...
02:08 MasterDuke m: my %h; my $s = now; for 1..1_000_001 { %h{$_} = 1; if $_ % 100_000 == 0 { my $e = now; say "$_: " ~ $e - $s; $s = $e; } }
02:08 camelia rakudo-moar f799a0: OUTPUT«100000: 0.6282546␤200000: 0.9222221␤300000: 1.0498393␤400000: 1.3562730␤500000: 1.48510739␤600000: 1.645417339␤700000: 1.92722908␤800000: 2.2872492␤900000: 2.2866784␤1000000: 2.50645934␤»
02:09 MasterDuke profiling that on my machine (with 2m and 200k), it spends 28% of its time executing code and 72% in garbage collection
02:09 KDr2 joined #perl6
02:09 MasterDuke which seems less than ideal
02:10 TimToady well, you are creating lots of not-quite-garbage there, but yeah
02:15 MasterDuke and FWIW, Perl 5 runs the equivalent code in 2.2s total, vs 55s total for Perl 6
02:15 MasterDuke a perf record shows 68% time spent in gc_mark
02:20 MasterDuke TimToady: while i'm thinking about performance stuff, do you have any idea why some operations are slower on native str than non-native? e.g., https://rt.perl.org/Public/Bug/Display.html?id=127972
02:21 TimToady maybe native str is more naïve about the semantics of various string operations
02:22 TimToady or maybe you're running into boxing/unboxing issues
02:24 samcv MasterDuke, well i can make <ws> 4% faster
02:24 MasterDuke perf shows a lot of time in latin1_[encode,decode], would that indicate boxing issues?
02:24 MasterDuke samcv++
02:24 samcv i think. i gotta run spectest
02:25 kurahaupo__ joined #perl6
02:26 samcv it compiles at least. messing with ws is an easy way to make stuff not even compile :P
02:26 samcv nqp spectest pass. now onto roast
02:28 samcv hmm looks like it's already done for nqp Grammar, so idk if it will effect compile speed. maybe
02:28 samcv i'm applying the improvement to src/QRegex/P6Regex/Grammar.nqp though
02:29 samcv err nvm i was looking wrong. this fix only applies to QRegex::P6Regex::Grammar
02:29 samcv do you know MasterDuke if that will improve the compile speed?
02:30 samcv and does perl 6 use NQP::Grammar
02:30 samcv hmm looks like it doesn't. at least a grep. so this may affect rakudo
02:31 MasterDuke well, the ws in src/Perl6/Grammar.nqp is the one that's 17th in the profile
02:32 samcv yeahok it looks like it's those methods
02:32 samcv but those probably call <ws>
02:33 samcv https://github.com/rakudo/rakudo/blob/nom/src/Perl6/Grammar.nqp#L598-L617
02:34 Sgeo joined #perl6
02:34 TimToady MasterDuke: sounds like most of the garbage is from converting to string keys
02:34 pyrimidine joined #perl6
02:34 TimToady declaring the hash as %h{Int} doesn't really help yet, until we make .WHICH more efficient
02:35 TimToady currently .WHICH is just a slower way to make strings :/
02:35 samcv yeah which IS SLOW
02:35 MasterDuke TimToady: are you referring to the latin1_* stuff? if so, that wasn't from to the hash code i ran
02:36 TimToady I wasn't sure whether that was part of it, but what I said is still true :)
02:36 MasterDuke heh. they latin1_* stuff was from `my str $a = "a" x 2**29;`
02:37 MasterDuke m: my str $a = "a" x 2**29; say now - INIT now
02:37 camelia rakudo-moar f799a0: OUTPUT«0.81967623␤»
02:37 MasterDuke m: my Str $a = "a" x 2**29; say now - INIT now
02:37 TimToady that's almost impressive, though I bet p5 is faster :)
02:37 camelia rakudo-moar f799a0: OUTPUT«0.00153860␤»
02:38 MasterDuke hm, that took 18s when i submitted the bug report. let me try again on my machine
02:38 TimToady I wonder if the str form is making 2**29 pieces of 1-char rope
02:38 MasterDuke ooh, down to 9s on my machine
02:38 TimToady p5?
02:39 MasterDuke that was rakudo. i'll try p5
02:39 MasterDuke p5 is .4s
02:39 TimToady p5 does some tricks :)
02:41 MasterDuke perf looks exactly the same as before, percentages wise (it just takes half the time in total)
02:46 MasterDuke but how is camelia 10x faster than when i run it from the command line?
02:46 MasterDuke commit: HEAD my str $a = "a" x 2**29; say now - INIT now
02:46 TimToady infix:<x> only has a Str/Int form, and a str/int form, so if you're using str/Int, maybe something bad is going on
02:46 committable6 MasterDuke, ¦«HEAD»: 0.811105
02:46 TimToady m: my int $ttt9 = 2**29; my str $a = "a" x $ttt9; say now - INIT now
02:46 camelia rakudo-moar f799a0: OUTPUT«0.00142874␤»
02:46 MasterDuke m: my int $x = 2**29; my str $a = "a" x $x; say now - INIT now
02:46 camelia rakudo-moar f799a0: OUTPUT«0.00150246␤»
02:46 TimToady hah, beat you
02:46 MasterDuke i'm going to claim "great minds..."
02:46 TimToady mine ran faster, too :P
02:46 MasterDuke you must get special treatment, yours even had 6 extra chars to parse
02:47 TimToady and I even warmed up the CPU for you...
02:47 * MasterDuke almost wants to propose a builtin operator that just does `say now - INIT now`
02:48 MasterDuke benchable6: 2016.12,HEAD my str $a = "a" x 2**29
02:48 benchable6 MasterDuke, starting to benchmark the 2 given commits
02:49 benchable6 MasterDuke, benchmarked the given commits, now zooming in on performance differences
02:49 benchable6 MasterDuke, ¦«2016.12»:6.6858␤¦«HEAD»:6.6054
02:51 TimToady you wouldn't think boxing a single 'a' and then unboxing it again would be so costly, but maybe it loads in something
02:53 MasterDuke oh, i wonder if this is similar to when i was benching nqp::radix() and it wasn't getting jitted when run in the mainline, but was when the exact same code was stuck in a sub and then that sub was called
02:53 samcv gremlins
02:54 samcv ok well full pass with my <ws> change. seems good to go
02:54 TimToady m: my str $a = "a"; $a x= 2**29; say now - INIT now
02:54 camelia rakudo-moar f799a0: OUTPUT«0.0014603␤»
02:56 MasterDuke no, the *ables write the given code to a file and run that, and doing that on my machine is just as slow
02:57 samcv maybe i will ask brokenchicken for help later with trying to get Nl's working when I fix MVM to have <alpha> match Nl's
02:57 samcv i tried perl6 --target parse but i still am not totally sure what's happening
03:01 bjz joined #perl6
03:02 pyrimidi_ joined #perl6
03:22 gfldex joined #perl6
03:29 MasterDuke TimToady: do you think it would be possible to get MoarVM to create/use more strings with a storage_type of MVM_STRING_GRAPHEME_ASCII instead of MVM_STRING_GRAPHEME_32?
03:36 noganex joined #perl6
03:37 SmokeMachine Sorry about my last messages...
03:38 samcv should put a link to https://github.com/samcv/Atom-as-a-Perl6-IDE on perl6 org site, idk maybe make it a perl6 org repo. really need to figure out where it should go
03:38 samcv i guess it could go in perl6 org for now, so other people can add to it
03:43 pyrimidine joined #perl6
03:46 brokenchicken SmokeMachine: :)
03:47 xtreak joined #perl6
03:52 pyrimidine joined #perl6
03:56 BenGoldberg joined #perl6
04:04 pyrimidi_ joined #perl6
04:30 kyan joined #perl6
04:56 Cabanoss- joined #perl6
05:05 pyrimidine joined #perl6
05:11 bjz joined #perl6
05:21 sammers joined #perl6
05:23 masak g'day, #perl6
05:23 masak someone want to discuss macros? :)
05:24 samcv dunno
05:24 samcv do I?
05:25 masak heh :)
05:26 japhb What's on your mind about macros this fine UGT, masak?
05:27 masak oh, nothing in particular
05:27 masak but since I started my vacation 1.5 weeks ago, my head has -- unexpectedly -- filled up with 007 ideas
05:28 masak I've come to realize that in the short term, the most important goal for 007 is to get to the point where it can exhibit some significant macro ideas in the form of real, usable examples
05:28 masak see https://github.com/masak/007/issues/194
05:28 masak (if that issue and the picture it paints excites you, please let me know! I need the cheering-on) :)
05:40 kurahaupo_ joined #perl6
05:43 japhb masak: I *love* that the 007 issues are deeply hyperlinked.  It's like watching you think.  :-)
05:43 japhb And yeah, several of the issues I read make me wish for this in Perl 6.  :-)
05:47 pyrimidine joined #perl6
05:48 pyrimidi_ joined #perl6
05:50 masak yaaay
05:50 masak japhb: it sounds ridiculous, but that means a lot <3
05:51 masak japhb: my current stance on macros is something like... "yeah, they're complicated and have a lot of surprising behaviors. but almost certainly all that complexity is essential."
05:56 masak (thinking mostly about quasis, unquotes, and the intricacies of scoping when ASTs get copy/pasted all over the place)
05:56 bjz_ joined #perl6
05:58 japhb Yeah, that seems clear at this point.  You seem to be exploring a nearly fractal problem space.  I just hope that it turns out to be a fractal with a finite generating function.  :-)
06:01 kurahaupo joined #perl6
06:02 masak I just hope that whatever working solution I come back with gets buy-in from the Perl 6 brass
06:02 masak :)
06:02 masak (so far so good. both jnthn and TimToady seem positively inclined towards Qtrees)
06:02 japhb The issues I looked at seemed to be converging on ideas that weren't out of line with Perl 6 design motifs, so that's a start
06:04 masak oh, I'm deliberately holding onto the red thread as I keep getting lost in the maze :P
06:05 japhb :-)
06:05 * masak .oO( or, keeping one hand on the Wall )
06:05 masak the story that macros keep wanting to disrupt the most, I think, is that of grammars, slangs, and braids
06:06 masak I still don't know how those things will end up co-existing peacefully
06:07 japhb masak: Is TimToady's work to merge the parsing dynvars into the cursor helpful on that front?
06:07 masak more to the point, as TimToady seems to have lost faith in `is parsed` mechanisms, I've gained more of it
06:07 masak japhb: I saw that work the other day. I need to think about whether 007 will have cursors.
06:08 masak japhb: so far, I've been thinking of an ambient "Parser" type that anything language-extending would interact with explicitly or implicitly.
06:08 masak japhb: something that wants to "export" a language extension to a using module would grab hold of the using module's Parser and modify it
06:09 masak japhb: I love the DI-ish way in which both user and usee end up negotiating with a `use` statement in that case :)
06:09 japhb Ah, interesting
06:09 masak (module A does `use` on language-extending module B, which does a `use` to grab A's Parser)
06:10 bjz joined #perl6
06:10 japhb And re: is parsed, I suspect working code will be the strongest argument.  :-)
06:10 masak hence the current new focus :)
06:15 Tonik joined #perl6
06:37 rurban joined #perl6
06:39 hartenfels joined #perl6
06:47 CIAvash joined #perl6
06:50 pyrimidine joined #perl6
06:50 bjz joined #perl6
07:05 Sgeo joined #perl6
07:08 darutoko joined #perl6
07:11 AlexDaniel joined #perl6
07:22 rurban joined #perl6
07:47 lizmat joined #perl6
07:49 Actualeyes joined #perl6
07:52 pyrimidine joined #perl6
07:53 wamba joined #perl6
08:08 jjido joined #perl6
08:12 bjz joined #perl6
08:16 xtreak joined #perl6
08:33 pyrimidine joined #perl6
08:58 RabidGravy joined #perl6
09:01 bjz_ joined #perl6
09:03 dogbert2 joined #perl6
09:09 RabidGravy MORNIN!
09:11 jluis joined #perl6
09:18 espadrine joined #perl6
09:20 KDr2 joined #perl6
09:27 lizmat joined #perl6
09:40 jluis joined #perl6
09:42 kyan joined #perl6
09:44 jjido joined #perl6
09:48 jluis joined #perl6
09:57 bjz joined #perl6
10:06 moritz \o
10:17 lukaramu joined #perl6
10:19 RabidGravy Boom
10:20 lizmat joined #perl6
10:27 Geth ¦ doc: ac6c65fce9 | (Jonathan Stowe)++ | doc/Type/Exception.pod6
10:27 Geth ¦ doc: Invocant not argument
10:27 Geth ¦ doc: review: https://github.com/perl6/doc/commit/ac6c65fce9
10:27 Geth ¦ doc: a4ed752537 | (Jonathan Stowe)++ | doc/Type/Exception.pod6
10:27 Geth ¦ doc: method fail is not a multi
10:27 Geth ¦ doc: review: https://github.com/perl6/doc/commit/a4ed752537
10:27 cyphase_eviltwin joined #perl6
10:28 dogbert17 joined #perl6
10:45 mxco86 joined #perl6
10:49 pyrimidine joined #perl6
11:04 ocbtec joined #perl6
11:06 wamba joined #perl6
11:13 wamba joined #perl6
11:20 wamba joined #perl6
11:20 pmurias joined #perl6
11:25 wamba joined #perl6
11:35 drrho joined #perl6
11:37 wamba joined #perl6
11:42 hartenfels joined #perl6
11:50 pyrimidine joined #perl6
11:53 parv joined #perl6
11:55 rindolf joined #perl6
11:59 RabidGravy I think that removing the git submodules of themselves from all my modules which I accidentally created with a thinko the other day
12:08 pyrimidine joined #perl6
12:08 cyphase joined #perl6
12:11 pmurias masak: re slangs and macros, IMHO it seems important that the abstraction we are building scales up from small macros to big slangs
12:14 espadrine joined #perl6
12:21 cyphase joined #perl6
12:23 andrzejku joined #perl6
12:28 sena_kun joined #perl6
12:31 RabidGravy for anyone who is as stupid as I am https://gist.github.com/jonathanstowe/c0b5be2abb2f45d5b1018984f7dcf6ae
12:31 ttt joined #perl6
12:31 AlexDaniel joined #perl6
12:42 timotimo MasterDuke: i think i know the solution, or at least the reason, to why your code up there takes so much time in GC
12:43 timotimo you know how our GC is a "moving" GC? it has to update pointers in objects that point to other objects
12:43 timotimo and you're adding a whole bunch of entries to your hash, these strings will all be eligible to have their pointer (as stored in the hashes storage area) updated every time you GC
12:43 timotimo another thing is, your code is likely generating hardly any extra garbage on top of what you're adding to the hash
12:44 timotimo so you're filling up the nursery with, let's say, 90% string objects that all go into the hash
12:44 timotimo then we run GC and we can only free up 10% of the nursery. objects get promoted to the second gen if they've survived their second stay in the nursery
12:45 timotimo which means the next gc run you'll free up those 90% from two times earlier, and keep the 10% you had before
12:45 timotimo but then it's 90%/10% again, then 10%/90%
12:45 MasterDuke very interesting
12:45 timotimo same kind of behavior as adding a gigantic amount of Int objects into an array
12:45 timotimo and that's also why having a native int array in that case is a whole lot more efficient
12:45 timotimo because it doesn't even have to go through the array for every GC
12:46 timotimo a possible solution to help with this is called "buddies" (OSLT)
12:46 timotimo where we figure out at the bytecode level that all those strings you're creating are immediately going to be bound to that hash
12:46 timotimo and if that hash is already in the second gen, we'll just go ahead and assume that the string also wants to be put into the second gen
12:46 timotimo that'll mean the nursery will not even get all those string objects, and GC will run much less often
12:47 jnthn Pre-tenuring
12:47 yoleaux 3 Feb 2017 22:46Z <brokenchicken> jnthn: is `has $foo` (note, no twigil) supposed to be a working syntax for creating private attributes, as it does now, or should that throw?
12:47 jnthn Or pretenuring
12:47 timotimo aye
12:47 timotimo i was refering to the mechanism by which pre-tenuring is decided
12:47 jnthn .tell brokenchicken Yes, it is. Pretty sure it's test-covered also.
12:47 yoleaux jnthn: I'll pass your message to brokenchicken.
12:47 MasterDuke cool. how difficult is that?
12:47 timotimo but i think "buddy" is the wrong term
12:47 jnthn Depends on the scheme you pick to decide how to do it.
12:48 jnthn It's not trivial, and you really don't want to have a lot of false positives
12:48 timotimo i think i had it from that paper we had that also suggested having per-allocation-site statistics
12:48 jnthn Yeah, that's one way to do it
12:49 jnthn Can also keep stats at the write barrier
12:50 jnthn Another approach that may help is to, when we hit the write barrier, flag objects that have been assigned into a gen2 thing
12:50 jnthn And then don't give them another life in the nursery, but promote them right off
12:50 jnthn That's comparatively easy
12:50 jnthn And probably handles this case pretty well
12:52 RabidGravy ooh that's annoying, the "PiLite" won't fit on a RPi 2 or 3 as the extra USB sockets get in the way
12:53 timotimo is that just an irridescent light bulb that you can plug into the gpios? :)
12:53 timotimo incandescent*?
12:53 jjido joined #perl6
12:53 RabidGravy so that's one thing off the list today as I can't be bothered to find a gpio cable
12:54 RabidGravy it's like a 9x14 matrix of LEDs on a board
12:54 jnthn I wonder if you can cheaply do contagion so you can promote entire object graphs...
12:55 Tonik joined #perl6
12:55 MasterDuke jnthn: never having written a line of GC code in my life, is that something i could figure out how to do (your comparatively easy option)? or would it be better to leave that for you, timotimo, etc?
12:56 timotimo we'll have a zombie apocalypse on our hands in no time
12:56 RabidGravy it's actually a cheating thing as it's basically an almost identical thing to an arduino with a similar shield and some firmware so it can be controlled by the RPi
12:56 timotimo heh.
12:56 jnthn MasterDuke: Depends how adventurous you are :)
12:57 jnthn MasterDuke: It's not immediately obvious to me how best to do it, fwiw, and I wrote most of the GC in Moar. :)
12:57 timotimo what, you can't just flip the "has been seen in a nursery collection" bit in the assignee whenever you hit the generational barrier? :)
12:57 timotimo i wonder why it's not as easy as that. it's just GC code, right?
12:57 MasterDuke jnthn: somewhat adventurous, but i think not that much then
12:58 timotimo could you output the stats from the GC for your hash assignment workload and verify that it does the flippy-floppy thing?
12:59 MasterDuke sure, how do i get those stats?
12:59 _Vasyl joined #perl6
12:59 timotimo doesn't the sql-version of the profiler output all the same stuff the json one does?
13:00 MasterDuke yeah
13:00 timotimo then there should be a GC table of some description
13:01 timotimo it ought to have one row for each time the GC ran, and it ought to tell you all manner of stuff, like how long it took, whether it was a full gc, how many bytes were thrown out, how many were kept in the nursery, and how many were put into the gen2
13:01 jnthn timotimo: We could do it with bit flipping, though I'd be more tempted to do it at the point of GC
13:02 jnthn timotimo: Another option is a sentinel in the worklist, which avoids a read/write on the object header
13:02 cyphase joined #perl6
13:02 timotimo ah, basically a "the previous object wants to have its nursery bit activated" command?
13:03 jnthn Well, or "previous object is referenced from a gen2 root
13:03 jnthn "
13:03 timotimo or even "next object"
13:03 jnthn Yeah, next object was my thought
13:03 jnthn Though it'd bloat the list up a bit
13:03 jnthn So hmm :)
13:03 timotimo hm.
13:03 timotimo could do run-length encoding
13:03 jnthn I think it wants to be handled at worklist level though
13:03 timotimo and keep a bit of state for that
13:04 jnthn So when we scan an object which we know we're going to promote, then we can also mark its children as things to promote
13:04 MasterDuke timotimo: this is the schema for the gc stuff `CREATE TABLE gcs(time INT, retained_bytes INT, promoted_bytes INT, gen2_roots INT, full INT, cleared_bytes INT);`
13:04 jnthn That's the contagion bit. :)
13:05 timotimo jnthn: does the heap analyzer already track whether an object was part of gen2 or nursery at the time of measurement?
13:05 gdonald joined #perl6
13:05 timotimo maybe we can figure out if contagion can be that easy, or if it'd spill all over the place by accident
13:05 timotimo could very well be that the best way to figure it out is to just try a bunch of workloads after actually implementing that
13:06 jnthn timotimo: No, but you can see whether an object is alive via the gen2 roots
13:06 jnthn It feels unlikely to spill to me
13:06 jnthn You'd need a cyclic data structure for there even to be a risk, I'd think
13:07 timotimo ah. we want to have that thing where we make gen2 roots "invisible" anyway, so that could go in the same area (if it'd even be interesting to have in the first place)
13:07 jnthn And while meta-objects are of course chock full of those, they start out in gen2 anyway
13:07 timotimo well, actually, you meant to have a per-edge cost that we could bump up for the gen2 roots
13:07 jnthn Well, in a nursery collect, gen2 objects themselves are simply never put into the worklist
13:07 jnthn We filter at point of entry
13:07 jnthn That saved us quite a lot :)
13:07 timotimo oh, of course we do
13:10 pyrimidine joined #perl6
13:12 jnthn lunch &
13:22 adu joined #perl6
13:22 [particle] joined #perl6
13:29 cyphase joined #perl6
13:32 sena_kun how to make run/shell blocking?
13:33 timotimo run already blocks
13:33 timotimo perl6 -e 'run "sleep", "10"'
13:35 sena_kun hmm...
13:36 timotimo are you also supplying :out or something?
13:36 timotimo huh. the docs don't even say a single word about :out
13:37 sena_kun I'm trying to run make command, but it seems that it forks, becomes init child and closes process immidiately. But I need to wait for the command to finish it's job.
13:37 sena_kun It says. I printed :out and I omitted it, but the result was the same.
13:37 timotimo anyway, if you have :out for run, you also need to .out.slurp-rest
13:37 timotimo otherwise your process will just continue happily and probably soon finish
13:38 sena_kun Ah, perfect.
13:38 timotimo https://docs.perl6.org/language/ipc
13:38 sena_kun Yes, I passed :out and it was finished before the actual job.
13:38 timotimo the "proc" section tells about :out
13:39 timotimo please note that there's currently a bug where the exitcode you get at the end is always 0
13:39 sena_kun Oh.
13:39 sena_kun It makes my work totally useless.
13:39 gdonald joined #perl6
13:40 sena_kun any chances to fix it soon?
13:42 sena_kun Ah, does it works only if :out is passed? Then it is not so useless as I though.
13:43 timotimo only when you have :out, yes
13:43 timotimo or you could use Proc::Async
13:43 timotimo i don't think that has that bug
13:46 pyrimidine joined #perl6
13:47 jnthn You also need to .close the .out handle
13:47 jnthn It's not until you clsoe it that the process exit code becomes available
13:47 jnthn So many people stub their toe on this that I think we might want to make asking for the exit code before its available fatal, or at the very least a Failure
13:47 bjz_ joined #perl6
13:47 timotimo oh, .slurp-rest doesn't close unless you :close, i think
13:47 jnthn Right
13:48 timotimo maybe that's the reason it doesn't give the proper exitcode?
13:48 jnthn I saw a blog post recently where somebody thought they'd found a bug in Rakudo, but no, they just didn't understand the API.
13:48 jnthn But this trips enough people up that we should probably question the API design some by now :)
13:48 timotimo unix ipc can be hard if you don't read anything about it and just wing it
13:48 timotimo aye
13:48 timotimo we can certainly help users
13:48 jnthn Yeah, I actually think Proc::Async is easier to work with in this sense. :)
13:48 sena_kun sure, I've read RT ticket already. But I just need to run a bunch of scripts(the output doesn't matter) and collect exitcodes.
13:49 jnthn If the output doesn't matter then you don't need :out ?
13:49 jnthn Or you just want to discard it?
13:49 sena_kun Yep.
13:49 sena_kun I don't need it.
13:50 sena_kun That's why this "bug" doesn't affect me as it seems.
13:51 adu joined #perl6
13:53 jluis joined #perl6
14:02 masak pmurias: re scaling up from small macros to big slangs -- yes, agree.
14:03 masak pmurias: but that's one of those "need to try it to figure out how that works" things, I believe
14:03 masak we probably can't get to where we want to be without iterating a bit on the solution
14:05 bwisti joined #perl6
14:05 Geth ¦ doc/language-section-examples2: 43cc319e0f | Altai-man++ | 11 files
14:05 Geth ¦ doc/language-section-examples2: Cleanup some examples
14:05 Geth ¦ doc/language-section-examples2: review: https://github.com/perl6/doc/commit/43cc319e0f
14:09 masak pmurias: if I were to *guess*, though, the transition from multiple macros to a slang might feel a little bit like the transition from multiple functions (and procedural programming) to a class (and OOP)
14:09 masak 'night, #perl6
14:09 sammers joined #perl6
14:13 KDr2 joined #perl6
14:17 BenGoldberg joined #perl6
14:20 RabidGravy maybe it's time to split the rest method trait stuff out of Sofa for more general re-use
14:21 * RabidGravy is giving some love to WebService::Soundcloud
14:27 MasterDuke jnthn, timotimo, TimToady: in the native str code i was playing with last night (`my str $a = "a" x 2**29`, from RT #127972), the perf record showed 47% of the time in `..._latin1_[encode,decode]...`. why was anything latin1 in the first place? i would expect utf8 or ascii
14:27 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=127972
14:27 timotimo MasterDuke: i have a theory that relates to precompilation
14:27 timotimo but it's not very likely
14:29 MasterDuke hm. adding `no precompilation` doesn't change the run time for me
14:34 cale2 joined #perl6
14:35 cale2 samcv: check that PR on your atom as an ide repo
14:35 MasterDuke timotimo: i wondered if it was my LANG, but it's set to en_US.UTF-8. i tried with it set to C, but same result
14:36 timotimo we don't care about that
14:36 timotimo it could actually be that it's not precompilation but "just" compilation
14:37 timotimo like, maybe we constant-fold the string into a big blob, and we figure out we can just store it as ascii in the string heap
14:37 jjido joined #perl6
14:37 timotimo so we encode it as ascii at the end of compilation, then immediately decode it from ascii at the beginning of runtime
14:38 MasterDuke that sounds reasonable, but you mean store as latin1?
14:39 timotimo yes
14:39 timotimo that is indeed what i mean
14:39 MasterDuke oh, a profile of the run time is just 1s, but a profile of the compilation is 9s
14:39 timotimo well, there we go then :)
14:40 timotimo we don't have a mechanism to tell the constant folder when we think it's a bad idea to constantfold something
14:40 MasterDuke with all the time spent in `assemble_and_load (gen/moar/stage2/QAST.nqp:6575)`
14:40 pierrot joined #perl6
14:40 timotimo because when we store "a" xx 100000000000000 we just have the string "a" and the modifier "10000000000000000000000000 times"
14:40 timotimo but stuff we store in the string heap doesn't have that feature at all
14:40 MasterDuke well, even so, why would it pick latin1?
14:40 timotimo because "a" doesn't have any characters post latin1 in it
14:41 MasterDuke it doesn't have any post ascii either
14:41 timotimo no, but latin1 is all of ascii and then the next 127 characters that it has in common with unicode
14:41 timotimo whereas ascii wastes 1 whole bit per character
14:41 MasterDuke ah, didn't realize that
14:42 timotimo :)
14:42 timotimo though to be fair, we still have to look through the whole string to see if there are any \n in there
14:43 BenGoldberg If you've got a text string without any high bits set, it's impossible to distinguish whether it's ascii, latin1, or even utf8.
14:43 timotimo because then we need to put in a synthetic
14:43 timotimo that is correct
14:43 timotimo there's even some ascii texts that aren't distinguishable from utf16 :D
14:47 _Vasyl joined #perl6
14:47 pyrimidine joined #perl6
14:52 MasterDuke timotimo: would the total run time be faster if that wasn't constant folded?
14:52 timotimo i'm sure of it
14:52 timotimo try --optimize=off
14:52 cale2 what's the easiest way to upgrade your version of perl6?
14:53 timotimo cale2: how did you install your current perl6 version?
14:53 cale2 Like how do I upgrade without disturbing my current stuff that relies on it?
14:53 MasterDuke timotimo: 0.14s
14:53 timotimo what was it with optimization on?
14:54 cale2 I don't recall... But there's ~/.perl6 and my PATH currently has perl6 included
14:54 MasterDuke 9s
14:54 timotimo yeah, that aligns with my expectation
14:54 timotimo the .perl6 folder has one folder for every perl6 version you have
14:54 timotimo in my case ... quite a few more than i actually have :D
14:54 timotimo 42 folders inside my ~/.perl6
14:54 cale2 timotimo: I'm honestly afraid to upgrade. everything is finally working haha
14:55 bjz joined #perl6
14:55 cale2 I thought rakudobrew would help out, but that was problematic
14:55 timotimo i have no clue what kind of trouble you had to go through to have it "finally working"
14:55 timotimo rakudobrew can be quite fiddly
14:55 timotimo i'll always remember that one bug that nuked one user's system
14:56 cale2 Also, why would zef install itself here: /usr/local/Cellar/rakudo-star/2016.11/share/perl6/site/bin
14:56 timotimo they had symlinked ~/.rakudobrew/bin or something to their /usribin
14:56 timotimo /usr/bin*
14:56 cale2 Am I supposed to add that to the PATH?
14:56 tadzik *shudders
14:56 timotimo and rakudobrew was like "okay, time to install the new rakudo version. rm -rf ~/.rakudobrew/bin/*"
14:56 timotimo yeah, that belongs in the PATH
14:56 MasterDuke cale2: i have a system perl6 that i install with my OS's package manager. i also have the source checked out and build that when i'm working on it
14:56 cale2 Why wouldn't it have a zef directory? Is it linked to your current perl6?
14:57 timotimo zef is a module installer for perl6
14:57 timotimo it installs modules where perl6 looks for them
14:57 timotimo (and also binaries go in the same general place)
14:57 cale2 MasterDuke: Ahhh I may have used homebrew to install now that I remember it
14:57 timotimo maybe you're looking for zefef, which is a module installer for zef. it installs zef modules where zef looks for them :P
14:57 timotimo gotta go AFK for a bit
15:00 MasterDuke timotimo: for when you get back. adding some heuristics to choosing when to constant fold, would that be done in rakudo or moarvm?
15:00 timotimo it's a hairy question
15:00 timotimo the only thing that'd know whether to constant fold in this case is the x operator
15:01 MasterDuke hm. it could make a guess based on lhs.chars * rhs?
15:01 timotimo we can't really say "don't do the constant fold if it creates a string that's too big", because 1) what does that even mean?!, 2) we constant fold much more stuff than just creating strings
15:01 timotimo it could, but how does it communicate to the optimizer?
15:01 timotimo i mean, the optimizer already knows about a bunch of subs and operators anyway
15:01 MasterDuke magic
15:02 timotimo so we might as well tell the optimizer "look, if you're looking at an x operator that comes from the core setting, also do this extra check"
15:02 timotimo actually
15:02 timotimo we might never ever want to constant fold infix:<x> at all
15:03 timotimo except maybe when its RHS is 1 or 0
15:03 MasterDuke oh?
15:03 timotimo hm.
15:04 timotimo except when you have the string in storage, you only pull it out once
15:04 timotimo by storage i mean in the serialized blob
15:04 timotimo ugh. it is hairy, is what it is.
15:06 timotimo i'm not sure if we create a clone of the string object when we pull something out of the serialized blob. we might? or might have to ...
15:08 BenGoldberg I thought the x operator made a ropelike thing, so as to avoid allocating huge amounts of memory.
15:08 timotimo exactly
15:08 timotimo then that ropelike string gets put into the string heap
15:08 timotimo which cannot store ropes
15:08 timotimo so it turns it into a regular string
15:08 BenGoldberg Ahh.
15:09 timotimo that's the conundrum
15:09 BenGoldberg Add a heuristic to the act of adding strings to the string heap, then.
15:10 BenGoldberg So if you try to add a rope to the string heap, and the rope would stringify to something huge, don't stringifiy the rope and don't add it to the string heap.
15:11 timotimo can't do that
15:11 BenGoldberg Why not?
15:12 timotimo hm, actually
15:12 timotimo maybe it is possible after all
15:12 timotimo we could have a special version of adding stuff to the serialized blob that checks the whole object graph first
15:13 timotimo the thing is, we can't really do a "go back and undo that" here
15:13 MasterDuke there is a check for string size already `if (bytelen > 0x3FFFFFFF) { cleanup_all(vm, ws); DIE(vm, "String too long for string constants segment"); }`
15:13 timotimo someone smarter than me could figure it out
15:13 BenGoldberg Actually, for a big rope, we might want to put it's lesser component strings into the string heap.
15:13 timotimo haha
15:13 timotimo that will already have happened
15:13 timotimo because where else is it going to come from, if we're already constant folding
15:14 telex joined #perl6
15:15 BenGoldberg Why can't ropes be stored as themselves, then?
15:15 timotimo because we haven't implemented anything for that
15:15 timotimo i don't think ropes are common in user programs
15:16 BenGoldberg Every ~ and x creates a rope.
15:16 BenGoldberg AFAIK
15:16 BenGoldberg Or at least they ought to.
15:16 BenGoldberg And @array.join, and ... every type of string concatenation.
15:16 timotimo yes, ~ and x both do
15:17 timotimo how often are the results of that actually constant?
15:17 timotimo in a matter that makes the ropeness meaningful?
15:17 pyrimidine joined #perl6
15:18 BenGoldberg ropeness should be invisible from the user's POV.
15:18 BenGoldberg So the only time the ropeness is meaningful is if it reduces memory.
15:20 KDr2 Is the syntax of nqp documented anywhere? Either the full syntax or the difference between nqp and perl6
15:21 timotimo that's not what you mean, but we have a list of nqp:: ops and short descriptions of what they do in nqp/docs/ops.markdown
15:27 timotimo anyway
15:27 timotimo feel free to implement rope storage in the string heap
15:27 timotimo though it might require a version bump of some kind
15:27 timotimo so that the stage1 and precompiled files and such get treated right
15:31 mienaikage Downloads page links to latest but still shows 2016.11 for R*, anyone know where to go to change it?
15:40 cale2 Ideally, would the docs be hosted in the form of an api? So that any website could just grab doc data by issuing a GET to "perl6.org/types/Date" for example?
15:40 cale2 I'm just thinking about the work that it would take to host the docs on a different website
15:40 cale2 With everything currently written in POD format, it's not very universal
15:43 rindolf joined #perl6
15:47 KDr2 for example, I want to know what dose ":my $x ..." mean in a token/rule block, is there any doc about it? thanks
15:47 rindolf KDr2: hi
15:47 KDr2 rindolf, hi?
15:49 rindolf KDr2: just wanted to make sure you don't leave without an answer
15:49 rindolf KDr2: can you show an example to what you mean?
15:50 KDr2 https://github.com/perl6/nqp/blob/master/src/NQP/Grammar.nqp#L106
15:50 KDr2 the lines start with ":my "
15:51 KDr2 is it legal perl6 syntax? or only for nqp?
15:51 KDr2 it's hard to search on the web
15:52 rindolf KDr2: isn't nqp a subset of p6?
15:52 timotimo cale2: but they could just generate the same stuff from the source that we put onto doc.perl6.org?
15:52 timotimo not a true subset
15:52 timotimo :my $foo is also allowed in perl6 code
15:54 cale2 timotimo: Another issue that should be solved for is the duplication of docs. `comb` is in the Cool type and Str type as well. In both places the information differs just slightly. I think there should be _some_ kind of storage for this stuff other than just plain text/POD
15:55 KDr2 I didn't find document about it, neither in nqp doc and perl6 doc, which section should I refer to?
15:55 timotimo oh, yeah, the one for Cool: doesn't have most of the candidates
15:55 cale2 for example, perhaps making the docs just a database of entries? That way you can just access pull the information from the database and insert it into Cool and Str, both
15:56 timotimo KDr2: seems like noone doced anything about it yet; the last resort would be the test suite ... or even laster resorter the synopses
15:56 cale2 I'll open an issue on docs and get some opinions
15:59 MasterDuke timotimo: re string/rope constant folding, what do you think is the easiest optimization to do in the short term?
16:00 timotimo put in a special check for &infix:<x> in the optimizer where it tries to constant fold things
16:00 MasterDuke `next unless rhs == 0|1`?
16:00 timotimo or remove "is pure" from &infix:<x>
16:01 timotimo well, it could multiply LHS and RHS and check for some threshold?
16:01 MasterDuke what would be a reasonable threshold?
16:01 timotimo i haven't a clue
16:02 timotimo we can't ask a string for its storage format, so we can't really say "1kb of data"
16:02 timotimo we could be wrong by 4x
16:04 ocbtec joined #perl6
16:05 adfg joined #perl6
16:06 adu joined #perl6
16:06 MasterDuke interesting. "a" x 2**28 takes the same amount of time as "aa" x 2**27
16:07 BenGoldberg joined #perl6
16:07 MasterDuke it does seem to be a direct relationship of lhs * rhs
16:07 timotimo yeah, that makes sense to me
16:07 timotimo the biggest part is spent going through the chunk of memory that needs to get written and then read again
16:08 BenGoldberg I'd say set the limit to say, 1k chars, and accept the uncertainty about the bytes.  At the very worst, 1k chars can't be bigger than 1k bytes ;)
16:08 BenGoldberg Err, can't be bigger than 4k bytes.
16:09 MasterDuke BenGoldberg: so you're suggesting `next if lhs.chars * rhs > 1024`?
16:09 timotimo fair enough
16:10 BenGoldberg Yup.
16:11 timotimo the sizes of your computer's cache might play a role here, since just reading the string from the storage into an MVMString's storage can easily push out everything else that used to be in the cache
16:11 timotimo and of course memory pressure is always bad
16:11 BenGoldberg Or, try a few different constants, and see what results in the best performance.
16:12 BenGoldberg 2**$n, for some $n. ;)
16:14 timotimo yeah, time it for many values that happen to be around cache sizes for L1, L2, L3
16:14 timotimo might not have to go as far as the size of your whole ram, the size of your hard drive, and the size of amazon's cloud storage.
16:16 MasterDuke 0.13s
16:17 MasterDuke let me just test i didn't break any spectests and then i an experiment with sizes
16:18 MasterDuke timotimo++, BenGoldberg++
16:19 pyrimidine joined #perl6
16:20 BenGoldberg ☺ :)
16:21 MasterDuke whoops, some of the repeat tests failed already
16:22 timotimo can you paste the diff? maybe there's something obvious i can spot?
16:22 cale2 I feel like I keep suggesting things that are only muddying the waters. That's not my intention though haha
16:23 timotimo i'm mostly confused as to what you mean by database
16:23 MasterDuke https://gist.github.com/MasterDuke17/2bc8e6edf1beaf47907cd2b66d5d2f43
16:25 cale2 timotimo: https://github.com/perl6/doc/issues/1183
16:25 sena_kun cale2, write some kind of Pod-To-JSON module ==> Make a rest service out of it ==> ??? => Profit!
16:25 cale2 sena_kun yes
16:25 MasterDuke there's a section of the code later on that already does the has_compile_time_value check, should probably move my change to there
16:25 cale2 The issue as I see it is that the docs DATA is very tightly coupled to the DISPLAY on the website
16:25 timotimo i don't think it belongs as an elseif there
16:26 timotimo hm.
16:27 timotimo i'd move the whole bit below the general check if all arguments have compile time values
16:27 MasterDuke yeah, gonna try that now
16:28 sena_kun cale2, the intention is good, but... Tbh, we lack of manpower in docs field. There are currently a lot of issues on our hands that are much more important. If you want to dig into this sadly, most likely you have to do it yourself.
16:29 sena_kun s/this sadly/this, sadly/
16:30 MasterDuke timotimo: not sure about the $survived stuff, should it be `if $survived and $op.name eq '&infix:<x>'`?
16:31 timotimo i'd put it before the "if $all_args_known"
16:31 cale2 sena_kun: understandable. I may do just that :P
16:31 timotimo also, if you're just checking the name, you won't bail out properly if the user provides their own &infix:<x>
16:31 sena_kun cale2, your work will be appreciated a lot. ;)
16:32 MasterDuke before? don't i need to know the values for the heuristic?
16:33 MasterDuke what would i check other than name?
16:33 timotimo not the return value
16:33 cale2 sena_kun: The tricky part is figuring out how to organize OO style functions. Do you make a hierarchy of types and then list the methods they have? Or do you make a list of subs and list the types they are attached to?
16:33 timotimo there's an "is_from_core" but that's not quite the same thing
16:33 timotimo wait a minute
16:33 timotimo it is the right thing
16:34 timotimo we are talking about call("&infix:<x>", ...), right?
16:34 MasterDuke yep
16:34 sena_kun cale2, if you plan to work only on Type/ section, I think, you can extract first explanatory paragraph as "description" and every method as a field. Cool.comb, Str.comb. I don't think we need to preserve type graph here.
16:35 timotimo perfect, then check $!symbols.is_from_core('&infix:<x>') after you've checked the name matches
16:35 cale2 sena_kun: part of the issue I'm solving for is the duplication of explanations though.
16:35 sena_kun When I'm looking for comb method of Str, I don't want to type Mu.Any.Cool.Str.comb, I want to just type Str.comb.
16:37 cale2 sena_kun: if an API is built from the JSON structure, you would have the logic control that I would imagine.
16:37 MasterDuke timotimo: k. and the check that sets $all_args_known also checks the return value? that's why i don't want to be after it?
16:37 cale2 sena_kun: You would type "Str.comb" and it would look up the chain until it finds it
16:37 KDr2 finally find it: https://github.com/perl6/roast/blob/master/S05-modifier/my.t#L22
16:38 sena_kun cale2, duplication is bad for sure, but it not always plain copy-paste of the same text. Explanations of comb for Str and for Cool are different.
16:38 timotimo nah, the return value gets built when $ret_val gets assigned
16:38 timotimo but running the function is the first thing that happens after $all_args_known is true
16:41 cale2 sena_kun: right. That's why I think Str explanation of comb should be `Cool.comb + "my extra stuff specific to Str here"`
16:42 MasterDuke this would go a whole lot faster if i could type the names of variables correctly and remember whether i'm writing Perl 5 or Per l6
16:42 Geth ¦ doc: fc2b783820 | timo++ | doc/Language/ipc.pod6
16:42 Geth ¦ doc: point out the need to close a proc's out/err
16:42 Geth ¦ doc: review: https://github.com/perl6/doc/commit/fc2b783820
16:42 timotimo ^- refinement would be quite accepted
16:42 timotimo especially a nice way to get .slurp-rest(:close) in there
16:43 timotimo that'd usually be an idiom people would use
16:44 MasterDuke timotimo: maybe something like "the program will usually not terminate and you can't get the exit code (it will always be 0 until closed)."
16:45 pyrimidine joined #perl6
16:45 sena_kun cale2, to rebuild from scratch docs you'll need a workers squad. :) Not so long ago I've reviewed all the docs for an example output style subject. It is "easy", but there is a damn huge load of work and I felt myself like dead when I finished it.
16:46 sena_kun *rebuild docs from scratch with some constraints/updates
16:46 timotimo fucking hell rt is such a piece of fucking shit sometimes
16:46 cale2 sena_kun: What are the options for parsing perl6 pod format?
16:46 cale2 or converting rather.
16:46 MasterDuke timotimo: `===SORRY!=== This type cannot unbox to a native number: P6opaque, Failure` when trying to run t/spec/S03-operators/repeat.t
16:47 sena_kun cale2, rakudo already does that and you can access it through special variables iirc. You can look at Pod-to-HTML or something similar to get the idea how it works.
16:47 MasterDuke the code i was timing runs, so it's not completely broken
16:48 MasterDuke timotimo: updated the gist with current diff
16:48 brokenchicken
16:48 yoleaux 12:47Z <jnthn> brokenchicken: Yes, it is. Pretty sure it's test-covered also.
16:48 brokenchicken cool
16:48 pyrimidine joined #perl6
16:50 timotimo cale2: you can only run it via a perl6 --doc=HTML or similar %)
16:50 BenGoldberg joined #perl6
16:55 cale2 So how do these pages work? https://docs.perl6.org/routine/comb The original definitions are inside the Type and then these pages pull in those original definitions and concat them/
16:56 pmurias MasterDuke: are those $str x $huge-number strings common?
16:56 MasterDuke cale2: it's kind of a beast, but the code that builds the docs is here: https://github.com/perl6/doc/blob/master/htmlify.p6
16:56 sena_kun cale2, yes. You can look into htmlify.p6 to see how it works. But it is kinda scary.
16:57 RabidGravy just added "auto-kebab" to JSON::Infer if anyone uses it
16:57 brokenchicken MasterDuke: I recall you pushing commits to the coverage tool. Is it totally fixed now or some more fixing is needed?
16:57 MasterDuke pmurias: no idea
16:57 pyrimidine joined #perl6
16:57 timotimo i'd like to tell sinan "your argument is invalid" for the last four paragraphs (that is counting the code block as a paragraph)
16:58 MasterDuke brokenchicken: i believe it's fixed in the sense that it should work like it did before. i didn't do any of the optimizations timotimo has mentioned could be done
16:58 brokenchicken MasterDuke++ cool thanks :D
16:58 pmurias MasterDuke: there are a lot of places where we could optimize the constant folding of them but that doesn't mean we should do that
16:59 MasterDuke pmurias: "them" == $str x $huge-number?
17:01 MasterDuke pmurias: why not? sure, you might not want to try and optimize every conceivable situation, but that particular one went from 9s run time to 0.15s, seems a decent roi
17:04 cale2 Has no one written a Grammar for parsing POD files?
17:04 cale2 That seems like an obvious target for grammars
17:05 timotimo yeah, there's a grammar for parsing POD files inside rakudo :P
17:06 Eddward joined #perl6
17:06 cale2 timotimo: Why isn't that a separate module? If we had that grammar, wouldn't it be trivial to do conversions?
17:06 timotimo because pod can come in at any point during rakudo code parsing
17:07 timotimo and we want to attach pod objects to methods/parameters/classes/roles/... when we parse stuff like that
17:07 sena_kun cale2, see https://github.com/perl6/perl6-pod-to-bigpage/blob/master/bin/pod2onepage as example. You can access pod6 directly from your perl6 code, without any module. It is builtin.
17:07 timotimo those are the reasons for making the pod grammar a first-class part of the perl6 grammar
17:08 timotimo the reason why you'd want to have it separately is that your "document" can run code while it's getting parsed
17:08 cale2 sena_kun: that's the grammar?
17:09 sena_kun cale2, no, it is an example how you can access already parsed pod.
17:10 pmurias MasterDuke: did you use that in real code or in an artifical benchmark?
17:12 MasterDuke pmurias: artificial benchmark after i noticed some real code was slow in a spot i didn't expect. unfortunately that was almost a year ago and i don't remember how realistic the real code was
17:18 Eddward .... from the peanut gallery, a language that trivially supports "maliciously formed documentation" sounds like something it would never live down.
17:20 cale2 Eddward: A language that supports a walled garden for documentation is something that doesn't seem quite right
17:21 Eddward cale2: So is the issue that if it's first class, it'll do things like run BEGIN blocks which parsing?
17:22 Eddward And if it's not first class you can't do things lke attach doc strings to classes & subroutines?
17:24 Eddward oops   which = > while
17:25 MasterDuke timotimo, pmurias: FWIW, it now passes `make m-spectest`. also i updated https://gist.github.com/MasterDuke17/2bc8e6edf1beaf47907cd2b66d5d2f43 with the current diff
17:27 MasterDuke ha, oops, but now it still constant folds my test code
17:27 cale2 Eddward: Perhaps my issue is the proprietary format of it all. Ironically, POD feels quite proprietary when compared to something like Markdown. But I don't even have an issue with the built in functions like docstrings. My issue is more related to the official docs being in POD format and it being a seemingly impossible task if one would want to migrate the docs to a different format/website
17:27 MasterDuke anyway, AFK for now, i'll check back for comments though
17:28 Eddward cale2: Oh.  Sorry.  Guess I don't have a good take on that.  I came in the middle of the conversation.
17:29 Eddward I was just scared that I was hearing the code gets run while pod is parsed.  By bad.
17:29 Eddward err   By => my
17:37 Eddward Is it possible it initialize one parameter to the MAIN with a previous one in the signature?
17:41 IOninja cale2: but we have pod to markdown and pod to html. Migrate all you want.
17:41 Eddward camelia rakudo:   sub MAIN($x!, $y=$x){...}
17:41 camelia Eddward: rakudo-moar d5262e: OUTPUT«Usage:␤  <tmp> <x> [<y>] ␤»
17:41 Eddward I guess so?
17:41 IOninja Eddward: yup
17:41 Eddward cool
17:42 IOninja m: @*ARGS = 'meows'; sub MAIN($x!, $y=$x){ dd [$x, $y]}
17:42 camelia rakudo-moar d5262e: OUTPUT«["meows", "meows"]␤»
17:43 IOninja And yes, the docs can execute arbitrary code... at least at the moment. There's a ticket: https://rt.perl.org/Ticket/Display.html?id=130477#ticket-history
17:43 IOninja The docs *are* code basically.
17:44 Eddward Cool.  I'm sure that'll be put to good use in underhand code contests.
17:45 IOninja :))
17:45 Eddward And you can filter you docs through the Swedish Chef translator on the first of April.
17:46 IOninja On the benefit side, your documentation can be automatically updated with routine names and constant values, for example.
17:46 Eddward yep
17:47 Eddward My concern is the (we'll say accidental) rm -rf equivalent.
17:47 sena_kun Will camelia be all right if I show infinite code here?
17:49 IOninja sena_kun: yes
17:49 sena_kun m: my @s := (loop { 42.say }); # Error expected Positional but got Seq
17:49 PerlJam sena_kun: she just times out after a while
17:49 sena_kun Is the implementation or the commend wrong?
17:49 camelia rakudo-moar d5262e: OUTPUT«(timeout)42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42…»
17:49 IOninja Eddward: but same with any code that's in the same place :)
17:49 sena_kun *comment
17:50 Eddward IOninja: True.  I just imagine most people consider an operation like 'perldoc' to be safe.
17:50 IOninja True
17:50 Eddward Perhaps incorrectly.
17:51 Eddward Anyhow, I didn't come to argue that.
17:51 Eddward Is there something like Pod::Usage for p6?
17:52 PerlJam Anyone happen to know how to access an element of a multi-dimensional array where the indices are in an array?  Something like @ind = 1,1; @multidim[@ind] as equivalent to @multidim[1;1]  ?
17:52 Eddward I'm translation a script to force myself to learn to do something useful in p6.
17:52 IOninja Eddward: you can specify arbitray message via sub USAGE {....}
17:52 IOninja Unaware of anything more spefcific than that
17:52 IOninja buggable: eco usage
17:52 buggable IOninja, Linux::Proc::Statm 'Provide info about a process memory usage': https://github.com/Skarsnik/p6-linux-proc-statm
17:53 Eddward IOninja: Thanks
17:53 TimToady I would think of Pod not as user documentation, but a language for writing user documentation
17:54 TimToady users should be looking at HTML or some such
17:54 IOninja m: my @multidim[2;2] = 1, 2; 3, 4; my @ind = 1, 1; say @multidim[@ind]
17:54 camelia rakudo-moar d5262e: OUTPUT«WARNINGS for <tmp>:␤Useless use of constant integer 4 in sink context (lines 1, 1)␤Useless use of constant integer 3 in sink context (lines 1, 1)␤Assignment to array with shape 2 2 must provide structured data␤  in block <unit> at <tmp> line 1␤␤»
17:54 IOninja m: my @multidim[2;2] = (1, 2; 3, 4); my @ind = 1, 1; say @multidim[@ind]
17:54 camelia rakudo-moar d5262e: OUTPUT«Partially dimensioned views of arrays not yet implemented. Sorry. ␤  in block <unit> at <tmp> line 1␤␤»
17:54 IOninja m: my @multidim[2;2] = (1, 2; 3, 4); my @ind = 1, 1; say @multidim[1;1]
17:54 camelia rakudo-moar d5262e: OUTPUT«4␤»
17:54 IOninja m: my @multidim[2;2] = (1, 2; 3, 4); my @ind = 1, 1; say @multidim[$@ind]
17:54 camelia rakudo-moar d5262e: OUTPUT«Partially dimensioned views of arrays not yet implemented. Sorry. ␤  in block <unit> at <tmp> line 1␤␤»
17:54 IOninja No idea.
17:55 PerlJam Ah, S09 says  @multidim[||@ind] should work
17:55 PerlJam (but I guess that's NYI)
17:56 TimToady currently:
17:56 TimToady m: my @multidim[2;2] = (1, 2; 3, 4); my @ind = 1, 1; say @multidim.AT-POS(|@ind)
17:56 camelia rakudo-moar d5262e: OUTPUT«4␤»
17:56 TimToady m: my @multidim[2;2] = (1, 2; 3, 4); my @ind = 1, 1; say @multidim.AT-POS(@ind)
17:56 camelia rakudo-moar d5262e: OUTPUT«Partially dimensioned views of arrays not yet implemented. Sorry. ␤  in block <unit> at <tmp> line 1␤␤»
17:57 obfusk joined #perl6
17:59 pyrimidine joined #perl6
18:00 BenGoldberg m: my @multidim[2;2] = (1, 2; 3, 4); my @ind = 1, 1; say @multidim[|@ind]
18:00 camelia rakudo-moar d5262e: OUTPUT«Partially dimensioned views of arrays not yet implemented. Sorry. ␤  in block <unit> at <tmp> line 1␤␤»
18:00 BenGoldberg m: dd 1;2
18:00 camelia rakudo-moar d5262e: OUTPUT«WARNINGS for <tmp>:␤Useless use of constant integer 2 in sink context (line 1)␤1␤»
18:00 timotimo MasterDuke: what did your measurements actually show? what values did you try?
18:00 BenGoldberg m: dd (1;2)
18:00 camelia rakudo-moar d5262e: OUTPUT«(1, 2)␤»
18:01 BenGoldberg m: say (1;2).WHAT
18:01 camelia rakudo-moar d5262e: OUTPUT«(List)␤»
18:01 BenGoldberg m: my @multidim[2;2] = (1, 2; 3, 4); my @ind = 1, 1; say @multidim[@ind.List]
18:01 camelia rakudo-moar d5262e: OUTPUT«Partially dimensioned views of arrays not yet implemented. Sorry. ␤  in block <unit> at <tmp> line 1␤␤»
18:02 IOninja TimToady: is `;` in routine signatures just another way to write `,` or is there some special meaning? I know `;;` is about dispatch, but what of just `;`?
18:03 TimToady at the moment, it's just a synonym for ,
18:03 IOninja Thanks
18:03 TimToady it was originally intended to make options within MMD, but that turned out to not be needed much
18:04 IOninja ah
18:04 PerlJam IOninja: are you gonna keep this nick until the grant is done?  :)
18:04 IOninja PerlJam: yup :)
18:08 sena_kun m: my @s := (loop { 42.say }); # Error expected Positional but got Seq
18:08 sena_kun One more round. Who is guilty here?
18:08 camelia rakudo-moar d5262e: OUTPUT«(timeout)42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42…»
18:08 IOninja heh
18:09 IOninja sena_kun: that reminds me of a pre-GLR example
18:09 IOninja m: my @s := lazy loop { 42.say } # is this the error you were looking for?
18:09 camelia rakudo-moar d5262e: OUTPUT«Type check failed in binding; expected Positional but got Seq (?)␤  in block <unit> at <tmp> line 1␤␤»
18:09 Eddward m: my @s := gather { loop { take 42 } }  # just an experiment
18:10 IOninja m: my @s = lazy loop { 42.say }
18:10 camelia rakudo-moar d5262e: OUTPUT«(timeout)»
18:10 camelia rakudo-moar d5262e: ( no output )
18:10 PerlJam camelia is so loved.  Look at all the attention she gets!
18:10 Eddward I think camelia hates us right now.
18:10 sena_kun IOninja, the thing is, I don't know what I'm looking for to. :) I just found a mistake in the documentation, that's all.
18:11 IOninja Wonder why Eddward binding hung
18:11 IOninja m: my $z := gather { loop { take 42 } }
18:11 camelia rakudo-moar d5262e: ( no output )
18:11 Eddward It expanded the gather to put it in the array?
18:11 IOninja I guess the @'s eagerness affects the binding too
18:12 IOninja m: my @s := lazy gather { loop { take 42 } }
18:12 camelia rakudo-moar d5262e: OUTPUT«Type check failed in binding; expected Positional but got Seq (?)␤  in block <unit> at <tmp> line 1␤␤»
18:12 IOninja m: my @s = lazy gather { loop { take 42 } }
18:12 camelia rakudo-moar d5262e: ( no output )
18:12 Eddward m: my @s := lazy gather { loop { take 42 } }  # just an experiment
18:12 camelia rakudo-moar d5262e: OUTPUT«Type check failed in binding; expected Positional but got Seq (?)␤  in block <unit> at <tmp> line 1␤␤»
18:13 sena_kun Also, how can I recursively grep all files that pass some tester in the directory? To do .IO.dir, map, .IO.dir for every level is hell.
18:14 IOninja buggable: eco file::find
18:14 buggable IOninja, Found 3 results: File::Find::Duplicates, File::Find, Concurrent::File::Find. See http://modules.perl6.org/#q=file%3A%3Afind
18:15 IOninja use the second one?
18:15 sena_kun I wonder is it a dependency here...
18:15 sena_kun Yes. I'll use it, thanks.
18:17 TimToady for some reason, I keep misreading IOninja as IOnian, and then wondering what the j is doing in there...
18:18 IOninja :)
18:19 IOninja That's a... major mistake.
18:20 robertle IOnion?
18:21 TimToady why couldn't you have a name like Phrigninja or Dorninja?
18:21 cdg joined #perl6
18:21 TimToady or Mixolyninja
18:22 IOninja :)
18:22 Eddward So I want to have a MAIN that (generally) requires certain parameters, but will run ok with either --help or --version
18:22 Eddward Is multi-MAIN the right answer?
18:22 IOninja Eddward: multies. multi MAIN.... yeah
18:22 Eddward cool
18:22 Eddward Thanks
18:24 TimToady IOnion would imply an integral Onion, if not one with integrity...
18:28 RabidGravy Or a Microsoft class representing the interface to an Onion
18:31 agentzh joined #perl6
18:36 Manifest0 joined #perl6
18:41 TEttinger joined #perl6
18:44 pyrimidine joined #perl6
18:49 pyrimidi_ joined #perl6
18:52 rindolf Hi all
18:52 kurahaupo__ joined #perl6
18:53 Geth ¦ doc/language-section-examples2: ba42f1d99b | Altai-man++ | 15 files
18:53 Geth ¦ doc/language-section-examples2: Fix signatures, skip some examples testing
18:53 Geth ¦ doc/language-section-examples2: review: https://github.com/perl6/doc/commit/ba42f1d99b
18:53 Geth ¦ doc/language-section-examples2: e762247204 | Altai-man++ | util/extract-examples.p6
18:53 Geth ¦ doc/language-section-examples2: Add new items to excluded files list
18:53 Geth ¦ doc/language-section-examples2: review: https://github.com/perl6/doc/commit/e762247204
18:53 Geth ¦ doc/language-section-examples2: e842f77679 | Altai-man++ | xt/examples-compilation.t
18:53 Geth ¦ doc/language-section-examples2: Add new test
18:53 Geth ¦ doc/language-section-examples2: review: https://github.com/perl6/doc/commit/e842f77679
18:53 agentzh joined #perl6
18:53 rindolf TimToady: hi! Happy Shalom Saturday.
19:00 zakharyas joined #perl6
19:02 rindolf are you all at FOSDEM now?
19:06 KotH joined #perl6
19:10 labster joined #perl6
19:12 * IOninja isn't
19:15 itcharlie joined #perl6
19:20 rindolf IOninja: I see,'
19:20 rindolf IOninja: neither am I to be honest
19:24 MasterDuke timotimo: not sure what you mean?
19:25 jeffythedragonsl joined #perl6
19:27 jeffythedragonsl anyone there?
19:28 MasterDuke timotimo: my benchmark code originally took 9s. after changing to not constant fold it took 0.14s. tweaking my changes to get it to pass spectest somehow meant my benchmark was getting constant folded again, working on it now
19:29 jeffythedragonsl trying to install perl6 now
19:29 MasterDuke jeffythedragonsl: how are you doing it?
19:29 jeffythedragonsl following https://perl6.org/downloads/
19:31 Cabanoss- joined #perl6
19:32 jeffythedragonsl ===SORRY!=== No suitable MoarVM (moar executable) found using the --prefix (You can get a MoarVM built automatically with --gen-moar.)  Command failed (status 512): /usr/bin/perl Configure.pl --prefix=/opt/rakudo-star-2017.01 --backends=moar --make-instal
19:32 jeffythedragonsl oh and this too: Can't exec "/opt/rakudo-star-2017.01/bin/moar": No such file or directory at tools/lib/NQP/Configure.pm line 284.
19:32 MasterDuke jeffythedragonsl: looks like you forgot --gen-moar
19:33 jeffythedragonsl woops
19:33 jeffythedragonsl this was my command: Can't exec "/opt/rakudo-star-2017.01/bin/moar": No such file or directory at tools/lib/NQP/Configure.pm line 284.
19:33 jeffythedragonsl this: perl Configure.pl --gen-moar --prefix /opt/rakudo-star-2017.01
19:34 jeffythedragonsl so that had --gen-moar
19:35 * IOninja vaguelly recalls some issues with --prefix stuff
19:35 IOninja jeffythedragonsl: what OS are you on?
19:35 MasterDuke do you have to do --prefix=?
19:35 jeffythedragonsl ubuntu
19:35 IOninja huggable: deb
19:35 huggable IOninja, CentOS and Debian Rakudo packages: https://github.com/nxadm/rakudo-pkg/releases
19:36 IOninja jeffythedragonsl: prolly easier to just install from that deb ^
19:36 IOninja sudo dpkg -i blah-blah.deb
19:36 IOninja buggable: eco zef
19:36 buggable IOninja, zef 'It's like [cpanm] wearing high heels with a tracksuit': https://github.com/ugexe/zef
19:36 IOninja And ^ that's the package manager, its readme should have bootstrapping instructions.
19:37 IOninja And after that you're good to go (you don't need Task::Star; just install the modules you actually need)
19:37 gdonald joined #perl6
19:38 jeffythedragonsl looks like it installed
19:38 telex joined #perl6
19:38 IOninja Cool.
19:40 jeffythedragonsl the official ubuntu repo version is 2014.07 still
19:41 jeffythedragonsl how do I make typing 'perl6' in bash point to the new version?
19:41 geekosaur hash -r
19:42 geekosaur if that doesn't do it, check your $PATH, you may need to reorder entries
19:44 jeffythedragonsl ➜  ~ echo $PATH /home/jeff/perl5/bin:.:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
19:44 jeffythedragonsl well it has perl5 lol...
19:45 geekosaur 'type perl6'
19:46 jeffythedragonsl perl6 is /usr/bin/perl6
19:46 jeffythedragonsl but when I check the version ➜  ~ perl6 -v This is perl6 version 2014.07 built on parrot 6.6.0 revision 0
19:47 geekosaur yes, that sounds right if you installed a debian package
19:47 geekosaur you need to put /opt/rakudo-star-2017.01/bin at the start of $PATH if I am reading backscroll correctly
19:49 geekosaur also I'd remove the OS package, it will just hurt you. (parrot? that thing's ancient)
19:50 jeffythedragonsl ok the 2017.01 got installed in /opt/rakudo/bin/perl6
19:50 jeffythedragonsl cool
19:51 pyrimidine joined #perl6
19:52 jeffythedragonsl thanks
19:52 jeffythedragonsl so should ubuntu update their repos?
19:54 geekosaur I think there's been a update submitted upstream? I'm not the one to talk to but I know there has been packaging work done
19:54 geekosaur the problem is getting it into debian stable/testing and then get ubuntu to pick it up
19:55 geekosaur which can be "fun" beause of disjoint release cycles
19:58 timotimo yeah, it'll take a few more years for a 2015 version to find its way into ubuntu. then a few more years for 2016, then a few more years for 2017
19:58 timotimo by the time 2050 comes around you'll be at 2019
19:58 timotimo and in 2100 you'll be lucky if you get to have 2045
20:00 jeffythedragonsl ugh
20:00 jeffythedragonsl whyyyyy
20:00 timotimo because it's ubuntu
20:01 jeffythedragonsl does fedora have a tighter release cycle?
20:01 jeffythedragonsl I used ubuntu to learn linux because it worked out of the box the best
20:01 jeffythedragonsl I feel like more people would use p6 if the default was to have a recent version...
20:02 timotimo fedora's a bit quicker
20:02 timotimo i forgot which it was, but one distro has a "rakudo-star" package that is built from rakudo releases rather than from rakudo star releases
20:03 timotimo Available Packages
20:03 timotimo rakudo-star.x86_64                                      0.0.2016.11-1.fc25                                      updates
20:03 timotimo ^- that's what i get on my fedora box
20:03 timotimo 2017.01 is just like 5 days old, so i can understand that it's not in there yet
20:03 AlexDaniel joined #perl6
20:04 jeffythedragonsl i'll just make a symlink from /usr/bin/perl6 to /opt/rakudo/bin/perl6 and use a shebang in my programs
20:05 IOninja Use #!/usr/bin/env perl6 as the shebang line instead
20:07 MasterDuke timotimo: i'm running into a problem when the rhs of x is a string. i tried adding an nqp::isint, but it's never true
20:08 DrEeevil Gentoo has 2017.01 ... ;)
20:09 jeffythedragonsl install gentoo? challenge accepted.
20:09 MasterDuke arch linux does also
20:09 sena_kun jeffythedragonsl, it is not hard at all.
20:10 DrEeevil jeffythedragonsl: pff, that's no challenge
20:10 DrEeevil the most difficult part is buggy UEFI flavours ...
20:10 agentzh joined #perl6
20:11 jeffythedragonsl i've installed arch before but gentoo was too hard
20:12 AlexDaniel well, debian unstable has 2016.12
20:12 AlexDaniel and testing has it too
20:12 timotimo yeah, isint is "is it a native int"
20:13 timotimo wow, even testing?
20:13 timotimo that's pretty sad
20:13 timotimo oh hold on
20:13 timotimo that's 2016
20:13 AlexDaniel so the next release of debian will have something that is reasonably fresh, and ubuntu should get it too eventually
20:13 AlexDaniel well it's 2016.*12*
20:14 Eddward What's the right way to spell multi MAIN(@ARGS where { @ARGS.any == '--version' | '-V'}){ say 1; exit 0}
20:14 jeffythedragonsl ok I got this to work
20:14 jeffythedragonsl #!/usr/bin/env perl6
20:14 jeffythedragonsl say 'hi';
20:14 jeffythedragonsl I just put PATH=/opt/rakudo/bin:$PATH in ~/.profile
20:15 AlexDaniel timotimo: given that 2017.01 is only 15 days old I'm not sure why you are so disappointed :)
20:15 AlexDaniel ah
20:15 AlexDaniel it's other way round
20:15 jeffythedragonsl lol it's that that more than the ubuntu version is from 2014
20:15 jeffythedragonsl so slow
20:16 AlexDaniel .oO( now how do I delete my stupid messages in IRC… )
20:16 jeffythedragonsl can you even do that?
20:17 RabidGravy Eddward, sub MAIN(:version(:$v)) { say $v }
20:17 AlexDaniel no. But if you know that your message is stupid ahead of time you can use one secret trick to prevent it from appearing in the public log
20:17 timotimo AlexDaniel: i was off by a year
20:18 Eddward I'm trying to get something that will take "--version" (or "-V") but not "--version False"
20:18 RabidGravy yes
20:18 RabidGravy Eddward, sub MAIN(Bool :version(:$v)) { say $v }
20:18 Eddward And I need a multi- because there's another mutli which handles real paramaters with required options.
20:18 jeffythedragonsl could be useful for when people type their passwords into chat by accident
20:19 Eddward The version coded in the script
20:19 Eddward sub MAIN(Bool :version(:$v)) { say "1.2-rc3" }
20:21 Eddward I'm trying to duplicate this use of Getopt::Long... GetOptions('version|V' => sub { print "$pkg $version\n"; exit(0) })
20:21 jeffythedragonsl example scripts are working so I'll start using perl6 for odds and end stuff
20:21 jeffythedragonsl still think it's going to be hard to convince people to use it for Serious Business Stuff
20:21 AlexDaniel this works pretty well: multi MAIN(Bool:D :$version) { say ‘version!’ }; multi MAIN(*@args) { say ‘something’ }
20:22 pierrot Hi
20:22 Eddward I have to use a multi because I want to always recognise --version & --help even if they leave off another required argument.
20:22 AlexDaniel Eddward: so my attempt is still wrong? ↑
20:23 AlexDaniel pierrot: o/
20:24 timotimo since subs don't allow extra named arguments willy-nilly, you can just have one with :version! and one with :help! and all others don't have those
20:24 Eddward If my only argument were --version, it would be right.
20:24 timotimo don't forget the ! there
20:24 timotimo oh, okay
20:26 jeffythedragonsl so if I find some docs I can improve I submit changes here? https://github.com/perl6/doc
20:26 AlexDaniel Eddward: do you have some bigger example or a set of tests?
20:26 AlexDaniel jeffythedragonsl: oh! This sounds amazing! Yes!
20:27 Eddward AlexDaniel: I don't have it posted online yet.  I'm trying to avoid spamming the channel.
20:27 AlexDaniel Eddward: well, a link to some snippet can help
20:28 Eddward Earlier IOninja suggested multis.  I have something like "script --opt1 PATH [--opt2 PATH]" but I want to support --version and --help even if they forget --opt1
20:29 RabidGravy right
20:29 Eddward So I want to have a MAIN that (generally) requires certain parameters, but will run ok with either --help or --version
20:31 Eddward This is the perl5 I'm trying to port : https://gist.github.com/anonymous/58252c4e7045f10c3ca03c9c0f2b0247
20:31 jeffythedragonsl like this for example? https://docs.perl6.org/routine/rel2abs
20:32 Eddward This is my first try : https://gist.github.com/anonymous/3523deab720da1630f57aa1bf3f9d43c
20:33 AlexDaniel jeffythedragonsl: yes!
20:33 adu joined #perl6
20:34 Eddward oops, I didn't mean to copy in the DB stuff in the perl5 version.  I'm just trying to learn the comparable arg handling right now.
20:35 Eddward DBI-ish looks easy enough.
20:35 MasterDuke Eddward: i don't believe the argument handling in core Perl 6 supports all the features of GetOpt::*, but there are several GetOpt Perl 6 modules
20:35 Eddward oh
20:36 Eddward I assumed the pod2usage() stuff was out.
20:36 MasterDuke but i don't know enough about either to say if exactly what you want to do is possible or not
20:36 Eddward I'll look at modules then.  Thanks.
20:36 MasterDuke buggable: eco GetOpt
20:36 buggable MasterDuke, Found 6 results: Getopt::Tiny, Getopt::Long, Getopt::Type, Getopt::Kinoko, Getopt::Std. See http://modules.perl6.org/#q=GetOpt
20:36 MasterDuke Eddward: ^^^
20:37 Eddward I've got a lot already.  I'm trying to figure our aliased options (--verion == -V) and just flags that aren't bools. ("--version" is good but not "--version True" or "--version False"
20:38 Eddward MasterDuke: Thanks
20:38 AlexDaniel Eddward: this one seems to be working fine https://gist.github.com/AlexDaniel/ea616d5cae83389fe7f4e0b3b09ae077
20:39 AlexDaniel Eddward: ‘--version True’ does not even parse the way you think, if I recall correctly
20:39 Eddward What if you run 'poo --help False'
20:39 AlexDaniel Eddward: it prints “Usage: …”
20:39 Eddward oh
20:40 Eddward ":D"
20:40 Eddward I need to see what that means.
20:41 leah2 joined #perl6
20:44 pyrimidine joined #perl6
20:50 pyrimidine joined #perl6
20:52 Eddward AlexDaniel: Thanks for the example with Bool:D.  I'll need to learn more of these modifiers.
20:53 AlexDaniel Eddward: https://docs.perl6.org/type/Signature#index-entry-type_constraint_%3AD-type_constraint_%3AU-type_constraint_%3A__-Constraining_Defined_and_Undefined_Values
20:54 gfldex Eddward: also: https://docs.perl6.org/language/variables#Type_Constraints_and_Initialization
20:55 bjz joined #perl6
20:55 gfldex Eddward: related: https://docs.perl6.org/language/typesystem#Undefinedness
20:57 Eddward They should cover some of this in the section(s) explaining 'sub MAIN'
20:57 melezhik_ joined #perl6
21:00 TimToady m: sub MAIN($foo, :V(:$version)) {}
21:00 camelia rakudo-moar d5262e: OUTPUT«Usage:␤  <tmp> [-V|--version=<Any>] <foo> ␤»
21:01 TimToady Eddward: ^^ if that's what you were asking
21:05 kraih joined #perl6
21:06 kraih left #perl6
21:09 IOninja 0.o
21:12 girafe joined #perl6
21:24 Ven joined #perl6
21:25 Eddward joined #perl6
21:27 Eddward TimToady: Know if there's a way to do it without the '=<Any>"?
21:27 TimToady m: sub MAIN($foo, Version :V(:$version)) {}
21:27 camelia rakudo-moar d5262e: OUTPUT«Usage:␤  <tmp> [-V|--version=<Version>] <foo> ␤»
21:28 lucasb joined #perl6
21:28 TimToady just puts whatever the type is there
21:28 lucasb hehe, I was trying to figure out how the program name became '<tmp>'
21:28 lucasb here is it: https://github.com/perl6/evalbot/blob/master/evalbot.pl#L262
21:31 TimToady m: sub MAIN($foo, Version(Str) :V(:$version)) {}
21:31 camelia rakudo-moar d5262e: OUTPUT«Usage:␤  <tmp> [-V|--version=<Str>] <foo> ␤»
21:32 TimToady m: say Version("v1.2.*")
21:32 camelia rakudo-moar d5262e: OUTPUT«Cannot find method 'Version' on object of type Str␤  in block <unit> at <tmp> line 1␤␤»
21:32 TimToady aww
21:32 gfldex m: say Version.new("1.2.*")
21:32 camelia rakudo-moar d5262e: OUTPUT«v1.2.*␤»
21:33 TimToady but that don't work so well in a siggy type
21:33 agentzh joined #perl6
21:34 gfldex m: use MONKEY-TYPING; augment class Str { method Version(Str $s) { Version.new($s) } }; say Version("1.2.*");
21:34 camelia rakudo-moar d5262e: OUTPUT«Too few positionals passed; expected 2 arguments but got 1␤  in method Version at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
21:35 gfldex I'm not good with monkeys it seams
21:35 BenGoldberg m: use MONKEY-TYPING; augment class Str { method Version(@_) { dd @_ } }; Version("1.2.*");
21:35 camelia rakudo-moar d5262e: OUTPUT«Too few positionals passed; expected 2 arguments but got 1␤  in method Version at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
21:35 gfldex m: use MONKEY-TYPING; augment class Str { method Version(Str $s) { Version.new($s) } }; sub MAIN($foo, Version(Str) :V(:$version)) {}
21:35 camelia rakudo-moar d5262e: OUTPUT«Usage:␤  <tmp> [-V|--version=<Str>] <foo> ␤»
21:36 gfldex m: use MONKEY-TYPING; augment class Str { method Version { Version.new(self) } }; say Version("1.2.*");
21:36 camelia rakudo-moar d5262e: OUTPUT«v1.2.*␤»
21:36 gfldex also, I'm not good with myself :)
21:37 BenGoldberg Ahh.
21:37 gfldex Eddward: ^^^
21:38 BenGoldberg m: class Foo { method bar(Int) { 42 } }; bar(Foo, 3);
21:38 camelia rakudo-moar d5262e: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤    bar used at line 1. Did you mean 'VAR', 'bag'?␤␤»
21:38 BenGoldberg m: class bar { }; class Foo { method bar(Int) { 42 } }; bar(Foo, 3);
21:38 camelia rakudo-moar d5262e: OUTPUT«Cannot find method 'bar' on object of type List␤  in block <unit> at <tmp> line 1␤␤»
21:38 robertle why oh why does IO::Socket::Async not have a native-descriptor() ??
21:38 BenGoldberg m: class bar { }; class Foo { method bar(Int) { return bar.new } }; bar(Foo, 3);
21:38 camelia rakudo-moar d5262e: OUTPUT«Cannot find method 'bar' on object of type List␤  in block <unit> at <tmp> line 1␤␤»
21:38 Eddward gfldex: The monkey typing thing?
21:38 BenGoldberg m: class bar { }; class Foo { method bar(Int) { return bar.new } }; bar(Foo);
21:38 camelia rakudo-moar d5262e: OUTPUT«WARNINGS for <tmp>:␤Useless use of constant value bar(Foo) in sink context (line 1)␤»
21:38 BenGoldberg m: class bar { }; class Foo { method bar(Int) { return bar.new } }; dd bar(Foo);
21:38 camelia rakudo-moar d5262e: OUTPUT«bar(Foo)␤»
21:38 BenGoldberg m: class bar { }; class Foo { method bar(Int) { return bar.new } }; dd Foo.new.bar;
21:38 camelia rakudo-moar d5262e: OUTPUT«Too few positionals passed; expected 2 arguments but got 1␤  in method bar at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
21:38 robertle is so want to do SO_REUSEPORT
21:39 BenGoldberg m: class bar { }; class Foo { method bar(Int) { return bar.new } }; dd bar(Foo.new);
21:39 camelia rakudo-moar d5262e: OUTPUT«Too few positionals passed; expected 2 arguments but got 1␤  in method bar at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
21:39 BenGoldberg m: class bar { }; class Foo { method bar(Int) { return bar.new } }; dd bar(Foo.new, 3);
21:39 camelia rakudo-moar d5262e: OUTPUT«Cannot find method 'bar' on object of type List␤  in block <unit> at <tmp> line 1␤␤»
21:39 * BenGoldberg is confused about 'on object of type List'
21:40 gfldex Foo.new, 3 <-- List with 2 elements
21:40 Cabanossi joined #perl6
21:43 lucasb m: class A { method B { 10 } }; class B {}; say B(A.new)
21:43 camelia rakudo-moar d5262e: OUTPUT«10␤»
21:43 lucasb ^^ this shows indirect-object syntax without invocant marker works?
21:43 sanctusgray joined #perl6
21:44 lucasb iow, I think it shouldn't work without the colon
21:44 Eddward m: $?FILE.IO.basename.say
21:44 camelia rakudo-moar d5262e: OUTPUT«evalbot-file-kCZgh_B_dS␤»
21:45 pyrimidine joined #perl6
21:50 lucasb m: class A { method B { 10 } }; class B {}; say B(A:)  # related
21:50 camelia rakudo-moar d5262e: OUTPUT«Cannot find method 'B' on object of type List␤  in block <unit> at <tmp> line 1␤␤»
21:51 lucasb ^^ Should this one work? without 'class B {}', B(A:) works fine
21:52 gfldex m: sa Str.^methods[0].(Str:)
21:52 camelia rakudo-moar d5262e: OUTPUT«Too few positionals passed; expected 1 argument but got 0␤  in block <unit> at <tmp> line 1␤␤»
21:52 gfldex m: say Str.^methods[0].(Str:)
21:52 camelia rakudo-moar d5262e: OUTPUT«Too few positionals passed; expected 1 argument but got 0␤  in block <unit> at <tmp> line 1␤␤»
21:53 IOninja lucasb: that's a coersion. You're asking to coerce to B and it does it by calling method B, with the assumption that gives the coersion result
21:54 gfldex m: my $s = ' ♥ '; say Str.^methods[3].($s:)
21:54 camelia rakudo-moar d5262e: OUTPUT«Too few positionals passed; expected 1 argument but got 0␤  in block <unit> at <tmp> line 1␤␤»
21:54 bayprogrammer joined #perl6
21:55 gfldex can I actually provide the invocant like that in a call?
21:57 IOninja m: my $s = ' ♥ '; say Str.^methods[3]($s)
21:57 camelia rakudo-moar d5262e: OUTPUT« ♥ ␤»
21:57 IOninja wonder what it thinks ($s:) is
21:57 gfldex seams to be a NOP
21:58 lucasb IOninja: I agree that B(A) is a coercive parameter type constraint; but B(A:) shouldn't have to do with coercions; it's an expression, not type constraint on a variable
21:58 gfldex if it actially is something, it's ENODOC
21:59 gfldex maybe TimToady can enlighten us?
21:59 IOninja m: dd (A:)
21:59 camelia rakudo-moar d5262e: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared name:␤    A used at line 1␤␤»
21:59 IOninja m: class A {}; dd (A:)
21:59 camelia rakudo-moar d5262e: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '&infix:<:>' is not declared␤at <tmp>:1␤------> 3class A {}; dd (A7⏏5:)␤»
21:59 * IOninja shrugs
22:03 mr-foobar joined #perl6
22:12 gfldex if I would doc that it would be a documented unfeature
22:19 BenGoldberg *Variable* ????
22:20 timotimo that's really weird :D
22:30 Eddward Is there a way to write my own USAGE() and still call the old one?
22:30 Eddward my $old_usage = &USAGE; sub USAGE{ $prefix.say; $old_usage() }
22:31 Eddward Don't try that, it's infinite recursion.
22:36 Eddward err rather, what's the name of the default USAGE() implementation?
22:36 agentzh joined #perl6
22:41 wamba joined #perl6
22:41 bjz joined #perl6
22:48 IOninja Supposed to be $?USAGE if the docs are to be believed, but seems unimplemented
22:49 IOninja hmmm, it is assigned to in code
22:49 RabidGravy yean there's a big TODO athe top of Main.pm
22:49 Eddward It looks like it get generated.  Wonder if it's only generated if USAGE() isn't defined.
22:50 timotimo perhaps &OUTER::<USAGE>?
22:50 RabidGravy yes
22:50 IOninja ah
22:50 jeffythedragonsl joined #perl6
22:50 jeffythedragonsl what's up?
22:50 IOninja \o
22:50 kurahaupo__ joined #perl6
22:50 pyrimidine joined #perl6
22:50 timotimo jeff, y the dragons l?
22:50 jeffythedragonsl jeffythedragonslayer
22:51 IOninja dragons layer? :)
22:51 jeffythedragonsl lol
22:51 jeffythedragonsl dragon slayer
22:51 jeffythedragonsl http://jeffythedragonslayer.com/
22:51 jeffythedragonsl #cslounge thought I was dragon slather
22:53 timotimo "Windows XP games run better on Linux than Windows 10 now." - yes, this is true.
22:54 Eddward global $?USAGE is a TODO in rakudo/src/core/Main.pm
22:55 jeffythedragonsl yes I was impressed
22:56 MasterDuke wine is pretty darn good nowadays
22:57 jeffythedragonsl vastly better experience than when I tried it 5 years ago
22:57 jeffythedragonsl so I can fork the perl6 doc repo, commit my changes, and submit a pull request, but I have a feeling there's a more efficient way
23:01 jeff__ joined #perl6
23:01 MasterDuke jeffythedragonsl: that's pretty much how everyone starts. after you make a couple good PRs you'll be invited to the Perl 6 group and can commit directly if you want
23:02 jeffythedragonsl joined #perl6
23:02 jeffythedragonsl ok
23:02 moritz for the perl6 org you can just request a commit bit
23:02 moritz for rakudo the process applies as MasterDuke outlined it
23:02 jluis joined #perl6
23:03 moritz jeffythedragonsl: what's your github username?
23:03 jeffythedragonsl github.com/jeffythedragonslayer
23:06 moritz jeffythedragonsl: invitation sent. Have fun!
23:06 Eddward Thanks everyone for the help so far.  This is where I'm at in porting arg handling.   https://gist.github.com/anonymous/4cd6a3aae0097dc8712534eb9bbe5640
23:08 jeffythedragonsl thx
23:19 pyrimidine joined #perl6
23:20 jeffythedragonsl I should install rakudobrew too I suppose
23:22 lizmat joined #perl6
23:24 timotimo nah
23:24 timotimo rakudobrew isn't so great
23:24 samcv so in perl 6 you can redefine whitespace i read a while ago, but how do i actually do it
23:24 samcv so i can have horrible documents with emoji as whitespace
23:25 jeffythedragonsl what about zef?
23:25 samcv i like zef
23:29 timotimo samcv: look up some slangs like the one that allows you to put exclamation marks and question marks at the end of sub and method names
23:29 jeffythedragonsl panda?
23:31 gdonald joined #perl6
23:33 samcv timotimo, how do i learn about slangs?
23:34 timotimo read one :)
23:34 lep-delete joined #perl6
23:34 samcv panda is ok but i like zef better because you can update all modules
23:35 jeffythedragonsl noslang.com is good for learning slang ;)
23:35 samcv :\
23:35 samcv https://www.google.com/search?q=perl+6+slang not finding that much info
23:36 IOninja https://mouq.github.io/slangs.html
23:37 samcv thanks
23:45 timotimo eco: slang
23:45 timotimo .eco slang
23:45 IOninja buggable: eco slang
23:45 buggable IOninja, Found 6 results: Slang::Tuxic, Slang::Piersing, v5, Slang::SQL, Slang::Roman. See http://modules.perl6.org/#q=slang
23:46 timotimo oh, that's how
23:47 [particle] joined #perl6
23:48 jayk joined #perl6
23:51 ugjka joined #perl6
23:57 jeffythedragonsl joined #perl6

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

Perl 6 | Reference Documentation | Rakudo