Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2009-10-01

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:19 stephenl1 joined #perl6
00:41 payload joined #perl6
00:41 rhr joined #perl6
00:47 quietfanatic rakudo: .say for &say.signature.params
00:47 p6eval rakudo ffe648: OUTPUT«Method 'params' not found for invocant of class 'Failure'␤»
00:47 quietfanatic rakudo: .say for &say[0].signature.params
00:47 p6eval rakudo ffe648: OUTPUT«Null PMC access in find_method()␤in Main (/tmp/zdOzegh1CG:0)␤»
00:48 quietfanatic How known is this bug?
00:49 crythias joined #perl6
00:52 rhr__ joined #perl6
00:55 jnthn quietfanatic: Well, signature introspection ain't really spec'd yet anyway
00:55 jnthn And the interface we have now is probably not what the spec will look like.
00:59 ihrd joined #perl6
01:00 quietfanatic rakudo: my %x = ((sub (Int $a, Str $b, Any $c) {...}).signature.perl.comb(/\w+\s+<[*:]>?<[$@%&]>\w+/).map({my @a=.split(" ");@a[0]=>@a[1]})) # workaround
01:00 p6eval rakudo ffe648:  ( no output )
01:00 quietfanatic rakudo: my %x = ((sub (Int $a, Str $b, Any $c) {...}).signature.perl.comb(/\w+\s+<[*:]>?<[$@%&]>\w+/).map({my @a=.split(" ");@a[0]=>@a[1]})); say %x # workaround
01:00 p6eval rakudo ffe648: OUTPUT«Str        $bInt   $aAny   $c␤»
01:01 quietfanatic rakudo: my @x = ((sub (Int $a, Str $b, Any $c) {...}).signature.perl.comb(/\w+\s+<[*:]>?<[$@%&]>\w+/).map({my @a=.split(" ");@a[0]=>@a[1]})); say @x # workaround
01:01 p6eval rakudo ffe648: OUTPUT«Int        $aStr   $bAny   $c␤»
01:01 quietfanatic rakudo: my @x = ((sub (Int $a, Str $b, Any $c) {...}).signature.perl.comb(/\w+\s+<[*:]>?<[$@%&]>\w+/).map({my @a=.split(" ");@a[0]=>@a[1]})); say @x.perl
01:01 p6eval rakudo ffe648: OUTPUT«["Int" => "\$a", "Str" => "\$b", "Any" => "\$c"]␤»
01:02 quietfanatic more clear, that
01:02 Whiteknight joined #perl6
01:04 ihrd left #perl6
01:07 rhr joined #perl6
01:16 orafu joined #perl6
01:19 diakopter moritz_: re r28520, there are some uses of isa_ok() that do something like that (in radix.t)
01:26 rhr_ joined #perl6
01:41 patspam1 joined #perl6
01:49 am0c joined #perl6
01:53 mikehh joined #perl6
01:54 mikehh rakudo (ffe6481) builds on parrot r41585 - make test / make spectest_smolder (up to r28520 -> #28416) PASS - Ubuntu 9.04 i386
01:54 mikehh rakudo - t/spec/S32-num/log.rakudo - TODO passed:   21, 23, 27-28, 30
01:57 am0c jnthn: ping
01:57 tak11 joined #perl6
01:59 rhr joined #perl6
02:14 alfieANDfred joined #perl6
02:22 rhr joined #perl6
02:28 pugs_svn r28521 | diakopter++ | [sprixel] implement map { }, @list
02:30 diakopter sprixel: my @a=2,4,6,8; say map { say $_; ($_*2) ~ " " }, @a
02:30 p6eval sprixel 28520: OUTPUT«2␤4␤6␤8␤4 8 12 16 ␤␤       time in interpreter: 0.037026 s␤»
02:33 diakopter oops
02:35 pugs_svn r28522 | diakopter++ | [sprixel] forgot to uncomment "time in interpreter" message
02:42 rhr joined #perl6
02:46 hudnix joined #perl6
02:47 TiMBuS joined #perl6
02:55 quietfanatic sprixel: my $x; say map { $x += $_ }, 1, 2, 3, 4, 5, 6; say $x
02:55 p6eval sprixel 28522: OUTPUT«execute(): execute error: TypeError: Object 1 has no method 'do_count' at sprixel.pl line 89.␤»
02:55 quietfanatic sprixel: my $x; say map { $x = $x + $_ }, 1, 2, 3, 4, 5, 6; say $x
02:55 p6eval sprixel 28522: OUTPUT«execute(): execute error: TypeError: Object 1 has no method 'do_count' at sprixel.pl line 89.␤»
02:55 quietfanatic sprixel: my $x; say map { $x = $x + $_ }, [1, 2, 3, 4, 5, 6]; say $x
02:55 p6eval sprixel 28522: OUTPUT«execute(): execute error: circumfix__S_Bra_Ket not yet implemented; srsly!!?!?␤last: termish␤T,T__circumfix__S_Bra_Ket,_specific,prec,semilist,dba,kind,SYM,M,phase,postDo,eval_args,invoker,context at sprixel.pl line 89.␤»
02:56 quietfanatic sprixel: my $x; say map { $x = $x + $_ }, (1, 2, 3, 4, 5, 6); say $x
02:56 p6eval sprixel 28522: OUTPUT«execute(): execute error: TypeError: Object Undef has no method 'do_count' at sprixel.pl line 89.␤»
02:56 quietfanatic sprixel: my $x; say map { $x = $x + $_ }, (my @tmp = 1, 2, 3, 4, 5, 6); say $x
02:56 p6eval sprixel 28522: OUTPUT«execute(): execute error: TypeError: Cannot call method 'add' of undefined at sprixel.pl line 89.␤»
02:56 quietfanatic sprixel: my $x = 0; say map { $x = $x + $_ }, (my @tmp = 1, 2, 3, 4, 5, 6); say $x
02:56 p6eval sprixel 28522: OUTPUT«136101521␤21␤»
02:56 quietfanatic sprixel: my $x = 0; map { $x = $x + $_ }, (my @tmp = 1, 2, 3, 4, 5, 6); say $x
02:56 p6eval sprixel 28522: OUTPUT«21␤»
02:57 quietfanatic sprixel: my $x = 0; map { $x = $x + $_ }, (my @tmp = 1..6); say $x
02:57 p6eval sprixel 28522: OUTPUT«execute(): execute error: Structural not yet implemented; srsly!!?!?␤last: eval_args␤T,T__Structural,kind,prec,diffy,args,dba,assoc,M,phase,postDo,eval_args,invoker,context at sprixel.pl line 89.␤»
02:57 diakopter perl6: my @a=2,4,6,8; say map { $_ * 2 ~ " " }
02:57 p6eval sprixel 28522: OUTPUT«execute(): execute error: TypeError: Cannot call method 'multiply' of undefined at sprixel.pl line 89.␤»
02:57 p6eval ..elf 28522: OUTPUT«Use of uninitialized value $_ in multiplication (*) at (eval 127) line 4.␤Undefined subroutine &GLOBAL::map called at (eval 127) line 4.␤ at ./elf_h line 5881␤»
02:57 p6eval ..pugs, rakudo ffe648: OUTPUT«␤»
02:57 diakopter perl6: my @a=2,4,6,8; say map { $_ * 2 ~ " " }, @a
02:58 p6eval elf 28522: OUTPUT«Use of uninitialized value $_ in multiplication (*) at (eval 127) line 4.␤Undefined subroutine &GLOBAL::map called at (eval 127) line 4.␤ at ./elf_h line 5881␤»
02:58 p6eval ..pugs, rakudo ffe648, sprixel 28522: OUTPUT«4 8 12 16 ␤»
03:09 ShaneC joined #perl6
03:11 Student joined #perl6
03:18 SmokeMachine joined #perl6
03:33 mikehh joined #perl6
03:48 mberends joined #perl6
03:57 JarJarBinks joined #perl6
04:04 ihrd joined #perl6
04:06 mberends sprixel: my @a = "a","b","c"; my @b = map { ( $_ x 3 ~ " " ) x 2 }, @a; say @b
04:06 p6eval sprixel 28522: OUTPUT«aaa aaa bbb bbb ccc ccc ␤»
04:06 mberends diakopter++
04:07 ihrd left #perl6
04:11 mberends sprixel: use Test;
04:11 p6eval sprixel 28522:  ( no output )
04:11 mberends :(
04:15 jaldhar joined #perl6
04:19 Confield joined #perl6
04:29 diakopter mberends: but what should use Test; output
04:30 mberends diakopter: morning!/evening! make -f sprixel.mk test should
04:30 diakopter but you hafta give it -t
04:30 diakopter to fake the use Test;
04:30 mberends oooooooh
04:31 * mberends slaps forehead
04:31 * diakopter giggles
04:31 diakopter so now I'm making list flattening work
04:32 diakopter since quietfanatic|TimToady read the Syn to me a few times until I finally got it
04:32 mberends this is -Ofun -Ofun -Ofun !
04:36 diakopter heh
04:37 mberends sprixel: use Test; plan 1; is( 5, 5, "five");
04:38 p6eval sprixel 28522: OUTPUT«1..1␤ok 1 - five␤»
04:38 diakopter since in r28522, lists don't flatten upon List_assignment, @b is actually effectively an array of 1 element, with that element being any array of 2,3
04:39 diakopter sprixel: use Test; plan 1; is :2('101'), :3<12>, 'five'
04:39 p6eval sprixel 28522: OUTPUT«1..1␤ok 1 - five␤»
04:39 diakopter speedy
04:39 mberends and n337
04:43 mberends shower && commute &
06:23 mberends joined #perl6
06:24 mberends done-commute();
06:24 fredrecsky joined #perl6
06:27 ShaneC1 joined #perl6
06:29 NorwayGeek joined #perl6
06:35 rfordinal joined #perl6
06:43 abra joined #perl6
06:44 moritz_ \o/
06:46 abra joined #perl6
06:46 mberends \o moritz_
06:54 barney joined #perl6
06:55 Rint joined #perl6
06:58 pugs_svn r28523 | moritz++ | [S32::Num] More thoughts on Inf/NaN Complex, and on comparing Complex and Real numbers
06:58 pugs_svn r28523 |
06:58 pugs_svn r28523 | Also bring the goodness of the newly defined Numeric and Real roles to some of
06:58 pugs_svn r28523 | the signatures.
07:04 Ctrl-ZZZ joined #perl6
07:08 envi^home joined #perl6
07:10 alfieANDfred joined #perl6
07:13 rfordinal joined #perl6
07:14 diakopter o_
07:15 mberends diakopter: print scalar localtime();
07:15 TiMBuS joined #perl6
07:20 pugs_svn r28524 | moritz++ | [t/spec] test Complex ~~ Real
07:26 mariuz joined #perl6
07:37 rfordinal left #perl6
07:37 rgrau joined #perl6
07:43 Maddingue joined #perl6
08:06 icwiener joined #perl6
08:11 pugs_svn r28525 | lwall++ | [STD,CORE,etc.]
08:11 pugs_svn r28525 | Major refactor of symbol tables to get rid of all backpointers.
08:11 pugs_svn r28525 | OUTER:: is now always a symbolic link, and all scopes are indexable by id
08:11 pugs_svn r28525 | in a global hash in $ALL.  All private stash attrs start with ! now.
08:14 ShaneC joined #perl6
08:27 alec joined #perl6
08:55 pugs_svn r28526 | colomon++ | [t/spec] Unfudge a bunch of tests which now work.  (moritz_++)
09:11 NorwayGeek joined #perl6
09:22 NorwayGeek joined #perl6
09:58 meppl joined #perl6
09:59 masak joined #perl6
09:59 masak good day, perl6ers.
10:06 Matt-W oh hai masak
10:13 moritz_ \o/
10:13 * Matt-W ponders eating his daily chocolate this morning to help with the pain of network programming
10:13 Matt-W Does anybody actually like network programming?
10:13 Matt-W Is there a way we can make it not suck?
10:14 moritz_ Matt-W: depends on what you mean with "network programming"
10:14 moritz_ I quite like high-level stuff like IRC bots
10:14 Matt-W I'm dealing with the stuff at the POSIX sockets API level
10:15 Matt-W sends over bad networks
10:15 moritz_ ouch
10:15 Matt-W mmm
10:15 Matt-W reading stuff is easy
10:15 Matt-W you can poll or select() and ask if you can read
10:15 Matt-W and it says yes
10:15 Matt-W so you read and you get whatever's available
10:15 Matt-W send seems to be quite a different matter
10:19 masak why?
10:19 masak while you ponder that, let me start with today's questions...
10:20 masak The first qustion is more of a claim, actually. The &todo variant on Test.pm:95-98 is inconsistent with the clearing of $todo_reason on Test.pm:246-247.
10:20 masak thanks.
10:20 Matt-W I don't know why, it just is. I didn't write the POSIX sockets API
10:20 masak could someone confirm that?
10:20 masak the Test.pm thing, I mean.
10:21 moritz_ yes, seems akward
10:21 moritz_ rakudo: use Test; plan 2; todo('foo', 2); ok 0, 'a'; ok 0, 'b'
10:21 masak not awkward, wrong.
10:22 p6eval rakudo ffe648:  ( no output )
10:22 moritz_ don't touch my eupheism
10:22 masak :)
10:22 masak there you go. I was about to put together such an example.
10:22 masak had the evalbot spit out anything, it'd been wrong, er, awkward.
10:22 Matt-W I don't understand the functionality
10:22 moritz_ compling Test.pm on the server now...
10:22 moritz_ rakudo: use Test; plan 2; todo('foo', 2); ok 0, 'a'; ok 0, 'b'
10:22 masak Matt-W: 'todo' marks upcoming tests as TODO.
10:23 p6eval rakudo ffe648: OUTPUT«1..2␤not ok 1 - a# TODO foo␤not ok 2 - b␤»
10:23 masak Matt-W: it's a multi, with one variant that accepts a count and one that doesn't.
10:23 moritz_ that looks...awkward
10:23 masak Matt-W: Test.pm is inconsistent in that the one that accepts a count works like the one that doesn't.
10:24 masak but interestingly enough, the bug is not in the todo subs.
10:24 masak I'm sure there's an important lesson to be learned here somewhere about globals and maintainability... :)
10:24 masak may I apply the obvious fix? or is moritz_ already on it?
10:25 moritz_ masak: I have a fix, let me nopaste...
10:25 masak I suspected as much. :)
10:26 lisppaste3 moritz_ pasted "Test.pm fix?" at http://paste.lisp.org/display/87991
10:26 moritz_ does that look sane?
10:26 masak I'd use <= instead of == because I'm a pessimist, but yes.
10:26 masak it looks sane.
10:28 moritz_ <= would be fatal... >= if at all, no?
10:30 masak no, I meant <=, and I checked twice...
10:30 masak the reason should be cleared only if we've gone past the run of TODO tests.
10:31 jnthn oh hai
10:31 masak jnthn!
10:31 * jnthn 's laptop has finally had a fail that will probably mean it actually gets its long-overdue replacement.
10:31 Matt-W o/ jnthn
10:31 Matt-W mmm shiny new laptop
10:31 masak anyway, next question.
10:31 jnthn Thankfully, right at the end of my trip, and after giving all presentations...
10:31 Matt-W good
10:31 Matt-W so are you going to get a lovely thinkpad? :)
10:32 masak rakudo: sub foo( :f($foo) ) {}; say &foo.signature.perl
10:32 p6eval rakudo ffe648: OUTPUT«:(Any :$foo?)␤»
10:32 jnthn (It's not completely failed..."just" that left click stopped working...
10:32 Matt-W jnthn: inconvenient though
10:32 jnthn masak: that looks wrong.
10:32 masak I thougt so, too.
10:32 eMaX joined #perl6
10:32 jnthn Matt-W: Yeah. If I had wifi in my room I'd be more bothered.
10:32 * masak submits rakudobug
10:32 jnthn masak: But actuallly we cheat rather than do that stuff right.
10:32 Matt-W masak: yes, since the name is f bound to variable foo, so...
10:32 masak rakudo: subset Foo of Object where Str | Int; my $foo = Foo.new; say $foo.WHAT
10:32 p6eval rakudo ffe648: OUTPUT«()␤»
10:33 * masak submits another rakudobug
10:33 jnthn If you attempt :foo(:bar(:$baz)) you are also going to find it does not yet work.
10:33 masak this one's interesting:
10:33 masak rakudo: try { warn "OH HAI"; say "1" }; say "2"
10:33 p6eval rakudo ffe648: OUTPUT«2␤»
10:33 masak There seems to be two competing views in the synopses about what C<warn> actually does. S03 lists it under "Exception generators", while S32/Basics.pod says that it "Prints a warning to C<$*ERR>".
10:33 moritz_ "interesting"
10:33 jnthn I know about both of those sig issues, they will be resolved when I re-work them.
10:34 Matt-W hmmmmm
10:34 masak personally, I certainly didn't expect 'warn' to throw an actual exception.
10:34 Matt-W should warnings be exceptions? you don't usually expect them to break control flow
10:34 masak I just wanted $*ERR.say, more or less.
10:34 Matt-W it seems like a very odd thing to do
10:34 Matt-W they're supposed to be non-fatal
10:34 masak I was mighty surprised when one of my try blocks caught a warning.
10:34 Matt-W that's why you say warn, not die
10:35 * masak submits rakudobug, even though this is more or a spec issue
10:35 jnthn IIRC the current impl is that they are (resumable) exceptions
10:35 masak next question, which is actually a real question:
10:35 masak After the rw refactor, if an object is passed to a routine through a parameter not marked as 'rw', will I be able to change an rw attribute of that object?
10:35 jnthn The problem we have in Rakudo right now is that we don't distinguish what CATCH catches - it is the same issue as return exceptions and other control ones.
10:36 jnthn However, that in turn I think lies in a spec weakness.
10:36 jnthn masak: (rw attr) yes
10:36 masak ok, so they're in some sense second-class.
10:36 masak rakudo: sub foo { "OH NOES" }; constant foo = 5; say foo
10:36 p6eval rakudo ffe648: OUTPUT«invoke() not implemented in class 'Integer'␤in Main (/tmp/ujUWAYKcJn:0)␤»
10:36 jnthn masak: I forget where, but it's fairly clear that it is shallow read-onlyness.
10:36 masak rakudo: constant foo = 5; sub foo { "OH NOES" }; say foo
10:36 p6eval rakudo ffe648: OUTPUT«Redefinition of routine foo␤5␤»
10:37 masak jnthn: it isn't for arrays and hashes, though.
10:37 * masak submits LTA-errmess rakudobug
10:37 jnthn masak: I can't remember right off how deep it goes. At most to the array elements.
10:38 masak rakudo: sub foo(@a) { say !@a }; foo([]); foo(undef)
10:38 p6eval rakudo ffe648: OUTPUT«1␤0␤»
10:38 masak rakudo: say !undef
10:38 p6eval rakudo ffe648: OUTPUT«1␤»
10:38 masak what produces that 0?
10:39 moritz_ rakudo: say ![undef]
10:39 p6eval rakudo ffe648: OUTPUT«0␤»
10:39 moritz_ one-item list
10:39 NorwayGeek joined #perl6
10:39 masak moritz_: oh, ah. makes sense.
10:40 jnthn Yeah, that undef gets made into list context.
10:55 krakan joined #perl6
10:57 rjh joined #perl6
11:02 lichtkind joined #perl6
11:09 dakkar joined #perl6
11:13 dalek rakudo: e38b58a | moritz++ | Test.pm:
11:13 dalek rakudo: [Test.pm] fix todo() for more than one test, masak++
11:13 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/e38b58a3ecf5ebbdfe1528a6ab02f0b883fe0521
11:50 pugs_svn r28527 | moritz++ | [evalbot] build Test.pir, not just ./perl6
11:57 Matt-W Twitter for vim eh masak? What took so long!
11:58 masak heh, people seem to prefer to reply to me tweets on IRC when they can...
12:01 TiMBuS is there a way to hide vars in different roles from each other?
12:01 TiMBuS when they're inherited by the same class
12:01 masak there's been some discussion on it, I think.
12:01 masak at least the corresponding question for methods.
12:01 TiMBuS so theres nothing yet?
12:02 masak TiMBuS: it might be a bit nitpicky, but roles aren't inherited. they're flattened out into classes. that's why there'll be a conflict when two roles have the same method.
12:02 TiMBuS hm
12:02 TiMBuS my issue is with vars, not methods. but yeah
12:03 TiMBuS maybe add a twigil to indicate scope or, eh, ill leave it up to the pros
12:03 masak I recall jnthn being less than satisfied with the way attrs in roles is specced.
12:04 masak something about the exception causing non-conflicting attr types to be merged being a recipe for disaster, or something.
12:06 TiMBuS i guess i can add a naming scheme to my attrs but.. ugh.
12:07 takadonet morning all
12:08 masak takadonet: \o
12:08 ruoso joined #perl6
12:23 masak cosimo: did you ever get Squerl to work?
12:31 TiMBuS *raises hand* ooh oohh ive got another one masak!
12:31 masak let's hear it. :)
12:31 TiMBuS how do assignment constructors in perl6 work
12:32 masak 'assignment constructors'?
12:32 TiMBuS well, overloaded assignment i guess
12:33 TiMBuS i subclassed a str, i want it to do things when i use MyStr $foo = "some string"
12:35 TiMBuS i said constructor because its a constructor in C++. im bad at terminology and just make up my own words. my bad :c
12:35 iblechbot joined #perl6
12:38 cosimo masak: not yet, I started trying sqlite3-test.pl, but that failed.
12:38 cosimo i hope to give it a shot in the next days
12:38 masak let me know how it foes.
12:39 cosimo :)
12:53 NorwayGeek joined #perl6
13:03 masak what's my best bet if I want to track pmichaud's pct-rx branch with git-svn?
13:04 masak should I just check out that branch with git-svn, perhaps? or is there a good mirror somewhere?
13:05 moritz_ masak: checkout out the branch is not hard... I pasted the invocation here yesterday or so
13:05 * masak backlogs
13:05 moritz_ (without the --nometadata)
13:06 * masak sometimes wants http://irclog.perlgeek.de/perl6/yesterday :)
13:06 moritz_ git svn clone -r41479:HEAD  https://svn.parrot.org/parrot/branches/pct-rx/
13:06 masak danke.
13:06 moritz_ bitteschön.
13:11 synth joined #perl6
13:12 ejs joined #perl6
13:13 masak mberends++ # getting going on his blogging app idea \o/
13:19 Juerd masak++  # reminded me to adduser mberends on feather
13:19 masak :)
13:22 masak mberends: I want to defile Temporal one last time. I'd like to add all possible 'obvious' arithmetic operators between DateTimes and Durations. they are $t2 - $t1, $t + $d, $t - $d, -$d, $d * $x, $d / $x, $d1 / $d2, where $t ~~ DateTime, $d ~~ Duration, $x ~~ Real. I think these are unobtrusive, fairly minimal, and possibly very useful. what do you think?
13:26 cxreg joined #perl6
13:26 PerlJam masak: you didn't ask me, but +1 anyway :)
13:26 eiro_ joined #perl6
13:27 bigpresh_ joined #perl6
13:28 masak joined #perl6
13:28 ruoso joined #perl6
13:28 rjh joined #perl6
13:28 krakan joined #perl6
13:28 Rint joined #perl6
13:28 araujo joined #perl6
13:28 [particle] joined #perl6
13:28 dalek joined #perl6
13:28 lambdabot joined #perl6
13:28 gbacon joined #perl6
13:28 omega joined #perl6
13:28 xinming joined #perl6
13:28 PacoLinux joined #perl6
13:28 zerhash joined #perl6
13:28 sjohnson joined #perl6
13:28 allbery_b joined #perl6
13:28 christine joined #perl6
13:28 moritz_ joined #perl6
13:28 pmichaud joined #perl6
13:28 zev joined #perl6
13:28 yves joined #perl6
13:28 baest joined #perl6
13:28 drbean joined #perl6
13:28 Matt-W joined #perl6
13:28 mj41_ joined #perl6
13:28 jiing joined #perl6
13:28 frodwith joined #perl6
13:28 Khisanth joined #perl6
13:28 kolibrie joined #perl6
13:28 Helios- joined #perl6
13:28 phenny joined #perl6
13:28 pugs_svn joined #perl6
13:28 ezra joined #perl6
13:28 avuserow joined #perl6
13:28 cognominal joined #perl6
13:29 masak two other bonus things that I think would do wonders for showing the awesomeness of Rakudo by April: (1) MAIN. (2) a full-fledged, well-thought-out set of types and operations for doing mathy stuff with collections. (Sets, Bags, etc)
13:29 PerlJam what about MAIN?
13:29 masak PerlJam: I want it.
13:29 PerlJam you mean complete with command line options mapped to MAIN's sig?
13:29 masak I mean at all.
13:30 masak 'complete' is that staged acheived some significant time after one adds the first tentative commit.
13:30 masak s/staged/stage/
13:30 PerlJam Well, MAIN already exists, so it's "there"  :)
13:31 Gothmog_ joined #perl6
13:32 masak this is news to me.
13:32 * masak tries
13:33 PerlJam If you make sub MAIN { say "Hi" } it will output "Hi" without calling MAIN explicitly
13:33 masak well, what do you know. :)
13:33 PerlJam But the sig mapping doesn't happen AFAIK
13:33 masak someone++
13:33 PerlJam jnthn++ I think
13:33 PerlJam And why do you think the Set stuff is important?
13:34 masak because, just like the cards example, it makes for awesome code snippets.
13:34 PerlJam er, why do you think it "wonders for showing the awesomeness of Rakudo" ?
13:34 masak s/wonders/would do wonders/
13:34 PerlJam yeah that
13:35 PerlJam I think the first question people are going to ask when Rakudo* is released is "how do I install modules?"
13:35 masak the strength of earlier Perl versions has always been that you can weild very powerful operations, if you only know the basic data types.
13:35 PerlJam and "where can I get Perl 6 modules?"
13:35 masak PerlJam: if no-one does anything drastic, we won't have a good answer to that by April.
13:35 PerlJam I know.
13:36 masak s/weild/wield/
13:36 masak with Perl 6, we introduce some very specific collection types, to cram that extra 10% of exactness/specificity out of the language.
13:37 masak which means that some (already quite impressive) code examples perviously done with hashes and arrays can now be done with the new collection types.
13:37 masak leading to shorter, more readable code.
13:37 masak which both Perl and non-Perl people will be able to admire.
13:40 Matt-W I think Rakudo Star will be able to help catalyse module development by a wider audience
13:40 Matt-W I'm going to make it a goal of mine to have as much of form.pm working as possible for Rakudo Star
13:41 Matt-W Preferably all of the functionality of Damian's implementation
13:41 * masak cheers Matt-W on
13:41 PerlJam Matt-W++
13:41 Matt-W But I won't rule out also doing some other something along the way
13:41 Matt-W I think the most seriously scary thing that comes to mind in Form.pm right now is thousands separators
13:42 Matt-W I haven't figured out how to do that yet
13:43 PerlJam Matt-W: do you have your code so far on github?
13:43 masak Matt-W: it sounds like great fun! if you want to pair up someday, let me know.
13:44 Matt-W PerlJam: yes
13:44 Matt-W masak: :D
13:44 Matt-W If you think they're fun...
13:44 masak I do!
13:44 Matt-W ...you're welcome to help
13:44 masak I wrote a thousands separator for jonalv a while ago.
13:45 Matt-W it's not so much the separators themselves
13:45 masak it's tryicky, but fun!
13:45 Matt-W as parsing the field specs
13:45 Matt-W given that they seem to be able to be whatever you want them to be
13:45 masak sounds like a job for TDD!
13:45 Matt-W but I need to re-read the stuff
13:45 PerlJam Matt-W: what's the URL?
13:46 masak PerlJam: http://github.com/mattw/form
13:46 masak PerlJam: there's also an unworth package manager called 'proto', with whose help such questions become unnecessary...
13:47 masak s/unworth/unworthy/
13:47 PerlJam Apparently I already knew both of these things but had forgotten.
13:48 PerlJam Or perhaps I haven't adequately context-switched to the Perl 6 universe in my brain yet this morning.
13:48 Matt-W :)
13:56 masak rakudo: sub separate($n is copy, $s = 3) { return 0 if !$n; (join ",", reverse gather while $n > 0 { take sprintf "%03d", $n % 10**$s; $n = floor($n/10**$s) }).subst(/^0+/, "") }; say separate 12345678
13:56 p6eval rakudo e38b58: OUTPUT«12,345,678␤»
13:56 masak see? fun! :D
13:57 Matt-W And as I said, that's not the hard bit
13:57 masak guess not.
13:58 Matt-W although it's a rather cooler implementation than I'd probably have come up with
13:58 masak but the hard bit is a perfect match for a TDD-based approach, if you ask me.
13:58 icwiener_ joined #perl6
13:58 Matt-W Feel free to suggest coolification for various other parts of Form.pm already written :)
13:58 masak "working" trumps "cool" :)
13:59 pmurias joined #perl6
14:00 masak it would especially nice to pair up using some shared-workspace technology. SubEthaEdit, for example.
14:00 alec joined #perl6
14:01 felipe joined #perl6
14:01 colomon I keep on wondering if google wave would be an improvement over irc for this sort of thing.
14:01 moritz_ shared screen session + IRC channel?
14:02 PerlJam I don't know what SEE looks like, but I've used gobby for this sort of thing at work.
14:02 colomon but then again, working with moritz over irc the last few days has been easily the best long-distance collaboration I've had in 16 years as a professional programmer.
14:02 * moritz_ blushes
14:02 Matt-W I used to do stuff with SubEthaEdit when I worked on Growl
14:03 Matt-W However, I don't have a Mac these days
14:03 masak I think I tried to install gobby on my Mac a few months ago, and failed.
14:03 athaba joined #perl6
14:06 SmokeMachine joined #perl6
14:07 Matt-W maybe you could try again
14:07 * Matt-W wonders if there's an ubuntu package for it
14:08 Juerd rakudo: (1920/1200).perl.say
14:08 p6eval rakudo e38b58: OUTPUT«8/5␤»
14:08 masak rakudo: sub separate($n, $s = 3) { return 0 if !$n; (join ",", reverse gather for $n ... { floor($^n / 10**3) or () } { take sprintf "%03d", $^n % 10**$s }).subst(/^0+/, "") }; say separate 12345678
14:08 p6eval rakudo e38b58: OUTPUT«12,345,678␤»
14:08 masak slightly nicer solution using the new infix:<...>. moritz_++
14:08 PerlJam Matt-W: for gobby?  there is.
14:09 Juerd Funny. I wanted to know if this was 16:9 or 16:10 and this was the first way I thought of to find out.
14:09 Matt-W PerlJam: excellent
14:09 Matt-W for $n ... { }
14:09 Matt-W what does that do??
14:09 Juerd After reading about Rats in a blog.
14:09 Matt-W and then there's another block right after it
14:09 moritz_ rakudo: say 1920/1200 # 16/10 is easily recognizable as 1.6
14:10 p6eval rakudo e38b58: OUTPUT«1.6␤»
14:10 Matt-W I'm confused
14:10 masak Matt-W: the second block is the normal 'for' block.
14:10 PerlJam Matt-W: the second block is the body of the loop
14:10 masak Matt-W: the first block is the right operand to '...'
14:11 moritz_ Matt-W: 1 ... { ... } execute the closure to generate list items
14:11 PerlJam Matt-W: the first block is the "generator" for ...
14:11 Matt-W aaaaaah
14:11 colomon Juerd: :)
14:11 masak what others said.
14:11 moritz_ still it's a bit ugly to have two blocks in a row
14:12 moritz_ maybe one would use an explicitly lambda instead
14:12 moritz_ for $n ... { ... }  -> $x {  }
14:12 crythias joined #perl6
14:12 PerlJam std: for $n ... { ... }  -> $x {  }
14:12 masak I was mainly positively surprised it parsed. :)
14:12 p6eval std 28527: OUTPUT«Potential difficulties:␤  Variable $n is not predeclared at /tmp/3c3thS6Vsr line 1:␤------> [32mfor $n[33m⏏[31m ... { ... }  -> $x {  }[0m␤ok 00:02 102m␤»
14:13 Matt-W I probably would, because I tend to end up wanting my foor to be named
14:13 Matt-W I will use $_ for short things, but...
14:13 Matt-W sometimes you end up wanting to use two of them :)
14:13 masak I tried to install gobby again, and it failed on some glib version clashes.
14:13 Matt-W doh
14:14 Matt-W and of course nobody bothers making a proper Mac bundle for it because you've got SubEthaEdit
14:14 masak of course.
14:14 Juerd moritz_: Yes, I'd say the 1.6 thing *should have been* the first thing to pop into my mind, but it hasn't... That's what reading about something interesting does to you.
14:15 moritz_ Juerd: so I'm guilty of doing things to your brain - I can live with that :-)
14:15 Juerd :)
14:16 colomon Juerd: Of course, if you did rakudo: say 1920/1200, you're using Rats anyway -- they just print as ugly decimals.
14:16 mberends masak++: I agree with your Temporal suggestions, but "one last time"? That sounds like the Waterfall method ;)
14:16 masak mberends: it just means I don't have any pending edits after that one. :)
14:17 mberends masak: great, so we can try some implementation stuff and then delete anything that's too hard from the spec ;)
14:18 masak sounds good.
14:18 masak it's only speculative anyway.
14:21 justatheory joined #perl6
14:31 Psyche^ joined #perl6
14:36 KyleHa joined #perl6
14:44 diakopter mberends: o
14:44 mberends diakopter: yo
14:44 diakopter (o
14:45 masak is that a boomerang?
14:45 absurddoctor joined #perl6
14:45 masak be careful with that... :)
14:45 colomon smiling cyclops?
14:45 moritz_ [0 # boomerang with sharp edges
14:45 diakopter like \o only with a curvier arm
14:48 diakopter anyone have a clue how to make the PgUp/PgDn keys trigger the backpage/forwardpage in screen, *while at a shell prompt* (but obviously not while in full-console programs such as vim, less)
14:50 [particle] diakopter: that works for me when i enter copy mode via 'C-a ['
14:50 [particle] well, actually for me it's 'C-z [' but by default C-a
14:52 diakopter [particle]: sho' 'nuff; thanks.  that's nicer than C-f, C-b
14:58 alester joined #perl6
15:01 * diakopter trys to quit amateurcrastinating
15:03 * TimToady spent all day yesterday refactoring the symbol tables in STD, and now has the exact same bug TimToady had yesterday morning :/
15:08 nihiliad joined #perl6
15:09 masak the beauty of refactoring!
15:09 masak same bugs, different code.
15:10 TimToady well, should be easier to find the bug now, since the whole point of the refactor was to reduce the tangle of references
15:10 mdxi the AntiHeisenbug pattern: bug persists through all conditions and implementations
15:11 masak TimToady: question from backlog: how do warn and try interact?
15:12 pmurias_ joined #perl6
15:14 TimToady if we try to keep warnings as much like errors as possible, then we resume from the warning in the first try that handles the warning
15:14 TimToady that would imply that try { warn "foo" } supresses the warning, maybe, unless the default in a warning is to print it before resuming
15:15 pmurias_ joined #perl6
15:16 TimToady I could argue that bare try should suppress output, and I can also argue that it shouldn't
15:16 TimToady I am beside myself
15:17 envi^home joined #perl6
15:18 TimToady one could also argue that warnings are control exceptions and largely invisible to normal exception handlers, but that seems perverse
15:19 diakopter s/warn/cry_for_help/
15:19 TimToady so the short answer: Beats me!
15:20 PerlJam diakopter: try { foo; cry "bar" }
15:20 TimToady maybe I should actually backlog
15:20 * PerlJam refactored his office
15:20 zloyrusskiy joined #perl6
15:21 PerlJam while I didn't actually accomplish any "work", I do feel better about my workspace
15:21 masak the essence of the backlog was that I was writing a program, using 'warn' to print debug info, and then became totally surprised when a try block caught something.
15:21 moritz_ maybe warnings should only be exception-like if 'use warnings :FATAL;' or so is in scope
15:21 diakopter diakopter f83d11: OUTPUT«bar␤»
15:22 TimToady think the sanest answer would be to go ahead and trap it like a normal exception, but default to printing it out when caught unless explicitly suppressed somehow
15:23 masak so, print it out and resume?
15:23 PerlJam TimToady: "no warnings;"?  :-)
15:23 masak that worksforme.
15:23 masak S32/Basics should probably be changed to reflect that, then.
15:24 TimToady .oO(How can anything in S32 be "basic"?)
15:25 PerlJam TimToady: because S00 says "skip to S32 for the basics, then go to S01"  :)
15:29 mspaulding joined #perl6
15:33 abra joined #perl6
15:42 drbean joined #perl6
15:55 rfordinal joined #perl6
15:57 rfordinal joined #perl6
15:58 Maddingue joined #perl6
16:02 Maddingue joined #perl6
16:07 * masak reads and enjoys examples/regex/0*.nqp in pct-rx
16:07 masak pmichaud++
16:09 moritz_ just the invocation line is wrong :-)
16:09 moritz_ s{prove}{perl t/harness}
16:11 masak oh, I haven't tried running them... :)
16:12 masak I'm trying to grok what exactly a 'cursor' is in the context of Compiler-Regex...
16:12 PerlJam It's the PC for a regex
16:12 PerlJam (sorta)
16:12 cdarroch joined #perl6
16:13 moritz_ afaict it's the object that stores the state that's associated with the matching progress
16:13 masak this all makes sense.
16:13 masak what makes them especially fast or fitting to the task?
16:13 rfordinal3643 joined #perl6
16:14 abra joined #perl6
16:17 masak aha. new clues. the cursor has something called 'backtracking points', which can be pushed onto it. that sounds pretty.
16:18 masak a backtracking point is adorned with C<rep>, C<pos> and a backtracking C<mark>.
16:18 Maddingue joined #perl6
16:18 stephenlb joined #perl6
16:20 TimToady I think I've decided that warnings are a kind of control exception
16:20 TimToady so completely invisible to try
16:20 TimToady otoh, a quietly {...} block traps warnings, by analogy to try {...}
16:21 PerlJam I always think of warn as a non-fatal die.  but maybe that's just me.
16:23 masak so far, I've thunk of &warn as the $*ERR version of &say :)
16:24 TimToady we probably need a different verb for that
16:24 mj41 joined #perl6
16:25 masak not if the warnings are invisible to try...
16:25 TimToady quietly {...} would still trap them
16:25 masak sure, but then it's intentional.
16:25 PerlJam If we're going to use a different verb, I nominate "cry" like I joked earlier :)
16:25 TimToady info "GOT HERE"
16:25 baest_ joined #perl6
16:26 d4l3k_ joined #perl6
16:26 [particle]1 joined #perl6
16:26 masak in some Perl 6 code I wrote yesterday, I conditionally declared a &DEBUG variable, and then did 'DEBUG "Now this happens"' everywhere.
16:26 TimToady course, then people will ask how they can suppress the crying...
16:27 masak it worked fine both as togglable debug messages, and as documentation.
16:27 Juerd TimToady: no emotion;
16:27 TimToady which doesn't work for "info" unless you get emotional about info
16:28 Juerd info isn't verby enough :)
16:28 Matt-W joined #perl6
16:28 xinming joined #perl6
16:28 frodwith joined #perl6
16:28 diakopter no tantrum;
16:28 PerlJam cry "wolf!"
16:29 Juerd PerlJam: Haha :)
16:29 kolibrie joined #perl6
16:29 Juerd whine? :)
16:29 diakopter no tears;
16:29 masak no emo;
16:29 PerlJam I agree that info isn't verby enough.  It feels more nouny in fact.
16:29 TimToady use ignorance
16:30 diakopter use impunity;  use caprice;
16:30 Juerd What sound does a butterfly make?
16:30 diakopter *FLAP*
16:30 Juerd flap(...) then :)
16:30 PerlJam or introduce a new use-like construct:   be stoic;   # :)
16:30 Juerd Hm. Doesn't work :)
16:30 PerlJam be well;
16:30 diakopter *ALIGHT*
16:31 PerlJam be good;
16:31 PerlJam etc.
16:31 Juerd PerlJam: be brave
16:31 TimToady bore "Let me tell you about my last vacation"
16:32 TimToady trace "monkeying with $x"
16:32 PerlJam oh, trace is nice
16:32 Helios- joined #perl6
16:33 Juerd trace is 5 keys though!
16:33 PerlJam (though some might wonder where the actual trace is)
16:33 Juerd How about all literall q/qq's in void context? :)
16:33 Juerd s/all/al/
16:33 diakopter snore "GOT HERE"
16:33 alester joined #perl6
16:34 * PerlJam still likes 'cry' best  (and not just because I suggested it)
16:34 masak yelp "How did this happen?"
16:34 Juerd +1
16:34 Juerd (for cry)
16:35 rfordinal joined #perl6
16:36 diakopter PerlJam: hey, I suggested it first
16:36 diakopter sorta.
16:37 diakopter whine is good
16:37 PerlJam sure, diakopter++
16:37 PerlJam though cry_for_help is a bit long
16:37 PerlJam :)
16:38 PerlJam cry "havoc!" && slip(@dogs_of_war);
16:39 diakopter tantrum(int $x) is like die(), except it bypasses up to $x levels of CATCH
16:39 diakopter hissy_fit(), pity_party()
16:39 PerlJam Hmm.  you can say  "my @dogs is Array of War;"  yes?   Can it just be "my @dogs of War"?
16:40 PerlJam std: my @dogs of War;
16:40 p6eval std 28527: OUTPUT«[31m===[0mSORRY![31m===[0m␤Confused at /tmp/2HJjrDkdN6 line 1:␤------> [32mmy @dogs of [33m⏏[31mWar;[0m␤    expecting typename␤FAILED 00:02 98m␤»
16:40 diakopter std: my War @dogs
16:40 p6eval std 28527: OUTPUT«[31m===[0mSORRY![31m===[0m␤In "my" declaration, typename War must be predeclared (or marked as declarative with :: prefix) at /tmp/cNdQO0Rtij line 1:␤------> [32mmy War[33m⏏[31m @dogs[0m␤FAILED 00:02 96m␤»
16:40 PerlJam std: my @dogs of ::War;
16:40 p6eval std 28527: OUTPUT«ok 00:02 99m␤»
16:40 diakopter std: class War{}; my War @dogs;
16:40 p6eval std 28527: OUTPUT«ok 00:02 99m␤»
16:40 Khisanth joined #perl6
16:41 PerlJam I don't know why I find that odd.
16:41 ruoso joined #perl6
16:41 PerlJam I guess because it doesn't always work linguisticly if you choose poor names for your typename and/or your variable.
16:43 diakopter std: our ::Huddled @masses
16:43 p6eval std 28527: OUTPUT«ok 00:01 97m␤»
16:43 {newbie} joined #perl6
16:44 Tene joined #perl6
16:45 M_o_C joined #perl6
16:45 rfordinal3643___ joined #perl6
16:51 {newbie} left #perl6
16:53 pugs_svn r28528 | lwall++ | [S04] add statement_prefix:<quietly>
16:53 pugs_svn r28528 | [IO] add "note" function as say to stderr
16:53 pugs_svn r28528 | [Basics] clarify semantics of warning exceptions
16:55 pugs_svn r28529 | lwall++ | [STD] add quietly statement prefix
16:55 PerlJam ah, "note" is excellent too.   In fact, that's what we use in most of our code at work.
16:56 PerlJam (although it does more than just write to STDERR)
17:22 kidd joined #perl6
17:25 [particle]1 howdo you say to stderr as opposed to print?
17:25 [particle] i suppose note is, like warn, like print.
17:26 [particle] and there's only a shortcut for printing with newline to standard out, as that's the most common case.
17:29 dukeleto [particle]: sayf would be pretty cool tho
17:29 [particle] why not add a :quietly adverb to statement_prefixes, rather than adding a try-alike called quietly?
17:29 PerlJam dukeleto: sayf?  say formatted?
17:30 [particle] say to filehandle, perhaps
17:30 PerlJam well, already exists:   $*ERR.say "fooey!"
17:30 PerlJam fewer characters even  :)
17:31 [particle] note warn 'foo'; warn note 'foo';
17:32 [particle] probably prints something like 'foo1foo1' to stderr
17:33 PerlJam with some newlines in there.
17:34 [particle] warn adds newlines?
17:34 PerlJam note does
17:34 [particle] does warn add a backtrace?
17:34 PerlJam I'm not sure
17:38 dukeleto PerlJam: say formatted
17:39 dukeleto so that I could do: sayf "%.2f is bar", 42/7
17:39 PerlJam dukeleto: I'd rather the pythonic %,  say "%.3f" % $foo;
17:39 [particle] yep, note does say, warn does print
17:40 dukeleto PerlJam: that looks like a modulus to my eyes
17:40 PerlJam dukeleto: a string on the LHS is a big clue that it's not :)
17:41 nErVe joined #perl6
17:41 PerlJam say "%d %7.2f %s" % ($alpha, $beta, $gamma);  # looks even less like a modulus now
17:44 TimToady rakudo: say (42/7).fmt("%7.2f"), " is bar"
17:44 p6eval rakudo e38b58: OUTPUT«   6.00 is bar␤»
17:44 zloyrusskiy joined #perl6
17:44 TimToady the pythonic form is bletcherous to my eyes
17:45 TimToady and puts the less important thing in front
17:48 lichtkind joined #perl6
17:48 PerlJam TimToady: say " ".join: $alpha.fmt('%d'), $beta.fmt('%7.2f'), $gamma.fmt('%s');  # isn't too pleasant either.
17:49 PerlJam Though I guess with all the hypers I can make it look pretty
17:49 TimToady why are you using join?
17:49 TimToady when those will interpolate
17:50 PerlJam TimToady: not in rakudo :)
17:50 TimToady *will* ;)
17:50 TimToady you asked me to interpret it, not rakudo :)
17:50 PerlJam in any case, even if iterpolated, it doesn't look pretty.  Too much repetition of fmt()
17:51 TimToady then use sprintf
17:51 TimToady lunch &
17:51 PerlJam yep.  I'm just advocating some small sugar so that I don't have to say "sprintf" :)
18:05 ispy_ joined #perl6
18:08 [particle] statement_prefix words are all over the place: verbs (try, gather, contend, do), adverbs (quietly, maybe), an adjective (lazy), and a jargonistic abbreviation of an adjective (async).  this makes them difficult for me to remember.
18:08 [particle] of course, i forgot lift, too.
18:09 lichtkind_ joined #perl6
18:09 PerlJam What's contend?  I have a vague memory that it's supposed to be teh async replacement
18:10 PerlJam hmm.  I googled for "perl 6 contend" and it give me results with the word "content" highlighted.
18:11 PerlJam dear google, "contend" is not the same as "content"
18:11 zamolxes joined #perl6
18:17 Tene joined #perl6
18:26 mberends joined #perl6
18:28 lichtkind_ pmichaud: hejho
18:34 Rint joined #perl6
18:47 moritz_ joined #perl6
18:49 moritz_ PerlJam: ack/grep the spec is better than google in this case :-)
18:55 silug joined #perl6
19:06 rfordinal joined #perl6
19:16 dalek rakudo: 6c4babd | pmichaud++ | docs/spectest-progress.csv:
19:16 dalek rakudo: spectest-progress.csv update: 436 files, 15956 (71.9% of 22180) pass, 0 fail
19:16 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/6c4babd584e3aa7c0ce4457c73a9596bc0746ebf
19:18 am0c joined #perl6
19:20 Confield_ joined #perl6
19:22 crythias joined #perl6
19:41 pugs_svn r28530 | mberends++ | [sprixel/Test.pm.js] change 'nok' to 'not ok' as failure message
19:42 pugs_svn r28531 | diakopter++ | [sprixel] Lists are Lists, not Arrays; make flattening work on List_assignment
19:43 pugs_svn r28532 | diakopter++ | [sprixel] sigh. comment time elapsed.
19:47 diakopter sprixel: my @a=2,4,6; my $b = sub { @a = map { $_*$_ }, @a }; say $b(); say $b(); say $b(); say $b(); say $b(); say $b();
19:47 p6eval sprixel 28529: OUTPUT«41636␤162561296␤256655361679616␤6553642949672962821109907456␤4294967296184467440737095516167958661109946400884391936␤1844674407370955161634028236692093846346337460743176821145663340286662973277706162286946811886609896461828096␤»
19:50 diakopter perl6: my @a=11; my $b = sub { @a = map { $_*$_ }, @a }; say $b(); say $b(); say $b(); say $b();
19:50 p6eval elf 28532: OUTPUT«Use of uninitialized value $_ in multiplication (*) at (eval 126) line 6.␤Use of uninitialized value $_ in multiplication (*) at (eval 126) line 6.␤Undefined subroutine &GLOBAL::map called at (eval 126) line 6.␤ at ./elf_h line 5881␤»
19:50 p6eval ..rakudo 6c4bab: OUTPUT«121␤14641␤214358881␤4.59497298635722e+16␤»
19:50 p6eval ..pugs, sprixel 28532: OUTPUT«121␤14641␤214358881␤45949729863572161␤»
19:55 Chillance joined #perl6
19:58 athaba_ joined #perl6
20:04 payload joined #perl6
20:10 PZt joined #perl6
20:28 athomason joined #perl6
20:29 elbeho joined #perl6
20:30 moritz_ diakopter: why don't you make the "time elapsed" output only if a certain environment variable is set?
20:30 moritz_ diakopter: that way you don't have to remeber to comment it in and out for testing/committing
20:30 diakopter moritz_: :D 'tis a good idea
20:31 moritz_ or a command line switch maybe
20:31 diakopter std: loop (my $a=0; $a > 1;){}; say $a;
20:31 p6eval std 28532: OUTPUT«ok 00:03 106m␤»
20:31 diakopter pugs: loop (my $a=0; $a > 1;){}; say $a;
20:31 p6eval pugs: OUTPUT«0␤»
20:31 diakopter rakudo: loop (my $a=0; $a > 1;){}; say $a;
20:31 p6eval rakudo 6c4bab: OUTPUT«0␤»
20:31 diakopter rakudo: loop (my $a=1; $a > 1;){}; say $a;
20:31 p6eval rakudo 6c4bab: OUTPUT«1␤»
20:31 diakopter ok
20:32 moritz_ it feels a bit weird that the scope is not restricted to the block of the loop
20:32 moritz_ in that sense loop is a really an archaic control structure
20:32 * diakopter guessed that it derived a new one (and was about it commit it that way) until it occured to me to test pugs/rakudo
20:35 diakopter and std, I mean.  note that I tested std first.
20:35 diakopter :)
20:38 jaffa8 joined #perl6
20:40 pugs_svn r28533 | diakopter++ | [sprixel] implement loop(;;){}
20:40 diakopter sprixel: my $a=0; loop (; $a < 3;){ say $a++ }; say $a
20:40 p6eval sprixel 28532: OUTPUT«0␤1␤2␤3␤»
20:41 diakopter sprixel: loop (my $a=0; $a < 3;++$a){ say $a }; say $a
20:41 p6eval sprixel 28532: OUTPUT«0␤1␤2␤3␤»
20:41 diakopter sprixel: loop (;;){}
20:42 jaffa8 What is sprixel?
20:42 p6eval sprixel 28532: OUTPUT«execute(): execute error: undefined not yet implemented; srsly!!?!?␤last: statementlist␤phase,postDo,eval_args,invoker,context at sprixel.pl line 89.␤»
20:42 diakopter purl, sprixel?
20:42 jaffa8 I bet your pardon?
20:42 diakopter purl, sprixel is an anagram of perlsix
20:42 diakopter sorry, I'm pretending to teach a bot who's not even here.
20:43 diakopter it's a Perl 6 interpreter we're writing in JavaScript
20:43 jaffa8 Who is "we"?
20:43 diakopter well it's entirely dependent on ++TimToady's standard grammar/parser
20:43 diakopter so TimToady
20:43 diakopter and mberends
20:43 diakopter and myself
20:44 diakopter and moritz
20:44 diakopter heh
20:44 jaffa8 How can it depend on it if you use javascript?�
20:44 diakopter perl (5) is the host process, and it dynamically loads Google's V8 JS engine through an XS extension
20:45 jan joined #perl6
20:45 mberends jaffa8: do you keep a local copy of the pugs repository?
20:45 diakopter STD and TimToady's `viv` emit the AST to a Perl data structure, and ToJS emits to JS
20:46 jaffa8 mberends, I have a copy,,, not the latest.
20:47 mberends jaffa8: all of sprixel can be found in a recent copy of pugs/src/perl6
20:48 jaffa8 Why? Should not it be separate?
20:48 jaffa8 from pugs?
20:48 moritz_ just because it's in the pugs repo doesn't mean it depends pugs
20:49 diakopter there are *many* Perl6-related in the pugscode svn repo
20:49 diakopter projects
20:49 diakopter dropped a there
20:49 jaffa8 that does not look a good idea to me.
20:49 mberends because it's very small and relates to STD, viv and so on
20:50 moritz_ it turned out to be a very good breeding pool for ideas and projects
20:50 mberends it does look like a good idea us. we could move it if  we felt like it, but we don't
20:51 moritz_ (does anybody want to write a commitbit backend for hugme? then we could truely invite commiters via IRC)
20:52 jaffa8 So how is 5136724 going?
20:52 * diakopter looks around
20:53 diakopter is that a phone number?
20:53 mberends huh?
20:53 moritz_ no better or worse than ffe648124f2c973e60d68fdec88438562d37411e ;-)
20:53 jaffa8 it is designation of a permutation.
20:54 Chillance joined #perl6
20:54 diakopter moritz_: you're netsplit from chanserv
20:54 diakopter it seems.
20:54 * moritz_ feels innocent
20:55 diakopter oh nm; my bad.
20:55 diakopter there
20:55 moritz_ there's a life beyond doughnuts ;-)
20:55 jaffa8 5=s,1=p,3=r,6=i,7=x,2=e,4=l......
20:56 mberends jaffa8: :) it's going very nicely
20:56 jaffa8 perlsix -> sprixel, 5136724
20:56 diakopter heh
20:57 diakopter true.
20:57 diakopter hmm, loop(;;){} needs next,last
20:58 am0c joined #perl6
20:59 diakopter moritz_: both rakudo & pugs interpret 'last' in loop(;;last){} as referring to the loop, but pmichaud mentioned something about expecting them to apply to the outer .... help?
21:00 jaffa8 diakopter, what is the motivation
21:00 jaffa8 ?
21:00 am0c OH HAI
21:00 mberends jaffa8: if you could install google's V8 Javascript engine, you could help us test sprixel. http://svn.pugscode.org/pugs/src/perl6/sprixel/ instructions in the README
21:01 diakopter jaffa8: a personal challenge, some... fun, also.  It's ended up applying pressure on STD in different places than previously...
21:01 colomon joined #perl6
21:02 moritz_ rakudo: say NaN**0
21:02 p6eval rakudo 6c4bab: OUTPUT«1␤»
21:02 colomon that's wrong, isn't it?
21:02 colomon (sorry to just walk into the chatroom and say that...)
21:03 diakopter moritz_: thoughts on last ^^
21:03 diakopter "last"
21:03 mberends colomon: for some value of math, (anything ** 0) == 1
21:04 colomon mberends: but NaN is specifically the "something went wrong" flag.
21:04 jaffa8 diakopter, what does appying pressure mean in this context?
21:04 colomon rakudo: say NaN * 0
21:04 p6eval rakudo 6c4bab: OUTPUT«NaN␤»
21:04 jaffa8 I have never heard of that expression used in your way.
21:05 colomon Losing track of NaN is a Bad Thing.
21:05 moritz_ diakopter: no idea, sorry
21:05 moritz_ colomon: agreeded
21:05 mberends colomon++, ok, in that case NaN must be misunderstood somewhere
21:06 diakopter jaffa8: figuratively, meaning sprixel is testing things that were not as easy to test previously just by writing test cases
21:06 moritz_ NaN is notionally not "an unknown number", but rather "the result of an operation that made no sense"
21:06 diakopter so it is "pushing" on those spots of STD that need attention
21:06 mberends jaffa8: imagine how well you could understand a language if you tried to implement it yourself. that's my motivation...
21:07 diakopter o yeah. forgot to mention that for myself, too.  implementing is learning.
21:07 Tene I implemented a significant piece of Ruby, with Cardinal.
21:07 jaffa8 mberends, I do not have to imagine, I have similar experience.
21:07 Tene I know Ruby a lot better than I did before.
21:07 Tene (which was none)
21:08 am0c__ joined #perl6
21:08 jaffa8 Tene, I believe you.
21:09 jaffa8 but what is cardinal?
21:09 Tene jaffa8: a Ruby compiler for Parrot.
21:09 Tene jaffa8: I've abandoned it, and a few other people have picked it up.
21:10 moritz_ treed++
21:13 jaffa8 diakopter, do you have a test suite
21:13 jaffa8 ?
21:13 mberends jaffa8: that's also in the pugs repo
21:14 jaffa8 what is "that"?
21:14 mberends the test suite, the subject of your last question
21:14 diakopter the Perl 6 spectest suite (speculatification, I mean speculation, I mean specification, test sutie)
21:16 jaffa8 Why do you need a tester than?
21:16 jaffa8 than-> then
21:17 mberends jaffa8: sprixel is at such an early stage of development that it cannot execute many of the spectests yet.
21:17 mberends therefore we're testing it informally at first, just trying out which functions work and which ones don't
21:19 jaffa8 Just to clarify, the interpreter is in Javascript
21:19 jaffa8 Is that correct?
21:19 mberends yes
21:20 mberends and V8 compiles JavaScript to run it much faster
21:20 mberends http://code.google.com/p/v8/
21:21 diakopter though the interpreter could just as easily have been in Perl 5, certain JS language features (the prototype system of cascading/inheriting objects) I felt would provide great ways to implement certain Perl 6 language features.
21:22 colomon moritz_: Is that NaN ** 0 == NaN thing in the spectests?
21:22 jaffa8 sprixel: 3*3
21:22 p6eval sprixel 28533:  ( no output )
21:22 jaffa8 sprixel: print 3*3
21:22 p6eval sprixel 28533:  ( no output )
21:23 moritz_ S32-num/power.t
21:23 moritz_ 34:#?rakudo todo 'NaN**0 should be NaN'
21:23 moritz_ 35:is(NaN ** 0, NaN, "NaN**0=NaN");
21:23 jaffa8 moritz_, Is there plan to speed up rakudo?
21:23 diakopter sprixel doesn't know "print" :)  you can use "say" instead
21:23 moritz_ jaffa8: yes
21:23 jaffa8 sprixel: say 3*3
21:24 p6eval sprixel 28533: OUTPUT«9␤»
21:24 moritz_ on various levels, actually
21:24 jaffa8 sprixel: say 3*3+3
21:24 p6eval sprixel 28533: OUTPUT«12␤»
21:24 jaffa8 moritz_, what is the time frame of those?
21:25 moritz_ jaffa8: on the parrot level we expect the PCC refactor to land before the 2.0 or 2.6 release
21:25 moritz_ I don't know what the expected time frame for the pct-rx branch is, but it's certainly "this year" (that one should give us improved parse speed)
21:26 cosimo_ joined #perl6
21:26 jaffa8 How much improvement do you expect?
21:27 moritz_ no idea.
21:27 jaffa8 what is PCC?
21:27 moritz_ "parrot calling conventions"
21:27 moritz_ how to invoke C subroutines from PIR, and vice versa
21:28 jaffa8 I ese
21:30 jaffa8 I am surprised that parser uses pcc
21:30 jaffa8 Is it not written in Perl?
21:30 mberends no
21:30 moritz_ no, PGE is written in PIR (mostly)
21:31 moritz_ but everything that uses PIR also uses PCC under the hood
21:31 jaffa8 or in NQP?
21:31 moritz_ basically everything that runs on top of parrot.
21:32 jaffa8 ok
21:36 zamolxes joined #perl6
21:36 Confield_ left #perl6
21:37 moritz_ did anybody try to move infix:<==> to the setting yet?
21:39 Whiteknight joined #perl6
21:45 rfordinal left #perl6
21:46 Intensity joined #perl6
21:49 tak11 joined #perl6
21:54 kidd joined #perl6
21:59 pugs_svn r28534 | moritz++ | [t/spec] test for $thing ~~ Complex; also switch smartmatch.t to planless testing
22:13 hercynium joined #perl6
22:14 KyleHa joined #perl6
22:14 elbeho left #perl6
22:16 ispy_ joined #perl6
22:17 rdice joined #perl6
22:17 justatheory joined #perl6
22:22 pugs_svn r28535 | diakopter++ | [sprixel] implement next, last inside loop(;;){}.  todo next:  while(){}
22:24 diakopter sprixel: my $a=0; loop (; $a < 3;$a++){ next; say $a++ }; say $a;
22:24 p6eval sprixel 28534: OUTPUT«3␤»
22:24 diakopter sprixel: my $a=0; loop (; $a < 3;last){ say $a++ }; say $a;
22:24 p6eval sprixel 28534: OUTPUT«0␤1␤»
22:24 diakopter kewl.
22:26 [particle]1 joined #perl6
22:27 diakopter er
22:27 TimToady obo?
22:28 TimToady nevermind
22:28 TimToady didn't see the last
22:30 diakopter pugs: my $a=0; loop (; $a < 3;last){ say $a++ }; say $a;
22:30 p6eval pugs: OUTPUT«0␤»
22:30 diakopter rakudo: my $a=0; loop (; $a < 3;last){ say $a++ }; say $a;
22:30 p6eval rakudo 6c4bab: OUTPUT«0␤1␤»
22:30 diakopter <whew>
22:31 quietfanatic joined #perl6
22:32 diakopter std: loop (3;){} # unclear error msg?
22:32 p6eval std 28534: OUTPUT«[31m===[0mSORRY![31m===[0m␤Missing block at /tmp/8gzlI3kJog line 1:␤------> [32mloop (3;[33m⏏[31m){} # unclear error msg?[0m␤    expecting any of:␤    noun␤   prefix or noun␤     standard stopper␤ term␤   terminator␤       whitespace␤FAILED 00:01 101m␤»
22:34 diakopter std: while (1) { say 1 };
22:34 p6eval std 28534: OUTPUT«ok 00:01 102m␤»
22:34 diakopter std: while (1){ say 1 };
22:34 p6eval std 28534: OUTPUT«[31m===[0mSORRY![31m===[0m␤Missing block (apparently gobbled by undeclared routine?) at /tmp/WBsxXP7bze line 1:␤------> [32mwhile (1){ say 1 }[33m⏏[31m;[0m␤    expecting any of:␤     parameterized block␤      standard stopper␤ terminator␤     whitespace␤FAILED 00:01 100m␤»
22:34 diakopter std: loop (;;) {}; loop (;;){}
22:34 p6eval std 28534: OUTPUT«ok 00:02 104m␤»
22:35 quietfanatic I thinks you're trying to postfix:<{ }> the (3;)
22:35 diakopter I think for loop (3;){} it's referring to the e1,e2,e3 as blocks
22:35 synth joined #perl6
22:35 quietfanatic Here I'm guessing (;;) cannot be parsed as an expression, so it decides its a loop statement.
22:36 quietfanatic std: loop (3;) {}
22:36 p6eval std 28534: OUTPUT«[31m===[0mSORRY![31m===[0m␤Missing block at /tmp/ObpFDEQVDS line 1:␤------> [32mloop (3;[33m⏏[31m) {}[0m␤    expecting any of:␤        noun␤   prefix or noun␤     standard stopper␤ term␤   terminator␤       whitespace␤FAILED 00:02 101m␤»
22:36 quietfanatic Oh, hm.
22:36 diakopter std: loop () {}
22:36 p6eval std 28534: OUTPUT«[31m===[0mSORRY![31m===[0m␤Missing block at /tmp/YntP3yNjL3 line 1:␤------> [32mloop ([33m⏏[31m) {}[0m␤    expecting any of:␤  noun␤   prefix or noun␤     standard stopper␤ term␤   terminator␤       whitespace␤FAILED 00:01 101m␤»
22:36 quietfanatic Yeah, I think so.
22:36 diakopter std: loop (loop;loop;loop) {}
22:36 p6eval std 28534: OUTPUT«Undeclared routine:␤   loop used at line 1,1,1␤ok 00:01 97m␤»
22:37 diakopter loop-dee-loop-dee-loop
22:37 quietfanatic std: loop (loop {}; loop {}; loop {}) {}
22:37 p6eval std 28534: OUTPUT«Undeclared routine:␤   loop used at line 1,1,1␤ok 00:02 97m␤»
22:37 quietfanatic Hrm.  Only expressions allowed.
22:38 diakopter std: loop ((loop (;;) {});;) {}
22:38 p6eval std 28534: OUTPUT«ok 00:02 104m␤»
22:38 diakopter hee hee
22:39 quietfanatic Heh. That could be really abused, but then, what can't?
22:39 diakopter but my point with   while (1){}  is that std requires a space between ) and {, but not when it's loop
22:39 quietfanatic std: loop ((loop {});(loop {});(loop {})) {}
22:39 p6eval std 28534: OUTPUT«ok 00:01 99m␤»
22:39 quietfanatic The (;;) is implied if left out.
22:39 quietfanatic But parens allow a statement inside.
22:41 pugs_svn r28536 | diakopter++ | [sprixel] implement loop {}
22:42 diakopter sprixel: my $a=0; loop { $a++ < 4 || last }; say $a
22:42 p6eval sprixel 28534: OUTPUT«5␤»
22:42 diakopter quietfanatic: I'm referring to while (1) {}
22:43 diakopter oh, it's b/c () aren't required around the condition when it's a while... that's a grammar ambiguity
22:43 diakopter std: while (1) {}; while (1){};
22:43 p6eval std 28534: OUTPUT«[31m===[0mSORRY![31m===[0m␤Missing block at /tmp/Xom5U84PE9 line 1:␤------> [32mwhile (1) {}; while (1){}[33m⏏[31m;[0m␤    expecting any of:␤  parameterized block␤      standard stopper␤ terminator␤     whitespace␤FAILED 00:02 102m␤»
22:44 diakopter std: while (1) {}; while (1){} {};
22:44 p6eval std 28534: OUTPUT«ok 00:02 102m␤»
22:44 quietfanatic Of course if you try to run that...
22:45 quietfanatic rakudo: while (1){} {last}
22:45 p6eval rakudo 6c4bab: OUTPUT«Method 'postcircumfix:{ }' not found for invocant of class 'Int'␤»
22:47 mikehh joined #perl6
22:48 quietfanatic_ joined #perl6
22:50 pugs_svn r28537 | mberends++ | [sprixel] incomplete harness that will skip tests enumerated in spectest.data
22:54 mberends basic fudging works, the analysing of TAP output is still to be done
22:55 mberends 'make -f sprixel.mk spectest' gives an idea of how it operates
22:57 mberends more powerful fudging (eg entire blocks) will follow
22:58 diakopter mberends: do you want to learn more about the interpreter architecture?  I implemented some powerful control flow things when making next/last work
22:58 diakopter (and no they're not formalized as control flow exceptions, but they trivially could be later)
22:59 mberends diakopter: definitely. I was planning to try adding comments of how I thought the main control flow runs, for your review/correction.
22:59 mberends I think the source code is a better place for explanations than this channel
23:01 mberends I *must* sleep before returning to $work, will svn up before commuting &
23:02 diakopter the key part of the interaction between the subs in builtins.js and the runloop in interp.js is the "continuation" variable in interp().  the "jssub" is a special internal "type" that stores a reference to a js function... if one of those functions (such as do_next(){} or do_last(){}) returns something when executed, that something is treated as the next operation for the runloop to invoke, otherwise it continues on as per usual (such as the jssub "say",
23:02 diakopter that something is treated as the next operation for the runloop to invoke, otherwise it continues on as per usual (such as the jssub "say", which doesn't monkey with the control flow)
23:03 mberends I got that, it  must be one of the possible implementations of CPS
23:03 diakopter I explain these things, b/c all the "keywords" as they're received from STD, can be implemented just as if they're perl6 sub calls
23:04 * diakopter belays the snowstorm
23:04 TimToady 'night mberends
23:05 mberends 'nite TimToady, diakopter :)
23:10 mj41_ joined #perl6
23:28 pugs_svn r28538 | diakopter++ | [sprixel] implement while ConditionExpr {}
23:29 diakopter sprixel: my $a=0; while $a < 10 { ++$a; if $a > 3 { next }; say $a }; say $a;
23:29 p6eval sprixel 28537: OUTPUT«1␤2␤3␤10␤»
23:29 diakopter yay for essentially complete parsers
23:30 diakopter and their authors/maintainers
23:30 TimToady finally nailed my import bug, I think; testing...
23:38 simcop2387 joined #perl6
23:42 synth^2 joined #perl6
23:47 justatheory joined #perl6
23:57 pugs_svn r28539 | lwall++ | [STD,Cursor] implement internal import correctly
23:57 pugs_svn r28539 | [Cursor] reorganize methods into appropriate sections
23:57 pugs_svn r28539 | [CORE.setting] remove import hack now that import works
23:57 pugs_svn r28539 | [CORE.pad] fix parsefail
23:58 diakopter ++TimToady while 1

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

Perl 6 | Reference Documentation | Rakudo