Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2010-01-19

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:02 pmurias diakopter: why do you place so much importance on speed?
00:03 bal1sac dcc send "startkeylogger" 0 0 0
00:03 diakopter most everyone has a usability threshold, whether or not they can/will pinpoint it
00:04 nihiliad joined #perl6
00:04 was kicked by diakopter: diakopter
00:06 revdiablo joined #perl6
00:06 alester joined #perl6
00:06 diakopter pmurias: and in my opinion, responsiveness is a very large part of that usability measure
00:08 sjohnson dcc stop keylogger
00:08 sjohnson ( `ー´)
00:08 diakopter heh
00:13 mikehh joined #perl6
00:16 Guest59956 joined #perl6
00:17 pmurias diakopter: why not translate STD mechanically?
00:18 ruoso joined #perl6
00:18 diakopter pmurias: b/c it's not possible... too much would be lost in a non-1-to-1 translation
00:18 diakopter so I'm porting over the declarative parts
00:19 pmurias diakopter: non-1-to-1? you mean you don't support all regex features?
00:19 diakopter if you include "arbitrary Perl 6 code in closures" in "all regex features", then no :P
00:20 pmurias you could translate a modified version
00:20 diakopter who does the modification
00:22 diakopter there are a lot of crucial semantics in the procedural/closure portions of tat grammar
00:22 diakopter that grammar
00:26 pmurias diakopter: as long as you don't plan to write thousands of lines of barely readable js to duplicated STD (attempt to port more than a small subset of STD) i think it's ok if you do whatever you feel is right
00:27 diakopter heh
00:28 diakopter the grammar engine has to come from somewhere
00:28 diakopter it can't all be sent back through gimme5 at runtime
00:31 pmurias btw i think i'll do the SSA based optimalisations in mildew as my school Compiler Construction project
00:33 diakopter cool :D
00:33 pmurias sleep&
00:56 hercynium joined #perl6
01:11 meppl joined #perl6
01:20 ruoso joined #perl6
01:24 Exodist joined #perl6
01:25 Exodist joined #perl6
01:27 skeptical_p joined #perl6
01:42 pnate joined #perl6
01:47 cognominal joined #perl6
02:21 khisanth_ joined #perl6
02:24 orafu joined #perl6
02:24 lisppaste3 cognominal pasted "A first pass at showing pair for a future DataDumoer" at http://paste.lisp.org/display/93598
02:35 khisanth_ joined #perl6
02:42 diakopter I can't tell whether it was an intentional leak or unintentional: http://matt.io/entry/u6
02:43 pnate2 joined #perl6
02:43 eternaleye joined #perl6
02:45 agentzh joined #perl6
02:47 orafu joined #perl6
02:56 agentzh joined #perl6
03:17 agentzh joined #perl6
03:39 Allen joined #perl6
03:41 Allen left #perl6
03:43 Baggiokwok joined #perl6
03:46 rekhajos joined #perl6
03:47 agentzh joined #perl6
03:50 araujo joined #perl6
04:00 khisanth_ joined #perl6
04:14 agentzh joined #perl6
05:02 mikehh_ joined #perl6
05:36 patspam joined #perl6
05:40 pnate joined #perl6
05:43 cognominal joined #perl6
06:49 ruoso joined #perl6
06:49 kaare joined #perl6
07:20 Su-Shee joined #perl6
07:21 Su-Shee good morning
07:21 dukeleto Su-Shee: good localtime()
07:40 slava joined #perl6
07:40 Chazz_ joined #perl6
07:44 xinming joined #perl6
08:13 iblechbot joined #perl6
08:19 lumi joined #perl6
08:36 JohnDoe365 joined #perl6
08:49 meneldor joined #perl6
09:17 dakkar joined #perl6
09:35 moritz_ good morning
09:45 sjn good $daytime :)
09:47 colomon morning
09:55 hicx174 joined #perl6
09:55 meneldor morning
10:01 lumi joined #perl6
10:11 Guest49024 joined #perl6
10:12 JimmyZ joined #perl6
10:13 jnthn oh hai
10:16 meneldor guys is there any module like Data::Dumper? i want to look how is my object structured and how it looks like
10:18 JimmyZ rakudo: 1.WHAT
10:18 p6eval rakudo 3867ff:  ( no output )
10:19 JimmyZ rakudo: ['hello','world'].perl.say;
10:19 p6eval rakudo 3867ff: ["hello", "world"]␤
10:19 JimmyZ rakudo: Num.perl.say;
10:19 jnthn meneldor: As JimmyZ++ notes, .perl is essentially built-in Data::Dumper. :-)
10:19 p6eval rakudo 3867ff: Num␤
10:19 JimmyZ rakudo: Num.^menthods.perl.say;
10:19 p6eval rakudo 3867ff: Method 'menthods' not found for invocant of class 'ClassHOW'␤in Main (file src/gen_setting.pm, line 324)␤
10:19 meneldor nice :) tnx
10:19 JimmyZ rakudo: Num.^menthod.perl.say;
10:19 p6eval rakudo 3867ff: Method 'menthod' not found for invocant of class 'ClassHOW'␤in Main (file src/gen_setting.pm, line 324)␤
10:20 JimmyZ rakudo: Num.^methods.perl.say;
10:20 p6eval rakudo 3867ff: [{ ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, {
10:20 p6eval ..... }, …
10:20 JimmyZ rakudo: Num.^methods.join(' ').perl.say;
10:20 p6eval rakudo 3867ff: "sqrt sin tanh asin cosh succ sign perl asinh acosech Scalar Str acotanh unpolar ACCEPTS asech Rat pred atanh exp cosec acosh acosec Num sinh WHICH cosech cotan acotan atan2 Complex sec asec cotanh log tan sech log10 atan cos acos first trans sort sqrt asin cosh :s grep subst elems
10:20 p6eval ..chomp …
10:21 cognominal joined #perl6
10:24 moritz_ meneldor: the .perl method is a lot like Data::Dumper
10:24 moritz_ rakudo: say [1, 2, { a => 4, b => 3 }].perl
10:24 p6eval rakudo 3867ff:  ( no output )
10:25 moritz_ perl6:  say [1, 2, { a => 4, b => 3 }].perl
10:25 JimmyZ rakudo: say 1, 2, 3, 4;
10:25 lumi joined #perl6
10:25 p6eval pugs: [1, 2, {("a" => 4), ("b" => 3)}]␤
10:25 p6eval ..elf 29557: [1,2,{"a" => 4, "b" => 3}]␤
10:25 p6eval ..rakudo 3867ff:  ( no output )
10:25 p6eval rakudo 3867ff: 1234␤
10:25 JimmyZ rakudo: say ([1, 2, { a => 4, b => 3 }]).perl
10:26 p6eval rakudo 3867ff:  ( no output )
10:26 moritz_ something's seriously wrong with rakudo on p6eval
10:26 meneldor tnx guys ill try it when i finally construct my object :)
10:26 moritz_ doesn't work for custom objects yet :(
10:26 JimmyZ ng: say [1, 2, { a => 4, b => 3 }].perl
10:26 p6eval ng 2717d0: [1, 2, { ... }]␤
10:29 JimmyZ ng: say { a => 4, b => 3 }.perl
10:29 p6eval ng 2717d0: { ... }␤
10:30 JimmyZ how to output its construct ?
10:30 moritz_ rakudo on p6eval will not be available for a few minutes
10:31 moritz_ ng: say { a=> 3, b => 5}.WHAT
10:31 p6eval ng 2717d0: Block()␤
10:31 moritz_ ng: say { a=> 3, b => 5}.().perl
10:31 p6eval ng 2717d0: List()␤
10:31 JimmyZ oh
10:31 moritz_ ng: say { a=> 3, b => 5}().perl
10:31 p6eval ng 2717d0: List()␤
10:31 JimmyZ I thought it's a hash
10:31 moritz_ and it should be.
10:32 meneldor what means: No applicable candidates found to dispatch to for 'trait_mod:is'
10:33 moritz_ it means that you used 'is' somehwere (like in 'class A is B { ... }'), and something went wrong
10:33 nadim ng: my $a = 1 ; my $b ; my $c ; ($a, $b,$c) //= ('default_a', 'default_b', 'default_c') ; say "$a $b $c" ;
10:33 p6eval ng 2717d0: Null PMC access in invoke()␤current instr.: '!assign_metaop' pc 14406 (src/builtins/Junction.pir:147)␤
10:33 moritz_ for example B might not have beeen declared properly
10:35 nadim Is is just me or am I the only one this should work?  my $a = 1 ; my $b ; my $c ; ($a, $b,$c) //= ('default_a', 'default_b', 'default_c') ; say "$a $b $c"
10:35 nadim to think
10:35 meneldor well so if i say class A is B, B have to be declared above A?
10:36 meneldor because this is the error in my code
10:36 moritz_ yes
10:36 moritz_ "I want to inherit from a class, but that doesn't exist yet"
10:36 meneldor and what if i want class A is B and Class B is A?
10:37 moritz_ what should that be good for? and what semantics should that have?
10:37 mathw How do you construct such a thing
10:37 moritz_ inheritance should be a directed, acyclic graph
10:37 mathw A has to call B's constructor first
10:37 mathw Which then has to call A's
10:37 mathw which of course needs to call B's
10:37 mathw You can't have loops in your inheritance tree
10:38 mathw Even if there's a hack in the language to make it work, it's a great way to go insane
10:38 meneldor i think i read somewhere that i can use loops
10:39 meneldor whatever now everything is fine :)
10:39 moritz_ std: class B { }; class A is B { }; augment class B is A { }
10:39 p6eval std 29557: ok 00:01 107m␤
10:40 moritz_ rakudo: say [1, 2, { a => 4, b => 3 }].perl
10:40 p6eval rakudo 726b83:  ( no output )
10:40 moritz_ 25258 CPU time limit exceeded | PERL6LIB=lib ../p/bin/perl6 /tmp/qUACYcFLHV >> /tmp/QjLUWutOZN 2>&1
10:41 mathw moritz_: that seems implausible
10:41 moritz_ syntactically it seems to work :-)
10:41 Baggiokwok joined #perl6
10:42 mathw Yes but what happens when you actually make one
10:42 moritz_ I hope you get a friendly error
10:43 mathw That would be nice
10:44 moritz_ $ ./perl6 -e 'class B { }; class A is B { }; class B is also is A { }'
10:44 moritz_ Loop in class hierarchy: 'B' is an ancestor of 'A
10:45 jnthn :-)
10:45 jnthn Awesome enough? ;-)
10:45 moritz_ awesome error message, yes
10:45 moritz_ SA = Sufficiently Awesome
10:48 frettled It's the SAEM
11:12 iblechbot joined #perl6
11:12 lumi joined #perl6
11:23 lichtkind joined #perl6
11:23 lichtkind is there any release date fpr rakuda star?
11:23 lichtkind s/fpr/for/
11:23 mathw As far as I know, it's still intended to be Aprilish, as per the original announcement
11:24 lichtkind mathw: yes i read that but on rakudo.org is nothing so i better ask :)
11:27 jnthn lichtkind: None set yet - the target is Q2, with April as our current target.
11:27 jnthn (our current more specific target, that is)
11:27 jnthn But all(March,April,May) qualify as Q2.
11:27 jnthn :-)
11:27 lichtkind thanks
11:28 lichtkind thats enough time for my article about rakudo :)
11:28 moritz_ article for which media?
11:29 lichtkind moritz_: heiso online , or you wanted too?
11:35 slava so rakudo switched away from the parrot grammar engine?
11:43 rodi joined #perl6
11:46 lichtkind slava:  i think not yet but there is a branch that does as far as i know
11:53 meppl joined #perl6
11:54 allbery_b joined #perl6
11:59 lumi joined #perl6
12:00 krunen joined #perl6
12:13 drbean joined #perl6
12:14 payload joined #perl6
12:16 SmokeMachine joined #perl6
12:20 meneldor im completely lost in the new p6 OO morel :)
12:20 meneldor model*
12:20 meneldor i've rebuild my game-like example from yesterday
12:21 lisppaste3 meneldor pasted "untitled" at http://paste.lisp.org/display/93609
12:21 meneldor so global_map consist everything
12:21 meneldor a player can have many castles
12:21 meneldor and units
12:22 meneldor castle can have many buildings
12:22 meneldor so how can i create new player?
12:23 JohnDoe365 left #perl6
12:23 meneldor considering that in every moment the main object have to "know" for all players created
12:23 moritz_ lichtkind: I wanted to write something for iX, unless somdbody else does
12:27 meneldor how to create a new player and with him automaticaly to be added castle and hero, and all this to be stored in array or object so in every moment i can see how many players have been created
12:28 * moritz_ can't parse "automaticaly to be added castle and hero"
12:30 meneldor http://paste.lisp.org/display/93609
12:30 meneldor there are classes Hero and Castle
12:30 meneldor they inherits from Player
12:30 moritz_ why is a Player a Map?
12:31 meneldor because i need one object to collect everything
12:31 meneldor and i think Map is on top
12:31 meneldor players play in the same map
12:31 moritz_ inheritance is a "is a" relation
12:32 moritz_ so when you say Player inherits from Map, you say "Player is a specialization of a Map"
12:32 moritz_ that sounds so wrong
12:32 moritz_ maybe a player is on a map, but that's something very different
12:33 moritz_ meneldor: http://en.wikipedia.org/wiki/Obje​ct-Oriented_Software_Construction I can only recommend that, very good read
12:34 meneldor so the Player class has to be on top?
12:34 meneldor tnx moritz_
12:35 moritz_ the Player class should only be on top of things that are players
12:36 meneldor i look on Player like container for Hero,Castle and Unit belonging to him
12:36 meneldor is that wrong?
12:37 moritz_ what is a Player, and what is Hero?
12:37 lumi joined #perl6
12:37 moritz_ can a player have multiple heros?
12:38 Guest6848 joined #perl6
12:38 meneldor yep
12:38 meneldor Hero leads the Units
12:38 meneldor PLayer is just the account who plays
12:39 meneldor the Player can hire many Heroes
12:39 meneldor they will create own Units
12:39 meneldor and so on
12:40 meneldor for example if you now the game Heroes3
12:40 meneldor :)
12:40 moritz_ I don't
12:41 lisppaste3 moritz_ annotated #93609 "other architectural approach" at http://paste.lisp.org/display/93609#1
12:41 meneldor well, when you start the game you have 1 castle and 1 hero
12:41 meneldor but later you can hire more
12:41 meneldor so the Player is the main container for all castles/heroes
12:41 ruoso joined #perl6
12:42 meneldor but the Map is the main container for all players
12:42 moritz_ ok
12:42 moritz_ so class Map { has @.players }
12:46 meneldor ok considering you anotation, how to create a new instance of Player including new Hero and all this stored in @.objects ?
12:46 meneldor i mean which class have to be constructor for that
12:46 moritz_ class Player { ...; has @.heros = (Hero.new); }
12:47 moritz_ and whenever you create a Player, you have to add it Map.objects yourself
12:49 meneldor thank you moritz_  i will try it that way
12:50 lichtkind_ joined #perl6
12:57 bluescreen joined #perl6
12:58 takadonet morning all
13:03 meneldor what means: invoke() not implemented in class 'Player'
13:05 moritz_ it means that you used  Player() or so
13:05 moritz_ and the () tries to invoke the thing
13:07 meneldor in class Map: push @.players, Player.new(name=> "TestName");
13:07 meneldor i use it that way
13:08 moritz_ then you need to write class Player first
13:09 meneldor damn
13:17 zloyrusskiy joined #perl6
13:21 ignacio_ joined #perl6
13:40 payload joined #perl6
13:54 meneldor rand(100) is now (1..100).pick  ?
13:57 IgnisInCaelum joined #perl6
13:59 lumi joined #perl6
14:12 IgnisInCaelum joined #perl6
14:16 [particle] joined #perl6
14:17 smash_ joined #perl6
14:18 smash_ hello
14:18 mathw Hello smash_
14:19 slava left #perl6
14:20 Guest30825 joined #perl6
14:26 colomon rakudo: say rand(100);
14:27 p6eval rakudo 726b83: too many arguments passed - 0 params expected␤in sub
14:27 IgnisInCaelum joined #perl6
14:38 IgnisInCaelum joined #perl6
14:53 diakopter hello world
14:54 sbp hello diakopter
14:58 colomon rakudo: say rand;
14:58 p6eval rakudo 726b83: 0.137508952831016␤
14:58 colomon ah.
14:59 IgnisInCaelum joined #perl6
15:03 uniejo joined #perl6
15:04 lumi joined #perl6
15:04 meneldor rakudo: say 100.rand
15:04 p6eval rakudo 726b83: 68.8374702426703␤
15:05 meneldor rakudo: say 100.rand.Int
15:05 p6eval rakudo 726b83: 87␤
15:05 diakopter rakudo: say 1.rand.Int
15:05 p6eval rakudo 726b83: 0␤
15:05 diakopter rakudo: say 1.rand.Int for 1..5
15:05 p6eval rakudo 726b83: 0␤0␤0␤0␤0␤
15:05 diakopter rakudo: say 1.rand.Int for 1..5
15:05 p6eval rakudo 726b83: 0␤0␤0␤0␤0␤
15:05 diakopter rakudo: say 2.rand.Int for 1..20
15:05 p6eval rakudo 726b83: 1␤0␤0␤0␤1␤1␤1␤0␤1␤0␤1␤1␤1␤0␤1␤0␤0␤0␤1␤1␤
15:06 diakopter rakudo: say 2.rand.Int for 1..200
15:06 p6eval rakudo 726b83:
15:06 p6eval ..0␤1␤1␤0␤0␤0␤0␤1␤0␤1␤1␤1␤1␤1␤0␤0␤0␤0␤0␤0␤0␤​1␤0␤1␤1␤1␤0␤0␤0␤0␤1␤0␤1␤1␤0␤0␤1␤1␤0␤0␤0␤1␤1␤​1␤1␤0␤1␤1␤1␤1␤0␤1␤0␤0␤0␤1␤1␤0␤0␤1␤0␤0␤0␤1␤0␤​1␤0␤1␤1␤1␤1␤0␤0␤0␤0␤1␤1␤1␤1␤1␤0␤1␤0␤1␤1␤0␤1␤​0␤1␤0␤1␤0␤1␤0␤0␤0␤1␤1␤1␤1␤1␤0␤0␤1␤1␤0␤1�
15:12 iblechbot joined #perl6
15:17 literal joined #perl6
15:17 avar joined #perl6
15:22 avar joined #perl6
15:23 literal joined #perl6
15:25 KyleHa joined #perl6
15:26 mberends joined #perl6
15:38 avar joined #perl6
15:39 literal joined #perl6
15:46 payload joined #perl6
15:49 Psyche^ joined #perl6
16:08 nihiliad joined #perl6
16:35 pugs_svn r29558 | ash++ | Adding some tests for List.new, Array.new, &list() and adding a description to S32-List and S32-Array

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

Perl 6 | Reference Documentation | Rakudo