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:05 [particle]2 joined 00:07 [particle] left 00:22 [particle]1 left, justatheory joined 00:32 justatheory left 00:48 eternaleye joined
pugs_svn r22501 | putter++ | [elf_h] Fixed is() trait ordering. Tweaks. 01:06
01:08 plash left
pugs_svn r22502 | putter++ | [elfish/on_sbcl] Additional prelude. macro renaming. can(), .<> . CL elf did -e 'say 3'. 01:13
01:14 ryanc left 01:36 justatheory joined 01:46 hercynium joined
wayland76 Question: say I'm writing a function, and I have a variable called $test that is type Pair. How do I access the key and the value? 02:02
$test.value()?
02:02 alester left, BinGOs_ joined 02:03 alester joined
[particle]2 yes 02:03
02:03 [particle]2 is now known as [particle]
wayland76 yay :) 02:03
[particle] $test.kv(), .key(), .value() 02:06
wayland76 That's what I'm after :) I needed some way to represent an XPath-like axis while doing a tree search :) 02:07
02:17 alester left 02:18 BinGOs left
literal what's a subset? 02:21
ah, never mind 02:22
rakudo_svn r31606 | particle++ | [rakudo] implement 'package' package declarator 02:23
02:27 eternaleye left, cotto left, szbalint left, nnunley left, spinclad left, Guest16015 left, literal left, idemal left, obra left, beppu left, sunnavy left, ewilhelm left, Juerd left, gbacon left, eternaleye joined, cotto joined, gbacon joined, Juerd joined, literal joined, sunnavy joined, obra joined, Guest16015 joined, ewilhelm joined, idemal joined, spinclad joined, beppu joined, szbalint joined, nnunley joined 02:29 Limbic_Region left 02:30 alester joined 02:41 sri_work left 02:44 plash_ joined 02:47 justatheory left 03:02 elmex_ joined 03:18 elmex left, elmex_ is now known as elmex 03:27 wknight8111 left, hcchien_ is now known as hcchien 03:31 cls_bsd left 04:09 alester left 04:22 araujo left 04:27 alester joined 04:34 alester left 05:13 Psyche^ joined 05:26 Patterner left, Psyche^ is now known as Patterner 06:53 barney joined 07:05 plash_ left 07:11 barney left 07:17 alanhaggai_ is now known as alanhaggai 07:26 mberends joined 07:29 Alias_ left 07:34 plash_ joined 08:00 iblechbot joined 08:07 BinGOs_ is now known as BinGOs 08:28 pmurias joined 08:30 iblechbot left 08:31 Southen_ joined 08:50 Southen left 08:58 clintongormley joined 09:01 clintongormley left 09:02 iblechbot joined 09:07 [particle]1 joined 09:25 [particle] left 09:40 masak joined
pmurias what's the state of the test functions in the Prelude proposal? 09:50
wayland76 Anyone know which synopsis I need to read if I want to make my *own* iterator? 09:52
masak wayland76: sorry, no. have you tried grep'ing the synopses? 09:53
pmurias ack is better than grep 10:11
wayland76: gather maybe be what you are looking for 10:12
masak pmurias: aye. I just wish I could prevent it from spewing ANSI colour codes, so I could use it from within Emacs
pmurias use --nocolor or RTFM ;) 10:13
masak good idea :)
masak makes the appropriate alias 10:14
10:14 plash_ left
masak pugs: say map {[*] map { $_ * 10 }, [1..$_]}, [1..5] 10:23
p6eval pugs: OUTPUT[50ā¤]
masak that's gotta be wrong 10:24
pmurias pugs: map { $_ * 10 }, [1..$_] 10:37
p6eval pugs: RESULT[(0.0,)]
pmurias pugs: map { $_ * 10 }, [1..1]
p6eval pugs: RESULT[(10.0,)]
masak I don't know if I agree with the first one, but certainly the second 10:38
pmurias pugs: map { $_ * 10 }, [1..5] 10:40
p6eval pugs: RESULT[(50.0,)]
pmurias masak: pugs is correct in the example you give 10:41
masak please explain. 10:42
pmurias an array in numeric context turns into the number of elements 10:45
map {[*] map { $_ * 10 }, [1..$_]}, [1..5] turn into 10:46
[*] map { $_ * 10} [1..5]
which turns into [*]([1..5] * 10) which turns into [*] 50 which turns into 50 10:47
masak what forces numeric context?
pmurias [1..$foo] and $foo * 10
masak is there a version of my expression that does what I mean? 10:52
wayland76 >which ack 11:20
-bash: type: ack: not found
Yeah, I've been looking at gather/take 11:21
But I want to iteratively walk through a tree...
So I need the gather in one function, and the take in another
Can I do that?
masak wayland76: search.cpan.org/~petdance/ack-1.86/ack 11:22
wayland76: yes, you can
lambdabot Title: ack - grep-like text finder - search.cpan.org
masak wayland76: a gather is dynamic
this works in Rakudo already, since take works using exceptions
wayland76 Ok, great :) 11:23
11:24 ruoso joined
wayland76 Yeah, I see ack (thanks). But I'm planning to upgrade my Fedora as soon as the new one comes out, so I won't install it now :). But I've bookmarked it. 11:26
ruoso wayland76, iterators are under-specced at the moment... 11:33
wayland76 ok 11:34
Are iterators a role I should implement?
Should I be overriding particular functions on that role?
ruoso it probably will be a role, yes... 11:35
the method is prefix:<=>
which 'fail' at the end of the iterator 11:36
if you're implementing a plain iterator that always return one item at a time, no matter in which context, that's fairly simple...
there are other iterators that support slice context, like the iterator returned by map
they are a bit more complex 11:37
wayland76 Ok, that gives me some idea of what to do. 11:40
Now I just wish for power loops :)
ruoso you might want to look at the smop map wiki
wiki page, I mena
*mean 11:41
wayland76 IKWYM
ruoso wayland76, "power loops"?
wayland76 (I know what you mean :) )
Yeah, it's a sort of iteration/recursion thing. I'll find a page. I read about it somewhere esoteric :)
www.nondot.org/sabre/Mirrored/AdvPr...nkel02.pdf 11:46
Near the end
I have the book of that PDF, btw :)
lambdabot Title: cache:www.nondot.org/sabre/Mirrored/AdvPr...nkel02.pdf - Goog ..., tinyurl.com/y39uw5
pmurias wayland76: any way gather/take is the thing you should propably use, you should mind about Iterator role if you want to something internalish 11:47
wayland76 pmurias: Agreed. Maybe I'll just code the thing now; it should be easy enough to include the iterator role later if I want :) 11:49
pmurias ruoso: hi
ruoso hi pmurias 11:50
wayland76 (oh... hi everyone :) ) 11:54
Which part in particular of the SMOP page, now that I've found it?
ruoso pmurias, I've been thinking at which point we should stop extending libsmop and start to think about effective runtime...
www.perlfoundation.org/perl6/index....p_operator
pmurias effective runtime being? 11:55
ruoso pmurias, ok, that didn't sound right...
pmurias, smop is a library so far... we need an actual interpreter
one that defines $*IN and $*OUT, for instance 11:56
that knows how to look for libraries, that kind of stuff
pmurias so what we need is some sort of executable which can read in m0ld and perl6 and run it? 11:58
ruoso yeah... exactly... 11:59
it might even be written in Perl 6
;)
and compiled down by mildew
wayland76 ruoso: Wow, thanks :) 12:00
ruoso wayland76, you might want to look at the map and grep tests in the smop repo 12:01
wayland76, smop is the first to support lazyness in map and grep
wayland76 Cool. I think I just want to use the Iterator role for now
I'm attempting operator overloading, so it's not like my code compiles now (at least in rakudo, which is what I'm using at the moment) 12:02
ruoso wayland76, but remember that is not part of the specs (at least not yet)
wayland76, and it's certainly not rakudo-oriented... 12:03
12:03 zamolxes left
wayland76 Sure, I agree. But the logic of the situation presumably demands a similar solution 12:03
so if I write my code, I'll probably only have to change the function names and things :)
ruoso brb & 12:04
pmurias ruoso: is it decided yet how binding works? 12:07
pugs_svn r22503 | pmurias++ | [smop] added a test for the pure prototype HOW in p6 to be compiled by mildew 12:12
r22503 | pmurias++ | (dosn't run or compile yet)
r22504 | pmurias++ | [STD] added $foo.^!bar() 12:18
12:20 meppl joined 12:37 abra joined 12:48 smtms left 12:49 wknight8111 joined 13:02 lumi joined 13:06 sri_work joined 13:13 alester joined 13:26 alester left 13:27 hercynium left, agentzh left 13:28 agentzh joined 13:29 kanru left 13:30 kanru joined
wayland76 Is there an easy way to do have it so that when I call a function on an object, it run somthing like { ancestor setup code } {descendant code } {ancestor cleanup code} ? 13:34
If $axes is an iterator, and $usetest is a Matcher function, and I've defined a prefix:<=> on my iterator, can I do this... 13:43
@nodes ==> map { =$axes ==> grep $usetest; };
lambdabot Unknown command, try @list
wayland76 ?
13:47 Bzek joined
masak wayland76: lambdabot does that. it knows lambdabot commands look like '@' at start-of-line, but it doesn't know Perl 6 13:54
13:54 plash_ joined
masak wayland76: your first question sounds like ordinary delegation to base class methods -- no problem, in other words 13:55
I'm very doubtful about your code example, even though I think I know what you're getting at. can't tell if what's within the braces is legal Perl 6 or not
14:06 dalek left 14:07 [particle]1 left, elmex left, nnunley left, szbalint left, spinclad left, cotto left, Guest16015 left, literal left, idemal left, obra left, beppu left, sunnavy left, ewilhelm left, Juerd left, gbacon left, eternaleye left, plash_ left, scrottie left, ting left, jfredett left, allbery_b left, sri_work left, Southen_ left, Ehtyar left, bennymack left, charsbar_ left, cxreg left, xinming left, jiing_ left, avar left, abra left, iblechbot left, hcchien left, PZt left, Khisanth left, pmichaud left, preflex left, mj41_ left, kolibrie left, c1sung left, TimToady left, falesca left, ilbot2 left, sirhc left, xuser left, Caelum left, buubot left, IRSeekBot left, Bzek left, wknight8111 left, yves left, japhb left, rakudo_svn left, Guest70230 left, jiing left, pasteling left, zostay left, clkao_ left, alanhaggai left, aindilis` left, Lorn left, pugs_svn left, Tene left, rhr left, SamB left, diakopter left, cj left, integral left, mberends left, kcwu left, yahooooo left, simcop2387 left, wolverian left, p6eval left, baest_ left, fullermd left, arguile left, buu left, Maddingue left, r0bby left, lambdabot left, tcliou left, cookys left, rafl left, PerlJam left, Grrrr left, REPLeffect left, johto left, jjore left, jrockway left, betterworld left, moritz_ left, LCamel left 14:08 dalek joined 14:09 TimToady joined, plash_ joined, Bzek joined, sri_work joined, wknight8111 joined, abra joined, [particle]1 joined, iblechbot joined, Southen_ joined, mberends joined, elmex joined, nnunley joined, szbalint joined, beppu joined, spinclad joined, idemal joined, ewilhelm joined, Guest16015 joined, obra joined, sunnavy joined, literal joined, Juerd joined, gbacon joined, cotto joined, eternaleye joined, Ehtyar joined, hcchien joined, clkao_ joined, kcwu joined, cj joined, alanhaggai joined, PZt joined, tcliou joined, aindilis` joined, scrottie joined, Khisanth joined, yahooooo joined, simcop2387 joined, Lorn joined, bennymack joined, yves joined, charsbar_ joined, betterworld joined, cxreg joined, jiing_ joined, avar joined, xinming joined, jfredett joined, irc.freenode.net sets mode: +o TimToady, allbery_b joined, ting joined, pmichaud joined, cookys joined, wolverian joined, rafl joined, japhb joined, pugs_svn joined, PerlJam joined, preflex joined, mj41_ joined, p6eval joined, kolibrie joined, ilbot2 joined, IRSeekBot joined, c1sung joined, buubot joined, sirhc joined, Caelum joined, falesca joined, xuser joined, baest_ joined, Tene joined, jiing joined, zostay joined, SamB joined, REPLeffect joined, integral joined, lambdabot joined, pasteling joined, Guest70230 joined, rakudo_svn joined, johto joined, LCamel joined, fullermd joined, moritz_ joined, r0bby joined, rhr joined, jrockway joined, Grrrr joined, buu joined, diakopter joined, Maddingue joined, arguile joined, jjore joined 14:10 AzureStone joined 14:24 AzureStone_ left 14:25 kanru left, kanru joined 14:39 kulp joined 14:55 smtms joined 15:13 masak left, wayland76 left, apeiron left, meteorjay left, bennymac1 left, pjcj left, s1n left 15:14 pjcj joined 15:17 masak joined, wayland76 joined, apeiron joined, meteorjay joined, s1n joined, bennymac1 joined, nothingmuch joined 15:28 jferrero joined 15:29 abra left 15:37 alanhaggai left 15:45 MXIIA joined, MXIIA left 15:54 jhorwitz joined
rakudo_svn r31622 | pmichaud++ | [rakudo]: spectest-progress.csv update: 200 files, 4437 passing tests 15:56
15:58 ruoso left 16:04 alanhaggai joined 16:06 jan_ left
pugs_svn r22505 | pmurias++ | [smop] stylistic fix - removed silly mold temporary variables 16:10
16:10 zamolxes joined 16:27 alanhaggai_ joined 16:28 alanhaggai left, alanhaggai_ is now known as alanhaggai 16:57 araujo joined 16:58 jan_ joined 17:02 Caelum left 17:06 cls_bsd joined 17:32 Bzek left 18:10 plash_ left 18:12 jferrero left 18:57 smtms left 19:28 azawawi joined 19:32 justatheory joined 19:36 justatheory left 19:41 kulp_ joined
rakudo_svn r31625 | julianalbo++ | add a missing pop_eh in perl6 initialization 19:42
19:58 kulp left 20:08 justatheory joined 20:11 justatheory left
azawawi @seen pmichaud 20:15
lambdabot pmichaud is in #perl6. I last heard pmichaud speak 1d 6h 6m 4s ago.
20:16 kulp_ is now known as kulp
azawawi @seen moritz_ 20:33
lambdabot moritz_ is in #perl6. I last heard moritz_ speak 1d 10h 42m 3s ago.
20:34 azawawi left 20:39 kulp left 20:42 smtms joined
pugs_svn r22506 | lwall++ | [STD] unbreak $obj.^foo 21:08
21:11 aindilis` left 21:18 kst```` left, kst```` joined
pmurias TimToady: sorry for the bug, i should think twice before comitting 21:20
TimToady np, I still believe in forgiveness over permission 21:24
pmurias i should run make test before comitting? 21:25
TimToady well, that takes a while, and testt takes even longer, and I do it periodically anyway
and it was pretty obvious where to look for the bug. :) 21:26
so either way is fine
I'd much rather have progress, regardless of whether it's 1 step at a time or 3-steps-forward-2-steps-back at a time. :) 21:28
masak TimToady++ 21:29
21:56 alester joined 21:57 alester left 22:09 alester joined 22:16 alester left, pmurias left, alester joined 22:20 ofer joined 22:45 alester left 22:50 eternaleye_ joined 22:52 ofer left 22:53 araujo_ joined 22:54 eternaleye left, araujo left, araujo_ left, araujo joined 22:56 kst```` left, kst```` joined 22:58 iblechbot left 23:07 Jedai joined 23:09 Jedai left 23:17 jhorwitz left 23:26 alester joined 23:55 Jedai joined 23:59 hercynium joined