Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2008-06-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:00 Auzon pugs: say ('foo',).join(',');
00:00 exp_evalbot OUTPUT[foo␤]
00:00 pmichaud Auzon:  what line number?
00:00 bacek_ pugs: say sort
00:00 exp_evalbot OUTPUT[*** No compatible multi variant found: "&sort"␤    at /tmp/jEeIhA8Dm9 line 1, column 5 - line 2, column 1␤]
00:00 Auzon pmichaud: Not sure, since I don't know where S29 actually lives as a POD
00:01 pmichaud the only 'join' I could find as a method is
00:01 pmichaud our Str multi method join ( $separator: @values )
00:01 bacek_ pmichaud: 'sort' shouldnt work without arguments :)
00:01 pmichaud and if $separator is the invocant, I'm pretty sure it's not a List.
00:01 Auzon pmichaud: That's in the List section. So you're right. :)
00:01 Auzon Err, rather, that's the one I was referring to
00:02 Auzon But I didn't look at the type.
00:02 pmichaud I didn't look at the section.  :-)
00:02 TimToady pugs: class Object is also { method join ($x) { (self,).join($x) } }; say 'foo'.join(',')
00:02 exp_evalbot OUTPUT[*** ␤    Circular class inheritance detected for class 'Object'␤    at /tmp/o3eBxcnZxM line 1, column 23␤]
00:02 TimToady pugs: class Object is also { method join ($x) { [self].join($x) } }; say 'foo'.join(',')
00:02 exp_evalbot OUTPUT[*** ␤    Circular class inheritance detected for class 'Object'␤    at /tmp/aOYFbjBNRc line 1, column 23␤]
00:03 TimToady pugs: class Any is also { method join ($x) { [self].join($x) } }; say 'foo'.join(',')
00:03 TimToady yipee!!
00:03 Auzon Where is S29.pod live as a POD? I don't see it in the Pugs repo or the other syn one I checked out
00:04 pmichaud it's not S29.pod
00:04 pmichaud docs/Perl6/Spec/Functions.pod in the pugs repo
00:04 TimToady it's Functions.pd
00:04 TimToady *pod
00:04 Auzon Alright.
00:04 TimToady pugs: say 42
00:05 pmichaud TimToady: I think you infinite looped pugs.
00:05 Auzon sheesh, you broke it
00:05 TimToady maybe I took NL off the power grid by redefining Any...
00:05 pmichaud I think that [self].join($x)  might look self-referential.
00:05 pmichaud er, recursive, even.
00:06 TimToady should just end up calling Array.join
00:06 Auzon pugs: say 42
00:06 TimToady I think I took down the power grid...
00:06 Auzon I'm logged into the server, so nothing too bad happened... ;)
00:07 TimToady probably running on an emergency generator :)
00:07 Auzon evalbot hung, I think.
00:08 exp_evalbot joined #perl6
00:09 Auzon pugs: say 42;
00:09 exp_evalbot OUTPUT[42␤]
00:10 Auzon Well, it appears to be working again.
00:11 sscaffidi joined #perl6
00:17 TimToady why would tormenting pugs hang the evalbot?
00:26 rakudo_svn r28079 | pmichaud++ | [rakudo]:
00:26 rakudo_svn r28079 | pmichaud++ | * Further "fix" to List class to get spectest_regression passing again.
00:26 rakudo_svn r28079 | pmichaud++ |   The real fix will have to wait for improvements to Parrot's MMD.
00:48 Limbic_Region joined #perl6
01:11 wknight8111 left #perl6
01:11 wknight8111 joined #perl6
01:13 stevan_ TimToady: re: parameterized roles
01:13 stevan_ we have faked them a little before
01:14 stevan_ MooseX::Storage does it with the Storage function which takes some args and returns a list of roles
01:14 stevan_ so you can do
01:14 stevan_ with Storage(io => 'AtomicFile', format => 'JSON');
01:14 stevan_ that uses the MooseX::Storage::Format::JSON and MooseX::Storage::IO::AtomicFile, etcetc
01:15 stevan_ there is no hooks available yet for the role application process though, so its limited in what it can do
01:15 stevan_ people have asked for hooks, but no one has a real use case yet so I am currently punting
01:16 stevan_ so if you have a more specific use case then i am all ears :)
01:17 stevan_ I think really I need to define the limits of parameterized roles then I can work out how it could be implemented
01:17 stevan_ full generics would be ... tricky
01:17 stevan_ but something close to that could be doable I think
01:21 mj41__ joined #perl6
01:28 Alias_ joined #perl6
01:34 felipe joined #perl6
01:39 alanhaggai joined #perl6
01:41 penk joined #perl6
01:57 Auzon pugs: say join(':', 'foo'); # yes, this again.
01:57 exp_evalbot OUTPUT[foo␤]
02:00 Auzon pugs: say join(':', 'foo',); # yes, this again.
02:00 exp_evalbot OUTPUT[foo␤]
02:01 lichtkind joined #perl6
02:01 lichtkind $hashref = % 1..3 Z 'a'..'c';
02:01 lichtkind pugs: $hashref = % 1..3 Z 'a'..'c';
02:01 exp_evalbot OUTPUT[*** ␤    Unexpected " ="␤    expecting "::"␤    Variable "$hashref" requires predeclaration or explicit package name␤    at /tmp/xagIRxhmYu line 1, column 9␤]
02:02 lichtkind pugs: $hashref = % (1..3) Z ( 'a'..'c');
02:02 exp_evalbot OUTPUT[*** ␤    Unexpected " ="␤    expecting "::"␤    Variable "$hashref" requires predeclaration or explicit package name␤    at /tmp/IRVquNCEt5 line 1, column 9␤]
02:02 lichtkind pugs: my $hashref = % (1..3) Z ( 'a'..'c');
02:02 exp_evalbot OUTPUT[*** ␤    Unexpected "$hashref"␤    expecting "=", "::", context, ":" or "("␤    at /tmp/oAHk0hCQm9 line 1, column 4␤]
02:02 lichtkind pugs: my $hashref = %( (1..3) Z ( 'a'..'c') );
02:02 Auzon I don't think that was ever implemented.
02:02 exp_evalbot RESULT[{("1" => "a"), ("2" => "b"), ("3" => "c")}]
02:02 Auzon and it proves me wrong. :-/
02:02 lichtkind :)
02:03 lichtkind goo night
02:03 lichtkind pugs: my $hashref = %( 1..3  Z  'a'..'c' );
02:03 exp_evalbot RESULT[{("1" => "a"), ("2" => "b"), ("3" => "c")}]
02:05 lichtkind Auzon: i mean i really go sleep now :)
02:11 pjcj joined #perl6
02:11 Lunchy joined #perl6
02:11 dazjorz joined #perl6
02:11 Helios- joined #perl6
02:11 ilogger2 joined #perl6
02:11 baest joined #perl6
02:17 pugs_svnbot r20660 | Auzon++ | [gsoc_spectest] Changed tests for "foo".join() to make more sense. Also tested the default separator. (added 2 tests, changed 1)
02:21 lichtkind joined #perl6
02:23 lichtkind pugs: %buch = %( 1..3 Z 'a'..'c' );
02:23 exp_evalbot OUTPUT[*** ␤    Unexpected " ="␤    expecting "::"␤    Variable "%buch" requires predeclaration or explicit package name␤    at /tmp/bPml1xsyMj line 1, column 6␤]
02:26 pmichaud Auzon: so, are the tests following what S29 says, or do we need to update S29 to match the tests, or ... ?
02:27 Auzon The best thing would be to clarify the behavior of "foo".join, as well as the type given in the code example
02:29 Auzon TimToady++ agreed that "foo".join(':') shouldn't be any different from join(':', "foo"), and ("foo").join(':') shouldn't be different than ("foo",).join(':')
02:29 pmichaud what about   'foo'.join(@array)  ?
02:30 TimToady probably fails from too many arguments
02:30 pmichaud okay.  So S29 is probably wrong there.
02:30 pmichaud our Str multi method join ( $separator: @values )    should be    our Str multi method join ( @values : $separator = ' ' )
02:31 pmichaud are we still doing the "liberal edit" policy to S29?
02:32 TimToady yes
02:32 pmichaud does anyone review the edits?  more to the point, is there a way to get svn diffs via email the way that parrot's svn does?
02:34 TimToady what is this "email" thing of which you speak? :)
02:34 pmichaud it's a very handy mechanism for reviewing svn diffs.  Almost as good as Atom or RSS feeds :-)
02:35 pmichaud Okay, I'll start taking liberties with S29 then :-)
02:36 Auzon perl6: "foo".map({$_ ~ $_})
02:36 exp_evalbot kp6 r20660: OUTPUT[no method 'map' in Class 'Str'␤ at compiled/perl5-kp6-mp6/lib/KindaPerl6/Runtime/Perl5/MOP.pm line 345␤        KindaPerl6::Runtime::Perl5::MOP::__ANON__('HASH(0x8e4d93c)', 'map', 'HASH(0x8e51f4c)') called at compiled/perl5-kp6-mp6/lib/KindaPerl6/Runtime/Perl5/MOP.pm line 169␤
02:36 exp_evalbot ..main::DISPATCH('HASH(0x8e4d93c)', 'map', 'HASH(0x8e51f4c)') called at ...
02:36 exp_evalbot ..pugs: RESULT[("foofoo",)]
02:36 exp_evalbot ..rakudo r28079: OUTPUT[Method 'map' not found for invocant of class 'Perl6Str'␤current instr.: '_block11' pc 45 (EVAL_11:22)␤
02:36 exp_evalbot ..elf r20660: OUTPUT[Use of uninitialized value in concatenation (.) or string at (eval 14) line 3.␤Use of uninitialized value in concatenation (.) or string at (eval 14) line 3.␤Can't locate object method "map" via package "foo" (perhaps you forgot to load "foo"?) at (eval 14) line 3.␤ at
02:36 exp_evalbot .../elf_f_faster line 4492␤]
02:37 TimToady perl6: "foo".map: {$_ ~ $_}
02:37 exp_evalbot kp6 r20660: OUTPUT[no method 'map' in Class 'Str'␤ at compiled/perl5-kp6-mp6/lib/KindaPerl6/Runtime/Perl5/MOP.pm line 345␤        KindaPerl6::Runtime::Perl5::MOP::__ANON__('HASH(0x8e4d93c)', 'map', 'HASH(0x8e51f4c)') called at compiled/perl5-kp6-mp6/lib/KindaPerl6/Runtime/Perl5/MOP.pm line 169␤
02:37 exp_evalbot ..main::DISPATCH('HASH(0x8e4d93c)', 'map', 'HASH(0x8e51f4c)') called at ...
02:37 exp_evalbot ..pugs: RESULT[("foofoo",)]
02:37 exp_evalbot ..rakudo r28079: OUTPUT[Method 'map' not found for invocant of class 'Perl6Str'␤current instr.: '_block11' pc 45 (EVAL_12:22)␤
02:37 exp_evalbot ..elf r20660: OUTPUT[Can't locate object method "map" via package "foo" (perhaps you forgot to load "foo"?) at (eval 14) line 3.␤ at ./elf_f_faster line 4492␤]
02:37 pmichaud so, we're doing map/join/grep/etc.  on non-list values?
02:37 TimToady some of them seem to coerce to list/array, and some don't
02:38 pmichaud which do, which don't?  ;-)
02:38 TimToady what I was saying earlier is that we should be more consistent
02:38 TimToady and make Object do the "default" coercion
02:38 pmichaud I'd agree with that.  Feels slippery-slope-ish though.
02:38 TimToady much like default + coerces
02:38 pmichaud for example,   'foo'.sort   ?
02:39 TimToady as long as the defaults are out in Object or Any or some such, any subclass can override
02:41 TimToady so just as the default is infix:<+> (Any $x, Any $y) { Num($x) + Num($y) } or some such
02:41 Auzon Can we easily coerce from a Str or Num to a List?
02:41 TimToady likewise method join etc in Object can just coerce to list/array or whatever, depending on what people will expect
02:41 TimToady @("foo")
02:41 lambdabot Unknown command, try @list
02:42 pmichaud okay.  it sounds a little like "arbitrary list", though.
02:42 pmichaud i.e., join coerces, but some other method might not
02:43 TimToady it really depends on whether the language as a whole is "claiming" the name for a consistent meaning
02:44 TimToady just as it has claimed + for numeric additoin
02:44 TimToady join should combine pieces, and any individual piece should consider itself a degenerate case
02:44 TimToady sorting one element is not very interesting either :)
02:45 pmichaud how about .kv, .keys, .values, .pairs?
02:46 TimToady $x means 0 => $x as a key/value pair, maybe
02:47 Auzon or $x => 1?
02:47 Auzon or $x => undef
02:47 TimToady assuming $x-as-a-list means [$x] or some such
02:48 TimToady Auzon: your view would be more useful for hash coercions, where sets are considered keys of hashes
02:48 Auzon hm, but if we do that, then odd-element lists to a hash would be legal. Right?
02:50 TimToady only if we automatically coerce each element in the list, which I don't think we are
02:51 Auzon perl6: hash($x)
02:51 rakudo_svn r28082 | pmichaud++ | [rakudo]:
02:51 rakudo_svn r28082 | pmichaud++ | * In List.pir. change C<iter = new 'Iterator', self> to
02:51 rakudo_svn r28082 | pmichaud++ |   C<iter = self.'iterator'()>
02:51 rakudo_svn r28082 | pmichaud++ | * bacek++
02:51 exp_evalbot kp6 r20660: 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(0x824bd4c)', 'APPLY', 'HASH(0x8e520ac)') called at compiled/perl5-kp6-mp6/lib/KindaPerl6/Runtime/Perl5/MOP.pm line 169␤
02:51 exp_evalbot ..main::DISPATCH('HASH(0x824bd4c)', 'APPLY', 'HASH(0x8e520ac)') ca...
02:51 exp_evalbot ..pugs: OUTPUT[*** ␤    Unexpected ")"␤    expecting "::"␤    Variable "$x" requires predeclaration or explicit package name␤    at /tmp/BX08TQpM3u line 1, column 8␤]
02:51 exp_evalbot ..rakudo r28081: OUTPUT[Scope  not found for PAST::Var '$x'␤current instr.: 'parrot;PCT::HLLCompiler;panic' pc 156 (src/PCT/HLLCompiler.pir:103)␤
02:51 exp_evalbot ..elf r20660: OUTPUT[Global symbol "$x" requires explicit package name at (eval 14) line 3.␤ at ./elf_f_faster line 4492␤]
02:51 Auzon oops. That wasn't useful at all.
02:51 Auzon perl6: my $x = 1; say hash($x).perl;
02:51 exp_evalbot kp6 r20660: 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(0x824be5c)', 'APPLY', 'HASH(0x8e4ee20)') called at compiled/perl5-kp6-mp6/lib/KindaPerl6/Runtime/Perl5/MOP.pm line 169␤
02:51 exp_evalbot ..main::DISPATCH('HASH(0x824be5c)', 'APPLY', 'HASH(0x8e4ee20)') ca...
02:51 exp_evalbot ..pugs: OUTPUT[*** Odd number of elements found where hash expected: VList [VInt 1]␤    at /tmp/I2UehCfPlC line 1, column 16-29␤]
02:51 exp_evalbot ..rakudo r28081: OUTPUT[{"1" => {}}␤]
02:51 exp_evalbot ..elf r20660: OUTPUT[Undefined subroutine &GLOBAL::hash called at (eval 14) line 4.␤ at ./elf_f_faster line 4492␤]
02:52 pmichaud hrm, what happened with rakudo there?
02:53 Auzon :-/ It's hard to tell where to say that "this is a one element list" and "this is a scalar"
02:53 Auzon e.g. $x versus ($x) versus ($x,)
02:53 TimToady only the last is a list by nature
02:54 pmichaud $x and ($x) are the same.
02:54 Auzon It also seems like the function calls are more forgiving of this distinction than the OO versus
02:55 Auzon s:last/versus/version/
02:57 Maghnus joined #perl6
03:17 ting joined #perl6
03:17 eternaleye joined #perl6
03:33 araujo joined #perl6
04:33 Khisanth it's been said that everything in Perl was stolen from some other language, so where did it steal contexts from? :)
04:34 araujo Haskell
04:34 * araujo hides
04:35 Khisanth I would imagine Perl would be a lot different if it had been stealing stuff from Haskell for that long :)
04:47 Auzon pugs: my $foo = <abc>; say $foo.WHAT
04:47 exp_evalbot OUTPUT[Str␤]
04:47 Auzon pugs: my $foo = <abc def>; say $foo.WHAT
04:47 exp_evalbot OUTPUT[Array␤]
04:47 Auzon I was afraid of that
04:51 Auzon pugs: my @foo = <abc>; my @bar = <abc def>; say @foo.WHAT; say @bar.WHAT;
04:51 exp_evalbot OUTPUT[Array␤Array␤]
05:42 drbean joined #perl6
05:44 alanhaggai joined #perl6
05:45 alc joined #perl6
05:53 hcchien joined #perl6
05:58 alanhaggai joined #perl6
06:08 meppl joined #perl6
06:13 alanhaggai_ joined #perl6
06:48 alanhaggai joined #perl6
07:08 elmex joined #perl6
07:17 jan_ joined #perl6
07:30 sri_work joined #perl6
07:46 masak joined #perl6
07:51 Ched- joined #perl6
07:56 iblechbot joined #perl6
08:05 IngoLover joined #perl6
08:14 IngoLieber joined #perl6
08:16 IngoLieber joined #perl6
08:18 IngoLiebe joined #perl6
08:18 Benni` joined #perl6
08:19 IngoLieber joined #perl6
08:21 cosimo joined #perl6
08:24 clli joined #perl6
08:27 ruoso joined #perl6
08:32 Minthe joined #perl6
08:35 Minthe How do you do?
08:35 Minthe Excuse me, but do you mind if I ask a question about Pugs?
08:37 moritz_ we don't mind, unless it's about building current pugs
08:37 moritz_ which is known not to work
08:37 Minthe Oh
08:37 Minthe Ah...
08:37 moritz_ pugs: say $?PUGS_VERSION
08:37 exp_evalbot OUTPUT[Perl6 User's Golfing System, version 6.2.13, October 17, 2006 (r18093)␤]
08:37 masak actually, we don't _mind_ those questions either :)
08:37 Minthe So until today I was searching how to fix Invalid grammatical category: "Bool"
08:37 masak yes
08:38 masak best is to revert to a known working version, I think
08:38 moritz_ that's about the last version that's known to build with ghc 6.6.1
08:38 Minthe Today I found this site: http://www.nntp.perl.org/group/perl.perl6.compiler/2008/06/msg1876.html
08:38 lambdabot Title: building pugs under Fedora 9 doesn't work - nntp.perl.org, http://tinyurl.com/5oj5mp
08:38 Minthe I'm using Debian ghc 6.8.2-5
08:38 Minthe But I think the issue is the same...
08:39 moritz_ yes
08:39 Minthe So could you tell me what is the latest working revision?
08:39 moritz_ around r18093, with ghc 6.6.1
08:39 moritz_ http://moritz.faui2k3.org/debian/pugs/ # debian packages
08:39 lambdabot Title: Index of /debian/pugs
08:39 moritz_ not very good, but they work for me
08:39 ruoso pmichaud, for 'foo'.join(';') to work, join must be: our Str multi sub join ($string, @elements) is export {...}
08:40 ruoso because join won't be found in Str, then it will fallback to sub-dispatch
08:40 Minthe I successfully compiled cpan stable, but it is too old.
08:40 pmurias joined #perl6
08:42 ruoso pmichaud, I don't think Str will ever be the invocant of "join", unless of course we add the method 'join' on Str instead of Array
08:42 ruoso which might make sense, but it probably doesn't... falling back to sub-dispatch solves the problem just fine...
08:44 Minthe Excuse me, but why http://moritz.faui2k3.org/debian/pugs/r19915/ is 6.2.12? CPAN stable version shows 6.2.13...
08:44 lambdabot Title: Index of /debian/pugs/r19915
08:44 moritz_ Minthe: probably because I used the wrong version string
08:44 moritz_ Minthe: it was one of the first debian packages I built, and I'm not very good at it ;)
08:45 Minthe So if I install pugs_6.2.12-2_i386.deb, pugs -v will show 6.2.13?
08:47 moritz_ I think it does for me, yes
08:47 ruoso now an interesting question... if some method is multi, is it possible to have 'sub' alternatives?
08:47 Minthe Moritz: Thank you. Then I'll install it...
08:49 ruoso perl6: class Foo { our multi method bar (Str $a) { say '1' }; our multi sub bar (Foo $c, Int $a) { say '2'}}; Foo.new.bar('a'); Foo.new.bar(1);
08:49 pugs_svnbot r20661 | moritz++ | bumped version in debian/changelog, Minthe++ for reporting
08:49 exp_evalbot kp6 r20660: OUTPUT[no method 'add_variant' in Class ''␤ at compiled/perl5-kp6-mp6/lib/KindaPerl6/Runtime/Perl5/MOP.pm line 345␤   KindaPerl6::Runtime::Perl5::MOP::__ANON__('HASH(0x8e549e8)', 'add_variant', 'HASH(0x8e57508)') called at compiled/perl5-kp6-mp6/lib/KindaPerl6/Runtime/Perl5/MOP.pm line
08:49 exp_evalbot ..169␤     main::DISPATCH('HASH(0x8e549e8)', 'add_variant', 'HASH(0x...
08:49 exp_evalbot ..pugs: OUTPUT[2␤2␤]
08:49 exp_evalbot ..rakudo r28084: OUTPUT[Could not find non-existent sub our␤current instr.: 'parrot;Foo;_block22' pc 125 (EVAL_12:53)␤
08:49 exp_evalbot ..elf r20660: OUTPUT[1␤2␤]
08:49 ruoso wow... elf gets it right :)
08:50 moritz_ and rakudo parses 'our' as a sub - ouch
08:52 ruoso elf: class Foo { our method method bar (Str $a) { say '1' }; our multi sub bar (Str $a, Foo $b) is export { say '2'}}; my $b = Foo.new; $b.bar('a'); 'a'.bar($b);
08:52 exp_evalbot OUTPUT[syntax error at (eval 14) line 5, near "(sub bar"␤syntax error at (eval 14) line 6, near "))"␤syntax error at (eval 14) line 9, near "})␤"␤ at ./elf_f_faster line 4492␤]
08:53 ruoso elf: class Foo { our multi method bar (Str $a) { say '1' }; our multi sub bar (Str $a, Foo $b) is export { say '2'}}; my $b = Foo.new; $b.bar('a'); 'a'.bar($b);
08:53 exp_evalbot OUTPUT[Can't locate object method "bar" via package "a" (perhaps you forgot to load "a"?) at (eval 14) line 13.␤ at ./elf_f_faster line 4492␤1␤]
08:53 ruoso elf: class Foo { our multi method bar (Str $a) { say '1' }; our multi sub bar (Str $a, Foo $b) is export { say '2'}}; my $b = Foo.new; $b.bar('a'); "a".bar($b);
08:53 exp_evalbot OUTPUT[Can't locate object method "bar" via package "a" (perhaps you forgot to load "a"?) at (eval 14) line 13.␤ at ./elf_f_faster line 4492␤1␤]
08:53 ruoso uh?
08:53 ruoso elf: class Foo { our multi method bar (Str $a) { say '1' }; our multi sub bar (Str $a, Foo $b) is export { say '2'}}; my $b = Foo.new; my $c = 'a'; $b.bar($c); $c.bar($b);
08:53 exp_evalbot OUTPUT[Can't locate object method "bar" via package "a" (perhaps you forgot to load "a"?) at (eval 14) line 14.␤ at ./elf_f_faster line 4492␤1␤]
08:54 moritz_ it tires to treat 'a' as a package?
08:54 moritz_ *tries
08:54 ruoso elf: class Foo { our multi method bar (Str $a) { say '1' }; our multi sub bar (Str $a, Foo $b) is export { say '2'}}; my $b = Foo.new; my $c = Str.new("abc"); $b.bar($c); $c.bar($b);
08:54 exp_evalbot OUTPUT[Odd number of elements in anonymous hash at ./elf_f_faster line 19.␤No viable candidate for call to multimethod bar(Foo,Str) at (eval 14) line 13␤ at ./elf_f_faster line 4492␤]
08:54 ruoso elf: class Foo { our multi method bar (Str $a) { say '1' }; our multi sub bar is export (Str $a, Foo $b) { say '2'}}; my $b = Foo.new; my $c = Str.new("abc"); $b.bar($c); $c.bar($b);
08:54 exp_evalbot OUTPUT[Parse error in: /tmp/EsU7LFUFXo␤panic at line 1 column 55 (pos 55): Missing right brace␤WHERE: hod bar (Str $a) { say '1' }; our multi sub bar is export (S␤WHERE:                              /\<-- HERE␤  STD_red/prelude.rb:98:in `panic'␤  STD_red/std.rb:255:in `_block_rest'␤
08:54 exp_evalbot ..STD_red/std.rb:242:in `block in block'␤  STD_red/prelude.rb:51...
08:54 ruoso elf: class Foo { our multi method bar (Str $a) { say '1' }; our multi sub bar (Str $a, Foo $b) is export { say '2'}}; my $b = Foo.new; my $c = Str.new("abc"); $b.bar($c); $c.bar($b);
08:54 exp_evalbot OUTPUT[Odd number of elements in anonymous hash at ./elf_f_faster line 19.␤No viable candidate for call to multimethod bar(Foo,Str) at (eval 14) line 13␤ at ./elf_f_faster line 4492␤]
08:55 ruoso uh?
08:55 ruoso pugs: class Foo { our multi method bar (Str $a) { say '1' }; our multi sub bar (Str $a, Foo $b) is export { say '2'}}; my $b = Foo.new; my $c = Str.new("abc"); $b.bar($c); $c.bar($b);
08:55 exp_evalbot OUTPUT[*** Must only use named arguments to new() constructor␤    Be sure to use bareword keys.␤    at /tmp/PEEdbMZrbA line 1, column 134-153␤]
08:55 ruoso pugs: class Foo { our multi method bar (Str $a) { say '1' }; our multi sub bar (Str $a, Foo $b) is export { say '2'}}; my $b = Foo.new(); my $c = Str.new("abc"); $b.bar($c); $c.bar($b);
08:55 exp_evalbot OUTPUT[*** Must only use named arguments to new() constructor␤    Be sure to use bareword keys.␤    at /tmp/ShVoZIJNGy line 1, column 136-155␤]
08:56 ruoso pugs: class Foo { our multi method bar (Str $a) { say '1' }; our multi sub bar (Str $a, Foo $b) is export { say '2'}}; my $b = Foo.new(); my $c = "abc"; $b.bar($c); $c.bar($b);
08:56 exp_evalbot OUTPUT[2␤*** No such method in class Str: "&bar"␤    at /tmp/YZf6UrWncX line 1, column 160-170␤]
08:56 Minthe Ah..
08:56 ruoso pugs: class Foo { our multi method bar (Str $a) { say '1' }; };our multi sub bar (Str $a, Foo $b) is export { say '2'}; my $b = Foo.new(); my $c = "abc"; $b.bar($c); $c.bar($b);
08:56 exp_evalbot OUTPUT[1␤2␤]
08:56 ruoso pugs doesn't implement the 'is export' correctly.. but it does the dispatching...
08:57 moritz_ you could try it with multi method *bar
08:57 pugs_svnbot r20662 | moritz++ | util/perl6.vim: add subset type declarator
08:57 moritz_ or something like that
08:58 ruoso pugs: class Foo { our multi method bar (Str $a) { say '1' }; our multi sub *bar (Str $a, Foo $b) { say '2'}}; my $b = Foo.new; my $c = "abc"; $b.bar($c); $c.bar($b);
08:58 exp_evalbot OUTPUT[1␤2␤]
08:58 ruoso coo
08:58 ruoso l
08:58 Minthe Excuse me, but I have an issue.
08:58 Minthe I have perl 5.10, not 5.8
08:58 moritz_ debian testing or unstable ;)
08:59 Minthe So moritz version cannot be used...
08:59 Minthe But I can use self-compiled cpan stable...
08:59 moritz_ Minthe: then your best bet is to install ghc 6.6.1, check out an older version of pugs, and compile it
08:59 Minthe maybe r19915...
08:59 ruoso elf: class Foo { our multi method bar (Str $a) { say '1' }; our multi sub *bar (Str $a, Foo $b) { say '2'}}; my $b = Foo.new; my $c = "abc"; $b.bar($c); $c.bar($b);
09:00 exp_evalbot OUTPUT[Parse error in: /tmp/pkpp4bDUVE␤panic at line 1 column 55 (pos 55): Missing right brace␤WHERE: hod bar (Str $a) { say '1' }; our multi sub *bar (Str $a, Fo␤WHERE:                              /\<-- HERE␤  STD_red/prelude.rb:98:in `panic'␤  STD_red/std.rb:255:in `_block_rest'␤
09:00 exp_evalbot ..STD_red/std.rb:242:in `block in block'␤  STD_red/prelude.rb:51...
09:00 ruoso elf: class Foo { our multi method bar (Str $a) { say '1' }; our multi sub bar (Str $a, Foo $b) is export { say '2'}}; my $b = Foo.new; my $c = "abc"; $b.bar($c); $c.bar($b);
09:00 exp_evalbot OUTPUT[Can't locate object method "bar" via package "abc" (perhaps you forgot to load "abc"?) at (eval 14) line 14.␤ at ./elf_f_faster line 4492␤1␤]
09:00 ruoso elf: class Foo { our multi method bar (Str $a) { say '1' }; our multi sub bar (Str $a, Foo $b) is export { say '2'}}; my $b = Foo.new; my $c = Str.new(); $b.bar($c); $c.bar($b);
09:00 exp_evalbot OUTPUT[No viable candidate for call to multimethod bar(Foo,Str) at (eval 14) line 13␤ at ./elf_f_faster line 4492␤]
09:00 ruoso elf: class Foo { our multi method bar (Str $a) { say '1' }; our multi sub bar (Str $a, Foo $b) is export { say '2'}}; my $b = Foo.new; my $c = Str.new(); $c.bar($b);
09:00 exp_evalbot OUTPUT[Can't locate object method "bar" via package "Str" at (eval 14) line 13.␤ at ./elf_f_faster line 4492␤]
09:01 ruoso elf: class Foo { our multi method bar (Str $a) { say '1' }; }; our multi sub bar (Str $a, Foo $b)  { say '2'}; my $b = Foo.new; my $c = Str.new(); $c.bar($b);
09:01 exp_evalbot OUTPUT[Can't locate object method "bar" via package "Str" at (eval 14) line 13.␤ at ./elf_f_faster line 4492␤]
09:04 ruoso elf: class Foo {  }; our multi sub bar (Str $a, Foo $b)  { say '2'}; my $b = Foo.new; my $c = Str.new(); $c.bar($b);
09:04 exp_evalbot OUTPUT[Can't locate object method "bar" via package "Str" at (eval 14) line 12.␤ at ./elf_f_faster line 4492␤]
09:04 ruoso elf: class Foo {  }; our multi sub bar (Int $a, Foo $b)  { say '2'}; my $b = Foo.new; my $c = 1; $c.bar($b);
09:04 exp_evalbot OUTPUT[Can't call method "bar" without a package or object reference at (eval 14) line 12.␤ at ./elf_f_faster line 4492␤]
09:05 ruoso ok... I don't see why the first one was working...
09:07 ruoso elf: class Foo {  }; class Bar { }; our multi sub baz (Bar $a, Foo $b)  { say '2'}; my $b = Foo.new; my $c = Bar.new; $c.bar($b);
09:07 exp_evalbot OUTPUT[Can't locate object method "bar" via package "Bar" at (eval 14) line 17.␤ at ./elf_f_faster line 4492␤]
09:07 ruoso elf: class Foo {  }; class Bar { }; our multi sub baz (Bar $a, Foo $b)  { say '2'}; my $b = Foo.new; my $c = Bar.new; $c.baz($b);
09:07 exp_evalbot OUTPUT[Can't locate object method "baz" via package "Bar" at (eval 14) line 17.␤ at ./elf_f_faster line 4492␤]
09:07 ruoso elf: class Foo { our multi sub baz (Bar $a, Foo $b) is export { say '2'}; }; class Bar { };  my $b = Foo.new; my $c = Bar.new; $c.baz($b);
09:07 exp_evalbot OUTPUT[Can't locate object method "baz" via package "Bar" at (eval 14) line 16.␤ at ./elf_f_faster line 4492␤]
09:07 ruoso gah.. forget it
09:09 ruoso so it seems that I can actually have methods and subs with the same name...
09:10 ruoso this leads me back to the Namespace entry has Package, Namespace entry has Class
09:10 ruoso and Class has Package
09:11 ruoso to make the fallback from method-dispatch to sub-dispatch to work...
09:25 luqui joined #perl6
09:25 Minthe How can I get r19961?
09:26 moritz_ svn up -r 19961
09:27 Minthe I used svn co -r 19961 http://svn.pugscode.org/pugs
09:27 lambdabot Title: Revision 20662: /
09:27 Minthe But I got: Setup: pugs-HsSyck.cabal:14: 'Executable' stanza starting with field 'license'
09:27 moritz_ which ghc version?
09:27 Minthe ghc 6.6.1-2
09:28 moritz_ that's weird
09:28 moritz_ did you do 'make realclean' first?
09:29 Minthe I did: rm -rf pugs
09:29 Minthe Is this wrong?
09:30 moritz_ uhm wait, a fresh checkout should work
09:30 moritz_ could you nopaste the full output please?
09:33 Minthe And may I ask which is later, cpan 6.2.13(Oct 2006) or r19961 6.2.12-1?
09:35 moritz_ http://dev.pugscode.org/changeset/19961 is 02/20/08 18:55:35
09:35 lambdabot Title: Changeset 19961 - Pugs - Trac
09:35 * moritz_ doesn't really have clue
09:35 Minthe Oops, I found that cpan 6.2.13 is r14402 in ChangeLog, but why debian/changelog is still 6.2.12-2 in r19961...
09:36 Minthe 6.2.12-1
09:38 moritz_ rakudo: my Int $x = -1; say $x
09:38 exp_evalbot rakudo r28084 OUTPUT[Type mismatch in assignment.␤current instr.: 'parrot;Perl6Object;infix:=' pc 65 (src/gen_builtins.pir:51)␤
09:39 penk left #perl6
09:41 retoy joined #perl6
09:44 jkvd joined #perl6
09:49 rakudo_svn r28085 | jonathan++ | [rakudo] prefix:+ and prefix:- should preserve integer type when done on an integer.
09:50 pmurias ruoso: i don't think elf is the reference implementation for sub/method destinction
09:51 moritz_ rakudo: my Int $x = -2
09:51 exp_evalbot rakudo r28085 RESULT[-2]
09:51 moritz_ jonathan++
09:54 pmurias ruoso: and i guess namespace entry has a protoobject, and metaobject has a Package
09:57 alc joined #perl6
10:03 Minthe Moritz: I'm trying building r19955, which is supported by cabal in ghc6_6.6.1-2
10:06 pugs_svnbot r20663 | moritz++ | [spec] S29-num/int.t
10:06 pugs_svnbot r20663 | moritz++ |  * removed ridculous -0s
10:07 pugs_svnbot r20663 | moritz++ |  * tests that int($something).WHAT is 'Int'
10:09 ruoso pmurias, so Foo::bar() would involve finding the class, asking which package it is in, and then looking up for the sub bar?
10:10 ruoso if the namespace entry has both the package and the class, Foo::bar() would have direct access to the package...
10:13 rakudo_svn r28086 | jonathan++ | [rakudo] Make return value of truncate match that in the specification/comment above.
10:18 pmurias ruoso: the namespace entry can have the package also
10:23 ruoso pmurias, but do you agree on the sub/method thing I said?
10:23 ruoso that there can be subs and methods with the same name
10:23 ruoso and subs are registered in the package
10:23 ruoso therefore it will only be invoked as it fallsback to sub-dispatch
10:24 ruoso and what about submethods? do they live in the package? or in the class?
10:25 ruoso the specs seem to imply that they are just subroutines that might have an invocant....
10:26 ruoso but what happens when someons calls a submethod without an invocant?
10:27 ruoso if they live in the class that wouldn't be possible...
10:28 ruoso but it would require yet another storage facility in the protoobject
10:49 pmurias ruoso: submethods are non-inheritable methods
10:49 pmurias so they should be stored in the metaobject
10:53 pmurias not much should live in the protoobject
10:54 ruoso pmurias, that actually depends on the implementation.. but you think it should not live in the package...
10:55 pmurias it is?
10:56 pmurias what do you mean by it
10:56 pmurias ?
10:56 ruoso pmurias, in SMOP, for instance, the HOW won't have a storage itself...
10:56 ruoso the storage will be in the protoobjects...
10:57 ruoso because it's a prototype-based OO
10:57 ruoso not Class-based OO
10:57 ruoso (for the default implementaitons, I must say)
10:58 ruoso but the definition of it is in the package or not is more important...
10:58 ruoso because it then would moving the submethods out of the class/prototypes
10:58 ruoso and registering then as subroutines in the packages
10:58 ruoso that's a more important distinction
10:59 pmurias is metadata a pointer?
10:59 ruoso in SMOP p6opaque?
10:59 rakudo_svn r28088 | jonathan++ | [rakudo] Make .. construct a Range object. Currently we don't have lazy lists implemented, so we eagerly flatten it into a list whenever it is used in list context (easily possible thanks to recent lists changes), however just using it as an iterator will give the lazy
10:59 rakudo_svn ..semantics. All tests that passed before this change in sanity and spectest_regression still pass.
10:59 pmurias yes
10:59 pmurias i'm looking at http://www.perlfoundation.org/perl6/index.cgi?smop_p6opaque_implementation
10:59 lambdabot Title: SMOP p6opaque Implementation / Perl 6, http://tinyurl.com/2z5spt
10:59 ruoso a ponter to a p6opaque-specific structure... it's not another objcet
11:00 ruoso how is another object, otoh
11:00 ruoso so HOW implements the dispatching logic (inheritance, for intance)
11:00 ruoso but everything is stored in the protoobjectts
11:01 ruoso then HOW could, for instance, be SMOP::C3
11:01 ruoso for most objects
11:02 ruoso perl6: say 1.HOW
11:02 exp_evalbot kp6 r20663: OUTPUT[Int␤]
11:02 exp_evalbot ..pugs: OUTPUT[^Int␤]
11:02 exp_evalbot ..rakudo r28088: OUTPUT[get_string() not implemented in class 'P6metaclass'␤current instr.: 'print' pc 8279 (src/gen_builtins.pir:5635)␤
11:02 exp_evalbot ..elf r20663: OUTPUT[Can't call method "HOW" without a package or object reference at (eval 14) line 3.␤ at ./elf_f_faster line 4492␤]
11:03 ruoso rakudo seems to implement something like SMOP will, while pugs and kp6 have a more Class based approach...
11:03 pmurias ruoso: why are you optimising for prototype oo?
11:03 ruoso I'm not... that's just the default implementation
11:04 ruoso prototype oo  seems more natural in SMOP
11:05 ruoso but it's important to remind that the REPR API is SMOP-specific
11:05 ruoso not that I don't want to promote it to a standard ;0
11:05 ruoso ;)
11:05 ruoso http://www.perlfoundation.org/perl6/index.cgi?smop_oo_api
11:05 lambdabot Title: SMOP OO API / Perl 6
11:06 pmurias got to by a blootooth dongle&
11:08 ruoso pmichaud, that's something I'm very curious about parrot/rakudo... how are you planning to interoperate different object representations? like ... my $o = Object.CREATE(:repr<Glib>);
11:08 ruoso in SMOP I stablished a REPR(esentation) API
11:14 broquaint joined #perl6
11:16 rakudo_svn r28089 | jonathan++ | [rakudo] Implement smart-matching for Range objects.
11:27 pmurias s/by/buy/
11:29 alanhaggai joined #perl6
11:54 rakudo_svn r28090 | jonathan++ | [rakudo] Make where without a block work. This gets us passing the subset-range test.
11:54 ruoso one other question? Who is the responsible of the fallback to sub-dispatching? the HOW? or the interpreter?
11:55 pugs_svnbot r20664 | jnthn++ | [spectest] Un-todo a test that now passes in Rakudo.
11:55 Alias_ joined #perl6
11:59 wknight8111 joined #perl6
11:59 xinming_ joined #perl6
12:25 ispy_ joined #perl6
12:27 pmurias ruoso: i would guess it's implementation dependend
12:27 pmurias ;)
12:27 ruoso pmurias, that could be problematic...
12:28 ruoso because the behaviour could be too much different
12:31 pmurias i would put it in the interpreter
12:31 pmurias as otherwise the metaobject(.HOW) would need to now about lexical pads and such
12:32 ruoso in fact...
12:34 pmurias can i remove v6/yap6, my svk dosn't like it
12:34 ruoso is it still just the placeholder sayint "it's not yap6 anymore"?
12:35 pmurias yes
12:35 moritz_ pmurias: it seems more intuitive to fix svk ;)
12:35 rakudo_svn r28092 | pmichaud++ | [rakudo]:
12:35 rakudo_svn r28092 | pmichaud++ | * Change some :multi(Int) to :multi(Integer), just in case any Parrot
12:35 rakudo_svn r28092 | pmichaud++ |   types leak into our code.
12:35 pmurias moritz_: i hate all things intuitive ;)
12:36 moritz_ pmurias: which is why you code in java instead of perl ;-)
12:36 moritz_ oh, wait ;)
12:37 pmurias moritz_: how did you now about the java? ;)
12:37 ruoso is "our multi name {..}" the same as "our multi sub name {...}"?
12:37 pmurias * know
12:38 moritz_ ruoso: yes
12:38 ruoso hmm... I wasn't aware of that...
12:44 pmurias ruoso: if you have a proto name {...}, our sub name {...} is also equivalent
12:45 rakudo_svn r28093 | jonathan++ | [rakudo] Switch us over to using Mutable for scalars. Passes all sanity and spec tests.
12:50 iblechbot joined #perl6
12:51 ruoso I was thinking about the 'foo'.join(', ') thing
12:52 ruoso if we solve it by adding an additional signature to 'our multi join'
12:52 ruoso we will have to do it to almost every method in array
12:53 ruoso and that doesn't seem very nice...
12:53 pmurias ruoso: what does 'foo'.join(', ') do?
12:53 rakudo_svn r28094 | pmichaud++ | [rakudo]:
12:53 rakudo_svn r28094 | pmichaud++ | * Fix hash() so that it again correctly reports "Odd number of
12:53 rakudo_svn r28094 | pmichaud++ |   elements found where hash expected."
12:54 pmichaud ruoso: that was my concern as well (and the focus of my comments with TimToady)
12:54 ruoso 'foo'.join(',') is the simplification of what ('foo').join(',') means
12:54 pmichaud er,  ['foo'].join(',')
12:55 moritz_ ruoso: 'foo' and ('foo') are the same thing
12:55 pmichaud since ('foo')  is still a Str
12:55 ruoso but (1,2,3).join(',') is valid
12:55 ruoso right?
12:55 pmichaud yes, because (1,2,3) is a List
12:55 pmurias so 'foo.join(',') is 'foo'?
12:55 renormalist joined #perl6
12:55 pmurias so 'foo'.join(',') is 'foo'?
12:55 ruoso so it's expected that (1).join(',') works
12:56 pmichaud pmurias: according to yesterday's discussion, 'foo'.join(',')   is indeed 'foo'
12:56 pmichaud i.e., 'foo' is treated as a 1-element list
12:56 pmichaud same as  'foo'.elems  returns 1
12:56 ruoso yes...
12:56 moritz_ should that work with any $foo, or only with strings?
12:57 ruoso and if to do that we start adding signature variations on the array and hash methods
12:57 ruoso it will be a ugly hack..
12:57 ruoso moritz_, any foo
12:57 moritz_ urgh, that's really ugly
12:57 moritz_ probably DWIM, but still ugly
12:58 pmichaud (it's also coded this way in the test suite.)
12:58 ruoso there should be some cleaner way of solving this...
12:58 ruoso some syntax hint, eventually...
12:59 moritz_ perl6: say <foo>.WHAT
12:59 exp_evalbot kp6 r20664: OUTPUT[Out of memory!␤Out of memory!␤Out of memory!␤Out of memory!␤Out of memory!␤Out of memory!␤Out of memory!␤Out of memory!␤Out of memory!␤Out of memory!␤Out of memory!␤Out of memory!␤Out of memory!␤Out of memory!␤Out of memory!␤Out of memory!␤Out of memory!␤Out of memory!␤Out of
12:59 exp_evalbot ..memory!␤Out of memory!␤Out of memory!␤Out of memory!␤Out of mem...
12:59 exp_evalbot ..pugs: OUTPUT[Str␤]
12:59 exp_evalbot ..rakudo r28094: OUTPUT[Str␤]
12:59 exp_evalbot ..elf r20664: OUTPUT[Array␤]
12:59 moritz_ wtf? ;-)
13:00 ruoso kp6++ that was really funny
13:00 moritz_ indeed ;)
13:01 ruoso maybe there could be an additional fall-back on the method invocation
13:02 ruoso which would be to create a single-element list and call the method there
13:02 moritz_ which then again has a fallback to sub call
13:03 ruoso yes
13:03 ruoso it sounds fat
13:03 ruoso but prettier than dozens signature variations
13:03 moritz_ I think we should avoid allowing "foo".join('bla'), and just be consistent about what returns a list
13:04 ruoso the problem is that ($foo) is not a list initializer
13:04 ruoso ($foo,) is
13:04 moritz_ that'w hat @(foo) and [$foo] and ($foo,) are there for
13:05 moritz_ do we really need yet another?
13:05 Juerd As long as it's not pythonesque "separator".join(list), anything works for me :)
13:05 ruoso yeah... in fact... that would only happen by explicit list initialization of one element using ($foo)
13:06 Juerd moritz_: IIRC [$foo] is not correct here. That would still be a single element list, only now an array.
13:06 moritz_ pugs: say ["foo"].join(',');
13:06 exp_evalbot OUTPUT[foo␤]
13:06 moritz_ Juerd: but you can calll methods on arrays ;)
13:06 ruoso moritz_, the point is that ["foo"] is rw
13:07 ruoso while (1,2,3) is ro
13:07 ruoso pugs: my @a; @a := (1,2,3); @a.push(4); say @a;
13:07 exp_evalbot OUTPUT[*** Can't modify constant item: VUndef␤    at /tmp/a0e7IMRuz3 line 1, column 23-33␤]
13:07 moritz_ ruoso: ok, so there's still @("foo") and ("foo",) remaining
13:07 pugs_svnbot r20665 | diakopter++ | [yap6]
13:07 pugs_svnbot r20665 | diakopter++ | arithmetic evaluation broken;
13:07 pugs_svnbot r20665 | diakopter++ | more syntax recognized; parser output cleaned up
13:07 pugs_svnbot r20665 | diakopter++ | syntax error output still not working.
13:07 Juerd moritz_: Oh, like that.
13:08 Juerd moritz_: For some reason I was back at old join($sep, list) in my mind...
13:09 * diakopter commutes
13:09 ruoso ('foo') could be parsed as 'foo' but ('foo',)
13:09 ruoso pugs: say 'foo' but ('foo',)
13:09 exp_evalbot OUTPUT[*** Cannot cast from VList [VStr "foo"] to Pugs.AST.Internals.VCode (VCode)␤    at Prelude.pm line 541, column 5-16␤]
13:10 moritz_ ruoso: that's quite evil, because it carries a large overhead for ()
13:10 moritz_ ruoso: which are just syntactic elements atm
13:10 ruoso but that would only happen when explicitly ($foo) format is used
13:10 ruoso everything else would not be ambiguos
13:11 moritz_ ruoso: I think you're too much in perl 5 land atm where () create lists ;)
13:11 ruoso moritz_, () create lists in p6 too
13:11 ruoso (1,2,3) is a list
13:12 moritz_ ruoso: no, infix:, creates the list
13:12 ruoso yeah yeah... that's how it's implemented
13:12 moritz_ that's how it's specced
13:12 ruoso but for those reading the code... '(1,2,3)' creates a list
13:13 ruoso so (1) would create a list with one item
13:13 moritz_ in Perl 6 I'd write my @list = 1, 2, 3;
13:13 moritz_ without parenthesis
13:13 ruoso TIMTOWTDI
13:14 ruoso can you 1,.join(',')
13:14 ruoso ?
13:14 ruoso pugs: 1,.join(',')
13:14 moritz_ but you don't need infinetly many ways to do it ;)
13:14 exp_evalbot RESULT[(1, ",")]
13:14 ruoso wow
13:14 moritz_ why would you want to call join on a one-element list?
13:14 rakudo_svn r28095 | jonathan++ | [rakudo] Get is ro, is rw and is copy, with ro being the default, working on parameters to subs. This time, we get just one failure in spectest_regression (on Win32), which is a result of a Parrot GC bug.
13:14 ruoso my $a = (1); $a.join(',')
13:14 moritz_ you'd only do that if the list wasn't literal, but rather the result of some calculation
13:15 ruoso my $a = $something ?? (1) !! (2,3,4) ;
13:15 pmurias my $a = $something ?? 1 !! (2,3,4) ;
13:16 moritz_ my @a = $something ?? 1 || 2, 3, 4;
13:16 ruoso but I mean my $a = $something ?? (1,) !! (2,3,4) ;
13:16 moritz_ hey, sigils exsit for a reason
13:16 pmurias is (1,) illegal?
13:16 ruoso no... but it would be strange for it to be mandatory
13:17 moritz_ pmurias: no
13:17 moritz_ ruoso: not mandatory, only handy if you want to avoid ugly looking stuff
13:17 jan_ joined #perl6
13:17 ruoso moritz_, I understand your point... but I thing DWIM in this case is very much important, since we use lists all the time
13:17 ruoso s/thing/think/
13:18 pmurias but we use ($foo+$bar) * $baz more often
13:19 pmurias one can always use arrays
13:19 ruoso pmurias, that case is not ambiguous
13:19 ruoso you're implying scalar context by using *
13:20 moritz_ ruoso: I still haven't seen a good, pratical example of when we need $foo.list_method, where $foo is actually a literal
13:20 ruoso not $foo, but ($foo)
13:20 ruoso I don't think $foo.list_method to be a good idea also
13:21 moritz_ ok, then give a good example for ($foo).list_method
13:21 pmurias what i meant is that we use () work grouping parts of expressions
13:21 ruoso my $a = $something ?? (1) !! (2,3,4); $a.join(', ');
13:22 moritz_ ruoso: use @a instead
13:22 moritz_ ruoso: that's why I meant
13:22 moritz_ if you want something to hold a list, use that @ sigil
13:22 moritz_ then it will DWYM
13:23 ruoso ok... fair enough...
13:24 pmichaud we don't want (1) to mean "list" because we don't want   ($a + 1) to mean "list".
13:24 ruoso but..
13:24 ruoso pugs: my $a = 'foo'; mt @b = $a;
13:24 exp_evalbot OUTPUT[*** ␤    Unexpected " ="␤    expecting "::"␤    Variable "@b" requires predeclaration or explicit package name␤    at /tmp/fAMjIrnglg line 1, column 21␤]
13:24 ruoso pugs: my $a = 'foo'; my @b = $a;
13:24 exp_evalbot RESULT[["foo",]]
13:25 ruoso ok
13:30 ruoso pugs: say ('foo',).join(',')
13:30 exp_evalbot OUTPUT[foo␤]
13:35 jhorwitz joined #perl6
13:36 ruoso pugs: say (1,2,3).WHAT
13:36 exp_evalbot OUTPUT[Array␤]
13:36 ruoso if it implemented that as a optimized compact storage, would it still return Array on (1,2,3).WHAT?
13:37 ruoso rakudo: say (1,2,3).WHAT
13:37 exp_evalbot rakudo r28095 OUTPUT[List␤]
13:37 ruoso rakudo: say (1,2,3).^does(Array)
13:37 exp_evalbot rakudo r28095 OUTPUT[MMD function __concatenate not found for types (151, -98)␤current instr.: 'parrot;Perl6;Grammar;Actions;_block1538' pc 118951 (src/gen_actions.pir:7304)␤
13:37 rakudo_svn r28096 | pmichaud++ | [rakudo]:
13:37 rakudo_svn r28096 | pmichaud++ | * Remove trailing spaces in Range.pir .
13:37 ruoso pugs: say (1,2,3).^does(Array)
13:37 exp_evalbot OUTPUT[1␤]
13:37 moritz_ ruoso: optimizations may not be visible to the user, and .WHAT is visisble
13:38 ruoso kp6: say (1,2,3).^does(Array)
13:38 exp_evalbot kp6 r20665: OUTPUT[no method 'APPLY' in Class 'List'␤ at compiled/perl5-kp6-mp6/lib/KindaPerl6/Runtime/Perl5/MOP.pm line 345␤     KindaPerl6::Runtime::Perl5::MOP::__ANON__('HASH(0x8e522a8)', 'APPLY') called at compiled/perl5-kp6-mp6/lib/KindaPerl6/Runtime/Perl5/MOP.pm line 169␤
13:38 exp_evalbot ..main::DISPATCH('HASH(0x8e522a8)', 'APPLY') called at - line 11␤]
13:40 ruoso moritz_, you mean it should always return Array?
13:40 ruoso or you mean 'whatever'
13:40 ruoso ?
13:40 moritz_ ruoso: it should return 'List', independently of any internal optimizations
13:41 ruoso hmmm... maybe it should stringify to 'List'...
13:41 ruoso I mean...
13:41 ruoso (1,2,3).WHAT === (1,'asfsd').WHAT should return false
13:41 rakudo_svn r28097 | jonathan++ | [rakudo] ro trait is actually called readonly.
13:42 diakopter moritz_: is the evalbot ulimit'ed
13:42 diakopter yap6 is using 1GB ram currently.  I think there's an unending loop somewhere :)
13:43 diakopter either that or the grammar is degenerate
13:43 hcchien_ joined #perl6
13:43 moritz_ diakopter: it is ulimited
13:43 pmichaud seems to me that (1,2,3).WHAT and (1,'asfsd').WHAT return the protoobject for List
13:44 ruoso pmichaud, but (1,2,3) can be optimized for a compact storage, whereas (1,'absf') can't
13:44 ruoso when it's optimized, does it still returns the same WHAT?
13:45 pmichaud depends on whether that optimization is to be user-space visible or not.
13:45 ruoso heh.. that's my question, actually ;)
13:45 pmichaud I would probably say "not"
13:45 moritz_ I don't think it's allowed to be user visible
13:45 ruoso that will make many things much harde
13:46 ruoso or not...
13:47 ruoso but if it's hidden, how can it be introspected (at some level it needs to be)
13:48 ruoso WHAT is supposed to be the entry point for that introspection...
13:49 pmichaud actually, HOW is for introspection.
13:49 ruoso of the metaclass
13:49 ruoso not the prototype
13:49 ruoso they are different thigns
13:49 pmichaud what kind of introspection are you referring to?
13:50 ruoso I want the find what the object really is
13:51 pmichaud I think that's HOW.
13:52 ruoso for class-based OO
13:53 ruoso not for prototype-based OO
13:53 pmurias can't prototype oo have unique per object HOW's?
13:54 ruoso that's the actual difference between them
13:54 ruoso the HOW on a prototype OO will be probably be something like Class::C3
13:54 ruoso while the prototypes are the things holding the actual definitions
13:55 pmichaud ...the things holding the actual definitions?
13:55 PerlJam ruoso: btw, congrats on the grant
13:55 ruoso PerlJam, thanks ;)
13:56 ruoso pmichaud, yeah... the method object will be stored in the Foo prototype
13:56 ruoso not in the metaclass
13:56 pmurias ruoso: i'm not sure you use the definition correctly
13:57 cj ruoso: are you yas' grantee this year?
13:57 pmurias http://en.wikipedia.org/wiki/Prototype_based_programming
13:58 ruoso cj, yas?
13:58 pmichaud from S12:
13:58 pmichaud MyClass.methods()           # call MyClass's .methods method (error?)
13:58 pmichaud MyClass.HOW.methods()       # get the method list of MyClass
13:59 ruoso "Which of these items are actually part of the .HOW object and which are delegated back to the package and prototype objects is up to the MOP."
13:59 pmichaud note that the list of methods is part of the metaclass, not the protoobject
13:59 pmurias pmichaud: metaobject not metaclass
14:00 pmichaud from S12:
14:00 pmichaud Every class has a HOW function/method that lets you get at the class's metaobject, which lets you get at all the metadata properties for the class (or other metaobject protocol) implementing the objects of the class:
14:00 pmichaud MyClass.methods()           # call MyClass's .methods method (error?) MyClass.HOW.methods()       # get the method list of MyClass
14:00 pmichaud note "or other metaobject protocol"
14:01 ruoso but .HOW does not stablish identity
14:01 ruoso while .WHAT seems to serve for this sole purpose
14:01 pmichaud .WHICH is identity
14:01 ruoso pmichaud, of the object, not of what it is
14:04 pmichaud well, I can see things going either way.  I'll leave the rest up to the language designers.  :-)
14:04 alester joined #perl6
14:04 alanhaggai joined #perl6
14:05 ruoso where did pmurias go? :)
14:11 ruoso @tell pmurias why do you think I'm not using the idea of prototype oo correctly? By reviewing some texts about it, I can fit with pretty much confidence with prototype oo by delegation (which is actually a key to get the repr thing working)
14:11 lambdabot Consider it noted.
14:12 ruoso although It explicitly forbids a defined object to have extra definitions just to avoid that someone accidentally turn Undef into defined
14:12 ruoso but that is basically the only reason
14:36 ruoso hmm... maybe I could make that forbiden just one-way
14:36 ruoso which would be to define a object that have definitions
14:36 pmurias joined #perl6
14:36 ruoso but still allows adding definitions to a defined object
14:37 pmurias ruoso: re where i was, i was rebuilding the kernel
14:37 lambdabot pmurias: You have 1 new message. '/msg lambdabot @messages' to read it.
14:37 ruoso ah... you're not nija enough to replace the kernel without rebooting...  ;) ;)
14:37 ruoso s/nija/ninja/
14:37 ruoso heh
14:42 pmurias re why are you using the definition incorrectly: prototype oo is commonly a language feature not a way of implemenation
14:43 pmurias you don't have classes in prototype oo, and as such the protobject dosn't make sense at all
14:45 ruoso uh?
14:46 ruoso you lost me.... the protoobject doesn't make sense in prototype oo?
14:46 pmurias yes
14:47 ruoso why so? as I said, I'm implementing delegation...
14:48 pmurias the protoobject is a undefined object used to call methods from the class it belongs to, right?
14:48 ruoso the protoobject is the undefined version of this object
14:48 ruoso you can do a lot of things with it, including cloning
14:49 [particle]1 (01:50:08) moritz_: and rakudo parses 'our' as a sub - ouch
14:49 [particle]1 no, that's a parrot error
14:49 moritz_ ok
14:49 pmurias ruoso: protoobjects make sense in prototype oo as a way of briding between class-base oo and prototype oo
14:50 ruoso pmurias, they make sense when you work with delegation...
14:50 ruoso we only made a restriction to avoid a user from defining undef...
14:50 ruoso but otherwise, you would be able to say Object.BUILD
14:50 ruoso and Object would be defined
14:53 pmurias but with prototype oo i could build my object like my $object = $foo.clone();$object.HOW().methods.push(...)
14:53 ruoso and you will be able to do that with SMOP
14:54 ruoso we had set a restriction on that only to avoid defining undef...
14:54 ruoso but I think I'll limit that restriction to defining objects with definitions
14:54 ruoso and not the other way around
14:55 ruoso or maybe even removing that restriction entirely
14:55 pmurias &
14:55 ruoso and let the user shoot a bazooca in his feet by doing Object.BUILD
14:59 rakudo_svn r28101 | jonathan++ | [rakudo] Stub in MutableVAR PMC.
15:11 peepsalot joined #perl6
15:46 sscaffidi joined #perl6
15:48 drbean joined #perl6
15:53 chris2 joined #perl6
16:04 smtms joined #perl6
16:10 meppl joined #perl6
16:23 ruoso pugs: Num ~~ Int
16:23 exp_evalbot RESULT[Bool::False]
16:24 ruoso pugs: 3 ~~ Num
16:24 exp_evalbot RESULT[Bool::True]
16:24 ruoso pugs: 3 ~~ Int
16:24 exp_evalbot RESULT[Bool::True]
16:24 ruoso pugs: Int ~~ Num
16:24 exp_evalbot RESULT[Bool::True]
16:25 apeiron joined #perl6
16:25 ruoso pugs: Num.ACCEPTS(3)
16:25 exp_evalbot OUTPUT[*** No such method in class Num: "&ACCEPTS"␤    at /tmp/YjONsSXSDW line 1, column 1 - line 2, column 1␤]
16:25 ruoso pugs: Num.ACCEPT(3)
16:25 exp_evalbot OUTPUT[*** No such method in class Num: "&ACCEPT"␤    at /tmp/LgJiwAVcDo line 1, column 1 - line 2, column 1␤]
16:26 TJCRI joined #perl6
16:26 ruoso rakudo: Num.ACCEPTS(3)
16:26 exp_evalbot rakudo r28101 RESULT[0]
16:26 ruoso kp6: Num.ACCEPTS(3)
16:26 exp_evalbot kp6 r20665: OUTPUT[no method 'ACCEPTS' in Class 'Num'␤ at compiled/perl5-kp6-mp6/lib/KindaPerl6/Runtime/Perl5/MOP.pm line 345␤    KindaPerl6::Runtime::Perl5::MOP::__ANON__('HASH(0x824b40c)', 'ACCEPTS', 'HASH(0x8e4b988)') called at compiled/perl5-kp6-mp6/lib/KindaPerl6/Runtime/Perl5/MOP.pm line 169␤
16:26 exp_evalbot ..main::DISPATCH('HASH(0x824b40c)', 'ACCEPTS', 'HASH(0x8e4b988)'...
16:26 moritz_ is ACCEPTS a class method?
16:26 moritz_ rakudo: my Num $x; say $x.ACCEPTS(3)
16:26 exp_evalbot rakudo r28101 OUTPUT[0␤]
16:27 ruoso weird
16:27 ruoso rakudo: sub a (Num $a) { 1 }; say a(3);
16:27 exp_evalbot rakudo r28101 OUTPUT[Parameter type check failed␤current instr.: 'die' pc 7955 (src/gen_builtins.pir:5309)␤
16:27 ruoso hmm
16:28 ruoso pugs: sub a (Num $a) { 1 }; say a(3);
16:28 exp_evalbot OUTPUT[1␤]
16:29 ruoso rakudo: 3 ~~ Num
16:29 exp_evalbot rakudo r28101 RESULT[0]
16:29 ruoso rakudo: 3 ~~ Int
16:29 exp_evalbot rakudo r28101 RESULT[1]
16:29 ruoso rakudo: Int ~~ Num
16:29 exp_evalbot rakudo r28101 RESULT[0]
16:29 moritz_ ouch
16:30 moritz_ rakudo: Num ~~ Int
16:30 exp_evalbot rakudo r28101 RESULT[0]
16:30 Auzon pugs: my $str = 'abc'; my $vals = $str.split(//); say $vals.perl;
16:30 exp_evalbot OUTPUT[*** Null patterns are invalid; use <?null> or an empty string instead␤    at /tmp/ekCvETyCUj line 1, column 40-42␤]
16:30 Auzon pugs: my $str = 'abc'; my $vals = $str.split(/<?null>/); say $vals.perl;
16:30 ruoso Num is not an Int, that's acceptable
16:30 exp_evalbot OUTPUT[["a", "b", "c"]␤]
16:30 Auzon pugs: my $str = 'a'; my $vals = $str.split(/<?null>/); say $vals.perl;
16:30 exp_evalbot OUTPUT[["a",]␤]
16:30 Auzon pugs: my $str = 'a'; my $vals = $str.split(/<?null>/); say $vals.WHAT;
16:30 moritz_ ruoso: no, actually not IMHO ;)
16:30 exp_evalbot OUTPUT[Array␤]
16:31 ruoso moritz_, Num is a superclass of Int...
16:31 ruoso or, better put, Int is a subset of Num
16:32 moritz_ rakudo: subset X of Int where ^10; say X ~~ Int
16:32 exp_evalbot rakudo r28101 OUTPUT[0␤]
16:32 moritz_ ruoso: but it's very ugly if you can't test $x ~~ Num :/
16:33 moritz_ rakudo: subset X of Int where ^10; say  Int ~~ X
16:33 exp_evalbot rakudo r28101 No output (you need to produce output to STDOUT)
16:33 ruoso moritz_, you don't need to 'say'... it outputs the last value
16:33 moritz_ why doesn't it produce an output? it has a 'say' in it
16:33 moritz_ ruoso: I know, I wrote evalbot ;)
16:33 ruoso heh
16:33 ruoso I forget about most things I write... ;)
16:34 ruoso rakudo: subset X of Int where ^10; Int ~~ X
16:34 exp_evalbot rakudo r28101 No output (you need to produce output to STDOUT)
16:34 moritz_ ruoso: but it executes the string twice, the second time wrapped in (do { ($stuff)}).perl.print or so
16:35 moritz_ so it's actually faster if you do the say() in the first place
16:35 ruoso hmm... a subset cannot be instantiated... it's a bad example...
16:35 moritz_ if speed doesn't matter, without say()  is just fine
16:35 moritz_ rakudo: my Int $x = Int.new(); say $x;
16:35 exp_evalbot rakudo r28101 OUTPUT[␤]
16:36 moritz_ rakudo: my Int $x = Int.new(); say $x.perl;
16:36 exp_evalbot rakudo r28101 OUTPUT[␤]
16:36 moritz_ rakudo: my Int $x = Int.new(); say 4.perl;
16:36 exp_evalbot rakudo r28101 OUTPUT[4␤]
16:36 moritz_ rakudo: my Int $x = Int.new(4); say $x.perl;
16:36 exp_evalbot rakudo r28101 OUTPUT[␤]
16:37 [particle] rakudo: my Int $x .= new() say $x.perl;
16:37 exp_evalbot rakudo r28101 OUTPUT[Statement not terminated properly at line 1, near "say $x.per"␤current instr.: 'parrot;PGE::Util;die' pc 120 (runtime/parrot/library/PGE/Util.pir:82)␤
16:37 [particle] oops
16:37 [particle] rakudo: my Int $x .= new(); say $x.perl;
16:37 exp_evalbot rakudo r28101 OUTPUT[␤]
16:37 [particle] rakudo: my Int $x .= new(); $x = 4; say $x.perl;
16:37 exp_evalbot rakudo r28101 OUTPUT[4␤]
16:37 Psyche^ joined #perl6
16:37 [particle] rakudo: my Int $x .= new(4); say $x.perl;
16:37 exp_evalbot rakudo r28101 OUTPUT[␤]
16:38 [particle] maybe new is doing build but not init
16:38 moritz_ shouldn't .perl at least carry the type information?
16:41 schmalbe joined #perl6
16:43 b_jonas joined #perl6
16:44 rakudo_svn r28102 | jonathan++ | [rakudo] Add readonly method to Mutable PMC.
16:45 [particle] rakudo doesn't have many .perl methods complete yet
16:45 hanekomu joined #perl6
16:46 rakudo_svn r28103 | jonathan++ | [rakudo] Fill out MutableVAR a bit more, and add a few (passing) tests for it.
16:47 diakopter someone please correct me (where I'm wrong)... I don't see a distinction between a statement and an expression.... both set $_, both can be followed by a ';', both can be included inside another expression/statement...
16:48 eternaleye joined #perl6
16:49 ruoso diakopter, can you have a ; in an expression? my $a = (1 + 1;) + (2+2;);
16:50 diakopter no, but you can't have one *in* a statement, either.  consider    { block }\n  - the \n is the terminator for the statement that declares the block.  also   statementEOF (it's still treated as a statement)
16:51 ruoso well.. you might omit the ';' in a statement...
16:51 ruoso but you can't use one in an expression
16:51 TimToady you can if it's inside a bracketing construct
16:51 diakopter that's what I mean... I don't see a distinction between statement (minus optional trailing semicolon) and expression.
16:52 ruoso TimToady, doesn't a bracketing construct contain statements?
16:52 TimToady it's parsed that way
16:52 ruoso yeah... that's what I mean... an expression doesn't have ';'... never...
16:52 TimToady but some places reduce via semilist rather than statelist
16:52 diakopter pugs: say(say 3;);
16:52 exp_evalbot OUTPUT[3␤1␤]
16:53 diakopter pugs: say say 3;;
16:53 exp_evalbot OUTPUT[3␤1␤]
16:53 ruoso ouch... is that correct?
16:53 diakopter pugs: say say(3;);
16:53 exp_evalbot OUTPUT[3␤1␤]
16:53 ruoso elf: say(3;);
16:53 exp_evalbot OUTPUT[3␤]
16:53 TimToady pugs's parser should not be trusted completely
16:54 ruoso that is wrong, isn't it?
16:54 TimToady which is wrong?
16:54 diakopter I'd like to know which is/are wrong
16:54 ruoso oh...
16:54 ruoso it's parsing as another thing
16:55 justatheory joined #perl6
16:55 ruoso elf: say(3;2);
16:55 exp_evalbot OUTPUT[3␤2␤]
16:55 ruoso elf: say(3,3;2,2);
16:55 exp_evalbot OUTPUT[3␤3␤2␤2␤]
16:55 TimToady in list context ; turns into ,
16:55 TimToady in slice context ; turns into List of Capture
16:55 ruoso yes... but it's not a 'trailing ; in the expression'
16:56 ruoso as I think diakopter was implying
16:56 TimToady re: say say 3;; the "say say 3;
16:56 diakopter no, I wasn't saying semicolon always signifies a statement terminator following an expression
16:56 TimToady is parsed as the first statement
16:56 TimToady and the second ; is a bare ;
16:57 ruoso sure sure.... I was talking about say(3;)
16:57 TimToady by list context turns into say(3,)
16:57 diakopter and say(say 3;);
16:57 ruoso you're finishing the statement
16:57 ruoso with the ;
16:58 ruoso the last one, of course
16:58 TimToady what's the question?
16:58 diakopter say (say 3; say 4; 5; 6)
16:58 diakopter pugs: say (say 3; say 4; 5; 6)
16:58 exp_evalbot OUTPUT[*** ␤    Unexpected ";"␤    expecting "_", fraction, exponent, term postfix, operator, ":", "," or ")"␤    at /tmp/qe1VIpzr6E line 1, column 11␤]
16:58 ruoso TimToady, the difference between expression and statement
16:59 diakopter pugs: say (say 3; say 4; 5, 6)
16:59 exp_evalbot OUTPUT[*** ␤    Unexpected ";"␤    expecting "_", fraction, exponent, term postfix, operator, ":", "," or ")"␤    at /tmp/nZKAuc5NU8 line 1, column 11␤]
17:00 diakopter pugs: say (say 3, say 4, 5, 6)
17:00 exp_evalbot OUTPUT[456␤31␤1␤]
17:00 diakopter interesting, the last say slurped 4,5,6
17:00 ruoso but that is not actually wrong... it was supposed to be parseable
17:00 diakopter pugs: say (say 3, say 4; 5, 6)
17:00 exp_evalbot OUTPUT[*** ␤    Unexpected ";"␤    expecting "_", fraction, exponent, term postfix, operator, ":", "," or ")"␤    at /tmp/gGyErMla49 line 1, column 18␤]
17:00 diakopter pugs: say ((say 3, say 4) 5, 6)
17:00 exp_evalbot OUTPUT[*** ␤    Unexpected "5"␤    expecting operator or ")"␤    at /tmp/bZfTJBL2r1 line 1, column 21␤]
17:00 diakopter pugs: say ((say 3, say 4), 5, 6)
17:00 exp_evalbot OUTPUT[4␤31␤156␤]
17:01 diakopter weird
17:01 ruoso the newline is misplaced...
17:01 [particle] what's weird there?
17:01 ruoso where did that 1 come from?
17:01 diakopter I don't know where the second 1 comes from
17:02 [particle] say 4 prints 4nl
17:02 ruoso the first one actually
17:02 diakopter oh
17:02 diakopter yeah
17:02 ruoso oh
17:02 [particle] say 3, 1
17:02 ruoso yeah
17:02 ruoso heh
17:02 diakopter pugs: say ((say 3; say 4), 5, 6)
17:02 exp_evalbot OUTPUT[*** ␤    Unexpected ";"␤    expecting "_", fraction, exponent, term postfix, operator, ":", "," or ")"␤    at /tmp/A83Xjxxw3p line 1, column 12␤]
17:02 ruoso it was being parsed as say(4,say(4))
17:02 b_jonas the second one is from that (say 3, say 4) is evaled in list context so you get the 1 from both
17:02 ruoso say(3,say(4))
17:02 b_jonas I think
17:02 diakopter pugs: say ((say 3, say 4;), 5, 6)
17:02 exp_evalbot OUTPUT[*** ␤    Unexpected ";),"␤    expecting "_", fraction, exponent, term postfix, operator, ":", "," or ")"␤    at /tmp/wCPCzM3SJf line 1, column 19␤]
17:03 b_jonas no wait, I'm wrong
17:03 ruoso say(say(3,say(4)),5,6)
17:03 ruoso that's how it's being parsed
17:03 b_jonas it's from that say 3, say 4 prints the 1 that say 4 returns
17:03 b_jonas and the outer say returns the 1 that say 3, say 4 returns
17:03 diakopter pugs: say(say(3,say(4)),5,6)
17:03 exp_evalbot OUTPUT[4␤31␤156␤]
17:03 diakopter yep you're right ruoso
17:03 ruoso it evaluates the parameters from RTL
17:03 ruoso that's why the 4 is before
17:04 TimToady no
17:04 * diakopter laughs
17:04 b_jonas buubot, eval: say(say(3,say(4)),5,6)
17:04 TimToady it's inside to out
17:04 buubot b_jonas:  undefERROR: 15056: Undefined subroutine &main::say called at (eval 1590481) line 1.
17:04 b_jonas buubot, eval: use 5.010; say(say(3,say(4)),5,6)
17:04 buubot b_jonas:  4311561
17:04 ruoso TimToady, yeah... but when it was say(say 3, say 4)
17:04 b_jonas buubot, eval: use 5.010; $\ = ":"; print(print(3,print(4)),5,6)
17:04 buubot b_jonas:  4:31:156:1
17:04 ruoso it took say 4 as an argument to say
17:04 TimToady it is evaluating the parameters to the inside say before the parameters to the outside say
17:05 b_jonas you get the same in perl5, see?
17:05 ruoso sure...
17:05 diakopter buubot, eval: use 5.010; $\ = ":"; print(print 3,print 4,5,6)
17:05 buubot diakopter:  456:31:1:1
17:06 diakopter buubot, eval: use 5.010; $\ = ":"; print((print 3,print 4),5,6)
17:06 buubot diakopter:  4:31:156:1
17:06 diakopter buubot, eval: use 5.010; $\ = ":"; print((print 3;print 4);5;6)
17:06 buubot diakopter:  undefERROR: syntax error at (eval 1590834) line 1, at EOFsyntax error at (eval 1590834) line 1, near "4)"syntax error at (eval 1590834) line 2, near "6)"
17:07 ruoso pugs: say(say(3),say(4)),5,6)
17:07 exp_evalbot OUTPUT[*** ␤    Unexpected ")"␤    expecting "_", fraction, exponent, term postfix or operator␤    at /tmp/2vRGcS029v line 1, column 23␤]
17:07 ruoso pugs: say(say(3),say(4),5,6)
17:07 exp_evalbot OUTPUT[3␤4␤1156␤]
17:09 diakopter I still want to know whence that 2nd 1
17:09 ruoso there are two say calls
17:09 TimToady in the most recent, the return of say(4)
17:09 ruoso say returns 1
17:09 diakopter pugs: say((say(3),say(4)),5,6)
17:09 exp_evalbot OUTPUT[3␤4␤1156␤]
17:10 diakopter oh, it flattens
17:10 diakopter pugs: say(say(say(3),say(4)),5,6)
17:10 exp_evalbot OUTPUT[3␤4␤11␤156␤]
17:10 TimToady yes, () is invisible in list context
17:10 ruoso pugs: say(say 3 && say 4, 5, 6); # :)
17:10 exp_evalbot OUTPUT[456␤1␤1␤]
17:10 diakopter pugs: say(1,1)
17:10 exp_evalbot OUTPUT[11␤]
17:10 ruoso pugs: say((say 3 && say 4), 5, 6); # :)
17:10 exp_evalbot OUTPUT[4␤1␤156␤]
17:11 TimToady pugs: say((say 3 and say 4), 5, 6); # :)
17:11 exp_evalbot OUTPUT[3␤4␤156␤]
17:11 diakopter so again, what about
17:11 diakopter pugs: say(say 3;)
17:11 exp_evalbot OUTPUT[3␤1␤]
17:11 TimToady pugs: say(say 3,)
17:11 exp_evalbot OUTPUT[3␤1␤]
17:11 diakopter right, but
17:11 ruoso (3;2) creates a multidimensional list
17:12 ruoso not two expressions
17:12 TimToady only in subscripts
17:12 diakopter pugs: say(say 3; say 4)
17:12 exp_evalbot OUTPUT[3␤4␤11␤]
17:12 ruoso "say 4" is an expression
17:12 TimToady (3;2) creates a multidim list only in *slice* context
17:12 diakopter ok
17:12 ruoso what is a proper name to call it?
17:12 TimToady and the decision may actually be delayed to binding time
17:13 b_jonas pugs: $ (3;2)
17:13 exp_evalbot OUTPUT[*** ␤    Unexpected " ("␤    expecting "::"␤    at /tmp/n3GfO8WjCn line 1, column 2␤]
17:13 b_jonas pugs: + (3;2)
17:13 exp_evalbot OUTPUT[*** ␤    Unexpected ";"␤    expecting "_", fraction, exponent, term postfix, operator or ")"␤    at /tmp/w6n5KZUDFu line 1, column 5␤]
17:13 b_jonas good
17:13 diakopter pugs: /(3;2)
17:13 exp_evalbot OUTPUT[*** ␤    Unexpected end of input␤    expecting "\\", variable name or "/"␤    at /tmp/LlAXlCZRJf line 2, column 1␤]
17:14 ruoso pugs: sub a (@a, @b) { say @a; say @b }; a(1,2,3;4,5,6)
17:14 exp_evalbot OUTPUT[*** No compatible multi variant found: "&a"␤    at /tmp/gobYLgoC5w line 1, column 36 - line 2, column 1␤]
17:15 diakopter TimToady: can you clarify what you said about ; being inside some bracketing constructs (which are themselves statements, I think you to mean)
17:15 ruoso pugs: sub a (@a, @b) { say @a; say @b }; a((1,2,3);(4,5,6))
17:15 exp_evalbot OUTPUT[123␤456␤]
17:15 ruoso pugs: sub a (@a, @b) { say @a; say @b }; a((1,2,3),(4,5,6))
17:15 exp_evalbot OUTPUT[123␤456␤]
17:15 ruoso pugs: sub a (@a, @b) { say @a; say @b }; a \(1,2,3;4,5,6)
17:15 TimToady everything inside brackets is parsed with <semilist>, and the interpretation of that depends on context
17:15 exp_evalbot OUTPUT[*** ␤    Unexpected "\\("␤    expecting bare or pointy block construct, ":", identifier or operator␤    at /tmp/fJBJIXPw7F line 1, column 38␤]
17:15 ruoso pugs: sub a (@a, @b) { say @a; say @b }; my $a \(1,2,3;4,5,6);
17:16 exp_evalbot OUTPUT[*** ␤    Unexpected "\\("␤    expecting "?", "!", trait, "=", infix assignment or operator␤    at /tmp/ALH5MtNOey line 1, column 42␤]
17:16 ruoso pugs: sub a (@a, @b) { say @a; say @b }; my $a = \(1,2,3;4,5,6); a(|$a)
17:16 exp_evalbot OUTPUT[*** ␤    Unexpected "$a"␤    expecting "=", context, ":" or "("␤    at /tmp/FysvV44LAG line 1, column 39␤]
17:16 TimToady subscripts are allowed to assume at compile time that they will be bound to a slice context
17:16 TimToady so the optimizer can work with it
17:16 * diakopter reads about semilist in STD
17:17 TimToady otherwise all you can do with a semilist is turn it into List of Capture and defer the decision whether to flatten or not
17:17 ruoso TimToady, but is the (1,2,3 ; 4,5,6) format valid?
17:17 TimToady depending on binding
17:17 ruoso for :(@a, @b)
17:17 b_jonas basically, (2; 3) has to be an error in most contexts I think
17:17 TimToady it's not
17:18 diakopter pugs: sub a (@a, @b) { (say @a; say @b) }; my $a = \(1,2,3;4,5,6); a(|$a)
17:18 exp_evalbot OUTPUT[*** ␤    Unexpected ";"␤    expecting "::", term postfix, operator, ":", "," or ")"␤    at /tmp/DLsr7Tjl83 line 1, column 25␤]
17:18 TimToady please note that pugs has never implemented slice context
17:18 diakopter pugs: sub a (@a, @b) { (say @a; say @b) }; a((1,2,3),(4,5,6))
17:18 exp_evalbot OUTPUT[*** ␤    Unexpected ";"␤    expecting "::", term postfix, operator, ":", "," or ")"␤    at /tmp/YqFKBShfkg line 1, column 25␤]
17:18 ruoso in fact... I think a((1,2,3),(4,5,6)) was supposed to be the same as (1,2,3,4,5,6) isnt'it?
17:19 TimToady not necessarily
17:19 b_jonas hmm
17:19 TimToady again, it depends on the binding
17:19 diakopter eek
17:19 ruoso that seems very hard to implement ;)
17:19 TimToady you did read the synopses, didn't you?  :)
17:19 pmichaud a((1,2,3),(4,5,6))   will act as (1,2,3,4,5,6)  if bound to a slurpy array
17:20 * diakopter adds a few more passes to the ROADMAP
17:20 TimToady but if the sig is ($,$) you get two lists
17:20 pmichaud you also get two lists with (@,@)
17:20 TimToady indeed
17:20 b_jonas S03: The context determines how the expressions terminated by semicolon are interpreted. At statement level they are statements. Within a bracketing construct they are interpreted as lists of Captures, which in slice context will be treated as the multiple dimensions of a multidimensional slice. (Other contexts may have other interpretations or disallow semicolons entirely.)
17:20 diakopter ah ok; that answers my original question.
17:20 b_jonas lists of Captures? wierd
17:21 b_jonas I like the parenthetical remark
17:21 ruoso pugs: multi sub a (@a) { 1}; multi sub a (@a, @b) { 2}; say a((1,2,3),(4,5,6))
17:21 exp_evalbot OUTPUT[2␤]
17:21 b_jonas basically I think semicolons should be "usually" an error inside parenthesis so you can easily catch unpaired open parenthesis in expressions
17:22 TimToady it would be a good place for a "suppose" point, if the parse does fail later
17:23 TimToady in which case it will still tell you exactly what went wrong, most likely
17:23 diakopter pugs: multi sub a (@a) { 1}; multi sub a (@a, @b) { 2}; say a((('flatten','me',3),(4,5,6)))
17:23 exp_evalbot OUTPUT[1␤]
17:23 diakopter nifty.
17:23 TimToady but as you see with (say 3; say 4), it has the use of terminating the first say's argument list and then continuing the outer list
17:24 b_jonas TimToady: yeah, especially if it also watches indentation for suppose points
17:24 b_jonas hmm
17:24 diakopter pugs: multi sub a (@a) { 1}; multi sub a (@a, @b) { 2}; say a((('flatten','me',3);(4,5,6);))
17:24 exp_evalbot OUTPUT[*** ␤    Unexpected ";("␤    expecting term postfix, operator or ")"␤    at /tmp/RK2foxEXVy line 1, column 76␤]
17:24 diakopter pugs: multi sub a (@a) { 1}; multi sub a (@a, @b) { 2}; say a((('flatten','me',3);(4,5,6)))
17:24 TimToady you can apply any amount of AI to error message determination, as long as you make the user fix the program
17:24 exp_evalbot OUTPUT[*** ␤    Unexpected ";("␤    expecting term postfix, operator or ")"␤    at /tmp/pvdxYmz58V line 1, column 76␤]
17:24 b_jonas where is that (say 3; say 4) defined in the synopsis?
17:24 b_jonas what I quoted is I think all it says about the semicolon
17:25 pmichaud b_jonas: S04:  Note though that the first expression within parens or brackets is parsed as a statement, so you can say:
17:25 pmichaud @x = 41, (42 if $answer), 43;
17:25 lambdabot Maybe you meant: . ? @ v
17:25 pmichaud and that is equivalent to:
17:25 pmichaud @x = 41, ($answer ?? 42 !! ()), 43
17:25 lambdabot Maybe you meant: . ? @ v
17:25 b_jonas oh no
17:25 b_jonas that's exactly what makes error catching hard
17:25 TimToady so you suppose
17:26 diakopter suppose harder
17:26 pmichaud also:  A do is assumed immediately after any opening bracket,
17:26 pmichaud ...
17:26 b_jonas (though it's even worse in ruby where newlines are converted to an implicit semicolon in lots of places)
17:26 diakopter {bareblock}\n  <- statement
17:26 diakopter ?
17:27 b_jonas brace is ok
17:27 b_jonas let me check
17:28 b_jonas S04 says: In Perl 6, the bare block is not a do-once. Instead do {...} is the do-once loop (which is another reason you can't put a statement modifier on it; use repeat for a test-at-the-end loop).
17:28 rakudo_svn r28105 | particle++ | #55346: [PATCH] tool for checking if '# pure' files still contain fudging
17:28 rakudo_svn r28105 | particle++ | ~ applied with minor formatting corrections and enhancements
17:28 rakudo_svn r28105 | particle++ | Courtesy of Moritz Lenz (moritz++)
17:28 b_jonas so I think no
17:28 Alias_ joined #perl6
17:28 diakopter pugs: say(eval("{ my $a=3; say $a+4;}\n"))
17:28 exp_evalbot OUTPUT[7␤1␤]
17:28 TimToady it does it once, it's just not a loop
17:29 diakopter pugs: say({ my $a=3; say $a+4;}\n)
17:29 exp_evalbot OUTPUT[*** ␤    Unexpected "n"␤    expecting "(" or "."␤    at /tmp/0pBQqPfFOC line 1, column 27␤]
17:29 diakopter pugs: say({ my $a=3; say $a+4;})
17:29 exp_evalbot OUTPUT[<SubBlock(<anon>)>␤]
17:29 b_jonas hmm
17:29 diakopter the block was declared only?
17:29 pmichaud that's not a bare block.
17:29 pmichaud a bare block is a block that occurs at statement level.
17:29 b_jonas so a brace can be a do-once, a subroutine, or a hash?
17:29 pmichaud inside of parens, it's a closure.
17:29 b_jonas fun
17:30 diakopter oh...
17:30 pmichaud I should say.... inside of an argument list, it's a closure
17:30 [particle] braces are always a closure
17:30 b_jonas I don't get it then
17:31 b_jonas so a bare block is never a do-once, right?
17:31 pmichaud { my $a = 3;  say $a; }     # bare block, executes immediately
17:31 TimToady it works as in Perl 5, except for the fact that it's not a loop
17:31 ruoso a bare block is a block in void context?
17:31 b_jonas ah yeah
17:31 b_jonas found it
17:31 b_jonas Although a bare block occuring as a single statement is no longer a do-once loop, it still executes immediately as in Perl 5, as if it were immediately dereferenced with a .() postfix, so within such a block CALLER:: refers to the scope surrounding the block.
17:32 b_jonas in S04
17:32 pmichaud b_jonas: correct.
17:32 b_jonas hmm
17:32 ruoso so a block in void context is executed immediatly...
17:32 TimToady it's not the void context
17:32 ruoso it's syntatic only?
17:32 TimToady it's being part of <statelist> rather than <semilist>
17:32 pmichaud it's the bare block as a single statement
17:32 b_jonas pmichaud: but wouldn't that conflict with the above thing you said that "the first expression within parens or brackets is parsed as a statement"
17:32 b_jonas ?
17:33 TimToady that's a semilist
17:33 pmichaud say({ ... })     isn't inside "parens".
17:33 pmichaud here the parens are part of the argument list.
17:33 b_jonas oh, so "inside parens" doesn't apply to argument lists
17:33 b_jonas I see
17:33 b_jonas that's just like ruby
17:33 b_jonas (probably stolen from there as well)
17:33 TimToady nope
17:34 TimToady I've never actually looked at how ruby parses
17:34 pmichaud and the "inside parens" doesn't say anything about when the block is executed -- just how it's parsed.
17:34 dalek joined #perl6
17:34 b_jonas but then
17:34 b_jonas what does "or brackets" mean in that?
17:34 b_jonas what kind of brackets?
17:34 pmichaud [{ ... }]
17:34 b_jonas but meaning what?
17:35 b_jonas array constructor?
17:35 pmichaud sure.
17:35 TimToady it's a semilist, not a statelist
17:35 b_jonas that doesn't seem to make sense to me
17:35 b_jonas why array constructor in particular?
17:35 b_jonas how's that different from any ordinary function call arglist or circumfix operator?
17:36 b_jonas bare parens special, I get that
17:36 b_jonas but array constructor?
17:36 TimToady bare [...] is always an array composer
17:37 pmichaud example:   @x = 41, [42 if $answer], 43;
17:37 b_jonas strange
17:37 TimToady that's either 41, [42], 43 or 41, [], 43
17:37 b_jonas I don't get what that's good for
17:38 TimToady modifiers inside brackets are good for various forms of list comprehensions
17:39 ruoso but the difference from p5 here is in accepting "if" there, not the array construct itself, right?
17:39 sscaffidi joined #perl6
17:39 b_jonas list comprehensions... hmm... maybe
17:39 TimToady and redefining the return value of a false "if" to be ()
17:39 b_jonas buubot, eval: [do { 3 if 0 }]
17:39 buubot b_jonas:  [0]
17:40 diakopter pugs: say(3,my $bar = sub { my $closure = say(4); { die "5"; }  },$bar())
17:40 exp_evalbot OUTPUT[4␤*** 5␤    at /tmp/c7Y81fmEmW line 1, column 61-67␤       /tmp/c7Y81fmEmW line 1, column 47-54␤]
17:40 ruoso pugs: sub a ($a) { say $a }; a(5 if 1)
17:40 exp_evalbot OUTPUT[*** ␤    Unexpected "if"␤    expecting operator, ":" or ")"␤    at /tmp/QdEKRSKf8R line 1, column 28␤]
17:40 b_jonas buubot, eval: $a = 0; [do { 3 if $a }]
17:40 buubot b_jonas:  [0]
17:40 b_jonas yeah, it returns the condition in p5
17:41 ruoso buubot, eval: $a = "0 but true"; [do { 3 unless $a }]
17:41 buubot ruoso:  ["0 but true"]
17:41 diakopter I'm getting the feeling the type checker will need to employ brute force.
17:42 ruoso TimToady, but is a(5 if $foo) valid also? or is that specific for the array constructor?
17:42 pmichaud the thing in the parens is a semilist
17:42 pmichaud so yes.
17:43 ruoso ah... ok... for one second I understood it was something specific...
17:43 TimToady there are very few specifics in Perl 6  :)
17:43 pmichaud in STD.pm:  token postcircumfix:sym<( )> ( --> Methodcall) { '(' <semilist> ')' {*} }
17:44 diakopter that's like God saying the Bible has very few specifics.
17:44 ruoso hehe
17:44 [particle] it's <semispecific>
17:44 TimToady it's just that everyone ignores the specifics that *are* there...  :)
17:45 ruoso diakopter, it's not that it is specific... it's you that didn't reach the nirvana to get the abstraction yet ;)
17:45 diakopter exactly.  my Bible-parser isn't yet single-pass.
17:46 ruoso TimToady, while you're around...
17:46 ruoso does submethods belong to the package or to the class?
17:46 diakopter tuit alert
17:47 ruoso that meaning... is it possible to invoke a submethod as a subroutine, passing the invocant explicitly (or not)?
17:47 pugs_svnbot r20666 | moritz++ | [spec] unfudged one passing test in exp.t
17:48 ruoso and if so, what happens when no invocant is given?
17:48 TimToady it's possible to invoke *any* method as a subroutine, if you turn it into a Code ref first
17:48 TimToady that's how dispatchers work
17:48 ruoso no... I mean directly by name
17:48 TimToady the magic of submethods is in the dispatcher
17:49 ruoso from that I would presume it belongs to the class, and that it would be part of the dispatch before falling back to sub dispatch
17:49 TimToady offhand, I don't think so
17:50 TimToady and I'm not sure we even need fallback from single dispatch to multiple dispatch, now that we have "is export"
17:51 TimToady (thought that's kind of intended for the opposite case...)
17:51 ruoso I didn't ever thought on having it separated... heh... I always thought it would behave as multi always, it would only stop looking it it knew that there were no variants
17:52 TimToady foo($x) is always a request for multiple dispatch, and $x.foo() is always a request for single dispatch
17:52 TimToady and cases like close($fh) vs $fh.close are now handled by "is export"
17:53 b_jonas oh, so the one-argument named function exception is now gone?
17:53 b_jonas lemme check
17:53 TimToady long time now
17:54 b_jonas ok, it would be difficult to check anyway for I've no idea which S to look
17:54 TimToady that's one of those durn specifics we got rid of
17:54 b_jonas 6 or 12 or 13
17:54 moritz_ b_jonas: exactly, one of these ;)
17:54 diakopter moritz_: how about making evalbot commands (and responses?) appear as C<> on the irc log :D
17:55 diakopter or just bold or something
17:55 moritz_ diakopter: do you mean enclosed in C<...>? or type writer?
17:55 moritz_ it's all monospace at them moment
17:56 diakopter I don't know.  just something to distinguish it as computer-readable as well as human-readable.
17:57 moritz_ diakopter: it's computer readable in the sense that everything from exp_evalbot is output from an eval command
17:57 moritz_ are you planning anything special with the stuff?
17:57 TimToady afk &  # シャワー
17:57 diakopter no, I just think it would be nice to be able to look at the irclog as a REPL log
17:57 moritz_ diakopter: maybe it's easier if I make evalbot log its in- and output somewhere?
17:58 diakopter but it's ok; I can write a greasemonkey script or something
17:58 diakopter moritz_: yeah, if it logged, it would be easier to convert them to test cases
17:58 pugs_svnbot r20667 | moritz++ | [spec] fixed previous commit
18:00 moritz_ diakopter: ok, I'll see if I can find some tuits tonight for implementing that
18:00 diakopter I'm sure Auzon would love that... a hundred new test cases a day to sort into t/spec/
18:01 diakopter "hmm, what's this supposed to test?"
18:01 moritz_ but you can't automate it, and formatting is crappy
18:01 Auzon It'd be neat to harness evalbot that way. But it'd be hard to get useful stuff from just trying to get a syntax working
18:02 Auzon And I use evalbot as a calculator sometimes, so that'd throw it off too :P
18:02 rdice joined #perl6
18:03 b_jonas I use my bot as a calculator
18:03 b_jonas becuase j is the best language for that kind of usage
18:04 moritz_ well, that's not what evalbot was designed for ;)
18:05 moritz_ you don't need forking and resource limits for simple arithmetics
18:09 b_jonas sure you do
18:09 b_jonas for the kind of calculations I do
18:10 b_jonas :)
18:10 b_jonas pugs: [+] ^1000000
18:10 rakudo_svn r28106 | pmichaud++ | [rakudo]:
18:10 rakudo_svn r28106 | pmichaud++ | * Avoid losing precision in floating point constants.
18:11 exp_evalbot No output (you need to produce output to STDOUT)
18:11 ruoso I think the eval bot gone for a ride...
18:11 b_jonas you surely always need resource limits
18:11 b_jonas you can do without forking if that's easier
18:11 b_jonas but usually it's easier to write the bot with forking
18:12 pmichaud b_jonas: you're correct that S06 incorrectly lists the one-argument named function exception (still)
18:12 pmichaud I noticed that this morning.
18:12 pmichaud wasn't quite sure how to rewrite it.
18:12 b_jonas oh
18:12 elmex_ joined #perl6
18:13 pmichaud the comments about unary named in S03 are newer, though.
18:19 pugs_svnbot r20668 | moritz++ | [spec] unfudged one more test in S29-num/exp.t, pmichaud++ for fixing it
18:21 pmichaud TimToady: if we write    sub prefix:<xyz> ($x) { ... }    does that automatically create a sub named 'xyz' ?   I.e., could we access the sub using both &xyz and &prefix:<xyz>  ?
18:24 avar I think sub FOO specifies the full name of the sub but prefix: is magic, but I don't know
18:24 avar i.e. you couldn't do &xyz
18:33 vixey left #PERL6
18:33 vixey joined #PERL6
18:37 pasteling "diakopter" at 209.9.237.164 pasted "yap6 trace output for: use v6; my $a = 3;" (1252 lines, 73.5K) at http://sial.org/pbot/31210
18:40 TimToady pmichaud: I think we probably need both names so that xyz() works as a function call, though I can think of ways to fudge it in the compiler.  but if it's going to hide sub xyz anyway, why not clobber the name?
18:41 TimToady but I don't feel very strongly about it one way or the other
18:41 PerlJam what happens when xyz is a multi?
18:41 diakopter TimToady: the above trace output is with stmt merged into expr
18:42 TimToady I think multiness is orthogonal to how it's parsed
18:43 TimToady the only real difference is how you parse xyz 1,2
18:43 TimToady on the other hand, I think I see what you're asking
18:44 TimToady are prefix:<xyz> and sub xyz multis intermixed?
18:44 pmichaud partially.
18:44 pmichaud I'm thinking of  prefix:<abs>    and   $foo.abs
18:45 pmichaud but yes, the question of multis is also there.
18:45 PerlJam In my head prefix: subs and "regular" subs live in different places because their long names are different.
18:45 PerlJam Kind of like $foo and @foo (because the sigil is part of the long name)
18:46 TimToady but defining both prefix:<xyz> and xyz seems like asking for trouble anyway
18:46 TimToady because verbs are used without sigils, typically
18:46 pugs_svnbot r20669 | diakopter++ | [yap6] prefixing evalbot input to yap6 with 'use v6;'
18:46 pugs_svnbot r20669 | diakopter++ | to match the other evaluators, since yap6 enforces it.
18:47 TimToady well, gotta go get passport pix took...
18:47 pmurias TimToady: is there a way to check if STD5.pm is more broken the it was before a change?
18:47 Ched- joined #perl6
18:47 fser joined #perl6
18:47 pmichaud I'm not worried about xyz() as a function call, because it's already a named unary
18:47 fser Hello
18:47 pmurias fser: hi
18:47 pmichaud (unless there's a multi 'xyz' that isn't unary)
18:47 fser will perl6 include a kind of shell, a little like python does ?
18:48 PerlJam fser: you mean an interactive mode?
18:48 fser yes
18:48 moritz_ fser: I guess that's implementation dependant
18:48 moritz_ fser: pugs had it, rakudo has a basic one
18:48 b_jonas yeah, I think that's not under the scope of the specs
18:48 b_jonas nor is the debugger
18:48 pmichaud fser: it's not (yet?) part of the spec, but some implementations are providing one.
18:48 moritz_ but it's generally considered good practice to provide one, and very handy as well
18:48 fser wow I guess I'm not aware enough about perl 6, you're speaking about multiple implementations ..
18:49 fser (or is it perl in general I ignore ?)
18:49 pmichaud Perl 6 is a language specification, not tied to a specific implementation.
18:49 pmichaud this is a bit different from previous Perls, yes.
18:50 ps_2 joined #perl6
18:50 fser ok, thanks
18:50 b_jonas but I guess even with perl6 it might turn out that there's a default implementatoin in the future
18:50 PerlJam b_jonas: rakudo!  :)
18:50 moritz_ there are about 2 to 5 implementations, depending on what you count, and in various degrees of usefulness
18:50 b_jonas like there is with ruby and python even though it has other implementations
18:51 b_jonas or even java
18:51 b_jonas or haskell
18:51 PerlJam moritz_: 5? which are you counting there ... rakudo, pugs, elf, kp6, .. ?  nqp?
18:51 TimToady the xyz() syntax is always a function call, regardless of keyword status; c.f.  if() to call the interface function
18:51 TimToady really &
18:51 moritz_ PerlJam: yap6
18:51 pmichaud okay.
18:52 moritz_ PerlJam: not really far, but being actively worked on
18:52 moritz_ (as opposed to pugs)
18:52 pmichaud ( xyz() syntax... duh, I think I knew that already.  )
18:52 Auzon Or maybe smop?
18:52 pmurias moritz: and kp6
18:52 pmichaud ( guess I zoned out for a bit )
18:52 pmurias Auzon: smop is not a perl6 implementation
18:53 Auzon Hm. Makes sense.
18:53 [particle] don't forget SMOP!
18:53 moritz_ pmurias: PerlJam already mentioned that ;)
18:53 [particle] ah, hadn't gotten to auzon's comment yet
18:53 pmurias moritz_: i meant it's not actively worked on
18:53 [particle] pmurias: it is actively worked on again
18:54 [particle] ruoso just got a grant from tpf
18:54 moritz_ pmurias: yes, but I haven't given up hope for kp6 completely
18:54 [particle] oh, oops i'm getting crossed conversations
18:54 [particle] don't mind me
18:54 pmurias [particle]: the grant is mostly for smop
18:58 pmurias [particle]: would the grant count if elf was used instead of kp6?
18:59 [particle] i don't remember the specifics of his application
18:59 thestarslookdown joined #perl6
19:00 rakudo_svn r28107 | pmichaud++ | [rakudo]:
19:00 rakudo_svn r28107 | pmichaud++ | * 'make coretest' now runs tests in t/00-parrot, t/01-sanity
19:00 rakudo_svn r28107 | pmichaud++ | * 'make codetest' runs Parrot's coding standards tests
19:00 rakudo_svn r28107 | pmichaud++ | * 'make test'     runs coretest and codetest
19:00 rakudo_svn r28107 | pmichaud++ | * 'make fulltest' runs coretest, spectest_regression, and codetest
19:00 rakudo_svn r28108 | pmichaud++ | [rakudo]:
19:00 rakudo_svn r28108 | pmichaud++ | * Fix properties, trailing spaces, c file coda on src/pmc/mutablevar.pmc
19:00 pmurias [particle]: ruoso mentioned kp6 repeatedly
19:01 PerlJam http://news.perlfoundation.org/2008/05/2008q2_grant_proposal_smop_sim.html
19:01 lambdabot Title: 2008Q2 Grant Proposal - SMOP: Simple Meta Object Programming - The Perl Foundati ..., http://tinyurl.com/5u94mu
19:02 PerlJam go forth and read
19:02 moritz_ how is Forth related to reading? and to smop? ;-)
19:07 rakudo_svn r28110 | pmichaud++ | [rakudo]:
19:07 rakudo_svn r28110 | pmichaud++ | * Fix properties on perl6/t/pmc/mutablevar.t (moritz++)
19:09 ron joined #perl6
19:13 diakopter for anyone who's interested, here's an example of the current yap6 grammar syntax:  rule comma { ',' };  rule blkBare { w("{}",stmtList) };
19:20 chris2 joined #perl6
19:22 pmurias PerlJam: i read the grant proposal, was wandering what degree of strictness is applied to the grant completion interpretation
19:24 dominiko joined #perl6
19:24 moritz_ pmurias: I think that if there's consensus that an elf backend would make more sense, the grant comitte could be convinced to accept the change
19:26 pmurias diakopter: use still don't use strict ;)
19:27 ruoso joined #perl6
19:29 rakudo_svn r28112 | particle++ | [rakudo] improve some error messages, and improve maintainability a bit
19:30 pmurias diakopter: why do you use w instead of concatenate('{',stmtList,'}') ?
19:30 diakopter pmurias: oh, I haven't checked it in yet.
19:30 diakopter that's what w does
19:30 diakopter b/c it's shorter
19:35 pugs_svnbot r20670 | diakopter++ | [yap6]
19:35 pugs_svnbot r20670 | diakopter++ | Augmented the source filter so that rule syntax is much
19:35 pugs_svnbot r20670 | diakopter++ | more abbreviated.  Still working on fixing the syntax
19:35 pugs_svnbot r20670 | diakopter++ | error reporting.
19:42 ruoso pmurias, the grant is oriented to SMOP roadmap... so if the RODMAP changes, I think it's natural for the grant to change...
19:46 pmurias that's convenient ;)
19:48 rakudo_svn r28114 | jonathan++ | [rakudo] Implement VAR($x) and .VAR macros.
19:48 cjfields joined #perl6
19:51 diakopter pmurias: it's also no warnings qw{ reserved closure recursion }; :D
19:56 rakudo_svn r28115 | jonathan++ | [rakudo] Make readonly return false when not set - scalars are normally rw - and implement rw defined in terms of ro.
19:57 [particle] what happened to the svnbot diff links?
19:57 moritz_ did rakudo_svn ever have any?
19:58 * moritz_ just relies on the links in the irc logs
20:05 pugs_svnbot r20671 | diakopter++ | [yap6]
20:05 pugs_svnbot r20671 | diakopter++ | Removed arithmetic evaluation; it was getting in the way
20:05 pugs_svnbot r20671 | diakopter++ | of enabling successful parses.  the remaining syntax
20:05 pugs_svnbot r20671 | diakopter++ | features in STD.pm are next..
20:06 diakopter where, by remaining, I mean the vast majority of the total to implement.
20:07 rakudo_svn r28116 | jonathan++ | [rakudo] Make VAR and .VAR just give what was given to them, unless it's a scalar, per S12.
20:07 moritz_ ;)
20:11 cjfields_ joined #perl6
20:26 pmurias ls
20:26 Auzon No such file or directory.
20:26 pmurias sorry, muscle memory ;)
20:29 dduncan joined #perl6
20:30 diakopter moritz_: I made a change to evalbot.pl; would you kick it
20:30 moritz_ diakopter: just a sec
20:32 diakopter evalbot could have a "suicide" command so it can be restarted from IRC :D
20:32 exp_evalbot joined #perl6
20:32 moritz_ actually that's not a bad idea
20:32 diakopter 15:30:18 < moritz_> actually that's not a bad idea
20:32 diakopter oops
20:33 moritz_ perl6: say "still works"
20:33 exp_evalbot kp6 r20671: OUTPUT[still works␤]
20:33 exp_evalbot ..pugs: OUTPUT[still works␤]
20:33 exp_evalbot ..rakudo r28117: OUTPUT[still works␤]
20:33 exp_evalbot ..elf r20671: OUTPUT[still works␤]
20:33 diakopter yap6: say(3,my $bar = sub { my $closure = say(4); { die "5"; }  },$bar())
20:33 exp_evalbot OUTPUT[  Syntax Error near: "say"]
20:34 diakopter yap6: say (3;my $bar = sub { my $closure = say(4); { say "5"; } })
20:34 exp_evalbot OUTPUT[  Syntax Error near: "say"]
20:35 diakopter yap6: say ( 3; my $bar = sub { my $closure = say(4); })
20:35 exp_evalbot OUTPUT[  Syntax Error near: "say"]
20:35 diakopter yap6: say ( 3; my $bar = sub { my $closure = say ( 4 ); })
20:35 exp_evalbot OUTPUT[  Syntax Error near: "say"]
20:35 diakopter yap6: say ( 3; my $bar = sub { my $closure; })
20:35 exp_evalbot OUTPUT[  Syntax Error near: "say"]
20:36 diakopter argh; I thought I was privmsg evalbot; sorry folks
20:39 pmurias TimToady: ping
20:39 Chillance joined #perl6
20:59 pmichaud moritz++  # fixing my messups on p6c
21:00 Auzon perl6: say atan(1,1) / 3.14 * 180;
21:00 exp_evalbot kp6 r20671: 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(0x824c0dc)', 'APPLY', 'HASH(0x8e5237c)', 'HASH(0x8e52424)') called at
21:00 exp_evalbot ..compiled/perl5-kp6-mp6/lib/KindaPerl6/Runtime/Perl5/MOP.pm line 169␤        main::DISPATCH('HASH(0x824c0dc)', 'APPLY', 'H...
21:00 exp_evalbot ..pugs: OUTPUT[45.022824653356906␤]
21:00 exp_evalbot ..rakudo r28117: OUTPUT[too many arguments passed (2) - 1 params expected␤current instr.: 'atan' pc 9143 (src/gen_builtins.pir:6295)␤
21:01 exp_evalbot ..elf r20671: OUTPUT[Undefined subroutine &GLOBAL::atan called at (eval 14) line 3.␤ at ./elf_f_faster line 4492␤]
21:03 Auzon pugs: sub test{.say for @_} test(<hello world>)
21:03 exp_evalbot OUTPUT[hello␤world␤]
21:04 Auzon pugs: say ord('␤')
21:04 exp_evalbot OUTPUT[*** ␤    Unexpected "\65279'\9252')"␤    expecting ":", identifier or ")"␤    at /tmp/LbQdi7Ybs8 line 1, column 9␤]
21:04 Auzon pugs: say ord('␤')
21:04 exp_evalbot OUTPUT[9252␤]
21:05 pmichaud Auzon: S29 doesn't have an 'atan' ?
21:06 Auzon "where func is one of: sin, cos, tan, asin, acos, atan, sec, cosec, cotan, asec, acosec, acotan, sinh, cosh, tanh, asinh, acosh, atanh, sech, cosech, cotanh, asech, acosech, acotanh."
21:06 moritz_ Auzon: don't rely on evalbot's UTF8 handling, it's mostly b0rked
21:06 rakudo_svn r28118 | jonathan++ | [rakudo] Make us able to use role names as type constraints again. We may have to revisit whether we want to register a Role proto at some point in the future; this gets things fixed for now.
21:06 pmichaud Auzon: I don't see that statement in S29
21:06 pmichaud is it somewhere else?
21:06 * Auzon acks
21:07 Auzon 371:sin, cos, tan, asin, acos, atan, sec, cosec, cotan, asec, acosec,
21:07 Auzon in Pugs/blib/lib/Perl6/Spec/Functions.pod
21:08 pmichaud okay, got it.  Thanks.
21:08 pmichaud Don't know why my search didn't uncover it before.
21:08 Auzon No problem.
21:08 Auzon It appears that the test mistakenly puts atan instead of atan2 in some cases
21:12 Auzon I assume that we're keeping atan2 instead of having a 2-arg form of atan to handle the atan2 functionality, right?
21:15 moritz_ Functions.pod
21:15 moritz_ 393:=item atan2
21:16 pmichaud I can't tell for sure what's intend.  I'm guessing that the "where func is one of: ..., atan, ..."  might have intended to use atan2 instead
21:16 moritz_ ack (or grep) is your friend ;)
21:16 pmichaud since atan2 isn't in that list.
21:16 moritz_ pmichaud: it's an extra item in S29
21:16 pmichaud oh, okay.
21:16 pmichaud so we have both atan and atan2
21:17 pmichaud atan takes one argument like sin, cos, tan, asin, etc.
21:17 cjfields joined #perl6
21:17 moritz_ I think I asked that once already
21:17 moritz_ atan2 has a default value for its second argument
21:17 moritz_ so atan($x) isn't always the same as atan2($x)
21:18 Auzon Oh. OK
21:18 Auzon I missed that :)
21:18 moritz_ Auzon: that was more than a year ago
21:18 Auzon I meant that difference in the spec
21:18 moritz_ (I don't know if my memory is correct, though)
21:18 pmichaud but is there a 2-argument form of C<atan>   as in atan(1, 1)   ?
21:19 pmichaud (where the 2nd argument isn't supposed to be $base)
21:20 japhb joined #perl6
21:20 Auzon Not that I can see, pmichaud
21:21 moritz_ http://irclog.perlgeek.de/perl6/2007-02-06#i_-54243
21:21 lambdabot Title: IRC log for #perl6, 2007-02-06
21:21 moritz_ < TimToady> atan2 is still atan2
21:22 pmichaud excellent.
21:23 Auzon I'll fix up those tests and add some more for the one-arg version of atan2().
21:23 rakudo_svn r28119 | pmichaud++ | [rakudo]:
21:23 rakudo_svn r28119 | pmichaud++ | * Bring the grammar a bit closer to STD.pm by using <.eat_terminator>
21:24 dduncan left #perl6
21:32 kaether_ joined #perl6
21:33 meppl good night
21:33 moritz_ good night meppl
21:34 meppl ;)
21:34 pugs_svnbot r20672 | moritz++ | [evalbot] two control features
21:35 exp_evalbot joined #perl6
21:35 moritz_ evalbot control version
21:35 exp_evalbot This is evalbot revision 20672
21:36 pugs_svnbot r20673 | moritz++ | [evalbot] hoepfully fixed "Wide character in print" warning
21:36 moritz_ evalbot control restart
21:37 exp_evalbot joined #perl6
21:37 pugs_svnbot r20674 | moritz++ | [evalbot] fixed previous commit
21:37 moritz_ evalbot control version
21:37 exp_evalbot This is evalbot revision 20674
21:43 rakudo_svn r28120 | jonathan++ | [rakudo] We should only initialize scalars with protoobjects; if it has a type that is a role or a constraint, it's just a Failure object.
21:50 Limbic_Region joined #perl6
21:53 jferrero joined #perl6
21:56 pugs_svnbot r20675 | Auzon++ | [gsoc_spectest] Fixed tests for atan2, and added single argument tests for atan2. (2 tests added, 12 changed)
22:01 moritz_ Auzon: I think calling is_approx like this: is_approx(($first, $second), $msg) is illegal
22:01 moritz_ Auzon: many of the test still use that
22:02 * Auzon looks at Test.pm
22:02 moritz_ because ($first, $second) is actually a list, that tries to bind to a single item in the signature
22:03 moritz_ sub is_approx(Num $got, Num $expected, Str $desc?, :$todo, :$depends) returns Bool is export {
22:03 moritz_ in pugs
22:03 moritz_ multi sub is_approx($got, $expected, $desc) in parrot
22:05 rakudo_svn r28122 | jonathan++ | [rakudo] Tidy up use of isa thanks to adding isa as a known pirop in PCT.
22:06 moritz_ actually I think I'm responsible for some of these screw-ups
22:07 pmichaud I blame moritz_ .  :-)
22:07 moritz_ pmichaud: moritz, not moritz_ ;-)
22:08 pmichaud I just tab-completed your nick.  :-)
22:08 pmichaud besides, I'll credit "moritz" and blame "moritz_" and you'll be much better off.
22:08 moritz_ lol
22:08 pmichaud when I was actively teaching courses, at the end of the semester we had "faculty evaluations" by the students.  (more)
22:09 pmichaud These were always done on scantron forms, where the student would bubble in things on a 1-5 scale.  (more)
22:09 rakudo_svn r28124 | particle++ | [rakudo] improve eval_lives_ok and eval_dies_ok, courtesy of Ronald Schmidt <ronaldxs@software-path.com>
22:10 pmichaud I would always tell the studens to use ink for bad review and pencil for good ones, because I knew that our scantron reader didn't process ink properly, and they just discarded any evaluations that the scanner couldn't read.
22:10 moritz_ hehe, nice hack ;)
22:10 pugs_svnbot r20676 | moritz++ | [spec] S29-num/log.t fixed some ivalid calls to is_approx.
22:10 pmichaud (but then I would tell the students why ink and pencil made a difference, which pretty much invalidated it.)
22:11 pmichaud besides, I never got bad reviews.  (Although this past year may have changed that.)
22:13 pugs_svnbot r20677 | moritz++ | [spec] complex.t: invalid uses of is_approx()
22:16 pugs_svnbot r20678 | moritz++ | [spec] two more files cleared of illegal usage if is_approx()
22:17 Auzon Did you get the one I just committed?
22:18 moritz_ Auzon: the trig.t?
22:18 Auzon Yes
22:18 moritz_ no
22:18 moritz_ I just looked in S29-num
22:18 moritz_ but I can do that too
22:22 pugs_svnbot r20679 | moritz++ | [spec] S29-trig/trig.t fixed illegal calls to is_approx
22:22 Auzon oh. I was going to get it. But I wasn't fast enough ;)
22:23 moritz_ sorry, didn't mean to get in your way
22:23 Auzon No, it's OK, I was away
22:24 moritz_ is pi() exported by default?
22:24 moritz_ trig.t tests for it without importing it first
22:25 cjfields joined #perl6
22:25 [particle] iirc yes
22:25 [particle] s29 i think?
22:25 moritz_ Num provides a number of constants in addition to the basic mathematical functions. To get these constants, you must request them:
22:25 moritz_ use Num :constants;
22:25 moritz_ or use the full name, e.g. Num::pi.
22:25 [particle] ok, that has changed
22:25 cjfields joined #perl6
22:26 moritz_ just found it
22:26 b_jonas what?
22:26 * moritz_ goes to bed, too tired for useful hacking
22:26 b_jonas is there even an S that specifies _that_?
22:26 * b_jonas checks out S29
22:26 cjfields_ joined #perl6
22:27 b_jonas ah, it's S29 indeed
22:27 Auzon see you, moritz_. I won't be around much if at all tomorrow
22:27 moritz_ ok, bye
22:27 [particle] pmichaud: should we stick things like pi in src/classes/Num.pir?
22:36 cjfields_ joined #perl6
22:37 cjfields_ left #perl6
22:38 pmichaud pasteling: there's already a 'pi' in src/builtins/math.pir
22:38 pmichaud but yes, if it's part of Num, it should go in Num.pir
22:38 pmichaud and then it can be !EXPORT
22:42 IllvilJa joined #perl6
22:43 eternaleye joined #perl6
23:05 [particle] right
23:05 [particle] i'd like to mark it 'is export' but i haven't put that in yet
23:09 * diakopter hears the tornado sirens. [OT]
23:40 xinming joined #perl6
23:43 luqui joined #perl6
23:50 bacek joined #perl6

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

Perl 6 | Reference Documentation | Rakudo