[00:00] I'm pretty settled these days [00:00] maybe I should write that part of the new book first :) [00:01] :-) [00:01] *** larion joined [00:01] my rules are perhaps a bit more finessed these days, given the various additional degrees of freedom, which all have their purpose [00:01] Nodnod [00:02] these days it's more like "Know which of these principles you're emphasizing, to the detriment of other principles." [00:04] * rjbs files perl6.vim bug: https://github.com/vim-perl/vim-perl/issues/188 [00:05] m: say < a \# b > [00:05] rakudo-moar 68c432: OUTPUT«a \# b␤» [00:05] hmm [00:05] m: say << a \# b >> [00:05] rakudo-moar 68c432: OUTPUT«a#b␤» [00:05] m: say << a \# b >>.elems [00:05] rakudo-moar 68c432: OUTPUT«3␤» [00:05] *** gfldex left [00:06] m: say << a \# b >>.WHAT [00:06] rakudo-moar 68c432: OUTPUT«(Parcel)␤» [00:06] m: say < a \# b >.WHAT [00:06] rakudo-moar 68c432: OUTPUT«(Parcel)␤» [00:06] why one has spaces and the other not, dunno.. [00:07] m: say << a \# b >><> [00:07] rakudo-moar 68c432: OUTPUT«a # b␤» [00:07] apparently <<>> is itemizing itself [00:08] m: say < a \# b >.perl [00:08] rakudo-moar 68c432: OUTPUT«("a", "\\#", "b")␤» [00:08] * rjbs has not yet attempted to understand itemization, but knows he'll need to. [00:08] m: say << a \# b >>.perl [00:08] rakudo-moar 68c432: OUTPUT«("a", "#", "b")␤» [00:08] m: say < a \# b >.DUMP [00:08] rakudo-moar 68c432: OUTPUT«Parcel<1>(:$!storage(BOOTArray<2>(␤ "a",␤ "\\#",␤ "b"␤)))␤» [00:08] m: say << a \# b >>.DUMP [00:08] rakudo-moar 68c432: OUTPUT«Parcel<1>(:$!storage(BOOTArray<2>(␤ "a",␤ "#",␤ "b"␤)))␤» [00:09] beats me [00:09] Huh [00:09] well, hopefully that one smooths out after GLR [00:09] m: say < a \# b >.elems [00:09] rakudo-moar 68c432: OUTPUT«3␤» [00:09] *** f3ew left [00:09] That is just mystifying. [00:10] $!flattens maybe [00:10] m: my \a := < a \# b >; say a.DUMP; [00:10] rakudo-moar 68c432: OUTPUT«Parcel<1>(:$!storage(BOOTArray<2>(␤ "a",␤ "\\#",␤ "b"␤)))␤» [00:10] m: my \a := << a \# b >>; say a.DUMP; [00:10] rakudo-moar 68c432: OUTPUT«Parcel<1>(:$!storage(BOOTArray<2>(␤ "a",␤ "#",␤ "b"␤)))␤» [00:10] except a parcel doesn't have $!flattens [00:10] *** f3ew joined [00:11] Oh wait, perhaps they aren't compiling to the same tree. [00:11] quite possible [00:11] Does camelia have a way to dump QAST? [00:12] m: say quasi { 1 + 1 }.WHAT [00:12] rakudo-moar 68c432: OUTPUT«(AST)␤» [00:12] m: say quasi { 1 + 1 }.dump [00:12] rakudo-moar 68c432: OUTPUT«Method 'dump' not found for invocant of class 'AST'␤ in block at /tmp/ZeHLHrwRV9:1␤␤» [00:12] aw [00:12] m: say quasi { 1 + 1 }.QAST.dump [00:12] rakudo-moar 68c432: OUTPUT«Method 'QAST' not found for invocant of class 'AST'␤ in block at /tmp/G9U_xcAWo1:1␤␤» [00:12] m: say quasi { 1 + 1 }.^methods>>.name; [00:12] rakudo-moar 68c432: OUTPUT«BUILD incarnate evaluate_unquotes is_quasi_ast Str␤» [00:13] m: say quasi { 1 + 1 }.Str [00:13] rakudo-moar 68c432: OUTPUT«quasi { 1 + 1 }␤» [00:13] m: say quasi { say < a \# b > }.Str [00:13] rakudo-moar 68c432: OUTPUT«quasi { say < a \# b > }␤» [00:13] m: say quasi { 1 + 1 }.incarnate.WHAT [00:13] rakudo-moar 68c432: OUTPUT«Too few positionals passed; expected 3 arguments but got 1␤ in block at /tmp/DXltPBB0Mu:1␤␤» [00:13] m: say quasi { say << a \# b >> }.Str [00:13] rakudo-moar 68c432: OUTPUT«quasi { say << a \# b >> }␤» [00:13] probably cheating [00:13] Ah, it's probably just saving the code [00:13] yeah [00:14] well, one could probably monkey patch some action method and capture control inside an EVAL somehow [00:15] or dynamically lookup a $/ from inside a BEGIN (evil) [00:15] *** laouji joined [00:16] m: BEGIN say callframe(1) [00:16] rakudo-moar 68c432: OUTPUT«CallFrame.new(level => 3, annotations => {:file("src/Perl6/World.nqp"), :line("1704")}<>, my => EnumMap.new())␤» [00:16] m: BEGIN say callframe(2) [00:16] rakudo-moar 68c432: OUTPUT«CallFrame.new(level => 4, annotations => {:file("src/Perl6/World.nqp"), :line("3494")}<>, my => EnumMap.new("\$ex" => Mu, :RETURN(Mu)))␤» [00:16] m: BEGIN say callframe(3) [00:16] rakudo-moar 68c432: OUTPUT«CallFrame.new(level => 5, annotations => {:file("src/Perl6/World.nqp"), :line("2531")}<>, my => EnumMap.new(:RETURN(Mu)))␤» [00:17] m: BEGIN say callframe(4) [00:17] rakudo-moar 68c432: OUTPUT«CallFrame.new(level => 6, annotations => {:file("src/gen/m-Perl6-Actions.nqp"), :line("1459")}<>, my => EnumMap.new())␤» [00:17] heh [00:17] *** larion left [00:18] m: BEGIN say CALLER::CALLER::<$/> [00:18] rakudo-moar 68c432: OUTPUT«(Any)␤» [00:18] Yeah, they do compile differently. I used: [00:18] diff -u <(perl6 --target=ast -e 'say < a \# b >') <(perl6 --target=ast -e 'say << a \# b >>') |less [00:18] m: BEGIN say CALLER::CALLER::CALLER::<$/> [00:18] rakudo-moar 68c432: OUTPUT«(Any)␤» [00:18] m: BEGIN say CALLER::CALLER::CALLER::CALLER::<$/> [00:18] rakudo-moar 68c432: OUTPUT«(Any)␤» [00:18] And you can see (non-trivial) differences. [00:18] m: BEGIN say CALLER::CALLER::CALLER::CALLER::CALLER::<$/> [00:18] rakudo-moar 68c432: OUTPUT«(Any)␤» [00:18] m: BEGIN say CALLER::CALLER::CALLER::CALLER::CALLER::CALLER::<$/> [00:18] rakudo-moar 68c432: OUTPUT«(Any)␤» [00:18] aww [00:19] *** larion joined [00:20] In short, the < > form inserts a call to &infix:<,>, and the << >> form does not [00:20] *** laouji left [00:22] *** raiph left [00:22] m: say < 42 >.WHAT [00:22] rakudo-moar 68c432: OUTPUT«(Str)␤» [00:22] m: say << 42 >>.WHAT [00:22] rakudo-moar 68c432: OUTPUT«(Str)␤» [00:23] but it's not in order to force a Parcel of 1 element [00:23] m: say (<< 42 >>).WHAT # Just in case [00:23] rakudo-moar 68c432: OUTPUT«(Str)␤» [00:23] phew [00:23] m: say (< 42 >).WHAT # Just in case [00:23] rakudo-moar 68c432: OUTPUT«(Str)␤» [00:23] could be a superstitious comma, I suppose [00:23] Sorta like that one? :-) [00:24] I paused there in my internal speec [00:24] *ch [00:25] In any case, superstitious tokens are not supposed to be affect semantics .... [00:25] s/to be/to/ [00:27] kinda like a block can have multiple statements without a Stmts node... [00:27] but this is a parcel without a comma node [00:28] Would you expect there to always be one, or always not be one? [00:29] *** skids joined [00:30] well, comma just makes a list of things, so a list of things doesn't much care, I expect [00:30] a bit surprising it doesn't turn into 1 elem though [00:31] perhaps there's compensating code somewhere that strips the outer comma [00:31] But only for the << >> case. :-/ [00:33] Stringification of Buf seems a bit off for non-octet bufs. [00:33] m: Buf.new(100,200,300).say [00:33] rakudo-moar 68c432: OUTPUT«Buf:0x<64 c8 2c>␤» [00:34] That 2C is probably a cropped 12C. [00:34] yeah, would be nice to prettify the ASCII subset at least, if not Latin-1 [00:34] oh, that, it's just overflow [00:34] C semantics on small ints [00:34] Sure. [00:35] Oh, gosh, it's truncated in the buf, silently... [00:35] The docs only say: A Buf is a mutable sequence of (usually unsigned) integers. [00:35] it's a "feature" :) [00:35] I reckon I'll use an array. [00:36] The code I'm porting is my ZSCII codec, which maps between four states of text for working with Z-Machine: [00:36] m: buf16.new(100,200,300).say [00:36] rakudo-moar 68c432: OUTPUT«Buf[uint16]:0x<64 c8 12c>␤» [00:36] rjbs: ^^ [00:36] japhb++ !! [00:36] That'll do. [00:37] It's because the default type specialization for Buf when it puns is uint8 [00:37] Buf is really a role that instantiates for an integer type [00:37] (a) unicode strings (b) zscii strings [codepoints between 0 and 0x3FF] (c) zchars (d) packed zchars [00:37] In p5, it's easy: they're all strings. :) [00:37] which is also awful, of course [00:37] rjbs: See src/core/Buf.pm for the gory details, and all the default specializations. [00:37] m: say Buf[Int].new(1, 2, 4 ... 10000000000000000) [00:37] rakudo-moar 68c432: OUTPUT«MVMArray: bindpos expected object register␤ in any at src/gen/m-Metamodel.nqp:1640␤ in block at /tmp/y36TPyihca:1␤␤» [00:38] hmm [00:38] I find it hard to type "buf" and not "bug" :) [00:38] Okay, great. From now on, I type "buf8" [00:38] m: say buf64.new(1, 2, 4 ... 10000000000000000) [00:39] rakudo-moar 68c432: OUTPUT«Buf[uint64]:0x<01 02 04 08 10 20 40 80 100 200 400 800 1000 2000 4000 8000 10000 20000 40000 80000 100000 200000 400000 800000 1000000 2000000 4000000 8000000 10000000 20000000 40000000 80000000 100000000 200000000 400000000 800000000 1000000000 2000000000…» [00:39] m: say Buf[int64].new(1, 2, 4 ... 10000000000000000) [00:39] rakudo-moar 68c432: OUTPUT«Buf[int64]:0x<01 02 04 08 10 20 40 80 100 200 400 800 1000 2000 4000 8000 10000 20000 40000 80000 100000 200000 400000 800000 1000000 2000000 4000000 8000000 10000000 20000000 40000000 80000000 100000000 200000000 400000000 800000000 1000000000 2000000000 …» [00:39] I guess Buf is biased towards native types [00:39] TimToady: Makes sense to me ... [00:40] m: say Buf[num].new(1, 2, 4 ... 10000000000000000) [00:40] rakudo-moar 68c432: OUTPUT«MVMArray: bindpos expected num register␤ in any at src/gen/m-Metamodel.nqp:1640␤ in block at /tmp/KGT3y5fEUG:1␤␤» [00:40] Though the error for Buf[Int] is definitely LTA [00:40] m: say Buf[num].new(1e0, 2e0, 4e0 ... 10000000000000000e0) [00:40] rakudo-moar 68c432: OUTPUT«This type cannot unbox to a native integer␤ in any at src/gen/m-Metamodel.nqp:1640␤ in block at /tmp/PmtxCa80jI:1␤␤» [00:40] Heh. [00:40] o_O [00:41] o/~ somebody cheated ... o/~ [00:41] and got cot [00:42] *** zacts left [00:43] either that, or made an ass out of u and me [00:44] Speak for yourself, donkey man. ;-) [00:44] hee haw! [00:44] *** larion left [00:45] *** larion joined [00:46] m: say Buf[num].new( 1.0, 2.0, 4.0 ) [00:46] rakudo-moar 68c432: OUTPUT«This type cannot unbox to a native integer␤ in any at src/gen/m-Metamodel.nqp:1640␤ in block at /tmp/X1MSq10t4a:1␤␤» [00:53] *** laouji joined [00:56] *** thou joined [01:03] * raydiak is starting to think CAPTCHAs on comment boxes are written to check the length and offer something sarcastic if you write too much...this time it gave me "evermore" [01:06] . o O (Quoth the aven, evermore?) [01:10] *** kurahaupo1 left [01:10] *** Akagi201 joined [01:12] searched for it and ironically the first thing I saw was "Quoth the aven radiant ...", make the machines stop talking to me! :) [01:14] not even google-personalized results [01:24] So is "buf16" an implementation-specific type? [01:24] no [01:24] it's a standard Perl 6 type [01:24] Great, thanks. [01:25] (I thought there was some convention about Int vs. int, but that memory is well aged.) [01:26] lower-case types tend to native, but that's not the same as implementation-specific [01:26] Aha, I see! [01:26] int itself is a bit ambiguous, compared to int32 or int64 [01:27] it's not likely to be the same as int in C [01:27] p6 defines int as the largest integer that runs at "full speed" [01:27] I know how to use \c[...] to go from name to char, but how do I go from char to name? (in p5, via charnames::viacode) [01:27] so the native call interface tends to be more specific about C types as viewed in p6 [01:28] m: say uniname("💩") [01:28] rakudo-moar 68c432: OUTPUT«PILE OF POO␤» [01:28] Super. [01:28] TimToady: but that was a really crappy example! [01:28] (haw haw haw) [01:30] uniname also works with integer codepoints [01:31] m: say uniname(0x2424) [01:31] rakudo-moar 68c432: OUTPUT«SYMBOL FOR NEWLINE␤» [01:31] This whole exercise is worth it just for the joy of replacing low lines with hyphen minuses in variable names. [01:31] o-O [01:31] *** colomon left [01:32] *** aborazmeh joined [01:32] *** aborazmeh left [01:32] *** aborazmeh joined [01:33] *** colomon joined [01:38] m: say uniname(0x1F35F) [01:38] rakudo-moar 68c432: OUTPUT«FRENCH FRIES␤» [01:38] *** dayangkun joined [01:38] m: say uninames(0x1F350..0x1F35F) [01:38] rakudo-moar 68c432: OUTPUT«Cannot call uninames(Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int); none of these signatures match:␤ (Str $str)␤ in block at /tmp/XK4NzAbW2k:1␤␤» [01:39] m: say (0x1F350..0x1F35F)».uniname [01:39] rakudo-moar 68c432: OUTPUT«PEAR PEACH CHERRIES STRAWBERRY HAMBURGER SLICE OF PIZZA MEAT ON BONE POULTRY LEG RICE CRACKER RICE BALL COOKED RICE CURRY AND RICE STEAMING BOWL SPAGHETTI BREAD FRENCH FRIES␤» [01:39] * TimToady is getting hungry [01:39] m: say uniname(0x20), , uniname(0x3c2).comb(/\S+/)[*-2], [01:39] rakudo-moar 68c432: OUTPUT«SPACEtheFINALfrontier␤» [01:40] .oO( in your stomach :) ) [01:41] m: say uniname('ꗴ') [01:41] rakudo-moar 68c432: OUTPUT«VAI SYLLABLE THE␤» [01:41] m: say char(0x1F366); [01:41] rakudo-moar 68c432: OUTPUT«5===SORRY!5=== Error while compiling /tmp/iTmHxvT41y␤Undeclared routine:␤ char used at line 1. Did you mean 'chars', 'chr'?␤␤» [01:41] m: say chr(0x1F366); [01:41] rakudo-moar 68c432: OUTPUT«🍦␤» [01:41] m: say uniname(chr(0x1F366)); [01:41] rakudo-moar 68c432: OUTPUT«SOFT ICE CREAM␤» [01:42] m: say uniname(0x1F366); [01:42] rakudo-moar 68c432: OUTPUT«SOFT ICE CREAM␤» [01:45] * raydiak was having a phone conversation today, started talking about manna and got hungry... [01:46] *** ilbot3 joined [01:48] m: say '𐌼'.uniname [01:48] rakudo-moar 68c432: OUTPUT«GOTHIC LETTER MANNA␤» [01:49] okay, that's it, I'm grabbing the pretzels... [01:49] Does Unicode 8 give us flavor selectors for ice cream yet? [01:54] m: say (0x1f34e, 0x1f34f)».uniname # may I offer you a healthier alternative? :) [01:54] rakudo-moar 68c432: OUTPUT«RED APPLE GREEN APPLE␤» [01:59] Eve, to Adam: Here, you wanna finish this for me? [02:01] ha ha :) [02:03] *** Akagi201 left [02:04] *** laouji_ joined [02:05] I had p5 code that did: while (my $str = substr $x, 0, 2, '') { ... } [02:05] In p6, $x is a buf. Is there an analogous behavior, or shall I use a $i? [02:07] m: my $b = buf8.new(1..10); .say for $b.rotor(2) [02:07] rakudo-moar 68c432: OUTPUT«1 2␤3 4␤5 6␤7 8␤9 10␤» [02:07] So, that's not sufficient, because inside the loop, I might need to consume more. [02:08] m: my $b = buf8.new(1..10); for @$b -> $a, $b { say "$a $b" } [02:08] rakudo-moar 68c432: OUTPUT«1 2␤3 4␤5 6␤7 8␤9 10␤» [02:08] *** noganex joined [02:08] well, there's always subbuf [02:09] *** laouji_ left [02:09] also, regexes have an optional starting pos [02:09] Can you use a regex on a buf? [02:10] Looks like no. [02:11] *** noganex_ left [02:11] you could also turn it into a compact array like my int8 @b = "foobar".encode.list, and then you get shift or splice or whatever, though I'm sure it's one of the less-efficient approaches [02:11] * TimToady goes to buffer some dinner & [02:12] Don't overflow! [02:12] *** telex left [02:14] (but avoid the underruns too) [02:14] any form of runs [02:14] *** telex joined [02:16] yes, of course...doubly so if you're only in your underwear [02:17] m: "taxes and stuff" ~~ /taxes?/ [02:17] rakudo-moar 68c432: ( no output ) [02:17] m: say "taxes and stuff" ~~ /taxes?/ [02:17] rakudo-moar 68c432: OUTPUT«「taxes」␤» [02:17] m: say "taxes and stuff" X~~ (/taxes?/, /taxes??/) [02:17] rakudo-moar 68c432: OUTPUT«True True␤» [02:27] *** rmgk_ joined [02:27] *** rmgk left [02:27] *** rmgk_ is now known as rmgk [02:46] *** cognominal left [02:47] *** aborazmeh left [02:49] *** aborazmeh joined [02:49] *** aborazmeh left [02:49] *** aborazmeh joined [02:54] *** agentzh_ joined [03:01] What best way to append an element to a buf? [03:02] $b[ $b.elems ] = 0xA0; # seems wordy [03:03] roast/date-time-slices-tz: dd9ef10 | (Chris Jepeway)++ | S32-temporal/DateTime.t: [03:03] roast/date-time-slices-tz: Added tests to check that DateTime.{utc,local} preserve timezone types. [03:03] roast/date-time-slices-tz: These are fudged, for now, as they require help from the timezone [03:03] roast/date-time-slices-tz: type itself beyond merely the current "be an Int()" expectation. [03:03] roast/date-time-slices-tz: review: https://github.com/perl6/roast/commit/dd9ef107ba [03:03] you can use +* instead of $b.elems [03:03] $b[+*] = 1 # <-- like that? [03:04] raydiak++ tanks [03:04] thanks, also [03:04] yep :) and you're totally welcome [03:04] * in numeric context in a subscript evaluates to .elems [03:05] *** laouji_ joined [03:05] not as useful in this case but if the other thing were a buf already, you can concat too (~) as if they were strings [03:06] Hm, might be useful, I'll have to revisit the code later. [03:06] It's late now. I should take out the trash and go to bed. [03:06] :) [03:06] sleep well :) [03:06] A whole hour of p6 hacking time lost to planning a *vacation* on which I won't write any code at all. What's wrong with the world?! [03:06] Thanks :) Ta ta! [03:06] haha, darned vacations :) [03:10] *** laouji_ left [03:12] *** skids left [03:23] *** BenGoldberg left [03:36] *** mr_ron joined [03:37] m: %h{'a';'b'}=3 [03:37] rakudo-moar 68c432: OUTPUT«5===SORRY!5=== Error while compiling /tmp/yQhTRcPrFg␤Variable '%h' is not declared␤at /tmp/yQhTRcPrFg:1␤------> 37⏏5%h{'a';'b'}=3␤» [03:37] sorry - different result on my system [03:42] m: no strict; %h{'a';'b'}=3 [03:42] rakudo-moar 68c432: OUTPUT«Use of Nil in string context at src/gen/m-BOOTSTRAP.nqp line 2235␤Use of Nil in string context at src/gen/m-BOOTSTRAP.nqp line 2235␤Use of Nil in string context at src/gen/m-BOOTSTRAP.nqp line 2235␤Use of Nil in string context at src/gen/m-BOOTSTRAP.…» [03:42] thar it blows [03:42] *** laouji left [03:47] *** mr_ron left [03:48] *** Sqirrel left [03:49] m: my %h; %h{'a';'b'}=3 [03:49] rakudo-moar 68c432: ( no output ) [03:49] no strict bug? [03:51] m: my %h; %h{'a';'b'}=3; say %h.perl [03:51] rakudo-moar 68c432: OUTPUT«{:a({:b(3)})}<>␤» [03:52] m: no strict; $a = 1 [03:52] rakudo-moar 68c432: ( no output ) [03:53] gr so much lag [03:53] * raydiak goes to play with it in a local terminal [03:56] and then find myself waiting on rakudobrew instead of flaky wifi :) [03:57] m: no strict; %h{'a'}=3 [03:57] rakudo-moar 68c432: ( no output ) [03:58] m: no strict; %h{'a'}{'b'}=3 [03:58] rakudo-moar 68c432: OUTPUT«Use of Nil in string context at src/gen/m-BOOTSTRAP.nqp line 2235␤Use of Nil in string context at src/gen/m-BOOTSTRAP.nqp line 2235␤Use of Nil in string context at src/gen/m-BOOTSTRAP.nqp line 2235␤Use of Nil in string context at src/gen/m-BOOTSTRAP.…» [03:59] *** molaf left [04:02] wow stage parse is up over 100s for me [04:05] about the same for me; sure you're not looking at the jvm compile? [04:05] I mean, no worse here [04:06] a browser in the background chewing cpu maybe? [04:06] yeah don't really do jvm any more...it's been about 90 for me [04:06] only a single window with a single tab open a site I know to be well-behaved [04:07] cron job? [04:08] my desktop is a newer revised arrangement of http://data.cyberuniverses.com/pub/screenshot.png [04:08] mainly, I got a bunch of meters watching everything [04:08] I know right away when anything goes awry in the background [04:08] turn on debugging or profiling? [04:08] I did "rakudobrew build moar" [04:09] haven't made any changes I know of lately [04:09] to my system I mean, or env vars [04:09] or even notable updates [04:09] * TimToady just builds from git [04:09] I like how it migrates all the panda modules [04:10] and, well, ... laziness is a virtue, no? [04:10] maybe it does a parallel make? [04:10] just guessin' [04:11] it'd interleave other messages though if that were the case [04:11] really with dynamic underclock and overclocking, I guess I wouldn't read too much into it unless it's repeatable [04:11] it is getting warmer here than it has been [04:11] could just be that [04:11] blocking the vent can have that effect too [04:12] just on a tabletop atm [04:12] cleaned it out within the last few months [04:12] recently lose any feet off of it? [04:12] * raydiak looks [04:12] that can cut the air gap underneath [04:12] clever, didn't consider that one, but nope [04:13] out of ideas for the moment... [04:13] though, I'd probably notice that too, that rocking diagonally thing drives me nuts when it happens [04:13] yeah me too [04:14] good game though :) [04:14] :) [04:14] unless we fall back to cosmic rays and other improbable unprovable hypotheticals [04:15] maybe God just decided it'd be fun if we had this conversation *shrug* [04:15] lessee, your system clock had a large time adjustment come in from ntp or so [04:15] *** agentzh_ left [04:15] wish I knew what time to look for in the system logs [04:16] one of your devices started interrupting continually [04:16] rakudo-star-daily: d00a5fd | coke++ | log/ (2 files): [04:16] rakudo-star-daily: today (automated commit) [04:16] rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/d00a5fdf04 [04:16] maybe, but only if somehting's failing, nothing even plugged in besides power [04:16] your disk is filling your logs with I'm about to go bad messages [04:17] still 183 gig free [04:17] wait myh logs arent on that one [04:17] free space doesn't matter if it's working up toward a head crash [04:18] * TimToady is full of good news... :) [04:18] :) [04:19] * raydiak wonders if his system meters do something dumb like ignore nice time or something [04:19] * TimToady just uses top to see what's really chewing time [04:20] ah! I got a plausable one! if a process acted up *after* I started the build, I wouldn't be able to tell on the meters because of all the noise [04:20] could well have been a cron job running at the top of the hour then, if you'd just finished at 2 after [04:21] I'll bet that's exactly what happened. [04:22] * raydiak will build again later, but has gotten hisself way out in left field from his originally intended direction, and still intends to head that way :) [04:23] well, hope you get to first base then [04:23] assuming that's the opposite of left field [04:25] heh thanks, here's hoping that my childhood baseball experiences aren't indicative of my probability of success [04:26] *** yeahnoob joined [04:28] *** laouji joined [04:30] off to worry about food and things [04:31] o/ [04:46] *** quester joined [04:49] \o back from the store [04:49] car's still broken until tomorrow, so had to run to the gas station when we noticed we were out of bread [04:51] *** agentzh_ joined [05:05] raydiak: no instant food delivery by drones? :-) [05:05] * raydiak at least found the ~Nil warning at https://github.com/rakudo/rakudo/blob/0fe941622fc374ed4c9c2c0f272968ed270d8478/src/Perl6/Metamodel/BOOTSTRAP.nqp#L2250 if anyone wants to take it from there, my nqp-fu is weak, and sadly now is not the time to train it [05:06] moritz: no...(thankfully?) [05:06] though even if there were such a thing around... if we could afford it the car wouldn't be broken :) [05:08] just takes me longer sometimes b/c I usually accomplish it for nearly no money, which in and of itself is kinda cool in a way [05:12] *** labster_ joined [05:14] *** jercos_ joined [05:14] copy & paste of part of something I wrote earlier today about whether automated cars need windows, which summarizes my thoughts on delivery dromes as well: [05:14] Anyway, once we're all tightly sealed up in our automated capsules to shoot us from one building to another, you don't really have to interact with most of the outside world any more, and you don't need cops so much. [05:14] You also take some heavy losses in the form of creativity, freedom, fresh air, human spirit, the diversity of natural things like weather and plants, and so much more...but nobody seems worried about those kinds of qualitative factors any more. :P [05:15] *** labster_ is now known as labster [05:15] was kinda flabbergasted that someone would even pose the question "do vehicles need windows if the computer can see?" [05:15] *** jdv79_ joined [05:15] *** vike1 joined [05:16] meant to mention motion sickness too but forgot [05:16] *** b2gills1 joined [05:16] *** mls_ joined [05:17] <[Coke]> m: my @a = ; my @b = ; for @a Z @b -> $q, $t { say "$q, $t" } [05:17] rakudo-moar 68c432: OUTPUT«a q, b r␤Too few positionals passed; expected 2 arguments but got 1␤ in block at /tmp/pkhK8N1lu5:1␤␤» [05:18] <[Coke]> ^^ root cause of explosion in t/spec/integration/advent2009-day17.t [05:18] m: my @a = ; my @b = ; for @a Z @b -> ($q, $t) { say "$q, $t" } [05:18] rakudo-moar 68c432: OUTPUT«a, q␤b, r␤c, s␤» [05:18] m: my @a = ; my @b = ; for flat @a Z @b -> $q, $t { say "$q, $t" } [05:18] rakudo-moar 68c432: OUTPUT«a, q␤b, r␤c, s␤» [05:18] <[Coke]> excellent, thanks. [05:18] it's the 'for no flattens' thing [05:18] *no longer [05:19] *** tony-o_ joined [05:19] *** jnthn_ joined [05:19] *** _thou joined [05:19] *** spider-mario left [05:20] *** b2gills left [05:20] *** b2gills1 is now known as b2gills [05:20] roast: f73c005 | coke++ | integration/advent2009-day17.t: [05:20] roast: fix fallout from "for no longer flattens" [05:21] roast: [05:21] roast: TimToady++ [05:21] roast: review: https://github.com/perl6/roast/commit/f73c005382 [05:21] *** El_Che_ joined [05:21] *** laouji_ joined [05:22] *** vytas` joined [05:22] rakudo/nom: 2805390 | coke++ | t/spectest.data: [05:22] rakudo/nom: Not actually very stressful [05:22] rakudo/nom: review: https://github.com/rakudo/rakudo/commit/2805390fae [05:23] *** kaare__ joined [05:24] <[Coke]> m: say cat(); [05:24] rakudo-moar 68c432: OUTPUT«5===SORRY!5=== Error while compiling /tmp/uqPAloD1uV␤Undeclared routine:␤ cat used at line 1. Did you mean 'cas'?␤␤» [05:24] rakudo/nom: a6f5638 | coke++ | t/spectest.data: [05:24] rakudo/nom: run fudged test [05:24] rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a6f5638ebf [05:25] roast: 0e6aac0 | coke++ | S32-container/cat.t: [05:25] roast: fudge test for rakudo [05:25] roast: review: https://github.com/perl6/roast/commit/0e6aac0adf [05:26] *** ir2ivps4 joined [05:26] *** bayprogrammer_ joined [05:26] *** laouji_ left [05:26] *** thou left [05:26] *** El_Che left [05:26] *** vytas left [05:26] *** tony-o left [05:28] *** quester left [05:28] *** quester joined [05:30] <[Coke]> m: $str = "abracadabra"; $str ~~ m:exhaustive/ a (.*?) a / && say "@()"; [05:30] rakudo-moar 68c432: OUTPUT«5===SORRY!5=== Error while compiling /tmp/FJYkyYmJyx␤Variable '$str' is not declared. Did you mean 'str'?␤at /tmp/FJYkyYmJyx:1␤------> 37⏏5$str = "abracadabra"; $str ~~ m:exhausti␤» [05:30] <[Coke]> m: my $str = "abracadabra"; $str ~~ m:exhaustive/ a (.*?) a / && say "@()"; [05:30] rakudo-moar 68c432: OUTPUT«@()␤» [05:30] <[Coke]> m: my $str = "abracadabra"; $str ~~ m:exhaustive/ a (.*?) a / && say $/.perl; [05:30] rakudo-moar 68c432: OUTPUT«$(Match.new(ast => Any, list => (Match.new(ast => Any, list => (), hash => EnumMap.new(), orig => "abracadabra", to => 3, from => 1),), hash => EnumMap.new(), orig => "abracadabra", to => 4, from => 0), Match.new(ast => Any, list => (Match.new(ast => Any, …» [05:30] *** mtj_ joined [05:31] <[Coke]> oh, wow, that actually works, I think. [05:35] *** quester left [05:35] <[Coke]> Someone more awake than I am can probably fudge t/spec/S05-modifier/exhaustive.t, then. [05:39] *** aborazmeh left [05:41] *** Sqirrel joined [05:46] I attempted to fix it last weekend [05:49] *** FROGGS joined [05:56] *** quester joined [05:56] *** diana_olhovik joined [05:57] *** domidumont joined [06:00] *** espadrine joined [06:01] *** Sysaxed` left [06:02] *** domidumont left [06:03] *** domidumont joined [06:06] *** _mg_ joined [06:11] *** agentzh_ left [06:20] *** quester left [06:20] *** meisl left [06:20] *** Foxcool joined [06:26] .tell jnthn skipping onlystars on CALLER is probably adequate [06:26] TimToady: I'll pass your message to jnthn. [06:32] morningz, #perl6 [06:34] masax, morning [06:43] *** _thou left [06:44] m: my $name = "masak"; say my $alien-name = $name.subst(/k$/, "x") [06:44] rakudo-moar a6f563: OUTPUT«masax␤» [06:44] *** larion left [06:44] *** koo6 joined [06:48] *** [Tux] left [06:49] *** [Tux] joined [06:50] m: sub call($) { "hey I just met you" and "this is crazy" but "here's my number" }; so call my $maybe [06:50] rakudo-moar a6f563: ( no output ) [06:50] :D [06:50] hehe [06:51] *** jnthn_ is now known as jnthn [06:51] jnthn: morning. [06:53] :P [06:53] 12 May 2015 20:55Z jnthn: if there is no veto I'd like to merge the cunion branches of moar and rakudo this week [06:53] 06:26Z jnthn: skipping onlystars on CALLER is probably adequate [06:53] well, I get one code review and one no-op in the messages this morning. Not Bad. :) [06:54] morning [06:55] rakudo/cunion: 7d46567 | FROGGS++ | t/04-nativecall/13-union. (2 files): [06:55] rakudo/cunion: test inlined CStructs in CUnions [06:55] rakudo/cunion: review: https://github.com/rakudo/rakudo/commit/7d46567f29 [06:56] jnthn: have you considered going on holiday, to see how much we'd really miss you? :-) [06:56] zostay: you need to update your moarvm and rakudo, and tell me how structs in union work with these branches [06:56] nwc10: shhhh! [06:57] :P [06:57] don't give him ideas! [06:58] *** larion joined [06:59] ooooh! :D [06:59] dang. [06:59] nwc10: now you've done it... :) [07:00] * masak .oO( unfortunately, jnthn went on vacation. the Year of Perl 6 has been bumped to 2016 ) [07:00] well, if it's only 2 weeks, we just declare that Christmas is Orthodox [07:01] how unorthodox [07:03] *** RabidGravy joined [07:12] oh, I liked the message of this short post: http://boz.com/articles/be-kind.html [07:12] "being kind" isn't "being nice" [07:12] *** Ven joined [07:18] *** larion left [07:33] *** FROGGS left [07:35] *** PZt joined [07:36] *** Ven left [07:36] marning [07:38] morning o/ [07:45] *** zakharyas joined [07:52] *** espadrine left [07:55] *** berekuk joined [07:57] *** virtualsue joined [08:06] *** abraxxa joined [08:07] *** rindolf joined [08:08] myrnong, RabidGravy, sergocie. [08:08] *** [Sno] left [08:08] *** [Sno] joined [08:09] *** Ven joined [08:09] :) [08:10] m: sub vow { .roll }; say "m{vow}rn{vow}ng" [08:10] rakudo-moar a6f563: OUTPUT«märneng␤» [08:10] *** laouji_ joined [08:12] *** brrt joined [08:12] you're on a roll here, right? :-) [08:12] \o [08:12] m: say .roll(3) [08:12] rakudo-moar a6f563: OUTPUT«b a c␤» [08:13] * abraxxa just realized that there was no rakudo 2015.04 release [08:13] \o, #perl6 [08:13] \o Ven [08:15] abraxxa: oh yes, there was one, just no R* release [08:15] abraxxa: what are you saying? I released the april compiler release. [08:15] *** laouji_ left [08:15] abraxxa: you probably have R and R* mixed up... [08:15] i looked yesterday evening after upgrading my synology nas to dsm 5.2 which supports docker and found the official rakudo container [08:16] which is 2015.03 [08:16] i found moarvm 2015.04 [08:16] and this site also only lists 2015.03: http://rakudo.org/how-to-get-rakudo/ [08:16] *** darutoko joined [08:17] that's R*, I believe. [08:17] where do I find the rakudo releases (besides git tags which I didn't look for) [08:17] http://rakudo.org/downloads/rakudo/ [08:17] that just one click from perl6.org 'Download Rakudo Perl6' link away [08:19] *** cygx joined [08:20] o/ [08:20] so, how do I open a file in update mode (fopen "r+", perl5 open "+<")? [08:21] *** poul joined [08:21] not 100% sure that's implemented yet [08:23] but open("file", :a) should do it [08:23] *** fhelmberger joined [08:23] yep, it works. just tried it locally. [08:24] $ perl6 -e 'my $h = open("foofile", :a); $h.say: "OH HAI"; $h.close' [08:24] $ cat foofile [08:24] OH HAI [08:26] ok, can confirm that seems to do it [08:26] it violates convention, though [08:26] sounds like you would prefer it to work some other way...? [08:26] could you elaborate? [08:29] my confirmation was to soon: while I can seek, I can'T read from the file... [08:29] masak: well, I would have expected :a to work as in POSIX [08:30] I'm out of my depth here. I don't know how :a works in POSIX. [08:31] but to the extent I understand what you're saying, I agree -- we probably shouldn't be violating POSIX convention. [08:31] we're usually quite keen to keep to POSIX convention, in fact. [08:33] *** larion joined [08:37] fopen support 6 modes: read-only, write-only(clobber), write-only(append), rw(update), rw(clobber), rW(append) [08:38] (ie r w a r+ w+ a+) [08:45] it's actually MoarVM that only supports 3 modes, not just Rakudo :( [08:48] I think I understand all of them except "rw(update)". how does this one differ from, say, "rW(append)"? [08:48] i think write-only doesn't clobber but truncates first [08:49] brrt: yes, 'clobber' should be read as 'truncate first' [08:50] ah ok [08:51] *** virtualsue left [08:52] masak: append forces writes to the end of file, ignoring the position within it [08:52] MoarVM has been built to do things Rakudo needs, so if Rakudo didn't need something yet it's often gone undone. :) [08:53] *** ssqq joined [08:54] *** donaldh joined [08:54] cygx: I guess I'm used to thinking of it in bash terms. '<' (read), '>' (write/clobber), and '>>' (write/append). I'm not aware that the other modes have symbols in the shell syntax. [08:56] We could export sub from module, How to export token from grammar? [08:56] ssqq: should be the same. [08:56] ssqq: but maybe it's enough to declare it `our`? [08:57] m: grammar G { our token foo { foo } }; say &G::foo [08:57] rakudo-moar a6f563: OUTPUT«foo␤» [08:57] m: grammar G { our token foo { foo } }; say &G::foo.^name [08:57] rakudo-moar a6f563: OUTPUT«Regex␤» [08:57] thanks, masak [08:57] m: grammar G { our token foo is export { foo } }; import G; say &foo.^name [08:57] rakudo-moar a6f563: OUTPUT«Regex␤» [08:57] masak: perl introduced +< and +> for that [08:57] cygx: oh! [08:58] cygx: can you see a simple tweak to what Rakudo already has that would not violate convention? [08:59] m: grammar G { our token foo { foo } }; say 'foo' ~~ /^ $/; [08:59] rakudo-moar a6f563: OUTPUT«Method 'foo' not found for invocant of class 'G'␤ in block at /tmp/xO_08coGUM:1␤␤» [08:59] masak: I'd probably add a :mode parameter or somesuch that takes a string of the same format as fopen, then add more user-friendly boolean named parameters on top [08:59] m: grammar G { our token foo { foo } }; say 'foo' ~~ /^ <::G::foo> $/; [08:59] rakudo-moar a6f563: OUTPUT«Method 'foo' not found for invocant of class 'G'␤ in block at /tmp/B5D25gcjfc:1␤␤» [09:01] *** espadrine joined [09:02] masak: I guess :a right now actually does what it's supposed to do [09:03] masak: it was you who suggested that it does what I actually need to do (r+) [09:03] ;) [09:03] cygx masak: as jnthn said, MoarVM and nqp/JVM only really implement what rakudo needs. [09:03] masak: How to resue a exported token in sub-rule like '/ /' [09:03] donaldh: and Rakudo should implement what the user needs [09:03] e.g. there is no way to open a file read/write/no-truncate as would be needed to mmap a file. [09:03] ohai donaldh :) [09:04] good *, donaldh [09:04] o/ [09:04] cygx: well, you said "violates convention", so I assumed something needed fixing... :) [09:05] "what rakudo needs" really means "what rakudo needed in terms of file I/O to get itself working" [09:05] cygx: let's put it like this (and maybe we can file a rakudobug) -- what's missing that you need? preferably expressed as a call to open() [09:05] masak: it would have violated convention if your suggestion that I could have... oh, just forget about it ;) [09:05] :P [09:05] cygx: ENOTENOUGHCOFFEE [09:05] *** FROGGS joined [09:05] I need to do an fopen("file", "r+") [09:06] preferably witout going through nativecall ;) [09:07] * masak submits rakudobug [09:09] m: our token doo { doo }; say 'doo' ~~ &doo [09:09] rakudo-moar a6f563: OUTPUT«「doo」␤» [09:09] m: grammar G { our token doo { doo }; }; say 'doo' ~~ &G::doo [09:09] rakudo-moar a6f563: OUTPUT«Type check failed in binding ; expected 'G' but got 'Cursor'␤ in regex doo at /tmp/6wnVpK9Krj:1␤ in block at /tmp/6wnVpK9Krj:1␤␤» [09:09] cygx: backlogging, I now see the misunderstanding too. d'oh :) [09:10] m: our token doo { doo }; say 'doo' ~~ / / [09:10] rakudo-moar a6f563: OUTPUT«「doo」␤ doo => 「doo」␤» [09:11] m: grammar G { our token doo is export { doo }; }; say 'doo' ~~ / <&G::doo> / [09:11] rakudo-moar a6f563: OUTPUT«Type check failed in binding ; expected 'G' but got 'Cursor'␤ in regex doo at /tmp/VXkzbHnAbP:1␤ in block at /tmp/VXkzbHnAbP:1␤␤» [09:12] cygx: https://rt.perl.org/Ticket/Display.html?id=125168 [09:12] masak: Fun Python fact of the day: Occurence of a call to a function named "super" in Python will cause the compiler to insert an extra variable (called __class__) [09:12] I'm growing increasingly suspicious if this whole "explicit is better than implicit" thing [09:12] arnsholt: wow [09:13] or does it just mean "python's compiler can usually remove the __class__ variable"? [09:13] arnsholt: is that py2 or py3? [09:13] I'm reading the Python 3 docs, but Python 2 allows the same behvaiour, so probably Python 2 too [09:13] "explicit is better than implicit [except when we are deliberately trying to pull the wool over your eyes for your own good]" [09:13] does Guido have a Rule 2? [09:14] (the latter part is written in invisible ink and only visible if you have a Level 5 black belt in Python) [09:14] s/5/implementor/ I think =) [09:14] nwc10: no. Guido is always right by fiat, and when he changes his mind, it's because you misunderstood what he was saying before :P [09:15] s/changes/appears to change/ [09:15] That's how rule 2 works, isn't it? =) [09:15] there's a semantic difference, but I'm not sure it matters. [09:17] Oh, looks like I was a bit wrong [09:17] __class__ is always there [09:20] Aha. __class__ is magically created if it's referred to in a method or super() is called [09:21] so basically like a $?foo variable in perl6 [09:22] *** ben_m joined [09:23] *** Ven left [09:23] Yeah, except it can be implicitly created too [09:23] fair enough [09:23] so, will snake get this, too? ;) [09:25] Not straight away, I think =) [09:26] when we export token from grammar, How to use it? [09:26] m: grammar D { our token doo { doo }; }; say 'doo' ~~ &D::doo [09:26] Not immediately clear to me where it's implemented in PyPy either [09:26] rakudo-moar a6f563: OUTPUT«Type check failed in binding ; expected 'D' but got 'Cursor'␤ in regex doo at /tmp/8wglQQkyMB:1␤ in block at /tmp/8wglQQkyMB:1␤␤» [09:27] Oh well. Time to do actual $dayjob things, I suppose =) [09:29] m: grammar D { token doo is export { doo }; }; import D; say 'doo' ~~ &doo [09:29] rakudo-moar a6f563: OUTPUT«Type check failed in binding ; expected 'D' but got 'Cursor'␤ in regex doo at /tmp/anZydiSimC:1␤ in block at /tmp/anZydiSimC:1␤␤» [09:30] m: grammar D { our token doo(Mu:) { doo }; }; say 'doo' ~~ &D::doo [09:30] rakudo-moar a6f563: OUTPUT«「doo」␤» [09:30] ssqq: that's not nice, but a workaround [09:31] m: grammar D { our token doo(Mu::) { doo }; }; say 'doo' ~~ / <&D::doo> / [09:31] rakudo-moar a6f563: OUTPUT«Too few positionals passed; expected 2 arguments but got 1␤ in regex doo at /tmp/0yOKpRIsYi:1␤ in block at /tmp/0yOKpRIsYi:1␤␤» [09:32] m: grammar D { our token doo(Mu:) { doo }; }; say 'doo' ~~ / <&D::doo> / [09:32] FROGGS: how to use export token in sub-rule '' [09:32] rakudo-moar a6f563: OUTPUT«「doo」␤» [09:32] with only one colon in that signature [09:32] FROGGS: I see, thanks [09:33] *** FROGGS[mobile]2 left [09:34] FROGGS: (a) I'm not sure one should be allowed to type the invocant in that way. feels very weird. (b) this is a bug, right? that it doesn't just work in the first place, without that workaround? [09:36] masak: yes, we fixed the lexical 'my token foo' a while ago, but obviously not that one here [09:36] oh, aha. [09:36] "yes, it is a bug" [09:36] FROGGS: feel free to bugmit a rakudosub. [09:36] if you won't, then I will. [09:36] I'll do [09:38] ++FROGGS [09:38] hm... if I read the code correctly, open(:rw) doesn't actually do what it promises - it gets adjusted to :w [09:39] cygx: can you confirm that with a one-liner? [09:40] I can confirm it with the source ;) [09:40] https://github.com/rakudo/rakudo/blob/nom/src/core/IO/Handle.pm#L68 [09:40] m: grammar D { token doo(Mu:) is export { doo }; }; import D; say 'doo' ~~ &doo [09:40] rakudo-moar a6f563: OUTPUT«「doo」␤» [09:41] *** yeahnoob left [09:41] * timotimo ran cachegrind on the core setting compilation over night, and is now running the same with that one moarvm patch [09:41] * FROGGS files RT #125169 [09:41] filed* [09:41] it'll also allow me to figure out how big the variance is on all the measurements with cachegrind [09:43] FROGGS++ [09:44] masak: my $f = open("test.txt", :rw); $f.write("hello".encode); $f.seek(0, 0); say $f.read(5).decode [09:44] => Reading from filehandle failed: operation not permitted [09:45] * masak submits rakudobug [09:47] cygx: https://rt.perl.org/Ticket/Display.html?id=125170 [09:55] who is hosting synbot6? is that running on a machine that belongs to tadzik? [09:56] in order to get data out of rt, we'd need to give an account a "cli password", because there's apparently no REST access for public data [09:57] so ... maybe i'll actually put HTML parsing into synbot6 to get the ticket title of an RT bug :\ [10:00] *** laouji_ joined [10:01] timotimo: what's the goal? reacting to RT updates? [10:01] timotimo: can't you set up an email address and listen to emails that come in? [10:02] that's not the goal; i was looking to give the title of a bug as well as the URL each time a ticket number gets mentioned [10:04] *** laouji_ left [10:05] and perhaps it'd also be helpful to give the title of a bug if only the URL is posted? [10:05] but that could end up spammy, maybe? [10:06] hm. [10:06] my immediate reaction is "yes, probably spammy". returning the URL for the interested feels like the right response. [10:07] but I like your initiative, and I can see how getting the title could be helpful as well. [10:07] and if it leads to us dogfooding another bot function in Perl 6, who am I to argue? :) [10:07] hmm [10:13] m: sub bar (*&block) { }; bar() # bug [10:13] rakudo-moar a6f563: OUTPUT«Use of Nil in string context at src/gen/m-Perl6-Optimizer.nqp line 1650 in any optimize_call at src/gen/m-Perl6-Optimizer.nqp:1319␤␤5===SORRY!5=== Error while compiling /tmp/hPZXvIYZLr␤Calling bar() will never work with declared signature (&bloc…» [10:13] note that it spits out "Calling bar() will never work with declared signature (&block)" [10:15] though I think a slurpy scalar or callable does not make much sense... [10:15] so it would be nice if TimToady could judge on S06-signature/slurpy-blocks.t [10:15] *** PZt left [10:15] slurpy scalars we have. [10:15] see S06. [10:15] we have? [10:16] implemented? [10:16] I meant spec. [10:16] dunno about implemented. [10:16] you meant syn [10:16] wouldn't surprise me. [10:16] I mean specification 06. [10:16] er, synopsis 6. [10:16] :P [10:16] sorry, I'm old-skool. my brain still thinks "spec". [10:16] trying to modernize. [10:17] is there a difference between *$foo and $foo? [10:17] /?/? ?/ [10:17] see S06 :) [10:17] & [10:19] "Slurpy scalars still impose list context on their arguments." [10:20] I still dont get it [10:20] *** koo6 left [10:22] *** dayangkun left [10:22] m: my @a = 1, 2, 3, 4, 5; for @a -> $b?, $c? { say $b, $c } [10:22] rakudo-moar a6f563: OUTPUT«12␤34␤5(Mu)␤» [10:22] m: my @a = 1, 2, 3, 4, 5; for @a -> *$b, *$c { say $b, $c } [10:22] rakudo-moar a6f563: OUTPUT«12␤34␤Too few positionals passed; expected 2 arguments but got 1␤ in block at /tmp/MmFtICPkk7:1␤␤» [10:23] I don't understand the difference between slurpy and optional scalars [10:23] timotimo: no, I have no idea who runs it :D [10:23] it's a mystery [10:24] *** d4l3k_ joined [10:25] O.o [10:25] *** ribasushi left [10:25] FROGGS: I think slurpy scalars are meant to extract elements from a list [10:25] maybe it's just self aware [10:26] my @a = 1, 2; (-> *$a, *@b { say $a })(@a) # should say 1, and leave @b = (2,) [10:26] *** coffee` left [10:26] *** abraxxa left [10:26] my @a = 1, 2; (-> $a?, *@b { say $a })(@a) # should say 1 2, and leave @b empty [10:26] *** go|dfish left [10:27] *** poul left [10:27] m: sub bar (*$foo, *@bar) { say $foo }; my @a = 1, 2, 3, 4; bar(@a) # then this should print 1 [10:27] rakudo-moar a6f563: OUTPUT«1 2 3 4␤» [10:27] *** Alina-malina left [10:27] *** d4l3k_ is now known as dalek [10:27] *** ChanServ sets mode: +v dalek [10:27] *** Alina-malina joined [10:27] *** ruoso joined [10:28] *** zostay joined [10:28] *** ribasushi joined [10:28] *** diegok left [10:28] *** larion left [10:29] m: sub quicksort ([$pivot, *@data], $reverse?, $inplace?) { } [10:29] rakudo-moar a6f563: ( no output ) [10:29] *** ilbot3 left [10:30] *** maddingue left [10:30] *** abraxxa joined [10:30] *** maddingue joined [10:31] *** pierrot_ joined [10:31] *** nebuchad` joined [10:31] *** [Tux] left [10:31] *** diegok joined [10:33] *** geekosaur joined [10:33] *** dalek left [10:34] *** dalek joined [10:34] *** ChanServ sets mode: +v dalek [10:34] *** go|dfish joined [10:35] *** rvchangue left [10:36] *** ilbot3 joined [10:36] *** [Tux] joined [10:37] *** rvchangue joined [10:37] *** poul joined [10:37] *** coffee` joined [10:38] I've started on supporting different modes for open(): https://gist.github.com/cygx/9b64a69fb9dc60d05bd8 [10:38] *** Ven joined [10:39] this would support all C11 modes as well as the Perl5 ones [10:39] got to go o/ [10:39] *** cygx left [10:43] *** _mg_ left [10:45] *** mephinet joined [10:47] *** ssqq left [10:53] *** andreoss joined [10:53] *** bjz joined [10:58] *** Ven left [10:59] *** bjz left [11:00] What makes it so that I can call <1 2 3>.map: *.uc? Talking about the colon after map, trying to google that kind of syntax but not sure what to google. [11:06] *** abc_ joined [11:07] ben_m: this might help: https://perl6advent.wordpress.com/2009/12/19/day-19-whatever/ [11:08] g'ah -- I have zero time, but I would like to write a p6u post that puts this whole "test your private properties" discussion into perspective. [11:08] ben_m: it's equivalent to <1 2 3>.map(*.uc) [11:08] ben_m: the colon is like an opening '(' without a need for a closing ')'. it's for when you know you'll put in the closing ')' at the end of the expression. [11:09] (or would have done that, rather) [11:09] ben_m: in Perl 5, there's the somewhat special `print STDOUT "hi";` syntax that's similar. Perl 6 is more precise, and lets you write this either as `$*OUT.print("hi")` or `$*OUT.print: "hi"` or even `print $*OUT: "hi"` [11:10] *** Ven joined [11:14] *** donaldh left [11:14] *** pauluu joined [11:23] *** bjz joined [11:24] *** ibo2perl6 joined [11:26] *** bjz left [11:26] m: my $a = 13; say $$a++; say $$$a++; say $a # is this intentional? it confuses me [11:26] rakudo-moar a6f563: OUTPUT«13␤14␤15␤» [11:26] *** bjz joined [11:28] I quite like this behaviour from debian unstable [11:29] ibo2perl6: if you get over the idea that $ means dereferencing, it's not confusing [11:29] ====== How can you help? (doc: https://wiki.debian.org/how-can-i-help ) ====== [11:29] New bugs suitable for new contributors (tagged 'newcomer'): - lightdm - https://bugs.debian.org/636108 - lightdm: does not source ~/.profile [11:29] maybe rakudobrew could print out suggestions based on RT or something? [11:30] ibo2perl6: it confuses you that you're able to add more `$` signs at the beginning and nothing happens? [11:30] m: my @x = 1, 2, 3; say @x; say @(@x); say @(@(@x)) [11:30] rakudo-moar a6f563: OUTPUT«1 2 3␤1 2 3␤1 2 3␤» [11:31] m: my @x = 1, 2, 3; say @x; say @@x; say @@@x [11:31] rakudo-moar a6f563: OUTPUT«1 2 3␤1 2 3␤1 2 3␤» [11:31] $ or $(...) is just an itemization [11:31] itemizing an item is a no-op [11:31] and why-oh-why do I always want to misspell 'item' as 'time' or 'itme'? [11:32] moritz: because of timing issues between the left and right hands when you type. [11:32] 'itme' is right-left-right-left [11:32] much easier to type. [11:33] 'time' is left-right-right-left and 'item' is right-left-left-right. both somewhat harder to type. [11:35] *** _mg_ joined [11:36] *** telex left [11:38] *** telex joined [11:43] what is "write string requires an object with REPR MVMOSHandle" trying to tell me? [11:45] RabidGravy: Maybe that you pulled a very busted Rakudo a couple of days ago that failed that way on everything [11:45] It did so because we modified PROCESS:: during the BEGIN time of a module's pre-comp, which will screw up the standard handles. [11:46] (We can't really fix that in general, it's just going to have to be one of those pre-comp rules.) [11:46] Guess it's possible you have a different issue though. [11:47] Hmm, I'll test that, but it's weird because if I run the code in question with "perl6 -Ilib " then it's fine [11:47] otherwise it's that something tried an IO operation on something that's not an IO handle [11:47] if I put it in the path and just run it then it does that [11:48] *** rurban joined [11:48] the line in question is "say $entry" where $entry is an object with a .gist [11:54] testing with the most recent rakudo [12:06] m: Int.new(0).say # does/should this work? [12:06] rakudo-moar a6f563: OUTPUT«Default constructor for 'Int' only takes named arguments␤ in block at /tmp/NF8GBRu6qb:1␤␤» [12:07] *** poul left [12:14] Hmm, nope updating rakudo don't fix it [12:15] *** abc_ left [12:19] infact 'say "foo";' gives rise to the same error under the same circumstances [12:20] then doing "use lib 'lib';" in the file fixes it [12:22] oh wait, no it doesn't [12:27] jnthn: Did you see my kvetch about Linenoise on OS X last night? Are you the right person to re-kvetch at? [12:28] so, yep something is b0rked because [12:28] #!/usr/bin/env perl6 [12:28] use v6; [12:28] use Sys::Lastlog; [12:28] say "foo"; [12:28] jnthn: If I "panda install Linenoise", it installs liblinenoise.dylib, but `perl6` dies when it can't fine liblinenoise.so [12:28] gives me the "write string requires an object with REPR MVMOSHandle" [12:33] *** ab5tract_ joined [12:33] rjbs: It's a Linenoise.pm bug [12:33] (I just looked at the code) [12:34] It's hardcoded to look for 'liblinenoise.so' [12:34] arnsholt: Is there anything I can do to help correct it? I'm dyin' here without history. ;) [12:34] Okay. So maybe I will install and edit in place, then file a GH ticket..? :) [12:34] Try installing a hacked version that chops off the .so part [12:34] Thanks, trying that now. [12:34] *** laouji_ joined [12:35] Looking further at the code, there are some hard-coded constant values that may very well be Linux specific [12:35] :'( [12:35] If you run out of patience with Linenoise.pm, there's always rlwrap [12:36] oh, my mistake [12:36] I didn't realize I'd hardcoded that [12:37] will just saying is native('liblinenoise') fix that? [12:37] Should, yeah [12:37] m: sub head(*$head, *@tail) { return $head }; head(1, 2, 3, 4); [12:37] rakudo-moar a6f563: ( no output ) [12:37] m: sub head(*$head, *@tail) { say $head }; head(1, 2, 3, 4); [12:37] Hm. I did an s/liblinenoise.so/liblinenoise/ on the installed Linenoise.pm, but did not help, I get the same error, which seems odd. [12:37] rakudo-moar a6f563: OUTPUT«1␤» [12:37] m: sub head($head, *@tail) { say $head }; head(1, 2, 3, 4); [12:37] rakudo-moar a6f563: OUTPUT«1␤» [12:37] I'm not sure I get what `*$` does as specified in s06 [12:37] From memory, it first tries to load the thing as-is, and if that fails it tries to load with shared library extension [12:37] Should I hack it before installing? [12:38] (I don't see a .pmc file or anything, should such things exist.) [12:38] Which file did you edit? [12:38] The .pm installed by panda, or something else? [12:38] ~/perl6/share/perl6/site/lib/Linenoise.pm [12:38] which is the path emitted as install destination by panda install [12:38] *** laouji_ left [12:38] Right, right [12:39] In that case, there's probably a precompiled version lying around [12:39] Linenoise.moarvm [12:39] rjbs: I thought you were also having trouble with panda installing a .so instead of a .dylib? [12:39] rjbs: I'm entirely the wrong person to kvetch at if you want a useful answer; I didn't do any of the Linenoise module work, don't know much about OSX (apart from its debug malloc library :P), and didn't really hack on Panda either :) [12:40] jnthn: Thanks anyway. Someone had wondered whether perhaps moar was doing dylib loading incorrectly, but it looks like that is not the case, now t hanks to arnsholt++ [12:40] arnsholt: do you have the source doc for the `__class__` python behavior? [12:40] hoelzro: No, it installed .dylib [12:40] or maybe you were looking at source code [12:40] There is a .moarvm file, yes. [12:40] Ven: https://docs.python.org/3/reference/datamodel.html#customizing-class-creation "__class__ is an implicit closure reference created by the compiler if any methods in a class body refer to either __class__ or super. " [12:40] rjbs: ok, good. what if you repalce all of the liblinenoise.so with liblinenoise in Linenoise.pm in a clone of the linenoise repo, and panda install that? [12:41] arnsholt: thanks [12:41] The plot worsens... [12:41] So, I removed the .moarvm, I edited the .pm, and now I get: [12:41] Cannot locate native library 'liblinenoise.dylib' [12:41] hoelzro: I will try that. How do I panda install "the repo whose working tree I'm in"? [12:41] rjbs: panda install . [12:41] Ven: Also, PEP3135 (which is referenced just below the bit I quoted) [12:41] or any directory, for that matter [12:42] Great, thanks. [12:42] arnsholt: all that sounds pretty bad :/. I'll read up [12:42] rjbs: you probably need to tweak the OS X equivalent of LD_LIBRARY_PATH [12:42] DYLD_something_or_other, I think [12:42] I had wondered whether I'd need to do that, thanks. [12:43] how do i espace * inside list? [12:43] Where's the github repo? [12:43] *** laouji_ joined [12:43] i need * to be a block inside a list [12:43] DYLD_LIBRARY_PATH, I think [12:43] Yes, it's DYLD_LIBRARY_PATH [12:43] rjbs: https://github.com/hoelzro/p6-linenoise [12:44] please don't. [12:44] DYLD_FALLBACK_LIBRARY_PATH if you must, but better is to fix the problem [12:44] geekosaur: I was planning on hacking MoarVM to add the share directory to the rpath [12:44] I don't know if that'll fix the problem on OS X [12:44] While I'm thinking of it, should I ask someone to add https://github.com/drforr/perl6-readline ? [12:45] hoelzro: I'll give you a report in 10-15m. Time to walk the kid to school! [12:45] (It worked! I tested while she got her shoes tied.) [12:45] you're fast, or she's not? [12:46] A little from column A... [12:46] hoelzro: https://github.com/hoelzro/p6-linenoise/pull/2 [12:46] * rjbs & for a bit [12:47] just for the record, DYLD_LIBRARY_PATH doesn't work like LD_LIBRARY_PATH does on Linux and can break things in bizarre ways. DYLD_FALLBACK_LIBRARY_PATH is closer to Linux behavior (but may only work on 10.7+) [12:47] m: my %h = not => not **; %h(True).say; [12:47] rakudo-moar a6f563: OUTPUT«False␤» [12:47] *** xinming left [12:47] m: my %h = not => not *; %h(True).say; [12:47] rakudo-moar a6f563: OUTPUT«False␤» [12:48] m: my %h = not => not *, so => so *; %h(True).say; [12:48] rakudo-moar a6f563: OUTPUT«False␤» [12:48] *** laouji_ left [12:48] *** xinming joined [12:49] geekosaur: What is the correct solution, incidentally? [12:50] That's one of the annoying things with shared libraries; convincing the linker to find the damned things [12:50] rjbs: glad to hear it =) [12:51] OS X encodes the runtime path to the dylib within the dylib itself. generally you use install_name_tool if you need to adjust that [12:52] this may require linking the dylib with -headerpad_max_install_names to leave sufficient room for large paths [12:53] but in short, if you copy a dylib somewhere other than where you built it, use install_name_tool to fix its internal path [12:53] jnthn: if you have some time today, could you look at RT #125154? I was able to fix it by reverting a commit you made a year ago (319509a), but I would like to keep the gains that resulted from that commit [12:56] *** xinming left [12:56] Ven: I've never used *$param in real code. [12:56] *** xinming joined [12:56] why not DYLD_LIBRARY_PATH? that gets searched first (from reading man page) then the default dirs which can be overridden with DYLD_FALLBACK_LIBRARY_PATH [12:56] Ven: if you believe something is off there with respect to the spec^Wsyn, then we should try to come up with a oneliner that exhibits that off-ness. [12:57] masak: I don't even get what's the purpose :-) [12:57] seems to me `:($, *@)` already works [12:58] *** mls_ is now known as mls [12:58] well, gone, again. still interested in why Int.new(0) is a bust. would love DateTime.utc to be able to use $.timezone.new(0) so it won't slice off timezone types. [12:58] * masak goes and reads S06 [12:59] because DYLD_LIBRARY_PATH overrides the hardcoded paths completely. so if you have something using the libiconv.dylib Apple ships, and you include the library directory for macports or homebrew or anything shipping a newer gnu iconv in DYLD_LIBRARY_PATH, that thing thta expects Apple's will crash hard [12:59] *** skids joined [13:00] DYLD_FALLBACK_LIBRARY_PATH will try the specified one first and only then search the fallback path, so all the system programs will still work even if you have an alternative version of an Apple-provided library somewhere on it [13:00] *** firefish5000 joined [13:00] *** koo6 joined [13:01] "Slurpy scalars still impose list context on their arguments." -- that, and the "treated lazily" thing seem to be the two differences. [13:01] m: sub tail(*$head, *@tail) { return @tail }; say tail(1..Inf) [13:01] rakudo-moar a6f563: OUTPUT«␤» [13:01] heh :) [13:02] I think it simply ignores the slurpiness [13:02] m: sub tail(*$head, *@tail) { return @tail }; my @fromtwo = tail(1..Inf); say @fromtwo.elems [13:02] rakudo-moar a6f563: OUTPUT«0␤» [13:02] and binds the argument range to $head [13:02] shown (I hope) in this commit https://github.com/perl6/roast/commit/dd9ef107ba0151caf61c41d830ea0e0f197a6893 [13:02] TimToady: this example is straight from S06, and it doesn't work. something is wrong somewhere. [13:02] in short, as apple ships a bunch of downrev things that both free and commercial software developers ship newer versions of as a matter of course, DYLIB_LIBRARY_PATH can make those things "just work" at the price of breaking all Apple provided programs completely [13:02] m: sub f(*$a, *@) { say $a }; f((((0, 1), 2), 3), 4) [13:02] rakudo-moar a6f563: OUTPUT«0 1 2 3␤» [13:02] slurpy scalars are NYI, that's wrong, no? [13:03] masak: ^ [13:03] I think the behavior that should happen is that it should be flattened and give out 0, right? [13:08] * rjbs tries to understand how to use install_name_tool for this. [13:09] -id to change the dylib's own path [13:10] *** aborazmeh joined [13:10] *** aborazmeh left [13:10] *** aborazmeh joined [13:11] Ven: I dunno. calls don't tend to do much flattening, in my experience. [13:11] geekosaur: Thanks, I kept trying to use -change. Now otool -L shows the right path in that file, but running perl6 still fails to load it. Do I need to rebuild a registry or something? [13:11] masak: well, I expected that's what "list context" meant there [13:12] "list context" is a very weird thing to apply to Perl 6. [13:12] it's Perl 5 thinking. [13:12] we do have list assignment. [13:12] *** ab5tract_ left [13:12] and flattening [13:12] -change would be if the perl6 executable has a linked-in path to it that needs to be replaced: install_name_tool -change /path/to/old/liblinenoise.dylin /path/to/new/location perl6 [13:13] geekosaur: Right. It'd be nice if there was an error on my misuse, I think, but whatever. :) [13:13] *** Ven left [13:14] it might be necessary to use install_name_tool -add_rpath on perl6 to point to the directory where libLinenoise.dylib is for dynamic loading [13:15] since it can't use the embedded path to find it if it wasn't actually linked against it [13:15] (as with dynload) [13:15] *** ibo2perl6 left [13:16] input file: /Users/rjbs/perl6/bin/perl6 is not a Mach-O file [13:17] right, you need to find the actual executable. that will be a wrapper shell script [13:18] Gosh, so it is. [13:18] silly me [13:18] install_name_tool -add_rpath $PWD /Users/rjbs/perl6/bin/moar [13:19] The trick is done. [13:19] geekosaur++ # medicine man [13:19] the powerpc abi went this way for security reasons and apple kept it on porting to intel [13:19] I will write this experience up. [13:20] Is there a clear suggested course of action for tadzik/panda? [13:20] it's more difficult to relocate things but, unlike ELF, there's not a long list of "disable these envars and functions in any security-sensitive context or else!" [13:23] Does panda install from releases or git? Real question: does there need to be a new release of Linenoise before that fix is live for installers? [13:25] rjbs: panda installs from git (HEAD) [13:25] Thanks. [13:25] rjbs: (currently) :) [13:26] there should be a plan to convince our module writers to tag releases and stuff [13:26] <[Coke]> we should probably fix that eventually to get "latest" tagged good version since not everyone keeps master/HEAD in working order. [13:26] <[Coke]> tadzik++ [13:27] [Coke]: yeah, that's a good plan [13:27] it will confuse everyone for a while, but it's inevitable [13:27] hoelzro: Going "left" in the repl requires ^B when I'd hoped would work. Is this known, or do I need to futz with something more? [13:29] rjbs: that's...interesting [13:29] * hoelzro tries [13:30] <[Coke]> "linenoise kind of sucks when you're used to readline" [13:30] yes, it kind of does =( [13:30] DrForr is working on a readline binding, fortunately [13:30] DrForr++ [13:31] I can cope with ^B for now, but yeah. It's kind of blecherous. [13:31] 1000% better than "delete and start over" though ;) [13:32] Feel free to add the github repo https://github.com/drforr/perl6-readline - I'll document it tonight, and I'm sure I'll get a flood of "Please...". [13:33] I thought left arrow did work, though [13:34] *** aborazmeh left [13:39] rjbs: left arrow works for me [13:39] I haven't tried linenoise on OS X, though [13:39] hoelzro: It does not work here under iTerm. I tried changing the terminal type I report to no avail. [13:40] It works under tmux, but not not under tmux. :-/ [13:40] rjbs: would you mind trying a standalone program using linenoise, to see if it's linenoise-related? [13:41] hm. iterm2 and tmux should be sending (and expecting) the same thing [13:41] hoelzro: If you give me instructions, happy to. [13:42] ok, hang on [13:42] Also works under Terminal. [13:43] so just not iTerm? [13:43] This is odd... [13:43] indeed [13:43] If I hit ^V, I see \eOD - but under tmux, \e[D [13:44] * geekosaur wonders if that is actually the original iTerm... which was rather buggy [13:44] are you using iTerm 1 or 2? [13:44] It's 2. [13:44] ok, good =) [13:44] also it sounds like you're in application keypad mode [13:44] hmm, anyone using rakudobrew on windows? [13:44] orelse, rakudo in general on cygwin? [13:45] printf '\033>' [13:46] rjbs: compile and run this, please: https://gist.github.com/hoelzro/b84b155f7e7c863aca1c [13:46] ^ should switch off application keypad mode [13:46] I've loaded a different keyboard profile. Now it works. [13:46] type exit to exit [13:46] tadzik: libuv doesn't support cygwin, so current rakudo on cygwin could only be via Java, if cygwin has Java [13:46] so, any ideas where to start looking for the reason that simply loading a compiled module might be shagging up $*OUT? [13:47] hoelzro: It's fine now, but I think it's because of the changed keyboard profile [13:47] ok, that's good [13:47] yes. something turned on application keypad mode, resetting the keyboard profile turned it back off [13:47] geekosaur++ # fascinating, had no idea. [13:48] most unix stuff doesn;t use application keypad mode, it's mostly a vms thing [13:48] geekosaur: I think it's worse than that. This was the default on new terminals, afaict. [13:49] At any rate, it's fixed, and I have two ways to fix it should it happen again. [13:49] I'm gonna repl the hell out of perl6 now. [13:49] preferences > profiles > advanced [13:49] hoelzro++ thanks! [13:49] no problem! [13:49] check your default profile [13:49] geekosaur: I did, and that's where I fixed it. [13:49] rjbs: btw, you now have tab completion for Perl 6 builtins [13:49] and whatever you import, for that matter [13:50] I look forward to being delighted! [13:50] I hope the delight makes up for the pain =) [13:50] The pain is already made up for. [13:50] *** muraiki joined [13:51] Just knowing that I can edit my repl lines easily is huge peace of mind. That's been a major drag. [13:54] hoelzro: Tab completion is nice, but a bit odd. "Int." for example is not what I'd expect. Anyway, I've never been much of a tab completer. :) [13:54] rjbs: yeah, it's *really* rudimentary at this point [13:55] Okay! [13:56] *** Ven_ joined [13:57] nwc10: ah :( [13:57] Posted: http://rjbs.manxome.org/rubric/entry/2081 [13:57] nwc10: do you know what's the alternative that works fine? [13:58] native Windows? [13:58] Okay, it's something to do with "use System::Passwd" [13:58] with strawberry perl? [13:58] or, more carefully, "native alternative to what?" [13:58] well, to cygwin [13:59] I want to be able to use moarvm-rakudo on windows [13:59] rjbs: if you come up with other improvements to tab completion, please let me know! [13:59] I thought cygwin is the way to go [13:59] tadzik: er, OK. jnthn builds natively on Windows [13:59] require System::Passwd is fine, use System::Passwd and $*OUT is shagged [13:59] hoelzro: For now, expect complaints more than fixes, but we'll see how it goes. :-) [13:59] and I believe that (at least) FROGGS has also done it, of the active folks ehre [13:59] that's fine =) [13:59] Time to switch back to p5 for workday, though! [14:02] could someone on OS X try the new Moar to see if my rpath change helps at all? [14:02] *** g4 left [14:02] I'm guessing we'll have to use install_name_tool -id on the module .dylibs as well [14:02] hoelzro: just finished building [14:03] hoelzro: worked without any mucking, just a fresh moar + panda install Linenoise [14:03] awesome! [14:04] could you try installing Linenoise and seeing if that works with just the install_name_tool -id $PWD/liblinenoise.dylib liblinenoise.dylib fix rjbs posted? [14:04] *** _thou joined [14:05] rjbs++ # puttering with perl6 [14:06] masak: My hope is that I can politely complain about stuff so that come v6.0 other people are less likely to impolitely complain. >:-) [14:06] hoelzro: my repl seems to be happy to give me history and left arrow without anything beyond building moar and installing linenoise -- I can wipe out an install and start fresh if you want me to see if rjbs' install_name_tool thing is still needed [14:06] * Ven_ starts working on some mop hackery... [14:06] btyler: that would be awesome [14:07] nwc10: done what? [14:10] awesome how fast it is to rebuild r-m from nothing these days [14:13] src\strings\unicode.c(45034): fatal error C1026: parser stack overflow, program [14:13] too complex [14:13] thanks, microsoft :( [14:13] O.o [14:13] tadzik: you've got HEAD? [14:13] FROGGS: yep [14:13] because there was a fix for that lately [14:13] fresh from rakudobrew [14:13] what's your cl version? [14:14] or perhaps it's actually using MOAR_REVISION which wasn't bumped? [14:14] it mite be [14:14] yeah, possible [14:16] nqp: 59601a2 | FROGGS++ | tools/build/MOAR_REVISION: [14:16] nqp: bump moar rev, possible win32 build fix [14:16] nqp: review: https://github.com/perl6/nqp/commit/59601a26b9 [14:16] yay [14:16] rakudo/nom: 0f3f80c | FROGGS++ | tools/build/NQP_REVISION: [14:16] rakudo/nom: bump nqp/moar rev, possible win32 build fix [14:16] rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0f3f80c3f6 [14:17] m: sub trait_mod:(Mu:U \type, :$serializable!) { my @attribute = type.^attributes.grep(*.has-accessor); say @attribute.perl }; class A is serializable { has $.a; } [14:17] rakudo-moar a6f563: OUTPUT«[]<>␤» [14:18] FROGGS: same thing, it seems [14:18] not sure why this is empty? are attributes not yet there? [14:18] lemme test it [14:18] Ven_: that trait probably runs too early for attrs to show up [14:19] FROGGS: alright. what should I do instead? [14:19] Ven_: write a sub that receives an object and serializes it? [14:20] FROGGS: I'd like to generate such a sub at compile-time if possible [14:20] Ven_: hmmm, isnt there a COMPOSE phaser or something like that, that runs at the right time? [14:21] hoelzro: wiped out everything and started from scratch, no install_name_tool required, REPL history/arrow keys worked after panda install Linenoise [14:21] FROGGS: my learnxiny say it's NYI :P [14:21] *** itz joined [14:21] :o( [14:21] tadzik: I'm building now HEAD... [14:22] tadzik: I've got ActivePerl 64bit and cl 17.0 btw [14:23] cl? [14:23] I [14:23] I'm on strawberry, not sure if that matters [14:23] *** itz_ left [14:23] tadzik: that probably matters [14:23] huh [14:24] cl is the c compiler from Visual Studio (Express) [14:24] ive built on windows with strawberry perl + msvc [14:25] hmm, I'm running 2015 RC [14:25] ohh, wow [14:25] such new [14:25] version 19.00.22816 [14:25] I guess it's worse :P [14:26] *** Ven_ left [14:26] well, if it is an RC it might not be bug free .o) [14:26] :o) [14:26] but I have no experience how good cl RC's are [14:28] fwiw ive had problem installs due to strawberry perl having generated some settings during install that later changed (like swapping in a new hard disk, even if its cloned). for whatever reason perl5 continued to work fine but rakudo would fail to compile [14:29] tadzik: "Rakudo has been built and installed." [14:29] *** laouji left [14:30] *** FROGGS[mobile] joined [14:31] *** FROGGS left [14:32] *** brrt left [14:32] hey, who’s planning on going to the Swiss Perl Workshop in August? [14:32] besides TimToady++ [14:33] colomon: I am [14:33] cool [14:35] I'm thinking of going. [14:35] also cool. [14:35] (it's in my work schedule, valiantly defending itself against intruders) [14:35] I'll most likely fly [14:36] I've always wanted to ride there across the alps. [14:36] on a giant squirrel. [14:36] tadzik: So all the dylib futzing is now oboslete with an upgraded rakudobrew and fresh brewed moar? [14:36] decommute & [14:36] rjbs: that was my experience just now with OSX 10.10 [14:36] If my Swiss clients come up with a good reason to fly me out there in late August… [14:36] masak: https://youtu.be/Czy0pXRRZcs?t=334 [14:37] *** firefish5000 left [14:37] afk # but will check back in [14:37] rjbs: so I've heard :) [14:37] * rjbs updates his blog post. [14:37] rjbs: no rakudobrew update should be necessary though [14:37] Oh? [14:37] rakudobrew always fetches the lastest rakudo [14:38] Is it rakudo that got the fix, then? [14:38] so if it's fixed in there, it's fixed automagically if you update your rakudo using rakudobrew [14:38] MoarVM, actually [14:38] I hope MOAR_REVISION covers that patch [14:38] FROGGS just bumped it, so it should :) [14:38] Okay! [14:38] can't test it myself, since my visual studio is too bleeding edge :); [14:39] rjbs: where's that blog post of yours? I don't see it on bpo or ironman [14:40] http://rjbs.manxome.org/rubric/entry/2081 [14:40] ceers [14:40] It's only half an hour old, probably ironman hasn't updated. [14:41] nice :) rjbs++ for spreading good propaganda [14:41] jnthn, it appears the "write string requires an object with REPR MVMOSHandle" is caused by System::Passwd doing IO in the "module scope" when it is loaded [14:42] I've sent a patch to the author, but I suspect that the problem is deeper than that [14:44] m: try { die ; CATCH { say "ok" }}; say "..."; [14:44] rakudo-moar a6f563: OUTPUT«ok␤Died␤ in block at /tmp/DL0zH5a7LJ:1␤␤» [14:44] *** laouji joined [14:45] should it die even inside try/catch ? [14:45] m: try { fail ; CATCH { say "ok" }}; say "..."; [14:45] rakudo-moar a6f563: OUTPUT«ok␤Died␤ in block at /tmp/QRQKrF6e_S:1␤␤» [14:46] you need a default block [14:46] m: try { die ; CATCH { default {say "ok"} }}; say "..."; [14:46] rakudo-moar a6f563: OUTPUT«ok␤...␤» [14:47] if you dont plan to properly catch/handle or do anything with the error you just do try { die ; } or say "..."; [14:48] http://design.perl6.org/Differences.html [14:48] probably deprecated syntax for CATCH here, since no pattern matching inside CATCH [14:48] *** ash__ joined [14:49] well warn is not say [14:49] *** laouji left [14:49] m: try { die ; CATCH { warn "ok" }}; say "..."; [14:49] rakudo-moar a6f563: OUTPUT«ok at /tmp/vcga3V_KPb line 1 in block at /tmp/vcga3V_KPb:1␤␤Died␤ in block at /tmp/vcga3V_KPb:1␤␤» [14:49] btyler: interesting...thanks for trying that out [14:49] ooooh [14:49] I think I know why [14:50] andreoss: but yeah its probably old [14:50] dylibs contain their location so that when you link against them, the resulting executable knows where to find them [14:51] but if you dlopen (or whatever it is on OS X), it doesn't need that path [14:57] *** Ven_ joined [14:57] *** rurban left [14:57] *** pierrot_ is now known as pierrot [14:59] FROGGS[mobile]: ended up with a sub indeed. [15:01] Should I release those 3 lines in something like "Serialize::Tiny"? [15:03] *** fhelmberger left [15:04] *** grondilu left [15:04] *** fhelmberger joined [15:05] .oO( how tiny is Tiny ) [15:05] masak thanks for explanation earlier. So foo: just parses like foo( and the closing ) would be at the end of the expression. Neat. [15:06] *** cygx joined [15:06] o/ [15:06] o/ cygx [15:06] *** rindolf left [15:08] Ven_: I still hope to release my serialization code soon [15:08] FROGGS[mobile]: do you mind me taking an option on Serialization::Tiny, then? [15:08] I should probably bug jnthn++ tomorrow [15:08] *** fhelmberger left [15:09] Ven_: go ahead [15:09] alright. I can just remove it if needed later anyhoo [15:09] my code relies on the currently used compiler anyway [15:15] *** gfldex joined [15:16] ecosystem: 58d8c4f | (Jonathan Stowe)++ | META.list: [15:16] ecosystem: Added Sys::Lastlog [15:16] ecosystem: review: https://github.com/perl6/ecosystem/commit/58d8c4fdf8 [15:20] *** FROGGS joined [15:20] *** diana_olhovik left [15:21] *** grondilu joined [15:22] I opened some pull requests that need discussion (changed to the API) as well as testing [15:22] https://github.com/MoarVM/MoarVM/pull/215 https://github.com/rakudo/rakudo/pull/425 [15:22] * changes [15:23] *** pat_js joined [15:25] *** xinming left [15:28] jnthn: would it be possible to tackle the serialization problem tomorrow? [15:31] *** rindolf joined [15:34] *** _mg_ left [15:35] FROGGS: do we have some META.info docs? [15:35] (i.e. is `depends` needed) [15:41] FROGGS: Which one? The "detach from SC" one? [15:41] I just realized that with my changes, p5 `open(my $fh, '<', 'input.txt')` would read in p6 `my $fh = open('input.txt', '<')` [15:42] *** Celelibi left [15:42] Surely that wants doing with a named arg, as :r/:w are [15:42] cygx: have you considered changing that second param to a named parameter, like :mode? [15:43] I actually had it as a named argument first [15:43] then, I thought: let's make it optional instead and save some typing ;) [15:44] *** domidumont left [15:44] *** Celelibi joined [15:44] FROGGS: https://github.com/vendethiel/Serialize-Tiny.pm6 [15:46] <[Coke]> colomon: I might be able to make it, depending on travel support (which I might be able to get) [15:46] some bikeshedding: should the mode argument be optional or default to 'r'? should it :$mode or :$m? [15:46] *should it be [15:49] *** zakharyas left [15:51] ecosystem: 5a02edd | ven++ | META.list: [15:51] ecosystem: Add Serialize-Tiny [15:51] ecosystem: review: https://github.com/perl6/ecosystem/commit/5a02edd1a4 [15:51] jnthn: yes, exactly [15:51] FROGGS: Sure, we can. [15:51] Ven_: look at others in the modules list [15:51] FROGGS: sorry? [15:52] Ven_: to see how a good META.info looks like [15:52] FROGGS: yes yes, that's what I ended up doing :) https://github.com/perl6/ecosystem/commit/5a02edd1a42434a95339ba9ae8294fa07cba1e0b [15:52] S22 talks about it, but we are not there yet [15:53] perl6-examples: ebdddb0 | (Andrei Osipov)++ | categories/interpreters/lisp.pl: [15:53] perl6-examples: minor refactoring, added booleans [15:53] perl6-examples: review: https://github.com/perl6/perl6-examples/commit/ebdddb0ea8 [15:53] perl6-examples: 35d4a0c | (Andrei Osipov)++ | categories/interpreters/lisp.pl: [15:53] perl6-examples: [interpreters] handle booleans, added tests [15:53] perl6-examples: review: https://github.com/perl6/perl6-examples/commit/35d4a0c0e6 [15:53] perl6-examples: da5775c | (Andrei Osipov)++ | categories/interpreters/lisp.pl: [15:53] perl6-examples: [interpreters] fix floats [15:53] perl6-examples: review: https://github.com/perl6/perl6-examples/commit/da5775cd8b [15:54] *** FROGGS[mobile] left [15:59] *** domidumont joined [16:00] *** eli-se joined [16:01] *** Ven_ left [16:01] rakudobrew build-panda fails on 2015.04 [16:01] Probable version skew in pre-compiled '/home/ahartmai/.rakudobrew/moar-2015.04/panda/ext/File__Find/lib/File/Find.pm' (cause: no object at index 390) [16:01] build stage failed for panda: Failed building lib/Panda/Ecosystem.pm [16:07] No such method 'clone' for invocant of type 'NQPArray' [16:08] *** domidumont left [16:11] *** eternaleye left [16:11] *** eternaleye joined [16:17] works on nom [16:17] * PerlJam just did [16:17] rakudobrew build moar [16:18] and is sitting here waiting on the results of "==> Reinstalling Linenoise" [16:18] mu: 3e351e0 | (Andrei Osipov)++ | docs/Perl6/Perl5/Differences.pod: [16:18] mu: Fix depricated syntax in CATCH block [16:18] mu: review: https://github.com/perl6/mu/commit/3e351e0276 [16:18] which seems to be taking a really long time [16:18] ugexe: i've fixed it [16:21] *** Sqirrel left [16:21] *** Sqirrel joined [16:29] *** _mg_ joined [16:31] m: my @x = gather take $_ andthen last if $_ > 5 for 1...10; say @x; [16:31] rakudo-moar 0f3f80: OUTPUT«6 7 8 9 10␤» [16:31] *** _mg_ left [16:34] Most obfuscated way to write my @x = 6..10 ever :P [16:34] Well, roundabout way, anyway :) [16:35] *** kaare_ joined [16:35] * TimToady suspects there's a bug there somewhere [16:35] or a NYI [16:36] Does take evaluate the the value you take, or just Nil? [16:36] That'd explain it nicely if the latter... [16:36] take is supposed to return the same value it took [16:36] hm, and looking at control.pm it does [16:37] I don't understand the semantics of andthen, so... :) [16:37] it's 'and' with topicalization of the lhs result, more or less [16:37] m: my @x = gather take $_ and last if $_ > 5 for 1...10; say @x; [16:37] rakudo-moar 0f3f80: OUTPUT«6␤» [16:37] ah [16:38] so pointlessly used here [16:38] *** _mg_ joined [16:38] *** kaare__ left [16:38] (as in, "and" does just fine too) [16:38] right [16:38] and 'andthen' is still a WIP [16:38] m: say 1 andthen 2 [16:38] rakudo-moar 0f3f80: OUTPUT«1␤» [16:38] m: say 1 andthen (say 'omg') [16:38] rakudo-moar 0f3f80: OUTPUT«1␤omg␤» [16:38] hm :) [16:38] m: say (1 andthen 2) [16:38] rakudo-moar 0f3f80: OUTPUT«2␤» [16:38] h [16:38] *oh [16:39] m: my @x = gather (take $_ andthen last) if $_ > 5 for 1...10; say @x; [16:39] rakudo-moar 0f3f80: OUTPUT«6 7 8 9 10␤» [16:39] hm, not prec :) [16:40] hm, is andthen a way to chain method calls? :P [16:40] .foo andthen .bar andthen .baz :) [16:40] kinda, but mostly intended for logic programming someday [16:40] ok [16:40] using lazy lists like STD does [16:40] where I wished I had 'andthen' :) [16:42] my @x = gather take $_ andthen (say "last" if $_ > 5) for 1...10; say @x; [16:42] m: my @x = gather take $_ andthen (say "last" if $_ > 5) for 1...10; say @x; [16:42] rakudo-moar 0f3f80: OUTPUT«last␤last␤last␤last␤last␤1 2 3 4 5 6 7 8 9 10␤» [16:42] m: my @x = gather take $_ andthen (last if $_ > 5) for 1...10; say @x; [16:42] rakudo-moar 0f3f80: OUTPUT«1 2 3 4 5 6 7 8 9 10␤» [16:44] jnthn: in fact, if you look at STD.pm5, you see it's full of things like: if $C->_STARr(sub { my $C=shift; if (my ($C) = ($C->_BRACKETr(sub {...} [16:45] where $C is the current cursor, but we're continually having to retopicalize (if $C is the topic here) [16:46] *** pat_js left [16:47] and orelse is the flip side, except it topicalizes to $! instead, iirc [16:48] I also wanted to differentiage 'orelse' from p5's 'dor', which I view as a bit of a mistake [16:48] *** _mg_ left [16:51] .oO( d'or ) [16:51] *** kaare_ left [16:52] *** raiph joined [16:53] *** abraxxa left [16:53] *** espadrine left [16:55] m: no strict; %h{"a"}{"b"} # doesn't even need the assignment to fail [16:55] rakudo-moar 0f3f80: OUTPUT«Use of Nil in string context at src/gen/m-BOOTSTRAP.nqp line 2235␤Use of Nil in string context at src/gen/m-BOOTSTRAP.nqp line 2235␤Use of Nil in string context at src/gen/m-BOOTSTRAP.nqp line 2235␤Use of Nil in string context at src/gen/m-BOOTSTRAP.…» [16:56] did that one ever get RT'd? [16:56] Never seen it before [16:57] It only shows uup under "no strict"? [16:57] yeah, the first arg to .{} ends up Mu [16:57] hm [16:57] and works with $ instead [16:57] so % isn't auto-creating somehow [16:57] Yeah [16:58] BTW, is "no strict" in the REPL intentional? [16:58] I did not participate in that discussion :) [16:58] OK. I don't like it being :P [16:59] Means typo = annoying, instead of helpful error. [16:59] Which sucks if you're doing live demos. :) [16:59] I agree [16:59] +1 for strict in REPL I'd want the REPL environment to be near enough the same as a script executing [16:59] esp if you can just arrow up and add the 'my' [16:59] OK, I'll prolly make it so tomorrow. [16:59] Right. :) [16:59] I can up arrow fine on Windows :D [17:00] It's you backwards *nix folks who need the silly libraries to enable it :P [17:00] the main use case of a REPL for me outside of P6 is debugging a script where I copy paste lines [17:01] While we're at the topic of the REPL, is there a way to load sub/variable definitions from a file and use them in the REPL? Would be useful for a kind of interactive workflow [17:01] -M ? [17:01] ben_m: "require 'file'" I think [17:01] um....'use'? [17:01] Or use :) [17:01] require I guess doens't import them :) [17:02] not by default [17:02] I assumed stuff has to be a proper package or something for use ... haven't done much Perl6 yet. [17:02] But yeah, module works out fine. [17:02] > use Test; [17:02] > plan 1 [17:02] 1..1 [17:02] I was hoping the REPL would *justwork* with my Slang so that I could do perl6 -MBioInfo to have an augmented REPL [17:02] Could've just tried that I suppose, thanks. [17:02] Ulti: I think it should already? [17:03] well it created a multi line quote with `` and the multi line enhanced REPL really didnt like it last time I tried [17:03] was a while ago though [17:04] I think I'll get rid of an explicit mode argument to open and just add more named parameters [17:04] *** eli-se left [17:05] the list of flags: https://gist.github.com/cygx/89984bc8b82c4609d280 [17:07] cygx: Looks sensible at first glance. [17:08] * TimToady sics the masakbot on the 'no strict' bug [17:09] * jnthn suspects the masakbot is at the same dinner that he's on the train to... :) [17:10] we had some interesting threading bugs the night before too [17:10] FROGGS: i'll take a look when i get a chance; try for later today, thanks! [17:11] I've more than enough of those already to look at. :) [17:12] I suspect a lot of them boil down to a smaller number of root causes. At least, the things I already fixed could manifest in various ways. [17:13] TimToady: There's an RT complaining about .assuming not working on Block [17:13] TimToady: In S06 it suggests it lives on the Callable role... [17:13] But there's not much precedent for putting anything else on there... :) [17:13] jnthn: do you have any thoughts on how I could add takedispatcher code to make PRE blocks work with callsame? I tried to make a change in add_phaser, but no dice [17:14] *** dnmfarrell joined [17:14] Callable is just of/returns [17:14] hoelzro: No idea without looking into it a bunch more, sorry. [17:14] no worries [17:14] guess I'll have to go with my do { PRE { ... } } workaround =/ [17:15] TimToady: I could imagine putting assuming in Block, or maybe in Code (the latter is the type of thunks) [17:15] Any preference? [17:16] *** domidumont joined [17:17] hey #perl6 I'm trying to define a grammar that recognizes "include" tokens for other files to parse. I can get the grammar to parse the referenced file, but how can I include the resulting match object in the parent match object? e.g. "token include { ^^\=include \h+ \n { $/ = self.parsefile($/.Str) } }" [17:17] jnthn: nope [17:18] dnmfarrell: either with 'make' to store into the .made slot, or return $/.CURSOR directly might possibly work [17:18] Or stash it in a dyncar if you want to reach it from the actions [17:19] TimToady: jnthn thanks! let me try those [17:19] uh, dynvar :) [17:19] * TimToady still thinks some of our internal dynvar usage is a bit smelly [17:19] *** diana_olhovik_ joined [17:20] $*ACTIONS is probably slowing down the parser, both directly and through opportunity cost to the optimizer [17:22] TimToady: Indeed, also by making a polymorphic callsite [17:22] and language braids probably should be coming in through cursors, not %*LANG [17:22] TimToady: Whereas if we could grab the actions from, say, ParseShared, then we could do the grab and invoke in the code we compile, not down in !cursor_pass, maybe [17:23] but that's more about correctness than speed, I'll warrant [17:23] TimToady: So it becomes monomorphic and so inlinable/specializable [17:23] So yeah, it is sub-optimial in 2 ways to do actions as $*ACTIONS [17:23] one would eventually like the action code to just be a kind of wrapper for an inlined parse rule, maybe [17:24] or automatically added to the end of a parse rule so there's no invoke at all [17:24] Well, adding the call at code-gen time is what I was thinking of. [17:25] And spehs can decide if inlining is worth it. [17:25] *spesh [17:25] nod, so probably equivalentish [17:25] Aye [17:25] It'd also fix that RT about spurious calls when .parse is not passed a :actions [17:27] maybe also there's some generalizing to the forest/frogs kind of deriving multiple classes in parallel we want to think about [17:27] which I talked about in one of the apos but never got much traction [17:27] I suppose people would call that the expression problem nowadays [17:28] kinda touche on AOP too [17:28] *es [17:29] I'm kinda touché on AOP also :P [17:29] AOP is one of those half-paradigms :) [17:29] I'd put DBC in the same category [17:30] or maybe they're only a third of a new paradigm...hard to quantify that... [17:31] *** andreoss left [17:34] *** eli-se joined [17:34] hi [17:40] *** jercos_ is now known as jercos [17:44] sorry if this is a daft question - was there some type of Perl 6 time counter which is seconds since Jan 1st 2000? [17:44] Instants are TAI based, so just a difference [17:45] or did you wish to ignore leap seconds? [17:46] no, right now I'm blissfully able to ignore time (as SEP - I'm getting to deal with URLs and legacy code) [17:46] but I had this vague (and it seems wrong) memory that something in Perl 6 was calibrated relative to 2000, instead of (say) 1970, or some other arbitrary epoch [17:48] actually, to be very fair, nearly everything is now SEP until Friday, as tomorrow is a public holiday [17:48] that was my original proposal in 2000, but since then they've continued to use leap seconds, and we've settled on a more epoch-less view of time [17:48] *** jdv79_ is now known as jdv79 [17:48] and Friday is a bit SEP too, as I managed to finish the thing at work today, which is only "wanted" by Monday [17:48] What holiday is tomorrow? [17:48] aha, thanks. [17:49] I think that it's Ascention [17:49] I cant spell [17:50] m: say DateTime.new(now) - DateTime.new("2000-01-01T00:00:00Z") # something like this [17:50] rakudo-moar 0f3f80: OUTPUT«Use of Nil in string context at src/gen/m-BOOTSTRAP.nqp line 2223␤Cannot call Numeric(DateTime: ); none of these signatures match:␤ (Mu:U \v: *%_)␤ in block at /tmp/mbf07e8OV1:1␤␤» [17:52] m: say now - DateTime.new("2000-01-01T00:00:00Z".Instant) [17:52] rakudo-moar 0f3f80: OUTPUT«Method 'Instant' not found for invocant of class 'Str'␤ in block at /tmp/allXxMean2:1␤␤» [17:52] m: say now - DateTime.new("2000-01-01T00:00:00Z").Instant [17:52] rakudo-moar 0f3f80: OUTPUT«484854764.793363␤» [17:52] that's in atomic time, including leap seconds [17:53] m: say now - DateTime.new("2000-01-01T00:00:00Z").Instant [17:53] rakudo-moar 0f3f80: OUTPUT«484854783.420377␤» [17:53] detrain; bbl & [17:54] m: say time - DateTime.new("2000-01-01T00:00:00Z").posix [17:54] rakudo-moar 0f3f80: OUTPUT«484854892␤» [17:55] there's the civil answer :) [17:55] sorry, side effect of "got it done today" is that I'm now shattered, and only really half awake. [17:56] m: say time - DateTime.new("2000-01-01T00:00:00Z").posix; say now - DateTime.new("2000-01-01T00:00:00Z".Instant) [17:56] rakudo-moar 0f3f80: OUTPUT«484854961␤Method 'Instant' not found for invocant of class 'Str'␤ in block at /tmp/T27J8X3j30:1␤␤» [17:56] bother. what did I mess up... [17:56] copied my syntax error [17:56] move the ) inside .Instant [17:57] m: say time - DateTime.new("2000-01-01T00:00:00Z").posix; say now - DateTime.new("2000-01-01T00:00:00Z").Instant [17:57] rakudo-moar 0f3f80: OUTPUT«484855036␤484855039.600707␤» [17:57] and now I go check to see if there were 3 leap seconds... [17:58] oh yes. and I should repeat this in about 6 weeks. :-) [17:58] yes, drat it [17:59] (Lords a Leaping)-- [18:07] m: my @a = ^100; my @p = map { start { [ @a ] } }, ^10; say @p».result».elems [18:07] rakudo-moar 0f3f80: OUTPUT«100 100 100 100 100 100 100 100 100 100␤» [18:08] I think the fact that this one always goes wrong at the second element (if it does go wrong) indicates that [@a] is probably assuming an invariant that is not true on the nursury to gen2 copy [18:08] AH HA! Narrowed down the weird "write string requires an object with REPR MVMOSHandle" thing I saw earlier [18:08] I think the fact that this one always goes wrong at the second element (if it does go wrong) indicates that [@a] is probably assuming an invariant that is not true on the nursury to gen2 copy [18:09] oops [18:09] m: my @a = ^100; my @p = map { start { [ @a ] } }, ^10; say @p».result».elems [18:09] rakudo-moar 0f3f80: OUTPUT«100 100 100 100 100 100 100 100 100 100␤» [18:09] m: my @a = ^100; my @p = map { start { [ @a ] } }, ^10; say @p».result».elems [18:09] rakudo-moar 0f3f80: OUTPUT«100 100 100 100 100 100 100 100 100 100␤» [18:09] well, I won't spam that more [18:10] *** berekuk left [18:10] If one has a A.pm "module A { my $foo = $*DISTRO.Str; }" and a B.pm that can be just "use A; class B { }" and they are compiled and installed, then doing "use B;" in a script will cause $*OUT to get shagged up like that [18:11] I think that is somewhat broken [18:12] perl6-roast-data: 4a92e9b | coke++ | / (9 files): [18:12] perl6-roast-data: today (automated commit) [18:12] perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/4a92e9bb45 [18:13] It does *not* happen if non-compiled versions of the files are loaded [18:13] weird [18:14] *** dolmen joined [18:14] I'll rakudobug it, but just wondered if anyone had a theory as to what is going on with that [18:15] does it also fail if you write directly to $PROCESS::OUT? [18:15] RabidGravy: known [18:15] I already submitted that [18:15] (I think - let me check) [18:15] https://rt.perl.org/Public/Bug/Display.html?id=125090 [18:15] would be nice to know if the problem is in the dynvars or in PROCESS [18:20] on the [@a] thing, it's specifcally the [] that is not GC-safe, since neither $(@a) nor $(@a.flat) fail that way [18:20] TimToady, it's weirder than that : [18:20] Two terms in a row [18:20] at ./tt:5 [18:20] ------> $PROCESS::OUT.say⏏"foo"); [18:21] needs a : [18:21] m: $PROCESS::OUT.say: "foo" [18:21] rakudo-moar 0f3f80: OUTPUT«foo␤» [18:21] rjbs: your blog post could be read to say "perl6 never had readline until now", whereas previously linenoise came with moarvm and our parrot backend had a line editor built-in, too (i think it was built into parrot itself?), but we decided the vm is the wrong place for a readline like library if we want to give it more enhanced features [18:21] *** laouji joined [18:22] ah yes, okay it's not weirder than that [18:22] the result is however the same [18:22] timotimo: I'm not sure if you're suggesting I made an edit, what that edit would be, or why I'd make it. [18:22] dunno [18:23] just musing, really [18:23] Okay! [18:23] okay, so not really a dynvar problem, but a PROCESS setup issue, likely [18:23] * timotimo afk for a bit again [18:23] *** telex left [18:24] *** telex joined [18:25] *** molaf joined [18:26] *** laouji left [18:27] *** fhelmberger joined [18:28] Range div Int dies uglily. [18:28] m: say ^10 div 3 [18:28] rakudo-moar 0f3f80: OUTPUT«Cannot call infix:
(Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int); none of these signatures match:␤ (Int:D \a, Int:D \b)␤ (int $a, int $b --> int)␤ in block at /tmp/zKx_f3Ob1H:1␤␤» [18:28] hum, wait. [18:29] I had "Unimplemented spesh ops hit" locally. [18:29] it may be because I'm currently compiling Moar, though. [18:31] in any case, why does ^10 div 3 look for infix:
with ten Int as parameters? [18:31] m: say (^10) div 3 [18:31] rakudo-moar 0f3f80: OUTPUT«Cannot call infix:
(Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int); none of these signatures match:␤ (Int:D \a, Int:D \b)␤ (int $a, int $b --> int)␤ in block at /tmp/qvOS4Zm1sK:1␤␤» [18:32] that's just weird [18:32] grondilu: because it numifies the range, which has 10 numbers in it [18:32] *** dolmen left [18:32] oh! [18:32] guess it’s not, that’s a bug, I think [18:33] m: say ^10 + 1 [18:33] rakudo-moar 0f3f80: OUTPUT«11␤» [18:33] m: say ^10 div 1 [18:33] rakudo-moar 0f3f80: OUTPUT«Cannot call infix:
(Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int); none of these signatures match:␤ (Int:D \a, Int:D \b)␤ (int $a, int $b --> int)␤ in block at /tmp/XuOvudFsOb:1␤␤» [18:33] I was wondering if infix:
(Range $r, Int $n) could be made to mean $r.min, * + ($r.max - $r.min)/($n - 1) ... $r.max [18:34] like "cutting a range in $n parts" [18:34] *** _mg_ joined [18:34] basically like the "cut" sub I wrote for http://rosettacode.org/wiki/Mandelbrot_set#Perl_6 [18:35] infix:
is specifically for meant for two operands of the same type [18:36] ok [18:36] infix: then? [18:36] m: sub cat(Int() $parts, *@e) { @e.rotor((@e / $parts).ceiling) }; say cut 3, ^10 [18:36] m: say ^10 / 3 [18:36] rakudo-moar 0f3f80: OUTPUT«5===SORRY!5=== Error while compiling /tmp/_mhDGwXXc7␤Undeclared routine:␤ cut used at line 1. Did you mean 'cat'?␤␤» [18:36] rakudo-moar 0f3f80: OUTPUT«3.333333␤» [18:36] m: sub cut(Int() $parts, *@e) { @e.rotor((@e / $parts).ceiling) }; say cut(3, ^10).perl [18:36] rakudo-moar 0f3f80: OUTPUT«((0, 1, 2, 3), (4, 5, 6, 7))␤» [18:36] m: sub cut(Int() $parts, *@e) { @e.rotor((@e / $parts).floor) }; say cut(3, ^10).perl [18:36] *** _mg_ left [18:37] rakudo-moar 0f3f80: OUTPUT«((0, 1, 2), (3, 4, 5), (6, 7, 8))␤» [18:37] better [18:37] that's not quite what I had in mind though. [18:38] I was thinking of cutting a Range in $n intervals of equal length. [18:38] oh [18:39] *** ponbiki left [18:39] maybe Range.rotor should be returning ranges [18:41] m: sub cut(Range $r, Int $n) { $r.min, * + ($r.max - $r.min)/($n - 1) ... $r.max }; say cut(0..1, 10) [18:41] rakudo-moar 0f3f80: OUTPUT«0 0.111111 0.222222 0.333333 0.444444 0.555556 0.666667 0.777778 0.888889 1␤» [18:41] .oO( Range.rover? ) [18:42] m: say (^10).rotor(3)».minmax [18:42] rakudo-moar 0f3f80: OUTPUT«0..0 1..1 2..2 3..3 4..4 5..5 6..6 7..7 8..8␤» [18:42] hmm [18:42] hyper seems to be losing the ()s [18:42] m: sub cut(Range $r, Int $n) { $r.min, * + ($r.max - $r.min)/($n - 1) ... $r.max }; say cut(0..pi, 10) # I suspect this will fail [18:42] rakudo-moar 0f3f80: OUTPUT«0 0.349065850398866 0.698131700797732 1.0471975511966 1.39626340159546 1.74532925199433 2.0943951023932 2.44346095279206 2.79252680319093 3.14159265358979␤» [18:42] *** kaare_ joined [18:43] (Rat FTW) [18:43] *** diana_olhovik_ left [18:44] m: say (^10).rotor(3).map: *.minmax [18:44] rakudo-moar 0f3f80: OUTPUT«0 1 2 3 4 5 6 7 8␤» [18:44] m: say (^10).rotor(3).map(*.minmax).perl [18:44] rakudo-moar 0f3f80: OUTPUT«(0, 1, 2, 3, 4, 5, 6, 7, 8)␤» [18:44] hmm [18:45] m: say (^10).rotor(3).perl [18:45] rakudo-moar 0f3f80: OUTPUT«((0, 1, 2), (3, 4, 5), (6, 7, 8))␤» [18:45] who's losing the ()s? [18:45] m: say (^10).rotor(3).map({$_}).perl [18:45] rakudo-moar 0f3f80: OUTPUT«((0, 1, 2), (3, 4, 5), (6, 7, 8))␤» [18:46] m: say (^10).rotor(3).map((*.minmax)).perl [18:46] rakudo-moar 0f3f80: OUTPUT«(0, 1, 2, 3, 4, 5, 6, 7, 8)␤» [18:46] m: say (^10).rotor(3).map((*.minmax,)).perl [18:46] rakudo-moar 0f3f80: OUTPUT«Method 'count' not found for invocant of class 'Parcel'␤ in block at /tmp/_wS9dpZFPk:1␤␤» [18:46] m: say (^10).rotor(3).map(({.minmax)}).perl [18:46] rakudo-moar 0f3f80: OUTPUT«5===SORRY!5=== Error while compiling /tmp/MQMbExo2UF␤Missing block␤at /tmp/MQMbExo2UF:1␤------> 3say (^10).rotor(3).map(({.minmax7⏏5)}).perl␤ expecting any of:␤ statement end␤ statement modifier␤ statement mo…» [18:46] m: say (^10).rotor(3).map({.minmax)}).perl [18:46] rakudo-moar 0f3f80: OUTPUT«5===SORRY!5=== Error while compiling /tmp/e6kZYAqViV␤Missing block␤at /tmp/e6kZYAqViV:1␤------> 3say (^10).rotor(3).map({.minmax7⏏5)}).perl␤ expecting any of:␤ statement end␤ statement modifier␤ statement mod…» [18:46] m: say (^10).rotor(3).map({.minmax}).perl [18:47] rakudo-moar 0f3f80: OUTPUT«(0, 1, 2, 3, 4, 5, 6, 7, 8)␤» [18:47] weird [18:47] m: say (^10).rotor(3).map({.minmax.WHAT}).perl [18:47] rakudo-moar 0f3f80: OUTPUT«(Range, Range, Range)␤» [18:48] who's flattening the ranges? [18:49] m: say (0..2, 3..5, 6..8).perl [18:49] rakudo-moar 0f3f80: OUTPUT«(0..2, 3..5, 6..8)␤» [18:49] m: say (^10).rotor(3).map({.WHAT}).perl [18:49] rakudo-moar 0f3f80: OUTPUT«(Parcel, Parcel, Parcel)␤» [18:49] m: say (^10).rotor(3).map({.perl}).perl [18:49] rakudo-moar 0f3f80: OUTPUT«("(0, 1, 2)", "(3, 4, 5)", "(6, 7, 8)")␤» [18:49] so the result of the ranges of minmax gets flattened again? [18:50] m: say (^10).rotor(3).map({^5}).perl [18:50] rakudo-moar 0f3f80: OUTPUT«(0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4)␤» [18:50] m: say (^3).map({^5}).perl [18:50] rakudo-moar 0f3f80: OUTPUT«(0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4)␤» [18:50] m: say (^3).map({(1, 2, 3)}).perl [18:50] rakudo-moar 0f3f80: OUTPUT«((1, 2, 3), (1, 2, 3), (1, 2, 3))␤» [18:50] tres weird [18:52] m: say (^3).map({(^5)}).perl [18:52] rakudo-moar 0f3f80: OUTPUT«(0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4)␤» [18:52] m: say (^3).map({(^5).item}).perl [18:52] rakudo-moar 0f3f80: OUTPUT«(0..^5, 0..^5, 0..^5)␤» [18:52] something is flattening there that shouldn't oughta [18:54] m: say {^5}().perl [18:54] rakudo-moar 0f3f80: OUTPUT«0..^5␤» [18:54] must be the map, I guess [18:59] <[Coke]> TimToady: It is both disconcerting and the opposite that you are trying to guess why this listy thing is working the way it does. [19:00] well, we're still mid-GLR here [19:01] m: say (1..5,42).list.perl [19:01] rakudo-moar 0f3f80: OUTPUT«(1, 2, 3, 4, 5, 42)␤» [19:01] .list is flattening ranges [19:01] I wonder what depends on that behavior... [19:03] * nwc10 awaits dalek with the "let's find out" commit... [19:04] hafta figger out where it's doing it, first...it's down in the nqp/vm level somewhere, I think [19:05] so, p6list or something? [19:05] which means nqp might be depending on it [19:05] as in, nqp::p6list? [19:05] do we even have ranges in nqp? [19:05] that's extops, no? [19:05] dunno, offhand [19:06] brane is runnin low on nutriments [19:06] there are no ranges in nqp [19:06] well, I still suspect that .list is badly overloaded to mean more than one thing here [19:09] Wow. I'm so looking forward to using Perl 6 for all my Perl needs [19:09] * arnsholt just fixed an absolutely ridiculous bug, due to having "my $id = @_" instead of "my ($id) = @_" [19:09] *** pauluu left [19:10] Bug didn't trigger for my test user locally, since that user had id=1... [19:10] eww [19:10] that's why all test users should have id=42 [19:11] Good point, good point [19:11] Lesson learned, I guess =) [19:11] *** berekuk joined [19:11] you might also use that module someone came up with that makes undef return random values so that it's *really* undefined [19:11] that's why Bool::True should numify to 42? :) [19:12] as long as 42 also numifies to 1, there's no problem :) [19:13] *** berekuk left [19:15] *** berekuk joined [19:17] *** berekuk left [19:19] Of course it does... in the correct base. [19:19] all those bases am not belong to us [19:20] all those base amn't belong to us # scans better [19:25] *** eli-se left [19:27] *** domidumont left [19:28] *** Foxcool left [19:33] *** ash__ left [19:42] *** mohij joined [19:49] more modes for opening files, v2: https://github.com/rakudo/rakudo/pull/426 [19:53] *** rurban joined [19:54] *** dnmfarrell left [20:08] cygx++ [20:09] *** grondilu left [20:11] *** laouji joined [20:14] cygx: What's the distinction between $mode and $llmode? Why have both? [20:15] *** laouji left [20:17] PerlJam: in my branch, the argument to nqp::open corresponds to POSIX O_* flags, so translation from user-visible flags is necessary [20:17] PerlJam: I let the multi-dispatcher handle that instead of putting a given or a hash inside the method [20:18] PerlJam: that's why that open is a private method as its signature is an implementation detal [20:18] *detail [20:18] cygx: sure, but why do you need to pass both to !open() ? It really only uses $llmode. (what it uses $mode for looks like it could glean from $llmode) [20:18] *** colomon left [20:20] PerlJam: if I omit either of the mode arguments, there's no way around implementing another lookup mechanism [20:20] *** rurban left [20:24] cygx: in your modified version of !open, $mode is *only* used if $path eq '-' from what I can tell. It seems like you can get the same information from $llmode for that purpose and do away with $mode entirely. [20:28] *** darutoko left [20:28] PerlJam: it's also part of the error message of the `$!path eq '-'` branch in guise of $_ [20:29] so you either have to live with a worse error message, or implement a new lookup mechanism just for that single case [20:30] or make nqp::open() use Perl6y modes natively :) [20:31] PerlJam: but what, if for whatever reason, I wanted to open a file in mode -cax [20:34] *** colomon joined [20:38] m: if 0 -> $a { } else -> $b { say $b } [20:38] rakudo-moar 0f3f80: OUTPUT«0␤» [20:38] cygx: I guess you've struck a good balance then. [20:39] *** koo6 left [20:39] m: my $i = 0; if $i -> $a { } elsif $i++ -> $b { } else -> $c { say $c } [20:39] rakudo-moar 0f3f80: OUTPUT«0␤» [20:40] m: my $i = 0; if $i -> $a { } elsif Str -> $b { } else -> $c { say $c } [20:40] rakudo-moar 0f3f80: OUTPUT«(Str)␤» [20:40] nice [20:41] *** lizmat joined [20:42] * lizmat waves from Echt [20:43] <[Coke]> hio, lizmat [20:43] m: my x; repeat while $x < 10 { say $x++ } [20:43] rakudo-moar 0f3f80: OUTPUT«5===SORRY!5=== Error while compiling /tmp/AiP3__bMHg␤Malformed my (did you mean to declare a sigilless \x or $x?)␤at /tmp/AiP3__bMHg:1␤------> 3my x7⏏5; repeat while $x < 10 { say $x++ }␤» [20:43] m: my $#x; repeat while $x < 10 { say $x++ } [20:43] rakudo-moar 0f3f80: OUTPUT«5===SORRY!5=== Error while compiling /tmp/WSSIYzXJuB␤Unsupported use of $#variable; in Perl 6 please use @variable.end␤at /tmp/WSSIYzXJuB:1␤------> 3my $#7⏏5x; repeat while $x < 10 { say $x++ }␤» [20:43] m: my $x; repeat while $x < 10 { say $x++ } [20:43] rakudo-moar 0f3f80: OUTPUT«0␤1␤2␤3␤4␤5␤6␤7␤8␤9␤» [20:43] hi lizmat [20:43] PerlJam: well, the argument boils down to whether nqp::open should follow Perl6 (which in turn loosely follows C11 under my implementation), or POSIX (which is how its implemented in MoarVM and curiously enough the JVM as well) [20:43] m: sub foo ( Int ) returns Int returns Int { 1 } [20:43] rakudo-moar 0f3f80: OUTPUT«Code object coerced to string (please use .gist or .perl to do that) at src/Perl6/World.nqp line 2438 in any ex-handle at src/Perl6/World.nqp:3481␤␤Unhandled exception: No exception handler located for warn␤ at :1 (/home/camelia/rakudo-i…» [20:44] FROGGS [Coke] o/ [20:44] *** eli-se joined [20:45] m: repeat while my $x < 10 { say $x++ } [20:45] rakudo-moar 0f3f80: OUTPUT«0␤1␤2␤3␤4␤5␤6␤7␤8␤9␤» [20:45] FROGGS: I'd write it ^^ [20:45] that's one of the main reasons we allow the conditional at the front, despite testing it at the end [20:46] * PerlJam isn't sure why ... [20:47] m: my $i = 0; if $i -> $a { } elsif Str -> $b { } else -> $c { say $c } [20:47] rakudo-moar 0f3f80: OUTPUT«(Str)␤» [20:47] says (Str) [20:48] TimToady: yes yes... I'm just testing things :o) [20:48] nod [20:48] I need an inspiration to do something today [20:48] though, not much time left [20:51] *** yqt joined [20:52] rakudo/nom: 8e8936b | coke++ | t/spectest.data: [20:52] rakudo/nom: run fudged test [20:52] rakudo/nom: review: https://github.com/rakudo/rakudo/commit/8e8936bb97 [20:54] else has the thing that failed the previous if test. [20:55] zengargoyle: yeah, re-reading S04 now [20:55] i think i remember reading it somewhere and it making sense.. :) [20:55] It's a nuance I hadn't had a care to ever use or think about. [21:02] *** cygx_ joined [21:03] *** cognominal joined [21:03] *** Gruber joined [21:04] *** rivarun joined [21:05] *** sjn__ joined [21:05] *** moritz_ joined [21:05] *** Pauekn_ joined [21:05] *** pmichaud_ joined [21:05] *** betterworld joined [21:05] *** krunen_ joined [21:07] *** petercom1and joined [21:08] *** Hor|zon_ joined [21:09] *** cygx left [21:09] *** Hor|zon left [21:09] *** betterwo1ld left [21:09] *** muraiki left [21:09] *** RabidGravy left [21:09] *** |Tux| left [21:09] m: my $p = start { sleep 1; say $*SET; }; my $*SET = 5; await $p; [21:09] rakudo-moar 0f3f80: OUTPUT«===SORRY!===␤Dynamic variable $*SET not found␤» [21:09] m: my $p = start { sleep 1; say $*SET; }; our $*SET = 5; await $p; [21:09] rakudo-moar 0f3f80: OUTPUT«===SORRY!===␤Dynamic variable $*SET not found␤» [21:09] *** cygx_ is now known as cygx [21:10] *** RabidGravy joined [21:10] *** |Tux| joined [21:10] *** tictac joined [21:11] *** muraiki joined [21:12] *** kaare_ left [21:14] anyone have an example of something similar to doing the perl6 equivalent to js' closures with a start block? i'm having trouble getting multiple start blocks to have the correct context with some variables .. [21:15] *** colomon left [21:19] *** raiph left [21:20] m: my $p = start { sleep 1; say $SET; }; our $SET = 5; await $p; [21:20] rakudo-moar 0f3f80: OUTPUT«5===SORRY!5=== Error while compiling /tmp/IVilJhORo2␤Variable '$SET' is not declared␤at /tmp/IVilJhORo2:1␤------> 3my $p = start { sleep 1; say 7⏏5$SET; }; our $SET = 5; await $p;␤» [21:23] *** skids left [21:26] tony-o, I may be missing the point entirely bit isn't it just move the definition of the $SET before the start? [21:26] *** Peter_R joined [21:27] perl6-examples: 013b0fc | paultcochrane++ | categories/cookbook/09directories/09-0 (5 files): [21:27] perl6-examples: [cookbook] Correct minor whitespace issues [21:27] perl6-examples: review: https://github.com/perl6/perl6-examples/commit/013b0fca1f [21:27] perl6-examples: e290958 | paultcochrane++ | categories/cookbook/10subroutines/10-01arguments.pl: [21:27] perl6-examples: [cookbook] loop over sorted hash keys for output consistency [21:27] perl6-examples: review: https://github.com/perl6/perl6-examples/commit/e290958745 [21:27] perl6-examples: df763c1 | paultcochrane++ | categories/cookbook/10subroutines/10-01arguments.pl: [21:27] perl6-examples: [cookbook] replace tabbed output with spaces [21:27] perl6-examples: review: https://github.com/perl6/perl6-examples/commit/df763c181e [21:27] perl6-examples: 15e77c3 | paultcochrane++ | t/categories/cookbook/10subroutines.t: [21:27] perl6-examples: [cookbook] add test for 10subroutine subcategory [21:27] perl6-examples: review: https://github.com/perl6/perl6-examples/commit/15e77c3e3c [21:27] perl6-examples: 01c837a | paultcochrane++ | categories/ (2 files): [21:27] perl6-examples: Merge branch 'master' of github.com:perl6/perl6-examples [21:27] perl6-examples: review: https://github.com/perl6/perl6-examples/commit/01c837ae2b [21:27] *** PZt joined [21:28] m: my $p = start { sleep 1; say $OUTER::SET; }; our $SET = 5; await $p; [21:28] rakudo-moar 8e8936: OUTPUT«5␤» [21:28] i could do that too, the problem is i don't know exactly what's going to be happeningi n the start block [21:31] tony-o_: you want multiple start blocks to share a single closed over variable? [21:32] it sounds that way, i'll show you my actual code: https://github.com/tony-o/perl6-green/blob/reclass/lib/Green.pm6#L84 [21:33] tony-o_: what about multiple threads messing with shared state, though? [21:33] here is the test file for that - https://github.com/tony-o/perl6-green/blob/reclass/t/05-test-right-sets.t#L8 [21:33] that sounds iffy [21:34] it ought to find the $*SET in the lexpad anyway [21:34] with the dyn vars i get 'Any' for $*SET after the first call [21:35] so it finds it but it's always undefined on subsequent calls [21:35] *** colomon joined [21:35] maybe cached it too early [21:37] what does that mean? [21:38] the thread keeps an old dynamic scope around that looked up the dynvar too early, so has cached a value of Any [21:38] m: my $*SET = 5; start { sleep .25; say $*SET; }; sleep 1; [21:38] rakudo-moar 8e8936: ( no output ) [21:40] m: my $*SET = 5; await start { sleep .25; say $*SET; }; [21:40] rakudo-moar 8e8936: OUTPUT«===SORRY!===␤Dynamic variable $*SET not found␤» [21:40] hmm, that doesn't fit my theory :) [21:41] m: my $*SET = 5; { await start { sleep .25; say $*SET; }; } [21:41] rakudo-moar 8e8936: OUTPUT«===SORRY!===␤Dynamic variable $*SET not found␤» [21:42] maybe it's breaking the chain of callers somehow [21:42] *** colomon left [21:42] the caller is definitely different with the start block than without [21:42] *** dolmen joined [21:43] m: my $x = 5; await start { sleep .1; say $OUTER::x; }; [21:43] rakudo-moar 8e8936: OUTPUT«5␤» [21:43] m: my $x = 5; { await start { sleep .1; say $OUTER::x; }; }; [21:43] rakudo-moar 8e8936: OUTPUT«(Any)␤» [21:43] hm [21:43] use OUTERS there [21:43] m: my $x = 5; await start { sleep .1; say $OUTERS::x; }; [21:43] rakudo-moar 8e8936: OUTPUT«5␤» [21:44] m: my $*SET = 5; await start { sleep .25; say CALLERS::<$*SET>; }; [21:44] rakudo-moar 8e8936: OUTPUT«(Any)␤» [21:44] "there it was, gone completely" [21:45] m: sub t { say CALLERS::.hash; }; await start { sleep .25; t; }; t; [21:45] rakudo-moar 8e8936: OUTPUT«PseudoStash.new("\$*DISPATCHER" => Mu, "\$_" => Mu)␤PseudoStash.new("!UNIT_MARKER" => Mu, "\$!" => Mu, "\$/" => Mu, "\$=pod" => Mu, "\$?PACKAGE" => Mu, "\$_" => Mu, "\&t" => Mu, "::?PACKAGE" => Mu, "\@?INC" => Mu, :EXPORT(Mu), :GLOBALish(Mu))␤» [21:45] m: sub t { say OUTERS::.hash; }; await start { sleep .25; t; }; t; [21:45] rakudo-moar 8e8936: OUTPUT«PseudoStash.new("!UNIT_MARKER" => Mu, "\$!" => Mu, "\$/" => Mu, "\$=pod" => Mu, "\$?PACKAGE" => Mu, "\$_" => Mu, "\&t" => Mu, "::?PACKAGE" => Mu, "\@?INC" => Mu, :EXPORT(Mu), :GLOBALish(Mu))␤PseudoStash.new("!UNIT_MARKER" => Mu, "\$!" => Mu, "\$/" => Mu,…» [21:45] m: my $*SET = 5; await start { sleep .25; say OUTER::<$*SET>; }; [21:45] rakudo-moar 8e8936: OUTPUT«5␤» [21:46] m: my $*SET = 5; sub t { say OUTER::<$*SET>; }; await start { sleep .25; t; }; t; [21:46] rakudo-moar 8e8936: OUTPUT«5␤5␤» [21:46] m: my $*SET = 5; sub t { say OUTERS::<$*SET>; }; await start { sleep .25; t; }; t; [21:47] rakudo-moar 8e8936: OUTPUT«5␤5␤» [21:47] yeah, something broke in the call chain, seems [21:47] or something is marked is_thunk that maybe shouldn't be [21:48] m: sub foo () { my $*SET = 5; await start { sleep .25; say $*SET; }; }; foo [21:48] rakudo-moar 8e8936: OUTPUT«===SORRY!===␤Dynamic variable $*SET not found␤» [21:48] glad i'm not crazy, i could've sworn i had it working that way like 6 months ago [21:49] seems like it oughta work to me [21:49] but then, I'm about to narcoleptic... [21:49] *to go [21:49] nap & # obviously overdue... [21:51] @tim-today.nap({ ... }) [21:51] grr [21:51] $tim-toady [21:51] messed up my own joke! [21:51] haha [21:52] hoelzro: i don't mind if the variable gets changed by whatever the sub does, if that's what you were getting at above [21:52] tony-o_: yes [21:57] I was playing with somthing like: [21:57] m: my $e = sub f($SET) { sleep 1; say $SET }; my $p = start $e.assuming(5); await $p; [21:57] rakudo-moar 8e8936: OUTPUT«5␤» [21:59] which is a way of avoiding the closure altogether [21:59] *** laouji joined [22:02] *** sjn__ is now known as sjn [22:02] *** airdisa joined [22:03] /W 4 [22:04] well, 'f' in that case would still be calling a sub that may or may not 'start' and i'd be in the same situation i think [22:04] *** laouji left [22:10] *** RabidGravy left [22:20] *** ben_m left [22:21] *** andreoss joined [22:25] *** airdisa left [22:27] perl6-examples: 8d42c4c | (Andrei Osipov)++ | categories/interpreters/lisp.pl: [22:27] perl6-examples: a typo [22:27] perl6-examples: review: https://github.com/perl6/perl6-examples/commit/8d42c4c097 [22:27] perl6-examples: 0100381 | (Andrei Osipov)++ | / (7 files): [22:27] perl6-examples: Merge branch 'master' of https://github.com/perl6/perl6-examples [22:27] perl6-examples: review: https://github.com/perl6/perl6-examples/commit/01003810ee [22:39] *** aborazmeh joined [22:39] *** aborazmeh left [22:39] *** aborazmeh joined [22:42] *** aborazmeh left [22:43] *** cygx left [22:44] *** aborazmeh joined [22:44] *** aborazmeh left [22:44] *** aborazmeh joined [22:45] *** egrep joined [22:51] .tell jnthn I got test failures attempting to panda install OO::Monitors, as of a fresh build Wednesday morning US/Pacific time. Known breakage? [22:51] japhb: I'll pass your message to jnthn. [22:52] m: my $a; -> $a is rw = $OUTER::a {}(); # why not? [22:52] rakudo-moar 8e8936: OUTPUT«5===SORRY!5=== Error while compiling /tmp/slmdD2N_hB␤Cannot use 'is rw' on an optional parameter␤at /tmp/slmdD2N_hB:1␤» [22:53] *** andreoss left [22:55] m: my $a = 5; (-> $a is rw = $OUTER::a { say $a; })(); [22:55] rakudo-moar 8e8936: OUTPUT«5===SORRY!5=== Error while compiling /tmp/cJzVUtGI1S␤Cannot use 'is rw' on an optional parameter␤at /tmp/cJzVUtGI1S:1␤» [22:55] m: my $a = 5; (sub ($a is rw = $OUTER::a) { say $a; })(); [22:55] rakudo-moar 8e8936: OUTPUT«5===SORRY!5=== Error while compiling /tmp/YmcYMIYbpR␤Cannot use 'is rw' on an optional parameter␤at /tmp/YmcYMIYbpR:1␤» [22:56] m: my $a = 5; (sub ($a = $OUTER::a) { say $a; })(); [22:56] rakudo-moar 8e8936: OUTPUT«Type check failed in binding $a; expected 'Any' but got 'Mu'␤ in sub at /tmp/NgppsUq090:1␤ in block at /tmp/NgppsUq090:1␤␤» [22:56] m: my $a = 5; { (sub ($a = $OUTER::a) { say $a; })(); }; [22:56] rakudo-moar 8e8936: OUTPUT«Type check failed in binding $a; expected 'Any' but got 'Mu'␤ in sub at /tmp/qCSPcd8309:1␤ in block at /tmp/qCSPcd8309:1␤␤» [22:57] Huh. I thought the repl used to kvetch if I tried to refer to an undeclared variable. [22:57] *** skids joined [22:57] *** yqt left [22:58] does turning on strict help? [22:58] tony-o_: was looking at https://rt.perl.org/Ticket/Display.html?id=78280 but it seems to be outdated maybe [22:58] jdv79: on a line by line basiss [22:59] I just wasted a bunch of time because of this. Is there a way to get the whole repl strict? [22:59] perl6 -M strict [22:59] m: my $ [22:59] rakudo-moar 8e8936: ( no output ) [22:59] Why doesn't that error? [22:59] nice [23:02] *** rindolf left [23:03] More idiomatic way to say: $a[ $a.elems .. 2 ] = 1 xx 3 - $a.elems [23:04] *** aborazmeh left [23:06] *** kurahaupo1 joined [23:07] $ is a valid anonymous variable, and I don't understand what you're trying to do with the range there [23:07] I will read up on anonymous variables! [23:07] I want to say: pad this list to size 3 with 1's. [23:07] ah [23:09] I think $a[ *+0 .. 2 ] = 1 xx * should work [23:10] m: my @a = 0; @a[ *+0 .. 2 ] = 1 xx *; say @a [23:10] rakudo-moar 8e8936: OUTPUT«0 1 1␤» [23:12] Man, that * shows up everywhere! :) [23:12] when we get shaped arrays, my @a[3] is default(1) might do it [23:12] if you don't actually care how big it is, but just want it to default that high [23:12] m: my @a is default(1) = 0; say @a[^3] [23:12] rakudo-moar 8e8936: OUTPUT«0␤» [23:13] hmm [23:13] m: my @a is default(1) = 0; say @a[0,1,2] [23:13] rakudo-moar 8e8936: OUTPUT«0 1 1␤» [23:13] I guess ranges autotruncate there [23:13] m: my @a is default(1) = 0; say @a[0..2] [23:13] rakudo-moar 8e8936: OUTPUT«0␤» [23:14] roast: 6c87a83 | (Justin DeVuyst)++ | S32-io/io-handle.t: [23:14] roast: Annotate test for RT #78454. [23:14] roast: review: https://github.com/perl6/roast/commit/6c87a83156 [23:14] Okay. [23:14] m: my @a is default(1) = 0; say @a[0 ...^ 3] [23:14] rakudo-moar 8e8936: OUTPUT«0 1 1␤» [23:14] Woah, what's that? [23:14] sequence operator [23:14] m: say 1,2,4 ...^ 256 [23:15] rakudo-moar 8e8936: OUTPUT«1 2 4 8 16 32 64 128␤» [23:15] I look forward to some kind of grammar actions that let me say "diagram this program for me." ;-) [23:15] well, that's kinda what ast output does... [23:16] Can I get that with --target or something? [23:16] trying! [23:17] Hm. I'm not ready to read this yet. :) [23:17] perl6-m --target=ast -e 'say 1,2,4 ...^ 256' [23:18] but yeah, it would be nice to be able to wave your mouse over an expression and say "explain this" [23:18] Yeah, I did that with a larger program. Looks useful, but it's all in terms I don't yet have much use for. [23:19] Right. Instead, I'm using #perl6 for that, and am very thankful for everyone's extreme forbearance. [23:19] the point is that the data is available to do this, so it's just a smop [23:19] Right! [23:19] *** kurahaupo1 left [23:19] unlike in p5 where it lies to itself continually [23:19] and the obfuscates it all [23:19] *then [23:19] I can say that since it's largely my fault :) [23:20] maybe a gnuplot renderer or something off the ast would be neat [23:20] masak++ would like an AST level higher than QAST for macros and such [23:20] Hm. I can't do this? [23:20] er, i mean graphviz i think [23:21] m: for (1,2,3,4,5).rotor(2, :partial) -> @a is default(0) { } [23:21] rakudo-moar 8e8936: OUTPUT«5===SORRY!5=== Error while compiling /tmp/VHTC2F19iQ␤Can't use unknown trait 'is default' in a parameter declaration.␤at /tmp/VHTC2F19iQ:1␤ expecting any of:␤ rw␤ readonly␤ copy␤ required␤ parcel␤…» [23:21] yeah, formal parameters aren't real arrays [23:22] so at best it could be used to constraint the actual binding to an array that had that set for a default already [23:23] defaults aren't that abstract [23:24] *** dolmen left [23:25] and binding is much more destructive than assignment (which is why it's faster) [23:26] * rjbs inches toward a solution. [23:26] m: for (1,2,3,4,5).rotor(2, :partial) -> @a { my @array is default(0) = @a; say @array[0,1] } [23:26] rakudo-moar 8e8936: OUTPUT«1 2␤3 4␤5 0␤» [23:26] I need to port my test suite over, tout suite. [23:26] TimToady: That's just what I did! [23:27] Ha! Was baffled by this code failing. Then I realized that I was using |= instead of +|= [23:27] m: for (1,2,3,4,5).rotor(2, :partial) -> $a, $b = 0 { say "$a $b" } [23:27] rakudo-moar 8e8936: OUTPUT«1 2 3 4␤5 0␤» [23:27] yes, bitops are demoted so we can have junctions [23:28] m: for (1,2,3,4,5).rotor(2, :partial) -> ($a, $b = 0) { say "$a $b" } [23:28] rakudo-moar 8e8936: OUTPUT«1 2␤3 4␤5 0␤» [23:28] TimToady: Yeah, I just missed it. I fixed most of them and missed that one. [23:28] https://gist.github.com/rjbs/8bdf1a710beec0f88e95 [23:28] that's better [23:28] ^-- that's the ported code, "all done." [23:28] m: class A; multi infix:<=>(A $, Str $) { 42 }; say A = "" # should this print 42? [23:28] rakudo-moar 8e8936: OUTPUT«Cannot modify an immutable A␤ in block at /tmp/mYH68jtxUb:1␤␤» [23:30] m: my buf8 $b; $b.push: 63..65; say $b [23:30] rakudo-moar 8e8936: OUTPUT«Cannot modify an immutable Buf[uint8]␤ in any at src/gen/m-Metamodel.nqp:1640␤ in block at /tmp/fDHiYFEMdi:1␤␤» [23:30] hmm, bufs are supposed to be mutable [23:30] Yeah, I complained about that yesterday. [23:30] *** mohij left [23:30] I think the answer I got was "bufs aren't arrays, use [+*]" [23:31] but they're supposed to be like arrays, and we have blobs to be immutable bufs [23:31] *** bayprogrammer_ is now known as bayprogrammer [23:32] if if it's immutable, why does the lvalue form work? [23:32] probably just missing a method push somewhere [23:32] I am exaggerating the answer I got, apparently: http://irclog.perlgeek.de/perl6/2015-05-13#i_10594007 [23:33] I can rakudobug it. [23:33] m: say buf8.can('push') [23:33] rakudo-moar 8e8936: OUTPUT«Method+{}.new␤» [23:33] m: say buf8.can('push')».WHY [23:33] rakudo-moar 8e8936: OUTPUT«(Any)␤» [23:34] m: say buf8.can('push')».WHAT [23:34] rakudo-moar 8e8936: OUTPUT«(Parcel)␤» [23:34] odd, you got a different error than I did, because I did this: [23:34] well, obviously inheriting Any.push, which is non-cooperative... [23:34] m: Buf.new(1,2,3).push(4) [23:34] rakudo-moar 8e8936: OUTPUT«Use of Nil in string context at src/gen/m-BOOTSTRAP.nqp line 2235␤Use of Nil in string context at src/gen/m-BOOTSTRAP.nqp line 2235␤Cannot call push(Buf: Int); none of these signatures match:␤ (Any:U \SELF: *@values, *%_)␤ in block at /t…» [23:34] so just NYI [23:34] Is that because 4 isn't a listy thing, and it ought to be? [23:34] Or is that just another head of the NYIdra? [23:36] *** kurahaupo joined [23:36] Oh, it's because yours was not defined... [23:36] I think. [23:37] *** molaf left [23:37] rakudobugged, moving on. [23:41] Can I declare type synonyms? [23:43] constant MyInt = Int; my MyInt $x = 35.5; [23:43] m: constant MyInt = Int; my MyInt $x = 35.5; [23:43] rakudo-moar 8e8936: OUTPUT«Type check failed in assignment to '$x'; expected 'Int' but got 'Rat'␤ in block at /tmp/cNScw8YjoV:1␤␤» [23:43] or... [23:43] m: subset MyInt of Int; my MyInt $x = 35.5; [23:43] rakudo-moar 8e8936: OUTPUT«Type check failed in assignment to '$x'; expected 'MyInt' but got 'Rat'␤ in block at /tmp/G64bVMJibt:1␤␤» [23:43] in this case it's just not a proper subset :) [23:43] Interesting. Thanks! [23:44] *** raiph joined [23:44] I keep forgetting which thingy is meant to be buf8 and which buf16. Hooray for type synonyms! [23:44] and constants are default lexically scoped? [23:44] I can test tha tmyself, nm. [23:47] constants and enums are our by default [23:47] Okay. [23:47] but you can say my constant [23:47] I may just do that! [23:48] We established the other day that in Buf[X], X has to be a native type. Is that "just now" or "forever"? [23:48] I suspect it's temporary, but jnthn would know more [23:49] Okay, not important atm anyway! [23:49] we do try to guarantee continguous memory, and that's sort of antithetical to pointer indirection [23:50] Str can be implemented as ropes, but Bufs aren't allowed to do that, on the theory that you want to pass them to/from external APIs [23:51] moarvm does ropes, doesn't it? I seem to recall nwc10 talking about working on ropes for it at some point. I was surprised. [23:51] What you say makes sense, for sure. [23:51] it does use ropes for some things currently, but isn't terriby smart about it yet [23:51] It's fun: the more I work on porting this code, the more it is clear how Perl 6 is very distinct from Perl 5. I already knew this, but I am getting to better bellyfeel it. [23:51] lots of places it gives up and flattens the ropes [23:52] well, we tried to fix everything, which is why it took so long :) [23:52] (and takes so long, sigh) [23:52] I, for one, have never resented the delay! [23:53] (I like to think I'm not the /only/ for one.) [23:53] :) [23:53] Can I parameterize the Hash type to declare a hash that must map from uint8 to Str? Better yet, Str.chars==1 ? [23:56] m: my Str %hash[uint8] = ^256 Z=> "\0" ... "\xff"; say %hash[65] [23:56] rakudo-moar 8e8936: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ahbr4F_Ewd␤Shaped variable declarations not yet implemented. Sorry. ␤at /tmp/ahbr4F_Ewd:1␤------> 3my Str %hash[uint8]7⏏5 = ^256 Z=> "\0" ... "\xff"; say %hash[6␤» [23:56] m: my Str %hash{uint8} = ^256 Z=> "\0" ... "\xff"; say %hash[65] [23:56] rakudo-moar 8e8936: OUTPUT«5===SORRY!5=== Error while compiling /tmp/FPJYVZ_0XE␤Operators 'Z=>' and '...' are non-associative and require parentheses␤at /tmp/FPJYVZ_0XE:1␤------> 3my Str %hash{uint8} = ^256 Z=> "\0"7⏏5 ... "\xff"; say %hash[65]␤ expecting any of…» [23:56] m: my Str %hash{uint8} = ^256 Z=> ("\0" ... "\xff"_; say %hash[65] [23:56] rakudo-moar 8e8936: OUTPUT«5===SORRY!5=== Error while compiling /tmp/mCsefICUuf␤Two terms in a row␤at /tmp/mCsefICUuf:1␤------> 3%hash{uint8} = ^256 Z=> ("\0" ... "\xff"7⏏5_; say %hash[65]␤ expecting any of:␤ infix␤ infix stopper␤ stat…» [23:56] m: my Str %hash{uint8} = ^256 Z=> ("\0" ... "\xff"); say %hash[65] [23:56] rakudo-moar 8e8936: OUTPUT«Type check failed in binding key; expected 'uint8' but got 'Int'␤ in block at /tmp/YFhCoo2Yqp:1␤␤» [23:56] aww [23:56] It's nice to see that you're still learning Perl 6 as well. ;-) [23:56] heh [23:56] m: my Str %hash{uint8()} = ^256 Z=> ("\0" ... "\xff"); say %hash[65] [23:56] rakudo-moar 8e8936: OUTPUT«Type check failed in binding key; expected 'uint8(Any)' but got 'Int'␤ in block at /tmp/RFvcOXZD7p:1␤␤» [23:56] and I htink you want to subset Str to get your chars==1 [23:57] Cool. But the idea is that you say: my VALUETYPE %hash{KEYTYPE} more or less? Cool. [23:57] m: my Str %hash{uint8}; %hash{^256} = "\0" ... "\xff"; say %hash[65] [23:57] rakudo-moar 8e8936: OUTPUT«Type check failed in binding key; expected 'uint8' but got 'Int'␤ in block at /tmp/D4MtGaErj2:1␤␤» [23:58] whaaa [23:58] m: my Str %hash{Int where * < 256}; %hash{^256} = "\0" ... "\xff"; say %hash[65] [23:58] rakudo-moar 8e8936: OUTPUT«5===SORRY!5=== Error while compiling /tmp/1xqOfELe8C␤Two terms in a row␤at /tmp/1xqOfELe8C:1␤------> 3my Str %hash{Int7⏏5 where * < 256}; %hash{^256} = "\0" ... ␤ expecting any of:␤ infix␤ infix stopper␤ stat…» [23:58] * geekosaur smells something vaguely NYI (or at least LTA) [23:59] m: subset Int8 of Int where * < 256; my Str %hash{Int8}; %hash{^256} = "\0" ... "\xff"; say %hash[65] [23:59] rakudo-moar 8e8936: OUTPUT«Index out of range. Is: 65, should be in 0..0␤ in block at /tmp/8qVLgsBHBA:1␤␤» [23:59] m: subset Int8 of Int where * < 256; my Str %hash{Int8}; %hash{^256} = "\0" ... "\xff"; say %hash{65} [23:59] rakudo-moar 8e8936: OUTPUT«A␤» [23:59] well, it's still a WIP [23:59] :)