»ö« | perl6.org/ | nopaste: paste.lisp.org/new/perl6 | evalbot usage: 'perl6: say 3;' or rakudo:, alpha:, pugs:, std:, or /msg p6eval perl6: ... | irclog: irc.pugscode.org/ | UTF-8 is our friend!
Set by lichtkind on 5 March 2010.
00:00 masonkramer_ joined
sorear diakopter: How do contextuals interact with one-pass parsing? sub foo() { say $*BAR; }; my int $*BAR = 1; 00:01
diakopter in perlesque they must be "declared" 00:02
(so, toplevel)
sorear so viv could take the first definition (with type), and lift it to the top of the file? 00:03
diakopter sure
sorear does perlesque still use "my" for dynamic definitions?
diakopter yes
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...)
oh
hm 00:05
diakopter thinks
00:05 Schwern joined
diakopter my brain hurts from lack of carbs, a concrete example? 00:05
a test case, I mean 00:06
sorear my %*RXparams; { temp %*RXparams; %*RXparams<i> = 1; } 00:07
diakopter I guess I don't grok "temp" yet
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
diakopter it *clones* the original?? 00:10
00:10 macdaddy joined, macdaddy is now known as Guest25365
diakopter (and how many layers deep in structured assignments does this work?) 00:10
(hopefully just one?)
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:11
00:12 yahooooo joined
diakopter Visitor99: b/c it's Not The Perl Way 00:12
00:12 Schwern left
sorear diakopter: yes, clones. just one. 00:12
diakopter sorear: WHEW
sorear: I was sweating. literally.
sorear: ok, on which container-ish types is this "temp" thing supported 00:13
sorear: btw,
sorear temp works on $ @ %
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.
sorear temp %foo copies exactly as much as %foo = %bar
you can think of temp *foo as being my *foo_SAVE = *foo; ... *foo = *foo_SAVE
diakopter oh. perlesque assignment is by reference/slot only 00:15
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:16
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
masak: wait, sorear and I were just talking about that
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 :)
masak diakopter: cool!
00:18 snarkyboojum joined
Visitor99 oh.. i see, So the {} and [] difference is for 'historical' reasons. 00:19
00:20 Schwern joined
pmichaud TimToady: ping 00:20
TimToady (and others): Could someone verify that test #2 in t/spec/S02-builtin_data_types/array.t is actually the spec we want?
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)
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.
sorear a hash container's STORE does an in-place replacement 00:22
a scalar container's STORE just does slot assignemnt
masak Visitor99: see Synopsis 9 for hash-indexing of arrays. it's quite cool.
sorear compilers are expected to know about the implementation of the standard container metaclasses and optimize a bit
diakopter sorear: excellent. thanks for the explanation :)
sorear but that's more of a p6 thing, it won't affect std too much 00:23
Visitor99 ok, thanks masak :)
sorear I was actually expecting you would have me implement contextuals in terms of temp 00:24
masak s/everyghin/everything/
00:24 eternaleye left
diakopter sorear: every assignment in perlesque is by reference 00:24
sorear since, my $*foo is like temp $g_foo = Any();
(and this is how viv/P5 implements it)
yeah, I got that 00:25
diakopter ok
the perlesque compiler injects the revert code at the end of the block
conditional on whether it was actually assigned 00:26
00:27 felipe left
diakopter (because things like "goto" can skip over the "my" assignment) 00:27
std: { goto blah; my $a = 4; blah: 1; } 00:28
p6eval std 31225: OUTPUT«===SORRY!===␤Illegally post-declared type:␤ 'blah' used at line 1␤Check failed␤FAILED 00:01 105m␤»
diakopter oh
I thought TimToady was going to allow forward-gotos :)
masak not last I heard. 00:29
diakopter 3 weeks ago?
masak hm. musta missed that one.
if you happen to find that place in the logs, I'd be much obliged.
diakopter hm; maybe it was privmsg 00:30
00:30 sorear left, diakopter sets mode: +o masak
masak changing the spec by privmsg! that's cheating. :P 00:30
diakopter hee
pmichaud did my earlier msg get lost? or nobody saw it? 00:31
00:31 masonkramer left
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
(or nobody knows the answer :-)
00:31 masonkramer joined
diakopter KLU[DG]ELESS 00:32
masak I'm surprised at that test, if it helps.
why would .item on a list produce a list?
pmichaud yeah, I think it should iterate once.
masak me too. 00:33
is there a meaningful svn-blame on that block?
pmichaud looking. 00:34
says someone named 'pmichaud' put in that line.
Hmph.
He's *clueless*.
masak heh, guess who last changed that exact line? :P
or he knows something we don't :) 00:35
00:35 sorear joined
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
2010.04.12.17.55.34 <@TimToady> goto is just a function syntactically
2010.04.12.17.55.39 <@TimToady> which is why a forward goto requires quotes
std: { goto "blah"; my $a = 4; blah: 1; }
p6eval std 31225: OUTPUT«ok 00:01 105m␤»
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 :)
masak often wishes for an automatic 'dig deeped' svn/git blame tool
r25791: Update List.item test to match spec (RT #63350), unfudge for Rakudo 00:37
masak hits that RT ticket
00:37 hudnix joined
masak well, that answers it, doesn't it? 00:39
pmichaud I now disagree with my statement in the ticket.
masak :)
pmichaud And agree with TimToady++ that @list.item should be like [@list]
masak yeah.
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
lue afk 00:44
00:44 dduncan left
pugssvn r31226 | sorear++ | [viv] Generalize tree walker to allow adding languages. Add perlesque. 00:45
00:47 whiteknight joined 00:48 patspam left 00:49 yahooooo left 00:50 yinyin joined, yahooooo joined
masak there are two return states from the fetch/build/test/install subcommands right now: success and failure. 00:52
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
is that worth having a return state for?
partial failures can have two different causes: failing tests, or dependencies failing to install.
masak decides to call it 'forced-success' 00:54
and it's a pure 'success' if the --force flag turned out not to be necessary.
sorear diakopter: How does separate compilation work in perlesque-land? 01:02
01:03 masonkramer_ left
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}␤»
masak Visitor99: and, since this is Perl 6, you can leave out the () and it still works. 01:14
Visitor99 mmmm, i know it's a detail, but i think the 'perl' output should use simple quotes instead of double quotes..
masak hm, --skip-test or --skip-tests? I seem to be fluctuating myself between the two. will have to allow both as synonyms.
01:15 Cdn joined
masak Visitor99: I see what you mean. but still, I'm curious why you think so. 01:15
Cdn Anyone here know how to setup ilbot? 01:16
Visitor99 because ' means something literal...
sorear Cdn: I imagine moritz_ would
snarkyboojum Cdn: moritz_ might :)
Visitor99 i was writing a perl6 manual in spanish 01:17
i showed it to a friend
Cdn I am reading the install, and I am a little lost
Visitor99 and he asked me why " are used in it instead of '.
masak Visitor99: I think it's unspecified. some implementations might use ", some might use '. 01:18
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}␤»
masak see? :) 01:20
Visitor99 is consistent so i guess is should not be confusing at all.. 01:21
thanks masak
and bye all!
01:21 Visitor99 left
masak a happy customer. ¡yay! 01:22
01:22 whiteknight left
snarkyboojum Cdn: you might pique someone's interest if you actually pose your question :) 01:23
Cdn I want to setup ilbot, and I am completly lost on how to install it 01:25
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 moritz.faui2k3.org/en/ilbot?
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;
p6eval std 31226: OUTPUT«===SORRY!===␤Confused at /tmp/sKVZIUmREI line 1:␤------> 1 while 1 ⏏if 1;␤Parse failed␤FAILED 00:01 107m␤»
sorear I can't have more than one postfix modifer? 01:29
masak sorear: yes, but conditional ones go inside the repetition ones.
sorear std: 1 if 1 while 1; 01:31
p6eval std 31226: OUTPUT«ok 00:01 104m␤»
sorear std: 1 if 1 while 1 while 1; 01:32
p6eval std 31226: OUTPUT«===SORRY!===␤Confused at /tmp/cHs_V6kZsG line 1:␤------> 1 if 1 while 1 ⏏while 1;␤Parse failed␤FAILED 00:01 104m␤»
sorear STD.pm6 is set up to allow up to 1 of each
masak right. I should have said *only* confitional ones go inside repetition ones. :)
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;
p6eval std 31226: OUTPUT«===SORRY!===␤Confused at /tmp/9_uPIFVQ1x line 1:␤------> 1 if 1 ⏏if 1 while 1;␤ expecting statement_mod_loop␤Parse failed␤FAILED 00:01 104m␤»
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, Visitor99 joined
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.
it's meant to be orthogonal to ordinary values, only acting as parallel things in the background. 01:39
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.
well, they do if you ask them directly, but that's about it. 01:40
rakudo: say ?( any(1,2,3) ~~ Junction )
p6eval rakudo ae1300: OUTPUT«1␤»
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
p6eval rakudo ae1300: OUTPUT«Array()␤»
Visitor99 rakudo: my $num = (1 | 2 | 3); my %hash = ('uno', 1, 'dos', 2, "tres$num", 3, '$cuatro', 4); say %hash.perl;
p6eval rakudo ae1300: OUTPUT«{"tresany(1, 2, 3)" => 3, "dos" => 2, "\$cuatro" => 4, "uno" => 1}␤»
sorear rakudo: say any(1,2,3).WHAT
p6eval rakudo ae1300: OUTPUT«Junction()␤»
sorear shouldn't WHAT autothread over the junction? 01:42
rakudo: say any(1,2,3).perl
p6eval rakudo ae1300: OUTPUT«any(1, 2, 3)␤»
sorear :/
masak sorear: I don't think so. .WHAT is a macro, not a method.
pmichaud WHAT isn't normally a ... what masak++ said
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␤»
sorear rakudo: say [1,2,3].cow
p6eval rakudo ae1300: OUTPUT«Method 'cow' not found for invocant of class 'Array'␤ in main program body at line 11:/tmp/kfNCto_FQA␤»
pmichaud even so, some methods do not autothread over junctions (such as .perl)
sorear the junction forwards an arbitrary method, the array doesn't
rakudo: [1,2,3].say 01:44
p6eval rakudo ae1300: OUTPUT«123␤»
sorear rakudo: (1|2|3).say
p6eval rakudo ae1300: OUTPUT«any(1, 2, 3)␤»
01:44 eternaleye joined 01:45 Cdn left
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. :) 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;
masak but first, sleep.
p6eval rakudo ae1300: OUTPUT«none(one(any(any(1, 2, 3)), one(any(4, 51, 6))))␤»
masak Visitor99: that's a but redundant, using both any() and infix:<|>, etc.
s/but/bit/ 01:46
Visitor99 ohh.. i see
rakudo:(one(4|51|6)).say.perl 01:47
pmichaud (need a space)
masak (and still a bit redundant)
pmichaud well, weird :-)
rakudo: (one(4|51|6)).perl.say
masak one(4, 51, 6) is fine. so is 4|51|6.
p6eval rakudo ae1300: OUTPUT«one(any(4, 51, 6))␤»
pmichaud except that 4|51|6 isn't a 'one' junction.
masak indeed not. 01:48
'night.
01:48 masak left
Visitor99 well.. thanks all... see ya ! 01:48
01:48 Visitor99 left 01:53 meppl left
pugssvn r31228 | sorear++ | [viv] Perlesque for simple integer and single-quote string literals 01:54
02:05 szabgabx_ joined 02:06 avar joined, szabgabx left
diakopter sorear: \\o// r31226 02:11
02:13 Schwern left
diakopter sorear: how do you *want* separate compilation to work? my thought is: fully-lexicalal string-eval 02:13
lexical
as opposed to perl's this-routines-locals-only lexical string eval 02:14
or javascript's always-in-the-toplevel string eval 02:15
(notwithstanding early netscape javascript where you could specify in which context to eval)
I've built the compile-time structures in perlesque such that code to reconstruct them can be baked into the target executable itself 02:16
in case the compiler needs to resume compilation at any point, it should be able to resume its context 02:17
I haven't *written* the codegen-gen required to emit such things, but it's definitely within the realm of feasible
sorear: I think I will add a p6eval target called vivsq :) 02:22
sorear I'm not completely sure what string eval has to do with separate compilation 02:32
right now, you have a bunch of .pm6 files
you run viv separately to compile each file to a .pmc file
then Perl loads multiple .pmc files at runtime to compose the execution 02:33
%Cursor:: comes from Cursor.pmc, %STD:: comes from STD.pmc, %Stash:: comes from Stash.pmc
etc
perlesque seems to require all code to be in one file, except for the BCL
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
..(System.R…
diakopter (as I said above, contextuals are currently broke) 02:37
(I'll fix soon)
afk till tomorrow 02:38
02:39 pronik` joined 02:43 pronik left 02:44 cggoebel left 02:48 Bzek joined 02:49 Bzek_ left 02:52 alester left 02:56 tedv left, colomon joined
colomon MapIter got updated! 03:09
\o/
03:10 patspam joined
pmichaud :-) 03:11
more updates are coming
colomon sweet.
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
pmichaud (looking forward to see what I've done, that is. bedtime isn't likely for a while yet) 03:12
lue "Look at what you did! You made rakudo better!" 03:14
03:19 bluescreen joined, bluescreen is now known as Guest47522
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
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; }
phenny sorear: I'll pass that on when diakopter is around.
03:25 mtnviewmark_ joined 03:26 colomon left
sorear I'm now understanding the perlesque code... it is *interesting* 03:29
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:30
03:33 colomon joined
sorear perlesque: $*FOO 03:34
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
..topLeve…
03:39 colomon left 03:41 alanhaggai joined 03:48 mtnviewmark_ is now known as mtnviewmark 03:57 jhuni joined 04:02 hercynium left
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; }
diakopter I think it's the perl 5 way 04:05
but I don't know if there's a do { } without a condition 04:06
(but there can be)
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
(.. and enough to implement all of Cursor, I mean)
04:10 szabgabx_ left
sorear Sprixel's parser generator is extremely similar to NQP-rx's 04:11
I have no doubts that it could support a Rakudo-equivalent grammar
diakopter cool
04:11 snarkyboojum left
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
..(System.R…
diakopter hee
sorear perlesque: say(say("pie"))
p6eval perlesque: OUTPUT«pie␤1␤»
sorear perlesque: say(say("pie") || say("pie"))
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[]
..arg…
diakopter interesting
oh
sorear g.AddInfixOperator("||", "LogicalOr");
?
diakopter yeah 04:13
sorear am I looking in the right place?
diakopter yes
it's not correct; I know
(let alone working) :)
let's see
sorear I'm about to change DEEP to function as a quasi-SSA representation
diakopter perlesque: say(say("pie") | say("pie")) 04:14
p6eval perlesque: OUTPUT«pie␤pie␤1␤»
sorear which will allow me to simulate short-circuiting, do-blocks, (and expressions period, for that matter)
diakopter cool
sorear perlesque: say("foo"|"bar")
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
..arg…
diakopter just remember perlesque's EXPR is ... retarded (literally, no slight intended), so wrap explicit parens
sorear "wrap"?
diakopter puts parens everywhere
put parens everywhere
it doesn't parse precedence really at all
except for incidentally due to the way the rules are laid out 04:16
mmmm ..... pie .......
perlesque: say("foo" == "bar") 04:18
p6eval perlesque: OUTPUT«False␤»
diakopter hm
oh
truthiness doesn't apply to strings
I suppose it could
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 04:21
sweet
I got Reflector to output a C# version of the perlesque parser without taking two hours of cpu
pmurias will be happy 04:22
04:24 mtnviewmark left
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:24
04:35 Guest47522 left 04:36 Schwern joined
sorear ponders writing a Perlesque->C# static compiler with a parser written using viv 04:38
04:39 JimmyZ joined
diakopter well, that's what it's doing now 04:39
just to CIL, which can be disassembled into C#
that's how I imagined bootstrapping, just ignoring the C# step 04:40
you can do multistage compilation in xbuild/.sln, I'm pretty sure
and even if you couldn't, it can be made to work
if I can ever get this to copy to clipboard, I'll show you 04:41
gtg
sorear oh. I'm apparently still not quite up to speed on this 04:43
04:44 envi^home joined 05:06 plobsing joined, agentzh joined 05:09 justatheory left 05:10 justatheory joined 05:11 justatheory left 05:15 saaki left 05:24 japhb left 05:26 saaki joined 05:33 patspam left 05:38 Visitor99 joined 05:39 orafu left 05:41 orafu joined 05:46 [particle] joined
pugssvn r31229 | sorear++ | [viv] Slightly rethink and simplify the DEEP expression handling 06:03
r31229 | [STDeco] Relax a dependency so stage2 doesn't need to be reparsed after viv changes
06:05 Entonian joined
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:08 Visitor99 left 06:15 Entonian left
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
..(System.R…
sorear perlesque: say(sub (--> int) { 2 }())
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
..(System.R…
06:16 azawawi joined
azawawi hi 06:16
sorear perlesque: sub (--> int) { 2 } 06:18
p6eval perlesque: ( no output )
sorear perlesque: sub (--> int) { 2 } ()
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
..Sp…
sorear perlesque: (sub (--> int) { 2 })()
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
..Sp…
sorear perlesque: (sub (--> int) { 2 })();
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
..Sp…
diakopter postfix () is not on every form
phenny diakopter: 06:07Z <sorear> tell diakopter - Are you familiar with the trick for parsing operator precedence with only a CFG?
diakopter maybe not 06:19
gtg again :/
sorear what do you mean not on every form 06:20
perlesque: my $K = (sub (--> int) { 2 }); $K();
p6eval perlesque: ( no output )
sorear perlesque: my $K = (sub (--> int) { 2 }); say($K());
p6eval perlesque: OUTPUT«0␤»
sorear perlesque: my $K = (sub () { 2 }); say($K());
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
..(Sys…
sorear ah, subInvocation can only use ident or simple variable 06:22
sorear decides not to try and fake do{}, but will simply generate invalid output for now 06:23
06:25 azawawi left 06:54 jhuni left 06:57 kaare joined, kaare is now known as Guest13828
pugssvn r31230 | sorear++ | [viv] Implement basic expressions for perlesque. Also, prototype the DEEP-based expression handling. 07:06
07:08 Ross joined 07:13 mmcleric joined
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.
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.
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
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
phenny sorear: I'll pass that on when diakopter is around.
jnthn morning o/ 07:22
pmichaud jnthn: good morning :) 07:23
jnthn pmichaud: Heh, somebody's up late. :-)
pmichaud: How goes list? 07:24
pmichaud it's going nicely
I have Positional now in core
(i.e., Positional.pm)
jnthn Oh, excellent.
I hoped you might do that.
pmichaud cleaned up a lot of postcircumfix:<[ ]> stuff
(and see how to make postcircumfix:<{ }> do likewise)
jnthn Makes me all the more happy that I put in the "can augment to add roles" stuff.
pmichaud me too :) 07:25
jnthn Having the assocative role in PIR was getting kinda painful. 07:26
pmichaud yes, and positional was going to be painful also :)
jnthn Yeah
Can imagine similar issues.
pmichaud anyway, I have the List class in place, it uses the new Iterators.
We're back to Array ~~ List, which is nice.
jnthn \o/ 07:27
pmichaud and .map returns a List
07:27 araujo left
jnthn Excellent. 07:27
pmichaud (instead of a MapIterator)
jnthn gather/take?
pmichaud haven't gotten to gather/take yet, but it'll be a List also.
jnthn OK, excellent.
pmichaud so far the iterators haven't been a problem -- it's cleaning up all of the other code
jnthn Seems like we're oging to stop leaking iteratorss. :-) 07:28
Yeah, can imagine there's a lot biult atop of what we already had.
Do we get through make test yet?
pmichaud oh sure, been doing that for a while
I'm in S02 tests atm
jnthn Nice :-)
pmichaud actually, the biggest problem with make test ended up being getting "use" to work 07:29
because "use" now depends on being able to iterate hashes
(where it didn't before)
jnthn ah, yes.
07:31 quester_ joined
jnthn I guess hashes are in for some tweaks too? 07:31
pmichaud yes, definitely.
more of the associative role
jnthn OK.
The signature (@index) in Positional.pm surprises me a little 07:33
(expected *@index there)
Does @a[1,2] boil down to a method call with one argument or with two? 07:34
pmichaud one.
jnthn That surprises me a little.
pmichaud I don't think that .[ ] should take arguments the same way that .( ) does. 07:35
and, more to the point, this ended up being much easier. :-)
jnthn It bites when you get onto hashes.
pmichaud and more to the more to the point, it will be easier to handle .[3;4;5]
hashes should be the same way.
(and likely will be, when I'm done) 07:36
sorear good morning pmichaud
pmichaud in fact, right now we're doing extra work to try to get hashes to work when we probably don't need to.
jnthn The problem I hit is that you in theory want to accept anything as a hash key and stringify it.
pmichaud I had the same problem with ints in .[ ] 07:37
it's pretty straightforward, actually
jnthn OK, so long as you have a solution for it.
07:37 kappa joined
pmichaud postcircumfix:<[ ]>(Int $i) { ... } 07:37
and
postcircumfix:<[ ]>($i) { self.postcircumfix:<[ ]>($i.Int) }
jnthn ah, a delegatory approach 07:38
OK, that works.
pmichaud right
which we can do now because Positional is a true role
jnthn Yes. :-)
OK, I think that'll fly.
I was trying to work it to avoid the re-dispatch, originally.
07:39 JimmyZ left
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.
pmichaud anyway, we'll do that for now and then fix it up later.
I could probably change to
postcircumfix:<[ ]>(Cool $i) { ... } 07:40
jnthn Sure. I think we may have to go to a multi-arg model to handle multi-dim stuff.
so we can have a **@index sig.
pmichaud I suspect/hope not.
jnthn But not worried about that for now.
pmichaud I'm hoping we can type-distinguish on Slicels
jnthn Oh
07:40 araujo joined
jnthn That would also work. 07:40
It's easy even.
pmichaud right
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.
But I know it's been in flux of late too :-)
pmichaud right.
07:41 foodoo joined
pmichaud anyway, single-argument seems to be (1) easier and (2) more efficient 07:41
so I'm going wit hthat.
07:42 JimmyZ joined
jnthn Yes, from what you have so far, you're going to get hits on the type-cache 07:42
So it should dispatch reasonably fast.
pmichaud also, we avoid creating and flattening slurpies.
(in the !postcircumfix:<[ ]>
jnthn Aye.
That'll also be a win.
pmichaud yes, so far I'm seeing a lot of potential wins in all of this.
jnthn :-)
pmichaud the more I write, the more I'm absolutely convinced this is the right model. 07:43
Did you happen to see my latest draft of the model (google doc)?
jnthn I didn't - I've been a bit focused in slide prep/hack meet/affordable pivo. :-)
pmichaud docs.google.com/Doc?docid=0AeZqZQ8w...&hl=en
it's actually pretty short
but so far everything has worked out great -- no major "how in the world do I get X to work?" moments 07:44
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
know off the top of your head what module is responsible for handling [ ] meta reduction? 07:46
(that's the current thing I'm having to clean up)
pmichaud guesses "metaops.pir"
jnthn metaops.pm
pmichaud ah
jnthn method reduce
er, reducewith 07:47
and sub, not method
grr, I clearly didn't visit the coffee machine enough yet today
pmichaud ah, yes, it has a gather/take
I guess I have to do that next.
jnthn a lot of tings use gather/take
pmichaud and a lot of things request direct iterators where they no longer should :) 07:48
07:49 colomon joined
quester_ rakudo: @*ARGS="--bool"; sub MAIN (Bool :$bool) {say "\$bool=$bool, ?\$bool=", ?$bool}; 07:49
p6eval rakudo ae1300: OUTPUT«$bool=1, ?$bool=1␤»
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
jnthn pmichaud: The docs look nice. :-) 07:50
*doc looks
Quite a change of model, but seems very workable.
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?
pmichaud it depends on whether $somelist[0] is writable 07:52
(which would depend on the source)
for example, ($a, 1)[0] would be writable, while ($a, 1)[1] would not 07:53
jnthn Ah, OK.
colomon pmichaud: do arrays work properly when passed as arguments now?
pmichaud the List itself is mutable in the sense that you can do shift/unshift sorts of things.
jnthn OK.
pmichaud colomon: you mean do lists passed to array parameters work properly?
jnthn That's more my question, yes.
colomon it would be easy to clean up iterator use in reducewith (for instance)
pmichaud: yes 07:54
direct iterators was always the hard way to do things....
pmichaud colomon: afaik, they do. At the moment they still tend to remember everything
but that's preferable to forgetting everything :-)
colomon that will get you a different set of errors, then. :) 07:55
07:55 mberends left
pmichaud no, remembering everything will just hold on to memory a bit longer :) 07:55
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?
colomon (building)
pmichaud sure they will, as long you don't end up iterating infinitely :)
sorear (not that we have a working infix:<:=> or anything like that)
pmichaud sorear: same before, it depends on whether $list[0] refers to a container or no. 07:57
*same as before
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....
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?
sorear I think I might mean @arr.flat
pmichaud sorear: so, something like $list = @arr.flat; $list[2] = 3;
that will likely fail
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
pmichaud so far I'm leaning towards "always a new List"
colomon: if you're wanting to do reducewith, that would be awesome
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. :)
pmichaud I don't yet need the triangle form -- just having basic reduce would be helpful
sorear std: grammar G
p6eval std 31230: OUTPUT«===SORRY!===␤Unable to parse grammar definition at /tmp/usuq6g_B7w line 1 (EOF):␤------> grammar G⏏<EOL>␤Parse failed␤FAILED 00:01 107m␤»
sorear std: grammar G;
p6eval std 31230: OUTPUT«ok 00:01 104m␤»
sorear bug? 08:02
pmichaud colomon: what I'm really trying to get working for the moment is Array.exists() 08:04
currently it depends on [&]
which depends on reduce :-)
er, currently it depends on ?&
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?
pmichaud colomon: that's how it should work, yes.
I haven't tested booleans yet.
seems to work locally.
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:06
sorear jnthn: testing compilers, duh! 08:07
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:08
anyway, I think I'm going off to sleep for a short while. 08:09
feel free to work on some of the other items; try not to go too radical in the branch just yet, though. :)
jnthn sleep well :-)
pmichaud (although I suppose I can review/revert commits easily enough if needed)
there are plenty of known (to me) holes in the implementation, so don't rely too heavily on anything there just yet :) 08:11
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 xabbu42 left
pmichaud okay, I'm gone for a while 08:11
bbl
jnthn o/
08:13 mmcleric left
colomon pmichaud: no shift yet? 08:14
no, it's there... :( 08:15
cono rakudo: enum MyDay <Sat Sun>; my $x = "today" but Sat; $x.WHAT.say 08:16
p6eval rakudo ae1300: OUTPUT«()␤»
cono is it right?
colomon > my @a = 1,2 ,3; say @a.perl; say !@a; say @a.perl 08:17
[1, 2, 3]
0
[]
is my problem...
so not enough memory there yet.
quester_ Submitted RT #75706 for [PATCH] Pass False to MAIN for negated argument --/bool, not True does False
sorear wonders how disruptive lists will be in millings
08:17 xabbu42 joined
colomon > my @a = 1,2 ,3; say @a.perl; say @a.perl 08:19
[1, 2, 3]
[]
@array.perl is broken, then.
jnthn cono: Well, sorta. :-)
cono: The ansewr should not be Str() 08:20
Because mixing in a role derives a new anonymous class.
sorear in class ''
jnthn But it probably should stringify more helpfully.
cono jnthn: with MyDay method, am i right?
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
p6eval rakudo ae1300: OUTPUT«all(all(all(1, 2), 3), 4)␤»
cono rakudo: enum MyDay <Sat Sun>; my $x = "today" but Sat; $x.MyDay.say
p6eval rakudo ae1300: OUTPUT«Method 'MyDay' not found for invocant of class ''␤ in main program body at line 11:/tmp/wC7O18xbe8␤»
pugssvn r31232 | sorear++ | [viv] Translate classes and grammars in perlesque. Admittedly not too useful without support for methods or regexes...
jnthn rakudo: enum MyDay <Sat Sun>; say Sat.WHAT
p6eval rakudo ae1300: OUTPUT«Int()␤» 08:22
jnthn Ah
Yeah, we need some special hanlding for "but enum"
colomon rakudo: say [?&] 1, 2, 3, 4
p6eval rakudo ae1300: OUTPUT«1␤»
colomon rakudo: say ([?&] 1, 2, 3, 4).WHAT
p6eval rakudo ae1300: OUTPUT«Bool()␤»
sorear What are the differences between ?&, &&, and, and andthen? 08:23
colomon ?& converts arguments to boolean and then ands them 08:24
&& does like you expect.
dunno andthen
moritz_ the difference between '&&' and 'and' is precedence, just like in Perl 5
colomon rakudo: say ([?&] 2, 2, 3, 4).perl 08:25
p6eval rakudo ae1300: OUTPUT«Bool::True␤»
colomon rakudo: say ([&&] 2, 2, 3, 4).perl
p6eval rakudo ae1300: OUTPUT«===SORRY!===␤Could not find sub &infix:<&&>␤»
sorear dunno, I grew up on C, 42 && 95 == 1 for me :)
colomon rakudo: say (2 && 2 && 3 && 4).perl
p6eval rakudo ae1300: OUTPUT«4␤»
08:29 kappa left 08:31 quester_ left
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:32
colomon pmichaud: ?@a doesn't work 08:35
seems to be always true atm
08:37 jhuni joined
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
..(System.R…
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
..TriAxis.RunSharp.Ope…
sorear perlesque: my $Afoo = list[int].new; $Afoo[532] = 52;
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
..TriAxis.RunSharp.Ope…
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
..nam…
sorear perlesque: my $Afoo = list[int].new(); $Afoo.Add(52); say($Afoo[0]);
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
..nam…
sorear perlesque: my $Afoo = List[int].new(); $Afoo.Add(52); say($Afoo[0]);
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
..nam…
sorear perlesque: my $Afoo = List[int].new(); $Afoo.Add(52); say($Afoo[1]);
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
..nam…
sorear Funny, it works fine here 08:47
colomon sorear: what does?
sorear that perlesque line
colomon ah. 08:48
08:48 Su-Shee joined
colomon > my @a; my @b = @a 08:48
Null PMC access in clone()
08:50 plobsing left 08:51 patrickas joined
patrickas hello 08:51
moritz_ hi
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.
phenny colomon: I'll pass that on when pmichaud is around.
moritz_ patrickas: aye 08:53
I broke it, actually
jnthn oh noes
moritz_: What's broke?
moritz_ jnthn: autoprinting on the REPL
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 ?
jnthn ah, so it is...
08:53 mmcleric joined
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 :-)
jnthn :-)
moritz_ which I did under the assumption that the return value of a comp unit itsn't used
jnthn moritz_: Ah, OK...
moritz_: ops. :-)
*oops
moritz_: If MAIN_HELPER returned the value, though, wouldn't that work? 08:55
moritz_ jnthn: it might... but won't it mess up sink context ? 08:56
jnthn moritz_: maybe
moritz_ I mean, is sink context propagated recursively?
patrickas yes it would
moritz_ sub f { 3 }; sub g { f }; g(); # is 3 in sink context now?
patrickas sorry answer to wrong question
moritz_ if "yes", then it might work 08:57
patrickas > our sub MAIN_HELPER {return 5;}
5
jnthn ah, yeah, I see the issue. 08:58
(with sink)
patrickas if i overwrite MAIN_HELPER on the repl, i get the return value printed fwtw
JimmyZ my friends was blocked by the examples of book, hehe 08:59
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.
sorear -> sleep
09:03 [mark] joined
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:04
based on a negotiation between avar's wishes and TheDamian defending UNIX philosphy 09:05
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:09 alanhaggai left 09:10 alanhaggai joined
hejki pastebin.org/327584 :O 09:13
09:13 moritz_ sets mode: +o patrickas
moritz_ oh wtf 09:14
hejki i'm on rakudo master 09:15
moritz_ rakudo: .say for 1.."10"
p6eval rakudo ae1300: OUTPUT«1␤»
hejki ahh
09:15 Guest25365 left
moritz_ doesn't feel right 09:16
try
sub MAIN($r as Int) { ... }
hejki [ hejki@cornix ~/ohjelmointi/perl6] $ perl6 -e 'sub MAIN($r) { "looping from 1 to $r".say;
omg.. wrong paste ;<
for 1..$r.Int -> $i { .. } works
too
pugssvn r31234 | moritz++ | [t/spec] initial tests for callframe() 09:18
cono jnthn talking :)
09:18 snarkyboojum left 09:20 foodoo left
moritz_ what is he talking about? 09:20
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 ?
moritz_ nice topic
perl --help >/dev/null; echo $?
0
perl --foobar >/dev/null; echo $? 09:22
Unrecognized switch: --foobar (-h will show valid options).
29
patrickas: yes :-)
patrickas ok so what return value should I use for non zero ? and should it be made explicit in the spec ?
moritz_ it would make sense to make it explicit, but I don't feel up that task atm 09:23
patrickas ok i'll use 29 in the mean while 09:24
dalek kudo: b931990 | moritz++ | (2 files):
try to make callframe().my.<$x> read-only

you can do to the caller's lexpad Also run new callframe.t
hejki btw.. can sub MAIN have some nice customized usage-messagE? 09:25
s/E/e/
patrickas rakudu: sub MAIN ($number) {say $number}; 09:27
rakudo: sub MAIN ($number) {say $number};
p6eval rakudo ae1300: OUTPUT«Usage:␤/tmp/aQTW436UQn number␤»
patrickas rakudo: sub MAIN ($number) {say $number}; sub USAGE {say 'This is how you do it'};
p6eval rakudo ae1300: OUTPUT«This is how you do it␤»
09:28 snarkyboojum joined 09:29 colomon left
hejki ahh nice 09:29
09:30 mberends joined, colomon joined
colomon moritz_: \o/ 09:32
moritz_ it seems that in the 'list' branch, about 1/3 to 1/2 of the tests die 09:34
sorear Is this better than what we had before? 09:35
moritz_ depends on what you mean by "before"
it's the first time I look at that branch
hejki rakudo: my $c = sub ($x) { $x.say }; $c.(2) 09:37
p6eval rakudo ae1300: OUTPUT«2␤»
hejki rakudo: my $c = sub($x) { $x.say }; $c.(2)
p6eval rakudo ae1300: OUTPUT«===SORRY!===␤Confused at line 11, near "my $c = su"␤»
moritz_ pmichaud: in 2858bbc768472851912e774209c2ad1bf55fbc32 was it deliberated that @index is not slurpy? 09:41
colomon moritz_: gather / take doesn't work yet there.
?@a and !@a don't work yet. 09:42
@a.perl and @a.join, etc, don't work right.
basically, probably 90% of things with arrays won't work at the moment.
gotta go for a few, packing car again. 09:43
09:43 colomon left
patrickas hejki: in perl6 spaces matter a bit more than perl5 09:44
hejki clearly
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
hejki i'm not complaining
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)
p6eval std 31234: OUTPUT«===SORRY!===␤Variable $x is not predeclared at /tmp/ZVAF0aqAxi line 1:␤------> my $c = sub($x⏏) { $x.say }; $c.(2)␤Word 'sub' interpreted as 'sub()' function call; please use whitespace instead of parens at /tmp/ZVAF0aqAxi line 1:␤------>
..m…
09:46 mmcleric left
Su-Shee I haven't even realize a difference until today. where are spaces different now? 09:46
moritz_ Su-Shee: mostly before parens/brackes/braces 09:48
Su-Shee oh. sometimes ignorance _is_ bliss. :) I didn't know. 09:49
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:52
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
avar I KNOW
:)
moritz_ :-)
patrickas i think compiling rakudo is what's finally going to make me upgrade my pc... 09:54
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
I have a bunch of cron jobs that do >/dev/null that break down because some program outputs non-error stuff on STDERR
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:57
moritz_ patrickas: I kinda hope avar++ was referring to the previous situation 09:58
09:58 moritz_ sets mode: +o avar
Su-Shee mberends: I just pushed the fetchrow_hashref improvements from xxx days ago and will do tests now. 09:58
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
so (current code)++
moritz_ actually it's not yet implemented 10:00
only specced
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
p6eval rakudo ae1300: OUTPUT«x is Int()␤x is Str()␤»
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
moritz_ hejki: clearly a bug
10:02 felipe joined
hejki heh.. now i clearly need to attempt a fix ;< 10:03
patrickas ok compiled , tested and pushed the STDERR issue 10:08
but did not spectest yet ... that'll take a long while (the patch is pretty simple to review though in the mean while) 10:09
github.com/patrickas/rakudo/commit/...5767021b6b 10:11
moritz_ patrickas: looks good 10:13
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:18
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
also the rw_ok check fails for classes.. :O
moritz_ patrickas: it's in nqp-rx, likely
hejki i mean.. fails as in works correctly :> 10:21
10:21 whiteknight joined 10:24 yinyin left
moritz_ fails to give you a clue? :-) 10:26
rakudo: my $x = pir::get_hll_global__pS('False'); say $x.perl 10:27
p6eval rakudo ae1300: OUTPUT«Bool::False␤»
dalek kudo: 197b4ba | (Patrick Abi Salloum)++ | src/core/MAIN.pm:
output default usage message to stderr unless --help is specified
10:33
10:45 JimmyZ left
dalek p-rx: 1a63388 | bacek++ | (2 files):
Actually provide slurp in setting library.
10:55
10:56 Ross left, colomon_web joined
colomon_web huh. 10:56
10:56 Ross joined 10:57 ggoebel joined, jedai left
colomon_web tethered, but my normal irc client doesn't want to talk to it this time. 10:57
jnthn hejki: Type constraints on attrs are NYI, but I've got some local patches that help gets us in that direction. 10:59
Have to clean up some other bits first.
11:09 jedai joined 11:14 agentzh left, mmcleric joined 11:21 mmcleric left
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
It tried myself something like
my $PROGRAM := PAST::Var.new( :scope('parameter'), :name('@_'), :slurpy(1) ); 11:24
if ( $PROGRAM[0][0] ) {...}
but it did not work because obviously I have no idea what I am doing.
jnthn I'm pretty sure checking $*PROGRAM_NAME won't be the right way. 11:27
patrickas yea i would never dare claim it is a fix ... at best a "sweeping under the rug for now" 11:28
moritz_ I've tried $mainline := PAST::Op.new(:pasttype('call'), :name('&MAIN_HELPER), $mainline ); 11:34
and then pass return MAIN_HELPER's arguments if there's no MAIN
but it dies with
Method 'set_outer' not found for invocant of class 'Parcel' in main program body at <unknown line>:CORE.setting
at run time
for something as simple as say 1
jnthn :S
moritz_ ah, that would be in YOU_ARE_HERE 11:36
PAST::Var.new( :name('mainline'), :scope('parameter') ), PAST::Op.new( :pasttype('callmethod'), :name('set_outer'),
patrickas: I fear that $*PROGRAM_NAME won't help us at all, because it is set up at run time 11:43
whereas we need to decide at compile time
patrickas ok 11:44
11:46 mmcleric joined
moritz_ jnthn: when I have a PAST data structure, can I somehow access the lexical information associated with it? 11:48
.symbol seems to be what I'm looking for 11:49
though i don't understand the business with @BLOCK at all 11:50
jnthn .symbol is only defined on PAST::Block 11:52
@BLOCK contains our block nodes.
11:52 jhuni left
jnthn @BLOCK[0] is the current one, @BLOCK[1] its outer, etc. 11:52
moritz_ it seems that $mainline in method comp_unit is a PAST::Block 11:53
so what I'm trying now is if !IN_EVAL && $mainline.symbol('&MAIN') { inject MAIN_HELER } 11:54
11:54 masak joined
masak oh hai, #perl6! 11:54
jnthn lolitsmasak! 11:55
moritz_ doesn't seem to work (never regonizes the presence of MAIN)
patrickas hello masak
masak is enjoying the third stage of the pls mini-hackathon: implementation 11:57
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␤»
masak submits rakudobug
jnthn figures that's probably similarish to the one submitted yesterday 11:59
masak probably.
rakudo: sub foo() { succeed; succeed; succeed }; say foo
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.
I'll put it as a comment to that one, then.
jnthn yeah, good to collect various cases.
masak jnthn: how's Kiev? still warm? 12:01
jnthn yes, but thankfully conference venue is air-conditioned. :-)
I gave my siggies talk.
Found some crazily cheap (compared to Sverige) pivo last night too :-) 12:02
masak not surprised it's cheaper.
probably tastes better, too. 12:03
12:04 drrho joined
drrho evaluating rakudo for a "production" site. 12:06
masak \o/
drrho: so, web stuff?
drrho "production" means "internal experimental site"
web stuff, but actually more along the lines of "semantic programming infrastructure"
kill.devc.at/node/309 12:07
masak drrho: the most elaborate example of web stuff with Perl 6 is still november-wiki.org/
12:07 cognominal joined
masak drrho: that said, we're trying to think long-term with github.com/masak/web 12:08
drrho my question is regarding the threading stuff ...
moritz_ which threading? :/ 12:09
drrho async { .... }
jnthn That's not implemented yet in Rakudo.
drrho yes, I just experimented.
what are the thoughts currently regarding this? 12:10
12:10 colomon_web left
cognominal mberends++ # speaker 12:10
jnthn++ # slides
moritz_ drrho: once we're on a VM that supports proper threading, somebody will try to implement it
cognominal chartreuse++ # fun
drrho so parrot does not support threading?
moritz_ drrho: that can either happen by parrot getting proper threads, or by porting rakudo to a different VM 12:11
drrho: not well
drrho I see.
moritz_ at least not good enough to be usable by a HLL
drrho the DSL I want to put on top of Perl6 is inherently parallel. That's why I am asking.
I am just intrigued by the Perl6 grammar stuff. 12:12
moritz_ too
masak where is the new list model doc? 12:13
jnthn pm pastd url earlier
ah, I still has a tab with it 12:14
docs.google.com/Doc?docid=0AeZqZQ8w...&hl=en
masak thankye.
cognominal jnthn, how was the ukrnian workshop?
jnthn first day (hack meet) went great 12:15
And todayu is talks day
Going well, I think. :-)
cognominal cool
and you have good wifi, unlike we ded?
*did
jnthn Yes, it's good here. 12:16
cognominal jnthn, I probably have a bug report about your stack trace :)
masak returning an empty Parcel sounds nicer than returning EMPTY. never much liked the latter.
jnthn cognominal: oh noes :-) 12:17
masak pmichaud: I likes your list model very much! 12:19
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?
cognominal I am trying to golf the bug trigger
moritz_ rakudo: sub f { }; say callframe().my.keys 12:22
p6eval rakudo 197b4b: OUTPUT«$_$/__CANDIDATE_LIST__&f$!$ss_SS_S_S__S_S_s␤»
moritz_ rakudo: sub f { }; say callframe().my.keys.join(' ')
p6eval rakudo 197b4b: OUTPUT«__CANDIDATE_LIST__ &f $! $ss_SS_S_S__S_S_s $_ $/␤»
masak feels the need for a LAST block 12:23
moritz_ that would help me too :-)
no, actually I want a LEAVE block
masak that'd be nice too. 12:24
jnthn cognominal: feel free to paste the backtrace, I maybe can guess it from that. 12:26
moritz_: They may not get an .symbol entry. 12:27
Though probably could make them do so.
12:27 Ross left
drrho A perl6 question: In perl5 there was this __END__ and __DATA__ feature. Does it exist in perl6 ? 12:28
masak drrho: S02:4103 12:29
moritz_ rakudo: sub f { }; sub f { } 12:30
p6eval rakudo 197b4b: OUTPUT«===SORRY!===␤Multiple declarations of lexical '&f'␤␤»
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 left, masonkramer_ joined, masonkramer_ is now known as masonkramer
drrho masak: thx 12:32
a question re github.com/masak/web.git : when it uses HTTP::Daemon , is it using the Perl5 or a Perl6 version? 12:33
moritz_ Perl 6
masak haven't tried that one on master.
drrho are Perl6 modules also on CPAN?
moritz_ no
proto.perl6.org
jnthn Ah
moritz_: @BLOCK[0].symbol($name, :scope('lexical') );
masak I'd recommend using Apache or equiv rather than HTTP::Daemon.
for speed, if nothing else.
moritz_ jnthn: yes, but only when certain conditions on multiness are met 12:34
jnthn I wonder if $nmae has the sigil
Su-Shee
.oO(mberends was hungry when he wrote the tests.. hot beef burrito .. select * from nom .. I can't focus.. ;)
jnthn moritz_: No, it seems to always install something for each sub. 12:35
moritz_ right
I find that routine very hard to read
and yes, name includes the sigil 12:36
jnthn $name should have the sigil on though, look at how else it's used
*by looking
masak Su-Shee: :)
moritz_ I just confirmed it with debugging output
rakudo: sub f { }; sub f { } 12:37
p6eval rakudo 197b4b: OUTPUT«===SORRY!===␤Multiple declarations of lexical '&f'␤␤»
moritz_ jnthn: why doesn't that trigger the "Can not declare only routine" error?
drrho moritz_: is using "proto.pl" the _canonical_ way to install Perl6 modules?
moritz_ drrho: it is the easist way I know of
drrho ok.
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?
now I'm confused
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 ""␤»
moritz_ jnthn: which case should trigger the "Can not declare only routine" case then?
jnthn oh, I think this code has a missing case.
moritz_ does $*MULTINESS always have a value? 12:40
jnthn No, it may be empty too
moritz_ then it should be
if !$*MULTINESS || $*MULTINESS eq 'only'
in the first line
jnthn nope 12:41
moritz_ what does empty $*MULTINESS mean?
jnthn Otherwise we get the proto foo() { ... }; sub foo($x) { ... } case wrong
moritz_ right
jnthn We're missing an if branch I suspect.
For the case where !$*MULTINESS && $symbol 12:42
That is, no multiness declarator, no proto in force and already declared.
but you can trigger all the ones that are already there. 12:43
moritz_ rakudo: sub f { }; only sub f { }
p6eval rakudo 197b4b: OUTPUT«===SORRY!===␤Can not declare only routine &f when another routine with this name was already declared at line 11, near ""␤»
masak rakudo: sub foo { !!! }; foo
p6eval rakudo 197b4b: OUTPUT«Stub code executed␤ in 'foo' at line 11:/tmp/EhFtfkLHjo␤ in main program body at line 11:/tmp/EhFtfkLHjo␤»
masak rakudo: sub foo { ... }; say foo 12:44
p6eval rakudo 197b4b: ( no output )
jnthn rakudo: say foo { ??? }
masak what should be the semantics of ...?
p6eval rakudo 197b4b: OUTPUT«Could not find sub &foo␤ in main program body at line 11:/tmp/8XrEUV4psB␤»
jnthn grr
moritz_ masak: fail()
jnthn rakudo: sub foo { ??? }; foo()
p6eval rakudo 197b4b: OUTPUT«Stub code executed at line 11:/tmp/9H3N3vNr60␤»
masak moritz_: so, in the case of say above...?
moritz_ + elsif !$*MULTINESS && $symbol {
+ unless $symbol<proto> {
+ $/.CURSOR.panic('Can not declare only routine ' ~ $name ~
+ ' when another routine with this name was already declared'
+ }
+ }
masak: should die in sink context, which is NYI 12:45
jnthn moritz_: I'd remove explicit "only" in the error there
Since the user didn't write "only"
And maybe hint that they'd like multi.
moritz_ right
jnthn +1 to such a patch if it works though 12:46
moritz_ testing now...
jnthn rakudo: class checking { method m { }; method m { } }
p6eval rakudo 197b4b: ( no output )
jnthn Bit surprised that doesn't complain already. 12:47
rakudo: class checking { method m { }; only method m { } }
p6eval rakudo 197b4b: OUTPUT«===SORRY!===␤Can not declare only method m when another method with this name was already declared at line 11, near "}"␤»
moritz_ what should complain? the meta class?
jnthn moritz_: Maybe nicer to spot it in the actions
Though I thought the meta-class caught it already too.
moritz_ > sub f { }; sub f { } 12:48
Can not declare only routine &f when another routine with this name was already declared at line 2, near ""
that's the not-yet-awesoemified error message
jnthn \o/
There's probably an RT about that. 12:49
moritz_ it is, a quite old one 12:50
masak rakudo: .say for 1.."10" # was this ever reported? 12:59
p6eval rakudo 197b4b: OUTPUT«1␤»
masak because I assume it's wrong. 13:00
Su-Shee what does that mean: Cannot take substr outside string
masak seems I recall the semantics should be to numify the rhs if the lhs is a number.
moritz_ rakudo: say 2 cmp "10"
p6eval rakudo 197b4b: OUTPUT«1␤»
masak Su-Shee: means you've found yourself a Parrot bug.
moritz_ or a rakudobug
masak well, yes. 13:01
the error is from Parrot.
Su-Shee it seems to be Test.pm related because the same db stuff works fine.
or I missed something totally simple. also possible. :) 13:02
masak time to golf, sounds like.
Su-Shee no, was mistake. fascinating. 13:07
my mistake.
13:08 felliott joined, meppl joined
moritz_ jnthn: seems the fix is not so easy... 13:13
./perl6 -e 'proto a { }; sub a { }'
===SORRY!===
Multiple declarations of lexical '&a'
because the ordinary code for adding a candidate to a proto isn't run 13:14
13:20 JimmyZ joined
masak 卓明亮! \o/ 13:20
JimmyZ ah, found by masak! 13:21
Conference Mode is enabled for this view; joins, leaves, quits and nickname changes are hidden.
you disabled it?
masak don't really know what that means. 13:22
maybe one of the IRC-savvy people here does.
pugssvn r31235 | moritz++ | [t/spec] unfudge test for $*OUT/$*ERR distinction of USAGE message
JimmyZ joins, leaves are hidden here
pugssvn r31236 | moritz++ | remove INSTALL file that now lives at github.com/audreyt/Pugs.hs/blob/master/INSTALL
r31237 | moritz++ | [util/] clean up; remove scripts that seem unused, unmaintained or undocumented
JimmyZ I don't know why, hehe 13:23
masak .oO( joins, shoots, and leaves )
13:25 synth joined
JimmyZ the Dragon Boat Festival is coming here :) 13:26
masak nice. :) we'll be having midsummer here soon. 13:30
pugssvn r31238 | moritz++ | [docs] remove outdated stuff 13:33
dalek kudo: ecacff9 | moritz++ | src/Perl6/Actions.pm:
fix REPL autoprinting by only injecting MAIN_HELPER if the scope contains a MAIN
13:34
13:37 carlin joined
carlin Hi all 13:38
masak hi, carlin
13:42 rurban joined
jnthn masak: oh noes is midsummer another time when I'll be expected to eat weird fish? :-) 13:42
moritz_: Hmm...yeah, I had a feeling it wasnt so simple. 13:43
I think I'd tried similar before...
slavik morning :D
jnthn o/ slavik
slavik is there a parrot build for arm?
moritz_ jnthn: maybe we need some kind of decision matrix 13:44
masak jnthn: yep. weird fish for midsummer; that's the rule.
jnthn looks terrified
moritz_ jnthn: it's currently close to the "doesn't fit into head" limit
jnthn moritz_: I was terrified about the fish, not the decisoin matrix. 13:45
moritz_: That's probably a good idea. :-)
masak jnthn: we could put FISH into the decision matrix; would that make it terrifying? :P
moritz_ rakudo: proto a { }; proto a { }
p6eval rakudo 197b4b: ( no output )
moritz_ shoudl that be an error? 13:46
jnthn
.oO( I'm in your decision matrix, adding fish )
masak moritz_: possibly.
moritz_ I kinda think so
jnthn yeah, that'd best whine.
though
masak two protos are a bit like two onlies.
jnthn rakudo: proto a { }; proto a { }; a()
p6eval rakudo 197b4b: ( no output )
jnthn I'm...very surprised that didn't whine.
moritz_ not, after reading the code 13:47
the source codeof Actions.pm at least
jnthn moritz_: yes, I expected Perl6MultiSub would has a sad over it though.
13:47 rurban left
jnthn oh, unless we only end up emitting one of them somehow. 13:47
13:56 JimmyZ left
masak writes his first private method in Perl 6 13:56
jnthn resists making a pun about privates 13:57
masak thank you.
all tests now pass in t/subcommands/fetch.t \o/ 14:00
jnthn masak: Which project is this? :-) 14:01
masak oh, pls!
jnthn You have a lot of them. ;-)
lol
moritz_ masak: you didn't use private methods before? 14:03
masak no; didn't have the need.
here it is: github.com/masak/proto/blob/pls/lib...Pls.pm#L71
in Lisp, it'd had been a lexically encapsulated routine instead. 14:04
moritz_ masak: you can do that too in Perl 6 :-) 14:05
masak yes :)
but I'll think I'll keep it this way.
less overall indentation, for one thing.
jnthn
.oO( masak makes marginal use of private methods )
14:06
masak :P
jnthn Ooh, in App namespace. 14:07
:-)
masak yes, trying to play really nice here.
according to CPAN rules, no less.
this one is built to *last*.
jnthn for the where at the top, does it need the { ... } around the junc/
masak: Is it actually going to be called pls? :-) 14:08
masak std: subset A of Str where "a" | "b" | "c";
p6eval std 31238: OUTPUT«ok 00:01 108m␤»
moritz_ I even think the { ... } is wrong
masak jnthn: sure!
masak removes the { ... }
jnthn moritz_: Yes, I was just wondering why it worked :-)
Or if. :-) 14:09
masak: Yay!
masak it works because return types are not checked :P
jnthn oh
Somebody should implement that. ;-)
masak ++somebody
jnthn pre-karma :-) 14:10
It worked in alpha, but the way it worked was a bit...nasty. 14:11
masak: pls can pls pre-compile modules on install? 14:13
masak jnthn: to .pir? of course.
jnthn Yes
Excellent
proto seemed to skip that. 14:14
masak jnthn: ultimately, it'll be projects' decision, of course.
jnthn I did some myself by hand
masak jnthn: but I imagine the default will be to precompile.
jnthn *nod*
It makes quite a performance difference.
14:16 macdaddy joined
masak no need to tell me that :) 14:17
14:17 macdaddy is now known as Guest3227
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++
jnthn I'm just old to *writing* Perl 6. :)
masak jnthn: actually, I'm a bit surprised that proto doesn't precompile. I'd have thought it did. 14:18
that's what the 'build' phase is for.
jnthn It precompiled itself.
Just nothing else.
masak oh :( 14:21
that's Wrong.
jnthn Disappointing output was disappointing.
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.
moritz_ I think precompilation only makes sense if rakudo doesn't pick up .pir modules that are older than .pm or .pm6 modules 14:25
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?
diakopter: 07:17Z <sorear> tell diakopter - token num { \d+ }; rule factor { <num> | '(' <expr> ')' }; rule term { <factor> [ <[ * / ]> <factor> ]* }; rule expr { <term> [ <[ + - ]> <term> ]* }
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
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)
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:30
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.
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.
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.
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.
jnthn mberends: The sekrit is out! 14:39
masak there's a sekrit?
jnthn ;-) 14:40
mberends oh! sekrits don't last long on this channel...
jnthn It's OK, I used it for my lightning talk. :-)
mberends jnthn++ 14:41
masak do tell.
jnthn pivo.jnthn.net/
masak \o/
jnthn++!
14:41 mmcleric left
masak probably mberends++ too :) 14:41
mberends I was just a beta taster ;) 14:42
jnthn Uses FakeDBI, yes.
And moritz++'s JSON::Tiny
And sorear++'s Blizkost to interface with Perl 5's CGI.pm 14:43
Though I hope to move it to use Web.pm once that runs on master. :-)
masak I'll take that as a challenge. :) 14:45
jnthn \o/
masak man, I love writing pretty code, and in Perl 6 to boot.
14:49 TiMBuS left
lue ohai 15:08
jnthn hellue
mberends huello 15:09
masak ol ue! 15:10
15:12 Ross joined, xinming_ joined
masak heh, tests really do have a way of making you see sense. 15:13
where "you" in this case means "me" :)
15:13 xinming left
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␤»
masak mberends: there's not much left of the 'transaction' criterion in pls. it'll only strictly hold inside the 'upgrade' subcommand. 15:18
mberends that's probably a good thing. less implementation pressure. 15:19
masak yes.
the transgressions always leave a project in a better state. 15:20
it feels a bit silly to reset an improvement.
jnthn transgresses for Rakudo
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.
mberends ok, so fetched === cached
masak pls core has no awareness of that place.
it knows about the state of a project, though.
yes, I suppose fetched === cached. 15:23
all states are named as the past perfect of actions now, aside from 'gone'.
hm, maybe that's a good rationale to name 'gone' 'removed'. 15:24
mberends oh, maybe 'gone' could be 'absent'
masak I like 'absent' better than 'gone'.
mberends it's not the past tense of something that was never performed
masak right. 'absent' might in effect be either 'never fetched' or 'removed'. and there's no real need to distinguish. 15:25
mberends so do all installed projects have to remain fetched? 15:26
masak in a way, installed implies fetched.
but not in any cache sense.
so I suppose it doesn't.
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.
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
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
masak I don't. I'll be happy to see proposals that do.
diakopter imho it's a crucial issue for adoption 15:30
mberends diakopter, you *do* need to remind us to think in those directions :)
masak the model is likely flexible enough to handle other other package managers.
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
mberends I'd also like to use tarball downloads via http as a distribution mechanism for non developers
diakopter and none likes files installed by installers that aren't their package managers 15:32
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
diakopter heh 15:35
masak of course.
I'm not intentionally putting in any Rakudo-specific things.
apart from workarounds, which should be impl-independent.
lue
.oO(Well, if my text editor can install plugins w/o the package manager, then we'll call rakudo a 'plugin')
15:36
15:36 wolv joined
diakopter right, but my point is that linux distributions really want to version installed .pm themselves 15:37
15:37 wolv left
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!
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
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.
jnthn o/ pm
lue good morning!
masak mornin', pm.
pmichaud ...copying an empty array?
15:38 Visitor99 joined
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:40
pmichaud my @a = @array; 15:42
Evil. 15:43
We definitely should not be making array copies in our list-processing functions.
lue I do not see the hidden evils, but can imagine bad things happening there.
jnthn end of talks day - time for noms/beer, I assume :-) 15:44
o/
lue o/ 15:45
masak jnthn++ again on pivo.jnthn.net/ 15:53
lue CPBN :) 15:54
afk 16:05
masak rakudo: class A { method foo() { say "OH HAI" } }; class B { has A $.a handles <foo> }; B.new.foo
p6eval rakudo ecacff: OUTPUT«Method 'foo' not found for invocant of class 'B'␤ in main program body at line 11:/tmp/KDSaOrwJFo␤»
masak I saw a 'handles' patch flash by on p6c, but maybe it hasn't been applied yet... 16:06
oh well, it's just sugar. :)
16:11 kfo left 16:15 tao| left
pmichaud anyone happen to know what invokes "reducewith"? 16:17
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?
masak I think so.
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.
pmichaud summons 'ack'
masak s/redice/reduce/
pmichaud I thought that reducing with non-operators was .reduce
Su-Shee mberends: I'll commit fetchrow_arrayref and fetchrow_hashref tests in common.t in an hour or so.
masak I might be wrong.
16:20 justatheory joined
mberends thanks Su-Shee, I've pulled your last commit :) 16:20
pmichaud anyway, found it in Actions.pm
Su-Shee mberends: also, I'm having an appetite for mexican food now. ;) 16:21
mberends burritos! :)
Su-Shee next time, use boring banking examples. ;) 16:22
masak .oO( the client waits in line, all the while... eating a burrito! )
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 :)
mberends: ok :)
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
I'd already realized that they help eliminate parameters, but now I'm also realizing that they help eliminate return values.
pmichaud when you recognize that dynamic variables can also be a design smell, you'll be in good shape.
masak not there yet :P 16:27
pmichaud okay, something very basic recently broke in rakudo's whitespace handling. Or I'm missing something obvious. 16:28
16:33 envi^home left
pmichaud do we no longer have a channel-targeted pastebot here? 16:35
masak correct. 16:36
16:38 carlin left 16:40 kfo joined 16:43 justatheory left, eternaleye left
masak all tests pass! pls now has 'fetch', 'build', test', and three variations of 'install'. 16:48
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... paste.lisp.org/+2DYG
m6locks masak++
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!
masak pmichaud: that one should definitely not error out.
pmichaud if I change the name of the sub to something else it works.
apparently it doesn't like 'xyz'
masak o.O 16:51
what the...
moritz_ is there a quote form beginning with x?
rakudo: Quox
p6eval rakudo ecacff: OUTPUT«===SORRY!===␤Confused at line 11, near "Quox"␤»
moritz_ same error
masak rakudo: our sub xyz($abc) { say $abc.WHAT; }; xyz(1); say "alive"
p6eval rakudo ecacff: OUTPUT«Int()␤alive␤»
16:51 szabgab joined
masak pmichaud: it only manifests in a file? 16:51
pmichaud it's also fine if there's a semicolon after the block
moritz_ rakudo: our sub xyz($abc) { say $abc.WHAT; }; xyz 1; say "alive"
p6eval rakudo ecacff: OUTPUT«Int()␤alive␤»
masak oh. 16:52
pmichaud I'm guessing it's being confused by operator x
masak rakudo: our sub xyz($abc) { say $abc.WHAT; }␤ xyz(1); say "alive"
p6eval rakudo ecacff: OUTPUT«===SORRY!===␤Confused at line 11, near "our sub xy"␤»
moritz_ rakudo: xyz
masak submits rakudobug
p6eval rakudo ecacff: OUTPUT«Could not find sub &xyz␤ in main program body at line 11:/tmp/ahh3uw3oZD␤»
pmichaud it's parsing as &infix:<x>
masak pmichaud++
pmichaud what does STD.pm have to say about it, I wonder? 16:53
I'm not sure how to get nl's into my irssi input :-|
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"␤»
moritz_ std: ␤our sub xyz($x) { say $x }␤␤xyz 3
p6eval std 31238: OUTPUT«ok 00:01 109m␤»
pmichaud rakudo: ␤our sub xyz($x) { say $x }␤␤xyz 3
p6eval rakudo ecacff: OUTPUT«===SORRY!===␤Confused at line 11, near "our sub xy"␤»
pmichaud rakudo: ␤our sub xyz($x) { say $x }␤␤+ xyz 3
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␤»
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 github.com/masak/proto/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:
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.
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..
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
masak pmichaud: what's that last evaluation?
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
masak pmichaud: where does Perl6Sub enter into it? 16:56
pmichaud masak: the + is acting like an infix:<+>
where it ought to be a prefix:<+>
masak due to the same whitespace bug?
pmichaud yes
I'm going to need to run STD on it to see how STD handles it
masak so this all goes into the same ticket?
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?
pmichaud sorear: just a sec
sorear: nopaste.snit.ch/21216 16:58
actually, it should succeed in the parse, and complain about &x not found. 16:59
anyway, I want to make sure that STD doesn't see that 'x' as &infix:<x>
(and then I'll figure out _how_ STD does it :)
diakopter std: sub xyz ($abc) { say $abc.WHAT }␤x 3 17:00
p6eval std 31238: OUTPUT«===SORRY!===␤Undeclared routine:␤ 'x' used at line 2␤Check failed␤FAILED 00:01 106m␤»
pmichaud right
so there's something missing in rakudo's close-brace handling logic again
anyway, I'll figure it out later.
hejki anything i could help with? :) 17:01
diakopter rakudo: sub xyz ($abc) { say $abc.WHAT }␤x 3; say "lived"
p6eval rakudo ecacff: OUTPUT«lived␤»
pmichaud feel free to give it a shot :-)
diakopter masak: 17:02
rakudo: our sub xyz($abc) { say $abc.WHAT; }␤ xyz(1); say "alive" # need space
p6eval rakudo ecacff: OUTPUT«===SORRY!===␤Confused at line 11, near "our sub xy"␤»
diakopter rakudo: our sub xyz ($abc) { say $abc.WHAT; }␤ xyz(1); say "alive"
p6eval rakudo ecacff: OUTPUT«===SORRY!===␤Confused at line 11, near "our sub xy"␤»
diakopter er 17:03
masak er
sorear hello diakopter
diakopter hello
pmichaud the problem is that rakudo isn't seeing the close brace as a statement-ending close brace
because the next thing that follows is seen as a valid infix
diakopter oh
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 :)
sorear svn ignores
moritz_ shouldn't it see it as statement-ending because the next thing is a newline?
pmichaud sure, but the expression parser keeps going anyway
actually, I misstated that
the close brace is indeed marking end of statement
but the expression parser is ignoring the end-of-statement condition 17:05
the expression parser thinks "aha, whitespace and an infix, I know what to do!"
(because we're in the expression parser at the time this gets parsed)
masak tricky business.
avar /w 12 17:06
masak hugs avar, good irssi user :)
sorear that's alt-w to you 17:07
pugssvn r31239 | sorear++ | [Cursor] Start a branch for implementing the DFA LTM engine 17:09
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
pmichaud moritz_: yes, I can possibly do that tomorrow. 17:11
moritz_ so that people have time to prepare answers
pmichaud so far it's just the one question about metaop helpers in the setting
moritz_ hasn't seen the question
pmichaud but I keep running into other oddities that occurred during my absence
right now &reducewith is a user-visible function in the core setting. Should it be?
i.e., is it part of the spec? 17:12
same goes for the other metaop helpers.
masak seemingly not a part of the spec.
moritz_ you mean that they are user visible?
pmichaud sure
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
that doesn't feel rightish to me.
17:14 snarkyboojum left
dalek kudo: bdbdfb2 | quester++ | src/core/MAIN.pm:
Pass False to MAIN for --/bool, not "True does False"
17:15
Visitor99 hi... when you do something like: for @array -> $value { ... }
how do you name the 'action' of naming the default variable with -> ?
moritz_ -> $value is a signature 17:16
pmichaud $value is a parameter
moritz_ so the action you mean could be "signature binding"
masak the action could be called 'signature binding', perhaps.
Visitor99 mmm ok, thanks!!
masak g'ah, moritz_ is faster :)
pmichaud or even just "binding"
i.e., $value is bound to each element of @array
masak note that the binding is readonly by default. 17:17
if you want rw, you can do '-> $value is rw', or '<-> $value'.
the latter syntax isn't implemented in Rakudo.
moritz_ but used to 17:18
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]␤»
masak \o/
17:20 constant left 17:21 constant joined, constant left, constant joined, digitalise joined
masak nom & 17:22
17:22 masak left
moritz_ sorear: 'make snaptest' dies with can't create ../stage1/STD.store: No such file or directory at ./viv line 225 17:22
make: *** [stage1/STD.store] Error 2
after checking ../Cursor.pm6
17:22 digitalise left
diakopter moritz_: when? 17:24
on p6eval?
(it worked yesterday there)
moritz_ diakopter: local rebuild 17:25
diakopter oh
moritz_ I'll git-clean -xdf and try again
sorear possibly git-svn isn't handling empty directories well 17:28
moritz_ in what way should it handle it?
sorear src/perl6 contains 3 empty directories, stage1/ stage2/ stage3/
17:28 japhb joined
sorear they are all critical 17:29
moritz_ oh
sorear by creating them?
ISTR old versions of subversion itself not being able to version a directory with no files
pmichaud could put some dummy readmes or other files in each to make them non-empty
17:29 mj41_ joined
moritz_ you're right, directories are invisible to git 17:29
usually one adds .gitignore files
pmichaud for example, stage1/README could explain what the stage1 files are, how they're produced, etc.
.gitignore works also. 17:30
pugssvn r31240 | moritz++ | [t/spec] MAIN with named and negated arguments
17:32 mj41 left, mj41_ is now known as mj41
sorear since it doesn't affect me, would you commit your favorite solution? 17:33
moritz_ yes
pugssvn r31241 | moritz++ | ensure presence of stage{1,2,3} directories with .gitignore files 17:34
17:37 patspam joined
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:39
pmichaud afk, switching locations 17:46
18:02 daleyb joined, patrickas left
moritz_ rakudo: multi x(Int $a) { say "Int $a"}; { sub x($b) { say $b }; x(3) } 18:03
p6eval rakudo ecacff: OUTPUT«3␤»
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 18:05 colomon joined
finanalyst hello. Is transliteration working? 18:07
pmichaud back
finanalyst rakudo: my $sq='abcd'; say $sq.trans('b' => 'x')
p6eval rakudo ecacff: OUTPUT«axcd␤»
finanalyst oh it works here 18:08
takadonet pmichaud: welcome back
finanalyst my $sq='abcd'; say $sq.trans(<b c d> => <x y z>)
moritz_ finanalyst: so far I've only put transliteration of literals into rakudo 18:09
rakudo: say 'abcd'.trans(['a', 'ab'] => ['X', 'XY'])
p6eval rakudo ecacff: OUTPUT«XYcd␤»
finanalyst moritz_: thanks . must have been recently as I last pull rakudo about a week ago
18:10 tedv joined
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:11 Visitor99 left
colomon pmichaud: hope last night's patches were ok. 18:15
pmichaud colomon: making a few changes. 18:16
in general, copying arrays inside of list-processing functions is a bad idea, though.
because it turns a lazy operation into an eager one.
colomon is "is copy" ok? 18:18
pmichaud nope
in general, you want to be not using "Arrays" at all.
you want to stick with lists
18:18 patspam1 joined
colomon ah 18:19
pmichaud my commits will be pushed shortly
(running a small test here)
colomon thanks 18:20
sorear TimToady: ping 18:22
TimToady: what is the purpose of %lexer_cache? Surely anything in %lexer_cache would also be in %::LEXERS 18:24
TimToady: what is the purpose of CursorBase.pmc 1940-1973? 18:25
diakopter sorear: \\\o/// I resolved the mono/.net disparity with a workaround :) 18:31
finally. 18:32
after like 40 hours of debugging over the past 2-3 weeks.
18:32 daleyb left
diakopter it took quite a long time to get a working interactive debugger environment for mono (in monodevelop 2.4b2) 18:32
18:33 snarkyboojum joined
pmichaud colomon: pushed. 18:33
colomon \o/ 18:34
Su-Shee uhm.. if I don't '' 7.90 in an array, I get 79/10 in test output.. 18:36
18:36 plobsing joined
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.
pmichaud colomon: we don't want to constraint it, no.
*constrain
[+] 3 should still call our reducewith function, and 3 is not a List
colomon but it's not an @a either, is it? 18:44
pmichaud ?
colomon e I mean
3 is not a list or an array 18:45
pmichaud .list will work on any object
3.list returns a List of one element
18:45 radu_ joined
pmichaud just like 3.map(...) is the same as 3.list.map(...) 18:45
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␤»
colomon rakudo: sub foop(@a){ say @a.perl; }; foop(3)
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␤»
colomon that's what I mean
pmichaud I don't have an @ parameter, though. 18:47
so I'm not sure what you mean :)
colomon @args, in reducewith 18:48
pmichaud I don't have an @args in reducewith
did that commit not get pushed?
pmichaud checks
right. I don't have @args in &reducewith... it's $args 18:49
dalek meta: r326 | diakopter++ | trunk/Sprixel/ (4 files):
[perlesque] fixed non-dynamic generic types, on Mono. finally. sortof a
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.
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.
*constrain
colomon on my phone, browsing is tricky :)
pmichaud ahhh, yes.
that would be tougher. :)
diakopter sorear: All tests successful. :) 18:51
phenny: tell pmurias perlesque is back to All tests successful.
phenny diakopter: I'll pass that on when pmurias is around.
diakopter phenny: tell sorear I'll dig into contextuals and then the runtime compiler api, and then string eval
phenny diakopter: I'll pass that on when sorear is around.
diakopter perlesque: my $Afoo = List[int].new(); $Afoo.Add(52); say($Afoo[0]); 18:53
p6eval perlesque: OUTPUT«52␤»
diakopter perlesquel: my $Afoo = List[int].new(); $Afoo.Add(52); say($Afoo[0]);
p6eval perlesquel: OUTPUT«52␤real 0.05␤user 0.04␤sys 0.00␤»
sorear diakopter: what is this "mono/.net disparity" you speak of? 18:54
diakopter: also, what was wrong with perlesque: earlier?
phenny sorear: 18:51Z <diakopter> tell sorear I'll dig into contextuals and then the runtime compiler api, and then string eval
diakopter perlesque: class B { method new () { } }; my $Afoo = List[B].new(); $Afoo.Add(B.new()); say($Afoo[0]);
p6eval perlesque: OUTPUT«B␤»
diakopter sorear: I was testing stuff on p6eval I think
or something
colomon pmichaud: let me know when gathere / take works again and I will have a field day fixing stuff.
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
colomon \o/
pmichaud so far I haven't gotten to a test that needs it
diakopter sorear: you said perlesque doesn't have methods..? yes it does
sorear is mono the kind of organization that actually pays attention to bug reports?
diakopter: viv --psq doesn't support methods
diakopter yes 18:56
oh
sorear that is all I meant
diakopter afk to hackhack and then $hackhack
sorear what are those? 18:57
19:05 cono left, tadzik joined
tadzik hello 19:05
moritz_ hi 19:06
tadzik p6eval: say 'Hello World'.trans('aeo' => 'AEO');
19:06 cono joined
tadzik I guess it means it does not work, hm? 19:06
too few positional arguments: 2 passed, 3 (or more) expected, says my rakudo
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
(~'Hello World').trans(...) just to see if it works 19:08
tadzik p6eval: (~'Hello World').trans('o' => '0')
pmichaud (need a 'say')
tadzik ah, sure
p6eval: say (~'Hello World').trans('o' => '0') 19:09
but same erron in my perl6
pmichaud okay, I'm not sure what the issue is, then.
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
tadzik I see 19:11
pmichaud the second will interpolate in a flattening context, the first will not.
<a b c> is really more like ('a', 'b', 'c')
tadzik and [<a b c>] is an actual array
pmichaud yes 19:12
(because of the brackets)
tadzik yeah, that's what <a b c>.perl gave me
I just didn't know why one is [] and another ()
pmichaud <a b c>.perl should give ('a', 'b', 'c')
tadzik and it gives
pmichaud (it does in my current version).
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?)
tadzik so, back to the previous one: did I find a bug and helped Perl6 development? :) 19:13
pmichaud needs reporting to RT, probably.
tadzik github?
pmichaud no, rt.perl.org
see "Reporting bugs" in the README
oh, sorry 19:14
actually, mail to [email@hidden.address] works also
(it's the canonical mechanism)
tadzik just a mail, no special magic? 19:15
moritz_ right
pmichaud no special magic. It's nice if you put [BUG] in the subject line
sorear moritz_: wikipedia has a decent GFDL one
tadzik I'll do, thanks
19:17 pronik` is now known as pronik
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␤»
..pugs: OUTPUT«*** No such method in class Array: "&key"␤ at /tmp/lSw_2S5uwg line 1, column 33-39␤»
..elf 31243: OUTPUT«Can't call method "key" on unblessed reference at (eval 125) line 4.␤ at ./elf_h line 5881␤»
radu_ does anyone know if this syntax: @a.key should work?
pmichaud .keys
but since @a is an array, you'll get 0,1 as the result
moritz_ and it would return 0, 1
radu_ i found an example that says it should iterate over the array elements and apply the key function to each element 19:20
this is not correct?
moritz_ that would be @a>>.key
pmichaud you can do it with hypers
or with map
rakudo: my @a = 'a' => 1, 'b' => 2; say @a>>.key;
p6eval rakudo bdbdfb: OUTPUT«ab␤»
radu_ aha. I knew about map, i was looking for a shorter notation :)
ok, thanks
tadzik what is >> actually?
pmichaud it's the "hyper operator"
moritz_ radu_: where did you read that?
pmichaud it turns an operator into something that works on the elements of a list 19:21
so, @a.key invokes ".key" on the array, while @a>>.key invokes .key on the elements of @a
radu_ a book i downloaded from git hub i think? I got the link from masak
masak's blog
pmichaud (and returns the results as a list)
maybe the >>'s disappeared in the html
moritz_ some of the older PDF versions had rendering issues 19:23
ouch, the HTML version is UTF-8 "challenged" 19:26
19:27 patspam left 19:30 radu_ left 19:31 alanhaggai left, alanhaggai joined
pmichaud erg, junctions no longer autothread in the list branch 19:38
*sigh*(
19:41 baest_ joined, eternaleye joined 19:42 baest left 19:51 thepm joined 19:52 thepm left
Su-Shee grr.. my passphrase is _that_ secure that I never get it right in the first place.. 19:53
19:53 finanalyst left
moritz_ style question... 19:56
I like to align = signs on consecutive lines
my $x = 3;
Su-Shee moritz_: no brown socks to black shoes. and no white tennis socks in sandals.
moritz_ my $ab = 4;
now I have a *= on one line
should I align the begin of the operators, or the = sigsn?
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
masak mmm, nom. 20:02
moritz_ ===SORRY!===
Symbol '$order' not predeclared in <anonymous>
now that is *not* helpful
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
that's plenty to go by... :)
20:04 Psyche^ joined
moritz_ problem is, the code that I've touched doesn't contain an $order variable 20:04
masak huh.
moritz_ oh wait 20:05
masak :)
moritz_ looking in the wrong file
20:08 Patterner left, Psyche^ is now known as Patterner
sorear moritz_: have you ever seen lhs2tex? 20:10
moritz_ sorear: no 20:11
rakudo: time - 3 20:14
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:15 patspam1 left
sorear moritz_: see, for instance, people.cs.uu.nl/andres/lhs2TeX-IFIP.pdf, pages 29-30 20:16
it would be really cool to have something like this for perl6... anyway it could give you ideas
lue ohai
moritz_ sorear: aye, looks cute 20:17
lue moritz_: when you see ===SORRY!===, then it doesn't give you anything else on purpose. 20:18
moritz_ lue: really? why?
"we already apologized, no need to explain anything?" 20:19
doesn't sound like something pmichaud++ or jnthn++ would put into rakudo
lue The comments say so, lemme get them 20:20
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
# back trace beyond this.
in src/Perl6/BacktracePrinter.pm
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]
rakudo: say PARSEFAIL.[!]
p6eval rakudo bdbdfb: OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<[ ]>, couldn't find final ']' at line 11␤»
lue hrm, well _now_ we have inconsistency...
moritz_ \o/ implemented adaptive step size for Math::RungeKutta 20:23
and it's actually faster than the fixed step size, though I don't compare errors yet 20:24
20:24 Visitor99 joined 20:25 snarkyboojum left
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
is it the 6 that bothers them?
lue What languages can you import code from [say libXYZZY written in C]?
in Rakudo, as of this moment. 20:27
masak: maybe it's the butterfly »ö«
masak also, I have no idea what this means: twitter.com/Speedyshady/status/16084636670 -- there are facebook puzzles that require Perl 6? 20:28
moritz_ rakudo: ++
p6eval rakudo bdbdfb: OUTPUT«===SORRY!===␤Confused at line 11, near "++"␤»
moritz_ so some syntax errors contain a line number
not as part of a backtrace, but as part of the actual error message 20:29
rakudo: $x
p6eval rakudo bdbdfb: OUTPUT«===SORRY!===␤Symbol '$x' not predeclared in <anonymous>␤»
20:29 Visitor99 left
lue [I would love for D* to accept Perl, maybe even P6] 20:29
moritz_ where does this error message come from? 20:30
lue IIE. What generates the actual error messages, mewonders.
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
lue That would explain why I've never found an error message with grep :) 20:32
20:32 Visitor99 joined
pugssvn r31244 | sorear++ | [dfa/Cursor] Code for the DFA execution kernel 20:32
lue The predeclared error comes from Compiler.pir [as given by moritz_], but the Confused at message isn't in that file. 20:34
[Curiouser and Curiouser]
moritz_ that comes from the backtrace printer
it just says ===SORRY!=== + message
and message doesn't contain a line number here 20:35
lue The actual Confused message isn't generated in BacktracePrinter.pm. 20:36
20:36 sdeseille joined
sdeseille Hello 20:36
moritz_ right. BacktracePrinter.pm doesn't generate actual mesages
mberends hi sdeseille ! 20:37
moritz_ I think I've found the problem
src/Perl6/Actions.pm line 707
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]
sdeseille hi martin
moritz_ doesn't contain a :node($/)
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. :)
moritz_ trying to fix that...
mberends sdeseille: are you still blocked on that 'malformed string' compiler error?
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
lue yay!
sdeseille can you help me ? Have you found something
mberends masak: brains and brawn, eh?
20:39 Visitor99 left
masak had to look up 'brawn' 20:40
mberends: :)
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: nopaste.snit.ch/new/perl6
Su-Shee masak: can I have brad pitts body then?
lue [ how's the thankyou core coming? :) ]
masak Su-Shee: I think you'll have to ask him yourself.
Su-Shee well he's living in berlin anyway... I'll just ring tomorrow. ;) 20:42
masak piece of cake.
20:42 Guest13828 left
lue [To keep the analogy going, ] can I see the hox genes for proto/pls/* you call $_ . 20:43
sdeseille ijust rerun compilation and tee output in file i'm waiting the end of compilation 20:44
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.
mberends
.oO( looking for a quick win )
lue [lemme guess, pls ~~ Proto v2] 20:46
moritz_ Proto.succ :-)
masak the quick win is in sight. we can probably lift over quite a bit of code.
lue: yep.
pmichaud back again
masak lue: stand by for Big Name Replacement everywhere.
lue [quick! Find cool japanese name!]
masak .oO( sosumi ) 20:47
lue You say Proto, I think Megaman :D
moritz_ masak: I HAZ MAKED YOU A WEBSIT: pls.perl6.org/
erm, at least a domain :-)
masak moritz_++ 20:48
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).
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.
Su-Shee adds "Installedness" to wikipedia.
lue It's about as real a word as Malamanteau.
pmichaud looks at the number of instances of ".iterator" in Rakudo core sources and cringes 20:50
lue
.oO(s/ProjectsState/Camels/ ?)
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.
lue: why 'Camels'? 20:51
sdeseille mberends do you need all logfile about compilation
lue I don't know, just thinking.
masak lue: I appreciate the effort.
pmichaud decides to go radical and eliminate the ones that don't make sense to him.
masak pmichaud++ 20:52
mberends masak: I think we'll also have to become aware of project versions for upgrades
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
lue Camels can be found in an Ecosystem. That's where it's coming from. 20:52
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.
tadzik hmm
masak lue: well, the things about the project states is that they can *not* be found in the ecosystem...
tadzik is there a list of some standard Perl6 modules?
sdeseille mberends ok i try
masak tadzik: pls.perl6.org/
tadzik I see that LWP::Simple port uses IO::Socket
masak \o/
lue really ought to try out this research thingy before pressing his keys :) 20:54
masak tadzik: probably from the old alpha branch.
tadzik yeah, I see
but e.g. no this IO::Socket in here
masak right. it did exist up until the January release of Rakudo.
before the Big Refactor. 20:55
mberends tadzik: I'm trying to rewrite the Socket thing atm to not use binding
tadzik so wha can one use now?
masak tadzik: there are a few options here:
tadzik: (1) use the January release of Rakudo.
tadzik: (2) change LWP::Simple to use something other than IO::Socket. 20:56
tadzik: (3) port IO::Socket from alpha to Rakudo master.
moritz_ (3) is best :-)
tadzik (:
lue [ In ascending order of prefferedness :) ] 20:57
sdeseille mberends all log is here nopaste.snit.ch/21219 20:58
mberends looks
masak I actually don't believe in (2) at all. don't know what 'something other' would be, really.
moritz_ sdeseille: pelase try building rakudo and parrot in a directory whose name is made entirely of ASCII characters 20:59
-rpath=/home/sdeseille/Téléchargements/rakudo-2010.05/parrot/blib/lib 21:00
mberends moritz_++
moritz_ it might not like the Téléchargements
sdeseille ok
i try
pmichaud and if it doesn't... feel free to file a rakudo bug :)
sdeseille ;)
moritz_ and if it does... feel free to file a parrot bug
dalek kudo: 33948ca | moritz++ | src/core/RangeIter.pm:
hide sub RangeIterCmp from userland
21:01
kudo: 1345a33 | moritz++ | src/Perl6/Actions.pm:
variables should now where they come from
moritz_ pmichaud: I've just pushed a patch that adds :node($/) to make_variable
pmichaud moritz_: +1
moritz_ pmichaud: and the PAST output confirms that a variable now has pos associated with it
but
./perl6 -e '$x'
===SORRY!===
Symbol '$x' not predeclared in <anonymous>
still doesn't pick up the line number
any ideas? 21:02
pmichaud right, that's a PAST issue. We can probably improve PAST::Compiler.panic to provide that information.
sdeseille new try pending ... 21:03
i'll keep you inform about the result 21:04
sorear what kind of idea is hiding the backtrace anyway 21:05
pmichaud ..backtrace? 21:06
there's not really a backtrace for that error message
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 )
pmichaud this is a compile-time error, not a runtime error.
the backtrace code handles runtime errors. 21:08
21:08 masonkramer_ joined
masak I'm not seeing long backtraces for compile-time errors anymore either. 21:08
pmichaud hmmm, that seems odd-ish.
masak confirms 21:09
rakudo: class A { has a syntax error! }
p6eval rakudo bdbdfb: OUTPUT«===SORRY!===␤Malformed has at line 11, near "a syntax e"␤»
masak no backtrace.
pmichaud I'm not really looking forward to trying to figure out where Junctions have failed. :-(
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:10 PacoLinux left
sdeseille and the winner is ...... mberends !! 21:11
masak \o/ 21:12
mberends no, sdeseille, you win, thanks to the eagle eyes of moritz_++ :-)
sdeseille the next step is to use 'make' to build rakudo like mentioned by output ?
mberends yes 21:13
sdeseille ok
pmichaud a-ha!
21:14 Su-Shee left
pmichaud looks like any() is eating up all of the values of its slurpy. 21:14
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:15
lue masak: can you direct to some information on proto, namely what the Ecosystem and ProjectsState is? 21:17
masak lue: I can tell you briefly. 21:18
lue: the Ecosystem is basically what you see on proto.perl6.org
i.e. the collection of all known projects, and at least enough information to find their source.
for github, 'enough information' is project name and project owner. 21:19
21:19 Ross left
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
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.
lue That's what I thought, a sort of "status report" for what's on [or not on] your computer. 21:22
sdeseille All tests successful. Result: PASS 21:24
mberends sdeseille++ # installing Rakudo on Debian Testing
sdeseille yes
mberends sdeseille: now to write your killer app ;-) 21:25
sdeseille where can i find some documentation about syntaxe for begining ? 21:26
mberends all sorts of links from perl6.org
21:27 Meldrake_ joined
mberends excellent tutorial at perlgeek.de/en/article/5-to-6 21:27
sdeseille ok it work : sdeseille@scube:~/rakudo/rakudo-2010.05$ ./perl6 -e 'say "hello world"'
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:28
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␤»
lue I knew it was futile, but I still had to see.
masak lue: a bit quixotic in our attempts, are we? :)
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?
there's plenty that can be explored inside the bounds of the currently possible.
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.
lue [that's the cool way to set up any computer's memory map, like the NES.] 21:31
masak: doth it matter what kind? I could start with text game.
mberends er, 'sudo ln -s ~/rakudo/rakudo-2010.05/perl6 /usr/local/bin/rakudo'
masak lue: let your imagination flow free!
but yes, I had a text game in mind. no need to get overly fancy. 21:32
sdeseille ok mberends i do it now 21:34
lue masak: Just wondering, how is Buf coming along? 21:35
masak lue: I hope to get a report in before I go to bed. it's coming along well. 21:36
21:36 tadzik left
masak the Parrot people have been very forthcoming in their assistance. 21:36
and jnthn++ too.
21:37 lue left
masak so I'm actually slightly ahead schedule right now. 21:37
s/ahead/ahead of/
21:37 lue joined
sdeseille it's done 21:37
21:38 [[mark]] joined
lue that's good 21:38
[or rather, sounds good :)]
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:39
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 :)
masak and the good news is that I get to use jnthn++'s nested signatures! \o/
21:41 [mark] left
masak lue: binary files are about a month away according to the schedule: gist.github.com/360097 21:41
but we'll get there.
lue D: Ah well, Binary file manipulation isn't necessary for me until := also works :=) 21:42
masak lue: := works in Yapsi. :) 21:43
lue alpha: my $a = 2; my $b := $a; $b = 3; say $a 21:44
p6eval alpha 30e0ed: OUTPUT«3␤»
lue seems to work everywhere except rakudo/master :)
sorear right
21:44 colomon left
sorear rakudo/master is still reeling from February 21:44
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.
sorear yea 21:46
is it not wonderful?
masak feels pretty nice, yes.
sdeseille good night bye 21:47
lue goodnight o/
masak bye good night!
21:47 sdeseille left
mberends bonne nuit sdeseille ! 21:47
ETOOLATE
lue Regular commiters should go +1 after Tuesday :) 21:48
masak why does it feel right to use the :$name syntactic sugar for named arguments, but wrong to use them when building hashes? 21:54
pmichaud binding "works" in the non-rakudo cases only for limited cases of binding, though. :) 21:55
I can make a cheating form of binding for Rakudo that will have the same holes as alpha. :-) 21:56
masak I actually don't use binding that much. 21:57
it creates action-at-a-distance, which isn't good for code readability. 21:58
pmichaud okay, I figured out why junctions are failing... it's not junctions. 21:59
fixing.
21:59 ruoso left
masak none(@junctions) eq 'failing' 21:59
22:01 Visitor99 joined 22:08 dual left 22:14 patrickas joined
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:14
for one, $/[] is not recognized but $/[0] works instead 22:15
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␤»
masak submits rakudobug
mberends++
what's $/[] ? 22:17
mberends it was the list from [ (\d+) ]+ in a pattern 22:18
moritz_ should be the same as $/.list, no?
masak huh.
moritz_ a "zen slice"
masak rakudo: sub foo(Hash $x) {}; foo {}
mberends moritz_: I'll try that as well after rebuilding, it looks prettier :)
p6eval rakudo bdbdfb: ( no output )
moritz_ rakudo: my @a = 3, 4, 5; say "things in @a[]" 22:19
p6eval rakudo bdbdfb: OUTPUT«things in 3 4 5␤»
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?
masak moritz_: I've seen zen slices elsewhere, but not in the context of $/, which isn't really an array.
moritz_ masak: yes, it's more like a Capture, but it should still do Positional
masak patrickas: you're expecting something of junctions for which they were never intended.
patrickas: it's something of a phase; we all go through it. 22:20
moritz_ masak: and since $/[0] works, why shouldn't $/[] work?
masak patrickas: you want something more like what nothingmuch++ talked about once.
moritz_: true enough.
mberends $/.list also works, moritz_++
patrickas heheh ... I guess so
pmichaud I suspect $/[] doesn't work due to all of the other list issues I'm now currently correcting. 22:21
I can't tell you how many things dealing with arrays and lists are currently wrong in Rakudo master. 22:22
(...but it's a huge amount.)
moritz_ rakudo: Match ~~ Positional
p6eval rakudo bdbdfb: ( no output )
moritz_ rakudo: say Match ~~ Positional
p6eval rakudo bdbdfb: OUTPUT«0␤»
moritz_ that's one of the problems
pmichaud I think that's fixed in my list branch.
if not, it's trivially fixable now.
moritz_ cool
masak patrickas: ah! found it! blog.woobling.org/2009/08/abstracti...guity.html
Google++ 22:23
moritz_ pmichaud: how far along is the list branch?
pmichaud depends on how one measures it, I suppose.
I have lists and iterators working.
moritz_ what about arrays?
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.
Sure, arrays work.
They're just special types of lists.
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 {}
p6eval rakudo bdbdfb: ( no output )
pmichaud More to the point, I just changed their parent from Seq to List and everything pretty much worked.
masak rakudo: sub foo($x where Hash) {}; foo {}; say "alive"
p6eval rakudo bdbdfb: OUTPUT«alive␤»
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␤»
masak ah. there it is.
sorear pmichaud: What is Seq in the new world order?
pmichaud sorear: currently, it's gone.
masak good.
pmichaud sorear: as in, quite literally gone. I removed it from the branch about an hour ago.
If Seq comes back, it will be as an auto-flattening form of List. 22:26
masak rakudo: subset A of Array; say [] ~~ A
p6eval rakudo bdbdfb: OUTPUT«1␤»
masak rakudo: subset A of Array; say {} ~~ A
p6eval rakudo bdbdfb: OUTPUT«0␤»
pmichaud (i.e., Seq will be a flattening form of List, and Array will be a special form of Seq)
besides, Seq was too easily confusable with &infix:<Seq> :-) 22:27
sorear what does that do?
sorear abandons the goal of bug-compatibility with the old STD LTM engine
moritz_ sequential equality testing
pmichaud that's meta-S plus &infix:<eq>
patrickas moritz_: THanks I guess I'll have to stick to my solution then :-)
dalek kudo: fca899b | moritz++ | docs/ChangeLog:
add MAIN to ChangeLog
22:28
moritz_ patrickas: context?
oh, did you mean masak?
masak probably. 22:29
patrickas moritz_: I read this norvig.com/sudoku.html and I thought ... junctions!
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
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.
pmichaud (and smartmatches)
masak oh, and... yes.
pmichaud i.e., anywhere that Matcher is accepted. :-)
masak where clauses.
moritz_ masak: passing them around can also be beneficial, like passing them to grep() 22:32
22:32 dual joined
patrickas Oh well ... i guess I'll just have to try and fail then :-) 22:32
moritz_ so, not only syntactc sugar
masak moritz_: if you say so. :) I've never written a grep, so I don't know.
22:35 masonkramer_ left
moritz_ rakudo: say(2.3, 5, 6).grep: Int & *%2 22:38
p6eval rakudo bdbdfb: OUTPUT«2.356␤»
moritz_ rakudo: say (2.3, 5, 6).grep: Int & *%2
p6eval rakudo bdbdfb: OUTPUT«5␤»
lue the current revision number looks... interesting (bdbdfb) 22:40
22:42 jhuni joined
masak does #bdbdfb look... baige? :) 22:42
masak hides
lue s/baige/beige/ 22:43
masak lue: blog.xkcd.com/2010/05/03/color-survey-results/ 22:44
lue fushia...fuschia...grr. :)
I remember reading that. I love the long answers near the end :) 22:45
[that's an interesting IRC script for your client; when rakudo is commited to, change the background color of your IRC] 22:46
22:47 hercynium joined
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!
diakopter heh
moritz_ (like, fudge the rest for now :)
diakopter "every commit a release"
mberends yes, I was thinking of fudging, we started out with only 3 tests :) 22:58
23:00 skangas left
masak because I am not in the least tired, lol I blogged! use.perl.org/~masak/journal/40392 23:00
I think I'll merge, too, before hitting the sack.
lue :D masak++ 23:02
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?) :)
masak the Institute for Interreligious Dialogue? 23:05
lue Infinite Improbability Drive.
.oO(1:1. I have reached normality)
masak for a while, I thought you meant Iterative Incremental Development.
dalek meta: r327 | diakopter++ | trunk/Sprixel/ (4 files):
[perlesque] re-fix contextuals; add some tests for them
23:06 xomas_ joined
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
diakopter masak: do you want a yapsi p6eval target? 23:07
23:07 masonkramer joined
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.
sorear vipsq: say 2+2
masak diakopter: eventually, yes. you sound like you're about to add it now. :)
sorear vivsq: say 2+2
diakopter heh
I didn't add it
masak diakopter: Yapsi runs on alpha att the moment.
diakopter oh
I think we have an alpha install 23:08
still
masak how can we not? we have an alpha target.
sorear alpha: my $a := 1; say $a
p6eval alpha 30e0ed: OUTPUT«1␤»
diakopter yep
dalek kudo: 7d80cd4 | masak++ | (4 files):
[Buf] switched from ByteView to ByteBuffer

figure out how to handle encodings besides UTF-8, though. One of the tests wants to decode using iso-8859-1.
diakopter sorear: contextuals in fact don't get to have a type annotation 23:09
and must be assigned an initializer on first sight
as I discovered
masak there. now I don't have to feel ashamed about the discrepancy between the spectest fudgings and Rakudo master. :)
diakopter I remembered why I did that
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?
diakopter then you have to give it type Object
sorear how?
diakopter perlesque: my $*a = Object.new();
p6eval perlesque: ( no output )
diakopter System.Object 23:11
base class for all reference types
sorear ...what kind of class hierarchy has Object as an instantiatable type
diakopter :)
sorear I thought that was what "abstract" was for
perl6: Mu.new
p6eval pugs: OUTPUT«*** No such subroutine: "&Mu"␤ at /tmp/i3jtHw1SUF line 1, column 1 - line 2, column 1␤»
..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␤»
..rakudo fca899: ( no output )
sorear perl6: Any.new 23:12
p6eval elf 31244, pugs, rakudo fca899: ( no output )
diakopter perlesque: my $*a = Object.new(); say($*a)
p6eval perlesque: OUTPUT«System.Object␤»
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.
not sure Smalltalk even has the concept of abstract classes.
diakopter javascript's type system is not user-extensible 23:13
or stated another way, like perl, it has two layers of type systems
masak oh?
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 ..
the test script creates the perlesque.exe 23:15
23:15 japhb left
diakopter feel free to create a Makefile :) 23:15
sorear I don't have any .so files 23:16
23:16 japhb joined
diakopter k 23:16
.so files are created by mono's "aot" (ahead of time) compiler (to machine code)
sorear I love how fast xbuild is
diakopter but for perlesque it very much pessimizes it
because of the tens of thousands of labels/gotos 23:17
sorear because sprixel generates a single function for the entire grammar graph?
diakopter yup
I need to change that.
sorear what goes into Sprixel.exe? 23:18
diakopter to improve the startup time
that's the first stage
sorear all of the .cs files in the entire source tree?
diakopter yes
sorear 75,000 loc in 2 seconds
I am very impressed
diakopter mostly it's transliterating (mono's gmcs) 23:19
C# to CIL is very much 1:1
very close, anyway
it's the JIT that does the real work
upon every invocation
sorear yeah, I forget how fast dumb compilers can be
sorear is suddenly reminded of that tcc demo where they built Linux 2.4.something in 15s 23:20
23:21 japhb left
diakopter well, let me amend my statement "C# to CIL is very much 1:1" 23:21
most compilations from C# to CIL are reversible by good disassemblers
I mean, it's going from an expression language with several namespace depths to a stack language with several namespace depths 23:22
dalek ok: 625e409 | (Nikolai Prokoschenko)++ | src/basics.pod:
fix typo: s/hyphen/apostrophe/
ok: 2cbe38d | (Nikolai Prokoschenko)++ | src/ (4 files):
Normalize prepended whitespace in verbatim sections

for those verbatim environments, which is probably good, right? ;)
sorear Files=20, Tests=0, 2 wallclock secs ( 0.18 usr 0.05 sys + 0.32 cusr 0.20 csys = 0.75 CPU)
Result: FAIL
diakopter aww
sorear lots of ../../t/p6capture.t ........... Cannot open assembly 'perlesque.exe': No such file or directory. 23:23
diakopter oh
23:23 japhb joined
diakopter you have to be in the root dir 23:23
I mean
in the Sprixel/ dir, to run that script 23:24
it assumes, anyway.
sorear that's what I did
diakopter feel free to change/fix that
oh
sorear the actual problem is that...oh right
I have a commit bit
diakopter what'd I do wrong? :) 23:25
23:25 rgrau joined
sorear mono bin/Release/Sprixel.exe creates ./perlesque.exe 23:25
after the cd, it needs to run ../../perlesque.exe
not perlesque.exe 23:26
diakopter oh
in that case, it needs to cd into bin/Release first 23:27
sorear ok
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?
diakopter yes
see AssemblyGen.cs Complete()
sorear asmbly_1.exe is avoidable once we're doing production, good
diakopter er, Save() I mean 23:30
masak mberends: hm, that's actually a tricky one. 23:31
diakopter Initialize() in that file will need to much more heavily parameterized
masak std: class A {}; A.new( method=>'GET' )
p6eval std 31244: OUTPUT«ok 00:01 108m␤»
diakopter sorear: here are my thoughts on separate compilation: 23:32
masak mberends: looks like master is wrong there, yes.
mberends masak: I've just renamed method -> request_method to avoid that fight
masak mberends: workaround is to not use a bareword there :)
or that :)
mberends masak: what would the bareword-free syntax be?
masak "method" => "GET", for example. 23:33
or :method<GET>
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?
masak std: %<method get>
p6eval std 31244: OUTPUT«ok 00:01 105m␤»
mberends masak: oh, right. I'd rather use one of those :)
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?
diakopter yes
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.
mberends: rt.perl.org/rt3/Ticket/Display.html?id=75694
dalek meta: r328 | stefa...@cox.net++ | trunk/Sprixel/run_tests.sh:
Fix directory assignment in run_tests
mberends masak: ok, tomorrow. I'll append to the same one. I've got work to do on HTTP::Daemon right now.
masak fairy nuff. 23:36
sorear hmm. dalek doesn't know about using AUTHORS data for svn commits?
23:37 snarkyboojum joined
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:37
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. :)
diakopter sorear: or
sorear I'm not following; why do we need to care about what other modules have been loaded?
diakopter some hash of the concatenation of the hashes of all the file paths+contents
sorear Does .NET not support loading assemblies in any order? 23:39
diakopter b/c previously loaded modules can affect the parse/compilation
and so a source file could be parsed differently
depending on what was loaded formerly
dalek meta: r329 | stefa...@cox.net++ | trunk/Makefile:
Add a simple Makefile for new users
23:40
diakopter but no, a .net assembly can't be loaded before its assemblies.. but the loader does try to resolve them 23:41
and they are strongly bound (with cryptographic sigs and such)
sorear "an assembly can'tbe loaded before its assemblies" "strongly bound with sigs" I need some jargon explained here
"resolve"
diakopter oops
before its dependencies, I meant
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
yeah, I suppose :)
sorear use BAREWORD -> parses the contents of the file and inserts the resulting statementlist into the current block
diakopter it'll take some work to make the parsers re-entrant-ish 23:43
oh
or that
well yeah
that.
sorear actually, not quite
that has a diamond problem
masak 'night 23:44
diakopter nite
23:44 masak left
diakopter the tried/trying filepaths can be tracked 23:44
and not duped
we can just declare that only the toplevel can "use"
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:48
MEDIUM FANCY: 'use' actually recursively parses the file, and injects statements, not characters 23:49
MAXIMUM FANCY: A subset of the Perl 6 module system
sorear studies what options .NET has for assemblies and what all this loader jargon means 23:50
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
afk
diakopter MINIMALLY FANCY could be made to work :) 23:52
it still needs the "tried" tracker
er, "loaded" 23:53
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:56
sorear++ sorear++ dalek-- dalek-- 23:58
pugssvn r31245 | mberends++ | [S32-io/IO-Socket-INET.t,.pl] Rakudo fudge 15 tests that alpha passes but master doesn't 23:59