Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2009-03-01

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:10 pugs_svn r25638 | putter++ | [spec] S05-mass/rx.t: Fix typo in comments (missing trailing / in match specs).
00:12 frooh Does anyone here know where I can show someone some kind of formal definition of Prelude?
00:12 frooh all I can find is examples of people talking about it
00:26 pmichaud frooh: I don't know that there's an extensive one that exists yet.
00:28 aindilis` joined #perl6
00:28 mikehh joined #perl6
00:31 frooh pmichaud: ok.  I though that the way larry was talking about it it was typical practice for compilers
00:31 pmichaud I suspect it's atypical in many respects.
00:32 pmichaud I should rephrase
00:32 pmichaud many compilers and languages build their libraries in the language itself
00:32 pmichaud but it's probably not called a "prelude"
00:32 frooh ok
00:32 frooh so that came from GHC then?
00:32 pmichaud I couldn't say.  Sounds likely though.
00:33 frooh It's one of the only things that came up on a google search
00:35 skids pmichaud: Yeah well I don't see much use for it but it would be less confusing if any syntax sugar was not called "reverse".  Maybe a :vk adverb if even that.
00:36 pmichaud skids: I think the original intent may have been to duplicate the meaning of  "reverse %hash"  from Perl 5.
00:36 skids reverse %Hash should just call the List and "reverse" the pairs which is essentially a nothing OP unless it's a tied ordered-hash of some sort.
00:38 skids And the existence of phpesque ordered Hash subclasses would be a good reason to ditch a hash-specific reverse because it would get in the way.
00:40 Ariens_Hyperion left #perl6
00:44 frooh Anyone have any suggestions for something I could do on the setting?
00:45 pmichaud here's the approach I expect to take for my work on the setting:
00:46 knubbli__ joined #perl6
00:46 pmichaud (1) review existing methods defined in the spec
00:46 pmichaud (2) ask myself, "do I think I can implement method in Perl 6"
00:46 pmichaud (3) try adding the method to the setting and see if it works
00:46 knubbli__ check this out http://tinyurl.com/rolfxd lol
00:46 knubbli__ left #perl6
00:46 pmichaud (4) profit
00:47 frooh pmichaud: ok, so we are trying to move things from PIR to the setting if possible?
00:47 pmichaud in general, yes.
00:47 frooh ok, cool
00:47 frooh thanks
00:47 pmichaud there are still some limitations as to what can be moved, though.
00:47 pmichaud we can't move operators yet, for example.
00:47 pmichaud and we can't move methods that need 'is export'
00:47 frooh ok
00:47 pmichaud (this latter one should be fixed soon; possibly tomorrow)
00:48 frooh is export means it can be used as a function and not just a method, right/
00:48 skids Well, if I felt safe moving stuff out of there I moght be able to come up with something to work on, but aren't much of the PIR routines called internally from each other?  Or are they pretty safe to pull?
00:48 pmichaud skids: they should be pretty safe to pull.
00:48 pmichaud the places where PIR routines call each other internally they do so via the normal method or function call interface.
00:48 pmichaud frooh: yes, is export means it acts as a function also.
00:49 skids So they would call a perl6 sub from setting?
00:49 pmichaud skids: yes.
00:49 skids cool! that I didn't know.
00:49 pmichaud even if rakudo doesn't end up using the actual method, simply having a perl6 description of the method is useful (and can get some feedback)
00:51 pmichaud the things that can't easily be moved are calls to functions that begin with an exclamation point.  Those are definitely internal.
00:51 pmichaud anyway, gotta run (dinner) bbl
00:51 skids l8r
00:53 frooh rakudo: if (1 eqv 1) { say "station" }
00:53 p6eval rakudo 1e22a6: OUTPUT«No applicable methods.␤␤current instr.: '_block14' pc 78 (EVAL_17:44)␤»
00:53 frooh pugs: if (1 eqv 1) { say "station" }
00:53 p6eval pugs: OUTPUT«station␤»
00:53 frooh hmm
00:53 frooh that's not good
00:54 skids maybe I'll hold off on that git pull. :-)
00:54 frooh well
00:54 frooh other things are working fine
00:55 frooh I just don't know how that got in there
00:55 frooh there are tests for eqv...
00:55 skids Oh that's not if () breakage, eqv just isn't there.
00:56 frooh yeah
00:56 frooh pugs: if (11) { say "station" }
00:56 p6eval pugs: OUTPUT«station␤»
00:57 frooh rakudo: if (11) { say "station" }
00:57 p6eval rakudo 1e22a6: OUTPUT«station␤»
01:01 Ehtyar joined #perl6
01:25 FurnaceBoy joined #perl6
01:29 pmichaud rakudo:  my @a = (11,0,22);  say @a ~~ .[0];
01:29 p6eval rakudo 1e22a6: OUTPUT«1␤»
01:35 pmichaud rakudo:  my @a = (11,0,22);  say @a ~~ .[0,1];
01:35 p6eval rakudo 1e22a6: OUTPUT«1␤»
01:36 pmichaud (for those following along -- yes, the last one is wrong.  fix coming up.)
01:42 frooh should @foo.delete(-2) become @foo.delete(*-2) ?
01:55 * skids tries to fathom git
01:56 skids OK, so I committed something to my local repository, then I git pulled in updates.
01:56 AzureStone joined #perl6
01:56 skids But damned if I can figure out how to generate a diff given the commit number from my commit.
01:56 skids I can generate patches for all the stuff I just pulled, apparently :-)
01:57 frooh git diff <commit hash> ?
01:58 skids No that's giving me diffs from between when I comitted and now, that is, everything I just pulled.
01:59 frooh ooh
01:59 frooh so you just want your changes against the latest stuff
02:00 skids Well, it doesn't really matter if it is my changes vs the latest stuff, or my changes vs the tree before I committed because there were no merge conflicts.
02:01 frooh git diff <your commit hash> <commit hash you want to diff against>?
02:02 frooh that may need to be reversed, but I think that would do what you want
02:03 meppl good night
02:04 skids hrm you know I think that maybe I should have done a git commit after my 2nd to last pull, because if I diff my hash versus the hash right below in in the log, I still have tons of stuff mixed in there along with my stuff, which is not mine.
02:05 TimToady diakopter: it's not spitting out AST, but raw parsetree.  the problem is it's not generating the AST and putting it under .{''} for item
02:06 AzureStone joined #perl6
02:08 eternaleye skids: Fore reordering commits, I believe the canonical tool is `git rebase`
02:08 eternaleye *for
02:09 literal perl6: my @foo = <#perl6 #parrot>;
02:09 eternaleye but beware: In a patch-generating or pushing repo it's fine, but if people pull from it it can cause them problems
02:09 p6eval elf 25638: OUTPUT«Unknown rule: quote:q_w␤It needs to be added to ast_handlers.␤ at ./elf_h line 2042␤»
02:09 p6eval ..rakudo 1e22a6: RESULT«["#perl6", "#parrot"]»
02:09 p6eval ..pugs: RESULT«\("#perl6", "#parrot")»
02:10 literal yay
02:10 literal it always bugged me that Perl 5 complained when I did qw(#foo #bar)
02:11 brunoV joined #perl6
02:11 kanru joined #perl6
02:21 skids Hrm well "git-rebase master" does not seem to help things.  Just says it's up to date.
02:26 skids Haha.  git-<TAB> (tap fingers) "Display all 135 possibilities?" lol.
02:28 diakopter TimToady: oh... I'm going to assume that's a bug?
02:29 frooh implementing stuff in the setting is hard....let's go shopping!
02:30 TimToady diakopter: yeah, don't know when it bitrotted exactly...
02:30 frooh speaking of bitrot, when did this happen:
02:31 frooh rakudo: 1 eqv 1
02:31 p6eval rakudo 1e22a6: OUTPUT«No applicable methods.␤␤current instr.: '_block14' pc 73 (EVAL_15:42)␤»
02:32 TimToady rakudo: 1.0 eqv 1.0
02:32 p6eval rakudo 1e22a6: OUTPUT«No applicable methods.␤␤current instr.: '_block14' pc 73 (EVAL_15:42)␤»
02:32 TimToady rakudo "foo" eqv "foo"
02:32 TimToady rakudo: "foo" eqv "foo"
02:32 p6eval rakudo 1e22a6: OUTPUT«No applicable methods.␤␤current instr.: '_block14' pc 73 (EVAL_13:42)␤»
02:33 frooh there are tests for that, right?
02:33 TimToady I dont know what rakudo tests or doesn't
02:33 skids grep eqv src/classes/* src/builtins/*  it ain't implemented yet.
02:33 frooh ah, ok, my bad
02:41 skids OK, so I finally wrangled a diff out... if I try I git push, that just goes where people can see it under rakudo's account -- or do I need an account on github or what?
02:42 diakopter oooo ActiveState's graphical debugger works against perl from cygwin... oddly.
02:42 frooh skids: I am pretty sure you need an account
02:42 skids Funnily, I note the latest post on Rakudo.org is entitled "Developer's Guide" and which says nothing helpful other than that rakudo's on github.
02:43 frooh skids: http://wiki.github.com/rakudo/​rakudo/steps-to-create-a-patch
02:43 frooh that may help some
02:44 skids it does.  muchly.  frooh++
02:44 diakopter breakpoint in STD.pm5.  hrm.  boo.
02:52 Tene joined #perl6
02:59 * diakopter gives up debugging generated lasagne code for the time being
03:10 skids is there any way to get github to use password prompts instead of preshared pubkeys?
03:10 frooh skids: no
03:10 skids bummer.
03:10 justatheory joined #perl6
03:10 skids I move machines a lot.
03:10 frooh it's only a hassle at first :-)
03:10 frooh oh
03:10 frooh well
03:10 frooh that will be a hassle
03:10 frooh put a key on a usb key?
03:11 pugs_svn r25639 | lwall++ | [die-and-end] missing 'use Test'
03:11 skids I have enough crap to carry around as is.  Sigh.  Well, if that's the way it works it is what it is.
03:14 pugs_svn r25640 | lwall++ | bogus test
03:17 frooh rakudo: <1 2 3>.items
03:17 p6eval rakudo 1e22a6: OUTPUT«Method 'items' not found for invocant of class 'List'␤current instr.: 'parrot;P6metaclass;dispatch' pc 320 (src/classes/ClassHOW.pir:161)␤»
03:17 frooh rakudo: <1 2 3>.elements
03:17 p6eval rakudo 1e22a6: OUTPUT«Method 'elements' not found for invocant of class 'List'␤current instr.: 'parrot;P6metaclass;dispatch' pc 320 (src/classes/ClassHOW.pir:161)␤»
03:21 TimToady .elems
03:22 frooh rakudo: <1 2 3>.elems
03:22 p6eval rakudo 1e22a6: RESULT«3»
03:22 frooh thanks
03:22 frooh I couldn't find it in S29, but I was searching for array
03:22 Counterspell joined #Perl6
03:23 TimToady pugs: <1 2 3>.WHAT
03:23 p6eval pugs: RESULT«::Array»
03:23 TimToady rakudo: <1 2 3>.WHAT
03:23 p6eval rakudo 1e22a6: RESULT«List»
03:24 frooh yeah
03:24 frooh that would have found it
03:27 nbrown joined #perl6
03:29 nbrown joined #perl6
03:29 frooh what is the equivalent of `commands` in perl6?
03:30 pugs_svn r25641 | putter++ | [elfparse] Snarf t/ ratchet tests.
03:45 skids frooh: it's an adverb on q{}
03:46 skids q:x I think.
03:47 frooh hmm
03:47 frooh it gives errors for q:x{'ls'}
03:47 frooh am I doing it wrong
03:49 TimToady it's like unimplemented
03:49 TimToady *likely
03:49 frooh :-(
03:50 pmichaud rakudo doesn't implement qx yet.
03:50 frooh so much for a real perl6 program
03:50 TimToady you might be able to use run() instead of system()
03:50 frooh but run only gives you return value
03:50 pmichaud parrot doesn't have a way to capture the output of a program run via the os
03:50 frooh I need the output
03:50 TimToady you can get the return value from a file
03:50 frooh ah
03:50 frooh clever
03:50 TimToady unless you need it piped asynchronously
03:51 frooh so like, run('foo > bar'); # open bar etc
03:51 TimToady and maybe even then, under linux
03:51 frooh I don't need it async
03:51 frooh cool
03:51 TimToady yes, assuming your shell can do redirection
03:51 TimToady and assuming rakudo's run() invokes the shell
03:51 frooh what shells cant?
03:52 frooh well
03:52 frooh it works here
03:52 TimToady no modern ones :)
03:52 frooh which is what matters to me
03:53 TimToady if you really needed it async there are ways to do that with a named pipe under unix
03:53 frooh I don't at all
03:56 frooh TimToady: is the reason for "for =$fh -> $line" = looks like lines on a page or something?
03:57 eternaleye frooh: prefix = on a file handle reads and autochomps a line, and the arrow marks the for as a pointy block with one parameter, $line, which comes from the handle (If I remember correctly)
03:57 dalek rakudo: 7bd5a95 | pmichaud++ | src/parser/actions.pm:
03:57 dalek rakudo: Fix .<>, .[], and .{} in smart matching (RT #61136)
03:57 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/7​bd5a95ee123efe4f58a92210b85ee9f4d82a67c
03:58 frooh eternaleye: yeah, I see what it means in the test.  I was just wondering why the = sign
03:58 eternaleye =filehandle is the p6 way to say $line = <filehandle>
03:59 eternaleye er, $line = =filehandle
03:59 Maghnus joined #perl6
03:59 frooh ah
03:59 eternaleye for just puts it in the pointy parameter
03:59 frooh yeah, I see that
03:59 eternaleye I believe prefix = generally means 'iterate'
03:59 skids frooh: have you ever used one of those old calculators?
03:59 eternaleye But I may be wrong
03:59 eternaleye RPN?
04:00 skids Where you say 2 * 2 and then just keep hitting =?
04:00 frooh haha, yeah
04:00 skids That's why -- the filehandle is just a special case of an "iterator" =@array will eventually work too.
04:01 frooh skids: that explains it; thanks
04:01 frooh so = is the iterator sigil?
04:01 frooh or something like that?
04:02 eternaleye It's a unary operator, like !
04:02 frooh ok
04:04 skids If you'd like to appreciate some of the poetry in perl6, whether it was intentional, subconsciously derived, or pure cooincidence, I tried to note themes here (in the mnemonics): http://www.perlfoundation.​org/perl6/index.cgi?witch
04:05 frooh cool
04:06 skids Feel free to create an account and edit as you learn.  It's far from complete.
04:07 frooh haha
04:07 frooh is << called the texas quote because it's bigger than the other quotes?
04:07 skids Yeah.
04:07 frooh that's hilarious
04:08 skids well that and to pair it with "french quote"
04:08 skids And the fact that it's going to be us unicode-averse Americans who use it the most.
04:09 frooh haha
04:09 frooh well, I couldn
04:09 frooh t even find it in the gnome character map
04:13 skids There's probably a compose key combo but I usually just find it somewhere and use the clipboard.
04:13 frooh right
04:14 frooh I was gonna make a tiny file with <<, >>, and any other ones I came across
04:14 dukeleto joined #perl6
04:14 pmichaud on my keyboard I have the "right ALT" mapped to the super, then it's just  R_Alt+<+<
04:14 pmichaud in vim it's Ctrl+K < <
04:14 frooh cool!
04:15 pmichaud in vim,  ":dig" gives a list of the available shortcuts (depending on how much of vim you have loaded :-)
04:15 frooh pmichaud: all of it :-)
04:15 frooh wow
04:16 frooh just wow
04:18 frooh so is <...> not implemented in PGE?
04:18 pmichaud it is not.
04:18 frooh ok
04:18 frooh just making sure I wasn't doing something wrong
04:32 frooh rakudo: my $f = ".frew"; $f[0] = '';
04:32 p6eval rakudo 7bd5a9: OUTPUT«Method 'postcircumfix:[ ]' not found for invocant of class 'Str'␤current instr.: 'postcircumfix:[ ]' pc 3605 (src/classes/Positional.pir:100)␤»
04:32 frooh rakudo: my $f = ".frew"; $f.chars.unshift;
04:32 p6eval rakudo 7bd5a9: OUTPUT«Method 'unshift' not found for invocant of class 'Integer'␤current instr.: 'parrot;P6metaclass;dispatch' pc 320 (src/classes/ClassHOW.pir:161)␤»
04:34 dalek rakudo: af4b730 | pmichaud++ | src/parser/grammar.pg:
04:34 dalek rakudo: Produce a "qx not implemented" message (RT #62024)
04:34 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/a​f4b7309fef6cf2f948742b21e208bb62bdcec34
04:36 dukeleto_ joined #perl6
04:38 skids pmichaud: http://github.com/skids/rakudo/commit/7​af6c0d33aa44124b70d59be2b23fb9f1fb8dde9
04:38 skids how'd I do?
04:38 dukeleto__ joined #perl6
04:39 pmichaud iirc, rand is a 0-argument function.
04:39 pmichaud oh, wait, no.
04:39 pmichaud just a sec.
04:39 pmichaud you don't want to constrain the invocant to be a Num
04:39 pmichaud i.e.,   '45'.rand  should work also.
04:40 frooh rakudo: (1..10).pick
04:40 p6eval rakudo 7bd5a9: RESULT«[7]»
04:41 frooh rakudo: 1
04:41 p6eval rakudo 7bd5a9: RESULT«1»
04:41 frooh why does pick return an array?
04:41 pmichaud because that's the way S29 specced it?  ;-)
04:41 pmichaud skids: I would expect
04:41 frooh haha, ok/
04:42 pmichaud multi method rand() is export { self * q:PIR { %r = ... } }
04:42 skids Maybe... I just did what the synopsis said.
04:42 pmichaud much of S29 was written before we decided that the methods should be in Any
04:42 skids I didn't do the sub because it is listed as a special term:rand ... so I don;t know what's up with that.
04:43 pmichaud just a sec, checking...
04:43 pmichaud okay, you're right.
04:44 skids Efficiencywise, any gain from having the PIR in .rand instead of just called perl6 rand?
04:44 pmichaud rand() is a named 0-array
04:44 pmichaud while .rand is based on the method.
04:44 pmichaud sorry, .rand is based on the invocant
04:44 pmichaud it's undoubtedly faster to use the PIR, but this is a case where I think I'd prefer to use the builtin.
04:45 pmichaud so   multi method rand() { self * rand }
04:46 skids Is there a way to get the named 0-ary into setting, or are those special terms something that has to stay PIR?
04:46 pmichaud I think   sub rand() { ... }    should work.
04:46 pmichaud but it has to be 'is export'
04:46 pmichaud I'll probably do 'is export' tomorrow
04:47 pmichaud (would do it now but I'm getting sleep and would probably screw it up)
04:47 pmichaud *sleepy
04:48 pmichaud in real Perl 6 it might need to be   sub term:rand() { ... }    but Rakudo wouldn't be able to handle the 'term:' part yet.
04:48 skids yeah got to keep the sleep cycle from slipping too far off this weekend myself.
04:53 alester joined #perl6
04:55 awwaiid joined #perl6
04:56 Counterspell left #Perl6
05:00 Kimtaro joined #perl6
05:05 diakopter alester: link broken on http://www.rakudo.org/community
05:05 diakopter The official Parrot wiki
05:05 diakopter should be parrot/wiki not wiki/parrot
05:05 diakopter er
05:05 diakopter trac.parrot.org I mean :)
05:06 alester thanks, fixed
05:07 diakopter does it take a while to uncache or something?
05:08 TimToady frooh: actually, it *was* motivated originally by "lines on a page"
05:08 frooh TimToady: haha, awesome!  I am getting closer to the Mind of Wall
05:08 alester it might, yeah, a minute I think.
05:18 pugs_svn r25642 | lwall++ | [STD] more improvements in symbol lookup, importing Test symbols
05:18 pugs_svn r25642 | lwall++ | start on setting values of compile-time variables
05:29 diakopter does that fix the Parse() ?
05:30 diakopter er parse()
05:32 alester hey diakopter does http://www.rakudo.org/community look ok for you now?
05:33 diakopter oh; yeah the link fix appeared after a minute like you said
05:34 TimToady diakopter: it doesn't fix viv, if that's what you're asking
05:41 masak joined #perl6
05:46 diakopter oh; yeah that's what I was asking.
05:57 alester diakopter: It's PHP, so caching is an important part
06:00 masak if you want to know how far Rakudo has come in half a year, look no further than http://use.perl.org/~masak/journal/37303
06:01 masak see especially how more or less all of the complaints I had at that time have gotten fixed, and how the things I praised have only gotten better.
06:03 frooh rakudo: for 1..10 { say $^a; say $^b; say $^c; say "test"; }
06:03 p6eval rakudo af4b73: OUTPUT«1␤2␤3␤test␤4␤5␤6␤test␤7␤​8␤9␤test␤StopIteration␤current instr.: '_block14' pc 125 (EVAL_20:56)␤»
06:05 pmichaud masak: excellent update, thanks!
06:06 pmichaud btw, you had asked about where to indicate "really important tickets" -- we could start using the 'priority' field of the RT tickets, or there's also a meta ticket (#49171) where high-priority tickets can be hung as dependencies
06:06 masak pmichaud: ok, great. thanks!
06:07 masak right now I have no really high-priority tickets.
06:07 pmichaud (it wouldn't have worked previously, because I had basically forgotten about the ticket, but we can start watching it again :-)
06:07 pmichaud at the least you can bug the devels to say "hey, anyone worked on #49171?"  instead of having to list all of your high priority tickets :)
06:08 masak heh. :)
06:10 masak oh, #62704 is not good. I'll up the priority on that.
06:10 pmichaud what you're getting back there are actually match objects.
06:11 pmichaud at least, they're subclasses of PGE::Match
06:11 masak ok.
06:11 pmichaud PGE currently implements grammar objects as subclasses of PGE::Match.
06:11 masak then I guess I was just unlucky in getting them to work.
06:11 pmichaud well, there's a bit of a role weirdness there
06:12 pmichaud because Match derives from PGE::Match, and Grammar derives from PGE::Match, which means that the things you get back from a match aren't .isa(Match)
06:12 masak ouch.
06:12 pmichaud but I think I can set Grammar to derive from (rakudo) Match and all will be will again.
06:13 pmichaud I'll look at it tomorrow.
06:13 masak I fail to see why it should, but then again I don't know about the internals.
06:13 pmichaud (too tired tonight -- just cleaning a few things up here)
06:14 kanru joined #perl6
06:20 pmichaud okay, time for sleep here -- more hacking tomorrow.   see ya!
06:20 masak pmichaud: o/
06:29 masak is it bad practice for an installer to do a self-update if it notices that a project wasn't found?
07:16 pugs_svn r25643 | lwall++ | [STD] more parse more $? variables
07:16 TimToady more grammar more would be nicer too
07:19 masak TimToady++ # more STD more
07:20 szabgab joined #perl6
07:57 slango joined #perl6
07:57 slango are there books on Perl6 yet?
07:58 slango or is it still too likely to change for any books to be worth the money?
08:07 masak joined #perl6
08:09 masak rakudo: say Hash ~~ Code; say Hash.isa(Code) # which one of these should be True?
08:09 p6eval rakudo af4b73: OUTPUT«0␤0␤»
08:09 masak s/one/one(s)/
08:13 szabgab slango, there are books but they are mostly outdated
08:14 szabgab there are several online tutorials
08:16 szabgab perl6: sub infix:<zzz> ( $a, $b ) { return $a+$b };
08:16 p6eval pugs: RESULT«\sub :($a, $b) "$_" := "Scalar" #<Scalar:0xb71d7c79>␤              "&?ROUTINE" := "Sub" #<Sub:0xb718483d>␤              "&?BLOCK" := "Sub" #<Sub:0xb718483d>␤              "$a" := "Scalar" #<Scalar:0xb71d7c81>␤              "$b" := "Scalar" #<Scalar:0xb7a510a9> {"&infix:zzz" := "S...
08:16 p6eval ..rakudo af4b73: OUTPUT«Malformed routine definition at line 1, near "infix:<zzz"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
08:16 p6eval ..elf 25643: RESULT«undef␤»
08:16 szabgab std: sub infix:<zzz> ( $a, $b ) { return $a+$b };
08:16 p6eval std 25643: OUTPUT«ok 00:03 37m␤»
08:17 szabgab is there any way to define a new operator that already works in Rakudo ?
08:18 TimToady I don't believe so, but I could be wrong.
08:19 masak szabgab: I also don't believe so.
08:19 masak szabgab: the only way I can think of is lying to oneself about what 'operator' means, and defining a sub. ;)
08:21 szabgab I don't need it now, I just wanted to play with it
08:21 masak szabgab: aye. me too.
08:21 TimToady std: sub infix:<zzz> ( $a, $b ) { return $a+$b };  42 zzz 'yowzer'
08:21 p6eval std 25643: OUTPUT«ok 00:03 37m␤»
08:21 masak the need will come once it's there, though.
08:22 szabgab and see if I understand at least the syntax
08:22 TimToady pugs: sub infix:<zzz> ( $a, $b ) { return $a+$b };  42 zzz 'yowzer'
08:22 p6eval pugs: RESULT«42.0»
08:22 masak Pugs++
08:23 szabgab wow, but it blew up when I asked it
08:23 szabgab it seems it listens to TimToady more..
08:23 masak "The man who could talk to small dogs."
08:23 TimToady you only asked for the definition, and pugs gave it to you
08:23 szabgab ah
08:24 masak oh, the English title should be "Pug whisperer", of course.
08:28 masak szabgab: yesterday, mberends proposed the same idea as you did a while back, about proto keeping all .pm files under a common lib/ directory. while I personally think that the idea might lead to chaos, or something very much like chaos, I'm considering making this an option in the config.proto file.
08:29 * masak will be back in a few hours
08:29 barney joined #perl6
08:43 pugs_svn r25644 | lwall++ | [viv] fix viv bug for diakopter++
08:48 pugs_svn r25645 | lwall++ | doc tweaks.  $?OSVER should be $?OS.ver or some such
08:56 szabgab is there a way to fetch all existing subroutines available ?
08:58 TimToady there are a lot of subroutines in the world
08:58 szabgab in the current scope maybe ?
08:58 szabgab exported to the current scope?
09:00 TimToady grep /^'&'/, keys %$?SCOPE or some such
09:01 TimToady zzz & # thunk
09:01 szabgab rakudo: %$?SCOPE.perl
09:02 p6eval rakudo af4b73: OUTPUT«Scope not found for PAST::Var '%$?SCOPE' in ␤current instr.: 'parrot;PCT;HLLCompiler;panic' pc 146 (src/PCT/HLLCompiler.pir:102)␤»
09:02 TimToady rakudo: %MY::
09:02 p6eval rakudo af4b73: OUTPUT«Scope not found for PAST::Var '%MY' in ␤current instr.: 'parrot;PCT;HLLCompiler;panic' pc 146 (src/PCT/HLLCompiler.pir:102)␤»
09:03 TimToady zzz & # really
09:04 szabgab g night
09:09 ejs joined #perl6
09:11 cognominal joined #perl6
09:13 riffraff joined #perl6
09:14 riffraff hi
09:17 diakopter hi
09:19 protorom joined #perl6
09:19 mikehh joined #perl6
09:33 protorom_ joined #perl6
09:36 ejs joined #perl6
09:53 kane_ joined #perl6
10:06 barney joined #perl6
10:12 masak joined #perl6
10:13 DemoFreak joined #perl6
10:14 masak fwiw, I think '$?OS.version' would trump '$?OS.ver' in niceness.
10:23 duke_leto joined #perl6
10:23 duke_leto left #perl6
10:36 szabgab masak, any idea if I can get the list of subs available in the current scope?
10:36 masak szabgab: in Rakudo, today?
10:37 szabgab yes
10:37 masak szabgab: no.
10:37 masak as in "no, I don't have any idea".
10:37 masak but also a little of "no, they cannot be done at present", to the extent that I know such things.
10:41 szabgab oh and is arity defined on multi subs ?
10:42 szabgab rakudo: sub f($z) {}; &f.arity.say
10:42 p6eval rakudo af4b73: OUTPUT«1␤»
10:42 szabgab rakudo: multi sub f($z) {}; &f.arity.say
10:42 p6eval rakudo af4b73: OUTPUT«Null PMC access in find_method()␤current instr.: '_block14' pc 79 (EVAL_16:43)␤»
10:42 * masak submits rakudobug
10:42 masak szabgab++
10:43 szabgab should that return a junctions?
10:43 szabgab and then, can I get the signature from a sub ?
10:44 masak today, in Rakudo? no, I think think so.
10:44 szabgab sub f($z) {}; &f.signature.say
10:44 szabgab rakudo: sub f($z) {}; &f.signature.say
10:44 p6eval rakudo af4b73: OUTPUT«Signature<0xb60bf308>␤»
10:45 szabgab but what can I do with that ?
10:48 masak ooh.
10:48 masak szabgab: I'll read source and tell you. :)
10:49 masak you can do .params
10:49 szabgab rakudo: sub f($z) {}; &f.params
10:49 p6eval rakudo af4b73: OUTPUT«Method 'params' not found for invocant of class 'Perl6Sub'␤current instr.: 'parrot;P6metaclass;dispatch' pc 320 (src/classes/ClassHOW.pir:161)␤»
10:50 masak rakudo: sub f($z) {}; &f.signature.params
10:50 p6eval rakudo af4b73: RESULT«Null PMC access in find_method()␤current instr.: 'infix:=>' pc 10086 (src/classes/Pair.pir:44)␤»
10:50 * masak submits rakudobug
10:50 szabgab rakudo: sub f($z) {}; &f.signature.perl.say
10:50 p6eval rakudo af4b73: OUTPUT«:(Any $z)␤»
10:50 szabgab rakudo: sub f($z) {}; &f.signature.params.perl.say
10:50 p6eval rakudo af4b73: OUTPUT«Null PMC access in find_method()␤current instr.: 'infix:=>' pc 10086 (src/classes/Pair.pir:44)␤»
10:51 masak same NPMCA as the other one.
10:52 szabgab rakudo: sub f($z) {}; &f.signature.perl.say
10:52 p6eval rakudo af4b73: OUTPUT«:(Any $z)␤»
10:53 szabgab rakudo: multi sub f($z) {}; &f.signature.perl.say
10:53 p6eval rakudo af4b73: OUTPUT«Null PMC access in find_method()␤current instr.: '_block14' pc 79 (EVAL_16:43)␤»
10:53 szabgab rakudo: sub f($z, $x) {}; &f.signature.perl.say
10:53 p6eval rakudo af4b73: OUTPUT«:(Any $z, Any $x)␤»
10:53 szabgab rakudo: sub f($z, $x?) {}; &f.signature.perl.say
10:53 p6eval rakudo af4b73: OUTPUT«:(Any $z, Any $x?)␤»
10:53 * masak submits rakudobug
10:56 szabgab it would real awesome for me to have these working, I could improve the Perl 6 plugin of Padre so much with the instrospection
10:57 masak aye.
10:57 masak I might see if I can track down the problem further.
10:57 szabgab thanks
10:58 masak no promises, though. I'm on the phone now and I have much to do today. :)
11:05 szabgab and the Parrot embedding is broken anyway
11:14 protorom_ left #perl6
11:15 masak the Null PMC access occurs during the .dispatch call on the .HOW object of the multi sub.
11:17 masak seems to me that method is defined in src/classes/ClassHOW.pir
11:20 masak something in that method forgets to assume that it might be a multi sub, or it remembers it but contains a logical error.
11:22 dalek rakudo: 65e835d | (Carl Masak)++ | src/classes/ClassHOW.pir:
11:22 dalek rakudo: removed superfluous apostrophe from comment
11:22 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/6​5e835dbea40ab9a38285ce17afeba1464ef4f2d
11:23 * masak is a bit scared by the ambitiousness of this method
11:23 masak jnthn: help!
11:25 * masak gives up for now
11:26 masak hopefully my scattered thoughts in the log might provide a starting point for someone who has deeper Rakudo-fu than I.
11:44 rindolf joined #perl6
11:47 pmurias joined #perl6
12:02 meppl joined #perl6
12:04 Ariens_Hyperion joined #perl6
12:26 pugs_svn r25646 | pmurias++ | [mildew] update to work with the numish/number change in STD
12:36 viklund joined #perl6
12:36 viklund @seen masak
12:36 lambdabot I saw masak leaving #perl6 22m 42s ago, and .
12:37 viklund dang
12:58 araujo joined #perl6
13:59 Whiteknight joined #perl6
14:02 Minazo joined #perl6
14:12 hercynium joined #perl6
14:16 skids You put your left brace in, You take your left brace out,
14:16 skids You put your left brace in and you move it all around
14:16 skids You do the token polka and you give yourself a pound
14:16 skids That's what it's all about
14:16 skids Good morning all :-)
14:22 nihiliad joined #perl6
14:32 ispy_ joined #perl6
14:53 ispy_ joined #perl6
15:01 Ariens_Hyperion joined #perl6
15:04 aindilis joined #perl6
15:17 szabgab joined #perl6
15:27 rindolf joined #perl6
15:29 alexn_org joined #perl6
15:31 ispy_ joined #perl6
15:35 jan_ joined #perl6
15:51 Tene_ joined #perl6
16:02 braceta joined #perl6
16:06 nihiliad joined #perl6
16:26 dwhipp joined #perl6
16:26 dwhipp perl6: my @evens; @evens = ($_ * 2 if .odd for 0..100);
16:26 p6eval elf 25646: OUTPUT«Use of uninitialized value in concatenation (.) or string at ./elf_h line 3849.␤syntax error at (eval 120) line 4, near "(for"␤ at ./elf_h line 4346␤»
16:26 p6eval ..rakudo 65e835: OUTPUT«Method 'odd' not found for invocant of class 'Int'␤current instr.: 'parrot;P6metaclass;dispatch' pc 320 (src/classes/ClassHOW.pir:161)␤»
16:26 p6eval ..pugs: OUTPUT«*** ␤    Unexpected "if"␤    expecting operator or ")"␤    at /tmp/5qRKzGhe6k line 1, column 29␤»
16:27 dwhipp std: my @evens; @evens = ($_ * 2 if .odd for 0..100);
16:27 p6eval std 25646: OUTPUT«ok 00:02 35m␤»
16:28 dwhipp that example comes from S04 ("Looping Statement"). Seems strange to have statement modifiers within the parens!
16:28 justatheory joined #perl6
16:35 Tene joined #perl6
16:36 nihiliad joined #perl6
16:53 dalek rakudo: cd8ea0c | pmichaud++ | perl6.pir:
16:53 dalek rakudo: Deal with TAP::Harness 3.16's request for @INC.
16:53 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/c​d8ea0c6d463aadb7df9af69d2cfbd4639dc15b3
16:54 skids perl6: (1,2,3).perl.say
16:54 p6eval pugs: OUTPUT«(1, 2, 3)␤»
16:54 p6eval ..elf 25646: OUTPUT«Useless use of a constant in void context at (eval 120) line 3.␤3␤»
16:54 p6eval ..rakudo 65e835: OUTPUT«[1, 2, 3]␤»
16:55 skids Hrm, .perl on List should use () right?
16:55 pmichaud It's been discussed many times.  Latest I heard was that it produces [].
16:55 skids What produces ()?
16:56 brunoV joined #perl6
16:57 skids rakudo: ((a:2),1,2,3).perl.say
16:58 p6eval rakudo 65e835: OUTPUT«Statement not terminated properly at line 1, near ":2),1,2,3)"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
16:58 skids rakudo: (a => 2,1,2,3).perl.say
16:58 p6eval rakudo 65e835: OUTPUT«["a" => 2, 1, 2, 3]␤»
16:58 skids rakudo: ((a => 2),1,2,3).perl.say
16:58 p6eval rakudo 65e835: OUTPUT«["a" => 2, 1, 2, 3]␤»
17:00 skids rakudo: \(1,2,3).perl.say
17:00 p6eval rakudo 65e835: OUTPUT«[1, 2, 3]␤»
17:00 skids rakudo: (\(1,2,3),\(3,4,5)).perl.say
17:00 p6eval rakudo 65e835: OUTPUT«[[1, 2, 3], [3, 4, 5]]␤»
17:01 pmichaud There was a thread in January about it:  http://groups.google.com/group/perl.perl6.la​nguage/browse_thread/thread/4624fd37df72c6dd
17:01 braceta left #perl6
17:02 pmichaud and S02 says that it should be brackets
17:03 pmichaud from S02: "The C<.perl> method will return
17:03 pmichaud a representation of the object on the assumption that, if the code is
17:03 pmichaud reparsed at some point, it will be used to regenerate the object as a
17:03 pmichaud scalar in item context."
17:06 skids OK.
17:07 pugs_svn r25647 | pmichaud++ | [t/spec]:  Add some tests for smartmatch .[...] method slice.
17:09 PacoLinux joined #perl6
17:16 skids Well, now all the links in google to old rakudo.org posts are broken.  Will heal over time.
17:18 skids But might be good if somewhere on the front page was a link to the old box (which is hostname now ???) ... maybe under the navigation sidebar?
17:22 douglashunter joined #perl6
17:30 pmichaud I think alester was planning to set up redirects for the old posts.  Perhaps he hasn't had a chance to do that yet.
17:31 pugs_svn r25648 | putter++ | [elfparse] test_blue.pm: The test jig no longer breaks rx which begin with : .
17:33 TimToady dwhipp: that's how we get list comprehensions in Perl 6 without special-casing it like Python
17:36 dwhipp I cansee that, but I'm not sure I understand how they are "statement modifiers" -- they seem to be acting more as low-precedence operators within an expression.
17:37 dwhipp can I nest: ( ($_ for 1..$_) for 1..10) ?
17:39 pmurias joined #perl6
17:39 TimToady if you want control of the formal parameter name you need to not reuse $_
17:39 diakopter TimToady: thanks for fixing viv!  I want to understand the 'schema' of its ast output... what's the "type" of the top level node "CORE"? namespace?  and its child 'Bool::' - is it a module?  I realize it's a tree of namespaces/symboltables, but I just want to make sure I know the proper terms for them
17:40 TimToady can't talk right now, unfortunately
17:40 TimToady my Sunday School class is all looking at me funny, since I'm the teacher :)
17:40 diakopter lol.  Hi Sunday School class!
17:40 TimToady bbl &
17:40 yahooooo joined #perl6
17:40 * diakopter doubts #perl6 was on the screen at his class
17:41 diakopter (not saying he was implying that; I was joking around.)
17:42 diakopter okay, here are my guesses.
17:49 diakopter Each node is a symbol; symbols are arranged in a tree of where they were declared.  Capitalized children of CORE are CORE symbols (which are also type names recognized by STD); if a type has a sibling node with its name and the '::' suffix, it's a package that has members represented as its children.  A 'value' key of a symbol node stores a literal (type inferred whenever) value baked in by STD, CORE, and/or setting...
17:49 diakopter The 'file' and 'line' keys declare the declaration origin
17:49 diakopter of each symbol
17:50 diakopter the lowercase symbols in CORE are the native types...
17:52 diakopter the first successive sibling node (of CORE) holds the AST.  YAML::XS appends a datatype flag holding the Perl object's type and package name.
17:57 diakopter The nodes of the AST wrap (in the usual way) out-to-inward, with parent nodes encompassing child nodes, with the child nodes listed in the order they matched left-to-right in the source
17:58 diakopter Node names represent the names of tokens and rules (et al?) from STD.pm
17:59 diakopter (also methods)
18:02 diakopter Note: eventually the parser needs to record the name of the grammar/language used to generate the (sub)tree(s); also eventually it probably needs to pass along the AST of STD.pm itself, which it probably should cache on disk since it's gigantic...
18:02 Kimtaro_ joined #perl6
18:03 diakopter Okay, I see now that the top node is actually comp_unit, though it's labeled as such only in the yaml datatype tag
18:05 skids rakudo: my $k of Int where {.say}; $k = 78;
18:05 p6eval rakudo cd8ea0: RESULT«78»
18:05 skids rakudo: my $k of Int where {.say}; $k = 78; 3;
18:05 p6eval rakudo cd8ea0: RESULT«3»
18:06 skids I never can tell where where is supposed to work.
18:13 Psyche^ joined #perl6
18:15 pmichaud I'm pretty sure we don't support 'of ...' yet, though.
18:15 pmichaud Maybe jnthn++ added it.
18:16 pmichaud rakudo:  my Int $k where { 3 };   $k = 78;
18:16 p6eval rakudo cd8ea0: RESULT«78»
18:16 skids rakudo: my $k where {.say}; $k = 78; 3;
18:16 p6eval rakudo cd8ea0: RESULT«3»
18:16 skids rakudo: my Int $k where {.say}; $k = 78; 3;
18:16 p6eval rakudo cd8ea0: RESULT«3»
18:16 pmichaud rakudo:  my Int $k where { $_ == 3 };   $k = 78;
18:16 p6eval rakudo cd8ea0: RESULT«78»
18:16 pmichaud looks to me like 'where' is broken there.
18:17 s1n pmichaud: congrats on the rakudo release; i've been sick, but i did see that in my email :)
18:17 pmichaud s1n: thanks!
18:17 skids where is broken almost everywhere :-)
18:19 s1n pmichaud: if i find some time, i can commit an ebuild to the gentoo perl overlay, gotta catch up on thesis first though
18:21 skids pmichaud: I changed the proto on .rand in another commit.  I kept the pir because 0-ary rand blew up inside the method when I tried to use it (attempted to call the method) and if we use a normal sub then 0-ary rand become 0-ary rand that may introduce a list.
18:31 dalek rakudo: 0bbdb57 | pmichaud++ | src/classes/ (2 files):
18:31 dalek rakudo: Refactor Grammar and Match inheritance (RT #62704).
18:31 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/0​bbdb57f4aecfa762694486992afc5236a011665
18:31 c9s joined #perl6
18:31 c9s joined #perl6
18:32 c9s joined #perl6
18:38 alexn_org joined #perl6
18:40 dalek rakudo: 023bb60 | pmichaud++ | t/harness:
18:40 dalek rakudo: Re-enable --verbosity option in t/harness (RT #63566).
18:40 dalek rakudo: Patch courtesy Vasily Chekalkin <bacek@bacek.com> .
18:40 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/0​23bb60c6b62eb577a1990380dcb2ae353f582fb
18:59 c9s joined #perl6
19:00 M_o_C joined #perl6
19:21 hercynium joined #perl6
19:25 Kimtaro joined #perl6
19:29 justatheory joined #perl6
19:31 FurnaceBoy joined #perl6
19:33 frooh rakudo: (1..10).pick
19:33 p6eval rakudo 023bb6: RESULT«[10]»
19:33 frooh rakudo: (1..10).pick
19:34 p6eval rakudo 023bb6: RESULT«[5]»
19:34 frooh rakudo: (1..10).pick[0]
19:34 p6eval rakudo 023bb6: RESULT«8»
19:34 frooh rakudo: my @a = (1..10); @a.pick;
19:34 p6eval rakudo 023bb6: RESULT«[6]»
19:34 frooh rakudo: my @a = (1..10); @a -= @a.pick; @a;
19:34 p6eval rakudo 023bb6: RESULT«[9]»
19:35 frooh rakudo: my @a = (1..10); @a - @a.pick;
19:35 p6eval rakudo 023bb6: RESULT«9»
19:39 simcop2387 joined #perl6
19:45 diakopter TimToady: does STD produce YAML aliases?
19:54 Ariens_Hyperion joined #perl6
20:02 renormalist joined #perl6
20:07 TimToady diakopter: not sure what you're asking.  the data structure is complicated, but STD isn't about YAML per se
20:07 diakopter I'm asking if a node can ever refer to another node
20:08 TimToady you're still not asking a meaningful question; nodes are always referred to by other nodes;  are you asking if it's a DAG?  the answer is "no"
20:09 diakopter yes, sorry :). DAG or not.  got it.
20:10 diakopter well, don't you mean it *is* a DAG?
20:10 diakopter hrm
20:10 * diakopter shuts up
20:15 braceta joined #perl6
20:16 lisppaste3 joined #perl6
20:25 pugs_svn r25649 | renormalist++ | - cperl-mode.el: "Any" type keyword
20:46 rkendall joined #perl6
20:49 rkendall Just calling in to say hi, the rakudo.org website suggests I should say "Hey how can I help"
20:50 tony_ joined #perl6
20:50 diakopter rkendall: hi
20:51 diakopter have you built rakudo from the git source?
20:52 rkendall yes, just did the new vienna release the other day - haven't done much with it yet
20:53 dukeleto joined #perl6
20:54 rkendall I'm a pretty average perl programmer, so don't think I can be much help coding.  But I am interested in learning an playing with Perl 6, and also thought I could help in other ways (I'm a web developer with a lot of Drupal experience)
20:56 pmichaud rkendall: hello!  I'm still waiting to hear back from Andy about getting people write access to the website.
20:59 rkendall pmichaud: thanks. do you need help with other stuff like themeing? (noticed rakudo.org is using standard theme)
20:59 pmichaud I'm sure we'd be happy to have another theme.  Or a logo.
21:00 pmichaud alester and I searched around the drupal theme garden (http://themegarden.org/) to find one that was acceptable to us -- I think that's how we ended up with this one.
21:00 pmichaud looks to me as though Andy fiddled a fair bit with the css on it, though.
21:02 rkendall quite a good choice, better than most of the others.
21:02 pmichaud Yes, I can be a bit picky on graphic designs.  Wish I could design, though.  :-)
21:08 rkendall I'm lucky that my wife is a graphic designer :-)  I actually mentioned to her about the need for a Rakudo logo - but haven't quite talked her into having a go (yet)
21:14 diakopter rkendall: there was this....  http://www.nntp.perl.org/group/per​l.perl6.users/2009/01/msg938.html
21:14 diakopter (and the rest of the thread below)
21:16 diakopter and notes.. http://perlhackerpainter.blogspot.com/
21:17 rkendall diakopter: thanks, I did see that, but it all seems to have gone quiet since.  It's always good to have a few alternative designs to choose from, so figured more wouldn't hurt.
21:20 rkendall just a short stop by, have to go now.  Thanks for taking the time to respond!
21:22 rkendall P.S. thanks for all the hard work and dedication that has gone into Parrot and Rakudo
21:32 Ariens_Hyperion funny, rakudo.org uses drupal which is wrtten in php
21:36 dalek rakudo: 4fcd209 | pmichaud++ | docs/spectest-progress.csv:
21:36 dalek rakudo: spectest-progress.csv update: 315 files, 7084 passing, 0 failing
21:36 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/4​fcd209907e39e918bbc62bc0adeb6820aa5f197
21:45 ispy_ joined #perl6
21:53 renormalist joined #perl6
22:14 ispy_ joined #perl6
22:24 Ariens_Hyperion joined #perl6
22:31 dukeleto joined #perl6
22:32 Limbic_Region joined #perl6
23:21 bacek_ joined #perl6
23:36 wayland76 joined #perl6
23:55 japhb joined #perl6
23:55 hercynium joined #perl6
23:57 nbrown joined #perl6

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

Perl 6 | Reference Documentation | Rakudo