[00:00] TimToady: how nonsensical? [00:01] does anything even use that $? [00:02] no [00:02] and why should it be [':','dba']? [00:02] ah [00:02] it just turned it into ':dba' since the «» code is what was giving undef warnings [00:03] r31062 | sorear++ | [viv] Add a --no-indent option; rebootstrap with it [00:03] how is the new build working for you? [00:03] I hope it still indents the yaml :) [00:03] it doesn't affect yaml [00:04] it's just no warnings 'redefine'; *indent = \&no_indent [00:04] so the code generator never puts in the spaces [00:04] HACKALERT!!! :) [00:05] I'm not afraid of typeglobs [00:06] .oO(fools rush in...) [00:06] possibly a conditional in ::indent itself would have been clearer [00:08] oh, I probably didn't actually fix the warning, if $M is undefined... [00:09] *** yinyin joined [00:16] r31063 | lwall++ | [STD,Cursor] suppress undef warnings [00:20] TimToady: how well has the new build system been working for you? [00:21] pretty okay; I don't know what the new targets are, but 'make clean' and 'make' seem to work :) [00:21] I use make fast, mostly [00:22] make STD.pmc too [00:22] *** ash__ left [00:26] it's slower than I'd like [00:27] *** ash__ joined [00:27] there's also 'make reboot', which causes the current built version of STD.pm6 to be used for future builds [00:29] though 'make reboot' can conceivably break the build for 'make clean'ers [00:31] how so? you mean if you wrote a bad version of STD.pm6? [00:31] *** ashleydev left [00:31] if you introduced a dependency on something that a fresh build doesn't know how to do [00:32] no, make reboot copies the *compiled* version [00:32] *** justatheory left [00:33] std: 63 [00:33] *** LylePerl left [00:33] std 31063: OUTPUT«ok 00:01 110m␤» [00:34] *** LylePerl joined [00:35] r31064 | sorear++ | [viv] Re-enable required argument checking for only subs [00:35] r31064 | [STD] Declare EXPR argument as optional [00:37] *** rgrau left [00:40] sorear: have you figured out why \x et al. are not recognized in regexes? [00:40] since t/spec/S05-mass/named-chars.t is one of the regressions [00:45] hmm, can recognize /\xAB/ but not /\x[AB]/ [00:45] std: /\xAB/ [00:45] no [00:45] std 31063: OUTPUT«ok 00:01 108m␤» [00:45] std: /\x[AB]/ [00:45] std 31063: OUTPUT«===SORRY!===␤Unrecognized regex backslash sequence at /tmp/utnzSrqANQ line 1:␤------> /\⏏x[AB]/␤Potential difficulties:␤ [AB] appears to be an old-school character class; please use <[AB]> if you␤ mean a character class, or quote it like [00:45] ..'AB… [00:45] looking... [00:48] it might have something to do with the bit where I made '{' ~ '}' mean '{' {} ~ '}' [00:48] std: /\Z/ [00:48] std 31063: OUTPUT«===SORRY!===␤Unsupported use of \Z as end-of-string matcher; in Perl 6 please use \n?$ at /tmp/CDErcWmdgI line 1:␤------> /\Z⏏/␤Parse failed␤FAILED 00:01 107m␤» [00:49] I see there's a lazymap in there, perhaps deferring the match to outside the local $::GOAL's scope is a problem somehow [00:49] it's not supposed to be using $*GOAL for anything other than messages though now [00:50] and the really stopper is supposed to always travel with the type of the Cursor [00:50] *** lest_away is now known as lestrrat [00:51] if you want to look at it, I'll stop for now [00:51] no [00:51] the problem with the --no-indent is that there isn't an indented .pm5 out there I can just look at. :) [00:52] having it a separate make step meant that both versions were always there [00:54] r31065 | sorear++ | [STD-ecosystem] Add a STD.pm5 target [00:54] yes, that is the downside [00:55] but with the code-gen side of viv as fast as it is... I think it's tolerable [00:58] TimToady: STD.pm6 +3791. viv is generating $0 as an array because it occurs inside a quantifier. Is this correct behavior? [01:01] *** envi^home joined [01:03] yeah, needs a .[0] [01:04] *** whiteknight left [01:04] or a way in P5 to add .Str to ARRAY :) [01:08] *** pausenclown left [01:09] *** ashleydev joined [01:13] *** pausenclown joined [01:16] *** madalu joined [01:21] *** masonkramer__ left [01:21] *** masonkramer_ joined [01:22] *** envi^home left [01:22] *** plobsing joined [01:25] *** envi^home joined [01:26] need to add to the README that JSON is now a requirement for STD compilation :) [01:27] random rakudo question, why is 'assign' in the filename 'src/builtins/assign.pir' not capitalized like all the other files in that directory? [01:27] because it's not a class [01:27] or role [01:27] or type [01:28] ok, thanks [01:30] *** Schwern joined [01:32] sorear: I get a lot farther now with building STD than earlier. [01:33] (still building... lots of "Use of uninitialized value ..." warnings) [01:33] yes, TimToady++ just fixed some of those [01:34] r31066 | sorear++ | [STD] add missing [0] for dumbsmart [01:36] r31067 | sorear++ | [viv] Remove obsolete dependency on JSON [01:36] 1 regression down [01:37] *** Schwern left [01:37] ok if I add comments to RT tickets that say "actually it looks like rakudo does this correctly now. " ? [01:38] *** uvtc joined [01:38] awwaiid: please do so, yes! [01:38] awwaiid: and thanks! [01:39] np [01:41] Hi #perl6. I just installed Parrot (with Rakudo) into `/usr/local/parrot`. Not sure how much sense this question makes, but, where is Rakudo's implementation of the Perl 6 "standard library"? [01:42] uvtc: in the sources, generally in src/core/*.pm [01:43] beyond that, there's not really a "standard library" defined by the language. Different distributions will be able to choose what modules to bundle with the distribution. [01:44] sorear: build completed on my system, trying "make test" now. [01:44] I don't have a `/src/core` dir. Inside `/usr/local/parrot/src`, there's `2.4.0-devel`, and inside that, `ops`, `pmc`, and a couple of vtable files. [01:45] uvtc: in the rakudo sources, not in the installed [01:45] the core library is compiled in as part of the rakudo executable [01:46] sorear, it appears that in \x[ it is not matching the [ because the pattern has an extra backslash: [01:46] 3/1 TOP comp_unit statementlist statement EXPR termish term term__S_086value value value__S_135quote quote quote__S_142Slash_Slash nibble nibbler EXPR termish quant_atom_list quantified_atom atom metachar metachar__S_037Back backslash backslash__S_065x:::::::: PATTERN (?-xism:\G(?i:\\\[)) didn't match at 3 [01:46] see that it says \\\[ [01:46] pmichaud: Ah. compiled in. I see. Thanks. [01:47] sorear: so I think it's a translation error [01:52] ahhh, backslashes, my sworn enemy [01:53] looks like it builds fine on my system now. [01:53] (std, that is) [01:53] sorear++ TimToady++ [01:54] *** yinyin left [01:56] TimToady: found the error [01:59] *** azert0x_ left [01:59] *** azert0x left [02:00] r31068 | sorear++ | [viv] Fix double escaping of strings in case ignoring contexts (TimToady++ for doing most of the work) [02:01] *** bacek joined [02:01] Hello bacek [02:01] *** [mark] joined [02:02] TimToady: All three regressions are now fixed [02:07] snaptesting [02:12] I'd like to install Proto and try it out (by having it install the web module), but the install instructions on the Proto page (http://github.com/masak/proto) aren't working. The command runs, but evidently fails to get the proto.pl file. [02:13] (Aren't working *for me*, I mean.) [02:13] Anyone have any tips on how I might get it installed? [02:13] My guess is that, once I get a proto.pl file, it should go with my `perl6` binary in `/usr/local/parrot/bin`. [02:15] Oops. Actually, looks like I can just grab the file by itself from github. [02:18] *** drbean left [02:18] *** drbean joined [02:18] r31069 | sorear++ | [STD] Update bootstrap to get TimToady++'s undef fixes into the build [02:19] *** ashleydev left [02:23] *** bacek left [02:23] *** agentzh joined [02:25] *** envi^home left [02:25] *** rhr left [02:25] *** Sarten-X left [02:25] *** p6eval left [02:25] *** TimToady left [02:25] *** constant left [02:25] *** avar left [02:25] *** kolibrie left [02:25] *** literal left [02:28] *** envi^home joined [02:28] *** rhr joined [02:28] *** Sarten-X joined [02:28] *** avar joined [02:28] *** p6eval joined [02:28] *** TimToady joined [02:28] *** constant joined [02:28] *** kolibrie joined [02:28] *** literal joined [02:28] *** card.freenode.net sets mode: +vo p6eval TimToady [02:28] Passed 782/815, 95.95% [02:28] that's pretty darn good [02:29] *** TiMBuS joined [02:30] I pronounce this stage of bootstrap complete. [02:30] sorear++ sorear++ sorear++ sorear++ sorear++ sorear++ [02:31] gimme5 is now officially pining for the fjords :) [02:31] r31070 | sorear++ | [gimme5] Delete. (And there was much rejoicing.) [02:32] I thought you'd enjoy doing that :) [02:35] *** uvtc left [02:37] *** mantovani left [02:37] *** mantovani joined [02:41] r31071 | lwall++ | [viv] make sure .pmc has trailing newline [02:48] *** meppl left [02:49] r31072 | colomon++ | [t/spec] Update hyper tests to match new spec. [02:49] *** satyavvd joined [02:51] gimme5...wait a second. What was that used for again, and why is there much rejoicing? [02:51] (( and why are you guys copying Python with the references? )) [02:52] just because someone else likes the same thing you do doesn't mean you have to quit liking it... [02:52] I wasn't complaining about the Python references. I found it...slightly funny actually. [02:53] gimme5 was the chewing-gum-and-bailing-wire translator from P6 to P5 that we used to run std: with up till today [02:53] Then again, I have to remember that Perl 6 seems to be combining many language aspects. Only makes sense for the jokes to translate. [02:53] sorear++ has developed viv to the point where it can now do the same translation, so we no longer need gimme5 [02:53] and it does the translation "right" rather than cheating all over the place [02:53] "to the point"...soundsl ike something is missing then. [02:54] well, it still uses modules written in Perl 5, such as Cursor and Lazymap [02:54] next step is to rewrite those in P5 and translate using viv, so the whole system is in P6 [02:55] *** ShaneC left [02:56] but once those are done...then even more progress in Perl 6 [02:56] with viv we can start to think about running BEGIN blocks, for instance [02:57] and we can use viv to target other backends than P5 [02:57] *** xinming_ is now known as xinming [02:57] and we can do some of the optimizations that were impossible with gimme5 [02:57] and we can stop writing STD in the subset of P6 that gimme5 groks [02:58] alright, viv is the new hero, got it [02:58] viva la viv [03:02] *** pausenclown left [03:03] gimme5 consisted of 1200 lines of Perl5 s/// statements being used to turn a subset of perl 6 into perl 5 [03:03] +800 lines of regex compiler [03:03] viv works by passing Perl 6 into STD.pm6, then generating Perl 5 from the parse *tree* [03:03] *** pausenclown joined [03:04] so it accepts a much larger subset of perl 6 [03:04] e.g. gimme5 couldn't really handle postcircumfixes [03:04] I recall a++ has a postfix in ++. What's the postcircumfix again? [03:05] @a[2] [03:05] it's a postfix operator that has an expression [03:05] with gimme5, you had to write the method call form [03:06] ...I'm not quite seeing how making a postcircumfix would be useful. Got a sub you can make? [03:07] sub sum(@arr) { my $x = 0; for (0 .. ^@arr) { $x += @arr[$_] } } [03:08] ...I think I asked the wrong question [03:08] the reason you can't see why they'd be useful is that you're taking them for granted [03:08] I've made custom infixes and prefixes before. [03:08] But where would a custom postcircumfix come in handy? [03:08] I'm not talking about custom ones [03:08] gimme5 couldn't handle the *standard* ones [03:09] ...woah. Okay, missed that detail. [03:09] *** satyavvd left [03:09] *** bjarneh joined [03:09] *** justatheory joined [03:16] *** ash__ left [03:25] Is backtracking from one LTM alternative into the next-longest token implemented yet? [03:25] yes, that's what relex controls [03:26] well, $relex, since it's always anonymous [03:27] *** yinyin joined [03:27] see Cursor.pmc:531 [03:28] aha [03:29] what about something like [ a | aa ] ab [03:29] can it backtrack into a group of alternations [03:29] I believe so, but I could be wrong [03:30] if so, it's done with lazymaps [03:30] it won't happen under :r of course [03:30] *** madalu left [03:33] * sorear -> svnweb [03:35] What is "failover"? [03:35] context? [03:36] generally, when your first try or set of tries don't work, and you'd ordinarily get an exception, but you have something else to try instead [03:37] we used to do a lot more of it in the design of p6, but we've tended to avoid it in recent years when possible [03:37] we used to failover between methods and functions, and vice versa [03:38] looking in GLOBAL for dynvars that aren't in the dynamic scope is also a failover [03:39] die "failover no longer implemented" [03:39] where? [03:39] gimme5, RE_any::walk [03:41] oh, in that case, it originally assumed that the fates or relexes were unreliable, so would retry all the cases one by one, much more like rakudo still does [03:41] when the relexing worked, we didn't have to do that anymore [03:41] STD has trusted its relexing for more than a year now, I think [03:45] *** skids left [03:52] * sorear debates adding no warnings 'misc' so as to make my $C = foo; my $C = $C->bar; legal without intervening braces [03:53] that only works if you never need access to the original $C [03:55] *** satyavvd joined [03:57] and it doesn't really buy you much in p5 [03:57] since most blocks parasitize their sub's lexpad anyway [04:21] *** ashleydev joined [04:23] *** jaldhar joined [04:24] r31073 | lwall++ | [viv] is no longer a "start" on replacing gimme5 :) [04:33] *** tedv left [04:38] *** mtnviewmark joined [04:40] *** mtnviewmark left [04:41] *** Wolfman2000 left [04:42] *** envi^home left [04:42] *** envi^home joined [04:44] *** plainhao left [04:48] *** ashleydev left [04:50] r31074 | sorear++ | [viv] Overhaul indentation engine; should be much more readable now [04:53] *** yinyin left [04:54] Why it is not displaying all the methods of HASH? [04:54] perl6 -e 'for Hash.^methods(:global) -> $meth { say $meth.name , "-", $meth.WHAT }' [04:55] but same works for 'Array' [04:57] ??? [05:00] *** patspam left [05:01] *** PenThrive left [05:03] interestingly: [05:03] rakudo: for { a => 1 }.^methods(:global) -> $meth { say $meth.name , "-", $meth.WHAT } [05:03] rakudo 18d996: OUTPUT«sort-Multi()␤Bool-Method()␤list-Method()␤postcircumfix:<{ }>-Multi()␤push-Method()␤delete-Method()␤of-Method()␤elems-Method()␤invert-Multi()␤Str-Method()␤reverse-Method()␤keys-Method()␤postcircumfix:<{ [05:03] ..}>-Multi()␤pairs-Method()␤contains-Method()␤exists-Method()␤kv-Method()␤ACCEPTS-… [05:15] *** kaare joined [05:15] *** kaare is now known as Guest6050 [05:23] *** finanalyst joined [05:30] *** bacek joined [05:31] *** cli_ left [05:35] *** szabgab joined [05:36] *** dukeleto joined [05:37] howdy [05:38] hello [05:38] i am trying to load perl6.pbc from rakudo in PL/Parrot, and I am running into this: http://gist.github.com/423516 [05:38] * dukeleto is trying to make PL/Perl6 work on PL/Parrot [05:39] If you ever figure out how to make this work, tell us. [05:40] I would very much like to know why loading languages in Parrot is so balky. [05:43] satyavvd: something like this [05:43] rakudo: class B { method class_B{} }; role A is B { method role_A(Str $test) {} }; say A.^methods(:global) [05:43] rakudo 18d996: OUTPUT«role_A␤» [05:43] rakudo: class D { method class_D{} }; class C is D { method role_C(Str $test) {} }; say C.^methods(:global) [05:43] rakudo 18d996: OUTPUT«role_Cclass_DcanNumericelemsendreduceStrkeysreverseisauniqclassifymappairskvACCEPTSminmaxpickfirstminmaxdoesgrepvaluesjoinWHICHperlCREATECapturePARROTblessWHENCEWHERElistnotdefBUILDALLnewBoolsayprintdefinedWALKitemBUILDREJECTSclone␤» [05:43] rakudo: class B { method class_B{} }; role A is B { method role_A(Str $test) {} }; say A.new.^methods(:global) [05:43] rakudo 18d996: OUTPUT«role_Aclass_BminmaxdoesgrepvaluesjoincanNumericelemsendreduceStrreversekeysuniqisaclassifymappairskvACCEPTSminmaxpickfirstBUILDALLnewBoolsayprintdefinedWALKitemREJECTSBUILDcloneWHICHperlCREATECapturePARROTblessWHENCEWHERElistnotdef␤» [05:44] sorear: i will let y'all know, but would appreciate any help peeps in here have to give :) [05:44] not saying it's right, but that's what happens with Hash (a role) inheriting from a class (EnumMap) [05:44] ok [05:45] ask jnthn or someone.. could be a bug (I don't know enough) :) [05:46] yup ..Thanks [05:46] *** BrowserUk joined [05:49] *** yinyin joined [05:55] <[Coke]> anyone recall the git magic to make the old 'ng' branch the new 'master' ? [05:56] git checkout master; git reset --hard ng [05:56] [Coke]: git branch -M ng master [05:59] *** hudnix left [06:01] *** eternaleye left [06:02] <[Coke]> dukeleto: what happens to master then? [06:02] <[Coke]> (old master)? [06:04] [Coke]: it goes into the ether, maybe not what you want [06:05] [Coke]: but you could do git branch -m master old_master beforehand [06:05] *** frodwith left [06:06] *** uniejo joined [06:06] <[Coke]> dukeleto: eh. ether is prolly OK in this case. danke. [06:07] *** frodwith joined [06:18] *** eternaleye joined [06:19] *** Su-Shee joined [06:25] *** abhy joined [06:28] *** abhy left [06:35] *** justatheory left [06:45] *** xomas left [06:46] good morning [06:46] *** viklund joined [06:47] *** frodwith left [06:48] good morning moritz_ [06:48] installing Try::Tiny... [06:49] There is no try there is only do. [06:49] really? [06:50] * BinGOs was throwing StarWars™ quotes around. [06:50] Try::Tiny has been a Moose dependency for quite a while [06:50] *** frodwith joined [06:52] ouch [06:52] is use v6; required by the specs ? currently rakudo can live without it [06:52] I've tried to build a debian package for Try::Tiny [06:52] and had the local::lib env variables lying around [06:53] so it made a debian package that installed into /home/moritz/perl/ [06:53] szabgab: "it depends" (more) [06:53] szabgab: when the binary is called 'perl6', v6 is the default mode [06:54] szabgab: but if the binary is called 'perl', v5 should be the default, and the 'use v6;' is required to enable Perl 6 mode [06:54] rakudo: my $x = 0; while ($x < 3) { say $x++ } [06:54] rakudo 18d996: OUTPUT«0␤1␤2␤» [06:54] rakudo: my $x = 0; while ($x < 3){ say $x++ } [06:54] rakudo 18d996: OUTPUT«===SORRY!===␤Missing block at line 11, near ""␤» [06:54] this is a parsing error right? [06:54] yes [06:54] without a space, the {...} is parsed as a postcircumfix [06:55] the right thing to do is to omit the parens [06:55] rakudo: my $x = 0; while $x < 3 { say $x++ } [06:55] oh, so it will never work that way? [06:55] rakudo 18d996: OUTPUT«0␤1␤2␤» [06:55] right [06:55] std: my $x = 0; while ($x < 3){ say $x++ } [06:55] ah [06:55] std 31074: OUTPUT«===SORRY!===␤Missing block (apparently gobbled by undeclared routine?) at /tmp/BjbKAwHt8k line 1 (EOF):␤------> my $x = 0; while ($x < 3){ say $x++ }⏏␤Parse failed␤FAILED 00:01 111m␤» [06:55] ty [06:55] you're welcome [06:56] sorear: STD.pm build goes much further this time [06:56] like, finished \o/ [06:59] afk [06:59] *** plobsing left [07:16] GNAGNA. COULD I PLEASE HAVE PERL6 NOW? this is a nuisance, this old stuff. [07:16] *** aindilis left [07:17] *** aindilis` joined [07:25] *** xomas_ joined [07:25] *** xomas_ left [07:25] *** xomas_ joined [07:41] *** clintongormley joined [07:41] *** ejs joined [07:45] r31075 | sorear++ | [viv] Start bringing _PATTERN under the DEEP framework, and implement combination of quantifiers with atom regexes. -2% STD.pm5 size [07:48] *** ejs left [07:48] *** ejs joined [07:49] TimToady: I'd love to optimize [ a | b ] into <[ a b ]>; could that be made to play nicely with LTM? [07:53] *** aindilis` left [07:57] *** wallberg joined [07:58] *** BrowserUk left [07:58] *** zostay left [07:59] what is your suggested way to prompt for a value with a condition? my $val = prompt("Please give number below 50"); while $val >= 50 { $val = prompt("Please...") } [07:59] that has the same prompt twice [07:59] *** zostay joined [08:00] *** dms joined [08:00] I guess: my $val; while not defined $val or $val >= 50 { $val = prompt("...") } [08:00] anything better ? [08:00] Morning [08:00] gm [08:01] *** dms left [08:02] while my $val = promt(...) < 50 { ... } [08:02] while my $val = promt(...) < 50 { 1 } [08:04] 1 while (my $val = prompt(...)) < 50; [08:05] "Ask the user. If the answer is incorrect, ask again." [08:05] $val = prompt() while $val < 50; [08:06] that's not even the right translation [08:07] sub ask($sm, $prompt) { my $val; do { $val = prompt $prompt } until $val ~~ $sm; $val } [08:07] ask: my $val = prompt(); if $val < 50 { got ask }; [08:07] s/got/goto/ [08:07] j/k :-) [08:07] ask * >= 50, "Enter a number over 50" [08:08] rakudo: say prompt() [08:08] rakudo 18d996: OUTPUT«No applicable candidates found to dispatch to for 'prompt'. Available candidates are:␤:(Any $msg)␤␤ in main program body at line 11:/tmp/utKUl1Z0j4␤» [08:08] rakudo: say prompt('') [08:08] rakudo 18d996: OUTPUT«Land der Berge, Land am Strome,␤» [08:08] :D [08:09] *** Snarkyboojum_ joined [08:09] *** Snarkyboojum_ left [08:10] rakudo: say $*IN.slurp.substr(0, 10) [08:10] rakudo 18d996: OUTPUT«Land der B␤» [08:10] r31076 | sorear++ | [viv] Combine regexes in sequence nodes [08:10] is that the German national anthem? [08:11] rakudo: say $*IN.slurp.comb.classify({$_}).sort({+.value}).batch(5).map({.key}) [08:11] sorear: Australian [08:11] rakudo 18d996: OUTPUT«Method 'batch' not found for invocant of class 'Parcel'␤ in main program body at line 11:/tmp/KZgpvkWzA6␤» [08:11] rakudo: say $*IN.slurp.comb.classify({$_}).sort({+.value}).[^5].map({.key}) [08:11] rakudo 18d996: OUTPUT«TZAÄD␤» [08:12] sorear: erm, Austrian [08:12] close miss :-) [08:12] rakudo: say $*IN.slurp.comb.classify({$_}).sort({-.value}).[^5].map({.key}) [08:12] rakudo 18d996: OUTPUT«e rin␤» [08:13] *** JimmyZ joined [08:13] rakudo: &$foo; [08:13] rakudo 18d996: OUTPUT«===SORRY!===␤Confused at line 11, near "&$foo;"␤» [08:15] known bug? [08:15] rakudo: $foo(); [08:15] rakudo 18d996: OUTPUT«===SORRY!===␤Symbol '$foo' not predeclared in ␤» [08:15] JimmyZ: syntactically invalid [08:15] std: my $foo; &$foo [08:15] std 31075: OUTPUT«ok 00:01 108m␤» [08:15] JimmyZ: I think it's known [08:16] moritz_: ok, ignore it :) [08:17] rakudo: while my $val = prompt("num ") >= 10 {}; say $val; [08:17] rakudo 18d996: OUTPUT«num 0␤» [08:18] that's not good as the second $val is not the same scope [08:18] it is [08:18] in Perl 6 [08:19] rakudo: while (my $val = prompt("num ")) ~~ /Strome/ {}; say $val; [08:19] rakudo 18d996: OUTPUT«num num Land der Äcker, Land der Dome,␤» [08:19] ok, maybe it is but I get 0 there [08:19] no matter how hard I press the keyboard :-( [08:19] yes, because $*IN doesn'T contain numbers [08:19] (on p6eval at least) [08:20] rakudo: while my $num = 7 >= 10 {}; say $num; [08:20] rakudo 18d996: OUTPUT«0␤» [08:20] precedence [08:20] rakudo: while (my $num = 7) >= 10 {}; say $num; [08:20] rakudo 18d996: OUTPUT«7␤» [08:21] rakudo: while (my $num = 12) >= 10 {}; say $num; [08:21] ok I tripped it :-) [08:21] rakudo 18d996: ( no output ) [08:21] no worries, it has a timeout [08:21] so I need the parentheses there I think, right? [08:22] for the precedence [08:22] right [08:22] because comparisons are tighter than assignment [08:24] *** Maddingue[work] joined [08:25] if I could write it my $num = prompt while $num >= 10; ... [08:25] rakudo: my $num = 7 while $num >= 10; say $num; [08:25] rakudo 18d996: OUTPUT«Use of uninitialized value in numeric context␤Any()␤» [08:26] rakudo: my $num = 7 while not defined $num or $num >= 10; say $num; [08:26] rakudo 18d996: OUTPUT«7␤» [08:27] *** eternaleye left [08:31] r31077 | moritz++ | [t/spec] unfudge some advent tests for rakudo [08:32] *** pmurias joined [08:34] rakudo: a1140cc | moritz++ | build/PARROT_REVISION: [08:34] rakudo: bump PARROT_REVISION to get latest nqp-rx fixes [08:34] rakudo: review: http://github.com/rakudo/rakudo/commit/a1140cc736a9028574eb5d976265db69efa56bb8 [08:37] *** eternaleye joined [08:40] *** dakkar joined [08:44] *** wallberg left [08:47] *** snarkyboojum left [08:48] \o/ all JSON parsing tests pass agian [08:50] r31078 | sorear++ | [viv] Fix a bug which caused 345 unneccessary lazymaps in STD.pm5. (But only saves 15 seconds?) [08:52] *** meppl joined [08:53] *** snarkyboojum joined [08:54] rakudo: 'a b c'.subst(//, -> $m { uc $m }, :g) [08:54] rakudo a1140c: ( no output ) [08:54] rakudo: say 'a b c'.subst(//, -> $m { uc $m }, :g) [08:54] rakudo a1140c: OUTPUT«A B C␤» [09:05] * sorear starts a NYTProf run over STD.pm6 and goes to sleep [09:08] *** dju joined [09:08] rakudo: say 'abc'.samemark('ö') [09:08] rakudo a1140c: OUTPUT«Method 'samemark' not found for invocant of class 'Str'␤ in main program body at line 11:/tmp/Uip9Zlpb4l␤» [09:18] rakudo: Range ~~ Iterable [09:18] rakudo a1140c: ( no output ) [09:18] rakudo: say Range ~~ Iterable [09:19] rakudo a1140c: OUTPUT«1␤» [09:19] rakudo: say Positional ~~ Iterable [09:19] rakudo a1140c: OUTPUT«0␤» [09:22] *** ispeak joined [09:32] *** pmurias left [09:38] *** ruoso joined [09:52] hi moritz_ [09:52] someone noticed this today http://gist.github.com/423699, is it buggy or how things are supposed to work? [09:55] snarkyboojum: I think it's ok (more) [09:56] ah ok - so only shows the first method in the role [09:56] snarkyboojum: because a role can't really inherit from a class... it can just pass on the inheritance rule to classes it's mixed into [09:56] Mmm.. okydoke.. the real world example was Hash (it's a role that inherits from EnumMap) [09:57] so inspecting Hash.^methods for example, only shows the methods in the Hash role [09:57] rakudo: my @a = < a b c d e>; my @b = ; say @a Z @b xx * -> $a, $b { say "$a$b" } [09:57] rakudo a1140c: OUTPUT«===SORRY!===␤Confused at line 11, near "say @a Z @"␤» [09:57] *** yinyin left [09:57] *** masak joined [09:58] rakudo: my @a = < a b c d e>; my @b = ; for @a Z @b xx * -> $a, $b { say "$a$b" } [09:58] rakudo a1140c: OUTPUT«a_block60␤» [09:58] rakudo: say Hash.^methods() [09:58] rakudo: my @a = < a b c d e>; my @b = ; for @a Z (@b xx *) -> $a, $b { say "$a$b" } [09:58] rakudo a1140c: OUTPUT«listBoolpostcircumfix:<{ }>!STOREpushdelete!push_constructsort␤» [09:58] rakudo a1140c: OUTPUT«a_block60␤» [09:58] say Hash.new().^methods() [09:59] snarkyboojum: that's less than awesome... maybe there should be class Hash too, and then introspection should be tricked into using the class variant [09:59] moritz_: yeah - something to show all the methods you'd expect to see when introspecting perhaps [09:59] rakudo: say Hash.new().^methods() [09:59] rakudo a1140c: OUTPUT«postcircumfix:<{ }>BoollistpushdeletesortiteratornewIntNumvaluesperlCaptureofelemsinvertStrreversepostcircumfix:<{ [09:59] ..}>keyspairscontainsexistskvACCEPTSfmtsqrtsinasincoshsuccsignasinhacosechabsucceilingunpolarfloorsamecasesubstrasechordroundflipsplitmatchacoshacosecwordscotancosechata… [10:00] that matches 'sexist' :-) [10:02] also matches a 'shaco', an anagram for 'chaos' [10:02] :P [10:02] hehe :) [10:02] I certainly never knew 'keyspairscontainssexists' [10:02] contain sexist skv :) [10:03] *** ive joined [10:04] oh hai, #perl6. [10:04] masak: 02 Jun 23:28Z tell masak I did hack up something for you that should be enough for encode, see example code at http://gist.github.com/423175 [10:04] masak: 02 Jun 23:29Z tell masak it's in ya buf branch, btw. [10:04] jnthn: \o/ [10:04] will look. [10:04] hi masak o/ [10:04] hi. what a lovely day for some Perl 6 work. :) [10:05] beautiful rainy night here :) [10:12] *** agentzh left [10:12] masak: what a shame I have to do $day-job instead [10:13] morning [10:13] well [10:13] somewhere it is [10:13] :) [10:13] masak: I realized that I didn't implement elements. [10:13] haven't looked yet. [10:13] I just woke up too. [10:14] masak: Though you may be able to work out how to do that from what's already theere...it's not like C actually has much syntax to get wrong. ;-) [10:14] I'm actually learning C a bit now, so that suits me. [10:14] :-) [10:14] C is a cute little language. [10:15] Yeah, it annoys me relatively little. [10:15] and it's fast. sometimes I compile and I go, "hey, did it actually do anything?" [10:15] I usually end up frustrated with its primitiveness [10:15] :-) [10:15] but it is refreshing after C++ compile times [10:15] mathw: Well, if I'm writing in C I'm generally doing something that is in some sense "primitive". [10:15] The hardest thing in C (if you ask me) is function pointers [10:16] But they're not that hard =) [10:16] the syntax around function pointers is nasty [10:16] arnsholt: That's only hard because the syntax is horrible. [10:16] but they're not that hard to actually use [10:16] mathw: Heh. :-) [10:16] I'm currently translating the Perl 6 Druid implementation to C, as an exercise: http://github.com/masak/sea-druid [10:16] function pointer typedefs are particularly entertaining [10:16] rakudo: if (3 = 3|4) { say 3 } [10:16] rakudo a1140c: OUTPUT«Cannot assign to readonly value␤ in '&infix:<=>' at line 1␤ in main program body at line 11:/tmp/bASHFoQTqG␤» [10:16] rakudo: if (3 == 3|4) { say 3 } [10:16] rakudo a1140c: OUTPUT«3␤» [10:16] rakudo: if (3 != 3|4) { say 3 } [10:16] rakudo a1140c: ( no output ) [10:17] rakudo: unless (3 != 3|4) { say 3 } [10:17] rakudo a1140c: OUTPUT«3␤» [10:17] rakudo: unless (3 == 3|4) { say 3 } [10:17] rakudo a1140c: ( no output ) [10:17] hmm, I must have seen something else locally [10:22] *** lestrrat is now known as lest_away [10:24] *** Trashlord left [10:29] *** Bzek joined [10:37] jnthn: Yeah, that's pretty much it =) [10:42] *** JimmyZ left [10:55] can I check if a string looks_like_number without regexes involved? [10:55] not really [10:56] it's something we want to enable in a natural way [10:56] but don't know yet how [10:56] $x.can_convert_to_number [10:56] the idea is that you just numify, and then somehow tell if there was information lost [10:56] Well, you can always use the grammar's number regex as well rather than rolling your own, I guess. [10:57] if +$foo eq $foo { ... } # quite strict [10:57] too strict [10:57] Depends what you're doing [10:57] rakudo: say +"1234e5" [10:57] rakudo a1140c: OUTPUT«123400000␤» [10:58] Right. If you're dealing with exponents it's no good. :-) [10:59] perl6: my $i = 5; while (--$i){ say "A" } [10:59] rakudo a1140c: OUTPUT«===SORRY!===␤Missing block at line 11, near ""␤» [10:59] ..elf 31078: OUTPUT«Parse error in: /tmp/4U9UVLw5Kb␤panic at line 1 column 11 (pos 11): Can't understand next input--giving up␤WHERE: my $i = 5; while (--$i){ say "A" }␤WHERE: /\<-- HERE␤ STD_red/prelude.rb:99:in `panic'␤ STD_red/std.rb:76:in `scan_unitstopper'␤ STD_red/std.rb:224:in [10:59] ..`com… [10:59] ..pugs: OUTPUT«*** ␤ Unexpected end of input␤ expecting operator or bare or pointy block construct␤ at /tmp/XKTZRXP72S line 2, column 1␤» [10:59] std: my $i = 5; while (--$i){ say "A" } [10:59] std 31078: OUTPUT«===SORRY!===␤Missing block (apparently gobbled by undeclared routine?) at /tmp/QsDBGDtSHU line 1 (EOF):␤------> my $i = 5; while (--$i){ say "A" }⏏␤Parse failed␤FAILED 00:01 112m␤» [10:59] masak: The implementations. They all say you're wrong. [10:59] ah, of course. postcircumfix<{ }>. [10:59] ;-) [11:00] Wow though. They all agree on something! [11:00] szabgab complains at the end of http://szabgab.com/blog/2010/06/1275598393.html that this is the case. [11:00] he always just complains :-) [11:00] but apart from adding an excellent error message for this particular case, I don't really see what to do about it. [11:00] szabgab: this is, I think, a sensible complaint. [11:01] but I pulled out my basball cards and showed my son the Indians and Orioles [11:01] :) [11:01] so he knows with who do we speak :) [11:02] 哈哈 [11:06] from Twitter today: "roles are flat". http://twitter.com/zenogantner/status/15315000868 [11:06] I find this to be a very compelling explanation. [11:08] masak: It's pretty much right. [11:08] masak: Role composition is described as "flattening composition" in the original paper that proposed them. [11:08] roles flatten when composed into classes. right. [11:09] That's why beyond composition time, the only runtime connection between a class and a role is that the class knows it does the role. [11:09] (I see some people mistakenly thing that we care about the role during method dispatch. We don't.) [11:09] *think [11:10] nod. [11:11] Perl 6 has the additional interesting nugget that when you write a role you're actually writing a role factory really. But that's not something you tend to need to think about too much. :-) [11:12] right. [11:12] lunch & [11:17] *** ispeak left [11:20] *** rv2733 joined [11:20] rakudo: my $a = [1, 2, 3]; say ($a xx 4).perl [11:20] rakudo a1140c: OUTPUT«[[1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3]]␤» [11:21] rakudo: my @a = (1, 2, 3); say (@a xx 4).perl [11:21] rakudo a1140c: OUTPUT«[1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3]␤» [11:21] :O [11:21] rakudo: my $a = (1,2,3); say ($a xx 4).perl [11:21] rakudo a1140c: OUTPUT«[(1, 2, 3), (1, 2, 3), (1, 2, 3), (1, 2, 3)]␤» [11:22] funnay [11:22] my $a = (1,2,3); my $b = (4,5,6); say (($a X $b) xx 4).perl [11:22] rakudo: my $a = (1,2,3); my $b = (4,5,6); say (($a X $b) xx 4).perl [11:22] rakudo a1140c: OUTPUT«[(1, 4), (1, 5), (1, 6), (2, 4), (2, 5), (2, 6), (3, 4), (3, 5), (3, 6)]␤» [11:23] :O [11:23] i was expecting 4 times that long list [11:23] rakudo: my $a = (1,2,3); my $b = (4,5,6); say ($a X $b xx 4).perl [11:23] rakudo a1140c: OUTPUT«(1, (4, 5, 6), 1, (4, 5, 6), 1, (4, 5, 6), 1, (4, 5, 6), 2, (4, 5, 6), 2, (4, 5, 6), 2, (4, 5, 6), 2, (4, 5, 6), 3, (4, 5, 6), 3, (4, 5, 6), 3, (4, 5, 6), 3, (4, 5, 6))␤» [11:23] whoa :O [11:25] seems to me (($a X $b) xx 4) is a bug. [11:25] probably related to exhausting the iterator that $a X $b returns. [11:25] aye [11:26] rakudo: my $a = (1,2,3); my $b = (4,5,6); my @a = ($a X $b).Seq; say (@a xx 4).perl [11:26] rakudo a1140c: OUTPUT«[(1, 4), (1, 5), (1, 6), (2, 4), (2, 5), (2, 6), (3, 4), (3, 5), (3, 6), (1, 4), (1, 5), (1, 6), (2, 4), (2, 5), (2, 6), (3, 4), (3, 5), (3, 6), (1, 4), (1, 5), (1, 6), (2, 4), (2, 5), (2, 6), (3, 4), (3, 5), (3, 6), (1, 4), (1, 5), (1, 6), (2, 4), (2, 5), (2, 6), (3, 4), (3, [11:26] ..5), (… [11:26] Maybe the refactors pmichaud++ is working on will help with that. [11:27] :) [11:27] I've just been looking at the new hyper stuff, and it seems to me that the (@dwimmyside xx *).batch(@otherside.elems) formulation is badly broken, in practical terms. [11:28] aye [11:28] or maybe it's just a flattening thing? [11:29] rakudo: my $a = (1,2,3); my $b = (4,5,6); my @a = ($a X $b).Seq; say (@a xx 4).batch(3) [11:29] rakudo a1140c: OUTPUT«Method 'batch' not found for invocant of class 'Array'␤ in main program body at line 11:/tmp/EtXPsYaQUA␤» [11:29] well, that. [11:29] hmmm.... [11:31] :D [11:37] * moritz_ has a pseudo-LTM .trans-implementation for literal strings [11:38] *** LylePerl left [11:39] moritz_: \o/ [11:39] moritz_: Once .trans is in place, I may be able to find tuits to look at tr///. [11:40] jnthn: shouldn't be too hard... .trans does the parsing of ranges itself [11:40] *nod* [11:40] *** CSSphil joined [11:40] *** CSSphil left [11:40] moritz_: I want to try and fix up smart-matching too [11:40] \o/ [11:41] moritz_: So it sets $_ as the RHS [11:41] *for the RHS [11:41] * colomon has a first stab at implementing the new rules for hyper [11:41] moritz_: Though I do wonder... [11:41] oooo, and compile fail [11:41] $_ = 42; 'lol' ~~ worreva; say $_; # lol or 42? [11:41] colomon: Oh? [11:42] jnthn: 42 [11:42] colomon: In master, or after the mods? [11:42] jnthn: just typos, I think. [11:42] moritz_: Why? [11:42] jnthn: announcing my code very prematurely. ;) [11:42] moritz_: That is, does this mean ~~ should not only set $_ but then unset it again afterwards? [11:42] *** pkkm joined [11:42] jnthn: I think so... it's a micro-topicalizer [11:42] jnthn: but better check the spec (or TimToady) first [11:42] OK. That makes it less fun to implement. [11:43] thought so. [11:43] The spec didn't see to be clear on either, from what I recall. But I should check latest. [11:44] Probably it's too surprising if we don't unset it. [11:44] *** snarkyboojum left [11:44] Though of course one day somebody is going to write for @x { if $y ~~ $_ { ... } } and get a surprise when they realize they're doing the equivalent of "if $y ~~ $y { ... }" :-) [11:45] > say ((1..10) <<~>> ).perl [11:45] ["1A", "2B", "3C", "4A", "5B", "6C", "7A", "8B", "9C", "10A"] [11:45] ooh! [11:45] colomon++ [11:45] colomon++ indeed [11:45] *** moritz_ sets mode: +o colomon [11:46] > say ((1..10) <<~<< ).perl [11:46] ["1A", "2B", "3C"] [11:46] > say ((1..10) >>~>> ).perl [11:46] ["1A", "2B", "3C", "4A", "5B", "6C", "7A", "8B", "9C", "10A"] [11:46] > say ((1..10) >>~<< ).perl [11:46] Sorry, sides are of uneven length and not dwimmy. [11:46] \o/ [11:46] (at this point I'm happy that lambdabot is permanently gone) [11:46] code is actually kind of cleaner after the change, too. [11:46] *** satyavvd left [11:47] *** JimmyZ joined [11:52] r31079 | moritz++ | [t/spec] fudge trans.t for Rakudo, and remove ambiguous rule for whitespace translation from one test [11:56] lunch & [11:58] rakudo: 3a6b43f | moritz++ | (2 files): [11:58] rakudo: First shot at pure-Perl Cool.trans [11:58] rakudo: It handles simple ranges and only literals as patterns. [11:58] rakudo: The range unpacking is greatly inspired by (David Green)++'s p6c mail. [11:58] rakudo: Also pyramidine++ for his initial implementation. [11:58] rakudo: review: http://github.com/rakudo/rakudo/commit/3a6b43feb3f9f948ac989f49a3cddc214cfd1788 [11:58] rakudo: say 1; exit; say 2 [11:58] rakudo a1140c: OUTPUT«1␤␤ in main program body at line 1␤» [11:58] rakudo: say ord('ö').fmt('%04x') [11:58] rakudo a1140c: OUTPUT«00f6␤» [11:59] calling exit; is not loved in rakudo ? [12:00] szabgab: worth a bug report [12:01] still rakudobug @ perl.org ? [12:02] yes [12:02] *** moritz_ sets mode: +o szabgab [12:03] *** ejs left [12:07] *** Trashlord joined [12:07] thanks [12:08] *** ejs joined [12:08] another strange thing is that prompt() throws and exception but prompt () (with a space) works [12:08] that's because the () counts as a positional argument [12:08] also prompt ("what?") works [12:09] and prompt expects one argument [12:09] it's pretty easy to give it a default value, if you can think of a good default [12:09] so that means that if I want to put parenthese around the function parameters I have to do it without leaving any space, right? [12:10] right [12:10] any function I mean [12:10] ok [12:11] I am not sure what does that mean that we are tripped so easily by such cases [12:12] it means that Perl 5 users do need to learn a few rules [12:15] *** ejs left [12:16] *** ejs joined [12:16] morning all [12:16] *** cognominal left [12:17] so what would be the recommended way to prompt for nothing? [12:17] prompt('') or prompt () ? [12:17] or prompt ''; ? [12:17] $*IN.get [12:17] :) [12:18] there's no reason to use prompt if you don't have a prompt [12:18] I thoughtthat $*IN was gone [12:18] it's the prefix:<=> that is gone [12:18] ok [12:18] former =$*IN is now $*IN.get [12:21] *** cognominal joined [12:24] That exit bug is already ticketed by masak++, I believe. [12:30] *** masonkramer_ left [12:32] I just realised how appropriate it is that the global filehandles have a * twigil [12:32] *** bluescreen joined [12:32] I may now have to go and swoon over Perl 6's beauty for a while [12:33] *** bluescreen is now known as Guest21689 [12:47] good morning, #perl6 [12:47] pmichaud: morning [12:48] o/ [12:48] morning, pmichaud [12:48] szabgab++ # excellent Perl tips and tricks posting [12:57] *** Bzek left [12:58] *** proller left [13:00] *** bjarneh left [13:01] *** sorear left [13:02] *** sorear joined [13:07] r31080 | colomon++ | [t/spec] Fix up for new hyper rules, unfudge tests that now work. [13:09] hi pmichaud [13:09] rakudo: 2242efb | (Solomon Foster)++ | src/core/metaops.pm: [13:09] rakudo: Implement the new rules for handling hypers of different lengths. [13:09] rakudo: review: http://github.com/rakudo/rakudo/commit/2242efb89371a83c389536b84e1f438e872e145e [13:10] morning, pmichaud. [13:10] pmichaud: I'm curious how difficult you think http://rt.perl.org/rt3//Public/Bug/Display.html?id=73608 is to fix (nqp-rx regexes won't backtrack properly into capturing parentheses or subrules) [13:10] *** proller joined [13:14] I'm curious about what causes that. [13:15] I don't care as long as it goes away :) [13:15] it's not trivial. [13:15] pmichaud: I thought you might say that :( [13:16] pmichaud: so it's not a bug so much as never implemented in nqp-rx? [13:16] basically, we have to suspend execution of the regex submatch (i.e., a Parrot sub), and then have a way to restart it again when we backtrack it. [13:16] heh, the exact same thing GGE needs to do next. :) [13:17] pmichaud: how do you plan to save state? [13:17] the cursor already holds state, actually [13:17] *** bjarneh joined [13:17] even the internal state of a partial subrule match? [13:17] yes [13:17] cool. [13:17] that's just so... right. [13:17] in PGE it was handled via Parrot coroutines, but for a variety of reasons I didn't want to use that approach in nqp-rx [13:18] <[Coke]> pmichaud: parrot should let you do that with yield already. [13:18] <[Coke]> ... unless you don't want to use that approach. =-) [13:18] [Coke]: yes, yield is the way that PGE did it. [13:18] the approach in GGE will have to be 'insane cheating', I fear. [13:18] masak: nooooo [13:18] 'yield' doesn't seem to play well with methods or lexicals, I fear. [13:18] masak: it must be elegant and beautiful [13:18] mathw: have you actually *looked* at GGE? :P [13:18] and it also requires an insane amount of cloning in order to work [13:18] masak: I assumed it was elegant and beautiful :P [13:19] mathw: it's Perl 6 code generating Perl 6 code. guess again. :) [13:19] <[Coke]> pmichaud: still, if you think that's a /bug/ and not a feature you can't use... [13:19] masak: and why shouldn't that be elegant? :) [13:19] mathw: chiefly because we don't have heredocs. :/ [13:20] (more "can't" than "shouldn't", acutally) [13:20] oh yeah, heredocs would be a lovely thing to have... [13:20] mmm heredocs [13:20] Q {{{ [13:20] this is a heredoc [13:21] with a lot of stuff in it [13:21] }}} [13:21] that's what I do now. [13:21] well.... there ya go. :-) [13:21] still messes up the indentation beyond repair :( [13:21] *** lest_away is now known as lestrrat [13:21] pfft [13:21] I keep thinking we ought to have a method on Str that means "remove indentation" [13:21] and indentation is the first thing on my list of necessities for something elegant. [13:21] build a tree that represents the program and render it in one pass so it's all hidden away [13:21] we're going to need it for the parser anyway, might as well expose it to the programmer too. [13:22] you're allowed to be slow, it's in the name [13:22] pmichaud: Str.unindent [13:22] I like. [13:22] pmichaud: a lot of people would love you for that [13:22] .unindent is perfect [13:22] and it would have the same semantics as Perl 6 heredocs. [13:22] sounds like a good weekly challenge [13:22] \o/ [13:22] it's also eminently writeable [13:22] * masak goes to spec it [13:22] yes, same semantics as heredocs [13:22] \o/ [13:23] *** plainhao joined [13:24] *** ejs left [13:24] [Coke]: (yield) Given all of the current issues surrounding Parrot continuations and resuming from them, trying to get .yield "fixed" isn't something I'm wanting to invest a lot of time in. [13:25] s/lot of time/lot more time/ [13:26] I'll take "same semantics as heredocs" to mean that the terminator of the heredoc is the last line of the string to be unindented, and all indentation is removed relative to that. [13:26] I'd think the terminator wouldn't be present [13:26] it's relative to that we're unindenting. [13:26] yes, I agree. I can see two possibilities [13:27] if it's not present during parsing, stick it in there and then do Str.unindent. [13:27] masak: The heredoc thingy could pass in the number of chars to unindent by. [13:27] oh, ok. [13:27] what jnthn++ said [13:27] I can do that. [13:27] that's probably wiser. [13:27] Which means .unindent is a bit more genericly useful. [13:27] and if nothing is passed in, then compute it based on the least-indented line [13:27] ooh [13:27] in that case, it feels silly not to have .indent. [13:27] :-D [13:27] .oO( Perl 6: optimized for writing an IDE ) [13:27] indeed [13:27] let's just have that, and allow negative integers. [13:28] jnthn: if it was optimised for writing an IDE, it wouldn't have grammar munging [13:28] mathw: Optimized for overjoying and tormenting the IDE writer in equal measure? ;-) [13:29] :) definitely [13:32] *** JimmyZ_ joined [13:33] *** JimmyZ left [13:33] *** JimmyZ_ is now known as JimmyZ [13:35] *** uniejo left [13:35] r31081 | masak++ | [S32/Str] proposed Str.indent [13:35] r31081 | [13:35] r31081 | Following an idea bounced around on #perl6, this method was added. [13:37] oh, I think .indent should be smart enough to handle tabs and other unicode whitespace [13:37] then please spec how. [13:38] the same way that Perl 6 itself will handle them with heredocs [13:38] I didn't see that in S02, so I didn't know how. [13:38] oh wait. was it the $?TABSTOP thing? [13:38] very well. I can add a note about that. [13:39] (Hard tabs will be assumed [13:39] to be C<< ($?TABSTOP // 8) >> spaces, but as long as tabs and spaces are used consistently [13:39] that doesn't matter.) [13:39] ok. [13:39] I'll change it to that. [13:39] 8? That's big. [13:39] ;-) [13:39] it's the only real standard there is. [13:39] :-) [13:40] I keep thinking whether it'd make sense to have $code.indent(*) unindent such that at least one line has indent level 0. good idea or not? [13:40] a sort of 'indent reset'. [13:40] oh, that works I think. [13:40] * masak adds that too [13:44] just thinking aloud, what about a construct like this? my $num = prompt("bla", $_ >= 50); [13:45] and $_ would be the value that was just received from the user [13:45] szabgab: looks like that would need a closure around the $_ expression. [13:45] szabgab: nothing stops you from writing such a multi method yourself. [13:46] *** [mark] left [13:46] let me try it then [13:46] \o/ [13:47] msaak++ # str.indent [13:49] *** hudnix joined [13:49] *** cognominal left [13:52] r31082 | masak++ | [S32/Str] rethinking of tab characters [13:52] r31082 | [13:52] r31082 | Also added a Str.indent(*) use case. [13:52] see how you like these changes. [13:52] lemmy guess... indent(*) unindents the smallest amount of whitespace that's present on each line? [13:52] [min] of all indents, yes. [13:53] *** viklund left [13:53] \o/ [13:53] masak++ # again [13:54] that's what I'd primarily use it for in GGE, so it felt right to add it. [13:54] who wants to add tests? :) [13:54] the one who asks, of course [13:55] * masak hides behind his GSoC work [13:56] speaking of hiding behind work... [13:56] I now have JSON::Tiny far enough to update the grammar chapter [13:56] \o/ [13:57] the only real blocker left are escapes in char classes [13:58] moritz_++ [14:02] *** ccube joined [14:03] http://www.perlmonks.org/?node_id=842911 # I don't quite understand it, but it has 'Rakudo' in the title :-) [14:03] rakudo: sqrt(-1) [14:03] rakudo 3a6b43: ( no output ) [14:04] rakudo: say sqrt(-1) [14:04] rakudo 3a6b43: OUTPUT«NaN␤» [14:04] rakudo: say sqrt(-1+0i) [14:04] rakudo 3a6b43: OUTPUT«0 + 1i␤» [14:04] thanks [14:04] you're welcome [14:05] rakudo: say 3 ** 2 [14:05] rakudo 3a6b43: OUTPUT«9␤» [14:05] rakudo: say 3 ** 1i [14:05] rakudo 3a6b43: OUTPUT«0.45483242282661 + 0.890577041667747i␤» [14:06] http://paste.lisp.org/display/111108 [14:06] *** ejs joined [14:06] shouldn't that pastebot support direct pasting to the channel? [14:07] it should, but it seemed to be disabled since a recent spam wave [14:07] ic [14:07] szabgab: if declare the second argument as Mu $cond, you can also pass junctions as matchers [14:07] so how would you improve my multi prompt? [14:07] Mu ? [14:08] formerly known as Object [14:08] as the cow speaks? [14:08] Mu ? [14:08] :) [14:08] it speaks Muh in German :-) [14:08] loop { last if $cond(prompt($str)) } [14:09] ...perhaps. :) [14:09] fewer tests and negations, at least. [14:10] oh wait. [14:10] and how would that cow work? [14:10] loop { last if $cond($ret = prompt($str)) } [14:10] I would need to check in the prompt method what type I got [14:10] and do smart match? [14:11] bbl & [14:11] cds [14:11] it's a bit funny that the main use of 'Mu' will be to make the routine say "I can handle junctions". [14:14] *** skids joined [14:14] *** pkkm left [14:14] moritz_: I think I can get escapes in char classes fairly quickly [14:14] ++pmichaud [14:15] *** JimmyZ left [14:17] *** hudnix left [14:18] *** JimmyZ joined [14:20] *** pkkm joined [14:23] *** hudnix joined [14:29] *** hudnix left [14:30] *** plobsing joined [14:30] *** pkkm_ joined [14:31] *** ccube left [14:32] *** kaare joined [14:32] *** kaare is now known as Guest17090 [14:33] *** pkkm left [14:33] *** pkkm_ is now known as pkkm [14:35] *** hudnix joined [14:37] *** JimmyZ left [14:48] should rule { ** \, } and rule { value ** [ \, ] } be the same in terms of <.ws> handling? [14:49] er, no <> around 'value' in the second instance? [14:49] imagine that was there :-) [14:49] in ultimate effect they're largely the same [14:49] in that case, I certainly would hope they're semantically equivalent. [14:49] there may be some case where they're not perfectly the same. [14:49] because in rakudo I see difference in the whitespace handling [14:49] because [ \, ] has some extra <.ws> calls [14:49] right [14:50] oh, true. [14:50] I'm not sure that rakudo/nqp gets the whitespace handling around ** exactly right. [14:50] PGE had it there, but I don't know that I ever restored it for nqp-rx [14:51] I think nqp-rx still treats { ** \, } exactly the same as { **\, } [14:52] that would explain my observations [14:52] ...which are...? :) [14:53] some of my tests fails when I write ** \, but pass if I write ** [ \, ] [14:53] rakudo: say 'a,b,c' ~~ /:s ** \,/ [14:53] rakudo 2242ef: OUTPUT«a,b,c␤» [14:53] rakudo: say 'a, b, c' ~~ /:s ** \,/ [14:53] rakudo 2242ef: OUTPUT«a␤» [14:53] can I submit that to RT? [14:53] yes, please [14:54] * masak submits rakudobug [14:57] *** proller left [14:57] *** ruoso left [14:57] *** mantovani left [14:58] *** pkkm left [14:59] *** rv2733 left [14:59] *** hercynium left [15:00] *** proller joined [15:03] *** justatheory joined [15:04] *** justatheory left [15:05] *** Guest43663 joined [15:06] *** Trashlord left [15:09] *** patspam joined [15:10] is there a way to write to a file in a simple way as slurp reads? [15:11] don't think so [15:11] *** ruoso joined [15:11] I think it would be very useful for small scripts and for beginners [15:12] aye [15:12] spew vs. slurp [15:12] yeah [15:12] spew "file", "content", "more content" [15:12] let's see what TimToady thinks [15:12] Oooh, here we go with the "who can make the most disgusting name for this" competition again. :-D [15:12] vomit ? [15:12] spit [15:13] too close to split [15:13] yeah [15:13] afk, errand [15:13] "result".spew: chunks($) [15:13] nqp-rx currently has (non-working) .spew in nqp-setting, fwiw [15:14] afk, errands [15:14] *** finanalyst left [15:14] *** molaf joined [15:15] *** ejs left [15:18] TimToady already opined re 'spew': http://irclog.perlgeek.de/perl6/2010-05-06#i_2298763 [15:18] it sure has my unvote. partly due to the name, and partly due to http://irclog.perlgeek.de/perl6/2010-05-06#i_2298740 [15:18] "we might also end up with @stuff ==> qp/file/ doing the right thing, in an ingyesque sense" [15:19] * moritz_ likes ingyesque as a word [15:19] say "Something" > "file" [15:19] say "Something" ==> "file" [15:20] qp? [15:20] quote path [15:20] *** plobsing left [15:20] oh [15:20] so qp/a b c/ would build a/b/c on linux ? [15:21] *** cls_bsd left [15:21] I don't know what the current spec is [15:21] *** pmurias joined [15:21] ruoso: ping [15:22] I have a mental file named something like "things in the spec which are more flight of fancy than firmly nailed down spec, and whose disappearance or mutation to something else wouldn't surprise me much at all". qp<> is in it. [15:23] *** ejs joined [15:23] *** molaf left [15:24] maybe $filename.IO.print(@stuff) could work as an alternative to spew [15:24] or just s/IO/open/ [15:25] I'd expect 'open' somewhere along the line. [15:25] btw I've created a branch in the json repo where I simplify JSON::Tiny [15:25] part of it is to remove cruft [15:26] the other part is to remove extra rules that just give better error messages [15:26] http://github.com/moritz/json/commits/simplified_parsing [15:26] the last few commits have simplified it quite a bit [15:26] it seems that I'm now sufficiently familiar with match objects to find straight forward ways to write reduction methods [15:27] anything bloggable? [15:28] I know I'd be interested to read tips like that. [15:28] just click on the last 5 commits or so [15:28] * moritz_ hopes it's bookable [15:28] even better. [15:29] that's the main reason for this whole exercise [15:29] and it was also my driving motivation for getting sane match objects into rakudo again [15:30] motivations++ [15:37] *** cognominal joined [15:43] *** zenog_ joined [15:43] hi guys. [15:44] hi zenog_ [15:45] *** bjarneh left [15:50] *** rhr left [15:52] One question about roles: Is it necessary to use a new "does" for each role? [15:52] Like in "class Dog is Animal does Eat does Fetch" [15:52] Or would that be possible as well: "class Dog is Animal does Eat, Fetch" [15:53] it's not possible [15:53] wait a sec, I'll find you a link to a discussion... [15:53] *** shade__ joined [15:53] http://www.nntp.perl.org/group/perl.perl6.language/2010/06/msg33748.html [15:54] *** rhr joined [15:54] but see S14:242 [15:55] *** ashleydev joined [15:55] moritz_: Thanx. [15:55] oh. [15:55] moritz_: What about "class Dog is Animal does (Eat, Fetch)" ? [15:55] parens solve the precedence problem [15:56] std: role Eat { }; role Fetch { }; class Dog is Animal does (Eat, Fetch) { } [15:56] std 31082: OUTPUT«===SORRY!===␤Unable to parse class definition at /tmp/2strzWor7B line 1:␤------> ole Fetch { }; class Dog is Animal does ⏏(Eat, Fetch) { }␤ expecting module_name␤Parse failed␤FAILED 00:01 110m␤» [15:56] but could easily be made to parse [15:56] TimToady: We (rightly, imo) only parse a module name there. [15:57] TimToady: I'd prefer we either don't, *or* we parse a list of module names there and then say that you do one call to trait_mod: for each of them. [15:57] TimToady: But then we introduce an assymetry with the does operator [15:57] So imho I'd prefer we stick with the status quo. [15:57] the question is whether the semantics is sufficiently different...yes [15:58] trait_mod: and infix: do kinda different things already, though. :-) [15:58] is &[does] different from &[but=] ? [15:58] perhaps we could do away with &[does] [15:58] At present, but is implemented in terms of does [15:59] That is, it copies and then calls does. [15:59] So does is currently the primitive. [15:59] perhaps we should call that &[mixin] instead [15:59] Perhaps. [15:59] having 'does' mean two different things is a design smell [16:00] Guess it depends of the alalogy with the trait_mod and infix is a helpful way to remember it or misleading. [16:00] (Well, it's both, but I guess that's a spectrum rather than absolutes.) [16:01] alternately, we could make 'does' list associative, and then $a does B does C mixes in both B and C as a composition, currently requiring (B,C) [16:01] * sorear finishes backlog [16:02] TimToady: mixing both B and C as composition would be nice [16:02] * TimToady hasn't started backloging [16:02] we can do that, but currenlty it's does (B,C) [16:02] TimToady: True, though then we make the other thing longer :-) [16:02] Well [16:02] does [16:02] ($a does B) does C [16:02] If does is list infix then call does twice? [16:03] e.g. the parens stop it "collapsing" to one call? [16:03] that doesn't happen often enough to worry about de-huffmanization [16:03] *** justatheory joined [16:03] Sure, just want to make sure it's possible [16:03] yes, they would be staged [16:03] OK [16:03] I've no real objections to that change. [16:03] Would be make a parallel change to but? [16:03] maybe [16:03] s/be/we/ [16:04] Renaming it to mixin is fine by me too [16:04] this might involve a precedence change though [16:04] As is parsing a list of comma-seperated module names, but please spec it as multiple trait_mod calls or I suspect things get awkward. [16:04] (that's for the trait_mod case) [16:04] *** bjarneh joined [16:05] currently does/but are structural infix, which are non-assoc [16:05] Hmm [16:06] I'm not sure people tend to use does and but in especially complex expressions, in general. [16:06] So maybe not too big a deal. [16:06] *** Trashlord joined [16:07] So long as the common things like my $dugong = $manitee but Cow; works. :-) [16:07] so they might have to move to one of the X levels in S03:32 [16:07] *nod* [16:07] That doesn't strike me as immediately problematic. [16:08] *** Maddingue joined [16:08] I could argue putting them into concatenation, and then they could form values that can be & or | junctioned [16:09] *** mikehh joined [16:10] one argument for the listy form is that then you could do $x but @roles [16:10] Hmm. :-) [16:10] Yeah [16:10] will think about it in the [16:10] shower & [16:10] Well, maybe you already can though. [16:11] rakudo: role Cow { }; role Swim { }; my $manitee = "lol"; my @roles = Cow, Swim; $manitee does @roles; say $manitee ~~ Cow; say $manitee ~~ Swim; [16:12] rakudo 2242ef: OUTPUT«No applicable candidates found to dispatch to for 'infix:'. Available candidates are:␤:(Mu $do-it-to-me, Role $r)␤:(Mu $do-it-to-me, ConcreteRole $r)␤:(Mu $do-it-to-me, (Parcel) $roles)␤␤ in main program body at line 11:/tmp/oYpaMDzsXB␤» [16:12] Ah no, it Must Be A Percel [16:12] *** shade__ left [16:12] :-) [16:15] *** Trashlord left [16:16] *** Trashlord joined [16:19] afk for a little [16:22] *** ejs left [16:27] *** cls_bsd joined [16:30] *** ejs joined [16:32] *** ashleydev left [16:32] *** ejs left [16:35] *** shade__ joined [16:36] nice, 264MB nytprof.out [16:37] could be worse. [16:38] every once in a while, I'm grateful I upgraded off the old 2000MB disk [16:39] :) [16:40] massive error spam from nytprofhtml, though [16:40] nytprof hates me [16:41] <[Coke]> I've found the nytprof authors to be very responsive. [16:42] <[Coke]> I know a new release is imminent. [16:43] sorear: did you try disabling per statement profiling? [16:44] pmurias: not yet. it's so slow I have to run it overnight, anyway [16:46] negative 849 seconds spent in Cursor::_STARr. This profile is useless [16:47] *** ive left [16:47] man, that's fast! [16:47] *** ive joined [16:49] oh yeah and it was using CLOCK_MONOTONIC [16:51] *** masak left [16:52] sorear: you should call Cursor::_STARTr more often ;) [16:53] *** justatheory_ joined [16:54] *** justatheory left [16:54] *** justatheory_ is now known as justatheory [16:56] *** cdarroch joined [16:56] *** cdarroch left [16:56] *** cdarroch joined [16:59] *** dakkar left [16:59] <[Coke]> sorear - what version of nytprof are you using? [17:01] *** justatheory left [17:01] *** mantovani joined [17:02] 3.11 [17:06] *** ashleydev joined [17:07] *** stephenlb joined [17:08] <[Coke]> latest released version, eh. 4.0 should be out soon. might be worth grabbing from svn and seeing if that helps. [17:10] re S29 shouldn't ++FOO a b c ++/FOO set %*OPTS to ['a','b','c'] instead of 'a b c'? [17:11] * sorear svn co [17:11] *** justatheory joined [17:14] :/ nytprof svn fails make test [17:15] test22-strevala, test24-strevalc, and test61-submerge all have errors [17:16] *** ashleydev_ joined [17:16] bye guys [17:16] *** zenog_ left [17:17] *** c9s left [17:18] oh well, it's not going to be more buggy than what I already have [17:18] sorear: nytprof was giving me negative measurements on STD a year ago [17:18] (so it's not a new thing) [17:19] diakopter: hi [17:19] *** ashleydev left [17:19] NYTProf and Moose are incompatible locally [17:19] hi [17:19] everybody I have complained to has not been able to repro [17:20] sorear: should I try to profile STD? [17:20] that said, it's less-incompatible now than it used to be [17:21] 2.x gagged so hard that I had to comment out a warning message in NYTProf.xs, lest fprintf be 98% of CPU time [17:21] moritz_: let me try with 4.0-pre first [17:23] *** macdaddy joined [17:23] *** macdaddy is now known as Guest33137 [17:24] *** hudnix left [17:31] *** supernovus joined [17:31] sorear: I'm ready to begin dipping my emit_pq toes in viv [17:32] excellent [17:33] let's start with regexes; I've made the most progress towards the refactor there [17:33] look at ./viv -e 'grammar Foo; token bar { }' [17:33] each line has a node type name [17:33] I was thinking of starting at regexes too :) [17:34] some of these have emit_p5 methods; they'll need emit_psq methods [17:34] the insides of the regex are compiled via RE_ast and DEEP, so you'll want to add psq to DEEPbase and children [17:35] grr. even with 4.00-pre I get Warning: 1 subroutine calls had negative time! The clock being used (2) is probably unstable, so the results will be as well. [17:37] book: 3b69131 | moritz++ | src/grammars.pod: [17:37] book: [grammars] mostly rewritten with proto regexes, and code that works in Rakudo [17:37] book: master [17:37] book: review: http://github.com/perl6/book/commit/3b69131c87e47215f52f96a9590f950a33e32699 [17:38] oh [17:38] I was running in a VM, so maybe time was adjusted while running..... [17:38] are you in a VM? [17:38] no [17:38] also, the results are reproducable [17:38] _STARr always has huge negative time [17:39] call it more often :-) [17:39] on my local computer I have a Date.new(::DateTime $dt) {} method and a DateTime.Date() {} method. How would I go about submitting them back to the rakudo tree? [17:40] supernovus: you make a commit locally [17:40] git commit -am 'implemented $supermethods' [17:40] # uhm, write a better message :-) [17:40] and then create a patch from it [17:40] git format-patch HEAD^ [17:40] and then mail the resulting file to [email@hidden.address] with [PATCH] in the subject [17:42] szabgab: you really want: my $num; repeat { $num = prompt("Please give a number smaller than 50: "); } until $num < 50; [17:42] Okay. I know it's a trivial change, but the being able to make Date objects from DateTime objects is a useful feature that was in the spec, but not in the code :-) [17:43] supernovus++ [17:43] we all start small [17:43] *** shade__ left [17:43] (except for sorear++, who went straight for macros :-) [17:44] *** shade__ joined [17:44] sorear: I have a nytprof output from ./tryfile STD.pm6 with positive exclusive time for _STARr [17:44] sorear: should I upload it for you? [17:45] yes please [17:45] (what filehost will take 200MB files?) [17:45] it's 83M here [17:46] oh you mean for your nytprof.out [17:46] ah [17:46] (I was talking about the HTML dir) [17:46] probably a good bit smaller with compress too [17:46] oh [17:46] either works [17:46] TimToady: I'd love to optimize [ a | b ] into <[ a b ]>; could that be made to play nicely with LTM? [17:46] html dir may be better [17:46] compressed 8.2M [17:46] with the current LTMer, the first is actually more efficien than the second [17:46] upload running... [17:46] *efficient [17:47] since the first will load into the trie, but the second will force run-time pattern matches [17:47] with a real parallel NFA this would be less of an issue [17:48] but it would also be less of an optimization, since both constructs would produce the same states [17:49] *** f00li5h left [17:52] *** bjarneh left [17:53] sorear: http://moritz.faui2k3.org/tmp/std/ once packed, once unpacked [17:54] oh right you have a webserver [17:54] rakudo: { $*num = prompt("Please give a number smaller than 50: "); }() until $*num < 50; [17:54] *** ispeak_ joined [17:54] rakudo 2242ef: OUTPUT«Method 'Bridge' not found for invocant of class 'Failure'␤ in 'infix:<<>' at line 3096:CORE.setting␤ in main program body at line 11:/tmp/yxP9jUcqkK␤» [17:54] all Cursor:: rules point to unknown.html :-( [17:54] * diakopter blinks [17:56] *** ejs joined [17:59] *** shade__ left [18:00] rakudo: my $*num; { $*num = prompt("Please give a number smaller than 50: "); }() until $*num < 50; [18:00] rakudo 2242ef: OUTPUT«Use of uninitialized value in numeric context␤» [18:01] right, that form still tests first [18:01] I guess that Failure is a leakage. [18:01] only "repeat" moves the test to the end [18:02] since 'repeat' implies always doing it at least once [18:02] (It's a Parrot Failure PMC and thus didn't respond to .Bridge) [18:03] *** ejs left [18:05] looks like we can save a good 20 seconds by not having Cursor inherit from Moose::Object [18:05] rakudo: repeat until my $x ~~ /^Land/ { $x = prompt('') }; say 'alive' [18:05] rakudo 2242ef: OUTPUT«alive␤» [18:05] *** ejs joined [18:05] or sub DESTROY {} [18:05] szabgab: also see ^^^ [18:06] the ability to put the 'my' into the conditional is one of the reasons we allow repeat's conditional to be moved to the front [18:09] std: repeat { $*num = prompt "Please give a number smaller than 50: " } until $*num < 50; # i can haz globulz [18:09] std 31082: OUTPUT«ok 00:01 108m␤» [18:10] *** ejs left [18:10] <[Coke]> jnthn: parrot has a failure pmc? [18:12] [Coke]: Ah...Undef. [18:12] I think Failure may be mapped to it / subclass it. [18:12] Will check. [18:12] *** ejs joined [18:12] .oO(the parrot is leaky) [18:14] well, the rakudo error messages certainly look nicer lately [18:14] at least it's not holy [18:14] supernovus: Aye, some work went into that. :-) [18:15] *** ejs left [18:15] is it still just sending line numbers through, or is it sending positions and then translating to line numbers at the last moment (preferred)? [18:16] *** Gruber joined [18:16] line numbers are generated at the last moment when the source is still available [18:17] *** ashleydev_ left [18:17] *** cdarroch left [18:17] *** cls_bsd left [18:17] *** dju left [18:17] *** alester left [18:17] *** [Coke] left [18:17] *** awwaiid left [18:17] *** Grrrr left [18:17] one could remember the lineof map even after flushing the source, I suppose [18:17] TimToady: We emit line numbers into the bytecode. [18:18] ouch [18:18] TimToady: Though the annotations system is general. [18:18] *** cls_bsd joined [18:18] for some kinds of errors it's much more awesome to be able to point into the middle of a line [18:18] TimToady: Well, "into the bytecode" is not quite right - into a segment alongside it. [18:18] *** ispeak_ left [18:18] *** [Coke] joined [18:19] that might be a useful small project for someone to tackle [18:19] Aye [18:19] *** cdarroch joined [18:19] *** cdarroch left [18:19] *** cdarroch joined [18:19] and maybe I can stop cringing someday whenever someone says "line number" :) [18:19] Well, you can .annotate 'moon phase', 180 if you want. :-) [18:19] *** dju joined [18:20] *** awwaiid joined [18:20] TimToady: At least we get errors with some useful information in now. :-P [18:20] can you .annotate 'moon phase', ᴨ :-P [18:21] Probably needs quotes. [18:21] :-) [18:21] but ᴨ is a number :) [18:21] Ah [18:21] My font has no glyph so I can't see what it is. :-) [18:22] was just s/180/pi/ [18:22] Ah :-) [18:22] ...what a sucky font, no pi! [18:22] oh, I picked the small cap version [18:23] how about π? [18:23] that's straight lowercase [18:23] *** wasy joined [18:24] I can see the latter [18:24] Ah, that works. [18:24] but jnthn++ for errors with useful information :) [18:24] indeed [18:24] I like progress even when it's only progress :) [18:25] TimToady: For when we get to stashing a position - do you suggest we go look for the file at runtime when the error occurs to then determine the line number? Or stash the position to line number mapping table somewhere? [18:25] The first sounds evil. [18:25] any idea when jimmy's patch in ticket # 75114 will be applied to master? It fixes augmenting the Int class (tested on my local copy) [18:25] it might sense to store line numbers even if we store positions [18:25] for HLL interop [18:25] either works, though with the former you can delay deciding what the user thinks is a "line" [18:26] .u separator [18:26] U+2028 LINE SEPARATOR (
) [18:26] moritz_: Well, my original expectation is that one day we'd store column potentially too. [18:26] does that make a line number? [18:26] moritz_: But TimToady is likely right that position and delay the decision will work out better. [18:26] columns are also subject to interpretation under Unicode [18:26] what will vmsperl6 do? [18:27] .u thin [18:27] U+2009 THIN SPACE ( ) [18:27] .u em [18:27] U+2001 EM QUAD (􏿽xE2􏿽x80􏿽x81) [18:27] what's a column? [18:28] vim thinks a column is a codepoint count after last \cJ [18:28] if we end up with program editors that can use proportional fonts, the file position is really all we have to go on [18:28] but how is Carp supposed to knoe that? [18:28] or grapheme position, or something that is not subject to interpretation [18:28] *** TiMBuS left [18:29] TimToady: heh, well, yes, what units are we storing our positions in. :-) [18:29] the point being that you want to be able to set your policy indendently of the compiler [18:29] Probably doesn't actually matter though. [18:29] supernovus: I'll test the patch now, will push it if it works [18:30] lines and columns are not universal [18:30] TimToady: I expect some kind of interpretation of the position anyway [18:30] and I'm trying very hard not to bake in any language assumptions of constant spacing [18:31] when I get an error message at pos 23986, I won't be happy [18:31] which is why we do JIT lines/columns [18:32] moritz_, thanks! [18:32] but at that point we are currently making cultural assumptions [18:32] and how are late cultural assumptions better than early? [18:32] and I want to label such assumptions as, er, assumptions [18:33] *** patrickas joined [18:33] because early ones have to be undone, and tend to lose info if you are not careful such that they cannot be undone [18:33] r31083 | sorear++ | [Cursor] Remove Moose::Object superclass, and with it the DESTROY method. Cuts 50 seconds off time needed to parse STD.pm6. Thanks, NYTProf! [18:33] we are below the 3 minute mark now [18:33] hello perl6 [18:33] if you make a cultural assumption that only line numbers are important, then you lose column info [18:33] \o/ patrickas [18:33] I had no idea just how much that was costing us [18:34] TimToady: good point [18:34] hello boss :-) [18:34] so it's better if all your units in the database are mks or some such [18:34] and we weren't using any of the Moose::Object features (->new, ->does, BUILD, DEMOLISH) [18:34] otherwise you tend to crash your Mars craft [18:34] I created a wordpress account (patrickas) for fixing the advent calendar posts [18:35] TimToady: the problem is the error reporter - how does it know what editor the programmer used? [18:35] I'll give you permissions to change them [18:37] * moritz_ hugs patrickas++ - welcome to perl6advent [18:37] presumably via an environment variable, but future editors might be able to change their policy on the fly, which means they would want such information in universal units anyway [18:37] thanks ... off to work :-) [18:38] have fun [18:39] TimToady: Where should I look for enlightenment on the finer points of fate propagation? [18:39] *** Gruber is now known as Grrrr [18:39] It's all fun until somebody loses an eye... I hope wordpress has rollback functionality! [18:39] depends on what you mean by "propagation" [18:40] do you mean upward as calculated by the longest methods? or downward to subrules? [18:40] patrickas: I think it has [18:42] *** ruoso left [18:42] the upward propagation of fates is currently done with lists of strings that are much like what you get in the lex/ files [18:43] *** wasy left [18:43] the most complicated one is in RE_sequence, since it has to X the alteratives in the head with the alternatives in the tail [18:44] TimToady: downward [18:44] I have a pretty clear conception of upward [18:44] downward fates are propagated via a _fate entry in the current cursor, and by that point it is a linked list of fate pointers [18:44] so each level merely needs to advance along the linked list [18:44] and eventually the list runs out [18:45] the nice thing about those linked lists is that tails can be shared, even if they have different prefixes [18:46] *** justatheory left [18:47] Why doesn't RE_any use a helper routine like quantifiers, etc do? [18:50] I don't understand your question. [18:50] are you talking about RE_ast.pmc:455? [18:52] r31084 | moritz++ | [t/spec] unfudge some test for augmenting Int [18:52] I'm talking about viv:3017 [18:52] formerly part of the gimme5 regex compiler [18:53] rakudo: a0b6d74 | jimmy++ | src/Perl6/Actions.pm: [18:53] rakudo: fixed #75114: Can't augment class Int [18:53] rakudo: Signed-off-by: Moritz Lenz [email@hidden.address] [18:53] rakudo: review: http://github.com/rakudo/rakudo/commit/a0b6d74db23a48768fc962863bfaf6f42f5d77b1 [18:57] sorear: well, mostly just because historically Perl routines have been fairly slow to call, and so it's a form of inlining [18:57] (line numbers) -- at the moment we emit line numbers, if only because positions may add a _lot_ of annotations. Switching to positions will not be a problem when/if we decide we want them. [18:57] also, we already know the literals, and these would have to be parameterized [18:57] *** ruoso joined [18:57] one optimization I've long considered is using "symbols" instead of strings in the fates [18:58] the position information is indeed readily available -- we just (by choice) don't save all of it into the bytecode at the moment. [18:58] TimToady: If it's "hot button" enough for you to want us to immediately change it, we can do that. [18:59] TimToady: what does a symbol in a fate look like? [19:00] it would change the line that says: [19:00] if (\$fate = \$C->{'_fate'} and \$fate->[1] eq '$altname') { [19:00] to: [19:01] if (\$fate = \$C->{'_fate'} and \$fate->[1] == $altname) { [19:01] where presumably the symbol is a 'use constant' or some such [19:04] it's also possible that we can prove that it will match, and not do the "am I the correct type of fate" check at all [19:04] in which case it's just: [19:04] if (\$fate = \$C->{'_fate'}) { [19:05] that could be rather fragile in the face of bugs elsewhere though [19:05] lunch & [19:05] *** gbacon joined [19:06] 18:25 TimToady: For when we get to stashing a position - do you suggest we go look for the file at runtime when the error occurs to then determine the line number? Or stash the position to line number mapping table somewhere? [19:06] jnthn: I was expecting that we stash the source. [19:06] (optionally supressible) [19:06] *suppressible [19:06] pmichaud: oh [19:06] pmichaud: That also works. [19:07] we can do a lot more with error diagnostics in that case [19:07] .annotate 'source', 'blahhhhh' [19:07] so, my plan was to have annotations for source, line number, position [19:07] And .file [19:07] gah [19:07] and file [19:07] and .file, yes. [19:07] (it's .annotate 'file', 'name' ) [19:07] right :-) [19:08] I suppose we could stash a position-to-line table somwhere instead of the line numbers, but it seems easier to just go ahead and annotate line numbers since we already readily have them [19:08] (if the source is present, we wouldn't need the line number annotations, no.) [19:08] *** ive left [19:13] clang gives very nice run-time errors with source [19:14] anyway, my plan for a while has been to stash the source with the compiled form, and keep track of things by position (possibly in addition to line number) [19:14] in face, it tends to record both the .from and .to position so it can highlight the entire suspect construct [19:14] oh, we could do that also. [19:14] I like that. [19:14] might also help with those constructs that end up being multi-line. [19:15] s/face/fact/ [19:24] $a X $b will always produce a single element [19:25] because X is a *list* infix [19:25] TimToady: in STD.pm6, lexer 'variable', there is an LTM conflict on the token $< [19:25] @$a X @$b is different [19:25] there's a very, very awful cheat in viv to ignore LTM generated by under :sym['$<'] [19:25] this is necessary in order to correctly parse $ [19:26] because otherwise the $*EUID alternative would get there (it has $< as longest token) and cut [19:29] *** Guest43663 left [19:29] szabgab++ corrupting the youth [19:30] *** ShaneC joined [19:31] *** wallberg joined [19:31] *** plainhao left [19:31] patrickas++ # perl6advent updates to current spec [19:32] patrickas+=.5 # Only half of them updated so far :-) [19:33] *** pjcj joined [19:34] *** wallberg left [19:34] sorear: testing a fix [19:35] the problem is that $< isn't a true twigil, so it escapes the requirement for a \w imposed by twigil's endsym [19:36] hmm, but then it blows up on $<~CAPS> [19:36] we may have to make the special_variable rule more specific [19:39] *** Guest43663 joined [19:39] *** clintongormley left [19:40] testing a different patch [19:45] impressive. I just broke tryfile to the point of memory usage explosion [19:46] *** whiteknight joined [19:46] rakudo: say 1 <=> 2 [19:46] rakudo 2242ef: OUTPUT«-1␤» [19:48] *** estrabd left [19:50] sorear: left recursion? [19:50] diakopter: shadow hell, more likely [19:50] what's shadow hell :) [19:50] r31085 | lwall++ | [STD] make p5 $< detection have a longer LT [19:51] that's where you shadow one variable with another and create a loop in the wrong place [19:51] *** justatheory joined [19:53] I'd probably need an example. I think only 10% of my normally active 10% of my brain is active [19:54] if your brain is 100% active you'll die [19:55] all neurons fire at once? [19:55] *** supernovus left [19:55] *** masak joined [19:55] MASAK [19:55] ahoy! [19:55] that would be something beyond a grand mal seizure [19:55] that's what some neurotoxic substances do to you [19:55] and you would likely stop breathing [19:56] ideally, your brain should be 50% active [19:56] like sarin [19:56] this maximizes the information content of each action potential [19:57] Ideally, you shouldn't believe everything you read. [19:57] well, okay, but 50% of the active brain is inhibitory circuits, so that leaves half of 25% excitatory circuits excited, which is 12.5% which is only slightly better than 10% :) [19:57] I am suspecting and does not work the way I think it does [19:57] masak: how many github projects did you start today? [19:58] :D [19:58] TimToady: in some sense 12.5 is 25% better than 10 :-) [19:58] I wonder how hard it was to get gitpan approved [19:58] diakopter: only one, and related to $work rather than to Perl 6. :) [19:58] on schwern's blog he says it was easy [19:58] er, journal [19:59] diakopter: url? [19:59] use.perl.org [19:59] *** xinming left [20:00] *** xinming joined [20:03] *** Psyche^ joined [20:03] this one? http://use.perl.org/~schwern/journal/40340 [20:03] ah, no. this one: http://use.perl.org/~schwern/journal/40079 [20:04] http://pastie.org/991068 This should be the same, but it's not. I think I am missing something *very* obvious here [20:05] * sorear goes back to reading B::Concise [20:06] +output [20:06] perl5's sorry excuse for assembly language [20:06] TimToady, thanks for the example with the repeat [20:06] szabgab: I sent an email with the repeat answer also... did it not arrive or is it filtered somehow or...? [20:07] I sent it about 7 hours ago. [20:07] sorear: what you're missing is that the symbol $C isn't introduced till the next statement start [20:07] *** Patterner left [20:07] *** Psyche^ is now known as Patterner [20:07] P5 is different from P6 here [20:07] (I've been having trouble with email lately, it seems, so I'm trying to track that down) [20:07] <[Coke]> sorear: you have a sub my in the first one. [20:07] and, in fact, that statement wouldn't work in P6 either without OUTER on the rvalue [20:07] <[Coke]> I imagine there's some clobberin' going on. [20:08] <[Coke]> or, you know, listen to TimToady =-) [20:08] TimToady: ah. my brain was groping for the `repeat { ... } until ...` idiom for szabgab, but didn't find it. thanks. [20:08] in 'my $C = blah blah $C blah blah $C blah blah $C' all the non-my $C's are the old one [20:08] [Coke]: The idea I'm trying to go for is to reuse the lexslot instead of creating a new scope with a new set of lexicals [20:09] TimToady: not introduced until the next *statement*. got it. [20:09] pmichaud, it did not filter through my brain :) [20:09] so my $C; ($C) = ... and ($C) = might work thoguh [20:09] *though [20:09] szabgab: so you did receive the email, or no? [20:09] but now after it was repeated .... [20:09] email yes [20:09] okay, good. [20:09] thanks [20:09] [Coke]: it's a tiny optimization, but it applies a couple thousand times in STD.pmc and could add up to real savings. Only one way to find out [20:10] pmichaud, oh I see, trouble with e-mail, not in this case [20:10] TimToady: when you say 'a real parallel NFA', are you referring to something which could be used to parse Perl 6 even better than STD.pm6, but which no-one has even started building yet? [20:11] s/better/faster/ I think [20:11] oh. meant that. silly brain. [20:12] brainz are overrated [20:12] the Real Parrallel NFA is a hypothetical overhaul to the guts of Cursor [20:12] it doesn't change STD.pm6 at all [20:12] masak! [20:12] * masak ponders what a Perl 6 project called 'zombie' might do [20:12] Tene! \o/ [20:13] Tene: I came here tonight mostly to meet up with you. [20:13] let's head over to #november-wiki, shall we? [20:16] masak: it wouldn't parse *better* except in the sense of *faster* [20:16] as a RPNFA chews characters, it knows exactly which token patterns are invalidated upon encountering certain characters, so it's as it's keeping track of the backtracking states, but doing them "in parallel" [20:16] it's as *if [20:16] it's [20:17] the current algorithm emulates PNFA for the literal characters using a trie, but any patterns that aren't literal are evaluated at that point, and then sorted into correct LTM order [20:17] *** wallberg joined [20:17] book: 6b9ccde | moritz++ | src/operators.pod: [20:17] book: [ops] three-way comparison [20:17] book: review: http://github.com/perl6/book/commit/6b9ccde27118b18d953da77a993617952baf2c2e [20:17] a PNFA would essentially push those extra patterns down the trie until it looks more like a DFA state diagram [20:18] or at least an NFA state diagram [20:18] <[Coke]> masak: I think a perl6 project called zombie would just be perl 6. =-) [20:18] *** azert0x joined [20:18] but I've been going for correct over fast [20:18] [Coke]: O RLY? [20:24] diakopter: sounds a lot like http://swtch.com/~rsc/regexp/regexp1.html [20:26] I did not realize perl5 had a hardcoded limit on the complexity of subs using goto [20:26] not qp/a b c/, but probably qp[a/b/c] [20:26] *** shade__ joined [20:27] sorear: it does? [20:27] not when I wrote it [20:29] when I wrote it, label search was all just following linked lists; not necessarily efficient, but not with any inherent limits [20:29] nqp-rx: a68924f | pmichaud++ | src/Regex/P6Regex/ (2 files): [20:29] nqp-rx: Update ** quantifier a bit, recognize trailing spaces as request to [20:29] nqp-rx: add <.ws> between each element. (This isn't completely what S05 [20:29] nqp-rx: specifies, but it's a good first cut.) [20:29] nqp-rx: review: http://github.com/perl6/nqp-rx/commit/a68924fd3dbe3f4b392f6460f28b99df3a482d28 [20:29] nqp-rx: 9e955a4 | pmichaud++ | build/PARROT_REVISION: [20:29] nqp-rx: Bump PARROT_REVISION to get FileHandle.tell. [20:29] nqp-rx: review: http://github.com/perl6/nqp-rx/commit/9e955a4984fe0eb51307415a42127fb0c64ed919 [20:29] nqp-rx: 38fc6e9 | pmichaud++ | src/Regex/P6Regex/Actions.pm: [20:29] #define GOTO_DEPTH 64 in pp_ctl.c [20:29] nqp-rx: Add :sigspace handling to range quantifiers (e.g., ** 0..3) [20:29] nqp-rx: review: http://github.com/perl6/nqp-rx/commit/38fc6e9a2c4d12504ce450c282fc2a3c6e701e93 [20:29] *** shade__ is now known as \shade [20:29] whoa. [20:29] I'm not wholly sure what it controls, though [20:30] *** \shade is now known as \shade\ [20:30] probably unnesting of blocks [20:30] perhaps, but who nests blocks 64 deep? [20:30] (besides viv :) [20:30] *** patrickas left [20:31] * sorear is suspecting that the only way to get a reasonable PNFA engine will be to write the walker as an xsub [20:31] well, we can still prototype it in Perl, and even that is likely to be faster [20:31] *** justatheory left [20:31] and someone needs to write a Perl 6 to XS translator. :) [20:32] by which I mean writing the xsub in Perl 6 :) [20:34] std: 0xFACE [20:34] std 31085: OUTPUT«===SORRY!===␤Whitespace is required between alphanumeric tokens at /tmp/SnbQuPVOBW line 1:␤------> 0⏏xFACE␤Whitespace is required between alphanumeric tokens at /tmp/SnbQuPVOBW line 1:␤------> 0x⏏FACE␤Undeclared name:␤ [20:34] ..'FACE' … [20:34] sorear: did you break that? [20:35] if there's a Perl prototype, I'm likely to try converting it to nqp and/or pir [20:35] (for PNFA) [20:35] *** justatheory joined [20:35] it's on my list of "things I'd like to do" but at the moment there are a lot of heavier things on that list. [20:36] and I'll be perfectly happy to see someone else prototype it :) [20:36] *** Guest21689 left [20:36] *** Patterner left [20:37] the hard part is getting the current string token patterns into a nodal graph representation [20:37] agreed. [20:37] TimToady: it could be my fault [20:37] does std need regression tests [20:37] is that $C scoping thing in the current viv? [20:37] std has many regressions tests, all of the t/ files [20:38] that's how I noticed [20:38] 'make snaptest' compiles all of the *.t files with STD [20:38] I mean, quick-to-run ones. [20:38] std needs a higher power/weight ration regression suite [20:38] make snaptest takes 90 minutes, I don't run it after every tweak [20:38] TimToady: t/ only tests one way [20:38] they only take about 20 minutes here [20:39] it shouldn't contain syntax errors that STD.pm6 then needs to find [20:39] it always requires that it successfully recompile STD.pm6 [20:39] and that's a pretty good regression test [20:40] *** Guest21689 joined [20:41] nqp-rx: 5fb2d58 | pmichaud++ | (3 files): [20:41] nqp-rx: Add \e in quoted strings, refactor 46-charspec.t . [20:41] nqp-rx: review: http://github.com/perl6/nqp-rx/commit/5fb2d58d196347d29e64ece94c6adee80e2e93ec [20:41] but it doesn't catch 0xFACE :) [20:42] *** Psyche^ joined [20:42] *** Psyche^ is now known as Patterner [20:42] maybe CORE.setting would catch it if I encoded pi in hex :) [20:43] pmichaud++ # \e/ [20:48] viv miscompiles /[ 0 [ B | C ] | D ]/ [20:48] viv does not miscompile /[ 1 [ B | C ] | D ]/ [20:48] gee... [20:49] I think I screwed up a bool somewhere... [20:49] nap & [20:50] *** gbacon left [20:51] <[Coke]> ↖ↂ↗ [20:51] *** patspam left [20:53] *** rgrau joined [20:54] *** Schwern joined [20:57] [Coke]: that is the scariest smiley I've ever seen. and I've seen quite a few. [20:58] <[Coke]> I can't even see it here. [21:01] <[Coke]> it's just meant to be a stylized \o/ =-) [21:01] <[Coke]> TimToady: IT'S A NAP [21:01] .oO(groan) [21:02] *** Guest17090 left [21:03] *** Su-Shee left [21:09] *** gbacon joined [21:10] *** Guest43663 left [21:11] jnthn: the "öl" example looks promising for the encoding stuff. I haven't been able to look at it yet, but I will tomorrow. [21:11] jnthn: is there a similar hope for decoding? [21:12] Ja, om jag har mer öl. ;-) [21:12] heh. :) [21:13] "om"...seems to play quite a few roles. :-) [21:13] Like "som" :-) [21:13] 'if', 'about', 'around', 'per'... :) [21:13] 'som' rocks. [21:14] The slightly interesting thing about the other direction is that we need to say what kinda strig the bytes are in so we can pass that along to Parrot's make_string or whatever it's called. [21:15] Anyway, we work on it when you get there. :-) [21:15] let's assume UTF-8 for now. [21:15] that seems to be the easiest. [21:17] *** PZt left [21:17] masak: I was pondering providing a method on the ByteView where you pass in an encoding object [21:17] From find_encoding [21:17] Then it can grow into the others you support in The Future. [21:18] ok. [21:18] sounds like a good idea. [21:18] I'll see if I can make that work. [21:18] \o/ [21:18] ok, going offline now. [21:19] Safe trip :-) [21:19] I have to catch a bus tomorrow at (*gasp*) 10 am! [21:19] omfg [21:19] That's like, EARLY. O.O [21:19] I know! [21:19] * masak sleeps [21:19] *** masak left [21:21] *** justatheory left [21:23] *** ispeak_ joined [21:24] sorear: I just tried 'make snaptest' on a fresh perl and got this: Deep recursion on subroutine "Class::MOP::Class::class_precedence_list" at /usr/local/lib/perl/5.10.1/Class/MOP/Class.pm line 841. [21:24] any tips? [21:24] /ideas [21:24] *** hudnix joined [21:25] *** justatheory joined [21:26] Are strings in rakudo always utf8 for now? [21:27] Or is there a way to make them plain ol ascii? [21:27] diakopter: ignore it [21:27] bkeeler: your question needs clarification. :-) [21:27] Perl spits out a warning when code recurses more than 100 levels (yes, hard coded) deep [21:27] Fair enoug [21:28] STD implements custom operators by dynamically subclassing the current grammar [21:28] sorear: ok, next problem. I started with 'make snaptest' Can't exec "./std": No such file or directory at Cursor.pm line 2684. [21:28] *** xinming_ joined [21:28] *** ashleydev joined [21:28] pmichaud: I'm trying to write a parser that needs to parse really large files, and I'm assuming the reason that it's horribly slow is that things like PIR length and substr that the regex engine use alot are not exactly O(1) [21:28] Moose recurses over the inheritence graph -> warn if more than 100 levels of superclasses [21:28] *** skids left [21:29] I asked #moose to put a no warnings 'recursion' in the appropriate place, they think I'm crazy [21:29] (they're right) [21:29] heh [21:29] My input files are plain ascii, so I was hoping I can improve performance but letting parrot/rakudo know that [21:29] bkeeler: internally, rakudo attempts to keep strings with fixed_8 encoding whenever possible [21:30] diakopter: README:18 [21:30] bkeeler: are you writing this in Rakudo itself? [21:30] Yes [21:30] okay. [21:30] I'm developing on 5.12, so I may have accidentally slipped in a 5.12ism [21:30] (thinking) [21:30] Though I could move to NQP if necessary [21:30] well, the regex engine is smart enough to keep track of intermediate points in the string being matched [21:31] so that it's not always calculating length from the very beginning of a utf-8 encoding string [21:31] *encoded [21:31] *** xinming left [21:31] But it still does things like substr on the target string when comparing literals eg, right? [21:32] yes, but that substr is relative to the intermediate offset [21:32] not from the beginning of the larger string being matched [21:32] sorear: oh yeah; forgot [21:32] (module whatever the parrot folks have done to change the way strings work since that code was written) [21:32] *modulo [21:32] *** Guest21689 left [21:33] r31086 | sorear++ | [viv] Re-use lexicals instead of creating nested scopes when constructing ratcheted sequences. No significant performance effect yet, but brings output much closer to human-like form. [21:33] Hmmm [21:34] anyway, I'm not sure the Perl 6 spec yet provides a mechanism to say "read this file as something other than Unicode". Perhaps it does -- I don't recall. [21:34] bkeeler: do you have some examples of running times and input lengths and patterns? [21:34] diakopter: Not yet. I could put something together [21:35] oh, looks like :bin to .open [21:35] or :enc [21:35] in src/core/IO.pm open unconditionally does $PIO.encoging('utf8') [21:36] right [21:36] sorear: are "===SORRY!===" in 'make snaptest' bad? [21:36] if you wanted to patch that to accept other values, I'd be agreeable :-) [21:36] see the section on 'open' in IO.pod [21:37] you could also potentially update the code for slurp() to accept :enc [21:37] I'll take a look at doing that [21:37] diakopter: yes, but expected [21:37] if you're just looking for a workaround, use Q:PIR and change the encoding directly :-) [21:37] ok; how will I know when something breaks [21:37] diakopter: std doesn't fudge the testsuite and it still fails to parse ~5% of them [21:37] diakopter: watch the %passing number for drops [21:38] So if I set the parrot IO object to encoding('fixed_8') or whatever, I'll get back strings that are similarly flagged? [21:38] yes. [21:39] Cool [21:39] OK, I'll go away and hack for a bit and let you know how it goes :) [21:39] excellent. [21:43] sorear: in regex_in_variable.t [21:43] it can't find is_run [21:44] and it can't find Test::Util [21:44] nqp now supports primitive multisubs. bacek++ [21:44] That sounds like one of my tests. Did I goof when I wrote it? [21:44] (I suspect Makefile needs to do some dependency checking, like version of Moose, YAML::XS, and Test::Util maybe?) [21:44] diakopter: you should have 43 failing test files [21:45] Oh wait, no I didn't write that one [21:45] actually, 40 [21:45] 43 was from right after the viv switchover [21:46] (actually you'll have a few more because I just broke hex number parsing. but this isn't your fault) [21:46] heh [21:47] r31087 | sorear++ | [viv] Fix compilation of '0' followed by a complex atom; this fixes the 0xFACE regression [21:47] *** Guest21689 joined [21:49] *** Guest21689 left [21:49] diakopter: Makefile.PL should do dependency checking [21:49] nqp-rx: eba2f2b | pmichaud++ | (3 files): [21:49] nqp-rx: Merge branch 'multis' [21:49] nqp-rx: review: http://github.com/perl6/nqp-rx/commit/eba2f2be9c5af703fb4c0a2a8d4464b5032dc75f [21:49] nqp-rx: 7006d42 | pmichaud++ | t/nqp/49-multis.t: [21:49] nqp-rx: Rename multi tests. [21:49] nqp-rx: review: http://github.com/perl6/nqp-rx/commit/7006d4280514c3575247c28f08aeeec1a87b5a45 [21:49] nqp-rx: 9612a72 | pmichaud++ | src/NQP/ (2 files): [21:49] nqp-rx: [nqp]: Eliminate $*METHODTYPE from grammar and actions. [21:49] nqp-rx: review: http://github.com/perl6/nqp-rx/commit/9612a72d93b2c78a72c8836579df192be1c53b59 [21:49] nqp-rx: 9d44980 | pmichaud++ | src/stage0/ (4 files): [21:49] nqp-rx: Update bootstrap. [21:49] nqp-rx: review: http://github.com/perl6/nqp-rx/commit/9d44980671ef25bb323442df4d5c2841c4ff5e60 [21:50] pmurias: http://svn.pugscode.org/pugs/src/perl6/Makefile.PL [21:51] anyways, Test::Util isn't a dependency [21:51] the tests are failing because we don't yet provide the full Perl *6* standard library [21:51] this isn't something you can just install... [21:52] *** patspam joined [21:52] ok. I thought maybe it was looking for a Perl 5 Test::Util. sry [21:53] *** ispeak_ left [21:56] sorear: failed 57 tests [21:56] took about 25min [21:57] paste.lisp.org fail [22:00] diakopter: where? [22:00] lisppaste3 got kbd after it started flooding #perl6 with porn ads [22:01] so you'll need to post the url yourself [22:01] diakopter: if you want a lowish-effort way to help make snaptest better, try "implementing" Test::Util [22:01] *** silug joined [22:02] look at src/perl6/lib/Test.pm6 [22:02] make src/perl6/lib/Test/Util.pm6 [22:02] not sure cursor handles :: yet, but it might [22:03] r31088 | pmurias++ | [mildew] fix submolds in m0ld frontend [22:03] r31089 | pmurias++ | [smop] change the test so that it can be automatically translated into a [22:03] r31089 | format mildew can run [22:03] r31090 | pmurias++ | [mildew] fix bugs into the to SSA transform [22:03] r31091 | pmurias++ | [mildew] minor whitespace tweak to code emitted by -BoptC [22:03] *** Transformer joined [22:03] submolds? [22:03] r31092 | pmurias++ | [smop] started implementing SMOP_DUMP, which should make all smop objects, much more easily dumpable [22:05] *** snarkyboojum joined [22:06] *** Transformer left [22:08] howdy folks! i have a question [22:09] parrot ~/git/rakudo/perl6.pbc gives me : Null PMC access in find_method('new_class') when I am not in the same directory as perl6.pbc [22:09] i think it is because perl6_group and friends cannot be found [22:10] Did you make install? [22:10] (If not, you need to.) [22:11] jnthn: i didn't, trying that now :) [22:12] Seems to be the usual fix for such things. :-) [22:12] molds are the objects which store the code and constants for executing a block of code [22:12] submolds are molds which are constants in a different mold [22:13] sorear: see the above explanation [22:13] jnthn: that gets me farther, thanks! [22:13] :-) [22:15] I see [22:16] *** masonkramer_ joined [22:17] *** envi^home left [22:24] *** justatheory left [22:26] diakopter: I get Passed 782/815, 95.95% [22:26] sorear: generally the design of smop is quite simple, but the code is a bit messy [22:27] (and it runs in 18 minutes) [22:27] (and my lap gets very hot :) [22:27] what was the time for the gimme5 generated one? [22:28] TimToady: is that before or after my Cursor patch? [22:28] * sorear wants more cores. and a ponie. [22:28] rakudo: for (('abc' => 'ABC')) -> $pair { say $pair.key.comb Z $pair.value.comb } [22:28] that's 31087 [22:28] rakudo a0b6d7: OUTPUT«AABC␤» [22:29] well, I'm only using one core [22:29] for the snaptest [22:29] but everything else can happen in the other core [22:30] is this the correct behaviour for Z ? [22:33] doesn't look like it [22:34] rakudo: for 'abc' => 'ABC' -> $pair { say ~$pair.key.comb } [22:34] rakudo a0b6d7: OUTPUT«a b c␤» [22:35] oh, maybe it's the multiple gather bug [22:35] rakudo: for 'abc' => 'ABC' -> $pair { say (eager $pair.key.comb) Z $pair.value.comb } [22:35] rakudo a0b6d7: OUTPUT«aAbBcC␤» [22:35] yes, it's the gather bug [22:36] some state used by gather is not being properly cloned [22:36] and comb is probably implemented with gather/take [22:36] so it's a known one, I shouldn't report it, should I? [22:37] probably not, but you see the workaround there [22:37] yup :) [22:38] I sure hope this one gets fixed for R* though [22:38] maybe it's really the closure bug in disguise [22:39] *** pmurias left [22:40] *** xabbu42 joined [22:41] this is the error I get when loading an installed perl6.pbc from C: http://gist.github.com/424624 [22:43] I thought we had .perl on match objects now. Didn't that make it in? [22:43] diakopter: abort. I've found the *real* problem [22:44] * sorear un-screws some PERL6LIB hacking and convinces regex_in_variable.t to pass [22:44] * sorear is now running a snaptest [22:44] *** justatheory joined [22:45] It's the closure bug in disguise. [22:45] 22:38 I sure hope this one gets fixed for R* though [22:45] 22:38 maybe it's really the closure bug in disguise [22:45] I thought that was fixed? [22:45] It's the closure bug in disguise. [22:46] not yet. [22:46] it's on my to-do list. I need to get lists working first. [22:49] afk, fetching dinner [22:49] Aaarghghgh, I see what the problem is. I'm inheriting my grammar from HLL::Grammar, therefore not Rakudo's Cursor, so I'm not getting Rakudo match objects :( [22:52] oh, interesting [23:00] *** lestrrat is now known as lest_away [23:00] TimToady: Why are import failures a worry rather than a sorry? [23:01] I probably know the answer to this question already, but I want to make sure. I've become very interested in Perl6 "the specification", and I'd love to contribute to Rakudo implementation. The problem, of course, is that I only know one language somewhat well (that would be Perl5 - and I am talking about the language, not the implementation), and I'm not a CS major. Despite that, I'm pretty smart, and relatively young, and I'd [23:01] like to learn. Even though, again, I'm 99% certain that a complex project full of experts such as Perl6 has no room for me - does anyone here have some advice for how to learn ?| contribute here? [23:02] *** orafu left [23:02] not being a CS major has never stopped anyone [23:02] I haven't taken a single CS class! [23:02] *** orafu joined [23:03] That's encouraging! Really. I've been regretting my decision for a while now [23:03] and I have and it doesn't necessarily help a great deal :) [23:04] programming is a craft. the only way to learn is by doing [23:05] so come on in [23:05] the water's fine [23:05] That is what I've come to believe on the job as a perl5 DarkPAN hacker [23:05] Well - what the hell? Should I just suck down the repo and start reading? [23:06] I can stumble my way through C source [23:06] rakudo is a relatively large system [23:06] there's a high-level runtime library [23:07] *** skids joined [23:07] a low level runtime support layer (bonded to Parrot) [23:07] a pair of Parrot C-extension libraries that sit under *that* [23:07] a parser [23:07] a code generator [23:07] Aye, we don't have that much C in Rakudo itself. Thankfully. :-) [23:07] everyone here is at least somewhat specialized [23:08] pick a place to start [23:08] masonkramer_: There's certainly plenty of room for enthusiastic people to jump in and hack on stuff. :-) [23:08] And yes, what sorear said. Don't expect to grok the whole thing. [23:09] sorear: import failures usually result in undefined functions, and *those* used to just be a worry [23:09] but it might be time to make import failures fatal [23:09] TimToady: They're fatal in Rakudo, fwiw. [23:09] masonkramer_: also there's moritz's weekly contribution challenges - http://perlgeek.de/blog-en/ - they might be worth following - subscribe to planetsix if you haven't already http://planetsix.perlfoundation.org/ [23:10] TimToady: if they aren't fatal, then how will we know if the module contained a BEGIN { exit }? [23:10] I hadn't known that was a big problem. :P [23:10] t/spec/S02-names_and_variables/varnames.t: Unsupported use of $/ variable as input record separator; ------> $/⏏ = MyMatch.new; [23:12] *** ruoso left [23:12] masonkramer_: If you do like digging through C code though, then http://rt.perl.org/rt3/Ticket/Display.html?id=74758 is a mabye-not-too-hard fix to do in src/binder/bind.c. [23:13] (If you're looking for a concrete jumping in point, anyways. :-)) [23:13] * masonkramer_ is following all the links ... bbiaf [23:15] std: $/ := Any.new; [23:15] std 31092: OUTPUT«ok 00:01 108m␤» [23:16] sorear: perhaps it should be := in any case [23:16] and STD doesn't complain about $/ := [23:16] TimToady: why? is $/ a containery thing like an @ or % sigil? [23:16] sure [23:17] *** Wolfman2000 joined [23:17] := has always been intended to work on scalar vars [23:17] we could use a ticket queue review, also. [23:17] TimToady: Why can't Cursor use STD->parsefile instead of system("std ? [23:17] *** Limbic_Region joined [23:18] well, it might clobber some globals we don't want clobbered [23:19] pmichaud: was that directed at me? [23:19] but it can probably be made to work pretty easily [23:19] what globals does STD/Cursor use without localizing? [23:19] masonkramer_: I suspect it was [23:19] ok. task queued. [23:19] masonkramer_: yes (sorry, forgot to address you properly :-) [23:20] sorear: I don't know, I'm just sayaing we'll find out. :) [23:23] *** PZt joined [23:26] *** ruoso joined [23:26] *** wallberg left [23:28] *** cdarroch left [23:29] r31093 | sorear++ | [Cursor,STD-ecosystem] Fix PERL6LIB in snaptests. [23:30] What does S05-mass mean? [23:32] *mass*ive number of tests [23:32] seriously? [23:32] sorear: Well, kinda. :-) [23:32] sorear: It contains the vast majority of the regex tests. [23:32] *** patspam left [23:32] sorear: Which test a lot of combinations of features. [23:33] sorear: I think a lot of them may well be Perl 6-ifications of similar tests in Perl 5. [23:33] I wonder if we could switch back to using the read-from-a-file form of tests, so that we could share a suite with nqp-rx [23:34] this would also probably speed up the test speed a fair bit :) [23:34] orly? [23:34] Wouldn't we still be running just as many tests? [23:34] sure. Right now the parse of the program is pretty big [23:34] Or you mean we'd hae less to parse and would hit less GC pressure? [23:34] instead of doing several hundred small parses, we end up doing .... right [23:34] I mean, at some level we'd have just as much to parse, just in small bits. [23:34] rephrase [23:34] OK. Makes some sense then. :-) [23:35] instead of one huge parse, we'd end up doing a lot of smaller ones [23:35] and it might even be easier to do now that we can variable subst in regexes :-) [23:35] ah, yes :-) [23:36] *** xomas_ left [23:37] *** xomas_ joined [23:38] anyway, I'm thinking I want to write a nqp version of that test script, so perhaps that can then be ported into rakudo. [23:38] and, have to run off for a while -- bbl [23:39] * sorear makes a list of all [$@%&]::w+ in STD.pmc and Cursor.pmc [23:40] 77 of them... *auditaudit* [23:42] @::ACTIVE is localized in initparse but not used anywhere, even as $::ACTIVE [23:44] Why is @::MEMOS localized to its old value? [23:44] *** gbacon left [23:45] *** stephenlb left [23:46] dunno [23:47] *** rgrau left [23:53] *** xabbu42 left