»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
00:02 rindolf left 00:10 gdonald left 00:12 cdg_ left, wamba left 00:20 pyrimidine joined 00:22 atweiden-air left, pyrimidine left 00:23 pyrimidine joined 00:26 lukaramu left 00:32 geekosaur left, geekosaur joined 00:41 bjz joined 00:44 pyrimidine left 00:48 jeff_linahan joined
jeff_linahan Hi 00:48
brokenchicken \o 00:49
jeff_linahan I'm interested in peel 6 00:50
*peel 6
TEttinger perl 6, understood
jeff_linahan *Perl 6 lol
brokenchicken heh
brokenchicken actually lives in "Peel Region" :P
jeff_linahan: cool. Do you know any other programming languages? 00:51
TEttinger is it near the Rhined, brokenchicken?
jeff_linahan I'm best at c++ but I've been wanting to get better at scripting
00:51 dugword left
brokenchicken TEttinger: no idea: www.google.ca/maps/place/Peel+Regi...79.7848422 00:52
jeff_linahan Mostly have been doing bash, perl 5, python
brokenchicken jeff_linahan: ah, this may be a good way for you to start with Perl 6: learnxinyminutes.com/docs/perl6/
TEttinger heh, bad joke about the large river in central Europe called tthe Rhine, sounds like rind, peel, rind
brokenchicken jeff_linahan: more resources listed here in "For Newcomers" section: perl6.org/resources/
jeff_linahan Lol
brokenchicken TEttinger: heh :) never heard of that sorry :) 00:53
jeff_linahan Actually I wanted to know about contributing
TEttinger there's a lotta contributors from what I can tell
jeff_linahan What do you guys think perl 6 needs most now?
brokenchicken Lots of things :)
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
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
so it ends up making <alpha> only like 3% faster
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:56
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
MasterDuke some were too hard initially, but you ramp up eventually
jeff_linahan Do any of you work on perl 6 full time? 00:58
00:59 pyrimidine joined
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:00
jeff_linahan Oh cool 01:01
So documentation and optimization... 01:02
01:03 skids left
jeff_linahan I think I'm going to have a hard time convincing other people to learn p6 over python though... 01:03
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
01:04 daxim joined 01:05 pyrimidine left
jeff_linahan I like teaching stuff 01:05
01:05 pyrimidine joined
samcv what do you guys think Perl 6's Bus Factor is? 01:06
en.wikipedia.org/wiki/Bus_factor
01:07 girafe left, skids joined 01:11 espadrine left 01:12 davido joined
brokenchicken jeff_linahan: "LHF" stands for Low Hanging Fruit: github.com/perl6/doc/issues?q=is%3...abel%3ALHF 01:13
jeff_linahan: you could also read the docs and find what's unclear from your perspective as a begginer and improve that :)
jeff_linahan OK cool 01:14
01:14 davido left 01:15 davido joined
brokenchicken jeff_linahan: the compiler lives in github.com/rakudo/rakudo and the leading VM for it in github.com/MoarVM/MoarVM There are a couple of "Core Hacking" tutorials on perl6.party website + perl6advent.wordpress.com/2016/12/...the-qasts/ and on perl6.fail website you can see the full list of currently-open tickets :) 01:15
01:16 davido left 01:18 davido joined, davido left 01:21 jeff_linahan left, jeff_linahan joined
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
would end the project if they got hit by a bus?
give me a ballpark
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.
samcv m: say 'ↈ' ~~ /<:alpha>/ 01:25
camelia rakudo-moar f799a0: OUTPUT«「ↈ」␤»
samcv m: say 'ↈ' ~~ /<alpha>/
camelia rakudo-moar f799a0: OUTPUT«Nil␤»
teatime throws some salt over his shoulder.
01:26 travis-ci joined
travis-ci Doc build passed. Altai-man 'Language/ examples output unification (last part)' 01:26
travis-ci.org/perl6/doc/builds/198191921 github.com/perl6/doc/commit/08b2fcbb918d
01:26 travis-ci left, jeff_linahan left
samcv hmm making this 10-25% speed boost and making charclass = alpha in moarvm <:alpha> 01:26
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 $/ :)
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:28
MasterDuke samcv: any way you can make ws and/or _ws faster? 01:29
samcv j: say 'ↈ' ~~ /<:alpha>/
camelia rakudo-jvm fb4f16: OUTPUT«「ↈ」␤»
samcv maybe can make ws faster
sadly <alpha> is a method not a token
not sure why the hell. but. that is how it is
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
but changing from <alpha> to <:alpha> has a like 8-12x speed boost 01:30
oh looks like ws has a method too
and it has a token hmm 01:31
i guess token is for regex
MasterDuke samcv: if you look here gist.github.com/MasterDuke17/77230...05c3274b5, _ws and ws are 7th and 17th most expensive functions during a rakudo compile
samcv what is _ws
-ws?
MasterDuke i think it's the moarvm op 01:32
samcv the mvm op that's slow?
which op?
MasterDuke nm, it's a token in the rakudo grammar
samcv yeah, but how is \s defined
can you find where \s is defined?
and i will work on it :) 01:33
MasterDuke don't really know that 01:34
but i'll look
samcv should be the place all the backslashed ones are defined
wow <ws> is soo slow
MasterDuke heh, i don't know where any are defined
01:35 geekosaur left, marocco joined
marocco p6: say 'hello' 01:36
camelia rakudo-moar f799a0: OUTPUT«hello␤»
MasterDuke p6: say ', world' 01:37
camelia rakudo-moar f799a0: OUTPUT«, world␤»
01:38 geekosaur joined 01:39 jeff_linahan joined 01:40 marocco left 01:42 jeff_linahan left
samcv m: say ' ' ~~ /<ws>/; say now - INIT now 01:45
camelia rakudo-moar f799a0: OUTPUT«「 」␤ ws => 「 」␤0.00465426␤»
samcv m: for ^100 { ' ' ~~ /<ws>/}; say now - INIT now
camelia rakudo-moar f799a0: OUTPUT«0.0087044␤»
01:47 pyrimidine left, pyrimidine joined
SmokeMachine I'm a little drunk, so, please, bony take me too seriously... 01:51
Does any one have any job to offer me? I just want to leave Brazil... 01:52
I have 2 douthers and I don't want they growing up here... 01:55
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
mspo douthers? 01:59
brokenchicken daughters :) 02:00
MasterDuke that reminds me, time to open that Glenlivet i just got earlier today 02:01
02:04 pyrimidine left
SmokeMachine I did not take that decision while drunk, but thanks! I'll talk about that when I'm sober... 02:06
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␤»
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
02:09 KDr2 joined
MasterDuke which seems less than ideal 02:09
TimToady well, you are creating lots of not-quite-garbage there, but yeah 02:10
MasterDuke and FWIW, Perl 5 runs the equivalent code in 2.2s total, vs 55s total for Perl 6 02:15
a perf record shows 68% time spent in gc_mark
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., rt.perl.org/Public/Bug/Display.html?id=127972 02:20
TimToady maybe native str is more naïve about the semantics of various string operations 02:21
or maybe you're running into boxing/unboxing issues 02:22
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?
samcv++
samcv i think. i gotta run spectest
02:25 kurahaupo__ joined
samcv it compiles at least. messing with ws is an easy way to make stuff not even compile :P 02:26
nqp spectest pass. now onto roast
hmm looks like it's already done for nqp Grammar, so idk if it will effect compile speed. maybe 02:28
i'm applying the improvement to src/QRegex/P6Regex/Grammar.nqp though
err nvm i was looking wrong. this fix only applies to QRegex::P6Regex::Grammar 02:29
do you know MasterDuke if that will improve the compile speed?
and does perl 6 use NQP::Grammar 02:30
hmm looks like it doesn't. at least a grep. so this may affect rakudo
MasterDuke well, the ws in src/Perl6/Grammar.nqp is the one that's 17th in the profile 02:31
samcv yeahok it looks like it's those methods 02:32
but those probably call <ws>
github.com/rakudo/rakudo/blob/nom/...#L598-L617 02:33
02:34 Sgeo joined
TimToady MasterDuke: sounds like most of the garbage is from converting to string keys 02:34
02:34 pyrimidine joined
TimToady declaring the hash as %h{Int} doesn't really help yet, until we make .WHICH more efficient 02:34
currently .WHICH is just a slower way to make strings :/ 02:35
02:35 kurahaupo__ left
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
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;`
m: my str $a = "a" x 2**29; say now - INIT now 02:37
camelia rakudo-moar f799a0: OUTPUT«0.81967623␤»
MasterDuke m: my Str $a = "a" x 2**29; say now - INIT now
TimToady that's almost impressive, though I bet p5 is faster :)
camelia rakudo-moar f799a0: OUTPUT«0.00153860␤»
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
MasterDuke ooh, down to 9s on my machine
TimToady p5?
MasterDuke that was rakudo. i'll try p5 02:39
p5 is .4s
TimToady p5 does some tricks :)
MasterDuke perf looks exactly the same as before, percentages wise (it just takes half the time in total) 02:41
but how is camelia 10x faster than when i run it from the command line? 02:42
commit: HEAD my str $a = "a" x 2**29; say now - INIT now 02:43
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
committable6 MasterDuke, ¦«HEAD»: 0.811105
TimToady m: my int $ttt9 = 2**29; my str $a = "a" x $ttt9; say now - INIT now 02:44
camelia rakudo-moar f799a0: OUTPUT«0.00142874␤»
MasterDuke m: my int $x = 2**29; my str $a = "a" x $x; say now - INIT now
camelia rakudo-moar f799a0: OUTPUT«0.00150246␤»
TimToady hah, beat you
02:44 teatime left
MasterDuke i'm going to claim "great minds..." 02:45
TimToady mine ran faster, too :P
02:46 AlexDaniel left
MasterDuke you must get special treatment, yours even had 6 extra chars to parse 02:46
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`
benchable6: 2016.12,HEAD my str $a = "a" x 2**29 02:48
benchable6 MasterDuke, starting to benchmark the 2 given commits
MasterDuke, benchmarked the given commits, now zooming in on performance differences 02:49
MasterDuke, ¦«2016.12»:6.6858␤¦«HEAD»:6.6054
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:51
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
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
camelia rakudo-moar f799a0: OUTPUT«0.0014603␤»
02:55 bjz left
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:56
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
i tried perl6 --target parse but i still am not totally sure what's happening
03:01 bjz joined 03:02 pyrimidi_ joined 03:06 pyrimidi_ left 03:08 gfldex left 03:22 gfldex joined 03:28 kyan left
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:29
03:31 pyrimidine left 03:36 noganex joined
SmokeMachine Sorry about my last messages... 03:37
samcv should put a link to 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
i guess it could go in perl6 org for now, so other people can add to it
03:38 noganex_ left 03:43 pyrimidine joined
brokenchicken SmokeMachine: :) 03:46
03:47 xtreak joined 03:49 pyrimidine left 03:52 pyrimidine joined 03:56 BenGoldberg joined 04:04 pyrimidi_ joined 04:09 pyrimidi_ left 04:26 pyrimidine left 04:30 kyan joined 04:56 Cabanoss- joined 04:59 Cabanossi left, Cabanoss- is now known as Cabanossi 05:05 pyrimidine joined 05:06 bjz left 05:10 sammers left 05:11 pyrimidine left, bjz joined 05:21 sammers joined
masak g'day, #perl6 05:23
someone want to discuss macros? :)
samcv dunno 05:24
do I?
05:25 BenGoldberg left
masak heh :) 05:25
japhb What's on your mind about macros this fine UGT, masak? 05:26
masak oh, nothing in particular 05:27
but since I started my vacation 1.5 weeks ago, my head has -- unexpectedly -- filled up with 007 ideas
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
see github.com/masak/007/issues/194
(if that issue and the picture it paints excites you, please let me know! I need the cheering-on) :) 05:29
05:40 kurahaupo_ joined
japhb masak: I *love* that the 007 issues are deeply hyperlinked. It's like watching you think. :-) 05:43
And yeah, several of the issues I read make me wish for this in Perl 6. :-)
05:47 pyrimidine joined 05:48 pyrimidi_ joined, pyrimidine left
masak yaaay 05:50
japhb: it sounds ridiculous, but that means a lot <3
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:51
05:53 pyrimidi_ left
masak (thinking mostly about quasis, unquotes, and the intricacies of scoping when ASTs get copy/pasted all over the place) 05:56
05:56 bjz_ joined, bjz left
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. :-) 05:58
06:01 kurahaupo joined
masak I just hope that whatever working solution I come back with gets buy-in from the Perl 6 brass 06:02
:)
(so far so good. both jnthn and TimToady seem positively inclined towards Qtrees)
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:03 kurahaupo_ left
masak oh, I'm deliberately holding onto the red thread as I keep getting lost in the maze :P 06:04
japhb :-) 06:05
masak .oO( or, keeping one hand on the Wall )
the story that macros keep wanting to disrupt the most, I think, is that of grammars, slangs, and braids
I still don't know how those things will end up co-existing peacefully 06:06
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
japhb: I saw that work the other day. I need to think about whether 007 will have cursors.
japhb: so far, I've been thinking of an ambient "Parser" type that anything language-extending would interact with explicitly or implicitly. 06:08
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
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
masak (module A does `use` on language-extending module B, which does a `use` to grab A's Parser)
06:10 bjz joined
japhb And re: is parsed, I suspect working code will be the strongest argument. :-) 06:10
masak hence the current new focus :)
06:11 kurahaupo left 06:12 bjz_ left 06:15 Tonik joined 06:35 bjz left 06:37 rurban joined 06:39 hartenfels joined 06:42 Sgeo left 06:47 CIAvash joined 06:50 pyrimidine joined, bjz joined 06:53 skids left 06:54 pyrimidine left 07:05 Sgeo joined 07:08 darutoko joined 07:11 AlexDaniel joined 07:15 rurban left 07:22 rurban joined 07:45 Sgeo left 07:47 bjz left, lizmat left, lizmat joined, lizmat left 07:49 Actualeyes left, Actualeyes joined 07:52 pyrimidine joined 07:53 wamba joined 07:54 KDr2 left 07:56 pyrimidine left 08:08 jjido joined 08:12 bjz joined 08:13 xtreak left 08:16 xtreak joined 08:17 bwisti left 08:32 kyan left 08:33 pyrimidine joined 08:38 pyrimidine left 08:50 Guest85619 is now known as konobi 08:58 RabidGravy joined 09:01 bjz_ joined, bjz left 09:03 dogbert2 joined 09:05 dogbert17 left
RabidGravy MORNIN! 09:09
09:11 jluis joined 09:18 espadrine joined 09:20 KDr2 joined 09:21 jluis left 09:27 lizmat joined 09:31 KDr2 left 09:39 jjido left 09:40 jluis joined 09:42 kyan joined, kyan left 09:44 jjido joined 09:45 jluis left 09:48 jluis joined 09:51 bjz_ left 09:57 bjz joined 10:04 jluis left
moritz \o 10:06
10:07 lizmat left 10:14 mxco86 left 10:17 lukaramu joined
RabidGravy Boom 10:19
10:20 lizmat joined 10:21 drrho left 10:22 rurban left 10:25 cyphase left
Geth doc: ac6c65fce9 | (Jonathan Stowe)++ | doc/Type/Exception.pod6
Invocant not argument
10:27
doc: a4ed752537 | (Jonathan Stowe)++ | doc/Type/Exception.pod6
method fail is not a multi
10:27 cyphase_eviltwin joined 10:28 dogbert17 joined, lizmat left 10:31 dogbert2 left 10:32 hartenfels left 10:42 espadrine left 10:45 mxco86 joined 10:47 TEttinger left 10:49 pyrimidine joined 10:50 xtreak left 10:54 pyrimidine left 11:04 mr-foobar left, ocbtec joined 11:06 wamba left, wamba joined 11:07 jjido left 11:13 wamba left, wamba joined 11:18 wamba left 11:20 wamba joined, pmurias joined 11:25 wamba left, wamba joined 11:35 wamba left, drrho joined 11:37 wamba joined 11:42 hartenfels joined 11:50 pyrimidine joined, ocbtec left 11:53 parv joined, Tonik left 11:55 rindolf joined, pyrimidine left
RabidGravy I think that removing the git submodules of themselves from all my modules which I accidentally created with a thinko the other day 11:59
12:00 labster left 12:03 cyphase_eviltwin left 12:08 pyrimidine joined, cyphase joined, AlexDaniel left
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:11
12:13 pyrimidine left 12:14 espadrine joined 12:16 cyphase left 12:21 cyphase joined 12:23 andrzejku joined 12:28 sena_kun joined
RabidGravy for anyone who is as stupid as I am gist.github.com/jonathanstowe/c0b5...84f7dcf6ae 12:31
12:31 ttt joined, AlexDaniel joined
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:42
you know how our GC is a "moving" GC? it has to update pointers in objects that point to other objects 12:43
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
another thing is, your code is likely generating hardly any extra garbage on top of what you're adding to the hash
so you're filling up the nursery with, let's say, 90% string objects that all go into the hash 12:44
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
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
but then it's 90%/10% again, then 10%/90%
MasterDuke very interesting
timotimo same kind of behavior as adding a gigantic amount of Int objects into an array
and that's also why having a native int array in that case is a whole lot more efficient
because it doesn't even have to go through the array for every GC 12:46
a possible solution to help with this is called "buddies" (OSLT)
where we figure out at the bytecode level that all those strings you're creating are immediately going to be bound to that hash
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
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
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?
jnthn Or pretenuring
timotimo aye
i was refering to the mechanism by which pre-tenuring is decided
jnthn .tell brokenchicken Yes, it is. Pretty sure it's test-covered also.
yoleaux jnthn: I'll pass your message to brokenchicken.
MasterDuke cool. how difficult is that?
timotimo but i think "buddy" is the wrong term
jnthn Depends on the scheme you pick to decide how to do it. 12:48
It's not trivial, and you really don't want to have a lot of false positives
timotimo i think i had it from that paper we had that also suggested having per-allocation-site statistics
jnthn Yeah, that's one way to do it
Can also keep stats at the write barrier 12:49
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
And then don't give them another life in the nursery, but promote them right off
That's comparatively easy
And probably handles this case pretty well
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:52
timotimo is that just an irridescent light bulb that you can plug into the gpios? :) 12:53
incandescent*?
12:53 jjido joined
RabidGravy so that's one thing off the list today as I can't be bothered to find a gpio cable 12:53
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
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
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
timotimo heh.
jnthn MasterDuke: Depends how adventurous you are :)
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 cyphase left
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
timotimo could you output the stats from the GC for your hash assignment workload and verify that it does the flippy-floppy thing? 12:58
12:58 _Vasyl left
MasterDuke sure, how do i get those stats? 12:59
12:59 _Vasyl joined
timotimo doesn't the sql-version of the profiler output all the same stuff the json one does? 12:59
MasterDuke yeah 13:00
timotimo then there should be a GC table of some description
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
timotimo: Another option is a sentinel in the worklist, which avoids a read/write on the object header 13:02
13:02 cyphase joined
timotimo ah, basically a "the previous object wants to have its nursery bit activated" command? 13:02
jnthn Well, or "previous object is referenced from a gen2 root 13:03
"
timotimo or even "next object"
jnthn Yeah, next object was my thought
Though it'd bloat the list up a bit
So hmm :)
timotimo hm.
could do run-length encoding
jnthn I think it wants to be handled at worklist level though
timotimo and keep a bit of state for that
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);`
jnthn That's the contagion bit. :)
timotimo jnthn: does the heap analyzer already track whether an object was part of gen2 or nursery at the time of measurement? 13:05
13:05 gdonald joined
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
could very well be that the best way to figure it out is to just try a bunch of workloads after actually implementing that
jnthn timotimo: No, but you can see whether an object is alive via the gen2 roots 13:06
It feels unlikely to spill to me
You'd need a cyclic data structure for there even to be a risk, I'd think
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
timotimo well, actually, you meant to have a per-edge cost that we could bump up for the gen2 roots
jnthn Well, in a nursery collect, gen2 objects themselves are simply never put into the worklist
We filter at point of entry
That saved us quite a lot :)
timotimo oh, of course we do
13:10 pyrimidine joined, azertus left
jnthn lunch & 13:12
13:14 pyrimidine left 13:22 adu joined, [particle] joined 13:24 cyphase left 13:29 cyphase joined
sena_kun how to make run/shell blocking? 13:32
timotimo run already blocks 13:33
perl6 -e 'run "sleep", "10"'
13:35 jjido left
sena_kun hmm... 13:35
timotimo are you also supplying :out or something? 13:36
huh. the docs don't even say a single word about :out
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
It says. I printed :out and I omitted it, but the result was the same.
timotimo anyway, if you have :out for run, you also need to .out.slurp-rest
13:37 gdonald left
timotimo otherwise your process will just continue happily and probably soon finish 13:37
sena_kun Ah, perfect. 13:38
timotimo docs.perl6.org/language/ipc
sena_kun Yes, I passed :out and it was finished before the actual job.
timotimo the "proc" section tells about :out
please note that there's currently a bug where the exitcode you get at the end is always 0 13:39
sena_kun Oh.
It makes my work totally useless.
13:39 gdonald joined
sena_kun any chances to fix it soon? 13:40
Ah, does it works only if :out is passed? Then it is not so useless as I though. 13:42
timotimo only when you have :out, yes 13:43
or you could use Proc::Async
i don't think that has that bug
13:46 pyrimidine joined
jnthn You also need to .close the .out handle 13:47
It's not until you clsoe it that the process exit code becomes available
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
timotimo oh, .slurp-rest doesn't close unless you :close, i think 13:47
jnthn Right
timotimo maybe that's the reason it doesn't give the proper exitcode? 13:48
13:48 adu left
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
But this trips enough people up that we should probably question the API design some by now :)
timotimo unix ipc can be hard if you don't read anything about it and just wing it
aye
we can certainly help users
jnthn Yeah, I actually think Proc::Async is easier to work with in this sense. :)
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.
jnthn If the output doesn't matter then you don't need :out ? 13:49
Or you just want to discard it?
sena_kun Yep.
I don't need it.
13:49 bjz left
sena_kun That's why this "bug" doesn't affect me as it seems. 13:50
13:51 adu joined 13:53 jluis joined 13:55 pyrimidine left 13:57 AlexDaniel left 13:58 sammers left
masak pmurias: re scaling up from small macros to big slangs -- yes, agree. 14:02
pmurias: but that's one of those "need to try it to figure out how that works" things, I believe 14:03
we probably can't get to where we want to be without iterating a bit on the solution
14:05 bwisti joined
Geth doc/language-section-examples2: 43cc319e0f | Altai-man++ | 11 files
Cleanup some examples
14:05
14:08 parv left
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
'night, #perl6
14:09 sammers joined 14:13 KDr2 joined 14:17 BenGoldberg joined
RabidGravy maybe it's time to split the rest method trait stuff out of Sofa for more general re-use 14:20
RabidGravy is giving some love to WebService::Soundcloud 14:21
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: rt.perl.org/rt3//Public/Bug/Displa...?id=127972
timotimo MasterDuke: i have a theory that relates to precompilation
but it's not very likely
MasterDuke hm. adding `no precompilation` doesn't change the run time for me 14:29
14:32 pierrot left 14:33 agentzh left 14:34 cale2 joined
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
timotimo we don't care about that 14:36
it could actually be that it's not precompilation but "just" compilation
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
14:37 jjido joined
timotimo so we encode it as ascii at the end of compilation, then immediately decode it from ascii at the beginning of runtime 14:37
MasterDuke that sounds reasonable, but you mean store as latin1? 14:38
timotimo yes 14:39
that is indeed what i mean
MasterDuke oh, a profile of the run time is just 1s, but a profile of the compilation is 9s
timotimo well, there we go then :)
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
timotimo because when we store "a" xx 100000000000000 we just have the string "a" and the modifier "10000000000000000000000000 times" 14:40
14:40 jluis left
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?
timotimo because "a" doesn't have any characters post latin1 in it
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
whereas ascii wastes 1 whole bit per character
MasterDuke ah, didn't realize that
timotimo :) 14:42
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.
timotimo because then we need to put in a synthetic
that is correct
there's even some ascii texts that aren't distinguishable from utf16 :D
14:47 _Vasyl left, _Vasyl joined, pyrimidine joined
MasterDuke timotimo: would the total run time be faster if that wasn't constant folded? 14:52
timotimo i'm sure of it
try --optimize=off
cale2 what's the easiest way to upgrade your version of perl6?
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?
MasterDuke timotimo: 0.14s
14:53 pyrimidine left
timotimo what was it with optimization on? 14:53
cale2 I don't recall... But there's ~/.perl6 and my PATH currently has perl6 included 14:54
14:54 bjz_ left
MasterDuke 9s 14:54
timotimo yeah, that aligns with my expectation
the .perl6 folder has one folder for every perl6 version you have
in my case ... quite a few more than i actually have :D
42 folders inside my ~/.perl6
cale2 timotimo: I'm honestly afraid to upgrade. everything is finally working haha
14:55 bjz joined
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"
rakudobrew can be quite fiddly
i'll always remember that one bug that nuked one user's system
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
/usr/bin*
cale2 Am I supposed to add that to the PATH?
tadzik *shudders
timotimo and rakudobrew was like "okay, time to install the new rakudo version. rm -rf ~/.rakudobrew/bin/*"
yeah, that belongs in the PATH
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
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
it installs modules where perl6 looks for them
(and also binaries go in the same general place)
cale2 MasterDuke: Ahhh I may have used homebrew to install now that I remember it
timotimo maybe you're looking for zefef, which is a module installer for zef. it installs zef modules where zef looks for them :P
gotta go AFK for a bit
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
the only thing that'd know whether to constant fold in this case is the x operator
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
it could, but how does it communicate to the optimizer?
i mean, the optimizer already knows about a bunch of subs and operators anyway 15:02
MasterDuke magic
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"
actually
we might never ever want to constant fold infix:<x> at all
except maybe when its RHS is 1 or 0 15:03
MasterDuke oh?
timotimo hm.
except when you have the string in storage, you only pull it out once 15:04
by storage i mean in the serialized blob
ugh. it is hairy, is what it is.
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:06
BenGoldberg I thought the x operator made a ropelike thing, so as to avoid allocating huge amounts of memory. 15:08
timotimo exactly
then that ropelike string gets put into the string heap
which cannot store ropes
so it turns it into a regular string
BenGoldberg Ahh.
timotimo that's the conundrum 15:09
BenGoldberg Add a heuristic to the act of adding strings to the string heap, then.
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:10
timotimo can't do that 15:11
BenGoldberg Why not?
timotimo hm, actually 15:12
maybe it is possible after all
we could have a special version of adding stuff to the serialized blob that checks the whole object graph first
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 telex left
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.
timotimo haha
that will already have happened
because where else is it going to come from, if we're already constant folding
15:14 telex joined
BenGoldberg Why can't ropes be stored as themselves, then? 15:15
timotimo because we haven't implemented anything for that
i don't think ropes are common in user programs
15:16 hartenfels left
BenGoldberg Every ~ and x creates a rope. 15:16
AFAIK
Or at least they ought to.
And @array.join, and ... every type of string concatenation.
timotimo yes, ~ and x both do
how often are the results of that actually constant? 15:17
in a matter that makes the ropeness meaningful?
15:17 pyrimidine joined
BenGoldberg ropeness should be invisible from the user's POV. 15:18
So the only time the ropeness is meaningful is if it reduces memory.
15:19 jjido left, rindolf left
KDr2 Is the syntax of nqp documented anywhere? Either the full syntax or the difference between nqp and perl6 15:20
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:21
15:22 pyrimidine left
timotimo anyway 15:27
feel free to implement rope storage in the string heap
15:27 adu left
timotimo though it might require a version bump of some kind 15:27
so that the stage1 and precompiled files and such get treated right
mienaikage Downloads page links to latest but still shows 2016.11 for R*, anyone know where to go to change it? 15:31
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
I'm just thinking about the work that it would take to host the docs on a different website
With everything currently written in POD format, it's not very universal
15:43 rindolf joined
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
KDr2 rindolf, hi?
rindolf KDr2: just wanted to make sure you don't leave without an answer 15:49
KDr2: can you show an example to what you mean?
KDr2 github.com/perl6/nqp/blob/master/s...r.nqp#L106 15:50
the lines start with ":my "
is it legal perl6 syntax? or only for nqp? 15:51
it's hard to search on the web
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?
not a true subset
:my $foo is also allowed in perl6 code
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:54
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
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
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
MasterDuke timotimo: re string/rope constant folding, what do you think is the easiest optimization to do in the short term? 15:59
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`?
timotimo or remove "is pure" from &infix:<x> 16:01
well, it could multiply LHS and RHS and check for some threshold?
MasterDuke what would be a reasonable threshold?
timotimo i haven't a clue
we can't ask a string for its storage format, so we can't really say "1kb of data" 16:02
we could be wrong by 4x
16:04 ocbtec joined 16:05 adfg joined 16:06 BenGoldberg left, adu joined
MasterDuke interesting. "a" x 2**28 takes the same amount of time as "aa" x 2**27 16:06
16:07 BenGoldberg joined
MasterDuke it does seem to be a direct relationship of lhs * rhs 16:07
timotimo yeah, that makes sense to me
the biggest part is spent going through the chunk of memory that needs to get written and then read again
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
Err, can't be bigger than 4k bytes.
MasterDuke BenGoldberg: so you're suggesting `next if lhs.chars * rhs > 1024`? 16:09
timotimo fair enough
BenGoldberg Yup. 16:10
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
and of course memory pressure is always bad
BenGoldberg Or, try a few different constants, and see what results in the best performance.
2**$n, for some $n. ;) 16:12
timotimo yeah, time it for many values that happen to be around cache sizes for L1, L2, L3 16:14
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.
MasterDuke 0.13s 16:16
let me just test i didn't break any spectests and then i an experiment with sizes 16:17
timotimo++, BenGoldberg++ 16:19
16:19 pyrimidine joined
BenGoldberg ☺ :) 16:20
MasterDuke whoops, some of the repeat tests failed already 16:21
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
timotimo i'm mostly confused as to what you mean by database 16:23
MasterDuke gist.github.com/MasterDuke17/2bc8e...b66d5d2f43
16:24 pyrimidine left
cale2 timotimo: 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!
cale2 sena_kun yes
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
cale2 The issue as I see it is that the docs DATA is very tightly coupled to the DISPLAY on the website
timotimo i don't think it belongs as an elseif there
hm. 16:26
16:26 adfg left, adu left
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
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:28
s/this sadly/this, sadly/ 16:29
MasterDuke timotimo: not sure about the $survived stuff, should it be `if $survived and $op.name eq '&infix:<x>'`? 16:30
timotimo i'd put it before the "if $all_args_known" 16:31
cale2 sena_kun: understandable. I may do just that :P
timotimo also, if you're just checking the name, you won't bail out properly if the user provides their own &infix:<x>
sena_kun cale2, your work will be appreciated a lot. ;)
MasterDuke before? don't i need to know the values for the heuristic? 16:32
what would i check other than name? 16:33
timotimo not the return value
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?
timotimo there's an "is_from_core" but that's not quite the same thing
wait a minute
it is the right thing
we are talking about call("&infix:<x>", ...), right? 16:34
MasterDuke yep
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.
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.
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:36
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?
cale2 sena_kun: You would type "Str.comb" and it would look up the chain until it finds it
KDr2 finally find it: github.com/perl6/roast/blob/master...r/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.
timotimo nah, the return value gets built when $ret_val gets assigned
but running the function is the first thing that happens after $all_args_known is true
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:41
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
point out the need to close a proc's out/err
timotimo ^- refinement would be quite accepted
especially a nice way to get .slurp-rest(:close) in there
that'd usually be an idiom people would use 16:43
16:43 BenGoldberg left 16:44 KDr2 left
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:44
16:45 pyrimidine joined
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:45
*rebuild docs from scratch with some constraints/updates 16:46
timotimo fucking hell rt is such a piece of fucking shit sometimes
cale2 sena_kun: What are the options for parsing perl6 pod format?
or converting rather.
MasterDuke timotimo: `===SORRY!=== This type cannot unbox to a native number: P6opaque, Failure` when trying to run t/spec/S03-operators/repeat.t
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
timotimo: updated the gist with current diff 16:48
brokenchicken
yoleaux 12:47Z <jnthn> brokenchicken: Yes, it is. Pretty sure it's test-covered also.
brokenchicken cool
16:48 pyrimidine left, pyrimidine joined
timotimo cale2: you can only run it via a perl6 --doc=HTML or similar %) 16:50
16:50 BenGoldberg joined 16:53 pyrimidine left
cale2 So how do these pages work? 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:55
16:56 bjz left
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: github.com/perl6/doc/blob/master/htmlify.p6
sena_kun cale2, yes. You can look into htmlify.p6 to see how it works. But it is kinda scary.
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?
MasterDuke pmurias: no idea
16:57 pyrimidine joined
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
brokenchicken MasterDuke++ cool thanks :D
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
MasterDuke pmurias: "them" == $str x $huge-number? 16:59
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:01
17:02 pyrimidine left
cale2 Has no one written a Grammar for parsing POD files? 17:04
That seems like an obvious target for grammars
timotimo yeah, there's a grammar for parsing POD files inside rakudo :P 17:05
17:06 Eddward joined
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
and we want to attach pod objects to methods/parameters/classes/roles/... when we parse stuff like that 17:07
sena_kun cale2, see github.com/perl6/perl6-pod-to-bigp...od2onepage as example. You can access pod6 directly from your perl6 code, without any module. It is builtin.
timotimo those are the reasons for making the pod grammar a first-class part of the perl6 grammar
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?
sena_kun cale2, no, it is an example how you can access already parsed pod. 17:09
pmurias MasterDuke: did you use that in real code or in an artifical benchmark? 17:10
17:12 brokenchicken is now known as IOninja
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:12
Eddward .... from the peanut gallery, a language that trivially supports "maliciously formed documentation" sounds like something it would never live down. 17:18
cale2 Eddward: A language that supports a walled garden for documentation is something that doesn't seem quite right 17:20
Eddward cale2: So is the issue that if it's first class, it'll do things like run BEGIN blocks which parsing? 17:21
And if it's not first class you can't do things lke attach doc strings to classes & subroutines? 17:22
oops which = > while 17:24
MasterDuke timotimo, pmurias: FWIW, it now passes `make m-spectest`. also i updated gist.github.com/MasterDuke17/2bc8e...b66d5d2f43 with the current diff 17:25
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
MasterDuke anyway, AFK for now, i'll check back for comments though
Eddward cale2: Oh. Sorry. Guess I don't have a good take on that. I came in the middle of the conversation. 17:29
I was just scared that I was hearing the code gets run while pod is parsed. By bad.
err By => my 17:30
17:31 ttt left
Eddward Is it possible it initialize one parameter to the MAIN with a previous one in the signature? 17:37
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){...}
camelia Eddward: rakudo-moar d5262e: OUTPUT«Usage:␤ <tmp> <x> [<y>] ␤»
Eddward I guess so?
IOninja Eddward: yup
Eddward cool
IOninja m: @*ARGS = 'meows'; sub MAIN($x!, $y=$x){ dd [$x, $y]} 17:42
camelia rakudo-moar d5262e: OUTPUT«["meows", "meows"]␤»
IOninja And yes, the docs can execute arbitrary code... at least at the moment. There's a ticket: rt.perl.org/Ticket/Display.html?id...et-history 17:43
The docs *are* code basically.
Eddward Cool. I'm sure that'll be put to good use in underhand code contests. 17:44
IOninja :)) 17:45
Eddward And you can filter you docs through the Swedish Chef translator on the first of April.
IOninja On the benefit side, your documentation can be automatically updated with routine names and constant values, for example. 17:46
Eddward yep
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:48
IOninja sena_kun: yes 17:49
sena_kun m: my @s := (loop { 42.say }); # Error expected Positional but got Seq
PerlJam sena_kun: she just times out after a while
sena_kun Is the implementation or the commend wrong?
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…»
IOninja Eddward: but same with any code that's in the same place :)
sena_kun *comment
Eddward IOninja: True. I just imagine most people consider an operation like 'perldoc' to be safe. 17:50
IOninja True
Eddward Perhaps incorrectly.
Anyhow, I didn't come to argue that. 17:51
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] ?
Eddward I'm translation a script to force myself to learn to do something useful in p6.
IOninja Eddward: you can specify arbitray message via sub USAGE {....}
Unaware of anything more spefcific than that
buggable: eco usage 17:53
buggable IOninja, Linux::Proc::Statm 'Provide info about a process memory usage': github.com/Skarsnik/p6-linux-proc-statm
Eddward IOninja: Thanks
TimToady I would think of Pod not as user documentation, but a language for writing user documentation
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]
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␤␤»
IOninja m: my @multidim[2;2] = (1, 2; 3, 4); my @ind = 1, 1; say @multidim[@ind]
camelia rakudo-moar d5262e: OUTPUT«Partially dimensioned views of arrays not yet implemented. Sorry. ␤ in block <unit> at <tmp> line 1␤␤»
IOninja m: my @multidim[2;2] = (1, 2; 3, 4); my @ind = 1, 1; say @multidim[1;1]
camelia rakudo-moar d5262e: OUTPUT«4␤»
IOninja m: my @multidim[2;2] = (1, 2; 3, 4); my @ind = 1, 1; say @multidim[$@ind]
camelia rakudo-moar d5262e: OUTPUT«Partially dimensioned views of arrays not yet implemented. Sorry. ␤ in block <unit> at <tmp> line 1␤␤»
IOninja No idea.
PerlJam Ah, S09 says @multidim[||@ind] should work 17:55
(but I guess that's NYI)
TimToady currently: 17:56
m: my @multidim[2;2] = (1, 2; 3, 4); my @ind = 1, 1; say @multidim.AT-POS(|@ind)
camelia rakudo-moar d5262e: OUTPUT«4␤»
TimToady m: my @multidim[2;2] = (1, 2; 3, 4); my @ind = 1, 1; say @multidim.AT-POS(@ind)
camelia rakudo-moar d5262e: OUTPUT«Partially dimensioned views of arrays not yet implemented. Sorry. ␤ in block <unit> at <tmp> line 1␤␤»
17:57 obfusk left, obfusk joined 17:59 pyrimidine joined
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␤␤»
BenGoldberg m: dd 1;2
camelia rakudo-moar d5262e: OUTPUT«WARNINGS for <tmp>:␤Useless use of constant integer 2 in sink context (line 1)␤1␤»
timotimo MasterDuke: what did your measurements actually show? what values did you try?
BenGoldberg m: dd (1;2)
camelia rakudo-moar d5262e: OUTPUT«(1, 2)␤»
BenGoldberg m: say (1;2).WHAT 18:01
camelia rakudo-moar d5262e: OUTPUT«(List)␤»
BenGoldberg m: my @multidim[2;2] = (1, 2; 3, 4); my @ind = 1, 1; say @multidim[@ind.List]
camelia rakudo-moar d5262e: OUTPUT«Partially dimensioned views of arrays not yet implemented. Sorry. ␤ in block <unit> at <tmp> line 1␤␤»
18:02 cale2 left
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:02
TimToady at the moment, it's just a synonym for , 18:03
IOninja Thanks
TimToady it was originally intended to make options within MMD, but that turned out to not be needed much
IOninja ah 18:04
PerlJam IOninja: are you gonna keep this nick until the grant is done? :)
IOninja PerlJam: yup :)
18:04 pyrimidine left
sena_kun m: my @s := (loop { 42.say }); # Error expected Positional but got Seq 18:08
One more round. Who is guilty here?
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…»
IOninja heh
sena_kun: that reminds me of a pre-GLR example 18:09
m: my @s := lazy loop { 42.say } # is this the error you were looking for?
camelia rakudo-moar d5262e: OUTPUT«Type check failed in binding; expected Positional but got Seq (?)␤ in block <unit> at <tmp> line 1␤␤»
Eddward m: my @s := gather { loop { take 42 } } # just an experiment 18:10
IOninja m: my @s = lazy loop { 42.say }
camelia rakudo-moar d5262e: OUTPUT«(timeout)»
( no output )
PerlJam camelia is so loved. Look at all the attention she gets!
Eddward I think camelia hates us right now.
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.
IOninja Wonder why Eddward binding hung 18:11
m: my $z := gather { loop { take 42 } }
camelia ( no output )
Eddward It expanded the gather to put it in the array?
IOninja I guess the @'s eagerness affects the binding too
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␤␤»
IOninja m: my @s = lazy gather { loop { take 42 } }
camelia ( no output )
Eddward m: my @s := lazy gather { loop { take 42 } } # just an experiment
camelia rakudo-moar d5262e: OUTPUT«Type check failed in binding; expected Positional but got Seq (?)␤ in block <unit> at <tmp> line 1␤␤»
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:13
IOninja buggable: eco file::find 18:14
buggable IOninja, Found 3 results: File::Find::Duplicates, File::Find, Concurrent::File::Find. See modules.perl6.org/#q=file%3A%3Afind
IOninja use the second one? 18:15
sena_kun I wonder is it a dependency here...
Yes. I'll use it, thanks.
TimToady for some reason, I keep misreading IOninja as IOnian, and then wondering what the j is doing in there... 18:17
IOninja :) 18:18
That's a... major mistake. 18:19
18:20 xiaomiao is now known as DrEeevil
robertle IOnion? 18:21
TimToady why couldn't you have a name like Phrigninja or Dorninja?
18:21 cdg joined
TimToady or Mixolyninja 18:21
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
Is multi-MAIN the right answer?
IOninja Eddward: multies. multi MAIN.... yeah
Eddward cool
Thanks
TimToady IOnion would imply an integral Onion, if not one with integrity... 18:24
RabidGravy Or a Microsoft class representing the interface to an Onion 18:28
18:31 agentzh joined 18:35 agentzh left 18:36 Manifest0 joined 18:41 TEttinger joined 18:44 pyrimidine joined 18:49 pyrimidi_ joined, pyrimidine left
rindolf Hi all 18:52
18:52 kurahaupo__ joined
Geth doc/language-section-examples2: ba42f1d99b | Altai-man++ | 15 files
Fix signatures, skip some examples testing
18:53
doc/language-section-examples2: e762247204 | Altai-man++ | util/extract-examples.p6
Add new items to excluded files list
doc/language-section-examples2: e842f77679 | Altai-man++ | xt/examples-compilation.t
Add new test
18:53 agentzh joined
rindolf TimToady: hi! Happy Shalom Saturday. 18:53
18:54 pyrimidi_ left 19:00 zakharyas joined
rindolf are you all at FOSDEM now? 19:02
19:04 darutoko left 19:05 cdg left, KotH left 19:06 KotH joined 19:10 labster joined
IOninja isn't 19:12
19:15 itcharlie joined
rindolf IOninja: I see,' 19:20
IOninja: neither am I to be honest
MasterDuke timotimo: not sure what you mean? 19:24
19:25 jeffythedragonsl joined
jeffythedragonsl anyone there? 19:27
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:28
jeffythedragonsl trying to install perl6 now 19:29
MasterDuke jeffythedragonsl: how are you doing it?
jeffythedragonsl following perl6.org/downloads/
19:31 Cabanoss- joined
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
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.
MasterDuke jeffythedragonsl: looks like you forgot --gen-moar
jeffythedragonsl woops 19:33
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.
this: perl Configure.pl --gen-moar --prefix /opt/rakudo-star-2017.01
so that had --gen-moar 19:34
IOninja vaguelly recalls some issues with --prefix stuff 19:35
jeffythedragonsl: what OS are you on?
MasterDuke do you have to do --prefix=?
19:35 gdonald left, Cabanossi left, Cabanoss- is now known as Cabanossi
jeffythedragonsl ubuntu 19:35
IOninja huggable: deb
huggable IOninja, CentOS and Debian Rakudo packages: github.com/nxadm/rakudo-pkg/releases
IOninja jeffythedragonsl: prolly easier to just install from that deb ^ 19:36
19:36 telex left
IOninja sudo dpkg -i blah-blah.deb 19:36
buggable: eco zef
buggable IOninja, zef 'It's like [cpanm] wearing high heels with a tracksuit': github.com/ugexe/zef
IOninja And ^ that's the package manager, its readme should have bootstrapping instructions.
And after that you're good to go (you don't need Task::Star; just install the modules you actually need) 19:37
19:37 gdonald joined
jeffythedragonsl looks like it installed 19:38
19:38 telex joined
IOninja Cool. 19:38
jeffythedragonsl the official ubuntu repo version is 2014.07 still 19:40
how do I make typing 'perl6' in bash point to the new version? 19:41
geekosaur hash -r
if that doesn't do it, check your $PATH, you may need to reorder entries 19:42
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
well it has perl5 lol...
geekosaur 'type perl6' 19:45
jeffythedragonsl perl6 is /usr/bin/perl6 19:46
but when I check the version ➜ ~ perl6 -v This is perl6 version 2014.07 built on parrot 6.6.0 revision 0
geekosaur yes, that sounds right if you installed a debian package 19:47
you need to put /opt/rakudo-star-2017.01/bin at the start of $PATH if I am reading backscroll correctly
also I'd remove the OS package, it will just hurt you. (parrot? that thing's ancient) 19:49
jeffythedragonsl ok the 2017.01 got installed in /opt/rakudo/bin/perl6 19:50
cool
19:51 pyrimidine joined
jeffythedragonsl thanks 19:52
so should ubuntu update their repos?
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
the problem is getting it into debian stable/testing and then get ubuntu to pick it up
which can be "fun" beause of disjoint release cycles 19:55
19:56 pyrimidine left
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
by the time 2050 comes around you'll be at 2019
and in 2100 you'll be lucky if you get to have 2045
jeffythedragonsl ugh 20:00
whyyyyy
timotimo because it's ubuntu
jeffythedragonsl does fedora have a tighter release cycle? 20:01
I used ubuntu to learn linux because it worked out of the box the best
I feel like more people would use p6 if the default was to have a recent version...
timotimo fedora's a bit quicker 20:02
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
Available Packages 20:03
rakudo-star.x86_64 0.0.2016.11-1.fc25 updates
^- that's what i get on my fedora box
2017.01 is just like 5 days old, so i can understand that it's not in there yet
20:03 AlexDaniel joined
jeffythedragonsl i'll just make a symlink from /usr/bin/perl6 to /opt/rakudo/bin/perl6 and use a shebang in my programs 20:04
20:04 zakharyas left
IOninja Use #!/usr/bin/env perl6 as the shebang line instead 20:05
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:07
DrEeevil Gentoo has 2017.01 ... ;) 20:09
jeffythedragonsl install gentoo? challenge accepted.
MasterDuke arch linux does also
sena_kun jeffythedragonsl, it is not hard at all.
20:10 agentzh left
DrEeevil jeffythedragonsl: pff, that's no challenge 20:10
the most difficult part is buggy UEFI flavours ...
20:10 agentzh joined
jeffythedragonsl i've installed arch before but gentoo was too hard 20:11
AlexDaniel well, debian unstable has 2016.12 20:12
and testing has it too
timotimo yeah, isint is "is it a native int" 20:13
wow, even testing?
that's pretty sad
oh hold on
that's 2016
AlexDaniel so the next release of debian will have something that is reasonably fresh, and ubuntu should get it too eventually
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}
jeffythedragonsl ok I got this to work
#!/usr/bin/env perl6
say 'hi';
I just put PATH=/opt/rakudo/bin:$PATH in ~/.profile
AlexDaniel timotimo: given that 2017.01 is only 15 days old I'm not sure why you are so disappointed :) 20:15
ah
it's other way round
jeffythedragonsl lol it's that that more than the ubuntu version is from 2014
so slow
AlexDaniel
.oO( now how do I delete my stupid messages in IRC… )
20:16
jeffythedragonsl can you even do that?
RabidGravy Eddward, sub MAIN(:version(:$v)) { say $v } 20:17
20:17 ocbtec left
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 pmurias left
Eddward I'm trying to get something that will take "--version" (or "-V") but not "--version False" 20:18
RabidGravy yes
Eddward, sub MAIN(Bool :version(:$v)) { say $v }
Eddward And I need a multi- because there's another mutli which handles real paramaters with required options.
jeffythedragonsl could be useful for when people type their passwords into chat by accident
20:19 agentzh left
Eddward The version coded in the script 20:19
sub MAIN(Bool :version(:$v)) { say "1.2-rc3" }
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
still think it's going to be hard to convince people to use it for Serious Business Stuff
AlexDaniel this works pretty well: multi MAIN(Bool:D :$version) { say ‘version!’ }; multi MAIN(*@args) { say ‘something’ }
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.
AlexDaniel Eddward: so my attempt is still wrong? ↑
pierrot: o/ 20:23
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.
timotimo don't forget the ! there
oh, okay
jeffythedragonsl so if I find some docs I can improve I submit changes here? github.com/perl6/doc 20:26
AlexDaniel Eddward: do you have some bigger example or a set of tests?
20:26 leah2 left
AlexDaniel jeffythedragonsl: oh! This sounds amazing! Yes! 20:26
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
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:28
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
This is the perl5 I'm trying to port : gist.github.com/anonymous/58252c4e...9c0f2b0247 20:31
jeffythedragonsl like this for example? docs.perl6.org/routine/rel2abs 20:32
Eddward This is my first try : gist.github.com/anonymous/3523deab...1bf3f9d43c
AlexDaniel jeffythedragonsl: yes! 20:33
20:33 adu joined
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:34
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
Eddward oh
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
Eddward I'll look at modules then. Thanks.
MasterDuke buggable: eco GetOpt
buggable MasterDuke, Found 6 results: Getopt::Tiny, Getopt::Long, Getopt::Type, Getopt::Kinoko, Getopt::Std. See modules.perl6.org/#q=GetOpt
MasterDuke Eddward: ^^^
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:37
MasterDuke: Thanks 20:38
AlexDaniel Eddward: this one seems to be working fine gist.github.com/AlexDaniel/ea616d5...b3b09ae077
20:38 jeffythedragonsl left
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'
AlexDaniel Eddward: it prints “Usage: …”
Eddward oh 20:40
":D"
I need to see what that means.
20:41 leah2 joined 20:44 pyrimidine joined 20:50 pyrimidine left, pyrimidine joined
Eddward AlexDaniel: Thanks for the example with Bool:D. I'll need to learn more of these modifiers. 20:52
AlexDaniel Eddward: docs.perl6.org/type/Signature#inde...ned_Values 20:53
gfldex Eddward: also: docs.perl6.org/language/variables#...ialization 20:54
20:54 pyrimidine left 20:55 bjz joined
gfldex Eddward: related: docs.perl6.org/language/typesystem...efinedness 20:55
Eddward They should cover some of this in the section(s) explaining 'sub MAIN' 20:57
20:57 melezhik_ joined 20:59 melezhik_ left
TimToady m: sub MAIN($foo, :V(:$version)) {} 21:00
camelia rakudo-moar d5262e: OUTPUT«Usage:␤ <tmp> [-V|--version=<Any>] <foo> ␤»
TimToady Eddward: ^^ if that's what you were asking 21:01
21:04 Tonik left 21:05 wamba left, kraih joined 21:06 kraih left
IOninja 0.o 21:09
21:11 Eddward left 21:12 girafe joined 21:13 adu left 21:24 Ven joined 21:25 Eddward joined
Eddward TimToady: Know if there's a way to do it without the '=<Any>"? 21:27
TimToady m: sub MAIN($foo, Version :V(:$version)) {}
camelia rakudo-moar d5262e: OUTPUT«Usage:␤ <tmp> [-V|--version=<Version>] <foo> ␤»
21:28 lucasb joined
TimToady just puts whatever the type is there 21:28
lucasb hehe, I was trying to figure out how the program name became '<tmp>'
here is it: github.com/perl6/evalbot/blob/mast...ot.pl#L262
TimToady m: sub MAIN($foo, Version(Str) :V(:$version)) {} 21:31
camelia rakudo-moar d5262e: OUTPUT«Usage:␤ <tmp> [-V|--version=<Str>] <foo> ␤»
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␤␤»
TimToady aww
gfldex m: say Version.new("1.2.*")
camelia rakudo-moar d5262e: OUTPUT«v1.2.*␤»
TimToady but that don't work so well in a siggy type 21:33
21:33 agentzh joined
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␤␤»
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.*");
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␤␤»
gfldex m: use MONKEY-TYPING; augment class Str { method Version(Str $s) { Version.new($s) } }; sub MAIN($foo, Version(Str) :V(:$version)) {}
camelia rakudo-moar d5262e: OUTPUT«Usage:␤ <tmp> [-V|--version=<Str>] <foo> ␤»
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.*␤»
gfldex also, I'm not good with myself :)
21:37 andrzejku left
BenGoldberg Ahh. 21:37
gfldex Eddward: ^^^
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'?␤␤»
BenGoldberg m: class bar { }; class Foo { method bar(Int) { 42 } }; bar(Foo, 3);
camelia rakudo-moar d5262e: OUTPUT«Cannot find method 'bar' on object of type List␤ in block <unit> at <tmp> line 1␤␤»
robertle why oh why does IO::Socket::Async not have a native-descriptor() ??
BenGoldberg m: class bar { }; class Foo { method bar(Int) { return bar.new } }; bar(Foo, 3);
camelia rakudo-moar d5262e: OUTPUT«Cannot find method 'bar' on object of type List␤ in block <unit> at <tmp> line 1␤␤»
Eddward gfldex: The monkey typing thing?
BenGoldberg m: class bar { }; class Foo { method bar(Int) { return bar.new } }; bar(Foo);
camelia rakudo-moar d5262e: OUTPUT«WARNINGS for <tmp>:␤Useless use of constant value bar(Foo) in sink context (line 1)␤»
BenGoldberg m: class bar { }; class Foo { method bar(Int) { return bar.new } }; dd bar(Foo);
camelia rakudo-moar d5262e: OUTPUT«bar(Foo)␤»
BenGoldberg m: class bar { }; class Foo { method bar(Int) { return bar.new } }; dd Foo.new.bar;
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␤␤»
robertle is so want to do SO_REUSEPORT
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␤␤»
BenGoldberg m: class bar { }; class Foo { method bar(Int) { return bar.new } }; dd bar(Foo.new, 3);
camelia rakudo-moar d5262e: OUTPUT«Cannot find method 'bar' on object of type List␤ in block <unit> at <tmp> line 1␤␤»
BenGoldberg is confused about 'on object of type List'
21:39 Cabanossi left
gfldex Foo.new, 3 <-- List with 2 elements 21:40
21:40 Cabanossi joined 21:43 Ven left
lucasb m: class A { method B { 10 } }; class B {}; say B(A.new) 21:43
camelia rakudo-moar d5262e: OUTPUT«10␤»
lucasb ^^ this shows indirect-object syntax without invocant marker works?
21:43 sanctusgray joined
lucasb iow, I think it shouldn't work without the colon 21:44
Eddward m: $?FILE.IO.basename.say
camelia rakudo-moar d5262e: OUTPUT«evalbot-file-kCZgh_B_dS␤»
21:45 pyrimidine joined 21:50 CIAvash left
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␤␤»
lucasb ^^ Should this one work? without 'class B {}', B(A:) works fine 21:51
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␤␤»
gfldex m: say Str.^methods[0].(Str:)
camelia rakudo-moar d5262e: OUTPUT«Too few positionals passed; expected 1 argument but got 0␤ in block <unit> at <tmp> line 1␤␤»
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:53
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 21:55 pyrimidine left
gfldex can I actually provide the invocant like that in a call? 21:55
IOninja m: my $s = ' ♥ '; say Str.^methods[3]($s) 21:57
camelia rakudo-moar d5262e: OUTPUT« ♥ ␤»
21:57 bayprogrammer left
IOninja wonder what it thinks ($s:) is 21:57
gfldex seams to be a NOP
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
maybe TimToady can enlighten us? 21:59
IOninja m: dd (A:)
camelia rakudo-moar d5262e: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared name:␤ A used at line 1␤␤»
IOninja m: class A {}; dd (A:)
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:)␤»
IOninja shrugs
22:03 mr-foobar joined
gfldex if I would doc that it would be a documented unfeature 22:12
22:15 lucasb left 22:19 agentzh left
BenGoldberg *Variable* ???? 22:19
timotimo that's really weird :D 22:20
22:30 bjz left
Eddward Is there a way to write my own USAGE() and still call the old one? 22:30
my $old_usage = &USAGE; sub USAGE{ $prefix.say; $old_usage() }
Don't try that, it's infinite recursion. 22:31
err rather, what's the name of the default USAGE() implementation? 22:36
22:36 agentzh joined, rindolf left 22:41 wamba joined, bjz joined
IOninja Supposed to be $?USAGE if the docs are to be believed, but seems unimplemented 22:48
hmmm, it is assigned to in code 22:49
RabidGravy yean there's a big TODO athe top of Main.pm
Eddward It looks like it get generated. Wonder if it's only generated if USAGE() isn't defined.
timotimo perhaps &OUTER::<USAGE>? 22:50
RabidGravy yes
IOninja ah
22:50 kurahaupo__ left, jeffythedragonsl joined
jeffythedragonsl what's up? 22:50
IOninja \o
22:50 kurahaupo__ joined, pyrimidine joined
timotimo jeff, y the dragons l? 22:50
jeffythedragonsl jeffythedragonslayer
IOninja dragons layer? :) 22:51
jeffythedragonsl lol
dragon slayer
jeffythedragonslayer.com/
#cslounge thought I was dragon slather
timotimo "Windows XP games run better on Linux than Windows 10 now." - yes, this is true. 22:53
Eddward global $?USAGE is a TODO in rakudo/src/core/Main.pm 22:54
22:55 pyrimidine left
jeffythedragonsl yes I was impressed 22:55
MasterDuke wine is pretty darn good nowadays 22:56
jeffythedragonsl vastly better experience than when I tried it 5 years ago 22:57
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
22:59 RabidGravy left 23:01 jeff__ joined
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:01
23:01 jeffythedragonsl left 23:02 jeff__ left, jeffythedragonsl joined
jeffythedragonsl ok 23:02
moritz for the perl6 org you can just request a commit bit
for rakudo the process applies as MasterDuke outlined it
23:02 jluis joined
moritz jeffythedragonsl: what's your github username? 23:03
jeffythedragonsl github.com/jeffythedragonslayer
23:03 sanctusgray left
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. gist.github.com/anonymous/4cd6a3aa...eb9bbe5640
23:07 sena_kun left
jeffythedragonsl thx 23:08
23:11 wamba left 23:19 pyrimidine joined
jeffythedragonsl I should install rakudobrew too I suppose 23:20
23:20 girafe left 23:22 lizmat joined
timotimo nah 23:24
rakudobrew isn't so great
samcv so in perl 6 you can redefine whitespace i read a while ago, but how do i actually do it
23:24 pyrimidine left
samcv so i can have horrible documents with emoji as whitespace 23:24
jeffythedragonsl what about zef? 23:25
samcv i like zef
23:27 lep_ left
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
23:29 gdonald left
jeffythedragonsl panda? 23:29
23:31 gdonald joined
samcv timotimo, how do i learn about slangs? 23:33
timotimo read one :) 23:34
23:34 lep-delete joined
samcv panda is ok but i like zef better because you can update all modules 23:34
jeffythedragonsl noslang.com is good for learning slang ;) 23:35
samcv :\
www.google.com/search?q=perl+6+slang not finding that much info
IOninja mouq.github.io/slangs.html 23:36
samcv thanks 23:37
23:37 jluis left 23:39 nowan left 23:40 jeffythedragonsl left 23:41 kurahaupo__ left 23:42 bjz left 23:43 cyphase left
timotimo eco: slang 23:45
.eco slang
IOninja buggable: eco slang
buggable IOninja, Found 6 results: Slang::Tuxic, Slang::Piersing, v5, Slang::SQL, Slang::Roman. See modules.perl6.org/#q=slang
timotimo oh, that's how 23:46
23:46 [particle] left 23:47 ugjka left, [particle] joined 23:48 jayk left, jayk joined 23:51 ugjka joined 23:52 lukaramu left 23:57 jeffythedragonsl joined 23:58 robertle left