Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2012-12-11

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:01 skids joined #perl6
00:01 lichtkind S02 say nothing
00:01 fgomez joined #perl6
00:01 benabik S09 says .bytes exists on buffer-like things.
00:03 diakopter is there a lazy/pump version of split? match?
00:03 benabik S32/Str says Str.bytes is gone and suggests $str.encode($encoding).bytes insteads, and Str.encode says it returns a Buf.
00:03 benabik In short, I see no Buf.bytes directly in the spec, but I see several places that says it should exist.  :-D
00:03 dalek tablets: 644c205 | (Herbert Breunung)++ | docs/appendix-a-index.txt:
00:03 dalek tablets: .bytes is no longer Str method
00:03 dalek tablets: review: https://github.com/perl6/tablets/commit/644c205a57
00:04 lichtkind sound sane thank you very much yes i brought it up becasue i saw in git history of spec that .bytes is gone as str
00:04 diakopter .quads would be nice too.
00:05 diakopter <bump my last question>
00:05 lichtkind true
00:05 lichtkind what you mena
00:05 lichtkind mean
00:06 fgomez joined #perl6
00:06 dalek tablets: ceabc7f | (Herbert Breunung)++ | docs/appendix-a-index.txt:
00:06 dalek tablets: .bytes example, benabik++
00:06 dalek tablets: review: https://github.com/perl6/tablets/commit/ceabc7fdcf
00:07 timotimo i'm confused. i'm in the debugger and i step and nothing happens
00:08 timotimo the line is return gather { some-function-call($args, $more); };
00:08 timotimo it's run for the second time at that point and the first time it stepped into the gather
00:08 rurban sent day 11 advent calendar for preview.
00:09 timotimo oh, maybe it didn't match one of the multis?
00:09 lichtkind hai reini
00:10 lichtkind should wrote my calendar leaf too
00:11 timotimo oh, wat? weird.
00:11 timotimo DUH, lazy evaluation
00:11 timotimo i am silly.
00:21 ggoebel joined #perl6
00:23 popl joined #perl6
00:26 lichtkind everyone is sometimes :)
00:26 lichtkind no need to prag with that
00:26 timotimo so, uh, apparently $ doesn't match end of string? does it only match an actual newline?
00:27 timotimo oh, it *does* match end of string
00:27 timotimo i must be missing something obvious again, like a space at the end.
00:30 sorear $ matches only the end of string
00:30 sorear it is different from perl 5 in this regard
00:31 sorear perl 5 $ sometimes matches end of lines
00:35 lichtkind yes
00:35 lichtkind multiline mode is gone
00:35 lichtkind $$ is now end of line
00:37 timotimo ah, nice.
00:39 dayangkun joined #perl6
00:45 timotimo i'm going insane with this super-meta-programmy test framework
00:45 sorear even in default mode perl 5 $ would match at EOL of the last line
00:45 sorear timotimo: you may be making it too metaprogrammy.
00:46 timotimo i'm trying to raise a project from the dead
00:46 timotimo the testing framework is ... special
00:46 timotimo i'm struggling with refering to methods from a different module that is apparently not accessible from the test framework
00:47 timotimo it tries to eval('&' ~ $subname)
00:48 timotimo because the list of tests is kind of a tree of strings and the test methods are the same strings but with - instead of " "
00:52 timotimo i don't understand what's going on. i have a has Foo $.foo handles <some stuff>; and i try to do $.foo = $foo;
00:53 timotimo it says it cannot assign to a readonly variable, but i see no readonly anywhere
00:53 skids try has foo is rw
00:54 TimToady that probably won't work
00:54 TimToady well, maybe it will
00:54 timotimo now i get "cannot look up attributes in a type object" and am confused. does that mean the attribute is uninitialised?
00:54 timotimo WOW
00:54 timotimo it starts up
00:55 skids might have to play with where "is rw" is
00:55 diakopter ++
00:55 timotimo i put the is rw and it works, great!
00:56 TimToady if you're inside the class, $!foo = $foo won't need the 'is rw'
00:57 TimToady if you're outside the class, why are you setting up a delegation outside the class?
00:58 timotimo i'm doing necromancy on some really old code
00:58 TimToady I was originally thinking your were trying to do $.some = $some or $.stuff = $stuff
00:58 timotimo in fact, 4 years old.
00:58 TimToady in which case the 'is rw' needs to be in the delegated class
01:00 diakopter TimToady: is there a lazy/pump version of split (in case memory is very tight and the string is very large)?
01:01 sorear who says normal split won't be lazy?
01:02 diakopter dunno
01:04 diakopter is it?
01:05 anuby joined #perl6
01:06 lue joined #perl6
01:07 TimToady the spec seems to assume that you'd only return something lazy when splitting or combing something that is already lazy
01:08 TimToady but it doesn't prohibit lazy behavior when splitting/combing a string
01:08 diakopter since it's a cpu/memory tradeoff, how about an adverb?
01:08 diakopter (either way)
01:08 TimToady since it's a tradeoff, how 'bout a context?
01:08 TimToady and because we already have contexts :)
01:09 TimToady (supposedly)
01:09 TimToady you can do the split even faster in sink context :)
01:09 timotimo so sink is something like eager? i've been wondering what exactly it was ...
01:10 * TimToady ponders what a hyper or a raced split would look like... O_O
01:10 TimToady sink is a variety of eager, yes
01:10 diakopter r: split('','' x 9000000000)
01:10 p6eval rakudo a308f3:  ( no output )
01:11 diakopter n: split('','' x 9000000000)
01:11 p6eval niecza v24-5-g599cbcb: OUTPUT«(timeout)»
01:12 TimToady which should, of course, warn you about a Useless use of split in sink context
01:12 timotimo what could be the reason for this not working:
01:12 TimToady looks like rakudo is just about the point of being able to provide that very useful Useless warning
01:13 timotimo regex one { <[a..z]> }; regex two { \d+ }; regex three { <one><two> }; our $.regex = /^ <three> $/;
01:13 timotimo the error i'm getting is "no such method three for invocant of type 'Cursor'"
01:13 timotimo does it have to be "our regex"?
01:14 TimToady generally one puts them into a grammar in that case
01:14 timotimo sounds sensible.
01:14 TimToady though you can say 'my regex' and then call it as <&three>
01:14 TimToady but then it doesn't capture $<three> automatically, since there's a punct
01:15 TimToady so you have to say <three=&three>, which is a bit suboptimal
01:15 TimToady std: regex one { <[a..z]> }; regex two { \d+ }; regex three { <one><two> }; our $.regex = /^ <three>  $/;
01:15 p6eval std a8bc48f: OUTPUT«Potential difficulties:â�¤  'regex' declaration outside of grammar at /tmp/43eKOkyz3J line 1:â�¤------> [32mregex one [33mâ��[31m{ <[a..z]> }; regex two { \d+ }; regex t[0mâ�¤ok 00:01 45mâ�¤Â»
01:15 TimToady n: regex one { <[a..z]> }; regex two { \d+ }; regex three { <one><two> }; our $.regex = /^ <three>  $/;
01:15 p6eval niecza v24-5-g599cbcb: OUTPUT«[31m===[0mSORRY![31m===[0m��Methods must be used in some kind of package at /tmp/HCXWpLpCqu line 1:�------> [32mregex one [33m�[31m{ <[a..z]> }; regex two { \d+ }; regex t[0m��Methods must be used in some kind of package at /tmp/HCXWpLpCqu line 1:�-…
01:16 timotimo can i do our $.regex = /^ <mygrammar::three> $/ then?
01:18 timotimo it seems i can. next failure to hunt ...
01:23 anuby joined #perl6
01:28 TimToady maybe <:&three> should capture to $<three>, much like normal :$foo makes foo => $foo
01:29 timotimo okay, no reason to hold back any more
01:29 timotimo i'm trying to resurrect the druid implementation masak++ made and last touched 4 years ago
01:29 Exodist joined #perl6
01:31 timotimo stumbling over all kinds of things
01:31 timotimo i suppose that shows how far perl6 has evolved?
01:32 TimToady you should make masak do it :)
01:32 timotimo haha
01:32 timotimo no, i need practice ... i think!
01:33 TimToady you do realize that fixing other people's code is what turns a lot of people off on Perl 5?  :)
01:35 timotimo because reading perl5 code can be pretty horrifying?
01:37 timotimo i'm at a point where apparently the game can be played
01:37 timotimo the test code pretty much doesn't work at all
01:37 timotimo and display isn't correct, sadly
01:41 japhb_ joined #perl6
01:42 japhb_ jnthn++ # Junction autothreader optimizations
01:44 timotimo the perl6 vim syntax highlighting seems to have problems with #=[ multiline comments ]
01:44 japhb_ Can't wait to see what he manages for the X issue
01:44 japhb_ timotimo, perhaps it assumes that # comments are single-line?
01:44 * mikemol has been spending a _lot_ of time in Python for work.
01:45 timotimo it makes one extra line pink, though
01:45 * mikemol now wants to try putting together an NQP impl in Python.
01:46 japhb_ mikemol, Dare we ask for an NQP in PyPy?
01:46 mikemol japhb_: All that'd require is writing it in pure Python, no?
01:46 timotimo that would instantly be the fastest perl6 interpreter :|
01:46 japhb_ mikemol, well, RPython (Restricted Python).  Actually, I guess RPython : Python :: NQP : Perl 6
01:47 * TimToady keeps wanting a Go implementation for some reason
01:47 mikemol Just as well to get some practice in that...I want to leverage PyPy for work at some point.
01:47 timotimo could it be that "next" jumps out of two for loops at once?
01:47 daniel-s_ joined #perl6
01:49 timotimo huh!
01:50 mikemol OK, if I want to study NQP by studying its implementations, where's the best place to start?
01:51 TimToady you should ask jnthn that, but he's asleep, like you're supposed to be :)
01:52 mikemol Me? Supposed to be asleep? I'm in GMT-5. :)
01:53 TimToady for some reason I have you in .de mentally
01:53 mikemol Airport code GRR.
01:53 timotimo i'm in .de, and i was right next to him in almost every of the last lines
01:54 cognominal_ joined #perl6
01:54 japhb_ joined #perl6
01:54 sorear mikemol: that is a great name for an airport
01:54 japhb_ Wheee, managed to overheat laptop until it locked up by compiling Rakudo
01:56 timotimo did this ever work? if so, how :|
01:56 TimToady timotimo: if it ran on ancient rakudo, it probably assumes a lot of stuff is in packages that no longer is
01:58 timotimo do you mean packages as in libraries, or packages as in "what's in a .pm file"?
01:58 japhb_ timotimo, And 4 years ago is an eternity in Rakudo Time
01:58 TimToady ancient rakudo tended to put things into packages more like Perl 5, not like Perl 6
01:58 cognominal joined #perl6
01:58 timotimo this code here seems wrong, but i can't really put my finger on it
01:58 timotimo did something about Array.kv drastically change in the last 4 years?
02:00 TimToady don't think so
02:00 diakopter TimToady: re fixing other people's code - it's how I earned a Perl 5 living for 4 years. loved it++
02:01 TimToady yer just weerd
02:01 diakopter but how much I've forgotten...
02:01 mikemol Is niecza really only 28k lines?
02:01 timotimo i don't really know how this could have ever been considered correct :|
02:01 diakopter mikemol: also see the .cs files
02:01 mikemol in /lib, find . -type f -name '*.cs' -print0|xargs -0 wc -l
02:02 timotimo or maybe i'm looking at the expected output and am expecting something different
02:02 mikemol I only counted the .cs files.
02:02 diakopter oh, there's lots of Perl 6 too
02:02 TimToady including the parser :)
02:03 timotimo the 3d view doesn't seem to be drawing correctly
02:03 timotimo other than that the game seems playable now
02:03 timotimo i think i'll just throw it up on github and ask masak++ to do the rest?
02:03 TimToady that could be changes in print/say semantics (gist and such)
02:03 sorear there's also 4k of perl 6 in .setting files
02:06 timotimo nah, it's rendering the board fine, what doesn't work is apparently looping over the layers and columns and such
02:06 timotimo when i make the "obvious and wrong" fix, it spews lots and lots of errors at me
02:07 TimToady is it using unary hypers?  those have fishtailed a bit in semantics over time
02:07 TimToady also, old rakudo didn't really do Parcels right, or at all, depending
02:12 timotimo nah, it's super simple and i think i'm just ten times as tired and twice as stomach-achey as required for understanding perl6 good enough
02:12 TimToady relying on order of side effects for a hyper say would also be a problem
02:16 timotimo well, it's simply about the loop body not being executed
02:16 timotimo i'll show you the lines if you like
02:17 FROGGS_ joined #perl6
02:17 timotimo https://github.com/timo/druid/blob​/master/lib/Druid/View/Text.pm#L92 - this line seems to skip over all of the layers
02:18 lichtkind_ joined #perl6
02:18 timotimo @layers, which is assigned in the first line of that function looks like this:
02:19 timotimo Array.new([[0, 0, 0, 0, 0, 1, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [...], ... [0, 0, 0, 0, 0, 0, 0, 0]))
02:21 daniel-s__ joined #perl6
02:22 exodist_ joined #perl6
02:22 timotimo so $line would be 7 at the beginning and $row would be [0, 0, 0, 0, 0, 0, 0, 0]
02:22 timotimo and some time it would have a 1 in there to signal that there's a block there
02:23 timotimo but $line.kv would just be ((0, 7),) :(
02:23 timotimo changing it to $row.kv.reverse -> $cell, $column was not helpful at all
02:23 araujo joined #perl6
02:25 timotimo what a terrible night to have a curse.
02:30 _daniel-s__ joined #perl6
02:31 ggoebel_ joined #perl6
02:34 terribleperson joined #perl6
02:35 timotimo oh
02:35 timotimo there already was a "ng-compat" branch that was probably there to make it moderner
02:41 timotimo oh, interesting
02:42 timotimo there's a SORRY but apparently no filename?
02:42 timotimo probably just the filename i passed on the commandline then
02:42 timotimo no, actually not.
02:44 timotimo good night happy perl6 people :)
02:44 diakopter o/
02:45 bonsaikitten joined #perl6
02:50 lichtkind_ good night
02:55 hdcool09 joined #perl6
03:24 cognominal joined #perl6
03:35 terribleperson joined #perl6
03:50 colomon joined #perl6
03:56 cognominal joined #perl6
03:59 cognominal_ joined #perl6
04:03 noggle joined #perl6
04:10 cognominal_ joined #perl6
04:10 sisar joined #perl6
04:17 s1n joined #perl6
04:37 cognominal_ joined #perl6
04:45 cognominal joined #perl6
04:55 terribleperson joined #perl6
05:23 rummik joined #perl6
05:27 telex joined #perl6
05:44 xinming joined #perl6
06:03 dalek rakudo/nom: 7797039 | pmichaud++ | docs/parrot-relationship.txt:
06:03 dalek rakudo/nom: Add docs/parrot-relationship.txt, which codifies the relationship manager roles between the Rakudo and Parrot projects.
06:03 dalek rakudo/nom:
06:03 dalek rakudo/nom: This was adopted in June 2011, but apparently never made it into
06:03 dalek rakudo/nom: either of the repositories.  So I'm adding it to the Rakudo
06:03 dalek rakudo/nom: repository now.
06:03 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7797039827
06:08 kaleem joined #perl6
06:23 Rix joined #perl6
06:24 dayangkun joined #perl6
06:34 cognominal joined #perl6
06:43 whitefaced joined #perl6
06:49 dalek roast: 3ac110d | moritz++ | S06-traits/is-readonly.t:
06:49 dalek roast: fudge new, failing test for read-only attributes
06:49 dalek roast: review: https://github.com/perl6/roast/commit/3ac110d110
06:50 whitefaced http://codepad.org/SePMyCQR why does the if statement at line 27 cause my program to exit every time, even when i enter input to stdin
06:51 whitefaced http://codepad.org/0BvMdcrN
06:51 whitefaced ^
06:52 moritz whitefaced: that looks like Perl 5. This channel is about Perl 6. Please try #perl or #perl-help or so
06:52 whitefaced perl wouldnt help me
06:52 whitefaced so i had to resort to here
06:52 whitefaced sorry
06:52 moritz so you thought you'd just ignore the 6 in #perl6? :-)
06:52 moritz you can also try irc.perl.org
06:53 whitefaced ok
06:53 whitefaced i will
06:53 whitefaced :D
07:00 kaare_ joined #perl6
07:22 grondilu joined #perl6
07:28 whitefaced left #perl6
07:32 wamba joined #perl6
07:57 samuelvasy joined #perl6
08:01 brrt joined #perl6
08:05 hdcool09 joined #perl6
08:09 bphillips joined #perl6
08:28 marloshouse_ joined #perl6
08:31 kurahaupo joined #perl6
08:31 jnthn morning, #perl6
08:32 cedrvint o/ jnthn
08:32 moritz \o
08:33 cedrvint hello #perl6, do you know if there's an upcoming event about Perl 6 in France ?
08:33 moritz jnthn: thanks for the sinking patches, all spectests now pass
08:33 brrt hi
08:33 Kharec joined #perl6
08:33 moritz jnthn: but there's still a known sink bug that I want to track down
08:39 jnthn moritz: yay. And oK :)
08:41 samuelvasy left #perl6
08:49 rummik joined #perl6
08:50 arnsholt cedrvint: I don't know of any, but cognominal might know
08:52 cedrvint arnsholt: thanks, I'm waiting for his reply then.
08:53 moritz nr: say gather { 42 }
08:53 p6eval rakudo 779703, niecza v24-5-g599cbcb: OUTPUT«␤»
08:56 benabik nr: say gather { take 42 } #?
08:56 p6eval rakudo 779703, niecza v24-5-g599cbcb: OUTPUT«42␤»
08:57 brrt left #perl6
08:59 kurahaupo joined #perl6
09:04 cedrvint r: https://gist.github.com/4257198
09:04 p6eval rakudo 779703: OUTPUT«foo with constraints␤»
09:04 cedrvint any idea why infix:<cmp> with constaints isn't call?
09:04 cedrvint *called
09:05 moritz cedrvint: because there's an infix:<cmp>(Int, Int) in the setting
09:05 moritz cedrvint: and nominal types bind tighter than contraints
09:05 cedrvint moritz: thanks!
09:06 moritz write it as
09:06 moritz multi infix:<cmp>(R:D $a, R:D $b) { ... }
09:07 felher Good morning, #perl6
09:09 jnthn o/ felher
09:09 cedrvint moritz: I get this message "Ambiguous call to 'infix:<cmp>'; these signatures all match: \n :(Int:D \a, Int:D \b) \n :(R:D $a, R:D $b)"
09:10 moritz grml
09:10 moritz try
09:10 moritz R:D $a where { 1 }, R:D $b where { 1 }
09:11 cedrvint moritz++ # it works \o/
09:12 cedrvint this looks a little bit "artificial" though, is it possible to use "is tighter(...)" here?
09:13 moritz no
09:13 moritz but you can say  'is default' after the signature
09:14 cedrvint thanks, it works like a charm too.
09:16 hx107 joined #perl6
09:17 kst` joined #perl6
09:18 LordV joined #perl6
09:18 Maddingue joined #perl6
09:18 cognominal joined #perl6
09:20 telex joined #perl6
09:29 kaleem joined #perl6
09:35 cedrvint the post for today isn't published yet.
09:36 cedrvint http://irclog.perlgeek.de/​perl6/2012-12-11#i_6230127
09:38 * moritz publishes it
09:42 cedrvint moritz: maybe the "editor's note" should be removed (at the top)?
09:42 * cedrvint isn't sure
09:42 kivutar joined #perl6
09:43 moritz cedrvint: me neither. If rurban doesn't want it published, he just needs to remove the note from the article
09:46 dakkar joined #perl6
09:47 fhelmberger joined #perl6
09:49 hoelzro I'm wondering if the "30,000 foot overview of Perl 6" really merits an advent calendar post
09:49 hoelzro I'm thinking something flashier and more interesting should take its place
09:49 cedrvint hoelzro: why?
09:49 hoelzro and I should just write up a series of articles about it later
09:49 hoelzro cedrvint: I've been looking into it, and while it's interesting, I don't think it will really "hook" people on to the language
09:51 cedrvint hoelzro: it could help to understand what's Perl 6 (langage, implementations, ...)
09:51 hoelzro I just feel that most people know that already; maybe that's presuming too much, though
09:54 cedrvint it depends on who these "people" are, I guess most people in #perl6 already have an overview of Perl 6
09:55 cedrvint but it's not the case in my compagny for instance :)
09:55 cedrvint (and they are curious)
09:56 hoelzro is it advent calendar material, though?
09:56 hoelzro I look at some advent calendar posts and think "wow, that's really cool!"
09:56 hoelzro I feel like the advent calendar stuff should get people interested, and then they can read up on it
09:57 jnthn hoelzro: Yes, but somebody looking at a bunch of the posts and finding them interested won't automatically know exactly what is what, or how to join in, get hold of stuff, etc.
09:57 cedrvint troo
09:57 hoelzro hmm
09:58 hoelzro I would think that someone interested in Perl 6 after reading a post would just go perl6.org, and start there
10:01 cognominal joined #perl6
10:03 moritz well, if you want to add an overview article to perl6.org, that would be great too
10:06 hoelzro I was thinking of digging into Parrot/NQP/Rakudo and trying to write a basic overview on how things work
10:06 hoelzro so people interested in contributing find it easier to do so
10:26 SmokeMachine joined #perl6
10:29 wamba joined #perl6
10:38 timotimo huh, there's hyphenation in the middle of the advent calendar post: "since the inter- preter's state is" and "consistency is guarant- teed"
10:39 timotimo "taking and releasing locks costs per- formance"
10:41 timotimo "a sub does not only con- tain", is this in the source or is my browser acting up?
10:52 wamba joined #perl6
10:53 SamuraiJack joined #perl6
11:03 cognominal joined #perl6
11:05 Su-Shee_ joined #perl6
11:29 birdwindupbird joined #perl6
11:30 grondilu joined #perl6
11:31 grondilu rn:  sub f { .(4) given -> $n { $n > 1 ?? &?ROUTINE($n-1)*$n !! 1 } }; say f  # expecting 24
11:31 p6eval niecza v24-5-g599cbcb: OUTPUT«(timeout)»
11:31 p6eval ..rakudo 779703: OUTPUT«Too many positional parameters passed; got 1 but expected 0␤  in sub f at /tmp/2AK_oUMygM:1␤  in sub f at /tmp/2AK_oUMygM:1␤  in block  at /tmp/2AK_oUMygM:1␤␤»
11:32 jnthn grondilu: &?ROUTINE refers to the f
11:32 grondilu indeed, but shouldn't it refer to the anonymous sub?
11:32 jnthn No, because it's not a sub, but just a block.
11:32 jnthn r: say -> { } ~~ Routine
11:33 p6eval rakudo 779703: OUTPUT«False␤»
11:33 grondilu rn:  sub f { .(4) given -> $n { $n > 1 ?? &?BLOCK($n-1)*$n !! 1 } }; say f  # expecting 24
11:33 p6eval rakudo 779703: OUTPUT«No such method 'Nil' for invocant of type 'Int'␤  in  at src/gen/BOOTSTRAP.pm:839␤  in any  at src/gen/BOOTSTRAP.pm:836␤  in sub f at /tmp/SoPBpb2UJY:1␤  in block  at /tmp/SoPBpb2UJY:1␤␤»
11:33 p6eval ..niecza v24-5-g599cbcb: OUTPUT«24␤»
11:33 jnthn That one should work, apart from I'm pretty sure Rakudo doesn't implement &?BLOCK yet
11:33 grondilu ok
11:33 timotimo trying out bailador and the test suite 05-post-content runs fine in a debugger but not when run by prove or rakudo standalone
11:34 tadzik ack
11:34 jnthn See? it really does de-bugger your programs :P
11:34 timotimo it *may* be a version discrepancy between my perl6 binary and the perl6-debug one, though
11:34 timotimo perl6-debug says "this is perl6 version  built on parrot 4.6.0 revision 0", but perl6 is "version 2012.11", so ...
11:35 jnthn Hm, that looks wrong
11:35 jnthn (the perl6-debug version output)
11:35 timotimo hm, it's from the same directory, though.
11:36 jnthn yeah, I think it's version reporting is just wrong.
11:36 timotimo tadzik: the error in question is that request.env<psgi.input>.decode claims that decode is called on an Any.
11:36 tadzik yeah, I remember this one
11:37 timotimo so, just a too old rakudo version?
11:37 tadzik please check
11:37 timotimo sure
11:37 tadzik I don't think this bug is fixed
11:38 cedrvint rn: https://gist.github.com/4257923
11:38 p6eval rakudo 779703: OUTPUT«debug␤True␤False␤»
11:38 p6eval ..niecza v24-5-g599cbcb: OUTPUT«debug␤Unhandled exception: Cannot call &infix:<cmp>; none of these signatures match:␤    C where { ... }, C where { ... };; |$c where { ... }␤  at /tmp/bjRMGun9mw line 7 (infix:<cmp> @ 8) ␤  at /tmp/bjRMGun9mw line 9 (mainline @ 12) ␤  at /home/p6eval/niecz…
11:39 timotimo bleh, i think i'll throw out rakudo star and get panda manually. should be pretty easy, right?
11:39 moritz right
11:39 tadzik panda should be able to install rakudo-debugger now too :)
11:40 timotimo that's excellent
11:42 cedrvint moritz, jnthn: I thought infix:<..> was generic as it relies on infix:<cmp> (overloaded for my class)
11:42 rindolf joined #perl6
11:42 cedrvint does Rakudo implement S03#3389?
11:44 timotimo tadzik: with a very current rakudo it still fails that test
11:47 cedrvint *S03#line_3389
11:48 * cedrvint doesn't know how to link to a given spec line.
11:49 moritz cedrvint: I think it uses cmp by default, but short-cuts for strings and integers
11:50 cedrvint I can't get infix:<cmp> indirectly called by infix:<...> in https://gist.github.com/4257923
11:51 cedrvint *infix:<..>
11:51 moritz r: https://gist.github.com/4257923
11:51 p6eval rakudo 779703: OUTPUT«debug␤True␤False␤»
11:52 * cedrvint was not able to find any test-case in roast about that
11:52 timotimo r: https://gist.github.com/4257997
11:52 p6eval rakudo 779703: OUTPUT«debug␤Type check failed for return value; expected 'Bool' but got 'Order'␤  in sub infix:<cmp> at /tmp/jmOdLX_5pn:7␤  in block  at /tmp/jmOdLX_5pn:9␤␤»
11:52 timotimo er, yeah
11:53 timotimo r: https://gist.github.com/4257997
11:53 p6eval rakudo 779703: OUTPUT«debug␤Increase␤False␤»
11:53 timotimo indeed
11:56 timotimo oh
11:57 cognominal joined #perl6
11:57 timotimo i can run the test with perl6, but with panda it breaks? something's terribly off here.
11:57 moritz panda precompiles
11:58 grondilu rn: multi talk { callwith "hello" }; multi talk($msg) { say $msg }; talk;
11:58 p6eval rakudo 779703:  ( no output )
11:58 p6eval ..niecza v24-5-g599cbcb: OUTPUT«Unhandled exception: Cannot call &talk; none of these signatures match:␤    Any␤    Any␤  at /tmp/Hvxsa4Xiyt line 1 (mainline @ 5) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4208 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4209 (module-C…
11:58 timotimo moritz: good point. i added lib/ but not blib/ to P6LIB
11:58 tadzik timotimo: yeah, that's my experience too. I think it should be skipped, and I'll file a bug and assign it to flussence++ :P
11:59 jnthn grondilu: callwith iterates through a *predetermined* candidate list (namely, the list of available candidates which take no arguments, whihc is just one).
11:59 jnthn Not re-dispatches each time.
11:59 jnthn If you want that, just call talk(...) again :)
11:59 moritz timotimo: you need to add blib/lib to PERL6LIB
11:59 timotimo yes, i did that now
12:00 timotimo and that's exactly what breaks it, blib vs lib
12:00 arnsholt jnthn: Ooh, that's the confusing change that was made to the {call,next}{same,with} semantics, isn't it?
12:01 timotimo but how can my web app be webscale if i don't precompile it with rakudo before deploying it?
12:02 grondilu ok I'll use the name of the subroutine but I would have liked something more generic, and &?ROUTINE would not redispatch :/
12:03 jnthn arnsholt: No, I don't think it's ever been specified to re-dispatch.
12:03 jnthn arnsholt: It's always been iterator-y
12:03 tadzik gotta love sloccount and it's COCOMO calculations
12:03 arnsholt Right. My bad then
12:03 tadzik Total Estimated Cost to Develop                           = $ 18,216
12:03 tadzik yeah, sure
12:03 felher rurban++ # very long blog post. Hope I will get around to read it after $job
12:04 timotimo tadzik: that's for bailador? :)
12:04 tadzik timotimo: nah, just something at $dayjob :)
12:04 timotimo heh
12:04 crab2313 joined #perl6
12:05 tadzik Bailador is just $ 11,328
12:08 * jnthn wonders what the debugger is :)
12:08 moritz tadzik: and nqp and rakudo?
12:09 cedrvint http://www.ohloh.net/p/rakudo/estimated_cost
12:09 cedrvint http://www.ohloh.net/p/nqp/estimated_cost
12:11 moritz parrot: 4M
12:11 sorear https://www.ohloh.net/p/niecza says that it contains 8 man-years of code D:
12:11 cedrvint sorear: how many men are you?
12:13 tadzik moritz: nqp + parrot + rakudo is $ 20,372,602 :)
12:13 tadzik 150 person-years
12:13 tadzik I wonder if it says person-years to be politically correct and avoid sexism accusations
12:14 * cedrvint agrees
12:14 timotimo huh? no, everybody knows that only men are persons!
12:15 cognominal the important thing is not the cost but the value, and that, you can't calculate.
12:15 sorear one small step for mankind.
12:15 jnthn My magical coding robot is offended at the use of "person-years", and wishes it was "coding-entity-years" :P
12:15 tadzik personkind, you sexist pig! :D
12:16 sorear apparently I need to be more men, because ohloh is complaining about decreasing year over year cmmits
12:17 sorear oh hey, created by cedrvint
12:17 * sorear wondered if ohloh was algorithmically scraping the web for projects
12:17 cedrvint :)
12:18 sorear sleep&
12:24 sftp joined #perl6
12:26 grondilu rn: package Foo { proto talk {*}; multi talk {...}; our talk($msg) { say $msg } }; Foo::talk "hello";
12:26 p6eval rakudo 779703: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Malformed ourâ�¤at /tmp/qgWOh83qB_:1â�¤------> [32m{ proto talk {*}; multi talk {...}; our [33mâ��[31mtalk($msg) { say $msg } }; Foo::talk "he[0mâ�¤    expecting any of:â�¤        scoped declaratorâ�¤Â»
12:26 p6eval ..niecza v24-5-g599cbcb: OUTPUT«[31m===[0mSORRY![31m===[0m��Malformed our at /tmp/9pQmveN7ZB line 1:�------> [32m { proto talk {*}; multi talk {...}; our[33m�[31m talk($msg) { say $msg } }; Foo::talk "h[0m��Parse failed��»
12:26 grondilu rn: package Foo { proto talk {*}; multi talk {...}; our multi talk($msg) { say $msg } }; Foo::talk "hello";
12:27 p6eval rakudo 779703: OUTPUT«Could not find symbol '&talk'␤  in method <anon> at src/gen/CORE.setting:10204␤  in  at src/gen/Metamodel.pm:2404␤  in any find_method_fallback at src/gen/Metamodel.pm:2392␤  in any find_method at src/gen/Metamodel.pm:925␤  in  at src/gen/BOOTSTRAP.pm:852␤  in any …
12:27 p6eval ..niecza v24-5-g599cbcb: OUTPUT«Potential difficulties:â�¤  &talk is declared but not used at /tmp/FZF6rCXpEN line 1:â�¤------> [32mpackage Foo { proto talk [33mâ��[31m{*}; multi talk {...}; our multi talk($m[0mâ�¤â�¤helloâ�¤Â»
12:27 jnthn grondilu: Putting "our" on a single candidate makes no sense (and should probably be an error)
12:27 grondilu rn: package Foo { our proto talk {*}; multi talk {...}; multi talk($msg) { say $msg } }; Foo::talk "hello";
12:27 p6eval rakudo 779703: OUTPUT«Too many positional parameters passed; got 1 but expected 0␤  in sub talk at /tmp/vRndARrONC:1␤  in block  at /tmp/vRndARrONC:1␤␤»
12:27 p6eval ..niecza v24-5-g599cbcb: OUTPUT«Potential difficulties:â�¤  &talk is declared but not used at /tmp/jDQ4qhG39L line 1:â�¤------> [32mpackage Foo { our proto talk [33mâ��[31m{*}; multi talk {...}; multi talk($msg) [0mâ�¤â�¤Unhandled exception: System.NullReferenceException: Object reference not s…
12:27 jnthn And now your proto is not liberal enough :)
12:28 grondilu oh yeah
12:28 grondilu but what if I want a user of a module to access a version of a function, but not an other?
12:29 jnthn I think you can selectively export, but if you export the proto that's all or nothing.
12:29 jnthn Well, apart from here you're not exporting.
12:29 jnthn But relying on our semantics.
12:29 jnthn I'd say it's more Perl 6-ish to export, imho.
12:29 grondilu ok
12:30 jnthn But there's not a way to have just some candidates visible on the outside and others on the inside.
12:30 jnthn (with the our approach)
12:34 dalek joined #perl6
12:35 moritz r: https://gist.github.com/4258258
12:35 p6eval rakudo 779703: OUTPUT«("A", "B", "Z").list␤»
12:36 moritz that produces ("Z", "A", "B").list in qast-sink-1
12:36 timotimo just trying out random perl6 modules right now. Inline gives "obsolete use of | or \ with sigil on param $arr" and SDL gives "cannot import symbol &trait_mod:<is> from Inline because it already exists in this lexical scope &trait_mod:<is>" :(
12:36 timotimo i'm not sure if the last one should be a bug on SDL or on Inline?
12:36 FROGGS_ timotimo: it's a bug in rakudo, and it's known
12:37 timotimo OK
12:40 jnthn moritz: What if you make it gatehr sink for ... ?
12:40 jnthn *gather
12:41 moritz jnthn: doesn't make a difference
12:41 moritz jnthn: the problerm is that the inner 'take $_ for @$_;
12:41 moritz '
12:41 moritz isn't run early enough
12:42 moritz if I add   0;  after that loop, all is fine
12:42 moritz so I guess the gather block is not sunk
12:43 moritz oh, I guess I need to patch up sub coro for that
12:43 moritz in PIR :(
12:43 jnthn moritz: See the PIR patching up I did in MapIter the other day for clues
12:45 moritz jnthn: that looks roughly like what I would have written myself
12:46 moritz now that nqp::can works with modules and roles, I wonder if I should remove the check for repr_defined
12:48 sergot Could somebody install JSON::Tiny on feather? ;]
12:48 moritz sergot: you should be able to install it in your home dir
12:48 moritz clone panda, then   perl6 bootstrap.pl
12:48 jnthn moritz: It's a fast check.
12:49 jnthn moritz: I re-ordered the checks to make sure we do them in speed order
12:49 cognominal joined #perl6
12:49 jnthn repr_defined should be faster than can should be faster than defined
12:49 moritz jnthn: ok
12:49 sergot moritz: I'm, but I want to use cronjobs, and then it have to be installed on the whole server I think.
12:50 moritz sergot: cron jobs for which purpose?
12:50 sergot moritz: generating feather.perl6.nl/~sergot/modules
12:50 moritz sergot: then it should be enough to set a few environment variables for the cron job
12:51 moritz like PATH, HOME, maybe some others
12:52 sergot moritz: thanks a lot. :)
13:02 moritz jnthn: my patch didn't help. And the odd thing is, the gather block seems to be in sink context already
13:02 moritz ./perl6 -e 'eager do gather for ^2 { take $_; .say for 42 }'
13:02 moritz prints the 42 twice
13:03 moritz just as it should
13:03 moritz so it must be in sink context
13:07 wamba joined #perl6
13:10 moritz hm
13:10 moritz maybe the problem is that some part in there is a Parcel and not a list
13:10 moritz and there is no Parcel.sink yet
13:10 jnthn moritz: just to check - it's certainly about gather, not about the for as a statement modifier?
13:11 moritz jnthn: for as statement modifier generally work
13:11 sergot rakudo is really fast now... ! \o/
13:11 moritz though I'll try it with a normal loop, just to be sure
13:14 moritz no, doesn't make a difference
13:18 bphillips moritz: I was told you were the smartmatch "resident expert" yesterday.  Does this behavior seem right? https://gist.github.com/4253309 (it goes into the "if" block on each loop iteration)
13:18 bphillips r: https://gist.github.com/4253309
13:18 p6eval rakudo 779703: OUTPUT«Matched! c against /a/b/1/d/:e: (match was :c)␤Matched! d against /a/b/1/d/:e: (match was :c)␤Matched! e against /a/b/1/d/3: (match was :e)␤»
13:19 moritz bphillips: rakudo currently returns the (possibly modified) string from s///. I believe that's not quite right, but I'm not sure at the moment
13:20 bphillips so is there no way to tell if the smartmatch actually succeeded when using s/// ?
13:20 timotimo r: say $_ for 1, 2, 3;
13:20 p6eval rakudo 779703: OUTPUT«1␤2␤3␤»
13:20 timotimo hm.
13:20 moritz bphillips: no
13:20 moritz I should fix that
13:21 bphillips also, $/ seems to persist over multiple ~~ s/// operations (specifically, it's not reset when one fails)
13:21 timotimo r: class A { multi method push(@a) { .push $_ for @a; }; multi method push($a) { say $a } }; A.new.push: (1, 2, 3);
13:21 p6eval rakudo 779703: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Two terms in a rowâ�¤at /tmp/Qe1k1s0qsD:1â�¤------> [32mclass A { multi method push(@a) { .push [33mâ��[31m$_ for @a; }; multi method push($a) { sa[0mâ�¤    expecting any of:â�¤        method argumentsâ�¤        postfixâ�¤        infix or meta-…
13:21 bphillips that also seems not quite right
13:21 moritz timotimo: .push $_  is wrong
13:22 timotimo that's what rakudo keeps telling me :D
13:22 moritz must   .push($something) or .push: $something
13:22 timotimo OK
13:22 bphillips moritz: is this something implemented in perl6 (vs. pir) that I could try my hand at fixing? (I've not really delved into perl6 internals but I'd love to give it a try)
13:22 moritz bphillips: yes, it is
13:23 moritz bphillips: in particular, look at method subst in src/core/Str.pm
13:23 moritz and method quote:sym<s> in src/Perl6/Actions.pm is the codegen for s///
13:23 timotimo moritz: i'm getting a "unable to parse expression in block; cound't find final }" self.push <HERE>($_) for $sg.node.v;
13:23 bphillips moritz: awesome! I'll take a look
13:24 timotimo but with a : instead of () it works
13:24 moritz timotimo: looks like you have a space between 'push' and '('
13:24 timotimo so i'll take that
13:24 timotimo or, derp, yes.
13:24 [Coke] misquotes moritz: "jnthn: thanks for all the stinking patches."
13:27 bphillips moritz: Is there a newb guide to checking out the spectests, modifying a test and running one?
13:27 * moritz has a stinking feeling in his stomach that this is going to be a hard problem
13:27 moritz bphillips: 'make testable'
13:31 bphillips moritz: this subst issue is going to be a hard problem, you mean? (or something else)
13:31 moritz bphillips: no, my remaining error in the sink branch
13:31 bphillips ah, ok :-)
13:31 moritz and I was mostly punning on sink/stink to please [Coke] ;-)
13:32 jnthn :)
13:32 jnthn moritz: Yeah, tricky...
13:32 timotimo r: class A { method new(@items) { .say for @items } }; A.new: [1, 2, 3, 4];
13:32 p6eval rakudo 779703: OUTPUT«1␤2␤3␤4␤»
13:36 timotimo r: class A { method new(@items) { .say for @items } }; A.new: :items([1, 2, 3, 4]);
13:36 p6eval rakudo 779703: OUTPUT«Not enough positional parameters passed; got 1 but expected 2␤  in method new at /tmp/Swv9Kv9ZfP:1␤  in block  at /tmp/Swv9Kv9ZfP:1␤␤»
13:37 timotimo it would be cool if it said "but you passed 1 named argument where 0 were expected.", too :P
13:37 moritz method always accept any named parameters
13:38 timotimo oh? and if they're not in the signature, they're just silently dropped?
13:38 moritz yes
13:38 timotimo is this only for method? what about multi/sub/submethod?
13:38 moritz only for methods
13:39 jnthn For submethod too, iirc
13:39 timotimo interesting. what's the idea behind it?
13:39 jnthn See interface consistency section of S12, but essentially it's to make deferal more useful
13:40 timotimo thanks
13:46 * moritz thinks this is a good candidate for the FAQs
13:48 pmurias joined #perl6
13:53 timotimo r: class A { has %.n; method new(@it) { $.n{$_} = $_ for @it; } }; my $a = A.new([1, 2, 3]); say +$a.n;
13:53 p6eval rakudo 779703: OUTPUT«Cannot look up attributes in a type object␤  in method n at src/gen/CORE.setting:1798␤  in method new at /tmp/8r4QeGkCxk:1␤  in block  at /tmp/8r4QeGkCxk:1␤␤»
13:55 cedrvint r: role R { }; multi sub infix:<..> (R:D $a, R:D $b) { !!! }; 1 .. 42;
13:55 p6eval rakudo 779703: OUTPUT«===SORRY!===␤CHECK FAILED:␤Calling 'infix:<..>' will never work with argument types (Int, Int) (line 1)␤    Expected any of:␤    :(R:D $a, R:D $b)␤»
13:56 cedrvint why infix:<..>(Int, Int) isn't available anymore?
13:57 cedrvint n: role R { }; multi sub infix:<..> (R:D $a, R:D $b) { !!! }; 1 .. 42;
13:57 p6eval niecza v24-5-g599cbcb: OUTPUT«Potential difficulties:â�¤  $a is declared but not used at /tmp/_sb7pXOA5Z line 1:â�¤------> [32mrole R { }; multi sub infix:<..> (R:D [33mâ��[31m$a, R:D $b) { !!! }; 1 .. 42;[0mâ�¤  $b is declared but not used at /tmp/_sb7pXOA5Z line 1:â�¤------> [32m { }; mult…
13:57 cedrvint n: role R { }; multi sub infix:<..> (R:D $a, R:D $b) { +$a .. +$b }; 1 .. 42;
13:57 p6eval niecza v24-5-g599cbcb: OUTPUT«Unhandled exception: Cannot call &infix:<..>; none of these signatures match:␤    R where { ... }, R where { ... };; |$c where { ... }␤  at /tmp/V1KSTbtsch line 1 (mainline @ 5) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4208 (ANON @ 3) ␤  at /home/p6e…
13:58 cedrvint rn: role R { }; 1 .. 42;
13:58 p6eval rakudo 779703, niecza v24-5-g599cbcb:  ( no output )
14:00 timotimo r: class A { has %.n is rw; method new(@it) { $.n{$_} = $_ for @it; } }; my $a = A.new([1, 2, 3]); say +$a.n;
14:00 p6eval rakudo 779703: OUTPUT«Cannot look up attributes in a type object␤  in method n at src/gen/CORE.setting:1786␤  in method new at /tmp/YkNkK4lh0s:1␤  in block  at /tmp/YkNkK4lh0s:1␤␤»
14:00 timotimo r: class A { has %.n is rw; method new(@it) { $.n{$_} = $_ for @it; } }; my $a = A.new([1, 2, 3]); say $a;
14:00 p6eval rakudo 779703: OUTPUT«Cannot look up attributes in a type object␤  in method n at src/gen/CORE.setting:1786␤  in method new at /tmp/A2uAhYBDBF:1␤  in block  at /tmp/A2uAhYBDBF:1␤␤»
14:00 moritz timotimo: %.n isn't initialized in .new
14:00 timotimo oh, that would explain it
14:00 moritz that's done in BUILD
14:01 moritz see http://doc.perl6.org/language​/objects#Object+Construction or http://perlgeek.de/blog-en/perl-6/objec​t-construction-and-initialization.html
14:01 pmurias what's the difference between nqp::list and nqp::qlist?
14:01 timotimo thanks :)
14:01 moritz pmurias: nqp::qlist return a QRPA
14:01 moritz which is designed to be more performant in some cases, but I don't remember which :(
14:02 jnthn shift
14:02 jnthn and some others, but shift is the biggie
14:03 pmurias what's a QRPA?
14:04 pmurias jnthn: it has the same semantics but different performance?
14:06 jnthn pmurias: yeah, the idea is that we use it for nqp::list in the future and then nqp::qlist goes away
14:06 jnthn pmurias: It's just a transitional thing.
14:06 jnthn Basically, Rakudo's iterators need shift to be efficient.
14:07 jnthn And QRPA optimizes for that.
14:07 jnthn But I don't think it really makes anything else slower either...
14:07 dakkar joined #perl6
14:07 * pmurias maps both to js Array
14:07 timotimo i'm not sure how to code this: i would like to have my class Graph take a list of things, like Node and Edge in its .new as a list and i call .push on that list to assign them to the proper attributes %.nodes and @.edges; how do i make the positional argument available to BUILD without having to create a new attribute for my Graph class
14:08 kaleem_ joined #perl6
14:09 jnthn method new(@things) { self.bless(*, :@things) }; submethod BUILD(:@things) { @!edges = @things.grep(Edge); ... }
14:09 moritz or split up @things into my @nodes, my @edges in method new
14:10 moritz and then call self.bless(*, :@nodes, :@edges);
14:10 moritz (though that's not very friendly for subclassing)
14:10 timotimo hm, i have a multi method "push" that does the sorting, i'd like to not duplicate that in the constructor if possible :|
14:11 moritz timotimo: then put the code somewhere where you can use it both from push and from new
14:11 timotimo i'll probably add more different cases, too. like maybe a bare Str would become a new or existing Node instead
14:11 timotimo oh, yeah
14:11 moritz sounds like a good task for multi subs
14:11 timotimo well, i'll save it for later and just do named arguments for new until i find an elegant way to structure all of that
14:13 cedrvint I need your help for my Advent post: why I can't create a Range of Int anymore once I did:
14:13 cedrvint r: multi sub infix:<..> (Str $a, Str $b) { !!! }; 1 .. 42
14:13 p6eval rakudo 779703: OUTPUT«===SORRY!===␤CHECK FAILED:␤Calling 'infix:<..>' will never work with argument types (Int, Int) (line 1)␤    Expected any of:␤    :(Str $a, Str $b)␤»
14:14 jnthn r: say &infix:<..>.is_dispatcher
14:14 p6eval rakudo 779703: OUTPUT«False␤»
14:14 moritz because the infix:<..> in the setting isn't a multi sub
14:14 jnthn Apparently, 'cus infix:<..> is not declared multi in the setting..
14:14 cedrvint is it a bug in the setting?
14:15 PacoAir joined #perl6
14:15 jnthn I'm a bit surprised it's this way, at least...
14:15 jnthn Maybe the spec says otherwise.
14:15 moritz r: multi sub infix:<..>($a, $b) { CORE::infix:<..>($a, $b)  }; multi sub infix:<..> (Str $a, Str $b) { !!! }; 1 .. 42
14:15 p6eval rakudo 779703: OUTPUT«No such method 'Any' for invocant of type 'Parcel'␤  in  at src/gen/BOOTSTRAP.pm:845␤  in  at src/gen/BOOTSTRAP.pm:839␤  in any  at src/gen/BOOTSTRAP.pm:836␤  in sub infix:<..> at /tmp/WTbUa8BQNs:1␤  in block  at /tmp/WTbUa8BQNs:1␤␤»
14:16 bluescreen10 joined #perl6
14:17 moritz r: multi sub infix:<..>($a, $b) { Range.new($a, $b)  }; multi sub infix:<..> (Str $a, Str $b) { !!! }; 1 .. 42
14:17 p6eval rakudo 779703:  ( no output )
14:17 moritz r: multi sub infix:<..>($a, $b) { Range.new($a, $b)  }; multi sub infix:<..> (Str $a, Str $b) { !!! }; say 1 .. 42
14:17 p6eval rakudo 779703: OUTPUT«1..42␤»
14:17 jnthn r: multi sub infix:<..>($a, $b) { &CORE::infix:<..>($a, $b)  }; multi sub infix:<..> (Str $a, Str $b) { !!! }; say 1 .. 42
14:17 p6eval rakudo 779703: OUTPUT«1..42␤»
14:17 jnthn r: multi sub infix:<..>($a, $b) { &CORE::infix:<..>($a, $b)  }; multi sub infix:<..> (Str $a, Str $b) { !!! }; say "1" .. "42"
14:17 p6eval rakudo 779703: OUTPUT«Stub code executed␤  in sub infix:<..> at /tmp/aPYneBDZlu:1␤  in block  at /tmp/aPYneBDZlu:1␤␤»
14:19 moritz so it's CORE::... vs. &CORE:: ?
14:20 cedrvint as of my understanding, there's no need for a "multi sub infix:<..>" since it *should* rely on infix<cmp> for user's types.
14:20 cedrvint this is not the case, sadly.
14:21 cedrvint http://irclog.perlgeek.de/​perl6/2012-12-11#i_6231704
14:21 jnthn cedrvint: That's odd because I was looking at that code yesterday and it does call cmp
14:22 jnthn cedrvint: Oh...were your objects really Int or Num + a role?
14:22 pmurias jnthn: do iterators support operations besides nqp::shift?
14:22 dalek rakudo-js: 274e07a | (Paweł Murias)++ | wrap_nqp:
14:22 dalek rakudo-js: IO::CaptureOutput optional while building
14:22 dalek rakudo-js: review: https://github.com/pmurias/​rakudo-js/commit/274e07af99
14:22 dalek rakudo-js: 4308243 | (Paweł Murias)++ | / (2 files):
14:22 dalek rakudo-js: [nqp] start of exception handling
14:22 dalek rakudo-js: review: https://github.com/pmurias/​rakudo-js/commit/4308243e9b
14:22 dalek rakudo-js: 2f16b43 | (Paweł Murias)++ | / (2 files):
14:22 dalek rakudo-js: Move out p6 ops to the leftover file
14:22 dalek rakudo-js: review: https://github.com/pmurias/​rakudo-js/commit/2f16b43c09
14:22 dalek rakudo-js: 91257ff | (Paweł Murias)++ | / (3 files):
14:22 dalek rakudo-js: [nqp] implement many nqp:: ops, pass test 59
14:22 dalek rakudo-js: review: https://github.com/pmurias/​rakudo-js/commit/91257ffa50
14:22 jnthn pmurias: And boolification
14:23 jnthn (for if the iterator has more stuff)
14:23 pmurias to check if the list is empty?
14:23 jnthn true if there's more, false if not
14:23 pmurias ok
14:24 pmurias nqp-js passes now passes 92 more test assertions ;)
14:25 cedrvint jnthn: (about "were your objects really Int or Num + a role?") I don't understand your question, I tried something like:
14:25 cedrvint r: https://gist.github.com/4257923
14:25 p6eval rakudo 779703: OUTPUT«debug␤True␤False␤»
14:25 pmurias s/passes//
14:29 jnthn cedrvint: I think you need to implement a succ in your class too for the range to work out.
14:29 jnthn skajp, bbl.
14:29 jnthn pmurias: nice :)
14:36 am0c joined #perl6
14:37 skids joined #perl6
14:38 cedrvint phenny: tell jnthn that .succ is optional according to S03: "If T also defines .succ, then the range may be iterated. (Otherwise the range may only be used as an interval, and will return failure if asked for a RangeIter.)".  Also, this doesn't solve my problem: https://gist.github.com/4257923
14:38 phenny cedrvint: I'll pass that on when jnthn is around.
14:38 pmurias if I want to make nqp-js panda installable what should I check it on? latest rakudo star?
14:40 bphillips joined #perl6
14:40 cedrvint phenny: "skajp"?
14:40 phenny cedrvint: "skajp" (sv to en, translate.google.com)
14:40 tadzik skype phonetically, I guess
14:40 tadzik pmurias: we can figure it out
14:41 tadzik you probably need something like https://github.com/jnthn/rakudo​-debugger/blob/master/Build.pm
14:41 tadzik note that it currently will also run the original Panda build() method
14:42 tadzik which may have been a wrong design decision
14:42 tadzik anyway, you just write stuff that'll put stuff in bin/ and blib/lib
14:43 tadzik don't know if that'd be sufficient for a big thing like Rakudo
14:46 pmurias nqp-js is not a big thing yet
14:51 pmurias tadzik: I don't currently have rakudo installed so I was wandering what should I test the package against
14:51 pmurias (I'm installing curent rakudo star now)
14:55 sftp joined #perl6
14:55 stopbit joined #perl6
14:57 pmurias tadzik: if nqp-js is currently run as "nqp bin/nqp-js.nqp" how should that be installed?
14:58 tadzik pmurias: nqp-js thing, executable, having #!/usr/bin/env nqp on top, I think
14:58 tadzik pmurias: is that standalone?
15:04 GlitchMr joined #perl6
15:08 betterworld joined #perl6
15:10 [Coke] r: sub asdf (Str $col where $col.chars==2) { say "here" } ; asdf("A");
15:10 p6eval rakudo 779703: OUTPUT«Constraint type check failed for parameter '$col'␤  in sub asdf at /tmp/CfBCKozMKq:1␤  in block  at /tmp/CfBCKozMKq:1␤␤»
15:11 [Coke] n: sub asdf (Str $col where $col.chars==2) { say "here" } ; asdf("A");
15:11 p6eval niecza v24-5-g599cbcb: OUTPUT«Unhandled exception: Constraint type check failed for parameter '$col' in 'asdf'␤  at /tmp/R0ULyRnN4x line 0 (asdf @ 1) ␤  at /tmp/R0ULyRnN4x line 1 (mainline @ 4) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4208 (ANON @ 3) ␤  at /home/p6eval/niecza/lib…
15:12 [Coke] Is there a way to write that so the compilers are happy?
15:14 pmurias tadzik: standalone? it require a .pbc library
15:15 cooper joined #perl6
15:19 tadzik pmurias: ah. I'm concerned about where will it be looking for that .pbc
15:26 BinGOs joined #perl6
15:26 sweet_kid joined #perl6
15:26 nyuszika7h joined #perl6
15:26 nebuchadnezzar joined #perl6
15:26 zamolxes joined #perl6
15:26 yeltzooo joined #perl6
15:26 steven___ joined #perl6
15:26 literal joined #perl6
15:26 sergot joined #perl6
15:26 Juerd joined #perl6
15:26 pmurias joined #perl6
15:26 ruoso joined #perl6
15:28 pmurias tadzik: I have installed rakudo-star and wrote a Build.pm and META.info
15:28 pmurias how do I test if the module builds with panda?
15:28 tadzik pmurias: panda install /path/to/directory/
15:32 BinGOs joined #perl6
15:32 sweet_kid joined #perl6
15:32 nebuchadnezzar joined #perl6
15:32 zamolxes joined #perl6
15:32 yeltzooo joined #perl6
15:32 steven___ joined #perl6
15:32 literal joined #perl6
15:32 sergot joined #perl6
15:32 Juerd joined #perl6
15:32 nyuszika7h joined #perl6
15:32 silug joined #perl6
15:35 benabik joined #perl6
15:39 pmurias tadzik: why does it fetch rakudo-js when I'm installing from hard drive?
15:40 tadzik pmurias: it copies it to a lib where it'll build it
15:40 tadzik s/lib/dir
15:40 tadzik it doesn't build in-place
15:41 pmurias shouldn't it be instant?
15:42 * pmurias suspects panda prints out the info msgs at the wrong time
15:43 tadzik pmurias: nah, pure perl6 copying is slooow
15:43 tadzik don't ask me why :)
15:44 tadzik it's not "shell cp -r" though
15:45 hash_table joined #perl6
15:46 hoelzro tadzik: I'd be troubled if that were only slow under Perl 6 ;)
15:46 pmurias hoelzro: ?
15:47 hoelzro shell cp -r
15:47 tadzik :)
15:51 mtk joined #perl6
16:01 * [Coke] was very excited to see a commit from pmichaud.
16:09 * jnthn back
16:09 phenny jnthn: 14:38Z <cedrvint> tell jnthn that .succ is optional according to S03: "If T also defines .succ, then the range may be iterated. (Otherwise the range may only be used as an interval, and will return failure if asked for a RangeIter.)".  Also, this doesn't solve my problem: https://gist.github.com/4257923
16:10 jnthn cedrvint: OK, will take a look at bit later...gotta worry about $dayjob a bit more yet today
16:14 bowtie joined #perl6
16:14 pmurias tadzik: why don't you use cp?
16:15 jnthn pmurias: Can't rely on having a cp command
16:15 pmurias can\
16:16 pmurias * can't we test for that?
16:16 david80s joined #perl6
16:16 jnthn It's simpler just to do it the same everywhere.
16:17 jnthn If it's really *that* slow it's better to look into why and make it faster.
16:17 cognominal joined #perl6
16:18 pmurias makes sense
16:20 david80s left #perl6
16:23 david80s joined #perl6
16:24 wamba joined #perl6
16:31 TimToady slurp/spurt are likely not going to be fast unless you do them in binary mode
16:32 TimToady and a memory mapping will probably be faster yet
16:32 david80s I'm new in IRC, hope you'll get my question. Why does my 1st test on Perl6 with rakudo-star-2012.11 have a really poor low performance (30sec !! vs 0.04s with Strawberry Perl 5.16) while the source is as simple as it can be: use v6; my Int $max = 1000000; say "max=" , $max; while $max>0 {   $max--; } say "loop has ended";  Thanks in advance
16:36 TimToady three reasons, or so
16:37 TimToady first, parrot is not heavily optimized yet
16:37 TimToady second, Perl 6 defaults to arbitrary precision integers, which are a little more work
16:38 TimToady third and most important, you put a type on the variable, so it thinks it has to check the type on every --
16:38 [Coke] I would also add "Rakudo is not heavily optimized yet" to that.
16:38 TimToady (optimizer not smart enough to realize that -- can only produce another Int)
16:39 david80s Ok for two first args, but I've read in http://perlgeek.de/en/article/5-to-6 that typing variables has the ambition of optimization : "When you have type informations at compile time, you can perform certain optimizations. Perl 6 doesn't have to be slower than C, in principle.". Something went wrong ?
16:39 TimToady [Coke]: I meant that by #1
16:39 TimToady "ambition"
16:39 jnthn Well, the type *should* help in so far as the optimizer could inline the --. But ever since we started doing the :D/:U distinction on the multis it lost its ability to do that.
16:40 [Coke] you get a very small gain by elided the Int.
16:40 [Coke] *eliding
16:40 david80s well it's said "motivation" instead ambition...
16:41 TimToady oh, sorry, I was running it under niecza, where it did make some gain
16:41 [Coke] and it explodes if you use "int" instead of Int.
16:41 TimToady also, niecza runs that particular example about 4 times faster on my machine
16:42 [Coke] r: my int $a = 3; $a--;
16:42 p6eval rakudo 779703: OUTPUT«Cannot assign to a non-container␤  in sub postfix:<--> at src/gen/CORE.setting:3085␤  in block  at /tmp/d4DFfub3Ao:1␤␤»
16:42 [Coke] r: my int $a := 3; $a--;
16:42 p6eval rakudo 779703: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Cannot bind to natively typed variable '$a'; use assignment insteadâ�¤at /tmp/__Mpnpzewx:1â�¤------> [32mmy int $a := 3[33mâ��[31m; $a--;[0mâ�¤    expecting any of:â�¤        postfixâ�¤        infix or meta-infixâ�¤        infix stopperâ�¤Â»â€¦
16:42 [Coke] rakudo, go home, you're drunk.
16:42 TimToady which is, of course, pretty silly, since C has no problem with those semantics :)
16:42 jnthn [Coke]: You can't use -- with native ints yet since the native/rw interaction is a hard problem.
16:43 * [Coke] figured.
16:43 jnthn (Which hasn't been solved yet... :/)
16:43 TimToady yes, we basically need native pointers to do that
16:43 TimToady on some level or other
16:43 jnthn The :D and :U stuff I know how to fix, I just need a chunk of undisturbed time to concentrate on it.
16:43 [Coke] TL;DR - we know, we're working on it.
16:44 * [Coke] pokes jnthn. "Are you free now?"
16:44 * [Coke] had a plan to keep poking you for a while, but coke is too lazy and has already given up. :)
16:45 jnthn [Coke]: No, right now I'm trying to get the material done for a class I'm meant to teach on Thu/Fri :P
16:47 TimToady david80s: anyway, we're still "motivated"  :)
16:48 [Coke] why is it hard? overflow?
16:48 TimToady probably recognizing that a set of static candidates has a collective property that does not arise directly from the proto
16:50 jnthn Yeah, a lot of it is knowing we need to pass a reference rather than a value. But it's also the case that we really want it to inline well too.
16:50 TimToady -- on Int cannot produce an undef, but that's hard to infer currently
16:51 jnthn (for the native case)
16:51 jnthn Oh, the :U/:D thing at least somewhat needs the whole concept of those as types to be a bit more deeply embedded.
16:51 TimToady coercive types like Int() you mean?
16:52 jnthn No, but those are in the same problem space.
16:52 TimToady oh, okay, you mean like reference types, a la int** and such in C
16:52 jnthn At the moment, "as Int" (which Int() style things replace) is special cased.
16:52 TimToady and how those relate to boxed types
16:52 jnthn As is the handling of :U/:D
16:53 jnthn So only a handful of places are clueful about them.
16:53 david80s TimToady: I hope so. I assume not being the only one looking forward to code seriously with Perl6. I've tried my test avoiding swaping '$max - -' by '$max=$max+1', and it spit the result in 9s. If this can help jnthn too...
16:53 TimToady we probably need more return type annotation of the "Just" sort, like Haskell
16:53 jnthn But yes, there's certainly a reference issue for the ++
16:53 jnthn Well, returns Int:D would probably be enough.
16:54 jnthn (for the definedness case)
16:54 jnthn We're talking about 3 different problems at once here :)
16:54 TimToady 4, if you count the fact that you're not preparing your slides :)
16:54 jnthn D'oh :)
16:54 TimToady david80s: yes, nobody wants a fast Perl 6 more than we do :)
16:56 TimToady but also want it to be Perl 6, and not a fast some other language...
16:56 TimToady which is hard
16:59 cognominal joined #perl6
17:02 leont joined #perl6
17:03 * [Coke] is reminded that he needs to move some [spec] tickets from rakudo's queue to spec's.
17:05 david80s TimToady: Ok, try to keep in mind a particularity, good or bad, is strongly highlighted if it's facing a huge gap comparing to others products. I'm confident on the future and your hard work. It was a pleasure.
17:06 [Coke] question on https://rt.perl.org/rt3/Tic​ket/Display.html?id=116014 -
17:06 [Coke] given:
17:07 [Coke] rn: my Str $a = "Z"; $a++
17:07 p6eval rakudo 779703, niecza v24-5-g599cbcb:  ( no output )
17:07 [Coke] rn: my Str $a = "Z"; $a++; say $a;
17:07 p6eval rakudo 779703, niecza v24-5-g599cbcb: OUTPUT«AA␤»
17:07 [Coke] how is 'A' ... 'a' supposed to ever hit 'a' ?
17:08 [Coke] (argh. the RC link in the ticket has been smushed and is unusable)
17:08 [Coke] cedrvint: do you have the original URL for that ticket?
17:09 [Coke] n: 'A'...'a'.say;
17:09 p6eval niecza v24-5-g599cbcb: OUTPUT«a␤»
17:09 [Coke] n: ('A'...'a').say;
17:09 p6eval niecza v24-5-g599cbcb: OUTPUT«A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a␤»
17:09 [Coke] n: ('A'..'a').say;
17:09 p6eval niecza v24-5-g599cbcb: OUTPUT«"A".."a"␤»
17:21 kurahaupo joined #perl6
17:21 FROGGS_ does somebody know if there is a spec about the module search paths?
17:23 cognominal joined #perl6
17:27 Vlavv` joined #perl6
17:38 benabik joined #perl6
17:42 Chillance joined #perl6
17:42 TimToady FROGGS_: S11 tries to discourage the concept, reserving it only for private module development
17:42 TimToady errands &
17:52 FROGGS_ TimToady: k, thanks
17:55 PacoAir joined #perl6
17:55 wamba joined #perl6
18:03 lorn joined #perl6
18:13 MayDaniel joined #perl6
18:17 GlitchMr Oh, I've found actual Perl 6 module in CPAN
18:17 GlitchMr https://metacpan.org/module/Perl6::Conf
18:17 GlitchMr This doesn't seem to work well
18:33 * [Coke] ughs at metacpan's web page.
18:34 [Coke] ahhh. most of that pain is probably the podsix.
18:34 timotimo probably :|
18:42 arlinius joined #perl6
18:43 arlinius huh? they serve totally different purposes
18:43 arlinius sorry, wrong window
18:47 skids r: multi sub a ($a is rw) { "rw".say; $a; }; multi sub a ($a) { "ro".say; $a }; my $a = 1; a($a); a(1); # should mutability factor into multidispatch?
18:47 p6eval rakudo 779703: OUTPUT«Ambiguous call to 'a'; these signatures all match:␤:($a is rw)␤:($a)␤␤  in block  at /tmp/46e0fTEDL2:1␤␤»
18:50 jnthn skids: yes, just nyi
18:51 skids Wow I was expecting differently :-)
18:51 kaare_ joined #perl6
19:16 fgomez joined #perl6
19:17 pmichaud good afternoon, #perl6
19:17 jnthn o/ pmichaud
19:17 FROGGS_ hi pmichaud
19:18 [Coke] pmichaud: hio!
19:19 PerlJam pmichaud: greets!  LTNS
19:19 moritz \o
19:26 pmichaud I'm about to convert the rakudo github repo to an organization repo... any objections or comments before I do that?
19:27 pmichaud PerlJam: yes, ltns.  Hope things are going well there.
19:28 jnthn pmichaud: If you're comfortable doing so, I'm fine with it.
19:36 [Coke] pmichaud: wfm.
19:39 rjbs seen mauke
19:39 aloha mauke was last seen in #perl6 145 days 19 hours ago joining the channel.
19:40 [Coke] r: say 145 / (365.24/12)
19:40 p6eval rakudo 779703: OUTPUT«4.763991␤»
19:50 spider-mario joined #perl6
19:54 sorear good * #perl6
19:56 GlitchMr Perl 6 makes impossible without modifying implementation things possible - http://nikic.github.com/2012/07/27/How-t​o-add-new-syntactic-features-to-PHP.html - 'in' operator in PHP
19:56 dalek perl6-roast-data: 7b9a396 | coke++ | / (4 files):
19:56 dalek perl6-roast-data: today (automated commit)
19:56 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/7b9a396a22
19:56 GlitchMr http://perlcabal.org/~glitchmr/examples/in - in operator in Perl 6 :-)
19:56 GlitchMr I prefer Perl 6 version
19:57 GlitchMr niecza> my \in = '2'
19:57 GlitchMr 2
19:57 GlitchMr niecza> in in in
19:57 GlitchMr True
19:58 GlitchMr But perhaps I shouldn't abuse Perl 6 like that.
20:06 Woodi hallo :)
20:06 rjbs buffalo operator
20:06 Woodi GlitchMr: want to explain me something ?
20:07 Woodi just --> in signature is strange - it declares type of return value ?
20:08 GlitchMr --> is return value
20:08 GlitchMr It can be even constant value instead of type, but why?
20:08 Woodi just learning Perl 6 :)
20:10 Woodi two more strange/unknown things for my eye in that example... 'so' (creating booolean answer?) and why :exists and not .exists ?
20:11 GlitchMr :exists because I ask %b, not %b{$a}
20:11 GlitchMr so converts value to boolean
20:12 GlitchMr Just like !!
20:12 GlitchMr Or ?
20:12 grondilu r: say !! True
20:12 p6eval rakudo 779703: OUTPUT«True␤»
20:12 masak evenin', #perl6
20:12 * grondilu did not know this one
20:12 Woodi o/
20:13 Woodi but 'so %b{$a}' could work too ?
20:14 GlitchMr No
20:14 GlitchMr %b{$a} could exist but be falsy value
20:14 GlitchMr I wanted it to look like in Python
20:14 GlitchMr >>> "a" in {"a": False}
20:14 GlitchMr True
20:14 GlitchMr This is Python
20:15 Woodi >>> is prompt or operator ? :)
20:15 leont left #perl6
20:15 GlitchMr Woodi: It's Python prompt
20:15 Woodi oki :)
20:35 noggle joined #perl6
20:36 bruges joined #perl6
20:42 skids r: my @g = 1,2,3; my ($a, $b, $c) := @g[0,1,2]; $a.say; $c.say; my $d := @g[1]; $d = 5; $b.say; @g.say; $b = 6; # newly implemented my (...) and slice binding not happy together
20:42 p6eval rakudo 779703: OUTPUT«1␤3␤2␤1 5 3␤Cannot assign to a readonly variable or a value␤  in block  at /tmp/qjlELtsLRF:1␤␤»
20:43 fgomez joined #perl6
20:45 masak skids: if you bind directly to a value (like the 2 in @g[1]), you can't assign later.
20:47 cognominal joined #perl6
20:48 popl joined #perl6
20:59 fgomez joined #perl6
21:08 masak timotimo: ooh, you're resurrecting Druid? nice!
21:09 masak timotimo: I'll have more time next week. I could help you.
21:09 masak probably needs lots more tests.
21:10 timotimo well, yeah
21:10 timotimo i was just trying to get it running. then after a few hours of digging and trying to understand what has changed in the last 4 years i see your branch that tries to do resurection, too (but 2 years ago rather than 4)
21:11 timotimo on my branch you can apparently already play, but the 3d display doesn't work and i didn't understand why the last time i looked
21:14 wamba joined #perl6
21:19 spider-mario_ joined #perl6
21:20 timotimo masak: it should only take you five minutes :D
21:23 masak I'm spent tonight, unfortuntely. need to use the remaining mana to locate the bed.
21:23 masak maybe I'll have a look tomorrow. but definitely next week at the latest.
21:23 diakopter .oO( under piles of laundry? )
21:23 timotimo no problem :)
21:23 timotimo it's not a high priority for me
21:24 timotimo i was just boredly clicking through the perl6 module index, looking at all the failing and/or abandoned modules
21:24 diakopter timotimo: do you have a list of which still work?
21:26 jnthn diakopter: Ementaller (how they heck do you spell it...) produces such a list automatically
21:26 timotimo no, i also only clicked on a few of them
21:29 diakopter it'd be nice to have that info on the module list
21:29 diakopter (but perhaps embarrassing)
21:29 timotimo well, can't an automated test run do that?
21:29 timotimo ideally, the tests in those programs would be exhaustive
21:30 jnthn diakopter, timotimo: I think sergot++ is working on building something like that, and already has quite a lot of it done.
21:32 timotimo that sounds great
21:32 fgomez joined #perl6
21:35 tadzik yeah, it's pretty working
21:35 tadzik http://feather.perl6.nl/~sergot/modules/
21:35 skids masak: you'll notice I can and did assign to g[1] through $d.  But $b can't.
21:35 tadzik some trouble with cronjobs
21:36 tadzik there are those Street Lights on the right
21:39 masak TimToady: S02 contains *one* example of qq:to, and that example doesn't address the subtle question of what happens first: .indent(*) or variable interpolation. what's your take on which one happens first?
21:40 cedrvint_ joined #perl6
21:40 masak 'night, #perl6
21:41 cedrvint_ o/ masak
21:41 jnthn Well, .indent before would be weird, given we don't have a string to call indent on at that point...
21:42 cedrvint_ phenny: tell [Coke] the URL is http://rosettacode.org/wiki/Calen​dar_-_for_%22real%22_programmers
21:42 phenny cedrvint_: I'll pass that on when [Coke] is around.
21:44 cedrvint_ phenny: tell [Coke] the regression appears when Rakudo (star) has switched to NQP
21:44 phenny cedrvint_: I'll pass that on when [Coke] is around.
21:48 [Coke] phenny: I'm not convinced it's a regression.
21:48 phenny [Coke]: 21:42Z <cedrvint_> tell [Coke] the URL is http://rosettacode.org/wiki/Calen​dar_-_for_%22real%22_programmers
21:48 phenny [Coke]: 21:44Z <cedrvint_> tell [Coke] the regression appears when Rakudo (star) has switched to NQP
21:48 [Coke] er, cedrvint
21:48 cedrvint_ o/ [Coke]
21:49 [Coke] that snippet doesn't look like your ticket.
21:49 cedrvint_ I reduced the problem as much as possible, indeed
21:50 cedrvint_ r: "\0"..."~"
21:50 p6eval rakudo 779703:  ( no output )
21:50 [Coke] cedrvint_: so, my question is: why should 'A'...'a' work, when if you get to 'Z', 'Z'++ == 'AA' ?
21:50 cedrvint_ ?
21:50 cedrvint_ r: ("\0"..."~").say
21:51 p6eval rakudo 779703: OUTPUT«(timeout)»
21:51 [Coke] or, when doing using alphas with ..., what function generates the next value?
21:51 [Coke] r: ("A"..."AA").say
21:51 p6eval rakudo 779703: OUTPUT«A B C D E F G H I J K L M N O P Q R S T U V W X Y Z AA␤»
21:51 cedrvint_ [Coke]: I don't know
21:51 [Coke] r: ("A"..."a").say
21:52 p6eval rakudo 779703: OUTPUT«(timeout)»
21:52 cedrvint_ I was just trying to execute this piece of RC code, then noticed a regression
21:52 [Coke] so, given a transition from Z to AA, 'a' will never show up in the list. so it's infinite, and then you try to print it out, it times out.
21:52 [Coke] ok, but the ticket doesn't show that code, does it?
21:52 jnthn It's possible (sorry, don't have time to check right now) that the current behavior is actually the spec one.
21:53 cedrvint_ maybe, then it's a bug in Niecza :)
21:53 cedrvint_ and in old Rakudo versions
21:53 [Coke] ... which was my other point, there's no doubt been some spec churn since the RC entries started.
21:54 [Coke] r: my $a = "\0"; say $a++;
21:54 p6eval rakudo 779703: OUTPUT«␀␤»
21:55 [Coke] r: my $a = "\0"; my $i = 1000; while $i { $a++; $i--}; say $a;
21:55 p6eval rakudo 779703: OUTPUT«␀␤»
21:55 [Coke] r: my $a = "\0"; my $b = $a; my $i = 1000; while $i { $a++; $i--}; say so $b == $a;
21:55 p6eval rakudo 779703: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏␀' (indicated by ⏏)␤  in method Numeric at src/gen/CORE.setting:10197␤  in sub infix:<==> at src/gen/CORE.setting:2809␤  in sub infix:<==> at src/gen/CORE.setting:2809␤  in blo…
21:56 [Coke] r: my $a = "\0"; my $b = $a; my $i = 1000; while $i { $a++; $i--}; say ($b == $a);
21:56 p6eval rakudo 779703: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏␀' (indicated by ⏏)␤  in method Numeric at src/gen/CORE.setting:10197␤  in sub infix:<==> at src/gen/CORE.setting:2809␤  in sub infix:<==> at src/gen/CORE.setting:2809␤  in blo…
21:56 [Coke] r: my $a = "\0"; my $b = $a; my $i = 1000; while $i { $a++; $i--}; say ($b eq $a);
21:56 p6eval rakudo 779703: OUTPUT«True␤»
21:56 [Coke] r: ("\0"..."~")[1000000].say
21:57 p6eval rakudo 779703: OUTPUT«(timeout)»
21:57 [Coke] (so, string increment of \0 is \0 in current rakudo.)
21:58 rickza joined #perl6
21:58 cedrvint_ r: say "\0".ord; say ("\0"++).ord
21:58 p6eval rakudo 779703: OUTPUT«0␤Cannot assign to a non-container␤  in sub postfix:<++> at src/gen/CORE.setting:1611␤  in block  at /tmp/jeiUgeLf_5:1␤␤»
21:59 [Coke] you have to assign it to a var first.
21:59 [Coke] (before ++'ing it)
22:00 cedrvint_ r: my $c = "\0"; say $c.ord; $c++; say $c.ord
22:00 p6eval rakudo 779703: OUTPUT«0␤0␤»
22:00 rickza left #perl6
22:01 cedrvint_ [Coke]: do you mean: 1. the bug I reported is not a bug; and 2. there's a bug elsewhere in this RC code ?
22:03 [Coke] I'm saying I don't see much similarity between the 2 snippets except that they use the "..." operator.
22:03 cognominal joined #perl6
22:03 [Coke] and yes, that the bug you reported with A...a doesn't look like a bug to me. I don't see in the spec where strings get anything other than the default ++ behavior to get the next value.
22:04 cedrvint_ [Coke]: my mistake, sorry.
22:04 [Coke] no worries!
22:04 [Coke] I'm not positive, which is why I was trying to ping the channel about it earlier. no one but you responded. :)
22:04 cedrvint_ :)
22:05 [Coke] ah! and I'm an idiot, because I see the ... range from the RC at the /end/ of the ticket.
22:05 [Coke] but I think that's the same bug. the RC code and your 2 samples expects that you're going to iterate over the ords, but I don't think that's the case.
22:06 [Coke] r: (0...1000).map(ord(*))[100];
22:06 p6eval rakudo 779703: OUTPUT«===SORRY!===␤CHECK FAILED:␤Calling 'ord' will never work with argument types (Whatever) (line 1)␤    Expected: :(Cool $s)␤»
22:07 [Coke] ... "close enough!"
22:21 sahadev1 joined #perl6
22:21 sahadev1 perl6: [1, 2] ~~ [1, 2]
22:21 p6eval rakudo 779703, niecza v24-5-g599cbcb:  ( no output )
22:21 sahadev1 perl6: say [1, 2] ~~ [1, 2]
22:21 p6eval rakudo 779703, niecza v24-5-g599cbcb: OUTPUT«True␤»
22:22 sahadev1 perl6: say [1, 2] ~~ [1, *]
22:22 p6eval rakudo 779703, niecza v24-5-g599cbcb: OUTPUT«False␤»
22:28 armitage81 joined #perl6
22:28 armitage81 joined #perl6
23:05 whiteknight joined #perl6
23:21 jnthn No Perl 6 tuits today, it seems :(
23:21 jnthn 'night o/
23:22 cognominal joined #perl6
23:47 timotimo how long until the next perl6advent post? :)
23:51 Vlavv joined #perl6
23:58 colomon joined #perl6

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

Perl 6 | Reference Documentation | Rakudo