Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2008-10-04

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:04 [particle]2 joined #perl6
00:21 justatheory joined #perl6
00:47 eternaleye joined #perl6
01:05 pugs_svn r22501 | putter++ | [elf_h] Fixed is() trait ordering.  Tweaks.
01:12 pugs_svn r22502 | putter++ | [elfish/on_sbcl] Additional prelude.  macro renaming.  can(), .<> .  CL elf did -e 'say 3'.
01:36 justatheory joined #perl6
01:45 hercynium joined #perl6
02:01 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:01 wayland76 $test.value()?
02:02 BinGOs_ joined #perl6
02:02 alester joined #perl6
02:03 [particle]2 yes
02:03 wayland76 yay :)
02:05 [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:20 literal what's a subset?
02:22 literal ah, never mind
02:22 rakudo_svn r31606 | particle++ | [rakudo] implement 'package' package declarator
02:26 eternaleye joined #perl6
02:26 cotto joined #perl6
02:26 gbacon joined #perl6
02:26 Juerd joined #perl6
02:26 literal joined #perl6
02:26 sunnavy joined #perl6
02:26 obra joined #perl6
02:26 Guest16015 joined #perl6
02:26 ewilhelm joined #perl6
02:26 idemal joined #perl6
02:26 spinclad joined #perl6
02:26 beppu joined #perl6
02:26 szbalint joined #perl6
02:26 nnunley joined #perl6
02:29 alester joined #perl6
02:43 plash_ joined #perl6
03:01 elmex_ joined #perl6
04:27 alester joined #perl6
05:13 Psyche^ joined #perl6
06:52 barney joined #perl6
07:26 mberends joined #perl6
07:33 plash_ joined #perl6
08:00 iblechbot joined #perl6
08:27 pmurias joined #perl6
08:30 Southen_ joined #perl6
08:58 clintongormley joined #perl6
09:01 clintongormley left #perl6
09:01 iblechbot joined #perl6
09:07 [particle]1 joined #perl6
09:40 masak joined #perl6
09:49 pmurias what's the state of the test functions in the Prelude proposal?
09:51 wayland76 Anyone know which synopsis I need to read if I want to make my *own* iterator?
09:53 masak wayland76: sorry, no. have you tried grep'ing the synopses?
10:11 pmurias ack is better than grep
10:11 pmurias wayland76: gather maybe be what you are looking for
10:11 masak pmurias: aye. I just wish I could prevent it from spewing ANSI colour codes, so I could use it from within Emacs
10:12 pmurias use --nocolor or RTFM ;)
10:13 masak good idea :)
10:13 * masak makes the appropriate alias
10:23 masak pugs: say map {[*] map { $_ * 10 }, [1..$_]}, [1..5]
10:23 p6eval pugs: OUTPUT[50␤]
10:23 masak that's gotta be wrong
10:37 pmurias pugs: map { $_ * 10 }, [1..$_]
10:37 p6eval pugs: RESULT[(0.0,)]
10:37 pmurias pugs: map { $_ * 10 }, [1..1]
10:37 p6eval pugs: RESULT[(10.0,)]
10:38 masak I don't know if I agree with the first one, but certainly the second
10:40 pmurias pugs: map { $_ * 10 }, [1..5]
10:40 p6eval pugs: RESULT[(50.0,)]
10:41 pmurias masak: pugs is correct in the example you give
10:41 masak please explain.
10:44 pmurias an array in numeric context turns into the number of elements
10:45 pmurias map {[*] map { $_ * 10 }, [1..$_]}, [1..5] turn into
10:45 pmurias [*] map { $_ * 10} [1..5]
10:46 pmurias which turns into [*]([1..5] * 10) which turns into [*] 50 which turns into 50
10:46 masak what forces numeric context?
10:46 pmurias [1..$foo] and $foo * 10
10:51 masak is there a version of my expression that does what I mean?
11:19 wayland76 >which ack
11:20 wayland76 -bash: type: ack: not found
11:20 wayland76 Yeah, I've been looking at gather/take
11:21 wayland76 But I want to iteratively walk through a tree...
11:21 wayland76 So I need the gather in one function, and the take in another
11:21 wayland76 Can I do that?
11:21 masak wayland76: http://search.cpan.org/~petdance/ack-1.86/ack
11:21 masak wayland76: yes, you can
11:21 lambdabot Title: ack - grep-like text finder - search.cpan.org
11:21 masak wayland76: a gather is dynamic
11:22 masak this works in Rakudo already, since take works using exceptions
11:23 wayland76 Ok, great :)
11:24 ruoso joined #perl6
11:26 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:33 ruoso wayland76, iterators are under-specced at the moment...
11:33 wayland76 ok
11:33 wayland76 Are iterators a role I should implement?
11:34 wayland76 Should I be overriding particular functions on that role?
11:34 ruoso it probably will be a role, yes...
11:35 ruoso the method is prefix:<=>
11:35 ruoso which 'fail' at the end of the iterator
11:35 ruoso if you're implementing a plain iterator that always return one item at a time, no matter in which context, that's fairly simple...
11:36 ruoso there are other iterators that support slice context, like the iterator returned by map
11:36 ruoso they are a bit more complex
11:39 wayland76 Ok, that gives me some idea of what to do.
11:40 wayland76 Now I just wish for power loops :)
11:40 ruoso you might want to look at the smop map wiki
11:40 ruoso wiki page, I mena
11:40 ruoso *mean
11:40 wayland76 IKWYM
11:40 ruoso wayland76, "power loops"?
11:40 wayland76 (I know what you mean :) )
11:41 wayland76 Yeah, it's a sort of iteration/recursion thing.  I'll find a page.  I read about it somewhere esoteric :)
11:46 wayland76 http://www.nondot.org/sabre/Mirror​ed/AdvProgLangDesign/finkel02.pdf
11:46 wayland76 Near the end
11:46 wayland76 I have the book of that PDF, btw :)
11:46 lambdabot Title: cache:http://www.nondot.org/sabre/Mirror​ed/AdvProgLangDesign/finkel02.pdf - Goog ..., http://tinyurl.com/y39uw5
11:46 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:48 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
11:49 ruoso hi pmurias
11:53 wayland76 (oh... hi everyone :) )
11:54 wayland76 Which part in particular of the SMOP page, now that I've found it?
11:54 ruoso pmurias, I've been thinking at which point we should stop extending libsmop and start to think about effective runtime...
11:54 ruoso http://www.perlfoundation.org/pe​rl6/index.cgi?smop_map_operator
11:54 pmurias effective runtime being?
11:54 ruoso pmurias, ok, that didn't sound right...
11:55 ruoso pmurias, smop is a library so far... we need an actual interpreter
11:55 ruoso one that defines $*IN and $*OUT, for instance
11:56 ruoso that knows how to look for libraries, that kind of stuff
11:58 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:58 ruoso it might even be written in Perl 6
11:58 ruoso ;)
11:59 ruoso and compiled down by mildew
11:59 wayland76 ruoso: Wow, thanks :)
12:00 ruoso wayland76, you might want to look at the map and grep tests in the smop repo
12:00 ruoso wayland76, smop is the first to support lazyness in map and grep
12:01 wayland76 Cool.  I think I just want to use the Iterator role for now
12:01 wayland76 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)
12:02 ruoso wayland76, and it's certainly not rakudo-oriented...
12:03 wayland76 Sure, I agree.  But the logic of the situation presumably demands a similar solution
12:03 wayland76 so if I write my code, I'll probably only have to change the function names and things :)
12:04 * ruoso brb &
12:06 pmurias ruoso: is it decided yet how binding works?
12:11 pugs_svn r22503 | pmurias++ | [smop] added a test for the pure prototype HOW in p6 to be compiled by mildew
12:11 pugs_svn r22503 | pmurias++ | (dosn't run or compile yet)
12:17 pugs_svn r22504 | pmurias++ | [STD] added $foo.^!bar()
12:19 meppl joined #perl6
12:36 abra joined #perl6
12:48 wknight8111 joined #perl6
13:01 lumi joined #perl6
13:05 sri_work joined #perl6
13:13 alester joined #perl6
13:27 agentzh joined #perl6
13:29 kanru joined #perl6
13:34 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:42 wayland76 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:42 wayland76 @nodes ==> map { =$axes ==> grep $usetest; };
13:42 lambdabot Unknown command, try @list
13:42 wayland76 ?
13:46 Bzek joined #perl6
13:53 masak wayland76: lambdabot does that. it knows lambdabot commands look like '@' at start-of-line, but it doesn't know Perl 6
13:54 plash_ joined #perl6
13:54 masak wayland76: your first question sounds like ordinary delegation to base class methods -- no problem, in other words
13:55 masak 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:08 AzureStone joined #perl6
14:08 kanru joined #perl6
14:08 agentzh joined #perl6
14:08 lumi joined #perl6
14:08 meppl joined #perl6
14:08 ruoso joined #perl6
14:08 masak joined #perl6
14:08 pmurias joined #perl6
14:08 Patterner joined #perl6
14:08 BinGOs joined #perl6
14:08 jan_ joined #perl6
14:08 drbean joined #perl6
14:08 kst```` joined #perl6
14:08 wayland76 joined #perl6
14:08 apeiron joined #perl6
14:08 cognominal joined #perl6
14:08 viklund joined #perl6
14:08 meteorjay joined #perl6
14:08 felipe joined #perl6
14:08 s1n joined #perl6
14:08 smg joined #perl6
14:08 krunen joined #perl6
14:08 Aisling joined #perl6
14:08 bennymac1 joined #perl6
14:08 pjcj joined #perl6
14:08 TreyHarris joined #perl6
14:08 funktio joined #perl6
14:08 lisppaste3 joined #perl6
14:08 ilogger2 joined #perl6
14:08 orafu joined #perl6
14:08 StephenPollei joined #perl6
14:08 speckbot joined #perl6
14:08 audreyt joined #perl6
14:08 Gothmog_ joined #perl6
14:08 ingy joined #perl6
14:08 perlbot joined #perl6
14:08 nothingmuch joined #perl6
14:08 AzureStone_ joined #perl6
14:08 Helios- joined #perl6
14:08 c9s joined #perl6
14:08 awwaiid joined #perl6
14:08 dalek joined #perl6
14:25 kanru joined #perl6
14:38 kulp joined #perl6
14:55 smtms joined #perl6
15:13 pjcj joined #perl6
15:17 masak joined #perl6
15:17 wayland76 joined #perl6
15:17 apeiron joined #perl6
15:17 meteorjay joined #perl6
15:17 s1n joined #perl6
15:17 bennymac1 joined #perl6
15:17 nothingmuch joined #perl6
15:27 jferrero joined #perl6
15:45 MXIIA joined #perl6
15:45 MXIIA left #perl6
15:54 jhorwitz joined #perl6
15:56 rakudo_svn r31622 | pmichaud++ | [rakudo]:  spectest-progress.csv update: 200 files, 4437 passing tests
16:03 alanhaggai joined #Perl6
16:10 pugs_svn r22505 | pmurias++ | [smop] stylistic fix - removed silly mold temporary variables
16:10 zamolxes joined #perl6
16:26 alanhaggai_ joined #Perl6
16:57 araujo joined #perl6
16:57 jan_ joined #perl6
17:05 cls_bsd joined #perl6
19:27 azawawi joined #perl6
19:32 justatheory joined #perl6
19:40 kulp_ joined #perl6
19:41 rakudo_svn r31625 | julianalbo++ | add a missing pop_eh in perl6 initialization
20:07 justatheory joined #perl6
20:14 azawawi @seen pmichaud
20:14 lambdabot pmichaud is in #perl6. I last heard pmichaud speak 1d 6h 6m 4s ago.
20:32 azawawi @seen moritz_
20:32 lambdabot moritz_ is in #perl6. I last heard moritz_ speak 1d 10h 42m 3s ago.
20:42 smtms joined #perl6
21:08 pugs_svn r22506 | lwall++ | [STD] unbreak $obj.^foo
21:17 kst```` joined #perl6
21:19 pmurias TimToady: sorry for the bug, i should think twice before comitting
21:23 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
21:25 TimToady and it was pretty obvious where to look for the bug. :)
21:25 TimToady so either way is fine
21:28 TimToady 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:55 alester joined #perl6
22:08 alester joined #perl6
22:15 alester joined #perl6
22:19 ofer joined #perl6
22:49 eternaleye_ joined #perl6
22:53 araujo_ joined #perl6
22:54 araujo joined #perl6
22:56 kst```` joined #perl6
23:07 Jedai joined #perl6
23:26 alester joined #perl6
23:54 Jedai joined #perl6
23:59 hercynium joined #perl6

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo