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