Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2008-09-23

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:16 Khisanth moritz_: for a community rewrite it seems to be keeping Larry pretty busy
00:48 PerlJam Khisanth: He has the most experience in language design.
00:51 ptman joined #perl6
00:56 ptotterm joined #perl6
01:14 Ontolog joined #perl6
01:23 Alias_ joined #perl6
01:54 Ontolog joined #perl6
02:02 alester_ joined #perl6
02:52 meppl joined #perl6
02:58 meppl good night
03:19 langri joined #perl6
03:35 Khisanth PerlJam: for some things a dictatorship is better than a democracy :P
03:35 Khisanth hmm dictatorship is the wrong word ...
04:00 Ontolog Khisanth: Technocracy?
04:01 Khisanth I was looking for something that is like a dictatorship but not exactly
04:01 Ontolog Oligarchy?
04:01 Ontolog like dictatorship but more than one person is at the top
04:02 Khisanth no the one person at the top part is important :)
04:02 fullermd Autocracy
04:02 Ontolog yes that would be it
04:03 Ontolog i guess it's the non-negative sounding form of 'dictatorship'?
04:08 Khisanth enlightened despotism :)
04:09 kanru joined #perl6
04:31 Southen_ joined #perl6
04:39 diakopter monarchy...?
04:40 diakopter there, monarchy. ;)
04:42 diakopter [lack of] apologies in advance for the [OT] message.. but please PM me if you're interested in owning the perlblog.org domain name.  it's zero-currency to one I deem worthy, or even just willing.
05:16 iblechbot joined #perl6
05:17 slavik joined #perl6
05:18 Ontolog split patch incoming
05:26 slavik does anyone have a working grammar example?
05:28 slavik ie: how to match a string against a grammat
05:28 slavik grammar*
05:29 Ontolog pmichaud or moritz_ please see the reopened http://rt.perl.org/rt3/Ticket/Display.html?id=59184
05:30 lambdabot Title: #59184: Some fixes to split methods
05:30 Ontolog i added the new patch there
05:35 PerlJam Ontolog: you're *still* hacking on split()?  I thought you had that finished.
05:35 Ontolog PerlJam: nope, some things didn't work correctly
05:35 PerlJam Well, Ontolog++ for all the split hacking.
05:36 PerlJam And another Ontolog++ for good measure
05:36 Ontolog haha :p thanks it's not a big deal
05:36 Ontolog actually there is still some more split hacking to do
05:36 PerlJam Ontolog: except that someone has to do it and it's you  :)
05:36 Ontolog since now Str.split(Regex) can return a list of Match objects in the event that Regex contains capture groups
05:36 Ontolog haha thanks
05:37 slavik do grammars work in pugs?
05:38 PerlJam Ontolog: doesn't it just return the one match object that corresponds to $/ and it turns into a list or whatever based on context?
05:38 PerlJam (i.e., MMD could handle the listification I think)
05:39 Ontolog oops I was getting it confused with comb
05:39 Ontolog comb is the one that wants to return a list of Matches for capture groups
05:39 slavik *** Cannot parse regex:  <word>
05:39 slavik err ... am I doing something wrong?
05:39 Ontolog I see from S29 about split: As with Perl 5's split, if there is a capture in the pattern it is returned in alternation with the split values. Unlike with Perl 5, multiple such captures are returned in a single Match object.
05:40 Ontolog this also isn't finished
05:40 PerlJam slavik: I don't think pugs ever grew the ability to handle grammars and such.
05:40 Ontolog so actually a bit of work still needs to be done on split
05:40 slavik oh ... that would explain much ...
05:40 Ontolog also some things about splitting filehandles and arrays and the like
05:40 Ontolog slavik: Rakudo  has it pretty well implemented because it is a req. for Parrot itself
05:41 Ontolog err I should say, Rakudo doesn't implement it since Parrot does
05:41 Ontolog so, use Parrot / Rakudo ;-)
05:41 slavik heh, rakudo is funny
05:41 slavik printing only 10 characters of context ...
05:42 slavik Statement not terminated properly at line 10, near "token sche"
05:42 Ontolog Funny like "haha I'm a clown funny" or funny like your face?
05:42 slavik it also seems to want semi-colons after closing brace
05:42 Ontolog really??
05:42 slavik I think so
05:42 Ontolog i'm actually not so familiar with writing real perl 6 code in rakudo so i wouldn't know
05:43 Ontolog but i'm pretty sure it doesn't need semi-colons after closing braces on things like if { } while { } etc
05:43 PerlJam slavik: sometimes it does, but only when necesary  :)
05:43 Ontolog you can see the code in the test suite
05:43 Ontolog (which is in the pugs repo)
05:43 PerlJam Ontolog: your diff has this ...
05:43 PerlJam + if has_count goto handle_count
05:43 PerlJam + handle_count:
05:44 PerlJam wihch is weird  :)
05:44 PerlJam s/wih/whi/
05:44 Ontolog hm let me see
05:46 Psyche^ joined #perl6
05:46 Ontolog PerlJam: yeah that's wrong, thanks for catching that
05:46 Ontolog PerlJam: it should read: unless has_count goto positive_count
05:47 Ontolog i will update the ticket
05:47 PerlJam make sure to do it in both places.
05:48 PerlJam (i.e., I'm sure you realize that you use that same bit of code in two places)
05:48 PerlJam anyway, I've got some other hacking to do tonight, but soon (next couple of weeks), I too should be hacking on rakudo (again)
05:49 * PerlJam *poof*
05:49 Ontolog cool, see you then ;-)
05:57 slavik hmm, I make parrot crash :(
05:57 pasteling Someone at 67.100.227.140 pasted "grammar attempt ..." (9 lines, 143B) at http://sial.org/pbot/32271
05:57 Ontolog yes probably pretty easy to do that at this point
05:57 Ontolog lots of things still going on
05:57 slavik right
05:58 slavik I mean, m:P5// works, but I want to try out grammars, 'cause they are friggin cool
05:58 slavik that's my paste, am I doing something wrong?
06:22 Ontolog slavik: I'm not too sure... is test::chars right?
06:23 Ontolog I thought :: was the namespace / class name seperator
06:23 Ontolog would it be test.chars?
06:23 Ontolog try that
06:27 slavik nope
06:27 slavik I think the pugs code for parsing Perl6 regex is not finished or something
06:35 clintongormley joined #perl6
06:38 Ontolog oh this is from pugs?
06:38 Ontolog i said use Rakudo!!!
06:39 slavik parrot crashes
06:40 slavik rather ... statement not properly terminates
06:40 slavik terminated
06:40 pasteling "slavik" at 67.100.227.140 pasted "#!/usr/local/bin/pugs my $str" (34 lines, 1.9K) at http://sial.org/pbot/32274
06:49 Ontolog i was getting some issues aboutthat stuff before
06:49 Ontolog slavik: try this: make realclean; make; cd languages/perl6; make; run your stuff again
06:49 Ontolog no no
06:49 Ontolog first
06:49 Ontolog svn update
06:49 Ontolog then do the above
06:50 slavik you mean perl Makefile.PL, right?
06:51 Ontolog oops no i mean this:
06:52 Ontolog make realclean; svn update; perl Configure.pl; make
06:52 slavik k
06:52 Ontolog so that in the parrot directory
06:52 Ontolog then: cd languages/perl6; make
06:54 slavik can I do make reallyinstall? or
06:54 slavik or no*?
06:57 slavik This is Rakudo Perl 6, revision 31356 built on parrot 0.7.1-devel
06:57 slavik too few arguments passed (1) - 2 params expected
06:57 slavik err ...
06:59 slavik hmm, latest revision is broken?
08:04 pmurias joined #perl6
08:12 slavik any dreams about when a production perl6 interpreter is ready?
08:12 braceta joined #perl6
08:14 moritz_ dreams... many
08:14 moritz_ "by christmas", but I fear not this christmas ;)
08:19 pmurias slavik: depends what are you willing to use in production
08:35 zamolxes joined #perl6
08:43 elmex joined #perl6
09:02 pmurias moritz_: will you add smop to the evalbot once we have pugs -Bm0ld working?
09:03 moritz_ pmurias: sure
09:05 Ontolog slavik: there is absolutely no "production" ready perl6, not now and not for a couple years imo
09:06 Ontolog moritz_: do you think http://rt.perl.org/rt3/Ticket/Attachment/475076/221000/split.diff is good?
09:06 lambdabot Title: Login
09:07 Ontolog if so i am looking forward to a patch before i go on to implementing some other split features
09:10 moritz_ looks fine, from a quick glance
09:13 moritz_ Ontolog: with this patch three tests fails
09:13 moritz_ not ok 18 - values matched for: Negative limit returns empty List
09:13 moritz_ not ok 19 - split created the correct value amount for: Zero limit returns empty List
09:13 moritz_ not ok 20 - values matched for: Zero limit returns empty List
09:14 Ontolog yes
09:14 Ontolog because as you said those tests are wrong, gotta update them
09:14 moritz_ I never talked about zero limit
09:15 pugs_svn r22314 | moritz++ | [t/spec] limited splits return the rest of the string in the last chunk
09:15 moritz_ I don't know what it's supposed to return
09:15 moritz_ I just know about the case with positive count
09:16 iblechbot joined #perl6
09:17 moritz_ I'll ask p6l
09:24 moritz_ anyway, since it's a weird edge case I think it's ok for now to skip the tests, and apply the patch
09:26 pugs_svn r22315 | moritz++ | [t/spec] fudge non-specced split tests
09:27 rakudo_svn r31358 | moritz++ | [rakudo] correct Str.split with $limit argument, Ontolog++
09:27 rakudo_svn r31358 | moritz++ | Patch courtesy by Chris Davaz
09:30 moritz_ Ontolog: you're now in parrot's CREDIT file ;)
09:38 pmurias moritz_: does make test for pugs work for you?
09:39 moritz_ pmurias: you mean on p6eval's server?
09:40 pmurias at all ;)
09:40 * moritz_ tries
09:41 moritz_ on the laptoop where I usually work I don't have a new GHC6, so I have to check somewhere else...
09:41 moritz_ nope, does not
09:41 moritz_ make[1]: Entering directory `/home/evalenv/pugs/ext/Algorithm-TokenBucket'
09:41 moritz_ Makefile:521: *** target pattern contains no `%'.  Stop.
09:41 pmurias a harness error?
09:42 * pmurias hates generated Makefiles
09:43 moritz_ I'll try with a realclean on another machine
09:45 pmurias audreyt: ping
09:45 Ontolog cool, thanks. i'll update the test asap, btw, the case with limit = 0 is in perl 5 docs on split. If LIMIT is unspecified or zero, trailing null fields are stripped
09:45 Ontolog which implies that 0 == as if limit was not specified
09:45 Ontolog at least strongly infers it
09:47 moritz_ yes, but Perl 6 has a different mechanism of saying "as many as possible", so it doesn't make sense to use the old convention
09:47 moritz_ you can use a star * to mean "arbitrarily many"
09:47 moritz_ so it doesn't make sens to continue abusing the old way
09:48 moritz_ pmurias: on the other machine I get a harness error
09:48 moritz_ t/01-sanity/01-tap.......................................ok 1/10Can't use an undefined value as an ARRAY reference at inc/Test/Harness.pm line 344.
09:49 pmurias same as i do
10:12 smg joined #perl6
10:18 Ontolog moritz_: did you update split-simple.t with something like <<<<<<< .mine ?
10:19 moritz_ Ontolog: no. That's because you made local modifications to the file in the same parts that I changed
10:19 moritz_ Ontolog: so you've got a merge conflict, which you have to fix manually
10:20 Ontolog i thought i already commited my stuff before
10:20 Ontolog ok
10:20 Ontolog U    t/spec/S29-str/split-simple.t
10:20 Ontolog shouldn't there be a different letter than U in case of a merge conflict?
10:20 moritz_ yes, a C
10:22 Ontolog ohh i know what happened
10:24 Ontolog moritz_: i see you updated the tests for me, is there anything else i should add there?
10:25 moritz_ Ontolog: we could use some tests with regexes that produce zero-width matches
10:26 moritz_ Ontolog: also tests where the regex has a capture, in which case the splitted items should be mixed with the match objects
10:32 Ontolog yes well the latter should certainly fail atm
10:32 Ontolog this is one of the things i am to work on next
10:32 * Ontolog also has to update comb to return lists of Match objects in case of capture groups
10:33 moritz_ well, that might block on one of the rakudo/PCT bugs
10:42 Ontolog ooh that's too bad
10:43 Ontolog but if it's possible with split why not comb?
10:43 Ontolog in split we are interspersing Match objects but in comb we would return only Match objects
10:44 moritz_ I don't know if it would be possible with either
10:44 moritz_ but the tests should be written (and TODE'ed) anyway
10:45 pmurias joined #perl6
10:49 pjcj joined #perl6
10:52 Ontolog i see
10:52 Ontolog well time to go home!
10:52 * Ontolog &
10:55 wknight8111 joined #perl6
11:12 pmurias_ joined #perl6
11:15 charsbar joined #perl6
11:27 [1]Maghnus joined #perl6
11:35 jferrero joined #perl6
11:53 Ontolog joined #perl6
12:07 masak joined #perl6
12:15 kanru joined #perl6
12:19 braceta joined #perl6
12:28 kolibrie joined #perl6
12:28 araujo joined #perl6
12:28 japhb joined #perl6
12:29 araujo joined #perl6
12:40 dalek joined #perl6
12:43 xiaoyafeng joined #perl6
13:12 foenichs joined #perl6
13:16 abra joined #perl6
13:18 zamolxes joined #perl6
13:21 justatheory joined #perl6
13:38 sri_work joined #perl6
13:50 TJCRI joined #perl6
13:54 ahmadz joined #perl6
14:10 Lorn joined #perl6
14:19 pjcj joined #perl6
14:28 rakudo_svn r31360 | moritz++ | [rakudo] implement chr() and ord(), and add tests to spectest_regression
14:28 rakudo_svn r31360 | moritz++ | Patch courtesy by Carl Mäsak <cmasak at gmail dot com>, masak++
14:29 masak time to update November, then :)
14:30 moritz_ let me guess, this patch broke November, because ord() and chr() in Impatience.pm collide with the built in ones
14:30 masak something like that
14:30 masak since I haven't re-compiled Parrot yet, I don't know what breaks
14:31 masak but I do know that Impatience.pm is no longer needed :)
14:32 moritz_ I think it will be now and then
14:32 masak not for our current purposes
14:33 masak but, yes, maybe for other things
14:33 masak though I prefer to nuke it completely now and revive it later rather than letting it loiter around and be forgotten
14:33 moritz_ aye
14:36 eternaleye joined #perl6
14:59 cjfields joined #perl6
15:03 jhorwitz joined #perl6
15:05 bennymack-work You guys are probably already aware of this but I just learned of it. Apparently JS also has a replacement for the Y combinator
15:05 bennymack-work http://ejohn.org/apps/learn/#11
15:05 lambdabot Title: Learning Advanced JavaScript
15:06 bennymack-work not too shabby. possibly better than Perl6's ?&PROCEDURE or whatever it is
15:07 moritz_ what's shabby is that I can't see the page without javascript
15:08 moritz_ and it does use a name (here myNinja), so it's not an anonymous sub
15:08 bennymack-work gonna have to step out of emacs for a sec?
15:08 bennymack-work but myNinja is not accessible elsewhere so it seems like it is an anonymous sub (to me)
15:09 moritz_ it has a small scope, but it's not anonymous
15:09 masak bennymack-work: I don't see how that code is related to Y combinators.
15:09 moritz_ it's the same as if you do this in perl 5: my $function = do { my $x; $x = sub { use $x here... }} except with a bit of syntactic sugar
15:10 bennymack-work I thought it was essentially a way to specify a symbol in place of the ?&PROCEDURE compiler hint
15:10 bennymack-work moritz_: then you're quickly going down the YC rabbit hole
15:10 moritz_ bennymack-work: it is, but as soon as you specify a symbol, you're giving it a name, thus it's not ananymous anymore
15:11 moritz_ bennymack-work: and the YC is all about recursiong into an anonymous sub
15:11 moritz_ but I guess that's more of a philosphical debate
15:11 bennymack-work does seem a bit semantical
15:12 eternaleye_ joined #perl6
15:15 bennymack-work heheh this is an interesting presentation: http://ejohn.org/apps/learn/#15
15:15 lambdabot Title: Learning Advanced JavaScript
15:17 kanru joined #perl6
15:31 hercynium joined #perl6
15:33 Lorn_ joined #perl6
15:41 frobnitz left #perl6
15:42 Exodist joined #perl6
15:42 pugs_svn r22316 | masak++ | [ord_and_chr.t] added tests for ord and chr methods
15:42 Exodist joined #perl6
15:43 moritz_ masak: heh, I just did that locally, and started to try implement chr as a method
15:43 masak moritz_: :)
15:43 masak moritz_: running 'make spectest_regression' now, to see if I need to fudge the test file for rakudo
15:43 braceta joined #perl6
15:43 masak I suspect I do.
15:44 moritz_ and our changes were nearly identical, except that I tested .chr first, and with a space instead of an A ;)
15:44 cjfields moritz_: would you like a quick patch to get .pairs working (nopaste), or should it go to RT?
15:45 moritz_ cjfields: RT please, I'm currently workiing on other stuff
15:45 cjfields ok, posting
15:45 masak cjfields++
15:46 moritz_ ok, chr() as method works here
15:46 moritz_ masak: no need to fudge, I think I'll have a fix soonish
15:46 moritz_ (aka in the next 15 minutes)
15:46 moritz_ running spectest_regression before commiting...
15:46 masak gotcha. moritz_++
15:48 masak perl6: my %h = test => ["foo", "bar"]; for %h.kv -> $k, $v { say $k; say $v; }
15:48 p6eval rakudo 31364: OUTPUT[test␤foo␤StopIteration␤current instr.: '_block11' pc 112 (EVAL_14:33)␤]
15:48 p6eval ..pugs: OUTPUT[*** Odd number of elements found where hash expected: VList [VStr "test",VRef <Array:0xb5efd0f5>]␤    at /tmp/CORBlBRnIZ line 1, column 1-31␤]
15:48 p6eval ..elf 22316: OUTPUT[Can't locate object method "kv" via package "Pair" at (eval 121) line 4.␤ at ./elf_f line 3861␤]
15:49 moritz_ so elf doesn't promote the Pair to Hash
15:49 moritz_ pugs: my %h = test => ["foo", "bar"]; for %h.kv -> $k, $v { say  $k; say $v; }
15:49 p6eval pugs: OUTPUT[*** Odd number of elements found where hash expected: VList [VStr "test",VRef <Array:0xb5dfd0f5>]␤    at /tmp/uCeEnNCH7q line 1, column 1-31␤]
15:49 moritz_ pugs: my %h = (test => ["foo", "bar"]); for %h.kv -> $k, $v { say  $k; say $v; }
15:49 p6eval pugs: OUTPUT[*** Odd number of elements found where hash expected: VList [VStr "test",VRef <Array:0xb5ddcaa1>]␤    at /tmp/VpdgX27KFv line 1, column 1-33␤]
15:50 moritz_ that's what I wanted to do
15:50 moritz_ so not a parsing issue
15:50 braceta_ joined #perl6
15:55 rakudo_svn r31365 | moritz++ | [rakudo] make chr() and ord() methods of Any, and moved chr() to be in
15:55 rakudo_svn r31365 | moritz++ | alphabetical order with the rest of the methods.
15:58 moritz_ cjfields: no $other_stuff is done... if you nopaste me the fix I'll take a look, nothing arrived yet in rt
16:00 cjfields nopaste?
16:00 cjfields okay, got it
16:01 moritz_ http://sial.org/pbot/perl6
16:01 lambdabot Title: sial.org Pastebot - pasteling
16:01 pasteling "cjfield" at 128.174.127.121 pasted "simple .pairs implementation" (54 lines, 1.1K) at http://sial.org/pbot/32288
16:03 moritz_ cjfields: I think that new 'List' should actually be 'list'(), but I could be wrong
16:05 cjfields that's possible; the method is a simple modification of .kv (changing a few things to allow PMC key/value)
16:06 moritz_ and I think that $P3 = get_hll_global 'Perl6Pair' could be moved out of the loop
16:06 moritz_ testing now...
16:06 cjfields yes, true (about $P3).
16:08 * moritz_ wonders why the hell S29 doesn't list .pairs as a method but rather as a sub
16:08 cjfields I noticed that .sort is borked with it (guessing we need to implement a specific 'infix:cmp' for Pairs).
16:09 moritz_ that would certainly DWIM
16:12 masak can Rakudo call Perl 5 code?
16:12 moritz_ no.
16:12 masak that was my impression as well.
16:12 rakudo_svn r31366 | moritz++ | [rakudo] implement Hash.pairs, cjfields++. Patch courtesy by Chris Fields.
16:12 masak but Pugs can?
16:12 moritz_ uhm.
16:13 moritz_ it had a sort-of working p5 bridge at one point
16:13 masak :)
16:13 masak but no longer?
16:13 moritz_ dunno
16:13 moritz_ last I tried it didn't went all too well
16:14 moritz_ but I don't know if that's due to bit rot, or if it was never better
16:14 masak is system() called run() in Perl 6?
16:14 moritz_ yes
16:14 masak dz
16:14 moritz_ but it's called system() in pugs ;/
16:14 iblechbot joined #perl6
16:14 eternaleye_ joined #perl6
16:14 masak moritz_: that ought to be easy to change, though. I'll give it a shot.
16:21 rorx joined #Perl6
16:22 masak moritz_: I changed what I think are all the right places, and it builds. that's enough for a commit, isn't it? even though I don't understand the Pugs source architecture very deeply
16:22 masak http://pastebin.com/m55f2fa41
16:22 buubot masak: The paste m55f2fa41 has been copied to http://erxz.com/pb/12310
16:22 masak buubot: thanks, I guess.
16:23 moritz_ masak: dunno - I'm not really pugs guru, but I guess it's fine
16:23 masak yes, it feels ok
16:24 pugs_svn r22317 | masak++ | [Prim.hs] renamed s/system/run/
16:24 masak I hope that someone takes me to task and shows me what I did wrong, in case I screwed that up entirely :)
16:25 [particle] that is the pugs way
16:25 pugs_svn r22318 | moritz++ | [t/spec] added a test to S29-hash/pairs.t, and fudged for rakudo
16:25 moritz_ [particle]: which works pretty well if you have a very active developer
16:26 [particle] if nobody's using it, nobody will complain
16:26 masak :)
16:26 moritz_ [particle]: pmurias uses it for pugs-m0ld ;)
16:27 masak (trusting the anarchy)++
16:32 rakudo_svn r31367 | moritz++ | [rakudo] added S29-hash/pairs.t to spectest_regression
16:38 cjfields moritz++ # for adding pairs.t
16:38 moritz_ pugs: say Hash ~~ List
16:38 p6eval pugs: OUTPUT[1␤]
16:38 moritz_ pugs; my %h = (a => 1, b => 2); say %h[0]
16:39 cjfields pugs: my %h = (a => 1, b => 2); say %h[0]
16:39 p6eval pugs: OUTPUT[a  1␤]
16:39 moritz_ what did I do wrong?
16:39 * cjfields damnable semicolon
16:39 moritz_ ah
16:46 pugs_svn r22319 | moritz++ | [t/spec] unfudge tests in perl.t - rakudo's Str.perl now properly escapes
16:46 pugs_svn r22319 | moritz++ | sigials and other stuff.
16:46 moritz_ autounfudge++
16:46 cjfields moritz_: can't find this anywhere: are Pairs sorted by key value?
16:47 cjfields (by default)
16:47 Schwern joined #perl6
16:47 moritz_ cjfields: they are, and it's probably somehwere in S03
16:47 cjfields thx
16:48 moritz_ cjfields: it's something like $a.key cmp $b.key || $a.value cmp $b.value
16:48 cjfields okay.  I'll try to implement that.
16:48 TimToady I doubt it's specced, but that seems reasonable
16:49 moritz_ I thought I read that somewhere, on sorting hashes
16:49 cjfields same here
16:49 jferrero joined #perl6
16:49 TimToady could be
16:50 TimToady I guess the interesting question is what cmp does with non-matching types
16:51 cjfields exactly (I'm thinking of the mapping pairs you have for .trans in S05)
16:51 cjfields Regex => Str, Str => Str, ...
16:52 moritz_ why would you want to compare those?
16:53 TimToady more generally, how do you sort any list of arbitrarily typed objects?
16:53 cjfields From S05 Transliteration : '$str.trans( %mapping.pairs.sort );'
16:54 cjfields and : '$str.=trans( [/ \h /,   '<',    '>',    '&'    ] => ['&nbsp;', '&lt;', '&gt;', '&amp;' ]);'
16:54 pugs_svn r22320 | moritz++ | [t/spec] unfudge one more test
16:55 cjfields So I could see something like $str.=trans( / \h / => '&nbsp;',    '<' => '&lt;',   '>' => '&gt;',    '&' => '&amp;');
16:55 AzureStone joined #perl6
16:57 rorx left #Perl6
16:58 cjfields I could just use the stringified key/value for now
16:58 cjfields Or maybe whatever .kv returns
17:07 masak pmichaud, moritz_: now putting CLA in mailbox.
17:08 moritz_ masak: very good. Now we only need approval from the other parrot hackers, and a bit of time for the snail mail...
17:08 [particle] masak++ left the room
17:08 moritz_ I know, but I guess he'll backlog
17:27 zamolxes joined #perl6
17:31 eternaleye joined #perl6
17:37 ruoso joined #perl6
17:42 pmurias_ ruoso: hi
17:43 ruoso hi pmurias
17:46 pmichaud (sorting hashes) I thought that S09 said that hashes don't autosort by default, and that sorting is handled by overloading .iterator with a mixin or something.
17:46 pmichaud oh, you're talking about sorting Pairs
17:46 pmichaud sure, I think keys can be major sort order.
17:47 [particle] but you can sort Apples and Oranges
17:47 [particle] *can't
17:47 PerlJam I can
17:47 PerlJam Apples come before Oranges
17:47 [particle] wrong locale.
17:50 cjfields pmichaud: How do we handle mixed types (i.e. 'my %hash = (/\d+/ => 1, 'b' => 2, foo() => 3);')?  Use stringified keys/values?
17:51 pmichaud cjfields: Parrot doesn't support non-string keys at the moment.
17:51 pmichaud so, short answer is "we don't handle them until we come up with our own Hash implementation"
17:52 [particle] which is easy enough to do.
17:52 [particle] do we need it?
17:53 pmichaud eventually we have to support non-string hash keys, yes.
17:53 [particle] and Hash is a Set of Pairs?
17:54 pmichaud conceptually, yes.  But we want to make sure that hash lookups continue to be efficient.
17:54 moritz_ there's a method for providing a string that can be used for hashing
17:54 [particle] that's what pmc->cache is for
17:54 moritz_ one of the .HSOMETHING methods
17:55 cjfields at the moment, %x.pairs.sort is broken
17:55 cjfields but the following works:
17:55 pmurias_ ruoso: got an answer from #haskell how to link libsmop.so with pugs
17:55 cjfields %hash.pairs.sort({ $^a.key cmp $^b.key || $^a.value  $^b.value })
17:56 pmichaud we probably need to define 'cmp' on Pairs
17:56 moritz_ pmichaud: yes, I wrote a TODO RT for that
17:56 pmurias_ ruoso: do we need the RootNamespace once we have a lexical prelude?
17:59 ahmadz hi
18:00 moritz_ hi
18:01 ahmadz how r u moritz?
18:01 moritz_ hacking ;)
18:01 ahmadz do u remember me?
18:02 moritz_ dimly
18:02 ahmadz runpugs
18:02 moritz_ ah
18:02 ahmadz so what's new? ;-) i've hibernating for 10 months
18:03 moritz_ audreyt announced that she'll be hacking pugs again once ghc6.10.1 is out
18:03 moritz_ and already cleaned up the build process
18:03 pmurias_ fixed
18:03 ahmadz moritz: great
18:03 ahmadz so where can i help? ;-)
18:03 pmurias_ the build process still isn't pretty ;)
18:04 moritz_ ahmadz: the test suite needs constant attention
18:04 moritz_ ahmadz: and I guess pugs does too, but I'm not qualified to recommend anything in that direction
18:04 pmurias_ ahmadz: what do you want to hack in?
18:05 ahmadz test suite seems fine for a start
18:05 moritz_ there's t/TASKS which is a long (but not comprehensive) list of things that needs to be done
18:06 ahmadz logging in to feather... ;-)
18:06 ruoso pmurias, the RootNamespace is the global thingy... it's not subject to lexical scopes...
18:06 ruoso although globals are mosly neglected in p6, they still exist...
18:07 ruoso we'll need a strong effort to make people use context vars on the places they're used to use globals
18:08 ruoso pmurias, about embedding smop in haskell... does that mean you know how to do it? :)
18:08 pmurias_ yes
18:08 pmurias joined #perl6
18:08 ruoso :)
18:09 rakudo_svn r31368 | pmichaud++ | [rakudo]: spectest-progress.csv update: 167 files, 3434 passing tests
18:09 ruoso pmurias, considering smop would be embedded, do you think it would be easier to create a mold in runtime and run it?
18:10 ruoso without the need for a bytecode format and stuff..
18:10 pmurias easier than?
18:10 rafl joined #perl6
18:10 ruoso easier then dlopen
18:10 Lorn_ moritz_: hi, where is this tests? pugs/t ?
18:10 moritz_ Lorn_: TASKS? yes
18:11 pmurias i have simple smop embedding in haskell (smop/haskell_ffi_bindings) already done
18:11 Lorn_ moritz_: ok, thanks
18:11 ruoso pmurias, if I get it right, you just need 1) a haskell data structure that represents smop mold and 2) converting that data structure to the actual mold...
18:12 ruoso and 3) running the mold (which I think is the easiest)
18:14 pmurias i'll try to create the mold with SMOP_DISPATCH and the functions to create native types
18:14 ruoso pmurias, I'm not sure it will be easier to do it with SMOP_DISPATCH, since you'll need to create more captures...
18:15 ruoso it's probably better to special case Mold and Mold Frame
18:15 ruoso and just use it directly...
18:15 pmurias calling smop from haskell is easier than from C
18:15 ruoso heh... how so?
18:16 pmurias once you have the bindings that is
18:16 pmurias haskell is a smarter language than C so you don't have the syntactic clutter
18:17 ruoso ah... right... sure..
18:17 ruoso :)
18:21 ruoso pmurias, is the binding only the thing in ffi.hs?
18:21 ruoso or is there something else?
18:22 ahmadz where can i find ghc 6.8.x on feather3?
18:22 moritz_ $ which ghc6
18:22 moritz_ /usr/bin/ghc6
18:22 moritz_ oh wait...
18:22 moritz_ that's probably feather1
18:23 ahmadz ghc --version -> 6.6.1
18:23 moritz_ that seems fairly out-of-date
18:24 * ruoso fail entirely to parse haskell code...
18:24 moritz_ you need somebody with root access to do an upgrade
18:24 moritz_ (I'm only root on feather1)
18:25 ahmadz but i can install it as user on my home directory right?
18:25 moritz_ you can, but I think an upgrade would be preferrable
18:25 moritz_ since no recent version of pugs compiles with ghc6.6.1 it's pretty pointless to have it
18:29 ahmadz moritz: im a sudo-er on feather3, does that help?
18:29 moritz_ ahmadz: yes.
18:29 moritz_ ahmadz: sudo aptitude update
18:29 moritz_ ahmadz: sudo aptitude upgrade
18:29 pmurias ruoso: there is also smop_haskell_ffi.c to wrap around macros
18:29 moritz_ sit back and wait...
18:30 ruoso pmurias, if I read the ffi.hs code right... you're few steps from creating a mold object
18:30 ahmadz moritz: thx
18:30 pmurias ruoso: yes
18:30 moritz_ ahmadz: beware, if it's a largish update it might break things a bit
18:31 pmurias i'm hooking the ffi.hs into Pugs now
18:31 ahmadz moritz: not a lot of pkgs upgraded...
18:31 pmurias ruoso: if you want to help with that you can add a .new to Mold and MoldFrame
18:31 ruoso receiving arrays?
18:31 araujo pmurias, ffi.hs ? .... a foreign interface between perl6 and haskell .. org ?
18:32 ruoso araujo, worse than that... a ffi between pugs and smop ;)
18:32 moritz_ ahmadz: please do a 'grep deb /etc/apt/sources.list' and nopaste the output somewhere
18:32 ruoso between p6 and p6
18:32 ruoso heh
18:32 araujo ruoso, aaah
18:34 ahmadz moritz: will do in a min once upgrade is done
18:34 ruoso pmurias, I'm kinda convinced it's better to create the Mold directly from C
18:34 pmurias maybe
18:35 ruoso pmurias, because I'll have to recurse into the C stack to traverse the array
18:35 ruoso so it represents no effective gain, and will only work with the SMOP__S1P__Array implementation
18:35 ruoso I think it would be better to implement it in high-level after typesystem bootstrap
18:36 pmurias ok
18:37 ruoso mold frame otoh makes sense to have a high-level "new"
18:37 ruoso since it receives just a single positional argument
18:37 ahmadz @moritz
18:37 lambdabot Unknown command, try @list
18:38 ruoso er... pmurias, mold frame already has .new...
18:38 ruoso :P
18:38 pmurias good ;)
18:52 eternaleye joined #perl6
18:57 baest_ joined #perl6
19:07 baest joined #perl6
19:11 jovs joined #perl6
19:12 pmurias ruoso: the bindings do not work when used from pugs, constant identifiers get mangled so maybe going through bytecode is saner
19:42 ruoso pmurias, what do you mean by "constant identifiers get mangled"?
19:48 Lorn_ w/in 14
20:04 pmurias ruoso: ___UNKNOW__METHOD___ dies instead of postcircumfix:{ } being called
20:05 ruoso hmm...
20:05 * ruoso later &
20:09 ahmadz How do i get past Cabal's "Cannot install zlib: 256" after "perl Makefile.PL"?
20:10 moritz_ ahmadz: did you install it manually, as described in pugs' INSTALL?
20:10 ahmadz moritz: yeah
20:11 moritz_ that's weird - if zlib is installed, why does it complain about not being able to install it?
20:12 ahmadz moritz: i have an old pugs svn tree that i recently updated... i removed ~/.cabal and ~/.ghc
20:12 moritz_ ahmadz: did you also do a 'make realclean'?
20:13 ahmadz "No rule..." error
20:13 moritz_ fun.
20:21 pasteling "ahmadz" at 212.38.136.170 pasted "Build error" (32 lines, 2K) at http://sial.org/pbot/32295
20:22 ahmadz moritz: Cleaned up ~/.cabal and ~/.ghc then perl Makefile.PL (i made sure that svn status returned nothing)
20:23 pmurias @tell ruoso it turned out to be a typo with SMOP__NATIVE__idconst_create being used instead SMOP__NATIVE__idconst_createn
20:23 lambdabot Consider it noted.
20:24 |jedai| joined #perl6
20:32 pugs_svn r22321 | pmurias++ | [pugs] start of embedding smop in pugs (disabled by default)
20:38 moritz_ rakudo: if 2 == any(1, 2, 3) { say "yes" } else { say "no"
20:38 p6eval rakudo 31370: OUTPUT[Missing '}' at line 1, near ""␤␤current instr.: 'parrot;PGE::Util;die' pc 119 (runtime/parrot/library/PGE/Util.pir:82)␤]
20:38 moritz_ rakudo: if 2 == any(1, 2, 3) { say "yes" } else { say "no" }
20:38 p6eval rakudo 31370: OUTPUT[yes␤]
20:41 cjfields_ joined #perl6
21:06 pmurias ahmadz: svn status --no-ignore
21:09 ahmadz pmurias: thx, will try it now
21:13 moritz_ rakudo: my %h = (a => 1); say %h.pairs[0].value.WHAT
21:14 p6eval rakudo 31371: OUTPUT[Int␤]
21:14 moritz_ rakudo: my %h = (a => 1); say %h.pairs[0].key.WHAT
21:14 p6eval rakudo 31371: OUTPUT[Str␤]
21:15 moritz_ rakudo: my %h = (a => [1, 2, 3]); say %h.pairs[0].value.WHAT
21:15 p6eval rakudo 31371: OUTPUT[Array␤]
21:18 cjfields_ rakudo: perl6: my %x=(('a' => 1, 'b' => 2), 'c' => { say 'foo'}, /\d/ => 3); for %x.pairs -> $y {say $y.WHAT; say $y.key.WHAT; say $y.value.WHAT; say}
21:18 p6eval rakudo 31371: OUTPUT[Statement not terminated properly at line 1, near ": my %x=(("␤␤current instr.: 'parrot;PGE::Util;die' pc 119 (runtime/parrot/library/PGE/Util.pir:82)␤]
21:18 cjfields_ rakudo: my %x=(('a' => 1, 'b' => 2), 'c' => { say 'foo'}, /\d/ => 3); for %x.pairs -> $y {say $y.WHAT; say $y.key.WHAT; say $y.value.WHAT; say}
21:18 p6eval rakudo 31371: OUTPUT[Pair␤Str␤Int␤␤Pair␤Str␤Int␤␤Pair␤Str␤Int␤␤Pair␤Str␤Block␤␤]
21:18 cjfields_ The key is always a Str
21:19 cjfields pugs:  my %x=(('a' => 1, 'b' => 2), 'c' => { say 'foo'}, /\d/ => 3); for %x.pairs -> $y {say $y.WHAT; say $y.key.WHAT; say $y.value.WHAT; say}
21:19 p6eval pugs: OUTPUT[Pair::HashSlice␤Str␤Block␤␤Pair::HashSlice␤Str␤Int␤␤Pair::HashSlice␤Str␤Int␤␤Pair::HashSlice␤Str␤Int␤␤]
21:20 cjfields Same with pugs (hash pair order is different)
21:22 moritz_ cjfields: that's because you cast to a Hash
21:22 moritz_ rakudo: say (/a/ => 1).key.WHAT
21:22 p6eval rakudo 31371: OUTPUT[Block␤]
21:22 moritz_ without building a hash it works fine
21:34 pugs_svn r22322 | moritz++ | [t/spec] added tests for transliteration with closures on the RHS
21:34 moritz_ cjfields: now there are some basic tests in t/spec/S05-transliteration/with-closure.t
21:35 pugs_svn r22323 | moritz++ | [t/spec] added missing closing bracket
21:35 moritz_ now rakudo can even parse it ;)
21:38 ahmadz @tell Juerd feather3 is using sid now and ghc 6.8.2 is there
21:38 lambdabot Consider it noted.
21:38 ahmadz moritz: im still sucks at 'perl Makefile.PL' and that zlib error
21:38 moritz_ ahmadz: I'm afraid I can't help you with that one :(
21:39 moritz_ maybe you can ask the haskell crowd on how to check if a module is correctly installed
21:40 ahmadz moritz_:  'ghc-pkg list'
21:41 ahmadz moritz_: and zlib is not there
21:42 Juerd @messages
21:42 lambdabot ahmadz said 3m 59s ago: feather3 is using sid now and ghc 6.8.2 is there
21:42 Juerd Okay, thanks :)
21:42 ahmadz np
21:42 pmurias ahmadz: did you install zlib in ~/.cabal or in a system wide dir?
21:42 ahmadz ~/.cabal
21:42 moritz_ ghc-pkg tries both locations
21:43 pmurias it finds it in both places here
22:00 ahmadz finally solved it [clumsy me ;-)]
22:00 moritz_ so what's the magic formula?
22:00 ahmadz PATH
22:00 ahmadz GHC-6.6 is used in /usr/local instead of /usr/bin
22:01 ahmadz even if you set the GHC env var
22:02 ahmadz should we remove the old 6.6 from feather?
22:05 ahmadz moritz_: should we remove the old 6.6 from feather just in case?
22:06 moritz_ ahmadz: dunno
22:09 Juerd Please do NOT deviate from debian's ghc
22:10 Juerd If you must install a different version, do so outside of $PATH, and let people decide for themselves if they want it.
22:10 ahmadz agreed
22:21 hercynium joined #perl6
22:34 pugs_svn r22324 | moritz++ | [t/spec] some test fiddling with $x.stuff and isa_ok()
22:36 pugs_svn r22325 | moritz++ | [t/spec] removed bogus test from charset.t
22:46 ahmadz Juerd: ?
22:46 Juerd Yes?
22:46 ahmadz I need Task::Smoke in feather1
22:47 ahmadz plz ;-)
22:47 moritz_ I should be able to do that
22:48 ahmadz moritz_: gr8
22:49 Juerd http://cpandeps.cantrell.org.uk/?module=Task%3A%3ASmoke&amp;perl=any+version&amp;os=any+OS
22:49 Juerd But... done.
22:49 moritz_ ahmadz: I guess you need only its dependencies?
22:49 moritz_ Juerd: I was about to install the debian packages of those deps
22:50 Juerd Pointless. All debianized perl modules are installed, except those conflicting.
22:50 moritz_ libpetal-utils-perl wasn't ;-)
22:51 Juerd Might be a very recent module then
22:52 ahmadz perfect, smoke is running now... thx
22:52 xiaoyafeng joined #perl6
22:54 pugs_svn r22326 | moritz++ | [t/spec] fudged chained-declarators.t
22:58 pugs_svn r22327 | moritz++ | [t/spec] fudged S29-array/elems.t for rakudo
23:04 rakudo_svn r31374 | moritz++ | [rakudo] 5 more test files for spectest_regression
23:05 pugs_svn r22328 | moritz++ | [t/spec] fudged char-by-number.t
23:07 pugs_svn r22329 | moritz++ | [t/spec] pos.t fudged for rakudo
23:11 pugs_svn r22330 | moritz++ | [t/spec] deleted bogus syntax test
23:17 rakudo_svn r31376 | moritz++ | [rakudo] three more tests for spectest_regression
23:42 justatheory joined #perl6
23:52 Exodist joined #perl6

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

Perl 6 | Reference Documentation | Rakudo