Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2009-03-14

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:23 frooh joined #perl6
00:34 kate21de joined #perl6
01:02 shinobi-cl joined #perl6
01:02 wayland76 yary: Was there any indication as to what file that was in?
01:16 nbrown04 joined #perl6
01:19 awarefish joined #perl6
01:27 nbrown04 joined #perl6
01:31 eternaleye joined #perl6
01:38 awarefish joined #perl6
02:18 arejay joined #perl6
02:19 ujwalic joined #perl6
03:13 Sepheebear joined #perl6
03:20 shinobi-cl left #perl6
03:24 WootKitKwok joined #perl6
03:37 japhb joined #perl6
03:47 japhb Any Rakudo hackers about?
03:55 wayland joined #perl6
03:59 alester joined #perl6
03:59 justatheory joined #perl6
04:11 meppuru joined #perl6
04:29 WootKit joined #perl6
04:35 khisanth_ joined #perl6
04:44 wayland_ joined #perl6
04:46 nihiliad joined #perl6
04:50 alester hey look we have a logo http://rakudo.org/
04:51 wayland_ Great :)
06:12 sri_kraih joined #perl6
06:20 szabgab joined #perl6
06:38 meppl joined #perl6
06:45 mberends szabgab: morning, just read your twitter and termination of TPF grant. I share your opinion about the difference between wanting or having to work on projects. There is far less pressure without money.
06:51 szabgab mberends, morning
06:56 mberends I also look forward to Perl 6 Tricks and Treats
07:25 buu joined #perl6
07:39 wayland76 joined #perl6
07:39 Tene joined #perl6
08:30 finanalyst joined #perl6
08:35 mikehh rakudo (41267fd) builds on parrot r37405 -make test/make spectest PASS - t/spec/S02-literals/sub-calls.rakudo - TODO passed:   16
08:35 mikehh on Kubuntu Intrepid i386
08:36 mikehh going to switch to Kubuntu Intrepid AMD64 now
08:47 M_o_C joined #perl6
08:55 kate21de joined #perl6
08:56 sri_kraih_ joined #perl6
08:57 protorom joined #perl6
08:59 Matt-W @tell masak I copied Makefile.PL from November into Form and modified it to support rakudo-in-parrot and parrot-in-rakudo. My remaining concern is that it won't work on Windows due to system()ing out to make a symlink, but I don't really care right now. In any case, Form should (when I've pushed) play nice with proto now, and it has a nice make test target too.
08:59 lambdabot Consider it noted.
09:00 protorom left #perl6
09:18 masak joined #perl6
09:18 masak good weekend morning, parrotcamels.
09:18 lambdabot masak: You have 1 new message. '/msg lambdabot @messages' to read it.
09:18 mberends good $same-to-you, masak
09:19 masak Matt-W: marvellous. there are a lot of platform specificalities in all our code right now. will be fixed over time, I hope.
09:23 mikehh masak: and a jolly good morning to you
09:23 masak jolly it is, indeed.
09:23 masak I've decided to dedicate more or less the whole day to Perl 6 activities.
09:24 mikehh excellent
09:26 masak possible activities include (1) adding November features, (2) reviewing mberends++' Pod suite, (3) u4x prototyping, and (4) Web.pm tnkering.
09:27 mberends masak: I would like to build some 'cheat' like wiki-client-help system, with November as backend. Are there backups being taken for the content?
09:28 masak mberends: generally, or on november-wiki.org ?
09:28 mberends the latter.
09:28 masak no -- but we try to keep the content we like in the git repo.
09:31 mberends ok, I shall have to consider some own backups as well then. I have an LWP::Simple in the works or may just run("wget ...");
09:32 masak cool.
09:33 barney joined #perl6
09:33 mberends I also want to reserve the command 'rakudoc' for something appropriate to Perl 6 Pod.
09:33 masak mberends: by the way, I've been poised to make use of your SVG and HTTP::Deamon solutions for quite some time now, but haven't really gotten around to sticking the pipes together. I guess the next natural step is to have Druid render something that looks like a board in SVG.
09:33 masak mberends: nice pun. :)
09:34 mberends masak++: did you finish refactoring Druid to separate out the presentation layer?
09:34 masak aye, over a month ago.
09:34 mberends cool.
09:34 masak I still need to blog about it, though.
09:35 masak it was a truly wonderful refactoring.
09:35 masak (if I may say so myself)
09:35 mberends heh
09:35 masak I made an SVG image to diagram the refactoring, but I haven't really gotten it to reflect the true wonderfulness of it yet.
09:36 masak so I'm stalling a bit, letting ideas simmer.
09:36 Verden1995_ joined #perl6
09:36 masak there's really no rush to it.
09:36 * masak backlogs
09:39 mberends what software do you use to draw SVG images? Inkscape looks good.
09:40 masak mberends: I use that to post-process the output from a Perl 5 script that trawl the source files before and after.
09:41 mberends masak++: now to port that to Perl 6 :)
09:41 masak not a priority, but yah, wouldn't be difficult.
09:42 masak looking at the SVG, it seems that the last thing I tinkered with was autogenerating soft shadows under the boxes representing the source files.
09:43 masak I needed shadows, because the image was simply too boring. I usually don't feel the need to add visual candy, but this was a case where I did.
09:44 mberends nice work. that seems similar to the 2.5D perspective on the Druid board.
09:44 masak perhaps somewhat.
09:45 masak @tell alester nice logo. in my browser, its background is white -- would it be possible to make it transparent?
09:45 lambdabot Consider it noted.
09:48 mikehh apart from testj make fulltest_all PASSes at r37405 in Kubuntu Intrepid i386
09:48 mikehh sorry that should be in #parrot
09:51 mberends Rakudo spectest all successful on Debian stable amd64, parrot r37407
09:56 buubot joined #perl6
10:06 kanru joined #perl6
10:26 abra joined #perl6
10:40 masak [particle]: when can we look forward to -n and -p in our daily Perl 6 lives?
10:41 Matt-W Morning
10:43 masak Matt-W: top of the morning, sir. nice work on the Makefile.PL.
10:45 Matt-W :)
10:45 Matt-W Well after we talked about it, it was pretty easy to do the actual code
10:45 Matt-W just weird writing Perl 5
10:45 Matt-W Looks clunky :)
10:49 masak I know what you mean. :)
10:50 Matt-W all those brackets!
10:50 masak a simple Perl 6 REPL: http://gist.github.com/79046
10:51 Matt-W very simple
10:51 masak Rakudo++
10:52 Matt-W perl 6 ++
10:52 masak it seems that void-context prompt doesn't read a line, though.
10:52 masak is that a bug or a feature?
10:52 Matt-W hmm
10:54 masak if a feature, it seems not such a desirable one, by me.
10:54 masak I mean, print already does that, and has a more apt name for the purpose.
10:54 Matt-W I'm not sure what the point would be
10:55 * masak submits a preemtive rakudobug ticket
10:56 masak rakudo: prompt("] "); say "this shouldn't be printed"
10:56 p6eval rakudo 41267f: OUTPUT«] this shouldn't be printed␤»
10:57 pmurias_ joined #perl6
11:14 alex^ joined #perl6
11:26 ludan joined #perl6
11:29 jnthn morning all
11:29 jnthn erm, actually not any more it ain't...
11:29 * jnthn slept through that bit of the day
11:29 masak jnthn: good subjective morning to you, sir.
11:29 jnthn masak: :-P
11:29 * masak was a bit tardy today as well
11:30 masak 9 o'clock!
11:30 masak I don't think that has happened in weeks. good thing it happened on a weekend.
11:30 jnthn masak: Yeah, but I stayed up until 1am working on patches to make outer lexicals visible inside an eval. :-P
11:30 jnthn (I got it working, but was too knackered to write the tests for the Parrot changes and smoke and commit it all. Will do it later today.)
11:32 masak "knackered" -- is that related to the Ballmer peak somehow?
11:32 * masak is unfamiliar with this word in English
11:33 jnthn masak: slang-y synonym for exhausted
11:33 masak ah.
11:33 jnthn Though it can also mean broken too.
11:33 masak oh, ok.
11:33 jnthn When applied to things other than people.
11:34 jnthn anyway, my $x = 42; eval('say $x') working will be nice :-)
11:34 masak I think a lot about the meaning of words nowadays, since I'm often in a position where I have to give specific explanations of them to my language partner, with whom I have a slight but entirely hopeless crush.
11:35 masak speaking of nothing, how do I get the current line number of $*IN in Perl 6?
11:35 jnthn hopeless crush - I have one of those too... *sigh*
11:35 masak i.e. the analogue to (checking) $. in Perl 5.
11:35 masak jnthn: I'm really good at those, it seems.
11:36 jnthn I don't know but I guess it would be a method in $*IN
11:36 clkao joined #perl6
11:36 masak jnthn: not good enough! say what it's called and I'll try to code it in.
11:36 jnthn I don't see it being a special $.-ish variable.
11:36 masak jnthn: me neither.
11:36 jnthn Soes S16 not make any suggestions?
11:36 masak I think I've read somewhere that it'll be a method.
11:36 * masak checks
11:37 masak wow, it's really short these days.
11:37 masak no, I don't see anything.
11:38 masak what would be an acceptable name? .line ?
11:38 * jnthn wonders if .line is too short/ambiguous
11:38 masak :)
11:38 jnthn But it's the obvious one
11:38 ujwalic or record?
11:38 jnthn I slightly fear confusion with lines
11:38 masak ujwalic: record is technically correct but a bit obscure.
11:38 jnthn Aye.
11:38 ujwalic ya
11:38 masak jnthn: .line-num ?
11:39 masak feels half-bad to abbr num, though.
11:39 masak jnthn: .current-line ?
11:39 ujwalic line/record can be a unit
11:39 jnthn masak: Seeing those makes me like .line more...
11:39 masak ujwalic: aye, but it's unfortunate to introduce synonyms when one can possibly avoid it.
11:39 masak jnthn: indeed.
11:39 * masak goes for .line for the time being
11:40 jnthn masak: Please document it in S16.
11:40 masak ok.
11:40 ujwalic ok
11:40 * mberends is relieved about .line
11:40 jnthn At least then a mail goes to the list and people can bikeshed if they feel a need. ;-)
11:40 masak jnthn: what was it we talked about yesterday? something either of us should document in the specs? oh yes, literals as params.
11:40 masak I'll do that one first.
11:41 jnthn masak: Also .candidates and the type Multi, but I can do that one.
11:41 masak jnthn: oh, they will, they will.
11:42 * jnthn makes coffee and gets on with some of his tasks for the day
11:46 masak interestingly, S06 doesn't document the 'where' syntax in param lists; S12 does, under the heading 'Types and Subtypes'.
11:47 jnthn Perhaps to avoid a forward dep, but then I fear S02 talks about subtypes anyway, so...
11:48 masak speaking of nothing, this trips me up sometimes:
11:48 masak rakudo: my @a = "foo", "bar", "foo"; say @a.grep({ /foo/ }).perl
11:48 p6eval rakudo 41267f: OUTPUT«["foo", "bar", "foo"]␤»
11:48 masak I somehow expect grep to do smartmatching for me.
11:48 masak I don't know whether that's a silly expectation.
11:48 masak probably is.
11:53 jnthn Does @a ~~ /foo/ not do what you want?
11:54 masak rakudo: my @a = "foo", "bar", "foo"; say ( @a ~~ /foo/ ).perl
11:54 p6eval rakudo 41267f: OUTPUT«Match.new(␤ # WARNING: this is not working perl code␤ # and for debugging purposes only␤ text => "foo",␤ from => 0,␤ to   => 3,␤)␤»
11:55 masak moritz__++
11:56 mikehh joined #perl6
11:57 masak oh! how do I refer to a parameter thus restricted?
11:57 masak say I have 'multi sub fib( 0|1 ) { return ... }'
11:57 masak what should I write instead of the three dots? :)
11:57 masak $^n ?
11:58 * masak cackles evilly at the thought
11:58 szabgab guys, just a quick question, was there any progress on the IO side, can I open socket from Rakudo already to write some LWP -ish stuff ?
11:59 masak szabgab: not that I know.
11:59 szabgab :-(
11:59 masak szabgab: is there a blog post outlining what you want?
11:59 szabgab regarding LWP ?
12:00 szabgab I want to try to write an rss aggregator
12:00 masak regarding opening sockets.
12:00 szabgab I can run wget for now
12:01 szabgab oh and another important question, any database access ?
12:01 jnthn masak: You write $x where 0|1 :-P
12:01 masak jnthn: aw, don't spoil it :)
12:01 jnthn szabgab: There was some work on that already, I believe.
12:01 masak jnthn: seriously, is there any overwhelming reason not to use placeholder variables for this?
12:02 jnthn masak: You are now allowed to use placeholders and an explicit signature.
12:02 masak ah.
12:02 masak ok.
12:02 szabgab the only problem I think is that I am still too far in my learning curve of Perl 6 to actually do that kind of stuff
12:03 szabgab and too many yaks to shave first
12:04 szabgab I might be better off just making noise about Perl 6 and hoping that some more clever people will get interested and implement the stuff I need
12:05 masak szabgab: sounds like a plan.
12:06 jnthn szabgab: http://perlbuzz.com/2008/12/database-access-in-perl-6-is-coming-along-nicely.html
12:06 szabgab "who knows does, who doesn't know teaches it"
12:07 szabgab jnthn, that was before last Xmas ...
12:08 masak oh, there's an input_record_count() in IO::Readable::Encoded in S32-setting-library/IO.pod
12:08 masak anyone mind if I just rename it to line() ? :)
12:09 * Matt-W finds the comments depressing
12:10 Matt-W On the other hand, a working database layer... very nice
12:10 masak I'm also pondering removing all underlines and replacing them by dashes in that file. :)
12:11 * masak hears no protests, gets on with it
12:11 Matt-W allowing dashes in identifiers is going to surprise a lot of people :)
12:11 szabgab oh I love when Firefox crashes
12:11 masak Matt-W: Perl 6 as a whole is going to surprise a lot of people.
12:12 Matt-W masak: yes, especially the people who think it will never exist
12:12 szabgab Matt-W, that's about everyone
12:12 Matt-W I know :(
12:12 Matt-W I'm spreading the word though
12:13 szabgab so it will be a big surprise :-)
12:14 mberends Re: use DBDI - where is that code available? I'd love to try it out.
12:16 mberends ah, probably parrot/ext/SQLite3/DBDI
12:16 masak I keep telling people that as far as I'm concerned, Perl 6 Christmas is already here.
12:19 masak ok, problem: there's an input-record-count() in the role IO::Readable::Encoded; that's the one I wanted to rename into lines(). but there's also an output-record-count() in IO::Writeable::Encoded.
12:19 masak it feels assymmetrical to rename one but keep the other.
12:19 masak OTOH, I can see one object doing both of the roles, and I don't want to introduce a collision.
12:20 masak are people fine with input-lines() and output-lines(), respectively?
12:20 mberends can a stream be simultaneously input and output? if not, stick to lines().
12:21 masak mberends: I don't know if it can. if it can't I'll definitely pick lines() for both.
12:21 xinming joined #perl6
12:21 mberends most inputstreams are not outputstreams
12:22 jnthn masak: I think you can open :rw
12:22 masak mberends: if it's at all possible, I'm very reluctant to call both of them lines()
12:23 masak that's exactly what you shouldn't do if you plan to mix roles.
12:23 masak rakudo: multi fib(0) { return 1 }; say fib(0)
12:23 p6eval rakudo 41267f: OUTPUT«Malformed routine definition at line 1, near "fib(0) { r"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
12:24 jnthn masak: Agree, I hadn't thorugh about output lines too.
12:24 jnthn input-line and output-line sounds sensible.
12:24 masak the disadvantage with input-lines() and output-lines() is that there are already methods in there called input-record-separator() and input-field-separator(), ditto output.
12:25 jnthn oh
12:25 masak so it might be mixing metaphors a little.
12:25 masak or terms, anyway.
12:25 jnthn then I guess you'd want input-record and output-record after all... :-|
12:25 masak unless I change the other methods to input-line-separator :P
12:25 * masak is no fan of "record"
12:26 masak it's longer, and not many people know what it is.
12:27 jnthn Yeah...
12:27 * masak takes that as a 'yes'
12:27 Matt-W awww
12:27 jnthn masak: I don't especially hold any authority in any sense over the IO stuff. :-P
12:28 * Matt-W tried to refactor Form into some nice submodules and broke it :(
12:28 jnthn Awww.
12:28 Matt-W it's my favourite error message
12:28 jnthn Matt-W: It's possible Rakudo broke it for you. ;-)
12:28 Matt-W Null PMC access in find_method()
12:28 masak jnthn: well, I'll take the responsibility for the change. also, forgiveness/permission.
12:28 jnthn masak: Oh, I'm not saying don't do it, just that I'm not really the best person to bounce IO stuff off. :-)
12:28 masak Matt-W: a new bug? submit it!
12:29 Matt-W I'm not sure what's actually going on
12:29 Matt-W time for a test case...
12:29 masak jnthn: well, you're the one around right now who answers, so that'll do. :)
12:29 masak Matt-W++
12:29 mikehh rakudo (41267fd) builds on parrot r37409 - make test/make spectest PASS - t/spec/S02-literals/sub-calls.rakudo: TODO passed: 16 - Kubunti Intrepid AMD64
12:31 Matt-W hmm
12:31 jnthn mikehh: I spotted that but didn't have time yet to see if we fixed something or if it's a false pos...
12:32 mikehh I have  been getting it on i386 and AMD64 since yesterday I think
12:33 Matt-W hmm in attempting to recreate the bug, I seem to have found a different bug
12:34 jnthn mikehh: I did some work on Rakudo yesterday, so maybe I can take blame for it. ;-)
12:34 pugs_svn r25821 | masak++ | specced syntactic 'where' sugar in param lists
12:34 mikehh hey passing tests are good
12:35 pugs_svn r25822 | masak++ | replaced underscores with dashes in variable names in IO.pod
12:35 pugs_svn r25823 | masak++ | replaced 'record' with 'line' in IO.pod
12:35 pugs_svn r25823 | masak++ |
12:35 pugs_svn r25823 | masak++ | 'record' is fine and understandable in the Unix world, and used by
12:35 pugs_svn r25823 | masak++ | tools such as awk -- but line is immediately understandable and shorter.
12:35 * masak goes to buy spare asbestos suit
12:35 Matt-W hmmm
12:36 Matt-W but it isn't necessarily a line
12:36 masak Matt-W: I know.
12:36 masak Matt-W: and you can control that with input-line-separator
12:36 Matt-W but then you might end up with something called a line that isn't a line
12:36 Matt-W I suppose it's just saying 'we let you decide what a line is'
12:37 masak aye.
12:37 masak but your concern is a valid one.
12:37 Matt-W do we think dashes might become perl 6 style in names?
12:37 masak Matt-W: oh yes. yes, yes, yes.
12:37 * Matt-W is failing to reproduce this bug in a nice test case
12:37 masak Matt-W: what's the failing code?
12:38 Matt-W it's something to do with use
12:38 masak oh yay.
12:38 masak :/
12:38 Matt-W or at least, something to do with stuff in other modules
12:39 Matt-W the backtrace is a bit mysterious
12:39 Matt-W called from Sub 'parrot;Form;Actions;Form;Field;TextField;_block62' pc 646 (EVAL_21:197)
12:39 masak at that point I usually do 'cd /tmp' and create a few modules that reproduce the error.
12:39 masak Matt-W: that's not mysterious, that's business as usual. :)
12:39 Matt-W not really
12:39 Matt-W Form::Actions is a module, Form::Field is  amodule used by Form::Actions
12:40 Matt-W why is it saying Form;Actions;Form;Field
12:40 * masak doesn't know
12:40 masak good hunting.
12:40 Matt-W oooh
12:40 Matt-W I think I found it
12:41 Matt-W oh no, I cauesd a different problem
12:41 Matt-W hmm
12:42 Matt-W masak: remember the problem I had composing in a role, and you found that we have to write the fully qualified name of it?
12:42 masak Matt-W: I remember.
12:42 Matt-W well now that role, Field, is in Form::Field
12:42 Matt-W but it says Form::Field::Field doesn't exist
12:42 masak :)
12:42 Matt-W and saying Form::Field or Field give the null pmc in invoke thing
12:43 masak don't explain, write a one-liner to show it instead.
12:43 Matt-W I shall, but explaining helps me figure out how to write the one-liner
12:43 masak ok, good.
12:44 Matt-W oh
12:44 Matt-W it works in a one-liner
12:44 Matt-W hmmmm
12:45 masak so, use-related?
12:45 Matt-W gues sso
12:45 Matt-W rakudo: module A::B { role B { }; class D does A::B::B { } }
12:45 p6eval rakudo 41267f: RESULT«{ ... }»
12:45 Matt-W see, no problem
12:46 cognominal joined #perl6
12:48 masak no problem after putting the code in A/B.pm either, it seems.
12:48 Matt-W no
12:48 Matt-W but
12:48 Matt-W I made an A/A.pm which uses A::B
12:48 Matt-W the test script uses A::A
12:48 Matt-W and it says
12:49 Matt-W The type A::B::B does not exist. at line 6, near "{\n}\n\n\n"
12:49 jnthn Matt-W: Does having the thingy you're using pre-compiled make a difference?
12:49 pmurias_ joined #perl6
12:50 jnthn Matt-W: Also, do you do the "use" after a module A::B; or inside a module A::B { }
12:50 jnthn If those two are true, I suspect I know what it is.
12:50 Matt-W don't know about precompilation, yes to the latter
12:50 pmurias_ joined #perl6
12:51 jnthn Matt-W: Bet it ain't getting a fresh @?NS
12:51 Matt-W precompiling both modules makes it work
12:52 Matt-W in fact, precompiling just A/A.pm works
12:53 * masak submits rakudobug
12:53 * Matt-W isn't usre this is the problem that Form's got, but it's still a problem
12:55 jnthn Matt-W: OK, I got a good idea then of what that is.
12:55 Matt-W jnthn++
12:55 jnthn Well, jnthn-- for causing the stupid bug int he first place. ;-)
12:56 Matt-W yes, but jnthn++ for not throwing up his hands and saying 'well I don't know, you'll have to spend two weeks learning how rakudo works and fix it yourself'
12:56 jnthn Matt-W: You could do that too...more people knowing Rakudo guts is a good thing. ;-)
12:57 Matt-W I have a week off work soon
12:57 Matt-W I may spend some of it poking around and asking questions
13:07 * masak should sit down with the Rakudo guts sometime
13:10 Matt-W Right, I should be off
13:10 Matt-W Else I shall be late for my afternoon of recorder playing
13:10 Matt-W I may find some more bugs this evening :)
13:11 Matt-W &
13:11 jnthn masak: Well, pm will give a talk on it at NPW too. :-)
13:11 masak excellent.
13:11 masak NPW will be awesome.
13:11 jnthn Only a month until we'll be making our way to Oslo.
13:12 masak aye. :)
13:12 jnthn It's strange to think...the beer at my next Perl workshop will quite literally cost ten times as much as it did at my last one.
13:12 Matt-W If I start swimming now, do you think I can get there in time?
13:12 jnthn Matt-W: Depends, where would you be swimming from?
13:13 masak Matt-W: considering only swimming speed, yes, I think so.
13:13 Matt-W whereever the closest part of the british coastline is
13:13 jnthn Then what masak said.
13:14 jnthn Just mind the sharks and hypothermia.
13:14 Matt-W mmm maybe I'll steal a boat
13:14 Matt-W really &
13:16 mberends Google Maps doesn't give swimming directions, but walking under 5 days from Nottingham
13:17 * masak finds the wildly out-of-date http://svn.perl.org/perl6/misc/trunk/builtins.pod
13:17 Whiteknight joined #perl6
13:17 masak really, we should have explode-if-not-updated-for-two-years timeouts on such documents.
13:20 jnthn mberends: Does that require ability to walk on water?
13:20 mberends heehee
13:21 masak walking on water is so 1st century.
13:25 jnthn 5 days of walking doesn't sound so bad, until you realize it means *literally* five full days of non-stop walking.
13:26 masak bring cakes and water.
13:26 masak s/cakes/cookies/
13:27 ruoso joined #perl6
13:29 jnthn mmm...talking of which...I need lunch
13:31 ruoso Hello!
13:34 masak ruoso: hiya.
13:34 ruoso masak, about the web.pm dispatcher thing...
13:35 ruoso I think the multi is just going to call $action.*execute
13:35 ruoso I mean
13:35 ruoso it will simply provide a way to resolve which action should be invoked
13:36 ruoso this is needed to still provide ways for you to compose roles into the actions
13:36 ruoso i.e. Catalyst::Action::SOAP::DocumentLiteral
13:36 masak this is still all quite abstract to me.
13:37 masak how small would a minimal example be, you think?
13:37 masak details can be skipped, but runnability would be a definite plus.
13:38 ruoso basically
13:38 ruoso in the sketches I sent you
13:38 ruoso you replace the regex part
13:38 ruoso by the multi part
13:38 ruoso where each multi variant returns the action object it represents
13:38 ruoso then @parts.reduce: &actions;
13:38 ruoso will reduce to the last action
13:39 masak ok.
13:39 masak still quite abstract, I'm afraid.
13:39 ruoso where you still have chained actions
13:39 masak but I'm happy to leave the exact implementation of the dispatcher to ihrd++.
13:41 masak mberends: have you seen this? http://search.cpan.org/~dconway/Perl6-Perldoc-v0.0.5/
13:43 mberends masak: yes, it's perl5 code. I intended to study it if I even ran out of ideas, but so far haven't had the need ;)
13:43 mberends *ever
13:43 masak ok, good to know. :)
13:44 * skids needs to "be talked down" over contend blocks
13:44 masak mberends: if you would estimate the completeness of your module suite relative to S26... ?
13:44 skids I'm looking at them and thinking "this will never work"
13:44 ruoso skids, contend blocks are from a time where STM was assumed to be part of every implementation
13:45 ruoso this is no longer true... it's considerably harder to think about contend without STM
13:45 skids Even so, STM would have to be on all the time in every thread for them to work as described.
13:45 skids But that does short-circuit things a good deal for me, thanks.
13:46 ruoso skids, yes... STM would be on all the time...
13:46 skids Just out of interest, where were the implicit barriers supposed to be located?
13:47 skids (Because you have to commit sometime)
13:47 ruoso well, you would have "autocommit on"
13:48 ruoso ;)
13:48 skids On a per-object basis?  Anyhow good thing to know.
13:48 pmurias ruoso: hi
13:48 ruoso hi pmurias
13:49 ruoso I'm starting to sort out the big refactoring in SMOP
13:49 ruoso to split out the modules
13:50 ruoso pmurias, one of the important changes is that I'd like to remove the circular-dependency between lowlevel.sm0p and mold
13:50 ruoso so my idea is to implement a very low-level state machine inside lowlevel.sm0p
13:50 ruoso that behaves as an interpreter to be able to call DESTROYALL
13:51 finanalyst left #perl6
13:52 mberends masak: the low hanging fruit of common Pod is complete, including Pod5 upconverter. Format codes about 50% in text, man, xhtml, pod5 and pod6 emitters. =table and =use not even started.
13:52 pmurias ruoso: interpreter = continuation?
13:52 masak mberends: ok. thanks.
13:52 masak lunch &
13:52 DemoFreak joined #perl6
13:53 ruoso pmurias, yes... it might be good timing to fix that nomenclature
13:54 skids As to the issue of "whether we even need coroutines"...
13:55 skids gather/take kill a lot of the need, but for code porting from stuff like Lua, we'll need a form where the return value of the yield function can be fed in from the calling routine every call.
13:55 skids I was thinking maybe .=:something
13:55 ruoso masak, I'm not very confortable with changing $.input-line-separator, because when someone changes it is precisely because they need some semantic different then "line"
13:56 skids Assuming .= does syntactically refer to prefix:<=>, I'll have to refresh on that.
13:56 ruoso pmurias, you think we could call it simply continution?
13:56 ruoso what we currently call "interpreter implementation"
13:57 ruoso or maybe that is the interpreter
13:57 ruoso and what we call interpreter is something else
13:57 ruoso I think not many runtimes create this barrier
13:57 ruoso continuation interoperability
13:58 pmurias the biggest problem with calling it the contiunation is that people might assume it's reasumable
13:58 skids "one-shot" continuation
13:58 skids (seems to be a CS term I've seen used at least once.)
13:59 ruoso it might be resumable
13:59 ruoso if someone writes one that is
13:59 pmurias if someone adds a .clone method
13:59 ruoso yes
13:59 ruoso so, in terms of the way we use it
13:59 ruoso it is a continuation
14:00 pmurias we could call it a continuation than
14:00 ruoso continuation class
14:00 pmurias class?
14:00 ruoso since it is just the implementation used by the actual continuation objects
14:01 ruoso Mold is a continuation class
14:01 ruoso you call new on it to get a new continuation
14:01 pmurias i see
14:04 pugs_svn r25824 | ruoso++ | [re-smop] created a new directory to host the refactored SMOP
14:05 pmurias ruoso: re circular dependency between lowlevel.sm0p, we can either hand-write the m0ld block or i could add an option to m0ld to compile to C switches
14:05 pmurias s/,/and mold/
14:06 shinobi-cl joined #perl6
14:06 shinobi-cl left #perl6
14:07 ruoso pmurias, the circular dependency is not about the compilation
14:07 ruoso but about the runtime
14:07 ruoso I want to have lowlevel.sm0p into a separated module
14:07 ruoso smop-gc
14:07 ruoso and mold in its own module as well
14:07 ruoso smop-mold
14:08 ruoso so I need smop-gc to be independent of smop-mold
14:08 ruoso because smop-mold already depends on smop-gc
14:11 skids hrm, could I interest anyone in the idea that :\(..) should be an "adverbial capture" ?
14:11 pugs_svn r25825 | pmurias++ | [re-smop] fix typo in README
14:13 TimToady masak: how about .ins and .outs?
14:14 ruoso skids, except by the fact that named arguments need identifiers... i.e. strings
14:15 skids What about :{...}?
14:15 ruoso same issue
14:15 skids But it already exists.
14:15 ruoso in which context?
14:16 skids It's an "adverbial block" in S02
14:16 skids Goes into the slurpy block parameter when used on subs IIRC.
14:18 pmurias ruoso: would it be a good idea to seperate memory tracing out of lowlevel.sm0p?
14:18 ruoso is it possible?
14:19 Sepheebear joined #perl6
14:20 ruoso TimToady, what does "adverbial block" means? is it sent as a named argument?
14:20 pmurias we could move the whole tracing guts into a different file and level #ifdef'ed hooks
14:21 ruoso ah sure
14:22 ruoso with the refactoring it makes even more sense
14:22 ruoso because we have an entire module to hold the gc
14:23 pmurias or we could even use LD_PRELOAD if we are adventurous
14:23 ruoso to enable or disable the trace?
14:24 pmurias to enable it
14:25 ruoso it's a cool idea, for sure
14:26 skids Hrm, I guess dotted form of iterate prefix is .<=> -- more characters, but actually for what it would be used for, quite coincidentally apt.
14:30 TimToady missing a colon, I think
14:30 TimToady .:<=>
14:31 pugs_svn r25826 | pmurias++ | [re-smop] copied over smop_base.h
14:33 tuxdna joined #perl6
14:35 cai_ joined #perl6
14:35 skids RIght you are.
14:36 skids So if we were to say a coroutine is just an iterator, one would write something that returns an iterator, then invoke the return object $it.:<=> :<something here> to pass yield a return value.
14:36 skids That just leaves, what signature are they passing into, for introspection, and whether the "out of iterations" exception would be OK for coro fiends.
14:37 diakopter howdy folks
14:37 pmurias diakopter: hi
14:40 pmurias ruoso: what exactly is interpreter capture - we don't have it in the "classic" smop but it's supposed to be in the refactored one
14:40 TimToady skids: assuming it's an unthrown exception, it's just an undef thing
14:41 skids Yeah I think that will likely be fine.
14:42 diakopter I extended tycho's ListObject.cs to support lazy lists using an Enumerable<AnyObject> constructor or a Block<AnyTuple<AnyObject>> (whee)
14:43 skids I don't think we want to even think about the "coroutine that pretends to be a function" syntax in Perl6, it is just plain ugly and the people that really want coroutines know it is a flawed presentation.
14:44 diakopter wayland76: thanks for the OISC link the other day
14:45 skids So I think for that section of S17 I'll just list the constructs that are doing coroutine stuff and punt over to S07 and other docs.
14:45 pmurias skids: if you don't what the coroutines to pretend to be functions can't you use gather/take
14:46 skids Not for people that want return values on their yields (takes).
14:46 skids (For porting code from Lua for example)
14:47 pmurias you mean something like $foo = take 4?
14:47 skids Plus they'll want them to be full class objects not statements.
14:47 ruoso pmurias, it's a capture that has the current interpreter as only positional param
14:47 ruoso and so it can be constant
14:48 ruoso to call methods such as loop
14:48 skids Yeah, which now returns the same thing both there and in caller, so likely we'd be keeping "yield"
14:49 pmurias ruoso: and we need it as we don't have a native capture at that point during bootstrap right?
14:51 skids Oh, right I have to put some thought into the nested/composable/code-reuse aspect, but I'm sure that won't get very ugly.
14:52 pmurias ruoso: we need native capture for bool
14:53 ruoso pmurias, re boostrap: right
14:53 ruoso pmurias, we might want a constant bool-true-catpure and bool-false-capture for that purpose...
14:53 kidd joined #perl6
14:54 pmurias and a for idconst?
14:54 kanru joined #perl6
14:54 pmurias s/a//
14:56 ruoso maybe
14:57 ruoso but we usually don't call anything on idconst, do we?
14:57 ruoso pmurias, we might also replace the MESSAGE member of them at a later stage
15:00 Tene_ joined #perl6
15:02 pmurias ruoso: everything visible by Perl 6 needs FETCH/true and likely STORE
15:07 ruoso pmurias, right... we first define them without it, and replace the MESSAGE member of the RI later
15:07 ruoso in s0native, we make a very naive MESSAGE
15:07 ruoso and in native we replace it
15:08 ruoso what do you think?
15:10 pmurias i'm not very keen on having the RI mutable
15:11 pmurias ruoso: we could generate constant invocant only captures the same way we generate idconst's
15:11 ruoso but the problem is in the usage
15:12 ruoso it would not accept other types of captures...
15:12 ruoso but it won't be mutable
15:12 ruoso it's just a bootstrap mechanism
15:16 pmurias if it's a simple "not implemented" stub i guess it won't do any harm
15:21 ruoso it will only contain the features needed by gc and mold
15:21 ruoso then in "native" it replaces by the correct implementation
15:29 nihiliad joined #perl6
15:30 Psyche^ joined #perl6
15:41 masak TimToady: perfect. I'll change it right away.
15:42 ujwalic what is the diff between "named parameters" and "named arguments" ?
15:43 masak ruoso: changing back to input-record-separator.
15:43 jnthn Why - and not _
15:43 jnthn ?
15:43 masak ujwalic: an argument is something you sent to a function. a parameter is something a function accepts.
15:43 masak jnthn: because we expect dashes to be the standard in Perl 6, I think.
15:44 jnthn Oh. I thought we expected underscores to be...
15:44 * jnthn cycles to the shed
15:44 masak maybe we do. I actually don't know.
15:44 ujwalic masak: are params part of sub prototype or signature
15:44 jnthn o jebat...the patch I just put into Parrot seems to trigger a GC bug.
15:44 jnthn oooh...I think I know why
15:45 masak ujwalic: they make up the signature of a sub.
15:45 ujwalic koool
15:46 masak I'm a bit uncertain whether the input record separator really is 'newline by default', as IO.pod says. wouldn't that vary with the platform? what's Perl 5's policy on this?
15:47 TimToady masak: I'm in the middle of a heavy IO edit
15:48 ujwalic masak: in win32 and unix default id linefeed \n
15:48 ujwalic is linefeed
15:48 masak TimToady: ok, withholding mine.
15:49 TimToady but on your Q, newline is not linefeed
15:49 TimToady in C it is *supposed* to mean the abstract line terminator
15:50 ujwalic ok
16:01 masak mberends: Perl6::Perldoc has a large test suite, according to Damian. you might want to look into that.
16:01 justatheory joined #perl6
16:01 * mberends takes a look
16:03 TimToady you know, guys, "method Int foo (...)" is not legal syntax...  :/
16:04 masak mberends: Damian even said in an email that it is explicitly amenable to Perl 6 implementations.
16:04 ruoso that's a bit surprising
16:04 masak TimToady: why not?
16:05 jnthn std: method Int foo() { }
16:05 p6eval std 25826: OUTPUT«##### PARSE FAILED #####␤Malformed method definition at /tmp/H5Keco8LSf line 1:␤------> [32mmethod Int [31mfoo() { }[0m␤    expecting any of:␤    method_def␤       trait␤FAILED 00:02 34m␤»
16:05 masak o_O
16:05 jnthn rakudo: sub Int foo() { }
16:05 p6eval rakudo 41267f: OUTPUT«Malformed routine definition at line 1, near "Int foo() "␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
16:05 jnthn Woo.
16:06 masak TimToady: ah, I see why you say that, now. IO.pod is full of'em.
16:06 masak the one who wrote that must have been subject to some Java interference, I guess.
16:13 ihrd do I understand right, sub Int foo { ... } should def foo, which should return Int?
16:14 masak ihrd: well, except for the fact that it's actually not legal Perl 6.
16:14 masak ihrd: seems to be a S32 documentation bug.
16:14 ihrd we have sub foo (--> Int) { ... } or something like this, no?
16:15 masak aye.
16:15 masak and sub foo () returns Int, IIRC.
16:16 jnthn I hope to make those two work in the not too distant future, btw. :-)
16:17 masak nice.
16:17 mberends masak: Damian's Perl6::Perldoc tests (in the CPAN source) are not large, there are 7 example pod docs but no Harness or 'make test' driver.
16:17 masak mberends: ok. so not as much as he seemed to imply in the email, then.
16:18 mberends the most valuable part for me has been S26
16:19 alester joined #perl6
16:20 mberends btw, is $*PROG or $*PROGRAM_NAME (S28) implemented yet?
16:20 * masak doesn't think so
16:20 mberends :-(
16:21 masak rakudo: say $*PROGRAM_NAME
16:21 p6eval rakudo 41267f: OUTPUT«Use of uninitialized value␤␤»
16:23 PeepOle joined #perl6
16:23 PeepOle Hi all.
16:27 mberends masak: rakudo/src/builtins/guts.pir:343 shifts @*ARGS[0] into $P0. I have no idea how to save that into $*PROGRAM_NAME, maybe someone else does...
16:27 masak mberends: maybe look at other already-defined such variables?
16:27 jnthn set_hll_global '$*PROGRAM_NAME', $P0
16:27 arejay left #perl6
16:27 masak jnthn++
16:28 jnthn oh damm
16:28 * mberends seconds that, jnthn++
16:28 jnthn I just did spent a while, debugging...a broken test file.
16:29 jnthn eval 'temp @*ARGS = <a b>; sub MAIN($a, $b) { $invoked = 0 };';
16:29 jnthn This goes and replaces the actual MAIN...which is why it doesn't run alter
16:29 jnthn eh, it was a bad test anyway...$invoked = 1 woulda been correct
16:29 jnthn But still...
16:29 * jnthn splits it into two test scritps.
16:35 skids did non-declarator rvalue signatures ever get "formally" approved?
16:35 skids (e.g. http://mlblog.osdir.com/lang.perl.perl6.compiler/2006-04/msg00011.shtml)
16:36 pugs_svn r25827 | jnthn++ | [t/spec] Break a test out into a separate file that in an eval clobbered the MAIN that was expected to be run as part of the test Also correct that test.
16:37 skids my Str $a;  :(Int $a where { .abs }) = $b; # throws if $b is not a nonzero int, otherwise coerces the value of $b into $a?
16:38 skids rakudo: my Str $a;  :(Int $a where { .abs }) = 1; $a.say;
16:38 p6eval rakudo 41267f: OUTPUT«too few arguments passed (0) - 1 params expected␤current instr.: '_block14' pc 40 (EVAL_17:28)␤»
16:39 ejs joined #perl6
16:39 cookys joined #perl6
16:39 skids rakudo: my Str $a;  :(Int $a) = 1; $a.say;
16:39 p6eval rakudo 41267f: OUTPUT«too few arguments passed (0) - 1 params expected␤current instr.: '_block14' pc 40 (EVAL_17:28)␤»
16:46 masak strange error.
16:46 PeepOle Hi all. I need some help with something written here http://www.perlfoundation.org/perl6/index.cgi?summer_of_code_ideas
16:46 PeepOle Can anyone give me an idea what is involved in 'testing' Regexes and Grammars
16:47 PeepOle of perl6
16:49 masak PeepOle: I don't have a ready answer for you, but I'd advise you to talk to moritz__++ about this.
16:49 masak he's very familiar with the Perl 6 test suite.
16:50 masak in the meantime, you might check out what's already in t/spec.
16:50 mberends PeepOle, you probably want to add to the pugs/t/spec/S05-capture directory etc.
16:50 PeepOle masak: Is it ok to pm him?
16:50 masak PeepOle: I do think so, but if he were here right now, he'd have already replied.
16:51 PeepOle ok
16:51 jnthn PeepOle: it'll be a lot about testing things defined in the S05 part of the Perl 6 specification.
16:51 skids PeeOle: for a quick view, http://perlcabal.org/syn/S05.html and unfold the links that say Show t/spec/S05 etc.
16:52 mberends jnthn, a patch for $*PROGRAM_NAME like you suggested works fine here. Should I still send the git diff to RT?
16:52 jnthn mberends: prosim
16:52 jnthn *please
16:52 jnthn mberends++
16:53 mberends izvolte
16:53 jnthn yes yes yes my patch is SO going in now
16:55 masak :)
16:55 jnthn masak: 'twas quite a bit of effort...
16:55 dalek rakudo: e9aca5f | jnthn++ |  (3 files):
16:55 dalek rakudo: Make lexicals visible inside of eval. This depends on some recent Parrot changes, so bump up required version number. There are two parts to this: letting the parser know what lexicals are declared in the outer scope so it doesn't claim about them being undeclared, and then doing a .set_outer so the lexicals can be found at runtime.
16:55 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/e9aca5feac943b526021646f7144b1a7736fe201
16:55 dalek rakudo: da2023f | jnthn++ | t/spectest.data:
16:55 dalek rakudo: Add another test file to the spectest data (contains a test that got broken out) from another file, where it interfered with the other tests in the file).
16:55 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/da2023f06774f949f12999debc86f770f6955137
16:56 jnthn oops, excessive )
17:05 pugs_svn r25828 | jnthn++ | [t/spec] Unfudge a couple of tests related to eval seeing outer lexicals.
17:09 masak jnthn: cool! jnthn++
17:11 pugs_svn r25829 | jnthn++ | [t/spec] Unfudge two more tests that didn't pass due to wanting to see lexicals outside of eval.
17:11 jnthn Auto-unfudge may or may not find some more.
17:13 alester joined #perl6
17:14 jnthn alester: Would it be possible in rakudo.org to have a "news" tab at the top, which gives latest stories? I don't see a way to get at something like that...
17:14 alester sure
17:14 lambdabot alester: You have 1 new message. '/msg lambdabot @messages' to read it.
17:14 jnthn alester: BTW, great job on the site otherwise. :-)
17:14 jnthn Much improved.
17:16 jnthn On the things that don't work in Rakudo list we have:
17:17 jnthn * some things that should be readonly aren't
17:17 jnthn Does anyone know what any of these would be? A lot have been fixed in time...
17:17 japhb jnthn (since you're around at the moment): has there been in progress in Rakudo using Parrot libs yet?
17:17 jnthn japhb: A refactor I did yesterday should have resolved some issues with calling methods in Parrot libs.
17:18 jnthn I guess that's some progress. :-)
17:18 japhb OK, but still no 'use OpenGL:from<parrot>;' ?
17:18 jnthn I don't believe so.
17:18 japhb darn.
17:18 japhb Thanks for the info
17:19 skids jnthn: pmichaud put that in there, it's been in since revision #2 on the old wiki.
17:20 japhb When y'all do get that working, I suspect I will want to make some changes in how e.g. exports are being handled.  That is, assuming namespace exporting works correctly in Parrot these days ....
17:21 jnthn japhb: Sure, it's a muchly wanted feature, but so are many other things...
17:21 frooh rakudo: 'frewfrewfrew'.truncate
17:21 p6eval rakudo da2023: RESULT«0»
17:21 frooh rakudo: 'frewfrewfrew'.truncate(2)
17:22 p6eval rakudo da2023: OUTPUT«too many arguments passed (3) - 1 params expected␤current instr.: 'parrot;Any;truncate' pc 11908 (src/builtins/any-num.pir:169)␤»
17:22 frooh ...
17:22 frooh rakudo: 54.truncate
17:22 p6eval rakudo da2023: RESULT«54»
17:22 masak frooh: truncate is for numbers.
17:22 frooh rakudo: 54.truncate(1)
17:22 p6eval rakudo da2023: OUTPUT«too many arguments passed (3) - 1 params expected␤current instr.: 'parrot;Any;truncate' pc 11908 (src/builtins/any-num.pir:169)␤»
17:22 frooh rakudo: 54.5.truncate(1)
17:22 p6eval rakudo da2023: OUTPUT«too many arguments passed (3) - 1 params expected␤current instr.: 'parrot;Any;truncate' pc 11908 (src/builtins/any-num.pir:169)␤»
17:22 frooh rakudo: 54.5.truncate
17:22 p6eval rakudo da2023: RESULT«54»
17:22 frooh got it
17:22 frooh thanks masak
17:23 masak np.
17:23 kst` joined #perl6
17:24 frooh rakudo: -54.5.truncate
17:24 p6eval rakudo da2023: RESULT«-54»
17:24 frooh rakudo: -54.5.round
17:24 frooh rakudo: 54.5.round
17:24 p6eval rakudo da2023: OUTPUT«Method 'round' not found for invocant of class 'Num'␤current instr.: 'parrot;P6metaclass;dispatch' pc 320 (src/classes/ClassHOW.pir:161)␤»
17:24 p6eval rakudo da2023: OUTPUT«Method 'round' not found for invocant of class 'Num'␤current instr.: 'parrot;P6metaclass;dispatch' pc 320 (src/classes/ClassHOW.pir:161)␤»
17:24 frooh rakudo: -54.5.floor
17:24 p6eval rakudo da2023: OUTPUT«Method 'floor' not found for invocant of class 'Num'␤current instr.: 'parrot;P6metaclass;dispatch' pc 320 (src/classes/ClassHOW.pir:161)␤»
17:24 frooh drat
17:25 jnthn rakudo is floorless. ;-)
17:25 masak no bottom. :)
17:25 frooh and probably ceilingless
17:25 jnthn We're still working on being flawless instead.
17:25 frooh 54.5.ceiling
17:25 frooh I'd prefer flawless
17:25 frooh rakudo: 54.5.ceiling
17:25 p6eval rakudo da2023: OUTPUT«Method 'ceiling' not found for invocant of class 'Num'␤current instr.: 'parrot;P6metaclass;dispatch' pc 320 (src/classes/ClassHOW.pir:161)␤»
17:26 masak flawless... that'd put me out of work, you know.
17:26 frooh "frew\n\n\n".chomp
17:26 frooh rakudo: "frew\n\n\n".chomp
17:26 p6eval rakudo da2023: RESULT«"frew\n\n"»
17:27 frooh I thought in perl6 it was supposed to chomp all the \n's
17:27 frooh or did I get that backwards
17:27 skids frooh: that's 3 lines.  It chomped the last.
17:28 skids would you expect it to chomp "a\nb\n" to "ab"?
17:29 ejs jnthn: Yep, I'm from Odessa.
17:29 mikehh joined #perl6
17:29 frooh I mean all \n's in a row
17:29 frooh at the end
17:30 masak frooh: why do you expect that?
17:30 frooh I don't know; I was confused apparently :-)
17:31 skids rakudo: "windoze\r\n".chomp
17:31 p6eval rakudo da2023: RESULT«"windoze"»
17:31 skids rakudo: "windoze\r\r\n".chomp
17:31 p6eval rakudo da2023: RESULT«"windoze\r"»
17:31 jnthn ejs: Cool. I liked it. :-)
17:32 jnthn rakudo: "thing\n\n\n".trim
17:32 p6eval rakudo da2023: RESULT«"thing"»
17:32 pugs_svn r25830 | lwall++ | [IO] Massive overhaul, long overdue due to neglect of TimToady--
17:32 jnthn w00t
17:33 jnthn TimToady++
17:33 * skids cheers!
17:33 frooh haha
17:33 skids TimToady++ indeed.
17:33 ejs jnthn: glad to hear ;-)
17:33 TimToady now to go kill termites  :(
17:33 ruoso joined #perl6
17:34 masak TimToady++
17:34 frooh karma TimToady
17:34 skids termites--
17:34 jnthn ENOBEER
17:35 * jnthn -> shops
17:39 frooh anyone in here know off the top of their head how I can added classes to the setting/
17:40 frooh nm
17:40 frooh found it
17:45 ludan joined #perl6
17:49 ujwalic any plan to split action.pm into multiple files
17:49 ujwalic actions.pm
17:51 nbrown joined #perl6
18:00 jnthn ujwalic: No immediate plans for that...
18:00 ujwalic jnthn: Hi
18:00 jnthn hi
18:00 ujwalic ok :)
18:01 jnthn At most I think we'd move the subs out of there...but all of the action methods I think want to be in one file.
18:01 jnthn I can see the argument for it in terms of compilation time maybe improving but we don't expect parsing to be so slow forever. :-)
18:02 ujwalic ya
18:04 masak let's say I have a bunch of very similar classes Foo::A, Foo::B, Foo::C which all derive from Foo and share a common interface of some sort. if I want to mock them, and create Foo::A::Mocked, Foo::B::Mocked, Foo::C::Mocked, is there a way to do so without writing a full declaration for each ::Mocked class?
18:04 masak I don't think roles help in this case, because of the need to actually override some methods.
18:05 jnthn masak: Mixins?
18:05 masak jnthn: as in 'is also Mocked'?
18:06 jnthn oh, hmmm...misunderstood what you wanted...let me think...
18:07 jnthn You want share some of the overrides but do others differently?
18:08 jnthn Then maybe a role would do it?
18:08 masak jnthn: no, I want to do all Mocked classes exactly the same.
18:08 jnthn Ah, then why not a role?
18:08 masak the only difference is what they derive.
18:08 masak jnthn: I thought roles couldn't override existing methods.
18:09 jnthn class Foo::A::Mocked is Foo::A does Mock { }
18:09 jnthn Where Mock is your role.
18:09 masak aye, I get that part.
18:09 jnthn But that will put the methods from the role into the subclass.
18:09 jnthn Which menas they will override the ones from Foo::A.
18:10 masak oh! cool.
18:10 masak thanks.
18:10 jnthn Is that not what you want?
18:10 jnthn ah, good :-)
18:12 FurnaceBoy joined #perl6
18:17 frooh -5.5 should round to -6 right?
18:17 frooh or should it be -5 because that's greater?
18:17 fedora-angel joined #perl6
18:20 s1n frooh: depends on which side -5.5 approaches the .5 from
18:21 frooh well, all I have is -5.5
18:21 masak frooh: have you checked the spec?
18:21 s1n with an infinite number of 0's after the .5?
18:21 frooh I think that I have to assume that -5 is right, as the docs say that's what it should be
18:21 frooh masak: yeah
18:21 masak good, good.
18:22 frooh "The algorithm is C<floor($x + 0.5)>.
18:22 frooh I just wanted to make sure that it made sense
18:24 mberends jnthn, if you want to try it out, my $*PROGRAM_NAME patch is in http://rt.perl.org/rt3/Public/Bug/Display.html?id=63872
18:26 mberends as a one liner, it looks suspiciously too easy.
18:27 ruoso joined #perl6
18:29 jnthn mberends: It probably *is*. :-P
18:29 mberends it's probably not readonly, for example
18:29 jnthn well, it's undef in the repl...
18:29 jnthn Which is fine.
18:30 masak mberends: I'm finally reviewing. it's great fun, thanks for writing this! if you're still around when I finish (in an hour or so), I'll let you read it before I post.
18:30 jnthn Does interesting things under -e - actually says "-e"...
18:31 masak that's not half-bad. :)
18:31 mberends masak: great, any time this weekend is good
18:31 masak mberends: I'll ping you in an hour.
18:31 mberends ok
18:33 jnthn mberends: Not sure what it hsould do under -e but particle will be reviewing a bunch of that stuff anyway.
18:33 jnthn So won't worry about that case for now.
18:35 mberends good, this variable will be immediately useful for proto and HTTP::Daemon
18:35 jnthn mberends: Any chance you can submit a test?
18:36 jnthn To the spectests?
18:36 jnthn Just check that it ends with name-of-spectest.t should do it...
18:37 * mberends will have a go at that
18:40 jnthn mberends: comitted
18:41 dalek rakudo: 03f2d29 | jnthn++ | CREDITS:
18:41 dalek rakudo: Add Ujval to the CREDITS.
18:41 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/03f2d2933f52d2965cc96961c28f010dace51da0
18:41 dalek rakudo: 6d97951 | jnthn++ | src/builtins/guts.pir:
18:41 dalek rakudo: Implement $*PROGRAM_NAME. Patch courtesy of Martin Berends (mberends++).
18:41 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/6d9795110e87847e2719f3e1ca8b22c7b320be4d
18:44 skids ?nopaste
18:44 lambdabot Haskell pastebin: http://hpaste.org/new
18:45 dalek rakudo: 1dea765 | jnthn++ | CREDITS:
18:45 dalek rakudo: Add mberends to CREDITS.
18:45 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/1dea765709ec23993d3be9dfb571cf125a11e2b5
18:45 * jnthn nomming dinner
18:49 skids ruoso: http://hpaste.org/fastcgi/hpaste.fcgi/view?id=2391#a2391
18:50 skids Started to add a few examples to S07's generic iterators, then got confused by .unshift
18:50 skids oops.  since when does ruoso ever close his client :-)
18:54 mberends jnthn, pugs/t/spec/S02-magicals/progname.t already tests $*PROGRAM_NAME
19:03 jnthn mberends: OK, were you able to unfudge it?
19:04 * mberends trying make spectest now with S02-magicals/progname.t inserted in t/spectest.data
19:06 jnthn mberends: You can also perl6 t\spec\S02-magicals\progname.t
19:06 jnthn ;-)
19:06 jnthn ah
19:06 jnthn The first test dies.
19:06 jnthn Since we don't do PROCESS yet
19:07 mberends just seen the same error here :-(
19:07 jnthn aye
19:07 jnthn if you fudge the first test
19:07 jnthn The second can run though
19:07 jnthn :-)
19:09 mberends jnthn, could you please handle the fudging etc? I'm not ready to acquire fudge-fu today.
19:11 jnthn Add above the first test: #?rakudo skip 'No PROCESS yet'
19:11 jnthn Then when you run make spectest it shoud run just the one
19:12 mberends thanks, I shall make it thus
19:12 ruoso joined #perl6
19:13 jnthn mberends: Great, thanks.
19:13 jnthn Every day, we get a little closer. :-)
19:14 mberends :)
19:18 masak \o/
19:20 frooh rakudo: (-5).abs
19:20 p6eval rakudo 1dea76: RESULT«5»
19:26 frooh rakudo: (55).chr
19:26 p6eval rakudo 1dea76: RESULT«"7"»
19:27 frooh rakudo: 1 == 1|0
19:27 p6eval rakudo 1dea76: RESULT«any(Bool::True, Bool::False)»
19:27 frooh rakudo: 1 == (1|0)
19:27 p6eval rakudo 1dea76: RESULT«any(Bool::True, Bool::False)»
19:28 frooh how is that supposed to work?
19:28 pugs_svn r25831 | mberends++ | [Rakudo] skip test 1 of 2 -- no PROCESS yet
19:28 frooh rakudo: 1 == any(1,0)
19:28 p6eval rakudo 1dea76: RESULT«any(Bool::True, Bool::False)»
19:29 frooh rakudo: if 1 == (1|0) { say 'awesome' }
19:29 p6eval rakudo 1dea76: OUTPUT«awesome␤»
19:29 frooh rakudo: if 1 == (1|1) { say 'awesome' }
19:29 p6eval rakudo 1dea76: OUTPUT«awesome␤»
19:29 frooh perfect
19:31 frooh rakudo: '  frew  '.trim
19:31 p6eval rakudo 1dea76: RESULT«"frew"»
19:31 frooh rakudo: '  frew \n '.trim
19:31 jnthn Looks right to me. :-)
19:31 p6eval rakudo 1dea76: RESULT«"frew \\n"»
19:31 frooh rakudo: "  frew \n ".trim
19:31 p6eval rakudo 1dea76: RESULT«"frew"»
19:31 frooh jnthn: yeah, I just didn't see the any at the front
19:31 jnthn mberends: Do you want me to add that file to spectest.data now?
19:31 frooh so I thought it was giving (True, False) vs any(True, Fase)
19:31 jnthn frooh: Ah, OK.
19:32 mberends running a new spectest, probably should wait until it passes
19:32 masak jnthn: are private attributes inherited?
19:32 jnthn masak: Yes in the sense that they exist and the parent class can access them.
19:32 * masak didn't know that, or forgot
19:34 frooh is the '!EXPORT'('abs', 'from'=>$P0) line what turns methods into functions in pir files?
19:36 mberends masak: do you have time to brainstorm a wiki-cheat-sheet concept?
19:38 jnthn frooh: yes
19:40 frooh ok, cool
19:41 frooh also: do I need to do something to add a file to the setting?  Or does the Makefile list of setting files get generated?
19:41 Tene joined #perl6
19:42 meppl good night
19:44 masak mberends: right now, I'm having so much fun reviewing your code, so not really. :)
19:44 mberends jnthn, that #?rakudo skip 'No PROCESS yet' resulted in: t/spec/S02-magicals/progname..............................FAILED test 2 Failed 1/2 tests, 50.00% okay (less 1 skipped test: 0 okay, 0.00%)
19:44 amoc joined #perl6
19:44 masak mberends: perhaps in half an hour or so?
19:44 masak I'm almost done.
19:44 mberends keep going!
19:45 frooh mberends: is the # all the way at the beginning?  Because it can't be indented
19:45 jnthn mberends: That's odd. But if you run perl6 t/spec/S02-magicals/progname.rakudo does it work?
19:46 pugs_svn r25832 | leto++ | Unfudge passing test related to sub calling with long-dotted parens
19:46 mberends perl6 t/spec/S02-magicals/progname.rakudo
19:46 mberends 1..2
19:46 mberends ok 1 - # SKIP No PROCESS yet
19:46 mberends not ok 2 - progname var accessible as context var
19:46 mberends # FUDGED!
19:46 mberends # Looks like you failed 1 tests of 2
19:48 mberends frooh, the # is indeed at the beginning
19:48 jnthn mberends: OH!
19:48 jnthn mberends: The test is a bit too strict
19:48 jnthn Because we are fudging it.
19:48 mberends absolute path?
19:48 jnthn No
19:48 jnthn Because it is .rakudo that we run that has been pre-processed, not .t
19:48 mberends lol
19:48 jnthn But to keep it implementation independent I suggest use a regex
19:49 mberends yesyes
19:49 * mberends fixes the fix, or fudges the fudge
19:49 jnthn /t['/'|'\']spec['/'|'\']S02-magicals['/'|'\']progname '.' \w+$/
19:51 masak o_O
19:52 frooh rakudo: fail
19:52 p6eval rakudo 1dea76: OUTPUT«No exception handler and no message␤current instr.: 'return' pc 15475 (src/builtins/control.pir:39)␤»
19:52 frooh rakudo: fail "foobar"
19:52 p6eval rakudo 1dea76: OUTPUT«No exception handler and no message␤current instr.: 'return' pc 15475 (src/builtins/control.pir:39)␤»
19:52 frooh rakudo: fail("foobar")
19:52 p6eval rakudo 1dea76: OUTPUT«No exception handler and no message␤current instr.: 'return' pc 15475 (src/builtins/control.pir:39)␤»
19:56 jnthn rakudo: sub lolz { epic fail "omg" }; lolz
19:56 p6eval rakudo 1dea76: RESULT«undef»
19:56 frooh haha
19:56 frooh sub foo { fail "bar" }; foo
19:56 frooh rakudo: sub foo { fail "bar" }; foo
19:56 p6eval rakudo 1dea76: RESULT«undef»
19:56 frooh rakudo: sub foo { fail }; foo
19:56 p6eval rakudo 1dea76: RESULT«undef»
19:57 frooh generally fails should have messages right?
19:59 frooh rakudo: (1 == 1|0, 1 == any(1,0), 1 == any(1|0))
19:59 p6eval rakudo 1dea76: RESULT«[any(Bool::True, Bool::False), any(Bool::True, Bool::False), any(any(Bool::True, Bool::False))]»
20:00 frooh rakudo: say 'frew' if 1 == any(1|0)
20:00 p6eval rakudo 1dea76: OUTPUT«frew␤»
20:00 frooh that's weird.
20:00 jnthn That's right
20:00 frooh I know
20:01 frooh just any(any(1,0)) is a weird thing to do
20:16 skids rakudo: (any(1,0) == all(1|0,1|2), any(1,0) == all(1|0, 0|1))
20:16 p6eval rakudo 1dea76: RESULT«[all(any(any(Bool::True, Bool::False), any(Bool::False, Bool::True)), any(any(Bool::True, Bool::False), any(Bool::False))), all(any(any(Bool::True, Bool::False), any(Bool::False, Bool::True)), any(any(Bool::False, Bool::True), any(Bool::True, Bool::False)))]»
20:16 frooh that urts to read
20:17 skids rakudo: say "OHNOES" if (any(1,0) == all(1|0,1|2))
20:17 p6eval rakudo 1dea76: OUTPUT«OHNOES␤»
20:18 skids hrm.
20:19 skids rakudo: say "OHNOES" if (1 == all(1,0))
20:19 p6eval rakudo 1dea76: RESULT«all(Bool::True, Bool::False)»
20:19 pugs_svn r25833 | mberends++ | [Rakudo] progname.t test 2 now uses regex to accomodate filename fudging
20:20 skids rakudo: say "OHNOES" if (any(1|0) == all(1|0,1|2))
20:20 p6eval rakudo 1dea76: OUTPUT«OHNOES␤»
20:20 skids rakudo: say "OHNOES" if (any(1,0) == all(1|0,3|2))
20:20 p6eval rakudo 1dea76: RESULT«all(any(any(Bool::True, Bool::False), any(Bool::False, Bool::True)), any(any(Bool::False), any(Bool::False)))»
20:20 skids cobwebs clear.
20:21 mberends jnthn, the regex need a few more escapes, then it worked. committed.
20:24 jnthn mberends: Great. :)
20:25 jnthn mberends: And test passes?
20:25 masak jnthn: I might have crashed mberends. I just sent him a nopaste url to my review of his Pos suite. :)
20:26 masak s/Pos/Pod/
20:26 mberends no, i'm not dead!
20:26 masak oh, good.
20:26 masak *phew*
20:26 mberends just in your other window :)
20:27 frooh has anyone here ever used git-send-email?
20:27 mberends jnthn, 'mask spectest' just skipped progname test 1 and passed test 2, as intended
20:29 jnthn mberends: oh awesome
20:33 mberends go ahead and update spectest.data, it should all work now
20:49 masak http://use.perl.org/~masak/journal/38643
20:52 jnthn mberends: done
20:52 mberends jnthn: :)  masak: :)
20:53 dalek rakudo: 5b1ff9c | jnthn++ | t/spectest.data:
20:53 dalek rakudo: Add S02-magicals/progname.t to spectest.data.
20:53 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/5b1ff9c55eec8ed387d7fd6c657eb955c89b5af2
20:53 masak mberends: :)
20:53 jnthn mberends: :)
20:53 jnthn How symmetric is our channel.
20:54 masak aye, it's frightening.
20:54 mberends (: | :)
20:54 masak we would pass a SAX parser without a problem.
20:58 ruoso joined #perl6
20:59 mberends masak: Literate Programming seemed to rub some programmers up the wrong way. In the classroom I find 'Maintainable' easier to promote.
20:59 masak that might be.
20:59 masak I also heard people being less-than-happy with LP.
20:59 mberends even in #perl6
21:00 masak as has been discussed earlier here on #perl6, I... yes.
21:00 masak I don't think LP is universally applicable, but I think it has aspects worth considering in every project.
21:00 frooh sorry to ask such a silly question, but can anyone here tell me how to generate a patch for RT?  git format-patch adds a lot of email based metadata that I don't think jnthn or pmichaud will want to see
21:01 masak and I don't think anyone would be willing to argue against my central thesis: that code should have a sense of purpose about it.
21:01 mberends absolutely
21:01 masak frooh: hm, ISTR there's a sending-patches wiki page somewhere.
21:01 frooh Cis it the one I wrote?
21:02 frooh because that needs to be updated with this new information....
21:02 masak ah, you wrote it? :) I see.
21:02 masak then I'm not sure I can help you.
21:03 frooh the "Frew's Recommended Workflow" one; and the other one (deceptively named "Steps to create a patch") doesn't actually say how to make a patch itself
21:03 frooh it says to use git format-patch, but I am starting to think that's not good if you aren't using get send-email
21:03 mberends can we figure out the process of applying a patch, and then work backwards?
21:04 frooh well, theoretically someone could use get-am for that
21:04 frooh but then you'd have to set up git-am
21:05 mberends I used 'git diff' about an hour ago, pasted the text into a mail to rakudobug@perl.org
21:06 frooh that makes sense
21:06 frooh I'll do that :-)
21:07 frooh ok, well, git send-email is *supposed* to take git formatted patches and mail them for you
21:08 frooh but it gives me errors in ubuntu
21:08 frooh so I'll have to investigate that
21:08 mberends do it manually. the mail can/should also have as much supplementary information as possible.
21:08 frooh I did
21:08 mberends :)
21:08 frooh but the git send-email can prompt you for a body and everything
21:09 frooh but again, if I can't use it, it's useless
21:09 masak I might have said this before, but as a bloggin platform, use.perl.org leaves a whole lot to be desired.
21:09 frooh masak: Ovid said it recently in a post
21:09 mberends 'git send-email' may need configuration somehow.
21:10 frooh mberends: yeah, I configured it with stuff, but it gave me an error message
21:10 jnthn planning note: since I was away for the first half of the month, I have a Rakudo day to catch up on. ;-) I plan to do one Tue or Wed, then another one next Saturday (week today).
21:10 frooh does everyone else get logged out all of the time from use.perl.org?
21:10 jnthn Feature requests and tickets that matter to anyone in something they're working on welcome.
21:10 jnthn frooh: I've not had that problem happen to me...
21:11 jnthn frooh: But I use auto-login (or remember me, etc)
21:11 frooh I do too
21:11 jnthn ah
21:11 jnthn Browser?
21:11 frooh FF 3
21:11 masak frooh: url to Ovid's post? I looked, but didn't find anything.
21:11 frooh lemme find it
21:12 masak frooh: I don't get logged out all the time, but then again, I visit it quite often.
21:12 frooh but I'll get logged ut like, minutes after making a comment or something
21:13 masak huh. doesn't happen here.
21:13 jnthn frooh: Ah, FF3 here too. :-S
21:14 frooh I can't find his post either...
21:14 frooh but he was complaining about not being able to post images
21:14 masak yes, that's only half of it.
21:15 masak use.perl.org actually _encourages_ crap-assy HTML.
21:15 frooh hahaha
21:15 frooh how?
21:15 frooh no css, only tables?
21:15 jnthn Thing is, use.perl.org is the most central place we have to broadcast stuff to the community.
21:15 masak frooh: I get the feeling that you're only allowed to use a handful of element types.
21:16 masak frooh: and it strips all the interesting attributes from these.
21:16 masak jnthn: yes, I have a plan to improve it.
21:16 jnthn BUT DOES IT SUPPORT <BLINK>?
21:16 masak @slap jnthn
21:16 * lambdabot slaps jnthn
21:16 * frooh is said that his company home page has a <marquee> tag
21:17 frooh sad*
21:17 masak frooh: oh, the early 90's horror. :)
21:17 frooh you don't even know
21:17 masak I probably don't.
21:17 frooh this is why CEO + Developers is a bad idea
21:17 frooh things like that happen
21:17 frooh and we can't even change it
21:18 frooh I'd give you a link, but who wants to see another bad webpage?
21:19 jnthn Well, we could all send emails. "We want to buy your products, but our procurement policy bans us from using companies who use the <marquee> tag on their site."
21:19 masak mberends: I saw you did s/qx/fake_qx/ in your latest commit to perl6-examples. found another sub qx in Configure.pm, but it isn't used. should I remove it?
21:20 mberends yes, calling qx() has been poisoned in Rakudo, so it's dead code.
21:20 frooh jnthn: I'll mention that to co-workers and see what they think :-)
21:20 masak ah. removed.
21:22 masak mberends: I like the Makefile output. :)
21:22 * mberends is pleased to have the services of a cage cleaner :)
21:23 masak ook ook!
21:23 masak mberends: your Makefile output would have to be special-cased when generating progress dots in proto, but that's not really a problem.
21:24 mberends it's a little cheeky for Configure to segue right into make, but laziness is...
21:24 mberends how can you make progress dots right now?
21:24 masak mberends: well, by scanning the Makefile beforehand and observing the order of compilation.
21:25 masak then you just scan for clues among the commands that are output.
21:25 masak the same thing can be made with your Makefile output, actually.
21:25 mberends that sounds powerful, because makefiles are not linear.
21:25 masak right.
21:25 masak files might be skipped due to not needing recompilation.
21:26 mberends doesn't it also need non-blocking input?
21:26 masak mberends: yes.
21:26 jnthn .oO( And this is how we ended up with a Perl 6 implementation of make... )
21:26 masak mberends: which is why that part of proto will also be in Perl 5 for the time being.
21:26 amoc hello - ! i have a question, how do you insert " " spaces between array with say() function?
21:27 masak amoc: .fmt
21:27 jnthn @array.join(' ').say
21:27 lambdabot Unknown command, try @list
21:27 jnthn oh, or maybe neater with what masak said :-)
21:27 masak rakudo: say [1,2,3].fmt('%s')
21:27 p6eval rakudo 5b1ff9: OUTPUT«1 2 3␤»
21:27 jnthn nice
21:27 masak I know!
21:27 masak I implemented that. :)
21:27 amoc wow cool :)
21:27 jnthn masak++
21:27 masak (it wasn't really that hard)
21:28 jnthn rakudo: say [1,2,3].fmt(',')
21:28 p6eval rakudo 5b1ff9: OUTPUT«, , ,␤»
21:28 masak .oO( . . . )
21:28 jnthn ...how do you use fmt anyway? :-)
21:28 masak haha
21:28 masak jnthn: RTFM!
21:29 masak (I wrote that too)
21:29 jnthn meh, this community sucks, I'm leaving ;-P
21:29 masak *lol*
21:29 skids Can we make .say pass adverbs through to .Str, I mean specification-wise is that OK?
21:29 amoc perl6 is a lot diffrent with 5,
21:29 masak jnthn: basically, it works like sprintf for scalars, but it goes does one level for arrays, pairs and hashes.
21:30 masak s/does/down/
21:30 jnthn masak: And the insertion of spaces is just a side-effect?
21:30 masak aye.
21:30 jnthn masak: aha, OK
21:30 masak but customizable with a second arg.
21:30 jnthn So the %s means "just do it as a string"
21:30 masak aye.
21:30 jnthn OK, makes sense.
21:30 jnthn And, cool!
21:30 mberends rakudo: my @a=1,2,3;say "{@a}";  # another way
21:31 p6eval rakudo 5b1ff9: OUTPUT«1 2 3␤»
21:31 masak at one time, I was opting for that being a default as well, so that one could write just .fmt()
21:31 masak actually, I still thing that's a good idea.
21:31 masak s/g/k/
21:32 amoc { } in say "{@a}" works like "@{[]}" in perl 5 ?
21:32 masak amoc: not exactly.
21:32 masak amoc: it's a general construct for temporarily going back to un-quoted.
21:32 masak rakudo: say "OH {say "FOO!"} HAI"
21:32 p6eval rakudo 5b1ff9: OUTPUT«FOO!␤OH 1 HAI␤»
21:33 masak (the 1 comes from the return value from say)
21:33 amoc aha, i got it :)
21:33 masak I knew you would. :)
21:34 amoc thank you masak++
21:34 masak np.
21:35 masak amoc: over here at #perl6, you will find people who are very willing to answer questions and help with getting started with Perl 6.
21:36 skids rakudo: sub f ($f, *@slurp) { @slurp[0].say; @_[0].say }; f("OH","HAI");
21:36 p6eval rakudo 5b1ff9: OUTPUT«invalid arg type in named portion of args␤current instr.: 'f' pc 84 (EVAL_17:50)␤»
21:37 jnthn ...huh...
21:37 jnthn what named portion :-|
21:37 jnthn rakudo: sub f ($f, *@slurp) { }; f("OH","HAI");
21:38 amoc masak: ee.. i see !     ( i'm not so good at english T_T )
21:38 p6eval rakudo 5b1ff9: RESULT«[]»
21:38 masak amoc: that's ok too.
21:38 jnthn rakudo: sub f ($f, *@slurp) { @slurp[0].say; }; f("OH","HAI");
21:38 p6eval rakudo 5b1ff9: OUTPUT«HAI␤»
21:38 jnthn rakudo: sub f ($f, *@slurp) { @_[0].say; }; f("OH","HAI");
21:38 p6eval rakudo 5b1ff9: OUTPUT«invalid arg type in named portion of args␤current instr.: 'f' pc 84 (EVAL_17:50)␤»
21:38 jnthn @_[0].say
21:38 lambdabot Unknown command, try @list
21:38 jnthn rakudo: @_[0].say
21:38 p6eval rakudo 5b1ff9: OUTPUT«Use of uninitialized value␤␤»
21:38 pmichaud hello #perl6
21:38 jnthn rakudo: sub x { @_[0].say }; x()
21:38 p6eval rakudo 5b1ff9: OUTPUT«Use of uninitialized value␤␤»
21:39 jnthn pmichaud: OH HAI
21:39 masak amoc: where are you from? Asia?
21:39 jnthn pmichaud: How was flight / is trip?
21:39 pmichaud trip is okay, except kids are acting up.
21:39 skids Wow did I find a bug?  I was just trying to figure if @_ still worked even with a named slurpy, and how.
21:39 jnthn rakudo: sub x(*@x) { @_[0].say }; x()
21:39 masak \o/ oh hai pmichaud!
21:39 p6eval rakudo 5b1ff9: OUTPUT«invalid arg type in named portion of args␤current instr.: 'x' pc 70 (EVAL_17:46)␤»
21:39 amoc masak: yes, from South Korea :)
21:39 masak amoc: cool!
21:39 masak I hear that's a very nice country.
21:40 jnthn masak: quick! rakudobug!
21:40 * masak submits, quickly!
21:40 jnthn pmichaud: Kids will be kids...
21:40 jnthn pmichaud: main news is...
21:40 pmichaud yes, but they're being particularly egregious this trip for some reason.  At any rate, we're taking a "family timeout" in the hotel for a while.
21:41 masak amoc: and you have the best writing system in the world.
21:41 jnthn rakudo: my $x = 42; eval('say $x') # note single quotes
21:41 p6eval rakudo 5b1ff9: OUTPUT«42␤»
21:41 pmichaud jnthn: yes, I saw the commit.
21:41 pmichaud nice work.
21:41 amoc masak: where are you from ?
21:41 jnthn Main work was beating Parrot into submission.
21:41 masak amoc: Sweden.
21:41 amoc masak: oh, you knows very well!
21:41 masak amoc: aye, I collect knowledge. :)
21:42 masak I started very early.
21:42 jnthn amoc: A lot of people who are into Perl are also interested in natural langauges too. :-)
21:42 pmichaud I continue to be concerned about the cost of the 'inspect' opcode at some point, but I'm not too worried abouti t at the moment :-)
21:42 s1n pmichaud: i had to spend this week hacking on pen and paper :)
21:42 masak jnthn: and planned ones.
21:42 jnthn pmichaud: Well, not sure we need to optimize eval massively just yet... ;-)
21:43 pmichaud jnthn: agreed, which is why I'm not too worried about it yet.  But someday someone will do eval() in a loop and then it'll matter :-)
21:43 jnthn Aye.
21:43 pmichaud of coruse the cost of looking up the lexicals (and cloning the inspect structure) is still probably less than the cost of the parse.
21:43 jnthn Well, we can cache the lexical list as a property on the block if we gotta.
21:44 jnthn Right. The cost of compiling the code is massively more than finding the lexicals for now.
21:44 pmichaud anyway, as I said, nice work.  That's a good thing to have out of the way.
21:44 Matt-W but the compilation will be faster one day too
21:44 jnthn Yeah, I'm glad to have it done.
21:44 pmichaud I suspect that the parrot change might also make it easier to fix the interactive loop too.
21:44 jnthn Yes
21:44 amoc masak: wow, where i want to travel is Sweden. i heard eco-friendly(?) system is so good in Sweden from tv.
21:45 jnthn I plan to leave that to someone who hates the interactive loop enough to want to work on it. ;-)
21:45 masak amoc: we are very eco-friendly.
21:45 * Matt-W liked Sweden when he went
21:45 masak amoc: we even have ecological burials!
21:45 jnthn Sweden is a nice country. I'm happy to have Swedish clients.
21:45 jnthn And thus excuses to go there.
21:45 masak I could say the same.
21:46 amoc wow cool -
21:46 jnthn pmichaud: I'm planning a Rakudo day early-ish next week and then a week today (two to catch up with not being around at the start of the month).
21:46 jnthn pmichaud: Anything you want me to focus on?
21:47 jnthn I'm slightly in a features mood at the moment as much as a fixes one... :-)
21:48 masak Rakudo release day is Thursday, right?
21:48 pmichaud yes, Rakudo will be late thursday.
21:48 masak which city?
21:48 pmichaud might be very early thursday -- depends on what is happening around our trip.
21:48 pmichaud Oslo.
21:48 masak ah, nice.
21:48 jnthn Yay!
21:49 jnthn We should try and go out of Europe for the third perhaps.
21:49 pmichaud sure.  I'm calling the March release Oslo to bring attention to NPW.
21:49 jnthn Yes
21:49 jnthn I like that.
21:49 pmichaud so far April and later releases aren't tagged yet.
21:49 jnthn Cool!
21:49 jnthn Bring on the battle of the PMs!
21:50 jnthn pmichaud: Think we could auction one of them at a YAPC, BTW?
21:50 pmichaud sure, I'd be happy to do that.
21:50 frooh I love the corporate costs for YAPC
21:50 frooh awesome
21:50 jnthn pmichaud: I was pondering doing state vars...
21:51 pmichaud that should be easy to do.
21:51 pmichaud I think that'd be a good feature to add.
21:51 jnthn How had you planned to store the values between invocations/
21:51 pmichaud I was planning to map it to a package/global somewhere.
21:51 pmichaud something not otherwise reachable
21:51 jnthn ah
21:52 jnthn I had been pondering a property on the block.
21:52 jnthn As in, Parrot-level property
21:52 pmichaud the hard part about property on block is the blocks are sometimes cloned
21:52 pmichaud trying to keep track of all of those might be challenging
21:53 jnthn I fear that the approach you suggest might hurt us too.
21:53 TimToady rakudo: say ~(1,2,3)
21:53 p6eval rakudo 5b1ff9: OUTPUT«1 2 3␤»
21:53 pmichaud so, I was going to do something like (for "state $x")
21:53 jnthn Like, blocks that get gc'd...
21:53 TimToady just put the thing in string context
21:53 pmichaud $P0 = get_hll_global "uniquenamefor$x"
21:53 pmichaud lex '$x', $P0
21:54 jnthn sub foo() { my $x = -> { state $y = 1; say $y++ }; $x() $x() }; foo(); foo();
21:54 jnthn Output here is 1 2 1 2 or 1 2 3 4?
21:55 pmichaud I think 1 2 3 4
21:55 jnthn ah, OK
21:55 pmichaud but I could be wrong about that.
21:55 bacek joined #perl6
21:55 jnthn What about
21:55 jnthn (above example mayvbe didn't get at the essence of my point)
21:55 bacek good morning
21:56 jnthn sub mc($start) { return { my $x = $start; $x++ } }
21:56 jnthn my $x = mc(1); say $x(); say $x(); my $y = mc(1); $y(); $y();
21:56 jnthn (my point is interaction between state and closures)
21:57 pmichaud Did yo umean for the 'my' to be 'state' ?
21:57 jnthn oh, damm
21:57 jnthn sub mc($start) { return { state $x = $start; $x++ } }
21:57 jnthn Like that.
21:58 ruoso joined #perl6
21:58 jnthn Again, output 1 2 1 2 or 1 2 3 4
21:58 jnthn I guess there's, wwp5.10d ;-)
21:58 pmichaud S03 says:      state $foo          # persistent lexical (cloned with closures)
21:59 pmichaud not sure what that means exactly.
21:59 jnthn cloned would suggest distinct per closure?
21:59 pmichaud I'm guessing that's closer to your interpretation.
21:59 jnthn In that case, do the cases where we clone the block not map to when we take a closure? In which case, the property on the block might just Do The Right Thing.
22:00 abra joined #perl6
22:00 jnthn (As in, get lost in the clone, meaning the state var gets re-init'd)
22:00 pmichaud yes, in that case it might be more correct.
22:03 pmichaud oooh, looks like S16 got an overhaul.  TimToady++
22:04 jnthn Yes
22:04 jnthn I'll feel less wary on spending tuits on IO impl now...
22:05 masak jnthn: then do .ins() !
22:05 masak puh-lease! :)
22:06 * masak didn't even know he wanted .ins so much
22:07 jnthn masak: I'll have to go look up what it is. :-)
22:07 masak jnthn: it's the $. analogue.
22:08 jnthn aha
22:08 jnthn Will read the updated S16 as a whole in the next couple of days.
22:10 masak mberends: if I remove the parse_file('/dev/null') calls from the tests, they all throw a Null PMC access. care to tell me what's going on there?
22:10 * masak tries to figure it out himself in the meantime
22:11 * mberends cannot immediately remember
22:11 masak IDSTR such a rakudobug ticket. ;)
22:12 jnthn masak: Is that .parse_file called on a grammar?
22:12 masak jnthn: no, on a class.
22:12 jnthn ah, ok
22:12 masak er, on an instance of a class.
22:12 jnthn yes
22:12 jnthn it's not the built-in grammar method, ok
22:12 masak no.
22:16 mberends masak, ISTR that the tests only required "warming up" because they were *not* parsing a file, they were parsing the $pod string. The parse_file() dynamically initializes the Pod::Parser object, so that workaround parses "no file".
22:17 masak mberends: that makes sense.
22:17 mberends yes, I had trouble mapping the new() idiom to Perl 6.
22:17 masak mberends: still, you have a Null PMC access there which deserves tracking down.
22:18 masak I'll try to find whence it stems.
22:18 mberends there may be some invisible bitrot there
22:20 mberends me should also review his own code ;)
22:22 Grrrr joined #perl6
22:24 masak mberends: I think you'll want to refactor that piece of Pod::Parser to expose methods for parsing strings, not just files.
22:24 masak it would facilitate the testing for you, too.
22:24 mberends the recent / ... {*} / will probably also refactor parse_line() and parse_directive() nicely, I think
22:25 masak recent? :P
22:27 pmichaud off again -- bbl
22:29 awarefish joined #perl6
22:30 mberends masak: the initial architecture mimicked the Perl 5 design. Now, with a running test suite, it is more feasible to expand the language envelope. Initially this project almost stalled because of bugs and insufficient testing.
22:30 masak mberends++
22:30 mberends testing++
22:31 masak anyway, I'm halfway through my patches. will try to localize this Null PMC access for a few more minutes, and then I'll defer that and continue patching.
22:32 mberends your patches are going to catalyse me into more development, in any case :)
22:33 masak sounds good. :)
22:34 masak wow, I haven't even posted my first review, and the reviewing is working already!
22:34 mberends :)
22:34 abra joined #perl6
22:46 masak rakudo: enum A <>; my A $a; say $a ne ""
22:46 p6eval rakudo 5b1ff9: OUTPUT«Null PMC access in get_string()␤current instr.: 'infix:ne' pc 15212 (src/builtins/cmp.pir:103)␤»
22:46 masak there it is.
22:46 * masak submits rakudobug
22:47 mberends frooh: the want images lament was in the Wednesday March 04, 2009 of http://use.perl.org/~Ovid/journal/
22:47 jnthn rakudo: enum A <>; say A
22:47 p6eval rakudo 5b1ff9: OUTPUT«Null PMC access in get_string()␤current instr.: 'print' pc 19050 (src/builtins/io.pir:26)␤»
22:47 * jnthn golfs masak
22:47 masak oh.
22:47 masak jnthn++
22:54 frooh mberends: I knew he said it
22:54 diracdelta joined #perl6
22:59 bacek rakudo: enum A <a b>; say A::a == A::a
22:59 p6eval rakudo 5b1ff9: OUTPUT«1␤»
22:59 bacek rakudo: enum A <a b>; say A::a cmp A::a
22:59 p6eval rakudo 5b1ff9: OUTPUT«0␤»
23:02 bacek rakudo: enum A <a b>; say a < *
23:02 p6eval rakudo 5b1ff9: OUTPUT«too few arguments passed (0) - 1 params expected␤current instr.: 'undef' pc 390 (EVAL_20:118)␤»
23:02 * bacek looking for masak :)
23:02 masak hello.
23:02 bacek masak: bug-bug! :)
23:02 * masak squints a bit
23:03 bacek rakudo: say 1 < *
23:03 p6eval rakudo 5b1ff9: OUTPUT«Use of uninitialized value␤0␤»
23:03 bacek rakudo: enum A <a b>; say a < *
23:03 masak ok.
23:03 * masak submits
23:03 p6eval rakudo 5b1ff9: OUTPUT«too few arguments passed (0) - 1 params expected␤current instr.: 'undef' pc 390 (EVAL_20:118)␤»
23:03 * jnthn creates a meta-ticket "enums damm suck"
23:04 bacek jnthn: you can reopen my ticket with subject "Enum implementation in Rakudo isn't perfect" :)
23:04 jnthn bacek: I fixed that particular imperfection. :-P
23:05 jnthn A decent bit of Rakudo guts changed since enums were first done, which doesn't help.
23:05 bacek rakudo: eval 'enum A<a b>'; say A::b
23:05 p6eval rakudo 5b1ff9: OUTPUT«too few arguments passed (0) - 1 params expected␤current instr.: '_block61' pc 401 (EVAL_22:125)␤»
23:05 bacek jnthn: but you can reuse subject :)
23:05 jnthn bacek: That one that you just did ain't ever going to work.
23:05 bacek jnthn: why?
23:06 jnthn Because without the eval we know A::b is a typename. With it, when we parse the A::b we don't consider it a type name.
23:07 jnthn And thus it's a sub call.
23:07 bacek rakudo: eval 'enum A<a b>'; eval 'say A::b'
23:07 p6eval rakudo 5b1ff9: OUTPUT«1␤»
23:07 jnthn Exactly.
23:07 jnthn The first eval installs the type in the namespace, so when we parse A::b in the second one, we know its a type name.
23:07 * bacek wonders why Eval's values can't subs
23:08 jnthn Enum's values?
23:08 bacek rakudo: class Enum { sub a { 0 }; sub b { 1 } }; say Enum::b
23:08 jnthn They can act as subs, they they require an argument. Which is what Rakudo is telling you. :-)
23:08 p6eval rakudo 5b1ff9: OUTPUT«1␤»
23:08 bacek rakudo: eval 'class Enum { sub a { 0 }; sub b { 1 } }'; say Enum::b
23:08 p6eval rakudo 5b1ff9: OUTPUT«1␤»
23:08 bacek heh :)
23:09 bacek rakudo: eval 'class Enum { sub a { 0 }; sub b { 1 } }'; say Enum::b; say ~(Enum::a..Enum::b)
23:09 p6eval rakudo 5b1ff9: OUTPUT«1␤0 1␤»
23:11 bacek rakudo: eval A<a>; say a; eval 'sub a { "O HI" }'; say a
23:11 p6eval rakudo 5b1ff9: OUTPUT«Could not find non-existent sub A␤current instr.: '_block14' pc 53 (EVAL_16:38)␤»
23:11 bacek rakudo: eval A <a>; say a; eval 'sub a { "O HI" }'; say a
23:11 p6eval rakudo 5b1ff9: OUTPUT«Could not find non-existent sub A␤current instr.: '_block14' pc 60 (EVAL_16:40)␤»
23:11 bacek rakudo: enum A <a>; say a; eval 'sub a { "O HI" }'; say a
23:11 p6eval rakudo 5b1ff9: OUTPUT«0␤a␤»
23:11 bacek what???
23:12 jnthn bwaha
23:12 jnthn I know *why* but it's wrong. :-)
23:12 masak indeed.
23:12 jnthn (Should not let you define that sub...)
23:12 * masak submits rakudobug
23:12 jnthn masak: I think we already have at least one relating to sub/type name conflict...add this example to that if you can find it easily.
23:13 masak I'm a bit busy cleaning mberends' cage right now.
23:13 bacek rakudo: enum A <a>; sub a { "HI" }; say a
23:13 p6eval rakudo 5b1ff9: OUTPUT«0␤»
23:13 masak is it ok if I cheat and merge the tickets later?
23:13 jnthn masak: Sure
23:13 Chillance joined #perl6
23:13 jnthn masak: Rather too many tickets than too few.
23:14 masak that's, like, my motto.
23:14 bacek rakudo: package Foo { enum A <a>; }; say a;
23:14 p6eval rakudo 5b1ff9: OUTPUT«Could not find non-existent sub a␤current instr.: '_block18' pc 53 (EVAL_23:38)␤»
23:14 bacek rakudo: package Foo { enum A <a>; }; say Foo::A::a;
23:14 p6eval rakudo 5b1ff9: OUTPUT«Null PMC access in invoke()␤current instr.: '_block18' pc 60 (EVAL_24:39)␤»
23:15 bacek yak...
23:15 masak new bug?
23:15 bacek masak: not sure.
23:15 masak let me know when you're sure. :)
23:15 bacek but... Use your motto :)
23:15 * masak uses his motto
23:16 mberends masak: does a new page on november-wiki.org *have* to be created by editing an existing page?
23:16 * jnthn needs to motivate himself to re-write Rakudo's enum implementation
23:17 bacek jnthn: I can help.
23:17 masak mberends: so the question is "is there a new-page function?", yes?
23:17 * bacek casts "Motivation Ray" to jnthn
23:17 * masak gets his sideburns singed by the ray
23:18 masak bacek: ouch!
23:19 bacek masak: now you overmotivated! :)
23:19 masak at least my sideburns are.
23:20 bacek masak: how your "STD parsing with Rakudo" going?
23:20 mberends masak: something like that. http://november-wiki.org/edit/new_page failed. my proposed pages might look silly in the main page.
23:20 masak bacek: it's a secret, but very well, thank you.
23:21 masak mberends: that should work.
23:21 bacek masak: when we will have 3-stage rakudo compilation? :)
23:21 masak bacek: 3-stage? :)
23:22 * mberends tries again and succeeds. the first page name had a '-' in it. propose a novemberbug.
23:22 bacek masak: compile perl6-with-src/parser; compile perl6-with-STD using previous one; compile per6l-with-Setting
23:23 masak mberends: indeed. we should have an RT for November.
23:24 * jnthn took far too many photos on his vacation...
23:25 masak mberends: while I remember it, what did we decide about hotel room?
23:27 mikehh rakudo (5b1ff9c) builds on parrot r37417 - make test/make spectest PASS - Kubuntu i386
23:27 mberends Your notion of splitting the bill is fine. It's tax-deductible for me, so anything goes. The cost of beer is a bigger concern.
23:27 masak indeed.
23:28 kate21de1 joined #perl6
23:29 jnthn Tax deductable beer...if only...
23:31 masak mberends: hey! your XHTML parser _does_ do some escaping. :) I discovered this when trying to add a failing test for escaping.
23:31 mberends masak: does check in Wedneday evening and out Sunday morning suit?
23:32 masak sounds reasonable, yes.
23:32 mberends there are some .subst() calls for escaping. The order is crucial, afair.
23:33 masak it is, yes.
23:33 masak replace & first. :)
23:33 mberends that's the one!
23:33 Chillance joined #perl6
23:34 masak ok, then I'll have to praise you instead of criticising you there. dang. :)
23:34 masak I kinda liked that criticism.
23:34 mberends there's plenty more nits there...
23:35 mberends (even lists, with commas, except finally,)
23:36 * mberends misses the bots that usually interject in these sorts of interchanges
23:40 masak ok, I'm done. pushing, sending pull request, posting to blog.
23:41 masak mberends: uhm, problem. if I send a pull-request to eric256's repo, does the request reach you, or only eric256?
23:42 masak mberends: anyway, you can see my 10 commits in the Network view.
23:42 * mberends doesn't know and looks
23:47 mberends hrmphh, the Debian flash plugin doesn't display github network graphs. must go to Ubuntu on the eee.
23:49 * mberends sees 9 commits from masak++
23:49 masak oh, meybe there were 9, not 10.
23:50 masak nope, I have 10 here. :)
23:50 mberends no, it says Network(9) and there are 10 commits
23:52 masak ah.
23:52 masak http://use.perl.org/~masak/journal/38644
23:53 mberends a plain 'git pull' ignores your commits. what extra options do I need?
23:56 masak mberends: you need to add my repo as a remote source.
23:56 masak and then you can pull from it.
23:56 masak 'git pull masak master'
23:59 * masak yawns
23:59 mberends fetching worked, but a local change to makefile.in is blocks the merge

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

Perl 6 | Reference Documentation | Rakudo