Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2009-03-12

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:02 * araujo can get it right now
00:07 s1n araujo: what do you mean?
00:09 araujo s1n, the domain
00:10 s1n araujo: i can get it right now too though
00:10 arejay left #perl6
00:10 s1n and i will unless someone gives me a good reason not to
00:10 araujo ok, will you?, it is a cool domain
00:10 s1n yes i will, but nfsn says it can't determine availability
00:11 s1n wayland76: know why?
00:12 araujo nfsn?
00:12 s1n nearlyfreespeach.net
00:12 s1n wayland76 recommended the registrar
00:13 wayland76 not offhand, unfortunately.
00:14 * araujo would go for gd
00:14 s1n any other recommended registrars that do the anonymous thing?
00:14 araujo gd
00:14 s1n hmm okay
00:19 frooh back
00:21 s1n frooh: i'm registering on godaddy right now
00:22 frooh awesome
00:23 pmichaud gd has always worked well for me.
00:23 pmichaud s1n:  I won't be able to meet up tomorrow -- wife has a work meeting that came up so I'll be at home with kids :-|
00:23 frooh pmichaud: did you see that I updated that patch by the way?
00:24 pmichaud frooh: just got back to my terminal and read scrollback
00:24 pmichaud haven't looked at anything else yet.
00:24 frooh it was yesterday evening, but yeah, no rush or anything, I'd just like to make it all good and stuff
00:24 pmichaud frooh: oh, the .pop patch?
00:25 frooh yeah
00:25 pmichaud in general, I think that .push and .pop should not be making splices, or using subscripted accesses.
00:25 frooh oh; I thought you said it should be
00:25 pmichaud sorry, s/splices/slices
00:25 frooh my bad
00:25 pmichaud splice would be okay
00:25 pmichaud slice would not be okay
00:25 frooh ok
00:25 Khisanth joined #perl6
00:25 frooh so no [..] but .splce(...) instead
00:26 frooh that will be hard without using .elems
00:26 pmichaud also, jnthn++ and I expect to be completely refactoring List and Array, so I wouldn't put a lot of effort into them anyway
00:26 frooh ok
00:26 frooh then I'll just look at your list
00:26 pmichaud (Array has to be parameterized)
00:26 s1n man, i don't know what i'm doing when it comes to domain registration, you wanna do this frooh?
00:27 pmichaud I can register it.
00:27 pmichaud I do that sort of stuff all the time.
00:27 s1n okay, i'll pay for it, but i don't really know how to register properly
00:27 pmichaud I'll even pay for it.  :-)
00:27 s1n i don't even have hosting space or whatever
00:27 pmichaud I have hosting space.
00:27 s1n well damn heh
00:28 s1n so much for my contribution, pmichaud is just johnny on the spot :)
00:28 pmichaud you guys came up with the name, and found that it was available
00:29 s1n pmichaud: there were some things i wanted to chat about tomorrow, you have time tonight (online)?
00:31 pmichaud okay, we now have p6m.org .  In general it can be pretty difficult to get three-character second-level domains... I'm a bit surprised this one is available. :-)
00:31 wayland76 I was too :)
00:31 wayland76 Considering all the other even 5-letter ones that have been taken
00:31 wayland76 I think it's the 6 that does it
00:32 wayland76 Where did frew want dallas.p6m.org delegated to?
00:32 frooh phone&
00:34 pmichaud github supports building websites using git, fwiw.
00:34 TimToady now for p6l and p6c and...
00:34 s1n TimToady: are those available?
00:34 pmichaud I was very disappointed many years ago when I could get neither pm.com nor pm.org
00:34 s1n what luck for p6 if they are
00:34 pmichaud p6l.org is available
00:34 s1n ha!
00:35 pmichaud p6c.org is taken.
00:35 * s1n urges TimToady to take p6l
00:36 pmichaud s1n/frooh/others.... if I could arrange a dfw.pm meeting for early-mid april, think you could make it?
00:36 s1n absolutely
00:36 pmichaud I'd like to practice/polish my "Hacking Rakudo Perl" talk at least once before NPW.
00:38 s1n i'm up for that, i'm not an official member of dfw.pm though
00:39 pmichaud doesn't matter
00:40 pmichaud if you attend you're basically a member.  afaik there's not a formal membership of any sort.
00:41 pmichaud heh.  dfw.pm.org already indicates there's a meeting on April 28th.  It even says I'm presenting.  Unfortunately, it's April 28, 2008.
00:42 s1n hah
00:42 s1n just change the year lol
00:45 s1n pmichaud: wayland76, frooh, and i have been discussing a lot lately how to properly submit patches, and i think we finally have it down
00:45 pmichaud yes, I've been reading the scrollbacks
00:45 pmichaud if you have something drafted, I'll revise/edit
00:45 s1n does it sound sane?
00:45 s1n well, we're working off frooh's guide for now
00:46 pmichaud so far what I've seen sounds pretty good.  I'm still in favor of using RT for patches; github seems a little behind the curve yet.
00:47 s1n i was thinking of maintaining my fork, one branch per feature, squashing the patch and committing to my fork, then submitting that (full patch) to RT as well as the pull request
00:47 pmichaud that works for me.
00:47 pmichaud squashed patches are easier to review than anything else.
00:47 pmichaud and one branch per feature seems to be the git way.
00:47 pmichaud git likes to be very liberal with branches.
00:50 s1n git seems to favor frequent small patches with frequent patch review
00:51 s1n so we'll have to do the squashing and RT to get bigger patches with easier review process
00:51 pmichaud well, any distributed vcs really is made for frequent small commits.  And that's a useful model in many respects.  It's often just hard to review such patches.
00:51 s1n i'm going to try the workflow again tomorrow
00:52 s1n it's hard to review when there are few reviewers
00:52 pmichaud chrisdolan gave a very good overview of how they handle patches for the linux kernel
00:53 s1n yeah they have a development hierarchy, we have like half a dozen regular commiters
00:53 pmichaud I don't think the problem is few reviewers.
00:54 pmichaud maybe I should rephrase that.
00:54 s1n i made that assumption when you guys were talking about how the fork queue was unmanagable
00:54 pmichaud the thing that makes the fq unmanageable is githubs presentation of the fork queue
00:54 nihiliad joined #perl6
00:55 pmichaud it only shows 50 commits.  And it shows commits that are really unrelated to the thing being requested to pull
00:56 s1n the pull request doesn't show just the commit id with a link?
00:56 pmichaud so, if I fork a repo, start working on a patch, do 40 "git pull"s from the master repository, finish my patch, commit my patch to my fork, and do a pull request, the fork queue shows 41 commits.
00:56 pmichaud 40 of which are commits that came from the master repo
00:57 pmichaud and thus are already in the repo.
00:57 pmichaud actually, I phrased that wrong.  it's not 40 "git pulls" -- if I do a "git pull" that pulls in 40 commits, then they show up in the fork queue
00:57 s1n it's doubling up on the commits even though the master repo already has it. odd...
00:57 pmichaud it gets even worse if this scenario:
00:58 pmichaud I fork a repo, start working on a feature.  I make a small commit.  I git pull from the master, that brings in a few commits.  I work more on the feature, make another small commit.  git pull from the master again, more commits in my forked repo.  I finish my feature, make a final commit, a final git pull, and then push it all up to github.
00:59 pmichaud then the fork queue shows my little commits interspersed with all of the other commits that I pulled in from the master.
00:59 s1n why are pulls from the master showing up as commits on a fork of the master?
00:59 pmichaud I don't know.
00:59 s1n that's double-dipping
01:00 pmichaud probably because everything depends on a parent commit
01:00 s1n sounds wrong to me, mainly because it's a fork. if it weren't a fork, then it might make sense
01:00 s1n hmm, okay, so do you recommend not to do any git pull upstreams?
01:00 pmichaud normally git handles the duplicates just fine when they're merged back to the master repository -- merging is what git is very good at.
01:01 pmichaud but it does make it very difficult to review.
01:01 pmichaud no, I think it's important that developers continue to pull from upstream
01:01 pmichaud because otherwise you're working with outdated code.
01:02 s1n http://wiki.github.com/rakudo/rakudo/frews-recommended-workflow
01:02 s1n that mentions the format-patch way of creating diffs
01:03 s1n then says to push to RT, so then it's in github and a patch goes to RT
01:03 cspencer joined #perl6
01:03 s1n that allows us to still do the pull upstream, but you'll basically want to ignore the fork queue
01:03 pmichaud yes, what's in that guide looks pretty good to me.  Hopefully it's not too much of a pain for others -- but having patches in RT is easy to work with and lets us also point out other issues about each patch in a nicely public place.
01:04 s1n okay, we'll give that a try then
01:04 pmichaud I've also built up an RT query that gives me just a list of the open patches (those that have [PATCH] in the subject)
01:04 pmichaud so, generally I start by pulling up that query and reviewing the patches that I can.
01:04 s1n is it prebuilt (i.e. available to everyone)?
01:04 pmichaud I might be able to make a saved query somewhere.
01:05 s1n i bet others would like to use it
01:05 * pmichaud revises frew's guide to remind people to put '[PATCH]' in the subject line.
01:05 s1n like the "my bugs"
01:06 s1n dinner&
01:07 frooh back
01:07 frooh sorry
01:07 frooh I didn't know that [PATCH] was supposed to be in the email
01:08 pmichaud I highly recommend reading the README file.
01:08 frooh will do
01:08 pmichaud Someday in the future, the Oxford English Dictionary will likely have an entry for "README" that indicates that this was used to refer to files that should never ever under any circumstances be viewed by people looking for information.  :-)  :-)
01:08 frooh also: I am down for any kind of preview talk that you were talking about
01:09 frooh although I never noticed what you did about the dfw.pm website
01:09 frooh I have that april meeting on my calendar
01:09 frooh I didn't notice the year
01:09 pmichaud (hint:  [PATCH] is mentioned in the README file :-)
01:09 pmichaud yeah, the year isn't at all obvious.
01:09 frooh i gathered :-)
01:10 pmichaud I was looking at dfw.pm to find the person to contact for setting up a meeting and happened to see that there was already a meeting scheduled for april.
01:10 pmichaud but when I saw who the speaker was, I knew it had to be from 2008.  :-)
01:10 pmichaud and yes, that's an indication of how after dfw.pm has been.
01:10 pmichaud but I think I may just do a series of presentations about Perl 6 and we'll see who comes.
01:12 pmichaud I have to go help with homework for a bit... bbl
01:18 * skids suggests "capsize" as a new name for &Hash.reverse
01:23 TimToady invert perhaps
01:26 TimToady and maybe Str.reverse should become .flip
01:26 frooh why?
01:27 TimToady to distinguish from .reverse when you see $unknown.reverse
01:27 frooh why can't it just DWIM?
01:27 skids Because if people expect them to behave like the rest of the .reverse methods, there will be much wailing and gnashing of teeth.
01:28 TimToady what should ('string').reverse do?
01:28 TimToady how about ('string',).reverse
01:28 TimToady that's too subtle
01:29 TimToady since they're different operations, they should really get different names
01:29 TimToady much as we distinguish x from xx now
01:29 cspencer how do i access a specific character in a string?
01:30 skids I went with capsize just as a warning that in the case of Hash, stuff may fall out -- eventually we'll have total coding neophytes learning Perl6 as their first language.
01:30 skids cspencer: substr.
01:30 cspencer skids: thanks :)
01:30 TimToady I can imagine versions of invert that turn multiple instances into a sublist
01:31 TimToady but maybe %hash.push(@pairs) should have the effect of turning values into pushlists upon collision
01:32 frooh TimToady: wouldn't that be good for some versions of Hash but not all?
01:32 frooh or whatever the role is called
01:32 TimToady just brainstorming
01:33 frooh well I agree, I think it would be awesome
01:33 skids Though if you can a subclass Associative that is also ordered, .reverse again makes sense, pairwise.
01:33 frooh but you could have that same idea about method overloading in classes (I didn't come up with that idea)
01:33 TimToady certainly we'll need to figure out the default semantics for %has <<== source()
01:33 skids erm s/can/have/
01:33 TimToady *%hash rather
01:34 TimToady yes, overloading where it isn't expected can be a bug
01:34 TimToady which is why we distinguish only from multi
01:34 frooh but would that be cool?  Instead of SUPER.foo we could have SUPER[0].foo
01:35 TimToady and maybe it's in the definition of the hash how it wants to handle collisions
01:35 frooh where [0] is the most recent parent class
01:36 TimToady well, SUPER is a little strange in the world of mmi, so we avoid it
01:36 frooh I know
01:36 frooh I am just brainstorming :-)
01:36 TimToady just do things like callnext and let the dispatcher handle ordering
01:40 frooh shower&
01:44 * skids ponders what %% like unto @@ would be.
01:45 s1n whoa, split //
01:46 cspencer_ joined #perl6
01:46 BinGOs joined #perl6
01:46 araujo joined #perl6
01:46 AzureStone_ joined #perl6
01:46 [particle]1 joined #perl6
01:46 miloux joined #perl6
01:46 charsbar joined #perl6
01:47 pjcj joined #perl6
01:50 nihiliad joined #perl6
01:50 cotto joined #perl6
01:50 PZt joined #perl6
01:50 oskie joined #perl6
01:50 xuser joined #perl6
01:50 cookys joined #perl6
01:50 edenc joined #perl6
01:50 ascent_ joined #perl6
01:50 perlbot joined #perl6
01:53 Util joined #perl6
01:53 oskie_ joined #perl6
01:55 skids Hrm I think %h <== <a b c d e f g>;<A B C D E F G>  producing { 1 => [<a b c d e f g>], 2 => [<A B C D E F G>] } may not be exciting, but perhaps best fits @@ context.
01:56 skids (given what .kv does with arrays)
01:57 lisppaste3 joined #perl6
02:02 eternaleye joined #perl6
02:04 ascent_ joined #perl6
02:17 jimmy_ joined #perl6
02:17 cookys_ joined #perl6
02:17 jimmy_ left #perl6
03:04 pugs_svn r25801 | lwall++ | [Cursor] switch to .rob (with _ as internal attribute)
03:09 FurnaceBoy joined #perl6
03:16 felipe joined #perl6
03:22 alc joined #perl6
03:24 Util joined #perl6
03:30 meppl good night
03:34 Tene joined #perl6
03:44 alester joined #perl6
03:47 estrabd joined #perl6
03:50 Kimtaro joined #perl6
03:59 frooh TimToady: are you here?
04:33 TimToady vaguely
04:39 frooh I was just curious why (perl5) for is a topicalizer and while isn't
04:40 TimToady because it sets $_, and while doesn't
04:40 frooh but I thought while did... while(<STDIN>) { print; }
04:40 frooh right?
04:41 TimToady only because that's a special form that rewrites itself to while (defined($_ = <STDIN>)) { print; }
04:41 frooh alright then; that explains it
04:41 frooh thanks
04:41 TimToady but while (foo()) doesn't rewrite
04:42 frooh do you think while should be a topicalizer?
04:42 TimToady not by defualt
04:42 TimToady *default
04:42 frooh what about for?
04:42 TimToady but it's easy enough to make it one in p6
04:42 TimToady anything that binds to $_ implicitly or explicitly functions as a topicalizer
04:42 TimToady while foo() -> $_ {...}
04:43 TimToady explicit
04:43 TimToady for @foo {...} # implicit
04:43 frooh interesting
04:43 frooh why do you think while shouldn't implicitly?
04:43 TimToady note the while case isn't interesting if foo(0 returns only true or false
04:43 frooh is that why?
04:43 TimToady but much more interesting if it returns an object that knows how to be true or false
04:44 TimToady but is also the object
04:44 TimToady in p5 all objects are true (as a reference), so the while would never terminate
04:44 frooh so while @*IN -> $_ {} would be an example of that
04:44 TimToady but you don't want to do that
04:45 TimToady it'd be =$*IN in any case
04:45 frooh ah, that's right
04:45 TimToady but it would bomb out on a line of "0"
04:45 frooh ah, good point...
04:45 TimToady and the for is lazy, so there's no point
04:45 frooh yeah
04:45 frooh I am just trying to understand so I can explain to other people later
04:46 frooh because I doubt Learning Perl6 will be out anytime soon :-)
04:51 justatheory joined #perl6
05:52 ilogger2_ joined #perl6
05:55 masak joined #perl6
06:02 * masak backlogs
06:09 masak Matt-W: are you implying that you found a Null PMC access, and aren't sharing with the rest of us?
06:09 masak there's too few Null PMC accesses nowadays for that kind of selfish behaviour. :P
06:14 SamB what is Null PMC ?
06:15 masak SamB: you can think of it as the Parrot VM's equivalent to Java's 'null'
06:16 masak the bottom line is, each time it happens, I or someone else gets to file a rakudobug ticket without much explanation of what went wrong, since any Null PMC access is an abstraction leak, and hence inherently wrong.
06:17 pugs_svn r25802 | masak++ | [u4x/TODO] added 'topic' and 'topicalizer'
06:29 alc joined #perl6
07:08 DemoFreak joined #perl6
07:12 wayland76 joined #perl6
07:26 pugs_svn r25803 | moritz++ | [irclog] updated comment in bot.conf
07:26 masak moritz_: bonan matenon.
07:27 moritz_ masak: god dag
07:28 masak it's 08:30 here, so 'god morgon' still. :)
07:28 moritz_ don't be so picky ;-)
07:30 masak I'm not, just needlessly informative. :)
07:30 masak I'm happy with whatever greeting.
07:45 ilogger2 joined #perl6
07:45 mberends joined #perl6
07:52 Maghnus joined #perl6
07:59 sri_kraih joined #perl6
08:00 ejs joined #perl6
08:03 elmex joined #perl6
08:07 wayland76 Anyone here know enough about where Rakudo is up to to be able to update http://github.com/rakudo/rakudo/blob/ea3283983825a3adc46e5e2e04e286f8ebf178eb/docs/ROADMAP ?
08:07 ejs1 joined #perl6
08:07 wayland76 (That's the Rakudo ROADMAP, which claims not to have been updated since August last year)
08:08 wayland76 Or failing that, to give me a description of where we're up to so I can update it myself?
08:11 masak wayland76: I can provide fragments of clues, but best to ask jnthn and pmichaud, I think.
08:11 masak wayland76++ # initiative
08:14 wayland76 Fragments of clues welcome :)
08:14 wayland76 For example, have we done anything in the A section?  M1/M2/M3/M4?
08:14 * masak looks
08:15 masak M1: no, I think.
08:15 masak hence not M2-M4 either.
08:15 masak but I hear pmichaud talk about these things sometimes as if they're not too distant in the future.
08:16 masak we have C, at least in some form.
08:16 mikehh joined #perl6
08:17 masak I'm pretty sure some things have happened in D since August.
08:17 wayland76 ok.
08:18 wayland76 Haven't we done some of the parts of M1-M4 relating to the prelude?
08:18 masak L works to some degree.
08:18 masak wayland76: actually, you might be right.
08:18 masak I withdraw all previous claims to cluefulness on the status of M1-M4.
08:19 masak R was done to some degree. we have .assuming -- Tene++
08:19 masak T is something I sometimes really want.
08:20 masak U would be awesome, needless to say.
08:20 masak end of fragments.
08:20 Matt-W Morning
08:21 wayland76 I'm waiting on Operator Overloading and macros :)
08:22 masak wayland76: indeed. me too, fsvo 'waiting'.
08:23 wayland76 fsvo?
08:23 wayland76 (oh, for some value of) :)
08:25 masak aye. :)
08:25 Matt-W mmm operator overloading
08:26 Matt-W masak: if you pull form, you can see a wonderful failing test in t/02-parseactions.t, although I'm hoping that it fails because I'm Doing It Wrong.
08:26 masak Matt-W++
08:26 * masak pulls
08:27 masak aah, "./proto update form" :)
08:27 Matt-W Also, I still need to do a proper test suite script thingy
08:28 Matt-W for now i tend to just run the .t scripts directly
08:28 masak Matt-W: have a look at some of the other projects.
08:28 masak you'll get yourself a decent Makefile for free that way.
08:28 Matt-W yeah I'll borrow one from somebody
08:30 masak um, the first two tests in t/02-parseactions.t pass, and then Rakudo dies with an error.
08:30 Matt-W boo hiss
08:30 masak technically, that's not a "failing test" :)
08:30 Matt-W pfft
08:30 Matt-W nitpicker
08:30 masak why does people keep calling me that today? :)
08:30 Matt-W which test is it?
08:30 masak well, it stops after the second one.
08:31 masak should I paste the output somewhere?
08:31 wayland76 Maybe they're glad to be rid of their nits, as they want to avoid lice?
08:31 masak wayland76: that must be it. :P
08:31 Matt-W yes because I'm pretty sure on mine it failed the third one instead of blowing up
08:32 wayland76 I'm reminded of the Calvin & Hobbes quote
08:32 masak Matt-W: http://gist.github.com/77965
08:32 wayland76 Calvin: Dad, what's a control freak?
08:32 wayland76 Dad: It's what lazy, slipshod people call someone who cares enough to do it right!
08:33 wayland76 Calvin: Am I in the presence of their king?  Should I bow?
08:33 Matt-W masak: oh no, that is the one it blew up on last night, I remember now
08:33 Matt-W as far as I can tell it's something to do with the make Form::TextField.new call
08:33 wayland76 (Btw, does anyone else think Larry reminds them of Bill Watterson?)
08:33 Matt-W you're right, technically it's not a failing test, it's a rakudobug
08:33 masak Matt-W: I'm pretty sure I just updated.
08:33 masak Matt-W: a rakudobug which you didn't submit? ;)
08:34 masak (if a rakudobug falls in the forest...)
08:34 Matt-W dude I'd been at aikido before that, I wasn't sure my brain was working right
08:34 masak Matt-W: you're forgiven... if you do it now instead. :)
08:34 Matt-W and I couldn't summon up the energy to develop a suitable minimal case
08:34 masak no sweat.
08:35 * Matt-W wonders what the minimum case will actually be
08:36 Matt-W rakudo: grammar G { regex TOP { 'a' {*} } }; class GA { method TOP($m) { make GA.new } }; G.parse('a', :action(GA.new))
08:36 p6eval rakudo ea3283: OUTPUT«Method 'result_object' not found for invocant of class 'Failure'␤current instr.: 'make' pc 19258 (src/builtins/match.pir:39)␤»
08:36 Matt-W that's it!
08:37 masak Matt-W++
08:37 moritz_ Matt-W: write a test, submit a bug report :-)
08:37 Matt-W I always forget, is it rakudobug@perl.org?
08:37 moritz_ it is
08:39 Matt-W cheers
08:39 Matt-W bumbumbum
08:39 Matt-W webmail system's broken
08:39 Matt-W refuses to send :(
08:39 * Matt-W tries alternatives
08:42 Matt-W right
08:42 Matt-W sent
08:48 * Matt-W doesn't like finding rakudo bugs
08:48 wayland76 echo 'I HAZ A BUG!' | mail rakudobug@perl.org
08:49 Matt-W I prefer it when I try things and they work
08:49 Matt-W That makes me happy
08:50 tomyan joined #perl6
08:50 masak Matt-W: I'm happy either way... at least as long as the bugs get fixed within a timeframe corresponding to their severity :)
08:50 masak and presently, they are.
08:50 Matt-W yes
08:50 Matt-W it's a far cry from reporting a bug with no expectation that anybody will care
08:51 masak indeed.
08:51 Matt-W there's a level of passion in this community that's wonderful to see
08:52 masak I agree.
08:52 masak it's because we're crazy about Perl 6, I guess.
08:52 Matt-W Still, if it doesn't get fixed soon I can write some formatting subs and do tests for those
08:53 Matt-W things like "take this string and produce me a line from it that's this wide and right-justified"
08:53 masak Matt-W++
08:54 Matt-W probably shouldn't start doing that while I'm at work though
08:54 Matt-W I doubt the job requirements for my new grade include Perl 6 development
08:54 Matt-W which is a shame
08:55 masak no rush. nice to see you back on Form, though.
08:55 Matt-W it'll go through phases
08:55 Matt-W I get three or four days in a row where I'm busy all evening
08:55 masak I should be able to give my projects some love this evening.
08:55 masak Matt-W: yeah, tell me about it.
08:56 * moritz_ would love to see some u4x docs by masak
08:56 masak moritz_: did you see P2T1A?
08:56 * Matt-W is planning a blog entry on grammars and action methods and things
08:57 masak moritz_: it's a doc about writing the first few docs :)
08:57 Matt-W (after rakudo doesn't crash)
08:57 masak Matt-W: cool.
08:57 masak be sure to link to it here.
08:57 moritz_ masak: well, enough meta-docs, I want docs ;-)
08:58 masak moritz_: I hear ya. will try to prioritize them.
08:58 masak moritz_: kudos for the ones you wrote, by the way.
08:59 Matt-W masak: of course
09:00 masak moritz_: oh, and I think a great way to increase interest about u4x is to get a web frontend going fairly early on. mberends++ has already done the groundwork with Pod.
09:01 Matt-W I'll contribute to u4x where I can
09:01 masak sounds good.
09:02 Matt-W but Form is taking priority
09:02 Matt-W gotta learn the language before I can document it :D
09:02 moritz_ :-)
09:08 jferrero joined #perl6
09:24 masak what's the syntax for adding a method programmatically from within a class declaration?
09:25 masak something with the metaclass?
09:26 moritz_ probably self.^add_method('name', &method) or something
09:26 moritz_ s/_/-/
09:26 masak where 'self' resolves to the class?
09:27 masak what happens if you attempt that from outside the class declaration? and (more importantly), what's the difference from the callee's perspective?
09:28 masak rakudo: class A { self.^add_method("foo", { say "OH HAI" }) }; A.foo
09:28 p6eval rakudo ea3283: OUTPUT«Lexical 'self' not found␤current instr.: 'parrot;A;_block20' pc 112 (EVAL_21:54)␤»
09:28 moritz_ I think self resolves to the object
09:29 masak moritz_: the protoobject?
09:29 Matt-W yes I think it does
09:29 moritz_ masak: no, the normal object
09:29 masak moritz_: but I'm in the class declaration. see code.
09:29 moritz_ ah, that's not runtime
09:29 masak no object yet.
09:29 moritz_ that's where the confusion comes from
09:30 masak don't mind runtime or no, just want to do it programmatically.
09:30 moritz_ rakudo: class A { say $?CLASS };
09:30 p6eval rakudo ea3283: OUTPUT«Scope not found for PAST::Var '$?CLASS' in ␤current instr.: 'parrot;PCT;HLLCompiler;panic' pc 146 (src/PCT/HLLCompiler.pir:102)␤»
09:30 moritz_ meh
09:46 ujwalic joined #perl6
09:54 kane__ joined #perl6
09:59 masak so, I guess my question was: can I declare a method programmatically at class declaration time?
10:00 moritz_ I don't think you can at the moment, at least i've never seen it
10:05 masak it was just something I thought of. don't know if it's useful enough to be in standard Perl 6.
10:05 moritz_ it is
10:06 masak feels like a thing Moose could do easily.
10:06 masak maybe we should take a cue from them. :)
10:06 moritz_ or even standard Perl 5 :-)
10:06 moritz_ *name = sub { .. }
10:12 wayland76 Does $?CLASS get you anywhere?
10:14 jnthn Maybe $?CLASS.^add_method(eval($the_code_that_makes_the_sub))
10:14 jnthn btw morning
10:14 wayland76 morning :)
10:15 wayland76 Have we gotten anywhere on section A of the ROADMAP?
10:15 wayland76 http://github.com/rakudo/rakudo/blob/ea3283983825a3adc46e5e2e04e286f8ebf178eb/docs/ROADMAP
10:17 jnthn wayland76: Somewhere, yes.
10:17 mikehh rakudo (ea32839) builds on parrot r37351 = make test/spectest PASS - linux i386
10:18 wayland76 Are we done with M1, or are there still things to do on that?
10:19 sri_kraih_ joined #perl6
10:23 wayland76 (I know you guys have been busy with many other things)
10:28 Kimtaro_ joined #perl6
10:30 jnthn wayland76: The PGE bits of M1 aren't done yet, or are largely not done.
10:30 bacek joined #perl6
10:33 wayland76 Ok
10:34 wayland76 jnthn++
10:36 orafu joined #perl6
10:44 moritz_ funny thing is, lots of stuff that depended on A got done anyway :-)
10:44 moritz_ like list assignment
10:46 jnthn It probably partly depended on A. ;-)
10:46 jnthn Rather than needing all of A.
10:52 jan_ joined #perl6
11:06 masak morning, jnthn.
11:11 jnthn morning, masak
11:11 jnthn How's things?
11:21 Matt-W hey jnthn. Have you caught up yet?
11:21 sri_kraih joined #perl6
11:24 jnthn Matt-W: On the Perl 6 spec changes? No
11:25 jnthn On sleep, mostly.
11:25 jnthn Still language-lagged though...
11:28 Matt-W aaah sleep
11:28 Matt-W if only we didn't need as much
11:30 wayland76 We dont
11:30 wayland76 cf. polyphasic sleep :)
11:30 wayland76 If done correctly, the average human can operate normally on 4 hours of sleep a day
11:30 wayland76 yes, normally :)
11:31 * jnthn isn't sure he operates normally ever...
11:31 Matt-W that tends to blow up any chance of doing a regular 9-5 office job though doesn't it?
11:32 wayland76 Unless you have one that will let you nap at specified times
11:32 wayland76 Such as a job at Google, for example
11:33 wayland76 You could probably also do it by napping 8:40-9:00, 1pm-1:20pm, and 5pm-5:20pm
11:33 wayland76 But that would require successful car-napping or something
11:33 Matt-W mmm
11:33 Matt-W tricky
11:34 wayland76 Rather :)
11:34 wayland76 Unfortunately, owls like me don't adapt well to polyphasic
11:34 wayland76 But I was only told that after trying it for a few months and failing (crashing out on day 5)
11:34 wayland76 I never got through the adaption period
11:58 lisppaste3 joined #perl6
12:14 xinming_ joined #perl6
12:15 ujwalic how to have a local copy of http://perlcabal.org/syn/
12:15 wayland76 Is that a question?
12:15 ujwalic yes
12:16 wayland76 Just a moment...
12:17 wayland76 Do you just want the specs, or do you want the HTML index too?
12:18 wayland76 You probably want "svn checkout http://svn.pugscode.org/pugs/docs/Perl6/Spec Spec" or something like that
12:18 ujwalic I want html version on those
12:19 ujwalic I have the pugs checkout
12:19 wayland76 Oh, ok
12:19 wayland76 Well, you can get the HTML version of the index, but the other things are auto-generated
12:20 ujwalic ok ..  https://dev.pugscode.org/login/ is not working
12:20 wayland76 So your best bet for those is wget (assuming you're on Unix)
12:20 ujwalic me on windows but no prob.
12:21 ujwalic is development of pugs stoped  https://dev.pugscode.org/login/?
12:22 wayland76 I don't know the answer to that, but certainly the Specs and STD.pm (both of which currently live in the Pugs repo) are under active development
12:22 wayland76 Does anyone else know if someone's still working on Pugs?
12:22 ujwalic thanks
12:25 ujwalic i think i can use modified http://svn.openfoundry.org/pugs/docs/feather/script/update-syn
12:25 ujwalic util/podhtm.pl in pugs repo
12:25 wayland76 ok
12:25 wayland76 Incidentally, if you happen to see how to make the S32 generation work while you're there, let me know
12:26 wayland76 It generated the directory, but no HTML files, unfortunately
12:26 ujwalic let me try
12:32 tomyan joined #perl6
12:33 masak jnthn: things are good. (sorry for the delay, it contained 1 lunch)
12:33 masak jnthn: and you?
12:34 jnthn Good, thanks.
12:34 jnthn Refreshed after my vacation.
12:34 jnthn And my health seems improved.
12:34 wayland76 yay :)
12:34 jnthn Planning Rakudo day tomorrow.
12:35 wayland76 Will look forward to it
12:35 wayland76 Are notices about that still going on Rakudo.org?
12:35 jnthn Yes, expect so.
12:35 wayland76 Good
12:35 jnthn I have a login there.
12:35 wayland76 I'm expecting them to go on the news page instead of the front page
12:36 masak jnthn: looking forward to Rakudo day. those days are usually great fun.
12:37 wayland76 (I'm pretty sure that just involves writing the article, and it appears there automatically)
12:37 masak I have a quiet evenening with Perl 6 planned tonight.
12:37 masak not sure which project I'll dive into yet.
12:37 wayland76 Ah, the anticipation :)
12:37 masak moritz_ wanted me to do u4x, but I want to write code! :)
12:37 wayland76 :)
12:37 wayland76 I'm still trying to get RPMs working
12:38 wayland76 Involves debugging Parrot :(
12:38 masak wayland76: what is it you're trying to do, more exactly?
12:38 wayland76 It's past my bedtime, but I want to try to get a patch in tonight
12:39 wayland76 Well, at the moment, I'm trying to figure out why it doesn't load the libraries I built
12:39 wayland76 Even when I specify the path with -L
12:39 wayland76 /usr/bin/parrot -w -L/home/wayland/Science/Computer/src/perl/perl6/rakudo-dev/git/rakudobuild/usr/lib/rakudo/build14/dynext  -o perl6_s1.pbc perl6.pir
12:40 wayland76 (yes, that path is terrible, I agree :) )
12:40 ujwalic will LD_LIBRARY_PATH help
12:41 wayland76 Good question.  I should experiment with that :)
12:42 wayland76 I doubt it, though
12:43 ujwalic dont use it http://blogs.sun.com/ali/entry/avoiding_ld_library_path_the
12:50 wayland76 Ok, that's easy :)
12:56 pmichaud good morning #perl6
12:56 wayland76 good morning teacher :)
12:57 pmichaud rakudo: grammar G { regex TOP { 'a' {*} } }; class GA { method TOP($m) { make GA.new } }; G.parse('a', :action(GA.new))
12:57 p6eval rakudo ea3283: OUTPUT«Method 'result_object' not found for invocant of class 'Failure'␤current instr.: 'make' pc 19258 (src/builtins/match.pir:39)␤»
12:57 pmichaud rakudo: grammar G { regex TOP { 'a' {*} } }; class GA { method TOP($/) { make GA.new } }; G.parse('a', :action(GA.new))
12:57 p6eval rakudo ea3283: RESULT«Match.new(␤ # WARNING: this is not working perl code␤ # and for debugging purposes only␤ text => "a",␤ from => 0,␤ to   => 1,␤)»
12:57 masak morning, pm
12:58 Woody2143 joined #perl6
13:01 wayland76 'night all &
13:01 jnthn morning pm
13:01 masak wayland76: 'night
13:03 Kimtaro joined #perl6
13:09 Matt-W pmichaud: interesting...
13:13 pmichaud Matt-W: 'make' only works on $/
13:14 Matt-W pmichaud: hence why it couldn't find result_object method
13:14 pmichaud correct, because $/ was undef
13:14 Matt-W so I need to have $/ as the parameter to my action methods
13:14 Matt-W or explicitly assign
13:14 pmichaud yes.
13:14 Matt-W right
13:14 Matt-W thanks
13:15 Matt-W maybe we can get a better error message one day
13:15 Matt-W like which object it was looking on
13:19 pmichaud how do you mean?  example?
13:20 Matt-W well it said it couldn't find result_object
13:20 Matt-W it didn't say it was trying to find $/.result_object
13:20 pmichaud it couldn't find a method called 'result_object'
13:20 pmichaud so, perhaps   "method 'result_object' not found on $/" ?
13:21 Matt-W That would help, yes
13:21 Matt-W It's not so bad when it's a method call you wrote explicitly, but when it blows up inside a builtin it's rather more confusing
13:21 pmichaud that's a bit tough to do at runtime in the general case
13:21 Matt-W I remember writing a compiler at university and worrying about error messages and finding that they're incredibly hard
13:21 pmichaud we might be able to come up with something.  At any rate, patches welcome for the make() subroutine :-)
13:22 pmichaud (to have it check to see if $/ is a valid Match object)
13:22 Matt-W yeah I was wondering if it should do that
13:22 Matt-W is make written in Perl 6 yet?
13:22 pmichaud no, and since it has to deal with CALLER:: it probably won't be yet.
13:22 Matt-W hmm
13:22 Matt-W I'm not good in PIR
13:23 pmichaud even having a perl6 version available would be a good guide, though.
13:24 Matt-W Writing one using unimplemented syntax in the expectation that it'll work in the future?
13:35 krunen rakudo: my %cards = <ace two three four five six seven eight nine ten jack queen king> X~ (" of " X~ <spades hearts diamonds clubs>) Z (1|11,2..13 X* 1,1,1,1); %cards.pick(5).perl.say
13:35 p6eval rakudo ea3283: OUTPUT«["eight of diamonds" => 8, "ten of spades" => 10, "queen of spades" => 12, "queen of clubs" => 12, "eight of spades" => 8]␤»
13:35 krunen metaoperators are _nice_!
13:36 jnthn Wow!
13:37 pmichaud Matt-W: also in that it guides us into implementing those features that can make it work sooner.
13:37 pmichaud okay, all, I have a pumpking "patch review" question
13:38 * jnthn wants to steal that one for an example...
13:38 pmichaud I'm looking at RT #63796
13:38 yantom joined #perl6
13:38 pmichaud This is a patch to provide Perl 6 setting versions of ucfirst, lcfirst, chop, and fmt to Any.pm
13:38 pmichaud the proposed implementations of ucfirst and lcfirst have a couple of somewhat subtle bugs in them
13:39 pmichaud should I...
13:39 krunen jnthn: feel free :)
13:39 pmichaud (1)  reply to the ticket indicating what the problem is and invite a fix
13:39 pmichaud (2) apply the patch after fixing the bug
13:39 pmichaud (2a)  and send a note back to the ticket/list
13:40 pmichaud (2b)  and don't send a note back to the ticket/list
13:40 pmichaud (3)  ...other?
13:41 jnthn I've tended to not pick one as a rule. (more)
13:41 masak krunen++
13:42 jnthn If it's going to take me a few minutes to do the fixes, such that in the long run it would cost me more time to re-review an ammended patch later, I'll fix it, apply it, but explain in the note what I changed to the author of the patch can learn from it.
13:42 masak krunen: I'll steal that too, if it's ok. we're writing Perl 6 documentation.
13:42 jnthn If it's a more major change needed to it, or it's coming from the wrong angle, I'll do (1).
13:43 krunen masak: no prob
13:44 pmichaud jnthn:  so, in this case you'd probably go with #2
13:45 masak krunen: I imagine it'll end up in either or several of X, Z, pick
13:45 pmichaud (since the fix is fairly straightforward)
13:47 pmichaud (actually, #2a)
13:48 jnthn pmichaud: 2a
13:48 jnthn I like to give feedback to help the submitter grow
13:48 jnthn OK, I has slovak class now...back in a bit...
13:48 pmichaud agreed, and in this case it's probably an important Perl 6 lesson.
13:48 jnthn aye
13:48 jnthn ok, bbiab
13:48 krunen masak: X<op> is really useful and needs good examples
13:49 jan_ joined #perl6
13:49 cotto joined #perl6
13:49 PZt joined #perl6
13:49 xuser joined #perl6
13:49 edenc joined #perl6
13:49 masak krunen: indeed. have you read about the u4x effort?
13:49 finanalyst joined #perl6
13:51 Matt-W pmichaud: I didn't see any problems in that patch, so I'd like to see what they are too :)
13:51 pmichaud Matt-W: yes, that's what I'm thinking also.
13:51 pmichaud it's important that we increase the number of people who know what's going on :-)
13:51 Matt-W yes
13:51 krunen masak: yeah, and I'd like to contribute. I just thought you should get a bit more structure to the project before I jump in. How are things coming along?
13:52 Matt-W very few people have really deep knowledge of perl 6 at the moment, and that needs to change
13:52 pmichaud right.  I'm also thinking I'll leave it to someone else to contribute tests for the cases where the patch fails.
13:52 masak krunen: u4x is waiting for me to make a small prototype to figure out the reqs. I'm blocking on time.
13:53 masak after that, I'll announce loud and clear that the project needs a silly amount of contributors.
13:54 krunen masak: do that :D
13:54 masak I'll be happy to. but first time, and then prototype.
13:54 pmichaud masak: would you accept someone else figuring out the reqs, if anyone was interested in doing so?  ;-)
13:54 masak pmichaud: absolutely.
13:55 masak it's just that I don't expect it to happen.
13:55 * pmichaud raises krunen's hand
13:55 Matt-W masak: what if I bought you a clock that goes slightly slower than an ordinary clock, and stole all your other clocks?
13:55 masak Matt-W: I like the way you're thinking here.
13:55 masak krunen: if you're interested, check all the files in the u4x repo. P2T1A is the latest, and contains the attack plan for the reqs collecting.
13:56 alester joined #perl6
13:56 masak krunen: after your example, I'm thinking of adding 'pick' to the list. :)
13:56 * masak does that
13:59 pugs_svn r25804 | masak++ | [u4x/P2T1A] added .pick
13:59 krunen masak: ok, will read up. I'll need a project to work on while I sail across the Atlantic in May...
14:00 masak krunen: sounds perfect, frankly.
14:10 skids joined #perl6
14:10 rodi joined #perl6
14:15 jan_ joined #perl6
14:15 cotto joined #perl6
14:15 PZt joined #perl6
14:15 xuser joined #perl6
14:15 edenc joined #perl6
14:31 Kimtaro_ joined #perl6
14:34 dalek rakudo: c48d6a3 | pmichaud++ | src/ (2 files):
14:34 dalek rakudo: Move ucfirst, lcfirst, chop, and fmt into settings.  (RT #63796, cspencer++)
14:34 dalek rakudo: Patch courtesy Cory Spencer <cspencer  at sprocket.org>, with minor
14:34 dalek rakudo: modifications.
14:34 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/c48d6a3458da215b8ccfac598e95efc750b05910
14:39 dalek rakudo: 087e299 | pmichaud++ | docs/spectest-progress.csv:
14:39 dalek rakudo: spectest-progress.csv update: 317 files, 7153 passing, 0 failing
14:39 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/087e299898416ca6c3a6e2b2bdc3785d841f0ec6
14:42 [particle] joined #perl6
14:45 krunen rakudo: my %cards = <ace two three four five six seven eight nine ten jack queen king> X~ (" of " X~ <spades hearts diamonds clubs>) Z @((1|11,2..13) <<xx>> 4); %cards.pick(5).perl.say
14:46 p6eval rakudo ea3283: OUTPUT«["eight of clubs" => 8, "four of diamonds" => 4, "seven of clubs" => 7, "three of hearts" => 3, "ten of spades" => 10]␤»
14:46 krunen marginally easier to read...
14:54 pmichaud it somehow totally frightens me that rakudo is able to do that.
14:55 szabgab pmichaud, thanks for your comment
14:55 szabgab is the scalar interpolation without braces a mistake or a design ?
14:55 szabgab rakudo: my $x="foo"; say "hello $foo"
14:55 ejs joined #perl6
14:55 p6eval rakudo 087e29: OUTPUT«Scope not found for PAST::Var '$foo' in ␤current instr.: 'parrot;PCT;HLLCompiler;panic' pc 146 (src/PCT/HLLCompiler.pir:102)␤»
14:55 masak rakudo: say ("hello" but False).ucfirst
14:56 szabgab rakudo: my $x="foo"; say "hello $x"
14:56 alester ZERE ARE NO MISTAKEZ IN ZE PERL SEEX!
14:56 masak my line of code seems to hang Rakudo.
14:56 p6eval rakudo 087e29: No output (you need to produce output to STDOUT)
14:56 p6eval rakudo 087e29: OUTPUT«hello foo␤»
14:56 alester szabgab: ARe you getting interest in your articles?
14:56 * masak submits rakudobug
14:57 szabgab alester, some
14:57 alester I'm really glad you're doin' 'em.
14:57 thomasyandell__ joined #perl6
14:57 szabgab I am sure *I* will learn a lot :-)
14:58 pmichaud scalar interpretation is by design
14:58 szabgab pmichaud, thanks
14:58 pmichaud yes, 'hello' but False seems to hang rakudo for some reason.
14:59 szabgab alester, and my post on use.perl was not front-paged (yet ?)
14:59 alester szabgab: Dunno.  I have nothing to do with use.perl.org
15:00 Matt-W pmichaud: oh so that's what was wrong with that patch. Can't rely on the boolean value of a string being false being equivalent to it being empty.
15:00 pmichaud Matt-W: correct.  Also can't rely on 'self' being a string.
15:01 Matt-W pmichaud: point, since these are in Any
15:01 pmichaud thus:    0.ucfirst
15:02 Matt-W I was thinking, why are they in Any
15:02 Matt-W and then I realised that's exactly why
15:02 Matt-W so you don't have to go (~0).ucfirst
15:03 szabgab hmm, in the perl6 interactive mode I seem to need to declare my variables with my and then I don't have them the next line
15:03 pmichaud szabgab: yes, that's correct.  Each line is an eval until itself.
15:03 pmichaud s/until/unto/
15:03 szabgab that's ok I guess, but why do I need to use my ?
15:04 pmichaud we'd like to fix that... but the fix is terribly non-trivial.
15:04 pmichaud rakudo doesn't implement non-strict
15:04 pmichaud (yet)
15:04 szabgab ic
15:04 * Matt-W doesn't miss it
15:04 szabgab so I'll keep writing oneliners
15:07 szabgab rakudo: my @x=(2,3,4); my $z = @x; my @y=$z; @x.perl.say; @y.perl.say;
15:07 p6eval rakudo 087e29: OUTPUT«[2, 3, 4]␤[[2, 3, 4]]␤»
15:10 masak szabgab: the extra array comes from the 'my @y = $z', which is the Perl 6 equivalent of 'my @y = ($z)'.
15:10 nihiliad joined #perl6
15:10 pmichaud stated slightly differently -- the $z doesn't flatten in list context.
15:10 szabgab masak, thanks, I figured that afterwards but I am still not clear why $z is an Array
15:11 szabgab rakudo: my @x=(2,3,4); my $z = @x; my @y=$z; $z.WHAT.say;
15:11 masak szabgab: because @x is.
15:11 p6eval rakudo 087e29: OUTPUT«Array␤»
15:11 szabgab slightly confusing I think
15:12 pmichaud rakudo:  my @x = (2,3,4);  my $z = @x;  @x[1] = 5;   say $z.perl;
15:12 p6eval rakudo 087e29: OUTPUT«[2, 5, 4]␤»
15:12 pmichaud rakudo:  my @x = (2,3,4);  my $z = @x;  my @y = $z; @x[1] = 5;   say $y.perl;
15:12 p6eval rakudo 087e29: OUTPUT«Scope not found for PAST::Var '$y' in ␤current instr.: 'parrot;PCT;HLLCompiler;panic' pc 146 (src/PCT/HLLCompiler.pir:102)␤»
15:13 pmichaud rakudo:  my @x = (2,3,4);  my $z = @x;  my @y = $z; @x[1] = 5;   say @y.perl;
15:13 p6eval rakudo 087e29: OUTPUT«[[2, 5, 4]]␤»
15:13 moritz_ rakudo: my @x := (2, 3, 4); @x.push(5); say @x.perl
15:13 p6eval rakudo 087e29: OUTPUT«[2, 3, 4, 5]␤»
15:13 moritz_ rakudo: my @x := (2, 3, 4); @x[1] = 5;  say @x.perl
15:13 p6eval rakudo 087e29: OUTPUT«[2, 5, 4]␤»
15:13 pmichaud moritz:  yes, that's a rakudo bug.
15:13 moritz_ both should fail, right?
15:14 pmichaud we inherit the 'push' method from from Parrot's ResizablePMCArray (the base class for list)
15:14 pmichaud yes, they should likely fail.
15:14 pmichaud the first should have 'no such method' for push
15:14 * Matt-W needs to read up on infix:<:=>
15:14 moritz_ binding++
15:14 pmichaud the second should complain about attempting to assign to a read-only value.
15:15 Matt-W oh so it binds the name @x to the readonly list (2, 3, 4)
15:16 pmichaud correct.
15:16 szabgab alester, any chance for a little buzzing for the Tricks and Treats?
15:16 Matt-W so if you bound it to an Array containing (2, 3, 4) it'd be perfectly okay to call .push, because that wouldn't be readonly
15:16 alester I tweeted it
15:17 moritz_ Matt-W: right
15:17 Matt-W okay
15:17 Matt-W that makes sense
15:17 Matt-W <- learned something today
15:18 Matt-W actually, no, three things
15:18 Matt-W it really is a good day
15:19 masak it is indeed.
15:21 Matt-W although one of those things wasn't related to perl 6
15:25 finanalyst joined #perl6
15:27 mberends joined #perl6
15:27 justatheory joined #perl6
15:29 * jnthn is back
15:29 pmichaud we charge extra for non-perl6 lessons.
15:29 Matt-W Fortunately I didn't learn it here :)
15:30 pmichaud we charge anyway.
15:30 masak :)
15:30 Matt-W Can I pay in code and bug reports?
15:30 pmichaud that is the preferred currency, yes.
15:30 Matt-W \o/
15:30 pmichaud we give karma points in exchange.
15:31 masak the karma points are only valid in-game, and cannot be traded.
15:32 Matt-W non-transferrable, non-refundable?
15:32 moritz_ glad they're not a limited resource :-)
15:33 masak moritz_: well, there's an upper limit, but it's high.
15:33 Psyche^ joined #perl6
15:33 Matt-W :)
15:34 PerlJam masak: there's a limit?
15:34 moritz_ masak: only the storage of karma points is limited, not the notional number
15:35 masak moritz_: true.
15:35 masak PerlJam: theoretically, no. practically, depends.
15:35 Matt-W it's a limit nobody's likely to reach before death...
15:35 masak without cheating.
15:36 Matt-W rakudo: class Cheater does Cheat {}
15:36 p6eval rakudo 087e29: OUTPUT«The type Cheat does not exist. at line 1, near "{}"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
15:36 Matt-W thankyou rakudo
15:36 PerlJam no kobayashi maru for you!
15:37 jnthn Oh hey, it gives a nice error message. ;-)
15:38 masak Rakudo++
15:38 * mberends comes out of lurk mode: good %GREETING_TIME, #perl6
15:38 masak mberends: good Whatever time, mberends.
15:39 szabgab reading again the previous examples
15:39 szabgab rakudo:  my @x = (2,3,4);  my $z = @x;  my @y = $z; @x[1] = 5;   say @y.perl;
15:39 p6eval rakudo 087e29: OUTPUT«[[2, 5, 4]]␤»
15:39 szabgab does that mean that @y is the same as @x ?
15:40 szabgab not a copy ?
15:40 szabgab rakudo:  my @x = (2,3,4);  my @y = @x; @x[1] = 5;   say @y.perl;
15:40 p6eval rakudo 087e29: OUTPUT«[2, 3, 4]␤»
15:40 masak @y contains @x, it seems.
15:40 lambdabot Maybe you meant: yarr yhjulwwiefzojcbxybbruweejw yow . ? @ v
15:40 masak lambdabot: sorry :/
15:40 mberends szabgab has chosen Best Western Anker for NPW in Oslo, have others already done the same?
15:41 jnthn @yhjulwwiefzojcbxybbruweejw
15:41 lambdabot "\""
15:41 masak mberends: no, how do I do that?
15:41 jnthn @yhjulwwiefzojcbxybbruweejw wtf
15:41 lambdabot "\"#$%&'()*+,\""
15:41 masak jnthn: :)
15:41 masak lambdabot's ways are inscrutable.
15:41 jnthn I'm not even going to try and understand that...
15:41 jnthn mberends: I *think* that's where is booked for me...
15:42 pmichaud I'm at the best western, yes.
15:42 mberends masak: http://www.perlworkshop.no/npw2009/wiki?node=WhoStaysWhere
15:42 Matt-W sounds like breakfasts will be interesting
15:43 szabgab I was there last year and it was quite ok
15:43 jnthn "need coffee"
15:43 jnthn "need coffee too"
15:43 * masak will read "Hotels" and then choose
15:44 Matt-W jnthn: then after a few sips "So I was thinking about implementing embedded closures in rules..."
15:44 Matt-W jnthn: in my imagination, at least
15:44 masak Matt-W: we already have PIR closures in rules. :)
15:45 Matt-W masak: but we want perl 6 ones!
15:45 moritz_ hey, *working* Perl 6 action stups would also be great
15:45 masak and a pony!
15:45 Matt-W and the moon on a pitchfork!
15:45 pmichaud I'm working on it folks... really :-)
15:45 masak pmichaud: cool.
15:45 moritz_ :-)
15:46 Matt-W pmichaud: it's okay, I can cope with associating another object to provide action methods for the time being :)
15:46 * jnthn doesn't mention his longing for .loadinit() to work on regexes.
15:46 Matt-W although arguably it's the better way anyway
15:46 Matt-W separation of grammar from parse actions
15:46 pmichaud jnthn: do you need .loadinit, or just for regexes to change type?
15:46 Matt-W multiple action sets, same grammar
15:46 Matt-W hmm
15:46 jnthn pmichaud: I want to make .perl on them work too... ;-)
15:47 jnthn Then maybe I can write Grammar::Generative. ;-)
15:48 jnthn .loadinit() would make that kinda easy.
15:49 pmichaud oh!  I know how to do that!
15:49 jnthn But it's not high priority really. Just my desire to have evil fun. ;-)
15:49 pmichaud it's just a couple of pct refactors away.
15:49 masak do not underestimate Evil Fun. :)
15:49 pmichaud we already have a node representing the regex in the PAST tree -- I just need to make sure the :subid attribute is set properly.
15:50 jnthn Ah, neat.
15:50 pmichaud and that PGE knows how to generate rules with subids.
15:50 Matt-W as long as it's done before Christmas :)
15:50 pmichaud then it's just .loadinit on the existing PAST node
15:50 pmichaud because PGE doesn't have to generate the loadinit at all, it just has to generate the sub with the correct subid.
15:51 pmichaud sounds like a good possible plane "fun thing to do"
15:51 * pmichaud likes doing fun hacks on airplanes.  Last fun hack-on-plane was getting a 90% speed improvement in pbc_to_exe
15:52 jnthn Don't forget to get me a list of the RTs you want me to peek at tomorrow also. :-)
15:52 Tene_ joined #perl6
15:52 pmichaud oh yes.
15:52 Matt-W pmichaud: and that has made a huge difference to my rakudo updating satisfaction
15:54 moritz_ rakudo: class A { method BUILD(*@a, *%b) { @a.perl.say; %b.perl.say } }; A.new(:d<e>);
15:54 p6eval rakudo 087e29: OUTPUT«[A.new()]␤{"d" => "e"}␤»
15:54 moritz_ that looks... less wrong than I thought it would be
15:55 moritz_ probably my ticket on that subject is pointless then
15:55 Matt-W that looks pretty plausible to me
15:58 moritz_ from some examples in S12 it looked like the newly created object shouldn't be passed as first argument
15:59 Matt-W hmm
15:59 Matt-W I guess it wouldn't be in an ordinary method
15:59 moritz_ why not?
15:59 Matt-W so why should build be any different
16:00 * moritz_ confused
16:00 Matt-W or would it be in an ordinary method if it used slurpy list like that
16:01 moritz_ rakudo: class A { method BUILD($obj, :$d) { $d.perl.say } }; A.new(:d<e>);
16:01 p6eval rakudo 087e29: OUTPUT«"e"␤»
16:01 moritz_ I just choose the slurp vars to get the most general signature that's possible
16:01 moritz_ to find out what's passed to it
16:05 pmichaud the problem is that for any given object, we may have to call multiple BUILD (sub)methods
16:05 pmichaud one for each parent class
16:05 pmichaud so we can't just use   $obj.BUILD(...)
16:06 TimToady BUILDALL is essentially a dispatcher, so BUILD should really be called as a sub
16:06 pmichaud that works for me.
16:07 pmichaud so, we look up the BUILD (sub)methods, but invoke each one as   $buildsub($obj, params...)
16:07 pmichaud and inside buildsub $obj is 'self'
16:07 Matt-W home &
16:07 TimToady which you know is okay because it's a submethod
16:08 pmichaud we'll refactor rakudo to do it this way.  Perhaps not this week.
16:08 pmichaud jnthn: small reminder note for this week -- we should probably try to not do anything too... "radical" with rakudo until after its release next week.
16:08 TimToady hmm, though that doesn't get the default BUILD from Object if there isn't a BUILD
16:09 pmichaud we could still look up Object's BUILD and invoke it as a sub, yes?
16:09 TimToady so maybe it's really more like $obj.MyClass::BUILD
16:09 TimToady start looking at ::?CLASS
16:10 jnthn pmichaud: Does the dispatch refactor you wanted count?
16:10 pmichaud jnthn: I'm okay with doing the dispatch refactor.
16:10 pmichaud (prior to release)
16:10 pmichaud that one doesn't strike me as scary.
16:10 jnthn ok
16:10 jnthn me either
16:11 jnthn It was easy last time around.
16:11 pmichaud at any rate, it's less scary to me than what we have now :-P
16:11 jnthn What we have no doesn't scare me. :-P
16:11 jnthn *now
16:11 pmichaud I'm also thinking we could eliminate the   $past<invocant>  handling as a result, but that's not a requirement.
16:11 jnthn Maybe yes.
16:11 jnthn That was introduced to keep actions.pm neat in light of this patch.
16:13 jnthn erm, in light of .HOW and .dispatch through that
16:13 pmichaud one could simplify '!method_dispatch'  by passing the invocant as a named param :-)
16:13 pmichaud (potentially simplify, at any rate)
16:14 pmichaud at any rate, I'm kinda wanting a method call in actions.pm to result in a single output call in the generated PIR
16:15 pmichaud whether that's a PIR method dispatch or a call to something that then handles method dispatch after that is okay
16:16 jnthn sure
16:17 pmichaud yesterday I tried playing with    "my $a = $b;  my $b = 5;"   (detecting the use of a variable before it's declared) but didn't have much success
16:17 pmichaud that might need to wait for contextual variables.
16:18 jnthn Ah yes, context vars...
16:18 jnthn We need the dynop done for those...
16:18 * jnthn wants state vars soonish too
16:18 pmichaud I'm still thinking I don't want that as a dynop.
16:18 pmichaud I want it in parrot core -- pge and pct will need contextual vars also.
16:18 pmichaud I just haven't approached allison about it yet.
16:18 jnthn Oh, yes.
16:19 jnthn Prototype it as a dynop first and then suggest it for core?
16:19 pmichaud and adding it pre-1.0 seems risky.
16:19 pmichaud I think I'd rather just add it to core post-1.0 and then let her argue that it should be a dynop :-)
16:19 jnthn agree
16:19 jnthn ok
16:19 pmichaud easier to ask forgiveness than permission, or something like that.
16:20 pmichaud and if I do it as part of PGE changes it's probably easier to make the case (since allison has already said that custom ops to support PGE are okay)
16:26 pmichaud jnthn: okay if i just assign tickets to you in RT if I think you're the right person to look at them?
16:28 tomyan joined #perl6
16:29 jnthn pmichaud: Sure.
16:29 pmichaud to "jonathan" or "jnthn@jnthn.net" ?
16:29 jnthn The latter.
16:36 pmichaud is RT #57862 still a valid issue?
16:37 jnthn grammar A { token b { <c> } }; "c" ~~ A::b
16:37 masak std: sub if($a) { say $a }; if("OH HAI")
16:37 p6eval std 25804: OUTPUT«ok 00:04 37m␤»
16:38 jnthn rakudo: grammar A { token b { <c> } }; "c" ~~ &A::b
16:38 p6eval rakudo 087e29: OUTPUT«Unable to find regex 'c'␤Null PMC access in invoke()␤current instr.: 'parrot;A;b' pc 263 (EVAL_21:116)␤»
16:38 jnthn rakudo: grammar A { token b { <c> } }; "c" ~~ /<A::b>/
16:38 yantom joined #perl6
16:38 pmichaud is &A::b  even valid?
16:38 p6eval rakudo 087e29: OUTPUT«Unable to find regex 'c'␤Null PMC access in invoke()␤current instr.: 'parrot;A;b' pc 263 (EVAL_19:116)␤»
16:38 jnthn Maybe not
16:38 jnthn But that second one is, right?
16:39 pmichaud sure, although the error message is correct that there's not a regex named 'c'
16:39 szabgab rakudo: my @x=(1, 2, 3); say "@x[]"
16:39 p6eval rakudo 087e29: OUTPUT«@x[]␤»
16:39 pmichaud szabgab: we don't do array interpolation yet, sorry.
16:39 jnthn Yes, but it is the null pmc access afterwards that is the problem.
16:39 pmichaud szabgab: my @x = (1,2,3); say "{@x[]}";   # works
16:40 moritz_ rakudo: grammar A { token b { <c> } }; try { rakudo: grammar A { token b { <c> } } }; say "alive"
16:40 pmichaud rakudo: my @x = (1,2,3); say "{@x[]}";   # works
16:40 p6eval rakudo 087e29: OUTPUT«Statement not terminated properly at line 1, near ": grammar "␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
16:40 p6eval rakudo 087e29: OUTPUT«1 2 3␤»
16:40 szabgab pmichaud, I forgive for now
16:40 moritz_ rakudo: grammar A { token b { <c> } }; try { "a" ~~ /<A::b>/ }; say "alive"
16:40 p6eval rakudo 087e29: OUTPUT«Unable to find regex 'c'␤alive␤»
16:40 pmichaud I wonder how hard it would be to get the simple array interpolation case to work.
16:41 szabgab so is the only interpolation now the "{@x}" style ?
16:41 pmichaud szabgab: except for simple scalars, yes.
16:41 pmichaud jnthn: I'm not sure where that null pmc access is coming from.  Perhaps from PGE.
16:42 moritz_ rakudo: say "{ 2 + 3 }"
16:42 p6eval rakudo 087e29: OUTPUT«5␤»
16:42 pmichaud It may be that PGE can't find the regex but tries to invoke it anyway.
16:42 PerlJam szabgab: you mean implemented or specced?
16:42 pmichaud PerlJam: good question.
16:42 pmichaud szabgab: "@x[]" is specced but not implemented in rakudo.
16:43 szabgab yes I am reading S02 and trying to play with interpolation
16:43 szabgab so I was wondering what is implemented
16:43 szabgab rakudo: $x=1; say $x.WHAT;
16:44 pmichaud there's a list on rakudo.org:  http://rakudo.org/status
16:44 p6eval rakudo 087e29: OUTPUT«Scope not found for PAST::Var '$x' in ␤current instr.: 'parrot;PCT;HLLCompiler;panic' pc 146 (src/PCT/HLLCompiler.pir:102)␤»
16:44 szabgab rakudo: $x=1; say "$x.WHAT";
16:44 p6eval rakudo 087e29: OUTPUT«Scope not found for PAST::Var '$x' in ␤current instr.: 'parrot;PCT;HLLCompiler;panic' pc 146 (src/PCT/HLLCompiler.pir:102)␤»
16:44 pmichaud note that  "$x.WHAT" in that case would always be  "1.WHAT"
16:44 pmichaud in order for non-simple-scalar interpolation to occur there has to be a postcircumfix at the end, I think.
16:45 moritz_ ah
16:45 moritz_ "$x.WHAT()" it should be
16:45 szabgab rakudo: my $x=1; say $x.WHAT;
16:45 p6eval rakudo 087e29: OUTPUT«Int␤»
16:45 szabgab rakudo: my $x=1; say "$x.WHAT";
16:45 p6eval rakudo 087e29: OUTPUT«1.WHAT␤»
16:45 pmichaud rakudo:  my $x=1;  say "{$x.WHAT}";
16:45 p6eval rakudo 087e29: OUTPUT«Int␤»
16:45 masak pmichaud: I'm reading http://use.perl.org/~chromatic/journal/38552 -- did you know that there is a Pod(6) parser already written in Perl 6?
16:46 pmichaud rakudo:  my $x=1;  say "$x.WHAT()";   # not yet implemented
16:46 p6eval rakudo 087e29: OUTPUT«1.WHAT()␤»
16:46 szabgab just checking, maybe you've forgotten that it already works :-)
16:47 pmichaud masak: I knew there was a pod6parser that particle++ started that is in the rakudo tree
16:47 masak pmichaud: mberends++ has written one; it's in perl6-examples.
16:47 pmichaud masak: allison++ and others have created a pod 5 parser using Perl 6 rules that's in the parrot tree (although it may have moved recently in preparation for the 1.0 release)
16:47 moritz_ there's a much more complete parser by mberends++
16:47 pmichaud excellent.
16:47 pmichaud no, I wasn't aware of that one.
16:47 masak I'm really impressed by his work.
16:47 masak I plan to blog about it at some point.
16:48 pmichaud please do.
16:48 masak pmichaud: ok, prioritizing up that one.
16:48 moritz_ masak: admit it, you're just looking for excuses not to write u4x docs :-)
16:48 masak moritz_: sorry, sorry! :/
16:49 moritz_ :-)
16:49 masak moritz_: but yes, I don't feel in a rush to do u4x.
16:49 masak I figure I've got till summer to do that prototype.
16:49 moritz_ speaking of summer... any news about the TPF application for GSOC?
16:52 [particle] no news until the 18th? of march
16:53 moritz_ ok
16:53 masak how should I write my for loops if I want to possibly remove items I iterate over? is gather/take my best bet for that?
16:54 moritz_ don't think so
16:54 masak ideally, I'd like a .delete method on the iterator, or something.
16:54 masak oh, how do I access the iterator of the for loop? :)
16:54 moritz_ indirectly, with redo, next, last
16:54 masak moritz_: yah, but directly?
16:55 moritz_ masak: you don't.
16:55 moritz_ afk
16:55 masak I want to see pipes sticking out!
16:55 pmichaud masak:  isn't that what a Null PMC error is?  ;-)
16:55 masak pmichaud: touche.
16:55 [particle] you want a destructive .pick?
16:56 [particle] maybe .pickaxe
16:56 masak [particle]: not necessarily.
16:56 masak [particle]: I have .=pick
16:56 masak that's destructive enough for me.
16:57 jnthn masak: Why not just grep?
16:58 masak jnthn: I might.
16:59 masak but I'm doing side-effects like 'say' in there.
16:59 [particle] When will accepted mentoring organizations be announced? We will announce the list of accepted mentoring organizations on the Google Summer of Code 2009 home page on March 18, 2009.
16:59 pmichaud moritz_: can we close RT #62810 ?
16:59 [particle] http://socghop.appspot.com/document/show/program/google/gsoc2009/faqs#org_apply
16:59 masak right now I chose to put things I want to keep in a hash; that way I get uniqueness included in the deal. but I lose ordering. :/
17:00 masak is there a native Perl 6 hash type which preserves insertion order?
17:00 PerlJam masak: just use an array an .uniq on it
17:00 PerlJam s:2nd/an/and/
17:01 masak PerlJam: thanks, will do.
17:01 masak ah, .uniq!
17:03 * jnthn looks at the flurry of tickets pm has given him
17:05 moritz_ pmichaud: yes
17:05 moritz_ pmichaud: I'll close it
17:05 pmichaud jnthn: feel free to reassign them back to me or nobody if you think that's best... these are just tickets I think you're especially well-placed to address.
17:05 pmichaud moritz++  # thanks
17:07 pmichaud jnthn: anyway, that gives you something to do for your rakudo days, if you're lacking tasks or have an excess of tuits :-)
17:08 jnthn pmichaud: They all look like ones that I know the area of pretty well, yes.
17:26 pmichaud afk for a bit # lunch
17:32 Khisanth joined #perl6
17:32 PacoLinux joined #perl6
17:34 pugs_svn r25805 | moritz++ | [t/spec] tests that (Str but True).uc and similar things work
17:37 Matt-W Hmm
17:38 Matt-W If one of my subrules has matched and its action method has set the result object using make, how do I get at that object in my action method?
17:38 pugs_svn r25806 | moritz++ | [t/spec] test for things like 0.uc
17:38 PerlJam it's in $/ isn't it?
17:38 PerlJam $/<subrule>
17:38 Matt-W that's what I thought
17:39 Matt-W but I just get a Str
17:39 moritz_ $<subrule>.rob # but doesn't work yet
17:39 Matt-W it doesn't work yet??
17:39 moritz_ $( $/<subrule> ) should work, though
17:39 Matt-W hmm
17:39 Matt-W aaah
17:39 Matt-W something else is wrong
17:40 Matt-W looks like one of the action methods isn't triggering
17:40 * PerlJam thought that he had imagined or dreamed .rob until just now
17:40 moritz_ Matt-W: say() in the actions help to debug that
17:41 Matt-W moritz_: yeah that's how I know it's not triggering
17:41 Matt-W it has to have gone through the rule to get to the method that's failing
17:41 Matt-W but the method that goes with it isn't running
17:41 Matt-W how odd
17:42 moritz_ maybe forgot a {*} ?
17:42 Matt-W nope
17:42 PerlJam pastebin the code :)
17:44 Matt-W aaah making progress
17:44 Matt-W the methods trigger now
17:44 Matt-W it seems the juxtaposition of a subrule and {*} binds more tightly than |
17:45 PerlJam "binds more tightly"?
17:46 Matt-W as in if you say regex r { <a> | <b> {*} } it only triggers the rule if you get b, not a
17:46 Matt-W it's considered part of b's branch
17:46 Matt-W it seems
17:46 skids "do is blah {...}" not "do {...} is blah" correct?
17:46 skids std: do is rw {...}
17:47 p6eval std 25806: OUTPUT«Undeclared routines:␤  is used at 1 ␤    rw used at 1 ␤ok 00:02 34m␤»
17:47 skids std: do {...} is rw;
17:47 p6eval std 25806: OUTPUT«##### PARSE FAILED #####␤Statements must be separated with semicolon at /tmp/Dn2NUI91FW line 1:␤------> [32mdo {...} [31mis rw;[0m␤    expecting any of:␤ infix or meta-infix␤      infix stopper␤    standard stopper␤ statement␤      statement modifier loop␤    terminator␤FAILED
17:47 p6eval ..00:02 34m␤»
17:48 * Matt-W studies rakudo's grammar and learns things
17:48 * skids struggles to find traits applied to loop or if statements in the Synopsis.
17:55 Kimtaro joined #perl6
17:56 Matt-W oooh
17:56 Matt-W a bug, a bug!
17:56 Matt-W but I can't stop to quantify it now
17:57 Matt-W except that at least some of the time, calling .perl on a Match object causes a null PMC access
17:59 Matt-W concert &
18:03 ruoso joined #perl6
18:04 ruoso Hello!
18:04 meppl joined #perl6
18:04 skids Hi!
18:05 M_o_C joined #perl6
18:05 bigpresh joined #perl6
18:07 abra joined #perl6
18:07 eternaleye joined #perl6
18:08 bigpresh joined #perl6
18:12 drbean joined #perl6
18:42 pmichaud Matt-W: {*} acts like any other closure.
18:42 pmichaud (in terms of its precedence)
18:45 skids Any examples of traits applied to a for/loop/if that you know of?  Or even a bare block?  I know pointy blocks cannot have them.
18:52 TimToady Matt-W: and note that there is already a {*} implied at the end of every rule, at least as far as STD is concerned
18:52 TimToady skids: traits are only for declarators
18:53 TimToady we don't allow them on rvalues generally
18:54 skids Ahh, well that will make the S17 refactor fun :-)
18:55 skids Then the START {}  CATCH {} etc are exceptions to that rule.
18:57 ruoso TimToady, er...
18:57 ruoso about your last mail
18:57 ruoso so do I always need to use two sets of parens when I'm accessing an attribute that happens to contain a closure that I want to invoke?
18:57 TimToady yes
18:58 TimToady I think that's even documented somewhere
18:58 ruoso alright... not as pretty as I'd like... but seems fine
18:58 ruoso so...
18:59 ruoso self.foo.() is also the same as self.foo()
18:59 ruoso meaning... it has nothing to do with the sigil before the dot...
19:01 pmichaud that doesn't match how I read STD.pm, though.  Or there's some other magic going on.
19:01 TimToady yes, we want to treat .() as a mere syntactic variant of ()
19:02 pmichaud $.foo()  is parsed specially in STD.pm
19:02 TimToady it's certainly possible that I botched STD somehow :)
19:02 ruoso pmichaud, I think it needs to be parsed specially because it's not really a twigil, I think
19:03 TimToady yes, I botches STD
19:03 TimToady s/s/d/
19:03 pmichaud timtoady: okay, I'm fine with that then :-)
19:03 * ruoso .oO (yed?)
19:03 pmichaud we need a "smart substitute" to go along with "smart match"
19:04 pmichaud ruoso: the special parsing in STD handles the case where the twigil is '.'
19:04 pmichaud (at least, until TT changes it :-)
19:05 TimToady but it doesn't allow the .() forms
19:06 TimToady yet
19:06 ruoso right, pmichaud, so that special parsing has nothing to do with how .() or () is parsed, it seems
19:06 TimToady the special form currently only allows (), but it should also allow .()
19:06 TimToady and variants
19:07 ruoso although the dot meaning an aditional deref is not that useless
19:07 TimToady unspace variants, not .* variants...
19:08 ruoso not actually deref
19:08 ruoso actually, I don't know how to define it
19:08 pmichaud in order to obtain an attribute that contains a closure, it would require two parens, yes, if using the dot twigil
19:08 pmichaud if using the bang twigil, only one set of parens would be needed.
19:08 ruoso pmichaud, makes sense...
19:09 ruoso since the syntax for private attributes is completely different than for private methods
19:09 ruoso while there are no such thing as public attributes
19:11 pmichaud afk for a bit again
19:12 ruoso TimToady, but I do feel a bit unconfortable with "has $.foo; ...; $.foo = {*}; ... $.foo()()
19:12 ruoso it doesn't look right
19:13 ruoso because it forces the attribute to actually look like a method
19:15 TimToady $.foo is not an attribute
19:15 TimToady $!foo is an attribute
19:15 TimToady $.foo is a method that happens to also declare $!foo
19:15 ruoso I know... I know...
19:16 ruoso but from the user's perspective
19:16 mberends joined #perl6
19:16 * ruoso might be a bit unconfortable because he has just lost 2 hours because of an extra parens required by javascript
19:17 * [particle] clips his fingernails at ruoso
19:17 TimToady it's actually desugaring to $(self.foo())
19:18 TimToady so the ".foo" is the important part, not the "$."
19:18 ruoso what surprised me was actually that ".()" would be the same as"()"
19:18 TimToady it's just convenient to use a sigil as a standin for "self", which was a very long-fought war on p6l
19:18 ruoso which happens to cause the requirement for the extra paren set
19:19 ruoso because if ".()" and "()" were not the same
19:19 ruoso $.foo.() would do the trick
19:20 TimToady but foo.() would fail unless foo returned something .()-able
19:20 ruoso seems what I would expect
19:20 jnthn Makes sense to me too.
19:21 TimToady as I say, now that we have foo\(), maybe we could get away with that
19:21 ruoso maybe only make the dot irrelevant *after* a postcircumfix
19:21 TimToady and as long as .() still is a postfix (a normal postfix, not special form) it could still be used in conversation
19:21 ruoso so the first dot is relevant
19:22 ruoso so $a.(){}() doesn't need to be $a.().{}.()
19:22 ruoso but you still have the first dot
19:22 TimToady $a() is fine too
19:23 ruoso my point is...
19:23 TimToady or your getting back to p5 mentality
19:23 ruoso we assume that empty parens are not necesary for most things
19:23 ruoso $a() to me looks like $a
19:23 ruoso since empty parens are mostly irrelevant
19:23 TimToady no, they're not
19:24 TimToady e() is an error
19:24 TimToady if you mean the constat
19:24 TimToady *constant
19:24 barney joined #perl6
19:24 ruoso s/irrelevant/not required/
19:24 TimToady what, you think $a should call itself when mentioned?
19:25 TimToady that would be completely non-Perly
19:25 ruoso no, it shouldn't...
19:25 TimToady () isn't a no-op
19:25 ruoso I know... I know...
19:25 ruoso but for most method calls and sub calls
19:25 ruoso if you have no args
19:25 ruoso you don't need to use the parens at all
19:26 skids except &f()
19:26 TimToady that was another long battle that we're not going to revisit
19:27 TimToady $x.meth already has one argument, so it can default to not wanting more
19:27 ruoso sub bar { ... }; bar;
19:27 TimToady bar is looking for arguments
19:27 ruoso std: sub bar { ... }; bar;
19:27 TimToady so is expecting a term next
19:27 p6eval std 25806: OUTPUT«ok 00:02 34m␤»
19:28 TimToady it can be a null list, but it's still there
19:28 TimToady $x.meth expects an operator after it, not a term
19:28 TimToady std: $x.meth 1
19:28 p6eval std 25806: OUTPUT«##### PARSE FAILED #####␤Syntax error (two terms in a row?) at /tmp/hTPtA6o0R4 line 1:␤------> [32m$x.meth [31m1[0m␤    expecting any of:␤        infix or meta-infix␤      infix stopper␤    standard stopper␤ statement modifier loop␤  terminator␤Other potential difficulties:␤
19:28 ruoso let me put it another way then...
19:28 p6eval ..Variable $x is n...
19:28 ruoso if '.()' is the same as '()', what is the dot doing there?
19:29 TimToady same thing as the dot in .++
19:29 ruoso which is?
19:29 skids Isn't it more that '()' is short for '.()'?
19:29 TimToady except that () is a special form
19:31 TimToady makes the dereference more explicit, where the deref of foo() vs foo.() is in the compiler, not the run-time
19:31 TimToady hence it's a special form
19:31 TimToady but it's still dereffing a symbol table entry at compile time
19:31 ruoso right... that was precisely my thought when I wrote $.foo.()
19:32 ruoso I thought it would make a deref more explicit, and thus not require me an extra ()
19:32 TimToady there is no $.foo in the symbol table
19:33 ruoso I'm not sure it being into the object table instead of the lexical table to be all of that importance for that matter
19:33 ruoso it's going to be looked up somehow
19:33 TimToady it's a method call, so parens are always part of the call, if there, just as .meth() eats the parens
19:33 TimToady it's going to look for .foo just as it looks for .foo
19:34 TimToady it's just a method call, and should have the same syntax
19:34 TimToady now I'm not saying that we can't break symmetry for .meth() vs .meth.()
19:34 ruoso ok.. that is precisely the point I'm arguing about
19:34 TimToady but if we do it will be intentional symmetry breaking
19:35 TimToady well, you have to let me thing through the ramifications
19:35 TimToady *think
19:36 skids $.foo: ... ?
19:37 pmichaud 19:24 <TimToady> e() is an error
19:38 pmichaud spectests have
19:38 pmichaud S32-trig/e.t
19:38 pmichaud 17:is_approx(e()    , $e,    "e(), as a sub");
19:38 pmichaud 18:is_approx(1 + e(), $e+1, "1+e(), as a sub");
19:38 pmichaud 19:is_approx(e() + 1, $e+1, "e()+1, as a sub");
19:40 pmichaud I'd be very happy if e() is an error, though.  :-)
19:41 pmichaud that would kinda go against S03:2665 though.
19:44 pmichaud (afk, picking up children from school)
19:52 [particle]2 joined #perl6
19:54 bacek joined #perl6
19:54 j1n3l0 joined #perl6
19:54 PacoLinux joined #perl6
19:55 bacek good morning
19:56 bacek std: sub prefix:Σ (*@args) {...}; my @a; say Σ@a
19:56 p6eval std 25806: OUTPUT«##### PARSE FAILED #####␤Syntax error (two terms in a row?) at /tmp/uJGNNnzNhO line 1:␤------> [32mub prefix:Σ (*@args) {...}; my @a; say Σ[31m@a[0m␤    expecting any of:␤ POST␤   argument list␤      infix or meta-infix␤      infix stopper␤   postfix␤
19:56 p6eval ..postfix_prefix_meta_operator␤       standard ...
19:56 bacek std: sub prefix:<Σ> (*@args) {...}; my @a; say Σ@a
19:56 p6eval std 25806: OUTPUT«ok 00:03 41m␤»
20:13 eternaleye joined #perl6
20:15 justatheory joined #perl6
20:15 [particle] joined #perl6
20:22 ingy joined #perl6
20:22 ejs joined #perl6
20:28 bacek_ joined #perl6
20:34 yary joined #perl6
20:37 AzureStone joined #perl6
20:38 frioux_ joined #perl6
20:43 TimToady just fyi: there are approximately 20 places in t/ that are assuming .() is equivalent to () on function or method calls (that aren't real derefs of &foo)
20:43 diakopter nopaste list?
20:43 diakopter (probably nearly all the uses of .()?)
20:47 pasteling "TimToady" at 71.139.3.159 pasted "uses of non-deref .()" (23 lines, 2.1K) at http://sial.org/pbot/35503
20:56 cspencer joined #perl6
21:02 Whiteknight joined #perl6
21:06 yary Hello- is there a moderator for the perl.perl6.users usenet group here?
21:15 eternaleye joined #perl6
21:22 ruoso TimToady, I'd argue that uses are counter-intuitive
21:31 pugs_svn r25807 | lwall++ | Clarify value syntax inconsistency noticed by pmichaud++
21:57 TimToady ruoso: running experimental tests with STD and test suite
21:59 ruoso i.e.: breaking mildew?
22:00 TimToady not yet :)
22:00 * ruoso decommute &
22:07 Limbic_Region joined #perl6
22:15 j1n3l0 left #perl6
22:31 cspencer can parrot do MMD based on return type?
22:34 pugs_svn r25808 | lwall++ | [Cursor,viv] add captures in parse order, not just via named kids
22:34 pugs_svn r25808 | lwall++ | also continue transition from .<?> to .rob (internally ->{'_'}
22:35 j1n3l0 joined #perl6
22:36 cspencer joined #perl6
22:37 jnthn cspencer: (parrot mmd on return type) not that I'm aware of...
22:37 jnthn Perl 6 doesn't need that, though...
22:37 jnthn AFAIK.
22:37 jnthn (I hope...)
22:37 skids joined #perl6
22:37 cspencer well, i was looking at a way of getting Inf to work for Int types
22:37 cspencer at the moment, it's a Parrot sub that returns a float
22:38 cspencer and i believe that Parrot now support Inf for integer types...
22:42 bacek_ joined #perl6
22:43 ZuLuuuuuu joined #perl6
22:47 pmichaud parrot supports Inf for integer types?  I hadn't seen that yet.
22:51 ZuLuuuuuu left #perl6
22:59 cspencer pmichaud: probably me getting confused again, i'd somehow thought it did ;)
23:04 pmichaud the section on MMD tiebreakers in S12 says:
23:04 pmichaud Therefore return-type tiebreaking need not be supported
23:04 pmichaud in 6.0.0 unless some enterprising soul decides to make it work.)
23:06 TimToady it supports Inf for Object types, not for native types
23:06 TimToady has for years...
23:07 TimToady S02: C<Int> automatically supports promotion to arbitrary precision, as well as holding C<Inf> and C<NaN> values.
23:08 moritz_ I think you're both mixing up Perl 6 and parrot ;-)
23:10 cspencer yes, i probably should have been more clear that i was referring to to Parrot native int types :)
23:12 * jnthn is SO not an enterprising soul.
23:13 jnthn Though that may change after 6.0.0 is released. ;-)
23:16 pugs_svn r25809 | lwall++ | [STD] special named forms foo() .foo() and $.foo() no longer support
23:16 pugs_svn r25809 | lwall++ | the dereferencing .() postfix syntax, since they don't actually do
23:16 pugs_svn r25809 | lwall++ | any dereferencing!  You may still insert space using "unspace" however.
23:16 pugs_svn r25809 | lwall++ | This decrease in consistency on the syntactic level is offset by an
23:16 pugs_svn r25809 | lwall++ | increase in consistency on the semantic level, as suggested by rouso++.
23:16 pugs_svn r25809 | lwall++ | (We'd already gotten rid of the dot forms of adverbs some time ago,
23:16 pugs_svn r25809 | lwall++ | for similar reasons.  We just didn't quite carry the idea through.)
23:16 wayland76 s/rouso/ruoso/
23:16 wayland76 ruoso++ :)
23:16 TimToady sorry, I sort of assumed this channel was about Perl 6  :P
23:16 TimToady bleh
23:17 TimToady ruoso++ again for putting up with me :)
23:17 moritz_ we have a healty amount of semi off-topic discussions here ;-)
23:17 * TimToady never does that <whistles>
23:18 * wayland76 changes channel name to perl6-and-linguistic-puns to make TimToady correct :)
23:19 TimToady don't forget the -and-everything-else bit too
23:19 TimToady but then, I guess pretty much everything has been related to Perl at one point or another already...
23:20 wayland76 :)
23:22 kate21de joined #perl6
23:28 kate21de1 joined #perl6
23:34 Limbic_Region TimToady - 6 degrees of Perl Yak Shaving
23:40 pugs_svn r25810 | moritz++ | [irclog] try to support channel names  with dots
23:40 diakopter ... and where do the shavings end up?
23:40 lambdabot joined #perl6
23:41 pugs_svn r25811 | moritz++ | [irclog] try to unbreak .htaccess
23:45 wayland76 In a yaks'-wool sweater, of course :)
23:46 pugs_svn r25812 | moritz++ | [irclog] oh my, I can't even write char classes anymore in perl 5...
23:49 pmichaud so, we still have .[] and .{}  but no longer have .() ?
23:52 TimToady we still have .() too
23:52 TimToady it's just always an operator
23:52 TimToady like .[] and .{}
23:53 TimToady the parens in foo() aren't an operator, is the point
23:53 TimToady in &foo.(), they are
23:53 TimToady at least, the hardwired one is a different operator
23:54 pmichaud okay, I get it.  Works for me.
23:55 TimToady and it turns out, in the test suite, half of the .foo.() meant one thing, and half meant the other !!!
23:55 pmichaud &foo() is still done with a postcircumfix operator, though, yes?
23:55 TimToady so definitely indicative of some confusion
23:55 TimToady yes
23:55 moritz_ so $.bar.() will invoke the thing that $.bar returned?
23:55 TimToady you can assume the . where you need to
23:56 TimToady but you can't unassume it where you don't, as it were
23:56 TimToady moritz_: yes
23:56 TimToady and $.bar() is the direct call now
23:56 pmichaud I wonder if this means that rakudo works in a copule of tickets now :-)
23:56 pmichaud (I know there are still some where it doesn't :-)
23:56 pmichaud $.bar.() is the same as $.bar().()
23:56 TimToady yes
23:57 pmichaud just like  $xyz.foo.bar.() is the same as xyz.foo().bar().()
23:57 pmichaud er, *$xyz
23:57 TimToady it's more consistent semantically, and less consistent syntactically
23:57 TimToady yes
23:57 pmichaud okay.  I like it.
23:57 pmichaud ruoso++
23:58 TimToady agreed, I'm glad he was more stubborn than me this time  :)
23:58 pmichaud I'm glad I didn't work on fixing the rakudo bugs related to this issue before today, though :-)
23:59 TimToady yes, well, by that argument nothing ever gets done... :P

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

Perl 6 | Reference Documentation | Rakudo