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:01
awwaiid left
00:05
kanru joined
00:07
ting joined
00:10
elmex left
00:16
Caelum left
00:18
sri_work left
00:22
hercynium joined
00:25
dduncan left
00:34
Caelum joined
00:43
Limbic_Region joined
00:48
drbean left
00:54
cmdl1n3 left
01:21
eternaleye joined
01:35
Auzon joined
01:39
[particle] joined
03:05
literal joined
03:17
aindilis2 joined
03:39
hercynium left,
alanhaggai__ is now known as alanhaggai
03:42
sail0r joined
03:50
spinclad left
03:51
bacek_ joined
03:52
bacek_ left
03:54
Myoma left
04:20
Limbic_Region left
04:48
BinGOs left,
BinGOs joined
04:54
BinGOs_ joined
05:05
BinGOs_ left
05:07
BinGOs left
05:16
yahooooo left,
xuser joined
05:27
Psyche^ joined
05:36
sail0r left
05:39
alanhaggai_ joined
05:40
Patterner left,
Psyche^ is now known as Patterner
05:41
alanhaggai left,
alanhaggai_ is now known as alanhaggai
06:13
REPLeffect left
06:41
Ehtyar left
07:00
Jedai left
07:03
Myoma joined
07:37
abra joined
07:46
iblechbot joined
07:50
BinGOs joined
07:55
zamolxes joined
08:02
barney joined
08:37
kowey joined
08:42
pmurias joined
08:44
Myoma left
08:56
abra left
09:05
masak joined
09:30
rff joined
09:31
iblechbot_ joined
09:36
barney left
09:41
elmex joined
09:45
iblechbot left
09:51
cmdl1n3 joined
10:06
rff left
10:07
rff joined
10:17
jferrero joined
10:20
pmurias left
|
|||
masak | perl6: sub f($l) { $l <= 0 ?? '' !! map { $l ~ f($l-1) }, 1..3 }; f(2) | 10:35 | |
p6eval | pugs: RESULT[("21 1 1", "21 1 1", "21 1 1")] | ||
..rakudo 30669: OUTPUT[maximum recursion depth exceededcurrent instr.: 'f' pc 179 (EVAL_17:69)] | |||
..elf 22078: OUTPUT[Unknown rule: infix:conditionalIt needs to be added to ast_handlers. at ./elf_f line 1918] | |||
masak | perl6: sub f($l) { $l ?? 0 !! join ''. map { $l ~ f($l-1) }, 1..3 }; f(2) | 10:42 | |
p6eval | rakudo 30669: OUTPUT[Statement not terminated properly at line 1, near ". map { $l"current instr.: 'parrot;PGE::Util;die' pc 119 (runtime/parrot/library/PGE/Util.pir:82)] | ||
..pugs: OUTPUT[***  Unexpected " map" expecting ".", "\187", ">>", "=", "^", operator name, qualified identifier, variable name, "...", "--", "++", "i", array subscript, hash subscript or code subscript at /tmp/hKwRQDZvZR line 1, column 32] | |||
..elf 22078: OUTPUT[Parse error in: /tmp/T7jpRrFX0Bpanic at line 1 column 12 (pos 12): Missing right braceWHERE: sub f($l) { $l ?? 0 !! join ''. map { $l ~WHERE: /\<-- HERE STD_red/prelude.rb:99:in `panic' STD_red/std.rb:255:in `_block_rest' STD_red/std.rb:242:in `block in | |||
..block'... | |||
masak | perl6: sub f($l) { $l ?? 0 !! join '', map { $l ~ f($l-1) }, 1..3 }; f(2) | 10:43 | |
p6eval | elf 22078: OUTPUT[Unknown rule: infix:conditionalIt needs to be added to ast_handlers. at ./elf_f line 1918] | ||
..pugs, rakudo 30669: RESULT[0] | |||
10:50
eternaleye left
10:51
rff left
10:56
sri_work joined
10:57
sri_work left,
sri_work joined
11:04
xinming joined
11:10
alanhaggai left
11:13
xinming__ joined
11:17
tessier__ joined,
xinming_ left
11:18
tessier_ left
11:25
xinming left
12:27
ruoso joined,
alc joined
12:31
abra joined
12:32
iblechbot_ left
12:37
Lichtkind joined
12:45
kcwu left
12:47
drbean joined
|
|||
ruoso | Hello! | 13:08 | |
13:13
xinming__ left
13:16
xinming joined
13:17
kcwu joined
|
|||
masak | ruoso: greetings. | 13:23 | |
13:23
hareldvd joined
13:37
alanhaggai joined
13:38
rindolf joined
13:45
pmurias joined
|
|||
pmurias | ruoso: Hi! | 13:45 | |
ruoso | hi masak, pmurias... | 13:46 | |
masak | slow Perl 6 day today. | ||
on #parrot too :/ | 13:47 | ||
ruoso getting some documentation up-to-date in a $work related projet | 13:48 | ||
masak hacking away on the new HTML::Template, but mostly blocking on a Parrot bug | |||
ruoso | pmurias, so.. what do you think about the capture expand thing? | 13:50 | |
pmurias | getting round to reading it& | 13:51 | |
ruoso: i'm not sure if's better to do a proxy object instead of just merging captures | 13:52 | ||
ruoso too ;) | 13:53 | ||
that's why I'm asking for other opinions... ;) | |||
pmurias | most of the time captures will be IMHO small | 13:54 | |
so it might be faster to just merge them | |||
ruoso | pmurias, would you like to write the p6 code that would do the merging? | 13:56 | |
pmurias | plus native captures are expected in a lot of places | 13:59 | |
ruoso: what is simpler for you to implement? | |||
ruoso: have to some other $stuff first, i was away on a windsurfing camp this week | 14:00 | ||
pmurias tends to have less free time on weekends | |||
ruoso | pmurias, I think keeping native captures is nice, although we have to deal with that some time... | ||
I was thinking on taking the "for" implementation | |||
14:01
hareldvd left
|
|||
pmurias | i think kp6 implemented for in terms of map | 14:01 | |
ruoso | pmurias, "for" is actually simple... I just need to ask for .arity of the signature of the code and use the iterator api | 14:03 | |
14:03
hercynium joined
|
|||
pmurias | ruoso: you mean "map"? | 14:03 | |
ruoso | I understand prefix:<=> takes the next element... but I don't see how prefix:<=> will signalize the end of the iteration.. | ||
pmurias, no... I did mean 'for'... | 14:04 | ||
s/prefix:<=> takes/prefix:<=> returns/ | 14:07 | ||
14:10
Lorn left
|
|||
pmurias | hm, for =$iterator {...} is possible, as prefix:<=> returns a lazy list in list context | 14:10 | |
we can turn for @array {...} into @array.map(-> {...}) | 14:12 | ||
ruoso | hmmm | 14:14 | |
but for @array is also lazy... | |||
I mean... | |||
if @array is lazy, obviously... | |||
masak | does the evaluation of a for result in a value? | 14:15 | |
ruoso | but I was thinking on 'for' in terms of while ($value.has_next) { $code.($value.next) } | ||
masak, I don't think so... | |||
masak | so you have to hide that as well. probably not too difficult, though. | 14:16 | |
pmurias | pugs: my @array = for (1,2,3) {$_}; | ||
p6eval | pugs: OUTPUT[***  Unexpected "@array" expecting "=", context, ":" or "(" postfix op at /tmp/kT0buKHxVU line 1, column 4] | ||
pmurias | masak: for is not an expression | 14:17 | |
masak | right. but map is. | ||
pmurias | yes | ||
masak | so there's a bit of an impedence mismatch. | ||
pmurias | no | ||
masak | ...in the sense that a for build on top of a map has to hide the value returned from the map | 14:18 | |
pmurias | no | ||
masak | ok :) | ||
pmurias | we have void context | ||
masak | ah. ok. | ||
pmurias | ruoso: iterators are just a less powerfull version of lists, so if you have a (lazy) list there is no point in treating it as one | 14:20 | |
ruoso | as a list you mean... you can treat it only as an iterator... | 14:21 | |
and that's my plan... | |||
I mean... | 14:22 | ||
in the end I have two options... | |||
"for" might start with .[0] and end in the last element... | 14:23 | ||
and the other is having an iterator-like api | |||
which is .has_next and .next | |||
the reason I'm trying to push towards an iterator-like API | |||
is to allow navigating in iterators that are not representing index-oriented lists... or unordered lists... | 14:24 | ||
or streams... | |||
for instance... | |||
BerkeleyDB loses a lot of its efficiency if you have to support index-based access | |||
it's much more efficient when you have a cursor-based access... | 14:25 | ||
that's what I mean... | |||
14:26
rindolf left
|
|||
pmurias | if we implemnt for as .map we still get the efficiency, and it's the simplest way | 14:27 | |
as we have to implement .map anyway | 14:29 | ||
14:29
hercynium left
|
|||
ruoso | right... | 14:29 | |
but anyway... that doesn't answer my question... | 14:30 | ||
.map needs to iterate the list anyway... | |||
ah... | |||
wait... | |||
map is implemented by the list itself... | |||
now I got it... | |||
it's easier... | |||
14:34
abra left
|
|||
ruoso | pmurias++... I've just updated the roadmap... now we need unshift, grep and map in the list | 14:34 | |
and for is just a call to .map | |||
pmurias, but... | 14:35 | ||
map is supposed to be lazy, isn't it? | |||
for is supposed to evaluate each item eagerly, isn't it? | 14:38 | ||
I mean... | |||
it won't expand the list before... | |||
but it will execute immediately the code block for every item.. | 14:39 | ||
while map will only evaluate the block as the returned array is traversed... | |||
so that 'map { } grep { } map { } @foo' work as expected | 14:40 | ||
I even think that Perl 6 should warn about "useless use of map in void context..." | 14:42 | ||
to be clear that map is lazy | 14:43 | ||
14:44
jan_ left
|
|||
pmurias | pugs: my @foo=(1,2,3,4);@foo.map(-> { say $_}); | 14:44 | |
p6eval | pugs: OUTPUT[] | ||
pmurias | pugs: my @foo=(1,2,3,4);@foo.map(->($arg) { say $arg}); | ||
p6eval | pugs: OUTPUT[1234] | ||
pmurias | pugs: my @foo=(1,2,3,4);my @bar = @foo.map(->($arg) { say $arg}); | ||
p6eval | pugs: OUTPUT[1234] | ||
ruoso | pugs: my @foo = (1,2,3,4); @foo.map(->($arg) { say $arg }); 'the last statement is returned...' | 14:46 | |
p6eval | pugs: OUTPUT[1234] | ||
pmurias | pugs: my @foo=(1,2,3,4);my @bar = @foo.map(->($arg) { say $arg});'last' | ||
p6eval | pugs: OUTPUT[1234] | ||
pmurias | pugs might be wrong here | 14:47 | |
ruoso | I think it is... | 14:48 | |
pmurias | TimToady: does map in void context run the block at all? | ||
we can always use "eager @array.map {...}" | 14:49 | ||
ruoso | eager simply iterates the list... | 14:50 | |
causing the lazy list to be evaluated... | 14:51 | ||
which brings us to the same problem... | |||
pmurias | all the code blocks will be executed | ||
ruoso | OTOH... I could argue that "for" could be part of the Array API | ||
Array.for($code) | |||
masak | pmurias++, ruoso++ # doing cool nitty-gritty stuff | 14:52 | |
ruoso | pmurias, the problem is how to iterate some list... | ||
pmurias | using iterators you mean? | 14:53 | |
ruoso | yes... | ||
but... I think including .for in the Array API is a very much interesting option... | 14:54 | ||
14:55
jan_ joined
|
|||
pmurias | ruoso: i don't now how to get the iterator for a list, iterators are barely specced and probably not encouraged in Perl 6 | 14:58 | |
ruoso | pmurias, yeah... but I'm now convinced "for" should be a method of the Array API | ||
;) | |||
and bare "for" is a global sub... | 14:59 | ||
pmurias | a bare for can be just translated to a method call | 15:00 | |
ruoso | yeah... it's probably better, since it has a special syntax | 15:01 | |
15:03
aindilis left
|
|||
pmurias hates multi tasking, as he ends up doing one thing with half the brain power | 15:03 | ||
ruoso out to by drinks for lunch... | 15:04 | ||
15:04
aindilis2 left
15:05
rindolf joined
15:13
pmurias left
15:25
masak left
15:30
aindilis joined
15:43
meppl joined
15:50
rindolf left
15:54
idemal joined
16:00
abra joined
16:17
iblechbot joined
16:22
fronty__ joined
16:23
fronty__ is now known as Front_slash
16:39
rindolf joined
17:13
Myoma joined
17:34
broquaint left
|
|||
Khisanth | pugs: my $foo = [ 1 .. 10 ]; say $foo[ 3 .. 8 ] | 17:35 | |
p6eval | pugs: OUTPUT[456789] | ||
Khisanth | pugs: my $foo = [ 1 .. 10 ]; say $foo[ 3 .. 8 ].join( " " ) | ||
p6eval | pugs: OUTPUT[4 5 6 7 8 9] | ||
Khisanth | pugs: my $foo = [ 1 .. 10 ]; say $foo[ 3 .. $foo.end ].join( " " ) | 17:36 | |
p6eval | pugs: OUTPUT[4 5 6 7 8 9 10] | ||
17:38
preflex left
17:39
broquaint joined
17:53
preflex joined
17:59
Front_slash left
18:02
lambdabot left
18:05
lambdabot joined
|
|||
moritz_ | re | 18:09 | |
18:09
eternaleye joined
18:10
ilbot2 left,
ilbot2 joined
18:22
abra left
|
|||
rakudo_svn | r30671 | moritz++ | [rakudo] Str.subst can take a closure as second argument | 18:30 | |
pugs_svn | r22079 | moritz++ | [t/spec] unfudge subst.t for rakudo | ||
18:33
cmdl1n3 left
18:34
lambdabot left
18:36
lambdabot joined
18:43
alc left
18:54
khisanth_ joined
18:55
khisanth_ left
19:00
[1]Maghnus joined
19:10
kanru left
19:15
alanhaggai left
19:17
Maghnus left,
[1]Maghnus is now known as Maghnus
|
|||
moritz_ | @tell dr_df0 very nice work on the test suite. In future try to separate words in file names with '-', not with '_'; but that's just a minor nit | 19:19 | |
lambdabot | Consider it noted. | ||
19:22
rindolf left
19:25
alester joined
19:27
rindolf joined
19:54
rindolf left
19:59
rindolf joined
20:18
shlomif joined
20:21
rindolf left
20:22
lambdabot left
|
|||
moritz_ | anyway, dr_df0++ # test suite work | 20:23 | |
rakudo_svn | r30672 | moritz++ | [rakudo] add 8 more files to spectest_regression, dr_df0++ and others++ | 20:24 | |
20:24
shlomif is now known as rindolf
20:25
lambdabot joined
20:51
alester left
|
|||
moritz_ | on the train today I a few more posts for my perl-5-to-6 blog | 20:58 | |
and I now I have to restrain myself from publishing them all at once | 20:59 | ||
(but I know that I won't have the time to write enough this week) | |||
;-) | |||
21:10
wknight8111 joined
21:12
ibo2go joined
21:13
kowey is now known as koweyphone
21:18
Chillance joined
22:16
wknight8111 left
22:22
iblechbot left
22:25
ibo2go left
22:40
lambdabot left
22:44
lambdabot joined
22:48
BinGOs left
22:58
koweyphone is now known as kowey
23:04
explorer__ joined
23:07
BinGOs joined
23:09
explorer__ left
23:19
Lichtkind left,
jfredett left
23:21
jferrero left
23:22
rindolf left
23:26
_Chillance_ joined
23:28
_Chillance_ left
23:29
_Chillance_ joined
23:37
kowey left
23:40
lambdabot left
23:42
lambdabot joined
23:43
Chillance left
|
|||
meppl | good night | 23:54 | |
23:56
meppl left
|