Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2008-12-07

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:01 preflex joined #perl6
00:05 mst joined #perl6
00:05 mst TimToady: while I remember, Want.pm already has the "how many values do I want" magic, dunno if that'd be any use for your lazy "return foo(), bar(), baz()" case
00:05 mst left #perl6
00:10 rakudo_svn r33581 | pmichaud++ | [rakudo]:  $tagsets is already an AST, no need to $(...) it again.
00:12 alester joined #perl6
00:19 preflex joined #perl6
00:19 spx2 joined #perl6
00:19 araujo joined #perl6
00:19 nnunley joined #perl6
00:19 szbalint joined #perl6
00:19 ewilhelm joined #perl6
00:19 allbery_b joined #perl6
00:26 mberends joined #perl6
00:39 rhr_ joined #perl6
00:45 mberends joined #perl6
01:04 meppl good night
01:33 pugs_svn r24183 | pmichaud++ | [t/spec]:  #?rakudo skip a test dealing with Match objects
01:41 Ehtyar joined #perl6
02:10 _Chillance_ joined #perl6
02:26 slavik joined #perl6
02:27 slavik hi all
02:41 slavik jhorwitz: are you around?
02:46 slavik open DB, "|mysql --user=user --password=pass db | tail -n+2|";
02:46 slavik would that work?
02:48 slavik unable to open file :(
02:50 rakudo_svn r33583 | pmichaud++ | [rakudo]:  Cleanup Capture definition slightly.
02:52 apeiron joined #perl6
02:58 slavik jhorwitz: are you there?
02:59 slavik [Sat Dec 06 21:58:17 2008] [error] [client 127.0.0.1] need AuthType to note auth failure: /my/test/uri
02:59 slavik [Sat Dec 06 21:58:18 2008] [crit] [client 127.0.0.1] configuration error:  couldn't check access.  No groups file?: /parrot-test/RequestRec-get_basic_auth_pw
03:11 Psyche^ joined #perl6
03:43 xinming joined #perl6
03:52 slavik @tell jhorwitz: "load_bytecode" couldn't find file 'Protoobject.pbc'
03:52 lambdabot Consider it noted.
04:02 elmex_ joined #perl6
04:38 araujo joined #perl6
05:30 alester joined #perl6
06:03 slavik @tell jhorwitz I got it to load, but now I get null PMC access when it tries to load :(
06:03 lambdabot Consider it noted.
06:27 justatheory joined #perl6
06:29 alester joined #perl6
06:34 jfredett left #perl6
07:12 pugs_svn r24184 | hinrik++ | [util/perl6.vim] fix false Error highlighting of closure delimiters, improve folding a bit
07:26 alanhaggai joined #perl6
07:35 bacek joined #perl6
08:00 iblechbot joined #perl6
08:29 pugs_svn r24185 | hinrik++ | [util/perl6.vim] highlight Pod :config<options> same as in Perl 6 code
08:30 ejs joined #perl6
08:30 meppl joined #perl6
08:58 kanru joined #perl6
09:00 rakudo_svn r33597 | duff++ | [rakudo] rework of :nth() on .subst() to use ACCEPTS
09:02 eternaleye_ joined #perl6
09:03 smtms joined #perl6
09:10 justatheory joined #perl6
09:46 sri_kraih joined #perl6
09:55 bacek perl6: token Number { \d+ }; rule Math { <Number> [ '+' | '-' ] <Number> }; '20 + 22' ~~ / <Math> /; say $/
09:55 p6eval rakudo 33597: OUTPUT[20 + 22␤]
09:55 p6eval ..pugs: OUTPUT[Error eval perl5: "if (!$INC{'Pugs/Runtime/Match/HsBridge.pm'}) {␤    unshift @INC, '/home/evalenv/pugs/perl5/​Pugs-Compiler-Rule/lib';␤    unshift @INC, '/home/evalenv/pugs/third-party/Parse-Yapp/lib';␤    eval q[require 'Pugs/Runtime/Match/HsBridge.pm'] or die $@;␤}␤'Pugs::Runti...
09:55 p6eval ..elf 24185: OUTPUT[Can't locate object method "cb__RegexDef" via package "EmitSimpleP5" at ./elf_f line 1612.␤]
09:56 bacek rakudo: token Number { \d+ }; rule Math { <Number> [ '+' | '-' ] <Number> }; '20 + 22' ~~ / <Math> /; say $/<Number>
09:56 p6eval rakudo 33597: OUTPUT[Use of uninitialized value␤␤]
09:56 bacek rakudo: token Number { \d+ }; rule Math { <Number> [ '+' | '-' ] <Number> }; '20 + 22' ~~ / <Math> /; say $/<Math>
09:56 p6eval rakudo 33597: OUTPUT[20 + 22␤]
09:56 bacek rakudo: token Number { \d+ }; rule Math { <Number> [ '+' | '-' ] <Number> }; '20 + 22' ~~ / <Math> /; say $/<Math><+>
09:56 p6eval rakudo 33597: OUTPUT[Use of uninitialized value␤␤]
09:57 bacek any ideas how to get '+' or '-' from Match?
09:57 bacek rakudo: token Number { \d+ }; rule Math { <Number> [ '+' | '-' ] <Number> }; '20 + 22' ~~ / <Math> /; say $/<Math><Number>
09:57 p6eval rakudo 33597: OUTPUT[2022␤]
09:58 bacek rakudo: token Number { \d+ }; rule Math { <Number> $<op>=[ '+' | '-' ] <Number> }; '20 + 22' ~~ / <Math> /; say $/<Math><op>
09:58 p6eval rakudo 33597: OUTPUT[+ ␤]
09:58 bacek hmm...
09:59 bacek rakudo: token Number { \d+ }; rule Math { <Number> $<op>=[ '+' | '-' ] <Number> }; '20 + 22' ~~ / <Math> /; say $/<Math>.exists('op')
09:59 p6eval rakudo 33597: OUTPUT[Method 'exists' not found for invocant of class 'PGE;Match'␤current instr.: '_block11' pc 82 (EVAL_16:35)␤]
10:00 DemoFreak joined #perl6
10:01 bacek rakudo: token Number { \d+ }; rule Math { <Number> $<op>=[ '+' | '-' ]? <Number> }; '20 + 22' ~~ / <Math> /; say defined $/<Math><op>
10:01 p6eval rakudo 33597: OUTPUT[1␤]
10:01 bacek rakudo: token Number { \d+ }; rule Math { <Number> $<op>=[ '+' | '-' ]? <Number> }; '20 22' ~~ / <Math> /; say defined $/<Math><op>
10:01 p6eval rakudo 33597: OUTPUT["load_bytecode" couldn't find file 'PGE.pbc'␤current instr.: 'parrot;PCT;Grammar;onload' pc 0 (src/PCT/Grammar.pir:41)␤]
10:01 bacek rakudo: token Number { \d+ }; rule Math { <Number> $<op>=[ '+' | '-' ]? <Number> }; '20 22' ~~ / <Math> /; say defined $/<Math><op>
10:01 p6eval rakudo 33597: OUTPUT[1␤]
10:06 mberends joined #perl6
10:07 bacek rakudo: token Number { \d+ }; rule Math { <Number> $<op>=[ '+' | '-' ]? <Number> }; '20 22' ~~ / <Math> /; say ?$/<Math><op>
10:07 p6eval rakudo 33597: OUTPUT[1␤]
10:09 bacek rakudo: token Number { \d+ }; rule Math { <Number> $<op>=[ '+' | '-' ]? <Number> }; '20 22' ~~ / <Math> /; if $/<Math><op> { say "foo" } else { say "bar" }
10:09 p6eval rakudo 33597: OUTPUT[foo␤]
10:10 bacek rakudo: token Number { \d+ }; rule Math { <Number> [$<op>=[ '+' | '-' ]]? <Number> }; '20 22' ~~ / <Math> /; if $/<Math><op> { say "foo" } else { say "bar" }
10:10 p6eval rakudo 33597: OUTPUT[bar␤]
10:10 bacek rakudo: token Number { \d+ }; rule Math { <Number> [$<op>=[ '+' | '-' ]]? <Number> }; '20 + 22' ~~ / <Math> /; if $/<Math><op> { say "foo" } else { say "bar" }
10:10 p6eval rakudo 33597: OUTPUT[foo␤]
10:10 bacek ho!
10:28 adc_penner joined #perl6
10:35 pmurias joined #perl6
10:39 spx2 joined #perl6
10:40 xinming joined #perl6
10:42 bacek rakudo: class A { has $.a }; class B is A {}; my $b = B.new(a=>"foo");
10:42 p6eval rakudo 33597: OUTPUT[You passed an initialization parameter that does not have a matching attribute.␤current instr.: 'die' pc 12669 (src/builtins/control.pir:168)␤]
10:46 bacek looks like a bug...
10:48 moritz_ bacek: in general the subclass can override the parameter $.a, so there needs to be a way to initialize them in the parent class
10:48 moritz_ pugs: class A { has $.a }; class B is A {}; my $b =  B.new(a=>"foo");
10:48 p6eval pugs: RESULT[\B.new((\("a", "foo"),)]
10:48 moritz_ pugs: class A { has $.a }; class B is A { has $.a }; my $b =  B.new(a=>"foo");
10:48 p6eval pugs: RESULT[\B.new((\("a", "foo"),)]
10:49 bacek moritz_: bug, indeed
10:50 kanru joined #perl6
10:51 moritz_ bacek: then open a ticket, and write a test case ;)
10:51 bacek moritz_: my ticket, your testcase :)
10:52 moritz_ bacek: what have I got to do with it? ;-)
10:53 bacek moritz_: commit something like 'class A { has $.a }; class B is A {}; lives_ok(B.new(a=>"foo"));' in proper file :)
10:54 bacek Maybe "eval_lives_ok"
10:56 moritz_ lives_ok is fine...
10:59 bacek moritz_: and add comment to #61120 :)
10:59 * moritz_ gives in
11:00 bacek moritz_: why?
11:01 moritz_ I try to train people to commit test cases on their own, but it's not easy :/
11:02 pugs_svn r24186 | moritz++ | [t/spec] tests for inheritance of attributes, bacek++
11:02 pugs_svn r24187 | moritz++ | [t/spec] svn props for new test file
11:04 bacek moritz_: I've implemented 300+ tests for my XQuery implementation today...
11:08 pmurias bacek: you wrote code to which passes them or wrote them?
11:08 bacek pmurias: both.
11:09 bacek pmurias: actually 200 tests from XQTS.
11:09 bacek but I wrote code to pass them :)
11:20 pugs_svn r24188 | hinrik++ | [util/perl6.vim] improve syncing, and work around what looks like a vim bug relating to nested transparent regions
11:21 ejs joined #perl6
11:24 moritz_ the new vim syntax hilighting is very nice, but one thing that I find weird is that quoted strings have a different color than their quotes
11:26 pugs_svn r24189 | moritz++ | [t/spec] general clean up of private_methods.t,
11:26 pugs_svn r24189 | moritz++ | add regression tests for [perl #61102]
11:26 pugs_svn r24190 | moritz++ | [t/spec] rename private_methods.t to private.t
11:35 riffraff joined #perl6
11:37 sri_kraih_ joined #perl6
11:39 pugs_svn r24191 | moritz++ | [t] clean up oo/attributes/instance.t and move it to spec
11:40 rakudo_svn r33598 | moritz++ | [rakudo] add regression tests for RT #61102 to t/spectest.data,
11:40 rakudo_svn r33598 | moritz++ | and restore alphabetical order
11:43 pugs_svn r24192 | hinrik++ | [util/perl6.vim] more syncing stuff
11:45 schmalbe joined #perl6
11:48 pugs_svn r24193 | moritz++ | [t/spec] more cleanup of instance.t
11:55 vixey joined #Perl6
11:55 dr_df0 joined #perl6
11:59 pugs_svn r24194 | moritz++ | [t/spec] fudge instance.t for rakudo
12:01 slavik joined #perl6
12:01 slavik hello
12:02 moritz_ hi
12:02 slavik so, looks like I got it load everything, but I get null PMC access on load :(
12:03 slavik moritz_: here's another idea ... use perl5 as a wrapper or something ...
12:03 slavik with mod re-write
12:03 moritz_ or work around the error
12:03 moritz_ (but that might be time consuming)
12:03 slavik like if you ask for index.p6, it actually fetches index.pl?page=index.p6
12:03 slavik or some such
12:04 slavik moritz_: thing is, I do not understand what the null PMC access means :(
12:04 moritz_ slavik: it means you've found an error in rakudo
12:04 slavik moritz_: I am getting my E90 on tuesday, here's an idea for a port ... Perl6 on Symbian on ARM :D
12:04 slavik moritz_: could it be an error in mod_parrot?
12:05 moritz_ slavik: dunno, I've never used it
12:05 slavik k
12:06 zamolxes joined #perl6
12:06 slavik moritz_: I was thinking about SQL injection the other day ...
12:07 slavik and a thought occured, what if there was a specific function for to the DBI that is not a generic execute_SQL() type thing
12:07 slavik like a specific insert(), select() and such
12:08 moritz_ slavik: you mean like SQL::Abstract?
12:08 slavik guess so
12:08 slavik I mean, it won't do like "select * from blah, (select ...) where such and such
12:08 slavik but for simple select and insert/update queries, I think it could work
12:09 moritz_ aye
12:09 slavik so that when it tells the RDBMS, it won't be a single SQL statement that has to be escaped and such, but an actual API call
12:09 rff joined #perl6
12:10 slavik like: insert($table, @keys, @values) or better yet, combine them into a hash
12:10 moritz_ well, with placeholders and prepared statements there's no need for escaping anyway
12:10 rakudo_svn r33599 | moritz++ | [rakudo] add instance attribute tests to t/spectest.data
12:10 rakudo_svn r33599 | moritz++ | (most of them are skipped, but a few actually pass)
12:13 pmurias ruoso: hi
12:13 masak joined #perl6
12:17 pugs_svn r24195 | moritz++ | [t/spec] regression tests for RT #61100
12:20 drbean joined #perl6
12:20 ruoso hi pmurias
12:22 pmurias ruoso: what are the current smopish small TODO tasks?
12:23 ruoso pmurias, well... we're still moving forward to compile ClassHOW.pm
12:23 ruoso we need the "for" operator now
12:24 ruoso that's why I insisted too much on S07
12:24 ruoso since "for" and "map" are synonims
12:25 ruoso so it seems we need to compile Map.pm in order to be able to compile ClassHOW.pm
12:25 slavik so: @list = for 1..100 { 1 }; is same as @list = map { 1 } 1..100; ???
12:25 ruoso slavik, yes
12:26 ruoso including the fact that it is lazily evaluated
12:26 slavik so, we don't need map at all then, or is there still some difference between map and for?
12:26 ruoso the syntax
12:26 pmurias it would be nice to have more small things on the ROADMAP, as i find some of the milestones daunting
12:26 slavik also, is it possible to make a function as an iterator? (list generator? list comprehension? not sure what it is called)
12:27 ruoso pmurias, alright... maybe we could do that in terms of test cases that we could then move to mildew/t as we implement...
12:27 ruoso slavik, I'm not sure I get what you mean
12:28 slavik ruoso: like Python's xrange()
12:28 pmurias ruoso: that seems nice
12:28 slavik similar to that
12:28 * ruoso going to find out what xrange is
12:28 thei0s joined #perl6
12:29 ruoso slavik, how is it different from Perl 6 range?
12:29 slavik ruoso: I mean, can we define our own list generators to be iterated through?
12:29 slavik with = operator
12:29 ruoso slavik, that's what S07 is about
12:29 slavik oh, ok
12:30 ruoso slavik, but = is "mostly eager"
12:30 slavik wait ... I know it talks about lists ... like $iter <== @list;
12:31 slavik but instead of @list, I want to have a function and then I don't want to have to assign it, so that I can do: for fib(1,10) { say $_; } where fib would lazily generate nth term of the fibonacci sequence
12:31 ruoso slavik, the way you wrote simply DWYM
12:31 slavik DWYM?
12:32 ruoso Do What You Mean
12:32 ruoso and is "mostly lazy"
12:32 ruoso slavik, you probably want to look at the gather/take operator
12:33 slavik ruoso: Python has a 'yield' operator ... that is sort of like a return but isn't
12:33 slavik will do
12:33 slavik ruoso: which S is it in?
12:33 ruoso S03
12:34 slavik ty
12:34 ruoso pmurias, I'll create a ROADMAP directory inside mildew
12:34 * ruoso bbiab&
12:35 slavik anyone have an idea how difficult it would be to port parrot to symbian?
12:35 slavik symbian on ARM
12:35 pmurias slavik: is symbian POSIX?
12:36 slavik pmurias: there is a POSIX library or some such
12:36 slavik PIPS
12:36 pugs_svn r24196 | hinrik++ | [util/perl6.vim] highlight sub/method/regex/etc names
12:37 pmurias &
12:39 ruoso slavik, that shouldn't be so hard
12:39 ruoso the bigger problem will be to have the binding to the phone interface
12:39 ruoso since p5 runs on symbian
12:40 ruoso but has no binding to the phone interface as well
12:40 slavik ruoso: I am more interested in getting a shell onto symbian and just running regular perl6 code
12:40 slavik although making perl6 make phone calls with a txt-to-speech synth would be fun :)
12:42 ruoso slavik, well, you should probably see how p5 runs on it
12:42 ruoso it should be a good start
12:43 slavik ruoso: I haven't found a shell/terminal for it yet :(
12:43 ruoso I'm not sure symbian has that
12:43 ruoso but I really never saw symbian close enough
12:58 slavik hmm ...
13:01 pugs_svn r24197 | ruoso++ | [mildew] The mildew ROADMAP is a directory with test cases that do not pass yet;
13:02 pugs_svn r24198 | hinrik++ | [examples/euler] some Pod fixes
13:10 rakudo_svn r33601 | bernhard++ | [codingstd] remove a trailing space
13:12 thei0s write your own terminal in perl5 :P
13:13 ruoso you don't even need to write it
13:13 ruoso there's one in CPAN already
13:13 ruoso (probably more than one, actually)
13:13 ruoso rakudo: sub foo($code) { $code() }; sub bar { foo({ return 1 }); return 2 }; say bar;
13:13 p6eval rakudo 33599: OUTPUT[2␤]
13:14 ruoso I think that's wrong, isn't it
13:14 ruoso ?
13:14 ruoso pugs: sub foo($code) { $code() }; sub bar { foo({ return 1 }); return 2 }; say bar;
13:14 p6eval pugs: OUTPUT[2␤]
13:15 moritz_ ruoso: aye, return() should break out of the sub
13:15 ruoso ok...
13:16 moritz_ ruoso: care to submit a bug report?
13:16 ruoso I think I'll implement return usign $?ROUTINE then
13:16 thei0s doesn't return break out of the anonymous sub?
13:16 ruoso thei0s, it's a bare block, it's not a sub
13:16 thei0s ok, then out of foo
13:17 moritz_ leave() breaks out of blocks, return() out of subs|methods
13:17 masak moritz_: no, it's not wrong.
13:17 masak foo does return 1
13:17 masak but bar returns 2
13:17 masak nothing wrong there.
13:17 ruoso er...
13:17 thei0s and then you have in bar: 1; return 2;
13:17 ruoso I think the routine is determined lexically
13:17 ruoso not dinamically
13:18 masak ruoso: I did not grok that.
13:18 masak but I do think there is nothing wrong with the above code.
13:18 ruoso map { return 1 }, 1,2,3; should return from the routine that called map
13:18 ruoso not return "1" from the map
13:18 masak aye
13:18 masak that's right
13:18 masak but that 'raturn' is not within another sub
13:19 justatheory joined #perl6
13:19 ruoso I think $?ROUTINE is used to determine where to return from
13:19 masak rakudo: sub x { my $code = { return 1 }; $code(); return 2 }; x
13:19 p6eval rakudo 33601: RESULT[1]
13:19 masak ruoso: that's how you return from the same sub.
13:19 masak ruoso: the first code example had two subs.
13:19 ruoso masak, how that applies to map
13:19 ruoso ?
13:20 masak ruoso: the map also has a routine block, not a sub
13:20 moritz_ I don't think that map() catches 'return' control exceptions
13:20 ruoso masak, er... a sub is a routine
13:20 masak moritz_: exactly. but subs do.
13:20 ruoso a bare block isn't
13:20 masak ruoso: yes, and that's the difference here.
13:20 masak sorry, I don't know the exact terminology.
13:21 ruoso masak, the map example is the key to understand
13:21 masak understand what?
13:21 ruoso rakudo: sub foo { map { return 1 }, 1; return 2; } say foo
13:21 p6eval rakudo 33601: OUTPUT[Statement not terminated properly at line 1, near "say foo"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤]
13:21 ruoso rakudo: sub foo { map { return 1 }, 1; return 2; }; say foo
13:21 p6eval rakudo 33601: OUTPUT[1␤]
13:21 masak ruoso: yes. that's correct too.
13:22 masak IMHO.
13:22 ruoso that is correct... but
13:22 ruoso rakudo: sub bar($code) { $code() }; sub foo { bar { return 1 }, 1; return 2; }; say foo
13:22 p6eval rakudo 33601: OUTPUT[too many arguments passed (2) - 1 params expected␤current instr.: 'bar' pc 78 (EVAL_14:39)␤]
13:22 ruoso rakudo: sub bar($code) { $code() }; sub foo { bar { return 1 }; return 2; }; say foo
13:22 p6eval rakudo 33601: OUTPUT[2␤]
13:22 ruoso but that's wrong
13:22 ruoso map is not a special case
13:22 masak man, take a step back and look at your code!
13:22 masak there's a second sub in your last example!
13:23 masak that sub catches the return exception.
13:23 masak that's it.
13:23 ruoso map is a sub
13:23 masak huh?
13:23 ruoso just as bar
13:23 masak that's news to me.
13:23 ruoso there are no core operators in Perl 6
13:23 ruoso everything is dispatched the same way
13:23 masak even if it's a sub, I don't expect it to catch returns.
13:23 thei0s what is map then? just a block?
13:23 ruoso well it just mean that the both examples should behave the same
13:24 masak ruoso: I see your point now.
13:24 masak but I think that map and grep deserve special treatment somehow.
13:24 masak that's what I expect as a Perl programmer.
13:24 ruoso not in Perl
13:24 ruoso Perl 6*
13:25 masak yes, I expect it there too, to be honest.
13:25 ruoso in Perl 6 there are no "special treatment"
13:25 ruoso everything is consistent
13:25 masak if you say so.
13:25 ruoso TimToady says so ;)
13:25 masak but that goes against my expectations in this case.
13:25 ruoso at every talk he presents
13:25 thei0s pugs: sub foo { map { return 1 }, 1; return 2; }; say foo
13:26 p6eval pugs: OUTPUT[1␤]
13:26 thei0s if you ask me, this with map seems weird, I would expect such behavour that current implementations do with bar
13:26 masak ruoso: what if map were to explicitly re-throw return exceptions?
13:27 ruoso in S06: "The return function notionally throws a control exception that is caught by the current lexically enclosing Routine"
13:27 masak can it do that?
13:27 slavik is the following legal in Perl6? open $FILE, "| command1 | command2 |"; say $FILE "input"; my $output = =$FILE; say $output;
13:27 ruoso *lexically*
13:27 thei0s what is map, grep are macros?
13:27 ruoso map and grep are subs
13:27 masak ruoso: see my quesion above about re-throwing.
13:28 slavik @seen jhorwitz
13:28 lambdabot jhorwitz is in #perl6. I last heard jhorwitz speak 15h 13m 1s ago.
13:28 ruoso masak, map doesn't even notice it
13:28 masak slavik: I doubt that works today in Rakudo.
13:28 masak ruoso: ok.
13:28 ruoso because the return is *lexically* determined
13:28 masak ruoso: I don't grok the term 'lexically' in this context.
13:29 masak I know what it means in general, but...
13:29 slavik masak: :( ... I was thinking of making a ghetto DBI::MySQL by using mysql command line
13:29 masak slavik: use run() or something.
13:29 pugs_svn r24199 | ruoso++ | [mildew] two more tests in the ROADMAP
13:29 ruoso masak, it means it resolves the same way a lexical variable would
13:29 slavik masak: any idea if classes are "finished", last time I tried, I had problems with constructor and such
13:30 masak ruoso: I'm having difficulty applying that to return statements.
13:30 ruoso masak, think in return as something called in $?ROUTINE
13:30 masak slavik: there are some things left to do. but much is in place.
13:30 ruoso where $?ROUTINE is a lexical variable
13:30 slavik k
13:30 ruoso that is implicit to every sub or method keyword
13:30 masak ruoso: aye.
13:31 slavik what's the site for the current spec?
13:31 moritz_ svn.pugscode.org
13:31 moritz_ erm, syn.pugscode.org
13:31 ruoso moritz_, how do I report that bug?
13:32 ruoso rakudo.org doesn't mention it
13:32 masak http://perlcabal.org/syn/
13:32 moritz_ ruoso: rakudobug@perl.org
13:32 ruoso ok
13:32 masak I think not being able to return from within a map block is a bit of a loss.
13:33 masak also, how can for and map be equivalent if one cannot return from within a map block?
13:34 * moritz_ is fairly sure that map shouldn't cat 'return' control exceptions
13:34 thei0s rakudo: sub foo { map { say "map $?ROUTINE"; return 1 }, 1; say "foo $?ROUTINE"; return 2; }; say foo
13:34 thei0s rakudo: sub bar($code) { say "bar $?ROUTINE"; $code() }; sub foo { bar { say "block $?ROUTINE"; say "foo $?ROUTINE"; return 1 }, 1; return 2; }; say foo
13:34 p6eval rakudo 33601: OUTPUT[Lexical '$?ROUTINE' not found␤current instr.: '_block23' pc 270 (EVAL_13:106)␤]
13:34 p6eval rakudo 33601: OUTPUT[too many arguments passed (2) - 1 params expected␤current instr.: 'bar' pc 78 (EVAL_14:39)␤]
13:34 moritz_ but I said that already, no?
13:34 ruoso masak, you probably want to "leave" instead of "return" in that case
13:34 masak er.
13:34 masak no, I want to return. from the surrounding sub or method.
13:35 * ruoso just posted the bug to rakudo
13:36 masak ruoso++
13:36 * ruoso later &
13:39 ejs joined #perl6
13:48 rindolf joined #perl6
14:03 dr_df0 hi, I'm looking the place in rakudo source tree, where to implement simple slices (eg. @a[0..2], @a[0,2,5] etc.
14:03 dr_df0 any hints?
14:04 moritz_ dr_df0: pmichaud is working on that one, I think
14:04 moritz_ dr_df0: maybe you'll have some luck searching for `postcircumfix'
14:05 dr_df0 i'll look at that, and talk to pmichaud
14:05 dr_df0 tt
14:05 dr_df0 ty
14:12 smg joined #perl6
14:33 thei0s rakudo: say Task.WHAT;
14:33 p6eval rakudo 33603: OUTPUT[Module␤]
14:33 thei0s what is this?
14:34 jnthn rakudo: say ResizablePMCArray.WHAT
14:34 p6eval rakudo 33603: OUTPUT[Module␤]
14:34 jnthn Probably just namespaces.
14:35 jnthn Leaking in from Parrot.
14:35 slavik hi, jnthn
14:35 thei0s aha, it seems I'll then have to rename my class
14:36 jnthn hi slavik
14:37 jnthn thei0s: Yeah. Once we do HLL map stuff in Parrot, that problem will go away.
14:39 masak rakudo: class Task {}
14:39 p6eval rakudo 33603: OUTPUT[Class Task already registered!␤␤current instr.: '!keyword_class' pc 13963 (src/builtins/guts.pir:352)␤]
14:39 masak thei0s: thanks for that one :)
14:39 * masak resports
14:39 masak s/s//
14:39 jnthn masak: Attach HLL map as a dependency to it...
14:39 dr_df0 @tell pmichaud I've heard (from moritz_) that you are working on slices in rakudo. can i help somehow?
14:39 lambdabot Consider it noted.
14:40 masak jnthn: what does that mean? what's a HLL map?
14:41 slavik high level language?
14:41 masak slavik: yes, thank you. I know that.
14:42 masak I don't know what 'Attach HLL map' means. it's probably another ticket, but which one?
14:42 slavik does anyone have a working class example?
14:42 pmurias joined #perl6
14:42 jnthn masak: It's the thing that'll put Rakudo (and other languages) into a language namespace, separate from all of Parrot's guts.
14:42 slavik masak: then I am as confused as you :P
14:42 masak slavik: November source code?
14:43 masak lots of working examples.
14:43 slavik masak: huh?
14:43 slavik oh
14:43 slavik where do I get it?
14:43 jnthn masak: Don't worry about it if you can't find a ticket on HLL Map, i just thought we had one.
14:43 masak hold on.
14:43 masak slavik: http://github.com/viklund/november/
14:43 masak jnthn: we might. I'll look.
14:44 slavik masak: ty
14:44 masak jnthn: http://rt.perl.org/rt3/Search/Simple.html?q=hll
14:44 masak any of those?
14:45 jnthn 49812
14:45 masak dz
14:48 * masak attached the dep
14:53 apeiron joined #perl6
14:54 * jnthn -> concert (Opeth! :-))
14:55 wolverian ooh, opeth.
14:55 wolverian have fun. :)
14:57 adc_penner joined #perl6
14:58 jnthn Thanks, it should be good! :-)
14:58 * jnthn really afk now
14:58 ejs1 joined #perl6
15:01 masak rakudo: my $a = "foo" x 5; $a .= subst(/foo/, "bar", :nth(2), :x(2)); say $a
15:01 p6eval rakudo 33603: OUTPUT[foobarfoofoofoo␤]
15:01 masak shouldn't that replace two 'foo's?
15:04 dr_df0 pugs: my $a = "foo" x 5; $a .= subst(/foo/, "bar", :nth(2), :x(2)); say $a
15:04 p6eval pugs: OUTPUT[Error eval perl5: "if (!$INC{'Pugs/Runtime/Match/HsBridge.pm'}) {␤    unshift @INC, '/home/evalenv/pugs/perl5/​Pugs-Compiler-Rule/lib';␤    unshift @INC, '/home/evalenv/pugs/third-party/Parse-Yapp/lib';␤    eval q[require 'Pugs/Runtime/Match/HsBridge.pm'] or die $@;␤}␤'Pugs::Runti...
15:05 ruoso jnthn, have you seen the rakudobug I've just posted?
15:06 pmurias ruoso: do you have a plan how to solve the smop leaks?
15:06 masak ruoso: jnthn just left.
15:06 ruoso masak, ah ok...
15:06 ruoso pmurias, well... I'll take some time and do the old fashion hunting
15:07 ruoso pmurias, have you seen the tests I added on mildew/ROADMAP?
15:07 pmurias yes
15:19 apeiron joined #perl6
15:19 spx2 I'd like to ask about perl6's OO system
15:19 spx2 how are copy-constructors implemented ?
15:22 pmurias spx2: do we have copy-constructors in perl6?
15:22 spx2 I don't know
15:22 spx2 what I know is some stuff from perl5
15:22 spx2 like
15:22 spx2 sub new
15:22 spx2 {
15:22 spx2 my ($class, %args) = @_;
15:22 spx2 or there is a Clone module on CPAN
15:22 spx2 that's all I know from perl5
15:22 spx2 how is this stuff translated to perl6 ?
15:23 spx2 I'm talking about this module http://search.cpan.org/~rdf/Clone-0.29/Clone.pm
15:23 pmurias perl6 objects have a .clone method
15:23 spx2 oh nice :)
15:24 spx2_ joined #perl6
15:25 spx2 joined #perl6
15:25 pmurias i'm pretty sure we don't have the C++ style copy constructors
15:26 slavik pmurias: they aren't need though, are they?
15:27 pmurias we conceptually always pass a pointer to an object
15:27 spx2 that's great
15:29 spx2 I could just write a dirty method
15:29 spx2 that would check ref(parameter)
15:29 spx2 to see if it's the class it expects
15:29 slavik pmurias: what about references to other objects?
15:29 spx2 and then takes the members one by one and copies them
15:29 slavik is deep copy done? or no?
15:29 * pmurias forgot about the container stuff
15:29 spx2 but that would be the most lame thing possible
15:30 spx2 *lamest
15:30 rakudo_svn r33605 | pmichaud++ | [rakudo]: spectest-progress.csv update: 231 files, 4717 passing, 0 failing
15:30 pmurias slavik: you mean references to variables
15:30 pmurias ?
15:30 slavik pmurias: I guess so ...
15:31 slavik C++ example: classa A { classb *B };
15:31 pmurias classa being?
15:31 slavik just classa
15:31 slavik and you have an object of classa
15:32 pmurias the example you mentioned isn't valid C++
15:32 slavik when the pointer gets copied, does it make a copy of whatever it points to? or no or what happens?
15:32 pmurias slavik: the pointer just gets copied
15:33 pmurias it would be class A { has $!B } in perl6
15:34 slavik pmurias: so, whatever $!B points to doesn't get copied?
15:34 pmurias when you do a .clone or just $a = $b?
15:36 slavik clone
15:36 slavik actually, both
15:36 pmurias i don't think .clone is deep
15:36 slavik please don't tell me that $a = $b is same as java (ref assignment)
15:36 pmurias $a = $b just copies the content of $b into $a
15:37 slavik err, what would be the diff between $a=$b and $a=$b.clone ?
15:38 pmurias $b.clone creates a new object and stores it in $a, $a = $b stores the object which is stored in $b in $a
15:39 slavik pmurias: neither refers to the same exact object, right?
15:40 pmurias $a = $b does it works the same as in java
15:40 pmurias (as far as i understand how java works)
15:41 slavik dude, that's crap!
15:41 pmurias what's wrong with that approach
15:41 slavik rakudo: my $a; my $b = 5; $a = $b; say $a; $b = 6; say $a;
15:41 p6eval rakudo 33604: OUTPUT[5␤5␤]
15:41 slavik oh, nvm ... good
15:42 slavik rakudo: my @a; my @b = 1,5; @a = @b; say @a; @b = 2,6; say @a;
15:42 p6eval rakudo 33604: OUTPUT[15␤15␤]
15:42 alester joined #perl6
15:42 avar rakudo: my @a; my @b = 1,5; @a = @b; say @a; @b = 2,6; say @b;
15:42 p6eval rakudo 33604: OUTPUT[15␤26␤]
15:43 slavik pmurias: the latter in java would output 15\n26
15:43 slavik because array=array does reference assignment, not value
15:43 pmurias arrays are a special case
15:44 slavik java arrays
15:44 slavik :P
15:44 slavik in Perl, we have lists :P
15:44 slavik btw, are lists doubly linked lists as in Perl5?
15:44 slavik doubly linked circular* list
15:44 spx2 will the Clone module copy references or copy the objects inside the refferences as well ?
15:44 spx2 what is the difference between shallow , deep copy ?
15:44 spx2 is this the difference ?
15:44 pmurias yes
15:45 pmurias slavik: lists in Perl5 are doubly linked?
15:45 slavik pmurias: I read somewhere that they were double linked circular lists
15:45 * pmurias doubts it
15:45 slavik which is neat since you get negative index support without any extra effort
15:46 pmichaud rakudo:  say 'hello';
15:46 lambdabot pmichaud: You have 1 new message. '/msg lambdabot @messages' to read it.
15:46 p6eval rakudo 33610: OUTPUT[hello␤]
15:47 pmichaud rakudo:  say [+] 1..7;
15:47 p6eval rakudo 33610: OUTPUT[Statement not terminated properly at line 1, near "[+] 1..7;"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤]
15:47 pmurias slavik: circular linked lists have much worse performance for most stuff
15:47 slavik versus regular lists?
15:47 pmichaud argh.  Have to wait for r33611 for [+]
15:47 pmurias slavik: versus arrays
15:48 slavik pmurias: in Perl5, arrays are not exactly arrays, are they? since they are resizable
15:48 pmurias the are STL deque
15:48 pmurias 's
15:50 rakudo_svn r33611 | pmichaud++ | [rakudo]:  Fix assignment metaoperators, add reduction operators (e.g., [+]).
15:50 pmurias slavik: you can resize arrays if you have spare space and copy over the elements when it runs out
15:52 slavik pmurias: with realloc(), isn't that expensive?
15:52 pmurias you don't do it very often
15:53 pmurias i'm not familiar with realloc internals
15:54 slavik I mean realloc() from C
15:54 pmurias that's what i meant too ;)
15:54 slavik oh
15:54 slavik realloc() tries to extend the space or gets it from somewhere else ...
15:55 slavik not sure if it copies the content
15:56 pmurias only when mallocing the new block
15:56 slavik so yea ... expensive I think
16:09 pmichaud rakudo:  say [+] 1..7;
16:09 p6eval rakudo 33610: OUTPUT[Statement not terminated properly at line 1, near "[+] 1..7;"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤]
16:10 slavik [] can contain any operation/sub?
16:10 slavik hmm
16:13 jhorwitz slavik: ping
16:13 lambdabot jhorwitz: You have 2 new messages. '/msg lambdabot @messages' to read them.
16:14 slavik hey
16:14 slavik messages :)
16:14 jhorwitz ya
16:14 jhorwitz did you add PARROT_RUNTIME to your envvars script?
16:14 pmichaud slavik: any infix operator, yes.
16:14 slavik no
16:14 slavik jhorwitz: no
16:14 slavik pmichaud: no chance for subs?
16:14 slavik jhorwitz: the first issue was fixed (not finding stuff)
16:15 slavik jhorwitz: the second issue is the problem now
16:15 pmichaud slavik:  there's always .reduce
16:15 slavik k
16:15 jhorwitz can you paste the error log?
16:15 slavik jhorwitz: not atm ... at work :(
16:16 jhorwitz ah.  well, send it along when you can and i'll take a look.  i'm sure it something simple.
16:16 jhorwitz did all the tests pass?
16:16 iblechbot joined #perl6
16:17 slavik jhorwitz: except for something creating a socket or something
16:18 jhorwitz that's odd
16:18 slavik yeah, anyway, it did not seem like a showstopper, so I continued
16:19 jhorwitz *any* test failures worry me
16:19 slavik oh
16:19 slavik it was something about binding to a socket
16:19 jhorwitz that would probably be Apache::Test doing its thing
16:19 slavik mebbe
16:20 jhorwitz anyway, ping me when you have a chance to grab the logs.  :)
16:20 slavik k
16:21 slavik waiting for system to boot, will ssh in and see
16:30 rakudo_svn r33617 | pmichaud++ | [rakudo]:  Add [,], [&], [|], and [^] reduction operators.
16:32 slavik pmichaud: so what is the point of [,] 1..100 ???
16:32 slavik doesn't that just make a list?
16:47 masak slavik: it does. so you understand the semantics of the operator. what's your complaint?
16:47 masak that it doesn't do enough?
16:47 slavik masak: seems useless
16:47 slavik what's the difference between ([,] 1..100) and (1..100)
16:47 masak slavik: the first is a list, the second is a range.
16:48 slavik hmm
16:48 masak slavik: remember that () is not a list constructor in Perl 6
16:48 masak , is
16:48 slavik masak: parenthesis are for grouping ;)
16:48 masak slavik: aye. not for makin lists.
16:48 masak s/makin/making/
16:49 slavik masak: yes, but in all uses for ranges I've seen is to make a list ...
16:49 masak what? no.
16:49 masak if $a ~~ 1..100 { ... }
16:50 slavik err, what does that match?
16:50 slavik if $a is in that range?
16:50 masak aye.
16:51 masak (1..100).pick
16:51 slavik hmm, ~~ is really neat
16:51 masak neither of these two examples "makes a list"
16:51 slavik what's .pick? rand in that range?
16:51 masak aye
16:51 slavik #   Failed test 'joeuser:password granted access'
16:51 slavik #   at t/legacy/03AuthenHandler.t line 18.
16:51 slavik #          got: '<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
16:52 slavik masak: ok, you need to tell us such cool things
16:52 masak slavik: read Moritz' blog posts about it.
16:52 masak and the spec.
16:52 slavik masak: spec is big ...
16:52 masak and the November source code. :)
16:52 masak slavik: suit yourself. there are cool things in there.
16:52 slavik masak: there needs to be "cool and neat stuff"
16:53 slavik I am trying to accomplish this with Dive into Perl6 ...
16:53 slavik heh
16:53 masak and a pony.
16:53 slavik pwnies rule
16:53 slavik btw, is it possible given an object to get all the methods it has?
16:53 slavik like .perl but for methods
16:53 masak $obj.HOW.meth
16:53 masak (I think)
16:54 masak slavik: if you're writing "Dive into Perl 6", you really should read through the specs at least once...
16:54 slavik masak: I will
16:54 masak they tell you this type of things.
16:54 slavik masak: basically, each chapter will correspond to a synopsis
16:55 slavik and grab the most essential stuff
16:55 masak sounds like the Exigeses.
16:55 slavik guess so, but with real code examples that compile and work ;)
16:55 slavik not just theoretical code that will someday work, but something that work now
16:55 masak aye.
16:56 slavik and not just "you can say this or that" but "here's what the entire chapter looks like"
16:56 slavik masak: like the grammar article that I wrote, that you have trouble loading
16:56 masak slavik: the Exigeses also give full examples.
16:56 slavik oh ...
16:56 slavik epic fail
16:57 masak slavik: yes, I got the Google cache, but it was from 28 November.
16:57 slavik it's fairly up to date ;)
16:57 masak slavik: don't worry, the Exigeses are old, and as you say, they don't contain runnable code.
16:57 slavik so, it's not like exigeses
16:57 slavik these are exigeses++ ^^
16:58 masak something like that.
16:59 masak except that one can't reach your page. :P
16:59 slavik not my fault
16:59 masak I'm going to tease you about it until you do something real about it.
16:59 pasteling "slavik" at 12.130.86.9 pasted "make test = FAIL" (43 lines, 2.1K) at http://sial.org/pbot/33531
16:59 slavik masak: until I get my own mod_perl6 environment ... no :P
17:00 slavik jhorwitz: see the paste :)
17:00 masak slavik: you could just move the page to a server that is reachable.
17:00 slavik masak: I don't got one
17:00 masak slavik: I'd like to read your posts, too.
17:00 masak slavik: there are free hosting solutions on the web.
17:00 slavik masak: not with mod_perl6
17:00 slavik and not with root access :P
17:01 masak slavik: no, but people can reach them. that's worth something, too.
17:01 slavik masak: I set up that server with mail and everything :P
17:01 masak slavik: too bad it's not reachable.
17:01 slavik @tell jhorwitz http://sial.org/pbot/33531
17:01 lambdabot Consider it noted.
17:01 slavik masak: try: http://67.100.227.140/
17:01 slavik do you get a hello?
17:01 masak aye
17:02 jhorwitz slavik: let's not worry about that failure for now.
17:02 lambdabot jhorwitz: You have 1 new message. '/msg lambdabot @messages' to read it.
17:02 slavik k
17:02 slavik jhorwitz: I didn't :P
17:02 slavik jhorwitz: want the paste from my parrot config and the error?
17:02 jhorwitz yes please
17:05 pasteling "slavik" at 12.130.86.9 pasted "mod_parrot FAIL" (22 lines, 1.5K) at http://sial.org/pbot/33532
17:05 slavik jhorwitz: there :)
17:05 slavik 33317 revision of rakudo
17:06 slavik 0.8.1-devel version of parrot
17:07 jhorwitz is it a recent svn checkout of parrot?
17:10 jhorwitz slavik: can i see your envvars script? (from apache's bin dir)
17:22 apeiron joined #perl6
17:29 slavik jhorwitz: sure, 1 sec
17:30 slavik jhorwitz: just default stuff
17:30 slavik jhorwitz: I didn't add anything to it
17:31 jhorwitz ok, the eg/perl6/README should tell you what to add
17:31 slavik k
17:31 jhorwitz you'll need PARROT_RUNTIME and PERL6LIB
17:31 ThierryM joined #perl6
17:34 slavik ty
17:42 dr_df0 joined #perl6
17:50 jan_ joined #perl6
17:51 cknapp joined #perl6
18:02 zamolxes http://www.computerworld.com.au/artic​le/269758/perl_6_break_compatibility_​support_other_interpreters?eid=-6787 ..
18:02 smg joined #perl6
18:08 slavik jhorwitz: question
18:08 slavik the runtime dir: is ti the one with include/ and library/ subdirs?
18:12 pmichaud I only added [,] because it's in the spec.  :-)
18:12 pmichaud (and it was relatively easy to do)
18:13 pmichaud rakudo:  say [+] 1..10;
18:13 p6eval rakudo 33619: OUTPUT[55␤]
18:13 pmichaud yay
18:13 pmichaud rakudo:  say [*] 1..10;
18:13 p6eval rakudo 33619: OUTPUT[3628800␤]
18:13 slavik nice
18:13 slavik rakudo_svn: say [*] 1..100
18:13 slavik rakudo: say [*] 1..100
18:13 p6eval rakudo 33619: OUTPUT[9.33262154439441e+157␤]
18:14 slavik rakudo: I hate you!!!!!!
18:14 p6eval rakudo 33619: OUTPUT[Statement not terminated properly at line 1, near "hate you!!"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤]
18:14 slavik GAAAAAAAAAAAAAHHHHHHHH!!!!!!!!!!
18:18 vixey joined #Perl6
18:20 vixey left #Perl6
19:07 pugs_svn r24200 | moritz++ | [t/spec] some unfudges for rakudo (pmichaud++)
19:21 eternaleye joined #perl6
19:25 jferrero joined #perl6
19:29 Limbic_Region joined #perl6
19:39 jhorwitz slavic: PARROT_RUNTIME is the directory containing "runtime".  should be your parrot source dir
19:40 jhorwitz kinda confusing
19:41 ejs2 joined #perl6
19:42 slavik jhorwitz: even though I installed parrot?
19:43 jhorwitz you probably shouldn't install parrot
19:43 slavik why not?
19:43 slavik /home/slavik/src/parrot/runtime/parrot/
19:43 slavik does that seem like it will work?
19:43 jhorwitz /home/slavik/src/parrot
19:44 slavik Can't find ./mod_perl6 in @INC
19:44 slavik :D
19:44 jhorwitz good
19:44 jhorwitz now the README should say you need PERL6LIB
19:44 slavik yes
19:45 slavik =/usr/local/runtime/parrot/library
19:45 jhorwitz no -- /path/to/mod_parrot/languages/perl6/lib
19:45 slavik got it
19:45 slavik ty
19:45 jhorwitz np -- it's confusing when there's no docs!
19:46 slavik aww it failed
19:46 jhorwitz ?
19:46 slavik Null PMC access in find_method()
19:46 slavik current instr.: 'infix:=' pc 11214 (src/gen_builtins.pir:6893) called from Sub 'parrot;ModParrot;HLL;perl6;post_config_handler' pc 5729 (EVAL_16:1820)
19:47 slavik that's in the log
19:48 dr_df0 joined #perl6
19:48 jhorwitz hm
19:51 pugs_svn r24201 | moritz++ | [t/spec] more tests in indirect_notation.t, for example for RT #61106
19:52 moritz_ should I retitle #61106 to something like 'using closure as a method doesn't pass invocant as first positional arg'?
19:53 slavik moritz_: ETF?!
19:53 jhorwitz slavik: got it -- mod_parrot bug
19:54 jhorwitz bombs out if you have no mod_perl6 apache directives
19:54 moritz_ slavik: "etf" being "Exchange Traded Fund"?
19:54 jhorwitz slavic: try throwing in a handler configuration (doesn't have to work yet)
19:54 jhorwitz ^slavik
19:56 slavik lol
19:56 slavik was supposed to be wtf
19:56 moritz_ ah
19:56 slavik jhorwitz: where should I through it and what should it look like?
19:56 slavik jhorwitz: parrot.load?
19:57 jhorwitz see the counter in eg/perl6
19:57 slavik k
19:57 jhorwitz mod_perl6 is loaded and working
19:57 jhorwitz just has no config, and it doesn't know how to deal with that.
20:07 slavik hmm
20:07 slavik how can I have no response handler or w/e it is
20:09 jhorwitz not sure what you mean
20:09 slavik I did addhandler and perl6requesthandler
20:09 nacho joined #perl6
20:09 slavik no dice, or do I have to do sethandler?
20:10 jhorwitz no -- follow the README exactly
20:10 slavik :(
20:10 jhorwitz actually, the README stops short -- the examples have configurations
20:10 jhorwitz it looks exactly like mod_perl
20:11 slavik what about the counter file
20:11 jhorwitz for a response handler in a directory, say SetHandler perl6-script, then Perl6ResponseHandler Your::Module
20:12 slavik what about global?
20:12 slavik isn't it AddHandler perl6-source .p6, then the Perl6ResponseHandler?
20:12 jhorwitz the "counter" file is an example of a registry script
20:12 slavik right
20:12 jhorwitz the modules in ModPerl6 are examples of real handlers
20:13 jhorwitz the config in counter will set up a directory for registry scripts.
20:13 slavik AddHandler perl6-script .p6
20:13 slavik Perl6ResponseHandler ModPerl6::Registry
20:13 slavik I want perl6 to be global
20:13 jhorwitz ah
20:14 jhorwitz you're reading ahead.  :)
20:14 slavik oh
20:14 slavik that's what I have for root
20:14 slavik I have similar for Perl5
20:14 jhorwitz i wanted to make sure the examples worked first
20:14 slavik jhorwitz: let's assume they do :)
20:14 jhorwitz you assume a lot.  :)
20:15 cknapp joined #perl6
20:15 slavik jhorwitz: I trust in your code writing skill :)
20:15 jhorwitz famous last words...
20:15 slavik otherwise I will go to PHP ... and we know it sucks
20:15 jhorwitz LOL
20:15 jhorwitz well, i have that working too.  :
20:15 jhorwitz :)
20:15 slavik no pointy blocks, arrays that thing they are hashes ... etc
20:15 slavik so do I, your point?
20:15 jhorwitz i meant under mod_parrot
20:16 slavik Counter.pm?
20:16 jhorwitz anyhoo...
20:16 jhorwitz php (uses parrot's pipp compiler)
20:17 slavik php is crap, perl6 is where it's at
20:17 jhorwitz giddyup
20:17 slavik sure thing, Cosmo
20:17 jhorwitz :)
20:17 cknapp left #perl6
20:17 jhorwitz ok, to make a global handler for .p6 files...
20:18 slavik don't stop
20:18 slavik :-\
20:19 jhorwitz i'm not sure if mod_perl6 will support that yet.  it's not hard, just have to tweak it.
20:19 slavik err, why would mod_perl6 need to support it? isn't it an apache config issue?
20:20 slavik given a *.p6, it should call mod_perl6 or w/e
20:20 jhorwitz mod_perl6 looks for a handler name it recognizes (perl6-script, etc), but it expects to also have a Perl6ResponseHandler setting
20:20 jhorwitz you *can* do it with a <Files *.p6> block
20:20 slavik so, I set it to registry :)
20:21 slavik the handler is ModPerl6::Registry
20:21 jhorwitz not sure if Perl6ResponseHandler is valid in the main server config
20:22 slavik seems to be for Perl5
20:22 jhorwitz well, that's mod_perl2
20:22 jhorwitz :)
20:22 jhorwitz i can make that happen though
20:22 slavik good :D
20:22 jhorwitz see if <Files *.p6> works for you right now
20:23 slavik where do I put it?
20:23 slavik to add handler?
20:23 slavik I am not an apache guru :(
20:24 slavik or is that a sectoion?
20:24 pugs_svn r24202 | moritz++ | [t] move operator_overloading.t to spec/
20:24 jhorwitz it's a section.  put "SetHandler perl6-script" and "Perl6ResponseHandler ModPerl6::Registry" in there
20:24 slavik k and this section is under a directory?
20:25 jhorwitz no, it's on its own
20:25 slavik k
20:25 jhorwitz says "use this config for all files ending with .p6"
20:27 jhorwitz brb
20:29 slavik jhorwitz: segfault
20:31 pugs_svn r24203 | moritz++ | [t] cleanup of flip-flop.t
20:31 jhorwitz poop
20:32 jhorwitz that really shouldn't happen
20:32 pugs_svn r24204 | moritz++ | [t] move flip-flop.t to spec/
20:33 jhorwitz slavik: works for me
20:33 jhorwitz can you paste your config?
20:34 slavik k
20:35 pasteling "slavik" at 12.130.86.9 pasted "config" (15 lines, 514B) at http://sial.org/pbot/33539
20:35 slavik der
20:39 jhorwitz when did it segfault?  startup or when you made a request?
20:39 riffraff joined #perl6
20:40 slavik start up
20:41 jhorwitz hm
20:43 jhorwitz can you run this: source /path/to/envvars
20:43 jhorwitz then gdb /path/to/httpd
20:43 jhorwitz then run -X
20:43 jhorwitz you should see where it's segfaulting.  if so, type bt and paste the back trace
20:47 pmurias ruoso: is there a memory leak debugging tool we are lacking?
20:48 pmurias i'm thinking of writing a thing which would print the stack trace during the allocation of the missing objects
20:49 slavik bt
20:49 slavik ?
20:50 pmurias gdb command
20:50 slavik oh, ok
20:51 pugs_svn r24205 | moritz++ | [t] move submethods.t to spec/, clean up some eval clutter
20:53 pugs_svn r24206 | moritz++ | [t] no need for a Synopsis dir, it was mostly outdated anyway
20:54 slavik no debug symbols :(
20:55 sudvabalis joined #perl6
20:56 sudvabalis help me surprise my girlfreind, watch this video on youtube, thanx! http://www.youtube.com/watch?v=LHsitCVMbgE
20:56 sudvabalis left #perl6
20:56 slavik wtf?
20:56 slavik I say we spam him
20:56 * moritz_ ignores spam
20:58 jhorwitz @tell slavik set MP_DEBUG environment variable to -g, rebuild and reinstall mod_parrot, then run the gdb session again.
20:58 lambdabot Consider it noted.
20:58 stephens joined #perl6
21:04 lambdabot joined #perl6
21:04 bacek perl6: token a { 'a' }; token b { 'b' }; rule Foo { <a> | <b> }; given $/<Foo> { when .<a> { say "a"; }; when .<b> { say "b"; }; };
21:04 p6eval rakudo 33630: OUTPUT[get_pmc_keyed() not implemented in class 'Undef'␤current instr.: '_block11' pc 46 (EVAL_16:27)␤]
21:04 p6eval ..pugs: OUTPUT[*** Can't modify constant item: VUndef␤    at /tmp/lgGduPl0kw line 1, column 80-85␤       /tmp/lgGduPl0kw line 1, column 80-85␤]
21:04 p6eval ..elf 24206: OUTPUT[Can't locate object method "cb__RegexDef" via package "EmitSimpleP5" at ./elf_f line 1612.␤]
21:04 bacek is it legal syntax?
21:05 bacek or I always should use if/elsif/else?
21:05 moritz_ bacek: yes, but until you match your regex you won't get any meaningful result
21:05 bacek perl6: token a { 'a' }; token b { 'b' }; rule Foo { <a> | <b> }; 'b'~~ / <Foo> /; given $/<Foo> { when .<a> { say "a"; }; when .<b> { say "b"; }; };
21:06 p6eval rakudo 33630: OUTPUT[Method 'ACCEPTS' not found for invocant of class 'PGE;Match'␤current instr.: 'infix:~~' pc 14429 (src/builtins/match.pir:18)␤]
21:06 p6eval ..pugs: OUTPUT[Error eval perl5: "if (!$INC{'Pugs/Runtime/Match/HsBridge.pm'}) {␤    unshift @INC, '/home/evalenv/pugs/perl5/​Pugs-Compiler-Rule/lib';␤    unshift @INC, '/home/evalenv/pugs/third-party/Parse-Yapp/lib';␤    eval q[require 'Pugs/Runtime/Match/HsBridge.pm'] or die $@;␤}␤'Pugs::Runti...
21:06 p6eval ..elf 24206: OUTPUT[Can't locate object method "cb__RegexDef" via package "EmitSimpleP5" at ./elf_f line 1612.␤]
21:06 bacek moritz_: thanks
21:06 bacek looks like another TODO ticket for rakudo.
21:06 moritz_ let me check the S03 smart match table first...
21:09 moritz_ yes, Any .foo - method truth
21:11 ruoso joined #perl6
21:14 Entonian joined #perl6
21:32 riffraff does perl6 specify some builtin way to use a string as an IO object?
21:34 moritz_ .open, or what do you mean?
21:36 riffraff well, something that can be read and written to but has data in a string instead of a file
21:36 riffraff pretty useful for testing, in my case
21:43 moritz_ like perl5's open($handle, '<', \$scalar) ?
21:43 moritz_ don't know if that works in Perl 6
21:46 riffraff I was thinking of IO::String on cpan, but just cause I didn't know this trick in perl5 :)
21:47 moritz_ ;-)
22:18 pcbuetow joined #perl6
22:22 sail0r joined #perl6
22:23 sail0r left #perl6
22:23 ejs2 left #perl6
22:23 rindolf joined #perl6
22:24 rindolf Hi all.
22:30 rakudo_svn r33637 | infinoid++ | [cage] Fix some trailing spaces.
22:59 meppl good night
23:04 pugs_svn r24207 | moritz++ | [t/spec] tests for Str.subst with :g, :x() and :nth(), both single and combined
23:11 riffraff moritz_, interesting, I found an io_string.c in parrot sources which behaves as I was saying before.. I wonder where it surfaces in perl
23:14 moritz_ riffraff: either it's specced in S16, or it waits for your spec work ;-) (S16 is heavily under-specced, and needs a lovin' hand)
23:18 riffraff :)
23:19 * riffraff adds "check s16" at the end of his eternal todolist
23:19 moritz_ I could imagine a constructor IO.new(:scalar($source_scalar)) and IO.new(:list(@source_list))
23:20 moritz_ the first case would split $source_scalar on the input record separator...
23:20 moritz_ and the second one would take the items in @source_list as input recrods
23:24 apeiron joined #perl6
23:25 riffraff yes, but the latter would be confusing when stuff like seek() is used, I think, easier to just join() it with a suitable record separator I think
23:26 riffraff anyway, it seems that io_string.c is useless in parrot, cool
23:26 moritz_ useless? because it's not exposed to Perl 6?
23:27 moritz_ there are other languages out there...
23:28 riffraff no because the functions defined there do not appear anywhere else when I do grep funcname . -r
23:28 riffraff but probably I'm mistaken
23:59 Entonian joined #perl6

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

Perl 6 | Reference Documentation | Rakudo