Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2010-10-01

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 tylercurtis rakudo: sub Good ($time) { say "Good $time #perl6." }; Good time #perl6
00:00 p6eval rakudo 8827d0: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 22␤»
00:02 ash_ rakudo: sub Good ($time) { say "Good $time \#perl6." }; Good time # note the \#
00:02 mfollett joined #perl6
00:02 p6eval rakudo 8827d0: OUTPUT«Good 1285889946 #perl6.␤»
00:02 ash_ although 128589946 is not as meaningful as one would hope
00:02 tylercurtis std: sub Good ($time) { say "Good {$time.perl} #perl6." }; Good time # perl6
00:02 p6eval std 1d6fdf3: OUTPUT«ok 00:02 119m␤»
00:02 tylercurtis rakudo: sub Good ($time) { say "Good {$time.perl} #perl6." }; Good time # perl6
00:03 p6eval rakudo 8827d0: OUTPUT«Good 1285889998 #perl6.␤»
00:03 tylercurtis rakudo: sub Good ($time) { say "Good $time #perl6." }; Good now # perl6
00:03 p6eval rakudo 8827d0: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 22␤»
00:03 tylercurtis rakudo: sub Good ($time) { say "Good $time \#perl6." }; Good now # perl6
00:03 p6eval rakudo 8827d0: OUTPUT«Good Instant:2010-09-30T23:40:32.751667Z #perl6.␤»
00:04 tylercurtis Interesting. I wonder if that's submitted.
00:04 * masonkramer doesn't see the bug
00:06 tylercurtis STD parses it but Rakudo doesn't.
00:06 tylercurtis std: sub Good ($time) { say "Good $time #perl6." }; Good time #perl6
00:06 p6eval std 1d6fdf3: OUTPUT«ok 00:01 119m␤»
00:06 ash_ std: sub Good ($time) { say "Good $time \#perl6." }; Good time
00:06 p6eval std 1d6fdf3: OUTPUT«ok 00:01 119m␤»
00:06 ash_ hmmm
00:07 ash_ wonder what's up with that
00:07 masonkramer oh
00:07 tylercurtis rakudo: "#foo";
00:07 p6eval rakudo 8827d0:  ( no output )
00:07 tylercurtis rakudo: "$_ #foo";
00:07 p6eval rakudo 8827d0: OUTPUT«===SORRY!===␤Confused at line 22, near "\"$_ #foo\";"␤»
00:13 colomon_ joined #perl6
00:13 colomon left #perl6
00:13 colomon_ is now known as colomon
00:13 masonkramer rakudo: say "#foo"; say "$_ #foo"
00:13 p6eval rakudo 8827d0: OUTPUT«===SORRY!===␤Confused at line 22, near "say \"$_ #f"␤»
00:14 masonkramer rakudo: say "#foo"
00:14 p6eval rakudo 8827d0: OUTPUT«#foo␤»
00:14 masonkramer rakudo doesn't print the value of the last expression
00:17 stkowski left #perl6
00:20 jest left #perl6
00:22 mfollett left #perl6
00:27 jferrero left #perl6
00:28 jest joined #perl6
00:28 jest left #perl6
00:32 mavrc left #perl6
00:35 nymacro left #perl6
00:48 fod joined #perl6
00:54 tylercurtis left #perl6
01:01 isBEKaml left #perl6
01:04 envi joined #perl6
01:17 tylercurtis joined #perl6
01:19 mfollett joined #perl6
01:25 mfollett left #perl6
01:31 satyavvd joined #perl6
01:34 bluescreen left #perl6
01:34 satyavvd_ joined #perl6
01:35 satyavvd left #perl6
01:35 satyavvd_ is now known as satyavvd
01:36 satyavvd left #perl6
01:37 molaf__ joined #perl6
01:41 molaf_ left #perl6
01:41 am0c^ joined #perl6
01:50 meppl left #perl6
01:52 meppl joined #perl6
02:03 TiMBuS left #perl6
02:03 daemon left #perl6
02:05 daemon joined #perl6
02:06 TiMBuS joined #perl6
02:10 lue left #perl6
02:10 lue joined #perl6
02:11 dominix joined #perl6
02:19 mfollett joined #perl6
02:20 mfollett left #perl6
02:22 Italian_Plumber left #perl6
02:33 colomon rakudo: role A { has $.b; }; my $c = A.new(:b(10)); say :$c.perl;
02:33 p6eval rakudo 8827d0: OUTPUT«"c" => .new(b => 10)␤»
02:33 colomon rakudo: role A { has $.b; }; my $c = A.new(:b(10)); say $c.b;
02:33 p6eval rakudo 8827d0: OUTPUT«10␤»
02:39 colomon that doesn't seem to be working in my current code.  :\
02:41 colomon oh wait, yes it is.  hmmm.
02:43 leprevost joined #perl6
02:44 masonkramer oh.  now I get tylercurtis's bug =P
02:44 duff joined #perl6
02:48 Italian_Plumber joined #perl6
02:50 leprevost left #perl6
02:56 justatheory left #perl6
02:59 Italian_Plumber left #perl6
03:04 Italian_Plumber joined #perl6
03:05 LionMadeOfLions left #perl6
03:13 LionMadeOfLions joined #perl6
03:25 duff is now known as PerlJam
03:28 Italian_Plumber left #perl6
03:29 Italian_Plumber joined #perl6
03:32 Italian_Plumber left #perl6
03:33 Italian_Plumber joined #perl6
03:42 meppel joined #perl6
03:46 meppl left #perl6
03:47 dukeleto joined #perl6
03:47 Schwern joined #perl6
03:54 Italian_Plumber left #perl6
03:55 nymacro joined #perl6
03:55 Italian_Plumber joined #perl6
03:56 dominix left #perl6
03:59 satyavvd joined #perl6
04:04 Italian_Plumber1 joined #perl6
04:05 mikehh left #perl6
04:05 Italian_Plumber left #perl6
04:15 PerlJam left #perl6
04:20 exodist is now known as Exodist
04:22 ggoebel left #perl6
04:25 Italian_Plumber1 left #perl6
04:31 xinming_ joined #perl6
04:33 xinming left #perl6
04:43 am0c^ left #perl6
04:51 sftp left #perl6
04:56 pythonian4000 is now known as pythonian4000afk
04:59 jql joined #perl6
05:23 Guest23195 joined #perl6
05:44 masonkramer left #perl6
05:44 masonkramer joined #perl6
05:44 ash_ left #perl6
05:45 justatheory joined #perl6
05:47 justatheory left #perl6
05:47 tylercurtis left #perl6
05:50 grew left #perl6
06:04 sorear good * #perl6
06:04 sorear (thunderstorms really crimp my hacking time.  otoh, they're quite pretty.)
06:10 sorear FWIW, I plan to completely ignore TheDamian
06:12 fod left #perl6
06:16 dju left #perl6
06:20 am0c^ joined #perl6
06:24 grew joined #perl6
06:40 Schwern left #perl6
06:46 dual left #perl6
06:55 am0c^ left #perl6
07:07 Mowah joined #perl6
07:14 baux joined #perl6
07:15 Schwern joined #perl6
07:20 am0c^ joined #perl6
07:23 araujo left #perl6
07:36 icwiener joined #perl6
07:36 am0c^ left #perl6
07:37 am0c^ joined #perl6
07:37 kst left #perl6
07:38 kst joined #perl6
07:48 wtw joined #perl6
07:59 daxim joined #perl6
08:06 pythonian4000afk is now known as pythonian4000
08:09 icwiener left #perl6
08:17 jnthn o/ #perl6
08:18 moritz_ \o
08:23 sorear o/ #jnthn
08:24 buubot left #perl6
08:26 dukeleto left #perl6
08:28 buubot joined #perl6
08:41 masak joined #perl6
08:41 masak oh hai, #perl6!
08:42 nymacro good evenin' gov'na
08:42 jnthn lolitsmasak!
08:45 masak lol!
08:45 masak I won't be longing around very stay today.
08:45 * moritz_ thinks masak is longing for other shores
08:46 masak pinin' for the fjords, p'haps.
08:46 moritz_ masak: I hope you don't return as a resting parrot :-)
08:47 masak I'll try not to. :)
08:47 masak I'll try to return as a well-rested parrot instead.
08:47 jnthn :-)
08:48 masak I'm supposed to release Yapsi tonight, but I don't know what connectivity I will have, so the timeliness of the release is a bit uncertain.
08:49 jnthn .oO( Official Perl 6 release delayed! )
08:49 masak had I realized this sooner, I might have put together a release guide and asked someone else to do the release...
08:49 masak jnthn: ssh! you'll end up on Slashdot if you keep repeating that :P
08:50 nymacro Perl 6: It will come out sometime. So will Duke Nukem Forever.
08:51 buubot left #perl6
08:51 moritz_ and The Hurd!
08:52 masak let's not forget about Xanadu and Plan 9.
08:53 masak also, I hear that fifth-generation computers from Japan have been delayed. they're no longer to be released in the 80s, but... sometime later.
08:54 buubot joined #perl6
08:59 flussence :( the hardware curse got me today
09:00 flussence half the morning bus services broke down at the same time...
09:00 nymacro :)
09:00 icwiener joined #perl6
09:01 * flussence blames it on solar radiation
09:02 flussence .oO( even though there's almost none of that visible today )
09:03 sorear if you blame the climate in general, I can share
09:03 sorear I was kept away from #perl6 by freak thunderstorms
09:03 flussence I think they're headed my way...
09:05 sorear Technically, yes.
09:06 sorear However it will take a while for storms to blow from San Diego to the Isle of Man, even if they are going in the right direction.
09:06 masak an interesting short note by Erik Naggum about why "is it finished?" is the wrong question toask: http://www.xach.com/naggum/article​s/19950606T083841Z@naggum.no.html
09:06 flussence heh
09:08 jnthn ...wtf...this machine I'm working on at $dayjob is making some...not good noises...
09:08 flussence oh no, not you too!
09:08 jnthn My keyboard here failed yesterday!
09:10 * flussence starts running backups, just in case
09:10 jnthn :-)
09:11 jnthn I suspect the noise I'm hearing is just a fan on the way out.
09:12 kjeldahl joined #perl6
09:12 sorear jnthn: What is OUTER:: in a where{} block?
09:13 jnthn The sub
09:13 jnthn well
09:13 jnthn in sub foo($x where 42) { }
09:13 jnthn it'd be foo
09:13 jnthn (replace 42 with something interesting :-))
09:14 jnthn Needs to be since we're binding the parameters into the lexpad of foo and conditions can look at already bound ones.
09:16 icwiener left #perl6
09:17 jnthn Same for defaults, fwiw.
09:19 sorear What if foo is a multi?
09:19 * moritz_ guesses it's just the current candidate, not the full multi
09:19 jnthn The multi-ness is all about the symbol installation rather than the sub itself being different
09:20 jnthn e.g. you make the same thing as for a non-multi and it just gets stuck in a candidate list instead of the lexpad.
09:20 jnthn So, what moritz_ said.
09:21 pjcj left #perl6
09:21 pjcj joined #perl6
09:22 mikehh joined #perl6
09:22 sorear I'm more wondering how something can be run in the sub's lexpad before we've committed to which candidate we're running.
09:23 jnthn ?
09:23 jnthn If you're asking that I think your mental model of multis is wrong.
09:23 sorear call &foo
09:23 sorear &foo resolves to the proto
09:23 jnthn Right, which then calls a dispatcher.
09:23 masak I also see no problem.
09:24 moritz_ and at some point, the where-block is checked
09:24 moritz_ and the where-block is an ordinary closure
09:24 sorear the dispatcher does $sorted-candidates.first({ $capture ~~ $^a.signature })
09:24 jnthn Right
09:24 masak I guess the optimizer may re-order and complicate things, but then it's the optimizer's mess, and it has to correct for its own lies.
09:24 jnthn Taht's an really inefficient implementation, but essentially OK.
09:25 sorear moritz_: Normal closures are run AFTER the enclosing sub's ENTER time
09:25 sorear If the multi dispatcher is going to call where blocks while deciding what to call, then things are reversed
09:25 jnthn Doing a signature bindability check means you need to get a lexpad made so you can put such things in place.
09:25 jnthn In Rakudo we re-use the one from the winning candidate for the "real" invocation.
09:27 sorear Asides from being written in Perl 6, what's slow about that?
09:28 moritz_ you can be smarter about where to start searching, based on the nominal types
09:28 am0c joined #perl6
09:28 sorear Unrelated: How do you plan to handle stuff like dir(), IO::Socket::INET, etc in PortableRakudo?  nqp::readdir, nqp::gethostbyname, etc?
09:28 moritz_ yes, that's the plan
09:39 am0c left #perl6
09:43 hugme left #perl6
09:51 masak have a good weekend, everybody!
09:51 masak I might not re-surface until Monday, in the Netherlands.
09:51 masak o/
09:51 masak left #perl6
09:54 timbunce joined #perl6
09:55 am0c joined #perl6
09:59 jferrero joined #perl6
10:06 nymacro perlcabal.org is down?
10:07 moritz_ yes, that's a feather1 service
10:08 moritz_ which said goodbye in a cloud of smoke
10:08 ruoso left #perl6
10:10 oyse joined #perl6
10:11 oyse_ joined #perl6
10:11 oyse left #perl6
10:12 oyse_ left #perl6
10:13 oyse joined #perl6
10:13 oyse left #perl6
10:14 oyse_ joined #perl6
10:14 mathw o/
10:18 tadzik joined #perl6
10:20 tadzik oh hai
10:40 mavrc joined #perl6
10:43 am0c^ left #perl6
10:48 mavrc left #perl6
10:49 mavrc joined #perl6
10:57 orafu left #perl6
10:58 orafu joined #perl6
11:04 * moritz_ back from nom
11:06 Italian_Plumber joined #perl6
11:08 jnthn moritz_: Nice nom?
11:09 moritz_ /~/
11:09 moritz_ 'twas OK
11:10 pythonian4000 is now known as pythonian4000afk
11:10 jnthn Same...mine was less good that yesterdays.
11:10 jnthn But yesterdays was pancakes... :-)
11:16 wamba joined #perl6
11:35 oyse_ left #perl6
11:36 oyse joined #perl6
11:38 tadzik1 joined #perl6
11:40 tadzik left #perl6
11:51 takadonet morning
11:52 xabbu42 joined #perl6
11:52 colomon o/
11:53 satyavvd left #perl6
11:54 jnthn o/ colomon
11:55 colomon good morning!
11:55 amkrankruleuen joined #perl6
11:55 moritz_ good localtime()
11:56 moritz_ rakudo: say ~now.^methods(:local)
11:56 p6eval rakudo 8827d0: OUTPUT«new from-posix to-posix Str perl ACCEPTS Bridge Real Bool Int Rat Num Complex reals isNaN abs exp ln sqrt roots sign floor ceiling truncate round cis unpolar rand sin asin cos acos tan atan sec asec cosec acosec cotan acotan sinh asinh cosh acosh tanh atanh sech asech cosech
11:56 p6eval ..acosec…
11:56 tadzik1 is now known as tadzik
11:57 moritz_ rakudo: say now.WHAT
11:57 p6eval rakudo 8827d0: OUTPUT«Instant()␤»
11:57 moritz_ rakudo: say ~Instant.^methods(:local)
11:57 p6eval rakudo 8827d0: OUTPUT«new from-posix to-posix Str perl ACCEPTS Bridge Real Bool Int Rat Num Complex reals isNaN abs exp ln sqrt roots sign floor ceiling truncate round cis unpolar rand sin asin cos acos tan atan sec asec cosec acosec cotan acotan sinh asinh cosh acosh tanh atanh sech asech cosech
11:57 p6eval ..acosec…
11:57 moritz_ oh, Instant does Real
11:58 colomon rakudo: say Instant ~~ Real
11:58 p6eval rakudo 8827d0: OUTPUT«1␤»
11:58 moritz_ rakudo: say Instant.^roles
11:58 p6eval rakudo 8827d0: OUTPUT«Real()␤»
11:59 moritz_ rakudo: say 'good ' ~ <morning noon afternoon>[time.hour div 8]
11:59 p6eval rakudo 8827d0: OUTPUT«Method 'hour' not found for invocant of class 'Integer'␤  in main program body at line 22:/tmp/ZR4KJnMjwT␤»
12:00 moritz_ rakudo: say 'good ' ~ <morning noon afternoon>[DateTime.now.hour div 8]
12:00 p6eval rakudo 8827d0: OUTPUT«good noon␤»
12:00 tadzik rakudo: DateTime.now.hour.say
12:00 p6eval rakudo 8827d0: OUTPUT«11␤»
12:03 Schwern left #perl6
12:04 nymacro goo noon moritz_
12:04 * moritz_ wonders why the server clock is not in UTC
12:05 moritz_ rakudo: say DateTime.now
12:05 p6eval rakudo 8827d0: OUTPUT«2010-10-01T11:42:05Z␤»
12:05 moritz_ it seems completely off
12:06 nymacro it isn't completely off. I'm just from the future.
12:06 moritz_ past, actually :-)
12:07 moritz_ Fri Oct  1 12:06:53 UTC 2010
12:07 moritz_ since the trailing Z stands for UTC (iirc), it's past
12:09 * Juerd hates the T in ISO datetimes
12:09 Juerd Makes it unreadable
12:11 moritz_ 1 Oct 11:47:59 ntpdate[30106]: step time server 24.189.19.214 offset 1385.646993 sec
12:11 flussence huh, I always thought the T was optional...
12:12 Juerd It's not; I have a few s/T/ / and s/ /T/
12:13 nymacro moritz_, it is nearly the 2nd here. So I'm from the future ;)
12:13 moritz_ nymacro: we need those future people; welcome to #perl6 :-)
12:15 nymacro it isn't like I have anything better to do; in the future robots do all my work for me
12:18 nymacro (PS. invest in SuperRobototronics, it will pay off)
12:19 flussence argh... all this date talk prompted me to check $dayjob's servers and two of them weren't even running ntp.
12:20 oyse Is perlcabal.org down at the moment? I am trying to access the synopsis, but no response from the server
12:20 moritz_ oyse: yes, down
12:21 moritz_ you can read the POD versions on http://github.com/perl6/specs/ for now
12:21 oyse moritz_: thanks
12:22 oyse moritz_: Github parses pod. Nice :)
12:22 mjk joined #perl6
12:22 * flussence sees a very unpleasant error in the server log
12:23 flussence "time correction of 31535909 secionds exceeds sanity limit (1000)" :(
12:23 flussence s/i//
12:23 moritz_ oh wow
12:23 flussence yeah, not exactly 2 minutes off
12:24 moritz_ rakudo: say 31535909 / 3600 / 24
12:24 p6eval rakudo 8827d0: OUTPUT«364.998946759259␤»
12:24 moritz_ oh, nearly exactly one year
12:26 moritz_ maybe some license expired, and somebody "adjusted" the server clock? :-)
12:27 cognominal left #perl6
12:27 colomon loliblogged: http://justrakudoit.wordpress.com/​2010/10/01/hesitant-steps-forward/
12:31 abra joined #perl6
12:32 moritz_ yes, // '' should work
12:32 daxim colomon, the blog is too narrow to read the code comfortably
12:34 flussence the "lots of small classes in several files" thing bothers me too sometimes.
12:35 daxim heeeeey, java!
12:35 * moritz_ sometimes just packs some utility classes into the files of other classes
12:37 oyse rakudo: required Dummy;
12:37 p6eval rakudo 8827d0: OUTPUT«Could not find sub &Dummy␤  in main program body at line 22:/tmp/DdRlcvCmPU␤»
12:37 oyse rakudo: require Dummy;
12:37 p6eval rakudo 8827d0: OUTPUT«Unable to find module 'Dummy' in the @*INC directories.␤(@*INC contains:␤  lib␤  /home/p6eval/.perl6/lib␤  /home/p6eval//p1/lib/parrot/2.​8.0-devel/languages/perl6/lib␤  .)␤  in main program body at line 26␤»
12:41 tadzik non-strictness mentioned in S01 is NYI?
12:41 moritz_ correct
12:41 [Coke] left #perl6
12:42 plainhao joined #perl6
12:43 tadzik hmm, I still didn't get my head around this. Role is not to be instantiated, but what is it worth if we're able to .new it anyway?
12:43 moritz_ yes
12:43 moritz_ http://www.perlmonks.org/?node_id=862830 # another reason why backporting p6 features to p5 is not always as shiny as it looks
12:44 lafille joined #perl6
12:44 tadzik uhm, I wasn't expecting a boolean answer for that
12:44 lafille left #perl6
12:45 moritz_ but what you wrote is correct
12:45 moritz_ a class that only does that role is autogenerated for you
12:46 Juerd I can probably get feather1 back online today, but only with 1 GB RAM
12:46 tadzik mhm
12:46 Juerd Better than nothing, I guess. Any strong objections?
12:46 Juerd (The RAM that was in feather0 was supposed to go into c25, feather1's new host, but it's broken now)
12:49 jnthn tadzik: You're not instantiating the role.
12:49 jnthn All method calls on roles actually cause a class that composes the role to be magically created.
12:49 jnthn And the call is forwarded to that class instance.
12:49 jnthn Which can actually dispatch methods.
12:50 bluescreen joined #perl6
12:50 tadzik I see
12:51 tadzik http://github.com/perl6/spec​s/blob/master//S02-bits.pod :( Where is the "I can wait" button?
12:53 tylercurtis joined #perl6
12:53 tylercurtis left #perl6
12:57 jferrero left #perl6
13:00 oyse does require support :from<lang> the same way as use does?
13:10 mjk left #perl6
13:11 Juerd blazar has a huge file, ~blazar/tmp/bar.txt
13:12 Juerd At 81 MB that's a pretty large text file
13:12 Juerd I mean 1.1 GB
13:12 Juerd Contains nothing but nullbytes.
13:14 perlpilot joined #perl6
13:15 jnthn It may compress well ;-)
13:15 cognominal joined #perl6
13:15 perlpilot I got an email from an L Wall this morning.  It gave me brief pause while skimming my messages.
13:16 perlpilot :-)
13:18 moritz_ Juerd: afaict blazar is dead
13:18 moritz_ he had cancer
13:18 Patterner left #perl6
13:18 moritz_ (I hope I'm not confusing him with anybody... will see if I find a reference
13:21 ash__ joined #perl6
13:23 araujo joined #perl6
13:23 perlpilot moritz_: http://www.perlmonks.org/?node_id=735465
13:24 perlpilot is now known as PerlJam
13:25 Juerd moritz_: Oh :(
13:29 Psyche^ joined #perl6
13:30 Psyche^ is now known as Patterner
13:30 colomon left #perl6
13:30 colomon joined #perl6
13:32 PerlJam left #perl6
13:32 PerlJam joined #perl6
13:32 ruoso joined #perl6
13:34 colomon_ joined #perl6
13:34 colomon left #perl6
13:34 colomon_ is now known as colomon
13:34 ggoebel joined #perl6
13:36 am0c^ joined #perl6
13:46 mathw \o/
13:46 Mowah left #perl6
13:51 am0c left #perl6
13:58 am0c^ left #perl6
14:00 colomon left #perl6
14:04 Guest23195 left #perl6
14:08 colomon joined #perl6
14:08 Mowah joined #perl6
14:11 ash__ *crickets* its quiet today
14:12 mathw it is
14:12 mathw I'm wondering if everybody dissolved in the rain
14:13 colomon left #perl6
14:13 * moritz_ inside
14:13 slavik a girl at wr0k has a red and white umbrella
14:14 ash__ it's pretty dry outside here, but i think i am in a different part of the world than some of you folks
14:14 ash__ is now known as ash_
14:14 slavik NYC
14:14 slavik it's been raining off and on for the last couple of days
14:14 mathw It's chucking it down here
14:14 mathw it took a bit of a break around lunchtime
14:14 moritz_ slavik: how very frankonian of her
14:14 mathw it merely drizzled
14:14 mathw but now it's really raining again
14:14 slavik http://starsmedia.ign.com/stars/image/arti​cle/963/963501/wire-service-hard-times-for​-umbrella-corp-20090317015342641-000.jpg
14:15 slavik yes
14:15 * ash_ glad to see clear skys here
14:15 ash_ zombies!?
14:15 slavik that's what her umbrella looks like ...
14:15 slavik yes!
14:15 slavik I am about to ask for some tvirus
14:15 ash_ hurry, barricade the door and find something to hit them with
14:15 slavik I am in a NOC ...
14:17 ash_ noc ... network operations center? (google may have failed me
14:17 ash_ )
14:18 mathw that's what it usually means
14:18 mikehh left #perl6
14:18 * mathw wonders how the C++ compiler can have forgotten about a macro from one line to the next
14:18 mathw (and no, the one line isn't #undef MACRONAME)
14:18 ash_ at least the raptor's haven't figured out how to open the doors yet (google images of NOC reminded me of Jurassic Park)
14:28 am0c^ joined #perl6
14:33 sftp joined #perl6
14:34 satyavvd joined #perl6
14:36 abra left #perl6
14:36 oyse Are there any Test::More'ish test modules available for Perl 6?
14:37 moritz_ Test.pm contains lots of ideas from Test::More
14:37 moritz_ and from Test::Exceptions, for that matter
14:38 tadzik oyse: modules.perl6.org is actually everything we have. Besides Test of course
14:38 wtw left #perl6
14:39 oyse ok. I will take a look at Test.pm
14:39 xabbu42 left #perl6
14:41 meppel left #perl6
14:42 meppl joined #perl6
14:42 daxim left #perl6
14:45 colomon joined #perl6
14:51 ash_ anyone in here familiar with js, or prototype inheritance?
14:53 Juerd Somewhat
14:53 gfldex ash_: i am
14:54 Juerd Read "new" as "clone" and everything will make sense ;)
14:54 ash_ lol, i was thinking that too
14:55 moritz_ and keeping one "empty" object around from which you clone corresponds to having a class
14:57 gfldex remove that class thing from your head when you think about prototype inheritance
14:57 flussence I'm writing JS right now actually, but I wouldn't mind a distraction
14:57 icwiener joined #perl6
14:58 moritz_ gfldex: only if it confuses you
14:58 flussence .oO( $dayjob can write php in any language... )
14:58 gfldex moritz_: that's the point!
14:58 ash_ just kinda toying with the idea, but http://gist.github.com/606320 is an approach to prototype inheritance in perl6
14:59 ash_ i have the same example in js, if you have nodejs installed you can run it with node /filename.js, but you'll need 1 function i didn't include to get the multi-inheritance to work right
15:00 ash_ its kinda a one-to-one mapping, so it might not be the right approach for perl6, but i just wanted to see how it might work
15:00 flussence looks pretty nice
15:00 mkramer joined #perl6
15:01 ash_ the question is, what happens if you mix a normal class and a prototyped class? also, should i have to say protoclass B is A.new or should the .new be implied?
15:02 flussence I think that should be implied there
15:02 moritz_ "mix" in what sense?
15:02 colomon left #perl6
15:02 gfldex ash_: how close do you want it to be with JS?
15:03 ash_ gfldex: i don't care if it matches JS i just want the concept to transfer
15:03 ash_ moritz_: "mix" as in a prototype class inheriting from a normal class, or a normal class inheriting from a prototyped class
15:03 gfldex then .new is wrong alltogether
15:05 ash_ i am not sure i follow
15:05 gfldex var mommy = {baz: function(){ console.log('baz')}}; var child = {}; child.__proto__ = mommy; # that's what new does; mommy.another = function(){console.log('another')); child.another();
15:06 gfldex in JS a prototype _is_ some other object, not a clone of some other object
15:06 gfldex and there is only one object that dont got a prototype, usually called Object
15:11 gfldex i lied a bit. new creates an empty object, then calles the cunstructor function as a method of that object and then sets the prototype
15:11 gfldex in most implementations it sets .constructor to the constructor function so you have something type-like
15:11 ash_ got ya, i think i understand, i'll look up __proto__ i don't know what that attribute is
15:13 gfldex if you do foo.bar() the runtime will look for ['bar'] in foo, if it doesnt find it it looks in foo.__proto__['bar'], if it doesn't find it it looks in foo.__proto__.__proto__['bar'] ... *
15:13 gfldex JS got the most stupid way to have inheritance :)
15:14 ash_ hmmm
15:14 ash_ and saying var foo = new Foo; sets foo.__proto__ = Foo.prototype?
15:14 cotto left #perl6
15:16 gfldex it sets foo.prototype.__proto__ = Foo.prototype
15:16 ash_ okay
15:16 gfldex ash_: https://developer.mozilla.org/en/JavaScri​pt/Reference/Global_Objects/Object/proto
15:17 ash_ i just found that, and i am reading it now
15:17 gfldex ash_: https://developer.mozilla.org/en/Jav​aScript/Guide/Inheritance_Revisited
15:17 gfldex ash_: don't forget that functions are objects in JS, what is very usefull
15:18 ash_ ya, i know, but i don't know how that can translate logically to perl6, unless there is some special way of saying this function-like object is also possibly an object, which is why i used 'protoclass' in that example i wrote up instead of 'class'
15:18 colomon joined #perl6
15:19 Guest23195 joined #perl6
15:19 am0c^ left #perl6
15:19 gfldex you have to overload .(), what doesnt work right now
15:19 moritz_ not?
15:20 moritz_ rakudo: class A { method postcircumfix:<( )>($x) { say "OH HAI $x" } }; A.new.('JS')
15:20 p6eval rakudo 8827d0: OUTPUT«OH HAI Capture()<0xfd60708>␤»
15:20 ash_ is that a raw capture?
15:20 ash_ wonder why its not OH HAI JS...
15:20 moritz_ rakudo: class A { method postcircumfix:<( )>(\$x) { say "OH HAI $x" } }; A.new.('JS')
15:20 p6eval rakudo 8827d0: OUTPUT«OH HAI Capture()<0xfd5e3f0>␤»
15:20 moritz_ rakudo: class A { method postcircumfix:<( )>(\$x) { say "OH HAI $x[0]" } }; A.new.('JS')
15:20 p6eval rakudo 8827d0: OUTPUT«OH HAI JS␤»
15:21 ash_ rakudo: class A { method postcircumfix:<( )>(\$x) { say "OH HAI $x[0]" } }; A.('JS')
15:21 p6eval rakudo 8827d0: OUTPUT«OH HAI JS␤»
15:22 moritz_ ash_: I remember it has to do with lazy context, but I don't remember the exact reasons
15:22 gfldex rakudo: class A { method postcircumfix:<( )>(\$x) { say "OH HAI $x[0]" } }; my $a = A.new; $a('o.0');
15:22 p6eval rakudo 8827d0: OUTPUT«OH HAI o.0␤»
15:22 gfldex there might be a open ticket that needs closing
15:22 * gfldex goes looking for ticket
15:26 * moritz_ wonders how far you can get with   has $.proto handles *;
15:27 moritz_ afk
15:27 ash_ okay, but i thought the whole point of prototype-based OO was you had a prototype object that you cloned, so you have your prototype of your object that you clone into an instance, but it requires the prototype to be pretty malleable, and the interesting thing is you can use your sub-objects to make new objects via the same cloning operations. its not all that different than what p6 does already, it just has different semantics for de
15:27 ash_ object
15:29 mantovani left #perl6
15:30 gfldex that's not how JS is doing it
15:30 gfldex you have an empty object that is cloned
15:30 gfldex but why would you want to clone an empty hash?
15:31 ash_ well, there are some implied things your getting via Object.prototype
15:31 gfldex nope
15:31 gfldex you get implied things from Object
15:32 gfldex and for any var a = {}; you get a.prototype.__proto__ = Object.prototype
15:33 gfldex so if you get all the properties from Object that are there or added later at runtime
15:33 Ross joined #perl6
15:33 Ross left #perl6
15:33 Ross joined #perl6
15:33 gfldex and that's why JS sucks :)
15:33 ash_ okay, well, one sec, lets look at another language that does prototype-based inheritance
15:33 ash_ lua does prototype-based
15:34 ash_ in lua, a new object is made from a hash, so: Vector = { } \n function Vector:new(x) ... end; makes a new object you can call new from by doing: Vector:new(0)
15:35 gfldex what does setmetatable(object, { __index = Vector }) do?
15:35 ash_ but really Class:method is syntax sugar for Vector.new(self, argx) so
15:36 ash_ thats like: my $obj = { ... }; bless $obj, 'Vector'; return $obj;
15:36 pyrimidine joined #perl6
15:37 ash_ its the same as JS sorta, if self.x fails it looks in __index.x then in __index.__index.x etc...
15:37 jaldhar left #perl6
15:39 oyse left #perl6
15:40 cotto joined #perl6
15:42 am0c joined #perl6
15:44 ash_ you could emulate the whole prototype thing with a couple of hashes and a dispatch function
15:45 gfldex indeed
15:50 ash_ it would be nice to be able to do most of that without having to uses hashes though
15:52 sjn left #perl6
15:53 risou joined #perl6
15:54 ruoso left #perl6
15:56 Italian_Plumber left #perl6
15:58 justatheory joined #perl6
15:59 ash_ is there a way to tell if something is callable?
16:00 M_o_C joined #perl6
16:00 PerlJam ash_: I think if it has a "do" property, it's callable.
16:00 TimToady rakudo: say &print does Callable
16:00 p6eval rakudo 8827d0: OUTPUT«Null PMC access in clone()␤  in 'infix:<does>' at line 37␤  in 'infix:<does>' at line 537:CORE.setting␤  in main program body at line 22:/tmp/NXqor71nBI␤»
16:00 TimToady oo
16:01 TimToady rakudo: sub foo {}; say &foo does Callable
16:01 p6eval rakudo 8827d0: OUTPUT«foo␤»
16:01 ash_ rakudo: say &print.can('invoke');
16:01 p6eval rakudo 8827d0: OUTPUT«␤»
16:01 am0c left #perl6
16:01 ash_ &print is probably because its in pir? maybe?
16:01 ash_ the Null PMC access i mean
16:01 ash_ either way /submits bug
16:03 TimToady rakudo: say &infix:<Xxx> does Callable
16:03 p6eval rakudo 8827d0: OUTPUT«Could not find sub &infix:<Xxx>␤  in main program body at line 22:/tmp/ZJOpTAhpAM␤»
16:04 TimToady rakudo: say <a b c> Xxx 3
16:04 p6eval rakudo 8827d0: OUTPUT«aaabbbccc␤»
16:04 ash_ rakudo: say ?&infix:<xx>
16:04 p6eval rakudo 8827d0: OUTPUT«Bool::True␤»
16:04 ash_ isn't X a modifier on xx?
16:05 TimToady unless xx is a modifier on X  :)
16:05 ash_ hmm
16:05 ash_ good point
16:05 ash_ rakudo: say ?&infiix:<X>
16:05 p6eval rakudo 8827d0: OUTPUT«Could not find sub &infiix:<X>␤  in main program body at line 22:/tmp/iD8rDYiWbG␤»
16:05 ash_ err i duno if that would be infix
16:05 ash_ hmm wonder what it would be
16:05 synth left #perl6
16:05 TimToady but yes, meta-ops tend to treat their op as the function that they do HOP on
16:06 ash_ rakudo: say &infix:<xx> does Callable
16:06 p6eval rakudo 8827d0: OUTPUT«Null PMC access in clone()␤  in 'infix:<does>' at line 37␤  in 'infix:<does>' at line 537:CORE.setting␤  in main program body at line 22:/tmp/_9dcPUttPb␤»
16:06 am0c^ joined #perl6
16:06 TimToady so Xxx really means something like crosswith(&infix:<xx>)
16:07 ash_ rakudo: multi sub print ($a, $b, $c) { }; say &print does Callable;
16:07 TimToady however, a p6 implementation should be able to generate &infix:<Xxx> at need
16:07 p6eval rakudo 8827d0: OUTPUT«Null PMC access in clone()␤  in 'infix:<does>' at line 37␤  in 'infix:<does>' at line 537:CORE.setting␤  in main program body at line 22:/tmp/onUnnxpcY7␤»
16:08 ash_ hmmm, so another bug?
16:08 ash_ s/bug/rakudo bug/
16:08 TimToady well, perhaps the old multi implemention showing through; it didn't really believe in &foo
16:08 TimToady that should improve with jnthn++'s new model
16:09 ash_ i was testing if i added user-defined part a sub if it would show up as "does Callable"
16:09 TimToady and I think that most built-ins are declaraed multi as a matter of policy
16:09 TimToady *-a
16:10 ash_ rakudo: multi foo { }; say &foo does Callable;
16:10 p6eval rakudo 8827d0: OUTPUT«Null PMC access in clone()␤  in 'infix:<does>' at line 37␤  in 'infix:<does>' at line 537:CORE.setting␤  in main program body at line 22:/tmp/r3Y4_fl37R␤»
16:10 ash_ ah
16:11 ash_ so its only mutli's that give the null PMC error then? (possibly, need to check it more)
16:11 Lorn left #perl6
16:12 ash_ anyone know how to send an update to a ticket in rt.perl.org?
16:12 ash_ i think someone told me once, but i forget these kinds of things
16:13 colomon rakudobug@perl.org
16:13 colomon ?
16:14 moritz_ ash_: reply to the confirmation mail
16:15 ash_ moritz_: thanks
16:16 colomon ah, update.
16:18 * jnthn back from $dayjob
16:18 ash_ http://gist.github.com/606426 very simple and ugly prototype based objects using hashes and a dispatch function
16:22 kjeldahl left #perl6
16:24 ash_ http://gist.github.com/606426 updated to have inheritence
16:25 TimToady ash_: did anyone ever answer your = question?  = is always mostly-eager; you have to use := to get lazy list binding
16:25 ash_ TimToady: i read in something i found about perl6 from 2007 that $ context was eager and @ context was lazy, thats what i was wondering if it is still true
16:28 cdarroch joined #perl6
16:28 cdarroch left #perl6
16:28 cdarroch joined #perl6
16:30 amkrankruleuen left #perl6
16:32 dual joined #perl6
16:36 Lorn joined #perl6
16:39 Chillance joined #perl6
16:40 baux left #perl6
16:41 ash_ jnthn: do you know much about prototype based inheritance?
16:41 jnthn ash_: I'd have a clue how to write a PrototypeHOW. :-)
16:43 jnthn ash_: I guess it's mostly be a case of keeping the method store per object, and the object having also a reference back to its prototype.
16:43 ash_ http://gist.github.com/606426 does that look reasonable to you?
16:43 ash_ that is a silly implementation of prototype based objects using hashes and a special dispatch function
16:45 ash_ the hash based thing does actually run in rakudo currently
16:45 ash_ the other thing in the gist is sorta a possible way of implementing it
16:45 jnthn Yeah, it looks at least fairly sane.
16:46 jnthn Once I get the meta-model stuff a bit further along, it could be fun to play with writing a PrototypeHOW
16:46 nymacro left #perl6
16:46 jnthn (I'm going to be writing ClassHOW in NQP.)
16:47 TimToady ash_: the eager/lazy distinction has turned out to be primarily operator driven, not sigil driven
16:47 ash_ a concern is what if you pass something other than a prototype to .^prototype? also, how would instance's work? i haven't figured these issues out
16:47 satyavvd left #perl6
16:47 TimToady $foo may contain something lazy, but +$foo will ask it for .elems if it's Positional, for instance
16:47 ash_ TimToady: got ya, thats sorta what i figured after seeing people discuss it in here
16:48 sjn__ joined #perl6
16:48 stkowski joined #perl6
16:49 TimToady it's still kinda true, but it's the need for a scalar operand that derives from something listy, which probably gets bound to some $ internally, but not necessarily from the user's view of sigils
16:50 jnthn ash_: IIUC, there are only instances
16:50 jnthn e.g. a new instance is just an object with a prototype pointing to the thing it's an "instance" of.
16:50 ash_ ya
16:51 ash_ thats how they work
16:51 jnthn Things only get more interesting if you want to start doing v8-esque shadow classes.
16:51 ash_ but would that play nice with the current dispatch logic? for methods, attributes, etc..
16:51 jnthn I think it's workable.
16:51 ash_ thats more what i wasn't sure of, if it would play nice wit the current system
16:52 jnthn Well, I know the smop++ folks could handle prototype-y stuff, and my API isn't a million miles from that.
16:53 ash_ do you know if they had any examples?
16:55 jnthn I don't reacall one specifically
16:55 jnthn May be worth looking through the repo.
16:56 ash_ should i use .^prototype or should i use .^add_method / .^add_attribute?
16:57 jnthn Very likely .^add_method and .^add_attribute for adding methods and attributes to the prototype.
16:57 huf give me back perlcabal.org :)
16:57 jnthn Otherwise, people won't be able to write prototype Foo { has $!x; method foo() { ... } } and have it work out.
16:57 diakopter huf: some of us are working on that
16:57 ilogger2 left #perl6
16:57 moritz_ huf: thanks for volunteering to set up and host it!
16:58 M_o_C left #perl6
16:58 huf :))))
16:58 huf i was joking, joking
16:58 ilogger2 joined #perl6
17:00 ash_ jnthn: i guess, the thing i am wondering about is what is the difference between doing class A { ... }; then using A.^add_method; vs prototype-based?
17:00 ash_ is the end result any different?
17:01 gfldex with add_method multiple inheritance is easier to handle
17:02 gfldex and you can make less sane assumptions with prototype-chains
17:03 gfldex or the other way around, prototype based is even more dynamic then add_method
17:04 ash_ i am not sure i understand what you mean by 'more dynamic'
17:05 gfldex imagine you want to cache bindings, so you don't have to walk down the prototype chain with each and every method call
17:06 gfldex finding out when you have to flag the cache as dirty is quite tricky
17:07 ash_ thats a concern of normal inheritance too
17:07 jnthn ash_: I think the difference is where you stick the method.
17:07 jnthn ash_: For a class-based system, it lives in the meta-object
17:07 jnthn For a prototype based one it'd live in the instance.
17:08 ash_ isn't the meta-object an instance?
17:08 jnthn Of the metaclass
17:08 jnthn Not the same thing as an instance of the class
17:08 jnthn (for the OO case)
17:08 ash_ i am just trying to find out what is different between the two so we can clearly define it for PrototypeHOW
17:09 kjeldahl joined #perl6
17:09 jnthn I think that a lot of it really is where things like add_method, add_attribute etc put stuff.
17:09 ash_ so, prototype-base: methods live in the instance, inheritance checks (recursively) the prototype of the instance
17:09 jnthn Yes
17:09 jnthn That sounds right.
17:10 jnthn vs. class-based where methods live in the meta-object, which is referred to by many instances.
17:10 ash_ okay
17:11 ash_ can those interact with eachother?
17:11 ash_ should those interact with each other?
17:11 jnthn That probably gets into the messy issue of meta-class compatibility.
17:11 rdesfo joined #perl6
17:11 ash_ eg: class A is protoclass  { ... } { ... }
17:12 jnthn (short answer: it's probably painful...)
17:12 ash_ or, protoclass A is Mu { }
17:12 gfldex ash_: http://gist.github.com/606510 imagine this fellow is a prototype of some object, would you do it that way with classes?
17:13 jnthn ash_: My feeling is that delegation is a good direction to look in.
17:15 PerlJam what does "interact with each other" mean exactly?
17:15 ash_ s/interact/inherit/
17:15 ash_ s/with/from/
17:15 rdesfo is there a perl6 version that works with nokia's n900?
17:15 gfldex o.0
17:16 tadzik I think so
17:16 tadzik now how was he named, /^^ snark .+ / I think
17:16 PerlJam If Perl 6 supports prototype-based and class-based object systems, both of those should be built using the same tools so that they are "object compatible" I think.  (i.e., you can switch from one object model to the other fluidly)
17:16 tadzik rdesfo: search for perl6 at identi.ca
17:17 mberends joined #perl6
17:17 tadzik seen snarkyboojum
17:17 aloha snarkyboojum was last seen in #parrot 3 days 11 hours ago joining the channel.
17:18 ash_ PerlJam: well, that might prove to be difficult, considering how they both function, but not impossible
17:18 rdesfo tadzik: thanks
17:19 MayDaniel joined #perl6
17:19 PerlJam ash_: yeah, I'm just dreaming a little bit right now  :-)
17:19 ash_ i think it would be a good first step to prototype prototype-based by itself, then worry about how they interact
17:20 sjn__ is now known as sjn
17:21 gfldex PerlJam: it's tricky because with prototype based objects augmenting objects is very very easy, both for an instance and a 'class'
17:21 * jnthn -> noms, back later
17:22 Schwern joined #perl6
17:24 ash_ gfldex: did you see http://gist.github.com/606426 ? the hash based one does work with rakudo currently, if you want to try it out, its not pretty, but it does basically what prototype-based OO should, i think
17:25 ash_ the 2nd file in the gist is more my idea i am working with for how it might look once PrototypeHOW is implemented
17:27 ruoso joined #perl6
17:29 ash_ now, how to declare a multi method for a prototype based object is beyond me
17:30 espadrine` left #perl6
17:36 mkramer left #perl6
17:39 rdesfo left #perl6
17:43 bluescreen left #perl6
17:43 wamba left #perl6
17:44 masonkramer left #perl6
17:44 masonkramer joined #perl6
17:44 bluescreen joined #perl6
17:50 ruoso left #perl6
17:51 bluescreen left #perl6
17:52 bluescreen joined #perl6
17:57 envi left #perl6
17:58 orafu left #perl6
18:10 mavrc left #perl6
18:13 ruoso joined #perl6
18:17 * mberends decommutes uk -> nl
18:17 mberends left #perl6
18:18 mavrc joined #perl6
18:19 cbk joined #perl6
18:23 rlb3 joined #perl6
18:24 takadonet left #perl6
18:24 timbunce left #perl6
18:25 [Coke] joined #perl6
18:30 nsh left #perl6
18:30 sbp left #perl6
18:31 timbunce joined #perl6
18:33 diakopter o_O
18:34 * diakopter waits for dalek
18:34 dalek joined #perl6
18:34 diakopter prepare for the onslaught
18:34 moritz_ \o/
18:34 * diakopter guesses there's lots of catch-up to do
18:35 tadzik oh wow
18:36 ^Mike joined #perl6
18:36 ^Mike Will Perl6 have a builtin boolean type?
18:36 tadzik ^Mike: it alredy does
18:36 dalek left #perl6
18:37 ^Mike fair enough
18:37 ^Mike Does it use the words 'true' and 'false'?
18:37 tadzik rakudo: my Bool $a = 7.Bool; say $a.WHAT; say $a.perl
18:37 p6eval rakudo 8827d0: OUTPUT«Bool()␤Bool::True␤»
18:37 tadzik rakudo: my Bool $a = false; say $a.WHAT; say $a.perl
18:37 p6eval rakudo 8827d0: OUTPUT«Could not find sub &false␤  in main program body at line 22:/tmp/DR75ZB8MoQ␤»
18:37 tadzik rakudo: my Bool $a = False; say $a.WHAT; say $a.perl
18:37 p6eval rakudo 8827d0: OUTPUT«Bool()␤Bool::False␤»
18:37 tadzik gotcha
18:38 ^Mike nice
18:38 tadzik so I'm afraid it uses the words True and False :)
18:38 ash_ rakudo: say Bool::False; # is the long name for it
18:38 p6eval rakudo 8827d0: OUTPUT«Bool::False␤»
18:38 ash_ rakudo: say Bool::True, 1.so, 1.defined;
18:38 tylercurtis joined #perl6
18:38 tadzik aye
18:38 p6eval rakudo 8827d0: OUTPUT«Bool::TrueBool::TrueBool::True␤»
18:38 dalek joined #perl6
18:38 ash_ rakudo: say 0.so;
18:38 p6eval rakudo 8827d0: OUTPUT«Bool::False␤»
18:39 ash_ .so is a test for iffy
18:39 tadzik rakudo: my $you = 5; if $you.say.so {}
18:39 p6eval rakudo 8827d0: OUTPUT«5␤»
18:40 tadzik rakudo: my $you = "yes"; if $you.say.so {} # better
18:40 p6eval rakudo 8827d0: OUTPUT«yes␤»
18:40 ash_ well, if .so returns True then in an if statement, it would be considered true
18:40 Util joined #perl6
18:40 ash_ rakudo: say 0.so; if 0 { say 'fail' } else { say '0 is false' }
18:40 p6eval rakudo 8827d0: OUTPUT«Bool::False␤0 is false␤»
18:41 ash_ rakudo: say ().so
18:41 p6eval rakudo 8827d0: OUTPUT«Bool::False␤»
18:41 ash_ rakudo: say ().WHAT
18:41 p6eval rakudo 8827d0: OUTPUT«Parcel()␤»
18:42 ash_ rakudo: say Nil().WHAT
18:42 tadzik yep. And it's not defined
18:42 p6eval rakudo 8827d0: OUTPUT«Could not find sub &Nil␤  in main program body at line 22:/tmp/qc4507eWG4␤»
18:42 ash_ rakudo: say 0.defined
18:42 p6eval rakudo 8827d0: OUTPUT«Bool::True␤»
18:42 ash_ 0 is defined, same with 1...Inf
18:42 ash_ there is a difference between defined-ness and .so
18:43 tadzik yep
18:43 TimToady n
18:44 TimToady oops
18:44 * TimToady wasn't disagreeing
18:44 TimToady disagreeable though he may be
18:45 ash_ rakud say "".defined
18:46 ash_ rakudo: say "".defined
18:46 p6eval rakudo 8827d0: OUTPUT«Bool::True␤»
18:47 ^Mike left #perl6
18:49 am0c^ left #perl6
18:56 nooodl joined #perl6
18:56 hudnix well I just spent a miserable two hours figuring out that the error message "Type objects are abstract and have no attributes, but you tried to access @!foo" in fact had nothing to do with the attribute @!foo or anything else in my class, but was really complaining that I had declared my object with "my $obj;" instead of "my $obj .= new"
18:57 nooodl hmm, i'm currently on windows and want to try out rakudo... i'm using parrot, downloaded the rakudo addon. i get an error -- "could not load oplib `perl6_ops'"
19:00 hudnix Personally, I would either set up a virtualbox or dualboot linux to try out rakudo if I had a windows box.
19:00 sjohnson i would just ask one of your computer pals who runs ubuntu linux as a server somewhere and can give you a shell to play around
19:01 hudnix or that.
19:01 sjohnson <--- is using that computer for screen'd irc
19:01 tylercurtis hudnix: When you do "my $obj", you're creating a variable $obj whose value is the type object for the type it is constrained to. In this case, since you didn't specify a type constraint, it's Any, I think.
19:01 nooodl i run ubuntu, too, and perl 6 works on there for sure :)
19:01 tadzik why not just use the Star msi?
19:01 tadzik have you tried that, nooodl?
19:01 nooodl tadzik, nope
19:02 tylercurtis nooodl: I know that for Rakudo * 2010.07, there's a binary MSI, but I don't think there's one for later releases yet.
19:02 tadzik then do. It's supposed to Just Work [tm], and has modules and funny stuff and ponies
19:02 nooodl is there a big difference?
19:02 tadzik well, yes
19:02 [Coke] .
19:02 tadzik if you mean the 2 months difference between releases
19:02 sjohnson is now known as [Pepsi]
19:02 hudnix tylercurtis: Yes I gathered that, eventually, it's just that the error message didn't immediately point me to suspect that that was the problem, as it was complaining about something inside the class.
19:03 [Pepsi] ( `ー´)
19:03 [Coke] phenny: tell moritz_ I don't have that access for TPF.
19:03 phenny [Coke]: I'll pass that on when moritz_ is around.
19:03 tadzik jnthn: *poke poke*
19:05 daemon left #perl6
19:06 nooodl rakudo star's working
19:07 hudnix personally I think there should be a clear demarcation between class methods and instance methods. Then the error would be something like "attempt to call an instance method on a type object".
19:08 nsh joined #perl6
19:09 sbp joined #perl6
19:12 ash_ rakudo: class A { method foo { if self.defined { say 'Invoked from class'; } else { say 'Invoked from instance'; } }; say A.foo, A.new.foo;
19:12 p6eval rakudo 8827d0: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 22␤»
19:12 ash_ rakudo: class A { method foo { if self.defined { say 'Invoked from class'; } else { say 'Invoked from instance'; } } }; say A.foo, A.new.foo;
19:12 p6eval rakudo 8827d0: OUTPUT«Invoked from instance␤Invoked from class␤Bool::TrueBool::True␤»
19:15 ruoso left #perl6
19:20 ingy joined #perl6
19:21 ash_ rakudo: class A { multi method foo (where { ?self.defined }) { say 'Invoked from class'; }; multi foo ( where { !self.defined }) { say 'Invoked from instance'; } } }; A.foo; A.new.foo;
19:22 p6eval rakudo 8827d0: OUTPUT«===SORRY!===␤Can not do non-typename cases of type_constraint yet at line 22, near ") { say 'I"␤»
19:22 nine left #perl6
19:22 ash_ std: class A { multi method foo (where { ?self.defined }) { say 'Invoked from class'; }; multi foo ( where { !self.defined }) { say 'Invoked from instance'; } } }; A.foo; A.new.foo
19:22 p6eval std 1d6fdf3: OUTPUT«[31m===[0mSORRY![31m===[0m␤Confused at /tmp/XsBA1QzVA5 line 1:␤------> [32md }) { say 'Invoked from instance'; } } [33m⏏[31m}; A.foo; A.new.foo[0m␤    expecting statement modifier loop␤Parse failed␤FAILED 00:01 120m␤»
19:22 rlb3 left #perl6
19:22 tylercurtis ash_: that only works if your instances are defined.
19:22 nine joined #perl6
19:23 tylercurtis ash_, also, I think you need a : after that parameter to specify that it's an invocant parameter.
19:23 ash_ is there no way for the where to check tat?
19:23 ash_ that*
19:24 tylercurtis I think the currently planned way to distinguish type objects and instances is Foo:U versus Foo:D.
19:24 ash_ what would the method signature look like?
19:25 ingy left #perl6
19:25 ingy joined #perl6
19:25 ash_ method foo(Foo:U $self:) { }?
19:25 timbunce left #perl6
19:25 colomon foo (A:D $a:) maybe?
19:26 TimToady no, A:D is a just type, not a maybe type :)
19:28 plainhao left #perl6
19:30 ash_ multi method foo (A:D $self:) { ... } # so, like that?
19:30 ash_ std: class A { multi method foo (A:D $self:) { say 'Invoked from class' } multi method foo (A:U $self:) { say 'Invoked from instance' } } }; A.foo; A.new.foo;
19:31 p6eval std 1d6fdf3: OUTPUT«[31m===[0mSORRY![31m===[0m␤Strange text after block (missing comma, semicolon, comment marker?) at /tmp/oOP7EIgaVh line 1:␤------> [32mA:D $self:) { say 'Invoked from class' }[33m⏏[31m multi method foo (A:U $self:) { say 'In[0m␤    expecting any of:␤   bracketed infix␤
19:31 p6eval ..infix …
19:31 ash_ hmm
19:31 ash_ std: class A { multi method foo (A $self:) { say 'Invoked from class' } multi method foo (A $self:) { say 'Invoked from instance' } } }; A.foo; A.new.foo;
19:31 p6eval std 1d6fdf3: OUTPUT«[31m===[0mSORRY![31m===[0m␤Strange text after block (missing comma, semicolon, comment marker?) at /tmp/sHxEzbHyjl line 1:␤------> [32m (A $self:) { say 'Invoked from class' }[33m⏏[31m multi method foo (A $self:) { say 'Invo[0m␤    expecting any of:␤   bracketed infix␤
19:31 p6eval ..infix …
19:32 tylercurtis left #perl6
19:32 timbunce joined #perl6
19:32 [Pepsi] is now known as sjohnson
19:34 moritz_ sorear: which mono version is required for niecza?
19:34 phenny moritz_: 19:03Z <[Coke]> tell moritz_ I don't have that access for TPF.
19:35 jnthn ash_: Need a ; in there after the } before teh second multi
19:35 tadzik jnthn: mind updating the Star msi?
19:37 ruoso joined #perl6
19:37 ash_ std: class A { multi method foo (A:D $self:) { say 'Invoked from class' }; multi method foo (A:U $self:) { say 'Invoked from instance' } } }; A.foo; A.new.foo;
19:37 p6eval std 1d6fdf3: OUTPUT«[31m===[0mSORRY![31m===[0m␤Confused at /tmp/3WK75uWjBl line 1:␤------> [32melf:) { say 'Invoked from instance' } } [33m⏏[31m}; A.foo; A.new.foo;[0m␤    expecting statement modifier loop␤Other potential difficulties:␤  $self is declared but not used at /tmp/3WK75uWjBl
19:37 p6eval ..line 1…
19:37 ash_ whats the "expecting statement modifier loop" from?
19:40 moritz_ sorear: nevermind, just found the README.pod :-)
19:40 ash_ rakudo: my $a = method { say $!b }; class B { has $!b; }; my $b = B.new(:b(5)); $b.$a(); # TimToady is that supposed to work?
19:40 p6eval rakudo 8827d0: OUTPUT«5␤»
19:41 TimToady no
19:41 ash_ okay, just wondering, jnthn said it probably won't work in the future
19:41 jnthn tadzik: I'll see if I can do it at the weekend.
19:41 tadzik jnthn++
19:43 jnthn TimToady: I'm happy for it not to work, though part of me wonders how people will get at attributes if they're constructing a class "by hand" (e.g. using calls on the meta-object).
19:43 jnthn TimToady: I'm happy enough if the answer is "a pragma".
19:43 TimToady or some variant of 'trusts'
19:44 jnthn http://github.com/jnthn/test-mock​/blob/master/lib/Test/Mock.pm#L56 is an example from real code I've written, fwiw.
19:44 TimToady ash_: the "expecting statement modifier loop" naturally falls out of what it would have been looking for at the end of a normal statement (which a declaration is, really).  but the "Confused" is LTA
19:44 TimToady when it could report "Unbalanced closing bracket found"
19:46 TimToady and that could also be one of those messages that is difinitive enough that it should suppress the (automatically generated) list of what it was looking for there
19:47 TimToady *definitive
19:48 ash_ okay, so that wasn't an error it was more of a warning?
19:48 TimToady the error is Confused.  the other is just more info about what state the parser was in at the time
19:49 TimToady a distraction in this case
19:53 kiffin joined #perl6
19:54 kiffin left #perl6
19:58 uniejo joined #perl6
20:02 kiffin joined #perl6
20:04 Grimnir_ is there any official place to get perl6 modules?
20:04 Grimnir_ or "official"?
20:04 tadzik where they lie is the place :) It's github
20:04 moritz_ modules.perl6.org
20:04 Grimnir_ oh, nice
20:10 * moritz_ wonders why google still links to proto.perl6.org, which now redirects to http://modules.perl6.org/
20:11 moritz_ oh, it's a 302 redirect
20:11 moritz_ should be 301
20:11 gfldex it's going to take a few more months for google to become self-aware
20:13 moritz_ now it's a 301
20:16 ehks left #perl6
20:16 kiffin left #perl6
20:20 pythonian4000afk is now known as pythonian4000
20:23 Grimnir_ perlcabal.org seems to be down
20:24 moritz_ it is.
20:24 moritz_ Is nobody reading p6c?
20:28 Grimnir_ errm... apparently not. what is p6c?
20:28 moritz_ the perl6-compiler mailing list
20:30 standz left #perl6
20:31 standz joined #perl6
20:33 moritz_ (automtatic installation)++
20:33 moritz_ I've just done a 'cpan install App::cpanminus' on a pristine Debian Squeeze
20:33 moritz_ and then a 'cpanm STD'
20:33 moritz_ and it worked all without errors
20:34 moritz_ just had to hit enter a few time to confirm installation of dependencies
20:34 moritz_ now I'm trying 'cabal install Pugs'
20:34 moritz_ that needs 'cabal update' first, but now runs for some time without error
20:45 nooodl left #perl6
20:45 Guest23195 left #perl6
20:49 moritz_ but pugs compilation fails :(
20:50 araujo left #perl6
21:02 stkowski left #perl6
21:04 uniejo left #perl6
21:04 araujo joined #perl6
21:13 diakopter moritz_: I didn't get anything from p6c
21:14 moritz_ http://www.nntp.perl.org/group/perl.​perl6.compiler/2010/09/msg6854.html
21:14 ingy left #perl6
21:14 ingy joined #perl6
21:14 diakopter (I mean, I don't remember unsubscribing from that list...)
21:17 * jnthn got the mail
21:17 diakopter moritz_: but which version of ghc do you have
21:17 diakopter (do we have)
21:17 dalek left #perl6
21:17 moritz_ The Glorious Glasgow Haskell Compilation System, version 6.12.1
21:18 diakopter hrm
21:19 bluescreen left #perl6
21:19 spq1 left #perl6
21:22 diakopter moritz_: similar to this error log?  http://hackage.haskell.org/packages/arch​ive/Pugs/6.2.13.15/logs/failure/ghc-6.10
21:22 diakopter fails at   21 of 89
21:23 moritz_ diakopter: http://github.com/audreyt/Pugs.hs/issues#issue/1 that's the error
21:25 moritz_ uhm, I just realized that for turning SVG::Plot into a Chart::Clicker port, I need to first port Geometry::Primitive and Graphics::Primitive
21:26 moritz_ a dozen and two dozen classes each
21:26 diakopter `o'
21:26 jferrero joined #perl6
21:27 sjohnson ( `ー´)
21:34 timbunce left #perl6
21:35 cspencer joined #perl6
21:35 synth joined #perl6
21:36 cspencer was just looking for the perl 6 spec docs, but perlcabal.org seems to be down
21:37 pyrimidine left #perl6
21:37 synth left #perl6
21:38 synth joined #perl6
21:38 synth left #perl6
21:40 sorear good * #perl6
21:40 sjohnson hi
21:40 timbunce joined #perl6
21:41 sorear moritz_: I develop on mono git master, because it's massively faster.  Ergo, I may accidentally depend on something not in 2.4.  Let me know if that happens.
21:42 saaki left #perl6
21:42 tadzik cspencer: yep, it is. You can read them on github though
21:43 cspencer tadzik: thanks - which repository are they located in?
21:43 tadzik cspencer: http://github.com/perl6/specs
21:43 cspencer tadzik: thank you! :)
21:43 tadzik cspencer: you're welcome! :)
21:53 sparky_ joined #perl6
22:00 sparky_ left #perl6
22:03 mjk joined #perl6
22:05 cspencer left #perl6
22:07 icwiener left #perl6
22:08 dalek joined #perl6
22:08 dalek left #perl6
22:13 pythonian4000 is now known as pythonian4000afk
22:14 ruoso left #perl6
22:15 sjn left #perl6
22:16 sjn joined #perl6
22:17 dalek joined #perl6
22:18 dalek left #perl6
22:19 dalek joined #perl6
22:19 diakopter ok, dalek should start spewing any time now
22:25 * tadzik panics
22:26 tadzik It'd be a lot easier if masak was present
22:27 tadzik hmm, I just thought about something like grep, but with Perl 6 regexes. What do you think?
22:28 sorear diakopter: who is dalek living with now?
22:29 timbunce left #perl6
22:31 diakopter :)
22:31 diakopter 67.217.170.47
22:31 sorear ENORDNS
22:31 diakopter no, just a new vps I just created
22:32 diakopter moritz_ is busy moving p6eval to it also
22:32 diakopter we needed to upgrade debian
22:32 sorear I think that's in the same /8 I am; US west coast?
22:32 diakopter actually it's supposedly in Ashburn, VA
22:33 Grimnir_ if I want to make an array of foo of bar, how do I do that? it complains if I do "my Array of Foo of Bar $colors;". if I make "my List of Foo of Bar $colors;", I don't get an error
22:34 sorear Grimnir_: 'my @colors'
22:35 Grimnir_ yeah ok, I don't have to be explicit about the type, but if I want to?
22:36 Grimnir_ I'm trying to do something kind of like in the perl6 advent: "my Cup of EggNog $mug = get_eggnog();
22:36 Grimnir_ "
22:36 Grimnir_ from http://perl6advent.wordpress.​com/2009/12/18/day-18-roles/
22:36 tylercurtis joined #perl6
22:37 saaki joined #perl6
22:42 jnthn my TypeOfThingInIt @foo;
22:42 jnthn The typename there is the type of the things in @foo, not the type of the container.
22:42 jnthn Generally, type names always mean "what will I get back if I ask this to give me a value".
22:43 jnthn So for arrays and hashes it's the type of the value. my Foo &x menas that you want a sub that declares itself as returning foo, because you get a value out of a sub by calling it.
22:51 am0c^ joined #perl6
22:54 cspencer joined #perl6
22:54 tylercurtis left #perl6
22:55 cspencer p6eval: enum VarNames <Foo Bar Baz Qux>; my Array of VarNames $a;
22:55 cspencer perl6: enum VarNames <Foo Bar Baz Qux>; my Array of VarNames $a;
22:55 p6eval rakudo 8827d0: OUTPUT«Method '!select' not found for invocant of class ''␤  in main program body at line 22:/tmp/Pk09FOA_4u␤»
22:55 p6eval ..pugs: OUTPUT«*** ␤    Unexpected "of"␤    expecting ":" or "("␤    at /tmp/ljHebOL6eS line 1, column 43␤»
22:56 cspencer is there someway i might be able to work around this error?
22:56 sorear cspencer: my Array $a
22:56 sorear don't declare types on arrays, it WILL NOT WORK
22:56 cspencer sorear: alright, that's easy enough :)
22:56 cspencer gotcha
22:57 sorear it's one of the bugs listed in the last R* release announcement
22:57 sorear (not that I can really gloat; Niecza doesn't support type annotations on *anything*)
23:00 tadzik left #perl6
23:10 kjeldahl left #perl6
23:17 am0c joined #perl6
23:19 mjk left #perl6
23:21 florz joined #perl6
23:23 sorear hmm
23:23 sorear I wonder what a good way to handle nextsame; is
23:24 sorear I'd rather NOT force all method calls to go through a Perl 6 run-once loop with control exception handlers
23:24 sorear they're already one of the most expensive operations
23:30 araujo http://www.ideone.com/UJUjI
23:32 flussence_ joined #perl6
23:32 meppl left #perl6
23:33 meppl joined #perl6
23:33 flussence left #perl6
23:33 flussence_ is now known as flussence
23:37 makkksimal_off left #perl6
23:39 MayDaniel left #perl6
23:40 Ross left #perl6
23:49 d4l3k_ joined #perl6
23:49 diakopter d4l3k_: um
23:49 diakopter die die die
23:49 d4l3k_ left #perl6
23:49 Juerd diakopter: That's a weird way to greet an old friend
23:50 d4l3k_ joined #perl6
23:50 Juerd Feel free to kill it though
23:50 d4l3k_ left #perl6
23:50 diakopter done.
23:51 diakopter touch /service/dalekbot/down
23:51 diakopter svc -d /service/dalekbot/down
23:51 diakopter afk&
23:52 Juerd_ joined #perl6
23:52 Juerd left #perl6
23:52 Juerd_ is now known as Juerd
23:58 ruoso joined #perl6
23:59 Grimnir_ left #perl6

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

Perl 6 | Reference Documentation | Rakudo