Camelia, the Perl 6 bug

IRC log for #perl6, 2010-06-13

Perl 6 | Reference Documentation | Rakudo | Niecza | Specs

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

All times shown according to UTC.

Time Nick Message
00:00 masonkramer_ joined #perl6
00:01 sorear diakopter: How do contextuals interact with one-pass parsing?  sub foo() { say $*BAR; }; my int $*BAR = 1;
00:02 diakopter in perlesque they must be "declared"
00:02 diakopter (so, toplevel)
00:03 sorear so viv could take the first definition (with type), and lift it to the top of the file?
00:03 diakopter sure
00:03 sorear does perlesque still use "my" for dynamic definitions?
00:03 diakopter yes
00:04 sorear what do I do for temp $*foo, aka my $*foo = CALLER::<$*foo> ?
00:04 diakopter (and at the end of any block in which a "my" assignment appears, it's reverted...)
00:04 diakopter oh
00:05 diakopter hm
00:05 * diakopter thinks
00:05 Schwern joined #perl6
00:05 diakopter my brain hurts from lack of carbs, a concrete example?
00:06 diakopter a test case, I mean
00:07 sorear my %*RXparams; { temp %*RXparams; %*RXparams<i> = 1; }
00:07 diakopter I guess I don't grok "temp" yet
00:09 diakopter what's the point of "temp %*RXparams;" there
00:09 sorear it localizes changes to %*RXparams so that the assignment to <i> doesn't leak out
00:10 diakopter it *clones* the original??
00:10 macdaddy joined #perl6
00:10 diakopter (and how many layers deep in structured assignments does this work?)
00:10 diakopter (hopefully just one?)
00:11 Visitor99 hi,,,, i have a newbie question about hashes. If a hash is a container like an array but uses strings instead of numbers as indexes... why is not possible to do say %hash['some key'] and you must use { } instead?
00:12 yahooooo joined #perl6
00:12 diakopter Visitor99: b/c it's Not The Perl Way
00:12 sorear diakopter: yes, clones.  just one.
00:12 diakopter sorear: WHEW
00:12 diakopter sorear: I was sweating. literally.
00:13 diakopter sorear: ok, on which container-ish types is this "temp" thing supported
00:13 diakopter sorear: btw,
00:13 sorear temp works on $ @ %
00:14 sorear in all cases it's the same depth of cloning as = uses
00:14 masak Visitor99: it's about symmetry. curly braces {} are used to create hashes, and to index them. square brackets [] are used to create arrays, and to index them.
00:14 sorear temp %foo copies exactly as much as %foo = %bar
00:14 sorear you can think of temp *foo as being my *foo_SAVE = *foo; ... *foo = *foo_SAVE
00:15 diakopter oh. perlesque assignment is by reference/slot only
00:16 Visitor99 ahh.. well that makes more sense. I create arrays and hashes only with (). So that's why i was a little puzzled on the difference.
00:17 masak Visitor99: in Perl 5, there is a noticeable difference beteween array/hash and reference to array/hash. in Perl 6, not so much.
00:17 diakopter sorear: so p6 assignment/cloning must be desugared to .one_level_clone() in perlesque or something
00:17 diakopter masak: wait, sorear and I were just talking about that
00:18 masak Visitor99: if you've used (), that means you've created the arrays/hashes directly. [] and {} will create references in Perl 5.
00:18 diakopter masak: nm :)
00:18 masak diakopter: cool!
00:18 snarkyboojum joined #perl6
00:19 Visitor99 oh.. i see, So the {} and [] difference is for 'historical' reasons.
00:20 Schwern joined #perl6
00:20 pmichaud TimToady: ping
00:20 pmichaud TimToady (and others):  Could someone verify that test #2 in t/spec/S02-builtin_data_types/array.t is actually the spec we want?
00:21 masak Visitor99: well, no. it's like that because we like the symmetry. :)
00:21 sorear diakopter: I don't totally grok the container rules yet either, but AFAIK %foo = %bar in p6 should desugar more like $hfoo_container.STORE(%bar)
00:21 masak Visitor99: and it allows us to do cool things like .{}-index arrays, something which e.g. Ruby (which uses .[] indexing for everyghin) doesn't have.
00:22 sorear a hash container's STORE does an in-place replacement
00:22 sorear a scalar container's STORE just does slot assignemnt
00:22 masak Visitor99: see Synopsis 9 for hash-indexing of arrays. it's quite cool.
00:22 sorear compilers are expected to know about the implementation of the standard container metaclasses and optimize a bit
00:22 diakopter sorear: excellent. thanks for the explanation :)
00:23 sorear but that's more of a p6 thing, it won't affect std too much
00:23 Visitor99 ok, thanks masak :)
00:24 masak s/everyghin/everything/
00:24 sorear I was actually expecting you would have me implement contextuals in terms of temp
00:24 diakopter sorear: every assignment in perlesque is by reference
00:24 sorear since, my $*foo is like temp $g_foo = Any();
00:24 sorear (and this is how viv/P5 implements it)
00:25 sorear yeah, I got that
00:25 diakopter ok
00:25 diakopter the perlesque compiler injects the revert code at the end of the block
00:26 diakopter conditional on whether it was actually assigned
00:27 diakopter (because things like "goto" can skip over the "my" assignment)
00:28 diakopter std: { goto blah; my $a = 4; blah: 1; }
00:28 p6eval std 31225: OUTPUT«[31m===[0mSORRY![31m===[0m␤Illegally post-declared type:␤    'blah' used at line 1␤Check failed␤FAILED 00:01 105m␤»
00:28 diakopter oh
00:28 diakopter I thought TimToady was going to allow forward-gotos :)
00:29 masak not last I heard.
00:29 diakopter 3 weeks ago?
00:29 masak hm. musta missed that one.
00:30 masak if you happen to find that place in the logs, I'd be much obliged.
00:30 diakopter hm; maybe it was privmsg
00:30 masak changing the spec by privmsg! that's cheating. :P
00:30 diakopter hee
00:31 pmichaud did my earlier msg get lost?  or nobody saw it?
00:31 pmichaud TimToady (and others):  Could someone verify that test #2 in t/spec/S02-builtin_data_types/array.t is actually the spec we want?
00:31 pmichaud (or nobody knows the answer :-)
00:31 masonkramer joined #perl6
00:32 * diakopter KLU[DG]ELESS
00:32 masak I'm surprised at that test, if it helps.
00:32 masak why would .item on a list produce a list?
00:32 pmichaud yeah, I think it should iterate once.
00:33 masak me too.
00:33 masak is there a meaningful svn-blame on that block?
00:34 pmichaud looking.
00:34 pmichaud says someone named 'pmichaud' put in that line.
00:34 pmichaud Hmph.
00:34 pmichaud He's *clueless*.
00:34 masak heh, guess who last changed that exact line? :P
00:35 masak or he knows something we don't :)
00:35 sorear joined #perl6
00:35 sorear 2010.04.03.08.40.25 <@TimToady> I wonder if there's any other language that distinguishes forward goto from backward; in p6 a forward goto requires goto "label", while a backward goto can just say goto label
00:35 sorear 2010.04.03.08.40.25 <@TimToady> I wonder if there's any other language that distinguishes forward goto from backward; in p6 a forward goto requires goto "label", while a backward goto can just say goto label
00:35 sorear 2010.04.12.17.55.34 <@TimToady> goto is just a function syntactically
00:35 sorear 2010.04.12.17.55.39 <@TimToady> which is why a forward goto requires quotes
00:35 sorear std: { goto "blah"; my $a = 4; blah: 1; }
00:35 p6eval std 31225: OUTPUT«ok 00:01 105m␤»
00:36 masak pmichaud: nope, false alarm. you changed the test message, not the test itself. digging deeper.
00:36 pmichaud masak: yeah, but I'm wondering why I didn't notice the discrepancy before, too :)
00:36 * masak often wishes for an automatic 'dig deeped' svn/git blame tool
00:37 masak r25791: Update List.item test to match spec (RT #63350), unfudge for Rakudo
00:37 * masak hits that RT ticket
00:37 hudnix joined #perl6
00:39 masak well, that answers it, doesn't it?
00:39 pmichaud I now disagree with my statement in the ticket.
00:39 masak :)
00:39 pmichaud And agree with TimToady++ that   @list.item should be like [@list]
00:39 masak yeah.
00:40 pmichaud those comments come from before when we had scalar/flattening flags.
00:40 masak flattening will get you anywhere! :P
00:41 dduncan joined #perl6
00:44 lue afk
00:44 dduncan left #perl6
00:45 pugssvn r31226 | sorear++ | [viv] Generalize tree walker to allow adding languages.  Add perlesque.
00:47 whiteknight joined #perl6
00:50 yinyin joined #perl6
00:50 yahooooo joined #perl6
00:52 masak there are two return states from the fetch/build/test/install subcommands right now: success and failure.
00:53 masak they've been enough up until now, but I'm working on 'install --force', and the concept of 'partial failure' rears its head.
00:53 masak is that worth having a return state for?
00:53 masak partial failures can have two different causes: failing tests, or dependencies failing to install.
00:54 * masak decides to call it 'forced-success'
00:54 masak and it's a pure 'success' if the --force flag turned out not to be necessary.
01:02 sorear diakopter: How does separate compilation work in perlesque-land?
01:13 Visitor99 rakudo: my $num = 3; my %hash = ('uno', 1, 'dos', 2, "tres$num", 3); say %hash.perl;
01:13 p6eval rakudo ae1300: OUTPUT«{"tres3" => 3, "dos" => 2, "uno" => 1}␤»
01:14 masak Visitor99: and, since this is Perl 6, you can leave out the () and it still works.
01:14 masak hm, --skip-test or --skip-tests? I seem to be fluctuating myself between the two. will have to allow both as synonyms.
01:14 Visitor99 mmmm, i know it's a detail, but i think the 'perl' output should use simple quotes instead of double quotes..
01:15 Cdn joined #perl6
01:15 masak Visitor99: I see what you mean. but still, I'm curious why you think so.
01:16 Cdn Anyone here know how to setup ilbot?
01:16 Visitor99 because ' means something literal...
01:16 sorear Cdn: I imagine moritz_ would
01:16 snarkyboojum Cdn: moritz_ might :)
01:17 Visitor99 i was writing a perl6 manual in spanish
01:17 Visitor99 i showed it to a friend
01:17 Cdn I am reading the install, and I am a little lost
01:17 Visitor99 and he asked me why " are used in it instead of '.
01:18 masak Visitor99: I think it's unspecified. some implementations might use ", some might use '.
01:19 Visitor99 rakudo: my $num = 3; my %hash = ('uno', 1, 'dos', 2, "tres$num", 3, '$cuatro', 4); say %hash.perl;
01:19 p6eval rakudo ae1300: OUTPUT«{"tres3" => 3, "\$cuatro" => 4, "uno" => 1, "dos" => 2}␤»
01:20 masak see? :)
01:21 Visitor99 is consistent so i guess is should not be confusing at all..
01:21 Visitor99 thanks masak
01:21 Visitor99 and bye all!
01:21 Visitor99 left #perl6
01:22 masak a happy customer. ¡yay!
01:23 snarkyboojum Cdn: you might pique someone's interest if you actually pose your question :)
01:25 Cdn I want to setup ilbot, and I am completly lost on how to install it
01:27 masak Cdn: will you be awake in ~6 hours? because that's when moritz_, the bot author, wakes up.
01:27 snarkyboojum Cdn: at which step are you lost? Are you following http://moritz.faui2k3.org/en/ilbot?
01:28 Cdn Iwill be up in 6 hrs, yes.  Snarky, yes that's the page I am on
01:28 sorear std: 1 while 1 if 1;
01:28 p6eval std 31226: OUTPUT«[31m===[0mSORRY![31m===[0m␤Confused at /tmp/sKVZIUmREI line 1:␤------> [32m1 while 1 [33m⏏[31mif 1;[0m␤Parse failed␤FAILED 00:01 107m␤»
01:29 sorear I can't have more than one postfix modifer?
01:29 masak sorear: yes, but conditional ones go inside the repetition ones.
01:31 sorear std: 1 if 1 while 1;
01:31 p6eval std 31226: OUTPUT«ok 00:01 104m␤»
01:32 sorear std: 1 if 1 while 1 while 1;
01:32 p6eval std 31226: OUTPUT«[31m===[0mSORRY![31m===[0m␤Confused at /tmp/cHs_V6kZsG line 1:␤------> [32m1 if 1 while 1 [33m⏏[31mwhile 1;[0m␤Parse failed␤FAILED 00:01 104m␤»
01:32 sorear STD.pm6 is set up to allow up to 1 of each
01:32 masak right. I should have said *only* confitional ones go inside repetition ones. :)
01:33 masak even that was a concession on the part of TimToady, who initially was against more than one statement modifier in a statement.
01:33 sorear std: 1 if 1 if 1 while 1;
01:33 p6eval std 31226: OUTPUT«[31m===[0mSORRY![31m===[0m␤Confused at /tmp/9_uPIFVQ1x line 1:␤------> [32m1 if 1 [33m⏏[31mif 1 while 1;[0m␤    expecting statement_mod_loop␤Parse failed␤FAILED 00:01 104m␤»
01:34 masak but there was some use case involving list constructors (a la Python and Haskell) which convinced him to allow a conditional statement_mod inside a repetition statement_mod.
01:34 pugssvn r31227 | sorear++ | [viv] Perlesque for comp_unit, statementlist, statement, label
01:36 alester joined #perl6
01:36 Visitor99 joined #perl6
01:38 Visitor99 hi.. again: can Junctions be considered another kind of container? I mean, of the same class as $, @ and % ? Or is a different kind of beast?
01:38 masak it's a different kind of beast.
01:39 masak it's meant to be orthogonal to ordinary values, only acting as parallel things in the background.
01:39 masak of those you name, junction is the only one which pretends to be several things at the same time. arrays and hashes confess that they are containers, junctions generally don't.
01:40 masak well, they do if you ask them directly, but that's about it.
01:40 masak rakudo: say ?( any(1,2,3) ~~ Junction )
01:40 p6eval rakudo ae1300: OUTPUT«1␤»
01:41 masak another way to say the above is that you can "look into" arrays and hashes, but junctions are not meant to be looked into. they're only intended to be used for the side effects that their parallel evaluation produces.
01:41 sorear rakudo: say [1,2,3].WHAT
01:41 p6eval rakudo ae1300: OUTPUT«Array()␤»
01:41 Visitor99 rakudo: my $num = (1 | 2 | 3); my %hash = ('uno', 1, 'dos', 2, "tres$num", 3, '$cuatro', 4); say %hash.perl;
01:41 p6eval rakudo ae1300: OUTPUT«{"tresany(1, 2, 3)" => 3, "dos" => 2, "\$cuatro" => 4, "uno" => 1}␤»
01:41 sorear rakudo: say any(1,2,3).WHAT
01:41 p6eval rakudo ae1300: OUTPUT«Junction()␤»
01:42 sorear shouldn't WHAT autothread over the junction?
01:42 sorear rakudo: say any(1,2,3).perl
01:42 p6eval rakudo ae1300: OUTPUT«any(1, 2, 3)␤»
01:42 sorear :/
01:42 masak sorear: I don't think so. .WHAT is a macro, not a method.
01:42 pmichaud WHAT isn't normally a ... what masak++ said
01:43 sorear rakudo: say any(1,2,3).cow
01:43 p6eval rakudo ae1300: OUTPUT«Method 'cow' not found for invocant of class 'Int'␤  in main program body at line 1␤»
01:43 sorear rakudo: say [1,2,3].cow
01:43 p6eval rakudo ae1300: OUTPUT«Method 'cow' not found for invocant of class 'Array'␤  in main program body at line 11:/tmp/kfNCto_FQA␤»
01:43 pmichaud even so, some methods do not autothread over junctions (such as .perl)
01:43 sorear the junction forwards an arbitrary method, the array doesn't
01:44 sorear rakudo: [1,2,3].say
01:44 p6eval rakudo ae1300: OUTPUT«123␤»
01:44 sorear rakudo: (1|2|3).say
01:44 p6eval rakudo ae1300: OUTPUT«any(1, 2, 3)␤»
01:44 eternaleye joined #perl6
01:45 masak stage 2 of the pls mini-hackathon is now complete. I now have 221 tests, most of which fail. time to initiate stage 3: implementation. :) http://github.com/masak/proto/commits/pls
01:45 Visitor99 rakudo: my $stuff1 = any(1|2|3); my $stuff2 = one(4|51|6); my $stuff3 = none($stuff1^$stuff2); $stuff3.say.perl;
01:45 masak but first, sleep.
01:45 p6eval rakudo ae1300: OUTPUT«none(one(any(any(1, 2, 3)), one(any(4, 51, 6))))␤»
01:45 masak Visitor99: that's a but redundant, using both any() and infix:<|>, etc.
01:46 masak s/but/bit/
01:46 Visitor99 ohh.. i see
01:47 Visitor99 rakudo:(one(4|51|6)).say.perl
01:47 pmichaud (need a space)
01:47 masak (and still a bit redundant)
01:47 pmichaud well, weird :-)
01:47 pmichaud rakudo:  (one(4|51|6)).perl.say
01:47 masak one(4, 51, 6) is fine. so is 4|51|6.
01:47 p6eval rakudo ae1300: OUTPUT«one(any(4, 51, 6))␤»
01:47 pmichaud except that 4|51|6 isn't a 'one' junction.
01:48 masak indeed not.
01:48 masak 'night.
01:48 Visitor99 well.. thanks all... see ya !
01:48 Visitor99 left #perl6
01:54 pugssvn r31228 | sorear++ | [viv] Perlesque for simple integer and single-quote string literals
02:05 szabgabx_ joined #perl6
02:06 avar joined #perl6
02:11 diakopter sorear: \\o//  r31226
02:13 diakopter sorear: how do you *want* separate compilation to work?  my thought is: fully-lexicalal string-eval
02:13 diakopter lexical
02:14 diakopter as opposed to perl's this-routines-locals-only lexical string eval
02:15 diakopter or javascript's always-in-the-toplevel string eval
02:15 diakopter (notwithstanding early netscape javascript where you could specify in which context to eval)
02:16 diakopter I've built the compile-time structures in perlesque such that code to reconstruct them can be baked into the target executable itself
02:17 diakopter in case the compiler needs to resume compilation at any point, it should be able to resume its context
02:17 diakopter I haven't *written* the codegen-gen required to emit such things, but it's definitely within the realm of feasible
02:22 diakopter sorear: I think I will add a p6eval target called vivsq :)
02:32 sorear I'm not completely sure what string eval has to do with separate compilation
02:32 sorear right now, you have a bunch of .pm6 files
02:32 sorear you run viv separately to compile each file to a .pmc file
02:33 sorear then Perl loads multiple .pmc files at runtime to compose the execution
02:33 sorear %Cursor:: comes from Cursor.pmc, %STD:: comes from STD.pmc, %Stash:: comes from Stash.pmc
02:33 sorear etc
02:33 sorear perlesque seems to require all code to be in one file, except for the BCL
02:36 sorear perlesque: my int $*foo = 2; say $*foo;
02:36 p6eval perlesque: OUTPUT«␤Unhandled Exception: System.ArgumentNullException: Argument cannot be null.␤Parameter name: obj␤  at (wrapper managed-to-native) System.Reflection.Emit.ModuleBuilder:getToken (System.Reflection.Emit.ModuleBuilder,object)␤  at System.Reflection.Emit.ModuleBuilder.GetToken
02:36 p6eval ..(System.R…
02:37 diakopter (as I said above, contextuals are currently broke)
02:37 diakopter (I'll fix soon)
02:38 diakopter afk till tomorrow
02:39 pronik` joined #perl6
02:48 Bzek joined #perl6
02:56 colomon joined #perl6
03:09 colomon MapIter got updated!
03:09 colomon \o/
03:10 patspam joined #perl6
03:11 pmichaud :-)
03:11 pmichaud more updates are coming
03:11 colomon sweet.
03:12 colomon I'm probably going to go to bed in a couple of minutes, but I'm looking forward to seeing what you have done.
03:12 pmichaud me too :-)
03:12 skids joined #perl6
03:12 pmichaud (looking forward to see what I've done, that is.  bedtime isn't likely for a while yet)
03:14 lue "Look at what you did! You made rakudo better!"
03:19 bluescreen joined #perl6
03:21 sorear phenny: msg diakopter - what is psq for doing control flow inside an expression?  e.g. perl6 (while x { y }; z) or perl5 do { while (x) { y } z; }
03:21 sorear phenny: tell diakopter - what is psq for doing control flow inside an expression?  e.g. perl6 (while x { y }; z) or perl5 do { while (x) { y } z; }
03:21 phenny sorear: I'll pass that on when diakopter is around.
03:25 mtnviewmark_ joined #perl6
03:29 sorear I'm now understanding the perlesque code... it is *interesting*
03:30 sorear it looks like the "Perlesque" code is actually a giant metaprogram which constructs a grammar AST while it is simultaneously compiled to CIL through the reflection system
03:33 colomon joined #perl6
03:34 sorear perlesque: $*FOO
03:35 p6eval perlesque: OUTPUT«␤Unhandled Exception: System.InvalidOperationException: you must declare the contextual $*FOO, including its type annotation␤  at TriAxis.RunSharp.TypeGen.GetMangledContextual (TriAxis.RunSharp.TypeGen currentFrameBuilder, Sprixel.FrameScope currentScope, Sprixel.FrameScope
03:35 p6eval ..topLeve…
03:41 alanhaggai joined #perl6
03:57 jhuni joined #perl6
04:04 diakopter sorear: my jsmeta project operated similarly, except it built up the metaprogram entirely using closures in a single execution context. no string eval. it was also a parser generator
04:04 phenny diakopter: 03:21Z <sorear> tell diakopter - what is psq for doing control flow inside an expression?  e.g. perl6 (while x { y }; z) or perl5 do { while (x) { y } z; }
04:05 diakopter I think it's the perl 5 way
04:06 diakopter but I don't know if there's a do { } without a condition
04:06 diakopter (but there can be)
04:08 diakopter sorear: frankly the parser generator in Sprixel is _potentially_ flexible enough to support the full Perl 6 grammar, but if you're doubtful of the accuracy of that claim, it's okay; I don't mind; I can understand skepticism; it's quite a tall claim. :)
04:08 diakopter (.. and enough to implement all of Cursor, I mean)
04:11 sorear Sprixel's parser generator is extremely similar to NQP-rx's
04:11 sorear I have no doubts that it could support a Rakudo-equivalent grammar
04:11 diakopter cool
04:12 sorear perlesque: say(do { 2; 3 })
04:12 p6eval perlesque: OUTPUT«␤Unhandled Exception: System.ArgumentNullException: Argument cannot be null.␤Parameter name: obj␤  at (wrapper managed-to-native) System.Reflection.Emit.ModuleBuilder:getToken (System.Reflection.Emit.ModuleBuilder,object)␤  at System.Reflection.Emit.ModuleBuilder.GetToken
04:12 p6eval ..(System.R…
04:12 diakopter hee
04:12 sorear perlesque: say(say("pie"))
04:12 p6eval perlesque: OUTPUT«pie␤1␤»
04:12 sorear perlesque: say(say("pie") || say("pie"))
04:12 p6eval perlesque: OUTPUT«␤Unhandled Exception: System.FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.␤  at System.String.FormatHelper (System.Text.StringBuilder result, IFormatProvider provider, System.String format, System.Object[]
04:12 p6eval ..arg…
04:12 diakopter interesting
04:12 diakopter oh
04:12 sorear g.AddInfixOperator("||", "LogicalOr");
04:12 sorear ?
04:13 diakopter yeah
04:13 sorear am I looking in the right place?
04:13 diakopter yes
04:13 diakopter it's not correct; I know
04:13 diakopter (let alone working) :)
04:13 diakopter let's see
04:13 sorear I'm about to change DEEP to function as a quasi-SSA representation
04:14 diakopter perlesque: say(say("pie") | say("pie"))
04:14 p6eval perlesque: OUTPUT«pie␤pie␤1␤»
04:14 sorear which will allow me to simulate short-circuiting, do-blocks, (and expressions period, for that matter)
04:14 diakopter cool
04:14 sorear perlesque: say("foo"|"bar")
04:15 p6eval perlesque: OUTPUT«␤Unhandled Exception: System.FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.␤  at System.String.FormatHelper (System.Text.StringBuilder result, IFormatProvider provider, System.String format, System.Object[]
04:15 p6eval ..arg…
04:15 diakopter just remember perlesque's EXPR is ... retarded (literally, no slight intended), so wrap explicit parens
04:15 sorear "wrap"?
04:15 diakopter puts parens everywhere
04:15 diakopter put parens everywhere
04:15 diakopter it doesn't parse precedence really at all
04:16 diakopter except for incidentally due to the way the rules are laid out
04:16 diakopter mmmm ..... pie .......
04:18 diakopter perlesque: say("foo" == "bar")
04:18 p6eval perlesque: OUTPUT«False␤»
04:18 diakopter hm
04:18 diakopter oh
04:18 diakopter truthiness doesn't apply to strings
04:18 diakopter I suppose it could
04:21 diakopter !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
04:21 diakopter sweet
04:21 diakopter I got Reflector to output a C# version of the perlesque parser without taking two hours of cpu
04:22 diakopter pmurias will be happy
04:24 diakopter hmm, when it takes more than a few seconds to copy selected text to the clipboard, that makes me wonder whether it'll fit into a nopastebin
04:36 Schwern joined #perl6
04:38 * sorear ponders writing a Perlesque->C# static compiler with a parser written using viv
04:39 JimmyZ joined #perl6
04:39 diakopter well, that's what it's doing now
04:39 diakopter just to CIL, which can be disassembled into C#
04:40 diakopter that's how I imagined bootstrapping, just ignoring the C# step
04:40 diakopter you can do multistage compilation in xbuild/.sln, I'm pretty sure
04:40 diakopter and even if you couldn't, it can be made to work
04:41 diakopter if I can ever get this to copy to clipboard, I'll show you
04:41 diakopter gtg
04:43 sorear oh.  I'm apparently still not quite up to speed on this
04:44 envi^home joined #perl6
05:06 plobsing joined #perl6
05:06 agentzh joined #perl6
05:10 justatheory joined #perl6
05:26 saaki joined #perl6
05:38 Visitor99 joined #perl6
05:41 orafu joined #perl6
05:46 [particle] joined #perl6
06:03 pugssvn r31229 | sorear++ | [viv] Slightly rethink and simplify the DEEP expression handling
06:03 pugssvn r31229 | [STDeco] Relax a dependency so stage2 doesn't need to be reparsed after viv changes
06:05 Entonian joined #perl6
06:07 sorear phenny: tell diakopter - Are you familiar with the trick for parsing operator precedence with only a CFG?
06:07 phenny sorear: I'll pass that on when diakopter is around.
06:16 sorear perlesque: say(sub () { 2 }())
06:16 p6eval perlesque: OUTPUT«␤Unhandled Exception: System.ArgumentNullException: Argument cannot be null.␤Parameter name: obj␤  at (wrapper managed-to-native) System.Reflection.Emit.ModuleBuilder:getToken (System.Reflection.Emit.ModuleBuilder,object)␤  at System.Reflection.Emit.ModuleBuilder.GetToken
06:16 p6eval ..(System.R…
06:16 sorear perlesque: say(sub (--> int) { 2 }())
06:16 p6eval perlesque: OUTPUT«␤Unhandled Exception: System.ArgumentNullException: Argument cannot be null.␤Parameter name: obj␤  at (wrapper managed-to-native) System.Reflection.Emit.ModuleBuilder:getToken (System.Reflection.Emit.ModuleBuilder,object)␤  at System.Reflection.Emit.ModuleBuilder.GetToken
06:16 p6eval ..(System.R…
06:16 azawawi joined #perl6
06:16 azawawi hi
06:18 sorear perlesque: sub (--> int) { 2 }
06:18 p6eval perlesque:  ( no output )
06:18 sorear perlesque: sub (--> int) { 2 } ()
06:18 p6eval perlesque: OUTPUT«␤Unhandled Exception: System.ArgumentException: An element with the same key already exists in the dictionary.␤  at System.Collections.Generic.Dictionary`2​[System.String,Sprixel.FrameLocal].Add (System.String key, Sprixel.FrameLocal value) [0x00000] in <filename unknown>:0 ␤  at
06:18 p6eval ..Sp…
06:18 sorear perlesque: (sub (--> int) { 2 })()
06:18 p6eval perlesque: OUTPUT«␤Unhandled Exception: System.ArgumentException: An element with the same key already exists in the dictionary.␤  at System.Collections.Generic.Dictionary`2​[System.String,Sprixel.FrameLocal].Add (System.String key, Sprixel.FrameLocal value) [0x00000] in <filename unknown>:0 ␤  at
06:18 p6eval ..Sp…
06:18 sorear perlesque: (sub (--> int) { 2 })();
06:18 p6eval perlesque: OUTPUT«␤Unhandled Exception: System.ArgumentException: An element with the same key already exists in the dictionary.␤  at System.Collections.Generic.Dictionary`2​[System.String,Sprixel.FrameLocal].Add (System.String key, Sprixel.FrameLocal value) [0x00000] in <filename unknown>:0 ␤  at
06:18 p6eval ..Sp…
06:18 diakopter postfix () is not on every form
06:18 phenny diakopter: 06:07Z <sorear> tell diakopter - Are you familiar with the trick for parsing operator precedence with only a CFG?
06:19 diakopter maybe not
06:19 diakopter gtg again :/
06:20 sorear what do you mean not on every form
06:20 sorear perlesque: my $K = (sub (--> int) { 2 }); $K();
06:20 p6eval perlesque:  ( no output )
06:20 sorear perlesque: my $K = (sub (--> int) { 2 }); say($K());
06:20 p6eval perlesque: OUTPUT«0␤»
06:20 sorear perlesque: my $K = (sub () { 2 }); say($K());
06:20 p6eval perlesque: OUTPUT«␤Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object␤  at perlesque.Sprixel.Grammar+IParser.Parse (Sprixel.Matcher M, UTF32String IN, Int32 o, UInt32 b, Sprixel.State s) [0x00000] in <filename unknown>:0 ␤  at MainClass.Main
06:20 p6eval ..(Sys…
06:22 sorear ah, subInvocation can only use ident or simple variable
06:23 * sorear decides not to try and fake do{}, but will simply generate invalid output for now
06:57 kaare joined #perl6
07:06 pugssvn r31230 | sorear++ | [viv] Implement basic expressions for perlesque.  Also, prototype the DEEP-based expression handling.
07:08 Ross joined #perl6
07:13 mmcleric joined #perl6
07:16 sorear phenny: tell diakopter - you meantioned something earlier about wanting to have Perl6 grammar compiled code re-use sprixel functions.  How would that look in Perlesque?
07:16 phenny sorear: I'll pass that on when diakopter is around.
07:17 sorear phenny: tell diakopter - token num { \d+ }; rule factor { <num> | '(' <expr> ')' }; rule term { <factor> [ <[ * / ]> <factor> ]* }; rule expr { <term> [ <[ + - ]> <term> ]* }
07:17 phenny sorear: I'll pass that on when diakopter is around.
07:18 sorear phenny: that is an unambiguous CFG for four-function arithmetic with parentheses.  The operator precedence rules fall out of the grammar and cannot be violated; extension to 30 operators is straightforward
07:18 sorear phenny: tell diakopter - that is an unambiguous CFG for four-function arithmetic with parentheses.  The operator precedence rules fall out of the grammar and cannot be violated; extension to 30 operators is straightforward
07:18 phenny sorear: I'll pass that on when diakopter is around.
07:22 jnthn morning o/
07:23 pmichaud jnthn: good morning :)
07:23 jnthn pmichaud: Heh, somebody's up late. :-)
07:24 jnthn pmichaud: How goes list?
07:24 pmichaud it's going nicely
07:24 pmichaud I have Positional now in core
07:24 pmichaud (i.e., Positional.pm)
07:24 jnthn Oh, excellent.
07:24 jnthn I hoped you might do that.
07:24 pmichaud cleaned up a lot of postcircumfix:<[ ]> stuff
07:24 pmichaud (and see how to make postcircumfix:<{ }> do likewise)
07:24 jnthn Makes me all the more happy that I put in the "can augment to add roles" stuff.
07:25 pmichaud me too :)
07:26 jnthn Having the assocative role in PIR was getting kinda painful.
07:26 pmichaud yes, and positional was going to be painful also :)
07:26 jnthn Yeah
07:26 jnthn Can imagine similar issues.
07:26 pmichaud anyway, I have the List class in place, it uses the new Iterators.
07:26 pmichaud We're back to Array ~~ List, which is nice.
07:27 jnthn \o/
07:27 pmichaud and .map returns a List
07:27 jnthn Excellent.
07:27 pmichaud (instead of a MapIterator)
07:27 jnthn gather/take?
07:27 pmichaud haven't gotten to gather/take yet, but it'll be a List also.
07:27 jnthn OK, excellent.
07:27 pmichaud so far the iterators haven't been a problem -- it's cleaning up all of the other code
07:28 jnthn Seems like we're oging to stop leaking iteratorss. :-)
07:28 jnthn Yeah, can imagine there's a lot biult atop of what we already had.
07:28 jnthn Do we get through make test yet?
07:28 pmichaud oh sure, been doing that for a while
07:28 pmichaud I'm in S02 tests atm
07:28 jnthn Nice :-)
07:29 pmichaud actually, the biggest problem with make test ended up being getting "use" to work
07:29 pmichaud because "use" now depends on being able to iterate hashes
07:29 pmichaud (where it didn't before)
07:29 jnthn ah, yes.
07:31 quester_ joined #perl6
07:31 jnthn I guess hashes are in for some tweaks too?
07:31 pmichaud yes, definitely.
07:31 pmichaud more of the associative role
07:31 jnthn OK.
07:33 jnthn The signature (@index) in Positional.pm surprises me a little
07:33 jnthn (expected *@index there)
07:34 jnthn Does @a[1,2] boil down to a method call with one argument or with two?
07:34 pmichaud one.
07:34 jnthn That surprises me a little.
07:34 pmichaud I don't think that .[ ]  should take arguments the same way that .( ) does.
07:35 pmichaud and, more to the point, this ended up being much easier.  :-)
07:35 jnthn It bites when you get onto hashes.
07:35 pmichaud and more to the more to the point, it will be easier to handle    .[3;4;5]
07:35 pmichaud hashes should be the same way.
07:36 pmichaud (and likely will be, when I'm done)
07:36 sorear good morning pmichaud
07:36 pmichaud in fact, right now we're doing extra work to try to get hashes to work when we probably don't need to.
07:36 jnthn The problem I hit is that you in theory want to accept anything as a hash key and stringify it.
07:37 pmichaud I had the same problem with ints in .[ ]
07:37 pmichaud it's pretty straightforward, actually
07:37 jnthn OK, so long as you have a solution for it.
07:37 kappa joined #perl6
07:37 pmichaud postcircumfix:<[ ]>(Int $i) { ... }
07:37 pmichaud and
07:37 pmichaud postcircumfix:<[ ]>($i) { self.postcircumfix:<[ ]>($i.Int) }
07:38 jnthn ah, a delegatory approach
07:38 jnthn OK, that works.
07:38 pmichaud right
07:38 pmichaud which we can do now because Positional is a true role
07:38 jnthn Yes. :-)
07:38 jnthn OK, I think that'll fly.
07:38 jnthn I was trying to work it to avoid the re-dispatch, originally.
07:39 pmichaud I think it's like many other places in the core where having "not quite the right type" results in a redispatch
07:39 jnthn yes, like the whole Cool.
07:39 pmichaud anyway, we'll do that for now and then fix it up later.
07:39 pmichaud I could probably change to
07:40 pmichaud postcircumfix:<[ ]>(Cool $i) { ... }
07:40 jnthn Sure. I think we may have to go to a multi-arg model to handle multi-dim stuff.
07:40 jnthn so we can have a **@index sig.
07:40 pmichaud I suspect/hope not.
07:40 jnthn But not worried about that for now.
07:40 pmichaud I'm hoping we can type-distinguish on Slicels
07:40 jnthn Oh
07:40 araujo joined #perl6
07:40 jnthn That would also work.
07:40 jnthn It's easy even.
07:40 pmichaud right
07:41 pmichaud which is why I think the one-argument form is in fact correct.
07:41 jnthn Just not the model that I understood the spec as suggesting.
07:41 jnthn But I know it's been in flux of late too :-)
07:41 pmichaud right.
07:41 foodoo joined #perl6
07:41 pmichaud anyway, single-argument seems to be (1) easier and (2) more efficient
07:41 pmichaud so I'm going wit hthat.
07:42 JimmyZ joined #perl6
07:42 jnthn Yes, from what you have so far, you're going to get hits on the type-cache
07:42 jnthn So it should dispatch reasonably fast.
07:42 pmichaud also, we avoid creating and flattening slurpies.
07:42 pmichaud (in the !postcircumfix:<[ ]>
07:42 jnthn Aye.
07:42 jnthn That'll also be a win.
07:42 pmichaud yes, so far I'm seeing a lot of potential wins in all of this.
07:42 jnthn :-)
07:43 pmichaud the more I write, the more I'm absolutely convinced this is the right model.
07:43 pmichaud Did you happen to see my latest draft of the model (google doc)?
07:43 jnthn I didn't - I've been a bit focused in slide prep/hack meet/affordable pivo. :-)
07:43 pmichaud http://docs.google.com/Doc?docid=0AeZqZQ8​wfDHGZGczanFtcHZfMTZmazdrZGpkYg&amp;hl=en
07:43 pmichaud it's actually pretty short
07:44 pmichaud but so far everything has worked out great -- no major "how in the world do I get X to work?" moments
07:45 jnthn That's a very good sign.
07:45 pmichaud unlike all of the other designs, which always had lots of "oh, gosh, that's not going to work"  moments
07:46 pmichaud know off the top of your head what module is responsible for handling [ ]   meta reduction?
07:46 pmichaud (that's the current thing I'm having to clean up)
07:46 * pmichaud guesses "metaops.pir"
07:46 jnthn metaops.pm
07:46 pmichaud ah
07:46 jnthn method reduce
07:47 jnthn er, reducewith
07:47 jnthn and sub, not method
07:47 jnthn grr, I clearly didn't visit the coffee machine enough yet today
07:47 pmichaud ah, yes, it has a gather/take
07:47 pmichaud I guess I have to do that next.
07:47 jnthn a lot of tings use gather/take
07:48 pmichaud and a lot of things request direct iterators where they no longer should :)
07:49 colomon joined #perl6
07:49 quester_ rakudo: @*ARGS="--bool"; sub MAIN (Bool :$bool) {say "\$bool=$bool, ?\$bool=", ?$bool};
07:49 p6eval rakudo ae1300: OUTPUT«$bool=1, ?$bool=1␤»
07:50 quester_ rakudo: @*ARGS="--/bool"; sub MAIN (Bool :$bool) {say "\$bool=$bool, ?\$bool=", ?$bool};
07:50 p6eval rakudo ae1300: OUTPUT«$bool=1, ?$bool=0␤»
07:50 snarkyboojum joined #perl6
07:50 jnthn pmichaud: The docs look nice. :-)
07:50 jnthn *doc looks
07:50 jnthn Quite a change of model, but seems very workable.
07:51 jnthn How mutable is list? Can I $somelist[0] = 42, for example?
07:51 quester_ Does it seem to anyone that --/bool given to a main program setting the corresponding parameter to "True does False" is a bug?
07:52 pmichaud it depends on whether $somelist[0] is writable
07:52 pmichaud (which would depend on the source)
07:53 pmichaud for example,   ($a, 1)[0]  would be writable, while  ($a, 1)[1]  would not
07:53 jnthn Ah, OK.
07:53 colomon pmichaud: do arrays work properly when passed as arguments now?
07:53 pmichaud the List itself is mutable in the sense that you can do shift/unshift sorts of things.
07:53 jnthn OK.
07:53 pmichaud colomon: you mean do lists passed to array parameters work properly?
07:53 jnthn That's more my question, yes.
07:53 colomon it would be easy to clean up iterator use in reducewith (for instance)
07:54 colomon pmichaud: yes
07:54 colomon direct iterators was always the hard way to do things....
07:54 pmichaud colomon: afaik, they do.  At the moment they still tend to remember everything
07:54 pmichaud but that's preferable to forgetting everything :-)
07:55 colomon that will get you a different set of errors, then.  :)
07:55 pmichaud no, remembering everything will just hold on to memory a bit longer :)
07:56 colomon pmichaud: naw, I mean infinite lazy Lists won't work if you remember everything.
07:56 sorear pmichaud: does $list[0] := 42; make sense?
07:56 colomon (building)
07:56 pmichaud sure they will, as long you don't end up iterating infinitely :)
07:56 sorear (not that we have a working infix:<:=> or anything like that)
07:57 pmichaud sorear: same before, it depends on whether $list[0] refers to a container or no.
07:57 pmichaud *same as before
07:58 sorear what about @arr = <1 2>; $list = magic(@arr); $list[2] = 3;
07:58 pmichaud since I have no idea what $list ends up being in this case....
07:59 pmichaud if you mean that it has no .[2] element, then it would be like trying to assign 3 to a failure (and would fail :-)
07:59 colomon pmichaud: you already looking at reducewith, or do you want me to take a quick stab at it before I go back to bed?
07:59 sorear I think I might mean @arr.flat
07:59 pmichaud sorear: so, something like   $list = @arr.flat;  $list[2] = 3;
07:59 pmichaud that will likely fail
08:00 pmichaud I haven't decided if .flat should always return a new List or could sometimes return self
08:00 pugssvn r31231 | sorear++ | [viv] Implement perlesque output for function calls
08:00 pmichaud so far I'm leaning towards "always a new List"
08:00 pmichaud colomon: if you're wanting to do reducewith, that would be awesome
08:01 pmichaud I'm probably going to need to head to sleep soon -- been working on this all day and need a break
08:01 colomon I co-wrote the code, so I've got an idea what needs to be done.  :)
08:01 pmichaud I don't yet need the triangle form -- just having basic reduce would be helpful
08:01 sorear std: grammar G
08:01 p6eval std 31230: OUTPUT«[31m===[0mSORRY![31m===[0m␤Unable to parse grammar definition at /tmp/usuq6g_B7w line 1 (EOF):␤------> [32mgrammar G[33m⏏[31m<EOL>[0m␤Parse failed␤FAILED 00:01 107m␤»
08:01 sorear std: grammar G;
08:02 p6eval std 31230: OUTPUT«ok 00:01 104m␤»
08:02 sorear bug?
08:04 pmichaud colomon: what I'm really trying to get working for the moment is Array.exists()
08:04 pmichaud currently it depends on [&]
08:04 pmichaud which depends on reduce :-)
08:04 pmichaud er, currently it depends on ?&
08:05 jnthn sorear: What would you ever use it without a block or semi for? :-)
08:05 colomon does !@array return true if there is nothing in @array?
08:05 pmichaud colomon: that's how it should work, yes.
08:05 pmichaud I haven't tested booleans yet.
08:05 pmichaud seems to work locally.
08:06 * pmichaud knows he's going to have to go through every class and role and re-check to make sure all of the methods are in the right place.
08:07 sorear jnthn: testing compilers, duh!
08:08 pmichaud sorear: I think there's a good argument to be made that grammar/class/module/etc.  require either a block or a semi.
08:09 pmichaud anyway, I think I'm going off to sleep for a short while.
08:09 pmichaud feel free to work on some of the other items; try not to go too radical in the branch just yet, though.  :)
08:09 jnthn sleep well :-)
08:09 pmichaud (although I suppose I can review/revert commits easily enough if needed)
08:11 pmichaud there are plenty of known (to me) holes in the implementation, so don't rely too heavily on anything there just yet :)
08:11 pmichaud right now I'm focusing on getting a reasonable bulk of the test suite running, then I'll tune and clean up a bit
08:11 pmichaud okay, I'm gone for a while
08:11 pmichaud bbl
08:11 jnthn o/
08:14 colomon pmichaud: no shift yet?
08:15 colomon no, it's there... :(
08:16 cono rakudo: enum MyDay <Sat Sun>; my $x = "today" but Sat; $x.WHAT.say
08:16 p6eval rakudo ae1300: OUTPUT«()␤»
08:16 cono is it right?
08:17 colomon > my @a = 1,2 ,3; say @a.perl; say !@a; say @a.perl
08:17 colomon [1, 2, 3]
08:17 colomon 0
08:17 colomon []
08:17 colomon is my problem...
08:17 colomon so not enough memory there yet.
08:17 * quester_ Submitted RT #75706 for [PATCH] Pass False to MAIN for negated argument --/bool, not True does False
08:17 * sorear wonders how disruptive lists will be in millings
08:17 xabbu42 joined #perl6
08:19 colomon > my @a = 1,2 ,3; say @a.perl; say @a.perl
08:19 colomon [1, 2, 3]
08:19 colomon []
08:19 colomon @array.perl is broken, then.
08:19 jnthn cono: Well, sorta. :-)
08:20 jnthn cono: The ansewr should not be Str()
08:20 jnthn Because mixing in a role derives a new anonymous class.
08:20 sorear in class ''
08:20 jnthn But it probably should stringify more helpfully.
08:20 cono jnthn: with MyDay method, am i right?
08:21 jnthn The code looks right, but whether Rakudo will do the right thing with enums at the moment is a whole other matter.
08:21 colomon rakudo: say [&] 1, 2, 3, 4
08:21 p6eval rakudo ae1300: OUTPUT«all(all(all(1, 2), 3), 4)␤»
08:21 cono rakudo: enum MyDay <Sat Sun>; my $x = "today" but Sat; $x.MyDay.say
08:21 p6eval rakudo ae1300: OUTPUT«Method 'MyDay' not found for invocant of class ''␤  in main program body at line 11:/tmp/wC7O18xbe8␤»
08:21 pugssvn r31232 | sorear++ | [viv] Translate classes and grammars in perlesque.  Admittedly not too useful without support for methods or regexes...
08:21 jnthn rakudo: enum MyDay <Sat Sun>; say Sat.WHAT
08:22 p6eval rakudo ae1300: OUTPUT«Int()␤»
08:22 jnthn Ah
08:22 jnthn Yeah, we need some special hanlding for "but enum"
08:22 colomon rakudo: say [?&] 1, 2, 3, 4
08:22 p6eval rakudo ae1300: OUTPUT«1␤»
08:22 colomon rakudo: say ([?&] 1, 2, 3, 4).WHAT
08:22 p6eval rakudo ae1300: OUTPUT«Bool()␤»
08:23 sorear What are the differences between ?&, &&, and, and andthen?
08:24 colomon ?& converts arguments to boolean and then ands them
08:24 colomon && does like you expect.
08:24 colomon dunno andthen
08:24 moritz_ the difference between '&&' and 'and' is precedence, just like in Perl 5
08:25 colomon rakudo: say ([?&] 2, 2, 3, 4).perl
08:25 p6eval rakudo ae1300: OUTPUT«Bool::True␤»
08:25 colomon rakudo: say ([&&] 2, 2, 3, 4).perl
08:25 p6eval rakudo ae1300: OUTPUT«===SORRY!===␤Could not find sub &infix:<&&>␤»
08:25 sorear dunno, I grew up on C, 42 && 95 == 1 for me :)
08:25 colomon rakudo: say (2 && 2 && 3 && 4).perl
08:25 p6eval rakudo ae1300: OUTPUT«4␤»
08:31 quester_ left #perl6
08:32 pugssvn r31233 | sorear++ | [viv] Add 'note' for Perlesque as an example of a remapped function in the new paradigm (but it might be added as a primitive, don't expect the particular current mapping to stay)
08:35 colomon pmichaud: ?@a doesn't work
08:35 colomon seems to be always true atm
08:37 jhuni joined #perl6
08:40 sorear perlesque: my @foo = list[int].new;
08:40 p6eval perlesque: OUTPUT«␤Unhandled Exception: System.ArgumentNullException: Argument cannot be null.␤Parameter name: obj␤  at (wrapper managed-to-native) System.Reflection.Emit.ModuleBuilder:getToken (System.Reflection.Emit.ModuleBuilder,object)␤  at System.Reflection.Emit.ModuleBuilder.GetToken
08:40 p6eval ..(System.R…
08:41 sorear perlesque: my $Afoo = list[int].new; $Afoo[0] = 52;
08:41 p6eval perlesque: OUTPUT«␤Unhandled Exception: System.MissingMemberException: Cannot find property  in System.Type␤  at TriAxis.RunSharp.TypeInfo.FindProperty (System.Type t, System.String name, TriAxis.RunSharp.Operand[] indexes, Boolean static) [0x00000] in <filename unknown>:0 ␤  at
08:41 p6eval ..TriAxis.RunSharp.Ope…
08:41 sorear perlesque: my $Afoo = list[int].new; $Afoo[532] = 52;
08:41 p6eval perlesque: OUTPUT«␤Unhandled Exception: System.MissingMemberException: Cannot find property  in System.Type␤  at TriAxis.RunSharp.TypeInfo.FindProperty (System.Type t, System.String name, TriAxis.RunSharp.Operand[] indexes, Boolean static) [0x00000] in <filename unknown>:0 ␤  at
08:41 p6eval ..TriAxis.RunSharp.Ope…
08:43 sorear perlesque: my $Afoo = list[int].new(); $Afoo[523] = 52;
08:43 p6eval perlesque: OUTPUT«␤Unhandled Exception: System.MissingMemberException: Cannot find property  in System.Collections.Generic.List`1[[System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]␤  at TriAxis.RunSharp.TypeInfo.FindProperty (System.Type t, System.String
08:43 p6eval ..nam…
08:43 sorear perlesque: my $Afoo = list[int].new(); $Afoo.Add(52); say($Afoo[0]);
08:43 p6eval perlesque: OUTPUT«␤Unhandled Exception: System.MissingMemberException: Cannot find property  in System.Collections.Generic.List`1[[System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]␤  at TriAxis.RunSharp.TypeInfo.FindProperty (System.Type t, System.String
08:43 p6eval ..nam…
08:43 sorear perlesque: my $Afoo = List[int].new(); $Afoo.Add(52); say($Afoo[0]);
08:43 p6eval perlesque: OUTPUT«␤Unhandled Exception: System.MissingMemberException: Cannot find property  in System.Collections.Generic.List`1[[System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]␤  at TriAxis.RunSharp.TypeInfo.FindProperty (System.Type t, System.String
08:43 p6eval ..nam…
08:43 sorear perlesque: my $Afoo = List[int].new(); $Afoo.Add(52); say($Afoo[1]);
08:43 p6eval perlesque: OUTPUT«␤Unhandled Exception: System.MissingMemberException: Cannot find property  in System.Collections.Generic.List`1[[System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]␤  at TriAxis.RunSharp.TypeInfo.FindProperty (System.Type t, System.String
08:43 p6eval ..nam…
08:47 sorear Funny, it works fine here
08:47 colomon sorear: what does?
08:47 sorear that perlesque line
08:48 colomon ah.
08:48 Su-Shee joined #perl6
08:48 colomon > my @a; my @b = @a
08:48 colomon Null PMC access in clone()
08:51 patrickas joined #perl6
08:51 patrickas hello
08:51 moritz_ hi
08:52 patrickas hi moritz_, I read we broke the repl :-(
08:52 colomon phenny: tell pmichaud Just pushed new reducewith.  Note that copying an empty array gets a Null PMC, and ?@a and !@a always return true and false, respectively.
08:52 phenny colomon: I'll pass that on when pmichaud is around.
08:53 moritz_ patrickas: aye
08:53 moritz_ I broke it, actually
08:53 jnthn oh noes
08:53 jnthn moritz_: What's broke?
08:53 moritz_ jnthn: autoprinting on the REPL
08:53 patrickas I know it would be a ugly dirty fix but can't we just detect the repl and not run main there with a big fixme please comment so we remember changing that one day ?
08:53 jnthn ah, so it is...
08:53 mmcleric joined #perl6
08:54 moritz_ jnthn: since I add a call to MAIN_HELPER at the end of each comp unit
08:54 patrickas hello jnthn welcome to gmt+2 :-)
08:54 jnthn :-)
08:54 moritz_ which I did under the assumption that the return value of a comp unit itsn't used
08:54 jnthn moritz_: Ah, OK...
08:54 jnthn moritz_: ops. :-)
08:54 jnthn *oops
08:55 jnthn moritz_: If MAIN_HELPER returned the value, though, wouldn't that work?
08:56 moritz_ jnthn: it might... but won't it mess up sink context ?
08:56 jnthn moritz_: maybe
08:56 moritz_ I mean, is sink context propagated recursively?
08:56 patrickas yes it would
08:56 moritz_ sub f { 3 }; sub g { f }; g(); # is 3 in sink context now?
08:56 patrickas sorry answer to wrong question
08:57 moritz_ if "yes", then it might work
08:57 patrickas > our sub MAIN_HELPER {return 5;}
08:57 patrickas 5
08:58 jnthn ah, yeah, I see the issue.
08:58 jnthn (with sink)
08:58 patrickas if i overwrite MAIN_HELPER on the repl, i get the return value printed fwtw
08:59 JimmyZ my friends was blocked by the examples of book, hehe
09:00 sorear phenny: tell diakopter - I think tomorrow I'll work on the Cursor DFA (that is to say, removing the last non-optional dependency Cursor has on p5regex)
09:00 phenny sorear: I'll pass that on when diakopter is around.
09:00 * sorear -> sleep
09:03 [mark] joined #perl6
09:04 moritz_ patrickas: indepent of the current breakage, if you want to hack a bit more on MAIN, you could implement the spec changes introduced by  r31190
09:05 moritz_ based on a negotiation between avar's wishes and TheDamian defending UNIX philosphy
09:06 patrickas already working on it (read it in the backlog) but having some problems with some functions not being accessible to main helper
09:06 moritz_ colomon: btw Robrt told me he upgraded the software behind planetsix.perl.org, so the issue with the title of your post should be resolved now
09:10 alanhaggai joined #perl6
09:13 hejki http://pastebin.org/327584 :O
09:14 moritz_ oh wtf
09:15 hejki i'm on rakudo master
09:15 moritz_ rakudo: .say for 1.."10"
09:15 p6eval rakudo ae1300: OUTPUT«1␤»
09:15 hejki ahh
09:16 moritz_ doesn't feel right
09:16 moritz_ try
09:16 moritz_ sub MAIN($r as Int) { ... }
09:16 hejki [ hejki@cornix ~/ohjelmointi/perl6] $ perl6 -e 'sub MAIN($r)  { "looping from 1 to $r".say;
09:16 hejki omg.. wrong paste ;<
09:16 hejki for 1..$r.Int -> $i { .. } works
09:16 hejki too
09:18 pugssvn r31234 | moritz++ | [t/spec] initial tests for callframe()
09:18 cono jnthn talking :)
09:20 moritz_ what is he talking about?
09:21 cono Signatures in perl6\
09:21 patrickas moritz_: the spec does not mention it but is it customary to return zero with --help (print to stdout) and return non zero when printing to stderr ?
09:21 moritz_ nice topic
09:21 moritz_ perl --help >/dev/null; echo $?
09:21 moritz_ 0
09:22 moritz_ perl --foobar >/dev/null; echo $?
09:22 moritz_ Unrecognized switch: --foobar  (-h will show valid options).
09:22 moritz_ 29
09:22 moritz_ patrickas: yes :-)
09:22 patrickas ok so what return value should I use for non zero ? and should it be made explicit in the spec ?
09:23 moritz_ it would make sense to make it explicit, but I don't feel up that task atm
09:24 patrickas ok i'll use 29 in the mean while
09:24 dalek rakudo: b931990 | moritz++ |  (2 files):
09:24 dalek rakudo: try to make callframe().my.<$x> read-only
09:24 dalek rakudo: It doesn't quite work, but it reduces the amount of damage
09:24 dalek rakudo: you can do to the caller's lexpad
09:24 dalek rakudo: Also run new callframe.t
09:24 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/b​93199009c89af68cbdbe7c29cbd778a50ad2402
09:25 hejki btw.. can sub MAIN have some nice customized usage-messagE?
09:25 hejki s/E/e/
09:27 patrickas rakudu: sub MAIN ($number) {say $number};
09:27 patrickas rakudo: sub MAIN ($number) {say $number};
09:27 p6eval rakudo ae1300: OUTPUT«Usage:␤/tmp/aQTW436UQn number␤»
09:27 patrickas rakudo: sub MAIN ($number) {say $number}; sub USAGE {say 'This is how you do it'};
09:27 p6eval rakudo ae1300: OUTPUT«This is how you do it␤»
09:28 snarkyboojum joined #perl6
09:29 hejki ahh nice
09:30 mberends joined #perl6
09:30 colomon joined #perl6
09:32 colomon moritz_: \o/
09:34 moritz_ it seems that in the 'list' branch, about 1/3 to 1/2 of the tests die
09:35 sorear Is this better than what we had before?
09:35 moritz_ depends on what you mean by "before"
09:35 moritz_ it's the first time I look at that branch
09:37 hejki rakudo: my $c = sub ($x) { $x.say }; $c.(2)
09:37 p6eval rakudo ae1300: OUTPUT«2␤»
09:37 hejki rakudo: my $c = sub($x) { $x.say }; $c.(2)
09:37 p6eval rakudo ae1300: OUTPUT«===SORRY!===␤Confused at line 11, near "my $c = su"␤»
09:41 moritz_ pmichaud: in 2858bbc768472851912e774209c2ad1bf55fbc32 was it deliberated that @index is not slurpy?
09:41 colomon moritz_: gather / take doesn't work yet there.
09:42 colomon ?@a and !@a don't work yet.
09:42 colomon @a.perl and @a.join, etc, don't work right.
09:42 colomon basically, probably 90% of things with arrays won't work at the moment.
09:43 colomon gotta go for a few, packing car again.
09:44 patrickas hejki: in perl6 spaces matter a bit more than perl5
09:44 hejki clearly
09:45 patrickas i seriously think this is going to be one of the top complaints from perlfivers
09:45 moritz_ I'm pretty sure it will be
09:45 hejki i'm not complaining
09:46 hejki i just couldn't understand why it didn't work without the space :P
09:46 moritz_ std: my $c = sub($x) { $x.say }; $c.(2)
09:46 p6eval std 31234: OUTPUT«[31m===[0mSORRY![31m===[0m␤Variable $x is not predeclared at /tmp/ZVAF0aqAxi line 1:␤------> [32mmy $c = sub($x[33m⏏[31m) { $x.say }; $c.(2)[0m␤Word 'sub' interpreted as 'sub()' function call; please use whitespace instead of parens at /tmp/ZVAF0aqAxi line 1:␤------>
09:46 p6eval ..[32mm…
09:46 Su-Shee I haven't even realize a difference until today. where are spaces different now?
09:48 moritz_ Su-Shee: mostly before parens/brackes/braces
09:49 Su-Shee oh. sometimes ignorance _is_ bliss. :) I didn't know.
09:52 patrickas you can say "my $a=q{foo};" but not "my $a=q(foo);" it has to be "my $a=q (foo);" if you want to use the parens :-( something I can't make myself like
09:53 avar moritz_: Nice specchange
09:53 phenny avar: 11 Jun 06:18Z <moritz_> tell avar that the current commits to rakudo wrt USAGE sub print to STDOUT again
09:53 avar I KNOW
09:53 avar :)
09:53 moritz_ :-)
09:54 patrickas i think compiling rakudo is what's finally going to make me upgrade my pc...
09:56 avar moritz_: Mixing stdout/stderr like that can be a real pain when writing cronjobs (not that you're likely to call --help).
09:56 avar I have a bunch of cron jobs that do >/dev/null that break down because some program outputs non-error stuff on STDERR
09:57 patrickas but the usage mesage is an error UNLESS you are calling --help in which case it is the output you are asking for
09:58 moritz_ patrickas: I kinda hope avar++ was referring to the previous situation
09:58 Su-Shee mberends: I just pushed the fetchrow_hashref improvements from xxx days ago and will do tests now.
09:59 avar Yeah, that's what I meant. Try e.g. ls --aoeuaou >/dev/null on a GNU system, it'll output an error referring to the --help message
09:59 avar so (current code)++
10:00 moritz_ actually it's not yet implemented
10:00 moritz_ only specced
10:01 patrickas It would have been if my maching was a bit faster :-) still compiling ....
10:01 hejki rakudo: class Foo { has Int $.x is rw; method bar { "x is {$.x.WHAT}".say } }; my $f = Foo.new(x=>2); $f.bar; $f.x = "1"; $f.bar; # i can't understand this either :O
10:01 p6eval rakudo ae1300: OUTPUT«x is Int()␤x is Str()␤»
10:02 hejki the is rw allows overriding the type? :o
10:02 avar moritz_: Also, I can run `make spectest` now without my machine dying, yay
10:02 moritz_ hejki: clearly a bug
10:02 felipe joined #perl6
10:03 hejki heh.. now i clearly need to attempt a fix ;<
10:08 patrickas ok compiled , tested and pushed the STDERR issue
10:09 patrickas but did not spectest yet ... that'll take a long while (the patch is pretty simple to review though in the mean while)
10:11 patrickas http://github.com/patrickas/rakudo/commit​/5df342d6968f8ed2989acc909105195767021b6b
10:13 moritz_ patrickas: looks good
10:18 patrickas moritz_: I am trying to locate the code that "handles" the repl to see if I can workaround the printing brokenness (long shot) but I can' even find it!
10:20 hejki hmm.. the type checking in builtins/assign.pir seems to work, e.g. my Int $x = 4; $x = "2"; # fails, so it has to be somewhere else.
10:20 hejki also the rw_ok check fails for classes.. :O
10:20 moritz_ patrickas: it's in nqp-rx, likely
10:21 hejki i mean.. fails as in works correctly :>
10:21 whiteknight joined #perl6
10:26 moritz_ fails to give you a clue? :-)
10:27 moritz_ rakudo: my $x = pir::get_hll_global__pS('False'); say $x.perl
10:27 p6eval rakudo ae1300: OUTPUT«Bool::False␤»
10:33 dalek rakudo: 197b4ba | (Patrick Abi Salloum)++ | src/core/MAIN.pm:
10:33 dalek rakudo: output default usage message to stderr unless --help is specified
10:33 dalek rakudo: Signed-off-by: Moritz Lenz <moritz@faui2k3.org>
10:33 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/1​97b4bad776fb28f6c7447bb29de6c46573b8b15
10:55 dalek nqp-rx: 1a63388 | bacek++ |  (2 files):
10:55 dalek nqp-rx: Actually provide slurp in setting library.
10:55 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/1​a63388e0133ccbe12d85278b006ae16c3a3e36d
10:56 colomon_web joined #perl6
10:56 colomon_web huh.
10:56 Ross joined #perl6
10:57 ggoebel joined #perl6
10:57 colomon_web tethered, but my normal irc client doesn't want to talk to it this time.
10:59 jnthn hejki: Type constraints on attrs are NYI, but I've got some local patches that help gets us in that direction.
10:59 jnthn Have to clean up some other bits first.
11:09 jedai joined #perl6
11:14 mmcleric joined #perl6
11:23 patrickas moritz_: I noticed that in the repl $*PROGRAM_NAME is not defined where as it has a value in perl6 -e '...' and wehn running a script normally so maybe in Action.pm someone who knows what they are doing, can just add a check for it and the repl printing issue will be sweeped under the carpet for now
11:23 patrickas It tried myself something like
11:24 patrickas my $PROGRAM := PAST::Var.new( :scope('parameter'), :name('@_'), :slurpy(1) );
11:24 patrickas if ( $PROGRAM[0][0] ) {...}
11:24 patrickas but it did not work because obviously I have no idea what I am doing.
11:27 jnthn I'm pretty sure checking $*PROGRAM_NAME won't be the right way.
11:28 patrickas yea i would never dare claim it is a fix ... at best a "sweeping under the rug for now"
11:34 moritz_ I've tried  $mainline := PAST::Op.new(:pasttype('call'), :name('&MAIN_HELPER), $mainline );
11:34 moritz_ and then pass return MAIN_HELPER's arguments if there's no MAIN
11:34 moritz_ but it dies with
11:34 moritz_ Method 'set_outer' not found for invocant of class 'Parcel' in main program body at <unknown line>:CORE.setting
11:34 moritz_ at run time
11:34 moritz_ for something as simple as  say 1
11:34 jnthn :S
11:36 moritz_ ah, that would be in YOU_ARE_HERE
11:36 moritz_ PAST::Var.new( :name('mainline'), :scope('parameter') ), PAST::Op.new( :pasttype('callmethod'), :name('set_outer'),
11:43 moritz_ patrickas: I fear that $*PROGRAM_NAME won't help us at all, because it is set up at run time
11:43 moritz_ whereas we need to decide at compile time
11:44 patrickas ok
11:46 mmcleric joined #perl6
11:48 moritz_ jnthn: when I have a PAST data structure, can I somehow access the lexical information associated with it?
11:49 moritz_ .symbol seems to be what I'm looking for
11:50 moritz_ though i don't understand the business with @BLOCK at all
11:52 jnthn .symbol is only defined on PAST::Block
11:52 jnthn @BLOCK contains our block nodes.
11:52 jnthn @BLOCK[0] is the current one, @BLOCK[1] its outer, etc.
11:53 moritz_ it seems that $mainline in method comp_unit is a PAST::Block
11:54 moritz_ so what I'm trying now is   if !IN_EVAL && $mainline.symbol('&MAIN') { inject MAIN_HELER }
11:54 masak joined #perl6
11:54 masak oh hai, #perl6!
11:55 jnthn lolitsmasak!
11:55 moritz_ doesn't seem to work (never regonizes the presence of MAIN)
11:55 patrickas hello masak
11:57 * masak is enjoying the third stage of the pls mini-hackathon: implementation
11:58 masak rakudo: sub foo() { succeed }; say foo
11:58 p6eval rakudo 197b4b: OUTPUT« at line 1␤Null PMC access in type()␤  in main program body at line 11:/tmp/7qQcUdElz0␤»
11:58 * masak submits rakudobug
11:59 * jnthn figures that's probably similarish to the one submitted yesterday
11:59 masak probably.
11:59 masak rakudo: sub foo() { succeed; succeed; succeed }; say foo
12:00 p6eval rakudo 197b4b: OUTPUT« at line 1␤ at line 1␤ at line 1␤Null PMC access in type()␤  in main program body at line 11:/tmp/dM9xH6D1eU␤»
12:00 masak ok, yes, it's the same.
12:00 masak I'll put it as a comment to that one, then.
12:00 jnthn yeah, good to collect various cases.
12:01 masak jnthn: how's Kiev? still warm?
12:01 jnthn yes, but thankfully conference venue is air-conditioned. :-)
12:01 jnthn I gave my siggies talk.
12:02 jnthn Found some crazily cheap (compared to Sverige) pivo last night too :-)
12:02 masak not surprised it's cheaper.
12:03 masak probably tastes better, too.
12:04 drrho joined #perl6
12:06 * drrho evaluating rakudo for a "production" site.
12:06 masak \o/
12:06 masak drrho: so, web stuff?
12:06 drrho "production" means "internal experimental site"
12:06 drrho web stuff, but actually more along the lines of "semantic programming infrastructure"
12:07 drrho http://kill.devc.at/node/309
12:07 masak drrho: the most elaborate example of web stuff with Perl 6 is still http://november-wiki.org/
12:07 cognominal joined #perl6
12:08 masak drrho: that said, we're trying to think long-term with http://github.com/masak/web
12:08 drrho my question is regarding the threading stuff ...
12:09 moritz_ which threading? :/
12:09 drrho async { .... }
12:09 jnthn That's not implemented yet in Rakudo.
12:09 drrho yes, I just experimented.
12:10 drrho what are the thoughts currently regarding this?
12:10 cognominal mberends++ # speaker
12:10 cognominal jnthn++ # slides
12:10 moritz_ drrho: once we're on a VM that supports proper threading, somebody will try to implement it
12:10 cognominal chartreuse++ # fun
12:10 drrho so parrot does not support threading?
12:11 moritz_ drrho: that can either happen by parrot getting proper threads, or by porting rakudo to a different VM
12:11 moritz_ drrho: not well
12:11 drrho I see.
12:11 moritz_ at least not good enough to be usable by a HLL
12:11 drrho the DSL I want to put on top of Perl6 is inherently parallel. That's why I am asking.
12:12 drrho I am just intrigued by the Perl6 grammar stuff.
12:12 * moritz_ too
12:13 masak where is the new list model doc?
12:13 jnthn pm pastd url earlier
12:14 jnthn ah, I still has a tab with it
12:14 jnthn http://docs.google.com/Doc?docid=0AeZqZQ8​wfDHGZGczanFtcHZfMTZmazdrZGpkYg&amp;hl=en
12:14 masak thankye.
12:14 cognominal jnthn, how was the ukrnian workshop?
12:15 jnthn first day (hack meet) went great
12:15 jnthn And todayu is talks day
12:15 jnthn Going well, I think. :-)
12:15 cognominal cool
12:15 cognominal and you have good wifi, unlike we ded?
12:15 cognominal *did
12:16 jnthn Yes, it's good here.
12:16 cognominal jnthn, I probably have a bug report about your stack trace  :)
12:16 masak returning an empty Parcel sounds nicer than returning EMPTY. never much liked the latter.
12:17 jnthn cognominal: oh noes :-)
12:19 masak pmichaud: I likes your list model very much!
12:20 masak early versions of GGE toyed with the immutable iterator model, but for some reason I turned away from it.
12:20 moritz_ are lexical subs supposed to be stored in the current PAST::Block, including sigil?
12:20 cognominal I am trying to golf the bug trigger
12:22 moritz_ rakudo: sub f { }; say callframe().my.keys
12:22 p6eval rakudo 197b4b: OUTPUT«$_$/__CANDIDATE_LIS​T__&f$!$ss_SS_S_S__S_S_s␤»
12:22 moritz_ rakudo: sub f { }; say callframe().my.keys.join(' ')
12:22 p6eval rakudo 197b4b: OUTPUT«__CANDIDATE_LIST__ &f $! $ss_SS_S_S__S_S_s $_ $/␤»
12:23 * masak feels the need for a LAST block
12:23 moritz_ that would help me too :-)
12:23 moritz_ no, actually I want a LEAVE block
12:24 masak that'd be nice too.
12:26 jnthn cognominal: feel free to paste the backtrace, I maybe can guess it from that.
12:27 jnthn moritz_: They may not get an .symbol entry.
12:27 jnthn Though probably could make them do so.
12:28 drrho A perl6 question: In perl5 there was this __END__ and __DATA__ feature. Does it exist in perl6 ?
12:29 masak drrho: S02:4103
12:30 moritz_ rakudo: sub f { }; sub f { }
12:30 p6eval rakudo 197b4b: OUTPUT«===SORRY!===␤Multiple declarations of lexical '&f'␤␤»
12:31 cognominal jnthn, I was to much in a hurry to make my program work and now it works...
12:31 moritz_ seems the error message in Actions.pm:1053 is never called
12:31 masonkramer_ joined #perl6
12:32 drrho masak: thx
12:33 drrho a question re http://github.com/masak/web.git : when it uses HTTP::Daemon , is it using the Perl5 or a Perl6 version?
12:33 moritz_ Perl 6
12:33 masak haven't tried that one on master.
12:33 drrho are Perl6 modules also on CPAN?
12:33 moritz_ no
12:33 moritz_ proto.perl6.org
12:33 jnthn Ah
12:33 jnthn moritz_: @BLOCK[0].symbol($name, :scope('lexical') );
12:33 masak I'd recommend using Apache or equiv rather than HTTP::Daemon.
12:33 masak for speed, if nothing else.
12:34 moritz_ jnthn: yes, but only when certain conditions on multiness are met
12:34 jnthn I wonder if $nmae has the sigil
12:34 Su-Shee .oO(mberends was hungry when he wrote the tests.. hot beef burrito .. select * from nom .. I can't focus.. ;)
12:35 jnthn moritz_: No, it seems to always install something for each sub.
12:35 moritz_ right
12:35 moritz_ I find that routine very hard to read
12:36 moritz_ and yes, name includes the sigil
12:36 jnthn $name should have the sigil on though, look at how else it's used
12:36 jnthn *by looking
12:36 masak Su-Shee: :)
12:36 moritz_ I just confirmed it with debugging output
12:37 moritz_ rakudo: sub f { }; sub f { }
12:37 p6eval rakudo 197b4b: OUTPUT«===SORRY!===␤Multiple declarations of lexical '&f'␤␤»
12:37 moritz_ jnthn: why doesn't that trigger the "Can not declare only routine" error?
12:37 drrho moritz_: is using "proto.pl" the _canonical_ way to install Perl6 modules?
12:37 moritz_ drrho: it is the easist way I know of
12:37 drrho ok.
12:38 jnthn moritz_: It shouldn't, but it should trigger the $/.CURSOR.panic('Can not re-declare sub ' ~ $name ~ ' without declaring it multi');
12:38 moritz_ huh?
12:38 moritz_ now I'm confused
12:39 moritz_ rakudo: multi f { }; sub f { }
12:39 p6eval rakudo 197b4b: OUTPUT«===SORRY!===␤Can not re-declare sub &f without declaring it multi at line 11, near ""␤»
12:39 moritz_ jnthn: which case should trigger the "Can not declare only routine" case then?
12:39 jnthn oh, I think this code has a missing case.
12:40 moritz_ does $*MULTINESS always have a value?
12:40 jnthn No, it may be empty too
12:40 moritz_ then it should be
12:40 moritz_ if !$*MULTINESS || $*MULTINESS eq 'only'
12:40 moritz_ in the first line
12:41 jnthn nope
12:41 moritz_ what does empty $*MULTINESS mean?
12:41 jnthn Otherwise we get the proto foo() { ... }; sub foo($x) { ... } case wrong
12:41 moritz_ right
12:41 jnthn We're missing an if branch I suspect.
12:42 jnthn For the case where !$*MULTINESS && $symbol
12:42 jnthn That is, no multiness declarator, no proto in force and already declared.
12:43 jnthn but you can trigger all the ones that are already there.
12:43 moritz_ rakudo: sub f { }; only sub f { }
12:43 p6eval rakudo 197b4b: OUTPUT«===SORRY!===␤Can not declare only routine &f when another routine with this name was already declared at line 11, near ""␤»
12:43 masak rakudo: sub foo { !!! }; foo
12:43 p6eval rakudo 197b4b: OUTPUT«Stub code executed␤  in 'foo' at line 11:/tmp/EhFtfkLHjo␤  in main program body at line 11:/tmp/EhFtfkLHjo␤»
12:44 masak rakudo: sub foo { ... }; say foo
12:44 p6eval rakudo 197b4b:  ( no output )
12:44 jnthn rakudo: say foo { ??? }
12:44 masak what should be the semantics of ...?
12:44 p6eval rakudo 197b4b: OUTPUT«Could not find sub &foo␤  in main program body at line 11:/tmp/8XrEUV4psB␤»
12:44 jnthn grr
12:44 moritz_ masak: fail()
12:44 jnthn rakudo: sub foo { ??? }; foo()
12:44 p6eval rakudo 197b4b: OUTPUT«Stub code executed at line 11:/tmp/9H3N3vNr60␤»
12:44 masak moritz_: so, in the case of say above...?
12:44 moritz_ +        elsif !$*MULTINESS && $symbol {
12:44 moritz_ +            unless $symbol<proto> {
12:44 moritz_ +                $/.CURSOR.panic('Can not declare only routine ' ~ $name ~
12:44 moritz_ +                    ' when another routine with this name was already declared'
12:44 moritz_ +            }
12:44 moritz_ +        }
12:45 moritz_ masak: should die in sink context, which is NYI
12:45 jnthn moritz_: I'd remove explicit "only" in the error there
12:45 jnthn Since the user didn't write "only"
12:45 jnthn And maybe hint that they'd like multi.
12:45 moritz_ right
12:46 jnthn +1 to such a patch if it works though
12:46 moritz_ testing now...
12:46 jnthn rakudo: class checking { method m { }; method m { } }
12:46 p6eval rakudo 197b4b:  ( no output )
12:47 jnthn Bit surprised that doesn't complain already.
12:47 jnthn rakudo: class checking { method m { }; only method m { } }
12:47 p6eval rakudo 197b4b: OUTPUT«===SORRY!===␤Can not declare only method m when another method with this name was already declared at line 11, near "}"␤»
12:47 moritz_ what should complain? the meta class?
12:47 jnthn moritz_: Maybe nicer to spot it in the actions
12:47 jnthn Though I thought the meta-class caught it already too.
12:48 moritz_ > sub f { }; sub f { }
12:48 moritz_ Can not declare only routine &f when another routine with this name was already declared at line 2, near ""
12:48 moritz_ that's the not-yet-awesoemified error message
12:48 jnthn \o/
12:49 jnthn There's probably an RT about that.
12:50 moritz_ it is, a quite old one
12:59 masak rakudo: .say for 1.."10" # was this ever reported?
12:59 p6eval rakudo 197b4b: OUTPUT«1␤»
13:00 masak because I assume it's wrong.
13:00 Su-Shee what does that mean: Cannot take substr outside string
13:00 masak seems I recall the semantics should be to numify the rhs if the lhs is a number.
13:00 moritz_ rakudo: say 2 cmp "10"
13:00 p6eval rakudo 197b4b: OUTPUT«1␤»
13:00 masak Su-Shee: means you've found yourself a Parrot bug.
13:00 moritz_ or a rakudobug
13:01 masak well, yes.
13:01 masak the error is from Parrot.
13:01 Su-Shee it seems to be Test.pm related because the same db stuff works fine.
13:02 Su-Shee or I missed something totally simple. also possible. :)
13:02 masak time to golf, sounds like.
13:07 Su-Shee no, was mistake. fascinating.
13:07 Su-Shee my mistake.
13:08 felliott joined #perl6
13:08 meppl joined #perl6
13:13 moritz_ jnthn: seems the fix is not so easy...
13:13 moritz_ ./perl6 -e 'proto a  { }; sub a { }'
13:13 moritz_ ===SORRY!===
13:13 moritz_ Multiple declarations of lexical '&a'
13:14 moritz_ because the ordinary code for adding a candidate to a proto isn't run
13:20 JimmyZ joined #perl6
13:20 masak 卓明亮! \o/
13:21 JimmyZ ah, found by masak!
13:21 JimmyZ Conference Mode is enabled for this view; joins, leaves, quits and nickname changes are hidden.
13:21 JimmyZ you disabled it?
13:22 masak don't really know what that means.
13:22 masak maybe one of the IRC-savvy people here does.
13:22 pugssvn r31235 | moritz++ | [t/spec] unfudge test for $*OUT/$*ERR distinction of USAGE message
13:22 JimmyZ joins, leaves are hidden here
13:22 pugssvn r31236 | moritz++ | remove INSTALL file that now lives at http://github.com/audreyt/P​ugs.hs/blob/master/INSTALL
13:22 pugssvn r31237 | moritz++ | [util/] clean up; remove scripts that seem unused, unmaintained or undocumented
13:23 JimmyZ I don't know why, hehe
13:23 * masak .oO( joins, shoots, and leaves )
13:25 synth joined #perl6
13:26 JimmyZ the Dragon Boat Festival is coming here :)
13:30 masak nice. :) we'll be having midsummer here soon.
13:33 pugssvn r31238 | moritz++ | [docs] remove outdated stuff
13:34 dalek rakudo: ecacff9 | moritz++ | src/Perl6/Actions.pm:
13:34 dalek rakudo: fix REPL autoprinting by only injecting MAIN_HELPER if the scope contains a MAIN
13:34 dalek rakudo: sub
13:34 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/e​cacff935d39fc3a516b1861bd6760e1f1b12432
13:37 carlin joined #perl6
13:38 carlin Hi all
13:38 masak hi, carlin
13:42 rurban joined #perl6
13:42 jnthn masak: oh noes is midsummer another time when I'll be expected to eat weird fish? :-)
13:43 jnthn moritz_: Hmm...yeah, I had a feeling it wasnt so simple.
13:43 jnthn I think I'd tried similar before...
13:43 slavik morning :D
13:43 jnthn o/ slavik
13:43 slavik is there a parrot build for arm?
13:44 moritz_ jnthn: maybe we need some kind of decision matrix
13:44 masak jnthn: yep. weird fish for midsummer; that's the rule.
13:44 * jnthn looks terrified
13:44 moritz_ jnthn: it's currently close to the "doesn't fit into head" limit
13:45 jnthn moritz_: I was terrified about the fish, not the decisoin matrix.
13:45 jnthn moritz_: That's probably a good idea. :-)
13:45 masak jnthn: we could put FISH into the decision matrix; would that make it terrifying? :P
13:45 moritz_ rakudo: proto a { }; proto a { }
13:45 p6eval rakudo 197b4b:  ( no output )
13:46 moritz_ shoudl that be an error?
13:46 jnthn .oO( I'm in your decision matrix, adding fish )
13:46 masak moritz_: possibly.
13:46 moritz_ I kinda think so
13:46 jnthn yeah, that'd best whine.
13:46 jnthn though
13:46 masak two protos are a bit like two onlies.
13:46 jnthn rakudo: proto a { }; proto a { }; a()
13:46 p6eval rakudo 197b4b:  ( no output )
13:46 jnthn I'm...very surprised that didn't whine.
13:47 * moritz_ not, after reading the code
13:47 moritz_ the source codeof Actions.pm at least
13:47 jnthn moritz_: yes, I expected Perl6MultiSub would has a sad over it though.
13:47 rurban left #perl6
13:47 jnthn oh, unless we only end up emitting one of them somehow.
13:56 * masak writes his first private method in Perl 6
13:57 * jnthn resists making a pun about privates
13:57 masak thank you.
14:00 masak all tests now pass in t/subcommands/fetch.t \o/
14:01 jnthn masak: Which project is this? :-)
14:01 masak oh, pls!
14:01 jnthn You have a lot of them. ;-)
14:01 jnthn lol
14:03 moritz_ masak: you didn't use private methods before?
14:03 masak no; didn't have the need.
14:03 masak here it is: http://github.com/masak/proto​/blob/pls/lib/App/Pls.pm#L71
14:04 masak in Lisp, it'd had been a lexically encapsulated routine instead.
14:05 moritz_ masak: you can do that too in Perl 6 :-)
14:05 masak yes :)
14:05 masak but I'll think I'll keep it this way.
14:05 masak less overall indentation, for one thing.
14:06 jnthn .oO( masak makes marginal use of private methods )
14:06 masak :P
14:07 jnthn Ooh, in App namespace.
14:07 jnthn :-)
14:07 masak yes, trying to play really nice here.
14:07 masak according to CPAN rules, no less.
14:07 masak this one is built to *last*.
14:07 jnthn for the where at the top, does it need the { ... } around the junc/
14:08 jnthn masak: Is it actually going to be called pls? :-)
14:08 masak std: subset A of Str where "a" | "b" | "c";
14:08 p6eval std 31238: OUTPUT«ok 00:01 108m␤»
14:08 moritz_ I even think the { ... } is wrong
14:08 masak jnthn: sure!
14:08 * masak removes the { ... }
14:08 jnthn moritz_: Yes, I was just wondering why it worked :-)
14:08 jnthn Or if. :-)
14:09 jnthn masak: Yay!
14:09 masak it works because return types are not checked :P
14:09 jnthn oh
14:09 jnthn Somebody should implement that. ;-)
14:09 masak ++somebody
14:10 jnthn pre-karma :-)
14:11 jnthn It worked in alpha, but the way it worked was a bit...nasty.
14:13 jnthn masak: pls can pls pre-compile modules on install?
14:13 masak jnthn: to .pir? of course.
14:13 jnthn Yes
14:13 jnthn Excellent
14:13 jnthn proto seemed to skip that.
14:14 masak jnthn: ultimately, it'll be projects' decision, of course.
14:14 jnthn I did some myself by hand
14:14 masak jnthn: but I imagine the default will be to precompile.
14:14 jnthn *nod*
14:14 jnthn It makes quite a performance difference.
14:16 macdaddy joined #perl6
14:17 masak no need to tell me that :)
14:17 jnthn masak: Well, I'm new to writing Perl 6. :-)
14:17 masak I still remember fondly when we brought a November GET request down from 17 seconds to 3. that was schweet. pmichaud++
14:17 jnthn I'm just old to *writing* Perl 6. :)
14:18 masak jnthn: actually, I'm a bit surprised that proto doesn't precompile. I'd have thought it did.
14:18 masak that's what the 'build' phase is for.
14:18 jnthn It precompiled itself.
14:18 jnthn Just nothing else.
14:21 masak oh :(
14:21 masak that's Wrong.
14:21 jnthn Disappointing output was disappointing.
14:22 masak here's hoping actually having tests will help against such unwanted behaviour.
14:22 jnthn I'm happy to hear it's just NYI/bug rather than decision not to precompile though.
14:25 moritz_ I think precompilation only makes sense if rakudo doesn't pick up .pir modules that are older than .pm or .pm6 modules
14:27 diakopter phenny:
14:27 phenny diakopter: 07:16Z <sorear> tell diakopter - you meantioned something earlier about wanting to have Perl6 grammar compiled code re-use sprixel functions.  How would that look in Perlesque?
14:27 phenny diakopter: 07:17Z <sorear> tell diakopter - token num { \d+ }; rule factor { <num> | '(' <expr> ')' }; rule term { <factor> [ <[ * / ]> <factor> ]* }; rule expr { <term> [ <[ + - ]> <term> ]* }
14:27 phenny diakopter: 07:18Z <sorear> tell diakopter - that is an unambiguous CFG for four-function arithmetic with parentheses.  The operator precedence rules fall out of the grammar and cannot be violated; extension to 30 operators is straightforward
14:27 phenny diakopter: 09:00Z <sorear> tell diakopter - I think tomorrow I'll work on the Cursor DFA (that is to say, removing the last non-optional dependency Cursor has on p5regex)
14:30 masak moritz_: preferring an older .pir file is bad, but recompiling each time from the .pm file is not very good either. and overwriting the .pir file without permission feels... invasive.
14:31 diakopter phenny: tell sorear re: separate compilation, I can create library eval savers/loaders so that from perlesque code, it can read a source file, compile it to a .dll (or .exe), then load its types/classes optionally (then the classes become available at parse time in the importing module, and also of course at runtime.  string eval can do that too. perhaps we should follow rakudo's conventions.
14:31 phenny diakopter: I'll pass that on when sorear is around.
14:32 diakopter phenny: tell sorear re: Perl6 grammar compiled code reusing Sprixel parsergen functions, it'd be.. interesting; I haven't toyed with it yet. Just emit invalid code for now..
14:32 phenny diakopter: I'll pass that on when sorear is around.
14:34 diakopter phenny: tell sorear re: CFG, yeah, but I wanted sprixel's EXPR to eventually be able to support all the things STD's can support
14:34 phenny diakopter: I'll pass that on when sorear is around.
14:37 diakopter phenny: tell sorear so I wanted to at least start that implementation.. one of these days I'll finish implementing the "precedence-climbing" operator precedence parser (google it) - it's top-down recursive descent, but it should support all of STD's operator categories, including postfix, postcircumfix
14:37 phenny diakopter: I'll pass that on when sorear is around.
14:39 jnthn mberends: The sekrit is out!
14:39 masak there's a sekrit?
14:40 jnthn ;-)
14:40 mberends oh! sekrits don't last long on this channel...
14:40 jnthn It's OK, I used it for my lightning talk. :-)
14:41 mberends jnthn++
14:41 masak do tell.
14:41 jnthn http://pivo.jnthn.net/
14:41 masak \o/
14:41 masak jnthn++!
14:41 masak probably mberends++ too :)
14:42 mberends I was just a beta taster ;)
14:42 jnthn Uses FakeDBI, yes.
14:42 jnthn And moritz++'s JSON::Tiny
14:43 jnthn And sorear++'s Blizkost to interface with Perl 5's CGI.pm
14:43 jnthn Though I hope to move it to use Web.pm once that runs on master. :-)
14:45 masak I'll take that as a challenge. :)
14:45 jnthn \o/
14:45 masak man, I love writing pretty code, and in Perl 6 to boot.
15:08 lue ohai
15:08 jnthn hellue
15:09 mberends huello
15:10 masak ol ue!
15:12 Ross joined #perl6
15:12 xinming_ joined #perl6
15:13 masak heh, tests really do have a way of making you see sense.
15:13 masak where "you" in this case means "me" :)
15:15 lue rakudo: sub foo { fail 'foo'; }; sub bar { foo(); 2; CATCH { when Str {1} } }; say bar();
15:15 p6eval rakudo ecacff: OUTPUT«Null PMC access in type()␤  in main program body at line 11:/tmp/2SCtAL6fvR␤»
15:18 masak mberends: there's not much left of the 'transaction' criterion in pls. it'll only strictly hold inside the 'upgrade' subcommand.
15:19 mberends that's probably a good thing. less implementation pressure.
15:19 masak yes.
15:20 masak the transgressions always leave a project in a better state.
15:20 masak it feels a bit silly to reset an improvement.
15:20 * jnthn transgresses for Rakudo
15:22 mberends masak: previously you said in pls there was no awareness of cache state, but is the cache not as the place where fetch, build and test operate?
15:22 masak yes.
15:22 mberends ok, so fetched === cached
15:22 masak pls core has no awareness of that place.
15:22 masak it knows about the state of a project, though.
15:23 masak yes, I suppose fetched === cached.
15:23 masak all states are named as the past perfect of actions now, aside from 'gone'.
15:24 masak hm, maybe that's a good rationale to name 'gone' 'removed'.
15:24 mberends oh, maybe 'gone' could be 'absent'
15:24 masak I like 'absent' better than 'gone'.
15:24 mberends it's not the past tense of something that was never performed
15:25 masak right. 'absent' might in effect be either 'never fetched' or 'removed'. and there's no real need to distinguish.
15:26 mberends so do all installed projects have to remain fetched?
15:26 masak in a way, installed implies fetched.
15:26 masak but not in any cache sense.
15:26 masak so I suppose it doesn't.
15:27 mberends yes, but then fetched !== cached
15:27 masak a builder, tester or installer object will probably assume that anything non-absent is indeed cached.
15:28 masak it's an interesting question what will happen if that assumption turns out to be false.
15:28 mberends it's probably fair to separate the concerns of the core and the ecosystem
15:29 masak the main concern here is separating the core and all kinds of I/O.
15:29 diakopter as much as I hate to mention it, how do you plan on interacting with the various OS/distribution package managers
15:29 masak I don't. I'll be happy to see proposals that do.
15:30 diakopter imho it's a crucial issue for adoption
15:30 mberends diakopter, you *do* need to remind us to think in those directions :)
15:30 masak the model is likely flexible enough to handle other other package managers.
15:31 masak Fetcher, Builder, Tester and Installer are all roles, and can be made into concrete classes which behave in any old way.
15:31 diakopter distributions that use .spec hate .spec generators; .deb distributions prefer upstream not to have its own debian/ subdir
15:31 mberends I'd also like to use tarball downloads via http as a distribution mechanism for non developers
15:32 diakopter and none likes files installed by installers that aren't their package managers
15:34 diakopter and windows couldn't care less, since there's not really a dependency/package manager there
15:34 mberends diakopter: if we design the installer really well, it should also be Perl 6 implementation independent
15:35 diakopter heh
15:35 masak of course.
15:35 masak I'm not intentionally putting in any Rakudo-specific things.
15:35 masak apart from workarounds, which should be impl-independent.
15:36 lue .oO(Well, if my text editor can install plugins w/o the package manager, then we'll call rakudo a 'plugin')
15:36 wolv joined #perl6
15:37 diakopter right, but my point is that linux distributions really want to version installed .pm themselves
15:37 diakopter Perl can't be _THAT_ petulant/maverick
15:37 lue Of course. Typing 'yum search perl' gives me and my terminal output a heart attack!
15:38 masak I'm insufficiently skilled in Linux installers to help significantly with integrating with them. but it sounds like a worthy endeavour.
15:38 pmichaud good morning, #perl6
15:38 phenny pmichaud: 08:52Z <colomon> tell pmichaud Just pushed new reducewith.  Note that copying an empty array gets a Null PMC, and ?@a and !@a always return true and false, respectively.
15:38 jnthn o/ pm
15:38 lue good morning!
15:38 masak mornin', pm.
15:38 pmichaud ...copying an empty array?
15:38 Visitor99 joined #perl6
15:40 lue (One time I SIGKILLed a misbehaving package installer (that wouldn't even respond to the usual SIGTERM mind you), and I payed for a bit)
15:42 pmichaud my @a = @array;
15:43 pmichaud Evil.
15:43 pmichaud We definitely should not be making array copies in our list-processing functions.
15:43 lue I do not see the hidden evils, but can imagine bad things happening there.
15:44 jnthn end of talks day - time for noms/beer, I assume :-)
15:44 jnthn o/
15:45 lue o/
15:53 masak jnthn++ again on http://pivo.jnthn.net/
15:54 lue CPBN :)
16:05 lue afk
16:05 masak rakudo: class A { method foo() { say "OH HAI" } }; class B { has A $.a handles <foo> }; B.new.foo
16:05 p6eval rakudo ecacff: OUTPUT«Method 'foo' not found for invocant of class 'B'␤  in main program body at line 11:/tmp/KDSaOrwJFo␤»
16:06 masak I saw a 'handles' patch flash by on p6c, but maybe it hasn't been applied yet...
16:06 masak oh well, it's just sugar. :)
16:15 tao| left #perl6
16:17 pmichaud anyone happen to know what invokes "reducewith"?
16:18 masak wouldn't that be things like [*] and [<] ?
16:18 pmichaud also, does it bug anyone (other than me) that &reducewith is a visible part of the setting?  I.e., we expect it to be available for user-functions to call?
16:18 masak I think so.
16:19 pmichaud masak: yes, I'm looking for the part of the compiler that actually invokes reducewith
16:19 masak that's how you'd redice with non-operators, IIUC.
16:19 * pmichaud summons 'ack'
16:19 masak s/redice/reduce/
16:19 pmichaud I thought that reducing with non-operators was .reduce
16:19 Su-Shee mberends: I'll commit fetchrow_arrayref and fetchrow_hashref tests in common.t in an hour or so.
16:19 masak I might be wrong.
16:20 justatheory joined #perl6
16:20 mberends thanks Su-Shee, I've pulled your last commit :)
16:20 pmichaud anyway, found it in Actions.pm
16:21 Su-Shee mberends: also, I'm having an appetite for mexican food now. ;)
16:21 mberends burritos! :)
16:22 Su-Shee next time, use boring banking examples. ;)
16:22 * masak .oO( the client waits in line, all the while... eating a burrito! )
16:24 mberends Su-Shee: 99-common.t will need a few more row, please invent a few more food-y ones and *not* banking examples!
16:24 Su-Shee yesterday I got a package with 8 varieties of dried chili to actually cook mexican :)
16:24 Su-Shee mberends: ok :)
16:26 masak it would seem I'm in a "just learned about them, so using them everywhere" phase about dynamic variables. they're really handy.
16:26 masak I'd already realized that they help eliminate parameters, but now I'm also realizing that they help eliminate return values.
16:26 pmichaud when you recognize that dynamic variables can also be a design smell, you'll be in good shape.
16:27 masak not there yet :P
16:28 pmichaud okay, something very basic recently broke in rakudo's whitespace handling.  Or I'm missing something obvious.
16:35 pmichaud do we no longer have a channel-targeted pastebot here?
16:36 masak correct.
16:40 kfo joined #perl6
16:48 masak all tests pass! pls now has 'fetch', 'build', test', and three variations of 'install'.
16:49 masak this concludes the weekend's mini-hackathon. I'm making a note here, "huge success". :)
16:49 pmichaud okay, someone review what I'm doing and please tell me I'm missing something obvious...   http://paste.lisp.org/+2DYG
16:49 m6locks masak++
16:50 masak I think I know one place where the pls core won't withstand contact with reality... but it's not so bad.
16:50 pmichaud oh, I found a bug for masak!
16:50 masak pmichaud: that one should definitely not error out.
16:50 pmichaud if I change the name of the sub to something else it works.
16:50 pmichaud apparently it doesn't like 'xyz'
16:51 masak o.O
16:51 masak what the...
16:51 moritz_ is there a quote form beginning with x?
16:51 moritz_ rakudo: Quox
16:51 p6eval rakudo ecacff: OUTPUT«===SORRY!===␤Confused at line 11, near "Quox"␤»
16:51 moritz_ same error
16:51 masak rakudo: our sub xyz($abc) { say $abc.WHAT; }; xyz(1); say "alive"
16:51 p6eval rakudo ecacff: OUTPUT«Int()␤alive␤»
16:51 masak pmichaud: it only manifests in a file?
16:51 szabgab joined #perl6
16:51 pmichaud it's also fine if there's a semicolon after the block
16:51 moritz_ rakudo: our sub xyz($abc) { say $abc.WHAT; }; xyz 1; say "alive"
16:51 p6eval rakudo ecacff: OUTPUT«Int()␤alive␤»
16:52 masak oh.
16:52 pmichaud I'm guessing it's being confused by operator x
16:52 masak rakudo: our sub xyz($abc) { say $abc.WHAT; }␤ xyz(1); say "alive"
16:52 p6eval rakudo ecacff: OUTPUT«===SORRY!===␤Confused at line 11, near "our sub xy"␤»
16:52 moritz_ rakudo: xyz
16:52 * masak submits rakudobug
16:52 p6eval rakudo ecacff: OUTPUT«Could not find sub &xyz␤  in main program body at line 11:/tmp/ahh3uw3oZD␤»
16:52 pmichaud it's parsing as &infix:<x>
16:52 masak pmichaud++
16:53 pmichaud what does STD.pm have to say about it, I wonder?
16:53 pmichaud I'm not sure how to get nl's into my irssi input :-|
16:54 moritz_ rakudo: ␤our sub xyz($x) { say $x }␤␤xyz 3
16:54 p6eval rakudo ecacff: OUTPUT«===SORRY!===␤Confused at line 11, near "our sub xy"␤»
16:54 moritz_ std: ␤our sub xyz($x) { say $x }␤␤xyz 3
16:54 p6eval std 31238: OUTPUT«ok 00:01 109m␤»
16:54 pmichaud rakudo: ␤our sub xyz($x) { say $x }␤␤xyz 3
16:54 p6eval rakudo ecacff: OUTPUT«===SORRY!===␤Confused at line 11, near "our sub xy"␤»
16:54 pmichaud rakudo: ␤our sub xyz($x) { say $x }␤␤+ xyz 3
16:54 p6eval rakudo ecacff: OUTPUT«3␤Method 'Num' not found for invocant of class 'Perl6Sub'␤  in 'Cool::Numeric' at line 1591:CORE.setting␤  in 'Cool::Numeric' at line 1592:CORE.setting␤  in 'infix:<+>' at line 5901:CORE.setting␤  in main program body at line 13:/tmp/dBDm5O4BVC␤»
16:55 masak I'll soon be going home to nom a bit, but anyone who'd like a Sunday challenge (not affiliated in any way with our Weekly Challenge(TM)) could take a look at http://github.com/masak/pro​to/blob/pls/lib/App/Pls.pm -- subclass App::Pls::Fetcher et al into things that actually do file stuff, and build a proof-of-concept installer.
16:55 sorear diakopter:
16:55 phenny sorear: 14:31Z <diakopter> tell sorear re: separate compilation, I can create library eval savers/loaders so that from perlesque code, it can read a source file, compile it to a .dll (or .exe), then load its types/classes optionally (then the classes become available at parse time in the importing module, and also of course at runtime.  string eval can do that too. perhaps we should follow rakudo's conventions.
16:55 phenny sorear: 14:32Z <diakopter> tell sorear re: Perl6 grammar compiled code reusing Sprixel parsergen functions, it'd be.. interesting; I haven't toyed with it yet. Just emit invalid code for now..
16:55 phenny sorear: 14:34Z <diakopter> tell sorear re: CFG, yeah, but I wanted sprixel's EXPR to eventually be able to support all the things STD's can support
16:55 masak pmichaud: what's that last evaluation?
16:55 phenny sorear: 14:37Z <diakopter> tell sorear so I wanted to at least start that implementation.. one of these days I'll finish implementing the "precedence-climbing" operator precedence parser (google it) - it's top-down recursive descent, but it should support all of STD's operator categories, including postfix, postcircumfix
16:56 masak pmichaud: where does Perl6Sub enter into it?
16:56 pmichaud masak: the + is acting like an infix:<+>
16:56 pmichaud where it ought to be a prefix:<+>
16:56 masak due to the same whitespace bug?
16:56 pmichaud yes
16:56 pmichaud I'm going to need to run STD on it to see how STD handles it
16:56 masak so this all goes into the same ticket?
16:57 pmichaud it's the same problem, just demonstrating that the problem is not strictly a ltm issue
16:57 sorear pmichaud: what do you need STD run on?
16:57 pmichaud sorear: just a sec
16:58 pmichaud sorear: http://nopaste.snit.ch/21216
16:59 pmichaud actually, it should succeed in the parse, and complain about &x not found.
16:59 pmichaud anyway, I want to make sure that STD doesn't see that 'x'  as &infix:<x>
16:59 pmichaud (and then I'll figure out _how_ STD does it :)
17:00 diakopter std: sub xyz ($abc) { say $abc.WHAT }␤x 3
17:00 p6eval std 31238: OUTPUT«[31m===[0mSORRY![31m===[0m␤Undeclared routine:␤      'x' used at line 2␤Check failed␤FAILED 00:01 106m␤»
17:00 pmichaud right
17:00 pmichaud so there's something missing in rakudo's close-brace handling logic again
17:00 pmichaud anyway, I'll figure it out later.
17:01 hejki anything i could help with? :)
17:01 diakopter rakudo: sub xyz ($abc) { say $abc.WHAT }␤x 3; say "lived"
17:01 p6eval rakudo ecacff: OUTPUT«lived␤»
17:01 pmichaud feel free to give it a shot :-)
17:02 diakopter masak:
17:02 diakopter rakudo: our sub xyz($abc) { say $abc.WHAT; }␤ xyz(1); say "alive" # need space
17:02 p6eval rakudo ecacff: OUTPUT«===SORRY!===␤Confused at line 11, near "our sub xy"␤»
17:02 diakopter rakudo: our sub xyz ($abc) { say $abc.WHAT; }␤ xyz(1); say "alive"
17:03 p6eval rakudo ecacff: OUTPUT«===SORRY!===␤Confused at line 11, near "our sub xy"␤»
17:03 diakopter er
17:03 masak er
17:03 sorear hello diakopter
17:03 diakopter hello
17:03 pmichaud the problem is that rakudo isn't seeing the close brace as a statement-ending close brace
17:03 pmichaud because the next thing that follows is seen as a valid infix
17:03 diakopter oh
17:04 sorear hmm, I need to learn how to operate
17:04 masak hejki: what did you have in mind? you're welcome to take up my Sunday Challenge if you want to code some Perl 6 :)
17:04 sorear svn ignores
17:04 moritz_ shouldn't it see it as statement-ending because the next thing is a newline?
17:04 pmichaud sure, but the expression parser keeps going anyway
17:04 pmichaud actually, I misstated that
17:04 pmichaud the close brace is indeed marking end of statement
17:05 pmichaud but the expression parser is ignoring the end-of-statement condition
17:05 pmichaud the expression parser thinks "aha, whitespace and an infix, I know what to do!"
17:05 pmichaud (because we're in the expression parser at the time this gets parsed)
17:05 masak tricky business.
17:06 avar /w 12
17:06 * masak hugs avar, good irssi user :)
17:07 sorear that's alt-w to you
17:09 pugssvn r31239 | sorear++ | [Cursor] Start a branch for implementing the DFA LTM engine
17:10 * pmichaud starts storing up lots of questions for this weeks #phasers meeting.
17:10 moritz_ pmichaud: if there are many questions, it might pay off to ask them in advance via e-mail
17:11 pmichaud moritz_: yes, I can possibly do that tomorrow.
17:11 moritz_ so that people have time to prepare answers
17:11 pmichaud so far it's just the one question about metaop helpers in the setting
17:11 * moritz_ hasn't seen the question
17:11 pmichaud but I keep running into other oddities that occurred during my absence
17:11 pmichaud right now &reducewith is a user-visible function in the core setting.  Should it be?
17:12 pmichaud i.e., is it part of the spec?
17:12 pmichaud same goes for the other metaop helpers.
17:12 masak seemingly not a part of the spec.
17:12 moritz_ you mean that they are user visible?
17:12 pmichaud sure
17:13 pmichaud also, if I happen to define my own "reducewith" sub, it ends up hiding the one in the setting (and destroying the metaops)
17:13 pmichaud that doesn't feel rightish to me.
17:15 dalek rakudo: bdbdfb2 | quester++ | src/core/MAIN.pm:
17:15 dalek rakudo: Pass False to MAIN for --/bool, not "True does False"
17:15 dalek rakudo: Signed-off-by: Moritz Lenz <moritz@faui2k3.org>
17:15 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/b​dbdfb2a27514595147664dbc8744882f51c609e
17:15 Visitor99 hi... when you do something like:    for @array -> $value { ... }
17:15 Visitor99 how do you name the 'action' of naming the default variable with -> ?
17:16 moritz_ -> $value is a signature
17:16 pmichaud $value is a parameter
17:16 moritz_ so the action you mean could be "signature binding"
17:16 masak the action could be called 'signature binding', perhaps.
17:16 Visitor99 mmm ok, thanks!!
17:16 masak g'ah, moritz_ is faster :)
17:16 pmichaud or even just "binding"
17:16 pmichaud i.e., $value is bound to each element of @array
17:17 masak note that the binding is readonly by default.
17:17 masak if you want rw, you can do '-> $value is rw', or '<-> $value'.
17:17 masak the latter syntax isn't implemented in Rakudo.
17:18 moritz_ but used to
17:19 masak alpha: my @a = 1..5; say @a.perl; for @a <-> $e { $e = 42 }; say @a.perl
17:19 p6eval alpha 30e0ed: OUTPUT«[1, 2, 3, 4, 5]␤[42, 42, 42, 42, 42]␤»
17:19 masak \o/
17:21 constant joined #perl6
17:21 constant joined #perl6
17:21 digitalise joined #perl6
17:22 masak nom &
17:22 moritz_ sorear: 'make snaptest' dies with can't create ../stage1/STD.store: No such file or directory at ./viv line 225
17:22 moritz_ make: *** [stage1/STD.store] Error 2
17:22 moritz_ after checking ../Cursor.pm6
17:24 diakopter moritz_: when?
17:24 diakopter on p6eval?
17:24 diakopter (it worked yesterday there)
17:25 moritz_ diakopter: local rebuild
17:25 diakopter oh
17:25 moritz_ I'll git-clean -xdf and try again
17:28 sorear possibly git-svn isn't handling empty directories well
17:28 moritz_ in what way should it handle it?
17:28 sorear src/perl6 contains 3 empty directories, stage1/ stage2/ stage3/
17:28 japhb joined #perl6
17:29 sorear they are all critical
17:29 moritz_ oh
17:29 sorear by creating them?
17:29 sorear ISTR old versions of subversion itself not being able to version a directory with no files
17:29 pmichaud could put some dummy readmes or other files in each to make them non-empty
17:29 mj41_ joined #perl6
17:29 moritz_ you're right, directories are invisible to git
17:29 moritz_ usually one adds .gitignore files
17:29 pmichaud for example, stage1/README could explain what the stage1 files are, how they're produced, etc.
17:30 pmichaud .gitignore works also.
17:30 pugssvn r31240 | moritz++ | [t/spec] MAIN with named and negated arguments
17:33 sorear since it doesn't affect me, would you commit your favorite solution?
17:33 moritz_ yes
17:34 pugssvn r31241 | moritz++ | ensure presence of stage{1,2,3} directories with .gitignore files
17:37 patspam joined #perl6
17:39 pugssvn r31242 | sorear++ | [dfa/Cursor] Add a framework for running two LTM engines and carping if they disagree.  Add a stub for DFA LTM.
17:46 pmichaud afk, switching locations
18:02 daleyb joined #perl6
18:03 moritz_ rakudo: multi x(Int $a) { say "Int $a"}; { sub x($b) { say $b }; x(3) }
18:03 p6eval rakudo ecacff: OUTPUT«3␤»
18:04 moritz_ rakudo: multi x(Int $a) { say "Int $a"}; multi x($x) { say "Any $x "} ; { sub x($b) { say $b }; x(3) }
18:04 p6eval rakudo ecacff: OUTPUT«3␤»
18:04 finanalyst joined #perl6
18:05 colomon joined #perl6
18:07 finanalyst hello. Is transliteration working?
18:07 pmichaud back
18:07 finanalyst rakudo: my $sq='abcd'; say $sq.trans('b' => 'x')
18:07 p6eval rakudo ecacff: OUTPUT«axcd␤»
18:08 finanalyst oh it works here
18:08 takadonet pmichaud: welcome back
18:08 finanalyst my $sq='abcd'; say $sq.trans(<b c d> => <x y z>)
18:09 moritz_ finanalyst: so far I've only put transliteration of literals into rakudo
18:09 moritz_ rakudo: say 'abcd'.trans(['a', 'ab'] => ['X', 'XY'])
18:09 p6eval rakudo ecacff: OUTPUT«XYcd␤»
18:09 finanalyst moritz_: thanks . must have been recently as I last pull rakudo about a week ago
18:10 tedv joined #perl6
18:11 moritz_ I needed something for an example in the book, so I've decided to put in a simple solution first, and then ponder on expanding it
18:11 pmichaud +1
18:15 colomon pmichaud: hope last night's patches were ok.
18:16 pmichaud colomon: making a few changes.
18:16 pmichaud in general, copying arrays inside of list-processing functions is a bad idea, though.
18:16 pmichaud because it turns a lazy operation into an eager one.
18:18 colomon is "is copy" ok?
18:18 pmichaud nope
18:18 pmichaud in general, you want to be not using "Arrays" at all.
18:18 pmichaud you want to stick with lists
18:18 patspam1 joined #perl6
18:19 colomon ah
18:19 pmichaud my commits will be pushed shortly
18:19 pmichaud (running a small test here)
18:20 colomon thanks
18:22 sorear TimToady: ping
18:24 sorear TimToady: what is the purpose of %lexer_cache?  Surely anything in %lexer_cache would also be in %::LEXERS
18:25 sorear TimToady: what is the purpose of CursorBase.pmc 1940-1973?
18:31 diakopter sorear: \\\o/// I resolved the mono/.net disparity with a workaround :)
18:32 diakopter finally.
18:32 diakopter after like 40 hours of debugging over the past 2-3 weeks.
18:32 diakopter it took quite a long time to get a working interactive debugger environment for mono (in monodevelop 2.4b2)
18:33 snarkyboojum joined #perl6
18:33 pmichaud colomon: pushed.
18:34 colomon \o/
18:36 Su-Shee uhm.. if I don't '' 7.90 in an array, I get 79/10 in test output..
18:36 plobsing joined #perl6
18:43 colomon pmichaud: would using List $args as an argument also work here?
18:43 pugssvn r31243 | pmichaud++ | [t/spec]:  Update some array.t tests based on new list semantics.
18:43 pmichaud colomon: we don't want to constraint it, no.
18:43 pmichaud *constrain
18:43 pmichaud [+] 3     should still call our reducewith function, and 3 is not a List
18:44 colomon but it's not an @a either, is it?
18:44 pmichaud ?
18:44 colomon e I mean
18:45 colomon 3 is not a list or an array
18:45 pmichaud .list will work on any object
18:45 pmichaud 3.list returns a List of one element
18:45 radu_ joined #perl6
18:45 pmichaud just like 3.map(...)   is the same as 3.list.map(...)
18:46 radu_ rakudo: my @a = 'a' => 1, 'b' => 2; say @a.key;
18:46 p6eval rakudo bdbdfb: OUTPUT«Method 'key' not found for invocant of class 'Array'␤  in main program body at line 11:/tmp/c7SbkqszFx␤»
18:46 colomon rakudo: sub foop(@a){ say @a.perl; }; foop(3)
18:46 p6eval rakudo bdbdfb: OUTPUT«Nominal type check failed for parameter '@a'; expected Positional but got Int instead␤  in 'foop' at line 11:/tmp/kSzVLPnZ1u␤  in main program body at line 11:/tmp/kSzVLPnZ1u␤»
18:46 colomon that's what I mean
18:47 pmichaud I don't have an @ parameter, though.
18:47 pmichaud so I'm not sure what you mean :)
18:48 colomon @args, in reducewith
18:48 pmichaud I don't have an @args in reducewith
18:48 pmichaud did that commit not get pushed?
18:48 * pmichaud checks
18:49 pmichaud right.  I don't have @args in &reducewith...  it's $args
18:49 dalek csmeta: r326 | diakopter++ | trunk/Sprixel/ (4 files):
18:49 dalek csmeta: [perlesque] fixed non-dynamic generic types, on Mono.  finally.  sortof a
18:49 dalek csmeta: workaround for mono's brokenness, though.  might need revisiting.
18:49 dalek csmeta: review: http://code.google.com/p/c​smeta/source/detail?r=326
18:50 colomon I see, I was looking at the wrong commit
18:50 radu_ hm. I have a question regarding invoking a function for each element in an array.
18:50 pmichaud you're suggesting we should constraint $args to be of type List.  If we do that, then we can't get non-List arguments passed to &reducewith.
18:50 pmichaud *constrain
18:50 colomon on my phone, browsing is tricky   :)
18:50 pmichaud ahhh, yes.
18:50 pmichaud that would be tougher.  :)
18:51 diakopter sorear: All tests successful.  :)
18:51 diakopter phenny: tell pmurias perlesque is back to All tests successful.
18:51 phenny diakopter: I'll pass that on when pmurias is around.
18:51 diakopter phenny: tell sorear I'll dig into contextuals and then the runtime compiler api, and then string eval
18:51 phenny diakopter: I'll pass that on when sorear is around.
18:53 diakopter perlesque: my $Afoo = List[int].new(); $Afoo.Add(52); say($Afoo[0]);
18:53 p6eval perlesque: OUTPUT«52␤»
18:53 diakopter perlesquel: my $Afoo = List[int].new(); $Afoo.Add(52); say($Afoo[0]);
18:53 p6eval perlesquel: OUTPUT«52␤real 0.05␤user 0.04␤sys 0.00␤»
18:54 sorear diakopter: what is this "mono/.net disparity" you speak of?
18:54 sorear diakopter: also, what was wrong with perlesque: earlier?
18:54 phenny sorear: 18:51Z <diakopter> tell sorear I'll dig into contextuals and then the runtime compiler api, and then string eval
18:54 diakopter perlesque: class B { method new () { } }; my $Afoo = List[B].new(); $Afoo.Add(B.new()); say($Afoo[0]);
18:54 p6eval perlesque: OUTPUT«B␤»
18:54 diakopter sorear: I was testing stuff on p6eval I think
18:54 diakopter or something
18:54 colomon pmichaud: let me know when gathere / take works again and I will have a field day fixing stuff.
18:55 pmichaud colomon: should be working again shortly
18:55 diakopter the mono/.net disparity is a bug somewhere deep in mono guts that I'm not going to spend a single more month on
18:55 colomon \o/
18:55 pmichaud so far I haven't gotten to a test that needs it
18:55 diakopter sorear: you said perlesque doesn't have methods..? yes it does
18:55 sorear is mono the kind of organization that actually pays attention to bug reports?
18:55 sorear diakopter: viv --psq doesn't support methods
18:56 diakopter yes
18:56 diakopter oh
18:56 sorear that is all I meant
18:56 diakopter afk to hackhack and then $hackhack
18:57 sorear what are those?
19:05 tadzik joined #perl6
19:05 tadzik hello
19:06 moritz_ hi
19:06 tadzik p6eval: say 'Hello World'.trans('aeo' => 'AEO');
19:06 cono joined #perl6
19:06 tadzik I guess it means it does not work, hm?
19:06 tadzik too few positional arguments: 2 passed, 3 (or more) expected, says my rakudo
19:07 tadzik trans('a' => 'A', 'e' => 'E', 'O' => 'O'); has the similar effect: what is the proper way here?
19:07 pmichaud it looks like the Parrot .trans is getting in the way again
19:08 pmichaud (~'Hello World').trans(...)   just to see if it works
19:08 tadzik p6eval: (~'Hello World').trans('o' => '0')
19:08 pmichaud (need a 'say')
19:08 tadzik ah, sure
19:09 tadzik p6eval: say (~'Hello World').trans('o' => '0')
19:09 tadzik but same erron in my perl6
19:09 pmichaud okay, I'm not sure what the issue is, then.
19:10 tadzik by the way, what is the difference between ['a', 'b', 'c'] and <a b c>?
19:10 pmichaud the first is an array, the second is a list
19:11 tadzik I see
19:11 pmichaud the second will interpolate in a flattening context, the first will not.
19:11 pmichaud <a b c>  is really more like   ('a', 'b', 'c')
19:11 tadzik and [<a b c>] is an actual array
19:12 pmichaud yes
19:12 pmichaud (because of the brackets)
19:12 tadzik yeah, that's what <a b c>.perl gave me
19:12 tadzik I just didn't know why one is [] and another ()
19:12 pmichaud <a b c>.perl should give ('a', 'b', 'c')
19:12 tadzik and it gives
19:12 pmichaud (it does in my current version).
19:12 moritz_ (half off-topic: for Math::RungeKutta I'm looking of a description of adaptive step size Runge-Kutta algorithms with a less insane license than "numerical recipes" - anye ideas?)
19:13 tadzik so, back to the previous one: did I find a bug and helped Perl6 development? :)
19:13 pmichaud needs reporting to RT, probably.
19:13 tadzik github?
19:13 pmichaud no,   rt.perl.org
19:13 pmichaud see "Reporting bugs" in the README
19:14 pmichaud oh, sorry
19:14 pmichaud actually, mail to   rakudobug@perl.org  works also
19:14 pmichaud (it's the canonical mechanism)
19:15 tadzik just a mail, no special magic?
19:15 moritz_ right
19:15 pmichaud no special magic.  It's nice if you put  [BUG] in the subject line
19:15 sorear moritz_: wikipedia has a decent GFDL one
19:15 tadzik I'll do, thanks
19:19 radu_ perl6: my @a = 'a' => 1, 'b' => 2; say @a.key;
19:19 p6eval rakudo bdbdfb: OUTPUT«Method 'key' not found for invocant of class 'Array'␤  in main program body at line 11:/tmp/FLbhFeG9Ma␤»
19:19 p6eval ..pugs: OUTPUT«*** No such method in class Array: "&key"␤    at /tmp/lSw_2S5uwg line 1, column 33-39␤»
19:19 p6eval ..elf 31243: OUTPUT«Can't call method "key" on unblessed reference at (eval 125) line 4.␤ at ./elf_h line 5881␤»
19:19 radu_ does anyone know if this syntax: @a.key  should work?
19:19 pmichaud .keys
19:19 pmichaud but since @a is an array, you'll get 0,1 as the result
19:19 moritz_ and it would return 0,  1
19:20 radu_ i found an example that says it should iterate over the array elements and apply the key function to each element
19:20 radu_ this is not correct?
19:20 moritz_ that would be @a>>.key
19:20 pmichaud you can do it with hypers
19:20 pmichaud or with map
19:20 pmichaud rakudo:  my @a = 'a' => 1, 'b' => 2;  say @a>>.key;
19:20 p6eval rakudo bdbdfb: OUTPUT«ab␤»
19:20 radu_ aha. I knew about map, i was looking for a shorter notation :)
19:20 radu_ ok, thanks
19:20 tadzik what is >> actually?
19:20 pmichaud it's the "hyper operator"
19:20 moritz_ radu_: where did you read that?
19:21 pmichaud it turns an operator into something that works on the elements of a list
19:21 pmichaud so,  @a.key  invokes ".key" on the array, while  @a>>.key  invokes .key on the elements of @a
19:21 radu_ a book i downloaded from git hub i think? I got the link from masak
19:21 radu_ masak's blog
19:21 pmichaud (and returns the results as a list)
19:21 pmichaud maybe the >>'s disappeared in the html
19:23 moritz_ some of the older PDF versions had rendering issues
19:26 moritz_ ouch, the HTML version is UTF-8 "challenged"
19:31 alanhaggai joined #perl6
19:38 pmichaud erg, junctions no longer autothread in the list branch
19:38 pmichaud *sigh*(
19:41 baest_ joined #perl6
19:41 eternaleye joined #perl6
19:51 thepm joined #perl6
19:53 Su-Shee grr.. my passphrase is _that_ secure that I never get it right in the first place..
19:56 moritz_ style question...
19:56 moritz_ I like to align = signs on consecutive lines
19:56 moritz_ my $x  = 3;
19:56 Su-Shee moritz_: no brown socks to black shoes. and no white tennis socks in sandals.
19:56 moritz_ my $ab = 4;
19:56 moritz_ now I have a *= on one line
19:56 moritz_ should I align the begin of the operators, or the = sigsn?
19:57 moritz_ both kinda look werid
19:57 Su-Shee I align at the = but I often don't use the *= if it doesn't look nice.
20:02 masak joined #perl6
20:02 masak mmm, nom.
20:02 moritz_ ===SORRY!===
20:02 moritz_ Symbol '$order' not predeclared in <anonymous>
20:02 moritz_ now that is *not* helpful
20:03 moritz_ no line number, no file, nothing to identify the whereabouts
20:03 masak at least you got the type of the error and the variable name. :P
20:03 masak that's plenty to go by... :)
20:04 Psyche^ joined #perl6
20:04 moritz_ problem is, the code that I've touched doesn't contain an $order variable
20:04 masak huh.
20:05 moritz_ oh wait
20:05 masak :)
20:05 moritz_ looking in the wrong file
20:10 sorear moritz_: have you ever seen lhs2tex?
20:11 moritz_ sorear: no
20:14 moritz_ rakudo: time - 3
20:15 p6eval rakudo bdbdfb: OUTPUT«Too many positional parameters passed; got 1 but expected 0␤  in 'time' at line 5174:CORE.setting␤  in main program body at line 11:/tmp/wI49gJRnJ3␤»
20:16 sorear moritz_: see, for instance, http://people.cs.uu.nl/andres/lhs2TeX-IFIP.pdf, pages 29-30
20:16 sorear it would be really cool to have something like this for perl6... anyway it could give you ideas
20:16 lue ohai
20:17 moritz_ sorear: aye, looks cute
20:18 lue moritz_: when you see ===SORRY!===, then it doesn't give you anything else on purpose.
20:18 moritz_ lue: really? why?
20:19 moritz_ "we already apologized, no need to explain anything?"
20:19 moritz_ doesn't sound like something pmichaud++ or jnthn++ would put into rakudo
20:20 lue The comments say so, lemme get them
20:21 sorear TimToady: Why is @::ORIG kept as numbers instead of characters?
20:21 lue # For parse time exceptions, we just want the message, with no
20:21 lue # back trace beyond this.
20:21 lue in src/Perl6/BacktracePrinter.pm
20:22 moritz_ lue: ah, but that doesn't talk about line numbers, only backtrace
20:22 lue methinks line # would be part of the backtrace, not the err message [but that's just me]
20:22 lue rakudo: say PARSEFAIL.[!]
20:22 p6eval rakudo bdbdfb: OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<[ ]>, couldn't find final ']' at line 11␤»
20:22 lue hrm, well _now_ we have inconsistency...
20:23 moritz_ \o/ implemented adaptive step size for Math::RungeKutta
20:24 moritz_ and it's actually faster than the fixed step size, though I don't compare errors yet
20:24 Visitor99 joined #perl6
20:26 masak I don't see why people consider "Perl++" or "Perl 5++" to be less problematic, presumptuous, or bogged down by immediate misunderstanding than "Perl 6".
20:26 masak is it the 6 that bothers them?
20:26 lue What languages can you import code from [say libXYZZY written in C]?
20:27 lue in Rakudo, as of this moment.
20:27 lue masak: maybe it's the butterfly »ö«
20:28 masak also, I have no idea what this means: http://twitter.com/Speedyshady/status/16084636670 -- there are facebook puzzles that require Perl 6?
20:28 moritz_ rakudo: ++
20:28 p6eval rakudo bdbdfb: OUTPUT«===SORRY!===␤Confused at line 11, near "++"␤»
20:28 moritz_ so some syntax errors contain a line number
20:29 moritz_ not as part of a backtrace, but as part of the actual error message
20:29 moritz_ rakudo: $x
20:29 p6eval rakudo bdbdfb: OUTPUT«===SORRY!===␤Symbol '$x' not predeclared in <anonymous>␤»
20:29 lue [I would love for D* to accept Perl, maybe even P6]
20:30 moritz_ where does this error message come from?
20:30 lue IIE. What generates the actual error messages, mewonders.
20:31 masak sorear: the lhs2tex output is very pretty. I've been toying with the idea at times of making such a tool.
20:31 moritz_ parrot/compilers/pct/src/PAST/Compiler.pir
20:32 lue That would explain why I've never found an error message with grep :)
20:32 Visitor99 joined #perl6
20:32 pugssvn r31244 | sorear++ | [dfa/Cursor] Code for the DFA execution kernel
20:34 lue The predeclared error comes from Compiler.pir [as given by moritz_], but the Confused at message isn't in that file.
20:34 lue [Curiouser and Curiouser]
20:34 moritz_ that comes from the backtrace printer
20:34 moritz_ it just says ===SORRY!=== + message
20:35 moritz_ and message doesn't contain a line number here
20:36 lue The actual Confused message isn't generated in BacktracePrinter.pm.
20:36 sdeseille joined #perl6
20:36 sdeseille Hello
20:36 moritz_ right. BacktracePrinter.pm doesn't generate actual mesages
20:37 mberends hi sdeseille !
20:37 moritz_ I think I've found the problem
20:37 moritz_ src/Perl6/Actions.pm line 707
20:37 lue That is the problem. Some error messages generate w/ a line number, some don't. And they're don't come from one place [after discounting various die() and warn() stuff]
20:37 sdeseille hi martin
20:37 moritz_ doesn't contain a :node($/)
20:38 moritz_ which means that the line number info gets lost
20:38 masak moritz_: (re how to align *= among a bunch of = signs). when you're stuck in such a neither-one-looks-good situation, it's time to choose a third kill-your-darlings alternative that avoids the choice altogether. :)
20:38 moritz_ trying to fix that...
20:38 mberends sdeseille: are you still blocked on that 'malformed string' compiler error?
20:39 masak mberends: I'm now done writing the pls core, the brain if you will. still need to put it in a body. :)
20:39 sdeseille yes
20:39 lue yay!
20:39 sdeseille can you help me ? Have you found something
20:39 mberends masak: brains and brawn, eh?
20:40 * masak had to look up 'brawn'
20:40 masak mberends: :)
20:41 masak mberends: there's one little problem in the current data model that I'm aware of, but apart from that, I'm very happy about the way things came together.
20:41 mberends sdeseille: can you make a little document containing your Rakudo build error, and paste it here: http://nopaste.snit.ch/new/perl6
20:41 Su-Shee masak: can I have brad pitts body then?
20:41 lue [ how's the thankyou core coming? :) ]
20:41 masak Su-Shee: I think you'll have to ask him yourself.
20:42 Su-Shee well he's living in berlin anyway... I'll just ring tomorrow. ;)
20:42 masak piece of cake.
20:43 lue [To keep the analogy going, ] can I see the hox genes for proto/pls/* you call $_ .
20:44 sdeseille ijust rerun compilation and tee output in file i'm waiting the end of compilation
20:45 mberends masak: is there any way the new pls brain could be grafted onto the old proto body?
20:45 masak mberends: haven't thought about it. I doubt it.
20:45 mberends .oO( looking for a quick win )
20:46 lue [lemme guess, pls ~~ Proto v2]
20:46 moritz_ Proto.succ :-)
20:46 masak the quick win is in sight. we can probably lift over quite a bit of code.
20:46 masak lue: yep.
20:46 pmichaud back again
20:46 masak lue: stand by for Big Name Replacement everywhere.
20:46 lue [quick! Find cool japanese name!]
20:47 * masak .oO( sosumi )
20:47 lue You say Proto, I think Megaman :D
20:47 moritz_ masak: I HAZ MAKED YOU A WEBSIT: http://pls.perl6.org/
20:47 moritz_ erm, at least a domain :-)
20:48 masak moritz_++
20:48 masak mberends: while I have the data model fresh in my mind; there are two data structures which look similar but are distinct: the Ecosystem (list of all known modules) and, for lack of a better name the ProjectsState (the installedness of all the projects).
20:49 mberends masak: yes
20:49 masak mberends: I think I may have them confuzzled a bit still, so even though all tests pass, a github/gitorious dispatch still isn't possible.
20:49 * Su-Shee adds "Installedness" to wikipedia.
20:49 lue It's about as real a word as Malamanteau.
20:50 * pmichaud looks at the number of instances of ".iterator" in Rakudo core sources and cringes
20:50 lue .oO(s/ProjectsState/Camels/ ?)
20:50 masak mberends: the key is sending the Ecosystem entry to the Fetcher, Builder, etc, not just the name of the project. I'll try to make that refactor now.
20:51 masak lue: why 'Camels'?
20:51 sdeseille mberends do you need all logfile about compilation
20:51 lue I don't know, just thinking.
20:51 masak lue: I appreciate the effort.
20:51 * pmichaud decides to go radical and eliminate the ones that don't make sense to him.
20:52 masak pmichaud++
20:52 mberends masak: I think we'll also have to become aware of project versions for upgrades
20:52 masak lue: I'd love a nicer name than ProjectsState, but (unless you tell me the rationale) Camels isn't it. :)
20:52 astrojp left #perl6
20:52 lue Camels can be found in an Ecosystem. That's where it's coming from.
20:53 masak mberends: oh, right! I did want to talk to you about versions and authies.
20:53 mberends sdeseille: if all the output fits into the nopaste form, yes, otherwise only last the part near the error.
20:53 tadzik hmm
20:53 masak lue: well, the things about the project states is that they can *not* be found in the ecosystem...
20:53 tadzik is there a list of some standard Perl6 modules?
20:53 sdeseille mberends ok i try
20:53 masak tadzik: http://pls.perl6.org/
20:53 tadzik I see that LWP::Simple port uses IO::Socket
20:53 masak \o/
20:54 * lue really ought to try out this research thingy before pressing his keys :)
20:54 masak tadzik: probably from the old alpha branch.
20:54 tadzik yeah, I see
20:54 tadzik but e.g. no this IO::Socket in here
20:54 masak right. it did exist up until the January release of Rakudo.
20:55 masak before the Big Refactor.
20:55 mberends tadzik: I'm trying to rewrite the Socket thing atm to not use binding
20:55 tadzik so wha can one use now?
20:55 masak tadzik: there are a few options here:
20:55 masak tadzik: (1) use the January release of Rakudo.
20:56 masak tadzik: (2) change LWP::Simple to use something other than IO::Socket.
20:56 masak tadzik: (3) port IO::Socket from alpha to Rakudo master.
20:56 moritz_ (3) is best :-)
20:56 tadzik (:
20:57 lue [ In ascending order of prefferedness :) ]
20:58 sdeseille mberends all log is here http://nopaste.snit.ch/21219
20:58 * mberends looks
20:58 masak I actually don't believe in (2) at all. don't know what 'something other' would be, really.
20:59 moritz_ sdeseille: pelase try building rakudo and parrot in a directory whose name is made entirely of ASCII characters
21:00 moritz_ -rpath=/home/sdeseille/Téléchargeme​nts/rakudo-2010.05/parrot/blib/lib
21:00 mberends moritz_++
21:00 moritz_ it might not like the Téléchargements
21:00 sdeseille ok
21:00 sdeseille i try
21:00 pmichaud and if it doesn't... feel free to file a rakudo bug :)
21:00 sdeseille ;)
21:00 moritz_ and if it does... feel free to file a parrot bug
21:01 dalek rakudo: 33948ca | moritz++ | src/core/RangeIter.pm:
21:01 dalek rakudo: hide sub RangeIterCmp from userland
21:01 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/3​3948ca8692723a77b66c38d8afde857ab8b2848
21:01 dalek rakudo: 1345a33 | moritz++ | src/Perl6/Actions.pm:
21:01 dalek rakudo: variables should now where they come from
21:01 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/1​345a33aea58260f7e4a906b73a4571ee189147b
21:01 moritz_ pmichaud: I've just pushed a patch that adds :node($/) to make_variable
21:01 pmichaud moritz_: +1
21:01 moritz_ pmichaud: and the PAST output confirms that a variable now has pos associated with it
21:01 moritz_ but
21:01 moritz_ ./perl6 -e '$x'
21:01 moritz_ ===SORRY!===
21:01 moritz_ Symbol '$x' not predeclared in <anonymous>
21:01 moritz_ still doesn't pick up the line number
21:02 moritz_ any ideas?
21:02 pmichaud right, that's a PAST issue.  We can probably improve PAST::Compiler.panic to provide that information.
21:03 sdeseille new try pending ...
21:04 sdeseille i'll keep you inform about the result
21:05 sorear what kind of idea is hiding the backtrace anyway
21:06 pmichaud ..backtrace?
21:06 pmichaud there's not really a backtrace for that error message
21:07 pmichaud or if there is, it'd be in a long sequence of Compiler subroutines which don't really say much.
21:07 * masak .oO( sounds like the way it was up until a week or so ago )
21:07 pmichaud this is a compile-time error, not a runtime error.
21:08 pmichaud the backtrace code handles runtime errors.
21:08 masonkramer_ joined #perl6
21:08 masak I'm not seeing long backtraces for compile-time errors anymore either.
21:08 pmichaud hmmm, that seems odd-ish.
21:09 * masak confirms
21:09 masak rakudo: class A { has a syntax error! }
21:09 p6eval rakudo bdbdfb: OUTPUT«===SORRY!===␤Malformed has at line 11, near "a syntax e"␤»
21:09 masak no backtrace.
21:09 pmichaud I'm not really looking forward to trying to figure out where Junctions have failed.  :-(
21:10 lue rakudo: P + E
21:10 p6eval rakudo bdbdfb: OUTPUT«Could not find sub &E␤  in main program body at line 11:/tmp/YEi63rtkhL␤»
21:11 sdeseille and the winner is ...... mberends !!
21:12 masak \o/
21:12 mberends no, sdeseille, you win, thanks to the eagle eyes of moritz_++ :-)
21:12 sdeseille the next step is to use 'make' to build rakudo like mentioned by output ?
21:13 mberends yes
21:13 sdeseille ok
21:13 pmichaud a-ha!
21:14 pmichaud looks like any() is eating up all of the values of its slurpy.
21:16 sorear TimToady: Can you explain how $::PREFIX is used in RE_ast?  It looks to be done wrong, since line 240 might hit the cache and therefore, the obtained value could have been calculated with the current or a previous value
21:17 lue masak: can you direct to some information on proto, namely what the Ecosystem and ProjectsState is?
21:18 masak lue: I can tell you briefly.
21:18 masak lue: the Ecosystem is basically what you see on http://proto.perl6.org
21:18 masak i.e. the collection of all known projects, and at least enough information to find their source.
21:19 masak for github, 'enough information' is project name and project owner.
21:19 masak for gitorious, it's only the project name.
21:19 sorear TimToady: ignore comment about it being wrong, but I'm still curious how it works
21:20 lue And ProjectsState is what you have installed?
21:20 masak lue: the ProjectsState is also a list of projects, but it pertains only to projects in various stages of fetch/build/install on your computer. in proto, this information was stored in a file called projects.state.
21:22 lue That's what I thought, a sort of "status report" for what's on [or not on] your computer.
21:24 sdeseille All tests successful.   Result: PASS
21:24 mberends sdeseille++ # installing Rakudo on Debian Testing
21:24 sdeseille yes
21:25 mberends sdeseille: now to write your killer app ;-)
21:26 sdeseille where can i find some documentation about syntaxe for begining ?
21:26 mberends all sorts of links from http://perl6.org
21:27 mberends excellent tutorial at http://perlgeek.de/en/article/5-to-6
21:27 Meldrake_ joined #perl6
21:27 sdeseille ok it work : sdeseille@scube:~/rakudo/rakudo-2010.05$ ./perl6 -e 'say "hello world"'
21:28 mberends sdeseille: later on you should try a github clone of the latest Rakudo source in another directory, to keep up with the latest improvements
21:29 lue rakudo: my @ram = 0 xx 10; my @rom = 1 xx 20; my @computer; @computer[0..9] := @ram; @computer[10..29] := @rom; say @computer[8..11];
21:29 p6eval rakudo bdbdfb: OUTPUT«:= binding of variables not yet implemented␤  in 'infix:<:=>' at line 630:CORE.setting␤  in main program body at line 11:/tmp/cUBY_Owvu8␤»
21:29 lue I knew it was futile, but I still had to see.
21:29 masak lue: a bit quixotic in our attempts, are we? :)
21:30 sdeseille sort of testing rakudo version
21:30 masak lue: if you're so bored, why don't you start on an adventure game in Perl 6 instead?
21:30 masak there's plenty that can be explored inside the bounds of the currently possible.
21:30 mberends sdeseille: also, you could do a 'make install' and then 'sudo ln -s ~/rakudo/rakudo-2010.05$ ./perl6 /usr/local/bin/rakudo' to be able to use a 'rakudo' command in any directory.
21:31 lue [that's the cool way to set up any computer's memory map, like the NES.]
21:31 lue masak: doth it matter what kind? I could start with text game.
21:31 mberends er, 'sudo ln -s ~/rakudo/rakudo-2010.05/perl6 /usr/local/bin/rakudo'
21:31 masak lue: let your imagination flow free!
21:32 masak but yes, I had a text game in mind. no need to get overly fancy.
21:34 sdeseille ok mberends i do it now
21:35 lue masak: Just wondering, how is Buf coming along?
21:36 masak lue: I hope to get a report in before I go to bed. it's coming along well.
21:36 masak the Parrot people have been very forthcoming in their assistance.
21:36 masak and jnthn++ too.
21:37 masak so I'm actually slightly ahead schedule right now.
21:37 masak s/ahead/ahead of/
21:37 lue joined #perl6
21:37 sdeseille it's done
21:38 [[mark]] joined #perl6
21:38 lue that's good
21:38 lue [or rather, sounds good :)]
21:39 masak lue: if you're interested in details, you may check out the 'buf' branch of Rakudo, as well as the t/spec/S32-str/encode.t file.
21:40 masak hm, I seem to have finally cracked how to dispatch on github/gitorious.
21:40 lue I'm interested because binary files are more fun to play with :)
21:40 masak and the good news is that I get to use jnthn++'s nested signatures! \o/
21:41 masak lue: binary files are about a month away according to the schedule: http://gist.github.com/360097
21:41 masak but we'll get there.
21:42 lue D: Ah well, Binary file manipulation isn't necessary for me until := also works :=)
21:43 masak lue: := works in Yapsi. :)
21:44 lue alpha: my $a = 2; my $b := $a; $b = 3; say $a
21:44 p6eval alpha 30e0ed: OUTPUT«3␤»
21:44 lue seems to work everywhere except rakudo/master :)
21:44 sorear right
21:44 sorear rakudo/master is still reeling from February
21:45 * sorear decides to start measuring code churn in millings
21:45 masak it feels as if both the commit density and the number of committers is at an all-time high, though.
21:46 sorear yea
21:46 sorear is it not wonderful?
21:46 masak feels pretty nice, yes.
21:47 sdeseille good night bye
21:47 lue goodnight o/
21:47 masak bye good night!
21:47 mberends bonne nuit sdeseille !
21:47 mberends ETOOLATE
21:48 lue Regular commiters should go +1 after Tuesday :)
21:54 masak why does it feel right to use the :$name syntactic sugar for named arguments, but wrong to use them when building hashes?
21:55 pmichaud binding "works" in the non-rakudo cases only for limited cases of binding, though.  :)
21:56 pmichaud I can make a cheating form of binding for Rakudo that will have the same holes as alpha.  :-)
21:57 masak I actually don't use binding that much.
21:58 masak it creates action-at-a-distance, which isn't good for code readability.
21:59 pmichaud okay, I figured out why junctions are failing... it's not junctions.
21:59 pmichaud fixing.
21:59 masak none(@junctions) eq 'failing'
22:01 Visitor99 joined #perl6
22:14 patrickas joined #perl6
22:14 mberends if my theory is correct, IO::Socket::INET does not really *need* binding, it was just a convenient means to an end. I'm compiling a slightly longer, := free socket(). The test IO-Socket-INET.t was also incompatible with master but I think I've worked around its shortcomings.
22:15 mberends for one, $/[] is not recognized but $/[0] works instead
22:16 masak rakudo: subset A of Hash; sub foo(A $x) {}; foo {}
22:16 p6eval rakudo bdbdfb: OUTPUT«Null PMC access in invoke()␤  in 'ACCEPTS' at line 1␤  in 'foo' at line 1:/tmp/e7jYXh7FK8␤  in 'foo' at line 11:/tmp/e7jYXh7FK8␤  in main program body at line 11:/tmp/e7jYXh7FK8␤»
22:16 * masak submits rakudobug
22:16 masak mberends++
22:17 masak what's $/[] ?
22:18 mberends it was the list from [ (\d+) ]+ in a pattern
22:18 moritz_ should be the same as $/.list, no?
22:18 masak huh.
22:18 moritz_ a "zen slice"
22:18 masak rakudo: sub foo(Hash $x) {}; foo {}
22:18 mberends moritz_: I'll try that as well after rebuilding, it looks prettier :)
22:18 p6eval rakudo bdbdfb:  ( no output )
22:19 moritz_ rakudo: my @a = 3, 4, 5; say "things in @a[]"
22:19 p6eval rakudo bdbdfb: OUTPUT«things in 3 4 5␤»
22:19 patrickas is there an easy way to get "4" out of " my $c = all ( any(1,2,3,4) , none(1,2,3) ); "  short of looping over all possibilities and checking what matches?
22:19 masak moritz_: I've seen zen slices elsewhere, but not in the context of $/, which isn't really an array.
22:19 moritz_ masak: yes, it's more like a Capture, but it should still do Positional
22:19 masak patrickas: you're expecting something of junctions for which they were never intended.
22:20 masak patrickas: it's something of a phase; we all go through it.
22:20 moritz_ masak: and since $/[0] works, why shouldn't $/[] work?
22:20 masak patrickas: you want something more like what nothingmuch++ talked about once.
22:20 masak moritz_: true enough.
22:20 mberends $/.list also works, moritz_++
22:20 patrickas heheh ... I guess so
22:21 pmichaud I suspect $/[] doesn't work due to all of the other list issues I'm now currently correcting.
22:22 pmichaud I can't tell you how many things dealing with arrays and lists are currently wrong in Rakudo master.
22:22 pmichaud (...but it's a huge amount.)
22:22 moritz_ rakudo: Match ~~ Positional
22:22 p6eval rakudo bdbdfb:  ( no output )
22:22 moritz_ rakudo: say Match ~~ Positional
22:22 p6eval rakudo bdbdfb: OUTPUT«0␤»
22:22 moritz_ that's one of the problems
22:22 pmichaud I think that's fixed in my list branch.
22:22 pmichaud if not, it's trivially fixable now.
22:22 moritz_ cool
22:22 masak patrickas: ah! found it! http://blog.woobling.org/2009/​08/abstracting-ambiguity.html
22:23 masak Google++
22:23 moritz_ pmichaud: how far along is the list branch?
22:23 pmichaud depends on how one measures it, I suppose.
22:23 pmichaud I have lists and iterators working.
22:23 moritz_ what about arrays?
22:23 pmichaud Now it's a matter of going through and finding all of the workaround that people put in because lists and iterators weren't working.
22:23 pmichaud Sure, arrays work.
22:23 pmichaud They're just special types of lists.
22:24 pmichaud arrays ended up being trivial -- they started working before I did anything special to try to make them work.
22:24 masak rakudo: sub foo($x where Hash) {}; foo {}
22:24 p6eval rakudo bdbdfb:  ( no output )
22:24 pmichaud More to the point, I just changed their parent from Seq to List and everything pretty much worked.
22:24 masak rakudo: sub foo($x where Hash) {}; foo {}; say "alive"
22:24 p6eval rakudo bdbdfb: OUTPUT«alive␤»
22:25 masak rakudo: subset A of Hash; say {} ~~ A
22:25 p6eval rakudo bdbdfb: OUTPUT«Null PMC access in invoke()␤  in 'ACCEPTS' at line 1␤  in 'infix:<~~>' at line 347:CORE.setting␤  in main program body at line 11:/tmp/XxAWLKaouS␤»
22:25 masak ah. there it is.
22:25 sorear pmichaud: What is Seq in the new world order?
22:25 pmichaud sorear: currently, it's gone.
22:25 masak good.
22:25 pmichaud sorear: as in, quite literally gone.  I removed it from the branch about an hour ago.
22:26 pmichaud If Seq comes back, it will be as an auto-flattening form of List.
22:26 masak rakudo: subset A of Array; say [] ~~ A
22:26 p6eval rakudo bdbdfb: OUTPUT«1␤»
22:26 masak rakudo: subset A of Array; say {} ~~ A
22:26 p6eval rakudo bdbdfb: OUTPUT«0␤»
22:26 pmichaud (i.e., Seq will be a flattening form of List, and Array will be a special form of Seq)
22:27 pmichaud besides, Seq  was too easily confusable with  &infix:<Seq>  :-)
22:27 sorear what does that do?
22:27 moritz_ sequential equality testing
22:27 * sorear abandons the goal of bug-compatibility with the old STD LTM engine
22:27 pmichaud that's meta-S plus &infix:<eq>
22:27 patrickas moritz_: THanks I guess I'll have to stick to my solution then :-)
22:28 dalek rakudo: fca899b | moritz++ | docs/ChangeLog:
22:28 dalek rakudo: add MAIN to ChangeLog
22:28 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/f​ca899b07883db5782aef01ad42f6f7777c84817
22:28 moritz_ patrickas: context?
22:28 moritz_ oh, did you mean masak?
22:29 masak probably.
22:29 patrickas moritz_: I read this http://norvig.com/sudoku.html and I thought ... junctions!
22:30 moritz_ patrickas: I've been quite enthusiastic about junctions too... and after working with them for a bit, and testing them, I found that they are seldom the answer to algorithmic problems
22:30 masak patrickas: think sparse matrices instead, and Knuth's Dancing Links algorithm. :)
22:31 ruoso joined #perl6
22:31 moritz_ patrickas: they work quite nicely as matchers, but everything else over-extends their usefulnes
22:31 masak patrickas: what moritz_ said. I don't think I would be very sad if junctions only ever worked inside if statements as special syntactic sugar.
22:31 pmichaud (and smartmatches)
22:31 masak oh, and... yes.
22:31 pmichaud i.e., anywhere that Matcher is accepted.  :-)
22:31 masak where clauses.
22:32 moritz_ masak: passing them around can also be beneficial, like passing them to grep()
22:32 dual joined #perl6
22:32 patrickas Oh well ... i guess I'll just have to try and fail then :-)
22:32 moritz_ so, not only syntactc sugar
22:32 masak moritz_: if you say so. :) I've never written a grep, so I don't know.
22:38 moritz_ rakudo: say(2.3, 5, 6).grep: Int & *%2
22:38 p6eval rakudo bdbdfb: OUTPUT«2.356␤»
22:38 moritz_ rakudo: say (2.3, 5, 6).grep: Int & *%2
22:38 p6eval rakudo bdbdfb: OUTPUT«5␤»
22:40 lue the current revision number looks... interesting (bdbdfb)
22:42 jhuni joined #perl6
22:42 masak does #bdbdfb look... baige? :)
22:42 * masak hides
22:43 lue s/baige/beige/
22:44 masak lue: http://blog.xkcd.com/2010/0​5/03/color-survey-results/
22:44 lue fushia...fuschia...grr. :)
22:45 lue I remember reading that. I love the long answers near the end :)
22:46 lue [that's an interesting IRC script for your client; when rakudo is commited to, change the background color of your IRC]
22:47 hercynium joined #perl6
22:57 mberends \o/ the Socket::INET fixes pass the first 3 tests in IO-Socket-INET.t but then the test script crashes
22:57 moritz_ mberends: ship it!
22:57 moritz_ (like, fudge the rest for now :)
22:57 diakopter heh
22:57 diakopter "every commit a release"
22:58 mberends yes, I was thinking of fudging, we started out with only 3 tests :)
23:00 skangas left #perl6
23:00 masak because I am not in the least tired, lol I blogged! http://use.perl.org/~masak/journal/40392
23:00 masak I think I'll merge, too, before hitting the sack.
23:02 lue :D masak++
23:04 masak yet another week, yet another merge. the buf branch is no more on github. please reset your respective realities.
23:04 lue Let me get to my normality meters (you used the IID, didn't you?) :)
23:05 masak the Institute for Interreligious Dialogue?
23:05 lue Infinite Improbability Drive.
23:05 lue .oO(1:1. I have reached normality)
23:05 masak for a while, I thought you meant Iterative Incremental Development.
23:05 dalek csmeta: r327 | diakopter++ | trunk/Sprixel/ (4 files):
23:05 dalek csmeta: [perlesque] re-fix contextuals; add some tests for them
23:05 dalek csmeta: review: http://code.google.com/p/c​smeta/source/detail?r=327
23:06 xomas_ joined #perl6
23:06 lue The text game is slowly coming. My plan is first to create the game-independant parser, so you can run any text game on it.
23:06 sorear Yay tests!
23:07 masonkramer left #perl6
23:07 diakopter masak: do you want a yapsi p6eval target?
23:07 masonkramer joined #perl6
23:07 sorear OK, I think I finally understand this well enough to start on proper coding
23:07 lue A github repo shall be created when there is something to push. Until then, afk.
23:07 masak diakopter: eventually, yes. you sound like you're about to add it now. :)
23:07 sorear vipsq: say 2+2
23:07 sorear vivsq: say 2+2
23:07 diakopter heh
23:07 diakopter I didn't add it
23:07 masak diakopter: Yapsi runs on alpha att the moment.
23:07 diakopter oh
23:08 diakopter I think we have an alpha install
23:08 diakopter still
23:08 masak how can we not? we have an alpha target.
23:08 sorear alpha: my $a := 1; say $a
23:08 p6eval alpha 30e0ed: OUTPUT«1␤»
23:08 diakopter yep
23:08 dalek rakudo: 7d80cd4 | masak++ |  (4 files):
23:08 dalek rakudo: [Buf] switched from ByteView to ByteBuffer
23:08 dalek rakudo: This goes for both Str.encode and Buf.decode. And it works, too! Need to
23:08 dalek rakudo: figure out how to handle encodings besides UTF-8, though. One of the tests
23:08 dalek rakudo: wants to decode using iso-8859-1.
23:08 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/7​d80cd45264267bb38622eccca6685d5db123187
23:09 diakopter sorear: contextuals in fact don't get to have a type annotation
23:09 diakopter and must be assigned an initializer on first sight
23:09 diakopter as I discovered
23:09 masak there. now I don't have to feel ashamed about the discrepancy between the spectest fudgings and Rakudo master. :)
23:09 diakopter I remembered why I did that
23:10 masak diakopter: why must contextuals be assigned an initializer on first sight?
23:10 sorear what if I want a contextual that can hold any object?
23:10 diakopter then you have to give it type Object
23:10 sorear how?
23:10 diakopter perlesque: my $*a = Object.new();
23:10 p6eval perlesque:  ( no output )
23:11 diakopter System.Object
23:11 diakopter base class for all reference types
23:11 sorear ...what kind of class hierarchy has Object as an instantiatable type
23:11 diakopter :)
23:11 sorear I thought that was what "abstract" was for
23:11 sorear perl6: Mu.new
23:11 p6eval pugs: OUTPUT«*** No such subroutine: "&Mu"␤    at /tmp/i3jtHw1SUF line 1, column 1 - line 2, column 1␤»
23:11 p6eval ..elf 31244: OUTPUT«Can't locate object method "new" via package "Mu" (perhaps you forgot to load "Mu"?) at (eval 122) line 3.␤ at ./elf_h line 5881␤»
23:11 p6eval ..rakudo fca899:  ( no output )
23:12 sorear perl6: Any.new
23:12 p6eval elf 31244, pugs, rakudo fca899:  ( no output )
23:12 diakopter perlesque: my $*a = Object.new(); say($*a)
23:12 p6eval perlesque: OUTPUT«System.Object␤»
23:12 masak Java's type system also has Object as a concrete class. JavaScript's as well, as far as I know. I don't think it's that uncommon.
23:12 masak not sure Smalltalk even has the concept of abstract classes.
23:13 diakopter javascript's type system is not user-extensible
23:13 diakopter or stated another way, like perl, it has two layers of type systems
23:13 masak oh?
23:14 sorear great, I've forgotten how to rebuild perlesque
23:14 diakopter svn update ; rm -f Sprixel/bin/Release/asmbly_1.exe ; rm -f Sprixel/bin/Release/Sprixel.exe.so ; rm -f Sprixel/bin/Release/perlesque.exe.so ; xbuild /p:Configuration=Release Sprixel.sln ; cd Sprixel ; sh run_tests.sh ; cd ..
23:15 diakopter the test script creates the perlesque.exe
23:15 diakopter feel free to create a Makefile :)
23:16 sorear I don't have any .so files
23:16 japhb joined #perl6
23:16 diakopter k
23:16 diakopter .so files are created by mono's "aot" (ahead of time) compiler (to machine code)
23:16 sorear I love how fast xbuild is
23:16 diakopter but for perlesque it very much pessimizes it
23:17 diakopter because of the tens of thousands of labels/gotos
23:17 sorear because sprixel generates a single function for the entire grammar graph?
23:17 diakopter yup
23:17 diakopter I need to change that.
23:18 sorear what goes into Sprixel.exe?
23:18 diakopter to improve the startup time
23:18 diakopter that's the first stage
23:18 sorear all of the .cs files in the entire source tree?
23:18 diakopter yes
23:18 sorear 75,000 loc in 2 seconds
23:18 sorear I am very impressed
23:19 diakopter mostly it's transliterating (mono's gmcs)
23:19 diakopter C# to CIL is very much 1:1
23:19 diakopter very close, anyway
23:19 diakopter it's the JIT that does the real work
23:19 diakopter upon every invocation
23:19 sorear yeah, I forget how fast dumb compilers can be
23:20 * sorear is suddenly reminded of that tcc demo where they built Linux 2.4.something in 15s
23:21 diakopter well, let me amend my statement "C# to CIL is very much 1:1"
23:21 diakopter most compilations from C# to CIL are reversible by good disassemblers
23:22 diakopter I mean, it's going from an expression language with several namespace depths to a stack language with several namespace depths
23:22 dalek book: 625e409 | (Nikolai Prokoschenko)++ | src/basics.pod:
23:22 dalek book: fix typo: s/hyphen/apostrophe/
23:22 dalek book: review: http://github.com/perl6/book/commit/62​5e409c00d50841cf24ea3587c765b627566b65
23:22 dalek book: 2cbe38d | (Nikolai Prokoschenko)++ | src/ (4 files):
23:22 dalek book: Normalize prepended whitespace in verbatim sections
23:22 dalek book: The rationale is consistency, since it allows us to use gobble option in LaTeX
23:22 dalek book: for those verbatim environments, which is probably good, right? ;)
23:22 dalek book: review: http://github.com/perl6/book/commit/2c​be38d72efd04321318ac886d41fe0a6952a3fe
23:22 sorear Files=20, Tests=0,  2 wallclock secs ( 0.18 usr  0.05 sys +  0.32 cusr  0.20 csys =  0.75 CPU)
23:22 sorear Result: FAIL
23:22 diakopter aww
23:23 sorear lots of ../../t/p6capture.t ........... Cannot open assembly 'perlesque.exe': No such file or directory.
23:23 diakopter oh
23:23 japhb joined #perl6
23:23 diakopter you have to be in the root dir
23:23 diakopter I mean
23:24 diakopter in the Sprixel/ dir, to run that script
23:24 diakopter it assumes, anyway.
23:24 sorear that's what I did
23:24 diakopter feel free to change/fix that
23:24 diakopter oh
23:24 sorear the actual problem is that...oh right
23:24 sorear I have a commit bit
23:25 diakopter what'd I do wrong? :)
23:25 rgrau joined #perl6
23:25 sorear mono bin/Release/Sprixel.exe creates ./perlesque.exe
23:25 sorear after the cd, it needs to run ../../perlesque.exe
23:26 sorear not perlesque.exe
23:26 diakopter oh
23:27 diakopter in that case, it needs to cd into bin/Release first
23:27 sorear ok
23:28 mberends in alpha, a class could have a Str member called $.method, useful for an HTTP::Request class. In master you're not allowed to say HTTP::Request.new( method=>'GET' ). Is master right to give a 'Malformed method' error?
23:28 sorear aside: is it possible in .net to compile code at runtime without having it hit disk?
23:28 diakopter yes
23:28 diakopter see AssemblyGen.cs Complete()
23:28 sorear asmbly_1.exe is avoidable once we're doing production, good
23:30 diakopter er, Save() I mean
23:31 masak mberends: hm, that's actually a tricky one.
23:31 diakopter Initialize() in that file will need to much more heavily parameterized
23:31 masak std: class A {}; A.new( method=>'GET' )
23:31 p6eval std 31244: OUTPUT«ok 00:01 108m␤»
23:32 diakopter sorear: here are my thoughts on separate compilation:
23:32 masak mberends: looks like master is wrong there, yes.
23:32 mberends masak: I've just renamed method -> request_method to avoid that fight
23:32 masak mberends: workaround is to not use a bareword there :)
23:32 masak or that :)
23:32 mberends masak: what would the bareword-free syntax be?
23:33 masak "method" => "GET", for example.
23:33 masak or :method<GET>
23:33 diakopter in .net, every assembly can have an entry point, whether .dll or .exe, which is analogous to every perl script being an executable. the .pm or .pl or .pmc extension is just a user hint, right?
23:33 masak std: %<method get>
23:33 p6eval std 31244: OUTPUT«ok 00:01 105m␤»
23:33 mberends masak: oh, right. I'd rather use one of those :)
23:34 sorear diakopter: is an "assembly" the same thing as a PE file?
23:34 masak mberends: care to submit a rakudobug about 'method' not working as a hash bareword key?
23:34 diakopter yes
23:35 sorear diakopter: also, ELF works the same way.  Try running /lib/ld-linux.so.2 as a shell command
23:35 masak mberends: I had a similar report yesterday about 'has'. they could probably share RT number.
23:35 masak mberends: http://rt.perl.org/rt3/Tic​ket/Display.html?id=75694
23:35 dalek csmeta: r328 | stefa...@cox.net++ | trunk/Sprixel/run_tests.sh:
23:35 dalek csmeta: Fix directory assignment in run_tests
23:35 dalek csmeta: review: http://code.google.com/p/c​smeta/source/detail?r=328
23:35 mberends masak: ok, tomorrow. I'll append to the same one. I've got work to do on HTTP::Daemon right now.
23:36 masak fairy nuff.
23:36 sorear hmm.  dalek doesn't know about using AUTHORS data for svn commits?
23:37 snarkyboojum joined #perl6
23:37 diakopter sorear: my thought is to cache the compiled result of executables based on the following key: some hash of the concatenation of the names of all the files previously loaded (in order) by the current compilation at the time it reaches that module "use"
23:38 diakopter fully-qualified-names, I mean
23:38 masak I like the fact that the fact that the code-to-tests ratio in pls right now is sitting at about 2-to-11. :)
23:38 diakopter sorear: or
23:38 sorear I'm not following; why do we need to care about what other modules have been loaded?
23:38 diakopter some hash of the concatenation of the hashes of all the file paths+contents
23:39 sorear Does .NET not support loading assemblies in any order?
23:39 diakopter b/c previously loaded modules can affect the parse/compilation
23:39 diakopter and so a source file could be parsed differently
23:39 diakopter depending on what was loaded formerly
23:40 dalek csmeta: r329 | stefa...@cox.net++ | trunk/Makefile:
23:40 dalek csmeta: Add a simple Makefile for new users
23:40 dalek csmeta: review: http://code.google.com/p/c​smeta/source/detail?r=329
23:41 diakopter but no, a .net assembly can't be loaded before its assemblies.. but the loader does try to resolve them
23:41 diakopter and they are strongly bound (with cryptographic sigs and such)
23:41 sorear "an assembly can'tbe loaded before its assemblies" "strongly bound with sigs" I need some jargon explained here
23:41 sorear "resolve"
23:41 diakopter oops
23:41 diakopter before its dependencies, I meant
23:42 sorear Since perlesque is so fast, I think the most reasonable thing to do, right now, is to add a mostly-textual include facility
23:42 diakopter oh
23:42 diakopter yeah, I suppose :)
23:42 sorear use BAREWORD -> parses the contents of the file and inserts the resulting statementlist into the current block
23:43 diakopter it'll take some work to make the parsers re-entrant-ish
23:43 diakopter oh
23:43 diakopter or that
23:43 diakopter well yeah
23:43 diakopter that.
23:43 sorear actually, not quite
23:43 sorear that has a diamond problem
23:44 masak 'night
23:44 diakopter nite
23:44 diakopter the tried/trying filepaths can be tracked
23:44 diakopter and not duped
23:44 diakopter we can just declare that only the toplevel can "use"
23:48 sorear MINIMALLY FANCY: When 'use' is parsed, the file is slurped, and injected -as a string - into the parse buffer.  (Are your strings mutable?)
23:49 sorear MEDIUM FANCY: 'use' actually recursively parses the file, and injects statements, not characters
23:49 sorear MAXIMUM FANCY: A subset of the Perl 6 module system
23:50 * sorear studies what options .NET has for assemblies and what all this loader jargon means
23:51 sorear diakopter: you mentioned earlier that, in general, Perlesque code shouldn't be using .NET class names.  What counts as a class name I should be willing to use?  List and Dictionary I hope...
23:51 sorear afk
23:52 diakopter MINIMALLY FANCY could be made to work :)
23:52 diakopter it still needs the "tried" tracker
23:53 diakopter er, "loaded"
23:56 diakopter sorear: oh, and, I found a library to link libperl via mono into CIL code (and hence Perlesque code).  I want it to marshal handles only to Perl reference types, though, so there's no worry about memory leakages... at least, I think there wouldn't be.
23:58 diakopter sorear++ sorear++ dalek-- dalek--
23:59 pugssvn r31245 | mberends++ | [S32-io/IO-Socket-INET.t,.pl] Rakudo fudge 15 tests that alpha passes but master doesn't

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

Perl 6 | Reference Documentation | Rakudo | Niecza | Specs