Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2008-12-12

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:04 * jnthn got a nice bit of thinking, planning and scribbling done on various things he needs to implement for his grant done today.
00:05 jnthn Maybe we get some code tomorrow too. :)
00:05 Leon_ That would be nice
00:11 jnthn @tell TimToady I'm interested in working to get together a draft on S14. A lot of it seems it will involve moving stuff from other areas of the synopses to there. Are you (a) interested in me working on this, and if so (b) would you prefer me to just copy and reference stuff from other synopses so we can remove it from them later, or just to move stuff?
00:11 lambdabot Consider it noted.
00:11 Leon_ What's supposed to be in S14?
00:12 Hinrik "Roles and Parametric Types" is what perlcabal.org/syn says
00:12 Leon_ Sounds interesting
00:13 jnthn Basically, S12 is really huge, and the idea is to split some stuff (the roles stuff) out of that in to S14.
00:13 jnthn Just to keep it more managable.
00:13 jnthn Plus I want to flesh a few things out a bit more than I feel could use some more details/speccing.
00:14 jnthn But much of it is moving stuff around rather than adding anything new.
00:14 Leon_ Some are really big, some are so small that I don't understand why they aren't merged
00:20 ZuLuuuuuu joined #perl6
00:52 aindilis joined #perl6
01:10 km2 joined #perl6
01:20 Eevee joined #perl6
01:34 ZuLuuuuuu left #perl6
02:33 meppl good night
02:54 kanru joined #perl6
03:10 Psyche^ joined #perl6
03:25 TimToady joined #perl6
03:25 rhr_ joined #perl6
03:25 kcwu joined #perl6
03:25 smg joined #perl6
03:25 zostay joined #perl6
03:25 lizsac joined #perl6
03:25 dalek joined #perl6
03:30 literal @tell azawawi from [Syntax/Highlight/]Perl6.pm: "This library is free software; you can redistribute it and/or modify it under the same terms asssssss at your option, any later version of Perl 5 you may have available."
03:30 lambdabot Consider it noted.
03:41 agentzh joined #perl6
03:54 [particle] joined #perl6
03:58 eternaleye joined #perl6
04:01 elmex_ joined #perl6
04:36 lambdabot joined #perl6
05:05 [particle] joined #perl6
05:12 [particle] how much room does a pugs working copy take? i'm low on disk
05:16 literal an svn checkout? 375MB here it seems
05:17 PerlJam My git-svn checkout takes 126M but that's not a full-history version
05:17 PerlJam [particle]: why do you ask?
05:17 PerlJam you'll need a lot more disk to build pugs
05:17 [particle] i'm low on disk, is why
05:18 [particle] i won't build pugs there, just need src/ t/ ext/ etc
05:19 PerlJam oh, then just get those individually.  If you're using svn 1.5, you can even do a sparse checkout of just he pieces you need
05:19 PerlJam (or so I hear)
05:20 rakudo_svn r33823 | particle++ | [rakudo] parse submethod declarations
05:22 PerlJam btw, my versions of src t and ext are about 15M  It's misc and v6 where most of the disk is used it seems
05:22 pasteling "literal" at 194.144.99.91 pasted "hello world" (2 lines, 57B) at http://sial.org/pbot/33636
05:22 Hinrik huh
05:23 Hinrik is pbot using Perl 5.10 highlighting there?
05:28 eternaleye joined #perl6
05:40 alester_ joined #perl6
05:50 pugs_svn r24287 | hinrik++ | [util/perl6.vim] some operator fixes, add the XopX hyperoperator
05:55 pugs_svn r24288 | hinrik++ | [util/perl6.vim] small whitespace-related fixes
06:01 azawawi joined #perl6
06:01 azawawi good morning
06:05 justatheory joined #perl6
06:26 bmnjuuu7 joined #perl6
06:26 bmnjuuu7 left #perl6
07:10 pugs_svn r24289 | azawawi++ | [Syntax::Highlight::Perl6] Bumped version to 0.02
07:10 pugs_svn r24289 | azawawi++ | [Syntax::Highlight::Perl6] Major refactoring and documentation fixes
07:12 c9s joined #perl6
07:14 pugs_svn r24290 | azawawi++ | [Perl6::Syntax::Highlight] Adding version 0.01 release for future reference
07:36 pugs_svn r24291 | moritz++ | [t/spec] TODO a test that was accidentially un-TODO'ed in r24283
07:50 rakudo_svn r33824 | pmichaud++ | [rakudo]: spectest-progress.csv update: 240 files, 5004 passing, 1 failing
07:50 rakudo_svn r33824 | pmichaud++ | Failure summary:
07:50 rakudo_svn r33824 | pmichaud++ |     S04-statements/given.rakudo 17 - should not fall into default in this case
07:50 rakudo_svn r33824 | pmichaud++ |
07:50 rakudo_svn r33824 | pmichaud++ | NOTE:  This update also changes the ordering of columns in the file,
07:50 rakudo_svn r33824 | pmichaud++ | see the new headers line for the new ordering.
07:50 rakudo_svn r33825 | pmichaud++ | [rakudo]:  Updates to test_summary.pl and progress-graph.pl scripts.
07:50 rakudo_svn r33825 | pmichaud++ | * Revise the summary output to be csv compliant (easier spreadsheet import)
07:50 rakudo_svn r33825 | pmichaud++ | * Reorder columns
07:50 rakudo_svn r33825 | pmichaud++ | * Update progress-graph.pl to use new column ordering and labels
07:52 pugs_svn r24292 | azawawi++ | [Syntax::Highlight::Perl6] More fixes and refactorings...
07:52 pugs_svn r24292 | azawawi++ | [Syntax::Highlight::Perl6] No more dependency on YAML::Dumper;
07:52 pugs_svn r24292 | azawawi++ | [Syntax::Highlight::Perl6] Replaced yaml() method with parse_trees
08:04 iblechbot joined #perl6
08:14 pugs_svn r24293 | azawawi++ | [Syntax::Highlight::Perl6] Removed dependency on File::Slurp
08:17 pbuetow joined #perl6
08:23 dr_df0 joined #perl6
08:33 DemoFreak joined #perl6
09:14 pugs_svn r24294 | azawawi++ | [Syntax::Highlight::Perl6] Moved resources inside the lib/rsc folder for 0.02
09:21 bacek joined #perl6
09:25 ejs joined #perl6
09:29 km2 joined #perl6
09:48 justatheory joined #perl6
09:59 pugs_svn r24295 | azawawi++ | [Syntax::Highlight::Perl6] deleted a resource that moved to lib/rsc
09:59 pugs_svn r24295 | azawawi++ | [Syntax::Highlight::Perl6] LICENSE section updated including STD.pm and JQuery
09:59 pugs_svn r24295 | azawawi++ | [Syntax::Highlight::Perl6] fixed META.yml license to correct Artistic 2.0 constant
09:59 pugs_svn r24295 | azawawi++ | [Syntax::Highlight::Perl6] The resources are now read from the package's rsc dir
10:19 alanhaggai joined #perl6
10:26 dr_df0 joined #perl6
10:28 pugs_svn r24296 | azawawi++ | [Syntax::Highlight::Perl6] Lazily parse (once) when a method is called
10:28 pugs_svn r24296 | azawawi++ | [Syntax::Highlight::Perl6] Better validation for possible errors
10:30 rakudo_svn r33829 | moritz++ | [rakudo] Test.pm fix calls to proclaim() in is_deeply, bacek++
10:30 rakudo_svn r33829 | moritz++ | Patch courtesy by Vasily Chekalkin. Closes RT #61210.
10:31 azawawi moritz_: how do i set "Developer Release" in red in my CPAN account?
10:31 moritz_ azawawi: set the version number to something that contains an underscore
10:31 ashizawa joined #perl6
10:32 azawawi moritz_: thx
10:32 meteorjay joined #perl6
10:58 bacek joined #perl6
10:58 ruoso joined #perl6
11:01 Lorn joined #perl6
11:04 vixey joined #Perl6
11:11 ruoso Hello!
11:11 azawawi hi
11:12 * moritz_ leaves for lunch...
11:17 SamB joined #perl6
11:22 pugs_svn r24297 | bacek++ | [spec] Replace "unknown reason" with "want function" for rakudo fudging
11:30 * ruoso having to install all pugs dependencies again... *sigh*
11:32 sri_kraih joined #perl6
11:38 meppl joined #perl6
11:45 pugs_svn r24298 | azawawi++ | [Syntax::Highlight::Perl6] The version is now 0.01_01 (0.1 developer release)
11:45 pugs_svn r24298 | azawawi++ | [Syntax::Highlight::Perl6] Added changes history from svn.
11:45 pugs_svn r24298 | azawawi++ | [Syntax::Highlight::Perl6] More pod fixes... Nearly there.
11:45 pugs_svn r24298 | azawawi++ | [Syntax::Highlight::Perl6] Manifest now includes lib/rsc folder
11:51 alexn_org joined #perl6
12:02 spx2 joined #perl6
12:10 ruoso pmurias++ # v6/smop/test/39 is awesome...
12:21 pugs_svn r24299 | moritz++ | [t/spec] unfudge a test, bacek++
12:26 pugs_svn r24300 | moritz++ | [t/spec] some fudge changes in chomp.t
12:28 ruoso valgrind and libpcl don't get together nicely
12:35 baest I'm playing with the grammar stuff under rakudo. I'm trying to parse comments as <ws> which is working, but for some reason it is captured. It is possible to to remove it from capture groups when using rules
12:37 pugs_svn r24301 | moritz++ | [irclogs] update link to parrot (now parrot.org)
12:37 moritz_ baest: when you call them as <.ws> it's not captured
12:38 pugs_svn r24302 | azawawi++ | [Syntax::Highlight::Perl6] More POD fixes... release soon..
12:38 baest moritz_: in my ws rule if have as <.ws_all>*. Itsn't that good enough. The rule applies <ws> automatically so I can't change it there
12:39 moritz_ baest: it should be good enough, and if you have a rule, it should imply <.ws>, not <ws>
12:39 moritz_ baest: so maybe you found a bug in rakudo
12:39 baest moritz_: wheee, happy days :)
12:40 moritz_ (oh, and last time I tried, it didn't work to override ws from within rakudo - does that work for you?)
12:40 baest moritz_: but thanks
12:40 moritz_ baest: rakudobug@perl.org for bug reports, please
12:40 baest moritz_: yep, I copied some code from pipp which works nicely the way I wanted
12:40 baest moritz_: will do
12:46 pugs_svn r24303 | azawawi++ | [Syntax::Highlight::Perl6] Archiving release sent to CPAN
12:48 masak joined #perl6
13:00 pmichaud overriding ws from within rakudo works, if you call the rule properly.
13:02 moritz_ pmichaud: properly = explicitly?
13:03 pmichaud $str ~~ / <Grammar::rule> /
13:03 pmichaud that will honor any <ws> tokens defined in Grammar (or its superclasses)
13:03 araujo joined #perl6
13:03 pmichaud many have been doing
13:04 pmichaud $str ~~ Grammar::rule     #  not correct, and fails to call ws rule
13:05 moritz_ rakudo: grammar A { token ws { 'a' }; rule b {x y}; }; say 'xab' ~~ m/ ^ <a::b> $ /
13:05 p6eval rakudo 33829: OUTPUT[get_string() not implemented in class 'ResizableStringArray'␤current instr.: 'parrot;PGE;Match;new' pc 176 (compilers/pge/PGE/Match.pir:115)␤]
13:05 moritz_ rakudo: grammar A { token ws { 'a' }; rule b {x y}; }; say "yes" if 'xab' ~~ m/ ^ <a::b> $ /
13:05 p6eval rakudo 33829: OUTPUT[get_string() not implemented in class 'ResizableStringArray'␤current instr.: 'parrot;PGE;Match;new' pc 176 (compilers/pge/PGE/Match.pir:115)␤]
13:05 araujo joined #perl6
13:08 masak new bug? :)
13:09 moritz_ it seems so, yes
13:09 * masak reports
13:12 pmichaud rakudo:  grammar A { token ws { 'a' }; rule b {x y}; }; say 'xab' ~~ m/ ^ <A::b> $/
13:12 p6eval rakudo 33829: OUTPUT[␤]
13:12 pmichaud rakudo:  grammar A { token ws { 'a' }; rule b {x y}; }; say 'xab' ~~ / ^ <A::b> $/
13:12 p6eval rakudo 33829: OUTPUT[␤]
13:12 pmichaud hmm.
13:12 masak ah, so it was the lower-case 'a'?
13:12 pmichaud yes, because nothing was defined as 'a'
13:13 masak still shouldn't throw that error.
13:13 pmichaud agreed, should throw a better one.
13:13 masak (better errors++)
13:13 masak hm, (better errors)++
13:13 masak :)
13:14 pmichaud (better errors++) has a not-so-good error in it.  :-)
13:14 masak indeed. :)
13:16 moritz_ rakudo: grammar A { token ws { 'a' }; rule b {x y}; }; say "yes" if 'xab' ~~ m/ ^ <A::b> $ /
13:17 p6eval rakudo 33829: RESULT[Method 'perl' not found for invocant of class 'PGE;Match'␤current instr.: '_block11' pc 29 (EVAL_14:16)␤]
13:17 masak eh? where does 'perl' get into it?
13:17 pmichaud from the bot
13:18 masak ah.
13:18 moritz_ rakudo: grammar A { token ws { 'a' }; rule b {x y}; }; say "yes" if 'xab' ~~ m/ ^ <A::b> $ /; say "done"
13:18 p6eval rakudo 33829: OUTPUT[done␤]
13:18 masak Match doesn't have a .perl?
13:18 pmichaud okay, obviously it's not working.
13:18 pmichaud Match doesn't have a .perl yet.
13:18 * masak thought it did.
13:19 pmichaud yes, I thought it worked also.  Maybe I'm just not thinking about it correctly yet.
13:19 pmichaud (still waking up here, getting kids to school)
13:20 jnthn pmichaud: You going to be around a bit later on today?
13:20 * jnthn wants to discuss a couple of thingies
13:20 aindilis joined #perl6
13:22 pmichaud jnthn: I should be around, yes
13:22 jnthn OK, great.
13:22 * jnthn is doing @other_stuff at the moment
13:22 jnthn Expect to look at Perl 6 things in an hour or so.
13:23 pmichaud sounds good
13:36 ruoso I think I'll start a more stable documentation on SMOP... a lot of it is fairly stable now...
13:49 xinming_ joined #perl6
14:00 alech joined #perl6
14:11 rindolf joined #perl6
14:12 alanhaggai joined #perl6
14:25 araujo joined #perl6
14:44 cognominal joined #perl6
15:11 pugs_svn r24304 | ruoso++ | [smop/lowdoc] starting documenting the internals of smop in a more "definitive" way, as the core is getting more stable now.
15:19 jhorwitz joined #perl6
15:35 jan_ joined #perl6
15:40 smtms joined #perl6
15:42 jfroebe joined #perl6
15:44 spx2 joined #perl6
15:57 justatheory joined #perl6
16:00 rakudo_svn r33833 | jonathan++ | [rakudo] Add Abstraction role.
16:06 pugs_svn r24305 | pmurias++ | [lowdoc] fixed typo
16:06 pmurias joined #perl6
16:10 rakudo_svn r33834 | pmichaud++ | [rakudo]:  Fix .list method on Mapping and Hash.
16:12 adc_penner joined #perl6
16:13 pugs_svn r24306 | pmichaud++ | [t/spec]:  Clean up a few tests.
16:20 rakudo_svn r33835 | pmichaud++ | [rakudo]:  Add by-value sort for e.g.,     %hash.sort { .value }
16:29 pugs_svn r24307 | azawawi++ | [Syntax::Highlight::Perl6] LazyMap.pm -> LazyMap.pmc and updated MANIFEST
16:31 stephens joined #perl6
16:38 pugs_svn r24308 | azawawi++ | [Syntax::Highlight::Perl6] Bumped version to 0.02
16:40 pmurias_ joined #perl6
16:41 pmurias joined #perl6
16:42 pmurias @tell ruoso $!foo compiles to self.^!instance_storage.{"..current package..."}{"foo"}?
16:42 lambdabot Consider it noted.
16:56 moritz_ perl6: say <a b c>.end
16:56 p6eval elf 24308, pugs: OUTPUT[2␤]
16:56 p6eval ..rakudo 33837: OUTPUT[c␤]
16:57 pugs_svn r24309 | azawawi++ | [Syntax::Highlight::Perl6] Removed dependency on YAML::Dumper added by mistake
17:00 hanekomu_ joined #perl6
17:02 pbuetow joined #perl6
17:09 pugs_svn r24310 | azawawi++ | [Syntax::Highlight::Perl] No more die-ing just croak-ing ;-)
17:11 maerzhase joined #perl6
17:25 sri_kraih joined #perl6
17:29 REPLeffect joined #perl6
17:38 iblechbot joined #perl6
17:48 pugs_svn r24311 | azawawi++ | [Syntax::Highlight::Perl6] refactored string into use constant-s
17:48 pugs_svn r24311 | azawawi++ | [Syntax::Highlight::Perl6] refactored reading css and ansi files code
17:59 ryanc joined #perl6
18:02 hercynium joined #perl6
18:03 pugs_svn r24312 | azawawi++ | [Syntax::Highlight::Perl6] 'file' option is now called 'page_title'
18:08 ruoso joined #perl6
18:10 ruoso Hello!
18:10 lambdabot ruoso: You have 1 new message. '/msg lambdabot @messages' to read it.
18:11 masak y0
18:11 ruoso pmurias, yes... that's the plan
18:17 ruoso but... one difference actually
18:17 ruoso $!foo turns into self.^!instance_storage.{$?PACKAGE}<foo>
18:18 ruoso although hash now has string as keys... hmm
18:18 ruoso and this also doesn't fit well for private attributes declared inside a role
18:18 ruoso or not... hmmm
18:19 ruoso private attributes in roles is something that just feel weird
18:19 jnthn I'm cheating a bit and name-mangling those at the moment...
18:19 jnthn I think...
18:19 pmurias ruoso: hi
18:19 ruoso hi pmurias
18:20 ruoso jnthn, the problem is that the private attributes declared by roles are composed as if they were declared by the class itself
18:20 ruoso which would make then end into the class instance_storage space, not the role
18:21 pete85 joined #perl6
18:22 jnthn Right, thus why I handled it by mangling 'em...
18:22 jnthn So they were "invisible" to the class.
18:22 jnthn But it's not really a good long term solution.
18:23 ruoso hmm..
18:23 ruoso now thinking better...
18:24 ruoso if we mangle not the attribute name
18:24 ruoso but the outer scope of the method being installed in the class
18:24 ruoso thus changing the meaning of $?PACKAGE
18:25 pmurias ruoso: is the roles attribute composed into the class or just the accessor?
18:25 pmurias s/roles/
18:25 ruoso the attribute itself
18:25 ruoso I think the accessor isn't
18:25 ruoso the accessor is generated at a later time, I guess
18:25 ruoso or not
18:26 pmurias Within a role the C<has> declarator always indicates the declaration
18:26 pmurias from the viewpoint of the class.
18:26 pugs_svn r24313 | azawawi++ | [Syntax::Highlight::Perl6] 'clean_html' option is now 'inline_resources'
18:26 pugs_svn r24313 | azawawi++ | [Syntax::Highlight::Perl6] added option 'resource_url' to prefix resources
18:26 pugs_svn r24313 | azawawi++ | [Syntax::Highlight::Perl6] when externalized
18:26 pmurias S12:1182
18:26 ruoso pmurias, you're right
18:26 jnthn Right. Role privates are declared with my, however.
18:26 ruoso that is something different
18:27 ruoso "Role Attributes", as in "Class attributes" are different from "Attributes declared by the Role"
18:27 ruoso class × instance attributes
18:27 jnthn Are we talking about e.g. role Foo { my $!x; } stuff?
18:27 ruoso no
18:27 jnthn Ah. I was. :-)
18:27 * jnthn keeps quiet and stops causing confusion.
18:28 ruoso we're talking about role Foo { has $!bar }
18:28 pete85 rakudo: ("\r" ~~ token { <[\x00..\x7F]> }) && say 'match'
18:28 p6eval rakudo 33837: RESULT[Method 'perl' not found for invocant of class 'PGE;Match'␤current instr.: '_block11' pc 29 (EVAL_14:16)␤]
18:28 pete85 rakudo: ("0" ~~ token { <[\x00..\x7F]> }) && say 'match'
18:28 p6eval rakudo 33837: OUTPUT[match␤]
18:28 jnthn ruoso: That just uses the classes slot.
18:28 jnthn It's as if you declared it on the class itself.
18:28 ruoso jnthn, role Foo { my $!x } is simply a lexical variable
18:28 jnthn Nope, it's a role private attr.
18:28 ruoso ok... that's a previous question
18:29 ruoso it's not clear that "class storage" is really needed
18:29 pete85 shouldn't "\r" ~~ token { <[\x00..\x7F]> } match?
18:29 jnthn You may wish to declare an attribute that is hidden even from the class; a completely private role attribute may be declared like this:
18:29 jnthn my $!spleen;
18:29 jnthn (from S12)
18:29 ruoso right... right...
18:29 ruoso what I mean is that it *can* be done with lexical variables
18:30 ruoso and that "class storage" might be unnecessary
18:30 jnthn But you get one per instance of the class that this role is composed into, right?
18:30 jnthn So it's like an attribute.
18:30 jnthn The scoping is lexical, I completely agree there.
18:31 pmurias ruoso: we don't have proper "class storage" in perl 6
18:31 ruoso jnthn, hm?
18:32 jnthn role R { my $!x; method a { $!x = 42 }; method b { say $!x } }
18:33 jnthn oh, bad example
18:33 pmurias my $!spleen declares an attribute which is only accesible from within that lexical scope, right?
18:33 jnthn role R { my $!x; method a($y) { $!x = $y }; method b { say $!x } }
18:33 jnthn Yes.
18:33 ruoso pugs: Role Foo { my $!bar; method bla($a) { $!bar = $a }; method ble { say $!bar } }; class A does Foo {}; class B does Foo {}; A.bla(1); B.bla(2); a.ble; b.ble;
18:33 p6eval pugs: OUTPUT[*** ␤    Unexpected "Foo"␤    expecting "=", "(", ":" or operator␤    at /tmp/JPD5QnJIYt line 1, column 6␤]
18:33 jnthn But it's still a real attribute.
18:33 ruoso pugs: role Foo { my $!bar; method bla($a) { $!bar = $a }; method ble { say $!bar } }; class A does Foo {}; class B does Foo {}; A.bla(1); B.bla(2); a.ble; b.ble;
18:33 p6eval pugs: OUTPUT[*** Class prototype occured where its instance object expected: A␤    at /tmp/f4bqj0f3bF line 1, column 39-50␤       /tmp/f4bqj0f3bF line 1, column 39-50␤]
18:33 ruoso pugs: role Foo { my $!bar; method bla($a) { $!bar = $a }; method ble { say $!bar } }; class A does Foo {}; class B does Foo {}; A.new.bla(1); B.new.bla(2); a.new.ble; b.new.ble;
18:34 p6eval pugs: OUTPUT[*** No such subroutine: "&a"␤    at /tmp/6LY4dT6FxC line 1, column 151-160␤]
18:34 ruoso pugs: role Foo { my $!bar; method bla($a) { $!bar = $a }; method ble { say $!bar } }; class A does Foo {}; class B does Foo {}; A.new.bla(1); B.new.bla(2); A.new.ble; B.new.ble;
18:34 p6eval pugs: OUTPUT[␤␤]
18:34 ruoso ok... pugs is just wrong here
18:34 ruoso rakudo: role Foo { my $!bar; method bla($a) { $!bar = $a }; method ble { say $!bar } }; class A does Foo {}; class B does Foo {}; A.new.bla(1); B.new.bla(2); A.new.ble; B.new.ble;
18:34 p6eval rakudo 33837: OUTPUT[␤␤]
18:34 ruoso rakudo too
18:34 jnthn rakudo: role R { my $!x; method set($y) { $!x = $y; }; method get { $!x } }; class C does R { }; my C $c .= new; $c.set(42); say $c.get;
18:34 p6eval rakudo 33837: OUTPUT[42␤]
18:35 jnthn rakudo: role R { my $!x; method set($y) { $!x = $y; }; method get { $!x } }; class C does R { }; my C $c .= new; my C $d .= new; $c.set(42); $d.set(100); say $c.get; say $d.get;
18:35 p6eval rakudo 33837: OUTPUT[42␤100␤]
18:35 ruoso ok... you're doing it as if it were a instance attribute
18:35 jnthn Right. It's an attribute.
18:35 ruoso but it is a "Role Attribute", as if it were a "Class Attribute"
18:36 ruoso which means that it's visible cross-instances
18:36 jnthn I think the point is that it's not visible to the class.
18:37 jnthn If it was just a lexical, it'd not call it an attribute in the spec, I don't imagine.
18:37 jnthn "The name of such a private attribute is always considered lexically scoped."
18:37 jnthn It's saying the name is lexically scoped rather than the thing itself.
18:38 ruoso hmmm...
18:38 jnthn I could be wrong, but it seemed like the obvious interpretation.
18:39 ruoso considering "my $!a" is used to handle "Class Attributes"
18:39 jnthn True...
18:39 jnthn Oh, can you write that in a class?
18:39 ruoso I'd think "my $!a" in a role to have the same behavior
18:39 ruoso yes
18:39 ruoso you can
18:40 jnthn It's not mentioned in S12.
18:40 jnthn my  $.count;        # generates a public read-only .count accessor
18:40 jnthn But not a $! case.
18:40 ruoso hmm...
18:40 ruoso let me check...
18:40 jnthn my $!count; # would be no different from my $count, surely?
18:41 ruoso yes...
18:42 ruoso jnthn, S12 mentions my $!foo
18:42 jnthn In a role...
18:42 ruoso let me get the line number
18:42 jnthn I meant it doesn't mention it in the context of a class.
18:42 jnthn Hang on, http://dev.perl.org/perl6/doc/design/syn/S12.html is up to date, right?
18:43 ruoso it's because it uses %!cache in the class exampel
18:43 ruoso that's why you can't find it ;)
18:43 ruoso S12:623
18:43 [particle] jnthn: it's no longer canon. now see pugs/docs/Perl6/Spec/
18:44 ruoso but S12:623 is there for a long time... ;)
18:44 jnthn Hmm.
18:44 jnthn Yes.
18:44 [particle] hrmm, actually, i wonder if those html docs are generated from the pugs repo now
18:44 jnthn I was searching for my $!foo...
18:44 jnthn Well, my $!
18:44 ruoso tricky
18:44 jnthn Hmm
18:44 jnthn Yes.
18:45 jnthn I don't see the benefit of my $!foo over my $foo in a class. What am I missing?
18:45 ruoso syntax sugar
18:45 jnthn Aha.
18:45 ruoso so it looks like an attribute
18:45 jferrero joined #perl6
18:46 ruoso and it's consistent with has $.a and has $!a
18:46 jnthn True.
18:46 ruoso because my $.foo generates the accessor
18:46 jnthn I'm now pondering how you do declare something in a role that's not visible to the clas...
18:46 jnthn And is per-instance.
18:46 jnthn If we're taking my $!foo in a role to mean "one per role nad just a lexical really"
18:47 masak maybe it's not possible.
18:47 ruoso my guess is: it's just a lexical variable
18:47 ruoso oh... right... that was the problem I was talking about in the first place
18:47 hanekom__ joined #perl6
18:47 ruoso state?
18:47 ruoso no... state is also just lexical
18:47 pbuetow left #perl6
18:47 ruoso but maybe it's because it really doesn't make sense
18:48 ruoso because there's no "instance of role"
18:49 ruoso pmurias, btw... I've just realized... $!foo should be actually: self.^!instance_storage{$?CLASS}<foo>
18:49 ruoso instead of $?PACKAGE
18:49 ruoso that way
18:49 jnthn The thing that seemed to make having the ability to declare something that was per instance of the class, but only visible inside the role, was that you could write roles that had some state, but you knew wouldn't conflict with attributes coming from elsewhere.
18:50 ruoso when composing the methods of a role into the class,
18:50 ruoso the outer scope of the method is mangled so that $?CLASS is available as the class where the method was composed into
18:51 ruoso jnthn, yeah... I share your concern, but I understand that a role is invisible after it's composed
18:56 pmurias ruoso: i don't really understand why my $!spleen should be shared between role instances
18:58 jnthn pmurias: It'd just be consistency with my $!spleen in a class, where it'd be shared between class instances.
18:59 cognominal joined #perl6
19:00 pmurias jnthn: where is my $!spleen in a class specced?
19:02 jnthn S12 ;-)
19:03 jnthn It's my %!cache though.
19:03 jnthn Which is why I didn't find it until ruoso pointed it out. :-)
19:13 pete85 joined #perl6
19:17 pugs_svn r24314 | azawawi++ | [Syntax::Highlight::Perl6] Major refactoring of ugly File::Spec->joins and
19:17 pugs_svn r24314 | azawawi++ | [Syntax::Highlight::Perl6] inlining js/css code. Everything works as expected.
19:17 pugs_svn r24314 | azawawi++ | [Syntax::Highlight::Perl6] 0.2 is going soon to CPAN... Have fun;-)
19:29 pugs_svn r24315 | azawawi++ | [Syntax::Highlight::Perl6] Updated Changes prior to 0.2 release
19:32 jfroebe joined #perl6
19:33 pmurias ruoso: $?CLASS is a bit tricky to do correctly in our compiler separate from runtime model
19:35 pugs_svn r24316 | azawawi++ | [Syntax::Highlight::Perl6] Archiving 0.02 release
19:36 ruoso pmurias, not at all
19:36 ruoso pmurias, $?CLASS is already available
19:37 ruoso mildew: knowhow Foo { method bar { $?CLASS.baz }; method baz { $OUT.print("1") }; }; Foo.bar;
19:37 p6eval mildew: OUTPUT[Could not find variable $CLASS in the lexical scope.␤]
19:37 ruoso hm
19:37 ruoso ?
19:37 ruoso ah... ok
19:37 ruoso the problem is in the emitting of $?CLASS
19:37 ruoso but the variable is there
19:37 jfroebe left #perl6
19:39 bacek joined #perl6
19:40 pmurias szabgab: padre has vim keybindings now?
19:41 ruoso pmurias, could you try to fix $?CLASS in mildew?
19:41 ruoso it's ignoring the twigil
19:41 pmurias ruoso: ok
19:43 ejs1 joined #perl6
19:49 pugs_svn r24317 | pmurias++ | [mildew] hack - the twigil is part of the name
19:49 pmurias ruoso: having the twigil be part of the name is a bit of hack
19:50 ruoso why
19:50 ruoso ?
19:51 pmurias ruoso: does the sigil affect the way lookup happens?
19:52 * pmurias is sleep deprived so dosn't think very clearly
19:54 * azawawi wonders what's the schedule for the CPAN indexer...
19:57 ruoso pmurias, the ? twigil doesn't affect
19:57 ruoso the + does affect
19:57 ruoso mildew: knowhow Foo { method bar { $?CLASS.baz }; method baz { $OUT.print("is mildew evalbot updated?") }; }; Foo.bar;
19:57 p6eval mildew: OUTPUT[is mildew evalbot updated?]
19:58 ruoso :D
20:04 * pmurias wanders if moving /usr to /home is really good idea
20:06 * pmurias wanders if moving /usr to /home is really good idea
20:06 pmurias s/really/really a/
20:06 ruoso it sure doesn't look like one
20:12 pmurias resizing the partitions is propably the option i should have choosen instead of attempting a symlink
20:18 rindolf joined #perl6
20:19 masak joined #perl6
20:43 pmurias joined #perl6
20:44 ruoso pugs: class Foo { method bar { say $?CLASS }; }; Foo.bar;
20:44 p6eval pugs: OUTPUT[Foo␤]
20:45 ruoso right... a class stringifies to its name
20:45 ruoso that means that the method Str from Object returns the class name
20:46 ruoso perl6: say Object.Str();
20:46 p6eval rakudo 33838: OUTPUT[Object<0x8164c10>␤]
20:46 p6eval ..elf 24317: OUTPUT[Can't locate object method "Str" via package "Object" at (eval 117) line 3.␤ at ./elf_f line 3861␤]
20:46 p6eval ..pugs: OUTPUT[*** No such method in class Object: "&Str"␤    at /tmp/yJq660MRxA line 1, column 5-17␤]
20:46 pete85 left #perl6
20:46 ruoso rakudo: say Object;
20:46 p6eval rakudo 33838: OUTPUT[Object␤]
20:46 ruoso interesting
20:46 ruoso rakudo: say ~Object;
20:46 p6eval rakudo 33838: OUTPUT[Object␤]
20:46 ruoso how does ~Object is different from Object.Str()?
20:47 ruoso (now that was a badly built sentence...)
20:59 * ruoso later &
21:00 rakudo_svn r33839 | masak++ | [rakudo] made .end return highest index, not last element
21:07 r0bby joined #perl6
21:15 szabgab pmurias: there is a very limited support of vi key binding
21:15 azawawi hi szabgab
21:15 szabgab hi azawawi
21:16 * azawawi is waiting for the cpan indexer...
21:16 vixey joined #Perl6
21:17 azawawi szabgab: what kind of interfaces do u need for Padre - Syntax::Highlight::Perl6 integration?
21:20 pmurias szabgab: very limited but extensible? ;)
21:21 azawawi lol
21:21 szabgab pmurias: very limited but you are welcome to further patch it,
21:21 szabgab it is a separate plugin now
21:21 maerzhase1 joined #perl6
21:21 azawawi how does one contribute to Padre?
21:21 szabgab just sign up on padre.perlide.org
21:22 szabgab on the trac thing and join us on #padre
21:22 szabgab and I can give you a commit bit
21:22 mberends joined #perl6
21:23 azawawi cool maybe later once i finish polishing my module... ;-)
21:24 szabgab sure, I have to go to sleep anyway :-)
21:24 szabgab azawawi: oh and about interface, I don't know yet
21:25 szabgab I'll look at the module and then talk to you about that but I am not sure I'll have time next week
21:26 azawawi szabgab: plz take a look at the $highlighter->parse_trees(); maybe that will help u.
21:26 azawawi szabgab: ofcourse after cpan wakes up to process my 0.02 upload ;-)
21:27 * azawawi good night &
21:27 szabgab night &
21:28 Lorn joined #perl6
21:31 [particle] ok, now that i've made that commit (just wait), it's time for lunch and errands! &
21:31 pugs_svn r24318 | particle++ | [spec] first incomplete draft of S19. needs fleshing out in many places, but it's at the point where more eyes are sorely needed and very welcome.
21:54 ryanc joined #perl6
22:20 jferrero joined #perl6
22:21 justatheory joined #perl6
22:25 slavik joined #perl6
22:25 slavik what about using mod_perl5 and mod_rewrite have it call rakudo with whatever script needs to be called?
22:27 adc_penner2 joined #perl6
22:33 hanekomu_ joined #perl6
22:38 ryanc joined #perl6
22:50 ruoso joined #perl6
22:51 ruoso Hello!
22:54 slavik hi
22:59 Limbic_Region joined #perl6
23:00 |mjk| joined #perl6
23:12 pugs_svn r24319 | azawawi++ | [Syntax::Highlight::Perl6] META.yml is now copied correctly in 'make dist'
23:12 pugs_svn r24319 | azawawi++ | [Syntax::Highlight::Perl6] Bumped version to 0.021
23:13 eternaleye_ joined #perl6
23:16 pugs_svn r24320 | azawawi++ | [Syntax::Highlight::Perl6] Archived version 0.021
23:40 ruoso joined #perl6
23:46 spx2 joined #perl6

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

Perl 6 | Reference Documentation | Rakudo