Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2008-02-05

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:12 macroron joined #perl6
00:40 thoughtpolice joined #perl6
00:49 mac_ joined #perl6
00:51 BinGOs_ joined #perl6
00:55 ispy_ left #perl6
01:02 Limbic_Region joined #perl6
01:24 cyberpass joined #perl6
01:25 Andy_ joined #perl6
01:40 kst joined #perl6
01:59 pugs_svn r19805 | lwall++ | [t/operators/assign.t] mods to new assignment semantics
02:00 pugs_svn r19806 | lwall++ | move assign.t into t/spec
02:11 meppl good night
02:48 peepsalot joined #perl6
02:57 kanru joined #perl6
03:01 apple-gunkies joined #perl6
03:15 justatheory joined #perl6
03:39 jjore joined #perl6
03:40 vainguard_ joined #perl6
04:26 orafu joined #perl6
04:36 agentzh joined #perl6
04:37 vainguard joined #perl6
04:41 thoughtp1lice joined #perl6
04:55 Southen_ joined #perl6
04:58 ting joined #perl6
04:58 nothingmuch joined #perl6
05:00 jjore joined #perl6
05:00 apple-gunkies joined #perl6
05:00 mj41 joined #perl6
05:00 broquaint joined #perl6
05:00 allbery_b joined #perl6
05:00 mugwump joined #perl6
05:00 GeJ joined #perl6
05:00 pasteling joined #perl6
05:00 Southen joined #perl6
05:01 thoughtp1lice joined #perl6
05:01 kanru joined #perl6
05:01 Andy_ joined #perl6
05:01 araujo joined #perl6
05:01 ludan joined #perl6
05:01 simcop2387 joined #perl6
05:01 Patterner joined #perl6
05:01 faxathisia joined #perl6
05:01 gbacon joined #perl6
05:01 lisppaste3 joined #perl6
05:01 marmic joined #perl6
05:01 ruoso joined #perl6
05:01 arguile joined #perl6
05:01 Caelum joined #perl6
05:01 f0rth joined #perl6
05:01 dalek joined #perl6
05:01 Maddingue joined #perl6
05:01 kcwu joined #perl6
05:01 cognominal joined #perl6
05:01 wolverian joined #perl6
05:01 Eidolos joined #perl6
05:33 monomorph joined #perl6
05:43 Aankhen`` joined #perl6
05:51 pugs_svn r19807 | putter++ | misc/Ruby6: rmdir.  Directory was empty, old, and never had files.
05:52 pugs_svn r19807 | putter++ | karhu: if you are still around and interested, let's talk. :)
05:52 cyberpass joined #perl6
05:59 pugs_svn r19808 | putter++ | putter/talk.txt: tweak.
06:06 pugs_svn r19809 | putter++ | src/perl6/STD_extract: created.  The start of a script to take STD.pm, and extract its information into a more accessible form.
06:06 peeps[work] joined #perl6
06:08 pugs_svn r19810 | lwall++ | [pugs] simplified assignment parsing
06:52 devogon joined #perl6
07:00 cyberpass left #perl6
07:06 lumi joined #perl6
07:32 pugs_svn r19811 | lwall++ | [assign.t] cut-n-paste errors
08:11 iblechbot joined #perl6
08:14 meppl joined #perl6
08:32 Grrrr joined #perl6
08:33 revdiablo joined #perl6
08:34 tewk joined #perl6
08:34 sunnavy joined #perl6
08:34 pjcj joined #perl6
08:37 pugs_svn joined #perl6
08:37 cognominal_ joined #perl6
08:38 mattz joined #perl6
08:39 cosimo joined #perl6
08:44 BinGOs joined #perl6
08:51 penk joined #perl6
08:51 Auzon joined #perl6
08:57 viklund joined #perl6
09:49 ruoso joined #perl6
09:52 IllvilJa joined #perl6
10:10 kcwu joined #perl6
10:13 ebassi joined #perl6
10:15 pbuetow joined #perl6
10:23 njbartlett joined #perl6
10:28 njbartlett joined #perl6
10:28 jql joined #perl6
10:31 spinclad_ joined #perl6
10:33 njbartlett joined #perl6
10:33 kanru joined #perl6
10:37 njbartlett joined #perl6
10:38 mattz joined #perl6
10:43 Southen joined #perl6
10:58 pugs_svn r19812 | ruoso++ | [smop] First major milestone achieved!!!! Stage 0 SMOP finished. No memory leaks, no valgrind dected errors, ALL TESTS PASSING.
10:59 moritz_ ruoso++ indeed
10:59 moritz_ @karam ruoso
10:59 lambdabot Maybe you meant: karma karma+ karma-
10:59 moritz_ @karma ruoso
10:59 lambdabot ruoso has a karma of 231
11:03 pbuetow @karma pbuetow
11:03 lambdabot You have a karma of 0
11:03 pbuetow :P
11:03 pbuetow i used to have a karma of 1
11:04 moritz_ pbuetow: you need to commit a bit more ;)
11:04 pbuetow :(
11:04 moritz_ perhaps lambdabot lost its information
11:04 moritz_ @karma audreyt
11:04 lambdabot audreyt has a karma of 115
11:04 moritz_ @karma moritz
11:04 lambdabot moritz has a karma of 186
11:04 pbuetow yes can be
11:07 chacha_chaudhry joined #perl6
11:19 pugs_svn r19813 | ruoso++ | [smop] when destroying the interpreter using the interpreter prototype, make sure to do a goto(false) and a runloop before. This seems to be a bug in the stackfull implementation used to destroy the stackless interpreter.
11:23 chris2 joined #perl6
11:24 blindfish joined #perl6
11:25 Aankh|Clone joined #perl6
11:40 * ruoso starting to wonder how p6opaque should look like in smop...
11:43 Aankhen`` joined #perl6
12:32 Aankh|Clone joined #perl6
12:34 zamolxes joined #perl6
12:41 riffraff joined #perl6
13:27 tcliou_ joined #perl6
13:45 alester joined #perl6
14:08 diakopter joined #perl6
14:13 meppl joined #perl6
14:29 jhorwitz joined #perl6
14:48 barney joined #perl6
14:56 cognominal_ joined #perl6
15:02 Aankhen`` joined #perl6
15:19 TJCRI joined #perl6
15:21 cognominal_ is there a pragma to promote pairs of slurpy hash to behave as lexicals as  a temporary mesure before changing the signature and adding them as named parameter or as a way to avoid overcrowding the signature.
15:21 alester joined #perl6
15:21 cognominal_ Maybe that deserve a dedicated twigil
15:21 moritz_ uhm
15:21 moritz_ that's too fast for me
15:22 cognominal_ ??
15:22 moritz_ show us a line of code
15:22 moritz_ what do you want to achieve?
15:24 cognominal_ sub toto (*%f) {  ... shitload of %f<>  }
15:24 cognominal_ versus
15:24 moritz_ so you want slurpy named parameters?
15:25 moritz_ pugs: sub a(%f) { say %f.perl } a(:foo(bar));
15:25 exp_evalbot OUTPUT[*** Named argument found where no matched parameter expected: ("foo",Ann (Pos (MkPos "/tmp/RUKg9GtJ6c" 1 34 1 37)) (App (Var "&bar") Nothing []))␤    at /tmp/RUKg9GtJ6c line 1, column 27-39␤]
15:25 moritz_ pugs: sub a(%f) { say %f.perl } a(foo => 'bar');
15:25 exp_evalbot OUTPUT[*** Named argument found where no matched parameter expected: ("foo",Ann (Pos (MkPos "/tmp/T6fDU03IUp" 1 36 1 41)) (Val (VStr "bar")))␤    at /tmp/T6fDU03IUp line 1, column 27-42␤]
15:27 cognominal_ subu toto(*%f) { $+a }   # + would be the wtwigil
15:27 cognominal_ toto( a => 1 );
15:27 Tene pugs: sub a(*%f) { say %f.perl } a(foo => 'bar');
15:27 exp_evalbot OUTPUT[{("foo" => "bar"),}␤]
15:27 cognominal_ that would avoid to deal wit the hash
15:27 moritz_ I think that's too much of a shortcut
15:28 moritz_ Tene's solution sounds good
15:28 cognominal_ but would not conflict with other names
15:28 moritz_ anyway, the idea is not all that bad
15:29 cognominal_ see the module JQuery translated in Perl6
15:29 moritz_ $^<identifier> are for list args, so $<other twigil><identifier> could be named args
15:29 cognominal_ the params hash everywhere is just structural code
15:29 Tene which hash?  %_?
15:30 Tene nice idea
15:30 moritz_ pugs: sub f { say %_.perl } f(:a(b))
15:30 exp_evalbot OUTPUT[*** ␤    Unexpected "."␤    expecting "::"␤    Variable "%_" requires predeclaration or explicit package name␤    at /tmp/jQQZQxd5qk line 1, column 15␤]
15:31 Tene pugs: sub f { say %_.perl } f(:a<b>)
15:31 exp_evalbot OUTPUT[*** ␤    Unexpected "."␤    expecting "::"␤    Variable "%_" requires predeclaration or explicit package name␤    at /tmp/4xnAoeuiZ5 line 1, column 15␤]
15:31 cognominal_ I am rereading the synopsis so I may miss obvious things
15:31 moritz_ re JQuery translated in Perl6, do you have a link anywhere?
15:32 cognominal_ no, I am just playing with the idea
15:32 cognominal_ but get the original JQuery perl module and you will et the idea
15:32 cognominal_ it is full of   $my->{param}{remote} = 0 if  ! defined $my->{param}{remote} ;
15:33 cognominal_ where $my->{param}  whould be a slurpi hash in Perl6
15:34 moritz_ do you use $my as self?
15:34 cognominal_ no in that code $my is not self
15:34 moritz_ can you name a particular method that you'd like to look me at?
15:35 cognominal_ any methods with $my->{param}
15:35 cognominal_ they are all over the place in the JQuery/*.pm modules
15:35 moritz_ why not just declare them as formal parameters?
15:36 moritz_ it's a very good way to make the methods self-documenting
15:36 cognominal_ "> is there a pragma to promote pairs of slurpy hash to behave as lexicals as  a temporary mesure before changing the signature and adding them as named parameter or as a way to avoid overcrowding the signature."
15:37 moritz_ well, the answer is "no", I guess
15:37 cognominal_ I don't deny they can make formal parameter but they may be too numerous to be of any interest
15:37 peeps[work] joined #perl6
15:37 moritz_ but overcrowed signatures are a design problem, not a language problem
15:37 [particle] %my{param} // 0
15:37 [particle] %my{param} //= 0
15:38 cognominal_ the design is out of the scope of Perl here, this is jquery
15:38 moritz_ hmmm
15:38 moritz_ well, perhaps TimToady picks up your idea
15:38 cognominal_ this is just in idea, now it is in my log :)
15:39 moritz_ or you'll have to life a with either crowded formal parameters or a slurpy hash
15:39 [particle] i don't understand what you're trying to do. flatten the hash?
15:39 cognominal_ I want to avoid to dereference explictely a hash
15:39 moritz_ [particle]: cognominal_ wants something like like $^a, $^b for named arguments
15:40 cognominal_ some twigil would say me this variable comme from the slurpy hash.
15:40 [particle] ok, i see.
15:40 cognominal_ I don't care about the name of the slurpy hash so why should I other with it everywhere
15:41 cognominal_ a twigil seems nicer that naming the slurpy hash in the body of the sub
15:41 [particle] does $%hash have meaning in perl 6 today?
15:42 [particle] that is, can '%' be the twigil
15:42 moritz_ well, the idea is appealing because of the symmetry between named and positional args
15:42 [particle] yes, agreed.
15:42 * moritz_ thought of $|name, for no particular reason
15:42 cognominal_ appealing? english fails me here
15:43 moritz_ "looks nice to have"
15:43 moritz_ cognominal_: what's your native language?
15:43 cognominal_ french
15:43 cognominal_ and I am too lazy to reach the dict of my mackbook, shame on me
15:44 moritz_ appealing = attractive
15:44 moritz_ in good approximation ;)
15:44 [particle] shame on us for writing in the *other* international language ;)
15:44 moritz_ [particle]: like, uhm, Spanish? ;)
15:44 [particle] i meant chinese
15:44 cognominal_ we should go esperanto to be on equal footing :)
15:45 cognominal_ I suppose the asiatic would disagree
15:45 moritz_ actually chinese is spoken by many people, but not (officially) in many countries
15:46 cognominal_ kudo for TimToady and co. The synopsis are not easu reading but very compelling. Good progress here.
15:47 cognominal_ s/easu/easy/
15:50 rhr_ hard to find a new twigil.  the ones taken are . ! + ? * = ^ and : $ @ % & / < _ ( can't be used there either, afaics
15:51 moritz_ so | is still free?
15:51 cognominal_ there are so much twigils
15:51 cognominal_ what's the + for?
15:51 rhr_ | might work, but it looks a lot like !
15:51 moritz_ yes
15:51 rhr_ + is for context vars
15:53 cognominal_ amazing, with many degrees of liberties added, Perl6 is already running out of ASCII chars
15:54 [particle] we still have ` but it's (unofficially iirc) reserved for users
15:55 [particle] i suppose $'foo suggests a named var
15:57 cognominal_ back reading the synopses to get some lagunes in the see of my ignorance
15:58 [particle] ah, "lagoons in the sea".
15:59 [particle] hey, wow! i understand french :)
15:59 cognominal_ arf, that does not translate in english
15:59 cognominal_ lagune is more like a bank of sand
15:59 [particle] i knew what you meant, but yeah, lagoon must not be the translation for lagune
16:00 cognominal_ and lacune is lacuna in English
16:00 [particle] more like "sand bar"
16:03 kanru joined #perl6
16:04 devogon joined #perl6
16:10 Aankhen`` joined #perl6
16:15 chris2_ joined #perl6
16:15 luqui joined #perl6
16:28 pugs_svn r19814 | putter++ | src/perl6/STD_extract: more constructs recognized.
16:29 Psyche^ joined #perl6
16:29 thepler joined #perl6
16:30 stevan_ joined #perl6
16:34 rindolf joined #perl6
16:37 TimToady $:foo is actually available, i think
16:39 REPLeffect joined #perl6
16:40 moritz_ pugs: sub f { say $:foo.perl } f(:foo('bar'))
16:40 exp_evalbot OUTPUT[*** ␤    Unexpected ":foo"␤    expecting "::"␤    at /tmp/B9Zt5LCYRz line 1, column 14␤]
16:41 moritz_ oh, I misunderstood "available" ;)
16:41 vainguard joined #perl6
16:47 cognominal_ TimToady owns the colon   :)
16:48 moritz_ all your colon are belong to us
16:50 aindilis joined #perl6
16:50 TimToady now if you really want to start confusing people, write foo(:$:foo)
16:55 justatheory joined #perl6
16:58 vainguard joined #perl6
16:59 vainguard joined #perl6
17:03 [particle] ::('$')(:$:_)
17:05 cognominal_ so we will have the visual equivalent of tongue twisters in Perl6
17:06 cognominal_ any sufficient rich language cannot avoid that
17:08 cognominal_ ton thé t'a t'il oté ta toux :)   ->   has you tea got rid you of your cough
17:08 djm joined #perl6
17:12 moritz_ cognominal_: "simple things should look simple, weird things should look weird" ;)
17:14 pcbuetow joined #perl6
17:17 pugs_svn r19815 | lwall++ | Fixed smartlink.
17:24 IRSeekBot joined #perl6
17:31 silug joined #perl6
17:38 cognominal_ following on the implication of my twigil nad my study of JQuery , this may means that a object may have optionnal  attributes declared as $:a   and that a constructor may have a slurpy hash too.
17:38 cognominal_ s/nad/and/
17:38 cognominal_ I can't see the ramification
17:41 cognominal_ ho, that can't do, that should be $.:a , arf multiletter twigils :(
17:44 cognominal_ joined #perl6
17:46 Aankhen`` joined #perl6
17:48 pugs_svn r19816 | rhr++ | [Unicode.pm] delegate encoding to pack/unpack
17:48 [particle] thrigils!
17:49 TimToady all attributes are optional already :)
17:49 TimToady at least, everything derived from Object is already a "maybe" type
17:49 moritz_ recursive countable n-igils!
17:50 [particle] you can't do $.^a so i don't see how $.:a would make sense
17:51 pugs_svn r19817 | rhr++ | [assign.t] some more cun-n-paste errors
17:53 cognominal_ anyway I find that JQuery is a good yardstick for conversion in Perl6
17:53 cognominal_ maybe, Perl6 should be called haskell :)
17:55 jferrero joined #perl6
17:55 moritz_ no, its syntax is much prettier
17:56 TimToady significant whitespace, ugh!  :P
17:56 [particle] i can't believe you chose to steal *that* from python. of all things....
17:56 [particle] :P
17:57 cognominal_ python predates haskell? I don't think so
17:57 TimToady yes, but at least I'm sneaky about it
17:58 cognominal_ ho, I was confused
17:58 TimToady gee, an unclear antecedent to a pronoun, fancy that...
17:58 TimToady reminds me I should go read PerlMonks this morning...
18:02 * ruoso just received the result for the grant proposal on smop with 6 votes no, 2 abstentions and no vote for yes... it appears that the perl foundation is not very much -Ofun oriented... one of the comments: "I think there is no need in more engines for Perl 6. I think that ONE is required, and people should work on it. If Parrot is the one more developed, I think we should grant parrot projects;"
18:03 pugs_svn r19818 | lwall++ | Added : twigil
18:03 [particle] ruoso: that's a real shame. imo the problem is that the grants committee is full of p5 folk
18:04 ruoso m completely against new runtimes. Let's not reinvent every
18:04 ruoso wheel at once.
18:04 ruoso * Not yet another Perl 6 compiler/runtime/implementation/whatever!
18:04 ruoso There are way to many already.
18:04 ruoso these are some other comments
18:05 moritz_ jerks
18:05 moritz_ that contradicts the "not one official perl6 implementation" idea
18:06 [particle] apparently the grants committee hasn't read the perl 6 spec.
18:06 TimToady well, tpf should really be named "The Parrot Foundation", I suspect
18:06 [particle] or, chooses not to agree with it.
18:06 ruoso it's sad, specially now that I've finished the stage 0 of smop
18:07 TimToady well, not many people actually get paid to do any of this, alas...
18:07 ruoso and I was counting on the grant to deliver more time to it
18:18 moritz_ ruoso: did you apply for a "real" grant, or for a perl 6 microgrant?
18:19 ruoso real grant
18:20 cosimo joined #perl6
18:22 ruoso later &
18:22 manfred joined #perl6
18:23 * diakopter wonders what TPF is planning to do with all of its money in the bank
18:23 [particle] we may never find out.
18:23 diakopter I suppose endowing its own overhead is not out of the question
18:29 barney joined #perl6
18:33 tewk joined #perl6
18:33 cognominal_ can one write my $a, $b  meaning the Perl5 my ($a, $b)?
18:34 moritz_ pugs: my $a, $b = 2, 3; say $a, '|', $b
18:34 exp_evalbot OUTPUT[*** ␤    Unexpected " ="␤    expecting "::"␤    Variable "$b" requires predeclaration or explicit package name␤    at /tmp/nqk8ggfLuK line 1, column 10␤]
18:35 cognominal_ ok
18:35 moritz_ cognominal_: don't take pugs as a spec ;)
18:36 moritz_ cognominal_: btw your proposal of a new twigil has been accepted (in case you don't read p6l)
18:36 cognominal_ I hope this is a good idea
18:36 [particle] indeed, it is. it's in the spec now :)
18:37 cognominal_ well, Larry is always right ... even if he changes his mind
18:38 moritz_ honestly, I don't think it's all that usefull, but it's certainly not harmful, and nice to have ;)
18:39 cognominal_ at least, it proves that I understant the general Perl6 zeitgeist
18:40 DarkWolf84 joined #perl6
18:40 wknight8111 joined #perl6
18:52 lisppaste3 joined #perl6
18:54 qmole joined #perl6
19:13 TimToady Or I suppose we could rename it the Turf Protection Foundation...
19:21 cognominal_ buzz is entered in the judiciary french language thx to the suite of our president and our first lady against Ryanair  :)
19:22 cognominal_ even though we have (had?) a low against the gratuitous use of hte english language
19:22 cognominal_ ...has entered
19:22 moritz_ not just against English, IIRC
19:23 cognominal_ yea, but English is the perceived menace.
19:24 moritz_ the enemy, just across the channel ;)
19:24 [particle] and the pond :)
19:25 cognominal_ anyway. thx to the writer strike,  no more american series and movies will protect us
19:26 cognominal_ for the perfid Aliban, that's another story
19:26 cognominal_ Albion!
19:34 icwiener joined #perl6
19:40 * [particle] checks if the 'self' keyword is in STD.pm
19:41 [particle] ah, there it is.
19:41 [particle] however, some uses of self in the grammar itself use a sigil, others don't
19:41 moritz_ it shouldn't have one, I guess
19:42 moritz_ unless  you assign it, or use it in my_methods($self: $other, $ags)
19:42 [particle] ok, actually it all looks good
19:42 [particle] my $self = qlang(...)
19:42 [particle] that's the only use with sigil
19:46 jnthn [particle]: lwall++ added term:self at the weekend; I put it into the Rakudo grammar, a tad differently. See comment.
19:47 [particle] fab. yep, we need to put those in the grammar a bit differently since we don't have protoregexes yet
19:48 DarkWolf84 so 'self' will be part of the grammar
19:48 jnthn Well, for other reasons too...
19:48 DarkWolf84 ?
19:49 jnthn [particle]: Not only did I ad the parse rule, I added an action too, so self actually works. ;-)
19:49 jnthn DarkWolf84: Yes, the self keyword/function is in the grammar.
19:50 vainguard joined #perl6
19:50 moritz_ rakudo: class Foo { method bar { say self } };
19:50 exp_evalbot RESULT[Null PMC access in find_method()␤current instr.: '_block10' pc 19 (EVAL_10:10)␤called from Sub 'parrot;PCT::HLLCompiler;eval' pc 789 (src/PCT/HLLCompiler.pir:459)␤called from Sub 'parrot;PCT::HLLCompiler;evalfiles' pc 1059 (src/PCT/HLLCompiler.pir:585)␤called from Sub
19:50 exp_evalbot ..'parrot;PCT::HLLCompiler;command_line' pc 1242 (src/PCT/HLLCompiler.pir...
19:51 cognominal_ how would you translate that in Perl6?   ref($c) =~ /\S/
19:51 jnthn Hmm...
19:52 cognominal_ and   $object.can('get_css') ;
19:52 moritz_ cognominal_: most ref($something) tests are now done with the Smart match operator
19:53 jnthn rakudo: class Foo { method bar { say "hi"; }; method baz { self.bar(); }; }; my $x = Foo.new(); $x.baz();
19:53 exp_evalbot OUTPUT[hi␤]
19:53 wolverian why does it need to be in the grammar?
19:53 moritz_ so the first might be $c ~~ Object or something
19:54 cognominal_ that would mean $c is an instance of a subclass of Object, meaning any class
19:54 moritz_ cognominal_: $object.can('get_css') perhaps 'get_css' ~~ $object.HOW.methods # dunno if there's an easier way
19:54 moritz_ cognominal_: aye
19:54 moritz_ cognominal_: what you you like ref($c) =~ m/\S/ to mean?
19:54 wolverian $object.?get_css();
19:54 moritz_ wolverian: sounds much clearer ;)
19:55 cognominal_ this is in JQuery, test if the var is an obj or a string
19:55 pbuetow joined #perl6
19:55 wolverian you'd probably use signatures in perl 6
19:56 wolverian multi foo (Str $bar) { ... } multi foo (Object $bar) { ... } # or so
19:56 moritz_ cognominal_: $c ~~ Str ?
19:56 cognominal_ I don't know if I will go anywhere playing with JQuery but I lean a log of Perl 6
19:56 wolverian though certainly you can do it in one method too. it's just a bit ugly, given that multimethods are so natural.
19:56 cognominal_ yea
19:56 cognominal_ "I learn a lot of Perl6"
19:57 cognominal_ I can't type on this macbook keyboard and I don't know anymore how to type on any other keyboard :(
20:00 cognominal_ $object.?get_css();   calls get_css() if it exists but the code involves has a rupture of sequence if get_css is not defined so here this is not the right way
20:01 [particle] jnthn++ # that is SO COOL!
20:02 moritz_ so who's going to the German Perl Workshop next week?
20:03 cognominal_ I  wish I spoke german
20:04 cognominal_ but French don't speak anything but french
20:04 moritz_ it takes place in my home town and I have vacations, so I'll surely go there
20:04 cognominal_ where is that?
20:04 moritz_ Erlangen
20:05 moritz_ close to Nürnberg, if you happen to know that
20:06 cognominal_ I know the Erlangen program thx to Felix Klein but not the town itself
20:06 jnthn moritz_: In a last minute change of plan - I will be there!
20:06 moritz_ jnthn: cool
20:06 jnthn cognominal_: Ich speaken kein Deutsch, but I'm gehen anyway. ;-)
20:07 jnthn [particle]: It's only a fancy way of writing say "hi"; ;-)
20:07 cognominal_ :)
20:08 [particle] jnthn: the madness is in the method :)
20:08 jnthn <groan>
20:09 namelessuser joined #perl6
20:09 jnthn Wonder why say self blows up...
20:09 moritz_ jnthn: perhaps it doesn't know how to stringify?
20:10 jnthn moritz_: Yeah, I think so too.
20:10 [particle] say $( self )
20:10 jnthn How do classes stringify?
20:11 [particle] i forget. need to check the spec
20:11 moritz_ according to their Str method ;)
20:11 moritz_ don't know what the default method is, though
20:12 [particle] what do the pugs tests say?
20:12 [particle] t/oo hasn't been moved to t/spec yet
20:12 jnthn The PIR that the compiler is generating looks sane, at least.
20:12 jnthn pugs: class Foo { method bar { say self; }; }; my $x = Foo.new(); $x.bar();
20:12 exp_evalbot OUTPUT[<obj:Foo>␤]
20:12 [particle] jnthn: it could call the parrot 'name' method
20:13 [particle] that looks like haskell underneath
20:14 TimToady cognominal_: no, $object.?method merely returns undef if there is no such method
20:14 jnthn class Foo { method bar { say self; }; };
20:14 jnthn my $x = Foo.new(); $x.bar();
20:14 jnthn get_string() not implemented in class 'Foo'
20:14 cognominal_ thx
20:14 TimToady now if you try to use the value without checking it, then you could get an exception thrown
20:15 pbuetow joined #perl6
20:15 TimToady but I think you'll see a lot of $object.?method // "NONESUCH"
20:16 * jnthn has been writing too much C#, and mis-read // as a comment there
20:16 TimToady there's a sense in which it is certainly less important than the mainline code
20:17 [particle] unsurprisingly, perl hasn't stolen much from C++
20:17 jnthn :-)
20:17 TimToady it stole the idea of *not* putting const everywhere...
20:17 TimToady :)
20:17 wolverian "orelse" works pretty well there too
20:18 TimToady or would, if anyone implemented it yet
20:18 wolverian though for now I go "huh? where's the STM here?" when I see it
20:18 wolverian well, if I saw it...
20:18 jnthn orelse is to // what or is to ||?
20:19 wolverian yes
20:19 [particle] rakudo: my $x; say ($x orelse 'foo');
20:19 TimToady mostly
20:19 exp_evalbot OUTPUT[Null PMC access in invoke()␤current instr.: '_block10' pc 28 (EVAL_10:15)␤called from Sub 'parrot;PCT::HLLCompiler;eval' pc 789 (src/PCT/HLLCompiler.pir:459)␤called from Sub 'parrot;PCT::HLLCompiler;evalfiles' pc 1059 (src/PCT/HLLCompiler.pir:585)␤called from Sub
20:19 exp_evalbot ..'parrot;PCT::HLLCompiler;command_line' pc 1242 (src/PCT/HLLCompiler.pir:676)...
20:19 TimToady it also captures the undefined value into $! for handiness
20:19 [particle] hrmm
20:20 TimToady which // doesn't
20:21 [particle] 'orelse' is in the rakudo opp
20:21 [particle] but infix:orelse doesn't seem to be implemented
20:22 jnthn Time to go do some $REAL_LIFE for a bit... &
20:22 wolverian I was going to look at it, but before pulling parrot I realised my git is at least a week old, so now I'm rebuilding git.. I'll probably get distracted by something else in a few minutes
20:22 njbartlett joined #perl6
20:23 TimToady andthen :)
20:23 [particle] don't fear the yak.
20:23 TimToady andthen andthen andthen andthen
20:24 wolverian butfirst
20:24 TimToady butwait!
20:24 [particle] whatif
20:25 wolverian eventhough
20:25 [particle] noway
20:29 spinclad_ pleasedon't
20:30 spinclad_ inasmuchaswhich
20:31 wolverian isn't that cobol?
20:31 spinclad_ insofaras it's anything, maybe
20:32 spinclad_ whereas
20:32 spinclad_ andyet
20:32 pbuetow joined #perl6
20:33 [particle] pleasepleaseplease
20:34 spinclad_ [puppyeyes]
20:34 moritz_ actually eiffel has the "implies" keyword, where "a implies b" is (not a) or b
20:34 spinclad_ ew, how boolean!
20:35 moritz_ actually it's pretty useful - eiffel is very strong on design by contract, and that makes it more readable in some places
20:37 [particle] parrot has complete boolean logic support, including xand
20:38 [particle] a and b, but not both
20:38 spinclad_ [useful] oh, definitely -- i just think of when a isn't (known to be) true or false (yet).
20:38 ebassi joined #perl6
20:38 spinclad_ such as a protoobject of its type
20:39 __Ace__ joined #perl6
20:40 spinclad_ 'a implies b' when a's truthspace is inside b's
20:40 moritz_ that's a perfect exercise to define such an op at runtime
20:41 spinclad_ when b is ineverycase at least as true as a
20:59 TimToady well, "implies" is easily expressed in Perl 6 as !?>    :)
21:00 moritz_ and _so_ readable
21:00 TimToady well, it's like math's ->, with the unexplanatory - replace with the elements of logic ? and !
21:00 TimToady *replaced
21:00 meppl joined #perl6
21:03 spinclad idle question: is ?Bool just == Bool?  (that is, boolifying the generic Boolean)  (and not true or false, like most ?<expr>)
21:03 TimToady 'course, we haven't actually defined ?> as boolean right shift yet...
21:04 TimToady and you can't use a ! metaoperator on anything that isn't a chaining comparator...
21:04 spinclad i thought boolean right shift would be ?>>
21:05 spinclad (as opposed to >>?>>)
21:05 TimToady maybe that means ?| and ?& and ?^ really belong at the comparator level, not the additive level
21:05 TimToady no, we reduced them to single > and < to avoid confusion with Texas quotes
21:06 spinclad and gain confusion with comparison...
21:06 TimToady troonuff
21:06 TimToady but that's just mental confusion, not parser confusion
21:06 spinclad but Texas quotes are deeper parsering
21:06 spinclad right
21:17 gbacon joined #perl6
21:29 GeJ joined #perl6
21:30 sri_work joined #perl6
21:33 njbartlett_ joined #perl6
21:47 whiteg joined #perl6
22:03 kst joined #perl6
22:21 vainguard joined #perl6
22:24 ruoso TimToady, Undef isa Object?
22:24 moritz_ pugs: say Undef ~~ Object
22:24 exp_evalbot OUTPUT[*** No such subroutine: "&Undef"␤    at /tmp/5yOxIcjRtn line 1, column 5 - line 2, column 1␤]
22:24 moritz_ pugs: say undef ~~ Object
22:24 exp_evalbot OUTPUT[1␤]
22:25 ruoso kp6: say Undef ~~ Object
22:25 exp_evalbot r19818: OUTPUT[no method 'APPLY' in Class 'Undef'␤ at compiled/perl5-kp6-mp6/lib/KindaPerl6/Runtime/Perl5/MOP.pm line 345␤        KindaPerl6::Runtime::Perl5::MOP::__ANON__('HASH(0x824be54)', 'APPLY') called at compiled/perl5-kp6-mp6/lib/KindaPerl6/Runtime/Perl5/MOP.pm line 169␤
22:25 exp_evalbot ..main::DISPATCH('HASH(0x824be54)', 'APPLY') called at compiled/perl5-kp6-mp6/lib/Kin...
22:25 ruoso the thing is... is it right?
22:27 ruoso I've been thinking on how to implement p6opaque and the classes in smop...
22:28 ruoso in theory, a class is "Undef" with add ons...
22:28 ruoso like
22:28 ruoso my $foo = Undef;
22:29 ruoso $foo.^add_method(name => 'bar', code => $baz);
22:29 [particle] why are you capitalizing? looking for a basic type called 'Undef'?
22:29 [particle] or the value 'undef'?
22:29 ruoso well... as per S02, "undef" is a function, not a value
22:29 [particle] ok, nullary function, like self.
22:30 [particle] <term>
22:30 ruoso yep... the value is of the Undef type
22:30 ruoso there's no "native undef"
22:30 ruoso Undef is a class like any other...
22:31 ruoso except that it returns false to "defined"
22:31 [particle] ah, i see in S02
22:31 TimToady Object is the most generic Undef class
22:31 TimToady but all "classes" in p6 are protoobjects, and hence typed versions of undef
22:31 TimToady one could argue that undef === Object should return true
22:31 [particle] my Undef $x = 2;
22:32 ruoso so, taking a copy of undef and adding methods is a sane way of creating a class...
22:32 TimToady well, but p6 really has no classes in that sense, it has protoobjects and metaclasses
22:33 ruoso yeah... yeah...
22:33 TimToady class Foo is already the undef you
22:33 TimToady want
22:34 ruoso I know... but I'm not talking about syntax...
22:34 TimToady pugs: class Foo {}; defined(Foo)
22:34 ruoso but about runtime
22:34 exp_evalbot RESULT[Bool::False]
22:34 ruoso how one would do it by reflection code
22:34 ruoso s/reflection/introspection/
22:34 * ruoso wonders why java uses "reflection"
22:35 TimToady well, more or less the way Moose and MO handle it
22:36 * ruoso have to take a look in MO looking for that in specific...
22:36 TimToady you should probably mostly be talking to nothingmuch and stevan at this point
22:37 TimToady I ignore everything that goes on behind the .HOW curtain :)
22:37 ruoso but isn't this something that should work across implementations?
22:38 ruoso I mean... shouldn't .HOW have an API
22:38 TimToady the basic methods need to be interoperable, yes
22:38 TimToady and nothingmuch's MO is pretty much what everyone should be aiming for
22:39 ruoso ok... just before I get in deep MO again...
22:39 pugs_svn r19819 | putter++ | src/perl6/STD.pm: normalize a couple of unusual { } indentations.
22:39 TimToady however, stevan's implementation of Moose is a solider implementation
22:39 Limbic_Region joined #perl6
22:39 TimToady but doesn't yet (I don't think) do Responder Interfaces quite MOish
22:40 TimToady I sure hope putter knows about cheat and metholate already...
22:40 TimToady but he seems to be scarce around here lately...
22:40 ruoso my $foo = Undef.clone(); $foo.^add_method(name => 'foo', code => $bar, signature => $sig); seems like a sane way of initializing a new anonymous class
22:41 TimToady s/Undef/Object/
22:41 TimToady there is no Undef type
22:41 xeridon joined #perl6
22:41 ruoso hm?
22:42 TimToady there is no Undef type
22:42 * ruoso lost now
22:42 TimToady the type of "undef" is Object
22:42 TimToady Object is the most generic undefined type
22:43 ruoso ah.. ok.. Undef is simply anything that returns false to "defined"
22:43 xeridon left #perl6
22:43 [particle] s/putter/mncharity/
22:43 TimToady was doing that already
22:44 pugs_svn r19820 | putter++ | src/perl6/STD_extract: Additional constructs recognized (feature complete?).  Command-line controlled output.  Todo and questions.
22:44 TimToady still scarce
22:45 TimToady sure looks to me like he's reinventing cheat/metholate
22:45 vainguard joined #perl6
22:45 TimToady maybe it needs to be reinvented, but still...
22:46 TimToady maybe I'm just irritated because I can no longer type "vi S<tab>" and get it to complete :)
22:48 Tene TimToady: what if you just press tab extra hard?
22:48 Tene analog sensitivity in a keyboard would have some interesting uses...
22:49 Tene Especially if integrated with an editor and a programming language.  To refer to a global variable, type the name extra hard!
22:50 TimToady well, if the vibrations push down the shift and 8 keys simultaneously, it might just work
22:51 TimToady @seen mncharity
22:51 lambdabot I saw mncharity leaving #perl6 2d 17h 2m 24s ago, and .
22:51 * Tene laughs and gets a funny look from a student.
23:03 ruoso pugs: class Foo { }; my $a = Foo.new(); say $a.HOW() === Foo.HOW()
23:03 exp_evalbot OUTPUT[1␤]
23:04 ruoso pugs: class Foo { }; say Foo.clone().HOW() === Foo.HOW()
23:04 exp_evalbot OUTPUT[*** Pattern match failure in do expression at src/Pugs/Prim.hs:1351:4-14␤    at /tmp/p7DhvUJDth line 1, column 20 - line 2, column 1␤]
23:05 ruoso pugs: class Foo { }; my $a = Foo.clone(); say $a.HOW() === Foo.HOW();
23:05 exp_evalbot OUTPUT[*** Pattern match failure in do expression at src/Pugs/Prim.hs:1351:4-14␤    at /tmp/NhmBGOyUl0 line 1, column 19-35␤]
23:05 kst joined #perl6
23:06 ruoso pugs: class Foo { }; my $a = Foo.clone; say $a.HOW() === Foo.HOW();
23:06 exp_evalbot OUTPUT[*** Pattern match failure in do expression at src/Pugs/Prim.hs:1351:4-14␤    at /tmp/aiSBJyXUvw line 1, column 19-33␤]
23:06 ruoso pugs: class Foo { }; my $a = Foo; my $b = $a.clone(); say $b.HOW() === Foo.HOW();
23:06 exp_evalbot OUTPUT[*** Pattern match failure in do expression at src/Pugs/Prim.hs:1351:4-14␤    at /tmp/oIMBXyhu2n line 1, column 32-47␤]
23:07 TimToady I don't believe pugs implements .clone, nor does it really quite implement .HOW
23:07 ruoso hmmm...
23:08 ruoso but do you think the way I'm going is sane?
23:08 mattz_ joined #perl6
23:10 ruoso if Foo.clone().HOW() !=== Foo.HOW(), then I can use it as a way to boot new classes
23:13 TimToady well, merely saying class {} ought to get you an anonymous class derived from Object
23:14 TimToady but puts doesn't do that
23:14 TimToady *pugs
23:14 ruoso sure... but again... I'm using p6 syntax here just for simplicity...
23:14 Limbic_Region pugs does an extraordinary amount considering it hasn't really been maintained for over a year
23:14 ruoso I'm talking about the runtime... or better... which code will be executed for "class { }"
23:17 TimToady I don't have an opinion on the subject, as long as it ends up with an anonymous class derived from Object
23:17 ruoso heh
23:19 marmic joined #perl6
23:20 silug_ joined #perl6
23:25 Limbic_Region TimToady - are you following rakudo much?
23:25 TimToady pretty much
23:26 silug joined #perl6
23:27 Limbic_Region have any feel for how much is implemented compared to pugs?
23:27 Limbic_Region seems like many features that get implemented don't equate to more passing tests with spectest
23:27 ruoso rakudo: class Foo { }; my $a = Foo.clone; say $a.HOW() === Foo.HOW();
23:27 exp_evalbot OUTPUT[Method 'clone' not found for invocant of class ''␤current instr.: '_block10' pc 9 (EVAL_9:8)␤called from Sub 'parrot;PCT::HLLCompiler;eval' pc 789 (src/PCT/HLLCompiler.pir:459)␤called from Sub 'parrot;PCT::HLLCompiler;evalfiles' pc 1059 (src/PCT/HLLCompiler.pir:585)␤called from Sub
23:27 exp_evalbot ..'parrot;PCT::HLLCompiler;command_line' pc 1242 (src/PCT/H...
23:27 TimToady we've only ported over a smattering of tests so far
23:28 TimToady and I doubt they're always the simple ones :)
23:28 Limbic_Region right
23:28 Limbic_Region which is why it is difficult for me to judge
23:28 Limbic_Region since I am not following
23:28 Limbic_Region source that is
23:28 ruoso kp6: class Foo { }; my $a = Foo.clone; say $a.HOW() === Foo.HOW();
23:28 exp_evalbot r19820: OUTPUT[syntax error at position 47, line 1 column 47:␤class Foo { }; my $a = Foo.clone; say $a.HOW() === Foo.HOW()␤                                               ^ HERE␤]
23:28 moritz_ I think it's far from pugs' feature completeness
23:29 ruoso kp6: my $a = Object.clone; say $a.HOW() === Foo.HOW();
23:29 exp_evalbot r19820: OUTPUT[syntax error at position 35, line 1 column 35:␤my $a = Object.clone; say $a.HOW() === Foo.HOW()␤                                   ^ HERE␤]
23:29 TimToady It's probably closer to having a fast compiler, and the parts associated with that, but the rest isn't there yet
23:29 TimToady on the other hand, they're implementing something close to MO
23:30 vainguard joined #perl6
23:32 TimToady it remains to be seen whether the subsurface structure is solid or rotten to support the superstructure...
23:32 jnthn TimToady: If you've an object and you stringify it, is there some default method that's called to get the string representation that you define in your class, and what should the default stringification of an object me?
23:32 Limbic_Region . o O ( .perl ? )
23:32 jnthn Or if I've missed the appropriate bit of the synonypis, just point me at it...
23:33 jnthn s/me/be/
23:34 TimToady see S13:212
23:34 moritz_ .perl is the equivalent to Data::Dumper
23:34 TimToady method Str is export {...}
23:34 Limbic_Region moritz_ - let's hope not
23:35 Limbic_Region moritz_ - more like, .perl is like Data::Dump::Streamer only better ;-)
23:35 moritz_ Limbic_Region: not in the litereal sense ;)
23:35 moritz_ pugs: my $a = sub { }; say $a.perl
23:35 exp_evalbot OUTPUT[\sub :(@_) "$_" := "Scalar" #<Scalar:0xb7b1c380>␤          "@_" := "Array" #<Array:0xb7b1c378>␤          "&?ROUTINE" := "Sub" #<Sub:0xb6604df4>␤          "&?BLOCK" := "Sub" #<Sub:0xb6604df4> {"$_" := "Scalar" #<Scalar:0xb7270e78>␤                                                "@_" :=
23:35 exp_evalbot .."Array" #<Array:0xb72d245c>␤                          ...
23:36 jnthn TimToady: Thanks.
23:36 TimToady kp6: my $a = sub { }; say $a.perl
23:36 exp_evalbot r19820: OUTPUT[{ ... }␤]
23:37 TimToady hmm, that's kind of a misuse of ... there
23:37 ruoso http://www.perlfoundation.org/perl6/index.cgi?smop_p6opaque_implementation -- first sketches...
23:38 vainguard joined #perl6
23:38 pugs_svn r19821 | putter++ | src/perl6/STD_extract: a minor start at regex pattern analysis.
23:40 ruoso any review on the above sketches are very much welcome
23:51 rakudo_svn r25542 | jonathan++ | [rakudo] Tweaks to inheritance so now we can inherit from Bool, etc.
23:52 pugs_svn r19822 | lwall++ | [STD_extract] query to putter who is ignoring #perl6 :)
23:59 kst joined #perl6
23:59 sahadev left #perl6

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

Perl 6 | Reference Documentation | Rakudo