Camelia, the Perl 6 bug

IRC log for #perl6, 2009-11-07

Perl 6 | Reference Documentation | Rakudo | Niecza | Specs

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

All times shown according to UTC.

Time Nick Message
00:00 quietfanatic How is that like class data?
00:00 jnthn If the accessors are inherited, why isn't that enough?
00:00 quietfanatic rakudo: class X {our $.x is rw = 5}; class Y is X {}; Y.x = 6; say X.x
00:01 masak rakudo: role R[$data] { method foo { say $data } }; class A is R[42] {}; A.new.foo
00:01 p6eval rakudo 830e2c:  ( no output )
00:01 p6eval rakudo 830e2c:  ( no output )
00:01 _eMaX_ joined #perl6
00:01 masak rakudo: role R[$data] { method foo { say $data } }; class A does R[42] {}; A.new.foo
00:01 quietfanatic At my machine, the fomer code prints 6
00:01 p6eval rakudo fe6dd2:  ( no output )
00:01 jnthn quietfanatic: Yes, that's what I'd expect...
00:01 xinming joined #perl6
00:01 quietfanatic the accessor modifies X's x not Y's
00:02 jnthn When you inherit an instance attribute, it's not like there's one copy of it for an instance of X and another copy for the parent Y though.
00:02 quietfanatic Y doesn't have even have a $x variable
00:02 quietfanatic yeah
00:02 jnthn Right, but that only matches the semantics of normal inheritance.
00:03 quietfanatic what I want is something like 'our' but inherits like 'has'
00:03 jnthn I don't see how has works differently.
00:03 quietfanatic has creates a copy of that variable for every instance of that class
00:03 jnthn When you instantiate the subclass, there's still one common storage location.
00:03 jnthn Yes.
00:04 quietfanatic I only want one copy per class
00:04 jnthn Oh
00:04 jnthn I see what you're getting at.
00:04 jnthn Hm.
00:04 masak quietfanatic: maybe what you want is a hash table where the keys are classes.
00:04 quietfanatic but it needs to be potentially different for each class
00:04 quietfanatic yeah, I sorta have that for something else in this program
00:04 quietfanatic maybe I can modify it for this use
00:04 masak quietfanatic: that doesn't automatically give you an inheritance mechanism, though.
00:05 quietfanatic Yes, which is why I want a hook that'll run when my class is subclassed, so I can pretend it's inheriting
00:05 quietfanatic That might not be entirely necessary though
00:06 jnthn Uff. Hook when the class is subclassed is...fun.
00:07 jnthn You could always implement such a thing by wrapping the appropriate candidate of trait_mod:<is>.
00:07 quietfanatic There's no other way to reliably do what I want to do
00:07 quietfanatic Well, what I want to do in this case doesn't require it, but
00:07 quietfanatic The general case of implementing inheritable class data requires this.
00:08 quietfanatic Hmm, I didn't think about that
00:08 quietfanatic (jnthn:)
00:08 jnthn I'm not sure we need a way in core. But I expect it's writable as a module. :-)
00:08 TimToady seems like a design smell to me
00:09 TimToady you sure you're not doing an XY here?
00:16 TimToady jnthn: is there a reliable way in rakudo to get from a class to its associated package?
00:16 colomon joined #perl6
00:17 jnthn TimToady: Only if .WHO is implemented...
00:17 jnthn If it's not, it'll be easy to add.
00:17 jnthn That is what .WHO does, yes?
00:17 TimToady that's still the package of the object, not the package of the current class
00:18 jnthn Oh, wait, do you mean the package of the class we're currently in?
00:18 TimToady if there were a $?PACKAGE then you could just $?PKGAGE::<$myvar> or some such in an rw accessor
00:18 TimToady yes, lexically
00:18 TimToady er, no
00:18 TimToady nevermind, that won't work either
00:18 jnthn I seem to have vague recollections of implementing $?PACKAGE
00:19 jnthn rakudo: class Foo { say $?PACKAGE }
00:19 p6eval rakudo fe6dd2: Symbol '$?PACKAGE' not predeclared in <anonymous> (/tmp/rJNqazbyIh:2)␤in Main (file <unknown>, line <unknown>)␤
00:19 jnthn aww, fail.
00:19 jnthn rakudo: class Foo { say ::?PACKAGE }
00:19 TimToady what we need is in $fido.MAMMAL::speak() to find out MAMMAL
00:19 p6eval rakudo fe6dd2: ResizablePMCArray: Can't pop from an empty array!␤in Main (file <unknown>, line <unknown>)␤
00:19 TimToady and that's neither the type of $fido nor the lexical type
00:19 jnthn Oh! Error is srsly bad! Has to have exclamation mark!
00:19 TimToady it's the effective type as seen by submethods
00:20 jnthn Where MAMMAL is?
00:20 jnthn Parent class?
00:21 * jnthn is confused by the "as seen by submethods" comment
00:21 TimToady $fido.MAMMAL::myvar = 42;  # set $MAMMAL's $myvar, not $fido's
00:21 TimToady when you do a BUILDALL, it's calling BUILD submethods on the actual "current" type
00:21 Whiteknight joined #perl6
00:21 jnthn Ah, OK.
00:23 dukeleto joined #perl6
00:23 dukeleto parrot github mirror is synced again!
00:23 jnthn rakudo: class Foo { method bar { say 42 } }; class Baz is Foo { method bar { say 100 } }; Baz.new.bar; Baz.new.Foo::bar
00:24 jnthn Something like this?
00:24 jnthn ...
00:24 p6eval rakudo fe6dd2:  ( no output )
00:24 jnthn ...evalbot fail...
00:25 TimToady how does the default BUILD work if a class doesn't define one?
00:26 jnthn Magically... Let me check.
00:26 jnthn oh heh
00:26 jnthn Essentially, BUILDALL sets $*CLASS.
00:26 jnthn And it goes off introspection metadata.
00:27 TimToady if it calls Object::BUILD, the way that Object::BUILD knows it's in Foo:: rather than Baz or Object is the kind of magic we're looking for
00:27 jnthn Yeah
00:28 jnthn Well, in this case BUILDALL puts the current thing it is inside a contextual variable, and Object::BUILD just looks that up.
00:28 TimToady if *that* piece of info can be traced to Foo's package, then we can store quietfanatic's class variables in it
00:28 TimToady and have a single accessor in the base class that knows which class it was invoked on behalf of
00:29 TimToady a contextual would be sufficient for this, I suspect
00:29 TimToady what's the name of it?
00:29 jnthn At the moment, it's just stored as $class - it actually pre-dates Rakudo having proper context var support.
00:29 TimToady something on the order of effective class...
00:29 jnthn erm, $CLASS
00:30 TimToady ECLASS maybe
00:30 TimToady like egid etc
00:30 jnthn I'd have to call it $*CLASS - but again, it only solves the issue for build.
00:30 jnthn Yeah.
00:30 jnthn But where would it be set?
00:30 jnthn That is, what would set $*ECLASS?
00:30 * jnthn thinks he's missing something
00:30 jnthn I mean, in the case of BUILD, BUILDALL is setting it.
00:30 TimToady presumably the dispatcher, but maybe only the .* dispatcher
00:31 TimToady or the .? dispatcher...
00:31 jnthn Or .+
00:31 jnthn Hmm
00:31 jnthn Yeah
00:31 jnthn "Which class did I find this in?"
00:31 TimToady the dispatcher has to know which parent class it's poking around in anyway
00:31 TimToady not which class I found it in
00:32 TimToady or you have to write the same method in all the classes
00:32 jnthn Ah
00:32 TimToady it's the class I'm looking in
00:32 TimToady assuming I can inherit one method to do it for every class
00:32 TimToady that might be a bad assumption, of course
00:32 jnthn So in class A { method foo { } }; class B is A { }; B.foo
00:33 jnthn So here, inside foo, in this call $*ECLASS would be B?
00:33 jnthn But that'd just we self.WHAT...
00:33 jnthn So I think I'm still missing the point.
00:34 TimToady unless you say B.A::foo()
00:34 TimToady and then it's A
00:34 jnthn Right, cus then we grabbed A and did the dispatch from it's point of view.
00:34 TimToady but maybe we're talking about a replicated submethod rather than normal inheritance here
00:35 TimToady or some role that mixes into each child class
00:35 jnthn Hmm
00:35 jnthn Unless this can become a generalization of some kind, it really feels to me like it belongs in a module.
00:36 TimToady which makes a little more sense, since roles are more about implementation, and use of inheritance to share implementation is kinda bogus anyhow
00:36 jnthn Yeah
00:36 jnthn A way of saying "do this role, but also anyone who subclasses me should individually do it themselves too"
00:37 TimToady yes
00:37 TimToady that feels a lot cleaner to me somehow
00:37 jnthn That's a more interesting general mechanism.
00:37 jnthn Yeah
00:37 jnthn I mean, I can actually see how I'd implement that sanely.
00:37 Wolfman2000 *yawn* evening. I'll get back to grammar in a few minutes
00:37 jnthn The $*ECLASS was like...argh...I don't want to make every dispatch pay to set up this...
00:37 TimToady nodnod
00:38 orafu joined #perl6
00:39 jnthn It does beg the question of whether the HOW API would want to include a "oh hai you just got subclassed" hook...
00:39 TimToady or maybe it's a different declaration, supermethod or some such instead of submethod
00:39 TimToady clubmethods :)
00:39 jnthn genecitmethod
00:39 jnthn ('cus all your kids get it too)
00:40 TimToady as in 'join the club!'
00:40 jnthn Hmm
00:40 TimToady or I'll club you
00:40 jnthn :-)
00:40 jnthn After the phasers, no name we come up with today is going to seem good anyway. :-)
00:41 jnthn Thing is though
00:41 jnthn It's not just a method we want.
00:41 jnthn It's some state too I guess.
00:41 jnthn I mean, sure, a method could use a state var for that.
00:41 jnthn The "a role mixed into all" gives possibility to mix in state as well though.
00:42 TimToady troonuff
00:42 diakopter UR_PREGNANT
00:48 Wolfman2000 Alright, silly question. feather.perl6.nl's page says that we can update the website to improve it. I can't seem to do so without an a PUGS svn account. I mainly want to keep the website validated properly. How can I do so?
00:49 Juerd You could ask for a Pugs commit bit.
00:49 Wolfman2000 ...alright, I'll bite.
00:49 Wolfman2000 Juerd: Can I please have a commit bit for Pugs?
00:49 TimToady /msg your email and preferred svn nick
00:50 Wolfman2000 TimToady: to who? You or Juerd?
00:50 TimToady me works
00:50 Wolfman2000 Alright
00:50 Juerd I seem to have misplaced my password
00:51 Wolfman2000 Ouch...not good
00:51 Juerd Depends on whether I actually misplaced it, or just forgot :)
00:51 TimToady sent
00:51 Wolfman2000 Nice...I can set my own password instead of being told what mine is for the world to see
00:51 TimToady it's customary to add yourself to AUTHORS as a first commit to test it
00:52 Wolfman2000 TimToady: Let me find the AUTHORS page then
00:52 TimToady in the top dir
00:52 jnthn Wolfman2000: It's just AUTHORS in the root of the Pugs SVN repo, IIRC.
00:52 Wolfman2000 ...wow...what was my CPAN id?
00:52 TimToady I don't remember mine...
00:53 Wolfman2000 okay, found mine. Now if only I remembered how to log ON to cpan
00:54 Wolfman2000 ah: pause.perl.org
00:55 Juerd I, I knew my password but not my email address :)
00:55 pugs_svn r29011 | jafelds++ | Traditional first commit: mainly here to keep the website validated and such.
00:55 Juerd Anyone else want a commit bit? :D
00:56 Wolfman2000 ...oh joy. My password can only be stored unencrypted
00:57 Juerd That's why you chose a unique password that doesn't look like any other password you're using, right?
00:57 Wolfman2000 I'd rather not answer that question.
00:59 pugs_svn r29012 | jafelds++ | The start of better validation.
01:01 Wolfman2000 ...I must realized. no karma will be attributed to me for this. oh well. I'll earn it
01:02 jnthn Wolfman2000++
01:02 jnthn ;-)
01:03 jnthn Wolfman2000: I think carlin++ is working on a karmabot that will allow linking of multiple nicks.
01:03 Wolfman2000 jnthn++: thanks anyway. I'll have to let my Perl 6 work do the talking.
01:03 Wolfman2000 jnthn: That's...interesting to hear.
01:03 jnthn Wolfman2000: Most interesting is that he's writing it in Perl 6. :-)
01:04 Wolfman2000 I don't think my copy of XChat will work with Perl6
01:07 jnthn Wolfman2000: No, no - the bot just connects to the channel.
01:07 jnthn Like lambdabot that tracks karma today.
01:08 jnthn But it doesn't know the multiple nicks trick.
01:08 Wolfman2000 ...okay, I know the end of the index page said it syncs itself every five minutes...it's been nearly 10, and I'm not seeing my change.
01:09 jnthn http://perl6.org/about/ says 15
01:10 pugs_svn r29013 | jafelds++ | Every 15 minutes according to jnthn++.
01:10 hercynium joined #perl6
01:17 Wolfman2000 ...sure seems to hate me right now
01:20 TimToady CAN NOT HAZ UPDATE
01:21 Wolfman2000 TimToady: in non lol cats speak, correct.
01:22 Tene masak: ping
01:22 masak Tene: pong.
01:22 Wolfman2000 okay, seriously going to grammar now. I think I know of something simple to do.
01:23 Tene masak: i see you blog posts about proto... looks like you're trying to use proto to install rakudo, and it's not working, or something?  I'm wondering why you don't just use plumage instead.
01:24 TimToady you'd think feather2 would be able to update from feather...
01:25 * TimToady suspects perl6.org's updater is busticationalized
01:26 Wolfman2000 TimToady: In plain english, you mean not working?
01:26 TimToady what is this plain english of which you speak?  :)
01:26 masak Tene: actually, I'm helping mberends++ land his branch in proto.
01:27 TimToady we may need to hunt down someone with feather2 access
01:27 Wolfman2000 ...and why am I not surprised? S05 is not helping me
01:27 TimToady well, S05 was half written by an Aussie...
01:27 masak Tene: I know too little about plumage. does it install the 42 projects proto installs?
01:28 TimToady and the other half is just random notes to ourselves...
01:28 Wolfman2000 I'll start with a simple one (hopefully). What's the difference between a rule and a token?
01:28 TimToady a rule defaults to :sigspace, a token doesn't
01:28 TimToady both rules and tokens default to :ratchet, but a regex doesn't do either of those
01:29 Wolfman2000 And what is the :sigspace adverb?
01:29 TimToady makes whitespace to smart matching instead of being ignored
01:29 Tene No, but it does install several Parrot extensions.  It would be really cool to get the proto people and the plumage people talking together sometime.  Plumage wants to be able to install HLL libraries eventually, iirc.
01:29 masak Wolfman2000: when I learned that, I made everything 'regex' until I realized I needed 'token' somewhere. and then I kept them as 'token' until I realized they should be 'rule'. with more experience, one can take shortcuts, of course.
01:30 masak Tene: yes. I believe a lot more in plumage than in proto, long-term.
01:30 japhb Tene, masak: Plumage has a WIP proto importer.  It's basically stalled on proto's installed modules branch.
01:30 Tene Heh, nice.
01:30 masak japhb: wow! excellent!
01:30 japhb When that branch lands, I can then finish the proto importer, and foom!  ;-)
01:31 jnthn Wolfman2000: I did write some slides on some basic Perl 6 regex / grammar bits. From slide 78 in http://www.jnthn.net/papers/20​09-npw-perl6express-slides.pdf
01:31 Wolfman2000 The Perl 6 express
01:31 Wolfman2000 nice title and picture
01:31 Wolfman2000 alright, may as well see the rest of your slides
01:31 jnthn Wolfman2000: It was a talk I wrote to cover lots of Perl 6 ground quite quickly.
01:32 Wolfman2000 lol: beer price versus Scandinavia
01:32 Juerd I've had a look on feather2 and can't see anything weird.
01:32 japhb masak, I noticed your last couple blog posts were on proto.  Are you planning to drive that branch to completion in the next couple days?
01:32 Juerd It uses svn
01:32 Wolfman2000 ah, so that's what PIL is. The intermediate language...in semi assembler.
01:33 Juerd What's changed on perl6.org?
01:33 Wolfman2000 Juerd: just index.html
01:33 masak japhb: dunno. if there's a great desire for it, maybe. my real focus is on November, but some tasks really depend on that branch landing. see http://use.perl.org/~masak/journal/39825
01:33 Wolfman2000 did some HTML validation cleanup, and made it say it syncs itself every 15 minutes (thank jnthn for that one)
01:34 Juerd It does sync, but from svn
01:34 masak hm. that post didn't really explain what I thought it would.
01:35 Wolfman2000 I don't think I'm following. It does syncing after committing...how come my browser isn't showing my changes?
01:35 masak anyway, having the installed-modules branch land would mean that we can start doing nightly test smokes of all Perl 6 applications.
01:35 pugs_svn r29014 | lwall++ | [S05] remove :panic
01:35 Juerd Wolfman2000: Apparently your change didn't get into svn somehow
01:35 japhb Nodnod
01:35 Wolfman2000 even with pugs_svn claiming it did?
01:35 japhb masak, which would be a very good thing
01:35 TimToady Juerd: I saw it show up here
01:35 TimToady under svn
01:36 Juerd Strange. Did you change source/index.html?
01:37 Wolfman2000 Juerd: no. That wasn't the file that contained the text
01:37 TimToady docs/feather/index.html
01:37 Juerd Er
01:37 Juerd I thought you were editing perl6.org :)
01:37 Juerd Don't know where I got that idea from
01:38 Wolfman2000 I'll clean up that page later if I have to
01:38 Wolfman2000 for now, starting small
01:38 masak japhb: yes, and fun!
01:38 jnthn Oh, I'd thought it was perl6.org too :-)
01:38 jnthn Oops.
01:38 masak japhb: presently, we catch those regressions manually. imagine a smoke test doing it for us. :)
01:38 Wolfman2000 ...
01:39 Wolfman2000 I'm not editing perl6.org just yet. I'm not that crazy.
01:39 Wolfman2000 Take it a step at a time
01:40 * japhb imagines smoke tests for not only all Rakudo projects, but all *Parrot* projects ....
01:40 Juerd feather.perl6.nl runs on feather1, not feather2
01:40 Juerd And to be honest, I really have no idea how that works
01:40 Juerd Even though I built it originally.
01:41 Wolfman2000 So...we have no way of knowing how long it takes to sync
01:41 Wolfman2000 Because it's been over 40 minutes
01:42 Juerd I can't find how it's supposed to be synced
01:43 Wolfman2000 Hopefully I didn't break it
01:43 Juerd Last change was januari 11.
01:43 Wolfman2000 ...and it's close to January on the other end
01:43 Juerd The files in this directory (and any sub-directoris) from the website
01:43 Juerd http://feather.perl6.nl and are automatically sync'd by the feather
01:43 Juerd server. So any updates committed here will be applied in 5 minutes or so.
01:43 Juerd says README
01:43 Juerd ...but how?
01:44 TimToady lost cron entry, perhaps
01:44 Juerd TimToady: Even then, I'd expect a .svn directory or something like it.
01:44 TimToady was it setup before feather split up?
01:44 jnthn Juerd: Maybe it svn exports into the directory.
01:45 jnthn Well, maybe it did. ;-)
01:45 Wolfman2000 ...wasn't expecting to help out in this regard.
01:45 Juerd jnthn: Possible, but from where? :)
01:46 Juerd TimToady: Long before.
01:46 TimToady maybe it was a symlink once upon a time, and got duped?
01:46 Juerd and it was changed by someone, at some point in time, because the way I had done it was ugly.
01:46 Juerd It's still a symlink
01:46 Juerd lrwxrwxrwx 1 root oot 31 aug 23  2006 www -> /home/audreyt/pugs/docs/feather
01:47 TimToady did you look at audreyt's crontab?
01:47 Wolfman2000 ...we can each have our own crontab?
01:47 TimToady yes
01:47 Juerd I'll svk up audreyt's ~/pugs and see if that helps
01:47 TimToady say "crontab -l"
01:47 Wolfman2000 I'm liking Feather more and more.
01:48 Wolfman2000 no crontab for me
01:48 TimToady you can make one with crontab -e
01:48 Juerd Wolfman2000: The problem with all these freedoms is that when something breaks and the person who originally made it work is no longer around, we're in trouble because everything's under-documented by default :)
01:48 Wolfman2000 ...
01:48 Wolfman2000 VI!!!!!!!!!!!!!!!!!!!!!
01:49 Juerd And sometimes the one who built it is still around but nobody remembers who it was, including the original creator :)
01:49 Juerd Wolfman2000: 6?
01:49 Juerd Heh. 35 conflicts found.
01:49 TimToady Wolfman2000: you can set VISUAL or EDITOR to something else
01:49 Juerd audreyt's pugs dir sure hasn't changed in a long while.
01:49 Wolfman2000 TimToady: I'll have to now.
01:50 jnthn Wolfman2000: The most important command you need to do is :q
01:50 jnthn If that doesn't work, :!q
01:50 Wolfman2000 jnthn: I remembered that one at least
01:50 Juerd Okay
01:50 jnthn If that doesn't work, panic.
01:50 jnthn :-)
01:50 Juerd So, er... index.html has changed
01:50 TimToady well, ZZ works fine too
01:50 TimToady if you have to remember one
01:50 Juerd If someone would like to sort out this mess and figure out a way to get things syncing again... yes, please! :)
01:51 * jnthn wonders if the first thing most people learn about vi is how on earth to get out of it when they unexpectedly landed there. :-)
01:51 Wolfman2000 jnthn: probably
01:51 jnthn It was for me!
01:51 Juerd jnthn: At least vim *says* how to get out, on first start.
01:51 jnthn Juerd: Wow, it really is improved! :-)
01:51 Wolfman2000 Juerd: I didn't get that
01:51 Juerd Wolfman2000: Which that would that be?
01:52 Wolfman2000 didn't get told how to quit when I loaded up vi via crontab
01:52 Juerd I said vim, not vi
01:52 Juerd Vim is vi-improved :)
01:52 * Wolfman2000 will just keep his nano.
01:53 Wolfman2000 If you're going to get me to learn any of those, it will be emacs. I at least found that one semi workable
01:53 TimToady Juerd: I think it only does that if you start it without arguments
01:53 Juerd You will some day encounter a system with nothing but vi, and 'nano' aliased to vi, 'emacs' aliased to vi, etcetera.
01:53 Juerd Better learn how to use it :)
01:53 TimToady I used to use emacs, but my pinky finger wore out
01:53 Juerd TimToady: Oh, it seems it does.
01:54 Juerd TimToady: Which digit do you use for Esc then?
01:54 Wolfman2000 So among the things I will learn from this room...Perl 6, Web.pm, Grammars, Classes, and Vi(m)
01:54 * Juerd uses his middle finger for Esc
01:54 Wolfman2000 Shall I add more to this list?
01:54 jnthn Lol speak.
01:54 TimToady actually, I type CAPSLOCK-[ for that, Juerd
01:54 Wolfman2000 jnthn: ...right
01:54 Juerd TimToady: Funny- I have my capslock mapped to the compose key
01:55 jnthn :-)
01:55 * Juerd grew up with Ctrl in the wrong place, and got used to that
01:55 TimToady that's right menu key for me :)
01:55 Juerd jnthn: :þ
01:55 TimToady thorn makes a great tongue
01:55 Juerd TimToady: I used to have it there and then I started using laptop keyboards.
01:56 TimToady this *is* a laptop...
01:56 Juerd TimToady: And my first Thinkpad didn't have any windows keys. So I started using the right Alt instead
01:56 TimToady I've used that in the past
01:56 Juerd Recently, I found that I could have the Esperanto letters ĉĵĝŝĥŭ with altgr, but it meant I had to move the Multi_key/compose thing to another key.
01:57 TimToady Wolfman2000: you will also learn linguistics, probably
01:57 Juerd This laptop has a menu key but it's really small and none of my fingers really likes it.
01:57 Wolfman2000 My laptop is a Macbook Pro: I can get many characters by holding Alt and typing a key.
01:58 TimToady I just wish I could get my windows-waving-flag button to do something sane
01:58 Wolfman2000 «+» I will have to take advantage of the meta operators like that on the left
01:58 Juerd This layout has dead keys in the right alt, and now esperanto letters too.
01:58 Juerd TimToady: Anything sane?
01:58 Juerd TimToady: I find it the perfect key for moving windows.
01:59 Juerd I used to use the default setting, alt, for that, but then Inkscape had some trick that required the alt key.
01:59 Wolfman2000 Hmm...the regex syntax has changed slightly
01:59 Juerd Wolfman2000: Only slightly ;)
02:00 Wolfman2000 rakudo: regex Year { \d{4} }; if "2009" ~~ /<Year>/ { say "Good to go!"; } else { say "BAD Wolfman!"; }
02:00 p6eval rakudo fe6dd2: Confused at line 2, near "4} }; if \""␤in Main (file <unknown>, line <unknown>)␤
02:00 Wolfman2000 rakudo: regex Year { \d**4 }; if "2009" ~~ /<Year>/ { say "Good to go!"; } else { say "BAD Wolfman!"; }
02:00 p6eval rakudo fe6dd2: Good to go!␤
02:00 masak Wolfman2000: \d ** 4
02:00 Wolfman2000 I thought ** was supposed to be exponent?
02:01 masak Wolfman2000: yes, outside of regexes.
02:01 masak Wolfman2000: inside them, they mean repetition.
02:01 Juerd What's \d to the power of 4? :)
02:01 masak \d\d\d\d :)
02:01 Wolfman2000 Right, right...okay, is it still possible to declare at least x but not more than y somehow?
02:01 masak one of those examples of 'strange consistence'.
02:02 Juerd Wolfman2000: **{x,y}
02:02 TimToady this might be one situation where it would make sense to read the original Apocalypse first, since regex change was fairly radical
02:02 TimToady that would be http://dev.perl.org/perl6/doc/design/apo/A05.htm
02:02 TimToady er, html
02:02 masak Juerd: **{x .. y}, surely?
02:02 Wolfman2000 rakudo: regex Year { \d**{4} }; if "2009" ~~ /<Year>/ { say "Good to go!"; } else { say "BAD Wolfman!"; }
02:02 p6eval rakudo fe6dd2: Good to go!␤
02:02 Juerd masak: Oh! Yes!
02:02 Wolfman2000 ah...that explains that
02:02 masak or without the braces, **x..y
02:02 Juerd That feels... wrong.
02:02 Wolfman2000 without the braces? Agreed
02:03 masak to each his own. :)
02:03 TimToady but the closure actually executes code, so the braceless form is better for constants
02:03 Wolfman2000 And I've already forgotten who gave the Perl 6 express slides...it barely talks about grammars
02:03 jnthn Not me, because I woudln't give you anything that's not useful.
02:04 Wolfman2000 The slides are useful: don't get me wrong
02:04 Juerd Don't get me wrong, I love that there's a way to get rid of those ugly {}.
02:04 jnthn Wolfman2000: OK, here's the secret.
02:04 Wolfman2000 it just has a section for regex and grammars, yet barely talks of the latter
02:04 Juerd And I will use it a lot.
02:04 Wolfman2000 a secret? ooh...
02:04 jnthn Wolfman2000: You now know from the slides that you can write regexes with names, and you can call one from another, yes?
02:04 Juerd But the precedence is not the most intuitive. I'll get used to it :)
02:04 Wolfman2000 jnthn: yes
02:05 jnthn Wolfman2000: If you think about the relationship between a method and a class, then it's the same here. A grammar is essentialy just a collection of named regexes, like a class is a collection of named methods.
02:06 Wolfman2000 ...we just now have the ability to store regexes into their own variables.
02:06 jnthn OK, but you can also do inheritance of grammars.
02:06 jnthn So you can take a collection of rules to parse something and extend it.
02:07 Wolfman2000 ...wait. if a grammar is a collection of regexes/tokens...how do I know which is the main regex that is parsed?
02:07 jnthn You call it TOP.
02:07 jnthn That is then the "entry point" to the grammar.
02:07 TimToady or call .parse with an arg that says where to start
02:08 jnthn So if you do Grammar.parse($text) it'll start at the TOP rule.
02:08 jnthn And give you back a parse tree.
02:08 Juerd Why was it called TOP, not MAIN?
02:08 Juerd Or why was MAIN not called TOP? :)
02:08 TimToady to avoid confusion with MAIN
02:08 Wolfman2000 jnthn: all it said back was my variable name.
02:08 TimToady to avoid confusion with TOP :P
02:09 jnthn Wolfman2000: The other interesting thing I can point you at is http://github.com/perl6/book/​blob/master/src/grammars.pod - it's from a work in progress book.
02:09 Juerd Hmm
02:09 Juerd I have to think about this.
02:09 Juerd Good night :)
02:09 Wolfman2000 jnthn: I have that book right now
02:09 TimToady sleep on it!
02:09 Juerd On top?
02:09 TimToady mainly
02:09 Wolfman2000 Juerd: I'm guessing the website syncing is still busted...that's fine: I can wait.
02:09 Juerd Wolfman2000: Yes, it is.
02:09 Juerd Wolfman2000: I've synced manually
02:09 jnthn Wolfman2000: The regexes chapter is also probably interesting for you. :-)
02:10 jnthn Wolfman2000: By the way, any typos or issues you spot in the text are very worth reporting.
02:10 Wolfman2000 Juerd: Please let me know when automatic syncing comes back.
02:10 Juerd Someone who feels competent enough can request sudo access to fix it permanently
02:10 Wolfman2000 jnthn: Haven't found any yet.
02:10 jnthn :-)
02:10 * Wolfman2000 is not THAT competent.
02:10 Juerd Wolfman2000: I have no idea when it will. I'm not going to do it :)
02:10 Juerd This is one of those things that looks simple. Too simple.
02:11 TimToady he didn't say you had to be that competent, just feel that competent :)
02:11 Wolfman2000 TimToady: I may feel competent, but I don't want to be the one that hoses everything.
02:11 Juerd Don't you want to be remembered by an entire community? :)
02:12 Wolfman2000 Juerd: Not in a bad way.
02:12 TimToady another thing we usually point out when handing out commit bits is that we run on Forgiveness Rather Than Permission here
02:12 Juerd We have backups, Wolfman2000
02:12 TimToady that's why it's under svn :)
02:12 Juerd If you screw up royally, I'll just set back the time for those folders.
02:12 Wolfman2000 The other thing...I'm not too familiar with syncing automatically. No clue if it's cron or something else that does it
02:12 sjohnson rakudo:  my $str = "moose";  if $str ~~ m/^[^se]/ { print "good"; }
02:12 p6eval rakudo fe6dd2:  ( no output )
02:13 sjohnson rakudo:  my $str = "moose";  if $str ~~ m/^{^se}/ { print "good"; }
02:13 p6eval rakudo fe6dd2: Syntax error at line 2, near "}/ { print"␤in Main (file <unknown>, line <unknown>)␤
02:13 Juerd TimToady: Actually fixing this requires messing around in unversioned parts of the system. That's also why there's no log of how these things are done (!@#!@$!%!#@%!@)
02:13 Juerd Of course, the one who fixes it could choose to expand the influence of revision control on feather :)
02:13 TimToady std: my $str = "moose";  if $str ~~ m/^{^se}/ { print "good"; }
02:13 p6eval std 29014: Undeclared routine:␤  se used at line 1␤ok 00:02 114m␤
02:14 Juerd But there's a small chicken/egg problem involved then.
02:14 pointme joined #perl6
02:14 zaslon joined #perl6
02:14 mubot joined #perl6
02:15 TimToady sjohnson: you're looking for <-[se]> I think
02:15 sjohnson you are probably right... whatever [^se] in p5 was
02:15 zaslon loljnthnhazblogged! jnthn++ 'More Rakudo ng hacking': http://use.perl.org/~JonathanWor​thington/journal/39856?from=rss
02:15 jnthn TimToady: Does [^...] have some special meaning?
02:15 jnthn std: /[^se]/
02:15 p6eval std 29014: ok 00:01 103m␤
02:16 TimToady sure, it match beginning of string followed by 'se'
02:16 jnthn Oh!
02:16 jnthn My excuse is that it's 3:15am. :-)
02:16 sjohnson TimToady: i was hoping for a "not s" and "not e"
02:16 TimToady that's what <-[se]> means
02:17 jnthn sjohnson: That's <-[se]> now - [...] is for grouping, not character class, in Perl 6.
02:17 sjohnson thanks
02:17 sjohnson [a|b|c]
02:17 jnthn (it'd woulda been correct Perl 5)
02:17 jnthn [a|b|c] and <[abc]> are equivalent (probably always...)
02:17 TimToady sjohnson: that's almost backportable to Perl 5, if you don't mind matching | too :)
02:17 lisppaste3 wolfman2000 pasted "Need to re-learn the tokens. How do I select either dash or space?" at http://paste.lisp.org/display/89925
02:18 Wolfman2000 Well, hopefully I will get this figured out.
02:18 jnthn Wolfman2000: (' ' | '-') would do it.
02:18 sjohnson TimToady: this new regex system is pretty sweet.  i was considered the $1 and $2 forced "stuffing" when using normal (a|b|c) regex a bit unwanted
02:19 Wolfman2000 jnthn: compilation failed
02:19 sjohnson now it looks like i can grab $0 vars with () and match or's with [] without saving the contents
02:19 eiro joined #perl6
02:19 sjohnson <3
02:19 Juerd afk &  # z
02:19 jnthn orly?
02:19 jnthn std: token sep { (' ' | '-')**{1} };
02:19 p6eval std 29014: ok 00:01 107m␤
02:20 Wolfman2000 perl6regex parse error: Error in closure quantifier at offset 59, found ' '
02:20 TimToady um **{1} is a no-op
02:20 sjohnson jnthn: yip yip yip
02:20 jnthn Wolfman2000: Yeah, actually you could just have token sep { ' ' | '-' } :-)
02:21 Wolfman2000 still get the parse error
02:21 Wolfman2000 probably my TOP is wrong then
02:21 jnthn Oh, maybe it's the TOP rule that has the error?
02:21 Wolfman2000 it's the same error as what I just said
02:21 Wolfman2000 token TOP { <U5>(<sep><U4>)**{0 .. 1} }  <-- that's my TOP
02:21 jnthn Try **0..1 (without the closure)
02:22 sjohnson Q:  is it true, that if we dont have unicode french quotes handy, we can type two angle brackets, <<, instead?
02:22 TimToady try ?
02:22 sjohnson for word boundaries?
02:22 Wolfman2000 jnthn: no errors, but...I didn't get my zip code back
02:22 TimToady ? means **0..1
02:22 jnthn TimToady: Well, and that. :-)
02:22 * jnthn really isn't helping much here.
02:23 Wolfman2000 TimToady++: The ? seemed to have done it
02:23 Wolfman2000 It wasn't liking **0 .. 1
02:23 TimToady probably wants ** 0..1
02:23 TimToady no spaces around the ..
02:23 am0c joined #perl6
02:23 TimToady otherwise it thinks you're trying to match two dots
02:24 Wolfman2000 Is there a quick list of the \whatevers for Perl 6? I don't think all are the same from Perl 5
02:24 TimToady S05:1718
02:26 Wolfman2000 ...and here's the part where I have check the log
02:27 Wolfman2000 ...how did \p become all alpha characters?
02:27 TimToady std: /\p/
02:27 p6eval std 29014: [31m===[0mSORRY![31m===[0m␤Unrecognized regex backslash sequence at /tmp/JsIPul2izx line 1:␤------> [32m/\[33m⏏[31mp/[0m␤FAILED 00:01 104m␤
02:27 TimToady beats me
02:28 Wolfman2000 BTW:chrome script keeps on trying to continue even after I tell it to stop
02:29 jnthn OK, sleep time for me.
02:29 jnthn Night all
02:29 TimToady it's not written clearly, it's trying to point out that p5's \pL is like <alpha>
02:30 Wolfman2000 ...wait. I can just use <alpha> to match A..Za..z?
02:30 TimToady niteynite
02:30 TimToady rakudo: say "123abc456" ~~ /<alpha>+/
02:30 p6eval rakudo fe6dd2: abc␤
02:31 TimToady but, of course, that's in the previous section that you didn't read yet :P
02:32 TimToady if you want to write grammars, I'd suggest at least skimming the first half of S05 completely
02:33 lisppaste3 wolfman2000 annotated #89925 "feather/jafelds/grammars/postal.pl here. Let's see you guys improve this one." at http://paste.lisp.org/display/89925#1
02:33 sjohnson TimToady: will [a|b|c] in p6 actually match the pipes?
02:34 TimToady in perl 5
02:34 TimToady not in perl 6
02:34 sjohnson sounds good to me ^_^
02:35 TimToady Wolfman2000: if you're using <alpha> you probably want <digit> just for consistency
02:35 Wolfman2000 TimToady: I only used <alpha> because I couldn't remember the \{whatever} needed for alpha
02:35 Wolfman2000 Still...good point
02:35 TimToady there isn't a \whatever for alpha in Perl 6
02:36 TimToady in any case <alpha><digit><alpha> reads better, I think
02:37 Wolfman2000 saved on feather
02:37 Wolfman2000 And with that...my first grammar. :)
02:38 TimToady stylistically, it's a bit top-heavy
02:38 sjohnson TimToady: can you do :   while my $thing (<READ>) { } in p6?
02:38 sjohnson can't seem to do that in p5, yet $_ is still generated
02:38 TimToady I'd probably make a <us> and a <ca> rule
02:39 TimToady for $handle.lines -> $thing {...}
02:39 Wolfman2000 Hmm...probably a good idea. I'll do that shortly
02:39 masak sjohnson: I think you want for $fh.lines -> $thing { ... }
02:40 TimToady I think someone left a loopback on the phoneline...
02:40 eternaleye joined #perl6
02:41 carlin mubot: link Wolfman2000 jafelds
02:41 mubot jafelds is now an alias for Wolfman2000 (Wolfman2000 will gain any karma given to jafelds)
02:41 carlin mubot: karma jafelds
02:41 mubot Wolfman2000 has a karma of 2
02:41 Wolfman2000 ...seems like I lost karma then
02:41 Wolfman2000 mubot: karma
02:41 mubot zev: 2 | yo: 2 | yitz: 2 | yi: 2 | xmonad: 2 | xkcd: 2 | wormhole: 1 | wollmers: 19 | wli: 3 | whiteknight: 6 | wayland76: 10 |
02:41 Wolfman2000 mubot: karma wolfman2000
02:41 mubot wolfman2000 is of an unknown quantity
02:41 carlin ignore that output :-)
02:41 Wolfman2000 mubot: karma Wolfman2000
02:41 mubot Wolfman2000 has a karma of 2
02:42 sjohnson ok
02:42 Wolfman2000 oh well
02:42 carlin @karma Wolfman2000
02:42 lambdabot Wolfman2000 has a karma of 3
02:42 * sjohnson is excited for new perl6 paradigms
02:42 Wolfman2000 ...that explains that
02:42 Wolfman2000 too many bots
02:42 carlin They're taking over
02:42 TimToady maybe we could get them in a recursive loop
02:43 * carlin begins writing SkyNet in Perl 6
02:43 lisppaste3 wolfman2000 annotated #89925 "Is this light enough for you TimToady++?" at http://paste.lisp.org/display/89925#2
02:43 masak carlin: release early, release often.
02:46 sjohnson @karma
02:46 lambdabot You have a karma of 3
02:46 Wolfman2000 While I get a quick refreshment...question for you guys. With Perl (5 or 6), what's your best syntax highlighter? What colors work best with what words/phrases? I'm curious on this one...
02:47 carlin mubot: karma sjohnson
02:47 mubot sjohnson has a karma of 3
02:47 sjohnson how does karma work?
02:49 sjohnson mubot: karma carlin
02:49 mubot carlin has a karma of 63
02:49 masak sjohnson: our actions ultimately reflect back on ourselves. that's the essence of it, I think.
02:50 sjohnson hmm, 3 karma might mean i've been bad :(
02:50 Wolfman2000 I'm relatively new, and I have 2 or 3 (depending on which bot)
02:50 sjohnson cursed to be reborn again, programming in PHP and javascript only
02:50 sjohnson (´ー` )
02:51 masak sjohnson: I don't think you're bad. I also think you know what attracts karma, and what doesn't.
02:51 masak sjohnson: I can tell you about the first time I got a masak-- :)
02:55 masak it was not because I forgot to run the spectests before pushing making a Rakudo commit; something I often do.
02:56 Tene what was it for?
02:58 masak sending this to p6eval (at that time, with Pugs): my $lang = "perl"; $lang++ for ^45565; say $lang;
02:59 masak rightfully subtracted karma, in retrospect. :P
03:00 sjohnson @karma TimToady
03:00 lambdabot TimToady has a karma of 75
03:00 carlin mubot: karma TimToady
03:00 mubot TimToady has a karma of 77
03:00 carlin Ha!
03:00 * Wolfman2000 doesn't care too much about karma...at least in terms of rankings anyway
03:01 carlin .oO ( I wonder how that happened? )
03:01 Wolfman2000 Hmm...alright, I see that svk is mentioned on feather. What I'm not understanding...if rakudo normally pulls parrot via svn, why is it suggested we pull parrot via svk?
03:05 masak Wolfman2000: svk used to be all the rage before git.
03:05 Wolfman2000 masak: Should I just stick with svn for pugs then?
03:06 masak Wolfman2000: I think you can do that, yes.
03:06 masak at least for now.
03:06 masak I have a select few subdirectories checked out via git-svn, but that's just because I expect to make changes there.
03:06 SmokeMachine joined #perl6
03:06 Wolfman2000 At least this way, I can stay synced with the bot in here
03:06 Wolfman2000 Now if only I can actually build pugs...
03:07 Wolfman2000 I don't think there is anything wrong with having both rakudo and pugs, but...it wants me to use $PAGER ./INSTALL, and I don't know what env variable that's supposed to be
03:07 masak & # going offline for a while, starting Firefox...
03:11 sjohnson cya masak
03:11 sjohnson oops
03:12 pugs_svn r29015 | jafelds++ | Remove commented/outdated code. Save the bandwidth of others.
03:12 Wolfman2000 ...is there a way we can make pugs_svn report the files that are changed?
03:13 colomon mubot: karma colomon
03:13 mubot colomon has a karma of 48
03:17 masak joined #perl6
03:20 NorwayGeek_ joined #perl6
03:32 _jaldhar joined #perl6
03:40 seanstickle joined #perl6
04:13 meppel joined #perl6
04:18 quietfanatic rakudo: class X {has $.x = 5}; multi trait_mod:<is> ($newclass, X) {say 'Yes'; nextsame}; class Y is X {}; say Y.new.x;
04:19 p6eval rakudo fe6dd2:  ( no output )
04:19 quietfanatic # prints 5
04:20 quietfanatic rakudo: multi trait_mod:<is> (3, 4) {say 7}; 3 is 4
04:20 p6eval rakudo fe6dd2: Confused at line 2, near "is 4"␤in Main (file <unknown>, line <unknown>)␤
04:20 quietfanatic rakudo: multi trait_mod:<is> ($x, 4) {say 7}; my $x is 4
04:20 p6eval rakudo fe6dd2: Confused at line 2, near "is 4"␤in Main (file <unknown>, line <unknown>)␤
04:21 Wolfman2000 Turning 3 into 4?
04:21 quietfanatic rakudo: multi trait_mod:<is> ($x, Int) {say 7}; my $x is Int
04:21 p6eval rakudo fe6dd2: 7␤
04:21 quietfanatic just looks like it
04:21 quietfanatic That works.
04:21 Wolfman2000 Not familiar with trait mods yet
04:21 quietfanatic rakudo: multi trait_mod:<is> ($x, Int) {say 7}; class X is Int {};
04:21 Wolfman2000 time out
04:21 p6eval rakudo fe6dd2:  ( no output )
04:21 Wolfman2000 ...holy crap, didn't time out
04:22 quietfanatic no output.  my trait_mod:<is> wasn't called
04:27 Wolfman2000 argh...I thought grammars would be easier than this. Paste coming.
04:27 quietfanatic rakudo: class X is 4 {}
04:27 p6eval rakudo fe6dd2: Unable to parse class definition at line 2, near "is 4 {}"␤in Main (file src/gen_setting.pm, line 1559)␤
04:27 quietfanatic rakudo: class X is asdfghk {}
04:27 p6eval rakudo fe6dd2:  ( no output )
04:28 quietfanatic What happened to "no candidates found for dispatch to trait_mod:<is>?
04:28 lisppaste3 wolfman2000 pasted "IP4Base1 isn't working for some reason. Haven't tested IP4Base2 yet." at http://paste.lisp.org/display/89930
04:28 masak quietfanatic: could it be that the 'is' of class declarations is handled by some special code path?
04:29 quietfanatic masak: That's what I'm thinking
04:30 masak given that that 'is' is much older than user-definable traits, it feels probable.
04:31 quietfanatic Wolfman2000: you could have a few more spaces in there for readability
04:31 masak Wolfman2000: I'm thinking some of those parentheses can be removed.
04:31 quietfanatic Wolfman2000: But I don't see anything wrong with IP4base1
04:31 Wolfman2000 quietfanatic: If nothing was wrong, I would have gotten $ip back on say
04:31 masak Wolfman2000: basically, all the parentheses that surround the entire expression inside the braces can be removed.
04:33 quietfanatic Wolfman2000: Are the (0..4) and (0..5) trying to be <[0..4]> and <[0..5]>?
04:34 Wolfman2000 quietfanatic: ...possibly. Still mixing up my syntax a bit it seems.
04:34 masak seems like it. but that rule is never used anyway in the test.
04:35 quietfanatic rakudo: say "yes" if "12" ~~ /<digit>**1..2/
04:35 masak I still don't see the error.
04:35 p6eval rakudo fe6dd2: yes␤
04:35 quietfanatic That part works
04:35 Wolfman2000 quietfanatic: Your suggestion did not work for IP4Base2
04:35 masak rakudo: token IP4Base { <digit>**1..2 }; say '103' ~~ IP4Base
04:35 p6eval rakudo fe6dd2: too few positional arguments: 0 passed, 1 (or more) expected␤in Main (file <unknown>, line <unknown>)␤
04:35 masak oh, right.
04:35 Wolfman2000 rakudo: say "yes" if "192" ~~ /1<digit>**2/;
04:35 p6eval rakudo fe6dd2: yes␤
04:35 masak rakudo: token IP4Base { <digit>**1..2 }; say '103' ~~ /<IP4Base>/
04:35 p6eval rakudo fe6dd2: 10␤
04:35 masak rakudo: token IP4Base { 1<digit>**1..2 }; say '103' ~~ /<IP4Base>/
04:35 p6eval rakudo fe6dd2: 103␤
04:36 Wolfman2000 ...not taking on my file.
04:36 quietfanatic That's another thing: you probably want ^ and $ around TOP to make it match the whole string only
04:36 masak rakudo: token IP4Base { <digit> ** 1..2 }; token IP4Base1 { 1<digit>**1..2 }; say '0.103' ~~ /<IP4Base>\.<IP4Base1>/
04:36 p6eval rakudo fe6dd2: 0.103␤
04:37 envi^home joined #perl6
04:37 lisppaste3 wolfman2000 annotated #89930 "Revised stuff so far. Last two tokens still borked on my end." at http://paste.lisp.org/display/89930#1
04:39 Wolfman2000 ...I wasn't expecting this to be this hard
04:40 masak it's trial and error, like everything else.
04:40 masak Wolfman2000: now the TOP rule looks a little suspicious.
04:40 tak11 joined #perl6
04:41 masak Wolfman2000: surely you mean to put <IP4>|<IP4> inside [] brackets?
04:41 masak otherwise the ^ will match only with <IP4> and the $ only with <IP6>.
04:41 Wolfman2000 token TOP { ^(<IP4>|<IP6>)$ };  <-- that's how it is now
04:41 masak or use [].
04:42 Wolfman2000 masak: I only want one <IP4>
04:42 masak since you're not going to use the numbered capture $0 for anything anyway.
04:42 masak Wolfman2000: the only difference between [] and () is that () captures its content into $0, $1, $2, etc.
04:42 Wolfman2000 ...oh great. don't tell me feather is going down again
04:43 Wolfman2000 masak++: Hmm...good point. *goes to change*
04:43 quietfanatic If only rakudo supported it, you could probably say "token IP4Block { <digit> ~~ 0..255 }"
04:43 quietfanatic *<digit>+
04:43 Wolfman2000 quietfanatic: ...you mean that is normally allowed?
04:44 quietfanatic Putting ~~ in a regex does another match inside a regex
04:44 quietfanatic and matching a number against a range checks that it's in that  range
04:44 * masak wonders whether nqo-rx will make that possible
04:44 quietfanatic But we can't do that yet
04:45 Wolfman2000 rakudo: token IP4Block { <digit>+ ~~ 0..255 }; say "yes" if "234" ~~ /<IP4Block>/;
04:45 p6eval rakudo fe6dd2:  ( no output )
04:45 Wolfman2000 :(
04:46 masak Wolfman2000: patience. :)
04:47 masak pmichaud++ and jnthn++ are working on their ng refactor.
04:47 masak basically, it's the big refactor which will make all the big promises for April/Rakudo Star possible to fulfill.
04:47 Wolfman2000 masak: the big refactor that is supposed to take place either this weekend or next?
04:48 Wolfman2000 rakudo: token Low { <[0..4]><digit> }; say "yes" if "43" ~~ /<Low>/;
04:48 p6eval rakudo fe6dd2: yes␤
04:48 masak Wolfman2000: it's taking place all the time, in a branch.
04:48 Wolfman2000 ...better have multiple tokens
04:48 masak Wolfman2000: it actually started over a month ago, when pmichaud went away to work on nqp-rx.
04:49 Wolfman2000 rakudo: token High { 5<[0..5]> }; say "yes" if "53" ~~ /<High>/;
04:49 p6eval rakudo fe6dd2: yes␤
04:49 Wolfman2000 ...how often should I update and recompile rakudo anyway, assuming master/main branch?
04:49 Wolfman2000 I wonder if a recent commit has this working
04:50 masak has what working?
04:50 Wolfman2000 yeah
04:51 masak no, I'm asking you. :)
04:51 quietfanatic I think your bug is a bug in Rakudo's regex engine
04:51 xpika joined #perl6
04:51 Wolfman2000 whose engine? p6eval's or mine?
04:51 quietfanatic Rakudo's
04:51 lisppaste3 wolfman2000 annotated #89930 "Focusing on IP4Base2: IRC works fine individually, my version does not." at http://paste.lisp.org/display/89930#2
04:51 masak quietfanatic: what makes you think that?
04:51 quietfanatic rakudo: token D { 1 <digit> <digit> | <digit> ** 1..2 }; say 123 ~~ /^<D>$/
04:51 p6eval rakudo fe6dd2: 123␤
04:52 quietfanatic but...
04:52 quietfanatic rakudo: token D { <digit> ** 1..2 | 1 <digit> <digit> }; say 123 ~~ /^<D>$/
04:52 p6eval rakudo fe6dd2: ␤
04:52 masak ooh!
04:52 * masak submits rakudobug
04:52 Wolfman2000 ...huh?
04:52 masak quietfanatic++
04:52 quietfanatic The order of terms around the | shouldn't matter
04:52 quietfanatic it should pick the longest one
04:52 Wolfman2000 ...they're in a different order...
04:53 quietfanatic but clearly here it is working in one order and not the other, so it's a bug
04:53 Wolfman2000 quietfanatic: Aren't both the same length when it deals with 123 though?
04:53 masak quietfanatic: Rakudo's engine doesn't pick the longest one yet.
04:53 quietfanatic <digit> ** 1..2 doesn't even match 123
04:53 quietfanatic well it does
04:53 quietfanatic but not the whole thing
04:53 Wolfman2000 quietfanatic: <digit>**1..2 should match 10-99
04:53 quietfanatic so I'm guessing it feels satisfied that it's matched the "12"
04:53 quietfanatic and pulls out of that token
04:54 masak Wolfman2000: actually, 00-99
04:54 Wolfman2000 masak: right, right...brain fart
04:54 quietfanatic only to find that there's no \. so it needs to backtrack into the token
04:54 Wolfman2000 ...AHA!
04:54 quietfanatic but token don't allow backtracking
04:54 base_16 joined #perl6
04:54 masak quietfanatic: there you go.
04:54 masak so, not a bug after all?
04:54 Wolfman2000 I still think it's a bug
04:54 Wolfman2000 let me get my next pastebin out
04:55 quietfanatic It wouldn't be a bug if it was || instead of |
04:55 quietfanatic I'm thinking since Rakudo can't do longest-token-matching, maybe | should fail at compile-time.
04:55 masak quietfanatic: well, Rakudo treats those two the same currently.
04:55 lisppaste3 wolfman2000 annotated #89930 "Have to have <IP4Base2> before <IP4Base>. I suspect this is a bug." at http://paste.lisp.org/display/89930#3
04:55 quietfanatic (as unimplemented)
04:56 Wolfman2000 Also...I've taken a look at the IPv6 spec. They're going to allow for too many shortcuts to make it easy to grammar it.
04:56 Wolfman2000 Guess that's part of the challenge
04:57 quietfanatic But it appears that your grammar does work when the order is changed.
04:58 Wolfman2000 But the order shouldn't matter.
04:58 quietfanatic So for now you have to make sure you put the things that'll be the longest first in your alternations
04:58 Wolfman2000 masak: Resume your rakudobug'ing
04:58 masak Wolfman2000: what quietfanatic said.
04:59 quietfanatic If it were me, I'd use || for all of them instead of |, to make sure I remember it's not longest-token matching
05:00 Wolfman2000 I recall | being "or" for regexing
05:00 Wolfman2000 I think I should stick with |
05:00 pmichaud ...bug in rakudo's regex engine?  hmm?
05:00 quietfanatic | is supposed to pick the longest one
05:01 pmichaud oh yes, known bug.
05:01 quietfanatic || tries the first one first and if it doesn't match it goes to the next
05:01 pmichaud rakudo doesn't implement longest token semantics yet.  never has.
05:01 lisppaste3 wolfman2000 annotated #89930 "Apparently the last block on IP6 addresses can contain <IP4>. *shrug*" at http://paste.lisp.org/display/89930#4
05:01 quietfanatic Actually a lot like the difference between | and || in regular Perl 6 code
05:02 masak quietfanatic: aye. I guess that's why | was changed the way it was.
05:02 Wolfman2000 masak, quietfanatic: let's settle this. Am I using | wrong?
05:02 pmichaud masak:  yes, that's exactly why
05:02 quietfanatic No.
05:02 pmichaud Wolfman2000: you're not using | wrong
05:02 pmichaud Wolfman2000: rakudo doesn't match the longest version (yet)
05:02 quietfanatic (Wolfman2000:)
05:02 pmichaud rakudo treats | exactly like || at the moment
05:03 Wolfman2000 ah
05:03 quietfanatic Rakudo is using | wrong :)
05:03 pmichaud so, it's up to you to put them in the correct sequence (if one is possible :-)
05:03 Wolfman2000 ...making a correct sequence for IP6 proper will be tricky
05:04 Wolfman2000 That could be a good teamwork assignment
05:04 Wolfman2000 http://en.wikipedia.org/wiki/IPv6#Addressing
05:05 quietfanatic Ah, pmichaud: does Rakudo skip calling trait_mod:<is> when executing "class X is Y {...}"?
05:07 pmichaud quietfanatic: no, I think it explicitly calls trait_mod:<is> when executing that
05:07 quietfanatic Hmm
05:07 pmichaud you'd have to ask jnthn++
05:08 quietfanatic alright
05:08 pmichaud but I'm pretty sure he made inheritance go through trait_mod:<is>
05:08 pmichaud I'm certain he's done so in the ng branch
05:09 eternaleye \o/
05:10 quietfanatic cool, I'm gonna have to get my paws on that sometime soon
05:11 masak ditto.
05:11 masak I've already compiled it once... but it's getting more interesting by the day.
05:12 Wolfman2000 ...yeah, I'll need assistance to implement IP6 grammars properly. IP4, I've got. URLs are simple. It will be the IP6 protocol that is the toughie.
05:12 quietfanatic pmichaud: oh you're right it does call that, I just wasn't specific enough in my overloading
05:12 Wolfman2000 I'd have to be able to have groups of normal blocks, at most one ::, and then more groups, but no more than a certain number on both sides.
05:13 quietfanatic nextsame doesn't work in it though :|
05:13 Wolfman2000 moritz_: I must apologize to you again. I thought IP addresses would be simple.
05:13 eternaleye Wolfman2000: Might I interest you int this beautiful and shiny <?{ ... }> ?
05:14 eternaleye Wolfman2000: It's a code assertion - it fails the match if the code segment returns false
05:14 pmichaud (the ng branch will have <?{...}>  very soon.  nqp already has it)
05:14 quietfanatic rakudo: 3 ~~ /<digit> <?{1}>/
05:14 Wolfman2000 eternaleye: Looks like a normal pair of braces...or a closure.
05:14 p6eval rakudo fe6dd2: Confused at line 2, near "?{1}>/"␤in Main (file <unknown>, line <unknown>)␤
05:14 quietfanatic bbrpt
05:15 eternaleye Wolfman2000: No, no, the <> and ? are part of the syntax for it
05:15 Wolfman2000 eternaleye: I assume you saw the wikipedia link I pasted in here.
05:15 Wolfman2000 Well...right now apparently rakudo doesn't offer that.
05:15 eternaleye you call it like / <digit>+ <?{ $<digit> <= 255 }> /
05:16 eternaleye Wolfman2000: Yeah, but it should be there soon via the ng branch
05:16 pmichaud definitely rsn
05:16 Wolfman2000 masak: At this rate, I'm wondering if Web.pm will be simpler. ;)
05:16 masak Wolfman2000: hardly. :)
05:17 Wolfman2000 masak: I meant simpler compared to the grammar struggles I've been having. Partly due to my lack of experience, and partly due to rakudo bugs
05:17 masak Wolfman2000: I'm going home to bake bread soon. did you see the extra two pages in the tutorial?
05:17 Wolfman2000 masak: I did not
05:19 eternaleye Wolfman2000: One way to do it would be /<ip6regex> <?{ $<ip6regex>.Str.split( /':'+/ ).elems <= $max_groups }>/
05:20 Wolfman2000 eternaleye: unsure if splitting by the plain ':' will work: '::' is technically made up of 2 or more consecutive 0 groups.
05:22 eternaleye Wolfman2000: so add in an if $<ip6regex> ~~ /'::'/ to decide what $max_groups shoul be
05:22 eternaleye If true, $max_groups -= 1
05:23 Wolfman2000 I said 2 or more, not 2
05:23 masak take care, people. see you tomorrow!
05:23 pmichaud later, masak!
05:23 Wolfman2000 bye masak
05:23 * pmichaud wonders what "tomorrow" means in this context
05:23 eternaleye Wolfman2000: That's what 'max' means - an upper bound, not the actual number
05:23 Wolfman2000 If your look behind/ahead thing works eternaleye, it seems like we'd have to split each : after splitting ::, could THOSE groups, and then pull --oh
05:24 eternaleye Wolfman2000: You can also call subs in <?{...}> - arbitrary compexity is yours for the taking ;D
05:24 eternaleye *complexity
05:25 Wolfman2000 eternaleye: If possible, explain all of this to me another day...when rakudo has it implemented and I'm not feeling a bit tired again.
05:25 eternaleye Wolfman2000: Also, lookahead is spelled <before $stuff> now
05:25 eternaleye <?{...}> is a zero-width code assertion
05:26 pmichaud (... <?before $stuff> ... )
05:27 eternaleye pmichaud: Thank you, I thought I was forgetting something
05:28 pmichaud <before $stuff> works also, but you end up with a $<before>  named capture.  :)
05:28 * Wolfman2000 closes up Feather for the night
05:30 quietfanatic rakudo: class X {has $.x = 5}; multi trait_mod:<is> (Class $newclass, ::X $y) {say "Yes"; &trait_mod:<is>.grep({.signature.params[0].type === Object and .signature.params[1].type === Object}).[0].($newclass, ::X)}; class Y is X {}; say Y.new.x;
05:31 p6eval rakudo fe6dd2:  ( no output )
05:31 quietfanatic ...
05:31 Wolfman2000 ...that's a lot
05:31 quietfanatic It worked at my end, printing "Yes\n5\n"; showing that it not only called the hook but also did the proper inheriting
05:32 quietfanatic But yeah, for want of a working nextsame() I had to grep the candidates by hand.
05:32 pmichaud it might've timed out on p6eval
05:32 quietfanatic Possibly
06:05 diakopter yes; I disabled the timeout notice earlier today
06:09 xpika left #perl6
06:16 mubot joined #perl6
06:58 xinming_ joined #perl6
07:14 pugs_svn r29016 | carlin++ | [t/spec/S32-io] Make this pass
08:02 synth joined #perl6
08:10 carlin
08:13 * carlin fails at Irssi and screen
08:16 iblechbot joined #perl6
08:24 zloyrusskiy joined #perl6
08:27 synth joined #perl6
08:28 synth joined #perl6
08:29 synth joined #perl6
08:57 hicx174 joined #perl6
09:02 [synth] joined #perl6
09:08 synth joined #perl6
09:12 reid05 joined #perl6
09:25 Su-Shee joined #perl6
09:26 Su-Shee good morning.
09:28 moritz_ good morning
09:30 shachaf joined #perl6
09:42 moritz_ rakudo: say 123.split(2).perl
09:42 p6eval rakudo fe6dd2: ["1", "3"]␤
10:10 jaffa8 joined #perl6
10:36 NorwayGeek joined #perl6
11:09 whooosh joined #perl6
11:16 mberends joined #perl6
11:24 am0c joined #perl6
11:48 jnthn quietfanatic: Yes, inheritance in master should go through trait_mod:<is> too.
11:48 jnthn quietfanatic: See src/setting/traits.pm (in master).
11:54 colomon joined #perl6
12:05 pugs_svn r29017 | carlin++ | [t/spec/S32-io] Make these tests run on solaris, confirmed passing
12:05 synth joined #perl6
12:09 payload joined #perl6
12:18 synth joined #perl6
12:38 xabbu42 joined #perl6
12:46 Su-Shee joined #perl6
12:49 Whiteknight joined #perl6
13:00 xinming_ joined #perl6
13:13 icwiener joined #perl6
13:24 envi^home joined #perl6
13:26 pmichaud good morning, #perl6
13:26 jnthn morning, pmichaud
13:26 colomon morning!
13:26 pmichaud jnthn: whatever is causing actions.pm to compile slow appears to be specific to nqp-rx
13:26 pmichaud not sure how, though.
13:27 rgrau joined #perl6
13:28 colomon can that be profiled with the parrot profiler?  seems like something us mere mortals could help you with...
13:28 pmichaud short answer: yes
13:28 jnthn pmichaud: That's...odd.
13:28 pmichaud longer answer:  I tried profiling the code, and it points to a problem in POST::Compiler.pir
13:29 pmichaud and within that to  PCT::Node.iterator
13:29 colomon ah, so what I could do is already done, more or less
13:29 pmichaud chromatic, cotto, and I have good reason to believe that the profiler is not being entirely accurate here
13:30 pmichaud well, the profiler _did_ point out a place where Parrot is definitely being suboptimal
13:30 pmichaud but I'm not sure it can account for a factor-of-10 slowdown, and it really doesn't explain why nqp-rx would be slow when the old nqp isn't
13:33 pmichaud colomon: there is a place you could help
13:34 * colomon is listening...
13:34 pmichaud I'm curious to know if the test files for nqp-rx also exhibit the same slow compile characteristics
13:34 pmichaud (I have to leave for a soccer game in 5 mins)
13:34 pmichaud what I need to know is this
13:34 pmichaud given an nqp test file
13:34 pmichaud 1.  How long does it take to compile with --target=past
13:35 pmichaud 2.  How long does it take to compile with --target=pir
13:35 pmichaud 3.  the above for both the old nqp compiler and the new nqp-rx one
13:35 pmichaud (knowing the details for the new nqp-rx one is more important)
13:35 pmichaud I've been using:
13:35 colomon just to be clear, is that an nqp test file or a nqp-rx test file?
13:35 pmichaud use the test files from nqp-rx
13:36 colomon gotcha.
13:36 pmichaud but many/most of the test files should work in both
13:36 pmichaud (if a file doesn't compile under the old nqp, we ignore it.  But the two languages are virtually identical, especially with respect to the test files)
13:36 pmichaud the command I've been using is
13:36 pmichaud $ time ./nqp --target=pir t/nqp/xx-somefile.t
13:36 pmichaud $ time ./nqp --target=past t/nqp/xx-somefile.t
13:37 pmichaud I don't need all files done, just a few representative ones
13:37 colomon okay, I'll see what I can do.
13:37 pmichaud what I would normally expect to see is that the time needed for --target=pir is only fractionally longer than --target=past
13:38 pmichaud what jonathan noticed yesterday is that --target=pir is taking as much as 10x longer than --target=past
13:38 pmichaud at least, it's doing that for Actions.pm
13:38 pmichaud I could use confirmation of that result on other nqp files
13:39 pmichaud if you wanted to run the profiler on a few of those and send me the *.out* files, that would be awesome also
13:39 colomon check.
13:39 colomon grabbing a clean rakudo now for ng build.
13:40 pmichaud you probably don't need a rakudo for this -- an nqp-rx checkout would be sufficient.  but either works
13:41 pmichaud okay, I gotta go
13:41 pmichaud bb in a couple of hours
14:08 Su-Shee_ joined #perl6
14:15 synth joined #perl6
14:15 markmont joined #perl6
14:25 colomon jnthn: you out there?
14:26 jnthn colomon: I am - may be a bit slow to answer at the moment, but go ahead. :-)
14:27 colomon pmichaud referred to an Actions.pm that was 10x slower in pir than past, and there are at least Actions.pm in the nqp-rx tree... any idea which he was talking about?
14:29 jnthn The one I measured yesterday and got that reading for is src/Perl6/Actions.pm in Rakudo's ng branch.
14:29 colomon ah, of course, the one I haven't tried yet.  :)
14:29 jnthn Actually the 10x slower thing I should clarify a little.
14:29 colomon danke.
14:30 jnthn Basically, with --target=post, it runs in X seconds. However, going from POST to PIR takes more like 10X seconds.
14:30 colomon post not past?
14:30 jnthn Correct.
14:30 rgrau joined #perl6
14:30 jrockway joined #perl6
14:30 nbrown joined #perl6
14:30 jnthn POST is the step between PAST and PIR.
14:31 jnthn It's like a tree representation of PIR.
14:31 colomon ah, pmichaud had me looking at past.
14:31 jnthn That's fine
14:31 jnthn Oh, comparing time for --target=past with the full thing?
14:31 jnthn Or with --target=pir?
14:32 colomon past versus pire
14:32 colomon pir
14:32 jnthn That's fine.
14:32 jnthn When I compared --target=past and --target=post they were *very* close.
14:32 jnthn Compared to the difference between either of those and --target=pir
14:32 jnthn So it'll still give us the info we need.
14:33 colomon I'm thinking I may throw together a Perl 5 script to do a mass comparison and report.
14:35 jnthn Cool
14:35 jnthn That'd be great.
14:35 bpetering joined #perl6
14:36 colomon WOW!   just tried your Actions.pm.  That's the first big difference I've seen so far.
14:36 envi^home joined #perl6
14:37 icwiener joined #perl6
14:38 muixirt joined #perl6
14:39 Wolfman2000 *yawn* morning
14:40 * muixirt gives Wolfman2000 a cup of coffee
14:41 Wolfman2000 Not much of a coffee drinker, but thanks
14:41 Su-Shee left #perl6
14:43 rgrau joined #perl6
14:43 jrockway joined #perl6
14:43 nbrown joined #perl6
14:45 rgrau joined #perl6
14:50 SmokeMachine joined #perl6
14:50 abra joined #perl6
14:59 nihiliad joined #perl6
15:00 Bzek joined #perl6
15:00 abra joined #perl6
15:03 colomon jnthn, pmichaud: Unfortunately being taken shopping by wife in a minute, so may not get a chance to get the harness program running.
15:04 colomon my early observations -- my impression is the longer nqp-rx takes to run, the bigger the relative difference between past and pir.
15:04 colomon seems like maybe an O(N^2) issue kicking in?
15:05 payload joined #perl6
15:05 colomon should have more time to work on this after lunch.
15:06 nbrown joined #perl6
15:11 colomon Errr... anyone have an idea how I can capture the output of the "time" command?  (As in "time command execution" on OS X, not "what is the currenttime".)
15:13 jnthn Where are you calling it from?
15:13 jnthn A Perl script?
15:13 colomon yes
15:13 jnthn 5 or 6?
15:13 colomon 5
15:13 colomon I don't want 6's issues messing with my timing.
15:13 jnthn Can't you just use my $output = `time ... `;
15:13 colomon system "time ./nqp --target=pir $file >& colomon-frip";
15:14 jnthn And then parse $output
15:14 colomon jnthn: tried that, it sent time to stdout.
15:14 colomon stderr, I mean.
15:14 colomon so I captured everything but the time.
15:14 jnthn oh heh
15:14 base_16 "time cmd 2>&1" ?
15:14 colomon the system command above did the same.
15:15 base_16 you have to redirect stderr as well
15:15 jnthn Aye, that should work.
15:15 colomon as far as I can tell, 2>&1 doesn't help either.
15:15 colomon wonder if this is an os x quirk?
15:16 colomon nope, doesn't work in linux either.
15:16 colomon sigh.
15:16 colomon got to go.
15:17 nbrown joined #perl6
15:17 base_16 this works for me
15:17 base_16 system "{ time ls 2>&1;} >output"
15:21 masak joined #perl6
15:21 masak good subjective morning, #perl6.
15:21 Wolfman2000 same
15:22 * masak backlogs
15:23 spooneybarger joined #perl6
15:24 Psyche^ joined #perl6
15:25 pmichaud back again
15:26 masak I think it's slightly funny that, once we start profiling things, the first thing that happens is that the profiler is less than truthful with us. :)
15:26 pmichaud it's a brand new profiler
15:26 masak ah.
15:26 masak a bit of 'who watches the watchers' then, maybe.
15:28 pmichaud the profiler isn't really set up to handle tail recursion, and pct uses a lot of that
15:29 masak it got distracted chasing tail, eh?
15:29 masak I think I can sympathise with that.
15:33 NorwayGeek joined #perl6
15:34 [synth] joined #perl6
15:37 fax joined #perl6
15:39 lichtkind joined #perl6
15:42 Wolfman2000 alright...just had breakfast. now to hopefully get the answer to the question I didn't get last night. Are there any syntax highlighers for Perl any of you guys like a lot? When I actually build my Perl website, I think syntax highlighting would be useful.
15:42 pmichaud padre is an ide
15:43 Wolfman2000 ...I'm asking the wrong question.
15:43 Wolfman2000 I don't need an IDE necessarily.
15:43 Wolfman2000 What colors do you prefer for the many keywords and phrases and stuff?
15:44 Wolfman2000 ...wait a second. I never heard of this one before...free? both Perl 5 AND Perl 6? SOLD
15:46 bpetering Wolfman2000: which one?
15:46 Wolfman2000 bpetering: padre
15:48 Wolfman2000 Of course, I have to install this the old fashioned way...but then again, I should be used to this by now
15:50 bpetering Wolfman2000: maybe there's a better way?
15:50 masak Wolfman2000: have people told you about the vim and Emacs syntax highlighters?
15:51 Wolfman2000 masak: Can you tell me how to get those syntax highlighters without having to run said programs?
15:51 masak Wolfman2000: ah, so that's your goal?
15:51 jnthn masak: You doing jetlag without the jet? :-)
15:51 Wolfman2000 masak: yeah. I want to use a popular syntax highlighter for my webpage, even if I have to hand code each keyword manually via CSS.
15:52 Wolfman2000 Granted, Padre does look like it can be useful even on its own, so I'm getting that anyway.
15:53 masak jnthn: I'm taking an active stance against my insomnia. :)
15:53 moritz_ Wolfman2000: for my websites I use the Vim Perl 6 syntax hilighting plus Text::ViimColor
15:53 moritz_ erm, Text::VimColor
15:53 moritz_ that's a perl 5 syntax hilighting module that uses vim under the hood
15:53 masak Wolfman2000: azawawi did some experiments with Perl 6 syntax highlighting.
15:53 bpetering masak: anesthesia? :)
15:53 masak Wolfman2000: but I suspect that's the code that got incorporated into Padre.
15:53 moritz_ you can see some examples of it in http://perlgeek.de/en/articl​e/mutable-grammar-for-perl-6
15:53 moritz_ s/in/on/
15:54 masak bpetering: no, staying awake through the night. :)
15:54 Wolfman2000 moritz_: I don't know how well a Perl module will work...on the base feather user pages. Plus, I plan on using Web.pm, Perl 6, on the custom apache page, and I don't exactly know how well Perl 5 modules can be used in Perl 6.
15:55 bpetering masak: isn't that like, err, sleeping with the enemy? ;)
15:55 moritz_ Wolfman2000: just want to give you some options, not try to convince you to do something specific
15:56 masak bpetering: yes, but it works wonders for calling forth natural sleepiness. :)
15:56 Juerd I'm a bit concerned with the focus on apache :)
15:56 masak bpetering: right now it feels a bit like this: http://xkcd.com/320/
15:57 bpetering masak: true, sleep every second night and you'll sleep like a baby :)
15:57 masak ouch. I don't think I could pull that off. :)
15:57 masak I'm not 20 anymore.
15:58 Wolfman2000 Juerd: care to explain? You gave us Apache for us to use perl scripting on the web, right?
15:58 bpetering masak: heh... i don't think it's recommended even for 20-year-olds
15:59 Juerd Wolfman2000: I'm not *giving* apache. It's available, just like any other thing you want installed :)
15:59 pmichaud oddly, that seems to match my sleep schedule
15:59 * pmichaud prepares to go searching for source of slowness again
15:59 Juerd Wolfman2000: You could use lighttpd, for example. I'm not saying you should.
16:00 Juerd I'm just not sure if I should keep the apache advise, or maybe add some other web server to the mix.
16:00 Wolfman2000 Juerd: Look into nginx then.
16:01 Juerd Nah, if I'm installing something extra it'll be lighttpd :)
16:01 Wolfman2000 *shrugs* worth a shot. Long as Web.pm will work on it, I won't complain.
16:01 Juerd No, that's not correct
16:01 Juerd If I'm *going to write instructions* for something extra, it'll be lighttpd
16:02 pmichaud okay, looks like src/NQP/Actions.pm is a nice medium-size test case
16:02 Juerd If you want nginx, I'll install it right away. Do you want it?
16:02 Wolfman2000 Juerd: No need at this point, but thanks anyway.
16:02 Wolfman2000 I'll use what's available.
16:02 Juerd Hm, let's do a dist-upgrade on feather
16:02 Juerd Warning: breakage ahead.
16:02 Wolfman2000 ...good thing I'm not on feather right now
16:03 Juerd Oh, I am
16:03 Juerd I use irssi on feather
16:03 Juerd <3  screen + irssi
16:03 Wolfman2000 I meant...if you're going to upgrade, it's a good thing I'm offline so I don't collude or something.
16:03 Juerd Nah
16:03 Juerd You won't notice a thing *cough*
16:03 Wolfman2000 ...I'm busy trying to get Padre set up on my local Mac right now, so don't worry.
16:04 Wolfman2000 have fun with the upgrade.
16:04 Juerd 452 upgraded, 17 newly installed, 4 to remove and 0 not upgraded.
16:04 Juerd See? That's nothing.
16:04 Wolfman2000 That sure seems like a lot
16:04 Juerd It might be :)
16:04 Juerd It's 406 MB of archive files.
16:10 Juerd Restarted for libc upgrade: vsftpd spamassassin ssh rsync openbsd-inetd dovecot cron atd apache
16:10 Juerd Existing ssh connections are kept.
16:18 masak Juerd++
16:19 Juerd Damn.
16:19 Juerd udev needs upgrading, but that udev needs a new kernel.
16:19 Juerd New kernel means new xen.
16:19 Wolfman2000 and...what's wrong with upgrading?
16:20 Juerd Wolfman2000: Downtime and reboots.
16:20 Juerd Oh, and more work than I had anticipated.
16:20 Wolfman2000 no time like the present
16:20 Juerd The system will have to keep itself up at least until tomorrow
16:21 Wolfman2000 meaning it will be updating itself until tomorrow, or you will just do the updates tomorrow?
16:21 Juerd The current dist-upgrade I'll finish today
16:21 Juerd But I can't upgrade Xen (which I shouldn't do remotely) until tomorrow.
16:21 Wolfman2000 ah
16:21 Juerd So there'll be a discrepancy between the running kernel and running udev
16:22 Juerd Which could mean devices become unavailable.
16:22 justatheory joined #perl6
16:23 lmc joined #perl6
16:24 Wolfman2000 it's strange to install Padre on Mac OS X. The Doc will keep on vibrating during some of the tests due to the GUI related tests apparentl.
16:24 Wolfman2000 ...and wxPerl won't install
16:24 Wolfman2000 ...my perl is outdated anyway.
16:26 Wolfman2000 Alright guys...be honest. I'm already testing out Perl 6 effectively. For my primary computer, should I go to 5.10.1 or 5.11.1? I know 5.even is generally more stable than 5.odd
16:27 moritz_ 5.10.1 would get my vote
16:27 Juerd 5.10.1
16:27 Juerd 5.11 is dev
16:29 IllvilJa joined #perl6
16:38 Juerd dist-upgrade done
16:42 Juerd Feather email is back online
16:45 Wolfman2000 I forgot about the interactive ./Configure for Perl
16:45 Wolfman2000 made it interesting to work with
16:45 moritz_ ./Configure -de # there you go, no tiring interaction
16:45 Wolfman2000 moritz_: I actually liked the interaction. I changed some of the defaults.
16:46 moritz_ I liked it in the beginning, and hated it after the 10th question or so
16:47 Wolfman2000 I'll admit it's partly an aquired taste
16:48 bpetering ./Configure --read-my-mind # d:-)
16:50 bpetering but interaction does give a nice customized Perl. :)
16:51 moritz_ <rant>and those people with customized perls then sent obscure cpan testers FAIL reports</rant>
16:51 masak grrr! "Expected Callable but got Code instead"!
16:52 moritz_ rakudo. say Code ~~ Callable
16:52 moritz_ rakudo: say Code ~~ Callable
16:52 p6eval rakudo fe6dd2: 1␤
16:52 moritz_ pmichaud++ # Adding END phasers to Rakudo, Captain.  Set for STUNNING.
16:53 pmichaud :)
16:53 carlin rakudo: say Callable ~~ Code
16:53 pmichaud highlight of my week, that.
16:53 p6eval rakudo fe6dd2: 0␤
16:53 moritz_ somebody does read those commit messages
16:53 frettled My goodness, did you guys really go around shooting phasers?  :D
16:53 masak better believe it.
16:54 * moritz_ try to think of fun phaser games for next YAPC
16:54 masak moritz_: you're coming to the next YAPC?! \o/
16:54 moritz_ good that we didn't have tests for the :panic regex modifier - it's gone anyway
16:54 * bpetering is scared at the thought of masak with a phaser. yikes. :)
16:54 moritz_ masak: I very much hope so
16:55 masak bpetering: I'm dangerous even without one. :P
16:55 envi^home joined #perl6
16:55 pmichaud moritz_: you saw the message... did you see the commit?  ;-)
16:55 bpetering masak: I do believe it.
16:55 juerd_cgiirc joined #perl6
16:55 juerd_cgiirc Yay \o/
16:56 moritz_ pmichaud: aye; it's beatiful
16:56 Juerd Okay, so we have webmail and webirc back too
16:56 bpetering yay for beautiful code! :)
16:56 Juerd What an organic mess is that apache config on feather :)
16:57 moritz_ it should either never be touched again, or seriously refactored ;-)
16:57 Juerd Agreed.
16:57 Juerd That was true before I changed something today though :)
16:58 iblechbot joined #perl6
16:59 bpetering moritz_: are there parts of the test suite that need work, and which have few bits likely to disappear?
17:00 bpetering *also have (clearer)
17:00 Juerd I wonder if people want to use feather imap
17:01 moritz_ bpetering: yes
17:01 moritz_ bpetering: for example recent commits added 'quitely' and 'note' to the spec
17:02 moritz_ bpetering: you could test those with Test::Util (lives in t/spec/packages), which spawns another perl 6 process and captures its output and STDERR
17:02 moritz_ r28528 was the relevant commit to the spec
17:03 moritz_ warn() also needs tests
17:03 moritz_ oh
17:03 moritz_ we have tests for quietly already
17:03 * moritz_ wasn't aware of them
17:04 pmichaud I think they were quietly added :)
17:04 moritz_ KyleHa++ for them
17:04 bpetering hehe :)
17:05 bpetering KyleHa++ # lots of awesome test suite work
17:05 moritz_ indeed
17:05 pugs_svn r29018 | moritz++ | [t/spec/TODO] we have tests for note/quietly, KyleHa++
17:05 moritz_ I guess r28150 and r28151 are fairly isolated, and not yet tested
17:06 bpetering moritz_: thanks for the advice, i'll have a look. it's only the 100th thing i've promised people here, but hopefully i can find an optimal learning path which gets me up to speed quickest.
17:07 bpetering a path through the promised projects, i mean :)
17:07 moritz_ :-)
17:07 Juerd Wolfman2000: nginx and lighttpd are now installed on feather :)
17:07 Wolfman2000 Juerd: I'd cheer...if my Perl 5.10.1 installation didn't suddenly break. I can't run cpan!
17:08 Juerd Why were you installing from source anyway?
17:08 Wolfman2000 Juerd: I did that for 5.10.0 awhile ago. May as well stay consistent
17:08 Juerd Good reason
17:09 lisppaste3 wolfman2000 pasted "For those that care, error with cpan. Probably have to reinstall this too." at http://paste.lisp.org/display/89946
17:09 bpetering +1
17:10 moritz_ elf: print [1, 2, 3]
17:10 p6eval elf 29018: ARRAY(0x1468268)
17:10 moritz_ rakudo: print [1, 2, 3]
17:10 p6eval rakudo fe6dd2: 1 2 3
17:11 moritz_ perl6: print ~[1, 2, 3]
17:11 p6eval pugs, rakudo fe6dd2: 1 2 3
17:11 p6eval ..elf 29018: 123
17:11 moritz_ now that's weird
17:11 moritz_ the print() doesn't use the stringification
17:11 lisppaste3 masak pasted "Is there an easier way to do this? (CPS-style tree traversal)" at http://paste.lisp.org/display/89947
17:11 diakopter but say does?
17:13 diakopter masak: 'splain moar
17:13 diakopter easier way to do what
17:13 masak diakopter: ok, so I want to have the cake and eat it, it seems.
17:13 moritz_ elf: say [1, 2, 3];
17:13 p6eval elf 29018: 123␤
17:13 masak diakopter: I want a tree traversal, but I want to be able to jump into any point of it and resume it.
17:13 masak diakopter: so it seems to me I cannot use ordinary recursion for this.
17:14 masak diakopter: what I wrote there is the first attempt I get working at all.
17:14 masak I'm thinking maybe there's a pattern to this that I'm unaware of.
17:14 am0c joined #perl6
17:15 diakopter Interpreter pattern ?
17:15 masak 'splain moar.
17:15 diakopter wikipedia it?  'cept trampolined..
17:15 diakopter :)
17:15 diakopter masak: do you read javascript?
17:16 masak diakopter: sure.
17:16 masak it's just a hybrid of C and Scheme. :)
17:16 diakopter http://apollo2.pastebin.com/d6bc26fc6
17:16 diakopter that's the PAST interpreter
17:17 diakopter oh wait
17:17 diakopter heh; minified
17:17 masak ugh.
17:17 diakopter har
17:18 masak diakopter: I'm sorry, the Interpreter Pattern (as described by Wikipedia) looks like ordinary Recursive Descent parsing to me.
17:19 arnsholt masak: I don't think there's an elegant way to do it, apart from continuations
17:20 diakopter masak: except if you make them continuations, like arnsholt said...
17:20 masak well, that's essentially what I did in my code.
17:20 masak expect that Perl 6 doesn't have continuations.
17:20 masak so I had to emulate CPS on the call stack.
17:21 arnsholt Yeah, I think that's the only way
17:22 diakopter http://jsint.pastebin.com/d3c168713
17:22 masak arnsholt: oh well. this works. I'm glad you at least know what I'm talking about. this feels like a rather esoteric thing to want to do.
17:22 pugs_svn r29019 | moritz++ | [t/spec] rewrite S16-io/say-and-ref.t to use Test::Util, KyleHa++
17:23 arnsholt masak: Essentially what you want is an iterator for your tree
17:23 bpetering Wolfman2000: I could be way off track, but it looks like you're getting a conflict with the installed perl and the version you're installing...?
17:23 arnsholt Not really an esoteric thing. It's just that the good way to do it is a bit obscure =)
17:23 masak arnsholt: aye. that's essentially what it is.
17:23 moritz_ masak: I think you can do that without continuations, by passing a state object around
17:24 masak moritz_: good point.
17:24 Wolfman2000 bpetering: ignore it right now. Installed CPANPLUS...have to now set that up to send reports on pass/fail
17:24 diakopter moritz_: ok, but you can't use the normal 'return', in that case
17:24 arnsholt That's essentially what continuations do, though. They encapsulate the current state of your function to be resumed later
17:24 moritz_ arnsholt: right, the only difference is the callable wrapper around the state object
17:24 arnsholt Yah
17:24 masak right. moritz_'s solution would turn things inside-out.
17:25 bpetering Wolfman2000: np
17:25 masak it's a question of what works best with the rest of the design.
17:26 diakopter moritz_: but you can't use 'return'
17:26 diakopter b/c it wouldn't return to the right place
17:26 Wolfman2000 Argh...I always forget this. Can CPANPLUS use CPAN-Reporter?
17:26 moritz_ diakopter: unless you do it all by block attributes instead of routines ;-)
17:27 diakopter hrm
17:27 moritz_ and in real Perl 6 (not Rakudo yet) return() is tied to the sub it's in, lexically
17:28 diakopter what do you mean
17:28 diakopter (as opposed to the obvious)
17:28 moritz_ so you might have a chance to pass in a block which returns its argument to the invoking routine
17:29 diakopter but that's still using the stack recursively
17:29 diakopter the call stack
17:29 moritz_ rakudo: sub b($x) { $x() }; sub a { my $x = { return 5 }; say b($x) }; say a()
17:29 p6eval rakudo fe6dd2: 5␤1␤
17:29 moritz_ that's wrong
17:29 masak I love this type of discussion.
17:29 moritz_ and known. (me glances at masak)
17:30 masak oh yes.
17:30 icwiener_ joined #perl6
17:31 pmichaud okay, time to study what has happened to code generation in parrot.  :-|
17:31 masak in fact, I've promised myself that when this gets implemented right, I'll be the first one to try and trigger the "already returned from this routine" error. :)
17:31 * pmichaud makes mental note to self:  "Wait to implement lexical return until masak is on vacation."
17:32 masak :)
17:32 bpetering masak: vacation time! :)
17:32 pugs_svn r29020 | moritz++ | [t/spec] rename import.t to importing.t, because we now have a prefix:<import> but it is not tested in here
17:32 pmichaud moritz_: can we also start eliminating underscores?  ;-)
17:32 diakopter what's lexical return
17:32 masak vacation just meant more than 50% time for Perl 6.
17:33 moritz_ pmichaud: sure, any time
17:33 pmichaud diakopter:  17:27 <moritz_> and in real Perl 6 (not Rakudo yet) return() is tied to the sub it's in, lexically
17:33 pugs_svn r29021 | moritz++ | [t/spec] move defines.t to import.t
17:33 moritz_ diakopter: see also the example I gave above
17:33 moritz_ pugs: sub b($x) { $x() }; sub a { my $x = { return 5 }; say b($x) }; say a()
17:33 p6eval pugs: 5␤1␤
17:33 moritz_ same problem.
17:34 pmichaud answer should be just 5, iiuc
17:34 moritz_ right
17:34 moritz_ the first say() never runs, because the evaluation of its argument throws a (control) exception
17:35 moritz_ rakudo: say 3, die(5)
17:35 p6eval rakudo fe6dd2: 5␤in Main (file /tmp/5Ik0Y8xIU1, line 0)␤
17:35 moritz_ line 0. Bah.
17:36 masak (line 0)--
17:36 jnthn Meh
17:37 diakopter what
17:37 diakopter I mean: what.
17:37 jnthn I could just hack the code to not bother outputting any "in" line if the line number is zero.
17:37 diakopter sub b($x) { $x() }; sub a { my $x = { return 5 }; say b($x) }; say a()
17:38 diakopter "return 5" throws a control exception?
17:38 moritz_ aye
17:39 diakopter which does what
17:39 moritz_ unless the optimizer can prove that no CONTROL { } block can come in its way
17:39 moritz_ diakopter: unrolls the stack until either a CONTROL block is found, or the current routine is reached
17:39 moritz_ and returns its argument
17:39 diakopter what is the "current routine"?
17:40 moritz_ the routine it's in, lexically
17:40 diakopter the routine _what_ is in
17:40 moritz_ the return()
17:40 moritz_ so in your example above &a
17:41 diakopter this is [one of] what distinguishes Block from Routine?
17:41 moritz_ yes
17:41 diakopter '{ return 5 }' is a Block, but 'sub a {}' is a Routine?
17:41 moritz_ yes
17:42 diakopter when did 'lexical return' come about
17:43 moritz_ dunno, but I think it was in when I joined the crowd
17:43 moritz_ so 2006 or 2007
17:43 diakopter pugs: sub b($x) { $x() }; sub a { my $x = { 5 }; say b($x) }; say a() # so this is correct?
17:43 p6eval pugs: 5␤1␤
17:43 diakopter pugs: sub b($x) { $x() }; sub a { my $x = sub { 5 }; say b($x) }; say a() # so this is correct?
17:43 p6eval pugs: 5␤1␤
17:44 diakopter the 2nd one
17:44 moritz_ no
17:44 diakopter I mean, with "return"
17:44 diakopter pugs: sub b($x) { $x() }; sub a { my $x = sub { return 5 }; say b($x) }; say a() # so this is correct?
17:44 p6eval pugs: 5␤1␤
17:45 diakopter how is it not correct?
17:45 moritz_ no; the say() in a should not be executed
17:45 diakopter why not
17:45 moritz_ because the evaluation of its argument throws an exception
17:45 moritz_ just like say(die()) doesn't execute the say()
17:45 diakopter you must not have read what I typed
17:46 diakopter I added 'sub' before { return 5 }
17:46 moritz_ oh
17:46 moritz_ then it's fine
17:46 moritz_ sorry for the confusion
17:46 masak nod.
17:46 diakopter (why would I repeat the same question verbatim)
17:46 masak that's the difference.
17:46 moritz_ dunno ;-)
17:46 diakopter well, you're the one who assumed it
17:46 * moritz_ wants a word diff for subsequent p6eval lines
17:46 masak I think of 'sub' as adding an extra layer of return-exception catching.
17:47 * bpetering thinks that would be a cool project :)
17:47 moritz_ an extra column to the IRC logs, enabled by javascript? ;-)
17:49 bpetering moritz_: heh... dunno if anyone actually uses that. if they do i need to fix some bugs :)
17:50 moritz_ bpetering: I don't use it because it's unusable :(
17:50 moritz_ I can't scroll down to select the nick I want
17:50 bpetering moritz_: wouldn't it be possible to emulate STD's output - color insertions green, deletions red?
17:51 moritz_ it would, possibly
17:51 moritz_ afk
17:52 sharada joined #perl6
17:53 bpetering moritz_: (by which i mean just use the ANSI color codes, avoiding the logs)
17:55 bpetering moritz_: as for the "conversation mode", i'll fix that stupid bug and rename the link to "don't click this"
17:58 bpetering std: don't () parse me
17:58 p6eval std 29021: [31m===[0mSORRY![31m===[0m␤Two terms in a row at /tmp/c8uUA32v9U line 1:␤------> [32mdon't () [33m⏏[31mparse me[0m␤    expecting any of:␤    bracketed infix␤  infix stopper␤    standard stopper␤ statement modifier loop␤  terminator␤Undeclared routine:␤     don't used at line
17:58 p6eval ..1␤FAILED 00:01 10…
17:59 bpetering thanks std! :)
18:03 diakopter so a Block *doesn't* create a new lexical scope?
18:03 diakopter (otherwise you couldn't call it a "lexical return"
18:03 diakopter )
18:04 diakopter (and be consistent about the use of "lexical")
18:09 diakopter no?
18:14 masak I think it might be more about lexical scoping than about lexical scopes as such.
18:14 masak just a thought.
18:17 colomon pmichaud: sorry about disappearing there.  should be more or less available the rest of the afternoon.
18:17 diakopter masak: but how?
18:18 masak diakopter: the 'return' is bound to the lexical scope it's in. from that scope (and outwards), the return exception is thrown.
18:19 masak it gets handled by the first routine exception handler that sees it.
18:19 masak i.e. the surrounding sub (or method, or submethod).
18:19 diakopter masak: hence my question.
18:19 diakopter does a Block create a new lexical scope
18:19 masak in my view, yes.
18:20 masak but I think I just clarified why there's no actual confusion of concepts.
18:20 diakopter sub a { my $x = { my $x = 5 }; say $x }
18:20 diakopter std: sub a { my $x = { my $x = 5 }; say $x }
18:20 p6eval std 29021: ok 00:01 109m␤
18:20 diakopter right, std thinks it does..
18:21 diakopter so the "lexical scope" of 'my $x = 5' is the Block
18:21 diakopter not the Routine
18:21 masak each block creates a new lexical scope, with its own pad etc.
18:21 masak diakopter: no, you're confusing it again.
18:21 diakopter I don't see how
18:21 masak oh, wait. no, you're right. the Block.
18:21 masak same with the 'return'.
18:22 diakopter right.
18:22 jnthn As I tend to see it, a block has a lexical scope.
18:22 diakopter right......................................
18:22 jnthn That is - a storage place for lexicals.
18:22 diakopter my point was that 'lexical return' is thus a misnomer
18:22 jnthn That knows its outer scope.
18:22 jnthn Well
18:22 masak diakopter: and my point was that it isn't.
18:22 jnthn This is Perl 6. You can't expect words to be used for just one specific thing. ;-)
18:22 masak diakopter: it returns from that scope.
18:23 diakopter b/c the lexical scope of the return statement is the (inner) Block, not the enclosing Routine
18:23 masak diakopter: case in point, you could return a variable from that very lexical pad.
18:23 jnthn I mean, yes, there's a "lexpad" which is the storage place for lexically scoped things.
18:23 jnthn But also there is the general notion of "lexically scoped" which tends to relate to following the static chain, not the dynamic one.
18:23 * diakopter didn't mention lexpads.
18:23 jnthn That's the deal with lexical return.
18:23 masak diakopter: so the return really does take place from the Block.
18:24 diakopter that's fine...
18:24 jnthn We don't follow the dynamic chain (e.g. caller) to find an exception handler.
18:24 jnthn We follow the static chain instead.
18:24 diakopter but that doesn't distinguish 'lexical return' from normal 'return'
18:25 jnthn It only gets interesting in situations where the caller and the outer diverge accross a routine boundary.
18:25 diakopter ok, but no one is addressing my point/question
18:25 diakopter yes, "the return really does take place from the Block", but so do all returns (subs or otherwise), in that respect
18:26 masak you have a point.
18:26 jnthn It's not about where the return takes place, it's about how we find the return exception handler.
18:26 diakopter I'm taking issue with labeling it 'lexical return' because 'lexical' isn't what makes it special
18:27 jnthn I'd disagree. To me "lexical" = word we use when talking about stuff that happens with the static chain. Finding the return exception handler is decidedly something that's meant to be done by following that chain.
18:27 moritz_ "lexical" is what distinguishes it from simply throwing and catchiing control exceptions
18:27 Achilles joined #perl6
18:27 diakopter oh
18:28 jnthn sub foo { my $x = { return 42 }; $x }; sub bar { my $a = foo(); $a() }
18:29 jnthn The return statement will throw an exception, and we then find the exception handler in foo, not the one in bar.
18:29 diakopter yes, we've already been through an example.
18:29 jnthn foo is in' the lexical scope of the block.
18:30 diakopter wait, what
18:30 jnthn Oops
18:30 jnthn s/lexical scope/static chain/
18:31 jnthn I got 'em the wrong way around. The block is lexically enclosed within foo.
18:31 jnthn The only bit to add on this is that a routine implies a return exception handler.
18:31 jnthn A block that's not a routine doesn't.
18:32 diakopter sub foo { my $x = { return 42 }; $x; CATCH { say 'CAUGHT' }; }; sub bar { my $a = foo(); $a() }; bar # this should output "CAUGHT"?????????????
18:32 jnthn s/CATCH/CONTROL/ and I'd guess so.
18:32 diakopter oh
18:32 jnthn Control exceptions are not meant to be handled by CATCH.
18:33 jnthn We get that wrong in Rakudo too. Last I checked (but maybe it's changed) the spec wasn't clear if there was a differentiation by type in some way.
18:34 diakopter ok, s/CATCH/CONTROL/.  so... CONTROL can't assume that anything in its surroundings has been executed
18:34 NorwayGeek_ joined #perl6
18:34 NorwayGeek|Away joined #perl6
18:35 jnthn I guess my next question is, while I understand how we find the exception handler, why has it been designed this way in Perl 6. :-)
18:35 jnthn I'm quite sure there's a *good* reason, but I'm kinda missing it.
18:35 diakopter I'm not as sure
18:36 masak still lots of failures in t/01-sanity/ in the ng branch. does that mean that the ng refactor is insanely great? :)
18:36 jnthn masak: Yes!
18:36 masak thought so.
18:37 jnthn masak: Actually there's a more boring reason, which is that we're tending to put back a lot of underlying conceptual stuff first.
18:37 Wolfman2000 ......note to self. Next computer I get, be very careful about hosing the perl setup.
18:38 Wolfman2000 masak: How many more failures must be eliminated before ng can come to the main branch?
18:38 tak11 joined #perl6
18:40 moritz_ it's not about build failures; it's about putting features back in
18:44 jnthn moritz_: Wolfman2000 might have meant test failures. :-)
18:45 moritz_ afk, movie
18:45 SmokeMachine joined #perl6
18:46 jnthn moritz_: enjoy :-)
18:50 lisppaste3 colomon pasted "pir versus past timings in nqp-rx" at http://paste.lisp.org/display/89951
18:50 colomon I'll attempt to build a summary table next.  :)
18:55 diakopter to where does CONTROL {} return control?
18:55 diakopter lexically or dynamically?
18:56 diakopter sub foo { my $x = { return 42 }; $x; CONTROL { say 'HERE0' }; say 'HERE1' }; sub bar { my $a = foo(); $a() }; bar; say 'HERE2';
18:56 diakopter what's the output
18:56 diakopter or, better
18:57 diakopter sub baz { sub foo { my $x = { return 42 }; $x; CONTROL { say 'HERE0' }; say 'HERE1' }; sub bar { my $a = foo(); $a() }; { bar; say 'HERE2' }; CONTROL { say 'HERE3' } }; baz
18:58 am0c__ joined #perl6
19:01 Wolfman2000 ...while it's on my mind...does cpan or cpanplus work for Perl 6 yet?
19:01 diakopter nyope
19:01 Wolfman2000 is there an equivalent?
19:02 jnthn Closest is proto
19:02 diakopter well, I guess it could if the Perl 6 modules were wrapped as Perl 5 ones, and knew where to install themselves to make themselves available to a perl6
19:02 Wolfman2000 haven't tried proto yet...
19:07 Wolfman2000 I'm guessing proto is something that has to be installed. *goes to find where it can be downloaded*
19:07 masak Wolfman2000: http://github.com/masak/proto
19:07 Wolfman2000 masak: just found that
19:07 diakopter masak: oh look, someone used your name to make a github repo... and made a bunch of Perl 6 stuff under it!
19:08 Wolfman2000 ...huh. Proto is not to be taken seriously in any way. It is not a full-fledged module installation system. It is a protptype.
19:08 masak diakopter: I'm still trying to track down whoever did that.
19:08 Wolfman2000 ...right, should ahve realized.
19:08 masak Wolfman2000: those are the breaks. :)
19:08 masak Wolfman2000: you're welcome to write the real thing.
19:08 nbrown masak: I keep meaning to talk to you about proto, I tried to make the installed-moduels branch work on windows
19:09 Wolfman2000 masak: not that skilled, nor do I have the time.
19:09 Wolfman2000 ...can't we just copy a lot of what CPAN.pm does instead?
19:09 masak nbrown: oh, cool! you should also talk to mberends++, he made that branch.
19:09 nbrown masak: but I'm running into issue with qqx not returning the output
19:09 masak Wolfman2000: well, we can, and we should.
19:09 nbrown masak: I know, I've just been distracted from perl6 for a while
19:09 masak Wolfman2000: but Perl 6 also does a few other things where CPAN is not enough.
19:10 masak nbrown: that's a Rakudo-level issue, I fear.
19:10 Wolfman2000 masak: such as...?
19:10 nbrown masak: do you know anyone who's trying to run it on windows?
19:10 masak Wolfman2000: S11.
19:10 masak nbrown: no.
19:10 nwc10 joined #perl6
19:10 masak all my friends run other OSes. :) except jnthn, and he only tried proto once.
19:10 nbrown I figured, but I can't replicate it in a simple reduced issue and so I thought I'd ask if anyone else was playing with it
19:11 masak not that I know.
19:11 Wolfman2000 The modules synopsis... *reads*
19:11 masak Wolfman2000: notably, :auth and :ver.
19:11 nbrown masak: yeah, I can make it work on OSX and my linux box, but I decided to play on windows for a bit this summer.  It's been interesting
19:12 masak nbrown: it's good that someone tries things on Windows as well. I hear some people still use that OS.
19:12 * masak grins
19:12 * nbrown grins too
19:12 nwc10 left #perl6
19:12 nbrown I'm limited some places, so I tend to dabble
19:15 nbrown i guess maybe it's time to give up on windows and get my linux box up and running again
19:17 colomon errr.... how do you write a Perl 6 regex to detect a /    ?
19:19 colomon rakudo: "this/is/a/path" ~~ / \/ /; say $0;
19:19 p6eval rakudo fe6dd2: Use of uninitialized value␤␤
19:19 colomon rakudo: say this/is/a/path" ~~ / \/ /;
19:19 p6eval rakudo fe6dd2: Confused at line 2, near "\" ~~ / \\/ "␤in Main (file <unknown>, line <unknown>)␤
19:20 colomon rakudo: say "this/is/a/path" ~~ / \/ /;
19:20 p6eval rakudo fe6dd2: /␤
19:20 colomon rakudo: given "this/is/a/path" { when / \/ / { say "found"; }; say "not found"; };
19:21 p6eval rakudo fe6dd2: found␤
19:21 colomon hmmm.  why doesn't that work in my script, then?
19:27 masak colomon: because you're not doing the exact same thing? :P
19:28 colomon har.
19:28 colomon ah, problem was in my action, not my when clause.
19:30 frew joined #perl6
19:31 nihiliad joined #perl6
19:34 pmichaud back
19:36 pmichaud here's where I am on measuring stuff right now:  http://pmichaud.com/sandbox/pnotes.txt
19:37 pmichaud (That file is acting as my log book or forensic notes or whatever... :)
19:39 pnate2 joined #perl6
19:45 TSa joined #perl6
19:46 masak food &
19:48 zaslon lolmasakhazblogged! masak++ 'November 7 2009 -- hasten the process of de-branchification': http://use.perl.org/~masak/journal/39858?from=rss
19:58 payload joined #perl6
20:39 pmurias joined #perl6
20:41 lisppaste3 colomon pasted "past versus pir summary, sorted by past" at http://paste.lisp.org/display/89956
20:42 pmichaud colomon: wow
20:42 colomon that's all in nqp-rx.
20:42 pmichaud very.... interesting
20:42 pmichaud right
20:42 colomon I'm assuming the pir being slightly faster normally is some sort of pre-fetching from the hard drive issue.
20:43 pmichaud no, it's likely that dumping the pir is much faster than dumping past or post
20:43 colomon ah, okay.
20:43 pmichaud i.e., you're seeing the difference in output times there
20:43 pmichaud --target=past  ==   cost to generate past + cost to display it
20:43 colomon any idea how much startup time is involved?
20:43 pmichaud --target=pir  == cost to generate past + cost to generate post + cost to generate pir + cost to display it
20:44 pmichaud but cost to display past >>> cost to display pir
20:44 colomon funky.
20:44 pmichaud well, the pir is a simple string
20:44 pmichaud the past is a fairly deep tree structure
20:45 pmichaud so it's entirely possible for cost to display past to be more than the cost of displaying pir + generating post + generating pir
20:45 colomon huh.  so ideally we'd like to figure out how to factor out the displaying cost in each case, and whatever initial startup time there is as well.
20:46 pmichaud maybe, but it's not that important
20:46 NorwayGeek joined #perl6
20:46 colomon That is to say, it seems to me the question is whether the slowdown effect is present but swamped by those other times, or if it only shows up in longer files.
20:47 pmichaud I think it must be related to longer files
20:47 pmichaud can you also run your benchmark on http://pmichaud.com/sandbox/b.pm ?
20:47 pmichaud so I can get timings/ratios for it?
20:47 colomon sure, give me a sec
20:47 pmichaud great
20:47 pmichaud although it'll take more than one sec :)
20:47 pmichaud (it's currently running 55 sec on my box)
20:48 colomon though I'm not sure why my figures would be better than yours.  :)
20:48 pmichaud you have more of them at the moment
20:48 pmichaud and the figures for the */*/Actions.pm files are interesting
20:48 colomon ah, and machine / OS make a difference.
20:48 pmichaud so I want to see how b.pm compares
20:48 pmichaud right
20:49 pmichaud also, my machine is likely to be preoccupied for the next hour crunching the profiling output :)
20:49 colomon should I also do the rakudo actions.pm?
20:52 colomon okay, for b.pm: past 10.766s, pir 27.629s, ratio 2.5
20:52 pmichaud right
20:52 SquireOfGothos joined #perl6
20:52 pmichaud it gets worse as we get bigger
20:52 pmichaud jnthn may have found it
20:52 colomon yeah.
20:52 pmichaud it's likely .lineof on a unicode string
20:53 pmichaud er, utf8
20:53 jnthn colomon: I found that http://gist.github.com/228877 helps massively.
20:54 pmichaud given that I suspected unicode at the outset, this all makes sense
20:54 pmichaud er, utf8
20:54 colomon want me to install that patch and try again?
20:54 pmichaud if you'd like, but I've got a 95% confidence that this is the current issue
20:54 jnthn Provided someone other than me can re-produce the effects of the patch, I think we're fine.
20:54 jnthn (And if pm already has, then...)
20:55 pmichaud I haven't, but if the string is indeed unicode it explains it almost immediately
20:55 jnthn Well, we're "fine" in that we may have narrowed it down.
20:55 pmichaud just a bit...
20:55 pmichaud (working)
20:55 colomon is it a real patch or just a hack to demonstrate the probable source of the problem?
20:55 pmichaud hack to avoid the problem
20:56 jnthn colomon: it just goto's over the code that I think is the problem.
20:56 pmichaud (by turning off the capability that is likely the source)
20:56 jnthn Because we can "get away" with not doing it.
20:56 jnthn (we lose source line number annotations)
20:58 colomon :O  Is it scanning the entire file to find the line number or something?
20:58 pmichaud close
20:58 pmichaud it does do some caching of information, yes.
20:58 pmichaud but on utf8 encoding strings, even if we know the starting location (by character position) we still have to go back to the beginning of the string to compute the offset
20:59 pmichaud ....which argues for precomputing the entire string, actually.
20:59 pmichaud laziness is of little benefit  (well, it still has some, but not as much)
21:00 * diakopter wins
21:00 pmichaud better still might be to try to make sure the string doesn't become utf8 in the first place
21:00 pmichaud but that's not always possible/likely
21:02 colomon it's going through all the file so far at every line?
21:03 pmichaud no, but it's an O(n**2) operation
21:03 pmichaud let's suppose that we're asking for line 99
21:03 colomon but what's n?
21:03 pmichaud the number of characters/lines in the file
21:03 colomon nod.
21:04 pmichaud it can be linear, but only if we have a way to restart scanning at a known position
21:04 pmichaud but the way Parrot's structures are set up, we always have to restart scanning at the beginning
21:05 pmichaud so, if we do a single scan all-at-once at the beginning, it's a linear operation, and we incur a memory cost of O(m)  (where 'm' is the number of lines in the string)
21:05 eternaleye pioto: huludesktop doesn't install any files on my amd64 mqachine (both 0.9.6.1 and and 0.9.4.1)
21:06 pmichaud hmmmmmmmm
21:06 pmichaud oh, wait, I tested the wrong string
21:07 pmichaud yes, the source strings are all utf8
21:07 pmichaud they're supposed to get transcoded down to ascii/fixed8 if possible, I wonder why that's not happening
21:12 eternaleye Ergh, EWRONGCHANNEL
21:16 pmichaud Oh.
21:16 pmichaud Okay, I see what changed now.
21:16 meppl joined #perl6
21:16 pmichaud yes, this explains it all.
21:17 pmichaud the old nqp transcodes the source string down to iso-8859-1 before processing it
21:17 pmichaud nqp-rx _thought_ it was doing it, but had overloaded the code that actually does the transcoding
21:17 pmichaud so no transcoding taking place, and we've been parsing utf8 strings all along
21:17 pmichaud which means slower than we'd like
21:18 pmichaud okay.  I have to do grocery shopping now, then will fix lineof and transcoding when I return
21:18 pmichaud thanks to everyone for helping me track this down
21:21 seanstickle joined #perl6
21:22 markmont Question about how things should work in Perl 6... should a builtin's (e.g., die()'s) caller always have a lexpad?  Or are there some situations where it is expected not to?  I'm looking at a case where $P0['lexpad';1] gives a NULL PMC and wondering if this is a sign of a bug.
21:22 phenny markmont: 26 Oct 17:23Z <moritz_> tell markmont I've sent you a pugs commit bit, so that you can apply patches to the spectests yourself (for future patches ;-)
21:24 lucs joined #perl6
21:26 jnthn markmont: It can happen if die is called from one of the PIR routines, which doesn't have a lexpad.
21:27 jnthn It's more an implementation detail though.
21:29 markmont jnthn:  Great.  I'm looking at the use of set_global '$!' in die() that you thought was iffy a few weeks back.  I'll see if I can figure out the correct thing to do in this situation.
21:37 xp_prg joined #perl6
21:43 frew joined #perl6
21:43 synth joined #perl6
21:44 xinming joined #perl6
21:50 ted__ joined #perl6
22:05 moritz_ what should $! really be? a contextual?
22:12 jnthn Oh
22:12 jnthn Probably, yes.
22:14 spinclad transcoding down doesn't seem like a permanent solution; if i have kanji identifiers all over the place, it won't help at all.
22:15 tak11 joined #perl6
22:15 tak11 ?
22:17 spinclad a permanent solution would be a .pos that knows multiple offsets: byte offset as well as the various character levels; and parrot support for scanning from such a .pos
22:17 sjohnson ? what
22:19 spinclad this might make parsing utf8 nearly as fast as fixed8, so no transcoding needed.
22:19 spinclad (uninformed speculation on my part, of course)
22:20 * spinclad has errand, must err &
22:21 markmont Now that I thought to look it up, S02/Names says, "$_, $! and $/ are always contextual"
22:25 pmichaud transcoding helps in the cases where we can, it's not a solution for all cases
22:25 pmichaud eventually parrot will switch to fixed-width strings for unicode, then speed won't be nearly an issue
22:25 pmichaud it's just the variable width encoding that makes things unbearably slow
22:25 pmichaud still, by precomputing the entire .lineof list we'll help the kanji folks as well :-)
22:26 pmichaud afk, have to go to the grocery store *again*  :-(
22:27 Tene can't you just write a groceries compiler in nqp-rx?
22:27 pmichaud probably, but I don't think it'll be ready in time.
22:27 pmichaud afk again for a while... bbl
23:11 seanstickle joined #perl6
23:37 eternaleye joined #perl6
23:52 emma joined #perl6
23:53 emma Pardon me. Does perl6 have anything to do with perl? Are they two different languages?
23:53 Tene Depends on how you look at it. ;)
23:53 emma I was just told by the people in #perl that they are not the same language.
23:53 Tene Perl 6 doesn't share any code with Perl 5.  It's a complete reimplementation, break of compatibility, etc.
23:53 emma I find this state of affairs needlessly confusing and if perl came first then naming your language perl6 is just rude.
23:54 emma How would you like it if we made yet anther language called Perl6.0 just to confuse people and steal your success?
23:54 jnthn emma: Larry Wall, who created Perl from version 1, is the creator of Perl 6.
23:54 emma Why did he go and cause confusion like that?
23:54 jnthn I don't see the confusion.
23:54 emma Why didn't he make a new name or else work on Perl that he started?
23:54 Tene It takes a rather narrow view of "perl" to say that only Perl 5 is Perl.
23:55 jnthn Indeed.
23:55 emma Perl6 is not perl.
23:55 Tene emma: Many languages have breaks in compatibility between major versions.
23:55 emma I can tell you that in #perl they do not think that Perl6 is Perl.
23:55 jnthn emma: I think you'll find plenty of people who will say Perl 6 *is* Perl.
23:55 Tene Perl 6 is not Perl 5.  Perl 6 is Perl.
23:55 fax emma watch Audreys thingy on google video if you get time!
23:55 fax she is talking about the language design
23:56 fax <http://video.google.com/videop​lay?docid=-3876155376103839772#>
23:56 jnthn emma: I for one feel that way.
23:56 huf but then, perl is not Perl :)
23:57 Tene ;)
23:57 jnthn I regularly switch between 5 and 6, and it's not that big a deal. Yes, Perl 6 breaks backward compability, but what Tene said earlier - that's nothing that other languages haven't done.
23:57 Tene emma: Perl 6 is the community's rewrite of Perl.  Look into the history of Perl 6.
23:58 emma Which language do you write irssi scripts in?
23:58 Tene The Perl 6 design process started with RFCs from the community, on what they'd like to see fixed and improved in Perl.
23:58 Tene Can you write irssi scripts in Perl 1?
23:58 Tene Is Perl 1 not Perl?
23:59 emma Well what is going on in #perl then, what are they all doing there?
23:59 Wolfman2000 Evening. Simple question. Sushi: great, or "ugh, raw"?
23:59 Wolfman2000 emma: We're planning the next big language.
23:59 Wolfman2000 Perl 5 will still see big use for awhile.

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

Perl 6 | Reference Documentation | Rakudo | Niecza | Specs