Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2008-08-26

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:03 bacek joined #perl6
00:08 ruoso_ joined #perl6
00:45 BinGOs_ joined #perl6
00:47 hercynium joined #perl6
00:51 ting joined #perl6
01:09 Lorn joined #perl6
01:10 pugs_svn r22036 | ruoso++ | [smop] starting the sketch on the sample compiled s1p code...
01:24 ggoebel joined #perl6
01:30 xinming_ joined #perl6
01:55 kanru joined #perl6
03:11 eternaleye_ joined #perl6
03:17 |alanhaggai| joined #perl6
03:24 alester_ joined #perl6
03:51 alanhaggai joined #perl6
04:24 hcchien joined #perl6
04:30 evan joined #perl6
04:31 evan could anyone point me to any info on how parrot does/will do profiling?
04:38 BinGOs joined #perl6
04:40 Maghnus joined #perl6
04:40 sri_work joined #perl6
05:21 dhruvakm joined #perl6
05:22 dhruvakm I am still not able to build a usable version of perl6 on windows XP. I earlier had issues on using ActiveState perl as it uses msvc compiler. I am not using strawberry perl and the build goes through but fails on running a simple inline script
05:32 Psyche^ joined #perl6
05:36 dhruvakm The error I get: .\perl6.exe -e"say 'Hello, world.'"
05:36 dhruvakm Null PMC access in get_string()
05:41 xinming joined #perl6
05:51 dhruvakm i guess no help here!
05:53 dhruvakm left #perl6
06:09 ashizawa joined #perl6
06:11 xinming_ joined #perl6
06:24 Alias_ joined #perl6
06:24 moritz_ @tell dhruvakm try #parrot on irc.perl.org
06:24 lambdabot Consider it noted.
06:27 meteorjay joined #perl6
06:31 masak joined #perl6
07:06 pmurias joined #perl6
07:17 agentzh left #perl6
07:20 agentzh joined #perl6
07:28 penk joined #perl6
07:35 zamolxes joined #perl6
07:48 iblechbot joined #perl6
07:59 alanhaggai joined #perl6
08:02 BinGOs joined #perl6
08:15 larsen_ joined #perl6
08:21 pmurias joined #perl6
08:35 masak @tell moritz_ all tests pass now, except for that one with the ESCAPE attribute. I might have some time late tonight to expand/implement the tests enough to make the new HTML::Template a viable replacement for the old one.
08:35 lambdabot Consider it noted.
08:36 * moritz_ is back from the dentist
08:36 lambdabot moritz_: You have 1 new message. '/msg lambdabot @messages' to read it.
08:37 pmurias_ joined #perl6
08:38 masak Perl 6 grammars are already very nice to work with
08:40 masak there's pain avoided in every efficient line of code, compared to writing one's own lexer/AST generator
08:40 masak with the advent of {*}, it will be twice as wonderful
08:40 moritz_ but it would be nice if some of the errors produced nicer messages
08:40 masak indeed. if you have time to experiment, I can paste you the latest version of the module
08:41 moritz_ or just use a branch in git
08:41 moritz_ whatever you prefer ;)
08:41 masak branch-in-git is clearly the Right Thing
08:41 masak I'll try :)
08:42 moritz_ btw I've got an email from someone in Belarus asking for permission to translate my blog posts to Russian ;)
08:44 masak might be the same person whose Russian Perl 6 blog I subscribe to
08:46 moritz_ Andrew Shitov
08:46 masak same one.
08:46 masak Андрей Шитов
08:47 masak Russian++ # much saner consonants
08:48 masak actually, Cyrillic++, rather
09:02 masak moritz_: http://github.com/viklund/nov​ember/tree/new-html-template
09:02 lambdabot Title: viklund's november at new-html-template — GitHub
09:04 moritz_ how do I fetch remote branches with git?
09:06 masak moritz_: git checkout new-html-template
09:06 masak (I think)
09:06 masak no, that will probably not work... hold on
09:07 moritz_ error: pathspec 'new-html-template' did not match any file(s) known to git.
09:07 moritz_ and git-branch doesn't show that branch
09:07 masak moritz_: try git checkout -b new-html-template
09:07 masak you might need to `git pull` before
09:07 masak or maybe even `git pull origin new-html-template`
09:07 masak I dunno
09:08 moritz_ error: Entry 'p6w/t/html-template.t' would be overwritten by merge. Cannot merge.
09:09 masak moritz_: you working on an unclean tree again? :)
09:09 moritz_ dunno
09:09 masak time to test that `git clean` you mentioned yesterday, methinks
09:09 masak `git status` answers questions about the state of files
09:10 masak seems to me a simple `rm -r p6w/t` would solve your current problem, however
09:10 moritz_ ok, after a 'git reset ...' I could pull
09:10 masak ah.
09:10 masak git embraces TMTOWTDI, for sure
09:10 moritz_ but after 'git pull origin new-html-template' I still don't see a new-html-template branch
09:11 masak does `git checkout new-html-template` do anything useful?
09:11 moritz_ same as before
09:12 masak hm :/
09:12 masak what about if you clone the new branch directly?
09:12 moritz_ in a new repository?
09:13 masak yes
09:13 masak not optimal, but until we grok git :P
09:14 moritz_ I'll ask in #git
09:14 wknight8111 joined #perl6
09:14 masak good idea.
09:15 masak IRC++
09:20 elmex joined #perl6
09:22 moritz_ omg, #git is even larger than #perl6
09:22 moritz_ (but very helpful)
09:22 masak just as #perl6 :)
09:22 moritz_ ;)
09:25 jferrero joined #perl6
09:29 masak moritz_: actually, I would guess that the bigger number of inhabitants in #git compared to #perl6 is commensurate with the number of users of the respective softwares -- or if not, probably to folks-on-#perl6's advantage
09:31 dr_df0 joined #perl6
09:37 * moritz_ digests the sentence
09:37 moritz_ probably, yes ;)
09:38 moritz_ and we have more bots ;)
09:41 masak I, for one, welcome our new git-using, Perl 6-driven, IRC-dewlling overlords
09:42 moritz_ ;)
09:42 moritz_ if I manage to understand git at some point, I will too
09:43 moritz_ have you thought about a simple test harness already?
09:44 masak moritz_: besides Test.pm? no.
09:44 moritz_ if prove can be made to run a different program than perl, that's all we need
09:45 masak there's prove6 in the Pugs repo
09:45 masak ...perhaps indication that prove can't be made to run a different program
09:45 masak s/indication/indicating/
09:46 moritz_ prove6 is a bit pugs specific
09:46 moritz_ but certainly a good place to start stealing from ;)
09:47 masak :)
10:13 moritz_ http://dev.perl.org/perl6/faq.html talks about "active metadata on values, variables, subroutines, and types" - any idea what's meant by that?
10:13 lambdabot Title: Perl 6 FAQ - perl6
10:13 moritz_ is that the .WHAT and .HOW stuff?
10:35 wknight8111 joined #perl6
10:46 ggoebel joined #perl6
11:12 a-jing joined #perl6
11:13 a-jing left #perl6
11:23 Arathorn left #perl6
11:33 dr_df0 joined #perl6
12:02 meppl joined #perl6
12:29 c1sung joined #perl6
12:30 ruoso joined #perl6
12:37 redicaps joined #perl6
12:37 sri_work joined #perl6
12:38 redicaps left #perl6
12:42 cggoebel joined #perl6
12:42 c1sung joined #perl6
12:49 pmurias joined #perl6
12:50 pmurias ruoso: hi
12:50 ruoso hi pmurias
12:53 pmurias ruoso: are you blocking on anything?
12:56 pmurias ruoso: i yhink is should add context support to mold, is adding it to the method call a good idea?
13:02 pmurias is it possible to call a function with arbitary context in Perl 6?
13:03 moritz_ I think so, yes
13:03 pmurias moritz_: how?
13:04 pmurias my $context=:($ is rw); ???
13:04 moritz_ pmurias: by using the appropriate listop
13:04 moritz_ or prefix, or whatever it is
13:06 pmurias moritz_: i meant in a generall way instead of using a (propably infinite if chain) or eval
13:06 pmurias * general
13:08 moritz_ pmurias: that I don't know
13:26 alanhaggai joined #perl6
13:33 _ggoebel_ joined #perl6
13:47 a-jing joined #perl6
13:47 a-jing left #perl6
13:49 penk left #perl6
13:57 alc joined #perl6
14:03 moritz_ masak: #58372 is actually "autovivification doesn't work" or something along these lines
14:04 cggoebel joined #perl6
14:07 masak moritz_: you're right.
14:08 masak feel free to add that
14:08 dr_df0 left #perl6
14:08 masak or even change the bug title
14:08 dr_df0 joined #perl6
14:09 moritz_ otoh I don't know if $/ is allowed to autovivify, since it might be immutable (unless the regex was matched with 'is rw')
14:09 masak moritz_: btw, are you sure that long hashing chains autovivify?
14:09 moritz_ I'll just reply to the ticket
14:10 moritz_ in perl 5 $h{a}{b} autovivifies $h{a}
14:11 moritz_ it doesn't make sense to autovivify on the last indexing level, since you can always just assign to it
14:11 moritz_ oh wait, I think in Perl 6 only write accesses autoviv
14:11 moritz_ so 'defined $/<a><b>' shouldn't, but '%h<a><b> = $stuff' should
14:11 masak moritz_: ISTR that too
14:12 masak what it shouldn't do is halt the program
14:12 masak hence the current title of the bug
14:12 moritz_ agreed
14:13 * moritz_ is quite suprised, because he's seen some autovivification code in actions.pm
14:13 moritz_ perhaps one of the features that weren't tested, and thus bitrotted
14:14 rindolf joined #perl6
14:16 masak moritz_: but actions.pm is nqp, innit?
14:16 moritz_ masak: I mean PAST initialization code which handles autovivification
14:17 moritz_ just search for :vivibase
14:18 masak ach so
14:18 masak yes, I also recall previous discussions about it
14:24 _ggoebel_ joined #perl6
14:32 ggoebel joined #perl6
14:44 TJCRI joined #perl6
14:46 cggoebel joined #perl6
14:47 ruoso @tell pmurias, I'm starting to sketch the output of s1p... I'm kinda blocking on that because I'd use some help... you can see a file in doc/
14:47 lambdabot Consider it noted.
14:49 cmarcelo joined #perl6
14:56 dr_df0 rakudo: my @a=(1,2,3); my @b=(0,2); say @a[@b]
14:56 p6eval rakudo 29834: OUTPUT[3␤]
14:57 kanru joined #perl6
14:57 moritz_ rakudo doesn't do slices yet :(
14:57 dr_df0 :(
14:58 hercynium joined #perl6
14:58 masak the implementor in me says "bah -- slices are sugar. they're nice, but you can work around not having them"
14:58 masak that said, they would sure be nice to have
14:59 moritz_ the implementor in me has looked at the code generation for slices, and sees that it might be a PCT thing
14:59 moritz_ but I'm not quite sure
14:59 dr_df0 what's PCT?
14:59 moritz_ Parrot Compiler Tools
15:00 masak what does it mean, in this case, that it might be a PCT thing?
15:01 moritz_ dr_df0: the IRC logs at http://irclog.perlgeek.de/perl6/today automatically anotate some abbreviations with their meaning (just FYI, it's fine to ask here also)
15:01 lambdabot Title: IRC log for #perl6, 2008-08-26
15:02 moritz_ masak: method postcircumfix looks like that to me (but not sure)
15:02 masak oki
15:03 moritz_ it just generates a a PAST::Var node
15:04 moritz_ from the semilist inside the subscript
15:04 moritz_ but I don't find the place where that is actually turned into a hash or array lookup
15:06 moritz_ the term postcircumfix only appears actions.pm, grammar.pg and the PIR files that are generated from those two
15:07 * moritz_ wonders if it should be done in method variable
15:08 masak I wouldn't know.
15:09 moritz_ probably not, the only postcircumfix stuff it handles is $<foo> (ie acceess to $/)
15:09 masak ah.
15:15 barney joined #perl6
15:18 larsen_ joined #perl6
15:25 dr_df0 left #perl6
15:25 alester joined #perl6
15:27 pochi joined #perl6
15:29 Chillance joined #perl6
15:42 moritz_ @tell TimToady S09:1209 uses exists as a function. Maybe the example should use defined() in both p5 and p6
15:42 lambdabot Consider it noted.
15:44 Exodist joined #perl6
15:46 cjfields joined #perl6
15:50 iblechbot joined #perl6
15:54 cotto_w0rk joined #perl6
16:04 zamolxes joined #perl6
16:09 evan left #perl6
16:17 abra joined #perl6
16:25 bennymack-work this is probably a silly question but "Int"s do not get automatically converted to "Num"s?
16:26 moritz_ they should, I think
16:26 bennymack-work I had a sub that takes a Num but I sent it a 3 and it died. Change the prototype to Int and it worked
16:27 moritz_ that's a bug in rakudo
16:27 bennymack-work rakudo: sub foo(Num $x) { say $x; } foo(2};
16:27 p6eval rakudo 29834: OUTPUT[Statement not terminated properly at line 1, near "foo(2};"␤current instr.: 'parrot;PGE::Util;die' pc 120 (runtime/parrot/library/PGE/Util.pir:82)␤]
16:27 bennymack-work oh ok
16:27 moritz_ you need a ; after the } if it's not followed by a newline
16:28 bennymack-work rakudo: sub foo(Num $x) { say $x; }; foo(2};
16:28 p6eval rakudo 29834: OUTPUT[Statement not terminated properly at line 1, near "(2};"␤current instr.: 'parrot;PGE::Util;die' pc 120 (runtime/parrot/library/PGE/Util.pir:82)␤]
16:28 moritz_ rakudo: sub foo(Num $x) { say $x; }; foo(2)
16:28 p6eval rakudo 29834: OUTPUT[Parameter type check failed␤current instr.: 'foo' pc 132 (EVAL_15:55)␤]
16:28 bennymack-work ahh, my bad
16:29 moritz_ it's a known rakudo bug
16:29 moritz_ problem is, the numeric types don't fit well into the general type system
16:31 alanhaggai joined #perl6
16:35 bennymack-work I just tried to run this from your perl-5-to-6 blog: say "Rest: @rest[]"; and it printed "Rest: @rest[]"
16:35 moritz_ that's also a known bug in rakudo :(
16:35 moritz_ pugs: my @a = 1, 2, 3; say "@a[]"
16:35 p6eval pugs: OUTPUT[1 2 3␤]
16:35 moritz_ pugs does it right
16:36 moritz_ (the tests are in t/spec/S02-literals/array-interpolation.t )
16:44 pugs_svn r22037 | moritz++ | [t/spec] more tests for hash interpolation
16:49 alanhaggai joined #perl6
16:53 rindolf pugs: my ($x, $y) ; $x, $y = 5, 6; [ $x, $y]
16:53 p6eval pugs: RESULT[\(undef, 5)]
17:10 bennymack-work rakudo: multi sub frob(Str $s) { say "Frobbing String $s";  }; frob("x");
17:10 p6eval rakudo 29834: OUTPUT[No applicable methods.␤current instr.: '_block11' pc 24 (EVAL_13:13)␤]
17:11 moritz_ another rakudo bug, and another bogus error message
17:11 bennymack-work eep
17:11 bennymack-work works on Int though
17:11 moritz_ yes
17:11 moritz_ types based MMD with Str somehow fails.
17:15 khisanth_ joined #perl6
17:17 bennymack-work For lesson 6 I'm getting: You passed an initialization parameter that does not have a matching attribute.
17:18 moritz_ which code snippet?
17:18 bennymack-work In the SYNOPSIS
17:18 moritz_ d'oh, I have two lesson 6 ;)
17:18 bennymack-work i thought it was odd that it skipped lesson 05
17:19 bennymack-work http://perlgeek.de/blog-en/perl-5​-to-6/05-objects-and-classes.html
17:19 lambdabot Title: blog | Perlgeek.de Blog, http://tinyurl.com/5ccj9l
17:20 moritz_ in case it's not clear, I didn't limit my examples to stuff that works at the moment ;/
17:21 bennymack-work ok. but there's no way to make this particular example work?
17:21 moritz_ I guess it complains about the inherited attribute
17:22 moritz_ so by removing the colour from the initialization at least the rest should work
17:22 bennymack-work ok, yes that does work.
17:23 bennymack-work I also had to comment out the "method area" in Shape otherwise I get this: Missing '}' at line 4, near "... }    #"
17:26 moritz_ rakudo doesn't do '...', and it sometimes requires a ; after a } although that's not officially needed
17:55 pmurias joined #perl6
18:02 alanhaggai joined #perl6
18:05 pmurias ruoso: i would rather have s1p emit m0ld instead of C as gcc is sluggish and we can load mold directly or as bytecode in the future
18:07 jhorwitz joined #perl6
18:22 jferrero joined #perl6
18:30 Myoma joined #PERL6
18:34 Maghnus joined #perl6
18:37 pmurias ruoso: we shouldn't use ¢ in places where the root namespace is avalible
18:43 rdice joined #perl6
18:44 cotto_w3rk joined #perl6
18:48 cotto_work joined #perl6
18:55 REPLeffect joined #perl6
18:57 Myoma joined #PERL6
19:28 jhorwitz_ joined #perl6
19:30 hcchien_ joined #perl6
19:30 lambdabot joined #perl6
19:32 pochi joined #perl6
19:40 calin joined #perl6
19:41 hercynium joined #perl6
19:58 aindilis joined #perl6
19:59 Auzon joined #perl6
20:07 eternaleye_ joined #perl6
20:27 dr_df0 joined #perl6
20:32 iblechbot_ joined #perl6
20:37 jan joined #perl6
20:53 perl7 joined #perl6
20:57 krzys joined #perl6
20:58 krzys pugs: my @array = (3,7,9,11); say @array[0..1,2,3]
20:59 p6eval pugs: OUTPUT[37911␤]
21:02 krzys pugs: { my @array = ((11,12,13,14,15)(21,22,23,24,25)); my @slice = ((0,4)(0,4); say @array(@slice); }
21:02 p6eval pugs: OUTPUT[*** ␤    Unexpected "@slice"␤    expecting "=", term postfix, operator, ")", context, ":" or "("␤    at /tmp/julJz4IK84 line 1, column 54␤]
21:03 moritz_ )( is illegal
21:03 dr_df0 pugs: { my @array = ((11,12,13,14,15),(21,22,23,24,25)); my @slice = ((0,4),(0,4)); say @array(@slice); }
21:03 p6eval pugs: OUTPUT[*** Cannot cast from VList [VInt 11,VInt 12,VInt 13,VInt 14,VInt 15,VInt 21,VInt 22,VInt 23,VInt 24,VInt 25] to Pugs.AST.Types.VCode (VCode)␤    at /tmp/Zj4woO5Uxx line 1, column 83-97␤]
21:04 dr_df0 pugs: { my @array = ((11,12,13,14,15),(21,22,23,24,25)); my @slice = ((0,4),(0,4)); say @array[@slice] }
21:04 p6eval pugs: OUTPUT[11151115␤]
21:05 dr_df0 moritz_ )( ... i missed that
21:20 BinGOs_ joined #perl6
21:31 BinGOs joined #perl6
22:06 Lichtkind joined #perl6
22:07 Lichtkind does "file.name".:X work?
22:17 kst joined #perl6
22:20 TimToady STD thinks (1,2,3)(1,2,3) is just fine
22:20 moritz_ TimToady: yes, but it's not what dr_df0 would expect (most likely)
22:20 TimToady it just doesn't mean multiple dimensions :)
22:21 moritz_ it's a postcircumfix:<( )> on a list, right?
22:24 Lichtkind TimToady: does :r also match do literals?
22:25 pengrate joined #perl6
22:26 * moritz_ imagines TimToady waking up, opening irssi with sleepy eyes, and being DDOSed by #perl6 ;)
22:29 larsen_ joined #perl6
22:33 * TimToady suspects moritz_ is correct on both points
22:35 TimToady Lichtkind: I think :r would be pretty useless if it didn't work on literals
22:36 Lichtkind TimToady: true but i ask because all the examples in spec where with var
22:36 TimToady it's a little odd that it means that the methods are defined in Str
22:37 TimToady assuming they are true methods, which is the latest thinking
22:37 TimToady or maybe they live in Any and coerce to Str
22:37 moritz_ it seems weird to have a method with the name of pair
22:38 TimToady it does kinda reserve a little namespace for such methods
22:38 moritz_ how would you define such a thing? method postfix:':r' { ... } ?
22:38 TimToady which we have also made use of with .:delete and whatever .:exists ends up being called
22:40 moritz_ is that a trigil? ;-)
22:40 explorer__ joined #perl6
22:40 TimToady we could do worse than the postfix declaration
22:41 TimToady originally I was thinking just method :r, but making trait notation a variant of pair notation mades it a problem
22:41 moritz_ but do we really need a grammatical construct for every file test operator?
22:42 moritz_ is $fn ~~ :r such a bad huffman coding, as compared to $fn.:r?
22:42 TimToady yeah, and I'm not sure that $file:r is a good construct
22:43 TimToady originally we had all the :r things interpreted by another method
22:44 TimToady well, I don't make decisions when I've just woken up and been DDOS'd  :)
22:44 moritz_ ;)
22:44 Lichtkind TimToady: thanks i really didnt say goodbye in kobenhavn
22:44 Limbic_Region joined #perl6
22:45 * moritz_ slowly wanders off towards bed...
22:45 TimToady Lichtkind: if everyone at a conference said goodbye to everyone else we'd have to schedule an extra week
22:45 fullermd But with an extra week, you'd run into people you'd already said goodbye to, so you'd need extra time to re-bye...
22:45 moritz_ O(n²)
22:46 Lichtkind true
22:57 aindilis joined #perl6
23:14 Lichtkind http://www.youtube.com/watch?v=bLiX5d3rC6o
23:14 lambdabot Title: YouTube - Meet "Emily" - Image Metrics Tech Demo
23:14 Lichtkind ups wrong channel
23:15 jferrero joined #perl6
23:38 BinGOs joined #perl6

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

Perl 6 | Reference Documentation | Rakudo