Camelia, the Perl 6 bug

IRC log for #perl6, 2009-05-26

Perl 6 | Reference Documentation | Rakudo | Niecza | Specs

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

All times shown according to UTC.

Time Nick Message
00:01 JDlugosz How do I cross-reference in POD?
00:01 JDlugosz E.g. refer to a section in S03?
00:07 Whiteknight joined #perl6
00:11 wayland76 man perlpod and search for "ref"
00:11 wayland76 skip the ones that refer to "careful"
00:11 wayland76 (HTH :) )
00:15 pugs_svn r26938 | jdlugosz++ | [S04] update code under "do-once loop" in line with current specs.
00:15 pugs_svn r26938 | jdlugosz++ | Move a paragraph that was interfering with the antecedent of the following paragraph.
00:18 bacek joined #perl6
00:29 pasteling "wayland76" at 118.208.185.213 pasted "Rakudo build errors" (33 lines, 1.6K) at http://sial.org/pbot/36813
00:29 wayland76 Anyone want to have a look at my build errors?
00:33 sjohnson Q:  is there a Perl 5 / Perl 6 way to do a sort() but generic sort() of a list... but for numbers?
00:36 sjohnson A:  @articles = sort {$a <=> $b} @files;
01:20 hcchien joined #perl6
01:20 LadyLunacy joined #perl6
01:30 clkao_ joined #perl6
01:32 agentzh joined #perl6
01:47 cotto joined #perl6
01:56 mj41 joined #perl6
01:57 baest joined #perl6
01:59 kst joined #perl6
02:00 agentzh joined #perl6
02:01 amoc joined #perl6
02:11 alester joined #perl6
02:23 ElectricHeavyLan left #perl6
02:23 ElectricHeavyLan joined #perl6
02:25 sjohnson joined #perl6
02:29 Lectus joined #perl6
02:31 araujo joined #perl6
02:33 sparc joined #perl6
03:00 kst joined #perl6
03:01 mscha joined #perl6
03:02 mscha rakudo: "Hello, World!".say
03:02 p6eval rakudo 2376c4: OUTPUT«Hello, World!␤»
03:02 mscha rakudo: (1..Inf).say
03:02 p6eval rakudo 2376c4:  ( no output )
03:03 mscha rakudo: (1..Inf).perl.say
03:03 p6eval rakudo 2376c4: OUTPUT«1..Inf␤»
03:04 mscha say (1..Inf)[-1]
03:04 mscha rakudo: say (1..Inf)[-1]
03:04 p6eval rakudo 2376c4:  ( no output )
03:04 wayland76 I think they're on to you :)
03:06 mscha say (1..Inf).pick(5)
03:09 wayland76 say (1..10).pick(5)
03:09 wayland76 rakudo: say (1..10).pick(5)
03:09 p6eval rakudo 2376c4: OUTPUT«105438␤»
03:09 wayland76 rakudo: say (1..Inf).pick(5)
03:09 p6eval rakudo 2376c4:  ( no output )
03:33 orafu joined #perl6
03:37 meppuru joined #perl6
03:47 Lorn joined #perl6
03:50 s1n rakudo: class A { multi method foo($f) { say $f} }; my A $aa .= new; $aa.foo()
03:50 p6eval rakudo 2376c4: OUTPUT«Could not find non-existent sub die␤»
03:50 s1n uh oh
03:50 s1n rakudobug
03:58 s1n jnthn: i'm narrowing down being able to reproduce that bad stacktrace
04:00 wayland76 He went to bed about 6 hours ago
04:00 wayland76 Just before I started getting build errors :)
04:00 s1n wayland76: he'll eventually get the message :)
04:01 wayland76 Yes.  But it doesn't do much for my day of trying to work on a Rakudo RPM (finally getting back to it after some recent changes to Parrot)
04:02 s1n wayland76: i'm sorry my message to jnth concerning our  conversation earlier couldn't help you :/
04:02 pasteling "wayland76" at 118.208.185.213 pasted "More build errors" (7 lines, 559B) at http://sial.org/pbot/36814
04:03 wayland76 s1n: Well, so am I, but I couldn't really say I'm disappointed as I didn't expect it to :)
04:03 wayland76 Anyway, for the log, I solved the first set of build errors by adding parentheses to all the lines mentioned, and I got the error linked above instead :)
04:04 wayland76 (back in 5)
04:04 s1n wayland76: i'm confused, anyways, azawai (sic) reported the same build error when trying to build fakexecutables
04:12 wayland76 What's confusing?
04:13 s1n wayland76: i dunno
04:14 wayland76 Well, if you don't then I don't either :)
04:29 sjohnson Q: in Perl 5, there are many useful "use" includes available without having to install them with CPAN.  std lib's, if you will.  Is there a way to get a list of them?
04:30 nsh_ joined #perl6
04:33 nsh_ joined #perl6
04:36 ssm joined #perl6
04:37 nsh_ joined #perl6
04:40 wayland76 sjohnson: Not that I know of immediately; what distro are you on again?
04:40 wayland76 (usually the distro package manager, combined with a quick grep, can help
04:40 wayland76 )
04:41 kate21de joined #perl6
04:42 wayland76 Unless you're talking about pragmata :)
04:42 sjohnson hmm
04:42 sjohnson just an old ubuntu
04:43 sjohnson like, use Cwd qw(realpath);
04:43 sjohnson that works without having to use CPAN to fetch it
04:43 sjohnson i'm wondering if there's a list of very common things, that should work on any distro with Perl 5 on it
04:43 sjohnson i would imagine use Data::Dumper; too, but i'm not 100% sure
04:45 wayland76 I think dpkg -L | grep '\.pm$'
04:46 wayland76 That should list Cwd.pm somewhere
04:46 wayland76 sorry, dpkg -L perl | grep '\.pm$'
04:47 sjohnson hmm nothing resulted out of the grp
04:47 wayland76 what does "dpkg -L perl | less" give?
04:47 sjohnson a ton of stuff
04:47 sjohnson oh
04:47 sjohnson im an idiot
04:47 wayland76 ?
04:47 wayland76 (join the club :) )
04:48 sjohnson there we go
04:48 sjohnson i see a bunch of pms
04:48 sjohnson though i dont see cwd in there interestingly enough
04:48 wayland76 No?
04:48 sjohnson maybe it's part of a different .pm name
04:48 wayland76 The C should be capitalised
04:49 sjohnson i haev it grepping case insensitive
04:49 sjohnson sjohnson@web1:~/rtk$ dpkg -L perl | grep '\.pm$' | wc -l
04:49 sjohnson 75
04:49 sjohnson sounds like maybe more should be there
04:49 sjohnson sjohnson@web1:~/rtk$ dpkg -L perl | grep -i 'cwd'
04:49 sjohnson sjohnson@web1:~/rtk$
04:49 sjohnson :(
04:49 wayland76 Yeah, I get 312
04:49 wayland76 Mind you, that's perl 5.10 :)
04:49 sjohnson oh i am using 5.8.8
04:49 sjohnson anyways i gotta run
04:50 sjohnson thanks for the help though!
04:50 wayland76 I get 344 on 5.8.5 :)
04:50 wayland76 try locate -i .pm | grep '\.pm$'
04:51 wayland76 It tells you all your installed modules (hopefully), whether core or otherwise
04:56 s1n sjohnson: did you see http://search.cpan.org/~nwclark/perl-5.8.8/ ?
04:58 wayland76 no
04:59 wayland76 You wouldn't want to use that URL -- some of those modules are Unauthorised! :)
04:59 wayland76 (thanks)
05:00 s1n http://perldoc.perl.org/5.8.8/index-modules-A.html
05:00 s1n that seems more accurate then
05:03 wayland76 Hey, I was just kidding :)
05:03 s1n wayland76: well, that should answer his question
05:04 s1n sjohnson: you could also do a "strace perl -e 'use Cwd'" to see where it's located
05:05 s1n sjohnson: err "strace -eopen perl -e 'use Cwd' 2>&1 | grep -i cwd" to filter out some stuff
05:12 ab5tract joined #perl6
05:19 sjohnson i am just curious if there is a published list of modules to expect that come with Perl 5
05:19 s1n sjohnson: i just pasted the link, readback
05:19 sjohnson like, Python for example, has a list on their website of the std libs
05:19 sjohnson oh that is what i want?
05:20 * sjohnson is copying the link...
05:20 s1n i wouldn't waste my time pasting something you weren't looking for
05:20 s1n (intentially)
05:20 sjohnson i thought this is the link tho
05:20 sjohnson oh
05:20 sjohnson i see
05:20 sjohnson no sorry i JUST got on my computer
05:21 sjohnson and was reading back the buffers a bit
05:21 sjohnson i thought wayward was saying thats not what i wanted
05:22 sjohnson hmm i wonder why i cant find Cwd on this list
05:22 s1n it's in the list
05:22 sjohnson :(
05:22 sjohnson i am doing something wrong then i guess
05:22 sjohnson or maybe it's under something
05:22 s1n ugh dude: http://perldoc.perl.org/5.8.8/index-modules-C.html
05:23 s1n last one in the list
05:23 wayland76 Are you searching for "cwd" or "Cwd"?
05:23 sjohnson both
05:23 sjohnson firefox is cave insensitive by default
05:23 sjohnson so its not finding either of them
05:23 s1n sjohnson: just look at the last item on that last link!!
05:23 wayland76 That explains a lot
05:23 sjohnson *checking s1n's link*
05:23 wayland76 cave insensitive...
05:24 sjohnson case
05:24 sjohnson heh
05:24 sjohnson ahh i see it
05:24 wayland76 Actually, I've occasionally had trouble with Seamonkey's "Find" feature
05:24 sjohnson thank you s1n you saved the day
05:24 wayland76 Sometimes it helps if you highlight some text at the start of the page before doing "Find"
05:25 wayland76 If you just want to know about a particular module, run "corelist Cwd"
05:25 wayland76 It tells you the first version of perl that it came with
05:25 wayland76 I couldn't find a way to get it to list all modules, though, so I didn't use it to answer your question
05:25 sjohnson s1n: .. are ya mad?
05:26 s1n sjohnson: just don't make me paste the link and then not click on it and banter about how it's not there
05:26 sjohnson how did you get to the 2nd link tho from the 1st link?
05:26 s1n by clicking on "C"
05:27 sjohnson this link ->  http://search.cpan.org/~nwclark/perl-5.8.8/  i dont see "C"
05:27 s1n sjohnson: as we discussed, that was not the right site
05:27 sjohnson oh i c, i didnt see the A link
05:28 ElectricHeavyLan joined #perl6
05:28 sjohnson i can now see why i looked a bit foolish
05:28 * sjohnson is sowwie
05:28 sjohnson but i really appreciate it anyhow, as this is exactly what my heart was yearning for
05:29 s1n jnthn: are CALLER and OUTER not implemented yet?
05:30 s1n rakudo: say caller.line
05:30 p6eval rakudo 2376c4: OUTPUT«Could not find non-existent sub caller␤»
05:30 wayland76 ( sjohnson: If there were people wanting to talk perl6 here at the moment, I'd say to take this conversation elsewhere (#perl?), but since it's fairly dead trafficwise, I won't complain :) )
05:30 wayland76 rakudo: say CALLER::line()
05:30 p6eval rakudo 2376c4: OUTPUT«Null PMC access in invoke()␤in Main (/tmp/JKAlLWe7bV:1)␤»
05:30 sjohnson wayland76: good idea
05:30 s1n ouch
05:31 wayland76 Not exactly the desired result :)
05:32 s1n i really wanted to use this, have to craft a work-around
05:34 s1n bleh, not even SUPER works?
05:34 s1n rakudo: class A { method foo { say "a::foo" } }; class B is A { method foo { say "b::foo"; say SUPER.perl } }; my B $bb .= new; $bb.foo;
05:34 p6eval rakudo 2376c4: OUTPUT«b::foo␤Could not find non-existent sub SUPER␤»
05:35 s1n and with that, i'm off to bed
05:35 sjohnson ty for the link
05:36 s1n echo "np" && sleep 28800 &
05:37 sjohnson i cant believe how many of these things i rewrote that are on here
05:44 agentzh joined #perl6
05:44 wayland76 sjohnson: I know the feeling :)
05:45 wayland76 Although I don't get it often any more
05:49 jisom joined #perl6
05:49 sjohnson here i was whining about no shuffle by default in perl 5
05:49 sjohnson and it was right under my nose the entire time, without even needing CPAN
05:50 sjohnson oh well
05:50 sjohnson not a huge deal, i've only been programming Perl for about a year anyway
05:50 sjohnson not the end of the world
05:59 wayland76 sjohnson: If you spend much time doing perl5 stuff, I recommend finding a community.  I started out in the newsgroup "comp.lang.perl.misc", and now instead am on my local Perl Mongers mailing list.
05:59 wayland76 Seeing as how that's 1.5 hours drive away, though, I never go to the meetings :)
05:59 eMaX joined #perl6
06:00 sjohnson well today i wrote from scratch a piece of flashcard software for my own use
06:01 sjohnson it's pretty basic, but it will do the job perfectly for what i need it for
06:01 sjohnson to help me with my Japanese
06:01 sjohnson in that light, i'd say I use Perl 5 probably 2 hours a day
06:01 sjohnson Monday - Friday on avg
06:01 sjohnson as i use it at work, too
06:01 sjohnson but i have done a lot of my own personal things with it
06:02 wayland76 Sounds to me like you need to be part of a user group.  You probably spend more time on it than I do :)
06:02 wayland76 s/user group/community/
06:03 wayland76 Whereabouts are you located?
06:03 sjohnson i dont consider myself a super expert as i've seen you guys do a lot of fancy stuff with it, but i have never once been "stuck" at how to make it work the way i want it to
06:03 sjohnson BC, Canada
06:03 * sjohnson is 27 yrs old
06:04 wayland76 Well, no.  I haven't been either for a long time.  The only time things get difficult is when I try writing my own compilers for things without using something like Parse::RecDescent
06:05 sjohnson i heard ruoso talk about that
06:05 sjohnson i looked at its CPAN page, but failed to find out what it is used for
06:05 wayland76 Writing a Lexer/Parser
06:06 sjohnson well
06:06 sjohnson i've parsed .conf files myself
06:06 sjohnson just writing it out by hand
06:06 sjohnson but i have been seeking a better way
06:06 wayland76 Basically, it goes through a text (eg. Perl code, or a conf file, or whatever), and turns it into a tree of perl stuff
06:06 sjohnson by "hand" i mean using Perl and writing a function from scratch
06:06 wayland76 Well, Parse::RecDescent is better
06:07 sjohnson could that parse this config file:
06:07 sjohnson # hello and welcome to my config file
06:07 sjohnson irc.happiness = 1
06:07 sjohnson irc.name = "good guy" # simple name
06:07 sjohnson easily?
06:07 wayland76 If you look at "proper" compiler design, it doesn't do the semantic analysis, code generation, symbol table stuff, and that sort of thing, just lexer and parser
06:08 wayland76 That's almost too easy -- if you're looking at a lot more lines, then it's the right tool :)
06:09 wayland76 (I'm assuming more lines introduces more complexity somewhere)
06:10 wayland76 sjohnson: http://mail.pm.org/mailman/listinfo
06:10 wayland76 Somewhere on that list, you should find something that suits
06:10 fridim_ joined #perl6
06:11 wayland76 Btw, in Perl 6, the Parse::RecDescent stuff is built in
06:11 wayland76 Perl 5 Parse::RecDescent = Perl 6 Grammars
06:11 sjohnson what kind of stuff do you use perl for?
06:11 iblechbot joined #perl6
06:13 wayland76 Well, what I want to use Perl 6 for is a generic tree manipulation module
06:13 wayland76 So that any data can be read in as a tree, transformed into another tree, and written out in a different tree-based format
06:13 wayland76 filesystem => tree => database
06:14 wayland76 ldap => tree => XML
06:14 wayland76 Or whatever
06:14 wayland76 But my last project was trying to turn a list of unicode maths characters stolen from a webpage into a list of keystrokes :)
06:14 wayland76 (that was in the last week)
06:15 wayland76 Most of the stuff I want to do is waiting for Perl 6 to be finished
06:15 wayland76 I also use it in the bit of sysadmin contracting that I do
06:16 sjohnson wow
06:16 sjohnson thats a lot more intense than me
06:16 wayland76 being called for afternoon tea.  afk &
06:16 sjohnson ok
06:17 wayland76 Well, admittedly the tree project is a dream that's probably only partially realisable
06:17 wayland76 &
06:17 ElectricHeavyLan left #perl6
06:17 sjohnson what does "&" mean?
06:17 sjohnson the unix command to put something in the background used in irc context?
06:17 sjohnson as "away"?
06:20 finanalyst joined #perl6
06:31 agentzh joined #perl6
06:42 wayland76 I think so
06:52 sjohnson well wayland76 want to see my program?
06:53 sjohnson it's a flashcard engine that reads a .txt |'d delimited data that i wrote another program to put in for me, but i can show you the program i did today in an hour or so
06:53 sjohnson its a lot less complex than the stuff you probably do :|
06:58 wayland76 Well, don't paste it into the channel, but I can have a quick skim over it if you like :)
06:58 wayland76 How long is it?
06:58 hanekomu joined #perl6
06:59 sjohnson 150 lines
07:00 sjohnson ill put it online
07:00 sjohnson just skip thru it for a couple seconds
07:00 sjohnson to see how basic <=> complex my stuff gets if you like
07:01 sjohnson http://www.bookmanager.com/​~sjohnson/flash-rtk2.pl.txt
07:02 sjohnson probably not the best way to do it by any means, but it works
07:02 sjohnson i got lazy and just used "global" vars for the hashes
07:04 wayland76 Dou you want to know what I would've done different?
07:04 wayland76 (not counting things like indentation? :) )
07:04 sjohnson sure go ahead
07:05 sjohnson i'm always open to better ways of doing something
07:05 wayland76 Well, I don't know about better... :)
07:05 wayland76 I would've done "use warnings" at the top of the program as well
07:06 wayland76 I probably would've used a combination of a heredoc and a printf for the output of the menu
07:07 sjohnson i wonder if i would get any warnings from this code
07:07 ElectricHeavyLan joined #perl6
07:07 wayland76 Depending on the size of the data, I would've made a function to deal with all the open/read/close stuff
07:07 wayland76 And I would've done the if/elsif stuff completely differently
07:08 wayland76 Have I clearly communicated those things?
07:08 wayland76 (for the switch statements, I would've done:
07:08 wayland76 SWITCH: {
07:08 sjohnson yeah you have
07:09 wayland76 $answer == 1 and do { quiz_array(\@array_all); last SWITCH; }
07:09 wayland76 etc
07:09 wayland76 Like I said, not necessarily better, just different
07:09 sjohnson just poking thru the Core Modules docs
07:09 sjohnson i would have done use Switch;
07:09 sjohnson and made a real switch statement like in C
07:10 sjohnson i dont like doing if/else statements like that at all
07:10 sjohnson though it was easy to write in VIM, just yanked and pppppp'd the lines etc
07:11 agentzh joined #perl6
07:12 sjohnson "heredoc" tho
07:12 sjohnson i'm curious to hear what that can do for me
07:12 wayland76 Ah, I thought they might be new to you :)
07:14 DemoFreak joined #perl6
07:14 sjohnson oh
07:14 sjohnson you mean just going
07:14 sjohnson <<
07:14 sjohnson line 1
07:15 sjohnson line 2
07:15 sjohnson << EOF
07:15 sjohnson or whatever
07:15 sjohnson i didn't realize "heredoc" was its name
07:15 sjohnson i do that in 'cat' a lot
07:15 sjohnson cat << EOF
07:15 sjohnson etc
07:15 sjohnson not a bad idea
07:15 sjohnson *thumbs up*
07:16 pasteling "wayland76" at 118.208.185.213 pasted "heredoc example" (12 lines, 288B) at http://sial.org/pbot/36817
07:16 wayland76 Yeah, that's the one
07:19 sjohnson that is indeed much nicer
07:19 sjohnson many thanks for showing me that trick
07:19 wayland76 Actually, you probably do it in bash, instead of cat
07:19 wayland76 It's the shell that understands it, not cat
07:20 sjohnson i will admit, i didnt know that you can do that with printf's
07:20 sjohnson and it looks much tidier
07:21 wayland76 you can do it anywhere you'd use a string
07:27 sjohnson you should start your own website
07:27 sjohnson perltricks.com :)
07:29 wayland76 ha
07:30 wayland76 I'd soon be revealed as an imposter :)
07:30 Matt-W I think everybody knows a trick or two
07:30 wayland76 That's what I'm trying to say :)
07:31 Matt-W I think I wouldn't have done
07:31 Matt-W my @quiz_in = @{shift(@_)};
07:31 wayland76 Ooh, I missed that
07:32 Matt-W I'd have just said
07:32 Matt-W my @quiz = shuffle @{shift};
07:32 Matt-W or something
07:32 Matt-W I get itchy when I do unnecessary copies
07:33 wayland76 Matt-W: I use Knuth's optimisation rules :)
07:33 Matt-W Maybe perl's smart enough not to do the copy though
07:33 Matt-W Of course really I'd have wanted to write it in Perl 6 :)
07:34 wayland76 Matt-W: Tell me about it.  I can't program any more, because I always want to do it in P6 :)
07:34 Matt-W Unfortunately at work I have to use a nasty variant of C++
07:34 sjohnson Matt-W: i get itchy too, i just didnt know the way to do it.  many thanks
07:34 Matt-W sjohnson: some might argue that naming the parameter is better for readability, but in that case I'd just save a copy of the reference
07:35 Matt-W Although since it's only taking one parameter, why not just pass in the list anyway?
07:35 sjohnson yeah i should have done that
07:35 Matt-W And yeah, I'd have wanted the formatting routine for saving to be separate to the code that actually writes it to the file
07:36 wayland76 sjohnson: you could always have done shuffle $_[0]
07:36 wayland76 :)
07:36 Matt-W does shuffle take an arrayref?
07:37 Matt-W even if it doesn't, shuffle @{$_[0]} is a lot nicer than calling shift like that
07:37 Matt-W well, IMO
07:37 sjohnson Matt-W: i  liked your other way the best
07:37 sjohnson because then i dont have to \@pass it
07:37 Matt-W :)
07:37 * sjohnson pats Matt-W on the back
07:37 sjohnson thanks for the tips
07:37 Matt-W then you can just shuffle @_
07:37 sjohnson i basically bought the camel book and just learned on my own
07:37 sjohnson so i'm no super guru
07:37 Matt-W of course it's a right pain if you decide you want to add another param later
07:38 Matt-W hahahaha
07:38 Matt-W I'm no super guru either
07:38 sjohnson well, you do have some good tricks up your sleeve
07:38 Matt-W Just, I am by the standards of my office, but I have trouble not offering advice that only works in Perl 6 these days
07:38 sjohnson as i said earlier, i'm "itchy" in the same way, where i don't like to declare more vars than i need, even if it doesn't matter for a 686 CPU
07:38 sjohnson i'm anal about things like that usually
07:39 Matt-W Vars are fairly cheap, it's what you put in them that matters
07:39 sjohnson yeah
07:40 sjohnson this flashcard thing will only contain 2200 cards
07:40 sjohnson for a modern computer that is fuck all i believe, but i do agree that it is wasted
07:40 sjohnson if i start making useless copies
07:40 sjohnson Matt-W: any other good tips?
07:41 * sjohnson hugs his Camel book
07:42 wayland76 Btw, I don't really use Knuth's rules for optimisation
07:42 hanekomu_ joined #perl6
07:42 wayland76 The thing is, for some reason, you guys are optimising for speed
07:42 wayland76 I tend to optimise for shortest program length (with reasonable variables), or something
07:43 Matt-W I wasn't really thinking about speed all that much
07:43 Matt-W I just don't copy things
07:43 * sjohnson agrees with Matt-W
07:43 wayland76 Hey, he's using "redo"
07:43 Matt-W I suppose that does originally come from optimising for speed though
07:43 sjohnson i dont like to write redundant code
07:43 wayland76 I don't know that I've ever seen it in live code before :)
07:44 wayland76 sjohnson: That's exactly what I'm aiming for
07:44 sjohnson redo is not just a mythical Perl statement. it actually works !
07:44 sjohnson │ diakopter
07:44 sjohnson 00:07:44  sjohnson | i'm anal about things like that usually
07:44 sjohnson oops
07:44 sjohnson stupid buffer
07:44 Matt-W I don't think I've ever used redo
07:44 sjohnson i meant to paste this
07:44 sjohnson my $db_card_count = `cat rtk2-on.txt | decomment | trim -r | wc -l`; chomp($db_card_count);
07:44 sjohnson a lot of those unix commands are perl programs i wrote
07:45 Matt-W Oh dear
07:45 sjohnson decomment removes # and // comments from STDIN to STDOUT, and trim -r removes blank lines the same way
07:45 Matt-W Then why aren't they modules you can include and do inprocess?
07:45 * Matt-W doesn't like launching external processes either
07:45 sjohnson hmm, i never thought about it like that tbh
07:45 Matt-W You're already in Perl
07:45 sjohnson i suppose i am worried it'd be a lot of work?
07:46 sjohnson or maybe a piece of cake to do that
07:46 * sjohnson doesn't have the answers
07:46 Matt-W Writing modules isn't particularly difficult
07:46 Matt-W Good exercise
07:46 Matt-W Naturally your command-line invocations would then just be calls into the module
07:46 sjohnson is that like use Sjohnson::Easytools qw(trim decomment);?
07:46 sjohnson or are you thinking of something else
07:47 Matt-W Possibly
07:47 wayland76 Actually, I've developed a theory over the last year or two that programs should only ever parse command line options, and call one library function
07:47 Matt-W I'd probably call the module something else
07:47 wayland76 Everything else should be a library function
07:47 Matt-W wayland76: I think in quite a few cases that's correct
07:47 Matt-W There is certainly a lot of potential benefit in splitting your code into modules
07:47 wayland76 I have a module called "Misc" that I use all over the place
07:48 Matt-W I don't actually have any of my own standard modules
07:48 wayland76 Basically turns utf-8 on, and has a function called "getfiles" that sucks in files and returns arrays
07:48 Matt-W Although there's one function I wrote for a script at work that I'm finding myself really liking a lot
07:48 wayland76 does?
07:48 Matt-W you give it a directory and a closure, and it changes the CWD to that directory, runs the closure, then changes back
07:49 sjohnson Matt-W: does Perl make you happy too writing things that just "work"?
07:49 Matt-W I was working on a test script at work that does a lot of 'go to this directory, run these things'
07:49 Matt-W so it makes that a lot easier to keep track of
07:49 Matt-W sjohnson: yes, I just wish I got to do more of it
07:50 Matt-W Despite the test team running a lot of stuff on the back of Perl drivers, they don't take it seriously
07:50 Matt-W I've been trying to change that, but it's uphill work
07:50 sjohnson that is a sad state of affairs
07:50 Matt-W Especially since there's a significant management pressure to use Java
07:50 sjohnson i wish Perl could replace PHP for websites
07:50 sjohnson as i hate PHP
07:50 Matt-W As if they're even remotely equivalent
07:50 Matt-W Hahah, it was the other way round :)
07:50 sjohnson using preg_replace and preg_match drives me nuts
07:50 Matt-W It always used to be Perl for CGI
07:51 Matt-W then PHP came along
07:51 Matt-W young and loud and brash
07:51 Matt-W Accessible but shallow
07:51 sjohnson .. with no builtin regex support
07:51 sjohnson nor lazy for (1 .. 10) loops
07:51 wayland76 If you want to get preg(nant), use PHP ;)
07:51 * sjohnson SIGHS
07:52 Matt-W lots of jobs in PHP
07:52 wayland76 It's basically because HTML::Mason was too hard to set up
07:52 wayland76 It's better, but still not easy :)
07:52 Matt-W yeah PHP provided easy
07:52 sjohnson Matt-W: that is my job, php and perl (thank god)
07:52 Matt-W sjohnson: mine's C++ and Java (blegh), with a bit of Perl on the side
07:52 sjohnson perl is my favourite out of the bunch
07:52 Matt-W The C++ is okay, it'd be better if our old code wasn't so hideous
07:53 sjohnson let alone Perl 6...  *ejaculates*
07:53 Matt-W And even better if we'd just bite the bullet and compile everything with gcc
07:53 sjohnson Matt-W: do you ever do quick "jobs" in perl
07:53 sjohnson when it's one-off stuff?
07:53 Matt-W No
07:53 Matt-W Well
07:53 sjohnson like, a quick batch file / text file
07:53 Matt-W The occasional perl -e thing
07:53 sjohnson that needs parsing for your own needs
07:53 Matt-W Most of what I do at work doesn't lend itself to that very well
07:54 sjohnson instead of other idiots around the office who do the same thing in C++ / C and it takes then 12x as long
07:54 Matt-W And at home I do it in Perl 6 or Haskell
07:54 Matt-W sjohnson: try working somewhere where the management position is that Java is a scripting language
07:54 sjohnson wow
07:55 sjohnson that sounds like hell
07:55 Matt-W Or at least, they think they can use it instead of the Perl glue that keeps the tests going
07:55 wayland76 Matt-W: I think I prefer our option
07:55 Matt-W But it's caused horrible horrible problems
07:55 Matt-W The entire runtime is just not made for that sort of thing. It can do it, but it's not nice.
07:55 sjohnson no
07:55 sjohnson as larry wall said, he wrote Perl to do his sysadmin tasks easier
07:55 sjohnson and he was no fool to do so
07:55 sjohnson as that is 90% of what i use it for
07:55 Matt-W So they send the testers on Java courses
07:56 Matt-W And let the Perl rot
07:56 Matt-W Fortunately they let me give some Perl training courses
07:56 Matt-W Which came out very well on my annual performance review :D
07:56 Matt-W Lots of things like
07:56 Matt-W 'Oh, I didn't realise Perl was a proper language'
07:56 Matt-W 'Hang on a sec... Perl supports OOP?'
07:56 mberends_mibbit joined #perl6
07:57 sjohnson hahaha
07:57 Matt-W 'You mean we don't have to write Module::Submodule::function all the time?'
07:57 sjohnson 'Now wait just a darn minute!  Perl runs on modern Linux machines?'
07:57 Matt-W Nah none of that
07:57 Matt-W Not a Linux-using business
07:57 Matt-W Although we might be soon
07:57 sjohnson what OS do you guys use?
07:57 sjohnson Win Server 2003 or soemthing?
07:58 Matt-W Trying to get a project through to port one of our servers to Linux
07:58 Matt-W Solaris
07:58 agentzh joined #perl6
07:58 Matt-W primarily anyway
07:58 Matt-W but all our stuff also runs on windows
07:58 Matt-W and we have windows client-side software
07:58 Matt-W some of which is in vb6, but I never have to touch that thank my job description
07:59 sjohnson they need to quit making people program in those sissy languages
07:59 Matt-W that's just legacy code
07:59 tulcod joined #perl6
07:59 Matt-W bit hard to port a vb6 system forward to... well, anything at all
07:59 sjohnson i suppose i mean overall
07:59 sjohnson from the get go
07:59 mberends_mibbit ho ho, this morning I am tasked with teaching a product that M$ have just discontinued - PerformancePoint 2007 :/
07:59 sjohnson ie, they should have never done it in the first place IMO
07:59 Matt-W well yes
07:59 sjohnson thats just me ranting tho
07:59 Matt-W but we can't go back and change that
08:00 * sjohnson understands
08:00 Matt-W and it's unlikely we can persuade management that it's cost-effective to rewrite to a more modern language
08:00 sjohnson where i worko
08:00 sjohnson work*
08:00 Matt-W especially when they're busily making people redundant to try and keep the profit margin intact
08:00 sjohnson our boss programmed his software which is still in use in Clipper
08:00 sjohnson and it's gonna be a real bitch to reprogram 20 years of work
08:01 wayland76 They say the banks still used COBOL because the code worked
08:01 sjohnson thankfully, he is not a calloused old man, and is open to ideas and better ways of doing things
08:01 wayland76 I remember transforming a ksh wrapper to a COBOL program into Perl
08:01 ejs joined #perl6
08:01 wayland76 Being called for food again.
08:01 Matt-W wayland76: they're entirely correct
08:01 Matt-W rewriting core business logic is a hairy proposition
08:01 wayland76 afk &
08:01 Matt-W especially if the original code has no formal and complete test suite
08:02 Matt-W If you've got one of those, and it's runnable against code in the new language too (hah! you wish), it's not so bad
08:02 wayland76 (incidentally, kid51 put some wrappers around some install code for testing that were pretty cool -- that's in Parrot)
08:02 Matt-W which is why you really want to move to a platform which can run the code in the old language as well, and mix them together as you migrate
08:02 wayland76 afk really &
08:02 Matt-W But of course, chances are you have no test suite
08:03 Matt-W Which is one of the problems we have, a big C++ server that needs some serious refactor, and no test suite to see if we've broken it
08:04 sjohnson Matt-W: does C++ annoy you too?
08:04 sjohnson i dont have much experience in those lower-level languages
08:04 sjohnson but curious to hear your opinions and thoughts, as brutally honest as possible if you can
08:06 * sjohnson is eager to hear the answers ;)
08:15 cotto joined #perl6
08:16 cotto joined #perl6
08:16 cotto joined #perl6
08:17 cotto joined #perl6
08:17 Matt-W sjohnson: yes it does frequently annoy me
08:18 Matt-W sjohnson: A lot of it at the moment is down to having to use compilers which don't support various things, and also knowing that I could make good use of some of the things coming in the next standard, but which haven't been included in any compilers we've got yet
08:19 Matt-W sjohnson: There was a project recently where I was banging into limitations in the template system every hour or so, and it was incredibly frustrating.
08:19 Matt-W sjohnson: C++ is capable of some astonishingly elegant and clever solutions, and you can write fantastic code with it, but it's also frequently irritating and bizarre
08:20 Matt-W One of my colleagues has been ranting about it not supporting true pure interfaces
08:20 Matt-W He didn't appreciate it when I told him to stop trying to programme in Java
08:20 sjohnson well, CodeGear (borland) is the only compiler i know that will do some C++0x stuff
08:20 Matt-W yeah
08:20 sjohnson C++ builder
08:20 Matt-W conceptgcc has some of it
08:21 sjohnson Matt-W: when you mean he does "java"
08:21 Matt-W but we use visual C++ 2005 and Sun Studio 12
08:21 sjohnson do you mean for tasks that could be done 100x easier in Perl?
08:21 Matt-W no
08:21 Matt-W I mean he's writing C++ like it's Java
08:21 moritz_ I think IBM's C++ compiler does some parts of C++0x too
08:21 Matt-W Not all the time, he's not much of a fan of Java, but his view of OOP is very Java-ish
08:21 sjohnson Matt-W: in short, what is the result from him doing that?
08:21 sjohnson frustrating code to deal with alter?
08:21 Matt-W The result is that he gets very irritated
08:21 sjohnson later*
08:23 sjohnson oh
08:24 Matt-W He's not as bad as some of the previous people though
08:24 sjohnson so you mean he is expecting C++ to work the way Java works
08:24 sjohnson and whines about it
08:24 Matt-W Some of our original code tries to do the Java thread model
08:24 Matt-W We end up with thread objects which have a terrible, terrible line at the end of their run methods
08:24 Matt-W 'delete this'
08:25 Matt-W The original C++ code was written by Java programmers
08:25 Matt-W Fortunately we now have real C++ programmers
08:25 Matt-W (and real Java programmers to do the Java)
08:26 sjohnson we use Perl a hell of a lot for what we do
08:26 sjohnson because we're in the book business
08:26 Matt-W I think my wishlist for the C++ would be to switch to g++, and get carte blanche to use Boost libraries
08:26 sjohnson but i am hoping more people would use Perl for stuff just as much as Java and C++
08:26 dakkar joined #perl6
08:26 sjohnson i take it boost makes your life easier
08:26 Matt-W A lot of ours would be inappropriate in Perl
08:26 sjohnson much like many of these modules for perl
08:27 Matt-W we need to run a bit more bare metal
08:27 Matt-W Yes, boost makes life a lot easier
08:27 Matt-W Fortunately we do have permission for things like boost::shared_ptr
08:27 Matt-W since we don't have a compiler which gives it to us in std::tr1
08:27 sjohnson do you work in a strict management thing?
08:27 sjohnson we work in a small office, and our boss is a programmer
08:27 Matt-W Giant international corporation
08:28 Matt-W With all that implies
08:28 sjohnson and lets us do whatever the fuck we want if it will work and work well
08:28 sjohnson ya that sounds terrible
08:28 Matt-W People get promoted into management because they don't like programming
08:28 sjohnson no offense of course
08:28 Matt-W No you're right
08:28 Matt-W It is terrible
08:28 sjohnson a bunch of white collar workers who don't know what a PCI slot is
08:28 sjohnson running the show?
08:28 Matt-W The redeeming features are largely on the side: there's an office band, and a table tennis table, and the commute is really easy, and I'm learning a hell of a lot about how not to write multithreaded programs in C++
08:29 moritz_ do you also learn how to do it? ;-)
08:29 Matt-W moritz_: Only by negative example
08:29 moritz_ (table tennis)++
08:29 Matt-W I'm increasingly of the opinion that allowing threads to share memory by default is a really, really bad idea
08:30 Maghnus_ joined #perl6
08:30 sjohnson do people bother you at work?
08:31 moritz_ well, Perl 5 had a share-nothing model that didn't work too well either
08:31 sjohnson by that i mean, annoy you to death, even if it's management
08:31 Matt-W I like getting threads to communicate by sticking function objects on threadsafe queues, but that's a bit awkward in C++
08:31 Matt-W moritz_: yeah sometimes you have to share memory, and it's full of pain, but having to explicitly state what's shared is nice
08:31 Matt-W moritz_: because at least then it's obvious what they can collide on
08:31 Matt-W sjohnson: yes sometimes
08:32 Matt-W sjohnson: my team's lead technologist is one of those people who's always done something better than you have
08:32 ElectricHeavyLan left #perl6
08:32 sjohnson you mean Mr. Bigshot?
08:32 Matt-W yup
08:32 Matt-W He also thinks he's a real hotshot coder
08:32 Matt-W But he's impressed by buzzwords and marketing
08:33 sjohnson i found the best coders to be the most humble, and willing to help others
08:33 Matt-W yes
08:33 sjohnson although my brother is a damn good C coder, but he's mean
08:33 sjohnson and cranky, i suppose there's that too
08:33 Matt-W most of the greats are the ones that teach
08:33 sjohnson but he's the exception
08:33 Matt-W there are plenty of geniuses who can write amazing code... but nobody else can understand it
08:34 Matt-W what you want is a genius who can write amazing code that other people can understand and learn from
08:34 dalek rakudo: 870bf3b | moritz++ | t/spectest.data:
08:34 dalek rakudo: fix typo in t/spectest.data, moritz--
08:34 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/8​70bf3b65392684f12ea8b42bd3cb0fd99d8e773
08:35 sjohnson and explains it with simple analogies
08:35 sjohnson that really helps a ton
08:36 Matt-W yeah it can
08:36 Matt-W I like teaching, I must admit
08:36 sjohnson same
08:36 Matt-W It's why I started my PhD
08:36 Matt-W Although unfortunately I didn't finish my PhD
08:36 sjohnson you know
08:36 Matt-W So a university teaching career may be a bit out of reach now
08:36 sjohnson i wrote that perl program to help me with my japanese flashcards.  i want to teach in japan
08:36 sjohnson i think i could do a real benefit to others teaching complicated things easily
08:36 sjohnson by never yelling at them
08:37 sjohnson and explaining it so that even a monkey could understand
08:37 sjohnson i'm 27 tho
08:37 sjohnson so i gotta hurry up
08:37 Matt-W Hah
08:37 Matt-W So am I
08:37 sjohnson same age?
08:37 Matt-W What's the hurry?
08:37 Matt-W Surely you're not feeling old already
08:37 sjohnson i am just just worried i'll be an old fuck in japan
08:37 sjohnson i guess for some reason, i feel "old"
08:37 Matt-W Japanese people get old too
08:37 sjohnson even though i still get ID'd
08:38 Matt-W Friend of mine's over there at the moment
08:38 Matt-W Working as a translator
08:38 Matt-W And spending all his spare time training in iaido, kendo and judo
08:39 cotto joined #perl6
08:39 sjohnson is he having fun? also, how old is he?
08:39 Matt-W he's... twenty-three, I think
08:39 DanielC joined #perl6
08:39 Matt-W And yes, he's having a lot of fun
08:40 Matt-W Judo is a recent addition, he comes on IM really enthusiastic
08:40 Matt-W 'I learned how to break someone's arm today!'
08:40 sjohnson heh
08:40 sjohnson how did he learn to translate / speak japanese?
08:40 Matt-W 'In how many ways?' I asked, unimpressed (I do aikido, so that's old hat)
08:41 Matt-W He learned Japanese at school
08:41 Matt-W Just took to it naturally
08:41 Matt-W Did it as a higher for his International Baccalaureate, then got a BA in it with a year in Japan in the middle
08:41 sjohnson i see
08:41 sjohnson what would you want to teach though
08:41 Matt-W Went straight backined #perl6
08:42 Matt-W woops
08:42 Matt-W oh, computer science
08:42 Matt-W in english
08:42 Matt-W my language skills are quite poor
08:42 Matt-W I only speak some German, rather slowly
08:43 Matt-W although moritz_++ put me on to some good German music which has got me exercising the listening skills again
08:44 DanielC Deutsch! Deutsch! Deutsch!
08:44 * DanielC couldn't resist
08:44 Matt-W Good morning :)
08:44 DanielC moin
08:44 * DanielC is trying to learn German
08:44 amoc joined #perl6
08:44 * Matt-W is trying not to forget it
08:45 Matt-W Last time I was there I was reassured that at least the basics seem to have stuck properly
08:45 Matt-W I didn't have to drop into English in restaurants or shops or anything like that
08:45 Matt-W railway stuff makes more sense in German, actually
08:46 sjohnson rammstein music>?
08:46 Matt-W but that might just be because someone there cares that the trains run in a vaguely sane fashion
08:46 DanielC When did you learn German?
08:47 Matt-W At school from 11-18
08:47 cotto joined #perl6
08:47 sjohnson Matt-W: is english your 1st language?
08:47 Matt-W yes
08:47 sjohnson are you in the US / Canada?
08:47 * sjohnson is in canada
08:47 Matt-W no, England
08:47 sjohnson you must have a nice accent then :)
08:47 Matt-W I've got a strange one
08:47 Matt-W I grew up in Cambridge, but I've lived in Nottingham for some time now
08:48 sjohnson i take it none of my English was hard to read, hopefully
08:48 Matt-W So I've got a hybrid accent
08:48 sjohnson i'm always curious about English / Canadian English relationships
08:48 sjohnson for the most part they seem to be the same language
08:48 Matt-W Mum says she finds it a bit strange sometimes when my accent goes Nottingham
08:48 Matt-W Although I haven't adopted the dialect and started calling everyone 'duck' yet
08:48 wayland76 Owzitgoin.  Crikey, we're from all over!
08:48 sjohnson haha wayland76 you from Australia?
08:48 Matt-W sjohnson: I feel Canadian English is perhaps closer to English than American English is
08:49 wayland76 Too right, mate! :)
08:49 DanielC It is.
08:49 sjohnson DanielC: and you?
08:49 DanielC Canadian English is in many ways intermediate between US and Englan.
08:49 wayland76 Canadians, for example, are proud of their "eh", but we do that in Australia too
08:49 sjohnson i notice myself saying it a lot
08:49 DanielC sjohnson: Oh... My first language is Spanish (born in Venezuela). I migrated to Canada, learned English. Today I live in Germany, I'm learning German.
08:49 wayland76 And I'd imagine that it's prevalent in certain suburbs of London
08:50 Matt-W London is...
08:50 Matt-W Well
08:50 sjohnson it just makes speech easier for us
08:50 Matt-W Every kind of variant of English imaginable is there
08:50 sjohnson "You like that, eh?"
08:50 moritz_ DanielC: where in Germany?
08:50 sjohnson instead of "You like that, don't'ch you?"
08:50 wayland76 I don't so much, but my usual accent is somewhere between High Australian and General Australian
08:50 DanielC moritz_: Zweibrücken. Very near Saarland.
08:50 wayland76 Although I drop into Broad ("Ocker") Australian sometimes
08:50 Matt-W wayland76: friend of mine emigrated to new zealand about 10 years ago, then went to university in australia. His accent is now *really* weird
08:51 Matt-W wayland76: when I saw him in London last year, his accent kept changing every sentence
08:51 iblechbot joined #perl6
08:51 DanielC moritz_: Are you in Germany?
08:51 wayland76 It reminds me of the story about a New Zealander who goes into a shop, and says "Can I have some Fush and Chups"...
08:51 wayland76 ...and the man says "You're from New Zealand, aren't you".
08:52 wayland76 So the man runs out of the store in shame...
08:52 moritz_ DanielC: yes, in Erlangen (near Nürnberg)
08:52 Matt-W new zealand/australia seems to me to be a little bit like canadian/american - the accents sound superficially similar to the British ear, but are actually quite different if you know what to listen for
08:52 wayland76 ...comes back the next week, and says "Can I have some Fish and Chips?", and the man behind the counter again asks if he's from New Zealand"...
08:52 sjohnson are you guys using irssi?
08:52 Matt-W and also, you shouldn't tell a canadian he's american if you value your nose
08:52 wayland76 ...and the New Zealander says "How can you tell?  I fixed my accent"....
08:52 Matt-W does that hold for new zealanders?
08:52 sjohnson we're too nice
08:53 sjohnson we probably wouldn't even mind
08:53 moritz_ sjohnson: yes, irssi
08:53 Matt-W sjohnson: my former flatmate did :)
08:53 wayland76 and the man behind the counter says, "Yes, but this is a hardware store"
08:53 sjohnson Matt-W: point taken
08:53 Matt-W wayland76: oh dear!
08:53 Matt-W does this story end in tragedy?
08:53 wayland76 Sorry :)
08:53 DanielC wayland76: He he he he.
08:54 DanielC wayland76: I'll forward that to my Aussie friends.
08:54 Matt-W sjohnson: admittedly he was far too nice to punch me in the face, and I learned how to spot his accent
08:54 wayland76 ...and now you know how to tell a New Zealander when you hear one
08:54 Matt-W Iv'e never made it there to visit him
08:54 Matt-W Always have something else to spend the money on
08:55 wayland76 They don't actually say "Fush and Chups costs Sux Dollars", but it sounds like it to the untrained ear
08:55 Matt-W yeah I can see that
08:56 sjohnson Q for you guys: is this not better than irrsi?  http://members.shaw.ca/smujohnson​/img/screenshots/chatexample.png
08:56 * sjohnson will remove the pic if anyone doesnt want it up there
08:57 wayland76 The "i" sound has moved back towards the "u", but it's only about half way there.  I believe the Welsh use the same sound (or did, I forget), but I've only read a description, not heard them
08:57 wayland76 Well, considering there's an IRC log... :)
08:57 sjohnson haha i suppose not
08:57 sjohnson i used to use irssi
08:58 sjohnson but i have found that weechat is much better imo, especially the -devel version
08:58 wayland76 I use Konversation
08:58 hanekomu joined #perl6
08:58 wayland76 X-Windows-based
08:58 sjohnson oh that's right
08:58 sjohnson i'm logged into a shell
08:58 sjohnson so i like the console ones
08:58 sjohnson although i could probably get Konversation to work somehow thru a proxy
08:58 Matt-W sjohnson: what's that doing that irssi can't?
08:58 wayland76 I only do Perl6 on this machine, and I only use IRC for Perl6
08:59 sjohnson Matt-W: can you get it to do attach colors for nicknames in a chat?
08:59 sjohnson makes it easier to read
08:59 Matt-W yes
08:59 wayland76 (well, ok, and I've been using it for xorg and gtk and...)
08:59 sjohnson really
08:59 Matt-W yes
08:59 Matt-W there's a plugin
08:59 sjohnson oh
08:59 Matt-W I don't use it, but a lot of friends do
08:59 sjohnson i c
08:59 sjohnson ok here's one thing you can't do
08:59 sjohnson this is your's truly's idea
08:59 Matt-W the only plugin I use is the one that makes it talk to twitter
08:59 sjohnson which the programmer thought was a great idea
09:00 sjohnson ok here it is
09:00 sjohnson let's say you have 9 or so windows open
09:00 sjohnson you use ALT-# to switch among them, etc
09:00 jnthn morning folks
09:00 Matt-W OH HAI jnthn
09:00 wayland76 I was just in the other window asking lambdabot where jnthn was :)
09:01 Matt-W We can haz Kristmas?
09:01 sjohnson let's say you're having a knee-slapping time on window 6, so good that you forgot what window you're in, and someone pages you on window 3
09:01 donaldh joined #perl6
09:01 wayland76 jnthn: Rakudo fails to build for me
09:01 sjohnson if you hit ALT-3 to see waht was written, and quickly go back, how would you do it?
09:01 wayland76 Do you want to backlog, or shall I re-paste?
09:01 Matt-W sjohnson: I press alt-6 :)
09:01 jnthn wayland76: Where about is it failing?
09:02 jnthn And are you using the Parrot mentioned in build/PARROT_REVISION?
09:02 jnthn (I'm aware there are issues with Parrot versions later than that one and Rakudo, I didn't work out the details yet.)
09:02 wayland76 jnthn: I'm using the latest Parrot from HEAD
09:02 wayland76 ah, ok
09:02 wayland76 Well, I solved one by adding extra parentheses
09:03 wayland76 I'm trying to get the RPM of Rakudo running on an RPM of Parrot...
09:03 wayland76 and I need a pretty recent Parrot for that :)
09:03 sjohnson Matt-W: well my idea was this, if you forgot you were on window-6, you could hit ALT-3 again (cause your finger is still near that key)
09:04 sjohnson and it would bring you right back to the previous window
09:04 wayland76 Do you have any thoughts as to when you might be looking at that (ie. today vs. next week vs. next month)?
09:05 wayland76 sjohnson: But you'll want to slap your knee again in between, so keyboard proximity should be irrelevant :)
09:05 jnthn wayland76: Depends what the issue is...
09:05 sjohnson wayland76: you passed the TRUE test
09:05 sjohnson that was the answer i was looking for
09:05 sjohnson :)
09:06 wayland76 jnthn: Well, the ones where I just had to add parentheses were easy
09:07 wayland76 Here's the errors that I couldn't solve: http://sial.org/pbot/36814
09:08 wayland76 Btw, it's not really build 14, it's really the latest head
09:08 wayland76 I just haven't updated the spec file :)
09:09 Matt-W sjohnson: I can see that could be useful, like :e# in vi
09:11 Matt-W wayland76: that's quite an important class for it not to find...
09:11 jnthn s1n: No, no CALLER and OUTER yet
09:12 jnthn wayland76: The parentheses are hiding the problem, not solving it.
09:12 wayland76 Matt-W: You're telling me.
09:12 wayland76 oh, ok
09:13 jnthn wayland76: The problem is that it seems your build of the dynops / dynpmcs is failing.
09:13 wayland76 Is that part of Rakudo or Parrot?
09:13 * moritz_ bisects the indirect method failure with newer parrot
09:13 wayland76 Rakudo, right?
09:13 jnthn The dynops and dynpmcs are in the rakudo source tree.
09:13 jnthn But the tools to actually build them are from Parrot.
09:14 wayland76 Of course -- I remember seeing them in the makefile
09:14 wayland76 Ah, ok
09:14 wayland76 Yeah, I suspect I know where the problem is
09:14 jnthn Thus why I'm interested to know if building against the current recommended Parrot helps.
09:14 jnthn If it does, then it kinda halves the problem space. :-)
09:14 wayland76 I've applied some patches that Allison did when she started working on RPM
09:15 wayland76 And I suspect they're causing that lack of build
09:15 jnthn Also please be very sure (but you probably already did) that you have make realclean done and a re-Configure of both Parrot and Rakudo. dynops/dynpmcs can be susceptible to breakage if it's not happy over those things.
09:15 wayland76 Maybe I should try to understand them before blindly applying them :)
09:16 wayland76 Oh, btw, testing for the revision doesn't work on a parrot that isn't built from SVN
09:16 wayland76 (or rather, where it's installed as a package)
09:16 wayland76 kid51 said that parrot returns revision as 0 by design if it's not a development setup
09:17 wayland76 By Configure, I presume you mean Configure.pl?
09:17 wayland76 RPM deletes the build directory, and makes a new one when you rebuild the RPM, so that should take care of that
09:18 jnthn OK
09:18 Matt-W Probably installed-Parrot will be easier once we can target Parrot releases rather than SVN revisions
09:18 jnthn Yes, I meant Configure.pl
09:18 jnthn Matt-W: Yes, true.
09:19 wayland76 Actually, it might be because the time on the NFS server and my local machine are different.
09:19 wayland76 I just put in an additional test so that if revision = 0, it continues anyway
09:20 LadyLuna1y joined #perl6
09:39 mhsparks joined #perl6
09:40 * jnthn back from phone call
09:41 jnthn wayland76: Will try building Rakudo against latest Parrot here.
09:44 wayland76 I'm pretty Allison's patches are causing the second problem, but I'm not so sure about the first one
09:45 jnthn Well, both are problems with dyn-thingies.
09:46 wayland76 Ok.
09:46 wayland76 Does anyone here understand makefiles?
09:46 wayland76 specifically, how to call one from another?
09:46 wayland76 Allison divided the makefile into 3 parts.  The main one calls the other two
09:47 moritz_ make -f other_makefile
09:47 wayland76 The other two say make: Nothing to be done for `src/ops'
09:47 wayland76 ok
09:47 wayland76 I'll investigate
09:47 jnthn That error suggests it's not building the ops. Which will casue epic fail.
09:48 wayland76 Yah.  Also doesn't build PMC
09:48 wayland76 Ok; is there a simple way to do cd $dir ; make ; cd originaldir?
09:49 moritz_ make -C $dir
09:49 moritz_ (at least with GNU make)
09:49 wayland76 moritz_++ !
09:49 wayland76 :)
09:50 wayland76 jnthn: IIRC, you're on Windows.  Are you using GNU make?
09:52 jnthn wayland76: no
09:52 jnthn nmake
09:52 wayland76 Does that support -C being a subdirectory?
09:54 jnthn don't know
09:54 jnthn ok, I can build Rakudo
09:54 jnthn on latest Parrot
09:54 wayland76 Great!
09:54 jnthn so sounds like it's the pathces
09:55 wayland76 Yup
09:55 wayland76 But I think moritz_ solved that for me with the make -C business
09:59 jnthn aww
09:59 jnthn think it won't work
09:59 jnthn on windows
09:59 jnthn /C Suppress output messages
10:00 wayland76 Ok.  Well, the makefile is generated anyway, so we'll see if we can't come up with something
10:00 wayland76 Does Windows have an analogous function?
10:01 jnthn not that I can see from nmake /help, no :-(
10:01 jnthn But in the Parrot makefile I've tended to see IIRC cd foo && nmake style stuff
10:01 DanielC If I compile Rakudo as per the instructions on the website, does it automatically build it with the latest Parrot?
10:02 jnthn DanielC: No
10:02 DanielC ok
10:02 jnthn It should get the one mentioned in build/PARROT_REVISION
10:03 DanielC Ok. So it picks one that is "known to work".
10:04 DanielC When you compile Rakudo it hard-codes a bunch of paths, right? So if you want to move Rakudo to a different directory you need to recompile. Right?
10:06 jnthn DanielC: I think so, yeah.
10:06 wayland76 In theory, I'm working on solving that for the RPM
10:07 wayland76 In reality, I'm not up to that stage yet
10:11 sri_kraih joined #perl6
10:12 wayland76 Where does socket.pasm come from?
10:20 ejs joined #perl6
10:24 wayland76 found it
10:27 mikehh joined #perl6
10:28 sjohnson wayland76: gonna hit the sack, good chatting with ya, thanks for the suggestions too
10:29 wayland76 sjohnson: No worries :).  Hope the sack doesn't hit back :)
10:30 wayland76 (I presume sack = bed, not sack = alcohol :) )
10:37 agentzh left #perl6
10:43 antiphase joined #perl6
10:46 hanekomu_ joined #perl6
10:50 DemoFreak joined #perl6
10:52 DanielC Is Perl 6 going to be a "lazy" language (in the sense of Haskell) or is it just lists that are lazy? I thought that only a pure functional language could be lazy.
10:53 DanielC For example, you might delay execution of foo(3) until you actually need it, but what if the behaviour of foo() changes during the course of the program? (e.g. foo is an iterator).
10:54 moritz_ DanielC: only lists are lazy
10:54 DanielC ok
10:55 moritz_ there are basically three possible ways of handling changing code objects
10:55 moritz_ the first is to simply ignore it, and declare it the responsibility of the programmer
10:55 moritz_ the second is to eagerly evaluate all remaining iterators
10:55 moritz_ and the third is to keep an unchanged copy
10:57 DanielC Hmm... now that you mention it, you could change the list even while you iterate over it.
10:58 moritz_ no, lists are immutable
10:58 DanielC for $item (@list) { modify_list(@list) }  ?
10:58 moritz_ in that case @list is actually an array
10:59 moritz_ I'd guess if you modify @a[3], it will cause eager evaluation of all items up to @a[3]
10:59 DanielC Ok, what's the difference between a list and an array? How do I know which one I'm looking at?
10:59 moritz_ a list is immutable
10:59 moritz_ and Array inherits from List
11:00 moritz_ when you declare something with a @ sigil, it creates a new Array by default
11:00 wayland76 ...so are Arrays immutable too?
11:00 moritz_ no
11:00 DanielC How do you make a list?
11:00 moritz_ grep, map, gather/take etc. all return lists
11:01 moritz_ but if you assign a list to an array, it gets promoted automatically
11:01 DanielC Ok...  So the output of (say) grep is immutable but if I give it to @foo it becomes mutable. Yes?
11:01 DanielC ok
11:02 wayland76 The output of say(grep) goes on the screen, and can probably be changed with ANSI escape sequences :)
11:02 moritz_ DanielC: right
11:02 DanielC Is there any way to give a name to a list without promoting it to an array? It sounds like you are saying that lists are immutable as long as you can't refer to them by name.
11:02 moritz_ my $a = (2, 3, 4);
11:03 moritz_ (ok, that's a bit cheating, that's actually a Capture, which is a bit more than a list, but still immutable)
11:03 moritz_ my @a := (2, 3, 4)
11:03 moritz_ that should really work
11:03 moritz_ but I doubt that Rakudo implements it correctly
11:03 moritz_ rakudo: my @a := (3, 4, 5); @a[1] = 5; say @a
11:03 p6eval rakudo 870bf3: OUTPUT«355␤»
11:03 riffraff joined #perl6
11:03 DanielC Is := new? Or am I just out of touch with Perl?
11:04 moritz_ hey, this is Perl 6, everything is new ;-)
11:04 wayland76 How do we do what I mean with my @a := new Array(2, 3, 4);
11:04 moritz_ := is binding
11:04 DanielC :-)
11:04 moritz_ you use assignment.
11:04 moritz_ my @a = (2, 3, 4); # mutable @a
11:04 wayland76 Roughly like tie, or like $a = \@b;
11:04 DanielC What if you do @a = (2,3,4); @b := @a ?  Is @b mutable?
11:05 moritz_ yes
11:05 DanielC ok
11:05 moritz_ because you have an array in @a
11:05 moritz_ and after the binding, @b and @a refer to the same array
11:05 DanielC Ah, so thats how := works...
11:06 moritz_ it's like assigning to globs in Perl 5, except that it also works with lexicals, and without all the special cases ;-)
11:07 DanielC Anyways, so if I say @list = grep ... @array; then here @list is immutable. But is it lazy? After all, @array could change.
11:08 wayland76 ...and it doesn't group all the namespaces together into one thing
11:08 DanielC s/=/:=/
11:08 moritz_ it's lazy, yes
11:09 moritz_ I don't know what the current policy if
11:09 moritz_ either modification of @array causes eager evaluation
11:09 moritz_ or you're screwed
11:09 moritz_ (but I suspect the former)
11:10 DanielC I hope the didn't pick the "you're screwed" option.
11:10 moritz_ nobody implemented lazines in depth yet
11:10 moritz_ so the spec isn't really advanced either
11:10 moritz_ or the tests
11:10 moritz_ or my understanding of the subject
11:11 wayland76 Well, ruoso was having a good go at it.
11:11 wayland76 wasn't he?
11:11 moritz_ he wrote S07, yee
11:11 wayland76 Well, most of it :)
11:11 DanielC Laziness is a really cool feature. I was happy when I heard that Perl 6 would have some laziness.
11:12 wayland76 Well, Perl 5 had laziness, but it was resident in the programmer, not the language :)
11:12 DanielC :)
11:12 masak joined #perl6
11:13 Matt-W moritz_: modification of @array could, conceivably, cause the lazy @list's not-yet-run grep to point at an invisible copy of @array without actually causing the grep to evaluate
11:14 jnthn lol it's masak
11:14 Matt-W masak!!
11:14 jnthn er, I mean, oh hai
11:14 DanielC Matt-W: There might be a memory impact if @array is big and @list is small.
11:14 Matt-W DanielC: yes, there could be
11:14 masak greetings, gentlemen.
11:14 lambdabot masak: You have 1 new message. '/msg lambdabot @messages' to read it.
11:14 moritz_ Matt-W: is that specced? if yes, where?
11:14 masak @massage
11:14 lambdabot moritz_ said 17h 37m 8s ago: Artistic 2.0 is fine
11:14 masak \o/
11:15 Matt-W moritz_: I'm guessing, I don't know what the behaviour actually is
11:15 wayland76 And me too?  Can I be greeted too? :)
11:15 Matt-W wayland76: but you've been here for hours
11:15 wayland76 Matt-W: Yes, but masak only greeted gentlemen :)
11:16 masak I have to resign to the fact that I'm still a bit squashed and not my usual, energetic self. also, I have to do $WORK. I'm going into lurk mode for today... :)
11:16 masak wayland76: (greetings.)
11:16 Matt-W wayland76: Don't they have gentlemen in Australia?
11:16 wayland76 masak: I feel like that regularly :).
11:16 DanielC Matt-W: I know that Haskell relies heavily on laziness to do things that would be memory-prohibitive in an eager language. Like defining the set of prime numbers by a series of "greps" on the list 1..Inf
11:17 Matt-W DanielC: yes, it does. The thing of pointing at the same list and then modifying it wouldn't happen though, because Haskell types are immutable
11:17 wayland76 Matt-W: Actually, yes, and when I'm being serious, I'd be willing to accept the label if someone else put it on me
11:17 Matt-W wayland76: I'm glad to hear it
11:17 DanielC Matt-W: yes.
11:17 wayland76 But I thought in my role as channel clown, I should say something like that :)
11:20 donaldh joined #perl6
11:21 azawawi joined #perl6
11:21 azawawi hi
11:22 explorer joined #perl6
11:34 wayland76 hi -- lighted code :)
11:36 wayland76 (excuse the joke :) )
11:36 masak oh, and I'll post this idea for increased exposure: http://use.perl.org/comments​.pl?sid=42547&amp;cid=68747
11:39 wayland76 Well, I want to see it with the whole sourceforge-like setup
11:39 wayland76 So that people don't have to put their code on both sourceforge and CPAN
11:39 wayland76 But while I'm dreaming, I'd like a pony :)
11:39 masak wayland76: I think this idea is slightly less ambitious.
11:40 DanielC I don't think I understand the idea.
11:40 jnthn Yeah, ponies are crazy hard!
11:40 masak wayland76: this is simply a way to expose the current projects, making it dead simple for people to annote the code.
11:40 moritz_ actually I'd like cpan to integrate with freshmeat
11:40 moritz_ so that perl modules automatically appear in freshmeat's search results
11:40 wayland76 What do you mean integrate
11:40 wayland76 ah, ok
11:40 masak someone ought to write these ideas down, so that we can plan them into the next CPAN.
11:41 DanielC masak: Is there a Perl 6 wiki?
11:41 skids perlfoundation.or
11:41 skids g
11:42 moritz_ DanielC: forr example http://www.perlfoundation.org/perl6/
11:42 wayland76 is that "Perl Foundation or Grin"?
11:42 wayland76 Sort of like "Perl Foundation or Bust"
11:42 wayland76 ?
11:42 skids ;-)
11:42 DanielC moriz_: ok
11:43 DanielC masak: Why not put the ideas in the perl 6 wiki?
11:43 skids because if we actually used them, wikis would be very useful :-)
11:43 masak DanielC: good idea. but I'm not up for it, at least not today...
11:44 moritz_ I don't like wikis, because people tend to not take responsibility for them
11:44 * masak is strangely low on energy today
11:44 moritz_ (wikipedia.org being a notable exception)
11:44 wayland76 masak: Had fruit, vitamin C, water, etc?
11:44 moritz_ afk
11:45 skids I think people get discouraged because they end up being the only one editing the pages they start.
11:45 skids (and take that as an indication that the page is not very useful.)
11:46 wayland76 Btw, I've seen at least two partially completed planning documents for C6PAN/whatever
11:46 wayland76 One was the stuff I ripped out of the specs (as not being spec-worthy)
11:46 skids But, if you've ever playedwith tracker gifs, you'd know there are tons of lurkers just about everywhere, and not all just spiders.
11:46 masak wayland76: fruit -- good idea. thanks.
11:47 azawawi moritz_: hi
11:47 DanielC Can someone explain the idea to me? I don't get it.
11:47 wayland76 masak: I'm sometimes tired when I just haven't had enough to eat
11:47 DanielC Pod already does code documentation, no?
11:47 wayland76 DanielC: Which idea/
11:47 DanielC http://use.perl.org/comments​.pl?sid=42547&amp;cid=68747
11:47 * skids notes 165 users here now, minus 30 or so bots probably.
11:47 wayland76 the one in the link
11:47 wayland76 ?
11:47 masak DanielC: yes, to a point.
11:47 DanielC yeah
11:47 masak DanielC: but it's in flux.
11:47 azawawi moritz_: even with any empty hello.p6; the same fakexecutable doesnt work (http://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=65994)
11:48 wayland76 DanielC: Have you ever used PHP.net?
11:48 DanielC wayland76: All the time.
11:48 wayland76 And have you ever been helped by the comments that people make below the functions?
11:49 * skids has.
11:49 DanielC A couple of times, yes. Is that what masak is proposing?
11:49 masak TheDamian has promised to work out a draft S26 that does that.
11:49 DanielC ok
11:50 masak personally, I think we should start documenting our functions with Pod ASAP.
11:50 masak and play with different ideas, and see what is missing.
11:50 payload joined #perl6
11:50 DanielC In principle, the comments thing is a good idea, but it's important that someone be responsible for updating the documentation if there is an error, and deleting posts that are either off topic or wrong.
11:51 DanielC I've heard people make that particular complaint about php.net
11:51 skids Well, get it working and then file for a grant to maintain it :-)
11:53 DanielC masak: You seem to have a lot of documentation-related ideas (Pod, grok / u4x, this new one). Just an observation.
11:53 * skids -> $car { .drive($work) }
11:55 DanielC masak: What is your role in the Perl 6 project? Are you working on documentation?
11:56 wayland76 masak's big role is finding bugs in Rakudo :)
11:56 wayland76 He writes actual working code (ie. Web.pm, proto) that uncovers bugs
11:56 wayland76 Or at least, that's how it looks from here
11:57 masak DanielC: I'm mostly working on writing code. but I spend some time thinking about what documentation Perl 6 needs.
11:57 DanielC ok
11:58 masak DanielC: mberends (currently known as mberends_mibbit) is the guy who implements Pod in Perl 6.
11:58 wayland76 That's good to know
11:58 wayland76 Is he using STD?
11:58 wayland76 Or does STD not do POD yet due to lack of spec?
11:58 masak no, because STD doesn't do Pod yet.
11:58 wayland76 Ah :)
11:58 wayland76 GMTA
11:59 wayland76 (Great Minds Think Alike)
11:59 masak that's why I think Pod needs to be used a bit, to generate feedback and to spur TheDamian to release a new draft.
12:00 masak I should really present a good example by Pod-documenting my own code.
12:00 DanielC Is there a working implementation of Pod as it is today?
12:01 masak mberends_mibbit: oh hai. maybe we should make it a WTOP to have some Pod for each Perl 6 class? I'm having a hard time deciding if that's too harsh or not. maybe it should be an option?
12:01 masak DanielC: yes. check out the Perl6::Perldoc on CPAN, and mberends_mibbit's Perl6::Pod in perl6-examples.
12:01 DanielC thanks
12:02 wayland76 Maybe we should have a "use production" pragma
12:02 wayland76 that's required for modules on CPAN
12:03 wayland76 and does the equivalent of "use strict", "use warnings", and "require POD" or something
12:03 wayland76 (Whatever Perl 6 does instead of those sorts of things, with "require POD" not being a Perl 5 require, but something I just made up)
12:03 masak wayland76: strict and warnings are the default in Perl 6.
12:03 DanielC masak: Back to your previous suggestion (the link you posted) the basic idea is to let people post comments on the documentation page for each module?
12:04 payload joined #perl6
12:04 masak DanielC: yes, I think so. increasing transparency of the code, and allowing people to comment.
12:05 DanielC masak: And the owner of each module is responsible for updating his documentation and deleting comments that are wrong...
12:05 wayland76 masak: Is there a way to turn them off?
12:05 wayland76 Hmm.  OTOH, one of the reasons CPAN is so good is because it's so easy to contribute :)
12:06 DanielC masak: The output from "grok" could include a link that says "see the latest documentation for this module" and points to the CPAN page.
12:07 masak just to clarify, what I'm proposing is not a new CPAN. just a fun throwaway project to see what comments can be had from the Perl 6 community by publishing all our current projects.
12:07 DanielC ah
12:07 DanielC So you don't envision CPAN 6 having comments?
12:08 masak :)
12:08 masak I don't have an opinion about that at the moment.
12:08 DanielC ok
12:08 wayland76 Here's one guy's ideas on CPAN6: http://cpan6.org/
12:08 DanielC During the development process, comments are obviously a good idea.
12:08 meppl joined #perl6
12:08 DanielC The issues I mentioned are only applicable to production.
12:09 DanielC masak: Using comments during development would give everyone a better idea of whether they'd be useful in CPAN 6 or not.
12:09 masak wayland76: I stumble upon that page at times. I'm always surprised at how little is heard in the Perl 6 community about it.
12:10 wayland76 I think the reason is that no-one is worrying about CPAN6 yet
12:10 masak wayland76: I fear it's one man's solo project, and that it doesn't necessarily have much to do with Perl 6 and the Perl 6 community.
12:10 masak DanielC: yes, yes. I'm not disagreeing. I'm just not willing to take on the design of the next CPAN.
12:10 wayland76 masak: I worry a bit about that too
12:11 wayland76 Well, more I worry that, while he's got a lot of good ideas, I think there's room for improvement
12:11 masak DanielC: there are a few good ideas floating around. I think the best we can do is turn them into practice piece by piece.
12:11 DanielC masak: I know. I was just commenting.
12:11 wayland76 Btw, is Mark Overmeer on this channel?
12:12 masak wayland76: it's clearly an ambitious project, but it has no connection with what happens in the rest of the p6 community.
12:12 wayland76 Well, except German Perl Mongers :)
12:12 masak wayland76: I see him on p6l sometimes. but not here, I think.
12:12 DanielC Is the guy behind cpan6.org in this channel?
12:13 masak DanielC: that'd be Mark Overmeer.
12:13 DanielC thanks
12:13 wayland76 ...which is why I was asking if he's on here :)
12:13 wayland76 masak: Yeah, that's my conclusion
12:14 wayland76 My opinion is that CPAN6 should be written as modules that plug into a Perl 6 CMS
12:14 wayland76 Kind of like Drupal's development website
12:15 masak if we're going to discuss ideas, I might interject that the idea about distributed repositories of .deb-like packages sounds very sane to me.
12:16 masak we could start simply by wrapping apt, and then slowly replacing it by Perl 6 modules.
12:16 wayland76 Oh, btw, while we're on packages, did I tell you my idea about using something like Software::Packager as part of the CPAN6 modules?
12:17 masak don't think so.
12:17 masak what's Software::Packager?
12:17 masak does it have advantages over apt-get?
12:17 wayland76 Yes and no
12:18 wayland76 I mean, I'm a Redhat guy, I'm not going to be installing debs
12:18 masak :)
12:18 wayland76 Basically, Software::Packager will help with the stuff that CPANPLUS::Dist does now
12:18 * DanielC waves his "apt rulez" flag
12:18 masak indeed.
12:18 wayland76 Yeah, but my whole problem is, CPAN doesn't integrate well with packaging systems.
12:19 masak wayland76: no offense, but I've tried both Yum and Apt, and Aot simply rocks. Yum doesn't.
12:19 wayland76 And integrating it with just one specific packaging system is not going to make people happier
12:19 masak s/Aot/Apt/
12:19 wayland76 I want to make it work with all packaging systems
12:19 * masak gets out of the bike shed
12:19 wayland76 What's the apt equivalent of "yum search"?
12:19 masak talk to y'all later.
12:19 wayland76 o/
12:20 DanielC apt-cache search
12:20 wayland76 I think both apt and yum suck :)
12:20 wayland76 oh, ok, thanks :)
12:20 patmat wayland76: which one is good then?
12:20 wayland76 None of them
12:20 DanielC portage :-)
12:20 patmat no i mean, generally
12:20 wayland76 What I want to see is a much more modular packaging setup
12:20 patmat oh ok
12:20 patmat DanielC: Gentoo?
12:21 DanielC patmat: yeah
12:21 wayland76 The dpkg / apt separation is good
12:21 moritz_ azawawi: it fails at the PIR step already
12:21 wayland76 as is the rpm / yum separation
12:21 DanielC wayland76: Why is CPAN hard to integrate with package managers?
12:21 patmat i have an old Ubuntu Notebook, and i'm happy with the OS right now
12:21 patmat anybody has some experience with OpenSuSE?
12:22 DanielC patmat: I love Ubuntu. I just tried to pick the first uncommon package manager that crossed my mind... I should have said pacman (Minix).
12:22 patmat hehe
12:23 wayland76 here we go...: http://computerstuff.jdarx.info/co​ntent/unified-package-meta-manager
12:23 wayland76 http://computerstuff.jdarx.info/​content/unified-package-manager
12:24 DanielC wayland76: If each CPAN module has clear list of dependencies and we agree on a specific directory where they'll all live, then shouldn't any package manager be able to handle that?
12:24 literal CPANPLUS might integrage better
12:24 wayland76 DanielC: Well, it's improving, with the CPANDIST stuff, but the CPAN shell should detect which distro you're on, package the modules with that packaging system, and offer to install them for you, resolving deps along the way :)
12:24 literal integrate
12:25 DanielC I see.
12:25 wayland76 sorry, s/CPANDIST/CPANPLUS::Dist/
12:25 DanielC wayland76: So you want the CPAN shell to use the local package manager...
12:26 wayland76 Yes!
12:26 wayland76 Or at least, have a configuration option to make that a possibility :)
12:28 DanielC The idea sounds good. I have no clue how to implement it.
12:29 wayland76 With difficulty
12:29 wayland76 :)
12:29 wayland76 But also, see Software::Packager
12:29 wayland76 (existing Perl 5 module)
12:30 wayland76 I was starting to try to integrate that with CPANPLUS::Dist, but decided to give it a miss until Perl 6
12:31 * DanielC is looking at Software::Packager
12:32 DanielC Can Software::Packager make RPMs and DEBs for you?
12:32 wayland76 In theory, I think it can
12:32 wayland76 I'm not sure how well-developed it is, though
12:32 sri_kraih_ joined #perl6
12:33 DanielC I think this is a great time to talk about this issue (before Perl 6 is out) because it is possible to make the new CPAN start off doing things right from day 1.
12:34 moritz_ DanielC: problem is, many people have talked about it already, and much of it was lost again
12:35 DanielC Tell me if I'm wrong, but every package manager runs a script on install and un-install, right?  Is it possible to make it so that foo.rpm simply runs "cpan install Foo" and foo.deb simply runs "cpan install Foo"?
12:35 wayland76 DanielC: Agreed
12:35 moritz_ DanielC: what counts is people acttually *doing* stuff
12:35 wayland76 Maybe not all of them, but many of them do
12:35 DanielC AFAIK rpm, deb and emerge both do that. Slackare just uses .tgz, so they might not.
12:35 wayland76 Package management is #3 on my list.  RPM, then Tree, then Package management (not all of it, but a few bits that will be useful), then web-based CMS
12:36 wayland76 My theory was, read all the metadata into a data structure in memory, then have "formatters" that output the appropriate spec file (or Debian's control files, etc)
12:37 moritz_ DanielC: when you do such pre-install and post-install hooks, the files created therein don't get registered with the package manager
12:37 wayland76 If your package manager doesn't support a piece of metadata (eg. postinstall script), then issue a warning and continue
12:37 DanielC moritz_:  And I guess you can't register the files by hand...
12:37 moritz_ so you loose the advantage of automatic unstalling, file tracing etc.
12:38 moritz_ DanielC: there might be APIs for that
12:38 rjbs joined #perl6
12:39 wayland76 I don't think RPM supports that
12:39 moritz_ even if there were, it doesn't feel robust
12:39 wayland76 If you know what the files are going to be, though, you can create empty ones in the package (which registers them), and then overwrite them post install
12:39 DanielC Ok, what if the pre-install script runs something like "cpan make" which downloads and (possibly) compiles the module in a temp directory and then we tell RPM which files to grab and where to put them?
12:40 clkao joined #perl6
12:40 wayland76 DanielC: It doesn't work like that (and I don't think Debian does either)
12:40 moritz_ DanielC: that doesn't make it possible to detect conflicting files before installing, for example
12:41 wayland76 What you do is, you hand the package manager a tarball and a configuration file that says how the tarball should be compiled and what files go where.  Then the package manager takes care of everything
12:41 Matt-W Sometimes you also give it some patches to apply to the tarball
12:41 wayland76 Or at least, that's how RPM works.  You can also put the config file inside the tarball
12:42 wayland76 Yes, you can do that too.  But it may not be relevant to the problem at hand.
12:42 Matt-W Conary is similar, except the configuration file is actually a Python module :)
12:42 wayland76 Debian has multiple config files, I think, instead of just one
12:43 wayland76 (Btw, I may use RPM/yum over dpkg/apt, but I think the .deb file format is pretty good)
12:43 wayland76 (ie. probably better than .rpm)
12:43 DanielC wayland76: Debian works similar to what you said about RPM... a .tgz + patch
12:43 DanielC I once made a few .deb files, but I can't remember the details very well.
12:44 moritz_ well, a .deb file is simply an archive with one or two files containing metadata, and the actual files to be installed
12:44 moritz_ there is a standard procdure for building such beasts involving dpkg-builpackage
12:45 moritz_ which uses a control file for meta information, a changlog, a file list, a 'rules' list for building etc.
12:46 DanielC Is it important that CPAN compile the module locally? Or is it ok to install modules as binary?
12:46 DanielC (some modules use C)
12:46 moritz_ CPAN is traditionally a source distribution framework
12:46 wayland76 Compile locally is important, because someone might not've compiled for your distro
12:46 wayland76 binary install is nice, but not a must have
12:46 moritz_ it lacks infrastructure for pre-compiling modules for some twenty platforms
12:46 DanielC Yeah, I was thinking along the same lines.
12:47 * jnthn back from nom
12:47 jnthn OK, time to do Perl 6 stuff for a bit. :-)
12:47 wayland76 moritz_: What lacks infrastructure?
12:47 moritz_ wayland76: cpan
12:47 wayland76 moritz_: by which you mean the website, etc?
12:47 wayland76 (ie. the server-side?)
12:47 moritz_ wayland76: I simply mean that it provides no build farms.
12:48 wayland76 Yah.  Another sourceforge feature I'd like to see :)
12:48 moritz_ (it's simply not part of their concept, nothing negative about it)
12:48 wayland76 xen++ :)
12:48 moritz_ that part is not easy
12:48 moritz_ especially if you also want to support non-free platforms
12:48 DanielC We could make "cpan install" compile locally, make a .tgz and then run it by "alien --to-rpm foo.tgz".
12:49 moritz_ if alien is good enough, sure
12:49 moritz_ (last time I tried it it wasn't very good, but that's quite some time ago)
12:49 DanielC Well, alien has a lot of development time behind it that we don't have to re-do.
12:50 wayland76 DanielC: I don't have alien installed
12:51 wayland76 On Fedora 10
12:51 DanielC If the CPAN modules are designed to not make many assumptions (e.g. about directory paths) and are self-contained, I imagine alien would work well.
12:51 DanielC wayland76:  does "yum install alien" work?
12:52 wayland76 I'll have a look at "yum search alien"
12:52 wayland76 (it'll take a while, i have a few different repos it needs to search :) )
12:56 wayland76 alienarena.i386 : Multiplayer retro sci-fi deathmatch game
12:56 wayland76 Oh, wait, that doesn't look quite right :)
12:56 wayland76 That was probably the best match, though
12:58 DanielC http://content.hccfl.edu/pollock/AUnix1/alien/
12:58 DanielC What do you now? alien is a Perl script.
12:59 DanielC http://content.hccfl.edu/pollock​/AUnix1/alien/alien_8.64.tar.gz
13:01 wayland76 It is?
13:01 DanielC Yeah... I'm looking at the code right now.
13:01 wayland76 Well, then, maybe we can draw upon it :)
13:01 * jnthn sees potentially pleasing looking performance improvements from his initial work on re-doing the method dispatcher
13:01 DanielC exactly
13:01 wayland76 jnthn++ :)
13:01 jnthn wayland76: A LONG way to go yet.
13:01 DanielC Maybe cpan can just borrow code directly instead of having an "external" dependency.
13:02 wayland76 Well, yes, but you're working, instead of arguing about modules :)
13:02 wayland76 DanielC: Agreed
13:02 wayland76 Hmm.  Although, I'd have to look at it; Software::Packager's big advantage is that it has a fairly good data model
13:03 wayland76 If Alien doesn't have that, we can draw on both :)
13:03 DanielC sure
13:05 exodist joined #perl6
13:07 DanielC Anyone know what the slp package is? Who uses it?
13:07 DanielC Alien supports RPM, DEB, SLP and the Solaris PKG format.
13:07 wayland76 I think Software::Packager might do more, but not sure
13:08 wayland76 Also, we want to do source -> binary, whereas alien probably does binary -> binary
13:08 wayland76 I suspect that generic source -> package source -> binary is probably the easiest way to go
13:09 DanielC Yeah, that's what I was thinking.
13:09 DanielC more or less
13:09 DanielC I was actually thinking: Perl source -> package -> tgz -> local package format
13:10 DanielC In my mind, alien would only be used for the last step.
13:10 DanielC And the first two steps would be similar to what cpan does today.
13:11 wayland76 Exactly.  But Alien is designed for, if I understand correctly, .deb -> .rpm
13:11 wayland76 Whereas RPM itself already does .tgz+specfile -> RPM
13:11 DanielC Alien is <any> to <any>.
13:11 DanielC Personally I think that alien probably works best if you start with tgz. But I'm just guessing.
13:12 wayland76 Well, maybe the thing to do is, when we're starting all this, to try to draw in some of the appropriate Perl 5 people
13:12 DanielC yeah
13:12 wayland76 I'd like to draw up the data model first, though :)
13:14 DanielC I do think that using Source::Package is a good idea (whether or not cpan borrows anything from alien).
13:14 DanielC I say that because developers will have to tell cpan which files are in the distribution, so you might as well use Software::Packager for that.
13:20 DanielC Hmm... I can't figure out how you are supposed to make Software::Packager actually do anything.
13:20 masak DanielC: it just contains the API.
13:21 DanielC masak: So... how do you use the api to make it do something?
13:21 masak DanielC: its various subclasses specialize on different packaging systems.
13:21 masak it's right there in the docs.
13:21 wayland76 Ie. you write a program that calls the functions in Software::Packager
13:21 DanielC I must be dumb today because I can't see it. I don't see any subsclasses.
13:21 wayland76 I think Software::Packager needs work, but the data model is quite good :)
13:22 wayland76 Software::Packager::RPM or something?
13:22 Infinoid DanielC: http://search.cpan.org/~rbdavison/
13:22 wayland76 Thanks all :)
13:22 wayland76 (I don't need to find the links, etc)
13:23 DanielC Ok, so there is Software::Packager::Rpm
13:24 DanielC And the ::package() method actually creates the package.
13:24 wayland76 The one thing I want to be careful of is to also, if possible, make it work with source-based systems (emerge, et. al.)
13:24 wayland76 Not that I use them, but I want to do things /properly/ :)
13:24 DanielC Ok, I see how it works. You are supposed to subclass Software::Package and override the ::package() method.
13:25 masak yes.
13:25 wayland76 Exactly.  I'd do it like the DBI/DBD split myself, though
13:26 wayland76 You can see how, while Software::Packager might not be a whole CPAN replacement itself, it's a good component to be using
13:26 zamolxes joined #perl6
13:26 DanielC Maybe someone should borrow from alien to make all the necessary Sofware::Package::** methods.
13:26 DanielC s/methods/packages/
13:26 wayland76 But because it's not CPAN-specific, it can be used from other purposes too
13:26 wayland76 Well, I think we could probably do some of that :)
13:27 wayland76 What's the license on alien?
13:27 DanielC GPL
13:27 moritz_ GPL 2 or later
13:27 wayland76 Hmm.  I'm hoping to aim for "the same terms as Perl itself" :)
13:28 moritz_ well, you can always contact the authors and ask them if they change it
13:28 DanielC The current maintainer is Joey Hess <joeyh@debian.org>
13:28 wayland76 I don't know what license Software::Packager uses, but I presume it's that?
13:28 DanielC Maybe Joey will be willing to change license and maybe even help with the project.
13:28 wayland76 Well, remember, It's #3 on my list.  I'm focussed on RPM at the moment :)
13:29 wayland76 I'd hope for that :)
13:29 DanielC wayland76; What are you doing with RPM at the moment?
13:29 wayland76 I'm trying to build a Rakudo RPM on top of the Parrot RPM
13:29 DanielC ok
13:29 wayland76 But Parrot doesn't package some of the files that Rakudo needs, so I'm currently rebuilding Parrot, hopefully with those files added
13:30 wayland76 When I have a functioning Rakudo RPM, then I can get stuck into some of this P6 coding :)
13:31 wayland76 But Tree isn't exactly a small project either :)
13:31 pmullen joined #perl6
13:36 skids joined #perl6
13:38 moorman joined #perl6
13:39 moorman left #perl6
13:39 DanielC wayland76: When the time comes, do we have a place where we can start the "new" cpan? For example, can we get something like p6.cpan.org?
13:40 azawawi so what exactly is a rakudo parrot fakexecutable and why is it fake?
13:40 DanielC Btw, I kind of like the idea of the "old" cpan eventually becoming p5.cpan.org
13:41 moritz_ you'll never get the p5 hackers to accept that
13:41 DanielC moritz_: Even after Perl 6 is out?
13:41 moritz_ DanielC: years after that, maybe
13:42 DanielC moritz_: Ok. Where would you put the new experimental Perl 6 CPAN?
13:43 moritz_ DanielC: 6pan.org maybe
13:43 moritz_ it's registered by the former Perl 6 project manager
13:43 mizioumt joined #perl6
13:43 obra_ moritz_: we've pretty firmly decided that we should be using cpan.org for perl6
13:44 masak the issue isn't where to put the new experimental Perl 6 CPAN. the issue is whether someone will make one, and whether it will be useful to the people programming in Perl 6.
13:44 obra_ last I heard, the vague plan was "additional module metadata to say 'this is a p6 module'"
13:44 obra_ there's no reason to reinvent the entire vehicle just because the new wheels are chromed ;)
13:44 masak obra_: I like that. more p6 modules on CPAN.
13:45 moritz_ obra_: that's nice, but for me the cpan development is completely opaque
13:45 masak that doesn't mean that we need to be satisfied with only CPAN, though. but having it is a strength.
13:45 masak obra_: what moritz_ said.
13:45 wayland76 I think that CPAN, great though it is, has plenty of room for improvement.
13:45 moritz_ obra_: ie I have no idea where to ask how I can help make that faster
13:46 moritz_ s/faster/sooner/
13:46 DanielC obra_: Using cpan.org makes sense, but what if there are some changes to the perl 6 cpan like the package format?
13:46 obra_ tell me what is opaque?
13:46 wayland76 Where are the development discussions, etc, held?
13:46 obra_ the pause upload service? the indexer? search.cpan.org?
13:47 obra_ cpan is a collection of independent services
13:47 moritz_ obra_: I don't know which code manages the indexing, upload queue etc, where discussions take place, the search site etc.
13:47 obra_ maintained largely by individuals
13:47 obra_ there are several search sites. search.cpan.org is graham's baby.
13:47 obra_ anyone can run a search site
13:47 DanielC I would still vote for p6.cpan.org and making that a separate site (on the same server, why not) with the freedom to do things different from the old cpan (e.g. comments, layout, package format).
13:47 obra_ the thing you probably actually care about is pause.perl.org
13:47 moritz_ obra_: some kind of overview would be really great
13:48 obra_ moritz_: I believe you're looking for jhi's paper "the zen of comprehensive archive networks"
13:48 obra_ but andk is the person to talk to about perl6 and pause
13:48 wayland76 I think we're all looking for that :)
13:48 moritz_ andk being Andreas König?
13:48 obra_ yes
13:49 obra_ the source for pause is publicly accessible and he's been known to take patches and contributors
13:49 obra_ but there's nothing stopping you from uploading perl6 to the cpan today.
13:49 moritz_ thanks
13:49 obra_ I'd really, strongly encourage people not to fork cpan
13:49 obra_ having a Comprehensive Perl Archive Network is what keeps most people using Perl
13:49 wayland76 obra_: For what reasons?
13:49 obra_ having 2, 3 or six cpans would completely defeat the point.
13:50 DanielC obra_: I agree with not forking.
13:50 DanielC CPAN has been called "the killer app" of Perl.
13:50 wayland76 Oh, agreed.  But I was thinking of one that contained modules written in any parrot-hosted language :)
13:50 wayland76 ...and also non-Parrot P6 stuff (like SMOP)
13:51 DanielC wayland76: If someone writes a module in (say) Python and compiles it to Parrot, can that module be used in Perl 6 compiled to Parrot?
13:51 obra_ time for me to duck out again.
13:51 obra_ good luck, everybody
13:51 wayland76 DanielC: That's the plan
13:51 moritz_ thanks obra_
13:51 wayland76 thanks obra_
13:51 DanielC wayland76: cool
13:51 wayland76 obra_++ :)
13:52 moritz_ DanielC: it's already implemented in some languages (Perl 6 and Cardinal)
13:52 wayland76 Just what I was going to say
13:52 moritz_ Cardinal is the Ruby implementation on parrot
13:52 DanielC ah
13:52 wayland76 That should be either Rakudo & Cardinal or Perl 6 and Ruby :)
13:52 DanielC I should take a look at Cardinal then. I really like Ruby.
13:52 moritz_ right
13:52 moritz_ DanielC: cardinal is rather basic right now. But patches always welcome ;-)
13:53 DanielC So it really makes sense to have to have a CPAN for Parrot.
13:53 renormalist joined #perl6
13:53 DanielC Comprehensive Parrot Archive Network
13:53 DanielC So, how about parrot.cpan.org?
13:54 moritz_ DanielC: in theory most Perl 6 packages should be implementation independent
13:54 ascent_ problem is that Perl6 is/could be not parrot only.
13:54 wayland76 That's the sort of thing I was thinking
13:54 wayland76 It's sort of Parrot + Perl 6
13:54 wayland76 Keep SMOP firmly in mind, and you'll have the idea
13:55 wayland76 Ie. the SMOP LibXML module :)
13:55 DanielC What is SMOP?
13:55 masak DanielC: a Perl 6 implementation.
13:55 DanielC And it doesn't target Parrot... right?
13:55 moritz_ or better a runtime library for Perl 6
13:55 moritz_ see http://www.perlfoundation.org/perl6/index.cgi?smop
13:56 DanielC *click*
13:56 wayland76 That Zen article seems to imply that other Parrot-based languages won't be accepted
13:56 wayland76 DanielC: Exactly.  The plan is to write it in C, and have it work closely with Perl 5
13:57 DanielC So we need one CPAN area for parrot bytecode and another for Perl 6 modules. Yes?
13:57 moritz_ wayland76: we might talk to these people once we've got a good example of cross-language laoding
13:57 moritz_ DanielC: no, I don' think distributing bytecode is much in the open source spirit
13:58 DanielC moritz_: But how else would a Cardinal user get to use a Parrot module written in Perl 6?
13:58 mhsparks joined #perl6
13:58 wayland76 I think packages need to be marked by what "arch" they target, whether noarch, Parrot, SMOP/C, or whatever
13:58 moritz_ DanielC: by compiling it to pbc.
13:58 wayland76 Presumably the Cardinal user would also need Rakudo
13:58 moritz_ wayland76: ideally language + arch
13:59 DanielC moritz_: So the Ruby user would have to install a Perl 6 compiler...
13:59 claytoris joined #perl6
13:59 moritz_ DanielC: or there could be a binary mirror, but I don't see that as a pressing CPAN issue
13:59 abra joined #perl6
13:59 wayland76 DanielC: Yes.  Most distros currently have both installed :)
14:00 jnthn DanielC: Even compiling down to bytecode and shipping that doesn't remove the need anyway.
14:00 claytoris Hi guys, can you tell me if k3151y still comes around here?
14:00 jnthn DanielC: Don't forget eval...and the runtime.
14:00 DanielC In principle language + arch is fine, but make sure the UI doesn't get complicated. The language and arch should be more like filters, rather than directories.
14:00 DanielC jnthn: Hmm..
14:00 moritz_ DanielC: agreed
14:01 wayland76 claytoris: See irc log
14:01 claytoris I'm on jmirc on my bb, is there a way to do that?
14:01 pmullen left #perl6
14:01 wayland76 claytoris: Basically, no, I've never seen the person you mention
14:02 claytoris Thanks!
14:02 wayland76 (there may be a way to do it.  You need a web browser: http://irc.pugscode.org/ )
14:03 DanielC So... are we back to the idea of perl6.cpan.org?
14:03 moritz_ @seen k3151y
14:03 lambdabot I haven't seen k3151y.
14:03 moritz_ that's also a clean "no"
14:05 wayland76 DanielC: Probably something like that.  We want something mo' bettah :)
14:05 wayland76 I think it'd be reasonable to have CPAN and CPAN6, with any software which has the capability to use both can know about both
14:06 DanielC cpan6.org is taken
14:06 wayland76 Yeah, I know.  Mark Overmeer has it, I think
14:06 DanielC yeah, that's what masak aid.
14:07 wayland76 He's also interested in the same question, but from a different point of view
14:07 DanielC s/aid/said/
14:07 moritz_ he has ambitious goals, but doesn't seem to be active
14:07 Maghnus joined #perl6
14:07 DanielC What are Mark's goals and ambitions?
14:07 moritz_ "but there are no realistic plans for that: CPAN6 is not even useable on the moment (as is perl6)."
14:07 wayland76 That website has his goals on it
14:08 wayland76 I think if other people did the parts of the system that he was less interested in, he'd do the parts that he's more interested in :)
14:08 masak Perl 6 is usable at the moment.
14:08 DanielC It seemed like a very fuzzy set of goals.  Photos?
14:08 moritz_ well, his approach seems to be pretty much XML centric
14:09 wayland76 That would be fine.  Tree.pm will do XML
14:09 wayland76 :)
14:09 wayland76 That is, it will input and output it :)
14:09 moritz_ well. XML is a means, not an end
14:09 moritz_ I'd prefer it if he would start with the ends, not the means
14:10 wayland76 Agreed.  I'm planning to have the model represent the whole thing as a tree, so sucking in XML and turning it into the appropriate tree should be no problem, I hope :)
14:10 moritz_ anyway, I think I'll send mark an email and ask if he thinks anything usable will come out of it soon
14:10 wayland76 moritz_: IKWYM :)
14:10 wayland76 moritz_: I suggest right now that the answer is no :)
14:11 wayland76 You may want to point him at our IRC conversation
14:11 masak moritz_: could you also ask him whether he has taken into account the specced things about module versioning and authoring?
14:11 moritz_ wayland76: I know, but I don't want to waste any chances
14:12 masak moritz_: on second thought, maybe I should do that myself, after reading his paper on CPAN6...
14:13 wayland76 chances to do what?
14:14 masak include people in the Perl 6 development community.
14:14 azawawi moritz_: it seems the problem is not related to pbc_to_exe; please see http://sial.org/pbot/36825
14:14 moritz_ azawawi: it even fails at the PIR stage
14:14 moritz_ masak, wayland76: I'll put you CC' on the mail, if you don't object
14:14 abra left #perl6
14:14 azawawi moritz_: true
14:15 masak moritz_: goodie.
14:15 PerlJam good awake time #perl6
14:15 wayland76 Fine by me (CC)
14:15 masak our bottleneck isn't good ideas, implementation milestones, or grant money. our bottleneck is people with tuits.
14:15 wayland76 o/ PerlJam
14:16 DanielC masak: tuits = ?
14:16 wayland76 My other problem is, he seems to be doing it in P5.
14:16 wayland76 DanielC: The round ones
14:16 DanielC ah
14:16 wayland76 You know ... a round tuit :)
14:16 ElectricHeavyLan joined #perl6
14:17 moritz_ wayland76: it's only an implementation. The protocol, formats etc. matter much more
14:17 azawawi moritz_: i guess it is related to this: http://lists.parrot.org/pipermail​/parrot-dev/2009-May/002269.html
14:17 DanielC Anyways, I think that CPAN 6 should b written in Perl 6. We need to samples of Perl 6 code to test anyways, right?
14:17 azawawi moritz_: root_new opcode
14:18 moritz_ azawawi: might be. I'm by no means an expert
14:18 wayland76 DanielC: That's my thought, but someone else may get a tuit first
14:18 moritz_ DanielC: that's an idealistic goal, not a pragmatic one. IMHO pragmatism comes first.
14:18 wayland76 moritz_: re; implementation, agree, I think
14:18 wayland76 moritz_: Do you think that P6 is just about up to it?
14:18 DanielC moritz_: There is a pragmatic factor though. Writing stuff in Perl 6 is one way to help find bugs in a Perl 6 implementation.
14:18 azawawi moritz_: so who's the expert on this one so i can follow up with him/her?
14:19 PerlJam moritz_: if he's volunteering to write it in p6, don't discourage him!  :)
14:19 DanielC moritz_: So it serves a real purpose.
14:19 moritz_ azawawi: probably pmichaud
14:19 moritz_ DanielC: I know
14:19 moritz_ DanielC: I just don't see the fact that something is in p5 as discouraging
14:19 moritz_ (etoomanyhilights)
14:19 DanielC ok
14:20 masak DanielC: tuits are units of project hacking time. http://masak.org/carl/w/index.php/Tuit
14:20 azawawi moritz_: thx
14:20 moritz_ wayland76: p6 still needs a lot of plubmbing
14:20 wayland76 moritz_: for instance?
14:20 wayland76 (not that I don't agree, but I'm just wondering what you see as the problem ATM)
14:20 PerlJam "the problem"?
14:20 moritz_ wayland76: for example a working qx for windows, robust tools for downloading stuff, parsing serialization formats
14:21 moritz_ (like xml, json, yaml, and actually turning it into data structures)
14:21 wayland76 That third one sounds like Tree.pm :)
14:22 Matt-W Surely Tree.pm should be a data structure
14:22 wayland76 By qx, do you mean eg.   $a = qx/this is a string/
14:22 Matt-W and there should be other modules which do the parsing and serialisation
14:22 moritz_ wayland76: yes
14:22 wayland76 Matt-W: Well, yes, but it has Inputters and Outputters (or something)
14:22 wayland76 And they do XML :)
14:23 moritz_ I'm working on a JSON parser in the background
14:23 DanielC He he he... I just got it... tuit... when I get a round tuit -> when I get around to it... he he he.
14:23 moritz_ the parser works, the reduction methods seem to expose some hard-to-isolate rakudobug
14:23 Matt-W wayland76: are they included in Tree.pm, or do you have to use Tree::XML?
14:23 jnthn DanielC: It took me a while to get it too. ;-)
14:23 Matt-W DanielC: wow, I hadn't noticed that, I just thought it was some obscure thing I'd missed
14:23 DanielC heh
14:23 wayland76 Oh, I thought you'd all gotten it.  Sorry :)
14:24 Matt-W so that's where tuits comes from
14:24 wayland76 Matt-W: Well, I'm hoping that once I construct the core Tree.pm, other people will do Tree::XML :)
14:24 jnthn Suddenly everybody understands! ;-)
14:24 * PerlJam suddenly feels old.
14:24 ascent_ moritz_: I wrote to Mark months ago, after short CPAN6 discussion here. He didn't respond. Hope you got better. I'm interested in planning/developing CPAN6.
14:25 wayland76 I'm just trying to remember if I did too :)
14:25 moritz_ ascent_: /msg (or simply write) me your email address, and I'll put you CC' as well
14:25 wayland76 Incidentally, there's some stuff about packaging format in the specs
14:25 * Matt-W definitely has a shortage of tuits
14:25 Matt-W Especially since my sister decided to ask me to write her some music
14:26 Matt-W Which she needs in under a fortnight
14:26 wayland76 Matt-W: Welcome to the club.  Polyphasic sleep? :)
14:26 wayland76 What kind of music?
14:26 wayland76 (ie. traditional/classical/popular )
14:27 Matt-W wayland76: I'm not sure yet, I've put the first few bars together and I have no idea what it is!
14:27 Matt-W wayland76: The only thing I know for sure is that it's for solo oboe
14:28 masak http://metacool.typepad.com/metac​ool/2006/08/people_are_not_.html
14:28 wayland76 Solo.  That's harder :)
14:28 masak (that link is on the topic of 'getting things done now rather than thinking about getting them done')
14:29 Matt-W masak: yes, but *which* thing should I do
14:30 masak Matt-W: I wasn't referring to your TODO list specifically. I was referring to the ambitious discussions about a CPAN replacement. :)
14:30 PerlJam Matt-W: if you can prioritize, then pick the highest priority thing.  If you can't prioritize, pick the most interesting thing.  If they're all interesting things, then just pick one at random because it doesn't much matter.
14:30 ejs1 joined #perl6
14:30 masak PerlJam: good answer. I was going to write something like "the things you care about".
14:31 Matt-W PerlJam: that's a very good answer
14:31 Matt-W I prioritise the tune for my sister, and my own recorder practise, because they both have quite tight deadlines at the moment
14:31 Matt-W and also the cooking of dinner, because there's a deadline on eating too :)
14:31 masak literally.
14:32 Matt-W yes
14:33 wayland76 ...and talking on IRC, because it's interesting :)
14:33 Matt-W well I'm at work at the moment, so I can'd do any composing or practising
14:34 wayland76 I'm glad you said that.  I just noticed it's after midnight here.  Thanks all for the great discussion, and thanks jnthn for the help with Rakudo -- I'm in the process of moving ahead now.
14:35 rindolf joined #perl6
14:35 wayland76 Well, I'll leave Parrot to its compiling, and go to bed
14:35 wayland76 'night all :)
14:35 rindolf wayland76: night.
14:37 Matt-W night!
14:39 masak night, wayland76.
14:45 * jnthn ponders using a goto
14:46 * jnthn looks nervously at Djkstra's portrait frowing at him
14:46 * moritz_ wonders if there's a nice xkcd comic on that topic
14:46 PerlJam Why do you have a portrait of Djikstra?
14:47 moritz_ http://i.techrepublic.com.com/blogs/goto.png
14:47 moritz_ http://imgs.xkcd.com/comics/goto.png # the original
14:47 jnthn What, you mean all programmers don't have paintings of favorite computer scientists adorning their walls?
14:47 masak I sincerely believe there are times when a goto instruction is appropriate.
14:48 PerlJam masak: indeed.
14:48 Matt-W so do I
14:48 jnthn Yeah. I could avoid it, but it's a lot easier to explain the goto.
14:48 PerlJam That's why it's good we have Larry as language designer.  He's all about letting the programmers make their own decisions
14:48 Matt-W I also don't believe that learning BASIC first cripples programmers
14:48 masak what Dijkstra succeeded in doing was inflaming the topic forever. :)
14:49 Matt-W Because I learned BASIC first, and I'm fine...
14:49 masak Matt-W: same here.
14:49 Matt-W Well, maybe not according to him
14:49 jnthn masak: I learned BASIC second, after Logo. ;-)
14:49 Matt-W Since I occasionally use goto
14:49 masak jnthn: :D
14:49 Matt-W I learned Logo second
14:49 Matt-W then Pascal
14:49 moritz_ it's a bit like PBP: not everybody agrees, but it has certainly spawned useful discussions
14:49 masak I was so eager to program as a child that I wrote long BASIC programs on paper, before I had a computer.
14:49 rindolf I learned BASIC first too. :-D
14:50 Matt-W Fortran, C, C++, Java, Haskell, Perl, PHP (forgive me), Epigram, Perl 6
14:50 Matt-W masak: it's what got me to learn to type
14:50 Matt-W well, that and writing stories
14:50 Matt-W which is a lot easier when your fingers can start to keep up with your brain
14:50 jnthn Logo, BBC Micro Basic, QBasic, Visual Basic, Perl 5, C#, C, ML, Java...
14:51 masak Matt-W: programming taught me English.
14:51 masak I also did a fair amount of non-trivial game programming in Lotus 1-2-3.
14:52 PerlJam masak: I had a subscription to "home computer magazine" which had basic programs for IBM PC/PC jr, TI 99, Apple, Commodore, etc.  I would spend time actually keying them in so that I could understand what it did (and play the resultant game :)
14:52 masak PerlJam: I had similar experiences with a large book from the library containing lots of BASIC games.
14:53 DanielC I learned QBasic, then Logo.
14:53 jnthn I remember the computer mags that had the hex listings you typed into the DEBUG program.
14:53 jnthn Man it was un-fun trying to spot the typos.
14:53 jnthn Especially because in those days without multi-tasking and little protection you could easily freeze up/hose the machine.
14:53 Matt-W PerlJam: I inherited a large number of such things, which had all the programmes provided for BBC Micro, Acorn Electron, Commodore 64 and Vic 20, Sinclair Spectrum and ZX80, etc.
14:54 PerlJam And Dr Dobb's Journal sort of taught me C.  I knew pascal, but DDJ had tons of C code in addition to pascal, so I would translate the C to pascal and vice versa in order to learn.
14:54 Matt-W I learned C from a friend's Dad, who is fantastic at low-level stuff
14:54 jnthn I think I learned C in freshers week at uni, and shortly afterwards realized I was meant to spend that time learning who the other people in my yeargroup were instead...
14:54 Matt-W he showed me a big graphical programme he wrote from scratch
14:55 PerlJam (am I the only one who never really learned logo?)
14:55 Matt-W ran on DOS, doiung all the mouse handling in his own assembly
14:55 Matt-W jnthn: nah, you don't need to know that
14:55 pmichaud good morning, #perl6
14:55 Matt-W jnthn: I never did
14:55 moritz_ good localtime() pmichaud
14:55 * DanielC waves
14:55 Matt-W pmichaud: hai
14:56 Matt-W we can haz custom operator pre-cee-dents?
14:56 jnthn hi pmichaud
14:56 literal rakudo: say $?LANG
14:56 p6eval rakudo 870bf3: OUTPUT«Symbol '$?LANG' not predeclared in <anonymous> (/tmp/IwWCvjcY9W:1)␤in Main (src/gen_setting.pm:3166)␤»
14:57 masak pmichaud: greetings.
14:58 rjbs morning!
14:58 rjbs I went to http://dev.perl.org/perl6/ looking for the up to date synopses.  It directed me (among other plces) to http://github.com/rakudo/rakudo/tree/master
14:58 * pmichaud catches up on four days of backlog.
14:58 literal rjbs: http://perlcabal.org/syn/
14:58 rjbs Could someone with login to rakudo@github add a "home page" entry for the project?
14:58 rjbs literal: Oh, I found them. :)  I just wanted to bring up the lack of a home page on the github project.
14:58 rjbs but thanks!
14:59 * jnthn breaks off form a productive couple of hours dispatcher work
15:00 masak PerlJam: no, I didn't learn LOGO either. I think I learned quite early that it existed, though.
15:00 pmichaud rjbs: Done.
15:00 rjbs Thanks!
15:01 rjbs I'm starting to think that if S26 allows =cut as a no-op, it would be possible to embed Pod6 in Perl5 code.
15:01 Matt-W jnthn: Oooh dispatcher improvements?
15:01 rjbs and that Pod::Eventual could easily be made to handle it
15:03 alester joined #perl6
15:04 jnthn Matt-W: Enormous re-factor.
15:04 jnthn Matt-W: Which maps us better onto Parrot dispatch semantics, improves performance, gets deference working...
15:05 jnthn Matt-W: But it's quite a big/painful chunk of work.
15:05 masak sounds great, though.
15:05 jnthn Progressing well enough though. Only a few failures in sanity tests, and I'm not too far off solving those.
15:06 literal rjbs: hm, how so?
15:06 rjbs There are two major problems with allowing Pod6 in Perl5.
15:06 rjbs (1) Pod6 does not require a =cut after most command paragraphs.  This would confuse the perl5 compiler.
15:07 rjbs (2) The existing tools would not undersatnd it.
15:07 rjbs (1) is solved be saying that /^=cut$/ has no effect at all.
15:07 literal yeah
15:07 rjbs (2) can be addressed in many ways; one is to use Pod::Weaver/etc to rewrite documents to Pod5 as possible, embedding the Pod6 for tools that learn to understand it.
15:08 rjbs I'm not in a hurry to do it.  I'm just letting it simmer in the back of my mind while I work on Pod stuff.
15:09 DanielC rjbs: If you are going to write Pod::xyz why not make it insert =cut's at the appropriate places instead of modifying Pod?
15:09 * jnthn -> pm group, see you all later
15:09 rjbs DanielC: because then the code won't compile until the pod is rewritten
15:10 DanielC k
15:10 rjbs When I build a dist with Dist::Zilla and it uses pod-rewriting features, the Pod is still valid insofar as the perl5 compiler is concerned, so I can still test.
15:17 pmurias joined #perl6
15:21 donaldh joined #perl6
15:28 abra joined #perl6
15:33 fridim_ joined #perl6
15:37 eMaX joined #perl6
15:42 payload joined #perl6
15:44 nihiliad joined #perl6
15:45 rhr joined #perl6
15:53 Matt-W jnthn: Sounds good work. Rock on.
15:54 tulcod joined #perl6
16:07 DanielC You know what we could do? Make the current "cpan" program figure out if the thing it's looking at is a Perl 6 module or not, and if it is, it would call it using the "new and improved" cpan6.
16:07 DanielC So we can mix together Perl 6 and Perl 5 modules in the same cpan without losing the ability to make changes to cpan.
16:10 PerlJam DanielC: does the existing CPAN infrastructure hold enough meta-information for Perl 6?
16:11 DanielC I thought obra_ said that they could add a "perl 6" flag or something.
16:12 DanielC Presumably that's all we need.
16:15 DanielC I imagine that the distribution in cpan is just a .tgz file, so we are free to change the contents as long as we have a way to tell cpan to use "cpan-p6" to process this package.
16:21 PerlJam In theory, theory and practice are the same.  In practice, they aren't :)
16:23 DanielC :-)
16:38 azawawi joined #perl6
16:39 azawawi pmichaud: ping
16:39 pmichaud pong
16:39 dalek rakudo: 6953001 | pmichaud++ | docs/spectest-progress.csv:
16:39 dalek rakudo: spectest-progress.csv update: 394 files, 11343 passing, 0 failing
16:39 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/6​95300177166915cba179726673c6d24abaed0f7
16:41 azawawi pmichaud: regarding fake executables, they're not working anymore in latest rakudo. I think the cause is the root_new opcode (see RT #65994)
16:42 pmichaud they work for me.  Did you run with --gen-parrot to get the correct version of parrot?
16:42 pmichaud More to the point, what revision of parrot do you have?
16:43 azawawi yeah; it didnt also work for other people (see yesterday's backlog)
16:43 azawawi 39025
16:44 Psyche^ joined #perl6
16:44 pmichaud azawawi: can I get you to start from a completely fresh checkout of rakudo (using --gen-parrot) and see if the problem still exists?
16:45 azawawi pmichaud: sure
16:46 pmichaud oh, wait, I see what you're saying.  You're able to build Rakudo okay, but not able to convert Perl 6 programs into standalone executables...?
16:47 pmichaud I thought Rakudo wasn't building.
16:47 pmichaud Hmmm.
16:48 azawawi yeah
16:48 azawawi pmichaud: parrot trace ... http://sial.org/pbot/36830
16:48 azawawi pmichaud: so generating pir from perl6 is not working under parrot
16:49 * azawawi deletes parrot dir from rakudo and checks it out again...
16:49 pmichaud azawawi: Okay.  I suspect the problem isn't the root_new opcode itself, but rather than the order-of-loading has changed.
16:49 jferrero joined #perl6
16:49 pmichaud I need to build Rakudo to check, though.
16:49 pmichaud (building now)
16:49 azawawi pmichaud: ok
16:52 azawawi im seeing new performance fixes for pbc_2_exe in latest parrot
16:52 pmichaud I just got back in this morning, so I'm still reviewing 4+ days of commits and tickets :-)
16:57 azawawi pmichaud: same thing with a fresh parrot checkout. The problem is still there :(
16:57 pmichaud okay, it appears to be a problem with the PMCProxy code.
16:57 pmichaud (in Parrot)
16:58 pmichaud root_new exposes it, but root_new isn't the source of the problem.
16:58 azawawi ah i remember reading something about that before
16:59 azawawi the new hll performance hit...
16:59 pmichaud correct.
16:59 pmichaud I'm guessing that PMCProxy objects for dynpmcs aren't being created properly.
17:00 pmichaud I have to run some errands -- I'll diagnose it further when I get back.
17:00 azawawi i'll check against latest parrot meanwhile
17:03 acajou joined #perl6
17:07 justatheory joined #perl6
17:13 acajou rakudo: my @tt = (1, 2, 3, 4); sub zap(@input is readonly) { @input[99] = 666; }; zap(@tt); say @tt[99];
17:13 p6eval rakudo 695300: OUTPUT«666␤»
17:14 DanielC In Perl 6, will it be easy to integrate with C if there are multiple distributions of Perl?
17:15 mberends_mibbit left #perl6
17:16 moritz_ well, we'd need a unified NCI API
17:19 acajou rakudo: my @tt[4] = (1, 2, 3, 4); sub zap(@input is readonly) { @input[99] = 666; }; zap(@tt); say @tt[99];
17:19 p6eval rakudo 695300: OUTPUT«Statement not terminated properly at line 1, near "[4] = (1, "␤in Main (src/gen_setting.pm:0)␤»
17:19 azawawi pmichaud: same problem on latest parrot; but the good news is that rakudo seems to pass tests without problems on it.
17:19 DanielC Is rakudo a Perl 6/Rakudo irc bot?
17:20 DanielC rakudo: 2+2
17:20 p6eval rakudo 695300:  ( no output )
17:20 DanielC rakudo: say 2+2
17:20 p6eval rakudo 695300: OUTPUT«4␤»
17:20 DanielC cool
17:20 literal Rakudo is a Perl 6 implementation
17:20 LadyLunacy joined #perl6
17:21 literal pugs: say <rakudo smop pugs>.pick;
17:21 p6eval pugs: OUTPUT«rakudo␤»
17:21 literal \o/
17:21 DanielC cool
17:21 moritz_ p6eval is the bot that executes code through rakudo and other implementations
17:21 * DanielC is trying to figure out how to start a conversation between rakudo and pugs.
17:22 moritz_ rakudo: run 'pugs -e "say q[hi from pugs]"'
17:22 p6eval rakudo 695300: OUTPUT«sh: pugs: command not found␤»
17:22 DanielC What happens if I write racudo: while(1) { say "hello" } ?
17:22 moritz_ it will run into a resource limit, and the output is limited
17:23 literal or....
17:23 literal rakudo: while(1) { say "hello" }
17:23 p6eval rakudo 695300: OUTPUT«Statement not terminated properly at line 1, near "{ say \"hel"␤in Main (src/gen_setting.pm:0)␤»
17:23 literal rakudo: while(1) { say "hello" };
17:23 p6eval rakudo 695300: OUTPUT«Statement not terminated properly at line 1, near "{ say \"hel"␤in Main (src/gen_setting.pm:0)␤»
17:23 moritz_ you need whitespaces after while
17:23 literal damn, hoping it would bail because while() is not defined
17:24 moritz_ no, it's two terms in a row
17:24 moritz_ std: while(1) { 1 }
17:24 p6eval std 26938: OUTPUT«##### PARSE FAILED #####␤while() interpreted as function call at line 1 ; please use whitespace instead of parens␤Unexpected block in infix position (two terms in a row) at /tmp/dg1WW9Fu9M line 1:␤------> [32mwhile(1) [31m{ 1 }[0m␤    expecting any of:␤       infix or
17:24 p6eval ..meta-infix␤      infi…
17:24 ashizawa joined #perl6
17:24 DanielC rakudo: while (1) { say "JAPH" }
17:24 pochi is () needed?
17:24 moritz_ rakudo: run '/home/evalenv/pugs/pugs -e "say q[hi from pugs]"'
17:25 moritz_ pochi: no
17:25 literal pochi: it's discouraged, actually, I think
17:25 DanielC rakudo: while 1 { say "JAPH" }
17:25 * acajou wonders if someone now needs to go kill rakudo spinning in an infinite loop...
17:25 moritz_ DanielC: I'd appreciate if you didn't denial-of-service attack p6eval like that ;-)
17:26 pochi is rakudo coded with perl6?
17:26 moritz_ acajou: no, it just needs a few seconds until the timeout kicks in
17:26 moritz_ pochi: no, perl 5
17:26 literal O_o
17:27 acajou rakudo: say "I'm alive";
17:27 acajou Hmmm...
17:27 moritz_ ah, the while 1 only consumes IO, not CPU time
17:27 moritz_ and the timeout is only CPU time, not wallclock time
17:28 moritz_ oh well, I'll kill it now
17:28 DanielC Oh oh, to make the DOS worse you could run 'while 1 { fork(); say "hello" }'
17:28 p6eval joined #perl6
17:28 literal that would consume cpu and die :)
17:28 moritz_ DanielC: no fork in rakudo yet ;-)
17:28 literal that too...
17:28 acajou DanielC: I think some goodwill is required here...
17:28 DanielC :)
17:28 moritz_ rakudo: run '/home/evalenv/pugs/pugs -e "say q[hi from pugs]"'
17:28 pochi I imagined something like: eval { alarm 5; eval_rakudo_code; alarm 0 }
17:28 p6eval rakudo 695300: OUTPUT«hi from pugs␤»
17:29 moritz_ pochi: it's a ulimit
17:29 moritz_ pochi: but patches welcome ;-)
17:29 DanielC Is system() being replaced by run() ?
17:29 moritz_ yes
17:30 DanielC ok
17:30 pochi moritz_: pointer to the code?
17:30 DanielC Sounds good. Things you do often should be short.
17:30 moritz_ pochi: http://svn.pugscode.org/pugs/misc/evalbot
17:30 pochi ty
17:30 moritz_ (pugs repo, misc/evalbot/)
17:31 pugs_svn r26939 | moritz++ | [evalbot] try to set an alarm() too
17:31 pugs_svn joined #perl6
17:31 moritz_ let's see if that works
17:32 p6eval joined #perl6
17:32 moritz_ rakudo: sleep(10); say "alive";
17:32 p6eval rakudo 695300:  ( no output )
17:32 acajou Ah, what's the "appropriate" way to get the size of an array in Perl6?
17:32 literal .elems
17:32 moritz_ acajou: use it in numeric context, or .elems
17:34 acajou rakudo: my @tt = (1, 2, 3, 4); say @tt.elems; sub zap(@input is readonly) { @input[99] = 666; }; zap(@tt); say @tt.elems;
17:34 p6eval rakudo 695300: OUTPUT«4␤100␤»
17:34 ruoso joined #perl6
17:34 acajou Thanks.
17:34 moritz_ acajou: note that 'is readonly' (which is also the default) only means that you can't assign to @input
17:34 acajou Still think the begavior above is rather counterintuitive.
17:34 moritz_ not deep immutability
17:34 azawawi moritz_: http://feather.perl6.nl/~az​awawi/generate_pir_exe.png
17:34 * ruoso finally has internet again...
17:35 ruoso forgetting to pay the internet bill sucks
17:35 moritz_ azawawi: it's spelled "Perl 6", not "Perl6"
17:35 acajou I would have thought that changing the length of an array would qualify as breaking read-only-ness.
17:35 moritz_ azawawi: apart from that: nice
17:36 moritz_ acajou: feel free to ask p6l for clarification
17:36 moritz_ acajou: it's quite often discussed, and not very clear in the specs
17:36 azawawi moritz_: hmmm i thought it was Perl6 :)
17:36 acajou Well, it's not very DWIMy at least.
17:37 moritz_ acajou: well, write a mail, and ask for clarification, stating your point.
17:37 moritz_ azawawi: 'Perl6' is nearly not used in the specs at all
17:37 acajou moritz_ may do that...  I'm just the peanut gallery though.
17:38 moritz_ acajou: it's not only interesting for you
17:38 moritz_ (at not at all in the TimToady-maintained parts of the spec, except in links)
17:38 moritz_ pochi++ # alarm worked
17:39 literal acajou: are you familiar with a language where it works as you expected above?
17:39 literal i.e. where you can't reassign the array nor call mutating methods on it
17:39 pochi moritz_: you fixed it already?
17:39 moritz_ pochi: yes
17:39 pochi :-)
17:40 FurnaceBoy joined #perl6
17:41 moritz_ rakudo: sleep(10); say "alive"; # for pochi
17:41 moritz_ .oO( hope it works )
17:41 moritz_ rakudo: say 1
17:41 moritz_ uhm.
17:41 moritz_ that didn'T work out too well
17:41 p6eval rakudo 695300:  ( no output )
17:41 p6eval rakudo 695300: OUTPUT«1␤»
17:41 acajou literal been a while for me... Only remember a looong time ago things with const in C++ but...
17:41 moritz_ oh, it did, the server just had a horrible load
17:41 azawawi moritz_: fixed the typo ... thx
17:41 pochi or it slept for 10 ... ?
17:42 pochi nm
17:42 moritz_ pochi: then it would have said "alive"
17:42 literal nah, didn't sleep for 10 seconds, since the reply came back 8 seconds later
17:42 acajou my point isn't that it should behave differently - but that this behavior maybe shouldn't be called "readonly".
17:42 pochi but "while 1" was the initial problem
17:42 moritz_ rakudo: while 1 { say "foo" }
17:42 p6eval rakudo 695300: OUTPUT«foo␤foo␤foo␤foo␤foo␤foo␤foo​␤foo␤foo␤foo␤foo␤foo␤foo␤foo␤foo␤»
17:42 acajou Though once fixed sized arrayrs exit the problem is lessened, I guess.
17:42 moritz_ killed after 5s
17:42 pochi nice
17:42 acajou (s/exit/exist/)
17:43 literal acajou: hm, I could see that "readonly" would be confusing in this case, but I can't think of a better word...
17:43 DanielC Does Rakudo let you compile Perl 6 to Parrot bytecode? So you don't have to re-compile next time?
17:43 acajou It's like the memory pointer is readonly...  That's not a lot of read-only-ness. :)
17:44 moritz_ DanielC: aye
17:44 literal unreassignable isn't very short...
17:44 DanielC thanks
17:44 moritz_ DanielC: http://perlgeek.de/blog-en/pe​rl-6/my-first-executable.html (it's a bit broken atm, but generally works)
17:45 acajou Last time I was here, I was told the *container* was read-only, but not the contents.  It isn't even that deep though.
17:45 DanielC *click*
17:45 acajou literal: "fixed"?
17:46 acajou "sticky"?
17:46 DanielC moritz_: That's very cool, thanks.
17:47 literal acajou: I like those
17:47 literal especially if the immutability you described becomes available (as "is readonly")
17:48 acajou "glued" even...
17:50 literal "permanent"?
17:50 acajou literal: although I guess you could use "is immutable" to make it stronger than "is readonly".
17:50 literal yeah
17:50 azawawi literal: hi
17:50 literal hello
17:51 azawawi literal: are u working on u4x/grok?
17:51 literal yeah
17:51 acajou Anyhow - thanks for the feedback.  Guess I gotta join p6l now. :)
17:52 azawawi literal: cool, since i need a cool perl6 documentation indexer pretty soon :)
17:52 azawawi literal: since i have been relying on parsing S29 so far...
17:52 literal hehe
17:52 azawawi literal: in padre perl6 plugin
17:54 literal some part of the time in my proposal schedule is dedicated to padre integration, so I could help you with that
17:55 DanielC Can Rakudo currently run Perl 5?
17:55 DanielC (I know that Perl 6 is supposed to come with a Perl 5 compat mode)
17:56 literal nah
17:56 DanielC ok
17:56 szabgab azawawi, literal  just throwing in a word, the calltips we show in padre should come from that documentation so it won't be Padre only
17:56 szabgab but I have to go now &
17:58 azawawi literal: so grok is going to be like perldoc but a bit more modern, right?
17:58 literal I think so
17:58 PerlJam hopefully grok is smarter than perldoc
17:59 mizioumt joined #perl6
17:59 literal smarter how?
18:00 PerlJam little things.   Like right now, users of perldoc must know to do "perldoc -f" and "perldoc -q" and such.  grok could be smarter about that.
18:00 literal yeah
18:01 azawawi literal: basically it is should be the coolest search engine/doc reader for Perl 6 :)
18:01 PerlJam also, at some point, it could probably provide some useful "see also" information based on a parse (in the PPI sense) of modules.
18:02 literal bsaed on a parse of modules? could you elaborate?
18:03 PerlJam Like if grok pull up the documentation for module X,  it could look at what other modules module X uses and automatically mention them in the output.
18:03 PerlJam (for example)
18:05 PerlJam With the improved introspection and such in perl 6, grok could also transparently provide all the docs for objects (including roles and inheritance) without tell the user look here for X and here for Y and here for Z
18:05 literal yeah, that could be nice, but the modules should probably document that themselves because there's no way to filter out the uninteresting bits
18:05 literal "See also: Array, List, ..."
18:07 azawawi literal: i was also thinking of indexing perl 6 examples (github) + t/spec (pugs)  + u4x on feather and using that index in Padre Perl 6 plugin
18:07 azawawi literal: sort of search based on content autocomplete box for finding helpful examples/tests/docs...
18:08 PerlJam sure, modules should document themselves, I'm just not a fan of chasing documentation through an inheritance heirarchy.  Saying "this module inherits from module X" isn't good enough (IMHO) when I look at module X and it inherits from modules Y and Z and then I have to leave this documentation and go look at another.  grok could unify the inheritance into a single view.
18:09 literal definitely worth looking into
18:10 azawawi literal: so grok is going to be written in Perl 6 or 5?
18:11 literal I've started writing it in Perl 5, since Perl6::Perldoc (written in Perl 5) is fast and feature-complete
18:11 literal which parses Pod 6
18:11 PerlJam literal++   pragmatism for the win  :)
18:12 azawawi literal: makes sense
18:14 pmichaud .elems
18:14 DanielC Is perl6-language@perl.org the main mailing list for Perl 6 development? It looks a bit quiet.
18:14 pmichaud oops, was in backscroll.
18:14 pmichaud perl6-language describes languages features and changes
18:14 pmichaud perl6-compiler describes the compiler implementation and details
18:14 pmichaud right now most Perl 6 development tends to take place here.
18:14 DanielC ok
18:15 [particle]- here being #perl6, not perl6-compiler
18:15 DanielC So if I had a suggestion that took a little while to explain I would add a page to the wiki and post it here?
18:15 pmichaud long suggestions should go to perl6-language
18:15 DanielC ok
18:16 pmichaud perl6-language is still the primary source for detailed discussions, yes.
18:16 PerlJam DanielC: or if you could synopsize, that would be best.  Odds are good your suggestion has already been considered at some point.
18:16 DanielC But for example, the earlier discussion about CPAN doesn't seem to fit in per6-language.
18:16 azawawi PerlJam: looking at the definition of pragmatism, qq{realism: the attribute of accepting the facts of life and favoring practicality and "literal" truth}
18:17 pmichaud actually, perl6-language is where it should probably go.
18:17 DanielC PerlJam: Yeah, I'm sure. I wasn't actually thinking of any suggestions for changing the language itself. Which is why perl6-language didn't seem appropriate.
18:17 pmichaud however, CPAN discussions tend to degenerate quickly, so many of us tend to ignore them.
18:17 DanielC hm
18:17 pmichaud (I haven't read the earlier discussion about cpan, fwiw)
18:17 literal azawawi: hwhw
18:18 literal hehe*
18:18 DanielC pmichaud: I guess it is a bit of a bikeshed topic?
18:18 [particle]- no, that's not it.
18:18 azawawi literal: :)
18:18 [particle]- what cpan needs is a round of try-and-fail
18:18 pmichaud bikeshed, partially, but also that we have lots of people with opinions but few people who actually implement.
18:18 [particle]- it's mostly talk atm.
18:18 PerlJam DanielC: I think the cpan6 (or whatever you want to call it) just needs a working prototype
18:18 PerlJam DanielC: what [particle] said.
18:19 DanielC ok
18:20 barney joined #perl6
18:20 DanielC On an unrelated topic: Would it be a good idea to submit some benchmarks to the Debian language shootout page? Just to see how Perl 6 (Rakudo) compares and perhaps as a way to find performance issues?
18:21 [particle]- DanielC: yes
18:21 pmichaud DanielC: we know rakudo will not do well now, but it's worth submitting.
18:21 DanielC It doesn't sound too hard, since there are already Perl 5 benchmarks one can copy and migrate to Perl 6.
18:21 pmichaud any implementation/writing of code tends to help Rakudo development.
18:22 DanielC Ok. I'll send an email to the Shootout guys later asking if they'd mind installing Rakudo. I can't imagine them saying no. I'll also look at the benchmarks to see if I can figure them out.
18:23 mizioumt1 joined #perl6
18:23 pmichaud it might also be nice to have the benchmarks held in the perl6-examples repo or something like that.
18:23 DanielC good idea
18:24 DanielC I think I'll look at the benchmarks /first/ before I bug the Shootout guys.
18:24 pmichaud that seems like a good idea.
18:41 moritz_ rakudo: my $a
18:41 p6eval rakudo 695300:  ( no output )
18:41 moritz_ rakudo:  $a
18:41 p6eval rakudo 695300: OUTPUT«Symbol '$a' not predeclared in <anonymous> (/tmp/hMivN0DFZd:1)␤in Main (src/gen_setting.pm:3166)␤»
18:42 payload joined #perl6
18:46 sahadev joined #perl6
18:48 icwiener joined #perl6
18:50 [particle]1 joined #perl6
18:58 mizioumt joined #perl6
19:09 azawawi left #perl6
19:10 lucs joined #perl6
19:10 iblechbot joined #perl6
19:14 ZuLuuuuuu joined #perl6
19:14 daxelrod joined #perl6
19:17 icwiener_ joined #perl6
19:19 kapro joined #perl6
19:20 donaldh joined #perl6
19:20 DemoFreak joined #perl6
19:23 mizioumt1 joined #perl6
19:23 mizioumt1 joined #perl6
19:24 barney joined #perl6
19:28 DanielC print $*IN does not do what I expect.
19:29 DanielC I thought it would print the first line of stdin. But instead it gives IO()<some gibberish>
19:31 DanielC Can someone tell me how to read from stdin in Perl 6?
19:33 [particle]- buubot: spack stdin
19:33 buubot [particle]-: Sorry, I couldn't find any matches for: stdin
19:33 justatheory joined #perl6
19:33 [particle]- buubot: spack \$\*IN
19:33 buubot [particle]-: S02-bits.pod:3 S04-control.pod:2 S11-modules.pod:1 S29-functions.pod:1
19:34 DanielC for $*IN.lines -> $line {...}
19:34 pmichaud DanielC: print $*IN.get;
19:34 [particle]- my $line = $*IN.get;  my @lines = $*IN.lines;  #  see S29
19:34 DanielC thanks
19:34 pmichaud should be the standard Perl 6.  Might be broken in Rakudo at the moment, though.
19:34 DanielC So *.get tives you the entire thing as one big string?
19:34 justatheory joined #perl6
19:35 DanielC It works!
19:37 ejs joined #perl6
19:40 pmichaud .get should only give one line.
19:40 pmichaud That's the "broken in Rakudo" part.
19:41 pmichaud To get the entire string is .slurp  iirc
19:41 DanielC buubot: spack IN.slurp
19:41 buubot DanielC: Sorry, I couldn't find any matches for: IN.slurp
19:41 DanielC buubot: spack IN.get
19:41 buubot DanielC: Sorry, I couldn't find any matches for: IN.get
19:41 pmichaud buubot: spack slurp
19:41 buubot pmichaud: S02-bits.pod:3 S03-operators.pod:4 S04-control.pod:1 S06-routines.pod:19 S09-data.pod:1 S10-packages.pod:1 S13-overloading.pod:1 S16-io.pod:4 S29-functions.pod:1
19:42 pmichaud (it's very unlikely you'll find IN.slurp or IN.get, since .slurp and .get are defined on filehandles generally and not just $*IN
19:42 DanielC ok
19:43 DanielC buubot: spack .slurp
19:43 buubot DanielC: S02-bits.pod:3 S03-operators.pod:4 S04-control.pod:1 S06-routines.pod:19 S09-data.pod:1 S10-packages.pod:1 S13-overloading.pod:1 S16-io.pod:4 S29-functions.pod:1
19:43 DanielC Damn it. My Firefox just froze.
19:44 DanielC Ok, I can't find .slurp in S2
19:44 pmichaud buubot:  spack \.slurp
19:44 buubot pmichaud: S16-io.pod:1
19:44 pmichaud (note that buubot takes regexes)
19:44 pmichaud buubot:  spack =item slurp
19:44 buubot pmichaud: S01-overview.pod:14 S02-bits.pod:142 S03-operators.pod:165 S05-regex.pod:247 S06-routines.pod:23 S07-iterators.pod:10 S09-data.pod:2 S11-modules.pod:3 S16-io.pod:70 S17-concurrency.pod:28 S19-commandline.pod:52 S22-package-format.pod:10 S26-documentation.pod:76 S29-functions.pod:164
19:44 pmichaud buubot:  spack '=item slurp'
19:44 buubot pmichaud: Sorry, I couldn't find any matches for: '=item
19:45 DanielC I must be doing something wrong. I can't find slurp in http://perlcabal.org/syn/S16.html
19:45 pmichaud Neither can I.
19:46 pmichaud Perhaps buubot is working from some outdated specs.
19:46 DanielC No matter. slurp works so I'll leave it with slurp.
19:47 DanielC $content =~ s/(^>.*)?\n//g;   =>  Statement not terminated properly near "/(^>.*)?\\n"
19:48 pmichaud Rakudo doesn't understand s///  yet.  Try .subst
19:48 DanielC buubot: subst
19:48 DanielC :(
19:48 pmichaud S05
19:49 DanielC $str.subst(/pat/, "replacement");
19:49 DanielC thanks
19:49 pmichaud and $str.subst(/pat/, "replacement", :global)
19:49 DanielC Is :global the equivalent of /g ?
19:50 pmichaud Yes.  I think  :g also works.
19:50 pmichaud and $str.subst(/pat/, "replacement", :g)
19:50 masak joined #perl6
19:51 masak I like that people have high hopes for u4x and grok.
19:52 DanielC $content.subst(/(^>.*)?\n/, '', :global);  =>  Statement not terminated properly near "(/(^>.*)?\\"
19:52 masak rakudo: /(^>.*)?\n/
19:52 p6eval rakudo 695300: OUTPUT«Syntax error at line 1, near "/(^>.*)?\\n"␤in Main (src/gen_setting.pm:0)␤»
19:52 masak rakudo: /(^\>.*)?\n/
19:53 p6eval rakudo 695300:  ( no output )
19:53 masak DanielC: you need to escape the '>'.
19:53 masak DanielC: it's a metacharacter in Perl 6 regexes.
19:53 pmichaud all non-word characters must be escaped.
19:53 DanielC ok
19:53 pmichaud but you can use quotes for escaping
19:53 masak rakudo: /_/
19:53 p6eval rakudo 695300:  ( no output )
19:53 DanielC Yeah, I read that but it didn't click.
19:53 pmichaud /(^ '>' .*)? \n/
19:54 DanielC Well... it runs, but it doesn't do what I expect (ie. it seems to do nothing)
19:54 masak if $content.substr(0,1) eq '>' { ... } # ;)
19:55 DanielC If I run $content.subst(...) is that supposed to modify $content or just return the modified string?
19:55 pmichaud it returns the modified string
19:55 pmichaud if you want to modify content itself, use   $content .= subst(... )
19:55 DanielC ok
19:55 masak DanielC: most functions work like that in Perl 6.
19:55 eternaleye joined #perl6
19:55 DanielC Yay! It works now.
19:55 masak (and methods)
19:56 DanielC Is .= a standard method for all functions or is it unique to subst ?
19:56 DanielC ie. Can I write  $str .= myFunction;
19:56 [particle]- my Dog $fido .= new;
19:57 scrottie perldoc perlop
19:57 lambdabot scrottie: You have 1 new message. '/msg lambdabot @messages' to read it.
19:57 masak DanielC: it's similar to +=
19:57 masak yes.
19:57 masak if myFunction is a method :)
19:57 scrottie oh, wait, I'm on #perl6
19:57 masak scrottie: :P
19:57 scrottie oh, wait, I just found scrottie.
19:57 scrottie I've been looking for this window for about a month.
19:57 DanielC masak: Are all functions I make a method?
19:57 kane_ joined #perl6
19:57 masak DanielC: no. you make functions with 'sub foo {...}'
19:58 DanielC Ah, so you use 'method' instead of 'sub' and then the .= magic happens?
19:58 masak DanielC: you make methods (in classes) with 'method foo {...}'
19:58 masak DanielC: yes.
19:58 DanielC Can I add a method that will work on scalars?
19:58 DanielC e.g.  $content .= md5;
19:59 masak DanielC: methods are called with $obj.foo. $obj.=foo is just short for $obj = $obj.foo
19:59 DanielC Makes sense.
19:59 masak DanielC: if you want to inject methods into existing classes, you can use 'augment class Str { ... }'
19:59 DanielC That sounds good.
19:59 masak DanielC: but it's kind of a power-user tool. it's not to be taken lightly.
19:59 DanielC ok
20:00 masak it's very easy to shoot yourself in somebody else's foot that way. :)
20:01 hercynium joined #perl6
20:01 pochi I prefer to be able to shoot at feet, rather than have the feet surgically removed before I even start (ie. java)
20:01 DanielC buubot: length
20:01 DanielC Is the length function gone?
20:02 pochi .elems?
20:02 PerlJam DanielC:  aye.
20:02 PerlJam DanielC: if you want to know the number of characters in a string, use .chars
20:02 PerlJam DanielC: if you want to know the number of bytes in a string, use .bytes
20:02 DanielC ok
20:02 DanielC and the length of an array?
20:02 PerlJam (there are others, but these are the ones people usually ask about)
20:03 PerlJam +@array
20:03 PerlJam (just like perl 5)
20:03 masak rakudo: my @a = 1,2,3; say +@a; say @a.elems
20:03 p6eval rakudo 695300: OUTPUT«3␤3␤»
20:03 DanielC rakudo: say "hello".elems
20:03 p6eval rakudo 695300: OUTPUT«1␤»
20:03 DanielC :-P
20:03 rafl hey. i was wondering what the status of MAD in perl5 is. was it ever used for anything or does the intention to use it still exist? or are there other plans now for what has been tried to achieve with MAD?
20:03 masak DanielC: "hello" is considered a list of one elem.
20:04 DanielC rakudo: say "hello".chars
20:04 p6eval rakudo 695300: OUTPUT«5␤»
20:04 masak rakudo: say .chars, .bytes given '你好'
20:04 p6eval rakudo 695300: OUTPUT«Method 'bytes' not found for invocant of class 'Str'␤»
20:04 masak :/
20:04 PerlJam ah, perhaps bytes isn't implemented yet.
20:05 masak seems it isn't.
20:05 masak pmichaud: would it be difficult? could I give it a shot? :)
20:05 DanielC rakudo: say "hello " . "world"
20:05 p6eval rakudo 695300: OUTPUT«Statement not terminated properly at line 1, near ". \"world\""␤in Main (src/gen_setting.pm:0)␤»
20:05 PerlJam DanielC: you want ~ there
20:05 masak DanielC: it's ~ nowadays.
20:05 DanielC ok
20:06 jferrero joined #perl6
20:06 masak pmichaud: oh, I think I even emailed parrot-dev about this. I'll check that email.
20:06 * DanielC is trying to convert the regex-dna benchmark from he Debian shootout to Perl 6.
20:07 masak DanielC++
20:07 DanielC :-)
20:08 bAndie9100 joined #perl6
20:08 bAndie9100 hi all
20:09 masak bAndie9100: hello there.
20:09 bAndie9100 can you tell me, how can i open a url as a file?
20:09 bAndie9100 in perl
20:09 PerlJam bAndie9100: this is a channel about perl 6.  You probably want #perl or #perlhlep
20:09 PerlJam er, #perlhelp
20:10 masak it's a good question, though. :)
20:10 bAndie9100 ok, i go to
20:10 masak one that I'd like to have an answer to in Perl 6.
20:10 bAndie9100 #perl full
20:10 DanielC Maybe someone knows how to do that in Perl 6 :-)
20:10 masak DanielC: I'd wager 'no' :)
20:11 masak we need a web client for that.
20:11 PerlJam DanielC: everywhere the perl 5 implementation uses regex withing strings, you want to use rx/regex here/ instead  (probably)
20:11 pochi I spot a IO::Socket::INET in the repository ...
20:12 bAndie9100 left #perl6
20:12 masak pochi: correct. we use it to serve web content in HTTP::Daemon.
20:13 masak pochi: client is a bit different, IIUC.
20:13 pochi there's a httpd in Perl 6 already?
20:13 jnthn Sheesh, I go to the pub and there's HOW much backlog when I come back?!
20:14 * PerlJam doesn't remember anyone talking about HOW  ;)
20:14 jnthn :-P
20:15 masak pochi: there is. I'm very happy to have it, since I'm one of the developers of a Perl 6 web framework.
20:15 masak trying web apps in the browser helps make things concrete.
20:16 pochi cool - I wasn't aware rakudo was this functional
20:16 ab5tract_ joined #perl6
20:17 masak pochi: you're in for a few surprises. :)
20:17 DanielC If @foo is an array, what is the recommended way to do "for my $k (0..$#foo)" in Perl 6?
20:17 PerlJam DanielC: for 0..@foo.elems -> $k { ... }
20:17 DanielC thanks
20:17 PerlJam DanielC: or ...   for 0..+@foo -> $k { ... }
20:17 masak DanielC: for @foo.values -> $k { ... }
20:18 PerlJam masak: I think you mean keys
20:18 masak no.
20:18 DanielC So you can't wrote for $i (@something) anymore?
20:18 masak I mean values.
20:18 masak DanielC: correct.
20:18 DanielC Well, I have to admint that the new syntax is better, even if it'll take me a while to get used to it.
20:19 PerlJam masak: He seems to be iterating over indices and those would be the keys ala @foo.kv -> $index, $value
20:19 pochi why not for @foo -> $k { ... } ?
20:19 masak DanielC: it's also very consistent. you can put '-> $k' before any code block. not just for loops.
20:19 masak PerlJam: oh. you're right. pardon me.
20:19 DanielC PerlJam: yes, I'm interating over indices. I just want 1,2,3 ... up to @foo.elems
20:19 masak pochi: because then you'd be iterating over the values, not the indices.
20:20 moritz_ oh, somebody /msg'ed me on perlmonks about how to use action methods on grammars
20:20 moritz_ this is clearly under-specced and under-documented
20:20 DanielC masak: What does '->' $k do before a different code block? I can see it in a while loop, but is there any place else where it comes up?
20:20 moritz_ maybe I can have a stab at it tomorrow, before leaving for vacations (for real, this time)
20:20 DanielC while userInput() -> $input { ... }
20:21 masak rakudo: my $code = -> $k { say $k }; $code("OH HAI")
20:21 p6eval rakudo 695300: OUTPUT«OH HAI␤»
20:21 PerlJam moritz_: it is, I was looking for an example I remembered seeing the other day and couldn't find it, so I had to rediscover how to do what I wanted.
20:21 masak DanielC: that whole loop thing works, too.
20:21 moritz_ PerlJam: ok, I answered you
20:21 DanielC masak: Whas that a lambda you just did with rakudo?
20:22 H1N1[A] joined #perl6
20:22 moritz_ basically there's a test in spec/S05-grammar/action-stubs.t which should help
20:22 DanielC So '-> $k { ... }' is actually a lambda??
20:22 moritz_ DanielC: yes
20:22 DanielC wow
20:22 moritz_ though we call it a "block", and it happens to have a formal parameter declared
20:22 * DanielC likes functional languages.
20:22 zepolen joined #perl6
20:22 PerlJam DanielC: if  $a > 5 -> $result { ... }    #  wrap your head around that one  :)
20:23 moritz_ well, it just binds True to $result
20:23 DanielC PerlJam: If you enter the block then $result is true
20:23 PerlJam or False
20:23 PerlJam oh, true
20:23 ejs joined #perl6
20:24 DanielC Very cool stuff.
20:24 PerlJam but, it could be  "if some_computationally_expensive_operation -> $result { ... }"
20:24 DanielC yes
20:24 masak PerlJam: I've actually had occasion to write some code already. :)
20:24 masak it's convenient.
20:24 DanielC but $result would still be True.
20:24 PerlJam where the if statement only cares about the truthiness, but the $result is soemthing more than just True
20:24 [particle]- perljam: then you memoize it ;)
20:24 masak DanielC: it needn't be True, it just needs to be non-false.
20:24 moritz_ DanielC: in general it can be any value, only the 'if' evaluates it in Bool context
20:24 DanielC PerlJam: Ah, that's right. $result could be anything.
20:25 PerlJam DanielC: not necessarily.
20:25 PerlJam $result could be "undef but True"  :)
20:25 japhb joined #perl6
20:25 DanielC I remember seeing somewhere that you could write "else -> $result { ... }" because you might have an *interesting* type of False.
20:26 [particle]- depends how infix:<<<>> is defined
20:26 PerlJam oh those quotes are so confusing!
20:26 moritz_ and wrong
20:26 moritz_ infix:<< < >> would be right
20:26 PerlJam yeah, LTM scuttles the first one.
20:26 [particle]- but then it's so much less ambiguous :(
20:26 moritz_ or simply infix:« < » # YaY for Unicode
20:27 PerlJam in any case, I'd much prefer frech quotes than texas quotes for those sorts of things
20:27 PerlJam :)
20:28 japhb_ joined #perl6
20:35 Scorp1us joined #perl6
20:36 holmberg joined #perl6
20:37 masak joined #perl6
20:38 DanielC What does this do in Perl 5?:  foo() while $content=~/$bar/gi;
20:39 PerlJam executes the foo() sub as long as $content matches the pattern given in $bar
20:39 DanielC $content is not modified by this, is it?
20:41 PerlJam no, but because of the /g, the regex engine "walks" $content giving each successive match
20:41 DanielC Does that still work in Perl 6?
20:41 literal hm, http://search.cpan.org/~zag/Perl6-Pod-0.01_01/
20:41 literal does this zag hang out here?
20:42 DanielC I tried this:   while $content ~~ /$bar/gi  { foo() }  but that gives "Statement not terminated properly at line 25, near "~~ /@seq[$" "
20:43 meppl joined #perl6
20:44 PerlJam DanielC: perl6 regex don't put modifiers at the end
20:45 DanielC hm
20:45 PerlJam DanielC: and I'm not sure that rakudo parses the modifiers yet either.
20:46 DanielC Can you say  $str.match(regex, :global) ?
20:49 DanielC Hmm... You can add :global but it doesn't do the same thing as in Perl 5.
20:49 DanielC in fact, it doesn't seem to do anything.
20:49 PerlJam DanielC: normally you'd use comb
20:49 DanielC while "hello".match(/l/, :global) {say "x"}   =>  Never stops printing "x"
20:50 PerlJam DanielC: for $content.comb(/$regex/) -> $match { ... }
20:50 DanielC What does comb do in general?  (or is it used only for loops?)
20:50 PerlJam DanielC: comb is split's counterpart.
20:51 DanielC Ok, so it splits a string based on a regex.
20:51 DanielC and it returns the matches instead of the stuff between the matches...
20:51 PerlJam DanielC: in perl5, you'd use /.../g when you have a pattern that describes what you want to keep and split(/.../) when you have a pattern the describes what you want to throw away.  In perl 6, you use split exactly the same, but comb for the other.
20:52 PerlJam right
20:52 DanielC thanks
20:52 PerlJam rakudo: .say for "fooobar".comb(/o/);
20:52 p6eval rakudo 695300: OUTPUT«o␤o␤o␤»
20:52 pmurias joined #perl6
20:53 sjohnson erl 6 = happiness
20:53 sjohnson P
20:54 pmurias wayland76: re write it in C, parrot and for that matter perl5 are also written in C so that's not a major SMOP distinguishing feature
20:58 DanielC rakudo: my $regex = "he"; "hello".comb(/$regex/)
20:58 p6eval rakudo 695300: OUTPUT«Null PMC access in get_string()␤in regex PGE::Grammar::_block23 (/tmp/IYSgXVl3T6:1)␤called from method Any::comb (src/gen_setting.pm:373)␤called from Main (/tmp/IYSgXVl3T6:1)␤»
20:58 DanielC That doesn't look good.
20:58 DanielC Did I make a mistake or is Rakudo broken?
20:58 pmichaud Rakudo doesn't understand variables in regexes.
20:58 pmichaud (yet)
20:58 pmichaud but you can do
20:59 DanielC That sucks.
20:59 pmichaud my $regex = /he/;   "hello".comb($regex)
20:59 DanielC That doesn't really help me with the regex-dna benchmark...
21:00 DanielC I have an array of patterns, and I need to find how often they appear in a dna sample.
21:00 pmichaud my @array = /pat1/, /pat2/, /pat3/, /pat4/
21:00 DanielC Well... the patterns are hard-coded, so I guess I could have two arrays. One with the text and one with the patterns.
21:00 pmichaud for @array { ... }
21:00 DanielC yeah
21:02 DanielC rakudo: say /hello/
21:02 p6eval rakudo 695300: OUTPUT«_block20␤»
21:02 pmichaud rakudo:  say { 3 };
21:02 DanielC I guess I do need to arrays then.
21:02 p6eval rakudo 695300: OUTPUT«_block20␤»
21:02 pmichaud currently subroutines stringify to their (internal) name
21:02 DanielC I have to print each sequence and how many times it occurred.
21:06 DanielC rakudo: my @cnt = (0) x 3; say @cnt[2]
21:06 p6eval rakudo 695300: OUTPUT«Use of uninitialized value␤␤»
21:07 DanielC :-P
21:07 pmichaud Yes, that's correct.  :-)
21:07 DanielC ??
21:07 pmichaud @cnt has only one value, it's "000"
21:07 lambdabot Maybe you meant: ft let wn
21:07 DanielC Shouldn't it be zero?
21:07 pmichaud I think you want 'xx'  :-)
21:07 pmichaud rakudo:  my @cnt = (0) xx 3;  say @cnt[2];
21:07 p6eval rakudo 695300: OUTPUT«0␤»
21:07 DanielC huh?  What does x do now?
21:07 pmichaud rakudo:  my @cnt = (0) x 3;  say @cnt.perl;
21:07 p6eval rakudo 695300: OUTPUT«["000"]␤»
21:08 pmichaud x is the 'string repeat' operator, same as p5
21:08 DanielC ok
21:08 pmichaud the list form of 'x' is now 'xx'
21:08 pmichaud rakudo:  my @cnt = (0) xx 3;  say @cnt.perl;
21:08 p6eval rakudo 695300: OUTPUT«[0, 0, 0]␤»
21:08 DanielC There we go... now it's doing the right thing.
21:09 jnthn rakudo: subset odd where { $_ % 2 }; say grep &odd, 0..6;
21:09 p6eval rakudo 695300: OUTPUT«Null PMC access in invoke()␤in method Any::grep (src/gen_setting.pm:15)␤called from sub grep (src/gen_setting.pm:134)␤called from Main (/tmp/wQcvJOXYOV:1)␤»
21:09 jnthn rakudo: subset odd where { $_ % 2 }; say grep odd, 0..6;
21:09 p6eval rakudo 695300: OUTPUT«Null PMC access in invoke()␤in method Any::grep (src/gen_setting.pm:15)␤called from sub grep (src/gen_setting.pm:134)␤called from Main (/tmp/S02SPoCzrn:1)␤»
21:09 jnthn wtf
21:09 jnthn rakudo: subset odd where { $^n % 2 }; say grep odd, 0..6;
21:09 p6eval rakudo 695300: OUTPUT«Null PMC access in invoke()␤in method Any::grep (src/gen_setting.pm:15)␤called from sub grep (src/gen_setting.pm:134)␤called from Main (/tmp/S42dsm5rxS:1)␤»
21:09 pmichaud rakudo:  subset odd where { $_ % 2 };  say ?(3 ~~ odd)
21:09 p6eval rakudo 695300: OUTPUT«1␤»
21:10 pmichaud for some reason the object that "odd" is passing to grep isn't being smartmatched.
21:10 jnthn rakudo: say &grep.candidates>>.signature>>.join(' ')
21:10 p6eval rakudo 695300: OUTPUT«Signature()<0xb6b1e208>␤»
21:10 jnthn rakudo: say &grep.candidates>>.signature>>.perl>>.join(' ')
21:10 pmichaud I suspect an mmd failure.
21:10 p6eval rakudo 695300: OUTPUT«:(Any $test, Any *@values)␤»
21:10 pmichaud oh, maybe not then.
21:10 jnthn That sig is what I expected. Hmm.
21:11 pmichaud I didn't look into why it was failing :-)
21:11 jnthn I'll probably not get to it until post-dispatch-refactor.
21:12 pmichaud rakudo:  subset odd where { $_ % 2 };   sub foo($test) { say ?(3 ~~ $test); };   foo(odd);
21:12 p6eval rakudo 695300: OUTPUT«Null PMC access in invoke()␤in sub foo (/tmp/mDzITBytqb:1)␤called from Main (/tmp/mDzITBytqb:1)␤»
21:12 pmichaud There ya go, not specific to grep.
21:12 [particle] joined #perl6
21:13 jnthn rakudo: subset odd where { $_ % 2 }; say &odd.WHAT
21:13 p6eval rakudo 695300: OUTPUT«()␤»
21:13 jnthn rakudo: subset odd where { $_ % 2 }; say &odd ~~ Callable
21:13 p6eval rakudo 695300: OUTPUT«0␤»
21:13 pmichaud I wouldn't expect &odd to be Callable.
21:13 jnthn rakudo: subset odd of Any where { $_ % 2 }; sub foo($test) { say ?(3 ~~ $test); };   foo(odd);
21:13 pmichaud "subset odd" doesn't define a subroutine, does it?
21:13 p6eval rakudo 695300: OUTPUT«Null PMC access in invoke()␤in sub foo (/tmp/mPE28gNdw2:1)␤called from Main (/tmp/mPE28gNdw2:1)␤»
21:13 jnthn pmichaud: Me either.
21:14 jnthn pmichaud: I was just curious why it's getting it wrong.
21:14 pmichaud subset odd where {$_ % 2};  say odd.WHAT;
21:14 pmichaud rakudo: subset odd where {$_ % 2};  say odd.WHAT;
21:14 p6eval rakudo 695300: OUTPUT«()␤»
21:14 pmichaud rakudo: subset odd where {$_ % 2};  say odd.PARROT;
21:14 p6eval rakudo 695300: OUTPUT«␤»
21:14 pmichaud oh, I guess it's anonymous.
21:14 jnthn Not entirely sure what the answer to .WHAT should be.
21:14 jnthn Yes, the Parrot class is anonymous
21:15 ejs joined #perl6
21:15 pmichaud I would think it would be "odd()"
21:15 jnthn rakudo: subset odd where { $_ % 2 }; say 1 ~~ odd; say 2 ~~ odd;
21:15 p6eval rakudo 695300: OUTPUT«1␤0␤»
21:15 PerlJam rakudo: subset odd where {$_ % 2};  say odd.perl;  # what should this be?
21:15 pmichaud since "odd" is a type object
21:15 p6eval rakudo 695300: OUTPUT«␤»
21:15 jnthn Yeah but is it...
21:16 jnthn (I don't know if it's true in the class Foo { }'s namespace-installed Foo is a type object)
21:16 pmichaud rakudo: subset odd where {$_ % 2};  my $type = odd;  say ?(3 ~~ $type);
21:16 p6eval rakudo 695300: OUTPUT«Null PMC access in invoke()␤in Main (/tmp/sGV99XI1Zv:1)␤»
21:16 jnthn Eww.
21:16 pmichaud rakudo: subset odd where {$_ % 2};  my $type := odd;  say ?(3 ~~ $type);
21:16 p6eval rakudo 695300: OUTPUT«1␤»
21:16 ergodick joined #perl6
21:16 jnthn So assignment somehow hashes it up.
21:16 pmichaud well, there's no assignment in the foo() case I gave above.
21:17 jnthn rakudo: subset odd where {$_ % 2}; say ?(3 ~~ $type.Scalar);
21:17 p6eval rakudo 695300: OUTPUT«Symbol '$type' not predeclared in <anonymous> (/tmp/XygyoYVfrO:1)␤in Main (src/gen_setting.pm:3166)␤»
21:17 pmichaud At any rate,  "odd" needs to return an ObjectRef rather than try to copy itself.
21:17 jnthn rakudo: subset odd where {$_ % 2}; say ?(3 ~~ odd.Scalar);
21:17 p6eval rakudo 695300: OUTPUT«1␤»
21:17 jnthn rakudo: subset odd where {$_ % 2}; say ?(3 ~~ odd.item);
21:17 p6eval rakudo 695300: OUTPUT«1␤»
21:17 pmichaud rakudo:  subset odd where {$_ % 2};  say odd ~~ Object;
21:17 p6eval rakudo 695300: OUTPUT«1␤»
21:17 jnthn Hmm. What on earth else happens in a bind that could upset it. :-S
21:17 pmichaud rakudo:  subset odd where {$_ % 2};  say odd ~~ Any;
21:17 jnthn (a signature bind, that is)
21:17 p6eval rakudo 695300: OUTPUT«1␤»
21:18 pmichaud well, in a signature bind we get an ObjectRef to it.
21:18 jnthn :-S
21:18 jnthn OK, that'll take a little tracking down.
21:18 pmichaud at least, we're supposed to get one.
21:19 pmichaud rakudo:  subset odd where {$_ % 2};  my $type = \odd;  say ?(3 ~~ $type);
21:19 p6eval rakudo 695300: OUTPUT«Null PMC access in invoke()␤in »
21:19 pmichaud rakudo:  subset odd where {$_ % 2};  my $type = \odd;
21:19 p6eval rakudo 695300:  ( no output )
21:19 pmichaud rakudo:  subset odd where {$_ % 2};  my $type = \odd;  say $type.PARROT;
21:19 p6eval rakudo 695300: OUTPUT«Perl6Scalar->␤»
21:20 pmichaud very odd.
21:20 jnthn Indeed.
21:22 jnthn pmichaud: BTW, did you notice that Parrot improvements seem to have given a very big improvement in the tools/benchmark.pl?
21:22 DanielC rakudo: my %h = (A => 'foo');
21:22 p6eval rakudo 695300:  ( no output )
21:22 DanielC My Rakudo says "Could not find non-existent sub foo"
21:22 pmichaud jnthn: no, but I'm not too surprised.  I still have some improvements to make in a few other places -- there are still some root_news that need converting
21:22 pmichaud DanielC: did you remember the quotes around 'foo' in your local version?
21:23 jnthn It seems a Parrot change broke S12-method-indirect.t. :-S
21:23 DanielC Shh.... I used single quotes twices in the perl6 -e
21:23 DanielC perl6 -e 'my %h = (A => 'foo');'
21:23 DanielC So of course that won't work.
21:23 pmichaud jnthn: we do have a problem with PMCProxy creation still, though -- the dynpmc proxies aren't found when doing a load_bytecode 'perl6.pbc'
21:23 DanielC Now it's happy.
21:23 jnthn I'd go whine loudly, but I'm re-writing method dispatch at the moment anyway...
21:23 PerlJam DanielC: also, the parentheses aren't needed.
21:24 pmichaud jnthn: the change that broke S12-method-indirect.t was noted in the ticket
21:24 DanielC PerlJam: Really?  Can I write %h = A => "foo", B => "bar";  ?
21:24 jnthn pmichaud: Did this break with bacek's PMCProxy optimization patch too? Or was it broken before that?
21:24 PerlJam DanielC: try it :)
21:24 pmichaud jnthn: I haven't investigated bacek's PMCProxy optimization patch.
21:24 jnthn pmichaud: Yes, but that doesn't make me a great deal more happy about it.
21:24 pmichaud jnthn: so, I don't know.
21:24 jnthn "lolz I broke Rakudo in my patch but ci'd anyway"
21:24 DanielC rakudo: my %h = A => "foo", B => "bar"; say %h.perl;'
21:24 DanielC {"A" => "foo", "B" => "bar"}
21:25 p6eval rakudo 695300: OUTPUT«Syntax error at line 1, near "'"␤in Main (src/gen_setting.pm:0)␤»
21:25 DanielC rakudo: my %h = A => "foo", B => "bar"; say %h.perl;
21:25 p6eval rakudo 695300: OUTPUT«{"A" => "foo", "B" => "bar"}␤»
21:25 DanielC :-D
21:27 pmichaud jnthn: well, Parrot is allowed to add things that break Rakudo -- that's why we have PARROT_REVISION
21:27 sjohnson Matt-W: i implemented your:  shuffle(@_) trick
21:27 pmichaud (it's also why Parrot has a deprecation cycle, which Rakudo chooses not to follow)
21:27 sjohnson happiness is now mine
21:29 PerlJam sjohnson: what shuffle(@_) trick?  (that looks like @_.pick(*) to me from here)
21:29 sjohnson Perl 5
21:29 sjohnson using List::Util
21:30 sjohnson is there a trim function in the Core Modules?
21:30 sjohnson i've only found String::Strip, but it's not part of the core modules
21:30 sjohnson for perl 5
21:30 sjohnson perl 6 fixes this thankfully, but im stuck with perl 5 for the long haul i guess
21:30 sjohnson *sad face*
21:30 PerlJam sjohnson: It's called s///  :)
21:32 sjohnson PerlJam: it gets annoying having to write that everytime though
21:32 sjohnson gotta be a smarter way
21:33 sjohnson writing ^\s*|\s*$ all the damn time gets tedious quick
21:33 PerlJam sub trim { for (@_) { s/^\s+//; s/\s+$//; } }
21:33 ergodick left #perl6
21:33 sjohnson even having to declare it too in every thing i use is too much work
21:33 cotto The laziness is strong with this one.
21:34 sjohnson happiness = laziness
21:34 sjohnson perl 6 solves this problem
21:34 PerlJam then you should clearly use perl 6 :)
21:34 * sjohnson is waiting patiently
21:35 PerlJam why wait? what is this for?
21:35 sjohnson "Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something."  -- Robert Heinlein, Time Enough For Love
21:36 sjohnson mostly personal use
21:37 sjohnson is rakudo stable enough to use these days?
21:37 PerlJam stable enough for many  things.  So, it depends on what you want to do with it.
21:38 tulcod joined #perl6
21:38 sjohnson my uses are pretty basic.  maybe run some system commands and use regex on strings
21:40 PerlJam heh ... and already rakudo is knocked out of the running.  (she can't do system() that I know of)
21:40 cotto istr something about that recently
21:41 pmichaud huh?
21:41 pmichaud "can't do system()"?
21:42 PerlJam rakudo: system("ls");  # does that yet work?
21:42 p6eval rakudo 695300: OUTPUT«Could not find non-existent sub system␤»
21:42 pmichaud It does if you call it "run".
21:42 pmichaud rakudo: run("ls");
21:42 p6eval rakudo 695300: OUTPUT«build␤Configure.pl␤CREDITS␤docs␤LICE​NSE␤Makefile␤parrot␤perl6␤perl6.c␤perl6.o␤p​erl6.pbc␤perl6.pir␤perl6_s1.pbc␤rakudo_revi​sion␤README␤src␤t␤Test.pir␤Test.pm␤tools␤»
21:42 PerlJam ah!
21:42 sjohnson Perl 1 is my favourite version
21:42 pmichaud It also now works with:
21:42 sjohnson .. jk
21:42 pmichaud rakudo:  say qx{ls};
21:42 p6eval rakudo 695300: OUTPUT«build␤Configure.pl␤CREDITS␤docs␤LICE​NSE␤Makefile␤parrot␤perl6␤perl6.c␤perl6.o␤p​erl6.pbc␤perl6.pir␤perl6_s1.pbc␤rakudo_revi​sion␤README␤src␤t␤Test.pir␤Test.pm␤tools␤␤»
21:42 pmichaud run() has been around for over a year -- it's one of the first functions we put in.
21:43 pmichaud Perl 6 doesn't define a "system()"
21:43 PerlJam and clearly one I've never even tried to use :)
21:43 Whiteknight joined #perl6
21:44 cotto so what happens if someone uses that to do something naughty, say qx{rm -rf *}
21:45 sjohnson rakudo:  print scalar([1, 2, 3]);
21:45 p6eval rakudo 695300: OUTPUT«Could not find non-existent sub scalar␤»
21:45 sjohnson rakudo:  print scalar(<1 2 3>);
21:45 p6eval rakudo 695300: OUTPUT«Could not find non-existent sub scalar␤»
21:46 sjohnson rakudo:  print count(<1 2 3>);
21:46 pmichaud There's no scalar() function in Perl 6, either.
21:46 p6eval rakudo 695300: OUTPUT«Could not find non-existent sub count␤»
21:46 cotto rakudo: print +(<1 2 3>)
21:46 pmichaud Try item
21:46 p6eval rakudo 695300: OUTPUT«3»
21:46 sjohnson it's a + only?
21:46 pmichaud or that.
21:46 pmichaud + is "numeric scalar context"
21:46 pmichaud ~ is "string context"
21:46 pmichaud rakudo:  print ~(<1 2 3>)
21:46 p6eval rakudo 695300: OUTPUT«1 2 3»
21:47 pmichaud rakudo:  print item <1 2 3>
21:47 p6eval rakudo 695300: OUTPUT«123»
21:48 PerlJam rakudo: print 5 + item <1 2 3>
21:48 p6eval rakudo 695300: OUTPUT«8»
21:49 kane_ joined #perl6
21:49 sjohnson squiggle context
21:49 sjohnson print ~<1 2 3>
21:49 sjohnson rakudo:  print ~<1 2 3>
21:49 p6eval rakudo 695300: OUTPUT«1 2 3»
21:49 PerlJam rakudo: say ?<1 2 3>
21:49 p6eval rakudo 695300: OUTPUT«1␤»
21:49 sjohnson whats ? mark do
21:49 PerlJam rakudo: say ?<>
21:50 p6eval rakudo 695300: OUTPUT«0␤»
21:50 PerlJam sjohnson: boolean context
21:50 sjohnson where's knuth context?
21:50 sahadev left #perl6
21:51 pmichaud afk, grocery shopping
22:05 sri_kraih joined #perl6
22:09 dolmen joined #perl6
22:26 sri_kraih joined #perl6
22:30 skids joined #perl6
22:39 DanielC joined #perl6
22:40 DanielC How do you do this in Perl 6:  s/([A-Z])/$hash{$1}/g;  ?
22:41 DanielC $content.=subst(/([BDHKMNRSVWY])/, ???, :global);
22:41 DanielC $content.=subst(/([A-Z])/, ???, :global);
22:41 DanielC I don't know what to put in ???
22:42 jnthn Before that - character class in Perl 6 is spelt <[[BDHKMNRSVWY]>
22:42 jnthn oh arse
22:42 jnthn <[BDHKMNRSVWY]>
22:43 jnthn And A-Z is A..Z to match the range syntax elsewhere :-)
22:43 jnthn What to write there - my first guess is a closure...
22:43 DanielC $content.=subst(/<[BDHKMNRSVWY]>/, ???, :global);
22:43 DanielC Oh, but I guess I still need the round brackets.
22:43 DanielC $content.=subst(/(<[BDHKMNRSVWY]>)/, ???, :global);
22:43 jnthn rakudo: my $x = "abcb"; $x.subst(/b/, { say "here" }, :global)
22:44 p6eval rakudo 695300: OUTPUT«here␤here␤»
22:44 jnthn rakudo: my $x = "abcb"; $x.= subst(/b/, { 'x' }, :global); say $x;
22:44 p6eval rakudo 695300: OUTPUT«axcx␤»
22:44 DanielC rakudo: my $x = "abcb"; $x.subst(/(b)/, { say $1 }, :global)
22:44 jnthn Well, useless use of closure there but you can I guess to your hash lookup in there.
22:44 p6eval rakudo 695300: OUTPUT«Use of uninitialized value␤␤Use of uninitialized value␤␤»
22:44 DanielC :-P
22:44 jnthn rakudo: my $x = "abcb"; $x.subst(/(b)/, { say $0 }, :global)
22:44 p6eval rakudo 695300: OUTPUT«b␤b␤»
22:45 DanielC ah
22:45 jnthn DanielC: 0 based :-)
22:45 jnthn Just like an array.
22:45 DanielC It's more consistent... it's just unexpected.
22:45 jnthn Which it is really - $/ is the match object and $0, $1 etc compile to the same as $/[0] and $/[1]
22:45 jnthn Yeah, Perl 6 kinda re-visisted regex. :-)
22:45 jnthn Re-visited too.
22:46 DanielC So you have to use brackets and 'say'? There is no shortcut? I thought that things you say often are supposed to be shor.
22:46 DanielC short.
22:46 DanielC And this is something people probably do often.
22:47 jnthn DanielC: no no
22:47 jnthn you don't use say, I was doing that to demonstrate in the output that the closure was invoked
22:48 DanielC ah
22:48 DanielC $x.subst(/(b)/, $0, :global)  then?
22:49 jnthn rakudo: my %h = a => 1, b => 2; my $x = 'abab'; $x .= subst(/(<[ab]>)/, { %h{$0} }, :g); say $x;
22:49 p6eval rakudo 695300: OUTPUT«1212␤»
22:49 jnthn No because then $0 won't get evaluated each time.
22:49 jnthn You need the closure to force evaluation later.
22:50 jnthn I guess once we have s/// implemented though you get that for free. :-)
22:50 jnthn We just didn't do that yet.
22:50 DanielC ok
22:56 DanielC get_pmc_keyed() not implemented in class 'Perl6Str'
22:56 DanielC Any idea what that means?
22:56 DanielC Rakudo doesn't seem to like my hash.
22:57 pasteling "skids" at 71.192.212.78 pasted "two dimensional laziness" (21 lines, 860B) at http://sial.org/pbot/36837
22:58 skids anyone got an opinion on the above?
22:59 acajou left #perl6
23:00 skids DanielC: it would appear you are trying to take a hash index of a Strl
23:00 skids erm Str.
23:01 DanielC hmm..
23:01 DanielC my %iub = B => '(C|G|T)',D => '(a|g|t)',H => '(a|c|t)',
23:01 DanielC K => '(g|t)',M => '(a|c)',N => '(a|c|g|t)',
23:01 DanielC R => '(a|g)',S => '(c|g)',V => '(a|c|g)',
23:01 DanielC W => '(a|t)',Y => '(c|t)';
23:01 DanielC $content.=subst(/(<[BDHKMNRSVWY]>)/, {%iub{$0}}, :global);
23:02 DanielC I don't think I'm taking the hash index of a string.
23:03 DanielC It stopped complaining. I must have changed something.
23:04 DanielC $content = uc $content;
23:05 DanielC Adding that line just after the hash recreates the error.
23:05 DanielC Is there something wrong with the upper-case step?
23:06 DanielC Uhm... $content is initially all lower case, so without the uc line there are no matches and the {%iub{$0}} never gets called.
23:06 DanielC "ABC".=subst(/(<[BDHKMNRSVWY]>)/, {%iub{$0}}, :global);
23:07 DanielC That reproduces the error.
23:08 skids Not sure $0 is working.
23:09 DanielC rakudo: my %h = B => "X"; "ABC".=subst(/(<[BD]>)/, {%h{$0}}, :global);
23:10 p6eval rakudo 695300: OUTPUT«Use of uninitialized value␤Use of uninitialized value␤»
23:10 DanielC Looks like $0 is not working.
23:12 Scorp2us joined #perl6
23:12 skids I would offer up $/[0], but it doesn't seem defined either.
23:15 DanielC Thing is, jnthn has posted a very similar-looking code sample and that one worked.
23:15 DanielC I can't figure out what's different about the two code samples.
23:16 jnthn DanielC: looking, pondering
23:16 jnthn (sorry, finding LiveMocha an epic distraction as usual...)
23:16 jnthn rakudo: say "ABC".subst(/(<[BDHKMNRSVWY]>)/, {%iub{$0}}, :global);
23:16 p6eval rakudo 695300: OUTPUT«Symbol '%iub' not predeclared in <anonymous> (/tmp/hGV6odsuvh:1)␤in Main (src/gen_setting.pm:3166)␤»
23:16 jnthn oh, missing the hash.
23:17 DanielC ?
23:17 jnthn DanielC: Can you no-paste the code that crashes with the error?
23:18 jnthn Or just paste it here for Rakudo?
23:18 jnthn (That gives the  get_pmc_keyed() not implemented error
23:18 jnthn )
23:18 DanielC rakudo:  my %h = B => 2; "ABC".=subst(/(<[BD]>)/, {%h{$0}}, :global);
23:18 p6eval rakudo 695300: OUTPUT«Use of uninitialized value␤Use of uninitialized value␤»
23:18 jnthn Hmm. You're trying to modify a constant. That might not end well.
23:19 jnthn rakudo:  my %h = B => 2; my $x = "ABC"; $x.=subst(/(<[BD]>)/, {%h{$0}},:global);
23:19 p6eval rakudo 695300: OUTPUT«Use of uninitialized value␤»
23:20 jnthn Hmm.
23:20 jnthn Where's the uninitialized value...
23:20 jnthn rakudo:  my %h = B => 2; my $x = "ABC"; $x.=subst(/(<[BD]>)/, {%h{$0}},:global); say $x;
23:20 p6eval rakudo 695300: OUTPUT«Use of uninitialized value␤Use of uninitialized value␤AC␤»
23:20 donaldh joined #perl6
23:20 DanielC I found this error while I was tracing the get_pmc_keyed() error. I think that this unitialized value might be the root error.
23:20 jnthn rakudo:  my %h = B => 2; my $x = "ABC"; say $x.subst(/(<[BD]>)/, {%h{$0}},:global);
23:20 p6eval rakudo 695300: OUTPUT«A2C␤»
23:21 jnthn rakudo:  my %h = B => 2; my $x = "ABC"; say $x = $x.subst(/(<[BD]>)/, {%h{$0}},:global);
23:21 p6eval rakudo 695300: OUTPUT«A2C␤»
23:21 jnthn rakudo:  my %h = B => 2; my $x = "ABC"; $x = $x.subst(/(<[BD]>)/, {%h{$0}},:global); say $x;
23:21 p6eval rakudo 695300: OUTPUT«A2C␤»
23:21 jnthn rakudo:  my %h = B => 2; my $x = "ABC"; $x .= subst(/(<[BD]>)/, {%h{$0}},:global); say $x;
23:21 p6eval rakudo 695300: OUTPUT«A2C␤»
23:21 jnthn rakudo:  my %h = B => 2; my $x = "ABC"; $x.=subst(/(<[BD]>)/, {%h{$0}},:global); say $x;
23:21 p6eval rakudo 695300: OUTPUT«Use of uninitialized value␤Use of uninitialized value␤AC␤»
23:21 jnthn Nailed it.
23:21 DanielC spaces?
23:22 jnthn DanielC: Bit more to it than that. Those two actually parse differently.
23:22 jnthn But should be behaviourly equivalent.
23:22 jnthn So, Rakudo bug.
23:23 DanielC And this also fixes the get_pmc_keyed() error too.
23:24 jnthn DanielC: Just field a ticket for it.
23:24 DanielC So that ws the root problem.
23:24 eternaleye joined #perl6
23:24 jnthn DanielC: Will look tomorrow. Fail. :-|
23:24 DanielC Yay, I discovered my first Rakudo bug. :-)
23:25 jnthn DanielC: Thanks. :-)
23:25 jnthn DanielC: Your next task is to catch up with masak++ ;-)
23:25 jnthn (He's discovered *hundreds*. Literally.)
23:25 DanielC heh
23:26 jnthn (Which have really helped push Rakudo development along.)
23:26 DanielC Is he a developer or mostly a bug-finder ?
23:26 jnthn He writes a lot of Perl 6 programs and runs them on Rakudo and in the process finds bugs.
23:27 DanielC ok
23:27 jnthn But also has contributed some bits to Rakudo too. :-)
23:27 jnthn (Built-ins.)
23:28 DanielC Is Rakudo written entirely in Perl 5? Will it be ported to Perl 6?
23:28 skids It's written in PIR and Perl6
23:28 jnthn DanielC: Rakudo isn't written at all in Perl 5.
23:28 jnthn DanielC: Well, other than some of the build tools.
23:28 jnthn But none of the stuff that runs at runtime is.
23:28 DanielC Ok. Build tools don't count.
23:29 DanielC So PIR for the parts that can't be done with Perl 6 yet?
23:29 jnthn skids: That and an occasional smidgin of C. Which this week is being less occasional than I usually like. :-)
23:30 skids I was about to ask, are there any rakudo-specific PMCs...
23:30 jnthn DanielC: Well, some things that interact with the VM will just always stay as PIR I expect.
23:30 jnthn DanielC: Like primitives that just boil down to using a Parrot op.
23:30 jnthn skids: Yes, and Rakudo-specific ops too.
23:30 DanielC ok
23:31 jnthn DanielC: Significantly, the grammar we use for parsing is written in Perl 6 regex/grammar syntax.
23:31 skids Hrm somhow I haven't stumbled across that directory yet (the ops maybe but it was all PGE and thus incompreshensible :-)
23:31 jnthn And the actions behind them are.
23:32 jnthn skids: src/pmc/*.pmc
23:32 jnthn skids: For your daily recommended dose of graph theory check out perl6multisub.pmc
23:32 DanielC Man... Rakudo is slow as a glacier... I just ported a benchmark from Perl 5 to Rakudo (still buggy). The Perl 5 version runs in 0.19s. The Rakudo version runs in 14s.
23:32 jnthn DanielC: Not surprising at this point.
23:32 DanielC 74 x slower.
23:32 skids Yup, I pretty much alsways got distracted by classes/ builtins/ and setting/ and never even noticed that :-)
23:33 jnthn skids: You probably don't want to ;-)
23:33 DanielC jnthn: That Perl 6 can already parse Perl 6 is indeed significant.
23:33 skids Actually not that big a deal, given I've cut my teeth on understanding the Parot base PMCs already.
23:33 jnthn DanielC: Aye. For starters though you most likely have a debug rather than an optimized version of Parrot unless you did build your Parrot specially.
23:34 jnthn (It's more useful in development to have a debug build around for now.)
23:34 DanielC yeah
23:34 jnthn And there's lots of other areas that we know aren't at all performant.
23:35 skids Ow.  C based Str numification.  OK maybe you were right :-)
23:35 jnthn skids: Oh, I stay away from that bit too. ;-)
23:36 DanielC They say that only Perl can parse Perl...  did you know that that's not actually true? Nothing can parse every possible Perl program. Someone proved that if you could parse every possible Perl program you could solve the Halting Problem.
23:36 DanielC :-)
23:37 DanielC I wonder if that's also true for Perl 6.
23:38 * jnthn srsly hopes "solve the halting problem" doesn't make it into the Perl 6 spec
23:39 jnthn OK, time for me to get some rest...getting late here.
23:39 DanielC ditto
23:39 DanielC night.
23:39 jnthn night
23:39 skids Oh, and there's probably the get_string_keyed that was barfing at DanielC in objectref.pmc.
23:59 pugs_svn r26940 | jdlugosz++ | [s04] replace example that no longer was applicable after previous edits; update old Array and List uses to Capture (and note that bare parens construct a Capture); add examples; clarify wording; fix typos.

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

Perl 6 | Reference Documentation | Rakudo | Niecza | Specs