pugscode.org/ planetsix.perl.org/ | nopaste: sial.org/pbot/perl6 | evalbot: perl6: say 3; (or rakudo:, pugs:, elf:, etc) | irclog: irc.pugscode.org/ | ~330 days 'til Xmas
Set by mncharity on 25 January 2009.
00:00 vixey left 00:20 kid51 joined 00:31 spx2 joined 00:44 jferrero left 00:53 legis joined 00:56 mtnviewmark left 01:07 mtnviewmark joined 01:11 kanru joined 01:12 mncharity left 01:13 wknight8111 left, wknight8111 joined
jhuni rakudo: given 'asdf' { print; } 01:16
p6eval rakudo 36011: OUTPUT«print requires an argument at line 1, near "; }"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
jhuni pugs: given 'asdf' { print; }
p6eval pugs: RESULT«Bool::True»
jhuni pugs: given 'asdf' { print $_; } 01:17
p6eval pugs: OUTPUT«asdf»
jhuni ...
avar pugs: given 'asdf' { .print; } 01:19
p6eval pugs: OUTPUT«asdf»
avar jhuni: that's the perl6 way to do it 01:20
jhuni oh
sorry
avar Perl 6 accepts your apology 01:21
01:21 icwiener joined
jhuni thank you 01:21
avar :)
jhuni lol 01:22
01:27 wknight8111 left 01:42 alester joined
pugs_svn r25030 | putter++ | [elfparse] Continued adding STD.pm idiom support, and unpodding std.pm. 01:45
01:46 mtnviewmark left 01:54 shinobi-cl joined
TimToady @tell mncharity I'm going to be checking in a change that may break emitters based on STD. A) list assoc defaults to right assoc on operator change (incl : vs ,) and B) arglists that allow semicolon use semiarglist wrapper now 01:54
lambdabot Consider it noted.
TimToady @tell pmurias I'm going to be checking in a change that may break emitters based on STD. A) list assoc defaults to right assoc on operator change (incl : vs ,) and B) arglists that allow semicolon use semiarglist wrapper now 01:55
lambdabot Consider it noted.
02:02 shinobi-cl left 02:05 shinobi-cl joined
shinobi-cl perl6: given 02:13
p6eval pugs: OUTPUT«*** ␤ Unexpected end of input␤ expecting "=" or expression␤ at /tmp/PFWgiLwjBj line 2, column 1␤»
..elf 25030: OUTPUT«Undefined subroutine &GLOBAL::given called at (eval 119) line 3.␤ at ./elf_h line 4333␤»
..rakudo 36011: OUTPUT«Could not find non-existent sub given␤current instr.: '_block14' pc 53 (EVAL_16:38)␤»
02:17 Eevee left 02:19 Eevee joined 02:26 shinobi-cl left 02:27 shinobi-cl joined
kid51 nods at #perl6 and gives him a small kipper 02:27
02:28 Sepheebear joined 02:30 kid51 left 02:33 ruoso left 02:40 mtnviewmark joined 03:00 mtnviewmark left 03:27 shinobi-cl left 03:31 rhr left 03:44 agentzh left 03:51 shinobi-cl joined
pugs_svn r25031 | lwall++ | [STD, S03] more operator alignment and cleanup 04:06
04:07 gravity left 04:13 REPLeffect left 04:16 rhr joined 04:17 ruoso joined 04:29 icwiener left 04:38 REPLeffect joined 04:40 shinobi-cl left 04:46 justatheory left 05:09 ruoso left
frew how do I find out the class of something in perl6? 05:09
05:09 [particle] left
frew Also, I did a svn up && make realclean && perl Configure.pl && perl Make.PL && make && cd lang/perl6 && make spectest and all of the tests still fail for me 05:13
saying no plan found in TAP output
05:13 [particle] joined 05:24 ruoso joined 05:26 masak joined 05:30 AzureStone left 05:32 justatheory joined 05:44 meppl joined, ruoso left 06:00 |jedai| left, |jedai| joined 06:03 justatheory left 06:23 Khisanth left 06:24 DemoFreak joined 06:25 _jedai_ joined 06:26 |jedai| left 06:30 Khisanth joined 06:33 mtnviewmark joined 06:34 kisu_ joined 06:37 ashizawa joined 06:45 kisu left 06:52 mtnviewmark left
frew I have this in a test file: sub l ($a) { my StrLen $l = StrLen.new($a); return $len }; and I get a huge error but it seems the salient part is Scope not found for PAST::Var '$len' in l. What gives? 06:53
masak frew: do you declare $len? 06:54
anyway, you shouldn't get that error. 06:55
rakudo: sub l($a) { my StrLen $l = StrLen.new($a); return $len }; say l("OH HAI")
p6eval rakudo 36017: OUTPUT«Scope not found for PAST::Var '$l' in l␤current instr.: 'parrot;PCT;HLLCompiler;panic' pc 146 (src/PCT/HLLCompiler.pir:102)␤»
masak curious error. 06:56
the $l is right there. :)
rakudo: my $a = "a"; say "a" ~~ /$a/ 06:57
p6eval rakudo 36017: OUTPUT«Null PMC access in get_string()␤current instr.: 'parrot;PGE;Grammar;' pc 249 (EVAL_17:107)␤»
masak submits rakudobug
06:58 araujo left
masak rakudo: my $a = /a/; say "a" ~~ /$a/ 06:58
p6eval rakudo 36017: OUTPUT«Null PMC access in get_string()␤current instr.: 'parrot;PGE;Grammar;' pc 394 (EVAL_17:165)␤»
07:05 _jedai_ left, |jedai| joined 07:12 araujo joined
masak don't we have tests for this? :/ 07:12
moritz_ masak: say() is undertested, due to TAP's nature 07:13
masak moritz_: is the error in say()?
moritz_ dunno
masak I thought it was the variable interpolation in the regex.
moritz_: good morning, btw. 07:14
moritz_ did that ever work?
masak maybe not.
07:14 aindilis` left, aindilis` joined
masak but why shouldn't it? 07:22
by which I mean, I keep wanting that functionality to be there. :) 07:23
moritz_ PGE limitation, I guess :/
masak oh, but pmichaud has a PGE safari pending, ISTR.
maybe it'll get fixed then.
buubot: spack StrLen 07:24
buubot masak: S02-bits.pod:4 S29-functions.pod:1
pugs_svn r25032 | lwall++ | [STD] improved error messages on prec errors, misplaced invocant colons 07:27
r25032 | lwall++ | [syntax.t] string can't end $s!"
07:30 araujo left 07:31 araujo joined
pugs_svn r25033 | lwall++ | [STD] make stupid special case normal 07:53
07:54 Tene_ joined 07:55 kanru left 07:56 Tene left
pugs_svn r25034 | lwall++ | [binding-scalars.t] can't use 'and' to mean tighter than comma 08:01
08:02 iblechbot joined 08:05 _jedai_ joined 08:06 |jedai| left 08:08 pbuetow joined
pugs_svn r25035 | masak++ | [u4x] fixed typo in README 08:19
r25036 | masak++ | [u4x] added TODO with an enumeration of everything to be documented 08:20
r25037 | masak++ | [u4x] added reference to TODO in README 08:21
r25038 | masak++ | [u4x] added a few cultural terms TODO items -- I'm sure there are more 08:25
08:26 _jedai_ left 08:27 |jedai| joined
pugs_svn r25039 | lwall++ | [STD] allow whitespace at end of semiarglist 08:34
08:42 ruoso joined 08:50 aindilis` left, aindilis` joined
masak rakudo: my $a if 0; say $a 08:55
p6eval rakudo 36019: OUTPUT«Null PMC access in isa()␤current instr.: 'parrot;List;!flatten' pc 5804 (src/classes/List.pir:287)␤»
masak mwhahaha.
masak submits rakudobug
Matt-W eep 08:58
masak Matt-W: :)
Matt-W although 08:59
what should it do?
undefined variable?
masak Matt-W: it should throw a compiler error, IMHO.
moritz_ no, it's fine
my() has a compile-time effect
masak oh, ok. 09:00
moritz_ which is scoped to the block
no block => the variable persists to the end of the current scope
masak so the 'if 0' is just a no-op.
moritz_ I think so, yes
Matt-W that's...
weird
attaching conditionals as statement modifiers to declarations is bound to make a mess, but I wouldn't expect them to be ignored
moritz_ std: my $x if 0; 09:01
p6eval std 25039: OUTPUT«00:05 83m␤»
masak rakudo: my $a = 5; my $a = $a + 1 for ^10; say $a; 09:02
p6eval rakudo 36019: OUTPUT«Redeclaration of variable $a␤»
09:03 schmalbe joined
masak what? no answer? 09:03
moritz_ sh: line 1: 3464 Bus error
masak on my box, I get the warning and 15.
moritz_ rakudo: my $a = $a + 1 for ^10; say $a;
p6eval rakudo 36019: OUTPUT«Use of uninitialized value␤Use of uninitialized value␤Use of uninitialized value␤Use of uninitialized value␤Use of uninitialized value␤Use of uninitialized value␤Use of uninitialized value␤Use of uninitialized value␤Use of uninitialized value␤Use of uninitialized value␤Lexical 09:04
..'$...
masak haha
it's a bit inconsistent that 'my .. for' loops but 'my .. if 0' doesn't ignore.
rakudo: my $a = 42 for (); say $a 09:05
p6eval rakudo 36019: OUTPUT«Lexical '$a' not found␤current instr.: '_block14' pc 141 (EVAL_17:67)␤»
jhuni There is no elements so that block never happened
masak jhuni: what block? 09:06
Matt-W Following consequences here, if I were to say ".do_something() for @things;" would $_ be the last element of @things when the next line executed?
jhuni {my $a = 42}
moritz_ jhuni: the declaration should happen at compile-time, the 'my' statement doesn't have to "run"
jhuni: and there's no implicit block around the my either
(that's different from perl 5) 09:07
masak jhuni: if it really were a block, the $a wouldn't be visible outside.
the other examples show that it is.
Matt-W So I guess the conditional only really applies to any initialisation which might happen - the variable itself should get declared regardless 09:11
masak aye.
moritz_ Matt-W: that's my understanding, yes 09:12
Matt-W okay
09:14 ruoso left 09:17 ruoso joined 09:24 jferrero joined, jhuni left 09:29 aindilis` left 09:30 aindilis` joined 09:42 zamolxes left 10:00 ejs1 joined 10:02 legis_ joined 10:05 |jedai| left 10:06 |jedai| joined 10:08 legis left 10:09 ejs1 left, ejs1 joined 10:10 zamolxes joined
masak rakudo: role A { my $.a = 42 }; class B does A {}; say B.a 10:14
p6eval rakudo 36019: OUTPUT«Use of uninitialized value␤␤»
masak should that work?
moritz_ rakudo: role A { my $.a = 42 }; class B does A {}; say B.b 10:15
p6eval rakudo 36019: OUTPUT«Could not locate a method 'b' to invoke on class 'B'.␤current instr.: 'die' pc 16767 (src/builtins/control.pir:204)␤»
masak .b ? 10:16
moritz_ rakudo: role A { my $.a = 42; method b { $.a = 23 } }; class B does A {}; my $x = B.new; $x.b; say $x.a 10:17
p6eval rakudo 36019: OUTPUT«Cannot assign to readonly variable.␤current instr.: 'die' pc 16767 (src/builtins/control.pir:204)␤»
moritz_ rakudo: role A { my $.a = 42; method b { $!a = 23 } }; class B does A {}; my $x = B.new; $x.b; say $x.a
p6eval rakudo 36019: OUTPUT«No such attribute '$!a'␤current instr.: 'parrot;A[];b' pc 357 (EVAL_20:131)␤»
moritz_ rakudo: role A { my $.a = 42; method b { $a = 23 } }; class B does A {}; my $x = B.new; $x.b; say $x.a
p6eval rakudo 36019: OUTPUT«Scope not found for PAST::Var '$a' in b␤current instr.: 'parrot;PCT;HLLCompiler;panic' pc 146 (src/PCT/HLLCompiler.pir:102)␤»
moritz_ so how should I set $.a?
masak don't ask me!
I just find silly examples, I don't have any answers... 10:18
10:19 elmex left
literal moritz_: what do you use to highlight Perl 6 code in your blog posts? 10:26
moritz_ literal: Text::VimColor and perl6.vim 10:27
literal ok, cool
10:27 ruoso left
literal thought the highlighting looked familiar :P 10:27
I see you've made smart links stand out in the comments though 10:31
moritz_ didn't do anything :-) 10:32
10:33 kanru joined
masak rakudo: say * ~~ 1 10:36
p6eval rakudo 36019: OUTPUT«Use of uninitialized value␤0␤»
masak whence the warning?
10:36 braceta joined
moritz_ * is undef 10:37
and since the RHS is an Int, it uses == for comparison
masak ah.
masak closes yet another RT ticket
moritz_ rakudo: say 1 ~~ *
p6eval rakudo 36019: OUTPUT«1␤»
literal moritz_: hm, really? I wonder why the smartlinks look different then 10:40
ah, I didn't notice that they were in a pod block 10:41
moritz_ claims innocence on the whole charge 10:44
but at least now I know that some people read my blog :-) 10:45
(actually I wrote it in reply to a question per mail on how and why to move tests)
rakudo: say 700/30 10:46
p6eval rakudo 36020: OUTPUT«23.3333333333333␤»
moritz_ I did some statistics about rakudo's progress since Mai 2008 (start of spectest-progress.csv)...
and it made an average progress of 23 tests passing per day, or 700 per month 10:47
masak 23 tests per day doesn't sound too bad. 10:48
moritz_ no, it'll be hard to keep up the progress
2/3 of the test suite are migrated, and writing new tests is much more time-consuming than migrating 10:49
masak we need more test writers.
moritz_ aye
masak it's a fairly parallelizable task.
moritz_ but it also requires some fair Perl 6 knowledge
masak we need to educate people, then. :) 10:50
rakudo: ("bac" ~~ /a/).WHAT
p6eval rakudo 36020: RESULT«Match»
masak closes yet another ticket
seems many tickets were fixed but not closed. 10:51
moritz_ aye
pmichaud mentioned that in a recent design minutes thing
my last pass over the RT revealed about 4 such tickets
but it wasn't very thorough
masak I'm just picking things at random, testing them and closing them. 10:52
I think I've done 7 already.
moritz_ masak++
masak moritz_: did you see today's TODO file addition in u4x? 10:54
moritz_ masak: no
masak I basically combed STD.pm and wrote stuff down.
I'm sure there are obvious omissions.
feel free to add them if you see them. 10:55
planning what to do takes much less effort than actually doing it. :P
moritz_ :-)
masak: have you reached any decision wrt markup format?
masak moritz_: Perl 6 Pod, I think. 10:56
using as much of its inherent capabilities as possible.
moritz_ masak: without any further additions? (like tags)
masak moritz_: still undecided.
I'll have to play around with it a bit first.
but I'm leaning towards as little of that as possible.
literal markup format for what? 10:57
Matt-W Perl 6 POD seems the way to go to me
masak literal: use.perl.org/~masak/journal/38279
Matt-W Just have to learn it...
masak Matt-W: lesson one: it's "Pod", not "POD" :) 10:58
Matt-W okay
masak (see S26.)
Matt-W I've not read S26 for a while
Still at least 30% in Perl 5 land
10:58 spx2 left 10:59 spx2 joined
literal any news on when/if Damian submit his radical changes to S26? 10:59
masak not that I know of. 11:00
literal I really like Perl 6 Pod as it is, but I could see the usefulness of Python-like docstrings and such, which I think was one of the things he was going to add 11:01
masak that was the critique he got on his first draft, at least.
I'm content as long as tools can connect Pod with a class or a method. 11:02
Matt-W yes that would help
Perl 5's wasn't very good for documenting code really 11:03
moritz_ Perl 5 subs/methods don't have signatures, so there was no point in including the declaration in the code
literal It was very good for user documentation, which I think is slightly more important. Reading javadoc and things like that which have all these code-hooks is horrible, the docs are like they were written for a machine. 11:04
Matt-W javadoc is great for API documentation 11:05
moritz_ and when I started to write Perl 6 class with documetation, and I found myself repeating the signature in the Pod, so I wrote a mail that started an whole avalanche of threds
literal where Perl 5 was lacking in that regard, you could just look at the code :P
Matt-W but you can't really use it for anythign else
moritz_ Matt-W: aye
Matt-W the ideal system would give you javadoc's API documenting capabilities (or better, preferably better) and also nice prose documentation for doing things like writing Programming Perl 6 11:06
literal it would be best if Perl could write most of the javadoc-like stuff for you, now that we have these nice sub/method signatures n' all
Matt-W well all we should need to provide are human-readable descriptions of what the routine is for and anything necessary about the parameters 11:08
and side effects, return values etc.
11:09 ruoso joined 11:13 elmex joined 11:16 spx2 left
pugs_svn r25040 | hinrik++ | [util/perl6.vim] highlight two more functions 11:19
11:20 |jedai| left, |jedai| joined 11:22 spx2 joined 11:38 ashizawa left 11:51 Eevee left
masak moritz_: I'm planning to revisit that thread, but I don't really know what you envision. it would be interesting to see an example. 12:07
12:17 mncharity joined
mncharity TimToady: re "checking in a change that may break emitters", very no problem. Don't ever want elf to interfere with STD work. 12:20
lambdabot mncharity: You have 1 new message. '/msg lambdabot @messages' to read it.
moritz_ masak: I don't envision something in particular. I just want to use my signatures in both code and Pod as easy as possible 12:23
masak moritz_: I'm just curious what you think would be an improvement over just listing your parameters. 12:25
mncharity: hello!
moritz_ masak: not duplicating anything (because duplication is the enemy of the programmer) 12:26
pugs_svn r25041 | putter++ | [STD.pm] When parsing $0 et al, capture the index. 12:29
mncharity masak: hi
masak moritz_: exactly. and how are you going to pull off that. how will you identify the parameters if you don't repeat their names. 12:31
mncharity TimToady: re $<index> , feel free to rename, punt, whatever. It seemed likely to be a ~zero performance hit for gimme5, and made the elf node processing very slightly less ugly.
masak mncharity: how's elf doing these days?
mncharity slowly learning to parse/AST->IR/run STD.pm. 12:32
moritz_ masak: one approach would be something like =take :upto< { >\n method foo ($bar, :$baz) { ... }
masak: that would tell the Pod parser to include everything up to the next { as Pod, and the compiler will still take it as code
masak moritz_: ah, I understand what you want to do now. 12:33
you simply want the param list in the code to be included in the Pod output.
moritz_ right.
masak you don't want to mention it explicitly in the Pod itself. 12:34
moritz_ same for attributes, since they generate public accessors
masak moritz_: I agree completely. S26 should mention this. 12:37
I don't think anything complicated is called for.
moritz_ Mark Overmeer seemed to think differently 12:38
masak just output the method signature/attribute in all its glory.
moritz_: ISTR, yes.
will re-read.
12:38 rindolf joined
masak did Kwid disappear entirely? 12:45
moritz_ thinks so 12:48
masak pity. 12:49
12:55 aindilis` left 12:56 aindilis` joined 12:59 AzureStone joined
pugs_svn r25042 | putter++ | [elfparse] Added <?{ }> and $0. Now more tolerant of untagged AST nodes (for $<foo>=[]'s). Not synced with current STD.pm. 13:00
mncharity g'day all &
13:00 mncharity left
masak moritz_: in the meantime, why not just use an appropriate symbol in Pod, akin to {*}, as a placeholder saying 'this is where I'd like the method signature to be'? 13:15
grassroots standardization. "we didn't have time to let the big guys settle on a format, so we made this in the meantime." 13:19
13:21 pmurias joined
pmurias ruoso: hi 13:21
lambdabot pmurias: You have 4 new messages. '/msg lambdabot @messages' to read them.
13:30 ruoso left 13:38 bacek left
Matt-W * sigh * another person who thinks Perl 6.0.0 will postdate the heat death of the universe 13:47
13:48 pmurias left
masak Matt-W: some people think that. there's not much to do about that. except perhaps submitting bugs/patches/tests, writing scripts and generally thinking about Perl 6. 13:55
Matt-W yes
masak it doesn't help against complainers, but it does help in getting Perl 6 ready for Christmas. 13:56
Matt-W from where I sit, it looks like things are moving nicely towards that magical moment
but I guess if people aren't paying attention it looks like nothing's happening 13:57
moritz_ I know I'm not the brightest optimist, but I don't think we'll see feature complete Perl 6 release this year. 13:58
but I strongly believe that rakudo will be *very* useful *this* christmas
masak me too. 14:00
it's very useful today.
Matt-W oh I wouldn't say this year
next year maybe, but this year would be very optimistic
maybe if somebody donated ten million dollars to fund full-time developers
masak I'm not sure we'll have macros this year. 14:01
Matt-W (no I don't have ten million dollars lying around)
masak the other stuff... probably.
Matt-W macros are hard
masak let's go shopping!
Matt-W buy chocolate 14:05
moritz_ chocolate - good idea :-)
14:11 bacek joined 14:20 schmalbe left 14:21 ruoso joined 14:22 ejs1 left 14:37 Exodist joined
masak rakudo: ord(""); say "Alive" 14:37
p6eval rakudo 36030: OUTPUT«Cannot get character of empty string␤current instr.: 'parrot;Any;ord' pc 14758 (src/builtins/any-str.pir:1198)␤»
masak should Rakudo really die here? 14:38
masak thinks not
moritz_ I think it should fail() 14:39
masak meaning what? that it should stop execution? 14:40
S29 doesn't mention this case AFAICS.
[particle] return a Failure
see what perl 5 does
masak good. we agree.
masak submits rakudobug
[particle] you could submit a rakudopatch 14:41
it's not hard to fix this
masak [particle]: I believe you. however, I get more done this way.
pasteling "masak" at 130.238.45.242 pasted "I'm at a loss for how to trawl this Match object for information. Could someone help?" (15 lines, 533B) at sial.org/pbot/34713 14:52
moritz_ `say "b ", $<coords><col_letter>; 14:55
masak: is there any hidden difficulty somewhere?
masak no :/
I just suck at this.
and I think I suffer from the lack of feedback from the Match object. 14:56
moritz_: anyway, your suggestion doesn't work in my code.
PerlJam Match objects still don't have .perl methods do they?
masak PerlJam: no. :/ 14:57
they are like little puzzles of their own.
pasteling "moritz_" at 132.187.31.74 pasted "for masak: works for me" (13 lines, 307B) at sial.org/pbot/34714 14:58
moritz_ in the first case you create a match object belowe $<coords>, in the second case an array 14:59
PerlJam masak: you could implement .perl on Match :-)
masak PerlJam: I 'should' do a lot of things. 15:00
moritz_: works for me too, but not in the sub where I need to use it.
masak goes back to reason with Rakudo
moritz_ you can get rid of the $<coords> prefix with $/ := $<coords> (at least it worked last time I tried) 15:01
masak moritz_: would <.coords> in the original regex have the same effect? 15:02
oh, nvm.
moritz_ masak: no, that wouldn't capture it at all
masak that would just no register anything, would it?
right.
it's starting to work now. :) 15:03
and the code actually becomes more readable, compared to the substr calls that were there before. 15:04
(Perl 6 regexes)++
15:05 thei0s joined
masak huh. it works, but it's inexplicably slow and I introduced an off-by-one error somewhere. 15:10
me--
15:11 schmalbe joined
thei0s perl6: token AA { 'aa' }; say ( 'abaaba' ~~ AA ) ?? "match" !! "no match"; 15:13
p6eval elf 25042: OUTPUT«Unknown rule: infix:conditional␤It needs to be added to ast_handlers.␤ at ./elf_h line 2036␤»
..pugs: OUTPUT«*** No compatible multi variant found: "&AA"␤ at /tmp/YIQA7HDreH line 1, column 26-41␤»
..rakudo 36031: OUTPUT«too few arguments passed (0) - 2 params expected␤current instr.: 'AA' pc 122 (EVAL_16:60)␤»
thei0s did the syntax for using grammars, rules and tokens change since rakudo 0.8.1? 15:14
masak thei0s: 'abaaba' ~~ /<AA>/, not AA
thei0s: yes, the syntax you used has been deprecated for a long time.
thei0s so, for grammars then: ~~ /<GRAMMARNAME::AA>/ ? 15:15
masak 'xactly.
thei0s 10x
masak yw.
moritz_ rakudo: grammar A { token TOP { ^ (a)(b) $ };}; my $m = A.parse('ab'); say $m.what; say $m.[1]; 15:16
p6eval rakudo 36032: OUTPUT«Method 'what' not found for invocant of class 'A'␤current instr.: 'parrot;P6metaclass;dispatch' pc 287 (src/classes/ClassHOW.pir:145)␤»
moritz_ rakudo: grammar A { token TOP { ^ (a)(b) $ };}; my $m = A.parse('ab'); say $m.WHAT say $m.[1];
p6eval rakudo 36032: OUTPUT«Statement not terminated properly at line 1, near "say $m.[1]"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
moritz_ rakudo: grammar A { token TOP { ^ (a)(b) $ };}; my $m = A.parse('ab'); say $m.WHAT; say $m.[1];
p6eval rakudo 36032: OUTPUT«A␤b␤»
moritz_ so I can access the captures, but .WHAT says it's an A? 15:17
masak does '0 <= $row & $column < $size' DWIM? 15:18
15:19 finanalyst joined
moritz_ depends on WYM :-) 15:19
it's a Junction
masak I want to check whether $row and $column are within bounds.
should I put a ?() around it, p'haps?
it's the expression in a statement-ending unless :) 15:20
moritz_ why not just use && ?
masak moritz_: that was my first thought. 15:21
I'll do that.
just got curious whether this also works.
moritz_ but unless() provides boolean context, so it should also work with a junction
masak aye.
gotta go.
15:21 finanalyst left, masak left 15:22 finanalyst joined 15:26 spx2 left
thei0s is there a way to dump a Match object? in rakudo 0.8.1 $/.perl did the trick, but now it's not defined anymore (Method 'perl' not found for invocant of class 'Match') 15:26
(I mean for debugging purposes)
moritz_ thei0s: no way atm :(
patches very welcome 15:27
thei0s porting the old buggy Match .perl method from 0.8.1 wouldn't be a good patch, would it? :) 15:29
15:31 spx2 joined
thei0s anyway... a sub in perl6 for printing only lists and hashes shouldn't be a problem and would allow debugging of Match objects... hm, lets write it 15:32
finanalyst moritz_ on tests. from your sun blog, do i take it that reviewed tests are deleted from t/ ? 15:35
moritz_ finanalyst: they are moved to t/spec/
finanalyst: that implies deleting them, and recreating somewhere else 15:36
finanalyst thought so, but just checking
to try this process, do I need a comit bit?
moritz_ thei0s: emitting somethign like Match.new (from => $num, to => $num, named_captures => %hash, position_captures => @list, text => string)... 15:37
thei0s: ... would be immensly helpful
finanalyst: yes. Just /msg me your email address and desired nick, and you can get one.
finanalyst moritz_: just sent a /msg to moritz_. did u receive? 15:39
moritz_ yes, just a sec 15:41
ok, mail sent, you should test your commit bit by adding yourself to the AUTHORS file 15:42
15:42 |jedai| left 15:56 frodwith joined
thei0s moritz_: it seems that there is a runtime parrot Data::Dumper module in development (or maybe I don't know how to use it)... anyway: the Match object imports PGE/Dumper.pir and there are various dump methods available, dump_str() seems like the thing I was looking for 15:58
moritz_ thei0s: if you could send in a patch that makes that available from within perl 6, that would be really great 15:59
thei0s it already works in rakudo 0.9.0 -- just use: $/.dump_str()
15:59 eternaleye left
moritz_ rakudo: ("a" ~~ m/(.)/).dump_str() 15:59
p6eval rakudo 36033: RESULT«": <a \@ 0> 0\n[0]: <a \@ 0> 0\n"» 16:00
16:10 Eevee joined
pugs_svn r25043 | finanalyst++ | added self to authors 16:12
16:13 pjcj left, pjcj joined 16:16 pjcj left, stephenlb joined, pjcj joined
finanalyst moritz_: looking at caller.t. found these lines# caller exposes a bug in the MMD mechanism where directy using autogenerated 16:17
# accessors on an object returned by a factory, rather than storing the object
# in an intermediate variable, works only when you chain methods with an
# explicit () between them: caller().subname - ok; caller.subname - error.
16:17 vixey joined
finanalyst presumably these comments need removing? 16:17
or are they pugs related and so there should be a fudge #?pugs directive? 16:18
16:20 avarab joined, avar left 16:35 mtnviewmark joined 16:43 icwiener joined
TimToady rakudo: my $x = ord(""); say "Alive" 16:57
p6eval rakudo 36035: OUTPUT«Cannot get character of empty string␤current instr.: 'parrot;Any;ord' pc 14758 (src/builtins/any-str.pir:1198)␤»
TimToady okay, a Failure should die in void context, but it's dying even when assigned, so a real bug 16:58
mtnviewmark because the failure should be captured into the assigned variable -- and only manifest when that variable' 16:59
when that variable's value is used?
TimToady yes, or when it's thrown away
mtnviewmark if manifests on being thrown away? or just evaporates?
TimToady and void context throws it away immediately
yes, end of block throws it, in theory 17:00
when $x disappears
but after the say-alive
I believe that's how it's currently specced
mtnviewmark My language Wheat had error values like this -- we found it useful that as further operations on the value that were in contexts where the error didn't manifest, that the error value should "accumulate" information about where it was again used... sort of keeping track of "insult after injury" 17:01
btw I applied all changes from the latest STD.pm back to the chart: nor more \ operator, moved ff and fff and friends back to Conditional (but that does make them associative, which seems odd...) 17:02
TimToady yes, that's the intent, more or less, except we just up and throw the exception at certain times, I think
the ff move is more to allow && and || on either side
mtnviewmark I'm almost done with the chart -- any major changes planned for operators or STD.pm expected in the next week or two?
TimToady I never know when major changes are about to happen :) 17:03
mtnviewmark :-O
TimToady I delegate planning to other people :)
mtnviewmark though, now that ff is associative... you can write something like /abc/ ff /def/ ff /ghi/
but I have no idea what that might mean.... 17:04
TimToady you can, but it doesn't really do what you mean, unless you think very oddly
mtnviewmark thank goodness you don't deal with physical artifacts... they tend to have harder time requirements! :-)
TimToady because of the implied negative on the 2nd arg
mtnviewmark right - the second argument to the first ff is not a very useful value 17:05
17:05 aindilis` left
TimToady but it's also there because it's an operator that has implicit thunks that only get run part of the time 17:05
mtnviewmark right - I see how they are VERY like ?? and !! 17:06
TimToady basically ??!! with a state variable
mtnviewmark (on the chart they are humerously called the Ambivalents)
TimToady you note that list assoc are now right assoc when operator changes?
mtnviewmark er - yes- they are no listed as Infix, Right assoc 17:07
er *now
TimToady so $a : $b , $c turns into $a : ($b , $c)
and it seems to map better onto Lisp S-Exprs :) 17:08
likewise @a X @b Y @c is now @a X (@b Y @c)
mtnviewmark Yes - I saw that in the STD.pm -- but, that piece of info isn't on the chart -- though I suppose I could add it 17:09
TimToady but it was mainly the invocant colon that drove the issue
17:09 aindilis` joined
TimToady one of those "major changes" I didn't see coming at all :/ 17:09
PerlJam TimToady: humans are better at recognizing patterns than they are at predicting or creating patterns. 17:10
:-)
TimToady and we now think of a && b && c as a && (b && c)
17:11 hercynium joined
TimToady when you think about it, right associativity fits better with list processing left-to-right 17:11
[particle] $head, @tail 17:12
mtnviewmark odd observation: in Haskell, right associative list operations are generally more efficient than left: foldr is to be preferred over foldl 17:13
TimToady which means that [op] really wants to like right-assoc operators 17:15
I must have been living an unexamined life to think that left associativity was somehow "better" :)
mtnviewmark as in [+] @a minmax @b minmax @c 17:16
TimToady but I think I compartmentalize my Lisp knowledge in a giant pair of parentheses...
mtnviewmark: I don't see where associativity makes any difference to that 17:17
mtnviewmark if only keyboards had giant (and medium, and normal, and tiny) pairs of parenthesis
it would make lnaguage design SO much simpler
TimToady the minmaxes will be tighter than the [+] 17:18
yes, you don't know how hard it's been to keep non-Latin-1 brackets out of standard p6...
17:19 justatheory joined
mtnviewmark hmmm.... there is only one infix at the same level as [op] -- list =, so how can assoc. matter to it? 17:19
in every language design I've ever done.... lack of brackets has always been a constraint -- I blame Gauss -- since he stole the parenthesis for function arguments 17:20
TimToady I just didn't know why you said [+] @a minmax @b minmax @c 17:21
mtnviewmark I wasn't thinking.... I was trying to come up with an example where "[op] really wants to like right-assoc operators" was evident 17:23
17:26 avarab is now known as avar 17:38 kisu joined 17:54 kisu_ left 18:11 zamolxes_ joined 18:12 meppuru joined, meppl left 18:26 schmalbe left 18:27 zamolxes left 18:30 rindolf left 18:34 frodwith left, frodwith joined 18:41 Exodist left 18:43 Psyche^ joined 18:44 icwiener left 18:46 icwiener joined 18:55 Patterner left, Psyche^ is now known as Patterner 19:10 spx2 left
pugs_svn r25044 | lwall++ | [S02] clarify that .perl always represents an object as an item 19:12
19:15 spx2 joined 19:16 spx2 left 19:21 spx2 joined, spx2 left, zamolxes_ left 19:23 iblechbot left 19:27 spx2 joined 19:28 spx2 left 19:33 spx2 joined 19:34 Caelum left 19:43 kisu_ joined 19:58 rob joined, rob is now known as Guest21634 19:59 kisu left, braceta left 20:11 mberends joined, jan_ left 20:16 Ehtyar left 20:22 jan_ joined, alester left 20:25 kisu joined, PZt joined 20:26 kisu_ left 20:29 aindilis` left 20:33 aindilis joined 20:36 Tene joined 20:37 tigreton joined
tigreton hi 20:37
20:47 Tene_ left 21:01 ruoso left 21:14 finanalyst left 21:15 mberends left 21:20 mberends joined
moritz_ hi 21:24
TimToady: t/regex/from_perl6_rules/properties.t assumes that Unicode properties like Perl 5's \p{L} are spelled <isL> or <isLetter> etc. in Perl 6 - is that still valid? 21:31
PerlJam moritz_: the only place they're mentioned that I can see is in S05:1628-1632 21:39
so, I assume that means it's still valid
21:45 jferrero left 21:47 ejs joined
moritz_ PerlJam++ 21:49
TimToady haven't seen any reason to change that 22:04
moritz_ so it's <isL> or <letter>, but not <Letter>, right? 22:05
TimToady don't want to collide with other user-defined assertions
so a prefix of some sort is good
possibly <uniL> or <uniLetter> would be better, but also worse :)
moritz_ I think the is-prefix isn't bad when used as rule, but looks weird in combined char classes 22:06
ie <+isL+isDigit> 22:07
TimToady well, common ones like <digit> and <alpha> we presumably have in short form already 22:10
pugs_svn r25045 | moritz++ | [t] move properties.t (Unicode props) to spec/
TimToady well, if we stick with uppercase for Unicode, we can probably rely on that not conflicting with user-defined things that are typically lowercase 22:11
so <L> and <Letter> are probably okay
unless we start using typenames as assertions... 22:12
course, if we were of the typical standards mindset we'd make it <Unicode_Character_Property_Letter> or some such 22:13
moritz_ omg
TimToady why string two nouns together when you can string four or eight... 22:14
moritz_ s/_/-/g
TimToady hmm, that's a problem with the +/- notation
moritz_ that's bad
because it means that we don't allow all identifiers in regex names
TimToady alternately, require whitespace in <+Letter -Greek> 22:15
moritz_ maybe all combined character classes should start with + or -?
TimToady I'll let you retract that :) 22:16
moritz_ follows the wise man's advise ;-) 22:17
22:18 spx2 left, iblechbot joined
moritz_ can we assume that regex/p6regex/p6regex.t is obsoleted by spec/S05-mass/rx.t? 22:19
TimToady ENOKLOO 22:20
looks like /<+foo -bar>/ parses okay, though the tree loses the '-' somewhere 22:21
but /<+foo-bar>/ does parse it with foo-bar as the identifier...
pugs_svn r25046 | moritz++ | [t] moved named_chars.t to spec/ 22:23
meppuru good night
22:24 spx2 joined 22:25 meppuru left
moritz_ rakudo: "\n" ~~ m/\c[LINE FEED (LF)]/ 22:26
p6eval rakudo 36039: OUTPUT«perl6regex parse error: Alphanumeric metacharacters are reserved at offset 11, found 'c'␤current instr.: 'parrot;PGE;Perl6Regex;parse_error' pc 10167 (compilers/pge/PGE/Perl6Regex.pir:1219)␤»
22:26 ejs left 22:27 Guest21634 left
moritz_ TimToady: \c and \C aren't mentioned in S05, but they could easily be defined in analogy to \x and \X 22:27
(and I promise, I'll stop bother you after this one for today ;-) 22:28
TimToady \c and \C are defined in S02 22:31
since \c is useful outside of regexen
moritz_ ah, ok
pugs_svn r25047 | moritz++ | [t/spec] smartlink for named-chars.t 22:33
22:40 silug left
mtnviewmark likes requiring whitespace for <+Letter -Greek> 22:47
mtnviewmark (mostly because he likes Unicode-Character-Property-Letter)
23:01 ruoso joined
ruoso HellO! 23:02
mberends wonders whether Nordic Perl Workshop will consider his just submitted very very late Pod 6 talk proposal 23:13
tigreton bye 23:15
23:15 tigreton left 23:25 spx2 left, spx2 joined 23:31 kanru left 23:33 Amateurbr joined
Amateurbr Can't locate Config/File.pm 23:33
how to fix it?
23:36 Amateurbr left 23:45 iblechbot left 23:49 pbuetow left 23:59 vixey left