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