pugscode.org/ | nopaste: sial.org/pbot/perl6 | ?eval [~] <m oo se> | We do Haskell, too | > reverse . show $ foldl1 (*) [1..4] | irclog: irc.pugscode.org/ Set by diakopter on 11 July 2007. |
|||
00:02
hanekomu left
00:06
theorbtwo joined
00:18
lambdabot joined
00:20
theorb left
00:22
turrepurre left
00:23
avar joined
00:28
turrepurre joined
00:30
gan joined
00:34
gan left
00:35
gan joined
00:45
gan left
00:58
neuromu left
01:15
polettix left
|
|||
meppl | good night | 01:57 | |
02:10
Notrix joined
02:16
Notrix left
02:17
[particle] joined
|
|||
akreal | good morning, meppl! :) | 02:25 | |
02:55
Limbic_Region left
02:56
mjk joined
|
|||
akreal is away: Отошёл. | 02:57 | ||
03:00
ispy_ joined
03:08
jjore-m joined
|
|||
ispy_ | so does perl6 support complex-data structures just yet? | 03:48 | |
PerlJam | Perl 6 does. But it sounds more like you're asking about a particular implementation. :) | 04:22 | |
ispy_ | I want to know the equiv of @{ $struct{key} } | 04:24 | |
allbery_b | @struct<key> I think | 04:27 | |
lambdabot | Unknown command, try @list | ||
PerlJam | ispy_: you mean %hash<key> ? | 04:28 | |
Khisanth | heh | ||
allbery_b | <- been not thinking p6ish for too long, sigh | ||
ispy_ | ahh... | 04:31 | |
hmm... @hash<key> doesn't work either... | 04:33 | ||
allbery_b | no, it won't | 04:34 | |
PerlJam | %hash<key> # note the punctuation. | 04:35 | |
allbery_b | hence my "not thinking p6ish for too long": | ||
I think if %struct<key> contains an array then you get it | |||
ispy_ | but %hash<key> returns the array in scalar context. | ||
allbery_b | unlike p5 where yu get an arrayref you need to manually deref | ||
PerlJam | ispy_: not if you use it in a list/array context. | ||
allbery_b | ==PerlJam | 04:36 | |
p6 is smarter about such things | |||
PerlJam | ispy_: if you want to force the listiness, you could surround it in @() | ||
ispy_ | that's what I figured, but it doesn't seem that way. | ||
ok. | |||
that's what I was wondering, if p6 had the equiv. of @{ | |||
so that's it? @( | |||
allbery_b | yes | 04:39 | |
it's a function-like thing now instead of special syntax | |||
ispy_ | I can hang with that. | 04:40 | |
:) | |||
it's consistant. | |||
I was sorta thinking p6 had dynamic ref determination but, oh well :) | |||
PerlJam | "dynamic ref determination"? | 04:41 | |
allbery_b | it does, usually, if I understand you correctly | ||
PerlJam | it does the right thing when used in the right context and you get the option to force a context. | ||
allbery_b | that said, some implementations may not support it properly yet | ||
p6 is still prerelease and in active development, after all | |||
PerlJam | for instance, %hash<key>[0..6] should work fine. | ||
no need for @() there | 04:42 | ||
ispy_ | right. | ||
also %hash<key>.[0] works too... | 04:43 | ||
which is nice. | |||
I'm really into p6 right now for some reason... | |||
just started fooling around with it last week. | |||
05:06
neuromu joined
05:09
neuromu left
05:11
DarkWolf84 left
05:17
jisom joined
05:20
neuromu joined,
neuromu left
05:30
neuromu joined,
neuromu left
05:36
neuromu joined
06:32
hakobe left
06:56
diakopter joined,
ether0 joined
07:05
jisom left
07:34
Entonian left
07:45
cathyal joined
08:02
Psyche^ joined
08:09
ispy_ left
08:18
Patterner left,
Psyche^ is now known as Patterner
08:40
Aankhen`` joined
08:46
jjore-m left
08:47
neuromu left
09:19
syle2 left
09:33
drrho joined
09:35
luqui joined
09:38
barney joined
10:07
bw_hb joined
10:11
penk left
10:14
elmex joined
10:19
kanru left
10:22
tokuhiro_ left,
tokuhirom joined
10:23
iblechbot joined
10:27
FOAD left
11:03
ludan joined
|
|||
ludan | hi | 11:04 | |
moritz_ | hi all, good localtime() ;) | 11:05 | |
Aankhen`` waves at moritz_ and ludan. | 11:23 | ||
11:26
bw_hb left
11:28
zester joined
11:35
iblechbot left
11:42
zester left
11:47
hanekomu joined
11:51
hanekomu_ joined
11:59
pmurias joined
|
|||
pmurias waves at Aankhen``,moritz_ and ludan | 12:00 | ||
elmex waves at noone | |||
Aankhen`` surreptitiously waves at pmurias and elmex too. | 12:01 | ||
Yay, lots of waving action. | |||
12:06
theorbtwo left
12:07
hanekomu left,
hanekomu joined
12:08
theorbtwo joined
12:10
mjk left
12:19
hanekomu_ left
13:09
hanekomu left
13:25
hareldvd joined
13:27
stevan left
|
|||
pmurias | Aankhen``: if it's nothing private why did you decide it will be better if you don't work on kp6-lisp? | 13:30 | |
13:34
hakobe joined
13:35
drrho left
13:36
aindilis joined
13:38
Notrix joined
13:43
iblechbot joined
|
|||
Aankhen`` | pmurias: Basically, because I felt the way I work is very inappropriate for KP6. KP6 needs the "get as much done as you can right now" style whereas I'm obsessed with getting it done right and complete straight off the bat. | 13:59 | |
(Which is naturally pretty much impossible, so I move at a glacial pace.) | 14:00 | ||
pmurias | Aankhen``: ok | 14:01 | |
14:09
Notrix left
14:33
syle2 joined
14:39
turrepurre left,
aindilis left
14:48
hareldvd left
14:54
FurnaceBoy joined
15:17
kanru joined
15:22
barney left
15:24
hareldvd joined
15:40
masak joined
15:54
penk joined
15:57
devogon joined
16:05
chris2 joined
16:24
penk left
16:26
Psyche^ joined,
penk joined
16:42
Patterner left,
Psyche^ is now known as Patterner,
[particle] left
16:43
riffraff joined
16:44
[particle] joined
16:47
hanekomu joined
16:52
hareldvd left
16:57
hakobe is now known as hkb_zz
16:58
hanekomu left
17:16
neuromu joined
17:33
thoughtpolice joined
|
|||
pmurias | pugs: my @array = [];say @array.perl; | 17:35 | |
exp_evalbot | OUTPUT[[[],]] | ||
moritz_ | that looks a bit buggy | 17:36 | |
masak | it's an array of an array | ||
that shouldn't happen, right? | 17:37 | ||
moritz_ | masak: that would be ([],) or plain [], | ||
Tene | pugs: my @array = 1; say @array.perl; | ||
exp_evalbot | OUTPUT[[1,]] | ||
Tene | pugs: my @array = (); say @array.perl; | ||
exp_evalbot | OUTPUT[[]] | ||
Tene | pugs: my @array := []; say @array.perl; | ||
exp_evalbot | OUTPUT[[[],]] | ||
moritz_ | pugs: () ~~ [] ?? say "yes" !! say "no" ; | 17:38 | |
exp_evalbot | OUTPUT[yes] | ||
masak | moritz_: I thought parentheses were only used for grouping in perl 6 | ||
moritz_ | masak: yes, that's why ([],) and [], are the same thing | ||
masak | moritz_: yes | ||
I suspect we're agreeing violently | |||
moritz_: the output was `[[],]`, which looks like an array of an (empty) array to me | 17:39 | ||
Aankhen`` | Needs moar violence. | 17:40 | |
masak | actually, pugs probably needs more tender care :) | ||
Tene | masak: I think that's accurate... what would you expect this to do: | 17:41 | |
pugs: my @array = ([],); say @array.perl; | |||
exp_evalbot | OUTPUT[[[],]] | ||
masak | hm | 17:42 | |
Tene: still, in your example it feels like you're talking about two arrays | |||
not pecause of the () but because of the , | |||
s/p/b/ | |||
Tene | mugs my @a = 1,2; my @b = @a; @a.perl | 17:43 | |
pugs: my @a = 1,2; my @b = @a; @a.perl | |||
exp_evalbot | RESULT["[1, 2]"] | ||
moritz_ | we need more mugs! | ||
masak | Tene: my intuition agrees with that last one | ||
17:44
ahmadz joined
|
|||
masak | but not with | 17:44 | |
17:44
ahmadz left
|
|||
masak | pugs @a = []; @a.perl | 17:44 | |
pugs: @a = []; @a.perl | |||
exp_evalbot | OUTPUT[***  Unexpected " =" expecting "::" Variable "@a" requires predeclaration or explicit package name at /tmp/NNtOrcbois line 1, column 3] | ||
Tene | pugs: my @a = 1,2; my @b = [@a]; @a.perl | ||
exp_evalbot | RESULT["[1, 2]"] | ||
masak | pugs: my @a = []; @a.perl | ||
exp_evalbot | RESULT["[[],]"] | ||
Tene | pugs: my @a = 1,2; my @b = [@a]; say @a.perl; | 17:45 | |
exp_evalbot | OUTPUT[[1, 2]] | ||
Tene | pugs: my @a = 1,2; my @b = ([@a],); say @a.perl; | ||
exp_evalbot | OUTPUT[[1, 2]] | ||
pugs_svn | r19005 | moritz++ | [evalbot] no newline in RESULT[...] | ||
Tene | Hm. | ||
17:46
exp_evalbot left,
exp_evalbot joined
|
|||
masak | I read `@a = []` as 'assign an empty array to @a', not as 'assign an empty array to the first element of @a' | 17:46 | |
moritz_++ | |||
Tene | masak: how do you read: @a = 1 | ||
? | |||
masak | that newline really was unnecessary | ||
Tene: that's different | 17:47 | ||
pmurias | masak: kp6 used to treat @a = [] as @a = () but it was changed | ||
Tene | masak: not as I understand it... | ||
[] is different from () | |||
masak | hm | ||
if we were talking about perl 5, I'd definitely agree | |||
but I've had to relearn some things about arrays that perl 6 does | 17:48 | ||
I thought this was one of them | |||
pugs_svn | r19006 | pmurias++ | [kp6] the multis are back | ||
Tene | However, I would not pbe surprised if pugs has this one case wrong. | ||
I can't get it to do the same thing with: @a = [@b]; | 17:49 | ||
pugs: my @a = [1,2]; print @a.perl; | |||
exp_evalbot | OUTPUT[[[1, 2],]] | ||
Tene | pugs: my @a = 1,2; my @b = [@a]; say @b.perl; | ||
exp_evalbot | OUTPUT[[[1, 2],]] | ||
Tene | ... helps if I print the right array. >< | ||
Yes, it does the same thing with =[@] | 17:50 | ||
masak | Tene: my rationale would go something like this: in perl 6, every array is really a reference (as in perl 5's backslash). assigning [] to an array variable means giving it a reference to a new empty array | ||
...whereas assigning 1 to it would mean first packing it into an array and then assigning the reference for that | 17:51 | ||
Tene | Hm. | ||
masak: but it's already in array context because you're assigning to an array. | |||
consider: | |||
my @a = 1, 2; my $b = [@a]; print $b; | 17:52 | ||
my @a = 1, 2; my $b = [@a]; print $b.perl; | |||
pugs: my @a = 1, 2; my $b = [@a]; print $b.perl; | |||
exp_evalbot | OUTPUT[[1, 2]] | ||
masak | Tene: yes I know | ||
I'm just not sure that applies in perl 6 | |||
Tene | pugs: my @a = 1, 2; my @b = @a; print @b.perl; | ||
exp_evalbot | OUTPUT[[1, 2]] | ||
Tene | pugs: my @a = 1, 2; my @b = [@a]; print @b.perl; | ||
exp_evalbot | OUTPUT[[[1, 2],]] | ||
Tene | Should there be a difference between the second two? | ||
pugs: my @a = 1, 2; my @b := [@a]; print @b.perl; | |||
exp_evalbot | OUTPUT[[[1, 2],]] | 17:53 | |
masak | Tene: I don't know. my brain hurts thinking about it | ||
Tene | masak: I don't know if it's what we should want or if matches the spec, but it seems consistent to me. | 17:54 | |
masak | @ask TimToady what `my @a = []` should put in @a, [] or [[]]? pugs now does the latter | 17:55 | |
lambdabot | Consider it noted. | ||
masak | @thx | ||
lambdabot | you are welcome | ||
pmurias | masak: i think you rationale proves that @array = []; sets the first element to [] | ||
masak | pmurias: go on | 17:56 | |
Tene | masak: you can think of anything in list context as being wrapped in ( ... ) | ||
pmurias | it wouldn't be possible to recognise what @bar = $foo does with knowing the type of $foo | ||
which would be bad | |||
masak | agreed. | 17:57 | |
pmurias | eval: my @a = (1,2,3);@b = @a;say @a; | 18:00 | |
Tene | pugs: my @a = (1,2,3); @b = @a; say @b.perl; | 18:01 | |
exp_evalbot | OUTPUT[***  Unexpected " =" expecting "::" Variable "@b" requires predeclaration or explicit package name at /tmp/6Y6oG6GSE6 line 1, column 20] | ||
Tene | pugs: my @a = (1,2,3); my @b = @a; say @b.perl; | ||
exp_evalbot | OUTPUT[[1, 2, 3]] | ||
pmurias | kp6: my @a = (1,2,3);@b = @a;say @a; | ||
Tene | pugs: my @a = [1,2,3]; say @a.perl; | ||
exp_evalbot | r19006: OUTPUT[invalid type on Array.BIND at compiled/perl5-kp6-mp6/lib/KindaPerl6/Runtime/Perl5/Container.pm line 297.data: undeftype: Undef] | ||
OUTPUT[[[1, 2, 3],]] | |||
pmurias | kp6: my @a = (1,2,3);my @b = @a;say @a; | 18:03 | |
exp_evalbot | r19006: OUTPUT[123] | ||
pmurias | good ;) | ||
TimToady | [] always produces a scalar value, even in list context | 18:12 | |
lambdabot | TimToady: You have 1 new message. '/msg lambdabot @messages' to read it. | ||
Tene | That's what I thought. | ||
18:14
luqui left
18:15
kanru left
18:20
penk left
|
|||
masak | ah, so pugs's output [[]] was correct, and y'all were right. I stand corrected. | 18:25 | |
18:26
Ace__ joined
18:27
masak left
18:29
ludan left
18:36
FurnaceBoy left
18:37
kanru joined
18:39
Notrix joined
18:40
Notrix left
|
|||
pmurias | exp_evalbot: help | 18:50 | |
exp_evalbot | pmurias: Usage: <(nqp|perl6|pugs|p6|kp6): $perl6_program> | ||
pmurias | p6: my @a = (1,2,3);my @b=@a;say @b.perl; | 18:51 | |
exp_evalbot | OUTPUT[Method 'perl' not foundcurrent instr.: 'parrot;Perl6::Compiler;main' pc 138 (perl6.pir:98)] | ||
pmurias | perl6: my @a = (1,2,3);my @b=@a;say @b.perl; | 18:52 | |
exp_evalbot | kp6: OUTPUT[[ 1, 2, 3 ]] | ||
..pugs: OUTPUT[[1, 2, 3]] | |||
..p6: OUTPUT[Method 'perl' not foundcurrent instr.: 'parrot;Perl6::Compiler;main' pc 138 (perl6.pir:98)] | |||
..nqp: OUTPUT[src/pmc_freeze.c:1254: failed assertion 'must_have_seen'Backtrace - Obtained 19 stack frames (max trace depth is 32). Parrot_print_backtrace Parrot_confess (unknown) (unknown) (unknown) (unknown) Parrot_thaw | |||
..PackFile_Constant_unpack_pmc PackFile_Con... | |||
pmurias | perl6: my @a = (1,2,3);my @b=@a;say @b; | ||
exp_evalbot | kp6: OUTPUT[123] | ||
..pugs: OUTPUT[123] | |||
..p6: OUTPUT[1 2 3] | |||
..nqp: OUTPUT[src/pmc_freeze.c:1254: failed assertion 'must_have_seen'Backtrace - Obtained 19 stack frames (max trace depth is 32). Parrot_print_backtrace Parrot_confess (unknown) (unknown) (unknown) (unknown) Parrot_thaw | |||
..PackFile_Constant_unpack_pmc PackFile_Con... | |||
pmurias | it's a fun way to flood the channel ;) | 18:54 | |
18:55
elmex left
|
|||
Tene | perl6: "hi pmurias!" | 18:55 | |
exp_evalbot | kp6: RESULT['hi pmurias!'] | ||
..pugs: RESULT["hi pmurias!"] | |||
..p6: RESULT[Null PMC access in invoke()current instr.: 'parrot;Perl6::Compiler;main' pc 138 (perl6.pir:98)] | |||
..nqp: OUTPUT[src/pmc_freeze.c:1254: failed assertion 'must_have_seen'Backtrace - Obtained 19 stack frames (max trace depth is 32). Parrot_print_backtrace Parrot_confess (unknown) (unknown) (unknown) (unknown) Parrot_thaw | |||
..PackFile_Constant_unpack_pmc PackFile_Con... | |||
pmurias | parrot dosn't like me ;( | ||
perl6: say "hi Tene!" | 18:57 | ||
exp_evalbot | kp6: OUTPUT[hi Tene!] | ||
..pugs: OUTPUT[hi Tene!] | |||
..p6: OUTPUT[hi Tene!] | |||
..nqp: OUTPUT[src/pmc_freeze.c:1254: failed assertion 'must_have_seen'Backtrace - Obtained 19 stack frames (max trace depth is 32). Parrot_print_backtrace Parrot_confess (unknown) (unknown) (unknown) (unknown) Parrot_thaw | |||
..PackFile_Constant_unpack_pmc PackFile_Con... | |||
Tene | perl6: say("omg whats up pmurias???") | ||
exp_evalbot | kp6: OUTPUT[omg whats up pmurias???] | ||
..pugs: OUTPUT[omg whats up pmurias???] | |||
..p6: OUTPUT[omg whats up pmurias???] | |||
..nqp: OUTPUT[src/pmc_freeze.c:1254: failed assertion 'must_have_seen'Backtrace - Obtained 19 stack frames (max trace depth is 32). Parrot_print_backtrace Parrot_confess (unknown) (unknown) (unknown) (unknown) Parrot_thaw | |||
..PackFile_Constant_unpack_pmc PackFile_Con... | |||
19:09
bbkr_ left
|
|||
wolverian | ouch | 19:12 | |
19:13
SubStack left
|
|||
pmurias | sorry | 19:29 | |
how should be perl5 and perl6 modules be seperated at use time in kp6 (a different PERL6LIB env variable?) | 19:37 | ||
and possibly failing back on PERL5LIB? | 19:38 | ||
19:42
cathyal left
19:45
jjore-m joined
19:50
[particle1 joined
20:02
DarkWolf84 joined
20:05
[particle] left
20:36
rindolf joined
20:44
rindolf left
20:45
devogon left
20:48
devogon joined
21:32
syle2 left,
theorb joined
21:34
chris2 left
21:42
neuromu left
21:44
jisom joined
21:47
theorbtwo left
21:58
Aankhen`` left
22:00
pmurias left
22:06
jisom_ joined
22:24
jisom left
22:33
nothingmuch joined
22:51
jisom_ left
22:57
Free_maN joined
23:11
Free_maN left
23:34
iblechbot left
23:37
riffraff left
23:55
nipotaway is now known as nipotan
|