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