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