Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2008-11-13

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:07 _Thoth_ left #perl6
00:34 Jedai joined #perl6
01:15 wknight8111 joined #perl6
01:27 wayland76 joined #perl6
01:27 wayland76 diakopter: s/leery/wary/
01:34 wknight8111_ joined #perl6
01:50 jauaor left #perl6
02:06 ihrd joined #perl6
02:06 ihrd perl6: 'aaaa' ~~ m/ a | aaa | aa /; $/.say;
02:06 p6eval elf 22996: OUTPUT[␤␤]
02:06 p6eval ..pugs: No output (you need to produce output to STDOUT)
02:06 p6eval ..rakudo 32582: OUTPUT[a␤]
02:08 ihrd I just read Moritz lesson 19 and expect 'aaa'
02:08 justatheory joined #perl6
02:09 PerlJam the longest token version of | isn't implemented yet AFAIK
02:09 PerlJam so, | behaves much like ||
02:09 PerlJam (possibly identically to || :-)
02:15 diakopter wayland76: eh?
02:17 ihrd Perljam: thank you.
02:18 ihrd Perljam: I think no one need bugreport about that?
02:19 TimToady considering it's one of pmichaud's major goals for the grant he just got...
02:20 pmichaud indeed, it is.
02:21 pmichaud in rakudo you need to order your tokens manually if you want ltm semantics.
02:21 pmichaud (that part of my grant isn't due/expected for about 2-3 months, though. I'm hoping to use TimToady's LTM as a starting point.  :-)
02:22 TimToady STD has LTM but I'm rewriting it to be faster (hopefully)
02:23 pmichaud I figure TimToady got tired of waiting for me to start on my LTM version.  Either that or he (probably correctly) surmises that I'll miss a few things in my implementation
02:24 ihrd O, great :)
02:27 TimToady I just figure I should try all the wrong ways first to see if any of them is faster than the right way.  :)
02:28 meppl good night
02:28 pmichaud oh, and here I figured TMTOWTDI.  :-P
02:29 pmichaud I guess there's only one right WTDI, though.  :-)
02:29 pmichaud is TORWTDI one of our recognized acronyms?  Maybe it should be :-)
02:30 pmichaud doesn't sound as melodic as "Tim Toady", though.  :-)
02:30 ihrd and python use it firts
02:30 pmichaud sounds more like something we'd see in a Godzilla flick.
02:31 pmichaud "Godzilla meets Torwati"
02:32 PerlJam python's motto isn't "there's only one right way to do it", but rather it's more like "there's only one obvious way to do it"
02:34 justatheory joined #perl6
02:36 lambdabot joined #perl6
02:38 ihrd PerlJam: you right
02:49 pmichaud I've learned that sometimes "right way" != "obvious way".  :-)
02:50 ihrd obvious -- very strange word at all
02:51 ihrd pimchaud: good luck with that grant and LTM (s now I now what is it) implementation :)
02:52 ihrd oh, sorry, I know now I mean
02:53 ihrd i need English gramma to do something like ./English.pl -s
02:57 bsb joined #perl6
02:59 hercynium joined #perl6
03:00 ihrd left #perl6
03:11 sri_kraih_ joined #perl6
03:51 chrisdolan joined #perl6
03:58 chrisdolan I've got a good lead on perl#60456 (an assignment regression due to ObjectRef) but I'm having trouble figuring out the right patch to fix it
03:58 chrisdolan Anyone have a second to look at language/perl6/src/builtins/assign.pir with me?
03:59 pmichaud chrisdolan: I'm certain the problem is that a PGE::Match object doesn't fit Rakudo semantics (yet?)
04:00 pmichaud so it's acting like a Parrot Hash
04:00 pmichaud and a variety of other issues.
04:01 Patterner1 joined #perl6
04:01 chrisdolan Oh, I see.  So, should I let it go for now, or is there something I can help with?
04:10 pmichaud let me see if I can do a quick fix.
04:12 chrisdolan I've got a workaround, so no need to rush.  I've got time and energy, so I thought I'd dig in.
04:13 pmichaud yes, what's apparenty happening is that PGE::Match is getting Hash's Scalar method
04:13 pmichaud thus whenever it gets assigned to a Scalar it's doing Hash conversion like things first.
04:14 pmichaud otoh, the Scalar method for Hash is probably correct for PGE::Match, too.  Checking.
04:14 [particle] pmichaud: is it a simple example to show chrisdolan how you determined that?
04:14 pmichaud [particle]: I'm guessing.
04:15 [particle] learning that technique would help him investigate further in the future
04:15 pmichaud [particle]: I haven't determined it at all -- I've just been seeing his messages and making educated guesses from that.
04:15 [particle] ah, ok
04:15 pmichaud I will say that using .WHAT as a diagnostic tool is often not safe.
04:15 pmichaud because we have to make many of the non-Perl 6 types "lie" in order for them to act like Perl 6 types
04:15 [particle] yes, i figured getting the methods in vars and using =:=
04:16 pmichaud so, for example, if    $x.WHAT comes back as 'Str', it could be either a Perl 6 Str or a Parrot String
04:16 chrisdolan Mmm, that's good to know.  I had been trusting .WHAT
04:16 [particle] &x.Scalar =:= &y.Scalar for example
04:17 pmichaud I might implement a "REALLY" method for now
04:17 felipe joined #perl6
04:17 pmichaud or "REALWHAT"
04:17 [particle] ORLY?
04:17 chrisdolan :)
04:17 pmichaud 'YARLY'
04:17 [particle] perfect name.
04:18 chrisdolan And (please!) make it stringify to the longname instead of the shortname (please!)
04:18 pmichaud yes, of couse.
04:18 pmichaud *course
04:18 * pmichaud wishes he could come up with a clever interrogative pronoun for this.
04:19 [particle] the current interrogatives are already too clever by half
04:19 [particle] the relationship between WHAT and WHO isn't obvious
04:19 pmichaud ...and 'YARLY' isn't?   ;-)
04:22 chrisdolan .PARROTCLASS would suffice (if boring...)
04:22 pmichaud .PARROTCLASS it is.
04:23 pmichaud building, testing, rah rah rah
04:26 pmichaud now, let's see what we get.
04:26 pmichaud > my %a = 1..4;  say %a.PARROTCLASS;
04:26 pmichaud Perl6Hash
04:26 lambdabot <no location info>: parse error on input `='
04:27 pmichaud > my %a = 1..4;  my $b = %a;  say $b.PARROTCLASS;
04:27 pmichaud ObjectRef -> Perl6Hash
04:27 lambdabot <no location info>: parse error on input `='
04:28 pmichaud > my $m = PGE::Match.new('foo'); say $m.PARROTCLASS;
04:28 pmichaud ObjectRef -> Perl6Hash
04:28 lambdabot <no location info>: parse error on input `='
04:28 chrisdolan What do you get for 'say PGE::Match.new("").PARROTCLASS' ?
04:28 pmichaud PGE;Match, I bet
04:28 pmichaud say PGE::Match.new('').PARROTCLASS;
04:29 pmichaud PGE;Match
04:29 chrisdolan Useful.
04:29 [particle] indeed
04:30 pmichaud and, since PGE;Match isa Hash  ( a Parrot Hash),  it's getting Mapping's Scalar method
04:31 pmichaud and Mapping's Scalar method converts self to a Perl6Hash before returning an ObjectRef
04:31 pmichaud (because assigning a Mapping to a Scalar results in a reference to a (Perl6)Hash
04:32 chrisdolan So, PGE::Match just needs a Scalar() that returns itself, right?
04:32 pmichaud so, we want to prevent that from happening for PGE;Match objects
04:32 pmichaud needs to return an ObjectRef to itself.
04:32 chrisdolan Oh, right
04:32 pmichaud just a sec, I can add that.
04:33 chrisdolan It has to return ObjectRef because PGE::Match is not a perl6 Object?
04:33 pmichaud ummmmm
04:34 pmichaud because we use ObjectRefs for mutable types
04:34 pmichaud because we use ObjectRefs for holding mutable types in Scalar containers.
04:34 chrisdolan Hmm, I'm going to have to think about that.
04:34 pmichaud it's a bit difficult to explain.
04:34 chrisdolan That's what source code is for.  :-)
04:35 pmichaud but basically,   if I have   my $a = [1,2,3];  my $b = $a;    then $b refers to the same object as $a
04:35 chrisdolan yup
04:35 pmichaud that means that $a and $b are ObjectRefs (each pointing to the same underlying Object)
04:36 chrisdolan Got it
04:36 pmichaud that's different for immutable values, such as Int or String
04:37 pmichaud with my $b = $a -- we do the same operation (copy), but in the array case we're copying an ObjectRef while for immutable values we're copying the value
04:37 chrisdolan I've been doing too much Java lately where *everything* except primitives are effectively ObjectRefs
04:38 araujo joined #perl6
04:38 chrisdolan "copying an ObjectRef" -- because ObjectRef is shallowly immutable?
04:45 alc joined #perl6
04:50 pmichaud yes.
04:57 pmichaud alas, I have to run for a bit -- I'll have to fix the PGE;Match Scalar method when I get back.
04:57 pmichaud (approx 1 hour)
05:18 bacek_ joined #perl6
05:23 sail0r joined #perl6
05:28 sail0r left #perl6
05:43 bacek__ joined #perl6
05:53 pmichaud I think I might change .PARROTCLASS to just be .PARROT and have it report slightly more information than the class name (like object location)
05:53 drbean joined #perl6
05:54 chrisdolan sounds good
06:00 bsb left #perl6
06:03 drbean__ joined #perl6
06:05 agentzh left #perl6
06:19 [particle]1 joined #perl6
06:25 justatheory joined #perl6
06:57 ashizawa joined #perl6
07:00 elmex joined #perl6
07:04 agentzh joined #perl6
07:17 ab5tract joined #perl6
07:22 pbuetow joined #perl6
07:51 iblechbot joined #perl6
08:11 DemoFreak joined #perl6
08:26 ejs joined #perl6
08:57 pmichaud pugs:  say any(1,2,2,1,2,3,1).perl;
08:57 p6eval pugs: No output (you need to produce output to STDOUT)
08:57 pmichaud pugs:  say any(1,2,2,1,2,3,1);
08:57 p6eval pugs: No output (you need to produce output to STDOUT)
08:57 pmichaud pugs:  my $a =  any(1,2,2,1,2,3,1);   say $a;
08:57 p6eval pugs: No output (you need to produce output to STDOUT)
08:58 pmichaud pugs:  say 'hello';
08:58 p6eval pugs: No output (you need to produce output to STDOUT)
08:58 pmichaud well, okay then.
08:59 cosimo joined #perl6
09:00 moritz_ pmichaud: pugs is currently broken on the server, I had no time to fix it yet
09:00 pmichaud no problem
09:00 pmichaud I was just curious about collapsing junction values.  Message going to p6l.
09:10 bacek_ joined #perl6
09:16 moritz_ rakudo: say %*VM<config><revision>
09:16 p6eval rakudo 32598: OUTPUT[32598␤]
09:22 cotto joined #perl6
09:32 tomyan joined #perl6
09:46 smg joined #perl6
10:12 masak joined #perl6
10:14 smtms joined #perl6
10:36 schmalbe joined #perl6
10:37 alech joined #perl6
11:08 Lorn joined #perl6
11:27 just_ joined #perl6
11:31 Bzek joined #perl6
11:53 Southen_ joined #perl6
11:54 araujo joined #perl6
11:54 cookys joined #perl6
11:54 Southen joined #perl6
11:54 Maddingue joined #perl6
12:00 alc joined #perl6
12:20 z4p joined #perl6
12:23 z4p left #perl6
12:24 SamB joined #perl6
12:25 masak I don't understand the pattern involved in the 'is export' trait on some methods in S29 and not on others.
12:25 masak for example, Array::delete is export, but Array::exists isn't
12:26 masak neither is grep, first, pick, join, map on Array
12:27 * masak guesses that 'is export' is simply missing from those methods, but would like to know for sure
12:56 diakopter @tell wayland76 no, I was politely suggesting a spello to TimToady
12:56 lambdabot Consider it noted.
13:30 rindolf joined #perl6
13:40 abra joined #perl6
13:43 abra joined #perl6
14:06 maerzhase joined #perl6
14:06 maerzhase left #perl6
14:13 rdice joined #perl6
14:24 jhorwitz joined #perl6
14:29 ejs_ joined #perl6
15:02 Exodist joined #perl6
15:20 pmichaud masak:  some methods can't be exported, because the signature is different when called as a function versus when called as a method
15:20 masak aha.
15:20 pmichaud for example,   @foo.grep(...)   has a different signature than grep(..., @foo)
15:21 pmichaud where as    $num.abs()   and abs($num) can have the same signature (the invocant is the first param)
15:21 [particle]1 might be nice to mention that in S29
15:22 pmichaud we (Rakudo PIR readers) can actually see this by what gets !EXPORTed in the various src/classes/*.pir files
15:22 masak aye.
15:22 masak but what about exist versus delete?
15:22 masak (I mean, apart from the fact they might be deprecated.)
15:22 masak ok, I think I could learn to recognize that.
15:22 masak [particle]1: noted.
15:23 masak pmichaud: ok.
15:23 masak nice.
15:30 hercynium joined #perl6
15:32 alester joined #perl6
15:42 Lorn joined #perl6
15:53 pmichaud I don't know about delete versus exists.
15:59 moritz_ I think both should become an adverb in the end, no?
15:59 pmichaud If chrisdolan's patch for RT #57980 works, I am duly impressed.
15:59 pmichaud yes, delete and exists are now both adverbs
16:00 [particle] pmichaud: did you look at his patch?
16:00 pmichaud [particle]: yes, that's what impresses me.  I'm testing it now.
16:00 pmichaud I don't think that would've ever occurred to me.
16:00 [particle] ah, ok. you'll beat me to it, then
16:06 pmichaud does anyone know (is there a way to find out)  what flags/options parrot is being run with when being run from the harness?
16:08 [particle] i don't know of one
16:08 [particle] other than examining /proc during a long-running test
16:09 masak joined #perl6
16:13 stephenos joined #perl6
16:14 aindilis` joined #perl6
16:21 pmichaud hey, that's a great idea :-)
16:21 pmichaud I even know a long-running test -- rx.t
16:25 alexn_org joined #perl6
16:40 DemoFreak joined #perl6
16:42 pugs_svn joined #perl6
16:42 moritz_ couldn't open pipe to svn process: Cannot allocate memory at /usr/share/perl5/SVN/Log.pm line 204.
16:42 rakudo_svn joined #perl6
16:42 moritz_ that's why rakudo_svn was missing
16:42 rakudo_svn r32618 | pmichaud++ | [rakudo]:  Fix ?? !! associativity (RT #57980, chrisdolan++)
16:42 rakudo_svn r32618 | pmichaud++ | * Patch courtesy Chris Dolan
16:42 rakudo_svn r32619 | pmichaud++ | [rakudo]: spectest-progress.csv update: 219 files, 4590 passing, 0 failing
16:42 moritz_ 0 failing, YaY
16:43 TimToady joined #perl6
16:48 masak yay, indeed!
16:49 justatheory joined #perl6
16:50 moritz_ and $pass > 4k5
16:53 masak pretty impressive.
17:05 ruoso joined #perl6
17:07 abra left #perl6
17:17 apeiron joined #perl6
17:20 TimToady heh, storing trie lexers with Storable instead of YAML makes it run faster, and take 5x disk space o_O
17:22 moritz_ Storable produces *larger* files than YAML? that's weird
17:22 r0bby joined #perl6
17:23 TimToady probably using I32 or I64 where yaml gets away with bytes
17:25 TimToady well, it's not quite a fair comparison, I wasn't storing fate chains in yaml, but reconstructing them from the pats
17:26 pbuetow joined #perl6
17:27 [particle] obviously your algo isn't io limited
17:38 xinming joined #perl6
17:39 apeiron joined #perl6
17:52 abra joined #perl6
17:52 abra left #perl6
18:04 pbuetow joined #perl6
18:11 pugs_svn r22997 | moritz++ | [t/spec] unfudge two passing TODO tests in ternary.t, (chris dolan)++
18:12 meppl joined #perl6
18:24 pbuetow joined #perl6
18:25 lizsac joined #perl6
18:25 rindolf joined #perl6
18:52 adc_Penner joined #perl6
19:06 perlbot joined #perl6
19:09 ab5tract joined #perl6
19:50 rakudo_svn r32625 | pmichaud++ | [rakudo]:  any, all, none Junctions now act like sets (RT #60444, bacek++)
19:50 rakudo_svn r32625 | pmichaud++ | * Patch courtesy Vasily Chekalkin <bacek@bacek.com>
20:10 dalek joined #perl6
20:15 xinming joined #perl6
20:18 pedrob joined #perl6
20:22 rafl joined #perl6
20:33 pugs_svn r22998 | pmichaud++ | [spec]:  Unfudge some junction tests for Rakudo.
20:36 moritz_ pmichaud: can I intrept the recent thread '.perl and other methods on Junctions?' such that we'll get a .values method in Junction as the test suite assumes in quite some places?
20:40 moritz_ rakudo: for 'abc'.split(m/b/) { .WHAT.say }
20:40 p6eval rakudo 32625: OUTPUT[Str␤Str␤]
20:42 ZuLuuuuuu joined #perl6
20:44 ZuLuuuuuu hello is there a reference manual for perl 6 functions?
20:44 moritz_ S29 comes close to that
20:45 moritz_ but it needs a lot of love
20:45 ZuLuuuuuu hmmm thanks
20:47 ZuLuuuuuu oh my god my firefox is crushed I think that page is huge :D
20:50 ZuLuuuuuu is there a way to pull a list of functions and their explanation from perl interpreter? maybe I can write a cgi script to create a reference with search features etc? Sorry I am new to perl world (learning perl 5 currently) because i am interested in perl 6...
20:51 masak joined #perl6
20:51 pugs_svn r22999 | moritz++ | [t/spec] test for [perl #60482]
20:51 moritz_ ZuLuuuuuu: you could use the STD.pm syntax highlighter
20:52 moritz_ in the pugs repo in src/perl6/
20:52 Auzon joined #perl6
20:52 ZuLuuuuuu ok i will look into that thanks
20:52 literal you mean a list of functions in your script or in the language?
20:53 ZuLuuuuuu in the whole language
20:53 ZuLuuuuuu there was a way to it in IO language I think something like that
20:53 literal http://perlcabal.org/syn/S29.html
20:53 lambdabot Title: S29
20:53 moritz_ then forget my suggestion, I didn't understand your question right
20:54 ZuLuuuuuu you mean processing that page to pull function information?
20:54 literal S29 lists Perl 6's builtin functions
20:54 moritz_ the POD might be easier to parse
20:55 moritz_ literal: aye, but it's partly out-of-date and rather incomplete
20:55 ZuLuuuuuu hmmmmm
20:55 masak working on that.
20:55 literal moritz_: huh, if the synopsis is out of date, what's up to date?
20:55 masak literal: the other synopses are fine. S29 isn't.
20:55 literal I see
20:56 ZuLuuuuuu yes, I mean a way to pull the function names and body codes so that I can create an always-up-to-date reference automatically
20:56 masak it's a bit less official, because most of its information is derived from the other synopses.
20:56 moritz_ literal: larry's idea of the language most of the time isn't out-of-date
20:56 ruoso ZuLuuuuuu, Perl 6 has a different notion of built-in functions..
20:56 ruoso it's not something really special
20:56 literal I see
20:56 moritz_ ZuLuuuuuu: since there's no full implementation yet, you won't get a full list either
20:56 ZuLuuuuuu hmmmmm
20:57 ruoso in Perl 6, built-in functions are regular functions that happen to be there without any use
20:57 literal this lists some common ones: http://svn.pugscode.org/pugs/util/perl6.vim
20:57 ruoso er...
20:57 ruoso any "use" statement
20:57 ruoso built-in basically means: "loaded at prelude"
20:58 ZuLuuuuuu then it should be even easier actually to get the list of defined functions, if they are the same with user defined functions
20:58 ZuLuuuuuu maybe?
20:58 * ruoso later &
20:59 cpfr joined #perl6
21:17 ZuLuuuuuu left #perl6
21:39 donaldh joined #perl6
21:40 rakudo_svn r32627 | pmichaud++ | [rakudo]:  Encourage Parrot String PMCs to promote to Rakudo Str.
21:52 justatheory joined #perl6
21:54 hercynium joined #perl6
22:00 rakudo_svn r32628 | pmichaud++ | [rakudo]:  Encourage Parrot String to become Rakudo Str *inplace*.
22:00 pedrob joined #perl6
22:07 pugs_svn r23000 | moritz++ | [t/spec] unfudge passing tests in integration/real-strings.t, pmichaud++
22:09 literal was there ever discussion about some sort of event loop/model for Perl 6?
22:10 TimToady every lazy list is basically an event loop
22:12 wknight8111 joined #perl6
22:23 ruoso joined #perl6
22:24 japhb "Every tool is a weapon, if you hold it right ...."
22:25 pugs_svn r23001 | ruoso++ | [smop] make AdhocSignature mold more coherent with other molds
22:35 |Jedai| joined #perl6
22:37 Limbic_Region joined #perl6
23:05 jnthn joined #perl6
23:12 gbacon joined #perl6
23:19 pugs_svn r23002 | ruoso++ | [mildew] initial support for adhoc signature... we support positional arguments with no traits
23:21 azawawi joined #perl6
23:21 azawawi ping
23:22 justatheory joined #perl6
23:23 azawawi @tell lambdabot ping
23:23 lambdabot Nice try ;)
23:26 azawawi @tell TimToady im getting errors in my STD_syntax_highlighter cron logs (http://feather.perl6.nl/~azawawi/html/S02-b​uiltin_data_types/array_mmd.t.snippet.html)
23:26 lambdabot Consider it noted.
23:31 TimToady looks like a partial lexer is somewhere in lex/
23:31 lambdabot TimToady: You have 1 new message. '/msg lambdabot @messages' to read it.
23:32 * azawawi is waiting for the faulty cron job to finish
23:33 azawawi TimToady: so should i 'make distclean; make'?
23:35 TimToady make clean would probably be sufficient
23:36 TimToady unless something is corrupt in the code
23:36 wayland76 joined #perl6
23:37 * azawawi is trying it right now
23:38 Auzon joined #perl6
23:41 pugs_svn r23003 | azawawi++ | [STD_syntax_highlighter] cron job now properly svn up pugs directory
23:41 pugs_svn r23003 | azawawi++ | [STD_syntax_highlighter] 'make clean all' instead of only 'make'
23:42 wayland76 ping
23:42 lambdabot wayland76: You have 1 new message. '/msg lambdabot @messages' to read it.
23:44 azawawi TimToady: thx; it works like a charm now... TimToady++
23:45 * azawawi sleep &

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

Perl 6 | Reference Documentation | Rakudo