pugscode.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 Tene on 29 July 2008.
00:04 iblechbot left, pmurias left 00:26 snooper joined 00:28 adc_penner4 left 00:41 pcbuetow left 00:45 dukeleto_ joined 01:09 snooper left
meppl good night 02:10
02:11 meppl left 02:13 dukeleto_ left 02:16 Limbic_Region left 02:35 DemoFreak left 02:51 dukeleto_ joined 03:25 dukeleto_ left 03:32 kst` joined 03:39 meteorjay joined 03:47 slavik joined
slavik hallo 03:47
03:48 Psyche^ joined
slavik is there a way in rakudo to recursively print everything? something like data dumper or PHP's printr(). I know about the $var.perl, but it doesn't seem exhaustive 03:48
I am mainly interested in printing the structure of a match object, because some things happen which cause something to be nested a level deeper and I would like to understand why 03:49
03:53 Patterner left, Psyche^ is now known as Patterner 04:02 elmex_ joined 04:13 dukeleto_ joined 04:17 elmex left, elmex_ is now known as elmex
slavik given two arrays, what is the correct way to zip them into a hash? %hash = @keys Z @values; ??? 04:26
rakudo: my %hash = 1..5 Z 6..10; say %hash; 04:27
p6eval rakudo 33032: OUTPUT[elements() not implemented in class 'Range'␤current instr.: 'infix:Z' pc 3915 (src/gen_builtins.pir:2519)␤]
slavik rakudo: my %hash = (1..5) Z (6..10); say %hash;
p6eval rakudo 33032: OUTPUT[elements() not implemented in class 'Range'␤current instr.: 'infix:Z' pc 3915 (src/gen_builtins.pir:2519)␤]
slavik rakudo: my @keys=1..5; my vals=6..10; my %hash = @keys Z @vals; say %hash;
p6eval rakudo 33032: OUTPUT[Scope not found for PAST::Var '@vals'␤current instr.: 'parrot;PCT;HLLCompiler;panic' pc 152 (src/PCT/HLLCompiler.pir:104)␤]
slavik rakudo: my @keys=1..5; my @vals=6..10; my %hash = @keys Z @vals; say %hash; 04:28
p6eval rakudo 33032: OUTPUT[1 6␤2 7␤3 8␤4 9␤5 10␤␤]
slavik rakudo: my @keys=1..5; my @vals=6..10; my %hash = @keys Z @vals; say keys %hash;
p6eval rakudo 33032: OUTPUT[12345␤]
slavik rakudo: my @keys=1..5; my @vals=6..10; my %hash = @keys Z @vals; say %hash.keys();
p6eval rakudo 33032: OUTPUT[12345␤]
slavik rakudo: my @keys=1..5; my @vals=6..10; my %hash = @keys Z @vals; say %hash.vals();
p6eval rakudo 33032: OUTPUT[Method 'vals' not found for invocant of class 'Perl6Hash'␤current instr.: '_block11' pc 146 (EVAL_13:45)␤]
slavik rakudo: my @keys=1..5; my @vals=6..10; my %hash = @keys Z @vals; say %hash.values();
p6eval rakudo 33032: OUTPUT[678910␤]
slavik awesome
nevermind :)
04:34 xinming joined 04:35 Chillance left
slavik hmm, problem remains 04:36
that or my build of rakudo is too old
rakudo: say ?(0 == 0) 04:49
p6eval rakudo 33032: OUTPUT[1␤]
slavik rakudo: say ?(0 == 1)
p6eval rakudo 33032: OUTPUT[0␤]
slavik rakudo: say ?(1.0 == 1)
p6eval rakudo 33032: OUTPUT[1␤]
slavik rakudo: say ?(1.0 === 1)
p6eval rakudo 33032: OUTPUT[0␤]
slavik rakudo: say ?(1.0 =:= 1) 04:50
p6eval rakudo 33032: OUTPUT[0␤]
slavik rakudo: say ?("a" == 'a')
p6eval rakudo 33032: OUTPUT[1␤]
slavik rakudo: say ?("a" =:= 'a')
p6eval rakudo 33032: OUTPUT[0␤]
slavik hmm
rakudo: say ?("a" cmp 'a')
p6eval rakudo 33032: OUTPUT[0␤]
slavik rakudo: say ?("1" cmp 1)
p6eval rakudo 33032: OUTPUT[0␤]
slavik rakudo: say ?("1" <=> 1) 04:51
p6eval rakudo 33032: OUTPUT[0␤]
slavik rakudo: say ?("1" <=> 2)
p6eval rakudo 33032: OUTPUT[1␤]
slavik rakudo: say ?("1" <=> 0)
p6eval rakudo 33032: OUTPUT[1␤]
slavik rakudo: say ?("1" cmp 0)
p6eval rakudo 33032: OUTPUT[1␤]
slavik rakudo: say ?("abc" cmp "def") 04:52
p6eval rakudo 33032: OUTPUT[1␤]
slavik rakudo: say ?("zbc" cmp "def")
p6eval rakudo 33032: OUTPUT[1␤]
slavik shouldn't one of these return -1?
s1n rakudo: say ?("b" cmp "a") 05:13
p6eval rakudo 33032: OUTPUT[1␤]
s1n rakudo: say ?("a" cmp "b")
p6eval rakudo 33032: OUTPUT[1␤]
slavik anyway ... zipping doesn't completely work :(
s1n rakudo: say ?(1 <=> 2) 05:14
p6eval rakudo 33032: OUTPUT[1␤]
s1n rakudo: say ?(2 <=> 1)
p6eval rakudo 33032: OUTPUT[1␤]
s1n heh, what's the spec say on that?
slavik %hash = $/<blah>[0] | $/<blah>[1]; doesn't work :(
s1n: I am pretty sure it's supposed to be like in perl5
if the left is smaller, then the return is -1, if the right is smaller the 1, if equal then 0 05:15
pugs: say ?(1 <=> 2)
p6eval pugs: No output (you need to produce output to STDOUT)
slavik pugs: say ?(1 <=> 2);
p6eval pugs: No output (you need to produce output to STDOUT)
slavik pugs broken
perl6: say ?(1 <=> 2);
p6eval pugs: No output (you need to produce output to STDOUT)
..elf 23056, rakudo 33032: OUTPUT[1␤]
slavik p6eval: say ?(1 <=> 2);
s1n perl6: say ?(1 <=> 2)
p6eval pugs: No output (you need to produce output to STDOUT)
..elf 23056, rakudo 33032: OUTPUT[1␤]
s1n heh 05:16
slavik night 05:20
pasteling "slavik" at 67.100.227.140 pasted "Perl6 Grammar" (36 lines, 1.4K) at sial.org/pbot/33316 05:23
slavik take a look :)
05:34 The_last_hero joined, The_last_hero left 05:46 slavik left 06:03 Bzek joined 06:14 justatheory left 06:17 justatheory joined, justatheory left 06:29 bacek_ joined 06:31 bacek__ left 06:49 spx2 joined 06:50 justatheory joined, justatheory left 07:56 Psyche^ joined 08:08 Patterner left, Psyche^ is now known as Patterner 08:27 ihrd joined 08:48 dac524 joined 08:50 dac524 left 08:51 ihrd left 08:52 meppl joined
meppl good morning 08:52
08:54 simcop2387 left 08:55 simcop2387 joined 09:04 iblechbot joined 09:17 Psyche^ joined 09:18 Patterner left, Psyche^ is now known as Patterner 09:27 schmalbe joined 09:34 Ehtyar joined 09:53 smtms joined 10:04 DemoFreak joined 10:22 km2 left 10:37 pmurias joined, smg left
pmurias @tell how should i checkout the smopp5? 10:45
lambdabot Consider it noted.
moritz_ pmurias: you should told the nickname "how" something ;) 10:47
10:47 clintongormley joined 10:48 clintongormley left
moritz_ slavik++ # nice grammar 10:48
10:56 ludan joined 11:06 vixey joined 11:15 ejs joined 11:23 jferrero left
schmalbe greetings from Frankfurt Perl Workshop 11:25
Lichtkind is talking about Perl6
buu Run away,
jnthn Lichtkind++ :-) 11:31
pmurias @tell ruoso how should i checkout smopp5? 11:34
lambdabot Consider it noted.
11:49 pbuetow joined 12:07 smg joined 12:31 adc_penner4 joined 12:35 BinGOs joined 12:40 masak joined, km2 joined
masak Mark Lentczner wants me to tell everyone that he'll be updating his table of operators www.ozonehouse.com/mark/blog/code/P...Table.html -- perhaps in time for the new year! 12:41
lambdabot Title: Mark Lentczner's Journal 12:42
moritz_ (Mark Lentczner)++ 12:49
12:53 km2 left 12:54 pmurias left
masak what should happen with an $obj.meth() call when $obj contains an undefined value? 13:01
oops, I meant 'an $obj.?meth() call'
moritz_ masak: definedness is just a property of an object that is rather arbitrary 13:02
masak I'd hope that the question mark would make Perl 6 not warn about the 'use of uninitialized value', but maybe that's misusing the .?meth() notation.
rakudo: my $a; $a.?meth() 13:03
p6eval rakudo 33042: RESULT[undef]
masak hm.
rakudo: my $a; say $a.?meth()
p6eval rakudo 33042: OUTPUT[Undefined value returned by invocation of undefined method␤␤]
masak oh, but of course it warns there, sorry. :)
rakudo: my $a; for 1..2 { say ~$a.?lc; $a = "OH HAI" } 13:05
p6eval rakudo 33042: OUTPUT[␤oh hai␤]
masak it actually seems to DWIW
I have no further questions, your honour.
pugs_svn r23057 | moritz++ | [t/spec] fudge slurpy-params.t for rakudo 13:10
13:15 rindolf joined
rakudo_svn r33043 | moritz++ | [rakudo] add test for slurpy params to spectest 13:20
13:36 schmalbe left 13:40 Jedai joined 13:57 loumz joined 14:16 meppl left
masak what's the difference between these two? 14:27
rakudo: my $a; say $a.?lc.WHAT
p6eval rakudo 33043: OUTPUT[Str␤]
masak rakudo: my $a = undef; say $a.?lc.WHAT
p6eval rakudo 33043: OUTPUT[Use of uninitialized value␤Str␤]
masak in both cases, $a contains a Failure, right? 14:28
moritz_ no
'my $a' will initialize with an Object proto
masak rakudo: my $a; say $a.WHAT; $a = undef; say $a.WHAT
p6eval rakudo 33043: OUTPUT[Failure␤Failure␤]
masak looks like Failure to me. 14:29
moritz_ urm
masak ...which makes the discrepancy all the more difficult to explain... 14:30
14:38 loumz left
pugs_svn r23058 | moritz++ | [t/spec] S12 tests for 'is default' trait 14:39
r23059 | moritz++ | [t/spec] set svn props on a few test files 14:46
14:47 rindolf left
pugs_svn r23060 | moritz++ | [t/spec] smartlink for default-trait.t 14:51
14:53 sri_kraih joined, pmurias joined 14:54 Coleoid_ joined 14:58 jan_ joined 15:11 Coleoid left 15:29 alester joined 15:42 cognominal joined 15:53 ludan left, cognominal left 16:06 cognominal joined 16:36 zamolxes joined 16:37 meppl joined 16:43 adc_penner4 is now known as adc_penner, jferrero joined 16:53 alester left 16:55 zamolxes left 17:06 meppl left 17:10 pmurias left, justatheory joined 17:47 masak left, alester joined 17:59 ilogger2 joined 18:07 spinclad_ joined 18:08 adc_penner2 joined 18:13 spinclad_ left, spinclad_ joined
moritz_ rakudo: enum Foo<get_string>; 18:19
p6eval rakudo 33053: OUTPUT[A method named 'get_string' already exists in class ''. It may have been supplied by a role.␤current instr.: '_block16' pc -1 ((unknown file):-1)␤]
18:20 spinclad left, __felix__ joined, __felix__ left
pugs_svn r23061 | moritz++ | [t/spec] test for RT #59982 (my $x; $x = $x + 1i fails in rakudo) 18:31
18:35 nacho joined
moritz_ rakudo: for 0 .. 5 { .uc.print } 18:50
p6eval rakudo 33053: OUTPUT[012345]
pugs_svn r23062 | moritz++ | [t/spec] corrected test in for.t 18:53
r23063 | moritz++ | [t/spec] corrected previous commit
jnthn Correcting the corrections to the corrections... ;-) 19:08
moritz_ indeed :) 19:09
jnthn The multi method case for is default isn't so surprising, given multi methods don't really work at all yet.
It'll be some oddity with the invocant.
It's high on my "to fix" list. 19:10
moritz_ oki
I'm writing tests for 'is also' on classes right now
jnthn cool
jnthn thought he'd maybe done some for that, but maybe not
moritz_ so far I haven't found a single bug when extending user defined kclasses
Str seems to be problematic 19:11
Int is fine 19:13
jnthn Ah, Str...
Str is...special. 19:14
moritz_ sees memories of old pains emerging...
jnthn You shoulda seen what it took to make $something_that_is_a_string does Foo kinda stuff work.
It boils down to Str just mapping a PMC, where as most other things really are high level classes. 19:15
pugs_svn r23064 | moritz++ | [t/spec] add tests for 'is also' on classes 19:21
r23065 | moritz++ | [t/spec] set svn props on open.t 19:26
19:28 rakudo_svn joined
jnthn moritz_: So is also works on all but Str? 19:28
moritz_ jnthn: afaict yes 19:29
jnthn: I've tested user defined classes, Int, List, Array, Str
jnthn moritz_: Great. I'm cooking nom at the moment - could you file a ticket about the Str one?
moritz_ (I can even add methods to List, and use it in Array, because of the inheritance)
jnthn: I'm updating (and renaming) #56602 as we speak
jnthn Ah, good you tested the inherited case. :-)
19:30 alech joined
jnthn Excellent, thank you. 19:30
moritz++
rakudo_svn r33054 | moritz++ | [rakudo] add tests for 'is also' on classes
moritz_ jnthn: should I give you that ticket? 19:32
19:32 spx2 joined
moritz_ I just did that (impatient me ;) 19:32
19:36 meppl joined
jnthn moritz_: sure 19:36
moritz_ we're up at 4642 passing tests (on my machine, with bigint lib) 19:48
20:01 masak joined 20:05 silug joined
pugs_svn r23066 | moritz++ | [irclog] don't be overly picky about channel names 20:09
moritz_ masak++ for noticing ;)
20:25 meppl left
s1n may be off topic, but does anyone know of any good perldoc syntax highlighters? 20:25
err well, pod that is 20:26
masak s1n: I like the one they use at perldoc.perl.org :)
moritz_ s1n: vim does a not-too-bad job, but it's not exactly good either
20:26 tewk_ joined
s1n moritz_: got a link? i use vim and it's like all one color and i'd like to have the keywords highlighted 20:27
moritz_ s1n: there's some option you can use... forgot which. But if you open a .pod file it should display a bit better 20:28
s1n moritz_: is it good practice to move all pod to seperate .pod files? 20:29
moritz_ s1n: no ;)
masak s1n: :syntax on 20:30
moritz_ :let perl_include_pod I think
s1n moritz_: unknown variable
masak: just colors everything default terminal color (":set syntax=on" that is) 20:31
masak s1n: ok, too bad.
moritz_ s1n: :let perl_include_pod=1 and then :e again
20:32 slavik joined
s1n moritz_: yeah, i just read that on vim's docs, but it didn't say anything about the :e, what does that do? 20:33
20:34 Psyche^ joined
moritz_ s1n: it reads the file again 20:34
20:34 Psyche^ is now known as Patterner
s1n oh, heh, short for edit 20:34
sweet, thanks guys, finally proper coloring of my perl code :) 20:38
moritz_ no problem
slavik I use perl coloring :P
s1n not sure why some of those aren't set by default for perl 20:39
20:44 silug left 20:56 slavik left
masak I want to add a test that checks that a block containing first $foo and then $^foo dies in some way. do I use dies_ok for this? 21:11
moritz_ masak: eval_dies_ok, because it's detected at compile time 21:12
masak oki
21:14 alester joined 21:17 IRSeekBot joined
pugs_svn r23067 | masak++ | [S06-signature/positional-placeholders.t] added another test that checks 21:18
r23067 | masak++ | against $foo-type variables being used before corresponding $^foo variables
21:22 justatheory joined 21:23 jferrero joined
jnthn We're probably not going to die on that one for a little while... 21:26
masak: Did you fudge it?
masak jnthn: no, but I can do it right now if you want 21:27
moritz_ masak: please do
masak does
21:28 alester left, km2 joined
pugs_svn r23068 | masak++ | [S06-signature/positional-placeholders.t] fudged 21:28
21:46 zamolxes joined 21:52 guiwiz_ joined
guiwiz_ hi all 21:53
masak guiwiz_: hello!
welcome to #perl6. :) 21:54
guiwiz_ thank you 21:55
do you know if there is a mirror for run.pugscode.org?
masak guiwiz_: not to my knowledge, no.
guiwiz_ too bad... i wanted to try perl6 but pugs won't install on my computer 21:56
masak guiwiz_: have you tried Rakudo?
it's worth a look.
guiwiz_ i need an interactive-mode interpreter, does rakudo acts like this? 21:57
act*
masak guiwiz_: yes, but not very well in my opinion.
it's better as a compiler.
guiwiz_ ok
masak guiwiz_: the reason I say so is this bug: rt.perl.org/rt3/Ticket/Display.html?id=58258 21:58
lambdabot Title: #58258: The Rakudo REPL has no long-term memory
masak it kinda destroys all plans for interactive work.
guiwiz_ i will try then
i just have to install parrot?
masak guiwiz_: yes.
and then `make perl6` in languages/perl6
22:03 ZuLuuuuuu joined 22:07 masak left 22:16 FurnaceBoy joined 22:19 alester joined 22:23 ZuLuuuuuu left
guiwiz_ guiwiz@Guillaume:~$ perl6 22:38
> sub add ($a,$b) { $a + $b }
> print add(1,2);
>
lambdabot <no location info>: parse error on input `$'
Not in scope: `add'
guiwiz_ how can i get my answer from the interpreter? 22:39
moritz_ rakudo: sub add ($a,$b) { $a + $b }; print add(1, 2) 22:40
p6eval rakudo 33107: OUTPUT[3]
moritz_ guiwiz_: try it with 'say' instead of 'print', maybe your terminal doesn't like it when there's no newline at the end of the output 22:41
22:41 alester left
guiwiz_ thank you, that works 22:41
jnthn If that is the answer, we likely want to flush...
That looks like a bug in the REPL.
moritz_ aye, fflushing wouldn't be bad 22:42
guiwiz_ i did something wrong?
moritz_ but my terminal also swallows short output from other jprogrms that have no line ending
guiwiz_: no
maybe we did something wrong, though ;) 22:43
22:45 kanru joined 22:49 guiwiz_ left, guiwiz_ joined
guiwiz_ bye all and thank you 22:55
FurnaceBoy ciao 22:56
bonne nuit :)
guiwiz_ ^^ bonne nuit :p
22:57 guiwiz_ left 23:20 justatheory left 23:43 nacho left 23:49 bacek__ joined