[00:10] *** vendethiel left [00:12] oh right [00:12] tony-o: you might have more luck if you make it an "our" method [00:12] m: class Foo { our method foo ($foo) {say $foo} }; my $f = &Foo::foo; $f(Foo,123); [00:12] rakudo-moar 91d899: OUTPUT«123␤» [00:15] *** vendethiel joined [00:24] an "our" method is not really a method, it's just a subroutine in disguise [00:27] the problem with m:g and smartmatch is that m:g does not yet return a fake Match object [00:27] m: say (m:g/\w/.WHAT given "abcde") [00:27] rakudo-moar 91d899: OUTPUT«(List)␤» [00:27] m: say (m:g/\w/ given "abcde") [00:27] rakudo-moar 91d899: OUTPUT«「a」␤ 「b」␤ 「c」␤ 「d」␤ 「e」␤␤» [00:27] so use given for now, instead of ~~ [00:28] smls: ^^ [00:33] guess i'm changing this to a module then :-) [00:33] if you really want a method, you'd can as the MOP for the method reference using .can [00:33] but it won't be stored in a package [00:34] unlike in Perl 5 [00:34] i'm trying to pass an instance method as a reference [00:34] with or without its invocant? [00:34] with [00:35] the only way to do that is with $code.assuming($obj), where $code is what you get back from the MOP [00:36] but it probably means you just want to be using functions instead [00:37] well, okay, you can also just return a closure instead of using assuming [00:37] -> |args { $obj.method(|args) } or so [00:38] in that case the method lookup would be late bound [00:39] unlike looking up $code = $obj.can("method")[0], which is earlier bound [00:44] m: class c { method g() {'g'.say;} }; sub r($call) {'r'.say;$call();'/r'.say;}; r(c.new.can('g')[0]); [00:44] rakudo-moar 91d899: OUTPUT«r␤Too few positionals passed; expected 1 argument but got 0␤ in method g at /tmp/8sYbjHE0lJ:1␤ in sub r at /tmp/8sYbjHE0lJ:1␤ in block at /tmp/8sYbjHE0lJ:1␤␤» [00:44] m: class c { method g() {'g'.say;} }; sub r($call) {'r'.say;$call();'/r'.say;}; my $c = c.new; r($c.^can('g')[0]); [00:44] rakudo-moar 91d899: OUTPUT«r␤Too few positionals passed; expected 1 argument but got 0␤ in method g at /tmp/aB9zymykGC:1␤ in sub r at /tmp/aB9zymykGC:1␤ in block at /tmp/aB9zymykGC:1␤␤» [00:45] *** dayangkun joined [00:47] m: class c { method g() {'g'.say;} }; sub r($call) {'r'.say;$call();'/r'.say;}; my $c = c.new; r(-> |args { $c.g(|args); }); [00:47] rakudo-moar 91d899: OUTPUT«r␤g␤/r␤» [00:48] closure is probably easiest [00:48] *** smls left [00:48] thanks TimToady [00:48] *** Spot_ left [00:49] *** Spot__ joined [00:50] *** clkao left [00:50] *** ipa_blah joined [00:50] *** ggherdov left [00:51] m: class c { method g() {'g'.say;} }; sub r($call) {'r'.say;$call();'/r'.say;}; my $c = c.new; r(c.new.can('g')[0].assuming($c)); [00:51] rakudo-moar 91d899: OUTPUT«r␤g␤/r␤» [00:53] yeah. blocks are definitely the best way to pass 'lazy code' around. would macros be able to fix that [00:54] or course they could [00:54] of* [00:55] *** ggherdov joined [00:58] *** pmurias left [00:59] *** stapler joined [00:59] *** dayangkun left [00:59] hi! [00:59] *** vendethiel left [01:01] helo [01:01] tony-o: to do it the .can way, you also have to provide teh invocant with .assuming [01:06] *** vendethiel joined [01:12] *** ssqq joined [01:14] interesting [01:14] similar to the .apply in js [01:15] but more secure [01:25] I haven't been able to update my r-j build today (first time in ~a month), because it crashes attempting to install bootstrap panda. Is this known? [01:27] Also, is it expected that pl6anet.org is unstyled? [01:28] *** stapler left [01:29] *** stapler joined [01:32] *** ash___ joined [01:32] Hi guys [01:32] Can you explain the loop/winner construction for working with channels? [01:33] Namely, I am not sure about how this works: [01:33] $ch = Supplier.for(1..10).Channel; [01:33] *** bjz left [01:34] *** ssqq left [01:34] loop { winner $ch { more $ch -> $x {say "x=$x"} more $ch -> $y {say "y=$y"} done {...}}} [01:34] here, the two more keywords, do they state any kind of parallelism> [01:34] ? [01:41] japhb: if its the thread exception error im thinking of, then just keep trying [01:49] *** vendethiel left [01:51] ecosystem: 6a13a31 | tony-o++ | META.list: [01:51] ecosystem: Simple "REST"ful style router for http-async [01:51] ecosystem: review: https://github.com/perl6/ecosystem/commit/6a13a31843 [01:52] *** vendethiel joined [01:54] ash___: i don't think supplying the same argument to more twice makes sense [01:55] winner is about race-free-ly matching one of many channels/promises to give a result/value or finish [01:55] also, i think winner has been re-named to earliest recently? [01:56] http://perlcabal.org/syn/S17.html#Channels - maybe this explanation helps? [01:56] well, "specification" really [01:57] ugexe: Ewww. >.< [01:58] japhb: yeah, pl6anet.org was supposed to be a very short-term stop-gap solution [01:58] timotimo: Ah, I see. [02:01] Is there a more concise way to do the following? [02:01] m: my @a = (^6).pick(*); my $p = Promise.new; for ^4 { my @b = @a; start { repeat { @b .= pick(*) } until [<=] @b; $p.keep(@b) } }; say await $p; [02:01] rakudo-moar 91d899: OUTPUT«0 1 2 3 4 5␤» [02:01] Keeping it as a concurent bogosort, of course ;) [02:02] BenGoldberg: can you try to turn the @b + @b .= pick(*) ... [<=] @b into a sequence? [02:02] (because fsck memory usage, am i rite) [02:02] i had to look up bogosort to figure out why you'd do something that way [02:03] :D [02:03] that should be a module..lol [02:04] *** dayangkun joined [02:06] m: my @s := [(^5).pick(*)], [$_.pick(*)] ... [<=] @$_; say @s[0]; say @s[1]; [02:06] rakudo-moar 91d899: OUTPUT«2 0 1 3 4␤Nil␤» [02:07] *** ipa_blah is now known as clkao [02:11] m: my @s := [(^5).pick(*)], [(@$_).pick(*)] ... [<=] @$_; say @s[0]; say @s[1]; [02:11] rakudo-moar 91d899: OUTPUT«1 2 4 0 3␤Nil␤» [02:12] m: my @s := [(^5).pick(*)], [(@$_).pick(*)] ... { [<=] @$^a }; say @s[0]; say @s[1]; [02:12] rakudo-moar 91d899: OUTPUT«3 0 2 4 1␤␤» [02:12] i wonder if it flattens the individual arrays before applying the endpoint check [02:13] m: my @s := [(^5).pick(*)], [(@$_).pick(*)] ... { say "checking $^a.perl()" }; say @s[0]; say @s[1]; [02:13] rakudo-moar 91d899: OUTPUT«checking [4, 1, 3, 0, 2]␤4 1 3 0 2␤Nil␤» [02:13] m: say [<=] @$_ given [4, 1, 3, 0, 2] [02:13] rakudo-moar 91d899: OUTPUT«False␤» [02:14] oh, wait [02:14] we'd have to reverse that, no? [02:14] hm, no, we wouldn't [02:15] ah [02:16] it probably doesn't build the code properly [02:16] m: my @s := [(^5).pick(*)], { [(@$^a).pick(*)] } ... { [<=] @$^a }; say @s[0]; say @s[1]; [02:16] rakudo-moar 91d899: OUTPUT«0 1 4 3 2␤3 2 1 0 4␤» [02:16] m: my @s := [(^5).pick(*)], { [(@$^a).pick(*)] } ... { [<=] @$^a }; say @s[0]; say @s[*-1] [02:17] rakudo-moar 91d899: OUTPUT«2 3 4 0 1␤0 1 2 3 4␤» [02:17] m: my @a = ^6.pick(*); my $p = Promise.new; for ^4 {start {$p.keep((@:=$@a, *.pick(*) ... {[<=] $^a})[*-1])}}; say await $p; [02:17] rakudo-moar 91d899: OUTPUT«0 1 2 3 4 5␤␤eption in code scheduled on thread 139789340813056» [02:17] ^^ Either produces the right answer in parallel, or a thread exception, or both. In the above case, both. :-( [02:18] is the thread-exception thing a known issue with moar? [02:18] i've been getting it a lot .. [02:18] now that i'm no longer working in serials [02:18] I dunno. It really shouldn't be, but something is clearly wrong. [02:19] well, jnthn has said often enough that the parallel stuff hasn't had enough time to harden yet [02:19] what happened to diakopter and moar? [02:19] diakopter is deep in no-free-hacking-'time land [02:20] is moar still being developed? [02:21] tony-o: Oh definitely. jnthn is the founder and still active (just not today). There are a number of other contributors as well. [02:22] ahh, i thought diakopter started that project, he recruited me into the 5 lines i commited to it :p [02:22] I believe he was #2 or #3. [02:24] *** jimmy_ joined [02:26] *** dayangkun left [02:26] <[Coke]> japhb: that prints out 0 1 2 3 4 5 locally. [02:27] <[Coke]> This is perl6 version 2014.11-46-g62c092f built on MoarVM version 2014.11-59-g25a4405 ( OS X) [02:27] <[Coke]> doing a fresh rebuild to check... [02:35] [Coke]: If you re-run it a few times, do you always get the same (correct) result? [02:36] *** vendethiel left [02:40] <[Coke]> japhb: fresh build, same thing. [02:41] <[Coke]> while [ 1 ] ; do perl6 foo.p6 ; done # gets me a page full of the same results. [02:41] <[Coke]> ProductName: Mac OS X [02:41] <[Coke]> ProductVersion: 10.9.5 [02:43] <[Coke]> IWBNI panda said "please wait, panda-ing" during a rebootstrap instead of vanishing. [02:44] * [Coke] is bummed that X 1..13 doesn't work anymore. [02:59] tony-o: i'm among the people who work on moar, though my contributions are very rarely features, mostly little tweaks and attempts to improve performance [03:03] [Coke]: No, I meant, just rerun it over and over (up-arrow, enter :-) [03:03] <[Coke]> japhb: ... my way is more efficient. no, same result. :P [03:03] [Coke]: Oh, sorry, didn't see the line where you while-1'ed. [03:04] In any case, I guess I should be happy it's rock solid on *some* OS. Clearly not on whatever camelia is running on at the moment, [03:05] s:2nd/,/./ [03:05] <[Coke]> wierd that it's OS X, though. :) [03:05] *** KCL_ joined [03:07] * japhb is working his way through reading the source for all concurrency classes in Rakudo to get a handle on how to start testing the underlying nqp::ops. [03:07] *** Mso150 joined [03:10] * [Coke] commits some stuff to https://github.com/coke/poker, which he hasn't done in ages. whee. [03:22] *** noganex joined [03:26] *** noganex_ left [03:34] *** onebitboy joined [03:50] *** dayangkun joined [03:50] *** dayangkun left [03:51] *** erkan joined [03:51] *** erkan left [03:51] *** erkan joined [03:51] *** Mso150 left [03:56] you guys seem alive an kicking for the most part [03:58] *** immortal joined [03:58] *** immortal left [03:58] *** immortal joined [04:00] *** erkan left [04:04] *** erkan joined [04:05] *** stapler left [04:06] *** immortal left [04:21] *** sorear left [04:24] *** sorear joined [04:36] *** adu joined [05:01] *** mr-fooba_ left [05:02] *** BenGoldberg left [05:04] *** araujo left [05:11] *** kaare_ joined [05:22] *** Possum left [05:24] *** araujo joined [05:34] *** onebitboy left [05:35] *** onebitboy joined [05:36] *** jimmy_ left [05:38] *** onebitboy left [05:39] *** onebitboy joined [05:43] *** onebitboy left [05:44] *** onebitboy joined [06:02] *** telex left [06:04] *** telex joined [06:06] *** [Sno] left [06:14] *** dayangkun joined [06:27] *** jimmy_ joined [06:27] *** dayangkun left [06:42] *** kaleem joined [06:44] *** Possum joined [06:50] *** rindolf joined [06:54] *** araujo left [06:55] *** Possum left [06:57] *** Possum joined [07:00] was livelier before the sun wandered out over the Pacific... [07:00] *** anaeem1 joined [07:00] we need some minions in Hawaii :) [07:00] *** anaeem1 left [07:01] *** anaeem1_ joined [07:04] *** V_S_C joined [07:08] *** [Sno] joined [07:11] the minions in Perl just woke up [07:12] I see Perl houses [07:13] (the other Perl people are still asleep, apparently :-) [07:16] *** sqirrel_ joined [07:21] *** Possum left [07:21] *** FROGGS joined [07:26] *** rindolf left [07:30] *** V_S_C left [07:30] *** oetiker_ is now known as oetiker [07:31] *** oetiker left [07:31] *** oetiker joined [07:33] *** chenryn joined [07:46] *** zakharyas joined [07:52] *** sqirrel_ left [07:57] *** adu left [07:59] *** Isp-sec joined [08:00] *** Possum joined [08:03] *** ribasushi left [08:06] *** ribasushi joined [08:07] *** virtualsue joined [08:11] *** cibs left [08:11] *** cibs joined [08:11] *** zakharyas1 joined [08:13] *** zakharyas left [08:18] *** darutoko joined [08:25] *** krunen joined [08:30] *** araujo joined [08:35] *** kurahaupo left [08:36] *** sqirrel_ joined [08:39] *** onebitboy left [08:42] *** onebitboy joined [08:46] *** KCL joined [08:48] morning o/ [08:48] \o [08:49] *** immortal joined [08:49] *** vendethiel joined [08:49] *** KCL_ left [08:51] *** erkan left [08:54] *** Mso150 joined [08:58] *** mathw_ is now known as mathw [08:58] rakudo/newio: 6e8aaa2 | (Elizabeth Mattijsen)++ | src/core/ (2 files): [08:58] rakudo/newio: Fix some spurt() related spectest glitches [08:58] rakudo/newio: review: https://github.com/rakudo/rakudo/commit/6e8aaa2272 [08:58] o/ [09:00] *** molaf_ joined [09:02] *** molaf left [09:12] *** vendethiel left [09:14] *** dddddd joined [09:14] *** ssqq joined [09:15] *** mvuets joined [09:15] nqp: 6bde551 | TimToady++ | src/ (4 files): [09:15] nqp: reduce NFAs 40% by removing 2/3 of epsilons [09:15] nqp: [09:15] nqp: Edges that point to simple epsilon states can instead point to whatever [09:15] nqp: the epsilon points to (transitively). Identical fates can be similarly [09:15] nqp: merged. Once the useless states are delinked, we resequence the states [09:15] nqp: and associated edges, removing any states that no longer have any [09:15] nqp: reference, and remapping the state pointers. [09:15] nqp: [09:15] nqp: Also fixed a bug in quant that can produce states with no edges when quant [09:15] nqp: is called with a 'to' of -1. [09:15] nqp: [09:15] nqp: Also installed a whole lot of debugging code to figure all this out. [09:15] nqp: [09:15] nqp: Also added tests for epsilons pointing to 0 on parrot and jvm (moar already [09:15] nqp: has this check). Should become unnecessary once nqp is rebootstrapped, but [09:15] nqp: the stage 0 NFAs have the edgeless state bug that triggers this. [09:15] nqp: review: https://github.com/perl6/nqp/commit/6bde5518b0 [09:15] nqp: 70056d5 | TimToady++ | tools/build/MOAR_REVISION: [09:15] nqp: bump moar [09:15] nqp: review: https://github.com/perl6/nqp/commit/70056d592c [09:17] \o TimToady++ [09:17] TimToady++ indeed! [09:17] commute to Amsterdam& [09:17] *** lizmat left [09:21] *** woolfy left [09:23] *** salv0 left [09:24] there is, apparently, still some subtle bug causing t/spec/integration/99problems-41-to-50.t to fail, but that's the only failure that seems related [09:24] *** gtodd left [09:24] TimToady: dentout's arg looks like unused? [09:25] it returns it [09:26] *** gtodd joined [09:26] so we can unindent after whatever the final statement is [09:32] rakudo/nom: 03d1599 | TimToady++ | tools/build/NQP_REVISION: [09:32] rakudo/nom: bump nqp [09:32] rakudo/nom: review: https://github.com/rakudo/rakudo/commit/03d15991f3 [09:33] it's vaguely possible that the parsing bug that is biting 99problems-41-to-50.t will also affect something downstream, but hopefully not [09:34] it seems to involve a 0 state transition from a non-epsilon somehow, but I'll look at that tomorrow [09:34] TimToady++ [09:34] stage parse: 30s [09:34] TimToady++ [09:36] uh, are you using nqp/master? or did you wait for the bump? [09:36] *** sqirrel_ left [09:36] nqp/master [09:36] and moar/master [09:36] what was yours before? [09:37] good *, * [09:37] * nwc10 did wonder that [09:37] this shouldn't really speed up the parser by more than a few percent [09:37] TimToady: no idea; it's also been a while since I last looked at the build time on this machine [09:37] given the nfa was only 10% of the parser before this [09:38] also, compiling grammars has more overhead, but they run faster once they're compiled, so parsing a parser is a bit of a wash [09:39] should also help any regex that uses nfa [09:40] *** virtualsue left [09:40] *** salv0 joined [09:44] *** dakkar joined [09:44] and startup should be a bit faster too [09:44] since the optimization is applied before serialization [09:45] *** vendethiel joined [09:46] didn't see a faster startup, I think that's because coresetting init spents too much time [09:52] *** Ugator joined [09:55] *** abraxxa joined [10:03] this is bizarre, when I checked out rakudo on a different machine and configed it, it says it pulled in 650333f for MoarVM, just as the tag is, but it's missing the patch that showed up in #moarvm a couple hours ago [10:04] how can two different versions have the same hash? [10:05] *** yoleaux left [10:05] my nqp and moar are both on branch master, and the bumps both looks right [10:06] lemme try downloading again [10:06] *** Isp-sec left [10:06] *** fhelmberger joined [10:08] *** vendethiel left [10:13] *** pecastro joined [10:15] fresh clone seems to have fixed it somehow [10:19] which file define token ** in the nqp repo? [10:20] TimToady++ # 6bde551 [10:20] and jvm only fails the same 99problems test on my laptop, so I think I'll go to bed and let my other machine crank on all the spectests while I sleep [10:21] *** vendethiel joined [10:21] zzz & [10:23] sleep wall [10:23] err, well [10:23] with a will [10:24] *** ssqq_ joined [10:27] *** bjz joined [10:27] *** ssqq left [10:33] *** jimmy_ left [10:37] *** virtualsue joined [10:42] *** pecastro left [10:42] *** mvuets left [10:43] *** virtualsue left [10:43] *** vendethiel left [10:44] *** denis_boyun_ joined [10:52] could I get an invite for the advent calendar? Wordpress username is 'matteoates' [10:53] *** virtualsue joined [10:55] also whatever changes have happened in the last couple of days ++ 23% speed up on my bioinformatics stuff [10:55] :) [11:00] mebbe TimToady++'s NFA work, if you're parse-heavy... [11:02] actually I haven't run the parsing test but I noticed yesterday that was fast enough that I couldn't notice it doing it on a reasonable sized file when it used to take a while [11:02] this is mostly splitting strings into lists and back again [11:03] *** Mso150 left [11:06] *** pecastro joined [11:08] *** chenryn left [11:11] *** vendethiel joined [11:12] out of interest what memory usage should I expect from rakudo on moarvm just for hello world? [11:16] up to 200M, I think? [11:16] just guessing :) [11:18] ~132MB for me here [11:22] here it seems to be below 100, freshly built [11:22] how are you measuring it though? [11:34] *** vendethiel left [11:36] *** Possum left [11:37] *** chenryn joined [11:44] *** mvuets joined [11:48] *** mr-foobar joined [11:51] *** Akagi201_ left [11:53] *** ssqq_ left [11:54] *** Possum joined [11:54] memusg which basically calls ps over and over [11:55] *** kurahaupo joined [11:55] so has a bias for longer running jobs, like it says ruby and perl use about 1KB to do hello world which feels too small [11:56] $ /usr/bin/time ./perl6-m -e '' [11:56] 0.20user 0.02system 0:00.23elapsed 99%CPU (0avgtext+0avgdata 94612maxresident)k [11:56] so about 100M max RSS [11:56] *** Alina-malina left [11:57] though I guess the virtual memory size might be more interesting [11:57] *** Alina-malina joined [11:57] *** ssqq_ joined [11:59] *** kaleem left [12:01] *** ssqq joined [12:06] *** jferrero joined [12:12] *** smls joined [12:13] m: say +"aa\nbb\n".comb(/^^/); say +"aa\nbb\ncc".comb(/^^/); [12:13] rakudo-moar 91d899: OUTPUT«2␤3␤» [12:13] ^ Why does it not match the final newline in the first case? [12:16] *** rindolf joined [12:18] smls: Because you asked it to match the beginning of lines, and no line begins there? [12:18] *** mr-fooba_ joined [12:18] does an empty line not have a beginning? :) [12:20] *** mr-foobar left [12:23] *** mr-fooba_ left [12:24] *** prevost joined [12:29] *** psch joined [12:29] hi #perl6 [12:29] S05:804 # smls, as reference [12:29] Link: http://perlcabal.org/syn/S05.html#line_804 [12:30] no idea if it would make more sense to have line-beginning at the end of a line that ends with "\n", but it's been thought about apparently [12:30] s/end of a line/end of a string/ [12:30] ok, thanks [12:31] *** ssqq left [12:32] my core setting moarvm file is still 13 mb, i wonder how much of that is serialized NFA [12:37] *** kurahaupo left [12:37] smls: there was oodles of thought given to what empty strings you might get back from comb. I don't remember all the rules, alas. [12:38] yeah come to think of it, the way it works probably does DWIM for most use-cases of ^^ [12:39] in my case I'll just use (1 + .comb(/\n/)) [12:39] *** sven_123 left [12:39] *** sven_123 joined [12:40] *** ssqq joined [12:43] *** rindolf left [12:43] *** ssqq_ left [12:45] *** chenryn left [12:48] m: say "aa\nbb\n".comb(/^^/); say "aa\nbb\ncc".comb(/^^/); [12:48] rakudo-moar 91d899: OUTPUT« ␤ ␤» [12:49] *** virtualsue left [13:21] *** mephinet- left [13:21] *** mephinet- joined [13:21] *** mephinet- left [13:21] *** mephinet- joined [13:21] *** mephinet- is now known as mephinet [13:26] timotimo: It's your Perl6/Grammar.nqp that shoulda shrunk for the most part [13:27] ah, of course [13:28] 3.1 megabytes. i wonder how big it was before [13:28] *** kaleem joined [13:31] timotimo: i have a Perl6/Grammar.moarvm from a few days ago with 5.5MB here [13:31] the "rougly 40%" seems to be a decent estimate [13:33] *** dayangkun joined [13:34] cool [13:34] is there any command line parsing for NQP other than src/HLL/CommandLine.nqp ? [13:34] and if so, is there any way to use it other than tools/build/gen-cat.pl? [13:34] why am I asking - because I would like to write a build tool *in* NQP [13:35] *** ash___ left [13:37] *** prevost left [13:39] *** dayangkun left [13:43] i don't think there's anything but src/HLL/CommandLine.nqp, but it's also used in HLL/Compiler.nqp which hands the Result to the process, iirc [13:44] *** mr-foobar joined [13:45] * psch still finds bootstrapping compiler somewhat magical [13:47] Bootstrapping compiler finds itself somewhat magical... :) [13:47] I'm discovering enough magic in making a non-bootstrapping compiler [13:48] :-) [13:50] To get all functions to be class instances I'll probably cheat a bit, at least for the initial iteration [13:53] m: note "foo"; sub note ($msg) { CORE::note("Info: $msg") } [13:53] rakudo-moar 91d899: OUTPUT«Cannot find method 'Any'␤ in sub note at /tmp/WdJJaTCqov:1␤ in block at /tmp/WdJJaTCqov:1␤␤» [13:53] ^ Is something like that possible? [13:53] Oh come to think of it, the spec actually allows for some cheating, with the separation between built-in and user-defined functions [13:53] Yaaay \o/ [13:54] smls: delayed declaration? or overwriting builtins? [13:54] wrapping built-ins [13:54] e.g. add ANSI color codes to all warn/note messages [13:54] m: my ¬e = ¬e.assuming("Info: " ~ *); note("test") [13:54] m: say &SETTING::note [13:54] rakudo-moar 91d899: OUTPUT«No such method 'assuming' for invocant of type 'Callable'␤ in block at /tmp/2TdHeYzyXt:1␤␤» [13:54] rakudo-moar 91d899: OUTPUT«(Any)␤» [13:54] that's the beauty of the built-ins just being in an outer scope [13:55] m: say SETTING::note [13:55] rakudo-moar 91d899: OUTPUT«(Any)␤» [13:55] m: say CORE::<¬e> [13:55] rakudo-moar 91d899: OUTPUT«sub note (Any |) { #`(Sub|69342656) ... }␤» [13:55] ah [13:55] it's not a package [13:55] i wonder if it's sensible to &assuming with a WhateverCode. probably not... [13:56] m: my ¬e = -> { note("Info: " ~ $^a) }; note("test") [13:56] rakudo-moar 91d899: OUTPUT«===SORRY!=== Error while compiling /tmp/2QNg0AET_Y␤Placeholder variable '$^a' cannot override existing signature␤at /tmp/2QNg0AET_Y:1␤------> my ¬e = -> { note("Info: " ~ $^a) }⏏; note("test")␤ expecting…» [13:57] oh, right [13:57] m: my ¬e = { note("Info: " ~ $^a) }; note("test") [13:57] rakudo-moar 91d899: OUTPUT«Memory allocation failed; could not allocate 1583080 bytes␤» [13:57] :\ [13:57] m: { my ¬e = { &CORE::("Info: " ~ $^a) }; note("test") } [13:57] rakudo-moar 91d899: OUTPUT«===SORRY!=== Error while compiling /tmp/4TMEoZ0ppT␤Undeclared routine:␤ &CORE used at line 1␤␤» [13:58] eh, now i have all the pieces i think... :) [13:58] sorry for the spam [13:59] *** telex left [14:00] hah, that large allocation was probably yet more stack frames :P [14:00] m: sub note { CORE::<¬e>("Info: $^a") }; note "test" [14:00] rakudo-moar 91d899: OUTPUT«Info: test␤» [14:00] \o/ [14:00] *** telex joined [14:00] moritz++ for the right place to look for ¬e [14:00] *** xinming left [14:01] *** xinming joined [14:01] *** anaeem1_ left [14:02] m: say $*DISTRO.name [14:02] rakudo-moar 91d899: OUTPUT«linux␤» [14:02] ^ will that always say 'linux' on any linux distro? [14:04] *** virtualsue joined [14:06] * moritz hopes so [14:09] Why do we have $*DISTRO.is-win but not .is-unix .is-posix etc.? [14:10] smls: because in most cases you'll find: if $is-win { ... } else { ... } [14:12] *** adu joined [14:12] sad truth? [14:13] m: my ¬e = $*DISTRO.is-win ?? CORE::<¬e> !! { CORE::<¬e>("\x1b" ~ $^a ~ "\x1b") }; note "test" [14:13] rakudo-moar 91d899: OUTPUT«test␤» [14:13] ^^ On a scale of 1 ro 10, how evil would you rate this? :P [14:13] *to [14:14] 3 [14:14] Would it be better to have a new sub that checks each time whether it should add colors? [14:14] *** vendethiel joined [14:14] (each time it is called) [14:14] *** silug left [14:15] snake: cd52f91 | (Arne Skjærholt)++ | src/Snake/ (2 files): [14:15] snake: Implement hash literals. [14:15] snake: review: https://github.com/arnsholt/snake/commit/cd52f91a9c [14:15] smls: we have have a env var in rakudo about colors... starts with RAKUDO_ [14:15] this should be taken into account too [14:16] *** blackbolt joined [14:16] FROGGS: Even in a user script? [14:17] smls: I use that variable in modules too that output color, aye [14:23] *** jluis left [14:24] how does one use nqp::readfh from NQP? I can only find examples that use it which are Perl 6 [14:30] *** jluis joined [14:30] FROGGS: that's for Pod::To::Text [14:31] timotimo: and for backtrace printing [14:31] *** rindolf joined [14:32] oh? [14:32] didn't know that [14:33] nqp-m: my $fh := nqp::open("foo", "r"); say(nqp::readfh($fh)); nqp::closefh($fh); [14:33] nqp-moarvm: OUTPUT«Arg count 1 doesn't equal required operand count 3 for op 'read_fhb'␤ at gen/moar/stage2/QAST.nqp:1466 (/home/camelia/rakudo-inst-2/languages/nqp/lib/QAST.moarvm:compile_mastop:209)␤ from gen/moar/stage2/QAST.nqp:1682 (/home/camelia/rakudo-inst-2/languages…» [14:34] nqp-m: my $fh := nqp::open("foo", "r"); my $result; say(nqp::readfh($fh, $result, 42)); nqp::closefh($fh); [14:34] nqp-moarvm: OUTPUT«Failed to open file: no such file or directory␤ at /tmp/_Ps3Utgnql:1 (::23)␤ from gen/moar/stage2/NQPHLL.nqp:1239 (/home/camelia/rakudo-inst-2/languages/nqp/lib/NQPHLL.moarvm:eval:172)␤ from gen/moar/stage2/NQPHLL.nqp:1432 (/ho…» [14:34] nwc10: ^^ [14:35] nqp-m: my $fh := nqp::open("/home/camelia/rakudo-inst-2/VERSION", "r"); my $result; say(nqp::readfh($fh, $result, 4)); nqp::closefh($fh); [14:35] nqp-moarvm: OUTPUT«Failed to open file: no such file or directory␤ at /tmp/ctifKM74Ba:1 (::23)␤ from gen/moar/stage2/NQPHLL.nqp:1239 (/home/camelia/rakudo-inst-2/languages/nqp/lib/NQPHLL.moarvm:eval:172)␤ from gen/moar/stage2/NQPHLL.nqp:1432 (/ho…» [14:35] FROGGS: no, that doesn't work [14:35] read_fhb requires a native array to write to at /home/nc/test/moar.nqp:15 (:MAIN:98) [14:35] ohh [14:35] *** immortal left [14:35] I can't work out how to create the relevant array of uint8 [14:35] sorry, should have been clearer that that was my probelm [14:36] nqp::bootarray and nqp::bootintarray don't seem to work, from my tests just now [14:37] which makes this somewhat confusing [14:37] from the C code, it looks like I need to have [14:37] REPR(result)->ID == MVM_REPR_ID_MVMArray [14:37] and [14:37] (MVMArrayREPRData *)STABLE(result)->REPR_data)->slot_type == MVM_ARRAY_U8 [14:37] (or MVM_ARRAY_I8) [14:37] but I have no idea how to write NQP code that makes something that the C code likes [14:38] bootintarray probably has word-sized ints [14:38] In Rakudo I think Buf[int8] should do the trick [14:39] *** mephinet left [14:39] *** smls left [14:39] *** mephinet joined [14:40] arnsholt: that seems to be syntactically valid NQP, but it's not working (same error message about 'requires a native array' [14:40] ) [14:40] nwc10: does nqp::readcharsfh fit for you use-case? [14:40] *** dalek left [14:40] *** smls joined [14:40] psch: no, sadly not [14:41] Yeah, not sure how to do it in NQP [14:41] from docs.markdown it does look like you need the perl6-type Buf for readfh :/ [14:41] gimme another minute [14:41] * psch bbl o/ [14:42] *** dalek joined [14:42] *** ChanServ sets mode: +v dalek [14:42] but, Rakudo is written in NQP, so it must have a way to make its Buf objects using NQP :-) [14:42] Yeah, it's all accessible from NQP [14:43] my $Buf := buf8.new(); [14:44] it seems like the memory usage of "say 'test'" went down noticably (now 102 megabytes maxrss) [14:44] i claim TimToady++ is to blame for this [14:45] FROGGS: I don't think normal scripts should react to RAKUDO_* variables. [14:45] Why should users care that running a program they installed happens to involve something calles "Rakudo"? [14:45] And shouldn't authors try to keep their Perl 6 scripts implementation independent? [14:46] *** psch left [14:46] it is just that rakudo is the leading Perl 6 implementation and modules authors can take sane environment variables into account to disable colored prompts [14:47] if there are more Perl 6 implementations I make my modules happily aware of more implementation specific things [14:47] if it's just for *dis*abling, then okay [14:47] that's better than 20+ different env vars just to disable colors for a handful modules [14:47] yes [14:47] I think this one was about disabling [14:48] *** molaf_ left [14:48] Ideally, one should also check whether $*OUT is a terminal [14:49] like `ls` prints color codes, but `ls > file` does not [14:50] m: say $*OUT.t [14:50] rakudo-moar 91d899: OUTPUT«Cannot find method 'isatty': no method cache and no .^find_method␤ in method t at src/gen/m-CORE.setting:15808␤ in block at /tmp/RrRl45JJjr:1␤␤» [14:50] NYI? [14:50] not yet implemented [14:50] erm [14:50] you weren't asking what 'NYI' meant :-) [14:51] p: say $*OUT.t [14:51] rakudo-parrot 91d899: OUTPUT«False␤» [14:51] smls: seems NYI; a ticket would be welcome [14:51] haven't opened a Rakudo ticket before; should I get into the habit? [14:51] *** adu left [14:52] smls: I think only masak has made it habitual :) [14:52] hrm, the links from http://rakudo.org/tickets/ lead to bogus "cross site forgery" warning page [14:53] yeah [14:53] you can safely ignore that one if it reads "some malicious site may be trying to do a search on your behalf" [14:54] because that's exactly what rakudo.org is trying to do and it's not dangerous to execute a particular search, at least AFAIK [14:54] I clicked "new tickets", and the first one it shows is 5 years old [14:54] Am I in the right place? [14:55] "new" is just a state a ticket can be in [14:55] smls: you have to click on 'created' to sort by newness [14:58] *** anaeem1_ joined [14:59] jnthn: my $buf := NQPArray.new; creates (I think) an array of objects. How do I create an array of unit8? I think I need to end up in the `case MVM_STORAGE_SPEC_BP_INT:` of compose() in MVMArray.c [14:59] nqp::list_i would give you an int array [14:59] but not uint8 [14:59] io.c is fussy [15:00] that's something that the native shaped arrays stuff is going to change, if my guess is correct [15:00] You'll probably have to pull out the relevant stuff from Rakudo's source [15:00] I am trying to create an uint8 and then Blob[uint8] type using the mop in nqp... but I end up getting: This representation (VMArray) does not support attribute storage [15:00] *** vendethiel left [15:01] FROGGS: thanks for continuing to try. I didn't realise that I'd DOSed you :-/ [15:01] Make an int8 native type, then create an array type and set it to be of the int8 type [15:01] i kind of think list_i will only give you something that's compatible with the integer registers of the VM [15:02] nqp-m -e 'my $fh := nqp::open("test.pl", "r"); my $result := nqp::list_i; say(nqp::readfh($fh, $result, 4)); nqp::closefh($fh);' [15:02] read_fhb requires a native array of uint8 or int8 [15:02] You want the array_type trait in src/core/traits.pm from Rakudo, the header of src/core/Buf.pm and src/core/natives.pm [15:02] *** blackbolt left [15:02] Then stuff the equivalent types into your code [15:02] that is the best you can do without the mop I think [15:03] arnsholt: which is what I tried [15:03] arnsholt: https://gist.github.com/FROGGS/81b81e4282ae9d426381 [15:03] I cannot add attributes to VMArray reprs [15:04] I have to decommute now, but I'll try to hack up something that works once I get home. Shouldn't be too hard [15:04] so I maybe need a P6opaque too... [15:04] do you need to build a class that is repr('MVMArray') and has the correct bitsize? [15:04] yes [15:04] does that workh in nqp? [15:04] Sort of [15:05] An int type of the correct bitsize, and a VMArray parametrized to that type [15:05] i don't know how parameterizing types works in nqp %) [15:05] timotimo: this line does it: https://gist.github.com/FROGGS/81b81e4282ae9d426381#file-buf8-nqp-L15 [15:06] (in case it would work) [15:06] ohh, lemme try something [15:06] nwc10: nqp::list_i(), but you already found there's a bit more to it than that... :) [15:07] The trick is to compose a repr with the appropriate settings. [15:07] a repr with settings is different from adding an attribute [15:08] https://github.com/rakudo/rakudo/blob/nom/src/Perl6/Metamodel/REPRComposeProtocol.nqp#L11 [15:08] timotimo: very :) [15:11] nqp-m: my $at := nqp::newtype(NQPClassHOW.new, 'VMArray'); nqp::composetype($at, nqp::hash('array', nqp::hash('type', int))); my $arr := nqp::create($at); nqp::bindpos_i($arr, 0, 42); say(nqp::atpos_i($arr, 0)); [15:11] nqp-moarvm: OUTPUT«42␤» [15:11] So if you know how to get an int8 then you feed it to this. [15:12] *** erkan joined [15:12] *** erkan left [15:12] *** erkan joined [15:13] sec [15:17] *** JimmyZ_ joined [15:18] timotimo: it is not easy to remove set op from nqp compiler, since the set op is sometimes needed, IIRC [15:19] timotimo: I think the better ways still is in statick optimization [15:19] *way [15:19] JimmyZ_: i think the set op results from an InstructionList allocating a register to store its result, but not telling the "child" InstructionList that it can re-use the already-allocated result register, OSLT [15:20] *** [Sno] left [15:22] *** Celelibi left [15:22] *** Celelibi joined [15:25] *** treehug88 joined [15:25] *** immortal joined [15:25] *** immortal left [15:25] *** immortal joined [15:26] *** KCL left [15:27] *** erkan left [15:27] * nwc10 doesn't know how to get a uint8 [15:27] or an int8 either [15:27] This representation (P6int) does not support attribute storage :o( [15:28] jnthn: what's wrong here? https://gist.github.com/FROGGS/81b81e4282ae9d426381 [15:28] jnthn: is assplodes when I uncomment line 19 and 20 [15:28] Using NQPClassHOW instead of NQPNativeHOW, I suspect [15:29] nwc10: get the type? [15:29] jnthn: Native types may not have attributes [15:30] ohh [15:30] *** Juerd left [15:30] ahh no, I dunno [15:31] one would hope native types have no attributes, wouldn't one? [15:32] ohh, I think I found it [15:33] *** Juerd joined [15:34] \o/ [15:35] nwc10: that does it: https://gist.github.com/FROGGS/81b81e4282ae9d426381 [15:35] jnthn++ / colomon++ [15:35] timotimo / arnsholt: https://gist.github.com/FROGGS/81b81e4282ae9d426381 [15:36] FROGGS++ # yay [15:36] and can be in BEGIN{ .. } block ? [15:37] cool [15:37] *** vendethiel joined [15:37] *** Celelibi left [15:40] m: my $bar = "a b"; .say for <> [15:40] rakudo-moar 91d899: OUTPUT«foo␤a␤b␤baz␤» [15:40] :( [15:41] Why doesn't <<...>> treat interpolated variables as a single token, like grammars do? [15:43] nqp: 3b45964 | (Timo Paulssen)++ | src/vm/moar/QAST/QASTOperationsMAST.nqp: [15:43] nqp: pre-size lists if the num of initial values is known [15:43] nqp: review: https://github.com/perl6/nqp/commit/3b45964482 [15:43] nqp: 3069179 | (Timo Paulssen)++ | src/vm/moar/QAST/QASTOperationsMAST.nqp: [15:43] nqp: give "$newer" a less confusing name [15:43] nqp: review: https://github.com/perl6/nqp/commit/3069179b3f [15:43] smls: because you interpolated it into that construct [15:43] *** Celelibi joined [15:43] r: my $x = "y z"; .say for <>; [15:43] *** jluis left [15:43] rakudo-{parrot,moar} 91d899: OUTPUT«a␤y z␤c␤» [15:44] oh, felher++ [15:49] oh, next naive question [15:49] seems that my filehandle from nqp::open was expecting the file to be valid UTF-8 [15:49] how do I do the equivalent of binmode? [15:51] *** jluis joined [15:52] timotimo: looks like pre-size set it to $size and then set it to zero? [15:52] yes [15:52] if we don't reset the size to 0, the objects get pushed at the end :) [15:55] *** rurban joined [15:55] oh, it's nice to have a comments there [15:55] can do [15:55] oh, this might be a PEBKAC [15:57] nqp: 92a5f72 | (Timo Paulssen)++ | src/vm/moar/QAST/QASTOperationsMAST.nqp: [15:57] nqp: explain the setelems n + setelems 0 trick [15:57] nqp: review: https://github.com/perl6/nqp/commit/92a5f72b28 [15:58] .tell japhb a knowledgable friend tells me that OpenGL 3.3 Core is a good point to start from, as later versions in the 3 series mostly introduce advanced features you're not going to need as "a beginner" and mesa has some trouble with 4.0 [15:59] nwc10: it should not expect utf8 IIRC [15:59] no, that problem was between the keyboard and the chiar [16:00] exactly :o) [16:07] It's nice when you're teaching a class and somebody comes at the end for help with their compiler hobby project. :) [16:07] :o) [16:07] *** denis_boyun_ left [16:08] Another day's teacing done... :) [16:08] ... arnsholt? [16:08] :3 [16:08] * jnthn wonders if he'll have Perl 6 energy tonight :) [16:09] *** JimmyZ_ left [16:10] hotel & [16:10] *** dalek left [16:11] *** dalek joined [16:11] *** ChanServ sets mode: +v dalek [16:20] *** dwarring left [16:21] *** vendethiel left [16:22] *** vendethiel joined [16:22] moritz: pong? [16:27] *** spider-mario joined [16:27] there should totally be a post on Inline::Perl5 on the advent calendar [16:27] volunteers, or can I take it? [16:27] jnthn: What language were they writing a compiler for? [16:28] No yoleaux, sigh [16:29] timotimo: I see a highlight referring to OpenGL versions. Is there context I am missing here? [16:29] *** [Sno] joined [16:29] wasn't it you i showed the opengl api xml files to? [16:31] Oh yes, some time ago. I had forgotten about that. :-( [16:31] *** kaleem_ joined [16:32] *** kaleem left [16:33] timotimo: i got a simple router out there for http-async, i'll work on keep-alive next [16:33] tony-o: i likes :) [16:33] japhb: aaw, i was hoping one day during the advent calendar or something there'd suddenly be an opengl module + accompanying post :) [16:47] *** ssqq left [16:50] *** anaeem1_ left [16:51] *** Celelibi left [16:53] *** Celelibi joined [16:53] *** anaeem1_ joined [16:53] *** FROGGS left [16:54] *** anaeem1_ left [16:55] *** anaeem1_ joined [16:56] \o [16:58] *** erkan joined [16:58] *** erkan left [16:58] *** erkan joined [17:00] *** immortal left [17:09] hay ray [17:13] *** kaleem joined [17:16] *** kaleem_ left [17:20] *** fhelmberger left [17:23] tadzik: hi (-: did you have a chance to look at my pr? [17:23] *** pmurias joined [17:24] arnsholt: mentioning you was in response to http://irclog.perlgeek.de/perl6/2014-12-02#i_9747580 [17:26] masak: how's your advent post coming along? [17:27] moritz: Yeah, I eventually figured that out. I claim CaffeineUnderflowException =) [17:29] ICaffeineUnderflow? [17:29] ENOTENOUGHCOFF [17:30] timotimo: The only spare time I'd have to write an advent post is *after* the advent is over. :-( [17:30] aaw [17:31] well, that's okay [17:31] you're already doing a pretty awesome job with perl6-bench, so i can hardly ask you to invest more into perl6 than you already are :) [17:35] :-) [17:38] *** ab5tract joined [17:42] moritz: will make dinner, then write it. [17:42] good evening, #perl6 [17:43] \o masak [17:44] masak: hi (-: today on my way to work i watched your talk about GOTO from YAPC::EU. liked it (-: [17:44] \o/ [17:44] * masak .oO( goto work considered awesome ) [17:46] *** zakharyas1 left [17:50] *** pmurias left [17:52] * moritz blug: http://perlgeek.de/blog-en/perl-6/2014-community-server-update.html [17:53] moritz++ [17:53] And moritz++ for organizing all of this server stuff [17:54] moritz: i'm wondering about your website's color scheme [17:54] m: Foo.parse("abcd"); grammar Foo { } [17:54] rakudo-moar 91d899: OUTPUT«===SORRY!=== Error while compiling /tmp/eAcR78EVRS␤Illegally post-declared type:␤ Foo used at line 1␤␤» [17:54] ^^ Why is it illegal? [17:54] m: grammar Foo { ... }; Foo.parse("abcd [17:54] rakudo-moar 91d899: OUTPUT«===SORRY!=== Error while compiling /tmp/d3HWEWqJBe␤Unable to parse expression in double quotes; couldn't find final '"' ␤at /tmp/d3HWEWqJBe:1␤------> grammar Foo { ... }; Foo.parse("abcd⏏␤ expecting an…» [17:54] m: grammar Foo { ... }; Foo.parse("abcd"); grammar Foo { }; [17:54] rakudo-moar 91d899: OUTPUT«No such method 'TOP' for invocant of type 'Foo'␤ in method parse at src/gen/m-CORE.setting:14194␤ in block at /tmp/7cCrlHZ72e:1␤␤» [17:55] smls: makes sense? [17:56] I see [17:56] Why allow subs to be post-declared though, but not types? [17:57] <[Coke]> you get the same error for classes, btw. [17:59] *** dakkar left [17:59] smls: i imagine it is difficult to do type checking if you allowed it, but i'd be interested to hear a more informed answer from someone in the know [17:59] because class definitions change syntax [18:00] and we're very strict about the order of things that change the current language [18:00] we get away with it on subroutines because the invocation syntax doesn't change [18:01] ok [18:03] o/, #perl6 [18:03] <[Coke]> hugme: high five moritz [18:04] <[Coke]> aw, man! [18:04] yeee! moritz++ [18:04] the few cases where you cn use a type that has not yet been defined, you have to say something like ::T so it knows what you mean [18:04] *** mvuets left [18:04] geekosaur: what cases are those? [18:05] * geekosaur not recalling off the top of his head :( [18:05] today I am a bundle of not very well indexed random snippets >.> [18:05] * TimToady feels like he stayed up till the wee hours hacking... [18:06] <[Coke]> .seen ingy [18:06] <[Coke]> blah [18:06] (I think one of them is when you're referring to a parameterized type? so it needs the :: prefix to tell it that what follows is a "variable" of sorts) [18:06] when capturing a type in a siggie, aye [18:07] *** xinming_ joined [18:08] m: ::Foo.new().x.say; class Foo { method x { say "huh" } } [18:08] rakudo-moar 91d899: OUTPUT«===SORRY!===␤Could not locate compile-time value for symbol Foo␤» [18:08] I guess it doesn't really work for that [18:09] hi [Coke] [18:09] m: class Foo {...}; Foo.new().x.say; class Foo { method x { say "huh" } } [18:09] rakudo-moar 91d899: OUTPUT«huh␤True␤» [18:09] moritz: s/payed/paid/ [18:09] anyway, prestubbing is more readable than scattering :: all over [18:11] *** xinming left [18:11] right, I would not have expected that to work because is it use before declaration or is there some way to "bind" ::Foo at runtime? [18:12] (use before declaration being sort of a special case of the latter since it's resolved at compile time, just later in the compilation unit) [18:13] runtime is too late, note the message I got [18:13] why ::Foo depends on a compile-time value, I dunno [18:13] yes, I am assuming that that is an implementation detail that could be changed (at of course a time penalty) *if* the corresponding mechanism existed; but the mechanism itself is dubious [18:14] well, we encourage stubbing instead [18:14] yes, stubbing is clearer and eliminates the ambiguity I mentioed [18:14] m: class Foo {...}; Foo Foo [18:14] rakudo-moar 91d899: OUTPUT«===SORRY!=== Error while compiling /tmp/0vEBbShwhk␤Two terms in a row␤at /tmp/0vEBbShwhk:1␤------> class Foo {...}; Foo ⏏Foo␤ expecting any of:␤ postfix␤ infix stopper␤ infix or m…» [18:15] note that types and such become terms rather than functions [18:15] my point was more that, if the mechanism existed, it would invite the alternative implementation where I somehow bound ::Foo instead of simply using it before definition [18:15] it could be an idea to just disallow the ::Unstubbed form then? [18:15] but that introduces an ambiguity [18:15] m: say ::Foo; class Foo { has $.x = 42; } [18:16] rakudo-moar 91d899: OUTPUT«===SORRY!===␤Could not locate compile-time value for symbol Foo␤» [18:16] well, only allow ::foo in declarative context [18:16] n: say ::Foo; class Foo { has $.x = 42; } [18:16] niecza v24-109-g48a8de3: OUTPUT«(Foo)␤» [18:16] niecza handles it [18:16] but it's not trying to optimize the heck out of everything :) [18:17] n: say ::Foo.new; class Foo { has $.x = 42; } [18:17] niecza v24-109-g48a8de3: OUTPUT«Foo.new(...)␤» [18:17] n: say ::Foo.new.x; class Foo { has $.x = 42; } [18:17] niecza v24-109-g48a8de3: OUTPUT«42␤» [18:17] so it's certainly possible to allow it [18:18] so maybe it's just a bug; certainly the original intent was that ::Foo defer judgement [18:19] n: ::Foo ::Foo [18:19] niecza v24-109-g48a8de3: OUTPUT«===SORRY!===␤␤Two terms in a row at /tmp/seaNVlJz1_ line 1:␤------> ::Foo ⏏::Foo␤␤Parse failed␤␤» [18:19] m: sub b( ::Thing, $num ) { ::Thing.new($num) }; class Thing { method new($num) { say $num } }; b( Thing, 5 ); [18:19] rakudo-moar 91d899: OUTPUT«5␤» [18:19] m: ::Foo ::Foo [18:19] rakudo-moar 91d899: OUTPUT«===SORRY!===␤Could not locate compile-time value for symbol Foo␤» [18:19] moritz++ [18:20] right, I'm just noting that, *given* that ability, a logical extension is to allow that ::Foo to be bound to something else instead of being a use before declaration [18:20] the :: seems to turn it into a term in niecza, which is a bit odd, considering that an internal :: doesn't [18:20] m: sub b( ::Thing, $num ) { ::Thing.new($num) }; b( ::Thing, 5); class Thing { method new($num) { say $num } }; [18:20] rakudo-moar 91d899: OUTPUT«===SORRY!===␤Could not locate compile-time value for symbol Thing␤» [18:20] making it potentially a variable. but that's ambiguous and potentially quite expensive [18:20] you leave off the :: in use [18:20] m: sub b( ::Thing, $num ) { ::Thing.new($num) }; b( Thing, 5); class Thing { method new($num) { say $num } }; [18:20] rakudo-moar 91d899: OUTPUT«===SORRY!=== Error while compiling /tmp/0vxa3qs71P␤Illegally post-declared type:␤ Thing used at line 1␤␤» [18:20] it's only in the binding that :: is allowed [18:21] i like that tbh [18:21] *** pecastro left [18:21] m: sub b( ::Thing, $num ) { Thing.new($num) }; b( Thing, 5); class Thing { method new($num) { say $num } }; [18:21] rakudo-moar 91d899: OUTPUT«===SORRY!=== Error while compiling /tmp/qVWEnSVgRP␤Illegally post-declared type:␤ Thing used at line 1␤␤» [18:22] m: sub b( ::Thing, $num ) { Thing.new($num) }; class Thing { method new($num) { say $num } }; b( Thing, 5 ); [18:22] rakudo-moar 91d899: OUTPUT«5␤» [18:23] m: sub b( ::Thing, $num ) { Thing.new($num) }; class Thing { method new($num) { say $num } }; b( Int, 5 ); [18:23] rakudo-moar 91d899: OUTPUT«Default constructor for 'Int' only takes named arguments␤ in method new at src/gen/m-CORE.setting:931␤ in sub b at /tmp/ozoaKnVuBm:1␤ in block at /tmp/ozoaKnVuBm:1␤␤» [18:24] *** gfldex joined [18:24] that doesn't look right [18:26] wow... the spectest's doubled in size since I last paid attention to it, *and* it still finished faster. [18:26] *** flussenc1 is now known as flussence [18:27] esp if you use TEST_JOB=3 or so on a multicore :) [18:27] *JOBS [18:27] yeah, it used to be about 17k tests in 7.5 minutes for 4 cores, now it's 34k tests in 6.5. [18:28] r-m is running 100 tests *a second* :) [18:28] well, some of that is startup improvements too [18:29] .oO( 100 tests a second? Why not 100_000? ) [18:29] if only we had a 4096-core box... :) [18:29] What's 3 orders of magnitude among friends? [18:30] parrot is also soon 20% faster. better resizablepmcarray [18:30] Not much, in the big scheme of things. :-) [18:30] rurban: Nice! [18:31] rurban: the NFA changes also speed up rakudo on parrot and jvm, potentially [18:31] And I still have 20% with the new gc, and the calling convention fixes upcoming [18:31] new gc: = previous gc [18:35] 20% each. not speaking about ext_call runloop fixes for methods and the jit yet. [18:35] https://portal.tacc.utexas.edu/home) and get access to a bunch of CPUs (See https://portal.tacc.utexas.edu/system-monitor) Not quite the same thing, but close ;) [18:35] flussence: Someone could request an account on the Texas Advanced Computing Cluster (TACC, [18:35] reverse those two lines. :) [18:36] *** denis_boyun_ joined [18:36] .oO( IRC still has thread-safety problems... ) [18:37] PerlJam: if you have science-y questions to try answering, could also use Blue Waters: https://bluewaters.ncsa.illinois.edu [18:38] And 'science' is fairly broadly applied in some cases there :) [18:38] .oO( How fast can Rakudo go? IS that sciencey enough? :) [18:39] might be. though the 'Powers that Be' might think throwing Blue Waters at it may be a tad overkill [18:39] if anyone has transmitted rakudo on radio, it's going the speed of light [18:39] PerlJam: Thanks. I tried, since I still have my texas address. [18:40] come to think of it, my wifi has sent rakudo at the speed of light many times [18:41] *** Mso150 joined [18:46] well, doesn't quite get to c until it leaves the atmosphere... [18:46] *** virtualsue left [18:47] TimToady: in that example above, I would have expected some kind of 'mismatched type object' error [18:47] I love being more precise than necessary, to make up for the times I'm less precise than necessary. [18:48] plus there's all of those pesky state transitions as it moves through the equipment that could throttle is to somewhat less than c as well [18:48] s/is to/it to/ [18:48] My TACC account was accepted, without mentioning the Perl Org [18:48] well, copper tends to transmit at about 1/3 c iirc [18:49] or maybe it was 1/2 [18:49] I'm trying now XSEDE also, they have fields for non-profits [18:52] mrr, I thought I recalled it being around 80% [18:53] Also accepted https://www.xsede.org/group/xup/profile/-/profile/view/rurban I can now try 10.000 cpu's [18:53] rurban: nice! [18:53] TimToady: I thought it was more like 2/3c or .7c, for both electrical signals in copper and light in fiber. [18:53] "velocity factor" [18:54] *** kaleem left [18:55] oh, that's what I'm remembering. about 66% for standard cabling, 80% is for air dielectric antenna cable [18:57] *** Isp-sec joined [19:01] *** mvuets joined [19:02] * TimToady is probably remembering ancient phone wiring or so [19:02] * TimToady being fairly ancient himself [19:03] TACC is only using Intel's icc, no gcc :) But 22,656 Xeon CPU's is nice. I"ll just try 64 or so [19:05] *** rindolf left [19:07] *** FROGGS joined [19:11] nine: do you want to do Inline::Perl5 advent post, or can I? [19:15] tadzik: if you take Inline::Perl5, you have to give nine another post idea in return ;) [19:15] evening, #perl6 [19:16] hey J [19:16] panda: 7399a55 | (Andrew Egeler)++ | bin/panda.bat: [19:16] panda: Make .bat file work with powershell as well as cmd [19:16] panda: review: https://github.com/tadzik/panda/commit/7399a55011 [19:16] panda: d3dc5e4 | tadzik++ | bin/panda.bat: [19:16] panda: Merge pull request #124 from retupmoca/master [19:16] panda: [19:16] panda: Make .bat file work with powershell as well as cmd [19:16] panda: review: https://github.com/tadzik/panda/commit/d3dc5e4482 [19:17] m: sub prefix:<∃>($a) { $a.any; }; my @a = 1..10; my @b = 4, 8; say so ∃@a ∈ @b [19:17] rakudo-moar 91d899: OUTPUT«True␤» [19:17] m: sub prefix:<∀>($a) { $a.all; }; my @a = 1..10; my @b = 4, 8; say so ∀@a ∈ @b [19:17] rakudo-moar 91d899: OUTPUT«False␤» [19:19] m: sub prefix:<∀>($a) { $a.all; }; my \a = 1..10; my \b = 4, 8; say so ∀a ∈ b [19:19] rakudo-moar 91d899: OUTPUT«False␤» [19:19] mvuets: yeah, I did :) [19:20] mvuets: meanwhile, someone submitted #17 which does that using `git --ls-remote`, so without LWP or anything [19:21] mvuets: which seems like a simplier solution (the code is shorter too), but then your PR has a few more improvements that I'd also like pulled in [19:22] mvuets: so I think I'll merge that one first and then we can try to pull out the rest of the goodies from yuors :) [19:23] *** immortal joined [19:23] *** immortal left [19:23] *** immortal joined [19:23] mvuets: poke me when you're around [19:25] *** prevost joined [19:25] tadzik: i see. yeah, that indeed looks to be more robust [19:25] *** erkan left [19:26] personally i think an LWP solution would be better, as it doesnt require having git installed [19:26] git is a prerequisite for rakudobrew anyways [19:27] yeah [19:27] heck, it's basically a prerequisite for Rakudo itself [19:27] that too [19:27] dont forget about your windows friends :) [19:28] plus my solution is vulnerable to api rate limit [19:28] *** lizmat joined [19:28] Well most of the complexity of git to my way of viewing is in the merge algorithms... if you never want to merge (e.g., if you're only ever cloneing a git repo to get the current head of a given branch), the code to do that with LWP would be pretty simple. [19:28] ugexe: well, windows users still need git around for rakudo and friends :) [19:28] what're we gonna do if we discover that git is lying about the extra backdoor code stashed in the bootstrap? [19:28] mvuets: can you open a new PR with the rest of the features you wrote? [19:28] mvuets: bonus points if each is in a separate commi t:) [19:28] Wouldn't even need smart HTTP transport if you know in advance the name of the branch you want. [19:29] *** abraxxa left [19:29] you dont need git if you install the .msi [19:30] me, when looking at p6 globals: https://i.imgflip.com/etqry.jpg (-: [19:31] ... typeglobs? [19:31] ugexe: but then you're not likely to use rakudobrew [19:31] tadzik: each commit - a separate pr? [19:31] (I think) [19:31] mvuets: not neceserilly, just in separate commits [19:31] that makes it easier to track down possible issues in the future, or pick only some of the features [19:32] tadzik: ah, they are already (-: [19:32] if the original PR was like that, I'd just cherry-pick all the things but the list-available, and it'll save us work [19:32] oh, huh [19:32] indeed :) [19:32] i'll just merge upstream into my branch, rip off `available` subcommand and send a new pr [19:32] i mean, my version of the command [19:33] timotimo: this star in $*foo just reminds me scary p5 typeglobs [19:33] * mvuets has been looking into p6 for just few days, bear with him [19:34] oh? [19:34] i thought typeglobs were just stuff you spell in uppercase? [19:34] * vendethiel taught perl6 to $work's sysadmin (who just started his internship) today [19:34] mvuets: i always interpreted the * twigil as intentionally dangerous looking :) [19:35] well, all twigils are longer huffman coding for some kind of "weight" [19:35] but * particularly looks like a glob [19:35] mvuets: alright, thanks :) [19:36] and globs kinda mean "whatever, dude" [19:36] vendethiel: what did he think of it? [19:36] just find me a 'foo' variable somewhere... [19:37] PerlJam: "oh my god this is so cool" "oh wow so nice" "oh and that works too?" "you must use that for everything" [19:37] for an hour and a half :) [19:37] * vendethiel didn't get much done today :PP [19:37] nice! [19:37] you should tell him about all the bits you don't like to balance it out :) [19:37] vendethiel++ [19:38] vendethiel: you should write an advent post about it (-; [19:38] *** dalek left [19:38] mvuets: well, I wrote a tutorial about it instead :P [19:38] TimToady: the bits I don't like are bound to change :) [19:38] perl6 crash course for sysadmins [19:38] more perl6 people should go to pycon and rubyconf and such to give talks on Perl 6 :) [19:38] sounds great :) [19:38] *** Mso150_p joined [19:38] (not because I want them to, just because that's been decided by other people) [19:38] *** immortal left [19:38] *** dalek joined [19:38] *** ChanServ sets mode: +v dalek [19:38] PerlJam: I don't think those confs are cross-languages, though? [19:38] vendethiel: oh, may i have a look at the tutorial, please? [19:39] mvuets: learnxinyminutes.com/docs/perl6 [19:39] *** Mso150 left [19:39] vendethiel: if your comparing languages, you have to mention both of them ;) [19:39] *** erkan joined [19:39] *** erkan left [19:39] *** erkan joined [19:39] PerlJam: not sure what you mean? [19:40] vendethiel: ooooh, that's you! moar kudos to vendethiel++ [19:40] the talks could be short "tutorials" of the style "Here's how to do in " [19:41] just put up a link to rosettacode :) [19:41] PerlJam: well, the ruby conf I've been to only talked about ruby stuff. no cross-language comparison or whatever. but I think I've seen this kind of stuff [19:41] .oO( they'll throw a ETOOCRAZY ) [19:42] *** dalek left [19:42] I'll likely continue have few tuits through this week and the weekend, but next week it looks like I'll be able to have one or two entire days for Perl 6 things. At darn last. \o/ [19:42] EBS606740157 [19:42] yay [19:42] ...well bother. :) [19:42] *** dalek joined [19:42] *** ChanServ sets mode: +v dalek [19:43] * jnthn didn't want to paste anything, but at least it was harmless :) [19:43] TimToady: it would have to be a curated set of links as showing rosettacode "in the raw" would be somewhat like showing CPAN (lots of warts) [19:44] jnthn: currently I'm copying the states down into the same array, but I'm wondering whether I should bother to copy to a new list so the old one can be GC'd [19:45] TimToady: Ah, 'cus the new one ends up with a lot less of them? [19:45] well, 35-40% less on average, but with a certain variance [19:45] Do you pop them off the end and insert them lower down, or? [19:46] tadzik: i am thinking... if it's called 'list-available' then 'list' should be called 'list-builds'; or if leave it 'list', then 'list-available' should be called just 'available'... maybe? (i prefer the second option) q-: [19:46] no, just copy from one index to a smaller index [19:46] Provided elems reports somehting smaller then for pre-comp you'll be in decent shape. [19:46] perl6-roast-data: 5d3da53 | coke++ | / (5 files): [19:46] perl6-roast-data: today (automated commit) [19:46] perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/5d3da5314d [19:46] *** prevost left [19:46] I do setelems at the end [19:46] Aha [19:46] Yeah [19:46] but I doubt that reclaims anything? [19:46] setelems doesn't reclaim, no [19:46] Most use cases don't want that. [19:47] Following the "if we needed the memory once we'll need it again" principle [19:47] for something that's just going to serialize, I don't care, but for nfas going to be used this process, I care more [19:48] I do know how much it'll change, so maybe I'll just copy if it's over a threshold [19:48] Right [19:48] that's what I menat about pre-comp [19:48] You're already clear there, but for in-process...it'd keep hold of the memory [19:49] I'd have hoped that we get a meg or two off the process memory size thanks for your improvements. [19:49] well, for precomp it already should help [19:50] <[Coke]> TimToady++ [19:50] but I was mostly hoping for more speed :) [19:50] and getting closer to DFAability [19:50] *nod* [19:50] I'm doing a build now to see how it is [19:51] as I mentioned earlier, Stage parse is kind of a wash, since we're running faster NFAs, but more time analyzing the newly parsed ones [19:52] Not much of STD is grammars/regexes, though? [19:52] uh [19:52] Not much of *CORE.setting* [19:52] oh, right [19:52] Gee, that nap after work apparently didn't work... [19:52] snake: 1908c5e | (Arne Skjærholt)++ | src/Snake/World.nqp: [19:52] snake: Simplify some cargo-culted code from NQP. [19:52] snake: [19:52] snake: We're not bootstrapping, so we can just reference the ModuleLoader directly. [19:52] snake: review: https://github.com/arnsholt/snake/commit/1908c5eef4 [19:52] snake: 21ba500 | (Arne Skjærholt)++ | src/ (2 files): [19:52] snake: Remove the need for a load task getting the ModuleLoader. [19:52] snake: [19:52] snake: Adding "use Snake::ModuleLoader" to snake.nqp makes this superfluous. [19:52] snake: review: https://github.com/arnsholt/snake/commit/21ba500540 [19:52] * TimToady ahd a short night [19:52] * jnthn too in terms of sleep, though not 'cus he went to bed late... :S [19:54] I *think* stage parse may be a little faster, but I tend to know the numbers of my desktop better than my laptop... [19:54] well, i got a stage parse of 26 something for the first time [19:55] so yeah, I think it's a hair faster [19:55] Grammar.moarvm went from 5,334,400 down to 3,214,066 [19:55] heh [19:55] that seems about right [19:55] should definitely affect startup then [19:55] Wow [19:56] Yeah [19:56] Memory use starting REPL: 33,920KB -> 22,152KB [19:56] Memory after "say 42": 101,908 -> 90,240KB [19:56] So, 11MB off [19:56] 33% off sounds very nice :o) [19:57] Really. [19:58] And if you undo the patch that disabled lazy deserialization in Moar, you get them down to 11,456KB and 68,696KB respectively. [19:59] An NQP REPL sits at 7,224KB and after say(42) is at 12,120KB. [19:59] tiddly pom [20:00] *** Celelibi left [20:00] Disable spesh and you are only at 8,852KB after the say(42). So specializations... [20:00] still a ways from fitting it onto a PDP-11 [20:01] And 54,500KB for Rakudo. I think I might want to look at why spesh produces 14MB worth of specialized bytecode and JITted output at some point :) [20:01] these stats look kinde sweet: http://testers.perl6.org/dist/Acme::DSON [20:01] *** Celelibi joined [20:02] FROGGS: very nice, yes [20:02] FROGGS: why are there so many dots in the version numbers after the 'g'? [20:02] the green revolution [20:02] moritz: like is really has a use or something :o) [20:03] moritz: because it is how Version objects stringify [20:03] *** Celelibi left [20:03] eeks [20:03] m: say $*PERL.compiler.version [20:03] rakudo-moar 91d899: OUTPUT«v2014.11.50.g.91.d.8995␤» [20:03] yepp [20:04] moritz: I mean, I can strip these dots for the webpage, but had no time to do that yet [20:04] nqp/6pe: 22143f6 | jonathan++ | src/vm/moar/QAST/QASTOperationsMAST.nqp: [20:04] nqp/6pe: Map nqp:: ops for parametricity on MoarVM backend. [20:04] nqp/6pe: review: https://github.com/perl6/nqp/commit/22143f60d2 [20:04] nqp/6pe: e9b1b9c | jonathan++ | t/nqp/87-parametric-6model.t: [20:04] nqp/6pe: Some initial tests for 6model parametric ops. [20:04] nqp/6pe: review: https://github.com/perl6/nqp/commit/e9b1b9c2c3 [20:04] FROGGS: no, it wants to be stripped inside rakudo [20:05] *** Celelibi joined [20:05] yeah, that should be possible too... [20:06] *** darutoko left [20:08] *** dalek left [20:08] *** dalek joined [20:08] *** ChanServ sets mode: +v dalek [20:11] tadzik: also found a bug in 'list-available' (-: [20:17] *** Juerd left [20:18] *** telex left [20:19] *** Juerd joined [20:20] *** telex joined [20:24] $*DISTRO was supposd to be something like 'ubuntu', and $*KERNEL was supposed to be 'linux' [20:24] we seem to be re-inventing $*OS :/ [20:24] I see that Rakudo's Configure.pm calls `nqp-m --show-config` to get the MoarVM config, which it uses to expand Makefile.in [20:25] er Configure.pl [20:25] I still have that old spreadsheet - https://ethercalc.org/wrwsbhvuim [20:25] what's the right way to get MoarVM config information in *NQP*'s Configure.pl ? [20:26] since we have a stage0, we could probably call nqp::backendcfg or what it is called [20:27] We also could consider having a flag on moar that dumps the info. [20:27] nqp: say(nqp::backendconfig()) [20:27] nqp-parrot: OUTPUT«cc␤» [20:27] ..nqp-jvm: OUTPUT«(signal ABRT)» [20:27] ..nqp-moarvm: OUTPUT«gcc␤» [20:28] FROGGS: yes, that works [20:28] ../MoarVM/moar --libpath=src/vm/moar/stage0 src/vm/moar/stage0/nqp.moarvm -e 'for nqp::backendconfig() { say($_) }' [20:28] [output] [20:29] jnthn: for now, we can survive without the flag [20:29] OK, cool :) [20:29] I'm always happy to have less things :) [20:29] me too :o) [20:29] although I might be going to bed before I hack the next bit [20:29] me three [20:30] well, except for food and kids... you can never have enough food and kids at home :o) [20:32] *** dalek left [20:32] stock up on some kids [20:32] Good evening, everyone! [20:34] Rutan said that the goal of private space tourism is to reduce the cost of space travel and exploration. "If we go through a time period where the focus is on flying the consumer, these 'payloads' who pay to fly and can be reproduced with unskilled labor...with tools around the house," he joked, "there will be a breakthrough to enormous volume." [20:35] o/ nine [20:35] is "listop" defined anywhere in the synopses? [20:36] well, grep finds 29 mentions [20:36] *** dalek joined [20:36] *** ChanServ sets mode: +v dalek [20:37] but listop is actually a P5ism [20:37] tadzik: ok, my pr for rakudobrew should be good to go now [20:37] TimToady: yes, I suspected as much. [20:38] *** anaeem1_ left [20:39] masak: Turns out Poznan also has a street called Listopadowa :P [20:40] demonstrating that the Useless Facts collection is, in fact, highly contextual [20:40] jnthn: what country is that? "listopadowa" makes sense to me (-: [20:40] mvuets: Poland. :) [20:41] *** Juerd left [20:41] *** Juerd joined [20:42] jnthn: ah! that would mean something like "leaf fall", or "november" if it was a ukrainian month name (-; [20:42] * FROGGS can't get enough of https://www.youtube.com/watch?v=YfXPhWb38u8 [20:43] nqp/6pe: 2124b66 | jonathan++ | t/nqp/87-parametric-6model.t: [20:43] nqp/6pe: Basic tests for parameterization interning. [20:43] nqp/6pe: review: https://github.com/perl6/nqp/commit/2124b66f21 [20:44] Well, listops in Perl 6 might cause precedence to fall, at least... :) [20:44] they do in Perl 5 too [20:45] but we've got more precedence droppers in P6 [20:45] all them statement prefixes, for starters [20:46] and : on a method call [20:48] I think ours tend to read rather better than Haskell's $ [20:48] TimToady: amen. [20:48] I'm not a Web Designer and neither do I play one on TV but is this better? [20:49] http://pl6anet.org/test/ [20:49] itz: Yes. [20:49] itz++ [20:49] anything with Camelia is automatically better :) [20:50] itz: yes, way better :o) [20:51] itz++ [20:52] itz++ # sexy! [20:52] advent day 3 blog post draf, comments welcome: https://gist.github.com/masak/bd47a4022aa90a58e55a [20:52] I wonder if there is an xsnow.css :) [20:53] draft* [20:53] Going to find a pre-sleep beer... & [20:53] you show disrespect to teh elder gods by calling them mere "beings" [20:54] * masak edits [20:55] there, updated: https://gist.github.com/masak/bd47a4022aa90a58e55a [20:56] sub all-positive(@list --> Bool) covers a world of hurt [20:56] or someday, --> Bool(), and it'll deduce the 'so' for you [20:57] admittedly 'so' is shorter :) [20:57] ;) [20:57] the principle still needs to be learned. [20:57] maybe we should rename Bool to So [20:57] no, please don't. :) [20:58] so, I won't. :) [20:59] but return types will also tend to serve as containment, is my point [20:59] so maybe it's worth mentioning [20:59] m: sub foo (--> Bool) { 1 | 42 }; foo() [20:59] rakudo-moar 91d899: OUTPUT«Type check failed for return value; expected 'Bool' but got 'Junction'␤ in any return_error at src/vm/moar/Perl6/Ops.nqp:649␤ in sub foo at /tmp/OKHPfWKeXk:1␤ in block at /tmp/OKHPfWKeXk:1␤␤» [20:59] like that [20:59] I dunno... I would mention it if we actually had the functionality... [20:59] ^^^ [21:00] we have the containment, it's just resulting in a run-time error [21:00] * masak gives in [21:00] the junction will never propagate out to the elder thingies [21:01] *** anaeem1 joined [21:01] and in general, we're trying to encourage declarative solutions over procedural [21:01] the compiler could easily turn this into "That will never work!" [21:02] in fact, that might be mid-hanging fruit for someone [21:03] we know the return types of operators and functions lexically [21:03] *** Mso150_p left [21:03] assuming they're declared appropriately [21:03] *** Mso150_p joined [21:04] the compiler can, in fact, compare return types to see that --> Bool doesn't need to be enforced if you also use 'so' [21:04] no need for runtime specialization there [21:04] masak++ good post [21:05] masak: though, you mentioned "elder beings" twice, but only changed the first to say "elder non-beings" [21:05] added the point about return type declarations: https://gist.github.com/masak/bd47a4022aa90a58e55a [21:05] PerlJam: oh, good catch. [21:05] *** anaeem1 left [21:05] fixed. [21:06] rakudo/newio: 03d1599 | TimToady++ | tools/build/NQP_REVISION: [21:06] rakudo/newio: bump nqp [21:06] rakudo/newio: review: https://github.com/rakudo/rakudo/commit/03d15991f3 [21:06] rakudo/newio: 8f804a9 | (Elizabeth Mattijsen)++ | tools/build/NQP_REVISION: [21:06] rakudo/newio: Merge branch 'nom' into newio [21:06] rakudo/newio: review: https://github.com/rakudo/rakudo/commit/8f804a974e [21:07] what the...oh... :) [21:07] merges. they're tricky. :) [21:08] *** kaare_ left [21:08] I haven't backlogged yet, but the parse stage of the settings went for me from ~30 seconds to ~21 seconds [21:09] so TimToady++ [21:09] *** kurahaupo joined [21:09] shouldn't have that big an effect [21:10] well, it did for me :-) [21:10] * lizmat going to check again [21:10] masak: After "collapse back into the normal, sane, non-junctive world", I would add a colon, or even an extra half-sentence like ", which we can do using one of these ways:" [21:11] Otherwise, newbies might not get that that is what the following code snipped is showing. [21:11] if "that that" is good enough for Lincoln, it's good enough for smls++ [21:11] TimToady: you're right, 2nd time it's 28 seconds [21:11] huh? [21:12] Stage start : 0.000 [21:12] Stage parse : 21.764 [21:12] so I didn't imagine it... [21:12] lizmat: maybe you imagined the ~30 seconds? :) [21:12] * moritz also points out that collapsing a junction due to boolification is taken from the quantum world, where collapsing a wave function into an eigenstate is triggered by a measurement [21:12] masak: s/the most common use of junctions/the most common uses of junctions/ [21:13] alas: [21:13] Stage start : 0.000 [21:13] Stage parse : 28.726 [21:13] or, s/don't/doesn't/ immediately after [21:13] rebuilding nqp segfaults on latest moar :( [21:13] new theory: my notebook came out of the cold back of the car the first time [21:13] moritz: that happened to me last night [21:14] git said it gave me the newest moar, but it didn't [21:14] *** anaeem1_ joined [21:14] I guess at room temp it's throttling CPU or not turboing it anymore [21:14] still... [21:14] TimToady: ... and for a moment I thought you meant that the wave function collapse happened to you [21:14] had to blow away nqp/install to force clone [21:14] moritz: I thought the same *g* [21:15] TimToady: indeed [21:15] git describe even said I had the new moar, but git log didn't show the patch [21:15] * TimToady has no idea what went wrong [21:15] maybe this sha1 already exists? [21:15] that seems, unlikely [21:15] though not the rest of the revision can axist [21:15] exist* [21:16] both my nqp and my nqp/MoarVM were on master branch, and the bumps look correct [21:16] TimToady, lizmat: it's conspiracy [21:16] lizmat: I get wide variations based on CPU temp [21:17] yeah, I guess I rarely let my notebook get that cold :-) [21:17] * moritz wonders if --gen-moar=master merges correctly from origin/master [21:17] smls: thank you, fixing. [21:17] I was just using the tagged version, not =master [21:17] (on my other machine) [21:18] but the bumps shoulda made those the same [21:18] but the problem seems like it's in git, not in our use of it [21:18] masak: possibly s/whether you want to or not/whether you want it to or not/ [21:18] m: sub a(Int $a = 42) {}; sub a(Str $a = "foo") {}; # shouldn't this be a compile time error? [21:18] rakudo-moar 91d899: OUTPUT«===SORRY!=== Error while compiling /tmp/sePrNvgvv6␤Redeclaration of routine a␤at /tmp/sePrNvgvv6:1␤------> nt $a = 42) {}; sub a(Str $a = "foo") {}⏏; # shouldn't this be a compile time err␤ expecting any of…» [21:18] or how would 'git describe' get out of sync with 'git log' [21:18] m: multi a(Int $a = 42) {}; multi a(Str $a = "foo") {}; # shouldn't this be a compile time error? [21:18] rakudo-moar 91d899: ( no output ) [21:19] m: multi a(Int $a = 42) {}; multi a(Str $a = "foo") {}; a() # rather than a runtime error ? [21:19] rakudo-moar 91d899: OUTPUT«Ambiguous call to 'a'; these signatures all match:␤:(Int $a = { ... })␤:(Str $a = { ... })␤ in sub a at /tmp/8jHgisS73E:1␤ in block at /tmp/8jHgisS73E:1␤␤» [21:19] *** Juerd left [21:19] lizmat: well volunteer'd :) [21:20] lizmat: could be, but doesn't have to be [21:20] smls: fixed. [21:20] moritz: collapsing quantum analogy added. [21:20] oh wait, it's not an error [21:20] (I'm now in the wordpress draft, by the way, so your changes won't show up in the gist) [21:20] you have defaults, which make it merely ambiguous [21:21] but, you can never call that sub without parameters [21:21] it will always fail [21:21] or am I missing something ? [21:21] *** DarthGandalf left [21:22] no, you're correct [21:22] *** Juerd joined [21:22] and the candidate lists are generated at compile time, so it could in theory know that the dispatch will be formally ambiguous [21:22] but that's a little harder than telling that no candidates match [21:22] mvuets: looks good, thanks! [21:23] ok, so well volunteered then :-) [21:24] tadzik: cool, thanks! jj just discovered and fixed a warning in my fix of his thing [21:25] tadzik: put he sent me the pl [21:26] tadzik: maybe just fix it right in your repo to avoid these multiple pull requests mess? https://github.com/JJ/rakudobrew/commit/ccd15167cd47d3971da41bcad5b579bced426148 [21:26] /o\ [21:26] so many PRs :) [21:26] in a moment, refactoring stuff now [21:29] *** Celelibi left [21:31] *** Celelibi joined [21:31] "Scheduled for [21:31] 12/3/2014 0:01" [21:32] post scheduled on Wordpress. [21:32] \o/ [21:33] masak++ [21:33] almost feel like it took longer to port the post from Markdown to Wordpress-subverted HTML than it took to write it in the first place :) [21:34] maybe a stupid question: if I have an array @a=1,2,3 -- how can I create a parcel which has the same elements as @a? [21:34] ISTR I had a script to convert it... don't think I saved it, but it should be easy to rewrite. [21:34] m: my @a = 1, 2, 3; say @a.Parcel.WHAT [21:34] rakudo-moar 91d899: OUTPUT«(Parcel)␤» [21:34] m: my @a = 1, 2, 3; say @a.Parcel.perl [21:34] rakudo-moar 91d899: OUTPUT«(ListIter.new(),)␤» [21:34] m: my @a = 1, 2, 3; say @a.Parcel.elems [21:34] rakudo-moar 91d899: OUTPUT«1␤» [21:34] :/ [21:35] m: my @a = 1, 2, 3; say @a.list.Parcel.elems [21:35] rakudo-moar 91d899: OUTPUT«1␤» [21:35] :/ :/ [21:35] m: my @a = 1, 2, 3; say @a.Parcel.perl [21:35] rakudo-moar 91d899: OUTPUT«(ListIter.new(),)␤» [21:35] . o O (maybe a not-so-stupid-question) ;-) [21:35] * masak confesses to not having a good intuition for Perl 6 coercers [21:35] ah, I see you tried it [21:35] *** lizmat left [21:37] m: my @a = 1, 2, 3; my $b = Parcel.new( @a.values ); [21:37] rakudo-moar 91d899: ( no output ) [21:37] m: my @a = 1, 2, 3; my $b = Parcel.new( @a.values ); say $b.perl; [21:37] rakudo-moar 91d899: OUTPUT«$((1, 2, 3).list,)␤» [21:37] m: my @a = 1..3; say Parcel(@a).perl [21:37] rakudo-moar 91d899: OUTPUT«(ListIter.new(),)␤» [21:37] m: my @a = 1..3; say Parcel(@a.eager).perl [21:37] rakudo-moar 91d899: OUTPUT«(1, 2, 3)␤» [21:38] m: @a = 1, 2, 3; say @a.eager.Parcel.perl [21:38] rakudo-moar 91d899: OUTPUT«===SORRY!=== Error while compiling /tmp/PzNpgyv05t␤Variable '@a' is not declared␤at /tmp/PzNpgyv05t:1␤------> @a⏏ = 1, 2, 3; say @a.eager.Parcel.perl␤ expecting any of:␤ postfix␤» [21:38] m: my @a = 1, 2, 3; say @a.eager.Parcel.perl [21:38] rakudo-moar 91d899: OUTPUT«(1, 2, 3)␤» [21:38] bartolin: ^^ that seems to work [21:39] thanks a lot! [21:39] *** Mso150_p left [21:40] *** Mso150_p joined [21:41] * masak is unsatisfied by that [21:41] * moritz too [21:41] array assignment is already eager [21:41] why should the .eager be necessary? [21:42] * masak submits rakudobug [21:42] i leave. take care, #perl6 [21:42] \o mvuets [21:42] fare thee well, mvuets [21:44] *** mvuets left [21:44] we had about 2k page views in total over the last two days [21:44] *** DarthGandalf joined [21:44] on p6advent, that is [21:44] re topic of masak's post: Maybe routines should have a default return type of Any? [21:45] *** sqirrel joined [21:45] So unless you go and add --> Mu to your signature, you won't accidentally return a junction. [21:46] Or would that have too much of a performance impact? [21:46] smls: I don't think that fix would be a net good. [21:47] smls: and it's not so much about routine boundaries -- that's just an example. [21:47] smls: the main thing is to not let junctional values run away. [21:48] Well, routine boundaries is what they need to pass to run away to code that a different person than the one who creates the junction, wrote... [22:00] *** sqirrel left [22:01] only if your model is one-routine-one-author. [22:04] *** kaare_ joined [22:10] *** kaare_ left [22:13] *** FROGGS left [22:16] *** spider-mario left [22:17] 'night, #perl6 [22:17] does someone have a moment to explain the practical differences between 'method new' and 'submethod BUILD' ? [22:17] *** KCL_ joined [22:17] new is what your users call [22:17] ciao masak! [22:17] BUILD will be called on all subclasses by BUILDALL [22:17] BUILD is not derivable, because it's a submethod [22:18] the arguments you pass to self.bless will be given to BUILD directly [22:18] so BUILDALL is called implicitly by the parent class? [22:18] hm. who calls buildall? i think bless does. [22:18] ok [22:18] easy to test :) [22:19] *** ron1230 joined [22:19] what random class to derive from, i wonder [22:19] timotimo: working through my advent post [22:19] so Setty provides the new method to classes which use the role [22:20] I met Jonathan Swartz author of Mason. He isn't that big physically. It wouldn't take a very big person to push him around, rough him up or .... [22:20] and Set uses submethod BUILD to bind its private %!elems variable using nqp::bindattr, which I assume is what makes the Set mutable [22:20] *** ron1230 left [22:20] sorry, immutable [22:21] and i'm showing both code snippets and want to make sure i really understand the distinction between the two [22:21] *** Mso150_p left [22:21] ah! in Setty.new : self.bless(:elems(%e)); [22:22] sweet :) [22:25] *** KCL_ left [22:27] *** vendethiel left [22:30] *** vendethiel joined [22:30] i couldn't come up with an example class to derive from in order to cause an exception + backtrace from a BUILD submethod ... [22:31] *** virtualsue joined [22:34] *** ptc_p6 joined [22:37] will any class with a submodule BUILD do? [22:40] m: class A does Setty { submethod BUILD { die "except" } }; A.new [22:40] rakudo-moar 91d899: OUTPUT«except␤ in submethod BUILD at /tmp/LnOLhhTqHD:1␤ in method BUILDALL at src/gen/m-CORE.setting:961␤ in method bless at src/gen/m-CORE.setting:944␤ in method new at src/gen/m-CORE.setting:18258␤ in block at /tmp/LnOLhhTqHD:1␤␤» [22:46] *** ptc_p6 left [22:47] *** ash___ joined [22:49] *** Alina-malina left [22:49] *** Alina-malina joined [22:51] does anyone know if/where there is a perl6/nqp grammar for emacs or vim? I am working on a Textmate/Atom one and what to be consistent [22:51] *** vendethiel left [22:52] and by grammar, I mean for syntax highlighting [22:52] ash___: https://github.com/vim-perl/vim-perl [22:52] *** Isp-sec left [22:52] *** bjz left [22:52] Textmate! [22:52] *** rurban left [22:53] yeah the vim one isn't perfect but is quite good [22:53] *** kurahaupo left [22:53] *** vendethiel joined [22:53] *** rurban joined [22:54] *** rurban1 joined [22:54] timotimo: the way it is used to abstract Setty.new and Set / SetHash is pretty cool [22:54] github also uses the textmate highlighting in their site now, which why some files don’t look right now [22:55] is BUILD technically a phaser? it isn't listed as such in S04 [22:55] *** BenGoldberg joined [22:55] *** rurban1 left [22:57] *** Celelibi left [22:57] *** ggherdov left [22:58] *** rurban left [23:00] *** Celelibi joined [23:00] it's not syntactically a phaser [23:00] it is called automatically, which is why it's in CAPS [23:05] *** ohcamacj-2 left [23:07] *** cognominal left [23:07] *** ggherdov joined [23:07] *** ohcamacj-2 joined [23:08] *** pyrimidi_ joined [23:09] *** hugme left [23:09] gotcha, thanks for clarifying. [23:10] *** pyrimidine left [23:10] *** hugme joined [23:10] *** ChanServ sets mode: +v hugme [23:13] *** smls left [23:14] *** denis_boyun_ left [23:15] *** cognominal joined [23:16] *** vendethiel left [23:18] *** treehug88 left [23:25] *** bloonix joined [23:28] *** vendethiel joined [23:30] *** gfldex left [23:30] so when subclassing and also defining a .new, it's probably a good practice to call self.bless [23:31] nqp: d7849cb | TimToady++ | src/QRegex/NFA.nqp: [23:31] nqp: plug more null state holes [23:31] nqp: [23:31] nqp: As a rule, if you add an edge to -1 to generate a new state, you should [23:31] nqp: always *do* something with that new state, or it generates null epsilons. [23:31] nqp: review: https://github.com/perl6/nqp/commit/d7849cb3ce [23:31] bless will make sure ancestors do their part [23:32] ^^^ fixes the crash with t/spec/integration/99problems-41-to-50.t [23:32] All tests successful. [23:32] *** virtualsue left [23:32] *** lizmat joined [23:33] yeah, i'm liking P6's BUILD semantics a lot. this blog post is getting a bit thick in the middle :) [23:33] oh, I'd better bup [23:33] *m [23:33] *** ggoebel111111115 joined [23:34] rakudo/nom: dd27056 | TimToady++ | tools/build/NQP_REVISION: [23:34] rakudo/nom: bump nqp [23:34] rakudo/nom: review: https://github.com/rakudo/rakudo/commit/dd27056fcb [23:34] *** smls joined [23:35] *** ggoebel111111114 left [23:35] *** denis_boyun_ joined [23:36] .oO( wish we could see why nqp was bumped in the rakudo git log ) [23:37] well, but it's in the nqp git log, which is why we had to bump it :) [23:37] and do i assume correctly that Mu's BUILD is always called, even if a .new is defined but doesn't call self.bless? [23:38] I don't think so [23:38] not unless you defer to the built-in new from your new [23:38] when nextsame or so [23:38] *with [23:39] but if the reason for your own new is to change the argument processing, builtin new won't like it [23:39] so better to call .bless [23:40] only one new needs to call .bless [23:40] in the class hierarchy? [23:41] yes, for a given lineage [23:41] BUILDALL does all the hard work [23:41] and makes sure parents are ready before children [23:43] hmmm.. but any subclass .new overrides the parent .new, so i'm confused by "only one new needs to call .bless" [23:45] I meant dynamically, not statically [23:45] unless i take your meaning as, you only need self.bless called once, because BUILDALL does what it says :) [23:45] every new wants to have a bless, but you only need to run the most derived .bless [23:46] * TimToady did not realize he said something terribly ambiguous, which is unusual for him... [23:46] means I need a nap, in all likelihood... [23:46] ok, so good practice is to always call bless? sorry to be hammering the point, but i want to give good advice [23:48] yes, in general, though of course there are always exceptions, like if you just want to write a logging new around the built-in [23:48] in that case use callsame or nextsame instead [23:49] note that BUILDALL is a virtual call, so even if a parent calls .bless, all the correct BUILDs are run [23:50] *** vendethiel left [23:50] bless always needs to be called by someone, let's put it that way [23:51] and it's the most derived new's responsibility to either call .bless or call something that will call .bless [23:52] (note that this is all an oversimplification when it comes to native types with other representations than P6Opaque) [23:52] i see. yeah, i'm looking for the general rule. the edge cases can have their own blog post :) [23:53] *** vendethiel joined [23:54] * TimToady is tired of generalities, and specifically wants a nap :) [23:54] & [23:55] enjoy TimToady :) [23:55] m: class D { submethod BUILD { say "D.BUILD" } }; class E is D { method new { say "E.new"; self.bless } }; class H is E { method new { say "H.new" } }; H.new [23:55] rakudo-moar 91d899: OUTPUT«H.new␤» [23:56] still lost in the contrast between that code snippet and "so even if a parent calls .bless, all the correct BUILDs are run", but sleep is appealing to me as well [23:56] m: class D { submethod BUILD { say "D.BUILD" } }; class E is D { method new { say "E.new"; self.bless } }; class H is E { method new { say "H.new"; nextsame } }; H.new [23:56] rakudo-moar 91d899: OUTPUT«H.new␤E.new␤D.BUILD␤» [23:57] m: class D { submethod BUILD { say "D.BUILD" } }; class E is D { method new { say "E.new"; self.bless } }; class H is E { method new { say "H.new"; self.bless } }; H.new [23:57] rakudo-moar 91d899: OUTPUT«H.new␤D.BUILD␤» [23:57] that's all correct [23:57] it's crystal now [23:57] thanks :D [23:57] thunk & :D [23:58] *** rmgk_ joined [23:58] *** rmgk left [23:58] *** rmgk_ is now known as rmgk [23:58] p56: s/(.)(.*)(.)/First [$1], Second [$2], Third[$3]/; # Why does the rhs of s/// dissapear with p56? [23:58] p5-to-p6 : OUTPUT«s:P5!(.)(.*)(.)!!␤» [23:59] *** woolfy joined