Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2010-04-03

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:00 lue out of a total of... [ :) ]
00:01 snarkyboojum rakudo is rapidly approaching [enlightenment] :P
00:01 masak reading through http://rt.perl.org/rt3/Ticket/Display.html?id=64928 again, I have the thought that we're running something of a double standard claiming that the % in %foo means 'Associative' nowadays, but when the parameter %foo? wasn't passed, it's an empty Hash.
00:01 masak or even 'my %foo', I guess.
00:01 jnthn Associative is a role, though.
00:01 jnthn A very minimal one at that.
00:02 sorear it's not possible to instantiate Associative
00:02 masak sure it is!
00:02 jnthn It's the same with @ and (Positional/Iterable)
00:02 sorear Hash is the most basic implementation of Associative
00:02 jnthn Well yeah, sure. It'd be useless though.
00:02 sorear masak: if it works it's a bug
00:02 masak sorear: no, this is: class Empty does Associative {}
00:02 sorear masak: that's a semantic error, Associative has required methods
00:02 masak sorear: no, there's role->class punning.
00:02 masak sorear: no, it doesn't :)
00:03 sorear a role with no required methods can be punned to a class
00:03 sorear what's the implementation of Associative.postcircumfix({ })?
00:03 masak good question.
00:04 masak probably not something sensible.
00:05 lue what exactly *is* a role, and why is it useful for something like Temporal?
00:06 masak lue: a role is a way to collect behaviour (methods) into a single OO package.
00:06 sorear masak: let's pester TimToady to remove the implementation and make me right
00:06 masak lue: what used to be done with inheritance can sometimes be done more cleanly with a role.
00:06 masak sorear: aye. :)
00:07 lue I wish I could find role in the spec :)
00:08 masak rakudo: class A { method foo { say "OH A!" } }; class B { method foo { say "OH B!" } }; class C is A is B {}; C.new.foo
00:08 p6eval rakudo 3469ff: OUTPUT«OH A!␤»
00:09 masak lue: that might not be what the author of C intended...
00:09 masak rakudo: role A { method foo { say "OH A!" } }; role B { method foo { say "OH B!" } }; class C does A does B {}
00:09 sorear I see nothing in S32 speccing an implementation for it
00:09 p6eval rakudo 3469ff: OUTPUT«Method 'foo' collides and a resolution must be provided by the class␤current instr.: 'perl6;Perl6;Metamodel;RoleToClassApplier;_block132' pc 9109 (src/gen/RoleToClassApplier.pir:306)␤»
00:09 masak much better :)
00:09 sorear only that one must be provided
00:09 lue Perl6: where a failure is better
00:10 masak sorear: yes. it's a bit unclear what that mean.
00:10 masak lue: well, it's the case of failing early to make sure you get it right.
00:10 sorear rakudo: say Associative.new{'x'}
00:10 masak lue: and if C declares its own .foo to disambiguate, the error goes away.
00:10 p6eval rakudo 3469ff: OUTPUT«get_pmc_keyed() not implemented in class ''␤current instr.: 'perl6;Associative[::T];postcircumfix:<{ }>' pc 13832 (src/builtins/Code.pir:85)␤»
00:10 masak :)
00:11 * masak submits rakudobug
00:11 lue so, role is good for the vanilla implementation, to allow people to not be stupid.
00:11 masak rakudo: say Positional.new[42]
00:11 p6eval rakudo 3469ff: OUTPUT«get_pmc_keyed() not implemented in class ''␤current instr.: 'perl6;Positional[::T];postcircumfix:<[ ]>' pc 10506 (src/metamodel/GrammarHOW.pir:44)␤»
00:11 masak lue: roles are a good way to collect behaviour independent of class hierarchies.
00:12 masak because sometimes behaviour isn't concentrated to just a clade in the hierarchy.
00:12 lue So I just use Roles unless there's a need not to :)
00:14 masak well... that's an open question :)
00:14 masak now that we have roles, do we switch to them for everything, or do we stay with classes when there's no obvious reason to switch.
00:14 masak s/\.$/?/
00:14 snarkyboojum you can't build role hierarchies can you..
00:15 lue why not just a subroutine?
00:15 masak snarkyboojum: a role can do another role.
00:15 snarkyboojum so you can compose roles of other roles..
00:15 jnthn A role can do many other roles. :-)
00:15 jnthn snarkyboojum: aye.
00:15 masak lue: how do you mean, a subroutine?
00:15 snarkyboojum ah k
00:15 lue then what is the difference between a sub and a role ?
00:16 masak lue: I pose the 'should we use roles for everything?' question at the end of http://use.perl.org/~masak/journal/40107 , by the way
00:16 masak lue: a sub is a piece of code. a role is an abstraction, much like a package.
00:16 masak lue: the former can be called. the latter can be used as a type.
00:17 lue thank you, now I know :)
00:17 lue .oO(little did everyone know, this was the day lue destroyed the whole of P6...)
00:18 masak I think it's a bit late in the game for that...
00:18 snarkyboojum "Consider using C when you simply want to factor out common code." ho ho ho
00:19 masak oh!
00:19 masak it should say 'roles' there.
00:19 * masak fixes
00:19 snarkyboojum oh ok :)
00:19 snarkyboojum freudian slip perhaps? :P
00:19 lue Oh, I could destroy the whole of P6 the day before Rakudo * using a combination of real and inane logic :)
00:20 masak snarkyboojum: well, use.perl.org turned C<roles> into just 'C' :)
00:20 snarkyboojum masak: ah - so a conspiracy! :P
00:20 * colomon is having the urge to do a blog post singing the praises of the Rakudo team and the Perl 6 design.  The [op] patch today really made me happy.
00:21 masak snarkyboojum: just because you're paranoid doesn't mean they're not after you! :)
00:21 * colomon also has like four hours to get the house ready for the packers, so unlikely to be any happy blogging tonight....
00:21 snarkyboojum colomon: then I'll have to post an update on identi.ca about how cool justrakudoit is :P
00:26 pugssvn r30282 | masak++ | [S12] removed unnecessary C<>
00:26 * masak heading home to make midnight pasta :)
00:26 jnthn omg I gets midnight pasta made for me! \o/
00:27 lue is there anyway I can preview the outcome of pod documents?
00:27 jnthn o/
00:27 lue (the spec)
00:29 snarkyboojum rakudo: class Animal does Pet {}; role Pet { method pat() { say "Lick, lick" } };
00:29 p6eval rakudo 3469ff: OUTPUT«Null PMC access in type()␤current instr.: 'perl6;Animal;!class_init_11' pc 374 (EVAL_1:167)␤»
00:30 snarkyboojum rakudo: class Animal does Pet {...}; role Pet { method pat() { say "Lick, lick" } };
00:30 p6eval rakudo 3469ff:  ( no output )
00:31 niros joined #perl6
00:35 snarkyboojum rakudo: class Animal does Pet { }; role Pet does Bite { }; role Bite { method bite() { say "ouch" } };
00:35 p6eval rakudo 3469ff: OUTPUT«Null PMC access in type()␤current instr.: 'perl6;Animal;!class_init_11' pc 390 (EVAL_1:171)␤»
00:39 * sorear tries to think of a good workaround for non-reentrant p5 hash iterators
00:40 meppl joined #perl6
00:42 colomon 30316 tests passing the latest run!  \o/
00:42 snarkyboojum I get fails in my spectest runs :|
00:43 colomon in instance.t?
00:44 snarkyboojum yep and others
00:44 colomon I think most of us are getting instance.t issues.
00:45 colomon as for the others, what do you get when you do svn info t/spec
00:45 colomon ?
00:45 colomon in particular, what revision?
00:45 snarkyboojum r30250
00:46 snarkyboojum oops
00:46 snarkyboojum sorry r30282
00:47 colomon hmmm, actually you're one revision ahead of me.
00:47 snarkyboojum just doing another run
00:47 colomon are you at 3469ffe042f2b2f749a163cbdb80289120d06a51 in git?
00:47 snarkyboojum yep
00:48 colomon then I have no explanation.  :)
00:49 snarkyboojum I get failures in S02-literals/fmt-interpolation, S02-literals/char-by-number, S05-mass/rx, S12-methods/instance
00:49 snarkyboojum oh well :) will have a look'see
00:50 colomon > say ([\*] 1..10).perl
00:50 colomon [1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800]
00:50 colomon nice
00:50 colomon moritz_++ jnthn++
00:52 colomon we don't have =:= yet, do we?
00:53 lue just for reference, is Int a role?
00:54 lue *defined as*
00:54 colomon no
00:54 colomon Int is a type
00:55 * snarkyboojum would have thought it'd be a class
00:55 colomon Int does the Real and Numeric roles
00:55 colomon er, you say class, I say type.  :)
00:55 colomon it is a class, for sure.
00:55 snarkyboojum colomon: aye - you beat me to it (with a more appropriate answer) :)
00:56 lue my question is, for something like "my [type] $a = [something]", would [type] be implemented as a role?
00:56 colomon It could be a role or a class.
00:57 snarkyboojum rakudo: my $a = 5; my $b = $a; say $a =:= $b
00:57 colomon when you say [type] there, it is a check to make sure the variable is of that type.
00:57 p6eval rakudo 3469ff: OUTPUT«0␤»
00:57 snarkyboojum rakudo: my $a = 5; my $b := $a; say $a =:= $b
00:57 p6eval rakudo 3469ff: OUTPUT«:= binding of variables not yet implemented␤current instr.: '&die' pc 17215 (src/builtins/Junction.pir:399)␤»
00:57 snarkyboojum alpha: my $a = 5; my $b := $a; say $a =:= $b
00:57 colomon rakudo: my Numeric $a; $a = 1; say $a; $a = "hello"; say $a;
00:57 p6eval alpha 30e0ed: OUTPUT«1␤»
00:57 p6eval rakudo 3469ff: OUTPUT«1␤Type check failed for assignment␤current instr.: '&die' pc 17215 (src/builtins/Junction.pir:399)␤»
00:57 snarkyboojum rakudo doesn't complain about =:= being NYI, but it does for binding
00:59 snarkyboojum where Numeric is a role I suppose
01:00 snarkyboojum rakudo: say Num ~~ Numeric
01:00 p6eval rakudo 3469ff: OUTPUT«1␤»
01:00 colomon Numeric is the fundamental number role, yes.
01:00 snarkyboojum Num and Numeric :S
01:01 snarkyboojum rakudo: say Num ~~ Int
01:01 p6eval rakudo 3469ff: OUTPUT«0␤»
01:01 snarkyboojum rakudo: say Int ~~ Num
01:01 p6eval rakudo 3469ff: OUTPUT«1␤»
01:01 colomon Num is Perl 6's basic floating point type.
01:01 colomon Int is not supposed to be a Num any more, I'll have to fix that.
01:01 snarkyboojum yeah, just looking at the names
01:01 snarkyboojum oh ok
01:01 lue afk
01:02 snarkyboojum rakudo: say Int ~~ Numeric
01:02 p6eval rakudo 3469ff: OUTPUT«1␤»
01:02 snarkyboojum rakudo: say Complex ~~ Numeric
01:02 p6eval rakudo 3469ff: OUTPUT«1␤»
01:02 snarkyboojum rakudo: say Int ~~ Complex
01:03 p6eval rakudo 3469ff: OUTPUT«0␤»
01:03 snarkyboojum rakudo: say Num ~~ Complex
01:03 p6eval rakudo 3469ff: OUTPUT«0␤»
01:03 snarkyboojum rakudo: say Complex ~~ Num
01:03 p6eval rakudo 3469ff: OUTPUT«0␤»
01:03 snarkyboojum ok - enough spam from me :)
01:03 pugssvn r30283 | colomon++ | [t/spec] Refudge S03-metaops/reduce.t a bit so that it works again.
01:08 dual joined #perl6
01:15 dalek rakudo: 13a7610 | (Solomon Foster)++ | t/spectest.data:
01:15 dalek rakudo: Turn on S03-metaops/reduce.t.
01:15 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/13a761062ab14e1b4a92b756242e8c9ce13445d9
01:18 pugssvn r30284 | colomon++ | [t/spec] Unfudge another handful of tests in reduce.t.
01:23 * jnthn is in the $*zone
01:23 colomon http://news.discovery.com/space/big-pic-spitzer-baby-star-nest-orion-nebula.html
01:36 colomon rakudo: my $a = Bool::True; $a &&= Bool::False; say $a;
01:36 p6eval rakudo 3469ff: OUTPUT«Null PMC access in invoke()␤current instr.: '!assign_metaop' pc 17056 (src/builtins/Junction.pir:319)␤»
01:44 cls_bsd joined #perl6
01:55 Psyche^ joined #perl6
02:01 dalek rakudo: ed9deae | jonathan++ | src/Perl6/Grammar.pm:
02:01 dalek rakudo: Enforce zone constraints in signatures, so we can't end up with requireds after variadics, etc.
02:01 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/ed9deae4009b870b61482c6a15cd26fe0cb6441a
02:01 dalek rakudo: 16273e1 | jonathan++ | t/spectest.data:
02:01 dalek rakudo: Merge branch 'master' of github.com:rakudo/rakudo
02:01 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/16273e1968e728b265f4e059dbd3ab01c1273697
02:01 colomon nooooooo....... ;)
02:02 jnthn er, do my patches annoy thee?
02:02 jnthn ;-)
02:03 colomon I was halfway through a spectest before pushing my own patch.  :)
02:04 jnthn Dom't worry, we've just started bouncing around the "t" word here.
02:04 colomon t ?
02:05 jnthn for tired ;-)
02:05 jnthn std: sub foo($x:) { }
02:05 p6eval std 30284: OUTPUT«ok 00:01 109m␤»
02:05 jnthn std: sub foo($x: $y) { }
02:05 p6eval std 30284: OUTPUT«ok 00:01 107m␤»
02:06 jnthn TimToady: ^ I seem to have memories of STD complaining about those with subs in the past...
02:06 jnthn ($*INVOCANT_OK)
02:07 colomon alpha: say [**] 2, 3, 4
02:07 p6eval alpha 30e0ed: OUTPUT«4096␤»
02:07 colomon alpha: say [\**] 2, 3, 4
02:07 p6eval alpha 30e0ed: OUTPUT«** (HyperWhatever) is not yet implemented at line 10, near "] 2, 3, 4"␤in Main (file src/gen_setting.pm, line 2582)␤»
02:07 jnthn epic fejl!
02:07 jnthn master ftw.
02:11 pugssvn r30285 | jnthn++ | [t/spec] Untodo required after variadic ban test.
02:14 gfx joined #perl6
02:16 wtgee joined #perl6
02:17 pugssvn r30286 | jnthn++ | [t/spec] Unfudge two more tests thanks to zone enforcement.
02:17 jnthn Sleep time!
02:17 jnthn o/ o/
02:18 lisppaste3 wtgee pasted "enum in a class" at http://paste.lisp.org/display/97259
02:19 wtgee What is the proper way to enum some attributes in a class? Mine doesn't seem to work.
02:20 wtgee And hello. :)
02:21 colomon I believe that should be has Suit $.suit
02:21 colomon but then, last time I checked named enums weren't working in current Rakudo either.  :(
02:22 wtgee I tried that but then I get an error about typename Suit needing to be predeclared.
02:22 wtgee Ah...That might make sense. The way I had it gives no error but lets me assign anything.
02:22 wtgee Where is the up-to-date place to check for what is and isn't working?
02:23 colomon good question.  this page http://rakudo.org/status is supposed to help, but it's woefully out-of-date, I think.
02:26 wtgee Yes, "has ::Suit $.suit;" gives no error but allows any value, like my original.
02:26 wtgee Great, thanks
02:30 colomon my apologies for not being more help, I'm off to bed now.
02:31 pugssvn r30287 | colomon++ | [t/spec] Unfudge more reduce tests.
02:31 dalek rakudo: e50ff8c | (Solomon Foster)++ | src/core/metaops.pm:
02:31 dalek rakudo: Refactor the reducewith code a tad (could still use more) and extend triangle mode to chaining mode.
02:31 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/e50ff8cb3400da8872b241f479c09ce7a7c89871
02:31 colomon probably your best bet for finding what currently works is to try things and ask for help here.  Though you're coming up on the time most people are usually in bed or at least inactive on the channel.
02:31 colomon good luck!
02:31 * araujo wonders if he should wait for this insanely macpro book update or go with a thinkpad instead
02:32 snarkyboojum araujo: which macpro update? I'm looking at upgrading atm too
02:33 araujo snarkyboojum, the macbook pro line is supposed to be updated  *soon*
02:33 snarkyboojum araujo: ah .. the Apple *soon* rumour :)
02:33 araujo but it has been like that since Dec last year ... a supposedly update coming soon :P
02:34 snarkyboojum i see :)
02:34 snarkyboojum I guess they'll get the iPad releases around the world out of the way first
02:34 araujo it seems so
02:36 snarkyboojum I've thought long and hard about getting a great linux laptop e.g thinkpad, but the macbooks (and pros) are just too lovely :)
02:37 araujo heh, i can understand that .... just don't feel like paying that price when there are more updated machines at the moment ...
02:38 * araujo been waiting for around 2 weeks now
02:38 snarkyboojum only 2 weeks? :)
02:38 snarkyboojum my little black macbook has done me proud.. it's just past 3 years old, and is still compiling rakudo quickly :P
02:39 araujo heheh nice
02:42 lue I would not go for a Lenovo Thinkpad. That's how much I don't like the stupid nub-thing :(
02:43 lue I've never used it, but I *know* I'm going to press it when I don't want to.
02:45 araujo lue, ?
02:49 rv2733 joined #perl6
02:50 the_irrational_1 joined #perl6
02:51 lue yes?
02:52 snarkyboojum I don't recall every pressing one accidentally
02:52 snarkyboojum :)
02:54 lue I just don't need it, and it bugs me it's right where I *could* press it.
02:56 lue It's supposed to be a second mouse, or something. I actually don't know what it is for, but I'm certain it doesn't need to be right in home row :)
02:57 snarkyboojum yeah.. mouse pointer thingy
02:57 snarkyboojum never bothered to get used to it
02:59 lue It's only a button, so I'm assuming it's for if you're too lazy to tap the trackpad or the mouse button :)
02:59 wtgee My dell latitude has one and up until kernel 2.6.32 the drivers have been really, really screwed up.
02:59 lue It's already hard enough sometimes not to press the trackpad on accident (esp. considering how wide they get, I'm glad I have an old laptop).
03:03 lue (have you seen how wide the trackpads are on the newest Macbooks? It's ridiculous! You could be reaching for the ESC key and hit the trackpad on accident!)
03:04 snarkyboojum there has to be a gesture on the trackpad for escape right? :P
03:05 wtgee How can I specify a lib dir? Like "use lib 'lib/'" in perl5
03:05 lue snarky: start in the top-right, move left, down, right, left, down, right
03:06 lue std: use lib 'lib/'
03:06 p6eval std 30287: OUTPUT«ok 00:01 123m ./lib/lib.pm␤ok 00:01 108m␤»
03:06 lue rakudo: use lib 'lib/'
03:06 p6eval rakudo e50ff8: OUTPUT«Unable to find module 'lib'.␤current instr.: 'perl6;Perl6;Module;Loader;need' pc 34543 (src/gen/role_pm.pir:0)␤»
03:06 lue not yet implemented :(
03:06 * lue submits rakudobug
03:08 snarkyboojum rakudo: say @*INC.pelr
03:08 p6eval rakudo e50ff8: OUTPUT«Method 'pelr' not found for invocant of class 'Array'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
03:08 snarkyboojum rakudo: say @*INC.pelr
03:08 p6eval rakudo e50ff8: OUTPUT«Method 'pelr' not found for invocant of class 'Array'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
03:08 snarkyboojum rakudo: say @*INC.perl
03:08 p6eval rakudo e50ff8: OUTPUT«[".", "/home/p6eval/.perl6/lib", "/home/p6eval//p2/lib/parrot/2.2.0-devel/languages/perl6/lib", "lib"]␤»
03:08 snarkyboojum eek
03:09 snarkyboojum rakudo: push @*INC, '/something/else'; say @*INC.perl
03:09 p6eval rakudo e50ff8: OUTPUT«[".", "/home/p6eval/.perl6/lib", "/home/p6eval//p2/lib/parrot/2.2.0-devel/languages/perl6/lib", "lib", "/something/else"]␤»
03:09 lue rakudo: say @*INC.perl
03:10 p6eval rakudo e50ff8: OUTPUT«[".", "/home/p6eval/.perl6/lib", "/home/p6eval//p2/lib/parrot/2.2.0-devel/languages/perl6/lib", "lib"]␤»
03:10 snarkyboojum don't think p6eval would remember it between invocations
03:10 wtgee Ahh..., the perl6 dir is a hidden dir. Or I guess just push to it manually.
03:11 wtgee I had things in ~/perl6/lib.  Thanks!
03:13 snarkyboojum rakudo: say pir::get_hll_global__PS('@INC')
03:13 p6eval rakudo e50ff8: OUTPUT«./home/p6eval/.perl6/lib/home/p6eval//p2/lib/parrot/2.2.0-devel/languages/perl6/liblib␤»
03:16 cognominal joined #perl6
03:24 lue here's a picture of a person drowning (on an actual sign in real life): lol
03:32 lue rakudo: say $*TIME
03:32 p6eval rakudo e50ff8:  ( no output )
03:32 lue rakudo: say $*DONOTEXIST
03:32 p6eval rakudo e50ff8:  ( no output )
03:34 meppel joined #perl6
03:35 lue rakudo: say $*DATE
03:35 p6eval rakudo e50ff8:  ( no output )
03:35 snarkyboojum rakudo: say $*OUT
03:35 p6eval rakudo e50ff8: OUTPUT«IO()<0x29e8d68>␤»
03:38 nihiliad joined #perl6
03:43 lue almost done rewriting S32::Temporal. It's going to shock most everyone how much simpler it is :)
03:45 snarkyboojum no satellite clocks lue?
03:45 lue I'd have to come up with a Moon-based method of time-keeping first!
03:45 lue (I assume you mean natural satellite :) )
03:49 lue If I really wanted to make it difficult, I'd define an Instant as 42c*42m, where c is the speed of light and m is the # of vibrations of Molybdenum at 42 degress celsius in 1 hexsecond :)
03:49 lue oh yeah, and the Molybdenum is at a pressure of ~ 42ATM :)
03:51 lue (actually, to be useful, c should be how long it takes for light to travel 42m)
03:52 snarkyboojum rakudo: say $*CALENDAR
03:52 p6eval rakudo e50ff8:  ( no output )
03:52 snarkyboojum :)
03:53 lue the only thing about the current S32::Temporal implemented so far is time()
03:53 lue rakudo: say time()
03:53 p6eval rakudo e50ff8: OUTPUT«1270265934.68309␤»
03:54 snarkyboojum say time().WHAT
03:54 snarkyboojum rakudo: say time().WHAT
03:54 p6eval rakudo e50ff8: OUTPUT«Num()␤»
03:56 Sarten-X joined #perl6
04:08 lue what's that calendar they use in astronomy? Where it's just one number?
04:12 lue (it's a Julian Year. nvm)
04:12 lue rakudo: say $*CALENDAR; $*CALENDAR='bob'; say $*CALENDAR
04:12 p6eval rakudo e50ff8: OUTPUT«Cannot assign to readonly value␤current instr.: '&die' pc 17215 (src/builtins/Junction.pir:399)␤»
04:16 alester joined #perl6
04:18 Coke-san I now have access to the planet six perl config.
04:19 Coke-san if someone needs their feed added, ping me.
04:19 Coke-san seen obra
04:19 lue \o/
04:19 lue "Today is Boomtime, the 19th day of Discord in the YOLD 3176" Discordian is _definitely_ going to be a part of the spec :)
04:22 Coke-san obra did say he was done with the planet feed, yes?
04:22 snarkyboojum rakudo: say Time.gmtime.time.iso8601;
04:22 p6eval rakudo e50ff8: OUTPUT«Could not find sub &Time␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
04:23 snarkyboojum alpha: Time.gmtime.time.iso8601;
04:23 p6eval alpha 30e0ed:  ( no output )
04:23 snarkyboojum alpha: say Time.gmtime.time.iso8601;
04:23 p6eval alpha 30e0ed: OUTPUT«04:08:41␤»
04:38 lue rakudo: say $*NOW
04:39 p6eval rakudo e50ff8:  ( no output )
04:39 lue alpha: say $*NOW
04:39 p6eval alpha 30e0ed: OUTPUT«Contextual $*NOW not found␤␤»
04:53 molaf joined #perl6
05:01 lue Time is just a jumbled iTem.
05:04 SmokeMachine joined #perl6
05:04 nihiliad joined #perl6
05:20 PenThrive joined #perl6
05:38 snarkyboojum rakudo: <T i m e>.rotate(-2).reverse.say
05:38 p6eval rakudo e50ff8: OUTPUT«iTem␤»
05:40 snarkyboojum I see what you mean
05:59 snarkyboojum rakudo: drop <a b c>, 2
06:00 p6eval rakudo e50ff8: OUTPUT«Could not find sub &drop␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
06:00 cls_bsd joined #perl6
06:00 snarkyboojum rakudo: sub drop(@list, Int $nth) { return map { @list[$_] }, grep { ($_+1) % $nth }, 0 .. @list.elems - 1; }; say drop <a b c>, 2
06:00 p6eval rakudo e50ff8: OUTPUT«ac␤»
06:02 the_irrational_1 joined #perl6
06:04 diakopter left #perl6
06:05 diakopter joined #perl6
06:05 lue I'm going to send off Temporal.pm tomorrow, when I feel like finishing it :)
06:06 lue (I'm still here for a bit, though. Just not working on Temporal.pod (I meant .pod!))
06:06 lue o hai diakopter o/
06:07 lue .beat
06:07 lue .beats
06:07 phenny @297
06:10 iblechbot joined #perl6
06:13 lue snarkyboojum: ping
06:14 snarkyboojum lue: pong
06:16 lue Do you happen to know of something that lets me track the moon's position? It's amazingly difficult to find one :/
06:17 bkeeler http://www.wolframalpha.com/input/?i=where+is+the+moon%3F
06:18 astrojp joined #perl6
06:19 lue Thank you Wolfram|Alpha, you have amazed me again!
06:19 lue .u 003F
06:19 phenny U+003F QUESTION MARK (?)
06:20 jql joined #perl6
06:23 lue 16.333^h:-24.684deg
06:23 lue that's the current Moontime :)
06:23 lue (that's a bit unruly though; it could be refined)
06:25 snarkyboojum http://www.wolframalpha.com/input/?i=when+will+Perl+6+come+out%3F
06:25 snarkyboojum hehe - sorry - couldn't help it
06:30 snarkyboojum rakudo: my $a = 'A'; say "\$x is $x"
06:31 p6eval rakudo e50ff8: OUTPUT«Symbol '$x' not predeclared in <anonymous>␤current instr.: 'perl6;PCT;HLLCompiler;panic' pc 152 (compilers/pct/src/PCT/HLLCompiler.pir:108)␤»
06:31 snarkyboojum rakudo: my $a = 'A'; say "\$a is $a"
06:31 p6eval rakudo e50ff8: OUTPUT«$a is A␤»
06:32 snarkyboojum rakudo: use Test; my $x = 'A'; is("\$x is $x", '$x is A');
06:32 p6eval rakudo e50ff8: OUTPUT«ok 1 - ␤»
06:32 lue .beats
06:32 phenny @314
06:32 lue good night
06:32 diakopter .u 33542
06:32 phenny diakopter: Sorry, no results for '33542'.
06:32 diakopter .u 3352
06:32 phenny U+3352 SQUARE RIRA (㍒)
06:33 diakopter .u 3524
06:33 phenny U+3524 CJK UNIFIED IDEOGRAPH-3524 (㔤)
06:33 diakopter lue: /
06:33 snarkyboojum night lue
06:33 am0c joined #perl6
06:33 am0c left #perl6
06:35 [particle] joined #perl6
07:00 diakopter std: ::System::Console.WriteLine(4)
07:00 p6eval std 30287: OUTPUT«ok 00:01 106m␤»
07:00 diakopter o goody
07:06 Coke-san .u 2653
07:06 phenny U+2653 PISCES (♓)
07:06 moritz_ rakudo: say ([\+] 1, 2, 3, 4, 5).perl
07:06 p6eval rakudo e50ff8: OUTPUT«[1, 3, 6, 10, 15]␤»
07:07 moritz_ we can haz 3angle reduze!
07:07 Coke-san rakudo: ([\+] 1, 2, 3, 4, 5).say
07:07 p6eval rakudo e50ff8: OUTPUT«1361015␤»
07:07 Coke-san ah.
07:08 Coke-san zzz
07:17 snarkyboojum rakudo: say ~([\**] 1, 2, 3, 4, 5).perl
07:17 p6eval rakudo e50ff8: OUTPUT«[5, 1024, Inf, Inf, 1]␤»
07:17 snarkyboojum rakudo: say ~([\*] 1, 2, 3, 4, 5).perl
07:17 p6eval rakudo e50ff8: OUTPUT«[1, 2, 6, 24, 120]␤»
07:17 snarkyboojum rakudo: say ~([\*] 1, 2, 3, 4, 5)
07:17 p6eval rakudo e50ff8: OUTPUT«1 2 6 24 120␤»
07:18 snarkyboojum say ~([\**] 1, 2, 3, 4, 5)
07:18 snarkyboojum rakudo: say ~([\**] 1, 2, 3, 4, 5)
07:18 p6eval rakudo e50ff8: OUTPUT«5 1024 Inf Inf 1␤»
07:19 snarkyboojum that's weird
07:19 snarkyboojum rakudo: say ~([**] 1, 2, 3, 4, 5)
07:19 p6eval rakudo e50ff8: OUTPUT«1␤»
07:20 snarkyboojum rakudo: say ~([**] <1 2 3 4 5>)
07:20 p6eval rakudo e50ff8: OUTPUT«1␤»
07:20 snarkyboojum rakudo: say ~([\*] <1 2 3 4 5>)
07:20 p6eval rakudo e50ff8: OUTPUT«1 2 6 24 120␤»
07:20 snarkyboojum rakudo: say ~([\%] <1 2 3 4 5>)
07:20 p6eval rakudo e50ff8: OUTPUT«1 1 1 1 1␤»
07:21 snarkyboojum rakudo: say ~([\/] <1 2 3 4 5>)
07:21 p6eval rakudo e50ff8: OUTPUT«1 0.5 0.166666666666667 0.0416666666666667 0.00833333333333333␤»
07:23 snarkyboojum rakudo: say ~([\eqv] <1 2 3 4 5>)
07:23 p6eval rakudo e50ff8: OUTPUT«1 0 0 0 0␤»
07:23 snarkyboojum rakudo: say ~([\,] <1 2 3 4 5>)
07:23 p6eval rakudo e50ff8: OUTPUT«1 1 2 1 2 3 1 2 3 4 1 2 3 4 5␤»
07:23 snarkyboojum rakudo: say ~([\Z] <1 2 3 4 5>)
07:23 p6eval rakudo e50ff8: OUTPUT«Cannot resume dead coroutine.␤current instr.: 'perl6;GatherIterator;get' pc 465380 (src/gen/core.pir:74369)␤»
07:23 snarkyboojum 'dead coroutine'!
07:24 snarkyboojum rakudo: say Inf ** Inf
07:24 p6eval rakudo e50ff8: OUTPUT«Inf␤»
07:26 snarkyboojum why isn't, say ~([\**] 1, 2, 3, 4, 5), just 1, 1, 1, 1, 1
07:26 snarkyboojum rakudo: say (~[\**] <1 2 3 4 5>)
07:26 p6eval rakudo e50ff8: OUTPUT«5 1024 Inf Inf 1␤»
07:27 snarkyboojum rakudo: say ~[\**] <0 1 2 3 4 5>
07:27 p6eval rakudo e50ff8: OUTPUT«5 1024 Inf Inf 1 0␤»
07:27 moritz_ snarkyboojum: ** is right associative
07:27 snarkyboojum rakudo: say 0 ** 0
07:28 p6eval rakudo e50ff8: OUTPUT«1␤»
07:28 moritz_ snarkyboojum: and [**] a, b, c is meant to be the same as a ** b ** c
07:28 snarkyboojum yeah, but the \ is supposed to show you each iteration no?
07:29 moritz_ yes, it does
07:29 snarkyboojum rakudo: say 1 ** 2 ** 3
07:29 p6eval rakudo e50ff8: OUTPUT«1␤»
07:29 snarkyboojum should be 1
07:29 snarkyboojum right
07:30 snarkyboojum rakudo: say [**] <1 2 3>
07:30 p6eval rakudo e50ff8: OUTPUT«1␤»
07:30 snarkyboojum rakudo: say [\**] <1 2 3>
07:30 p6eval rakudo e50ff8: OUTPUT«381␤»
07:30 snarkyboojum how is that output derived at?
07:30 moritz_ rakudo: say 3, 2**3, 1**(2**3)
07:30 p6eval rakudo e50ff8: OUTPUT«381␤»
07:31 snarkyboojum oh
07:31 snarkyboojum :)
07:31 moritz_ snarkyboojum: http://github.com/rakudo/rakudo/blob/master/src/core/metaops.pm#L99
07:31 snarkyboojum not 1, 1**2, (1**2)**3
07:32 moritz_ right, because ** is right associative
07:32 snarkyboojum oops
07:32 snarkyboojum ok - sorry about that
07:32 moritz_ no problem :-)
07:32 snarkyboojum cheers :)
07:32 * moritz_ runs off to obtain some $food
07:34 snarkyboojum rakudo: say ~[\*] <0 1 2 3>
07:34 p6eval rakudo e50ff8: OUTPUT«0 0 0 0␤»
07:35 snarkyboojum rakudo: say ~[\**] <0 1 2 3>
07:35 p6eval rakudo e50ff8: OUTPUT«3 8 1 0␤»
07:35 snarkyboojum lovely
07:38 snarkyboojum rakudo: say 0 Z 1
07:38 p6eval rakudo e50ff8: OUTPUT«01␤»
07:38 snarkyboojum rakudo: say [\Z] <0 1 2 3>
07:39 p6eval rakudo e50ff8: OUTPUT«0»
07:39 snarkyboojum rakudo: say [\Z] <1 2 3 4 5>
07:39 p6eval rakudo e50ff8: OUTPUT«1»
07:39 snarkyboojum rakudo: say ~\Z] <1 2 3 4 5>
07:39 p6eval rakudo e50ff8: OUTPUT«Confused at line 11, near "] <1 2 3 4"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
07:40 snarkyboojum rakudo: say ~([\Z] <1 2 3 4 5>)
07:40 p6eval rakudo e50ff8: OUTPUT«Cannot resume dead coroutine.␤current instr.: 'perl6;GatherIterator;get' pc 465380 (src/gen/core.pir:74369)␤»
07:40 snarkyboojum rakudo: say ~[\Z] <1 2 3 4 5>
07:40 p6eval rakudo e50ff8: OUTPUT«Cannot resume dead coroutine.␤current instr.: 'perl6;GatherIterator;get' pc 465380 (src/gen/core.pir:74369)␤»
07:40 snarkyboojum rakudo: say [\Z] <1 2 3 4 5>
07:40 p6eval rakudo e50ff8: OUTPUT«1»
07:40 snarkyboojum should stringifying that really result in a 'Cannot resume dead coroutine'?
07:41 snarkyboojum rakudo: say +[\Z] <1 2 3 4 5>
07:41 p6eval rakudo e50ff8: OUTPUT«5␤»
07:41 Su-Shee joined #perl6
07:41 snarkyboojum rakudo: say ?[\Z] <1 2 3 4 5>
07:41 p6eval rakudo e50ff8: OUTPUT«1␤»
07:44 * diakopter sits in silence
07:44 * diakopter and notices the time
07:52 envi^home joined #perl6
07:53 snarkyboojum rakudo: say ~[\Z] <1 2 3 4 5 6>
07:53 p6eval rakudo e50ff8: OUTPUT«Cannot resume dead coroutine.␤current instr.: 'perl6;GatherIterator;get' pc 465380 (src/gen/core.pir:74369)␤»
07:54 snarkyboojum rakudo: say ~[\Z] <1>
07:54 p6eval rakudo e50ff8: OUTPUT«No applicable candidates found to dispatch to for 'reducewith'. Available candidates are:␤:(&op, Iterable $an-iterable, Any :chaining($chaining, Any :right-assoc($right-assoc, Any :triangle($triangle)␤␤current instr.: 'perl6;Code;assuming_helper' pc 13069
07:54 p6eval ..(src/builtins/Str.pir:38)␤»
07:54 snarkyboojum rakudo: say ~[\Z] <>
07:54 p6eval rakudo e50ff8: OUTPUT«Unsupported use of <>; in Perl 6 please use lines() or () at line 11, near "<>"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
07:54 snarkyboojum rakudo: say ~[\Z] []
07:54 p6eval rakudo e50ff8: OUTPUT«␤»
07:54 snarkyboojum rakudo: say ~[\Z] []
07:54 p6eval rakudo e50ff8: OUTPUT«␤»
07:54 snarkyboojum rakudo: say ~[\Z] [1]
07:54 p6eval rakudo e50ff8: OUTPUT«1␤»
07:55 snarkyboojum rakudo: say ~[\Z] [1,2,3,4,5]
07:55 p6eval rakudo e50ff8: OUTPUT«Cannot resume dead coroutine.␤current instr.: 'perl6;GatherIterator;get' pc 465380 (src/gen/core.pir:74369)␤»
07:56 snarkyboojum rakudo: say <>.WHAT
07:56 p6eval rakudo e50ff8: OUTPUT«Unsupported use of <>; in Perl 6 please use lines() or () at line 11, near "<>.WHAT"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
07:58 niros joined #perl6
07:59 xabbu42 joined #perl6
07:59 cognominal rakudo: my %*a;  a<4>=5;   sub c { my %*a;   say %a<4>.perl }; c();
07:59 p6eval rakudo e50ff8: OUTPUT«Symbol '%a' not predeclared in c␤current instr.: 'perl6;PCT;HLLCompiler;panic' pc 152 (compilers/pct/src/PCT/HLLCompiler.pir:108)␤»
07:59 cognominal rakudo: my %*a;  a<4>=5;   sub c { my %*a;   say %*a<4>.perl }; c();
07:59 p6eval rakudo e50ff8: OUTPUT«Could not find sub &a␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
08:00 cognominal rakudo: my %*a;  a<4>=5;   sub c {  say %*a<4>.perl }; c();
08:00 p6eval rakudo e50ff8: OUTPUT«Could not find sub &a␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
08:00 cognominal oops
08:00 cognominal rakudo: my %*a;  %a<4>=5;   sub c { my %*a;   say %*a<4>.perl }; c();
08:00 p6eval rakudo e50ff8: OUTPUT«Symbol '%a' not predeclared in <anonymous>␤current instr.: 'perl6;PCT;HLLCompiler;panic' pc 152 (compilers/pct/src/PCT/HLLCompiler.pir:108)␤»
08:00 cognominal rakudo: my %*a;  %*a<4>=5;   sub c { my %*a;   say %*a<4>.perl }; c();
08:00 p6eval rakudo e50ff8: OUTPUT«Proxy.new()␤»
08:01 cognominal rakudo: my %*a;  %*a<4>=5;   sub c {   say %*a<4>.perl }; c();
08:01 p6eval rakudo e50ff8: OUTPUT«5␤»
08:01 cognominal my %a; say %a<0>.perl
08:01 cognominal rakudo: my %a; say %a<0>.perl
08:01 p6eval rakudo e50ff8: OUTPUT«Proxy.new()␤»
08:01 cognominal rakudo: my %a; say %a<0>
08:01 p6eval rakudo e50ff8: OUTPUT«␤»
08:02 cognominal rakudo: my $a; say $a.perl
08:02 p6eval rakudo e50ff8: OUTPUT«Any␤»
08:09 pugssvn r30288 | moritz++ | [t/spec] correct a test for [,], and unfudge a few for rakudo
08:18 moritz_ phenny: tell masak that all the TODO tests in /S05-mass/properties-general.t pass for me - are you sure you tried it with the last parrot?
08:18 phenny moritz_: I'll pass that on when masak is around.
08:21 am0c joined #perl6
08:24 snarkyboojum rakudo: 0 but last
08:24 p6eval rakudo e50ff8: OUTPUT«Warning␤Null PMC access in can()␤current instr.: 'parrot;P6protoobject;ACCEPTS' pc -1 ((unknown file):-1)␤»
08:27 PenThrive left #perl6
08:29 gfx joined #perl6
08:52 riffraff joined #perl6
09:14 colomon loliblogged: http://justrakudoit.wordpress.com/2010/04/03/rakudo-progress/
09:19 colomon rakudo: say [+] 1
09:19 p6eval rakudo e50ff8: OUTPUT«No applicable candidates found to dispatch to for 'reducewith'. Available candidates are:␤:(&op, Iterable $an-iterable, Any :chaining($chaining, Any :right-assoc($right-assoc, Any :triangle($triangle)␤␤current instr.: 'perl6;Code;assuming_helper' pc 13069
09:19 p6eval ..(src/builtins/Str.pir:38)␤»
09:19 colomon doh!
09:19 sorear As a minor point of bikeshedding, may I recommend s/triangle/scan/
09:20 sorear the incremenal reduction metaoperator in Haskell 98 is 'scanl'
09:20 mberends colomon++ # nice blog, after even nicer programming
09:21 sorear colomon++
09:21 colomon mberends: that programming was very much a team effort.
09:22 pmurias joined #perl6
09:22 mberends :) that's clear. teamwork++
09:22 sorear (perl6 community)++
09:22 sorear (clean code)++
09:27 colomon sorear: triangle is actually the term used in the p6 spec
09:27 colomon http://perlcabal.org/syn/S03.html#Reduction_operators and then scroll back a touch.
09:28 colomon > say [+] 1
09:28 colomon 1
09:29 mberends colomon: in your blog, could you maybe add another example with a different operator, so that inexperienced readers do not think you are simply enhancing ** ?
09:30 colomon mberends: not a bad idea.
09:33 mberends colomon: ok then, with several other operators ;-)
09:34 colomon working on it now...  ;)
09:37 sorear colomon: ...oh.
09:38 colomon sorear: which isn't to say the Haskell term might not be better.  but that's where we got triangle from.
09:43 colomon mberends: further examples added.
09:43 mberends :-)
09:44 colomon Coke-san: if you could http://justrakudoit.wordpress.com/ to perl planet six, I'd appreciate it.  thanks!
09:45 * mberends likes the colomon++ blog
09:52 * snarkyboojum enjoys justrakudoit too - colomon++ :)
09:52 colomon blush
09:57 lisppaste3 pmurias pasted "draft of my gsoc proposal" at http://paste.lisp.org/display/97262
09:57 pmurias any comments?
09:59 mberends pmurias: great proposal, +1 from me. any ideas on possible mentors?
10:01 mberends pmurias: in the Abstract, a bit more explanation of the names Mildew, SMOP and CPAN would help those readers less familiar with our terminology.
10:01 dalek rakudo: d906f51 | (Solomon Foster)++ | src/core/metaops.pm:
10:01 dalek rakudo: Add generic version of reducewith that treats its argument as a list, to allow the [+] 1 case to work.
10:01 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/d906f517613ba839cb6a0db6fc23629ddbd4551d
10:04 pmurias mberends: i hope ruoso will be the mentor, want to get a confirmation from him before adding it to the proposal
10:04 pmurias mberends: thanks for feedback
10:04 colomon pmurias: what mberends said.  also wasn't scons based on / inspired by an older p5 module called cons?
10:07 pugssvn r30289 | colomon++ | [t/spec] Add a few tests for the one-argument case.
10:08 colomon TimToady: what should [\*] () return?
10:10 snarkyboojum rakudo: say ~[\Z] [1,2,3,4,5]
10:10 p6eval rakudo e50ff8: OUTPUT«Cannot resume dead coroutine.␤current instr.: 'perl6;GatherIterator;get' pc 465380 (src/gen/core.pir:74369)␤»
10:10 snarkyboojum also, what's that about?
10:10 colomon snarkyboojum: I suspect that's the gather / take bug rearing its ugly head again.
10:10 snarkyboojum no idea if it's sane or not :) just wondering
10:10 snarkyboojum ah ok
10:11 colomon Though I don't know why it goes away if you remove the .... oh, wait, I do know.  It's because when you add ~, you are forcing the iterators to evaluate, which is what causes the problem.  If you take it away, the result is just a list of iterators.
10:11 colomon well, array of iterators.
10:15 pugssvn r30290 | colomon++ | [t/spec] Add a few more tests for the one-argument case.
10:20 Gothmog_ joined #perl6
10:23 TiMBuS joined #perl6
10:26 colomon rakudo: say ('a'...*).batch(100).perl
10:26 p6eval rakudo d906f5: OUTPUT«("a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "aa", "ab", "ac", "ad", "ae", "af", "ag", "ah", "ai", "aj", "ak", "al", "am", "an", "ao", "ap", "aq", "ar", "as", "at", "au", "av", "aw", "ax",
10:26 p6eval .."ay", "…
10:27 mberends .perl could also use ' instead of " where interpolation is not expected
10:28 mberends rakudo: say ('abc'...*).batch(30).perl
10:28 p6eval rakudo d906f5: OUTPUT«("abc", "abd", "abe", "abf", "abg", "abh", "abi", "abj", "abk", "abl", "abm", "abn", "abo", "abp", "abq", "abr", "abs", "abt", "abu", "abv", "abw", "abx", "aby", "abz", "aca", "acb", "acc", "acd", "ace", "acf")␤»
10:30 pmurias colomon: yes
10:30 mberends .oO( that was base 26, how about base 36? )
10:31 mberends rakudo: say ('a0a'...*).batch(40).perl
10:31 p6eval rakudo d906f5: OUTPUT«("a0a", "a0b", "a0c", "a0d", "a0e", "a0f", "a0g", "a0h", "a0i", "a0j", "a0k", "a0l", "a0m", "a0n", "a0o", "a0p", "a0q", "a0r", "a0s", "a0t", "a0u", "a0v", "a0w", "a0x", "a0y", "a0z", "a1a", "a1b", "a1c", "a1d", "a1e", "a1f", "a1g", "a1h", "a1i", "a1j", "a1k", "a1l", "a1m",
10:31 p6eval .."a1n")␤»
10:31 mberends \o/
10:33 mberends although that is western cultural imperialism in the default ranges
10:42 M_o_C joined #perl6
10:46 payload joined #perl6
10:46 payload joined #perl6
10:48 payload joined #perl6
10:49 payload joined #perl6
10:54 wknight8111 joined #perl6
11:04 dalek rakudo: 020a6a3 | (Solomon Foster)++ | src/core/metaops.pm:
11:04 dalek rakudo: Change reducewith triangle case to lazily return values.
11:04 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/020a6a30632a2aef35001a14e75b9e2e31629f8e
11:05 jaldhar joined #perl6
11:05 colomon rakudo: say ([\*] 1..20).perl
11:05 p6eval rakudo d906f5: OUTPUT«[1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800, 39916800, 479001600, 6227020800, 87178291200, 1307674368000, 20922789888000, 355687428096000, 6.402373705728e+15, 1.21645100408832e+17, 2.43290200817664e+18]␤»
11:05 mberends colomon: cool!
11:05 colomon heh, it gets better.  :)
11:06 colomon > say ([\*] 1..*).batch(20).perl
11:06 colomon (1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800, 39916800, 479001600, 6227020800, 87178291200, 1307674368000, 20922789888000, 355687428096000, 6.402373705728e+15, 1.21645100408832e+17, 2.43290200817664e+18)
11:06 colomon The lazy version...  I've just pushed it, but I expect p6eval won't have picked it up yet.
11:07 * mberends pulls and starts compiling it, eagerly :)
11:07 snarkyboojum heh
11:07 arnsholt joined #perl6
11:08 snarkyboojum rakudo: my $a = 5; say ++$a++;
11:08 p6eval rakudo d906f5: OUTPUT«6␤»
11:08 snarkyboojum wouldn't have expected that to work :)
11:09 snarkyboojum rakudo: my $a = 5; say ++$a++; say $a;
11:09 p6eval rakudo d906f5: OUTPUT«6␤7␤»
11:10 snarkyboojum ooh - is that legit eh? :)
11:10 mberends well, not in C, but this ain't Kansas any more,,,
11:11 pugssvn r30291 | colomon++ | [t/spec] Add two tests for lazy triangle reduce.
11:11 snarkyboojum and not in Perl 5 either
11:11 snarkyboojum didn't realise that was spec'ed in Perl 6 ;)
11:11 snarkyboojum rakudo: my $a = 5; say ++$a--; say $a;
11:12 p6eval rakudo d906f5: OUTPUT«6␤5␤»
11:12 mberends rakudo: my  $a=5; say ++ ++ $a;
11:12 p6eval rakudo 020a6a: OUTPUT«7␤»
11:13 colomon std: my  $a=5; say ++ ++ $a
11:13 p6eval std 30290: OUTPUT«ok 00:01 110m␤»
11:13 snarkyboojum std: my  $a=5; say $a -- # should fail I suppose
11:13 p6eval std 30290: OUTPUT«[31m===[0mSORRY![31m===[0m␤Postfix found where infix expected (omit whitespace?) at /tmp/p350DuwGL5 line 1:␤------> [32mmy  $a=5; say $a [33m⏏[31m-- # should fail I suppose[0m␤    expecting any of:␤ bracketed infix␤  infix␤  infix or meta-infix␤FAILED 00:01 108m␤»
11:14 colomon > say (([\+] 1..*) Z- (1, 1, *+* ... *)).batch(20).perl
11:14 colomon (0, 2, 4, 7, 10, 13, 15, 15, 11, 0, -23, -66, -142, -272, -490, -851, -1444, -2413, -3991, -6555)
11:14 colomon > say (([\+] 1..*) RZ- (1, 1, *+* ... *)).batch(20).perl
11:14 colomon (0, -2, -4, -7, -10, -13, -15, -15, -11, 0, 23, 66, 142, 272, 490, 851, 1444, 2413, 3991, 6555)
11:18 sundar joined #perl6
11:28 payload joined #perl6
11:36 moritz_ Coke-san: ping
11:38 jnthn lolimconcious!
11:39 mberends loljnthnisatthekeyboard!
11:45 moritz_ std: use foo;
11:45 p6eval std 30291: OUTPUT«Potential difficulties:␤  Can't locate module foo at /tmp/xBGQl6le7h line 1:␤------> [32muse foo[33m⏏[31m;[0m␤ok 00:01 107m␤»
11:45 mberends jnthn: do you use 32 or 64 bit Windows 7?
11:45 jnthn 32
11:46 mberends maybe that's why the free M$ 32 bit compiler does not build Parrot here
11:46 mberends on 64 bit Win7
11:46 dalek book: 36e0bbd | moritz++ | docs/announce/2010-03:
11:46 dalek book: [docs] update release announcement, move to 2010-04 -- too late to release in March :-)
11:46 dalek book: review: http://github.com/perl6/book/commit/36e0bbded037293181cffb3c66f50680dcd7d814
11:47 moritz_ colomon: did you take a look at http://rt.perl.org/rt3/Ticket/Display.html?id=74008 ?
12:09 payload joined #perl6
12:10 dalek book: 70a86af | moritz++ | src/preface.pod:
12:10 dalek book: [preface] start to explain what Perl 6 actually is; refactored description of multiple implementations and Rakudo
12:10 dalek book: review: http://github.com/perl6/book/commit/70a86af6e9738a79e7a3dfcade906e1dd4ef5f3a
12:19 ruoso joined #perl6
12:23 moritz_ rakudo: use Test 'blah';
12:23 p6eval rakudo 020a6a: OUTPUT«Confused at line 11, near "use Test '"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
12:26 * araujo just got a thinkpad
12:33 snarkyboojum araujo: what did you get?
12:33 araujo snarkyboojum, T410 , Core i7 620, 4GB
12:34 araujo 500GB HD
12:34 mberends araujo: what operating systems will you run on it?
12:34 araujo mberends, not sure yet
12:34 araujo next dilemma to solve
12:35 mberends the coming Ubuntu 2010.04 already looks very good in beta
12:36 araujo mberends, yeah?
12:37 araujo I have read the only tricky to get working in this machine model is the wireless card, apart from that, I shouldn't have any issue ... mmm even though, what still cares me (after many years) of configuring a linux system are the graphic drivers
12:38 mberends yeah, used both 32 and 64 bit versions here for 3 months now, including wireless
12:40 moritz_ araujo: that depends very much of the vendor of the GPU
12:41 araujo moritz_, let's say that the whole thing nvidia/ATI thing .. I have never caught up with that
12:42 moritz_ intel has pretty good open source drivers
12:42 araujo true that
12:42 moritz_ nvidia has an installer for their closed source driver which works pretty well
12:43 moritz_ ATI I never tried
12:43 arnsholt Is it possible to write functions that take block arguments in NQP?
12:44 moritz_ nqp: sub f(&x) { &x(3) }; f(-> $a { $a * $a })
12:44 p6eval nqp:  ( no output )
12:45 moritz_ nqp: sub f(&x) { say(&x(3)) }; f(-> $a { $a * $a })
12:45 p6eval nqp: OUTPUT«9␤»
12:45 moritz_ seems like "yes"
12:45 arnsholt Huzzah. Cheers!
12:45 moritz_ nqp: sub f(&x) { say(x(3)) }; f(-> $a { $a * $a })
12:45 p6eval nqp: OUTPUT«Could not find non-existent sub x␤current instr.: 'f' pc 38 (EVAL_1:0)␤»
12:50 mathw o/
12:52 snarkyboojum left #perl6
12:53 * arnsholt <3 NQP
12:57 arnsholt Dynamic variables makes me happy
13:00 moritz_ arnsholt: how is your prolog implementation coming along?
13:00 arnsholt So far, so good
13:01 arnsholt Got a blog post in the works as well. Just not done obsessing over wording and disposition yet =)
13:01 arnsholt Fiddling with unification now
13:01 moritz_ hey, it's just a blog post. Chances that >10 people read it are slim :-)
13:02 arnsholt True, true. I'm just a bit perfectionist when it comes to words, and code
13:03 arnsholt I'm quite happy with my test setup though. The interpreter just outputs TAP =)
13:03 moritz_ :-)
13:04 arnsholt So with a single test file it works just like it should (for all the wrong reasons =D)
13:05 pugssvn r30292 | moritz++ | [t/spec] some unfudges for rakudo
13:08 ruoso pmurias, btw... the gsoc proposal is looking just great...
13:18 arthur-_ joined #perl6
13:26 Coke-san colomon: nearly done. need your name.
13:27 Coke-san moritz_: pong.
13:27 moritz_ Coke-san: pinged you about colomon's blog for planetsix :-)
13:27 Coke-san moritz++
13:27 arnsholt There we go. Done obsessing
13:28 moritz_ arnsholt: URL?
13:28 * arnsholt starts writing the next entry
13:28 arnsholt moritz_: http://blogs.perl.org/users/arne_skjaerholt/2010/03/parrotlog---getting-started.html
13:28 colomon Coke-san: Solomon Foster
13:29 colomon and thanks!
13:29 Coke-san done. it will probably take a little bit for it to show up on the roll.
13:30 colomon signing off now, going to take down the wireless router in a moment.  in theory will have internet access again around dinner time.
13:31 moritz_ colomon: good luck
13:32 Chillance joined #perl6
13:33 Coke-san wtf. svn on sixperl planet not responding.
13:35 Juerd Given the uptime of >3 days now, I think this kernel on feather is stable
13:35 Coke-san seems to have gone through on the backend. now just need the cache to update.
13:35 Coke-san Juerd++
13:35 * Juerd finds some wood to knock on
13:36 mberends Juerd: thanks to a cancellation of work, it looks like I can attend Amsterdam.pm on Tuesday :)
13:36 Juerd \o/
13:37 Juerd Is that going to be your first time?
13:37 masak joined #perl6
13:37 masak lol we're making Easter meatballs! :)
13:37 phenny masak: 08:18Z <moritz_> tell masak that all the TODO tests in /S05-mass/properties-general.t pass for me - are you sure you tried it with the last parrot?
13:37 moritz_ s/last/latest/
13:37 masak moritz_: pretty sure it wasn't the latest; I had trouble pulling from the Parrot repo at that time.
13:37 * masak rebuilds everything
13:38 mberends Juerd: yes, I was only at London.pm once so far
13:38 * Coke-san fondly remembers his last PM meeting, which was really just beers with a few guys from Leeds.pm
13:46 SmokeMachine joined #perl6
13:51 pmurias ruoso: just to make sure, you are interested in being my mentor?
13:54 arnsholt Yay. My blogs.perl.org is already #4 on Google for my real name
14:02 moritz_ which probably means you don't have much web presence otherwise :-)
14:09 arnsholt That's a safe assumption ^^
14:10 arnsholt Previously, it was mainly random questions from various mailing lists. There's also my father, who has almost the same name as me =)
14:14 ruoso pmurias, I already added myself as the prospective mentor of your proposal
14:14 ruoso ;)
14:29 arnsholt nqp:  sub foo() { say("ante"); if 1 { return; }; say("post"); }; foo();
14:29 p6eval nqp: OUTPUT«ante␤post␤»
14:29 arnsholt That's a bug, right?
14:31 cognominal joined #perl6
14:32 masak looks that way.
14:33 masak nqp:  sub foo() { say("ante"); if 1 { return 42; }; say("post"); }; }; foo();
14:33 p6eval nqp: OUTPUT«Confused at line 1, near "}; foo();"␤current instr.: 'parrot;HLL;Grammar;panic' pc 500 (src/cheats/hll-grammar.pir:197)␤»
14:33 masak nqp:  sub foo() { say("ante"); if 1 { return 42; }; say("post"); }; foo();
14:33 p6eval nqp: OUTPUT«ante␤»
14:33 pmurias http://socghop.appspot.com/gsoc/student_proposal/show/google/gsoc2010/pmurias/t127020368113 # the proposal with formatting
14:33 masak return without an argument silently fails.
14:34 arnsholt Ooooh. Eenterestink
14:34 masak da.
14:34 mberends pmurias: your gsoc requires a Sign In :(
14:34 * arnsholt goes to look at some PIR
14:35 moritz_ nqp:  sub foo() { say("ante"); if 1 { return(42); }; say("post"); }; foo()
14:35 p6eval nqp: OUTPUT«ante␤Could not find non-existent sub return␤current instr.: 'foo' pc 27 (EVAL_1:0)␤»
14:37 envi^home joined #perl6
14:38 mberends pmurias: ok, reading after signing in, could you add an approximate time scale to the Schedule?
14:39 pmurias mberends: it's supposed to be public :(
14:39 arnsholt masak: Looks like a bare return is interpreted as getting a global var named return
14:44 arnsholt Hmm. return is implemented as a prefix operator
14:50 arnsholt Any good ideas how to fix it, given that?
15:03 lichtkind joined #perl6
15:03 lichtkind does promt autochomp`?
15:04 moritz_ arnsholt: maybe also add a term return?
15:04 rgrau joined #perl6
15:04 mberends lichtkind: can you not try it yourself?
15:04 arnsholt Yeah, that might work
15:05 moritz_ mberends: that only tells current behaviour, not expected
15:05 lichtkind mberends: im in the midst to clean up my system since my HDD is dissolving
15:05 moritz_ rakudo: print prompt('')
15:05 p6eval rakudo 020a6a: OUTPUT«Land der Berge, Land am Strome,»
15:05 moritz_ rakudo: print $*IN.get
15:05 p6eval rakudo 020a6a: OUTPUT«Land der Berge, Land am Strome,»
15:05 moritz_ both autochomp in rakudo
15:06 mberends and are specced to as well
15:06 riffraff joined #perl6
15:09 lichtkind moritz_: thanks you i supposed that but did not found i S32
15:09 lichtkind in
15:10 mberends lichtkind: sorry your hdd is dissolving, I remember what it used to be like ;)
15:10 mberends lichtkind: flash drives do not dissolve, they just vanish in a flash ;)
15:11 lichtkind :)
15:11 lichtkind mberends: i still like to rename prompt into ask
15:12 mberends lichtkind: +1 to that idea
15:12 lichtkind mberends: i stole it from rebol
15:12 lichtkind mberends: they have some cute ides more
15:12 mberends (stealing)++ # perl is good at that
15:12 lichtkind eg call the loop forever
15:13 mberends heh, -1 to that ;)
15:13 moritz_ bikeshedding++ # /me likes blue
15:13 lichtkind moritz_: i like blue too :)
15:14 * mberends likes blue, but only on the inside of the bikeshed ;)
15:14 lichtkind :)
15:14 lichtkind no honestly i was rethinking the control commands
15:14 lichtkind most of the loops are nearly perferct
15:14 lichtkind just the double meaning of loop bothers me a bit
15:15 lichtkind i dont say rebol is perfect
15:16 lichtkind because teir syntax is so minimal some command are just unnecesary but they have to becaus they dont know decent parameters
15:16 lichtkind btw they do the switch / break in the same wys as in perl 6
15:17 lichtkind i think perl 6 is now much more decent and less crazy then 4 years ago
15:18 mberends implementation makes all the difference
15:27 takadonet joined #perl6
15:27 PZt joined #perl6
15:28 pmurias mberends: added the dates
15:29 arnsholt What's the correct way to check for null/undef in NQP?
15:29 moritz_ pir::isnull iirc
15:30 arnsholt Makes sense
15:30 arnsholt Yeah, that looks like it works. thanks!
15:32 mberends pmurias: well done, nicely detailed. It increases the confidence of the application a lot :)
15:36 TimToady std: blah: sub blah() { }
15:36 p6eval std 30292: OUTPUT«ok 00:01 109m␤»
15:36 TimToady std: blah: class blah { }
15:36 p6eval std 30292: OUTPUT«[31m===[0mSORRY![31m===[0m␤Illegal redeclaration of symbol 'blah' (see line 1) at /tmp/LhrMsenR3e line 1:␤------> [32mblah: class blah[33m⏏[31m { }[0m␤FAILED 00:01 106m␤»
15:37 TimToady a label is now a constant, not a pseudo-type
15:37 TimToady (a type has a sub for coercion, you see)
15:38 TimToady coercing to a label doesn't seem terribly useful
15:38 TimToady well, maybe in INTERCAL
15:40 TimToady I wonder if there's any other language that distinguishes forward goto from backward; in p6 a forward goto requires goto "label", while a backward goto can just say goto label
15:41 TimToady fortunately, most label uses involve doing something with a labelled loop, where there label can be predeclared
15:43 takadonet2 joined #perl6
15:44 pmurias std: goto "label1";label1: say 1
15:44 p6eval std 30292: OUTPUT«ok 00:01 106m␤»
15:44 pmurias std: goto "label2";label1: say 1
15:44 p6eval std 30292: OUTPUT«ok 00:01 106m␤»
15:44 TimToady that's semantics :)
15:44 TimToady at least until the compiler can do constant folding
15:44 M_o_C joined #perl6
15:45 pmurias couldn't we just always use goto label?
15:45 TimToady only if goto were a reserved word rather than a function
15:46 pmurias it's a function?
15:46 TimToady can be
15:46 TimToady with current def
15:46 TimToady and, in fact, is parsed as one by STD
15:47 pmurias so goto ["label1","label2"][(1|2).pick] is legal?
15:48 TimToady std: goto ["label1","label2"][(1|2).pick]
15:48 p6eval std 30292: OUTPUT«ok 00:01 108m␤»
15:48 TimToady p5 can do it too
15:51 TimToady though p6 can probably do it more efficiently, assuming we cache all the known labels for each dynamic scope that can catch a GOTO exception
15:52 * moritz_ doesn't really think it's worth optimizing for GOTO
15:52 lue oh hai! (I see masak left early today...)
15:52 pmurias if goto is a function my &foo := &goto; foo("bar"); say 5;bar: say 3; just prints 3
15:54 arnsholt What's the correct way to create an undefined value in a PAST tree?
15:55 moritz_ what kind of undefined value?
15:55 TimToady pmurias: and that would be wrong because...?   :)
15:56 arnsholt moritz_: To create the value returned by a bare return
15:56 moritz_ arnsholt: oh. In Perl 6 that's Nil - don't know what the nqp equivalent is
15:56 arnsholt (I also discovered that undef doesn't work the way I thought it does in NQP)
15:56 moritz_ arnsholt: and maybe there isn't one, which might be the reason there is no empty return
15:57 arnsholt True, true
15:57 TimToady what is this 'undef' of which you speak?  :)
15:57 pmurias TimToady: that would be a label would stop the optimizer from building a control graph
15:57 arnsholt TimToady: Exactly ^^
15:57 pmurias s/would be/would mean/
15:57 moritz_ phenny: tell colomon to please correct the spelling of my name in the last justrakudoit blog post, s/mortiz/moritz/ :-) (common typo)
15:57 phenny moritz_: I'll pass that on when colomon is around.
15:58 justatheory joined #perl6
15:58 TimToady pmurias: I think you generally break basic blocks on a label boundary anyway
15:58 * lue is finishing up S32::Temporal...
15:59 TimToady and certainly, if someone cloaks goto and breaks the optimizer, they probably deserve whatever hapens
15:59 * pmurias will think about it while going to checking his bicycle
15:59 arnsholt moritz_: A different angle. Is there a way to explicitly reference null PMC in PIR?
15:59 TimToady *pp
16:01 moritz_ TimToady: care to update http://www.perlmonks.org/?node_id=732226 to current Perl 6 syntax? (just removing a single X)
16:05 TimToady moritz_: fixed, thanks
16:05 moritz_ also http://www.perlmonks.org/?node_id=716497 contains old series syntax
16:06 moritz_ rakudo: .say for [\~] 1 xx 10
16:06 p6eval rakudo 020a6a: OUTPUT«1␤11␤111␤1111␤11111␤111111␤1111111␤11111111␤111111111␤1111111111␤»
16:06 TimToady you're gonna make be regret popularizing Perl 6 :P
16:06 moritz_ :-)
16:06 * moritz_ stops digging out old Perl 6 code on perlmonks
16:08 TimToady hmm, I think we should leave that one historical, maybe with a note.
16:10 the_irrational_1 joined #perl6
16:13 lue how could I preview a pod document in html?
16:15 moritz_ lue: pod2html
16:15 TimToady moritz_: okay, added note on that one
16:20 lisppaste3 takadonet pasted "weird arguments" at http://paste.lisp.org/display/97273
16:21 takadonet2 can anyone tell me why I get two Pairs arguments instead of just one?
16:23 moritz_ takadonet2: @first.kv returns the keys and values OF THE ARRAY
16:23 moritz_ so 0 and the pair
16:23 moritz_ you likely want  for @first -> { say .key; say .value }
16:24 leedo joined #perl6
16:24 moritz_ rakudo: for a => 1, b => 2 -> $ ($key, $value) { say $value }
16:24 p6eval rakudo 020a6a: OUTPUT«Not enough positional parameters passed; got 0 but expected 2␤current instr.: '_block54' pc 389 (EVAL_1:152)␤»
16:24 moritz_ rakudo: for "a" => 1, "b" => 2 -> $ ($key, $value) { say $value }
16:24 p6eval rakudo 020a6a: OUTPUT«Not enough positional parameters passed; got 0 but expected 2␤current instr.: '_block54' pc 393 (EVAL_1:154)␤»
16:25 moritz_ rakudo: for "a" => 1, "b" => 2 -> $pair ($key, $value) { say $value }
16:25 p6eval rakudo 020a6a: OUTPUT«Not enough positional parameters passed; got 0 but expected 2␤current instr.: '_block54' pc 393 (EVAL_1:154)␤»
16:26 takadonet rakudo: for "a" =>1,"b"=>2 -> $pair { say $pair.key}
16:26 p6eval rakudo 020a6a: OUTPUT«a␤b␤»
16:26 takadonet moritz_:thanks
16:27 lichtkind mberends: how you would describe the effect of implementation on spec ?
16:30 arnsholt Haha!
16:31 nihiliad joined #perl6
16:31 arnsholt moritz_: I've managed to hack the code into some form of submission. Care to take a look?
16:32 TimToady lue: the current S02 does *not* claim that Instants are TAI aware, only that there is likely a constant Instant that defines the TAI epoch
16:33 TimToady along with constants for several other common epochs
16:33 am0c joined #perl6
16:33 espadrine joined #perl6
16:33 moritz_ arnsholt: yes, but I need to run now... will look at it later when I come back
16:34 mberends lichtkind: in theory, theory and practice are the same. In practice, they're not ;) # with apologies to justatheory
16:34 arnsholt moritz_: Right. I'll wrestle git-format-patch into submission, and leave a message with phenny
16:36 lichtkind mberends: thats obvious, my question was more: i understand that implementation forces a prcatical way how details work together but i saw some grater syntactical changes, and i was not shure you want to explain them the same way
16:39 lisppaste3 arnsholt pasted "NQP bare returns patch" at http://paste.lisp.org/display/97274
16:40 mberends lichtkind: you saw it more deeply than I did :) you're right, too, because feedback from users has given us syntax changes such as $fh.get, even though another way was already working. It shows the value of combining a good balance of top down and bottom up design.
16:40 arnsholt phenny: msg moritz_ NQP bare returns patch: http://paste.lisp.org/display/97274
16:40 arnsholt phenny: tell moritz_ NQP bare returns patch: http://paste.lisp.org/display/97274
16:40 phenny arnsholt: I'll pass that on when moritz_ is around.
16:42 TimToady I think of $fh.get more as feedback from a teacher
16:43 lue Almost done, just writing some details on various date/time system (being thorough)
16:45 nakajima joined #perl6
16:46 nakajima left #perl6
16:50 am0c__ joined #perl6
16:53 dj_goku joined #perl6
16:53 dj_goku joined #perl6
16:55 masak joined #perl6
16:57 lue ohaimasak!
16:59 masak ohailue!
17:00 lue almost done with S32::Temporal :)
17:02 masak take your time :)
17:04 lucs joined #perl6
17:04 lue All it took were 3 classes, and none of this :: business :) Just providing some details, which are horribly lacking in many parts of the spec.
17:05 TimToady \o/ for none of this :: business
17:05 masak I agree.
17:06 * TimToady considers aiming the lue at IO's horrendous :: collection
17:07 masak it takes a brave person to cut down to the heart of the matter.
17:07 * moritz_ is around
17:07 phenny moritz_: 16:40Z <arnsholt> tell moritz_ NQP bare returns patch: http://paste.lisp.org/display/97274
17:10 astrojp joined #perl6
17:11 lue *WHEEE* *WHIRRR* "Rdie(*)'s cannon is pointed towards input. Output should orbit itself next to input in 5 hours"
17:12 moritz_ rakudo: say 2**2**3
17:12 p6eval rakudo 020a6a: OUTPUT«256␤»
17:12 moritz_ rakudo: say 2**(2**3)
17:12 p6eval rakudo 020a6a: OUTPUT«256␤»
17:13 lue hooray for CAS!
17:16 * masak .oO( min CAS e kass )
17:17 mberends masak: I've just got a patchy proto to install Rakudo on Windows XP
17:18 jnthn It's an apache project now? ;-)
17:18 masak lue: do you know anything about the new Dr Who this weekend?
17:18 masak mberends: wow, that's great news! \o/
17:18 masak mberends++
17:19 mberends the horrible thing is that the Parrot --prefix directive needs the *backslashes* changed to *forward* slashes :-/
17:19 masak odd.
17:20 mberends somewhere inside Parrot, backslash separators completely disappeared
17:20 jnthn ohwtf. :-/
17:20 masak workaround time :)
17:20 lue masak: yes, but here in the US it's Apr. 17 :(
17:21 lue IT BUGS ME!
17:21 masak lue: ah. sorry about that... :)
17:22 lue In Britain it's 4/4 right
17:26 diakopter rakudo: say(foo(sub foo($x) { 4 }))
17:26 p6eval rakudo 020a6a: OUTPUT«4␤»
17:26 diakopter :|
17:26 masak o.O
17:27 masak that's an old one, right?
17:27 diakopter std: say(foo(sub foo($x) { 4 }))
17:27 p6eval std 30292: OUTPUT«ok 00:01 109m␤»
17:27 diakopter apparently it's not a bug
17:27 diakopter hence teh :|
17:27 masak the more I look at it, the more right it looks.
17:27 masak but... wow!
17:27 masak funky.
17:27 diakopter meh
17:28 masak probably chicken scratches to a Lisp hippie, though.
17:28 lue .u peace
17:28 phenny U+262E PEACE SYMBOL (☮)
17:29 diakopter ah well.  sprixel stage2 won't support that.
17:29 diakopter but someone can make stage4 support it
17:29 lue .oO[The symbol of a Lisp hippie: (☮) ]
17:30 lichtkind lue: its the rune of death
17:30 TimToady std: say foo sub foo($x) {4}
17:30 p6eval std 30292: OUTPUT«ok 00:01 107m␤»
17:30 TimToady it's just a post-declaration
17:30 masak perl6: say foo(bar(sub foo($x) { 42 }, sub bar($x, $y) { $x }))
17:30 p6eval pugs: OUTPUT«*** ␤    Unexpected "foo"␤    expecting "=", subroutine parameters, trait or block␤    at /tmp/d370utDhlo line 1, column 17␤»
17:30 p6eval ..elf 30292: OUTPUT«"my" variable $x masks earlier declaration in same scope at (eval 126) line 6.␤syntax error at (eval 126) line 3, near "(sub foo"␤"my" variable $Call::Api can't be in a package at (eval 126) line 3, near "($Call::Api"␤syntax error at (eval 126) line 6, near ")}"␤"my" variable
17:30 p6eval ..$Call…
17:30 p6eval ..rakudo 020a6a: OUTPUT«42␤»
17:30 masak \o/
17:31 lue Perl6: we cheer when things fail (sometimes) :)
17:31 masak but Rakudo doesn't fail.
17:31 TimToady rakudo: say foo sub foo($x) {4}
17:31 p6eval rakudo 020a6a: OUTPUT«4␤»
17:32 masak rakudo: if 0 { sub foo() { 4 } }; say foo
17:32 p6eval rakudo 020a6a: OUTPUT«Could not find sub &foo␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
17:32 TimToady std: if 0 { sub foo() { 4 } }; say foo
17:32 p6eval std 30292: OUTPUT«Undeclared routine:␤   'foo' used at line 1␤ok 00:01 107m␤»
17:32 diakopter TimToady: when does std check whether foo has been declared
17:32 diakopter two ago
17:32 diakopter three ago
17:32 masak rakudo: say foo; sub foo() { 4 }
17:33 p6eval rakudo 020a6a: OUTPUT«4␤»
17:33 * masak feels he's missing something
17:33 masak TimToady: what diakopter asked. how does it know not to create the &foo in the 'if 0', but know to create the &foo declared after the 'say foo'?
17:34 diakopter I guess std must queue up a list of sub names to check _after_ a block is done bein parsed
17:34 hicx174 joined #perl6
17:34 TimToady it has nothing to do with the 'if 0'
17:34 TimToady and everything to do with the fact that it's in the inner lexical scope
17:34 diakopter I was asking about say foo sub foo($x) {4}
17:34 masak oh. :)
17:34 masak right, subs are lexical nowadays.
17:35 TimToady S06:103 discusses postdeclaration, for those following along
17:37 diakopter when does std check whether foo has been declared in   say foo sub foo($x) {4}
17:38 Austin joined #perl6
17:38 jnthn foo will have been installed into the lexpad already by the time you get to calling it there.
17:38 diakopter I'm asking about std
17:38 masak one failing spectest in t/spec/S12-methods/instance.rakudo:
17:38 masak not ok 15 - meth(%h) is not a valid method call syntax
17:38 jnthn masak: aye, some $*SCOPE tracking fejl.
17:39 * masak looks incomprehensingly at that test
17:39 masak s/sing/ding/
17:40 TimToady STD calculates definition visibility at CHECK time with a method called 'explain_mystery'
17:40 masak ah, now I see it.
17:40 masak it tries to call a method .b as b()
17:40 TimToady doing it correctly involves remembering the lexpad that you check from so you don't get false positives
17:41 TimToady std: { foo; }; { sub foo {...} }  # should fail
17:41 p6eval std 30292: OUTPUT«Undeclared routine:␤   'foo' used at line 1␤ok 00:01 106m␤»
17:41 TimToady std: { foo; }; sub foo {...}  # should succeed
17:41 p6eval std 30292: OUTPUT«ok 00:01 106m␤»
17:41 diakopter std: { foo; }; sub foo {...}
17:41 p6eval std 30292: OUTPUT«ok 00:01 106m␤»
17:41 diakopter hmm, ok; thanks
17:42 TimToady you just remember the pad, and the fact that the name was unresolved, and try again at CHECK time, basically
17:42 TimToady easy peasy
17:42 masak :)
17:42 diakopter k.  as I postulated, except the queue is at CHECK instead of per block
17:43 masak TimToady: if I do eval('END { say "OH HAI" }'), I get the "OH HAI" at the end of the whole program, not at the end of the &eval call, right?
17:44 Austin Question: Given that many object attributes have similar characteristics, is there a way to group them by behavior? I'm thinking of the C# accessor feature, except maybe as some kind of first-class entity:  Attribute "name" has "get_name" and "set_name", attribute "type" has "get_type" and "set_type", so how can I get that into a simple declaration?
17:45 masak Austin: has $!a; # no getter/setter
17:45 masak Austin: has $.a; # getter
17:45 masak Austin: has $.a is rw; # getter/setter
17:45 diakopter right, but I think he wants method form
17:45 diakopter instead of =
17:46 masak oh.
17:46 masak macros?
17:46 masak maybe something with traits?
17:46 Austin diakopter: What I'm looking for is a way to build on "has $.a is rw"
17:46 jnthn Custom meta-attribute class.
17:46 masak mutated sea urchins with ninja training.
17:46 jnthn wtf
17:46 Austin So that, for example, I can implement "you can only set this value once" or "this array is always initialized" type behavior
17:46 takadonet rakudo: say 'a'..'z'.WHAT
17:46 masak jnthn: er. or what you said. :)
17:47 p6eval rakudo 020a6a:  ( no output )
17:47 takadonet ...
17:47 hicx174 joined #perl6
17:47 jnthn rakudo: say ('a'..'z').WHAT
17:47 jnthn :-)
17:47 masak Austin: arrays *are* always initialized :)
17:47 p6eval rakudo 020a6a: OUTPUT«Range()␤»
17:47 takadonet thanks
17:47 diakopter oh, I see.  he actually does want C#-style properties, where the "=" assignment actually calls a method the coder provided
17:47 takadonet rakudo: say ('a'..'z').WHAT
17:47 p6eval rakudo 020a6a: OUTPUT«Range()␤»
17:47 takadonet rakudo: say ("a..z").WHAT
17:48 p6eval rakudo 020a6a: OUTPUT«Str()␤»
17:48 masak diakopter: maybe modify the STORE method of the container somehow?
17:48 jnthn Austin: I guess short of implementing has $.x is rw style syntax in NQP..
17:48 takadonet rakudo: say ('a..z').WHAT
17:48 Austin diakopter: Not necessarily. I don't care about the =. I just want to avoid the copy/pasting of setter methods.
17:48 p6eval rakudo 020a6a: OUTPUT«Str()␤»
17:48 diakopter oh
17:49 Austin (Although that would logically follow...)
17:49 takadonet Any easy way to convert a Str() to a Range() ?
17:49 diakopter eval
17:50 TimToady masak: yes, end of the whole program
17:50 masak Austin: t/spec/S14-traits/attributes.t seems to do much of what you want.
17:50 diakopter :P
17:51 jonalv joined #perl6
17:51 jonalv oh hai
17:51 jonalv I am groupie, ask masak or jnthn
17:52 masak jonalv: \o/
17:52 takadonet diakopter: how would you do that with an eval?
17:53 masak TimToady: S04: "Code that is generated at run time can still fire off C<CHECK> and C<INIT> phasers...". what about BEGIN phasers? why would those be treated differently from CHECK phasers?
17:53 TimToady BEGIN means 'as son as compiled', which can be after CHECK time
17:54 TimToady but not after the CHECK time for the eval
17:54 TimToady after the CHECK time for the mainline code though
17:54 masak so the eval has its own CHECK time, but not its own END time?
17:54 masak what's the overriding rule that I'm missing?
17:55 Austin_Hastings joined #perl6
17:55 TimToady gravity
17:55 masak o.O
17:55 jnthn well, that drags you down.
17:55 TimToady as in window gravity
17:55 jonalv you talking about heavy stuff?
17:55 masak jonalv: this isn't something to be taken lightly!
17:55 TimToady 'this window moves to the northwest as far as possible'
17:56 diakopter has gravity gotten stronger by 1985?
17:56 TimToady BEGIN can't move to the left farther than its compile time
17:56 masak nodnod
17:56 TimToady END can't move to the right farther then the end of the process
17:56 masak so, basically, the overriding rule is that Perl 6 does what's temporally possible, and no more.
17:57 TimToady so I didn't intend levity by gravity
17:57 TimToady yes
17:57 * masak haz a content
17:57 masak ...with that answer.
17:57 masak rakudo: class Animal does Pet { }; role Pet does Bite { }; role Bite { method bite() { say "ouch" } };
17:57 p6eval rakudo 020a6a: OUTPUT«Null PMC access in type()␤current instr.: 'perl6;Animal;!class_init_11' pc 390 (EVAL_1:171)␤»
17:57 * masak submits rakuodbug
17:58 * TimToady is amazed that masak deduced he was missing an overriding principle :D
17:58 masak I usually am when things seem unfairly complex :)
17:59 TimToady Deducing that there must be a box outside of which you ought to think is really difficult.
17:59 masak that's like an overriding metaprinciple, I guess.
17:59 masak also, it seems more productive to assume "what am I missing?" rather than, say, "this box sucks!"
18:00 Austin_Hastings masak++ # Traits seems to be it. Thanks.
18:00 masak Austin_Hastings: jnthn++ tipped me off to their existence.
18:00 masak Austin_Hastings: only work in the past, not in the present.
18:00 Austin_Hastings ?
18:00 * diakopter hasn't read about traits yet
18:00 masak Austin_Hastings: there's an old Rakudo branch called alpha.
18:01 masak Austin_Hastings: the master branch hasn't quite caught up yet after the last refactor.
18:01 Austin_Hastings Oh. NP. I'm asking for NQP.
18:01 masak ohohah. I see.
18:02 masak rakudo: role A does B {}
18:02 p6eval rakudo 020a6a:  ( no output )
18:02 masak rakudo: role A does B {}; role B {}
18:02 p6eval rakudo 020a6a:  ( no output )
18:02 masak rakudo: class A does B {}; role B {}
18:02 p6eval rakudo 020a6a: OUTPUT«Null PMC access in type()␤current instr.: 'perl6;A;!class_init_11' pc 374 (EVAL_1:167)␤»
18:03 masak rakudo: role B {}; class A does B {}
18:03 p6eval rakudo 020a6a:  ( no output )
18:03 masak rakudo: class A does B {}
18:03 p6eval rakudo 020a6a: OUTPUT«Null PMC access in type()␤current instr.: 'perl6;A;!class_init_11' pc 353 (EVAL_1:161)␤»
18:04 masak ah. that's it.
18:05 Austin_Hastings left #perl6
18:05 masak we're discussing "type Slovaking", a kind of dual of "type Czeching" :)
18:06 masak std: sub foo($x: $y: $z) {}
18:06 p6eval std 30292: OUTPUT«ok 00:02 109m␤»
18:06 masak O.O
18:09 wknight8111 joined #perl6
18:09 lue The only bad thing about snow on a sunny day is that when you come back inside, everything
18:10 lue 's tinted green very dim :/
18:10 lue *and* very dim
18:10 masak green? is the snow at your place a bright purple?
18:10 lue No, that's just the afterimage after staring at very reflective white snow
18:11 TimToady .oO(I have eaten purple snow...)
18:11 masak lue: maybe you're experiencing greenshift from time traveling...
18:12 jnthn .oO(Does the purplse taste better than the yellow? That was srsly blech... )
18:12 TimToady perhaps a cosmic string is approaching to nullify his mucking about with time
18:12 TimToady yes, if it's purple from syrup
18:12 lue the good thing about staring at white snow on a clear, sunny day is that it filters what comes thru my eyes, and causes the monitor to not be so blue-tinted in my vision
18:13 mberends a surprise when auto-verifying a Rakudo build, is that the output of perl6 -v does not mention either Rakudo, or Perl, or 6 (unless in the Parrot revision)
18:13 TimToady the snow in question was at the summit of Mt Lassen, which I climbed at the tender age of four.
18:13 TimToady with Sunny Jim grape syrup.
18:13 masak TimToady: when would a BEGIN phaser fire after a CHECK phaser? also, what *does* happen if I do BEGIN {} inside an eval?
18:13 lue .oO(actually, the snow does turn purple in 2030, when acid rain is more common than pure rain)
18:14 lue .oO(but even then only in parts of China)
18:14 * masak knows the overriding principle now, but can't yet draw his own conclusions...
18:14 TimToady BEGIN always fires off the moment it is compiled, but compilation happens after mainline CHECK time for an eval
18:14 masak right.
18:15 TimToady well, unless the eval is done at compile time :)
18:15 TimToady (see constant folding...)
18:16 masak eval('BEGIN { say 2 }; END { say 4 }'); BEGIN { say 1 }; END { say 3 } # prints 1\n2\n3\n4 ?
18:17 rbaumer joined #perl6
18:17 masak an eval can be constant-folded? scary :)
18:17 masak sounds like an area where you have to step carefully so as not to trip over the Halting Problem...
18:18 masak s/4/\\n/
18:18 masak er. s/4/4\\n/, I mean.
18:18 TimToady well, perl 5 does 1,2,4,3, but that's arguably wrong
18:18 pugssvn r30293 | lue++ | [P6 Spec] completely changed S32::Temporal
18:19 TimToady errands &
18:19 masak TimToady: I was hesitating between 3,4 and 4,3 myself when writing that up.
18:20 masak it depends on whether the second END {} block is enqueued when it's being executet over, or at some earlier point, I guess.
18:20 colomon joined #perl6
18:20 masak s/cutet/cuted/
18:20 masak rakudo: if 0 { END { say "OH HAI" } }
18:20 p6eval rakudo 020a6a: OUTPUT«OH HAI␤»
18:21 masak how do I conditionally enqueue an END phaser? :)
18:21 lue And...relax! (to myself, of course)
18:21 colomon I'm surprised END phasers even work yet.  \o/
18:21 phenny colomon: 15:57Z <moritz_> tell colomon to please correct the spelling of my name in the last justrakudoit blog post, s/mortiz/moritz/ :-) (common typo)
18:22 moritz_ colomon: they are needed for Test.pm
18:22 lue I "fixed" S32::Temporal ! \o/
18:23 colomon moritz_: aaaaaa!
18:23 colomon apologies.
18:23 literal joined #perl6
18:23 moritz_ no problem
18:23 colomon notice it is a typo, I got it right in the next paragraph.
18:24 moritz_ yes
18:24 moritz_ and it's a quite common one, actually
18:24 colomon Fixed.
18:25 moritz_ masak: with newest parrot + rakudo, do you also get unexpected passes in S05-mass/properties-general.t?
18:26 masak no, don't think so.
18:26 masak I re-ran the spectests, but they didn't say anything about unexpected passes.
18:26 moritz_ now that's curious
18:26 lue .oO(I realise I have just killed an entire t/spec folder and damaged every implementation of P6 so far :) )
18:26 masak I'll run that file only and see.
18:26 moritz_ masak: maybe it's not run at all, because you don't have icu?
18:27 masak I do have icu.
18:27 moritz_ you do? that's new :-)
18:27 masak well, I sometimes do and sometimes don't :)
18:28 masak there's occasionally a window of time between getting a new laptop and figuring out how to put ICU into a Mac.
18:28 masak I think it's happened twice by now.
18:29 lue masak: how many laptops do you have? How often do you get one?
18:29 masak moritz_: I'm running that file. and the TODO'd tests are the same as the failing ones.
18:29 moritz_ masak: weird. They all pass here
18:30 masak lue: one at a time, but I wear them out on a yearly basis. one got stolen.
18:30 lue How are they worn out, I have to wonder?
18:30 masak lue: by use.
18:30 masak moritz_: Parrot r45393, Rakudo 020a6a.
18:31 lue they don't become unusable, do they? If they do, then you're doing some serious work and deserve an extra ++
18:32 masak oh, I don't know about that. :) I also use them to browse the web (heavily!), and watch movies and stuff.
18:33 colomon joined #perl6
18:33 lue rakudo: say (264/60)
18:33 p6eval rakudo 020a6a: OUTPUT«4.4␤»
18:33 colomon rakudo: say (264/60).perl
18:33 p6eval rakudo 020a6a: OUTPUT«22/5␤»
18:35 lue rakudo: say sqrt(12)
18:35 p6eval rakudo 020a6a: OUTPUT«3.46410161513775␤»
18:35 lue rakudo: say sqrt(12).perl
18:35 p6eval rakudo 020a6a: OUTPUT«3.46410161513775␤»
18:36 lue it doesn't simplify roots! :(
18:36 lue rakudo: say (sqrt(12)).perl
18:36 p6eval rakudo 020a6a: OUTPUT«3.46410161513775␤»
18:36 masak lue: sounds like a good idea for a module.
18:37 masak Rats are quite enough for most people, methinks. Roots is probably past what many people care about.
18:39 lue coincidentally, the ping timeout of colomon in minutes is the premiere of Doctor Who in Europe.
18:39 masak *lol*
18:39 [particle]1 joined #perl6
18:39 colomon with any luck my connection should be stable now.
18:39 colomon at least, the cable guy just left.
18:40 jonalv masak: "It's very Perl6 to be barefooted"
18:40 payload joined #perl6
18:40 masak jonalv: http://use.perl.org/~masak/journal/38988 :)
18:41 Trashlord joined #perl6
18:41 colomon rakudo: say sqrt(12).Rat.perl
18:41 p6eval rakudo 020a6a: OUTPUT«1351/390␤»
18:41 lue .oO(priceless example of Wikisurfing: I began at Discordian Calendar, and am now at Beth numbers. See if you can find my trail :))
18:42 colomon rakudo: say sqrt(12).Rat(1e-12).perl
18:42 p6eval rakudo 020a6a: OUTPUT«3650401/1053780␤»
18:42 payload joined #perl6
18:42 masak ooh, Beth numbers. didn't know about those.
18:42 masak lue++
18:43 lue .oO(this week in math class we'll learn about imaginary #'s, and I'm going to spend the weekend comprehending beth numbers. :P)
18:47 lue rakudo: multi sub infix:<Ω>($a,$b){$a++;$b+=$a;$b++;$a+=$b; $b - $a;}; say 4Ω3
18:47 p6eval rakudo 020a6a: OUTPUT«Confused at line 11, near "say 4\u03a93"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
18:47 lue rakudo: multi sub infix:<œ>($a,$b){$a++;$b+=$a;$b++;$a+=$b; $b - $a;}; say 4œ3
18:47 p6eval rakudo 020a6a: OUTPUT«Confused at line 11, near "say 4\u01533"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
18:47 lue rakudo: multi sub infix:<M>($a,$b){$a++;$b+=$a;$b++;$a+=$b; $b - $a;}; say 4 M 3
18:47 p6eval rakudo 020a6a: OUTPUT«Cannot assign to readonly value␤current instr.: '&die' pc 17215 (src/builtins/Junction.pir:399)␤»
18:48 lue alpha: multi sub infix:<M>($a,$b){$a++;$b+=$a;$b++;$a+=$b; $b - $a;}; say 4 M 3
18:48 p6eval alpha 30e0ed: OUTPUT«Cannot assign to readonly variable.␤in sub »
18:48 colomon rakudo: multi sub infix:<M>($a is copy,$b is copy){$a++;$b+=$a;$b++;$a+=$b; $b - $a;}; say 4 M 3
18:48 p6eval rakudo 020a6a: OUTPUT«-5␤»
18:49 lue dankon, colomon!
18:49 colomon ;)
18:49 masak rakudo: .say for [\~] 1 xx 10
18:49 p6eval rakudo 020a6a: OUTPUT«1␤11␤111␤1111␤11111␤111111␤1111111␤11111111␤111111111␤1111111111␤»
18:49 masak \o/
18:49 lue rakudo: multi sub infix:<M>($a is copy,$b is copy){$a++;$b+=$a;$b++;$a+=$b; $b - $a;}; say 3 M 4
18:49 p6eval rakudo 020a6a: OUTPUT«-4␤»
18:49 Logo joined #perl6
18:50 colomon o/
18:53 astrojp left #perl6
18:53 masak Logo: hi!
18:55 masak mberends: [backlogging] 'in practice, theory and practice are different' -- Scott Aaronson once wrote: "I
18:55 masak mberends: "If that's so, the theory was really bad."
18:55 masak Logo: that's the million-dollar question :)
18:56 moritz_ Logo: once every month
18:56 masak Logo: it's like this: we're working really hard on it, we have releases every month, and it's coming along fine.
18:56 masak Logo: we're basically getting to most people's threshold of usefulness as soon as we can.
18:57 masak how soon that will be for you depends on how resilient you are to various failures in the implementations :P
18:58 pugssvn r30294 | moritz++ | [t/spec] fudge catch.t for rakudo
18:59 lue rakudo: multi sub infix:<M>($a is copy,$b is copy){$a++;$b+=$a;$b++;$a+=$b; $b - $a;}; say 1 M 1
18:59 p6eval rakudo 020a6a: OUTPUT«-2␤»
18:59 masak Logo: many things already work. look:
18:59 masak rakudo: .say for [\+] 1..10
18:59 p6eval rakudo 020a6a: OUTPUT«1␤3␤6␤10␤15␤21␤28␤36␤45␤55␤»
18:59 masak rakudo: class Seal { method onk { say "ONK! } }; Seal.new.onk
19:00 p6eval rakudo 020a6a: OUTPUT«Unable to parse blockoid, couldn't find final '}' at line 11␤current instr.: 'perl6;Regex;Cursor;FAILGOAL' pc 1664 (ext/nqp-rx/src/stage0/Regex-s0.pir:907)␤»
19:00 masak oops.
19:00 masak rakudo: class Seal { method onk { say "ONK!" } }; Seal.new.onk
19:00 p6eval rakudo 020a6a: OUTPUT«ONK!␤»
19:00 masak Logo: we have a great number of operators, very advanced OO, great regex support...
19:00 masak Logo: jaffa4, is that you?
19:01 moritz_ Logo: they mostly work from inside the regex
19:01 moritz_ rakudo: say 'ABC' ~~ /:i abc/;
19:01 p6eval rakudo 020a6a: OUTPUT«ABC␤»
19:01 lue the one thing that's guaranteed broken right now is Date/Time related stuff :D
19:01 nihiliad joined #perl6
19:03 masak Logo: in general, you'll find many things that will not work as spec'd. we're currently looking for "early adopters", those for whom the sense of immense coolness of actually using Perl 6 outweighs the sense of frustration over missing features.
19:04 pugssvn r30295 | moritz++ | [t/spec] test for RT #62264, .^isa on Exception objects
19:07 * moritz_ is down to two tickets in RT
19:07 lue \o/
19:07 masak moritz_++
19:07 moritz_ tickets I own that need tests, that is.
19:07 masak nod.
19:07 diakopter assign a bunch more.. esp the WEIRD ones ;)
19:07 diakopter not to me. :)
19:07 lue We'd be throwing a party with webcams if there were two tickets in RT left :)
19:08 lue .oO(I am going to end up learning *a lot* of math above my current level to understand beth numbers :))
19:08 jnthn moritz_: I assigned two to you earlier today :-)
19:08 masak lue: is 'party with webcams' like an ordinary party, just better? :)
19:08 moritz_ jnthn: I know - I could close both of them without writing new tests
19:08 jnthn moritz_: Oh, just turned some on? :-)
19:08 jnthn Cool.
19:10 moritz_ akshually the tests for triangle reduce were already turned on by the time I got the mails from RT :-)
19:10 moritz_ colomon++ took care of that
19:10 dalek rakudo: 1935270 | moritz++ | t/spectest.data:
19:10 dalek rakudo: we now pass catch.t
19:10 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/1935270ae31e85f7dbc6846b4da808920114acbc
19:10 lue well, we'd rather sit in our houses than go somewhere and risks someone reporting bugs while we're not near our computers :)
19:11 jnthn moritz_: oh awesome :-)
19:12 * moritz_ goes early to bed because he has to attend at baptism at 5:30am tomorrow
19:12 jnthn Logo: Да! И водка!
19:13 moritz_ Logo: I know that somebody translated some of my blog posts and tutorials to russian
19:13 moritz_ I'm sure google can find them
19:13 lue .oO(no! no more russian! last time you filled the IRC I almost cried /o\)
19:13 diakopter \o\
19:14 lue phenny: tell me to stop worrying
19:14 masak Logo: Есть, конечно, русский народ :)
19:14 phenny Hey, I'm not as stupid as Monty you know!
19:16 masak Logo: well, 10 years, or 8 years, or 3 years, depending how you count... :)
19:16 sbp phenny: "Скоро 10 лет должно исполнится как Perl 6 разрабатывается"?
19:16 phenny sbp: "Soon 10 years should be fulfilled as Perl 6 is being developed" (ru to en, translate.google.com)
19:16 lue I prefer babelfish myself :)
19:17 masak Logo: because pmichaud usually does the updates.
19:17 masak and he hasn't been around too much lately...
19:18 masak Logo: snarkyboojum generated a newer graph. I have it here somewhere...
19:18 masak Logo: http://www.mutteringmadman.com/perl6/status.png
19:19 masak Logo: (that sudden drop followed by a quick recovery is what we're currently up to. it's a refactor)
19:19 lue .oO(can't wait for the day of no regression!)
19:22 lue can P6 read binary files yet? (i.e. open and play with the individual bytes of, say, a PNG file)
19:31 lue .oO("Aleph-null bottles of beer on the wall, Aleph-null bottles of beer, Take one down, and pass it around, Aleph-null bottles of beer on the wall")
19:31 masak lue: no, we'd need the Buf type for that, I think.
19:32 masak Logo: http://perlgeek.de/blog-en/
19:36 lue and I'm guessing Buf is NYI
19:36 masak well, MNYI.
19:37 masak 'mostly'
19:37 masak rakudo: Buf
19:37 p6eval rakudo 020a6a: OUTPUT«Could not find sub &Buf␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
19:37 masak and what little is in alpha doesn't seem ported over, either.
19:37 masak lue: want to implement Buf? it's mostly a simple matter of programming :)
19:39 lue rakudo: my $object = Buf.new(0x2A,0x2B); say decode('utf8',$object)
19:39 p6eval rakudo 020a6a: OUTPUT«Could not find sub &Buf␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
19:39 lue (as usual, the spec is not too clear...)
19:40 masak lue: [new spec] Discordian!?
19:40 jnthn A disfunctional accordian?
19:40 masak lue: I'm assuming you're two days late for your April 1 joke...
19:41 Caelum joined #perl6
19:42 lue let's go with that
19:42 masak lue: on first reading of your spec change, I'm thinking two things:
19:42 lue (here it comes)
19:42 masak (1) oh, good, he got rid of a lot of cruft
19:42 masak (2) WTF!?
19:43 masak phrasing that in a vaguely constructive way: your commit is a good first step towards something :)
19:43 masak it'll need some revision.
19:45 masak not sure Perl 6 will gain anything from being combined with Discordia... :P
19:45 lue of course. In my head, putting them into classes makes perfect sense (short from actual types, which I *cough* don't know anything about creating in P6)
19:45 Caelum left #perl6
19:46 masak 'type' is just a collective term for class or role or subtype, IIUC.
19:46 lue something like my Time $onEarth = 13:47
19:47 lue or our Date $ofRelease = 12/31/∞
19:47 masak seems to me you want to introduce some pretty special new parsing.
19:47 lue :)
19:48 lue .oO(isn't that the point of P6?)
19:48 masak that rethorical question is so vague that it wouldn't have an answer even if it weren't rethorical... :P
19:49 lue When it comes to the calendars: there honestly isn't much of anything, only Gregorian. I decided that another common calendar ought to be one present on every Linux distro (ddate)
19:49 masak lue: ok, so you actually are serious about the Discordian stuff. then I know.
19:50 lue It was either a couple semi-common, or every. single. calendar in existance.
19:50 masak this is one of the problems of Temporal.
19:50 masak there's a constant risk of doing too much.
19:50 lue You can get rid of it if you want :) I actually considered the Mayan calendar as well :P
19:50 masak I'm inclined to get rid of it.
19:50 masak here's my goal for that piece of spec:
19:50 masak (1) minimal-ish
19:51 masak (2) very, very clear
19:51 lue Of course, the Mayan calendar will be removed from the spec after 12/21/12 :)
19:51 masak (3) attractive, in the sense that people nod and think, "yes, I want to use this"
19:51 masak lue: by the way, you're using a very anglo-centric date format. I don't think that's going to fly...
19:52 lue It's all Earth-centric anyway (the Darian calendar would balace that out though...)
19:52 masak lue: the only date format I could even begin to defend as a standard is iso 8601.
19:52 masak lue: let's stay on Earth.
19:55 lue just commenting on the fact that nothing we do can be completely independent yet (you're lucky I didn't define an Instant; did you check the backlogs?)
19:56 lue I think the big problem is that, when it comes to time, different people need completely different things.
19:56 masak that's not unlike any other part of the spec.
19:57 lue but with (lunch)time, it's doubly so :)
19:57 masak I think what makes Temporal very bikeshed-friendly is that it's a field where everyone is an expert in some sense :)
19:57 masak lue: you're just full of HH quotes, aren't you? :P
19:57 diakopter not I
19:57 SmokeMachine joined #perl6
19:58 masak diakopter: but you have other admirable qualities, so we like you anyway :)
19:58 lue s/HH/H2G2/ # *cough*
19:58 masak lue: oh, indeed. sorry :)
19:58 masak rakudo: class X::Y {}; class X
19:58 p6eval rakudo 193527: OUTPUT«Malformed package declaration at line 11, near ""␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
19:58 masak rakudo: class X::Y {}; class X {}
19:58 p6eval rakudo 193527:  ( no output )
19:59 diakopter masak: bleh
20:00 masak :)
20:00 diakopter everytime TimToady complains I'm perseverating, I think of salivating.
20:00 masak huh?
20:01 diakopter on this channel.
20:01 diakopter he says I'm perseverating.
20:01 masak you think of salivating on this channel?
20:01 * jnthn puts up an umbrella
20:01 diakopter no, the word 'perseverating' makes me think of the word 'salivating'
20:01 masak why?
20:02 diakopter b/c they almost rhyme
20:02 masak lue: I have a desire to see something good come out of all the discussion around Temporal. I think it'll take an exotic combination of collaboration and benovelent self-proclaimed dictatorship that we haven't really managed to arrive at yet.
20:02 levengli joined #perl6
20:03 masak diakopter: ah.
20:03 diakopter and salivation:food::perseveration:unreachable_goal
20:04 astrojp joined #perl6
20:05 masak lue: right now, I think I'd like to take a step back, look at a number of other datetime libraries, and try to figure out what API we really want.
20:05 masak lue: after that, try to connect it to some minimal internal implementation.
20:06 masak in fact, let's do that now.
20:06 lue alright. Lessee, there's Python, JavaScript, and Haskell, for starters
20:06 masak I have these:
20:06 masak http://ruby-doc.org/core/classes/Time.html
20:06 masak http://joda-time.sourceforge.net/
20:06 diakopter ticks & seconds as measures of duration.  all other measures are relative to some external timestamp
20:06 masak http://hackage.haskell.org/packages/archive/time/1.1.4/doc/html/Data-Time-Format.html
20:06 masak http://docs.python.org/library/time.html
20:07 lue to a notepad! (of some sort). Let's take notes on what we like, and nopaste them.
20:07 masak diakopter: thought you said you didn't have opinions on Temporal...
20:08 diakopter yeah yeah
20:08 masak diakopter: if durations are just seconds, do they really need their own class?
20:08 masak diakopter: wtf is a tick?
20:08 lue check the backlogs for my definition of an Instant :)
20:08 diakopter cpu tick
20:09 masak diakopter: is that the 1/18.2 of a second one?
20:09 diakopter I dunno
20:09 masak why is it necessary/relevant?
20:10 diakopter I dunno
20:10 diakopter I guess it isn't
20:10 masak ah. also called a 'jiffy'. "usually" 0.01 second.
20:10 masak diakopter: well, if I don't understand it, I'm inclined not to include it in a minimal description...
20:11 diakopter lue: I think of "instant" as "a point in time" or "a certain time" or just "a time"
20:11 diakopter in that sense, Time would be a class representing a point in time
20:12 diakopter and Timeline would be a universe-wide (ignoring relativistic effects & drift) ray
20:12 diakopter so, a Calendar would be a way of representing a Timeline
20:13 masak thing I like from the Ruby Time lib: Time.new creates a Time object initialized to the current time. simple, understandable, short, unambiguous.
20:13 lue .oO(I can't seriously define an instant, because we go through an ∞ number of them every second, IMO)
20:14 masak lue: that never stopped us from defining other continuous entities, such as the real number line.
20:15 masak the .utc? and .gmt? methods are a nice touch.
20:15 diakopter similarly in JS, Date.new creates a new Date from Now (Then, when it was created)
20:16 lue I know there's a difference between UTC and GMT but I don't remember...
20:16 masak there isn't, it seems.
20:16 masak not here, at least.
20:16 lue .beats
20:16 phenny @886
20:16 masak also, it'd be nice to have an easy plan for converting back and forth between UTC and local times.
20:17 masak specify an easy, effortless way to do that => win
20:17 masak also, getting at year, month, day, hour, minute, second is a must for a serious time module.
20:17 lue maybe something like [time here].utc-8, where -8 is the same as if we did $x - 8 ?
20:18 masak a .strftime is a nice plus, but I doubt it's strictly minimal.
20:18 lue I tried once to find a way to go epoch->human-readable, but with no luck
20:19 lue .oO(this kind of discussion is what a second monitor was made for; I don't want to switch back-n-forth between IRC and firefox!)
20:19 masak I'm slightly ashamed I didn't include this into the things to be inspired by, too: http://search.cpan.org/dist/DateTime/lib/DateTime.pm
20:20 masak I'm done looking at Ruby. moving on to JodaTime.
20:20 masak http://joda-time.sourceforge.net/
20:21 masak I found this module, whose distinctive feature is that it steps away from the horribleness that is Java's GregorianCalendar
20:22 * lue is currently trying to find out how to put chatzilla in the sidebar, to have seamless research & irc
20:23 diakopter lue: do you have All-In-One Sidebar?
20:23 lue no, not yet :)
20:24 lue I have very little use for a sidebar in firefox (until now)
20:28 astrojp left #perl6
20:30 lue .oO(lue thinks of how awful it would be if someone came here with a nick of [OFF])
20:31 astrojp joined #perl6
20:32 masak in Joda Time, DateTime objects are immutable. I like that. http://joda-time.sourceforge.net/quickstart.html
20:33 masak they also think about localization. we needn't do localization in Perl 6 core, but we should think about it, too.
20:35 lue That's the problem I encountered when defining Date in the spec; the localization.
20:35 masak "Joda-Time defaults to using the ISO calendar system (the calendar used by most of the business world)", and then it provides other, pluggable, calendar systems. I like that.
20:35 lue (I also think I used too many environment variables...)
20:36 masak also, Joda-Time seems to have DateTime but not individual Date and Time. I'm thinking we should have just one class, too.
20:36 masak still undecided on whether we ought call it DateTime or just Time.
20:37 lue diakopter: how do I open Chatzilla in AiOS?
20:37 masak oddly, they do have LocalDate and LocalTime separate.
20:37 masak wonder why.
20:37 masak if there's a reason, and if we choose to do the same, then DateTime is the definite choice for the non-local one.
20:41 masak I'd say logically, a DateTime object makes more sense than separate Date and Time objects. jnthn seems to agree.
20:42 lue I have to say it makes more sense as well. I think I was worried about how calendars/clocks would match up
20:42 masak hm. I pasted the wrong Haskell link before, it seems. here's a correct(er) one: http://hackage.haskell.org/packages/archive/datetime/0.1/doc/html/Data-DateTime.html
20:43 * masak tries to get into a Haskell-y mood before reading that
20:44 masak in Haskell, a DateTime is a UTCTime.
20:44 masak a UTCTime "consists of the day number, and a time offset from midnight. Note that if a day has a leap second added to it, it will have 86401 seconds."
20:45 lue ( ChatZilla refuses to open in an AiOS sidebar :( )
20:45 masak I think I like the simplicity of that.
20:47 masak they also allow for conversion to and from UniversalTime, which is "ime as measured by the earth's rotation, adjusted for various wobbles"
20:47 masak that's very pretty, but I'm unclear on what exactly that means in practice :)
20:48 masak but instinctively, I like the separation "Universal Time: Time as measured by the earth -- UTC: Time as measured by a clock". and I like the phrasing.
20:49 lue We get a wobble-ometer :)
20:49 masak but then I'm getting confused again. there's also a ClockTime and a CalendarTime :/ too many Times!
20:49 lue and they're all an illusion :)
20:49 lue I'm surprised no-one's defined a LunchTime :)
20:50 lue (ooh, that reminds me, what did IETF post _this_ April Fools?)
20:50 masak ok, going on to look at Python: http://docs.python.org/library/time.html
20:50 masak even their URL is orderly! Python++
20:54 lue (but docs.python.org's search function is weird :/)
20:54 lue here's Python 3: http://docs.python.org/py3k/library/time.html
20:55 masak thanks.
20:56 lue "DST is Daylight Saving Time, an adjustment of the timezone by (usually) one hour during part of the year. DST rules are magic (determined by local law)"
20:56 lue I love the DST rules are magic part :)
20:56 masak :)
20:57 masak this is a very good reason to leave the actual implementation of local timezones as an exercise to the module implementor :)
20:58 masak at most, we might do one or two time zones ourselves to show the way.
20:58 masak but they're probably not going into core.
20:58 lue I personally like how Py3 returns gmtime and localtime as an array of elements.
20:58 lue wouldn't a library be best suited for that?
20:59 masak think so.
20:59 masak lue: where do you see that gmtime and localtime return an array of elements?
21:00 finanalyst joined #perl6
21:00 lue on the link I provided above (Py3), the first table demonstrates this array.
21:01 masak I'm not sure I like it.
21:02 masak sure, it's close to what time functions in Perl 5 return in array context.
21:02 masak but I guess I see that as a poor man's OO.
21:03 levengli where can i see good perl6 code?
21:03 levengli library, module examples
21:03 levengli somthing to get me started
21:03 lue An "array" would be better than a string of some sort, though
21:03 finanalyst masak: greetings. I have just tried using proto, and things have changed. But cant get it to work. got problem with projects.state
21:04 masak lue: yes, but we're talking about the primary representation of the DateTime object here, right? I'd prefer that to be opaque.
21:04 masak finanalyst: ok, good to know. can you nopaste?
21:04 masak finanalyst: mberends++ is currently making changes involving a S11-like module system and Windows compatibility.
21:05 lue http://docs.python.org/py3k/library/datetime.html this is described as a more OOP way of date/time
21:05 masak lue: the reason, I think, is that I greatly prefer the readability of Time.new.year to gmtime()[0]
21:06 lisppaste3 finanalyst pasted "using proto" at http://paste.lisp.org/display/97286
21:06 masak "There are two kinds of date and time objects: “naive” and “aware”. This distinction refers to whether the object has any notion of time zone, daylight saving time, or other kind of algorithmic or political time adjustment." +1 to that.
21:06 * masak likes the distinction 'naive' and 'aware'
21:06 masak finanalyst: looking
21:07 masak finanalyst: ok, seems it's just not finding the file.
21:07 finanalyst i modified the parrot / perl6 parts to point at where I have rakudo
21:08 finanalyst it seems that it doesnt like locations other than <home>.perl/
21:08 * lue likes their datetime object, except for the part where they assume Gregorian and whatever the clock we use is called
21:08 finanalyst btw using ubuntu linux
21:08 levengli anyone?
21:09 lue I really can't think of any examples, except for the specification: http://perlcabal.org/syn
21:10 masak finanalyst: it dies on line 121 of lib/Ecosystem.pm
21:10 masak finanalyst: because 'open or die' isn't a functioning idiom in Rakudo.
21:10 masak it already dies if the open fails.
21:10 masak also, arguably, it shouldn't die if the file isn't there.
21:11 finanalyst but where is it looking?
21:11 masak it tries to find projects.state in your current directory.
21:11 masak what happens if you create an empty file and run proto again?
21:12 finanalyst looking
21:13 levengli someone had to have written code
21:13 masak phenny: tell mberends that it seems that if a projects.state doesn't exist when proto is executed, proto dies: http://paste.lisp.org/display/97286 -- we need to do something friendlier there than 'open or die' :)
21:13 phenny masak: I'll pass that on when mberends is around.
21:13 finanalyst projects.state is placed in <home>/.perl6/proto/
21:14 finanalyst which exists
21:14 masak hm.
21:14 lue I'll have to think about Temporal, but I need to take a break, I'm starting to get bored :) [afk]
21:14 finanalyst but i have changed some of the configuration options because I have rakudo at another location
21:15 masak is ~/.perl6/proto/ the dir where you keep your proto installation?
21:15 masak is it the dir where you execute proto?
21:15 finanalyst no. proto is <home>/development/proto
21:15 masak lue: thanks for the discussion so far! I'll keep looking at Python and CPAN.
21:15 finanalyst thats where I run proto from
21:16 masak finanalyst: it should be in that dir, methinks.
21:16 finanalyst ok. will try. but that is not where the first run of proto put it at.
21:17 masak I see.
21:17 finanalyst ok now working
21:17 masak I'm not up-to-date with what proto is currently doing, sadly :/
21:17 masak I should take the time to study it a bit.
21:18 finanalyst i copied projects.state from where proto put it to where proto is
21:18 finanalyst things not good!!!! :(
21:19 masak no?
21:19 finanalyst i tried ./proto install svg and got a whole load of failes
21:19 finanalyst s/failes/faileds/
21:19 finanalyst i dont want all modules. just svg
21:20 finanalyst proto worked without a problem a few months ago. Now not!
21:20 spinclad pmurias: in gsoc proposal, in the Deliverables item, s/v8-mildew,/v6-mildew, /  # (digit and space after)
21:21 masak finanalyst: right. are you using the new Rakudo master?
21:21 finanalyst i did a git pull a couple of days ago
21:22 masak right. you're aware that there's been a sizeable refactor of the whole of Rakudo?
21:22 finanalyst just install new ubuntu distribution and i updated rakudo. had to delete parrot
21:22 masak nod
21:22 finanalyst yes to refactor
21:23 finanalyst do i need to delete rakudo directory and start again?
21:23 finanalyst i had to do that when ng became master
21:24 jnthn nqp: say('abc ' ~~ /\s*$/);
21:24 p6eval nqp: OUTPUT« ␤»
21:24 jnthn nqp: say('abc' ~~ /\s*$/);
21:24 p6eval nqp: OUTPUT«␤»
21:25 masak finanalyst: I'm afraid I don't know much more than you at this point.
21:25 spinclad levengli: i would look at the modules that proto knows about, and  (not so much library/module code) the p6 advent calendar.
21:25 masak finanalyst: anyway, the feedback that you've given so far helps a lot.
21:26 masak levengli: what spinclad said. start by looking at the smaller, contained things, like JSON::Tiny.
21:27 levengli where do i find this?
21:28 spinclad (sorry, having a visual migraine right now, can't track down urls)
21:28 masak levengli: http://github.com/moritz/json
21:29 * spinclad afk &
21:30 levengli http://github.com/perl6/perl6-examples look suitable
21:30 levengli thanks all
21:30 finanalyst masak: just deleted previous rakudo location and trying to install whole environment via proto
21:30 masak finanalyst: that might help. it sorta works here, I think.
21:30 masak haven't tried to install anything in the last few days.
21:30 finanalyst if it works, then configuration options of proto either broken or not intuitive
21:31 masak agreed.
21:31 masak both are quite likely right now, I'm afraid.
21:31 finanalyst not really a problem as long as proto works from scratch
21:32 masak finanalyst: once upon a time, proto was something I had absolute control over. now, it's something that I have almost no control over :)
21:35 masak the OOP layer of time in Python does Date, Time and DateTime.
21:35 levengli has anyone tried the link i sent
21:35 levengli everything is failing
21:35 masak it keeps all the 'aware' stuff in tzinfo classes. offsets, DST, etc.
21:35 masak levengli: that's probably because those were written for the old branch of Rakudo called 'alpha'.
21:36 spinclad levengli: or earlier
21:36 masak levengli: I bet no-one has looked at those scripts and tried to make them work with the new master.
21:36 masak levengli: if you point me to a particular script, I might help you get it working.
21:36 masak maybe :)
21:36 pmurias spinclad: thanks for mentioning the typo, fixed
21:37 masak hm. looking at DateTime on CPAN, I think that's an excellent starting point for a Temporal module in Perl 6.
21:38 masak (but perhaps with some things like time zones shunted off to non-core modules, I dunno)
21:38 masak but the synopsis in that CPAN module page is excellent! http://search.cpan.org/dist/DateTime/lib/DateTime.pm
21:38 levengli 99-problems/P01-scottp.pl
21:38 * masak looks
21:39 masak "Method 'Int' not found for invocant of class 'Block'"
21:39 masak that's what I get when I try to run it.
21:40 levengli same here
21:40 masak let's try to find out why.
21:40 levengli although i don't know whether i should read the error messages bottom up or top to bottom
21:40 masak neither.
21:40 masak only the first line really matters. :)
21:40 masak the rest is unfortunate garbage.
21:40 levengli good to know
21:41 masak rakudo: <A B C D E F>[* - 1].say
21:41 p6eval rakudo 193527: OUTPUT«Method 'Int' not found for invocant of class 'Block'␤current instr.: 'perl6;Mu;' pc -1 ((unknown file):-1)␤»
21:41 masak there it is.
21:41 masak first nontrivial line.
21:41 masak rakudo: say <A B C D E F>.WHAT
21:41 p6eval rakudo 193527: OUTPUT«Parcel()␤»
21:41 masak rakudo: <A B C D E F>[5].say
21:41 p6eval rakudo 193527: OUTPUT«F␤»
21:42 masak right.
21:42 masak '* - 1' doesn't seem to work.
21:42 levengli WTF are you doing?
21:42 masak levengli: I'm running Perl 6 code on the channel :)
21:42 levengli p6eval: voodoo
21:42 levengli how?
21:42 masak rakudo: say "hi levengli!"
21:42 p6eval rakudo 193527: OUTPUT«hi levengli!␤»
21:42 levengli rakudo: say "aha"
21:42 p6eval rakudo 193527: OUTPUT«aha␤»
21:42 masak :)
21:42 masak levengli++
21:43 masak buubot: karma levengli
21:43 buubot masak: levengli has karma of 2
21:43 masak levengli: welcome to #perl6 :) levengli++
21:43 masak buubot: karma levengli
21:43 buubot masak: levengli has karma of 3
21:43 levengli now that i got that, why is it not liking the [* -1]? and what is buubot?
21:44 masak levengli: at one point Rakudo handled [*-1], but we've been refactoring a bit in the past few months.
21:44 masak not everything is in place again.
21:44 masak we're working on it. :)
21:44 masak levengli: buubot is one of our many bots. I was mainly showing off its karma function.
21:45 levengli can i call man bots to see what you have?
21:45 masak levengli: we're a very bot-rich channel. it's like living in the future. p6eval is another very useful bot.
21:45 masak levengli: no, but I can give you a URL :)
21:45 lisppaste3 finanalyst pasted "proto not working" at http://paste.lisp.org/display/97288
21:45 levengli p6eval: say "lala"
21:45 masak levengli: http://howcaniexplainthis.blogspot.com/2009/11/what-perl6-irc-bots-do.html
21:45 levengli by all means
21:46 masak levengli: you can't say 'p6eval: ', you need to say 'rakudo: ' or some other implementation, like 'pugs: '
21:46 finanalyst masak: tried using proto to install rakudo and parrot. All seems to function, then proto will not install
21:46 masak finanalyst: it looks thoroughly broken :(
21:47 masak why is it trying all projects?
21:47 masak and why is it failing to download them?
21:47 masak finanalyst: I'm unable to give much advice without looking at it closer, and I'm not sure I'll be able to give it the attention it deserves today.
21:47 finanalyst proto worked so well before
21:48 masak aye.
21:48 masak then ng happened.
21:48 masak finanalyst: *all* my projects are broken! not just proto.
21:48 masak everything.
21:48 masak but we're working to fix it.
21:48 finanalyst its a bit annoying as i have deleted all the files
21:48 finanalyst which i was using as examples
21:49 finanalyst of how to code!
21:49 masak finanalyst: you could go back in time to January, then everything will work again.
21:49 levengli what language is rakudo written in?
21:49 masak levengli: a combination of PIR, nqp and Perl 6.
21:49 finanalyst sigh. i had time to work on an svg output
21:49 masak levengli: and a little bit of C.
21:49 levengli finally a "real" language
21:50 levengli anything that i can do in the C department/
21:50 levengli ?
21:50 jnthn Maybe hack on Parrot, but generally we want to keep the amount of C minimal in Rakudo.
21:50 finanalyst i want to have one of the first live perl6 examples on my company website when rakudo * comes out
21:51 finanalyst got to sleep now. bye
21:51 jnthn The more written in Perl 6 or a subset of it, the better.
21:51 finanalyst left #perl6
21:52 masak levengli: in theory, you could also help mberends on vill, another Perl 6 implementation, which is written in C.
21:52 levengli and doesn't run on parrot, i assume
21:52 masak levengli: correct. it runs on llvm.
21:52 levengli why not run on the actual machine?
21:53 masak levengli: not even Perl 5 does that :)
21:53 masak in short, because it's hard for a dynamic to run directly on the metal.
21:53 masak s/dynamic/dynamic language/
21:53 jnthn levengli: Because a language like Perl 6 needs a _lot_ of runtime support that it's not good use of resources, and hard, to re-invent.
21:53 jnthn *to use
21:54 levengli given that i lead a team developing an embedded RTOS, metal is where i feel at home
21:54 levengli sigh
21:55 masak levengli: wish we had more C code for you :)
21:55 levengli is there a graphical API in parrot?
21:55 levengli if so, i could get started with that
21:55 masak not built-in, I don't think.
21:56 masak but there's an NCI bridge.
21:56 levengli you're killing me
21:56 levengli too many TLA
21:56 masak 'Native Calling Interface'
21:56 masak a way to connect Parrot to C.
21:56 masak and, by extension, C libraries.
21:57 sorear levengli: SMOP is a bare metal (well, POSIX) Perl6 implementation
21:57 levengli is there a way for perl6 to call parrot api or does require another bridge?
21:57 levengli is SMOP alive?
21:57 * masak cues jnthn
21:57 diakopter correction: llvm isn't a VM, per se; it's a framework that helps coders implement systems that include optimization phases
21:57 sorear Rakudo can run inline parrot VM code
21:57 jnthn levengli: It's pretty easy to call into Parrot stuff.
21:58 masak diakopter: oh! didn't know that. thanks.
21:58 sorear rakudo: say Q:PIR { new %r, 'Integer' }
21:58 p6eval rakudo 193527: OUTPUT«0␤»
21:58 jnthn levengli: mberends++ and I wrote something called Zavolaj.
21:58 levengli jnthn: is Zavolaj perl6 calling into parrot?
21:58 jnthn levengli: It provides a nice wrapper that lets you declaratively write C bindings.
21:59 sorear Zavolaj automates perl6 calling into C
21:59 jnthn In Pelr 6.
21:59 jnthn *Perl
21:59 levengli where do i find it?
21:59 jnthn it's not 100% complete, but it's been enough to connect to MySQL and write a client for it.
21:59 jnthn http://gist.github.com/jnthn/zavolaj
22:00 * masak would like to try to start with CPAN's DateTime and narrow it down to an 'essential core' for S32::Temporal
22:00 sorear rakudo: my $libc := pir::loadlib__ps("libc.so.6"); my $sin := pir::dlfunc__ppss($libc, "sin", "ff");  say $sin(0.1)
22:00 p6eval rakudo 193527: OUTPUT«:= binding of variables not yet implemented␤current instr.: '&die' pc 17215 (src/builtins/Junction.pir:399)␤»
22:00 sorear rakudo: my $libc = pir::loadlib__ps("libc.so.6"); my $sin = pir::dlfunc__ppss($libc, "sin", "ff");  say $sin(0.1)
22:00 p6eval rakudo 193527: OUTPUT«No NCI thunk available for signature 'ff'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
22:00 masak 'NCI thunk'? :)
22:00 cognominal http://brotherbard.com/blog/2010/03/experimental-gitx-fork/   # for the fanbois
22:01 sorear rakudo: my $libc = pir::loadlib__ps("libc.so.6"); my $atan2 = pir::dlfunc__ppss($libc, "atan2", "fff");  say $atan2(1, 1)
22:01 p6eval rakudo 193527: OUTPUT«3370280550400␤»
22:02 sorear rakudo: my $libc = pir::loadlib__ps("libc.so.6"); my $atan2 = pir::dlfunc__ppss($libc, "atan2f", "fff");  say $atan2(1, 1)
22:02 p6eval rakudo 193527: OUTPUT«0.785398185253143␤»
22:02 masak CPAN's DateTime considers the 'naive' datetimes to have a 'floating' time zone. not sure which model I like better.
22:02 levengli Q:PIR {
22:02 levengli $P0 = find_lex 'self'
22:02 levengli $P0 = getattribute $P0, '$!unmanaged'
22:02 levengli $P1 = find_lex '$idx'
22:02 levengli $S0 = $P0[$P1]
22:02 levengli %r = box $S0
22:02 levengli };
22:02 sorear that's how you call from Rakudo into C without Zavolaj
22:02 masak levengli: when you paste code, please use a nopaste service :)
22:03 masak levengli: see the /topic
22:03 levengli i assume that this is calling PIR code directly from perl6
22:03 jnthn Right.
22:03 levengli sorry
22:03 masak no problem.
22:03 levengli how do i nopaste?
22:03 jnthn We have Zavolaj so that we can do that in one place.
22:03 masak levengli: see /topic
22:03 sorear levengli: Rakudo is a Perl6 to PIR compiler; Q:PIR is like __asm__
22:03 masak levengli: http://paste.lisp.org/new/perl6
22:04 dalek rakudo: 93fa3d5 | jonathan++ | src/Perl6/ (2 files):
22:04 dalek rakudo: Implement interpolation of method calls, array indexing and hash indexing in strings. Needs a workaround due to <after> being NYI.
22:04 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/93fa3d5561df1122a32c3b6d985dc75394ad4d84
22:04 dalek rakudo: 84fcbbc | jonathan++ | t/spectest.data:
22:04 dalek rakudo: Merge branch 'master' of github.com:rakudo/rakudo
22:04 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/84fcbbc6446b4df4cbf37a21d3079bb146073d5b
22:04 levengli got it jnthn and masak
22:05 masak jnthn++!
22:05 masak jnthn: Rakudo just got a great deal more awesome! \o/
22:05 sorear jnthn++!
22:06 masak pugs: my @a = 1,2,3; say "@a"
22:06 p6eval pugs: OUTPUT«@a␤»
22:06 masak pugs: my @a = 1,2,3; say "@a[]"
22:06 p6eval pugs: OUTPUT«1 2 3␤»
22:06 masak pugs does it already, it seems.
22:06 masak pugs: my @a = 1,2,3; say @a.elems()
22:06 p6eval pugs: OUTPUT«3␤»
22:06 masak pugs: my @a = 1,2,3; say "@a.elems()"
22:06 p6eval pugs: OUTPUT«3␤»
22:06 jnthn pugs: my @a = 1,-2,3; say "@a[1].abs.sin()"
22:06 p6eval pugs: OUTPUT«0.9092974268256817␤»
22:07 masak pugs: my @a = 1,2,3; my $method = 'elems'; say "@a."$method"()"
22:07 p6eval pugs: OUTPUT«*** ␤    Unexpected "$method"␤    expecting term postfix, operator, ":" or ","␤    at /tmp/NAw9xt4WCc line 1, column 47␤»
22:07 masak hah! :)
22:07 masak pugsbug.
22:07 jnthn Works in Rakudo. ;-)
22:07 masak jnthn++
22:07 snarkyboojum joined #perl6
22:07 masak snarkyboojum! \o/
22:08 snarkyboojum masak: hi o/
22:08 masak snarkyboojum: we're having a party, with webcams! :D
22:08 * snarkyboojum is still half asleep
22:08 snarkyboojum party.. with webcams?
22:08 snarkyboojum :)
22:09 masak snarkyboojum: a party with webcams is like an ordinary part, only much awesomer :P
22:09 masak s/part,/party,/
22:09 snarkyboojum sounds... intriguing :P
22:10 masak rakudo: $_ = "an ordinary part,"; s/part\,/party\,/; .say
22:10 p6eval rakudo 193527: OUTPUT«an ordinary part,␤»
22:10 masak jnthn: why doesn't that work?
22:10 levengli all: doesn't perl6 -I<path> work for including module paths?
22:10 masak rakudo: $_ = 'a'; s/a/b/; .say
22:10 p6eval rakudo 193527: OUTPUT«a␤»
22:12 jnthn rakudo: my $_ = 'lol'; /o/; say $/;
22:12 p6eval rakudo 193527: OUTPUT«Redeclaration of symbol $_ at line 11, near " = 'lol'; "␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
22:12 jnthn rakudo: $_ = 'lol'; /o/; say $/;
22:12 p6eval rakudo 193527: OUTPUT«Any()␤»
22:14 masak levengli: I don't think it does.
22:14 masak levengli: I usually set $PERL6LIB
22:14 * masak tries -I
22:15 masak levengli: no, no -I.
22:15 levengli any other suggestios?
22:16 masak levengli: I usually set $PERL6LIB
22:16 levengli tried it
22:16 levengli works nicely
22:17 masak \o/
22:17 masak levengli++
22:17 levengli no longer supported in Perl or not yet supported in rakodu?
22:17 masak the latter.
22:18 masak there are a number of simple flags it doesn't have... it's sort of in limbo since about a year back.
22:18 masak someone was supposed to work on a grant with it, but something distracting happened, I think.
22:18 levengli i'm guessing that this is not something written in C
22:18 masak I wouldn't mind having -n and -p, too.
22:18 masak levengli: no, most of it is written in PIR.
22:18 levengli you keep saying that
22:19 levengli i finally got all phsyced up to get started on p6, now i have to learn PIR
22:19 levengli i'll try and hold off a little longer
22:19 masak well, you don't have to learn PIR if you just want to write Perl 6 code.
22:20 levengli jnthn: win32-api-call.p6 returns "Can not handle type Mu in an 'is native' signature."
22:20 masak I frankly don't know a lot of PIR, and I get along fine.
22:20 levengli don't you write part of rakadu?
22:20 sorear levengli: PIR is Parrot VM assembly language... it's actually quite easy, just a tremendous amount of typing
22:21 jnthn The easiest bits to hack on are the bits written in Perl 6 and/or NQP.
22:21 colomon joined #perl6
22:22 masak PIR wasn't actually meant to be that widely used as a language written by humans, IIUC.
22:22 levengli jnthn: are you referring to your example or rakadu development?
22:23 jnthn levengli: Rakudo dev.
22:23 jnthn levengli: I'm not sure why that doesn't work.
22:23 levengli probably because i'm running on linux
22:24 levengli :)
22:24 jnthn oh, calling a win32 api on linux may not work out so well ;-)
22:28 snarkyboojum "Time is just a jumbled iTem." - hehe.. he really put it in
22:28 masak that was part of my 'wtf?' reaction.
22:29 snarkyboojum lol
22:29 jnthn > sub bold($t) { "<b>" ~ $t ~ "</b>" }; say "my &bold("huge") meatball";
22:29 jnthn my <b>huge</b> meatball
22:29 masak jnthn: \o/
22:29 masak snarkyboojum: by the way, I'm adding our first test for Yapsi::Runtime now, to set the scene.
22:31 snarkyboojum masak: excellent!
22:31 supernovus joined #perl6
22:32 masak supernovus: \o/
22:32 supernovus So, I read that Temporal is changing, again. If anyone is interested in the half-baked version I was hacking on, I threw it up on github.
22:33 supernovus Hello masak!
22:33 masak supernovus: excellent. yes, we're interested.
22:33 masak I've been thinking out loud on the channel this evening.
22:34 supernovus masak: I never got very far in the Temporal reflux, I had all sorts of ideas for it. The code on github is only an example of what I had planned. I think a lot of it would make a better third-party library, rather than a part of the core.
22:35 supernovus http://github.com/supernovus/temporal-reflux
22:35 masak supernovus: I've had similar thoughts. do you think Perl 6 core should have any temporal support at all?
22:35 * masak looks
22:36 masak "Temporal ReFlux: It's about time" :)
22:36 masak (time puns)++
22:36 supernovus masak: I'm not sure about whether it should or not. Honestly, as long as it has 'time', everything else may be better off in an external module.
22:36 masak wow, ambitious.
22:36 masak the reflux code, I mean.
22:37 masak supernovus: I'd like to be able to do simple things without reaching for a library. things like asking what day of the month it is.
22:37 masak problem is, already that is a quite involved operation, because dates are inherently hairy.
22:37 supernovus I do plan to resume Temporal reflux, but I may wait to see what the Temporal spec rewrite looks like..
22:37 masak the quest of the API designer is to make it feel easy without outright lying.
22:39 masak supernovus: good. variation and different angles are potentially beneficial.
22:43 pugssvn r30296 | jnthn++ | [t/spec] Correct a test description that ccidentally the interpolated call.
22:44 jnthn *accidentally
22:44 jnthn :-)
22:44 masak snarkyboojum: I tried the subtype approach, and it worked, so I went with that :) http://github.com/masak/yapsi/commit/d6b91c794c382e3e764911a56af317443a3ef49f
22:45 snarkyboojum masak: beautifully simplified :)
22:46 masak snarkyboojum: I thought you'd like it :)
22:46 masak now for that test...
22:46 snarkyboojum masak: looks like real Perl 6 :)
22:46 masak supernovus: I hope whatever Temporal ends up being doesn't contain something called Gregorian::Calendar :/
22:47 supernovus Eh, I kept that name, but got rid of the rest of the Gregorian::* stuff. Basically, DateTime could take any "calendar" and just "use it".
22:48 masak mm.
22:48 supernovus Although, for namespace consistency, it should have been Calendar::Gregorian
22:49 masak yeah.
22:49 levengli good night all
22:50 supernovus o/
22:50 masak levengli: 'night!
22:50 dalek rakudo: cd0c7cf | jonathan++ | src/Perl6/ (2 files):
22:50 dalek rakudo: Fix up quote mod checks for array and hash interpolations, and implement function call interpolation too.
22:50 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/cd0c7cf8c60018547f5d2765ba364a8dda89dc99
22:51 lichtkind good ight
22:51 lichtkind night
22:51 masak jnthn++
22:52 supernovus okay, there is a debugger called tardis and a bot called dalek...
22:53 k23z__ joined #perl6
22:53 * supernovus is queuing up today's episode of Doctor Who...
22:54 k23z__ err
22:54 k23z__ anyone here know svg ?
22:55 masak k23z__: I do.
22:55 snarkyboojum std: my $12-var = 'invalid name';
22:55 p6eval std 30295: OUTPUT«[31m===[0mSORRY![31m===[0m␤Preceding context expects a term, but found infix = instead at /tmp/obIE8fFOAF line 1:␤------> [32mmy $12-var [33m⏏[31m= 'invalid name';[0m␤FAILED 00:01 107m␤»
22:55 k23z__ masak, I wonder why this doesn't render
22:55 k23z__ http://pastie.org/902134
22:56 masak k23z__: no idea. looks fine to me on first inspection.
22:57 k23z__ masak, x1="-80" x2="-80" y1="0" y2="0" />
22:57 k23z__ masak, does that mean negative x ?
22:57 masak jnthn: http://rt.perl.org/rt3/Ticket/Display.html?id=73912
22:58 masak k23z__: yah, it should.
22:58 masak jnthn: http://rt.perl.org/rt3/Ticket/Display.html?id=73886
23:01 masak snarkyboojum: it works! http://github.com/masak/yapsi/commit/ce943eda8981ae29d6069fd1d7c740f76306475b
23:02 M_o_C joined #perl6
23:03 k23z__ masak, I was able to figure it out
23:04 snarkyboojum masak++ :)
23:04 snarkyboojum afk for a bit&
23:05 colomon rakudo: class A { has $.color; method B(A $x: ) { say $x; } }; my $a = A.new(:color("green"); say $a.B; say B($a);
23:05 p6eval rakudo 84fcbb: OUTPUT«Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 11␤current instr.: 'perl6;Regex;Cursor;FAILGOAL' pc 1664 (ext/nqp-rx/src/stage0/Regex-s0.pir:907)␤»
23:05 colomon rakudo: class A { has $.color; method B(A $x: ) { say $x; } }; my $a = A.new(:color("green")); say $a.B; say B($a);
23:05 p6eval rakudo 84fcbb: OUTPUT«A()<0x465e8b8>␤1␤Could not find sub &B␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
23:06 colomon rakudo: class A { has $.color; method B(A $x: ) { say $x.color; } }; my $a = A.new(:color("green")); say $a.B; say B($a);
23:06 p6eval rakudo 84fcbb: OUTPUT«green␤1␤Could not find sub &B␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
23:06 colomon rakudo: class A { has $.color; method B(A $x: ) { say $x.color; } }; my $a = A.new(:color("green")); $a.B; B($a);
23:06 p6eval rakudo 84fcbb: OUTPUT«green␤Could not find sub &B␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
23:07 colomon rakudo: class A { has $.color; method B(A $x: ) is export { say $x.color; } }; my $a = A.new(:color("green")); $a.B; B($a);
23:07 p6eval rakudo 84fcbb: OUTPUT«green␤Could not find sub &B␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
23:09 k23z__ masak, wanna see the result
23:09 k23z__ ?
23:12 phenny joined #perl6
23:17 cognominal rakudo: (<a b>; 1,2).crosswith(&[~])
23:17 p6eval rakudo cd0c7c: OUTPUT«Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 11␤current instr.: 'perl6;Regex;Cursor;FAILGOAL' pc 1664 (ext/nqp-rx/src/stage0/Regex-s0.pir:907)␤»
23:17 cognominal <a b> X~ 1,2
23:17 cognominal rakudo: <a b> X~ 1,2
23:17 p6eval rakudo cd0c7c:  ( no output )
23:17 cognominal rakudo:  say  <a b> X~ 1,2
23:17 p6eval rakudo cd0c7c: OUTPUT«a1a2b1b2␤»
23:18 colomon cognominal: I'm not sure if calling crosswith directly is strictly kosher, but...
23:19 colomon rakudo: say crosswith(&infix:<~>, <a b>, (1, 2));
23:19 p6eval rakudo cd0c7c: OUTPUT«a1a2b1b2␤»
23:19 opx^on left #perl6
23:20 cognominal colomon, I am typing it straight from S03:4438
23:20 colomon you can't always believe the spec.  ;)
23:20 k23z__ masak, ?
23:21 colomon cognominal: that's totally not how it's implemented in Rakudo, and I'm not quite sure why the spec specifies it that way.  (Though the general notions there were very helpful when implementing Xop.)
23:22 opx^on joined #perl6
23:22 k23z__ hey
23:23 k23z__ how would you guys like some pretty images generated with Perl6 ?
23:23 k23z__ I wonder
23:23 k23z__ I have a project in mind but it requires also studying some mathematics and some group work
23:23 colomon pretty images are good.
23:26 k23z__ well there are these things, they're called braids, they are generalizations of permutations(as I can see by reading a bit of maths about them)
23:27 k23z__ for example if you have a transposition (1 2) and you apply it to itself , you get the identic permutation
23:27 k23z__ basically a transposition (1 2) is the permutation (2,1)
23:27 k23z__ but if you get a braid and apply it to itself you can twist it infinite many times
23:27 k23z__ and it does not return to its initial position
23:28 k23z__ it just twists some more :) it's very interesting IMHO
23:29 sorear That sounds an awful lot like a free group.
23:29 k23z__ sorear, well it has much to do with free groups actually
23:29 k23z__ actually I will show you a braid right now, although it's not a fantastically interesting one ...
23:32 k23z__ http://i41.tinypic.com/11tlj6p.gif
23:32 k23z__ http://i42.tinypic.com/20h7t68.png
23:33 k23z__ just generated these two using some Perl5 and GD::SVG
23:33 k23z__ I know Perl6 has some SVG
23:33 k23z__ I was thinking I'd learn more braid theory and then render some more complicated braids
23:33 k23z__ the only problem with it is that it has some rough edges that show up, I'd like to eliminate those dunno whow
23:34 k23z__ *how
23:39 envi^home joined #perl6
23:45 sorear you could use GD::SVG in Perl6
23:45 sorear the edges are rough, I'm working on that
23:52 k23z__ sorear, now ?
23:56 am0c joined #perl6
23:58 masak k23z__: sorry, I was away nomming... :)
23:58 masak k23z__: glad you figgered it out, though.
23:58 k23z__ masak, me too
23:58 masak time to head homewards...
23:59 masak k23z__: personally, I'd love pretty images rendered by Perl 6!
23:59 masak here's my contribution to that: http://use.perl.org/~masak/journal/39152
23:59 masak that's SVG generated by a Perl 6 script.
23:59 masak 'night

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

Perl 6 | Reference Documentation | Rakudo