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