Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2011-05-17

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:05 sorear good * #perl6
00:11 awoodland left #perl6
00:12 TimToady thou: the Set type is supposed to be immutable, because if you remove an object, it's a different set
00:13 thou ok, so just use $s .= difference()?
00:13 TimToady there's supposed to be a KeySet type that emulates a "mutable" set, but it's not implemented, I think
00:13 TimToady so I think just use a Hash for now
00:14 TimToady %hash.delete('key') in rakudo, since rakudo does not yet implement :delete
00:14 TimToady and I think the keys are only strings at the moment
00:14 TimToady set difference might work too
00:15 TimToady for small sets it's probably efficient enough
00:15 TimToady I think it does === semantics too, which is more what you want
00:15 risou is now known as risou_awy
00:25 sorear rakudo: my $str = 'aaa'; $str--; say $str # TimToady, I am dubious of this
00:25 p6eval rakudo ca8731:  ( no output )
00:25 sorear rakudo: my $str = 'aaa'; $str--; say $str.perl # TimToady, I am dubious of this
00:25 p6eval rakudo ca8731: OUTPUT«undef␤»
00:48 sorear rakudo: "foo".bytes.PARROT.say; 2.PARROT.say
00:48 p6eval rakudo ca8731: OUTPUT«Integer␤Int␤»
00:48 sorear #rakudobug
00:55 colomon yup
01:01 colomon ugh
01:01 colomon rakudo: "foo".bytes.say
01:01 p6eval rakudo ca8731: OUTPUT«3␤»
01:13 woosley joined #perl6
01:17 ggoebel left #perl6
01:18 dju_ joined #perl6
01:18 dju__ left #perl6
01:22 dalek niecza: 2d9ebd6 | sorear++ | / (2 files):
01:22 dalek niecza: Implement Str.chom?p and sub form
01:22 dalek niecza: review: https://github.com/sorear/niecza/commit/2d9ebd6056
01:22 dalek roast: 46bf918 | sorear++ | S32-str/cho (2 files):
01:22 dalek roast: Fudge chom?p for Niecza
01:22 dalek roast: review: https://github.com/perl6/roast/commit/46bf918d49
01:22 ggoebel joined #perl6
01:26 cdarroch left #perl6
01:36 whiteknight left #perl6
02:10 ggoebel left #perl6
02:11 PacoLinux left #perl6
02:13 PacoLinux joined #perl6
02:15 ggoebel joined #perl6
02:18 PacoLinux left #perl6
02:20 PacoLinux joined #perl6
02:21 huf left #perl6
02:31 Raynes joined #perl6
02:40 ymasory joined #perl6
02:40 ymasory left #perl6
02:40 ymasory joined #perl6
02:49 sorear odd, S04-statements/goto.t tests I-don't-know-what and hardly goto at all
02:54 thou i'm getting this error: Type objects are abstract and have no attributes, but you tried to access $!key:  Code is here, am I doing something stupid, or is this something unimplemented?  http://friendpaste.com/6CFralb4xTPxsiXlEzGkHe
02:55 sorear that's... not how constructors work in Perl 6
02:55 thou ah
02:56 sorear "new" is just a static method
02:56 sorear it doesn't have a usable "self", so it can't access $.key
02:56 pjcj left #perl6
02:56 sorear you could do my $new = callsame(); and then $new.key =, etc
02:56 pjcj joined #perl6
02:57 thou and then return $new at the end
02:57 sorear yes
02:57 sorear alternately, nextwith(self, key => $key, val => $val, color => True)
02:58 sorear this can be shortened to nextwith(self, :$key, :$val, :color)
02:59 thou ok, good!
03:00 sorear you could also add " = True" to has $.color
03:00 thou nextwith handles MMD and inheritance, right?
03:00 sorear yes
03:01 thou yes, i'm sure there's a bunch of tweaks i can make; i'm right now transliterating directly from the paper, and hopefully will get something working and then perhaps make it more perlish
03:01 sorear actually you don't want to use callsame() here, since Mu.new doesn't take $key and $val
03:01 sorear it should be callwith(self)
03:02 thou the book has:  return self.bless(*, :&callback, :@dependencies);
03:02 thou with a =for author what is * here?
03:03 thou but i haven't gotten to the synopsis that goes over this yet, so i'm kind of just shooting from the hip and hoping i guess right
03:03 thou which probably is a waste of your time, but i do appreciate the pointers.
03:04 sorear Mu.bless is basically the same as Mu.new
03:04 sorear the main difference is that people don't override bless normally
03:04 sorear also bless takes a first argument of *
03:05 sorear the * is reserved for future use; there has been speculation that it will enable passing strings to pick alternate object storage systems
03:13 thou sorear: i switched to nextwith(self, :$key, :$val, :color<True>), and it now says: too many positional arguments: 2 passed, 1 expected (pointing at the Node.new($key, $val) call): http://friendpaste.com/6CFralb4xTPxsiXlEzGkHe
03:14 thou i also tried my $new = callwith(self); $new.key = ...
03:14 thou with the same result (2 passed, 1 expected)
03:14 thou maybe i need to study some actual code
03:15 thou i'll spend some time looking at http://modules.perl6.org/
03:19 thou sorear: ok, for now i just deleted my new() method altogether, and call Node.new(:$key, :$value, :color<True>). thanks for your time!
03:24 agentzh joined #perl6
03:25 sorear odd.
03:27 Su-Shee left #perl6
03:29 Su-Shee joined #perl6
03:37 Baggio joined #perl6
03:40 dalek niecza: ae1c75a | sorear++ | / (2 files):
03:40 dalek niecza: Implement =:=
03:40 dalek niecza: review: https://github.com/sorear/niecza/commit/ae1c75a383
03:40 dalek niecza: 75aee84 | sorear++ | src/niecza:
03:40 dalek niecza: Parse and ignore "returns" annotations on subs and methods
03:40 dalek niecza: review: https://github.com/sorear/niecza/commit/75aee84e8e
03:40 dalek niecza: 0c0d65d | sorear++ | lib/CORE.setting:
03:40 dalek niecza: Allow [op] to work with Mu
03:40 dalek niecza: review: https://github.com/sorear/niecza/commit/0c0d65d587
03:40 Baggio left #perl6
03:41 Baggio joined #perl6
03:41 Baggio left #perl6
03:47 sorear pmichaud: nextsame() in rakudo is doing funny stuff with 'self' that I can't find anywhere in S06 or S12
03:48 sorear perl6: class A { method f(|$x) { say $x.perl } }; class B is A { method f() { nextwith(self,1,2) } }; B.f
03:48 p6eval rakudo ca8731, niecza v5-19-g2d9ebd6: OUTPUT«\(B, 1, 2)␤»
03:48 p6eval ..pugs: OUTPUT«*** No such subroutine: "&nextwith"␤    at /tmp/LD9rKgHdHP line 1, column 72-91␤»
03:49 sorear double odd
03:49 sorear perl6: class A { method f(*@x) { say [self, @x].perl } }; class B is A { method f() { nextwith(self,1,2) } }; B.f
03:49 p6eval rakudo ca8731: OUTPUT«[B, B, 1, 2]␤»
03:49 p6eval ..niecza v5-19-g2d9ebd6: OUTPUT«[B, 1, 2]␤»
03:49 p6eval ..pugs: OUTPUT«*** No such subroutine: "&nextwith"␤    at /tmp/l8esOnDY6_ line 1, column 80-99␤»
03:57 pmichaud sorear: you'd have to chat with jnthn++ about that.  also keep in mind that nextsame and protos have changed a bit since nextsame() was implemented in Rakudo
03:58 pmichaud I suspect jnthn is fixing it in nom rather than try to keep Rakudo master up to date
04:02 sorear rakudo: role A { method x(@foo:) { say +[ self ] } }; ([1,2,3] but A).x
04:02 p6eval rakudo ca8731: OUTPUT«3␤»
04:02 sorear I beleive this is wrong.
04:03 alc joined #perl6
04:30 takesako joined #perl6
04:35 sorear rakudo: say defined 1 && 0
04:35 p6eval rakudo ca8731: OUTPUT«0␤»
04:35 sorear rakudo: say cos 1 && 0
04:35 p6eval rakudo ca8731: OUTPUT«1␤»
04:37 sorear I wonder whether I should reply to pmichaud's post to say that so, not, abs, and defined follow different rules
04:38 sorear (in niecza, -defined +sleep)
04:43 alc left #perl6
04:44 alc joined #perl6
04:51 pmichaud probably wouldn't hurt to mention that some identifiers are in fact prefix ops
04:52 pmichaud I've been a little distracted trying to get the parrot/zavolaj nci issues worked out in time for the parrot release (~2 hrs from now)
05:00 molaf joined #perl6
05:02 kaare_ joined #perl6
05:07 Zapelius left #perl6
05:08 koban joined #perl6
05:08 koban left #perl6
05:10 koban joined #perl6
05:13 noganex_ joined #perl6
05:14 sftp left #perl6
05:17 noganex left #perl6
05:17 birdwindupbird joined #perl6
05:18 mtk left #perl6
05:20 ymasory left #perl6
05:26 mtk joined #perl6
05:34 sorear std: sub foo(;;: ;;: ;;) { }
05:34 p6eval std a71faea: OUTPUT«ok 00:01 113m␤»
05:34 sorear what does that even mean
05:40 moritz good morning
05:41 tadzik good morning
05:41 nebuchadnezzar good morning
05:44 sorear hello
05:57 wtw_ joined #perl6
05:59 pmichaud http://gist.github.com/976023  # patch to enable zavolaj to work again on recent parrots
06:01 wtw_ is now known as wtw
06:04 tadzik are you pushing this?
06:25 dalek niecza: bc9e1bc | sorear++ | / (8 files):
06:25 dalek niecza: Explicit invocants alias, not replace, self
06:25 dalek niecza: review: https://github.com/sorear/niecza/commit/bc9e1bc28b
06:25 sorear time to update my mono; I'm getting nondeterministic crashes with the last change
06:32 * sorear wonders if maybe ey should switch to mono 2.10
06:36 sorear delightful bug of the day
06:37 sorear niecza: if 1 { my Str $s = 12 }; say "alive"
06:37 p6eval niecza v5-23-gbc9e1bc: OUTPUT«Potential difficulties:␤  $s is declared but not used at /tmp/w3ycGZqgnN line 1:␤------> [32mif 1 { my Str $s[33m⏏[31m = 12 }; say "alive"[0m␤␤alive␤»
06:37 sorear niecza: my Str $s = 12; say "alive"
06:37 p6eval niecza v5-23-gbc9e1bc: OUTPUT«Unhandled exception: Nominal type check failed for scalar store; got Num, needed Str or subtype␤  at /tmp/NpeI8mpQbo line 1 (MAIN mainline @ 1)␤  at /home/p6eval/niecza/lib/CORE.setting line 1390 (CORE C567_ANON @ 2)␤  at /home/p6eval/niecza/lib/CORE.setting line 1391
06:37 p6eval ..(CORE module-…
06:38 TimToady that's the first bug in my todo file
06:38 sorear TimToady: I'm not referring to the warning ...
06:38 sorear niecza ignores type constraints that are inside bare blocks
06:39 TimToady ah
06:39 sorear somehow
06:39 sorear (possibly an inliner glitch?)
06:39 jdhore moritz, 'morning
06:39 sorear hello jdhore.
06:39 sorear er
06:39 sorear sorry, I'm not moritz.
06:39 jdhore OR ARE YOU?!
06:40 sorear well I don't have a kid, I'm not living in Germany, ...
06:40 jdhore oh, I didn't know moritz had a kid
06:46 moritz that's a rather new development :-)
06:47 moritz or newish, I should say
06:48 domidumont joined #perl6
06:50 jdhore ah
06:50 jdhore moritz, Well i am definetly up for a release on Thursday
06:52 moritz that's great
06:54 jdhore and I haven't been around much because i'm sort of spreading myself rather thin with IRC, plus i'm kind of an idiot when it comes to deep internals of a programming language like P6 and it's been very low-level stuff in here lately so I wouldn't have had much to contribute :)
06:55 moritz that's ok, I was just asking :-)
07:01 dalek niecza: 334e133 | sorear++ | / (3 files):
07:01 dalek niecza: Fix type constraints being ignored in inlined blocks
07:01 dalek niecza: review: https://github.com/sorear/niecza/commit/334e133232
07:02 sorear jdhore: what would you consider "not low level" stuff?
07:02 jdhore sorear, I'm not sure exactly
07:02 jdhore It also doesn't help that I generally have no idea what i'm doing
07:04 dalek niecza: 48b90b7 | sorear++ | t/spectest.data:
07:04 dalek niecza: We pass S12-methods/chaining.t now
07:04 dalek niecza: review: https://github.com/sorear/niecza/commit/48b90b7e1e
07:05 sorear making that test file work required fixing a bug with type constraints, sprinkling 'Mu' in appropriate places in the setting, making $!foo work in methods with a named invocant, adding =:=, and gracefully ignoring "returns"
07:06 sorear maybe it'll benefit other test files?
07:07 sorear jdhore: what does releasing Rakudo require?
07:08 moritz mostly writing an announcement and following instructions
07:08 jdhore sorear, https://github.com/rakudo/rakudo/b​lob/master/docs/release_guide.pod
07:08 jdhore Yeah, basically :D
07:10 sorear niecza: say Pair
07:11 p6eval niecza v5-23-gbc9e1bc: OUTPUT«Unhandled exception: Attempted to access slot key of type object for Pair␤  at /home/p6eval/niecza/lib/CORE.setting line 0 (CORE key @ 0)␤  at /home/p6eval/niecza/lib/CORE.setting line 859 (CORE Pair.Str @ 2)␤  at  line 0 (ExitRunloop @ 0)␤  at
07:11 p6eval ../home/p6eval/niecza/lib/CORE.setting …
07:14 sorear niecza: class :: is Str { }
07:14 p6eval niecza v5-23-gbc9e1bc: OUTPUT«Unhandled exception: Unable to resolve method ast in class Any␤  at /home/p6eval/niecza/src/NieczaActions.pm6 line 162 (NieczaActions NieczaActions.morename @ 6)␤  at  line 0 (ExitRunloop @ 0)␤  at /home/p6eval/niecza/src/STD.pm6 line 344 (STD STD.morename @ 23)␤  at
07:14 p6eval ../home/p6eval/n…
07:18 lue left #perl6
07:19 lue joined #perl6
07:19 * sorear out
07:25 mberends patched zavolaj locally with http://gist.github.com/976023 from pmichaud++, the examples die with 'Parent of PCT;Grammar is null' on current Rakudo, so I assume there is an unpushed Rakudo commit still to come.
07:26 mj41 joined #perl6
07:30 mberends (prior to the patch, only the unix-fork example ran, and used about 52MB per Rakudo process (i386), smaller than it used to be, istr)
07:32 moritz phenny: tell sorear that t/spec/S05-grammar/action-stubs.t passes 13 tests and fails a few, might be worth looking at
07:32 phenny moritz: I'll pass that on when sorear is around.
07:43 Zapelius joined #perl6
07:45 lue left #perl6
07:45 lue joined #perl6
07:45 Zapelius left #perl6
07:46 awoodland joined #perl6
08:00 wamba joined #perl6
08:02 f00li5h left #perl6
08:03 tzhs joined #perl6
08:20 moritz niezca: my @a = qw/1 2 3/; say ~@a.push('b')
08:20 moritz niecza: my @a = qw/1 2 3/; say ~@a.push('b')
08:20 p6eval niecza v5-25-g48b90b7: OUTPUT«␤»
08:20 TiMBuS is the nom branch meant to compile yet
08:21 moritz no
08:21 dalek roast: e6c9e36 | moritz++ | S32-array/push.t:
08:21 dalek roast: fudge push.t for niecza
08:21 dalek roast: review: https://github.com/perl6/roast/commit/e6c9e36b42
08:22 TiMBuS aw
08:22 dalek roast: 32c4ff6 | moritz++ | S32-array/push.t:
08:22 dalek roast: fix typo in previous commit
08:22 dalek roast: review: https://github.com/perl6/roast/commit/32c4ff6418
08:35 awoodland left #perl6
08:38 dakkar joined #perl6
08:46 awoodland joined #perl6
08:50 dalek niecza: 70169ab | moritz++ | t/spectest.data:
08:50 dalek niecza: run three more test files
08:50 dalek niecza: review: https://github.com/sorear/niecza/commit/70169ab800
09:00 dalek left #perl6
09:01 dalek joined #perl6
09:01 p6eval left #perl6
09:02 f00li5h joined #perl6
09:03 p6eval joined #perl6
09:06 MayDaniel joined #perl6
09:18 awoodland left #perl6
09:42 tzhs left #perl6
09:46 MayDaniel left #perl6
09:48 woosley left #perl6
09:50 SHODAN joined #perl6
10:01 snearch joined #perl6
10:04 [Coke] left #perl6
10:06 [Coke] joined #perl6
10:13 dalek rakudo: 5f1bf60 | moritz++ | build/PARROT_REVISION:
10:13 dalek rakudo: bump PARROT_REVISION to 3.4.0 release
10:13 dalek rakudo: review: https://github.com/rakudo/rakudo/commit/5f1bf60466
10:25 thou left #perl6
10:53 daemon left #perl6
10:55 daemon joined #perl6
11:06 Patterner left #perl6
11:07 dur-randir joined #perl6
11:07 Psyche^ joined #perl6
11:07 Psyche^ is now known as Patterner
11:10 huf joined #perl6
11:13 Trashlord joined #perl6
11:16 woosley joined #perl6
11:34 woosley left #perl6
11:48 colomon left #perl6
11:51 Trashlord left #perl6
12:08 BinGOs left #perl6
12:10 BinGOs joined #perl6
12:10 wknight8111 joined #perl6
12:16 bluescreen10 joined #perl6
12:20 bluescreen10 left #perl6
12:31 pernatiy left #perl6
12:31 wamba left #perl6
12:32 wamba joined #perl6
12:32 leprevost joined #perl6
12:32 proller joined #perl6
12:35 bluescreen10 joined #perl6
12:36 mtk left #perl6
12:40 mtk joined #perl6
12:52 Zapelius joined #perl6
13:00 Zapelius left #perl6
13:04 pernatiy joined #perl6
13:04 Holy_Cow joined #perl6
13:06 Holy_Cow left #perl6
13:07 JimmyZ joined #perl6
13:19 IllvilJa left #perl6
13:19 literal__ joined #perl6
13:19 literal__ left #perl6
13:20 mtk left #perl6
13:21 mtk joined #perl6
13:22 jfried left #perl6
13:26 Vlavv` joined #perl6
13:29 donri joined #perl6
13:30 Vlavv_ left #perl6
13:31 mberends left #perl6
13:33 snearch left #perl6
13:34 Sarten-X left #perl6
13:36 mberends joined #perl6
13:41 tzhs joined #perl6
13:42 wamba left #perl6
13:45 Sarten-X joined #perl6
13:51 wamba joined #perl6
13:53 silent_h_ joined #perl6
13:56 koban left #perl6
14:01 wamba left #perl6
14:06 dur-randir left #perl6
14:07 pmichaud good morning, #perl6
14:07 moritz good am, pm
14:08 PerlJam greets pm
14:08 JimmyZ good morning pm
14:08 agentzh left #perl6
14:09 Trashlord joined #perl6
14:10 alester left #perl6
14:11 TimToady 你好
14:17 alc left #perl6
14:18 literal left #perl6
14:20 literal joined #perl6
14:20 literal left #perl6
14:21 literal joined #perl6
14:22 literal left #perl6
14:24 literal joined #perl6
14:25 sftp joined #perl6
14:26 literal left #perl6
14:27 literal joined #perl6
14:27 dur-randir joined #perl6
14:31 bluescreen10 left #perl6
14:33 Trashlord left #perl6
14:35 ymasory joined #perl6
14:35 moritz .u plus-minus
14:35 phenny U+00B1 PLUS-MINUS SIGN (±)
14:36 Trashlord joined #perl6
14:38 moritz phenny++ # Unicode enabling this dumb input system
14:39 TimToady .u ∓
14:39 phenny U+2213 MINUS-OR-PLUS SIGN (∓)
14:39 TimToady .u minus.*plus
14:40 phenny U+2213 MINUS-OR-PLUS SIGN (∓)
14:41 moritz pmichaud++ # #phasers pre-report
14:43 ingy o/
14:44 bluescreen10 joined #perl6
14:44 ingy TimToady: 你好吗
14:44 colomon joined #perl6
14:44 wtw left #perl6
14:45 ingy TimToady: have you seen skritter.com?
14:45 ingy I'm totally hooked
14:45 ingy been using it a couple months
14:45 * TimToady doesn't need another hookage at the moment...
14:46 ingy got my bamboo drawing pad and all
14:46 ingy TimToady: try the 5 min demo
14:46 ingy srsly
14:46 ingy just try for 2 mins
14:48 ingy I can actually write all the chinese I know, legibly now
14:49 JimmyZ 大家好
14:51 * ingy hopes he hasn't ruined the future of perl 6
14:52 ingy as he drifts off to sleep on the other side of the equator
14:53 dur-randir left #perl6
14:56 Trashlord left #perl6
14:57 mishnick joined #perl6
14:59 mishnick_ joined #perl6
15:00 mishnick left #perl6
15:01 SHODAN left #perl6
15:01 spinclad left #perl6
15:03 proller left #perl6
15:03 proller_ joined #perl6
15:04 mishnick_ left #perl6
15:04 Lorn left #perl6
15:09 Trashlord joined #perl6
15:10 dur-randir joined #perl6
15:12 risou_awy is now known as risou
15:12 risou_ joined #perl6
15:19 jdv79 jnthn: wow, blog posts since february.  thanks!  very exciting news:)
15:20 leprevost left #perl6
15:21 Trashlord left #perl6
15:23 Trashlord joined #perl6
15:23 alester joined #perl6
15:31 Lorn joined #perl6
15:36 tzhs left #perl6
15:39 MayDaniel joined #perl6
15:42 snearch joined #perl6
15:44 MayDaniel left #perl6
15:45 Trashlord left #perl6
15:48 Trashlord joined #perl6
15:49 moritz tadzik: the reason I did so much work on the test suite was that I mentored a GSOC project that cleaned up and enhanced the test suite. So I thought I better know something about before the project starts :-)
15:50 moritz tadzik: and somehow I got stuck with it
15:50 moritz tadzik: so mentoring your pod parsing stuff sounds much easier, since I roughly know what Pod6 is supposed to look like, and I've written parsers before :-)
15:51 mj41 left #perl6
15:55 tadzik :)
15:57 [particle] left #perl6
16:01 newbee joined #perl6
16:03 [particle]1 joined #perl6
16:03 newbee rakudo: class A { has @.data is rw; submethod BUILD {push @.data, 1, 2, 3}; }; my $a = A.new; say $a.perl;
16:03 p6eval rakudo 5f1bf6: OUTPUT«A.new(data => [1, 2, 3])␤»
16:04 newbee rakudo: class A { has @.data is rw; submethod BUILD {push @.data, 1, 2, 3}; }; my $a = A.new; say $a.data.perl;
16:04 p6eval rakudo 5f1bf6: OUTPUT«[1, 2, 3]␤»
16:04 newbee rakudo: class A { has @.data is rw; submethod BUILD {push @.data, 1, 2, 3}; }; my $a = A.new; say @a.data.perl;
16:04 p6eval rakudo 5f1bf6: OUTPUT«===SORRY!===␤Symbol '@a' not predeclared in <anonymous> (/tmp/q2bJLcNwb9:22)␤»
16:05 Trashlord left #perl6
16:05 moritz newbee: use @!a in BUILD
16:06 Retromingent joined #perl6
16:06 newbee rakudo: class A { has @.data is rw; submethod BUILD {push @.data, 1, 2, 3}; }; my $a = A.new; say $a.data.elems;
16:06 Retromingent left #perl6
16:06 p6eval rakudo 5f1bf6: OUTPUT«3␤»
16:06 cdarroch joined #perl6
16:06 cdarroch left #perl6
16:06 cdarroch joined #perl6
16:06 newbee thanks moritz... but $. works, why should i use $! ?
16:06 Retromingent joined #perl6
16:07 moritz newbee: because in BUILD the object isn't fully constructed yet, so the more low-level construct is safer
16:07 domidumont left #perl6
16:07 TimToady std: class A { has @.data is rw; submethod BUILD {push @.data, 1, 2, 3} }
16:07 p6eval std a71faea: OUTPUT«[31m===[0mSORRY![31m===[0m␤Virtual call @.data may not be used on partially constructed object at /tmp/Xq94M6tS_g line 1:␤------> [32mhas @.data is rw; submethod BUILD {push [33m⏏[31m@.data, 1, 2, 3} }[0m␤Check failed␤FAILED 00:01 117m␤»
16:08 moritz newbee: also you'll sometimes want to use non-rw attributes, then you *have* to use @!a. Better get used to it :-)
16:09 newbee i'm a little confused....$! mean "private" and $. means "public" ?
16:10 TimToady no, $. means abstract, and $! means concrete
16:10 TimToady but you're correct insofar as the general public are allowed to see only the abstract interface
16:11 TimToady and the implementation is not allowed to use the abstract interface until the concrete guts of the object are constructed
16:12 TimToady so you can think of them as public and private, but it's more like $. is a virtual method call, while $! is the actual storage slot
16:12 tadzik I always read $. as "has a public accessor"
16:13 TimToady which is virtual :)
16:13 tadzik and $! as "is an object attribute"
16:13 tadzik virtual in what way?
16:13 moritz but outside 'has', $.foo really means  self.foo or self.foo.item or so
16:13 TimToady it calls back via self, which may be more derived than ::?CLASS
16:13 tadzik mhm
16:14 TimToady so your children are allowed to override the meaning of your attribute
16:14 TimToady sometimes you want to talk to your children, and sometimes you don't... :)
16:14 spq joined #perl6
16:14 tadzik the meaning of the attribute, or the accessor?
16:14 newbee_ joined #perl6
16:15 TimToady the meaning of the abstract attribute
16:15 newbee_ yes, but is better to think about it in terms of "concrete" and "abstract". All this time i was thinking on "public" and "private" hence my confusion
16:16 tadzik when in Perl, I rarely think Public and Private :)
16:16 newbee left #perl6
16:16 [particle]1 left #perl6
16:17 TimToady or think of it as "interface" vs "implementation"
16:17 bluescreen10 left #perl6
16:17 TimToady or as "on the record" vs "off the record", if you're a politician...
16:17 bluescreen10 joined #perl6
16:18 Trashlord joined #perl6
16:18 newbee_ $! = attribute needed for the implementation; $. = "interface" attribute
16:19 TimToady or "de jure" vs "de facto"
16:19 newbee_ what if i want a variable to be both?
16:20 tadzik the second one is not a variable :>
16:21 tadzik btw: does $!a is rw; make any sense?
16:21 newbee_ example.... a class that analizes a text file. I want to specify on BUILD time the $!filename. But i want to change it later so the same object analizes another file.
16:21 tadzik newbee_: you can always change it later. But when you want a read-write accesor from the outside world, is rw is the way
16:22 tadzik rakudo: class Foo { has $.a is rw; }; my $a = Foo.new(a => 5); $a.a = 'b'; $a.a.say
16:22 p6eval rakudo 5f1bf6: OUTPUT«b␤»
16:23 TimToady but from a functional programming point of view, modifying your object's is likely to be poor design
16:23 TimToady FP tends to prefer immutable objects
16:23 TimToady s/"'s"//
16:23 p6eval left #perl6
16:25 p6eval joined #perl6
16:25 grzniuk joined #perl6
16:26 grzniuk left #perl6
16:27 [particle] joined #perl6
16:28 * JimmyZ thought one is public and another is private and there is no protected
16:29 TimToady public/private is more about different kinds of access to the same kind of thing
16:29 TimToady $! and $. are about different kinds of things
16:30 TimToady "physical" vs "logical"
16:30 TimToady "is rw" is more about access (but only controls write access)
16:31 JimmyZ they are more like lvalue methods ?
16:31 TimToady yes, you get readonly accessors otherwise
16:34 newbee_ left #perl6
16:35 TimToady normal "logical" attributes declared with $. are "look but don't touch", whereas "$. is rw" is, er, more promiscuous...
16:36 Trashlord left #perl6
16:38 TimToady private vs public works as a metaphor, as long as you understand that your public personna can change every time you mixin a new role
16:39 TimToady new roles can put wrappers or derived methods around your own accessors
16:39 newbee__ joined #perl6
16:39 Trashlord joined #perl6
16:42 [particle] left #perl6
16:43 M_o_C joined #perl6
16:44 * JimmyZ sleeps
16:44 JimmyZ left #perl6
16:50 Trashlord left #perl6
16:52 Trashlord joined #perl6
16:53 mtk left #perl6
16:53 newbee__ left #perl6
16:54 mtk joined #perl6
16:54 aindilis left #perl6
16:55 aindilis` joined #perl6
16:56 dakkar left #perl6
16:57 mishnick joined #perl6
16:58 mishnick join #perl
16:58 mishnick left #perl6
16:58 newbee_ joined #perl6
16:59 Vlavv` left #perl6
17:00 p6eval left #perl6
17:01 p6eval joined #perl6
17:02 mtk left #perl6
17:03 mtk joined #perl6
17:03 thou joined #perl6
17:04 Trashlord left #perl6
17:06 birdwindupbird left #perl6
17:06 xinming_ left #perl6
17:06 Vlavv` joined #perl6
17:07 [particle]1 joined #perl6
17:07 xinming joined #perl6
17:08 [particle]1 is now known as [particle]
17:10 wamba joined #perl6
17:10 dsouza left #perl6
17:12 hercynium joined #perl6
17:12 newbee_ what does this error mean: "get_attr_str() not implemented in class 'Sub'"?
17:13 tadzik that means something is broken
17:15 colomon quite likely both your code and Rakudo.  :)
17:16 tadzik could be :)
17:19 icwiener joined #perl6
17:29 colomon newbee_: what I'm trying to say is, most likely Rakudo responded to your broken code in a broken fashion.  It's hard to get more specific without seeing the code in question.  (And it might merely be a Rakudo bug, I've run into that message a few times recently myself.)
17:34 newbee_ rakudo: class Holidays { has DateTime @.hd is rw; has submethod BUILD(@dates) { for (@dates) {push @.hd, $_~'T00:00:00Z';} }; }; my $h = Holidays.new("2011-01-01T00:00:00Z", "2011-12-25T00:00:00Z"); say $h.perl;
17:34 p6eval rakudo 5f1bf6: OUTPUT«Not enough positional parameters passed; got 1 but expected 2␤  in 'Holidays::BUILD' at line 22:/tmp/aQ0JU1_MRK␤  in main program body at line 22:/tmp/aQ0JU1_MRK␤»
17:34 newbee_ rakudo: class Holidays { has DateTime @.hd is rw; has submethod BUILD(*@dates) { for (@dates) {push @.hd, $_~'T00:00:00Z';} }; }; my $h = Holidays.new("2011-01-01T00:00:00Z", "2011-12-25T00:00:00Z"); say $h.perl;
17:34 p6eval rakudo 5f1bf6: OUTPUT«Holidays.new(hd => [])␤»
17:36 newbee_ i expected at least an exception because T00:00:00Z was repeated, but it seems that BUILD ignores the args... or i'm doing something very wrong (very likely)
17:36 Juerd That T in there was a huge mistake
17:36 Juerd By the ISO people
17:38 colomon rakudo: class Holidays { has @.hd is rw; has submethod BUILD(*@dates) { for (@dates) {push @.hd, $_~'T00:00:00Z';} }; }; my $h = Holidays.new("2011-01-01T00:00:00Z", "2011-12-25T00:00:00Z"); say $h.perl;
17:38 p6eval rakudo 5f1bf6: OUTPUT«Holidays.new(hd => [])␤»
17:38 colomon rakudo: class Holidays { has @.hd is rw; has submethod BUILD(*@dates) { say "I got called!"; for (@dates) {push @.hd, $_~'T00:00:00Z';} }; }; my $h = Holidays.new("2011-01-01T00:00:00Z", "2011-12-25T00:00:00Z"); say $h.perl;
17:38 p6eval rakudo 5f1bf6: OUTPUT«I got called!␤Holidays.new(hd => [])␤»
17:39 newbee_ rakudo: class Holidays { has DateTime @.hd is rw; submethod BUILD(*@dates) { for (@dates) {push @.hd, $_~'T00:00:00Z';} }; }; my $h = Holidays.new("2011-01-01", "2011-12-25"); say $h.perl;
17:39 p6eval rakudo 5f1bf6: OUTPUT«Holidays.new(hd => [])␤»
17:39 newbee_ rakudo: class Holidays { has DateTime @.hd is rw; submethod BUILD(*@dates) { for (@dates) {push @!hd, $_~'T00:00:00Z';} }; }; my $h = Holidays.new("2011-01-01", "2011-12-25"); say $h.perl;
17:39 p6eval rakudo 5f1bf6: OUTPUT«Holidays.new(hd => [])␤»
17:40 colomon rakudo: class Holidays { has @.hd is rw; has submethod BUILD(*@dates) { say "I got called!"; for (@dates) {say "a"; push @.hd, $_~'T00:00:00Z';} }; }; my $h = Holidays.new("2011-01-01T00:00:00Z", "2011-12-25T00:00:00Z"); say $h.perl;
17:40 p6eval rakudo 5f1bf6: OUTPUT«I got called!␤Holidays.new(hd => [])␤»
17:41 colomon so there's nothing in @dates.
17:41 Chillance joined #perl6
17:41 * colomon has to admit he doesn't remember how BUILD is supposed to work.
17:42 newbee_ :(
17:42 colomon rakudo: class Holidays { has @.hd is rw; submethod BUILD(*@dates) { say "I got called!"; for (@dates) {say "a"; push @.hd, $_~'T00:00:00Z';} }; }; my $h = Holidays.new("2011-01-01T00:00:00Z", "2011-12-25T00:00:00Z"); say $h.perl;
17:42 p6eval rakudo 5f1bf6: OUTPUT«I got called!␤Holidays.new(hd => [])␤»
17:43 newbee_ well... i tried too using @dates without *, but didn't work: "Not enough positional parameters passed; got 1 but expected 2".
17:44 impious joined #perl6
17:44 colomon oh, that's a sign right there.
17:44 colomon The one it got was "self"
17:45 newbee_ rakudo: class Holidays { has DateTime @.hd is rw; submethod BUILD(@dates) { say @dates.perl }; }; my @d=<2011-01-01 2011-12-25>; my $h = Holidays.new(@d);
17:45 p6eval rakudo 5f1bf6: OUTPUT«Not enough positional parameters passed; got 1 but expected 2␤  in 'Holidays::BUILD' at line 22:/tmp/Xe6HNQJkoH␤  in main program body at line 22:/tmp/Xe6HNQJkoH␤»
17:45 colomon by making it *@dates, you allowed the empty array as an option passing in
17:45 TimToady this is all bogus
17:45 TimToady new and BUILD take named params
17:45 colomon TimToady: hey, we were just getting there.
17:45 TimToady *only*
17:46 colomon by process of elimination
17:46 colomon default new, you mean.
17:46 TimToady I see no redef of new there...
17:46 colomon right, you're right about this code.
17:47 TimToady yes, default new, but BUILD is always called with named parames
17:47 JodaZ left #perl6
17:47 TimToady *ms
17:47 colomon I'm just saying you're allowed to write a new method which takes positional params.
17:47 TimToady er, named args...
17:48 TimToady sure, but ya can't do it by changing BUILD's sig
17:48 newbee_ rakudo: class Holidays { has DateTime @.hd is rw; submethod BUILD(@dates) { say @dates.perl }; }; my @d=<2011-01-01 2011-12-25>; my $h = Holidays.new(dates=>@d);
17:48 JodaZ joined #perl6
17:48 p6eval rakudo 5f1bf6: OUTPUT«["2011-01-01", "2011-12-25"]␤»
17:48 newbee_ rakudo: class Holidays { has DateTime @.hd is rw; submethod BUILD(*@dates) { for (@dates) {push @!hd, $_~'T00:00:00Z';} }; }; my $h = Holidays.new(dates=><2011-01-01 2011-12-25>); say $h.perl;
17:48 p6eval rakudo 5f1bf6: OUTPUT«Holidays.new(hd => [])␤»
17:49 pernatiy left #perl6
17:49 TimToady newbee_: you can't use a slurpy parameter in a BUILD, is one result of what I said earlier
17:50 colomon rakudo: class Holidays { has @.hd is rw; submethod BUILD(:@dates) { say "I got called!"; for (@dates) {say "a"; push @.hd, $_~'T00:00:00Z';} }; }; my $h = Holidays.new(:dates(["2011-01-01T00:00:00Z", "2011-12-25T00:00:00Z"])); say $h.perl;
17:50 p6eval rakudo 5f1bf6: OUTPUT«I got called!␤a␤a␤Holidays.new(hd => ["2011-01-01T00:00:00ZT00:00:00Z", "2011-12-25T00:00:00ZT00:00:00Z"])␤»
17:50 colomon TimToady++ # rescuing me from spending the next hour trying to figure that out via trial and error
17:51 colomon TimToady: is there somewhere in the spec that explains BUILD?  I started looking in S12, and I've seen a bunch of references to it, but nothing so far that explains how it is expected to be used.
17:52 colomon newbee_: why are you trying to use BUILD instead of overloading new, anyway?
17:52 newbee_ BUILD is the way to make constructors ???
17:52 tadzik not exactly
17:53 tadzik ...but I'm not an expert in the field :)
17:53 colomon rakudo: class Holidays { has @.hd is rw; multi method new(*@dates) {for (@dates) {push @.hd, $_~'T00:00:00Z';} }; }; my $h = Holidays.new("2011-01-01T00:00:00Z", "2011-12-25T00:00:00Z"); say $h.perl;
17:53 p6eval rakudo 5f1bf6: OUTPUT«Type objects are abstract and have no attributes, but you tried to access @!hd␤  in <anon> at line 22:/tmp/Ng0cYcb_yv␤  in 'Holidays::new' at line 1␤  in main program body at line 22:/tmp/Ng0cYcb_yv␤»
17:54 colomon errr...
17:54 TimToady it's all(?) explained in S12:748
17:54 colomon rakudo: class Holidays { has @.hd is rw; multi method new(*@dates) { bless(*, :hd(@dates)); }; }; my $h = Holidays.new("2011-01-01T00:00:00Z", "2011-12-25T00:00:00Z"); say $h.perl;
17:54 p6eval rakudo 5f1bf6: OUTPUT«Could not find sub &bless␤  in 'Holidays::new' at line 22:/tmp/nvUWNf3wCm␤  in main program body at line 22:/tmp/nvUWNf3wCm␤»
17:54 colomon urk
17:55 colomon rakudo: class Holidays { has @.hd is rw; multi method new(*@dates) { self.bless(*, :hd(@dates)); }; }; my $h = Holidays.new("2011-01-01T00:00:00Z", "2011-12-25T00:00:00Z"); say $h.perl;
17:55 p6eval rakudo 5f1bf6: OUTPUT«Holidays.new(hd => ["2011-01-01T00:00:00Z", "2011-12-25T00:00:00Z"])␤»
17:55 colomon there you are
17:55 moritz newbee_: http://perlgeek.de/blog-en/perl-6/objec​t-construction-and-initialization.html
17:55 newbee_ :D
17:55 colomon of course, that doesn't do what you wanted with DateTime...
17:56 newbee_ class Holidays { has DateTime @.hd is rw; submethod BUILD(@dates) { for (@dates) {push @!hd, $_~'T00:00:00Z';} }; }; my $h = Holidays.new(dates => <2011-15-99 2011-12-25>); say $h.perl;
17:56 newbee_ rakudo: class Holidays { has DateTime @.hd is rw; submethod BUILD(@dates) { for (@dates) {push @!hd, $_~'T00:00:00Z';} }; }; my $h = Holidays.new(dates => <2011-15-99 2011-12-25>); say $h.perl;
17:56 p6eval rakudo 5f1bf6: OUTPUT«Holidays.new(hd => ["2011-15-99T00:00:00Z", "2011-12-25T00:00:00Z"])␤»
17:56 Zapelius joined #perl6
17:57 Zapelius left #perl6
17:58 brill joined #perl6
17:58 newbee_ i will try to use 'new' instead of BUILD from now on... the thing is, i expected an exception for 2011-15-99 as a DateTime
17:58 Zapelius joined #perl6
17:58 colomon I don't think Rakudo implements types on class members yet.
17:58 p6eval left #perl6
17:58 M_o_C left #perl6
17:59 newbee_ ahh,, it's ok then :)
17:59 brill left #perl6
17:59 hercynium left #perl6
17:59 p6eval joined #perl6
18:00 moritz .oO( fix in ... )
18:00 newbee_ sorry for all these newbee questions... i'll try to not honor my nickname so much from now on :)
18:01 brill joined #perl6
18:01 p6eval left #perl6
18:01 impious left #perl6
18:02 p6eval joined #perl6
18:04 moritz newbee_: that's ok, there's not too much material for learning Perl 6 otherwise yet
18:06 brill Sorry? Just went online. What is the best material for learning Perl 6 right now?
18:06 tadzik are you a Perl5-er?
18:06 moritz brill: asking here, "Using Perl 6" and a few blogs out there
18:07 moritz http://perl6.org/documentation/
18:07 brill Yes. I dabbled a bit with Perl 5.
18:07 tadzik oh, I remember fixing this page to be helpful to everyone :)
18:07 moritz brill: http://perlgeek.de/en/article/5-to-6 maybe
18:07 tadzik oh, I could also add "Write about Pod6 for the Perl 6 Book" to my proposal
18:08 brill Thanks all.
18:16 proller_ left #perl6
18:18 am0c joined #perl6
18:32 lumi_ joined #perl6
18:46 brill left #perl6
18:49 cdarroch left #perl6
18:54 risou_ left #perl6
18:54 risou is now known as risou_awy
18:58 kjeldahl joined #perl6
19:05 tadzik seen masak
19:05 aloha masak was last seen in #perl6 2 days 5 hours ago saying "pivo &".
19:05 tadzik what a pivo
19:07 tadzik seen jnthn
19:07 aloha jnthn was last seen in #perl6 2 days 6 hours ago saying "masak is so impure... :P".
19:17 alester pmichaud: Did we miss something in the migration? http://twitter.com/chromatic_​x/statuses/70568033420181504
19:18 mikehh joined #perl6
19:27 fhelmberger left #perl6
19:33 lichtkind joined #perl6
19:34 lichtkind TimToady: may I ask you something more demanding?
19:36 [particle] left #perl6
19:37 birdwindupbird joined #perl6
19:44 IllvilJa joined #perl6
19:45 flussence *sigh*... guy at $dayjob today said he was going to ignore perl 6 "until it's released and distros are shipping it". Maybe I should introduce him to Debian stable some time...
19:45 flussence (or at least, a version newer than 3.0...)
19:45 pernatiy joined #perl6
19:46 Tene flussence: I've still got Debian 3.1 boxes at work; we've been migrating to a reasonable distro, but not finished yet
19:47 colomon chromatic's asking about rakudo.org on twitter atm...
19:48 [particle] joined #perl6
19:48 IllvilJa Gentoo got rakudo ebuilds, even if they are masked out as 'testing'.
19:48 perigrin only about the status page and the benchmarks
19:49 IllvilJa flussence: my last sentence was a reply to you, BTW.
19:49 IllvilJa flussence: you can inflict the Gentoo experience upon him at any time :-).
19:50 flussence nah, someone's already done that before I started working there. Half our servers haven't been updated since gentoo still used version numbers :)
19:50 icwiener left #perl6
19:52 flussence (on the other hand, his refusal to update the OS on them gave me an excuse to install perlbrew on everything and get out of the 5.8 dark ages)
19:55 [particle] left #perl6
19:55 tadzik rakudo: my $a = "a{time}"; say $a; sleep 2; say $a
19:55 p6eval rakudo 5f1bf6: OUTPUT«a1305662107␤a1305662107␤»
19:55 tadzik hrm
19:55 flussence cached?
19:56 moritz rakudo: say time
19:56 p6eval rakudo 5f1bf6: OUTPUT«1305662181␤»
19:56 tadzik no, that was expected
19:56 * flussence files a flussencebug
19:57 pmichaud mberends: patched zavolaj isn't working for you?
19:58 pmichaud I responded briefly (is there any other way?) to chromatic's tweet
19:58 PacoLinux left #perl6
20:02 [particle] joined #perl6
20:11 tadzik colomon: I managed to resurrect this script, all it does is that it prints the return value and the output of prove of the chosen module
20:12 tadzik although there is some IPC::Run fail (there's a Perl5 script, I'm not sure what for, but I don't feel like questioning my 3-month-old logic :)
20:14 tadzik colomon: https://github.com/tadzik/popolnik-client
20:14 colomon tadzik++
20:14 tadzik use like 'perl popolnik.pl Acme::Meow'
20:14 tadzik colomon++
20:14 tadzik still, there's some IPC::Run fail as I said, you can fix this if you feel like this
20:14 REPLeffect joined #perl6
20:15 tadzik maybe a total rewrite will help it too, it was written for some old panda
20:21 spq left #perl6
20:27 birdwindupbird left #perl6
20:31 PacoLinux joined #perl6
20:34 snearch left #perl6
20:36 wknight8111 left #perl6
20:39 wamba left #perl6
20:41 kjeldahl left #perl6
20:45 mtk left #perl6
20:46 mtk joined #perl6
20:52 icwiener joined #perl6
20:52 wamba joined #perl6
20:57 noganex joined #perl6
20:58 noganex_ left #perl6
21:08 dju__ joined #perl6
21:11 dju_ left #perl6
21:14 hercynium joined #perl6
21:16 stepnem left #perl6
21:18 noganex_ joined #perl6
21:20 carlin joined #perl6
21:21 noganex left #perl6
21:21 carlin rakudo: module foo { our $bar = 42; }; say $foo::quux;
21:21 p6eval rakudo 5f1bf6: OUTPUT«Null PMC access in type()␤  in main program body at line 22:/tmp/j6aVkyYZDR␤»
21:21 carlin rakudo: module foo { our $bar = 42; }; say $foo::quux ~ "baz";
21:21 p6eval rakudo 5f1bf6: OUTPUT«Null PMC access in can()␤  in main program body at line 1:/tmp/B4oO2Hehul␤»
21:22 carlin Are those already reported?
21:22 stepnem joined #perl6
21:30 wamba left #perl6
21:31 mj41 joined #perl6
21:38 kaare_ left #perl6
21:38 carlin left #perl6
21:43 ymasory left #perl6
21:50 dominicus joined #perl6
21:50 dominicus When will Perl 6 be ready?
21:52 mikehh dominicus: ready for what?
21:53 dominicus mikehh: Use within a production environment.
21:53 sjohnson for the public
21:54 bluescreen10 left #perl6
21:54 flussence Use Debian stable if you want a production environment, it's been shipping perl 6 for a while now.
21:55 mikehh Christmas of course, but I already use it for some things
21:55 nebuchadnezzar left #perl6
21:58 mikehh for quick scripts there is nothing better
21:58 mikehh not necessarily run time, but certainly setting them up
21:59 mikehh of course some things are still missing, but no other language has everything anyway
22:00 mikehh and rakudo has a lot available
22:04 dur-randir left #perl6
22:05 dju__ left #perl6
22:05 dju__ joined #perl6
22:08 hercynium left #perl6
22:13 donri left #perl6
22:18 newbee_ left #perl6
22:25 jevin left #perl6
22:28 lichtkind left #perl6
22:30 whiteknight joined #perl6
22:37 broquaint left #perl6
22:38 pmichaud perl 6 is in debian stable?
22:39 Juerd That'd be funny
22:39 nebuchadnezzar joined #perl6
22:40 nebuchadnezzar left #perl6
22:40 nebuchadnezzar joined #perl6
22:41 * tylercurtis doesn't see it in aptitude.
22:41 pmichaud yes, I've looked for it before with no success.  There's a "rakudo" package in debian experimental, apparently, but it's 2010.01 or somesuch
22:42 pmichaud I'll probably want to start a new package or see if we can bump the package maintainers a bit
22:46 mj41 left #perl6
22:51 icwiener left #perl6
22:56 kst left #perl6
23:01 alester left #perl6
23:01 dju__ is now known as dju
23:08 mtk left #perl6
23:11 stepnem left #perl6
23:15 sftp left #perl6
23:15 noganex_ left #perl6
23:17 kst joined #perl6
23:20 risou_awy is now known as risou
23:20 risou_ joined #perl6
23:23 molaf_ joined #perl6
23:25 noganex joined #perl6
23:27 molaf left #perl6
23:28 stepnem joined #perl6
23:38 am0c left #perl6
23:42 Chillance left #perl6
23:46 jaldhar joined #perl6
23:50 Moukeddar joined #perl6
23:50 Moukeddar left #perl6

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

Perl 6 | Reference Documentation | Rakudo