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: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
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