Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2009-01-08

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:16 |jedai| joined #perl6
00:27 aindilis` joined #perl6
00:48 |jedai| joined #perl6
00:49 meppl joined #perl6
01:21 aindilis` joined #perl6
01:25 |jedai| joined #perl6
01:39 gravity joined #perl6
01:50 _jedai_ joined #perl6
01:58 pugs_svn r24801 | particle++ | [S19] preliminary musings on metasyntactic options
02:03 alc joined #perl6
02:08 pugs_svn r24802 | particle++ | [S19] fix pod-o
02:11 bsdperl joined #perl6
02:19 pugs_svn r24803 | particle++ | [S19] add a sentence on unchanged syntax features, fix some pod formatting errors, and remember to update document metadata
02:22 eternaleye joined #perl6
02:41 |jedai| joined #perl6
02:45 km2 joined #perl6
02:57 alester joined #perl6
03:05 hercynium_ joined #perl6
03:06 sail0r joined #perl6
03:07 plainhao joined #perl6
03:07 hercynium_ joined #perl6
03:09 sail0r left #perl6
03:10 aindilis` joined #perl6
03:43 cspencer joined #perl6
04:09 s1n rakudo: my @t; for(1..1000){ for(1..1000){ push @t, $_; } }
04:09 p6eval rakudo 35185: No output (you need to produce output to STDOUT)
04:10 s1n rakudo: my @t; for(1..1000){ for(1..1000){ push @t, $_; } }; @t.WHAT.say;
04:11 p6eval rakudo 35185: No output (you need to produce output to STDOUT)
04:11 s1n hmm
04:12 s1n i think i found a cause of my segfaults
04:20 |jedai| joined #perl6
04:24 athenot_ joined #perl6
04:38 |jedai| joined #perl6
04:39 pmichaud rakudo: class Foo { has $.a; method xyz { $a++; } };  my $b = 5;  my $x = Foo.new( :a($b) );  $x.xyz;  say $b;
04:39 p6eval rakudo 35188: OUTPUT«Scope not found for PAST::Var '$a'␤current instr.: 'parrot;PCT;HLLCompiler;panic' pc 146 (src/PCT/HLLCompiler.pir:102)␤»
04:39 ChrisDavaz joined #perl6
04:40 pmichaud rakudo: class Foo { has $.a; method xyz { $!a++; } };  my $b = 5;  my $x = Foo.new( :a($b) );  $x.xyz;  say $b;
04:40 p6eval rakudo 35188: OUTPUT«6␤»
05:10 pugs_svn r24804 | pmichaud++ | [t/spec]:  Change a #?todo to a #?skip for rakudo in for.t .
05:16 masak joined #perl6
05:23 masak pmichaud: re Pairs and .pairs: (1) what's the disadvantage of making .value modifiable? if there is no discernable disadvantage, I'm all for making pairs modifiable. (2) action at a distance is scary.
05:32 eric256 joined #perl6
05:32 eric256 moritz_: hey
05:32 * eric256 thinks more and more that he is in a different timezone than everyone else (judging by the irc logs ;) )
05:35 _jedai_ joined #perl6
05:36 masak eric256: well, at least a few of us are on CET.
05:37 masak which means that if I get up early, I can chat with the people in the US before they go to bed :)
05:44 eric256 lol yea
05:44 eric256 so your up early now?
05:44 masak eric256: it's 06:47 here.
05:45 eric256 8 hours ahead of me
05:45 masak oh, so you're on the west coast?
05:45 eric256 central
05:45 masak ah.
05:45 eric256 mountain time actualy
05:46 eric256 time zones confuse me here
05:46 masak "mountain time". that sounds nice.
05:46 eric256 the whole other size of the globe thing realy confuses me
05:46 eric256 i have a hard enough time with the 4 time zones at work lol
05:46 masak eric256: it usually does confuse people in your country :)
05:46 eric256 hey!
05:46 eric256 lol
05:46 masak kidding :P
05:47 masak eric256: http://www.satirewire.com/news/0010/international.shtml
05:48 eric256 lmao
05:48 masak ;)
05:48 eric256 i moved here from the west coast. i always tell people that anything east of the rockies i consider the east coast ;)
05:48 masak sounds reasonable to me.
05:50 eric256 http://www.xkcd.com/503/
05:50 masak aye ;) one of the confusing aspects of the New World.
05:50 eric256 move teh "me" X left to the other half of the US and you have my world view. lol
05:51 masak everyone: what's all this about 'is export' in S29? at best, it's inconsistently applied. which things should have it and which shouldn't?
05:51 eric256 darn globe doesn't realy lend itself to east and west references once you get outside your content
05:52 eric256 pretty soon we are going to need a S00 for defining terminology to be used in the rest of the S's
05:52 masak eric256: I know. I read a guideline at the Esperanto Wikipedia long ago about not using terms like "The Middle East" because it depends on perspective.
05:53 masak eric256: write it, and they will come.
05:53 eric256 i'm; still working on my last project
05:53 eric256 going to try and focus on smartlinks and examples
05:54 masak goodie.
05:54 eric256 and leave the rest alone. its too hard to keep up with you all ;)
05:54 masak I know the feeling. :)
05:54 eric256 maybe one example can be a rewrite of smart links
05:54 eric256 in perl6
05:54 masak how do you mean, 'rewrite'?
05:55 eric256 the smartlinks.pl utilities...its a bit....err...hacked together
05:55 eric256 not to offend but its scary at the moment and needs some love and care and rewriting
05:56 eric256 and i still think it should compile smartlinks into the existing POD (marked sufficiently that it can recognize and correct them each time it is run)
05:56 masak eric256: I'm not offended, I had no part in writing it.
05:56 eric256 then you end up with smartlinks_compiler and pod2html instead of our current smartlinks_compiler_to_html_plus_embed_test_info :)
05:57 masak eric256: uh, the _point_ of smartlinks is that they don't pollute the existind PODs.
05:57 eric256 masak:just covering my ass
05:57 masak s/ind/ing/
05:57 eric256 masak: i understood there point as beeing a link between tests and specs, since we define implementations as passing test it would make sense that tests and spec are interlinked completly
05:58 masak eric256: yes, but having no dependency from the PODs to the tests is a good thing, by me.
05:58 masak that's a sort of inversion of control, I think.
05:59 masak it keeps things separate.
05:59 eric256 definitly there wouldn't be any actual links per say, just markers so that anyone editing the pod would see the tests that it links to and would know what tests might need updated to match new specs
05:59 masak eric256: no, even that'd be too, much I think.
05:59 eric256 certainly would propose hand entering links in specs
05:59 masak eric256: of course, you're welcome to produce inofficial PODs with that property.
05:59 _jedai_ joined #perl6
06:00 eric256 that could certainly be a first step
06:01 masak any additional steps would lower the quality of the synopsis documents, methinks.
06:01 eric256 but i'll tell you as a newbie that the way it is makes it very difficult for new people to get around between specs and tests. you basicaly end up having to use a browser to read the pod, which is hard to work with (searching/greping is difficult at best) then go find tests on your own
06:01 eric256 masak: why?
06:01 masak eric256: because the synopses are independent from the test suite, and that is a good thing.
06:02 masak the way things are now, the test suite refs the syns, but not the other way around.
06:02 masak that's by design.
06:02 eric256 but they arn't and arn't suppose to be. not the way its preached around that a perl6 implementation implements the test suite not the specs
06:02 masak eric256: it implements both.
06:02 masak also, the test suite implements the spec.
06:02 eric256 i wouldn't advocate creating links by hand in syns to tests, but having links in it is obviously usefull or we wouldn't have the HTML versions
06:03 masak eric256: that's true. however, I mostly use the POD files.
06:03 masak and I'm glad they're not diluted with explicit references to tests.
06:03 eric256 same here, but once in a pod file, how do you find the tests that are testing your sepc?
06:04 masak eric256: you know, you could write a tool for that!
06:04 eric256 lol
06:04 masak _that'd_ be useful.
06:04 eric256 thats what i'm talking about, but we already have a tool for it
06:04 eric256 just only outputs HTML instead of POD
06:04 eric256 so perhaps a second set of pod is the solution
06:04 eric256 best of all worlds
06:05 masak you needn't output either; just provide a spec number and a line number, and you get back the closest few smartlinks to tests.
06:05 eric256 btw if test are soo numerous that they would dilute the docs it might just be a sign that tests need consolodating
06:05 eric256 hmmm i'll keep that idea in mind
06:05 masak eric256: also, it'd be great if you could make the tool spot places in the specs which are undertested.
06:05 eric256 a cross reference of some sort
06:06 avar there was already such a tool for pugs
06:06 eric256 avar which part?
06:06 avar ...to grab L<> links in the tests..
06:06 eric256 yea thats the smartlinks.pl util we are talking about
06:06 avar ah:)
06:06 eric256 (unless there is another different tool, entirely possible)
06:07 avar no I meant smartlinks
06:08 avar I just thought you were about to re-invent smartlinks, didn't read the whole conversation. Nevermind
06:08 eric256 avar: no i just want to re-write in perl6 if possible and divide out some of its work ;)
06:08 masak avar: he doesn't want to reinvent them, only make them bidirectional.
06:08 eric256 needs to output POD/HTML or some sort of cross reference
06:09 * eric256 writes a vim pluging for masak to hind return smartlinks ;)
06:09 masak eric256: you're not getting it...
06:09 eric256 masak i am
06:09 eric256 or neither of us are
06:11 eric256 masak: its my understanding that the spec and tests are both part of the definition of the language so there doesn't realy seem to be a reason they shouldn't be integrated in output somewhere. and certainly don't see why they should only be integrated in icky HTML ;)
06:11 pugs_svn r24805 | masak++ | [S29] multiple changes:
06:11 pugs_svn r24805 | masak++ | * added Object.warn (to be moved in the next commit to Any)
06:11 pugs_svn r24805 | masak++ | * added invocant colon to Object.perl (to be moved in the next commit to Any)
06:11 pugs_svn r24805 | masak++ | * added `is export` to Object.perl
06:12 masak eric256: don't let my different opinion stand in the way of your goals. go forth and do glorious things. but leave my syn PODs alone.
06:12 masak please.
06:15 pugs_svn r24806 | masak++ | [S29] moved .perl and .warn from Object to Any. removed Object heading for now.
06:20 eric256 lol
06:20 eric256 me considers doing it once just to make masak nervous
06:21 eric256 later
06:21 eric256 time to sleep here
06:21 eric256 have fun at work
06:22 masak eric256: thanks. see you.
06:22 eric256 left #perl6
06:24 cspencer joined #perl6
06:26 _jedai_ joined #perl6
06:33 masak buubot: spack \bItem\b
06:33 buubot masak: S02-bits.pod:1 S03-operators.pod:2 S07-iterators.pod:1 S10-packages.pod:2 S12-objects.pod:1 S16-io.pod:2 S29-functions.pod:7
06:36 pugs_svn r24807 | masak++ | [S29] added slice and hash contextualizers, reordered item and list
06:57 ashizawa joined #perl6
07:05 maerzhase joined #perl6
07:13 pbuetow joined #perl6
07:23 nekobaka joined #perl6
07:29 initself joined #perl6
07:29 initself should you be able to declare an array as an Int?
07:29 initself my Int @a
07:30 masak initself: syre.
07:30 masak sure*
07:30 initself so this bug is legit?
07:30 initself http://rt.perl.org/rt3/Ticket/Display.html?id=61926
07:31 initself This bug did not seem legit to me:
07:31 initself http://rt.perl.org/rt3/Public/Bug/Display.html?id=61924
07:31 initself Did I reply to the ticket properly?
07:31 masak ok, one question at a time. :)
07:31 masak re 61926, I don't see what the bug is about.
07:32 masak do I need to download something to read the ticket?
07:32 moritz_ my Int @a # allowed in the specs, but not yet implemented
07:32 initself masak: let me give you a better link
07:32 initself masak: http://rt.perl.org/rt3/Ticket/Attachment/515150/243028/
07:32 masak initself: re 61924, looks good to me.
07:33 masak initself: except you didn't specify exactly how you ran the code. that helps sometimes.
07:33 initself masak: if some random dude runs something and gets a good result, do i close the ticket?
07:33 masak initself: not necessarily.
07:34 initself masak: hey, here's one by you!
07:34 initself http://rt.perl.org/rt3/Public/Bug/Display.html?id=57876
07:34 masak initself: re 61926, it's as moritz_ says. just not implemented yet.
07:34 masak initself: aye, some are by me. :)
07:35 moritz_ about half of the RT queue is by masak ;-)
07:35 masak I like to report bugs, that's all.
07:35 initself that's a pretty weird one.
07:36 initself keep up the good work
07:36 * initself goes to bed.
07:36 masak initself: I like weird ones, too :)
07:43 vixey joined #Perl6
07:58 nekobaka left #perl6
08:20 Matt-W Morning
08:26 moritz_ good morning
08:34 masak good morning!
08:39 namenlos joined #perl6
08:40 masak @tell szabgab Did you notice that S29 actually has some documentation for C<pack>? I noticed it just now.
08:40 lambdabot Consider it noted.
08:44 Matt-W I never understood pack in perl 6
08:44 Matt-W err, perl 5
08:44 moritz_ Matt-W: have you tried reading `perldoc perlpacktut"?
08:44 moritz_ s/"/'/
08:44 masak Matt-W: it's one of those power tools that you don't know you need until you learn it.
08:45 Matt-W moritz_: I didn't know about that
08:45 Matt-W All I'd had was the information in perlfunc and Programming Perl, and I just always thought it was far too much hassle
08:46 namenlos joined #perl6
08:47 masak Matt-W: the same could be said of regexps, or sprintf
08:47 moritz_ Matt-W: I didn't know it either; pack always scared me...
08:47 Matt-W masak: yes, but I knew printf-ish stuff from being a C programmer, and regexps I learned years ago through a great deal of pain
08:47 masak I thought I'd learn it by implementing it in Rakudo :)
08:47 moritz_ Matt-W: then I thought "man, somebody wrote perlopentut, why is there no perlpacktut?"
08:47 moritz_ turns out there was one already :-)
08:48 masak :)
08:48 Matt-W A pleasant discovery
08:49 masak do you two have an opinion on the `$str.subst( /(foo)/, $0.reverse )` issue? I'm thinking about writing a p6l email about it, but I'm hesitating because I might be the only one who feels the need for this.
08:50 Matt-W There's an issue?
08:50 masak Matt-W: well, to me there is. you can't write it like that.
08:51 masak because $0 will have no (or the wrong) meaning.
08:51 moritz_ masak: if you want magic, you use the magic form
08:51 masak moritz_: that's a good point.
08:51 moritz_ that is $str ~~ s[foo] = $0.reverse
08:52 masak moritz_: and for the :g case?
08:52 Matt-W Ah because $0 in that first example, would refer to the $0 from a match that happened earlier in the block
08:52 moritz_ masak: for the :g case you add :g to the magic form
08:52 masak moritz_: ok. I'm happy.
08:52 moritz_ Matt-W: exactly
08:52 masak no mail to p6l needed.
08:52 Matt-W yes it's sensible to say that except if Perl 6 guarentees left-to-right argument evaluation order
08:53 masak I imagine this is something that will trip people up, though.
08:53 Matt-W And in any case, it's not an argument you evaluate before the call happens
08:53 Matt-W so yeah
08:53 moritz_ Matt-W: I don't think that subst will be used all that often
08:53 masak Matt-W: it doesn't have to do with ltr arg eval order.
08:53 Matt-W it's impossible to make that work without seriously subverting things
08:53 moritz_ sorry, masak :)
08:53 Matt-W masak: I was thinking out loud. Usually a bad idea :)
08:53 iblechbot joined #perl6
08:53 Matt-W Perl 5 people will likely reach for ~~ anyway
08:53 masak moritz_: no worries. just telling you it's not because of that.
08:54 masak moritz_: you're probably right.
08:54 moritz_ Matt-W: even with guarantued order it's the wrong $0, because .subst doesn't set its callers $/ object
08:54 Matt-W moritz_: yes, I was trying to backpedal into that when I realised :)
08:55 Matt-W because evaluating the regexp really doesn't matter, as that's not where the match would happen
08:55 masak moritz_: what about .subst( /foo/, { (~$0).reverse } ) ?
08:56 Matt-W Wouldn't that form a closure with $0 from the calling scope?
08:56 masak Matt-W: yes, or with $/, rather.
08:56 masak I didn't think of that.
08:57 masak that could be a problem.
08:57 moritz_ masak: that would work
08:57 masak moritz_: but what about what Matt-W said?
08:57 moritz_ rakudo: say "barfoo:.subst( /foo/, { (~$0).reverse } )
08:57 p6eval rakudo 35195: OUTPUT«Statement not terminated properly at line 1, near "\"barfoo:.s"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
08:57 moritz_ rakudo: say "barfoo".subst( /foo/, { (~$0).reverse } )
08:57 p6eval rakudo 35195: OUTPUT«Use of uninitialized value␤bar␤»
08:58 masak I don't think Rakudo does closures in .subst yet.
08:58 moritz_ .subst can explicitly set $/ for the block it calls
08:58 moritz_ that's the beauty of context variables
08:58 masak oh! that's pretty.
08:58 Matt-W So it wouldn't make a closure with $/ then
08:59 Matt-W Ouch
08:59 moritz_ it won't close over $/ because it's not a lexical variable
09:00 Matt-W Oh dear
09:00 Matt-W Something else to remember
09:06 moritz_ actually it's very DWIM'my
09:07 Matt-W It is as long as you remember that $/ isn't lexical and closures are for lexicals
09:07 Matt-W Which I probably will from now on :)
09:08 moritz_ it's the same behaviour as in perl 5, which is why it doesn't surprise me
09:16 Matt-W I guess I never tried to do that in Perl 5
09:16 moritz_ in Perl 5 all these match variables are just globals
09:16 Matt-W But it means the day isn't wasted, as I've learned something
09:17 elmex joined #perl6
09:17 moritz_ my day also isn't wasted, I found the bug that I've been chasing two weeks before christmas
09:17 Matt-W But the rule is, if you want a closure with a match variable, copy it into a lexical and use that :)
09:17 Matt-W Woo!
09:17 moritz_ s/i/j/ in two places helped
09:17 Matt-W The rest of my day probably will be wasted, I'm at work
09:18 masak Matt-W: :)
09:19 Matt-W Today I shall be teaching some of my esteemed colleagues how to merge changes from another svn branch into ours...
09:20 masak doesn't sound too bad.
09:20 masak I'm just doing a git-svn checkout here.
09:20 masak takes ages.
09:20 Matt-W It could be better... our subversion server is incredibly slow
09:20 masak oh, it's done! :)
09:21 Matt-W And also we recently moved to a different branch management model which would work far, far better if we were using git
09:23 Matt-W Does Parrot know how to talk to networks yet?
09:23 masak Matt-W: 'talk to networks'?
09:24 Matt-W As in, open a TCP/IP socket and make use of it
09:25 masak don't know. maybe ask on #parrot on irc.perl.org?
09:28 Matt-W Ahah, it seems you can
09:28 Matt-W There's an example which implements an HTTP server
09:28 masak Parrot++
09:28 Matt-W Excellent
09:29 mberends but Rakudo doesn't :(
09:32 masak don't just do something! stand there!
09:32 Matt-W Well maybe that can be fixed
09:33 masak of course it can :)
09:33 mberends I've asked before, and been told it is waiting for a new IO subsystem being developed
09:34 ft joined #perl6
09:34 masak well, isn't that finished now?
09:34 mberends dunno, I was considering an interim inline PIR kludge
09:36 mberends it will be great to 'talk to networks'. for example, irc bots in rakudo.
09:36 Matt-W Oooh yes
09:37 masak definitely want that.
09:38 mberends but I have to grok PIR to get there
09:39 Matt-W I can read PIR, but I'm not very good at writing it
09:39 Matt-W I did once write half a compiler that targetted it
09:40 mberends well, socket() and connect() are less than half a compiler
09:40 Matt-W lol
09:40 Matt-W It was my BSc final-year project
09:41 Matt-W Well, not part of my project, after it was all over I ripped the backend out of the compiler I'd written and stuck in one that generated PIR
09:41 Matt-W In hindsight, I should've done that from the beginning, it was much easier
09:43 mberends agreed. my main compiler writing experience was Small-C in the previous century
09:44 mberends not that I wrote it, I just fiddled with it, adding switch() and stuff
09:44 mberends is anyone here coming to London Perl Mongers tonight? http://london.pm.org/meetings/locations/antelope.html
09:45 Matt-W It wasn't all that bad, I got a first for the project, but it was quite a nice experience to write the PIR generator
09:45 Matt-W I wonder if I've still got that code...
09:45 Matt-W mberends: bit far for me I'm afraid
09:45 mberends distance--
09:46 Matt-W I'm in Nottingham, so London for the evening is not really doable
09:50 rindolf joined #perl6
10:00 mberends finally pushed my first draft of perldoc pod2text pod2man Pod::Parser Pod::to::text Pod::to::man to http://github.com/eric256/perl6-examples/tree/master
10:01 mberends please try to run it, there's more to follow (xhtml and a test suite)
10:06 masak mberends: whoa! did you write that?
10:07 mberends yes! over the last 3! months
10:07 masak mberends: massive, massive kudos.
10:07 masak also, thanks for the acknowledgements.
10:07 mberends shh, you're making me blush
10:09 masak mberends: might I make a small request about the authors of November? either list them all, or (perhaps better) just say "the November developers". it's not just the two of us nowadays, and not all code is contributed by me or viklund.
10:09 masak mberends: might I add that the code looks exquisite? :)
10:09 masak what's with all the '# [*-1]' comments everywhere?
10:10 moritz_ *-1 works these days
10:10 mberends thanks, I'm a teacher, so I like textbook style. and I'll fix the November attributions.
10:10 moritz_ perl6: say (*-1).WHAT
10:10 p6eval elf 24807: OUTPUT«Undefined subroutine &GLOBAL::whatever called at (eval 119) line 3.␤ at ./elf_f line 3861␤»
10:10 p6eval ..rakudo 35195: OUTPUT«Null PMC access in get_number()␤current instr.: 'parrot;Whatever;' pc 8517 (src/classes/Whatever.pir:41)␤»
10:10 p6eval ..pugs: OUTPUT«Num␤»
10:11 * masak reports rakudobug
10:12 Matt-W bad bad bad bad
10:12 mberends [*-1] was broken on object property arrays. And I'm sticking to r34088 until RT62036 is cleared
10:14 Matt-W yes lovely bug that
10:14 Matt-W bit me my first day with rakudo
10:14 Matt-W I'm using @.chapters[@.chapters.elems - 1] at the moment :(
10:14 Matt-W it's like... C++
10:14 mberends exactly
10:14 masak Matt-W: use .end, at least
10:14 Matt-W oh is .end the last index?
10:14 mberends ah, good idea, thanks
10:15 moritz_ rakudo: class A { has @!a; method b { @!a = <a b c>; say @!a[*-1] }; }; A.new.b
10:16 p6eval rakudo 35195: OUTPUT«Null PMC access in find_method()␤current instr.: 'parrot;A;_block39' pc 445 (EVAL_13:169)␤»
10:16 moritz_ rakudo: class A { has @!a; method b { @!a = <a b c>; say @!a.values }; }; A.new.b
10:16 p6eval rakudo 35195: OUTPUT«abc␤»
10:16 moritz_ rakudo: class A { has @!a; method b { @!a = <a b c>; say @!a.values[*-1] }; }; A.new.b
10:16 p6eval rakudo 35195: OUTPUT«Null PMC access in find_method()␤current instr.: 'parrot;A;_block40' pc 454 (EVAL_13:170)␤»
10:16 Matt-W By the way, will we always have to say use v6 at the start of a Perl 6 programme?
10:16 moritz_ Matt-W: not if you invoke it with perl6 or perl6.exe
10:17 moritz_ Matt-W: only if you invoke it with perl or perl6.exe
10:17 mberends no, class { ... } is ok too
10:17 moritz_ ah, right
10:17 moritz_ and module Foo; as well
10:17 Matt-W excellent
10:17 * Matt-W is looking at mberends' code
10:18 * mberends must go offline soon for about 12 hours, to end up at London.pm
10:19 masak mberends++ # perldoc pod2text pod2man Pod::Parser Pod::to::text Pod::to:man
10:20 Matt-W mberends: very nice code.
10:20 Matt-W It's so good to see people writing Perl 6, and that the Perl 6 they're writing is so nice
10:20 mberends I wish the rest of you would bother to write more comments and POD
10:20 masak mberends: understood. will do.
10:21 masak mberends: Druid has comments but no POD.
10:21 Matt-W the code I'm working on has few comments and no POD
10:21 Matt-W But I'll fix that before I put it up somewhere
10:22 mberends one of my subprojects is pod5 to pod6 translation, to reformat existing docs
10:23 mberends and pod6 to pod5 translation, to connect to legacy doc handlers
10:23 moritz_ perl6: print sqrt(324)
10:23 p6eval elf 24807: OUTPUT«Undefined subroutine &GLOBAL::sqrt called at (eval 119) line 3.␤ at ./elf_f line 3861␤»
10:23 p6eval ..pugs, rakudo 35195: OUTPUT«18»
10:39 masak does anyone know which one is oldest: $_ in Perl or $_ in bash?
10:40 * moritz_ didn't know about $_ in bash
10:42 masak it's kinda neat.
10:42 mberends left #perl6
10:42 masak I suspect that bash inherited it from Perl, but I really don't know.
10:43 moritz_ the only mention of it in `man bash' is "When used in the text of the message, $_ expands to  the  name  of  the  current  mailfile" plus an example
10:44 masak moritz_: $_ contains the last argument of the last command.
10:44 moritz_ masak: ah, I usually access that via Esc-.
10:45 masak ooh. convenient.
10:54 Matt-W That's quite different to the Perl usage!
10:55 c9s joined #perl6
11:08 ruoso joined #perl6
11:12 ruoso_ joined #perl6
11:14 ruoso joined #perl6
11:16 ruoso Hello!
11:16 ruoso where is the pugs-commits mail generated?
11:17 ruoso It's really starting to be annoying not having the commit message in the subject of the message
11:17 ruoso specially when people reply to that
11:34 ruoso hmm... I'd expect STD to identify the named parameter somehow
11:38 ruoso it just list as plain arguments instead... I think the compiler is suppose to split the named from the positional then
11:41 Southen joined #perl6
11:42 ruoso and also, ":named<foo>" is parsed differently from "named => "foo""
11:42 ruoso the first is enclosed in a nulltermish, and the second is straight a colonpair
11:43 Matt-W hmm shouldn't they be the same, ultimately?
11:43 Matt-W they're both pair constructors, I thought...
11:44 ruoso so did I
11:45 Matt-W sounds like a bug to me
11:47 ruoso I presume it's still too early at TimToady localtime
11:51 Matt-W anywhere in the US is going to be pretty early
11:51 Matt-W 7am on the east coast, I think
11:53 ruoso hmm
11:53 ruoso it's not the pair constructors that are parsed differently
11:54 ruoso the second argument onward is always enclosed in a nulltermish
11:56 ruoso even for positional arguments
11:58 donaldh joined #perl6
11:58 Matt-W aaah
11:58 Matt-W hmm
11:58 Matt-W is that something to facilitate things with indeterminate numbers of arguments?
11:59 Matt-W I don't know why it might be, I'm just throwing overcaffeinated ideas around
12:04 riffraff joined #perl6
12:04 Matt-W &
12:05 riffraff hi
12:05 masak overcaffeinated ideas sleep furiously.
12:06 ruoso hmm... nulltermish is used to look for the stopper
12:06 ruoso it probably also is there to make "foo(1,)" to work
12:07 ruoso or "@a = 1,"
12:07 moritz_ std: my @a = 1,
12:07 p6eval std 24807: OUTPUT«############# PARSE FAILED #############␤(Possible runaway string from line 1 to line 1)␤Can't understand next input--giving up at /tmp/Oxg1I1OWgk line 0:␤------> [32m[31m[0m␤    expecting null term␤00:06 105m␤»
12:07 ruoso hmm
12:08 ruoso std: my @a = 1,;
12:08 p6eval std 24807: OUTPUT«00:06 105m␤»
12:08 ruoso std: my $a = 1,;
12:08 p6eval std 24807: OUTPUT«00:06 105m␤»
12:08 * moritz_ hilights TimToady to make sure he notices :)
12:08 ruoso rakudo: my $a = 1,; say $a.WHAT'
12:08 p6eval rakudo 35195: OUTPUT«Statement not terminated properly at line 1, near "'"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
12:08 ruoso gah
12:08 ruoso rakudo: my $a = 1,; say $a.WHAT;
12:09 p6eval rakudo 35195: OUTPUT«Array␤»
12:09 moritz_ perl6: my $a = 1,; say $a.WHAT;
12:09 p6eval rakudo 35195: OUTPUT«Array␤»
12:09 p6eval ..elf 24807, pugs: OUTPUT«Int␤»
12:09 moritz_ actually I think that pugs and elf are right here
12:10 ruoso no...
12:10 moritz_ because it should be parsed as (my $a = 1), :
12:10 moritz_ s/:/;/
12:10 ruoso no, it shouldn't
12:10 moritz_ remember, item assignment has tighter precedence than ,
12:10 moritz_ only list assignment has looser prec
12:10 ruoso but this is how you create a list with only one item
12:11 moritz_ (1,) or list(1) work
12:11 ruoso perl6: my $a = (1,); say $a.WHAT;
12:11 p6eval pugs, rakudo 35195: OUTPUT«Array␤»
12:11 p6eval ..elf 24807: OUTPUT«Int␤»
12:11 ruoso moritz_, in (1), the parens are noop
12:11 ruoso ah... list(1), sorry
12:11 moritz_ right
12:13 moritz_ rakudo: "a" ~~ / . <?{{ print "was here\n" }}>;
12:13 p6eval rakudo 35195: OUTPUT«was here␤»
12:14 ruoso moritz_, std parses "my $a = 1,;" as I was expecting
12:14 moritz_ ruoso: then my understanding of Perl 6 parsing might be wrong yet again :/
12:14 ruoso but it parses as List assignment for some reason
12:14 moritz_ std: $a = 3, $b = 4;
12:15 p6eval std 24807: OUTPUT«00:06 104m␤»
12:15 moritz_ ruoso: have you tried it without the my?
12:15 * ruoso looking
12:15 moritz_ just '$a = 1,'
12:15 ruoso parsed the same way
12:16 ruoso and $a = 3, $b = 4 is parsed as $a = 3,($b = 4)
12:18 xinming_ joined #perl6
12:19 ruoso TimToady, why does "my $a = 1,;" is parsed as a list assignment?
12:20 ruoso s/is parsed/parse/
12:21 ruoso moritz_, btw... do you know how to make the pugs-commit messages to put the commit message in the subject?
12:22 moritz_ ruoso: pmichaud maintains the mailing post-commit hook
12:22 ruoso pmichaud, please ;)
12:22 moritz_ I also wanted to bother him about it, p6l looks a bit weird with the current subject
12:22 ruoso you're being generous by saying "a bit"
12:23 moritz_ sometimes I'm a quite generous person :-)
12:24 moritz_ the old mails didn't contain more in the subject as well
12:24 ruoso but they weren't that many ;)
12:28 masak I'm sorry I'm contributing to the email flooding.
12:28 masak it's the way I work on S29 -- can't really do it any other way.
12:28 ruoso I'm ok with flood, as long as I can sense anything about it ;)
12:28 masak good point.
12:28 ruoso but I unfortunally don't have a mental connection with the "svn diff" command ;)
12:28 masak I'd also like to see the subject lines contain commit messages.
12:29 moritz_ maybe the first line of the commit message
12:29 masak that'd be swell.
12:29 moritz_ and then we educate our commiters to put a short summary in the first line
12:29 ruoso yes, just replace the constant docs/Perl6/Spec by that
12:29 masak ...which is a good idea anyway.
12:29 moritz_ like the git users usually do it
12:32 masak moritz_: did you see mbrends++'s commit to perl6-examples? wow!
12:33 moritz_ masak: aye
13:00 pmichaud masak: did you ever figure out "is export"?
13:00 masak pmichaud: not really. I know we've talked about it, but I've forgotten it since then.
13:02 pmichaud we use "is export" on methods that can also act as subs (and have the same signature)
13:03 pmichaud so, for example:   method abs($value:) is export
13:03 pmichaud because we allow both   $value.abs   and abs($value)
13:03 pmichaud we don't put "is export" on methods where the corresponding sub would have a different signature
13:04 ruoso pmichaud, I've been struggling with "is export" recently
13:04 masak pmichaud: ah, right. I remember now.
13:04 masak pmichaud: will review S29 accordingly.
13:05 pmichaud e.g., sort as a method is     sort(@values: Matcher $by)    but sort as a sub is   sort(Matcher $by, *@values)
13:05 pmichaud so, no "is export"
13:05 ruoso pmichaud, does rakudo implement "is export" as a real trait already? or just as a compiler hack?
13:06 pmichaud more as a hack.
13:06 pmichaud but it's not too difficult to make it a trait.
13:07 ruoso I was wondering what kind of introspection would be needed to do so
13:07 ruoso since the trait sub only receives the sub object
13:07 ruoso maybe it does that using CALLER::<>
13:08 Jedai joined #perl6
13:11 moritz_ ruoso: it receives the method object, and can derive a sub object from that
13:11 Matt-W oh that's what is export is for
13:11 Matt-W I was thinking it was something to do with exporting names from modules
13:11 ruoso sure... I was meaning in general, not only for methods
13:12 Matt-W I would expect traits to have to make a lot of use of introspection
13:12 Matt-W looking at signatures and things
13:12 pmichaud (making breakfast and getting kids to school... bbiab)
13:13 ruoso moritz_, I waas thinking on the installation of the EXPORT::foo::bar alises
13:15 pmichaud in rakudo's case, introspection tells us the type of sub and the namespace it's compiled in, so we can pretty much resolve "is export" from that.
13:15 ruoso pmichaud, the namespace as a global?
13:15 ruoso or the "namespace object"?
13:16 ruoso i.e.: the Package
13:17 pmichaud ruoso: subs in Parrot have a "namespace" attribute that identifies the namespace (object) in which they execute
13:18 ruoso cool
13:18 pmichaud so we use that.  :-)
13:18 ruoso in SMOP subs point to a lexical scope
13:18 pmichaud subs in Parrot have that also, but that's a separate attribute
13:19 ruoso so I'll probably have to use CALLER::<$?PACKAGE><EXPORT><ALL><bar> := sub
13:20 pmichaud that's effectively what rakudo will be doing (and parrot gives us an easy way to get CALLER::<$?PACKAGE>
13:21 ruoso cool... good to know we're doing things the same way ;)
13:21 ruoso it's a good sanity check
13:21 pmichaud yes.
13:21 ruoso (or at least, common insanity check)
13:21 pmichaud :-)
13:21 pmichaud afk for a bit, kids on way to school
13:24 maerzhase joined #perl6
13:34 pmichaud (svn-commit mailing list)   the script that handles it is in  /data/svn/pugs/hooks/post-commit
13:34 pmichaud all I did was to get it working based on whatever was available -- I didn't try to do much more than that
13:34 eric256 joined #perl6
13:34 pmichaud anyone who wants to adjust the script is very welcome to do so
13:37 ruoso I presume moritz_ has access to that machine
13:37 ruoso (I don't)
13:38 moritz_ ruoso: that's on feather; many people have access
13:51 eric256 mberends++ for pod2* ;)
13:52 moritz_ perlbot: karma mberends
13:52 perlbot Karma for mberends: 4
13:52 moritz_ mberends++
13:53 Exodist joined #perl6
13:53 maerzhase joined #perl6
14:03 ruoso you know... while implementing named arguments, I realize that it will be a "compiler hack"
14:03 ruoso because the grammar sees it as positional arguments
14:03 ruoso that because it sees it as a regular infix:<,>
14:04 ruoso I think it would be nice if STD implemented a capture token
14:04 ruoso to make it more than a compiler hack, but something in the parse tree
14:05 ruoso otherwise the compiler will need to grep the semilist for pair constructors
14:06 ruoso and remove them from the semilist to build the named arguments
14:07 spx2 joined #perl6
14:10 alester joined #perl6
14:15 alanhaggai joined #perl6
14:16 eric256 left #perl6
14:21 iblechbot joined #perl6
14:24 meppl joined #perl6
14:30 Lorn joined #perl6
14:50 Helios- joined #perl6
14:50 fridim_ joined #perl6
14:55 kane_ joined #perl6
14:57 * ruoso moves the named arguments issue to p6-l since it looks like a very complicated issue
15:11 pmichaud ruoso: I find it's not that difficult to have the compiler separate the named from positional arguments.
15:11 ruoso it's not a matter of difficulty
15:11 ruoso but of uglyness
15:11 pmichaud I think it's the waterbed theory of ugliness here.  :-)
15:11 alester joined #perl6
15:12 ruoso waterbed theory?
15:12 pmichaud "waterbed theory of x"  means that if you reduce x in one place you're just increasing it somewhere else
15:12 ruoso heh
15:13 pmichaud normally called "waterbed theory of complexity", I think.
15:13 pmichaud anyway, that's one that you and p6l can work out :-)
15:15 ruoso I'm trying to make a change in STD to evaluate that
15:15 ruoso but I still didn't succeed in providing a working patch
15:18 eric256 joined #perl6
15:20 rakudo_svn r35197 | pmichaud++ | [rakudo]: spectest-progress.csv update: 279 files, 6175 passing, 0 failing
15:21 * ruoso lunch &
15:44 aindilis joined #perl6
16:06 riffraff joined #perl6
16:12 ruoso joined #perl6
16:12 ejs joined #perl6
16:19 meppl joined #perl6
16:21 spx2 joined #perl6
16:33 kane_ joined #perl6
16:34 eric256 left #perl6
16:40 rakudo_svn r35207 | infinoid++ | [rakudo] Fix a couple of broken tests uncovered by r35190 (implementing the binary compare function).
16:47 Psyche^ joined #perl6
16:48 hercynium joined #perl6
16:49 stephens joined #perl6
17:10 Southen_ joined #perl6
17:11 REPLeffect joined #perl6
17:20 justatheory joined #perl6
17:37 azawawi joined #perl6
17:38 azawawi hi
17:46 pdcawley joined #perl6
17:48 aindilis joined #perl6
17:48 ZuLuuuuuu joined #perl6
17:55 spx2 joined #perl6
18:01 donaldh joined #perl6
18:06 ZuLuuuuuu left #perl6
18:08 cj_ joined #perl6
18:14 Psyche^ joined #perl6
18:15 * _cj hurms
18:26 araujo joined #perl6
18:35 pbuetow joined #perl6
18:38 Helios- joined #perl6
18:44 * moritz_ waves hello
18:59 Helios- joined #perl6
19:08 Helios- joined #perl6
19:11 alester_ joined #perl6
19:20 pugs_svn r24808 | pmichaud++ | [t/spec] Update namespace.t spec.
19:43 Helios- joined #perl6
19:45 Helios- joined #perl6
19:45 ryanc joined #perl6
19:48 athenot joined #perl6
19:51 riffraff joined #perl6
19:56 cspencer joined #perl6
20:00 stephens joined #perl6
20:05 icwiener joined #perl6
20:23 xinming joined #perl6
20:33 athenot_ joined #perl6
20:59 hercynium I have quick question if there's anybody 'round to answer...
20:59 moritz_ I'll do my best ;)
20:59 hercynium which synposes should I read to learn about how perl6 will do referencing and dereferencing?
21:00 hercynium thx, moritz :)
21:01 moritz_ in what way? like the \$x and @$x in perl 5?
21:01 kisu_ joined #perl6
21:01 moritz_ then it's probably best to read S02 (context, captures, signatures etc.)
21:02 hercynium yeah, I think so...
21:02 hercynium I actually haven't looked at the synopsis list and just noticed that captures seem to have taken their place
21:03 PerlJam hercynium: why do you want to read about those?  Typically, you won't need to worry about "references"
21:03 hercynium yesterday I thought to myself of some silly syntactic sugar I realized I wanted
21:03 hercynium where a function was parsing a string and spitting out about 4 different data structures
21:04 km2 joined #perl6
21:04 hercynium really, I just thought "I wonder how this could be better in perl6 :)
21:05 hercynium (the data is large, hence using references)
21:05 moritz_ the nice thing is that many dereferencations can happen automagically
21:06 moritz_ rakudo: my @a = <b c d>; my $ref = @a; say $ref[*-1]
21:06 p6eval rakudo 35221: OUTPUT«d␤»
21:07 hercynium rakudo: my @a = <b c d>; say @a[1]
21:07 p6eval rakudo 35221: OUTPUT«c␤»
21:07 hercynium rakudo: my @a = <b c d>; my $ref = @a; say @ref[1]
21:07 p6eval rakudo 35221: OUTPUT«Scope not found for PAST::Var '@ref'␤current instr.: 'parrot;PCT;HLLCompiler;panic' pc 146 (src/PCT/HLLCompiler.pir:102)␤»
21:08 hercynium just curious :)
21:09 moritz_ $ref and @ref are different variables
21:10 pmurias joined #perl6
21:11 [particle] sigils are invariant in perl 6, so an array always uses @
21:12 hercynium I had a desire to be able to "return \@a, \%b, \%c, \%d" from a sub "do_stuff" and have the caller be "my (@d, %w, %i, %m) = do_stuff($data)"
21:12 hercynium (put a \ in front of that $data)
21:13 [particle] if your data structures are all references instead, then you can do that
21:13 eternaleye joined #perl6
21:14 [particle] the syntax isn't as pretty, but it does reduce copying in sub calls
21:15 hercynium rakudo: my $a = [qw(a b c)]; my @b = $a; say @b[2]
21:15 p6eval rakudo 35221: OUTPUT«Use of uninitialized value␤␤»
21:16 hercynium I should just read instead of beating up the bot :)
21:16 hercynium thx though! ttyl!
21:16 [particle] rakudo: my $a = <a b c>; my @b = $a; say @b[2];
21:16 p6eval rakudo 35221: OUTPUT«Use of uninitialized value␤␤»
21:16 [particle] err, ah, right
21:16 [particle] rakudo: my $a = <a b c>; my @b = $a.list; say @b[2];
21:16 p6eval rakudo 35222: OUTPUT«c␤»
21:17 [particle] in your example, @b contains one element, which is a three-element array
21:18 [particle] rakudo: my $a = <a b c>; say $a[2]
21:18 p6eval rakudo 35222: OUTPUT«c␤»
21:30 moritz_ http://www.perlmonks.org/?node_id=735027 # couldn't resist to write a Perl 6 reply ;)
21:33 * pdcawley grins.
21:38 mberends joined #perl6
22:05 aindilis joined #perl6
22:06 pugs_svn r24809 | particle++ | [S19] address backward (in)compatibilities
22:18 moritz_ rakudo: try { 'x(ab' ~~ m/'(' ~ ')' 'ab'/ }; say "error msg: $!"
22:18 p6eval rakudo 35224: OUTPUT«error msg: Unable to parse , couldn't find final ')'␤»
22:19 moritz_ TimToady: is that desired behaviour? (ie that the match actually throws an exception to the outside code)?
22:21 Limbic_Region joined #perl6
22:25 TimToady it's not thrown
22:26 TimToady or shouldn't be
22:26 moritz_ TimToady: so how does one access the error message?
22:26 TimToady rakudo: 'x(ab' ~~ m/'(' ~ ')' 'ab'/; say "error msg: $!"
22:26 p6eval rakudo 35224: OUTPUT«Unable to parse , couldn't find final ')'␤current instr.: 'parrot;PGE;Match;FAILGOAL' pc 2927 (compilers/pge/PGE/Regex.pir:456)␤»
22:26 TimToady it's in $!
22:26 moritz_ even if it shouldn't be thrown?
22:26 TimToady rakudo: 'x(ab' ~~ m/'(' ~ ')' 'ab'/; say "error msg: $/"
22:27 p6eval rakudo 35224: OUTPUT«Unable to parse , couldn't find final ')'␤current instr.: 'parrot;PGE;Match;FAILGOAL' pc 2927 (compilers/pge/PGE/Regex.pir:456)␤»
22:27 TimToady looks like it's in $/ too
22:27 moritz_ in this cases rakudo just throws, the say() is never reached
22:28 TimToady should just return an unthrown exception
22:28 moritz_ ok
22:28 moritz_ thanks
22:28 pugs_svn r24810 | jnthn++ | [t/spec] Modify test that re-declared a variable (but isn't testing for the semantics of this) to not do so.
22:29 TimToady there seemed to be some confusion earlier about whether $/ is lexical
22:29 moritz_ I think I got that wrong :/
22:29 TimToady well, it is lexical...
22:29 moritz_ but also contextual
22:29 TimToady and .subst sets $/ in its caller
22:30 TimToady so $0 dwims
22:30 moritz_ and do closures ever close over $/?
22:30 TimToady they have their own $/ that is initially bound to the outer $/
22:31 pugs_svn r24811 | moritz++ | [t/spec] first tests for ~ in regexes
22:31 TimToady if the closure does its own .match or .subst, it rebinds it inside but not outside
22:32 TimToady so everything scope much like in p5, but without any global variables
22:32 TimToady *scopes
22:33 TimToady the other major change is that $/ is always the last result, not the last successful result
22:50 rakudo_svn r35227 | moritz++ | [rakudo] 'make spectest' works again if t/spec is a symbolic link, particle++
22:53 [particle] can you find the last successful result in @/[1]? ;)
22:53 [particle] the idea of @/ scares me
22:54 PerlJam the last successful result would be the first one in @/ that doesn't hold Failure
22:55 [particle] @/.*?true
22:55 lambdabot Unknown command, try @list
22:56 [particle] i'm having fun making up syntax :)
22:56 PerlJam I think you wanted @/.>>true (or something) thought
22:56 PerlJam s/ght/gh/
22:56 [particle] yeah, i'm riffing on perl 5's .*? minimal match regex syntax
22:56 [particle] it's very much like perl 6's .? call this method if it exists syntax
22:57 [particle] so .*? could be call the first method that exists
22:57 PerlJam except that .* is "call all candidate (possibly none)"
22:58 [particle] so .*? is call the first candidate, possibly none
22:59 PerlJam well, the analogy kind of fails for me the greediness of .* should be more like "call the last candidate, possibly none"
22:59 moritz_ grep { $_ }, @/
22:59 wknight8111 joined #perl6
22:59 moritz_ PerlJam: .* in regexes doesn't match the last possible char, but all possible chars
23:01 PerlJam moritz_: yes, I know ... it just doesn't map well in my brain.   .*? (match fewest chars) ->  (call first method)  would make me want to see .* (match most chars) -> (call last method)
23:04 cspencer left #perl6
23:06 mberends left #perl6
23:14 pugs_svn r24812 | moritz++ | [t/spec] add and fix a few smartlinks
23:17 pugs_svn r24813 | pmurias++ | [mildew] use v6; is ignored
23:17 pugs_svn r24813 | pmurias++ | seperated out statement_control.pm
23:26 mberends joined #perl6
23:27 pugs_svn r24814 | pmichaud++ | [t/spec]:  Remove unneeded "returns Void" from hash.t
23:43 aindilis joined #perl6
23:53 LimbicRegion joined #perl6
23:54 pugs_svn r24815 | pmichaud++ | [t/spec]:  #?rakudo skip a test involving non-working Block isa check
23:54 aindilis` joined #perl6
23:56 pugs_svn r24816 | pmichaud++ | [rakudo]:  Change a 'todo' to 'skip' for non-existent Rat type in num.t.

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

Perl 6 | Reference Documentation | Rakudo