Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2009-07-20

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:00 pmichaud Good evening, #perl6 (from OSCON)
00:12 Whiteknight joined #perl6
00:13 pyrimidine joined #perl6
00:15 pyrimidine pmichaud: Hi! Have fun at OSCON.
00:15 pmichaud I plan to do so :-)
00:15 jhuni joined #perl6
00:16 pyrimidine Great to hear about the -G bugs clearing up as well (and that last min. fix for hash ordering)
00:16 pyrimidine (for class attributes)
00:19 pmichaud yes, I was pleased I could get that one in place.
00:27 Teratogen I want Perl 6 now!
00:29 pyrimidine rakudo: my StrInt $foo = 1; say $foo;
00:29 p6eval rakudo 415514:  ( no output )
00:29 pyrimidine rakudo: subset StrInt of Any where { .does('Int') || .does('Str') }; my StrInt $foo = 1; say $foo;
00:29 p6eval rakudo 415514: OUTPUT«1␤»
00:29 pyrimidine there's some of your perl 6
00:31 pyrimidine (and isn't a Teratogen a chemical agent that causes birth defects?)
00:31 Teratogen not just chemical
00:31 Teratogen any
00:31 pyrimidine ah
00:31 pyrimidine I should know that, being a biologist
00:32 Teratogen I read an article about Perl and the sequencing of the human genome
00:33 pyrimidine by Lincoln Stein
00:33 pyrimidine I collaborate with him on BioPerl
00:34 pyrimidine though these days he's pretty focused on Gbrowse
00:34 pyrimidine rakudo: my Int|Str $foo = 1; say $foo;
00:34 p6eval rakudo 415514: OUTPUT«Malformed declaration at line 2, near "Int|Str $f"␤Null PMC access in get_pmc_keyed()␤current instr.: 'perl6;Perl6;Compiler;eval' pc 289725 (src/gen_actions.pir:24150) (src/gen_setting.pm:3340)␤»
00:36 pyrimidine guess this version of polymorphic types is NYI
00:46 jhuni joined #perl6
00:51 dukeleto joined #perl6
00:52 dukeleto joined #perl6
01:06 Casan joined #perl6
01:14 unitxt joined #perl6
01:18 alester joined #perl6
01:21 justatheory joined #perl6
02:04 justatheory joined #perl6
02:08 szabgab joined #perl6
02:11 missingthepoint_ joined #perl6
02:15 missingthepoint_ hi all... as discussed with moritz++, i'm trying to document my learning process vis-a-vis perl 6
02:15 missingthepoint_ and I thought I'd write a newbies FAQ of sorts, comprised of questions I've had while learning
02:16 missingthepoint_ It would be great to get answers to some of these questions from people here
02:17 missingthepoint_ Some of the questions I can even answer myself, but there's a great chance I'm missing a lot
02:18 jhuni joined #perl6
02:18 missingthepoint_ I'd appreciate anyone answering some random P6/Parrot questions, here or in privmsg
02:19 missingthepoint_ s{P6/Parrot}{P6/Parrot/Rakudo...}
02:19 missingthepoint_ so let me know
02:22 missingthepoint_ :)
02:23 missingthepoint_ perhaps a better approach is for me to write up some Qs + As, then request comments
02:23 zamolxes_ joined #perl6
02:23 missingthepoint_ if that makes more sense, say so
02:26 Casan so
02:26 missingthepoint_ :)
02:26 missingthepoint_ i'll start writing
02:27 missingthepoint_ check the pugs repo in a few hours :)
02:29 pmichaud I'll answer random questions
02:29 pmichaud the channel is often a good place for random Q+A's, but possibly not on a Sunday afternoon (the night before OSCON)
02:29 pmichaud lots of folks are on vacation, traveling, or otherwise occupied :-)
02:30 pmichaud but truthfully, if you just write the FAQ and it has errors, someone will likely point them out quickly :-)
02:39 Tene missingthepoint_: just ask the questions in here.
02:42 * skids around for an hour for questions.
02:43 skids Not that I'm an authority on anything :-)
03:00 dukeleto joined #perl6
03:03 missingthepoint_ skids: i'll appreciate your input nonetheless; you're likely more of an authority than I :)
03:03 missingthepoint_ pmichaud: ah, wasn't aware of OSCON :)
03:04 missingthepoint_ pmichaud: i'm a little far away -> not an option for me -> not really aware of such things :)
03:04 missingthepoint_ Tene: i'll ask and write simultaneously
03:04 FCO joined #perl6
03:06 ihrd joined #perl6
03:06 ihrd left #perl6
03:26 agentzh joined #perl6
03:26 SmokeMachine joined #perl6
03:36 molaf joined #perl6
03:41 bacek joined #perl6
03:52 ihrd joined #perl6
03:54 missingthepoint_ is there a canonical place where the P6 implementations are listed?
03:54 missingthepoint_ ha, timing palindrome :)
03:54 missingthepoint_ (sorry, ignore that)
03:56 missingthepoint_ http://www.perlfoundation.org/p​erl6/index.cgi#implementations ?
04:22 ihrd joined #perl6
04:23 ihrd left #perl6
04:35 PZt joined #perl6
04:54 szabgab joined #perl6
05:02 xinming_ joined #perl6
05:06 skids missingthepoint_: there's something called "elf" that's missing there.
05:09 ihrd joined #perl6
05:10 ihrd left #perl6
05:13 missingthepoint_ skids: thanks :)
05:17 finanalyst joined #perl6
05:17 finanalyst good morning. is anyone here or is it a $day?
05:18 sjohnson i'm here
05:20 finanalyst i have a fairly long program with an array. first time through the iteration, there is an array that can be written to. the second time through, rakudo says it is read-only. how do i monitor where the trait changed?
05:39 synth joined #perl6
05:47 justatheory joined #perl6
06:27 wayland76 joined #perl6
06:28 rfordinal joined #perl6
06:35 moritz_ missingthepoint_: the "canonical" list of Perl 6 implementations and other projects is on perl6-projects.org
06:37 iblechbot joined #perl6
06:40 missingthepoint_ moritz_: thanks. i'm debating whether to just link there or include the list from there, and expand on it (re projects and their statuses)
06:42 moritz_ status is intionally not included on that page, because in general it changes much more often than the list itself
06:43 moritz_ and I wanted to create a page that's kept up to date, far too many Perl 6 pages are somewhat outdated
06:45 missingthepoint_ hmm, i should probably rethink things a bit... writing some Beginner's FAQs as promised
06:46 azawawi joined #perl6
06:46 azawawi pmichaud: ping
06:46 missingthepoint_ moritz_: ... and wanted to give overview of the projects and "what fits where"
06:47 missingthepoint_ moritz_: but status may not be an appropriate part of that overview
06:48 moritz_ "use rakudo; other compilers exists in various stages; see $link or find out yourself" ;-)
06:48 missingthepoint_ moritz_: i see what you mean. lots of pages on p6wiki are outdated, and a fair bit of docs/ in pugs svn
06:49 missingthepoint_ moritz_: hehe :)
06:49 missingthepoint_ moritz_: i'll probably end up saying something close to that :)
07:03 rfordinal joined #perl6
07:17 pochi joined #perl6
07:24 dakkar joined #perl6
07:30 Matt-W Good morning
07:31 wayland76 Good evening :)
07:32 sjohnson y0
07:32 Matt-W Aaah, the joy of time zones
07:32 wayland76 phenny: tell pmichaud Can you comment on http://rt.perl.org/rt3/Tic​ket/Display.html?id=63360 to indicate whether it's accurate, or leave me a message via phenny or something?
07:32 phenny wayland76: I'll pass that on when pmichaud is around.
07:32 Matt-W Later today I will inevitably say 'good afternoon' to somebody who says 'good morning'
07:33 Matt-W And chuckle
07:33 Matt-W Such amusement as can be found on a Monday should be cherished
07:33 wayland76 phenny: tell pmichaud (ie. I want to know whether my most recent comments are accurate)
07:33 phenny wayland76: I'll pass that on when pmichaud is around.
07:35 wayland76 (for others in the IRC channel wondering what I'm asking pmichaud to have a look at, it's a ticket to do with getting Rakudo working on a preinstalled parrot
07:50 Matt-W Aaah
07:50 Matt-W That'd be nice
07:51 Matt-W Particularly for people who track the monthly releases
07:53 wayland76 I had something that worked for me, but pmichaud didn't like it, so he's tried something, but I doubt it works for Windows people
07:53 agentzh joined #perl6
08:03 tann joined #perl6
08:08 xinming joined #perl6
08:32 bpetering joined #perl6
08:41 missingthepoint left #perl6
08:45 masak joined #perl6
08:47 masak greetings, gathercamels!
08:47 lambdabot masak: You have 1 new message. '/msg lambdabot @messages' to read it.
08:47 masak @massage
08:47 lambdabot literal said 4d 10h 17m 18s ago: gah, sorry I couldn't make it tonight :(
08:47 * Matt-W raises an eyebrow
08:48 Matt-W 'gathercamels'?
08:48 masak Matt-W: um, as in gather/take.
08:48 Matt-W yes I figured that
08:48 masak :)
08:48 * moritz_ is more of a takecamel
08:48 Matt-W lol
08:48 * Matt-W is trying to spontaneously learn sparc assembly
08:48 moritz_ or is that cameltake then?
08:49 Matt-W gather for @camels -> $camel { take $camel }
08:49 Matt-W It's the coolest way to do an identity transform on a list!
08:49 * masak really likes 'gather for'
08:49 * Matt-W does too
08:50 moritz_ rakudo: say gather for 1 { take 2 }
08:50 p6eval rakudo 415514: OUTPUT«2␤»
08:50 literal hey masak
08:50 masak ...and 'gather while', and 'gather given'...
08:50 Matt-W however, there's some stuff I'm doing with it I would probably be better off doing with map
08:50 moritz_ I didn't even know it worked :-)
08:50 masak literal: hey.
08:50 literal masak: will you be here in 20 minutes time?
08:50 masak literal: aye.
08:50 literal ok, gonna head to work, will catch up with you there
08:50 masak nod.
08:52 explorer joined #perl6
08:56 pmichaud joined #perl6
08:56 agentzh joined #perl6
08:56 finanalyst joined #perl6
08:56 szabgab joined #perl6
08:56 bacek joined #perl6
08:56 Teratogen joined #perl6
08:56 mdxi joined #perl6
08:56 eternaleye joined #perl6
08:56 tarbo2_ joined #perl6
08:56 rjh joined #perl6
08:56 stepnem joined #perl6
08:56 gbacon joined #perl6
08:56 estrabd joined #perl6
08:56 spx2 joined #perl6
08:56 omega joined #perl6
08:56 Trey joined #perl6
08:56 leedo joined #perl6
09:02 stepnem joined #perl6
09:02 pugs_svn r27622 | moritz++ | [t/spec] fudge test that TimToady++ corrected and now does not pass on Rakudo anymore
09:05 masak moritz_: is it entirely kosher to fudge regressions?
09:05 moritz_ masak: it's not a rakudo regression
09:05 masak oh, I see now.
09:05 masak then it's probably the right thing to do, yes.
09:12 Guest33554 joined #perl6
09:19 literal masak: since the rest of my gsoc schedule is concerned with writing/assimilating docs, what type of documentation do you think I should focus on?
09:20 moritz_ first of all blog about your progress so far.
09:20 literal ok
09:21 masak literal: what moritz_ said.
09:29 wayland76 literal: And then post a link to your blog here :)
09:29 wayland76 (literal: especially since I don't even know what your project is :) )
09:30 moritz_ IMHO the next step would perlintro for Perl 6
09:30 literal I had started fixing up the perlintro that's in the pugs repo
09:32 donaldh joined #perl6
09:39 masak rakudo: sub foo { return }; say foo.WHAT; say ?(foo ~~ Nil)
09:39 p6eval rakudo 415514: OUTPUT«Nil()␤0␤»
09:39 masak rakudo: sub foo { return }; say foo.WHAT; say ?(foo() ~~ Nil)
09:39 p6eval rakudo 415514: OUTPUT«Nil()␤1␤»
09:39 masak dang, I still screw up wrt listop precedence sometimes.
09:41 masak KyleHa++ # tests for RT tickets
09:41 patmat joined #perl6
09:42 dakkar rakudo: sub foo { return }; say &foo.WHAT
09:42 p6eval rakudo 415514: OUTPUT«Sub()␤»
09:42 literal how optional are parens around function arguments? are they only needed when the name might clash with a builtin or operator?
09:47 masak rakudo: sub next() { say "OH HAI" }; next
09:47 p6eval rakudo 415514: OUTPUT«OH HAI␤»
09:47 masak literal: seems user-defined subs take precedence.
10:01 damyan joined #perl6
10:05 sparc_ left #perl6
10:05 CorpX joined #perl6
10:06 CorpX left #perl6
10:14 [particle] joined #perl6
10:24 moritz_ next; is also implemented as a sub
10:25 literal it's weird that I can't fetch or update rakudo from github, yet I can do the same with other github repos
10:26 literal some firewall issue here perhaps
10:28 Matt-W that would be a weird firewall issue
10:29 literal yeah
10:29 literal I ended up pulling the repo from a machine in another country, then fetching a tarball of it to my computer
10:30 moritz_ ouch
10:30 moritz_ literal: did you use git:// or http://
10:30 literal git://
10:32 Jedai joined #perl6
10:34 literal after doing "perl ./Configure.pl --gen-parrot", at one point it tries to display a couple of Pod files with perldoc(1) instead of converting them, then fails when it can't find "ops/bit.pod"
10:34 literal anyone had this problem?
10:35 lisppaste3 literal pasted "Parrot build failure" at http://paste.lisp.org/display/83841
10:36 icwiener_ joined #perl6
10:37 wayland76 Might be worth asking on #parrot
10:37 literal yeah
10:37 wayland76 (on irc.parrot.org )
10:37 pmichaud good (early) morning, #perl6
10:37 phenny pmichaud: 07:32Z <wayland76> tell pmichaud Can you comment on http://rt.perl.org/rt3/Tic​ket/Display.html?id=63360 to indicate whether it's accurate, or leave me a message via phenny or something?
10:37 phenny pmichaud: 07:33Z <wayland76> tell pmichaud (ie. I want to know whether my most recent comments are accurate)
10:37 wayland76 Good evening :) :)
10:38 wayland76 Actually, since I'm here now, feel free to just discuss it in-channel, if you've time at the moment :)
10:38 moritz_ literal: that's weird, it shouldn't even convert PODs
10:39 literal well, there are som perldoc lines in there, like "/usr/bin/perldoc -ud packfile-c.pod ../src/packfile.c
10:39 moritz_ literal: could you please run cd parrot; make realclean; perl Configure.pl && make
10:39 literal ok
10:39 moritz_ oh wait
10:39 moritz_ it will come out the same
10:40 wayland76 moritz_: It seems to me like it's trying to extract pod from C files
10:40 Matt-W Wheee!
10:40 * Matt-W had a 70 minute meeting in which we mostly complained about the state of the source tree at work
10:41 moritz_ literal: if you are lucky, 'cd parrot; make -k' builds enough of parrot to run rakudo
10:41 wayland76 ...and did anyone say "fair squeeze of the source bottle"?  :)
10:44 literal if I manually execute the "/usr/bin/perldoc -ud packfile-c.pod" command while in docs/ I can call "make" again and it will continue until it fails on the next such Pod extraction
10:45 literal the Makefile is somehow executing "/usr/bin/perloc /usr/bin/perldoc -ud packfile-c.pod"
10:45 literal which gives me the same error
10:46 wayland76 That's pretty much the conclusion I just came to
10:46 moritz_ perloc?
10:46 wayland76 He means perldoc
10:46 literal I meant to write perldoc
10:46 moritz_ ok
10:46 wayland76 it's running perldoc on itself
10:47 literal this is from a fresh pull of Rakudo and Parrot, so there hasn't been any tampering by me
10:47 moritz_ so, it's a Configure.pl FAIL
10:48 moritz_ please open a trac ticket for that
10:49 moritz_ https://trac.parrot.org/parrot/newticket (you need to log in first)
10:51 M_o_C joined #perl6
10:55 meppl joined #perl6
10:58 Front_slash joined #perl6
11:05 szabgab joined #perl6
11:17 nErVe joined #perl6
11:20 stepnem joined #perl6
11:21 donaldh joined #perl6
11:24 rindolf joined #perl6
11:28 ihrd joined #perl6
11:29 mikehh joined #perl6
11:34 payload joined #perl6
11:35 ihrd left #perl6
11:36 wayland76 phenny: tell pmichaud OK, I'm leaving the channel now (see previous comments from me)
11:36 phenny wayland76: I'll pass that on when pmichaud is around.
11:40 damyan joined #perl6
11:48 synth joined #perl6
11:50 sri_kraih joined #perl6
11:54 dukeleto joined #perl6
12:12 moritz_ rakudo: class A { has Int $.x where { $_ < 23 } }; A.new(x => 1)
12:12 p6eval rakudo 415514:  ( no output )
12:12 moritz_ rakudo: class A { has Int $.x where { $_ < 23 } }; A.new(x => 42)
12:12 p6eval rakudo 415514:  ( no output )
12:12 masak I remember that one. :)
12:13 moritz_ so how do I declare an anonymous subtype on a parameter?
12:13 masak sub foo($param where { ... })
12:13 masak moritz_: like that?
12:13 moritz_ erm, I meant attribute
12:13 moritz_ but I just couldn't think.
12:14 masak moritz_: like you did above?
12:14 masak (except it isn't enforced in Rakudo)
12:14 masak moritz_: I thought you were reiterating an old masakbug.
12:14 moritz_ rakudo: class A { has Int where { $_ < 0 } $.x }; A.new(x => 42)
12:14 p6eval rakudo 415514: OUTPUT«Malformed declaration at line 2, near "Int where "␤Null PMC access in get_pmc_keyed()␤current instr.: 'perl6;Perl6;Compiler;eval' pc 289725 (src/gen_actions.pir:24150) (src/gen_setting.pm:3340)␤»
12:14 masak whoa.
12:15 masak moritz_: submit!
12:15 masak seems like a Null PMC Access during error reporting.
12:21 moritz_ submitted.
12:22 * Matt-W blinks
12:22 Matt-W Did I just see masak tell someone else to submit a bug??
12:30 masak Matt-W: I'm just back from a four-day vacation. I haven't re-revved up the engines. :P
12:31 jonathanturner joined #perl6
12:31 masak but it's not that uncommong that I ask people to submit bugs they discovered.
12:31 masak s/ong/on/
12:31 moritz_ when I ask people to write tests for bugs they discover I don't have as much success
12:32 masak writing tests feels like a bigger task.
12:33 masak 'sides, it's more rewarding to complain than to standardize. :)
12:34 moritz_ I'm glad that KyleHa++ has taken it up
12:34 masak yes, that's awesome.
12:35 masak I once called November the biggest Perl 6 application, but it really isn't if you count the test suite.
12:35 masak and the test suite needs devs just as much as November does.
12:36 moritz_ it's not what you'd usually call an application
12:36 masak just a matter of definitions, I think.
12:36 masak it's not a coherent whole, but a lot of small parts.
12:36 masak still, it's a large chunk of Perl 6 code.
12:36 moritz_ aye
12:37 moritz_ over the weekend I found a STD bug (er NYI) while writing tests
12:37 masak \o/
12:37 moritz_ s[foo] x= 2
12:37 moritz_ std: s[foo] x= 2
12:37 literal huh, tried checking out parror separately and building there, and it works
12:37 p6eval std 27622:  ( no output )
12:37 literal so it's a Rakudo build problem somehow
12:37 moritz_ should be the same .subst(/foo/, { $/ x 2 })
12:38 moritz_ bah, what's wrong with p6eval now?
12:39 p6eval joined #perl6
12:59 * masak just discovered http://perlgeek.de/blog-en/​perl-6/rakudo-overview.html
12:59 masak moritz_++
12:59 moritz_ thanks
13:00 moritz_ I spend some fun hours trying to learn inkscape
13:00 Avada joined #perl6
13:00 moritz_ s/spend/spent/
13:00 moritz_ grammar is hard.
13:05 masak let's go shopped!
13:20 masak std: alarm
13:20 p6eval std 27622: OUTPUT«Undeclared routine:␤   alarm used at 1 ␤ok 00:02 36m␤»
13:21 skids joined #perl6
13:22 maja joined #perl6
13:22 moritz_ std: s[foo] x= 2
13:22 p6eval std 27622: OUTPUT«##### PARSE FAILED #####␤Missing '=' at /tmp/fngP746itL line 1:␤------> [32ms[foo] [31mx= 2[0m␤FAILED 00:04 37m␤»
13:23 moritz_ it doesn't allow modified assignment ops, even though S05 explicitly does
13:23 masak STD-bug!
13:23 moritz_ aye. I'm sure sombody[tm] will notice on running 'make test'
13:24 masak oh, new tests?
13:27 moritz_ aye
13:27 moritz_ I looked over t/spec/TODO on Friday and Saturday and came up with some s[], s/// and ss/// tests
13:27 masak the Makefile in src/perl6 still uses gimme5, but gimme5 is being phased out in favour of viv, right?
13:28 moritz_ slowly, yes
13:28 xiaoyafeng joined #perl6
13:28 masak why? what's the difference between them?
13:29 moritz_ gimme5 uses a hackish, regexp-based parser to translate 6 to 5
13:29 moritz_ viv uses STD.pm to parse the Perl 6
13:29 moritz_ and nothing but STD.pm can parse Perl 6, or so they say :-)
13:30 masak and gimme5 fakes it?
13:30 moritz_ yes
13:30 masak viv++
13:33 moritz_ if you ++ viv, it give vivi
13:34 masak :)
13:34 moritz_ which I'd like to have
13:35 moritz_ 6 on 6, the bootstrapped Perl 6 compiler... /me floats away in his dreams
13:35 masak rakudo: $viv = 'ⅵⅴ'; $viv++; say $viv
13:35 p6eval rakudo 415514: OUTPUT«Symbol '$viv' not predeclared in <anonymous> (/tmp/vTLWQTfxuV:2)␤in Main (src/gen_setting.pm:3340)␤»
13:35 masak rakudo: my $viv = 'ⅵⅴ'; $viv++; say $viv
13:35 p6eval rakudo 415514: OUTPUT«ⅵⅵ␤»
13:35 masak \o/
13:36 Rolo joined #perl6
13:36 dakkar *why* does it work???
13:36 moritz_ masak: care to submit that as a test? :-)
13:37 * dakkar is scared of rakudo, sometimes
13:37 moritz_ dakkar: because rakudo knows about the Unicode roman number literals
13:37 dakkar ow, it's two characters
13:37 moritz_ aye
13:37 moritz_ and it increments the lasts
13:37 masak moritz_: I would, but I'm kinda working...
13:37 takadonet joined #perl6
13:37 dakkar ok, it's less scary that I thought at first
13:37 takadonet morning everyone
13:37 moritz_ and if there's an overflow, it increments the next-to-last etc
13:38 masak dakkar: glad I succeeded in freaking you out. :)
13:38 moritz_ masak: don't hurry, you can do it tonight when you've stopped working :-)
13:38 masak moritz_: I might.
13:38 masak but the sand I write my mental notes in is a bit slippery.
13:38 zamolxes joined #perl6
13:39 Rolo left #perl6
13:40 Avada joined #perl6
13:43 xiaoyafeng good night everyone ;)
13:46 PacoLinux joined #perl6
13:49 gbacon_ joined #perl6
13:51 nihiliad joined #perl6
13:59 jhorwitz joined #perl6
13:59 ruoso joined #perl6
14:07 fridim_ joined #perl6
14:11 ironcamel1 left #perl6
14:14 maja joined #perl6
14:24 lollan joined #perl6
14:28 iblechbot joined #perl6
14:28 pmurias joined #perl6
14:28 pmurias ruoso: hi
14:32 arejay joined #perl6
14:35 frew joined #perl6
14:43 ruoso hi pmurias
15:02 KyleHa joined #perl6
15:14 M_o_C joined #perl6
15:16 Front_sl1sh joined #perl6
15:20 donaldh joined #perl6
15:27 pmurias ruoso: do you think it ok if we treat yeast frames as lexical scope (that is they will handle lookup etc.)?
15:31 Lorn http://dev.perl.org/perl6/doc/apocalypse.html these documents are updated?
15:32 pmichaud Good morning, #perl6
15:32 phenny pmichaud: 11:36Z <wayland76> tell pmichaud OK, I'm leaving the channel now (see previous comments from me)
15:33 * pmichaud is coming to you live from Damian's "Perl 6: Why? What? How?" tutorial :-)
15:33 moritz_ phenny: so, tell us. Why? What? How?
15:34 moritz_ erm, I meant pmichaud ;-)
15:34 Lorn pmichaud: oscon? /me envy
15:34 pmichaud I can't say "Why? What? How?" yet -- we just started.  Ask me again in three hours :-)
15:40 justatheory joined #perl6
15:45 Woody2143 joined #perl6
16:02 TimToady blear
16:06 moritz_ did you mean "blech"? ;-)
16:06 TimToady blear : eyes :: blech : throat
16:09 moritz_ masak++ # that newest blog post
16:12 PerlJam FWIW, http://feather.perl6.nl/~duff/sc​riptinglanguages2009rankings.pdf
16:12 PerlJam I wonder how "true" these surveys are thouth
16:12 PerlJam er, though
16:13 payload joined #perl6
16:20 pugs_svn r27623 | hinrik++ | [docs] perlintro.pod: Fill in more sections, add one on smart matching
16:25 kane_ joined #perl6
16:26 ruoso pmurias, my point was to avoid the lookup calls, not delegate it to some other obhet
16:27 ruoso *object
16:28 pugs_svn r27624 | hinrik++ | [docs] perlintro.pod: Syntax fix in some code examples
16:36 spx2 arnsholt: what's your data structure book called ?
16:39 ruoso pmurias, the lexical scope is still usefull as an object on its own
16:44 pmurias ruoso: something we call might use CALLER, even if we store the variable in a register we might want to enable using lookup in the worst case
16:44 ruoso pmurias, exactly... the lexical scope still needs to exist
16:44 ruoso but the code needs to be smart enough to avoid doing a lookup when it's not needed
16:45 azawawi joined #perl6
16:45 azawawi hi
16:45 pmurias azawawi: hi
16:46 ruoso pmurias, for instance...
16:47 ruoso in the code generated by: my $a { my $b { my $c { say $a, $b, $c } } }
16:47 ruoso the outermost block can know that the inner block needs the variable '$a'
16:47 ruoso the second knows the inner needs '$a' and '$b'
16:47 ruoso and so on...
16:47 azawawi std: regex anint { <digit>+ $ };proto infix:<add> (@left,@right) { ... };
16:48 p6eval std 27624: OUTPUT«ok 00:03 38m␤»
16:48 ruoso pmurias, so you simply install the container on the inner yeast frame
16:48 azawawi std:proto infix:<add> (@left,@right) { ... }; regex anint { <digit>+ $ };
16:48 ruoso and avoid the lookup... while the lexical scope is still initialized
16:49 pmurias and if something block rebinds the variable?
16:49 pmurias s/block//
16:50 azawawi std: .
16:50 p6eval std 27624: OUTPUT«##### PARSE FAILED #####␤Obsolete use of . to concatenate strings; in Perl 6 please use ~ instead at /tmp/9XcRGHB61G line 2:␤------> [32m[31m;[0m␤FAILED 00:02 36m␤»
16:50 azawawi std:proto infix:<add> (@left,@right) { ... }; regex anint { <digit>+ $ };
16:51 ruoso pmurias, it means you need to store the bvalue in the yeast frame
16:51 cdarroch joined #perl6
16:51 dalek grok: 4d74916 | (Hinrik Örn Sigurðsson)++ | script/grok:
16:51 dalek grok: Add note about =table problems
16:51 dalek grok: review: http://github.com/hinrik/grok/commit/4d​7491653ceabf7a88c7fbb86a42f12cf7ca2beb
16:52 TimToady azawawi: I have not yet fixed the bug that makes that run out of memory
16:52 ruoso pmurias, but indeed, that would still do the lookup
16:52 azawawi TimToady: no problem im just following up :)
16:53 ruoso TimToady, can the use of CALLER or $*foo be used to re-bind a container? or just fetch/store values?
16:53 ruoso pmurias, a bind can be detected, I guess...
16:53 ruoso TimToady, if that question is not yet answered, I'd say that forbidding that rebind would be a great improvement in the room for future optimizations
16:54 Psyche^ joined #perl6
16:54 TimToady I'm inclined to agree, as an extension to the "lexical scopes are immutable" principle
16:54 TimToady (once closed)
16:54 ruoso great... that means re-binds are always visible to the compiler
16:55 ruoso and can pessimize on that
16:55 ruoso *the compiler can
16:55 ruoso i.e.: both "$*foo := something()" and "CALLER::<$foo> := something()" to result in a failure
16:57 ruoso TimToady, does that apply to eval'ed strings as well?
16:57 ruoso i.e.: my $foo; eval '$foo := something()';
16:58 TimToady can argue that one both ways
16:58 TimToady eval already massively pessimizes
16:58 ruoso ah.. right.. indeed..
16:59 TimToady but the fact that it's inline means it's the intention of the surrounding scope
16:59 ruoso right... but that's a naive example
17:00 ruoso my $a = '$foo := something()'; { my $foo; { eval $a } }
17:00 pmurias ruoso: re CALLER:<$foo> := something(), one can only see contextuals via CALLER right?
17:00 ruoso yes
17:03 pugs_svn r27625 | lwall++ | [STD] allow any assignop after s[], moritz++
17:03 pugs_svn r27625 | lwall++ | lexical alias of "our" should also alias the stash, not just package object
17:03 pugs_svn r27625 | lwall++ | other minor tweakages
17:05 molaf joined #perl6
17:08 tann_ joined #perl6
17:09 pmurias ruoso: i'm not sure where to put the 'does not rebind' and 'needs those lexicals' info
17:10 ruoso pmurias, we're going to need to fiddle with STD stash
17:11 ruoso pmurias, you can check where some specific variable comes from using STD information
17:11 ruoso and then reverse that information so that the outer yeast passes the containers to the inner yeast
17:12 ruoso maybe TimToady could help a bit on how to get that data from STD
17:13 pmurias does the data exist in our old snapshot?
17:14 ruoso I guess it does, since it already rejects undeclared variables, doesn't it?
17:14 moritz_ std: s[a] + 4;
17:14 p6eval std 27624: OUTPUT«##### PARSE FAILED #####␤Missing '=' at /tmp/VjIPAZq3Ux line 1:␤------> [32ms[a] [31m+ 4;[0m␤FAILED 00:04 37m␤»
17:15 pmurias ruoso: it warns about undeclared variables yes
17:15 ruoso pmurias, so it knows where the variables come from
17:20 tomyan joined #perl6
17:26 TimToady std: 25
17:26 p6eval std 27625: OUTPUT«ok 00:02 36m␤»
17:26 TimToady std: s[a] + 4;
17:26 p6eval std 27625: OUTPUT«##### PARSE FAILED #####␤Malformed assignment operator at /tmp/dowhSoTZF7 line 1:␤------> [32ms[a] +[31m 4;[0m␤FAILED 00:04 37m␤»
17:26 moritz_ std: s[1] += 4
17:26 p6eval std 27625: OUTPUT«ok 00:04 36m␤»
17:30 pmurias ruoso: but the lexical pads in STD exist only during the parse and we get our AST afterwords
17:37 FCO joined #perl6
17:38 mj41_ joined #perl6
17:46 TimToady pmurias: you can always poke pad links into the AST at reduce time
17:47 Solarion joined #perl6
17:49 pmichaud std: my @a;   say @a[-1];
17:49 p6eval std 27625: OUTPUT«##### PARSE FAILED #####␤Obsolete use of [-1] subscript to access final element; in Perl 6 please use [*-1] instead at /tmp/jAKzU6kdEa line 1:␤------> [32mmy @a;   say @a[-1][31m;[0m␤FAILED 00:02 39m␤»
17:52 dukeleto joined #perl6
17:53 TimToady pmichaud: was that a Q from the tutorial? :)
17:56 pmichaud TimToady: Yes -- Damian's slides are out of date there.  I think he'll be looking for you.  :-) :-)
17:57 TimToady I'm hiding at home :)
17:58 pmichaud I suspected as much.
18:01 KyleHa Do I need a github acct to commit to Rakudo?
18:01 pmichaud KyleHa: yes.  And a commit bit.  And for that you need a CLA :-)
18:02 KyleHa Conjugated Linoleic Acid ?
18:02 dukeleto_ joined #perl6
18:03 pmichaud Contributor License Agreement
18:03 pmichaud http://www.perlfoundation.org/​contributor_license_agreement
18:03 KyleHa Oh, I have to sign something?  Far out.
18:05 pmichaud and you'll need some existing committers to sponsor you.... but I think we can come up with that fairly easily.  :-)
18:05 cbk joined #perl6
18:06 KyleHa Thanks for the pointers.  I had been wondering about that for a while.
18:07 KyleHa I think I'll stay with git-format-patch for now.
18:07 PerlJam Does rakudo have a contributers guide in the repo somewhere?
18:07 tann_ does the subject of a patch submitted to an rt ticket contain [patch] [perl #xyz]? thanks
18:07 pmichaud It's called "README"
18:08 pmurias ruoso: one other way we could cut startup time would be to freeze/thaw objects instead of recreating them
18:09 PerlJam pmichaud: the README doesn't say anything about a CLA
18:09 ruoso pmurias, any idea on how to do it in a sane way?
18:11 pmurias ruoso: having a .c method which would return code to create the object
18:11 pmurias ?
18:12 ruoso pmurias, that's what we do now
18:13 pmichaud PerlJam: patch or commit welcome for fixing the README
18:14 pmichaud or even adding a contributors guide to docs/
18:21 clintongormley joined #perl6
18:21 KyleHa Is "A.foo" the same as "A::foo"?
18:22 pmichaud No.
18:22 pmichaud The first is a method call.
18:23 KyleHa OK, I get it.
18:23 KyleHa Thanks.
18:31 pmurias ruoso: and how will the lexicals be passed into Code.new?
18:33 kane_ joined #perl6
18:38 pugs_svn r27626 | kyle++ | eval_dies_ok now checks for "fairly_conclusive_platform_error"
18:38 pugs_svn r27627 | kyle++ | Test for RT #64566
18:38 ruoso pmurias, it's not to Code.new... we need to be able to create the closure clone and feed the variables there
18:44 pmurias doesn't Code.new create the closure clone?
18:44 pmurias s/closure clone/a new closure/
18:50 masak joined #perl6
18:51 athomason joined #perl6
19:00 KyleHa std: sub foo-bar {}
19:00 p6eval std 27627: OUTPUT«ok 00:02 36m␤»
19:00 KyleHa std: sub sub-marine { $torp++ }
19:00 p6eval std 27627: OUTPUT«Potential difficulties:␤  Variable $torp is not predeclared at /tmp/rmjw0Q2peN line 1:␤------> [32msub sub-marine { $torp[31m++ }[0m␤ok 00:02 36m␤»
19:01 KyleHa std: sub a-b {}; a-b();
19:01 p6eval std 27627: OUTPUT«ok 00:02 36m␤»
19:01 KyleHa Is it true that I should be able to define a sub with a hyphen in the name?
19:02 PerlJam rakudo: sub foo-bar { say "hi"; };   foo-bar;
19:02 p6eval rakudo 415514: OUTPUT«hi␤»
19:03 PerlJam not only does STD say so, but so does rakudo.
19:03 KyleHa PerlJam: Thanks.  That was clearly too obvious for me to see.  8-)
19:04 [particle] kyleha: and apostrophe, too!
19:04 [particle] rakudo: sub isn't { return Nil(); }
19:04 p6eval rakudo 415514:  ( no output )
19:05 KyleHa Oddly enough, I find that stranger than utf8 characters.
19:05 PerlJam heh
19:07 ruoso pmurias, right... maybe code.new needs a :feed-registers(...)
19:11 KyleHa rakudo: sub foo-bar { say 'hi'; }; foo-bar;
19:11 p6eval rakudo 415514: OUTPUT«hi␤»
19:11 KyleHa rakudo: eval "sub foo-bar { say 'hi'; }; foo-bar;"; say "$!"
19:11 p6eval rakudo 415514: OUTPUT«hi␤Malformed routine definition at line 1, near "foo-bar 1;"␤␤»
19:12 KyleHa What is that?
19:13 TimToady you interpolated {...}
19:13 KyleHa Oh.  The braces interpolate.
19:14 KyleHa TimToady:  Just when I figured it out.  Thanks.  8-)
19:14 KyleHa rakudo: eval "sub foo-bar \{ say 'hi'; \}; foo-bar;"; say "$!"
19:14 p6eval rakudo 415514: OUTPUT«hi␤Use of uninitialized value␤␤»
19:14 KyleHa Better.
19:15 TimToady rakudo: eval q/sub foo-bar { say 'hi'; }; foo-bar;/; say $!
19:15 p6eval rakudo 415514: OUTPUT«hi␤Use of uninitialized value␤␤»
19:16 TimToady rakudo: eval q{sub foo-bar { say 'hi'; }; foo-bar;}; say $!
19:16 p6eval rakudo 415514: OUTPUT«Syntax error at line 2, near "}; say $!"␤Null PMC access in get_pmc_keyed()␤current instr.: 'perl6;Perl6;Compiler;eval' pc 289725 (src/gen_actions.pir:24150) (src/gen_setting.pm:3340)␤»
19:16 TimToady kerblooey :)
19:16 KyleHa Ouch.
19:17 KyleHa In my real code, I want to interpolate, so backslashing is the way I'm going.
19:17 TimToady std: eval q{sub foo-bar { say 'hi'; }; foo-bar;}; say $!
19:17 p6eval std 27627: OUTPUT«ok 00:03 37m␤»
19:17 TimToady rakudo: eval qq:s/sub foo-bar { say 'hi'; }; foo-bar;/; say $!
19:17 p6eval rakudo 415514: OUTPUT«Syntax error at line 2, near "eval qq:s/"␤Null PMC access in get_pmc_keyed()␤current instr.: 'perl6;Perl6;Compiler;eval' pc 289725 (src/gen_actions.pir:24150) (src/gen_setting.pm:3340)␤»
19:18 TimToady rakudo: eval Q:s/sub foo-bar { say 'hi'; }; foo-bar;/; say $!
19:18 p6eval rakudo 415514: OUTPUT«Syntax error at line 2, near "eval Q:s/s"␤Null PMC access in get_pmc_keyed()␤current instr.: 'perl6;Perl6;Compiler;eval' pc 289725 (src/gen_actions.pir:24150) (src/gen_setting.pm:3340)␤»
19:23 tann_ rakudo: say 1.Str
19:23 p6eval rakudo 415514: OUTPUT«Int()<0xb6892660>␤»
19:24 tann_ rakudo: say '1.5'.Num
19:24 p6eval rakudo 415514: OUTPUT«Method 'Num' not found for invocant of class 'Str'␤»
19:24 tann_ rakudo: 1.5.int
19:24 p6eval rakudo 415514:  ( no output )
19:24 tann_ rakudo: say 1.5.int
19:24 p6eval rakudo 415514: OUTPUT«1␤»
19:25 tann_ rakudo: say 1.5.Str
19:25 p6eval rakudo 415514: OUTPUT«Num()<0xb6864450>␤»
19:26 tann_ pugs: say 1.5.Str
19:26 p6eval pugs: OUTPUT«*** No such method in class Rat: "&Str"␤    at /tmp/HEvD96fvzR line 1, column 5 - line 2, column 1␤»
19:29 pugs_svn r27628 | kyle++ | Test for RT #64656
19:34 Guest19957 joined #perl6
19:35 Guest19957 hey
19:35 KyleHa Ahoy.
19:36 Guest19957 i am newbie to perl and i would like to get some pointers on coding.
19:36 KyleHa Do you program in some other language already?
19:37 KyleHa std: map { say "$^a - $^b"}, 1..10 Z 1..10
19:37 Guest19957 yes python
19:37 p6eval std 27627:  ( no output )
19:37 KyleHa Okeydoke.
19:38 KyleHa perlmonks.org has a wealth of information and search facilities.
19:39 KyleHa std:  map { say "$^a - $^b"}, (1..10 Z 1..10)
19:39 p6eval std 27627:  ( no output )
19:39 Guest19957 what does that mean?
19:40 KyleHa In Perl, 'map' is similar to what you'd call a list comprehension.
19:40 Guest19957 Can you explain that further please
19:40 KyleHa http://perldoc.perl.org/functions/map.html
19:41 Guest19957 reading
19:41 KyleHa You're probably interested in learning about Perl 5, which is what's most commonly used out in the wild.  This channel is really about Perl 6.
19:41 Guest19957 but perl 6 has not come out yet
19:41 Guest19957 and yes perl 5
19:42 KyleHa If you're looking for IRC-based help with Perl 5, you might look here:  http://www.irc.perl.org/channels.mhtml
19:42 Guest19957 k
19:42 KyleHa You can get incomplete implementations of Perl 6 now.
19:43 Guest19957 na i lie perl 5
19:43 Guest19957 but is perl 6 more advanced?
19:43 KyleHa The language as specified is more advanced.  The language as implemented is a bit more scattershot.
19:45 lucs_ joined #perl6
19:45 Guest19957 join me in email
19:45 Guest19957 #email
19:46 arejay anyway to load a perl module from a local dir
19:47 KyleHa Sounds straight forward, but I don't know how that's done.
19:47 lisppaste3 rj pasted "IRCLog.pm" at http://paste.lisp.org/display/83875
19:48 arejay if i put it in /usr/local/lib/perl5/5.8.9/mach it works fine, but then if i want to run another version.. it fails
19:48 arejay cause it reads database.conf
19:48 arejay :[
19:50 arejay PERL5LIB
19:50 arejay hrm
19:51 arejay got it EXPORT
19:52 kane_ joined #perl6
19:52 Jedai joined #perl6
19:56 takadonet left #perl6
19:57 kane___ joined #perl6
19:58 sri_kraih_ joined #perl6
19:59 tomyan joined #perl6
20:05 moritz_ KyleHa: I'd prefer it if regression tests went into existing test file
20:06 moritz_ after all regression tests are only the secondary task of the spectest suite
20:06 KyleHa I looked for something appropriate, and I didn't find.  Where do you think do-bug.t should go?
20:07 moritz_ if it's related to do { }, in S04-statements/do.t
20:08 moritz_ if it's about identifiers... S02 somewhere, let me take a look...
20:08 KyleHa It's not really related to do {}
20:08 moritz_ S02-names/identifiers perhaps
20:08 moritz_ oh wait
20:09 KyleHa It's this ticket:  http://rt.perl.org/rt3/Tic​ket/Display.html?id=64656  subnames starting with do- can't be called.
20:09 moritz_ S02-names_and_variables/names.t smartlinks to the right section at least
20:09 moritz_ hm
20:09 moritz_ let's just move it to S02-names/identifier.t
20:10 KyleHa OK.  I'll do that.
20:10 KyleHa Thanks!
20:10 moritz_ thank you for writing the tests!
20:11 KyleHa I don't see an identifier.t
20:11 moritz_ yes, let's create that
20:11 KyleHa Oh, OK.
20:11 moritz_ just git mv
20:11 moritz_ and later on add more general tests, not necessarily related to this ticket
20:12 moritz_ it seems we also don't test for ' in names
20:12 KyleHa Yeah, I thought of that too.
20:12 moritz_ ack "\$\w+'\w" gives no result
20:12 moritz_ shall I, or will you? (moving)
20:12 KyleHa I'm doing it.
20:13 moritz_ great!
20:13 pugs_svn r27629 | kyle++ | move S06-other/do-bug.t to S02-names/identifier.t
20:14 KyleHa I was looking for a place to stick 64814 tests too.  S06-signature/type* or S06-signature/slurpy-*
20:15 KyleHa Is there a tool for showing test coverage like Devel::Cover in Perl 5?
20:15 PerlJam not yet
20:16 bigpresh_ joined #perl6
20:16 moritz_ I'd prefer S06-signature/slurpy-params.t, but either is OK
20:16 KyleHa OK, thanks.
20:24 kane_ joined #perl6
20:24 hoelzro joined #perl6
20:25 pugs_svn r27630 | moritz++ | [t/spec] more tests for identifier names; fudged for Rakudo
20:31 dalek rakudo: 3a2c5e2 | moritz++ | t/spectest.data:
20:31 dalek rakudo: add S02-names/identifier.t to spectest.data
20:31 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/3​a2c5e2bdfcc1aeb2e99bab1d1ad95f42bb1bb80
20:31 dalek rakudo: 0cdcc88 | (Bob Kuo)++ | README:
20:31 dalek rakudo: fixes typo in README file, 'git-format-patch' is actually 'git format-patch'
20:31 dalek rakudo: Signed-off-by: Moritz Lenz <moritz@faui2k3.org>
20:31 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/0​cdcc88ca3e03358d8d89508838fc395741ff82e
20:31 tomyan joined #perl6
20:32 icwiener joined #perl6
20:36 pugs_svn r27631 | kyle++ | Test for #64814
20:37 pugs_svn r27632 | lwall++ | [Cursor] fix infinite recursion bug, finanalyst++, azawawi++
20:45 frettled Hmm, was infinite recursion bugging?  ;)
20:45 pugs_svn r27633 | kyle++ | [t/spec] Match descriptions to tests
20:48 moritz_ pmichaud: so, do you know what, why and how?
20:50 pmichaud I do!
20:50 pmichaud well, I know .WHAT and .HOW.   .WHY got skipped over a bit :-)
20:50 pjscott joined #perl6
20:50 pjscott left #perl6
20:51 TimToady "because it's not there"
20:51 moritz_ that would have been the really interesting part for us.
20:51 payload joined #perl6
20:51 moritz_ I meant more like, how do POD variables work in detail, get attached to objects etc.
20:52 mncharity joined #perl6
20:53 moritz_ KyleHa++ # cleaning up after me
20:54 mncharity hi all.  random thought: the http://rosettacode.org/ page for Perl 6  http://rosettacode.org/wiki/Category:Perl_6 is largely empty.  There are a variety of tasks http://rosettacode.org/wiki/Categ​ory:Solutions_by_Programming_Task one might code to show p6 idioms.
20:54 mncharity cheers &
20:54 M_o_C are there usually video recordings of OSCON talks?
21:01 pmichaud video recording of oscon talks is often spotty.  Depends on the speaker.
21:02 M_o_C hm, ok
21:04 explorer joined #perl6
21:15 hoelzro quick question about Perl 6.  I attended Damien Conway's talk at OSCON earlier today (very inspiring, by the way!), and he mentioned the "$high max= $value" construct.  I was wondering why a max= shortcut operator was added when you could do something like "$high .= max($value)"?
21:16 ruoso hoelzro, max= wasn't added... it's just a natural use of the = metaoperator...
21:16 pmichaud Also, max isn't a method.
21:16 ruoso hoelzro, it works the same way as +=, but for whatever operator you want
21:16 pmichaud at least, it's not a method that compares the invocant against another value
21:16 hoelzro ruoso: so max='s existence isn't explicit, it's just created automatically when you create a binary operator?
21:17 pmichaud $high max= $value   is    $high = $high max $value;
21:17 moritz_ modulo precedence
21:17 ruoso hoelzro, it's not even created automatically... the parser is a bit smarter than that
21:17 hoelzro alright
21:17 ruoso it's an operator and a meta operator
21:17 frettled Who's going to Lisbon, BTW?
21:18 * ruoso not
21:18 ruoso even If I used to live there ;)
21:18 pmichaud <- going to lisbon
21:18 * moritz_ would love to, but can't
21:18 frettled pmichaud: yay
21:18 jrtayloriv joined #perl6
21:18 frettled moritz_: aw :(
21:19 hoelzro ok, so max isn't a method...is + implemented as a method? (aka. how special are operators?)
21:19 pmichaud most operators tend to be multi subs
21:20 pmichaud (which often turn around and call methods or do things method-like)
21:21 hoelzro pmichaud: so max is a multi sub that calls a method?
21:21 hoelzro I just think a max method on Number would be good
21:21 hoelzro 3.max(4) # 4
21:21 KyleHa rakudo: sub infix:<+>{ $^a * $^b }; say 2 + 3;
21:21 hoelzro just another way to do it
21:21 p6eval rakudo 0cdcc8: OUTPUT«6␤»
21:21 KyleHa Nyuck nyuck nyuck.
21:22 pmichaud actually, there's a .max method, but it's list-like and not operator like
21:22 pmichaud rakudo:   say (3,5,4).max;
21:22 p6eval rakudo 0cdcc8: OUTPUT«5␤»
21:22 pmichaud rakudo:   say 4.max;
21:22 p6eval rakudo 0cdcc8: OUTPUT«4␤»
21:22 hoelzro I see
21:23 frettled pretty neat, anyway.
21:23 pmichaud so infix:<max> is actually somewhat different from Any.max
21:23 hoelzro ok
21:23 pmichaud What Damian didn't show is that there's a max function as well.
21:23 pmichaud rakudo:   say max (3,5,4);
21:23 p6eval rakudo 0cdcc8: OUTPUT«No applicable candidates found to dispatch to for 'max'␤in Main (/tmp/N3uTDXsIE1:2)␤»
21:24 pmichaud oops
21:24 pmichaud rakudo:   say max 3,5,4
21:24 p6eval rakudo 0cdcc8: OUTPUT«No applicable candidates found to dispatch to for 'max'␤in Main (/tmp/0dceAXEbHi:2)␤»
21:24 nihiliad joined #perl6
21:24 pmichaud hmmmm.
21:24 moritz_ rakudo: say [max] 2, 5, 4
21:24 p6eval rakudo 0cdcc8: OUTPUT«5␤»
21:24 pmichaud moritz_: yes, that's a different one.
21:24 KyleHa Heh.
21:24 pmichaud There *was* a max function as well at one time.
21:24 Whiteknight joined #perl6
21:25 moritz_ I'm not very familiar with the history of Perl 6 ;-)
21:25 pmichaud I guess it's gone now.
21:25 pmichaud (the synopsis says to use [max])
21:26 jrtayloriv joined #perl6
21:29 M_o_C "[max] 1, 2, 3" is equal to "1 max 2 max 3", right?
21:30 moritz_ right
21:42 maja_ joined #perl6
21:54 hudnix joined #perl6
21:56 hudnix Is there a way for a parametric role to create method names composed from its parameters?
21:56 PerlJam hudnix: that seems ... weird.
21:57 moritz_ if the parameter of the role appears in the signature of the method, it's already part of the long  name
21:58 hudnix something like: role foo[Str $meth] {method $meth {say $meth}};
21:58 integral joined #perl6
21:58 PerlJam hudnix: why?
22:01 hudnix because I want to create multidimensional doubly linked lists, and I only want to implement the inserts/deletes once, and then have a class do the role with different parameters, e.g.: does List["left", "right"]; does List["up","down"], then the methods will be insertup, deleteleft, etc.
22:02 moritz_ I think it would be better to have the updown and leftrigh linkage as attributes
22:02 moritz_ and then you can use 'handles' to delegate to that
22:03 moritz_ 'has Linking $.updown handles<up down>'
22:03 moritz_ 'has Linking $.leftright handles<left right>'
22:03 moritz_ or something along these lines
22:03 hudnix yes that would work too
22:04 moritz_ with more magic and less confusion, I think ;-)
22:05 moritz_ erm, less magic
22:05 hudnix But I would have to define the up, down left and right methods in the Linking role right?
22:05 moritz_ actually you can rename the methods with 'handles'
22:06 moritz_ ie $.updown handles left => 'up', right => 'down'
22:06 hudnix ah!
22:06 hudnix ok, that'll work
22:06 moritz_ (I don't knwo if I got the syntax right, but S12 should help you there)
22:07 hudnix But I still think parametric method names would be cool :)
22:08 SmokeMachine joined #perl6
22:08 moritz_ variable method names look like design smell to me, just like variable variable names
22:10 hudnix They would be constant, no? Just specified at composition time.
22:12 icwiener_ joined #perl6
22:19 olaf397 joined #perl6
22:27 tomyan joined #perl6
22:57 chid joined #perl6
22:58 jrtayloriv joined #perl6
23:00 hoelzro joined #perl6
23:05 colomon joined #perl6
23:09 c1sung_ joined #perl6
23:10 justatheory_ joined #perl6
23:22 tann_ rakudo: say "1".Int
23:22 p6eval rakudo 0cdcc8: OUTPUT«1␤»
23:22 tann_ rakudo: say "1.5".Int
23:22 p6eval rakudo 0cdcc8: OUTPUT«1␤»
23:23 tann_ rakudo: say 1.Str
23:23 p6eval rakudo 0cdcc8: OUTPUT«Int()<0xb68a9660>␤»
23:23 tann_ rakudo: my Int ($x, $y);
23:23 p6eval rakudo 0cdcc8:  ( no output )
23:24 tann_ rakudo: my Int ($x, $y) = 1, 2; say "$x : $y"
23:24 p6eval rakudo 0cdcc8: OUTPUT«1 : 2␤»
23:25 tann_ rakudo: my (Int $x, Num $y) = 1, 1.2; say "$x : $y"
23:25 p6eval rakudo 0cdcc8: OUTPUT«1 : 1.2␤»
23:25 tann_ rakudo: my Int @a = 1, 1.1, 1.2, 1.3; say @a.perl
23:26 p6eval rakudo 0cdcc8: OUTPUT«Array assignment type check failed; expected Int, but got Num␤Null PMC access in get_pmc_keyed()␤current instr.: 'perl6;Perl6;Compiler;eval' pc 289725 (src/gen_actions.pir:24150) (src/gen_setting.pm:3340)␤»
23:28 tann_ rakudo: my @a = 1..10; @a.map: { $_ % 2}; say @a.perl
23:28 p6eval rakudo 0cdcc8: OUTPUT«[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]␤»
23:28 tann_ rakudo: my @a = 1..10; @a.map: { $_ % 2 }; say @a.perl
23:28 p6eval rakudo 0cdcc8: OUTPUT«[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]␤»
23:29 tann_ rakudo: my @a = 1..10; @a.=map: { $_ % 2 }; say @a.perl
23:29 p6eval rakudo 0cdcc8: OUTPUT«[1, 0, 1, 0, 1, 0, 1, 0, 1, 0]␤»
23:30 tann_ rakudo: my @a = 1..10; @a.map: { $_ = $_ % 2 }; say @.perl
23:30 p6eval rakudo 0cdcc8: OUTPUT«Lexical 'self' not found␤»
23:31 TimToady rakudo: my @a = 1..10; @a.map: { $_ = $_ % 2 }; say @a.perl
23:31 p6eval rakudo 0cdcc8: OUTPUT«[1, 0, 1, 0, 1, 0, 1, 0, 1, 0]␤»
23:31 TimToady rakudo: my @a = 1..10; @a.map: { $_ %= 2 }; say @a.perl
23:31 p6eval rakudo 0cdcc8: OUTPUT«[1, 0, 1, 0, 1, 0, 1, 0, 1, 0]␤»
23:32 TimToady rakudo: my @a = 1..10; @a »%=» 2; say @a.perl
23:32 p6eval rakudo 0cdcc8: OUTPUT«Statement not terminated properly at line 2, near "\x{bb}%=\x{bb} 2; sa"␤Null PMC access in get_pmc_keyed()␤current instr.: 'perl6;Perl6;Compiler;eval' pc 289725 (src/gen_actions.pir:24150) (src/gen_setting.pm:3340)␤»
23:33 TimToady rakudo: my @a = 1..10; @a >>%=>> 2; say @a.perl
23:33 p6eval rakudo 0cdcc8: OUTPUT«Statement not terminated properly at line 2, near ">>%=>> 2; "␤Null PMC access in get_pmc_keyed()␤current instr.: 'perl6;Perl6;Compiler;eval' pc 289725 (src/gen_actions.pir:24150) (src/gen_setting.pm:3340)␤»
23:33 pmichaud I don't think Rakudo hyperizes assignment yet
23:33 TimToady std: my @a = 1..10; @a >>%=>> 2; say @a.perl
23:33 p6eval std 27633: OUTPUT«##### PARSE FAILED #####␤Can't hyper a multiplicative because it's too fiddly at /tmp/kpDmL75bAx line 1:␤------> [32mmy @a = 1..10; @a >>%=>>[31m 2; say @a.perl[0m␤FAILED 00:02 37m␤»
23:33 TimToady aww
23:34 sjohnson :(
23:34 TimToady and it has nothing to do with the multiplicativeness...
23:34 TimToady std: my @a = 1..10; @a >>%>> 2; say @a.perl
23:35 p6eval std 27633: OUTPUT«ok 00:02 37m␤»
23:35 sjohnson you broketed it
23:41 skids joined #perl6
23:54 hoelzro joined #perl6
23:54 c1sung joined #perl6
23:56 pugs_svn r27634 | pmichaud++ | [t/spec]:  Unfudge a test for Rakudo.

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

Perl 6 | Reference Documentation | Rakudo