Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2009-03-22

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:03 eternaleye joined #perl6
00:21 hercynium joined #perl6
00:22 kidd joined #perl6
00:44 pugs_svn r25962 | lwall++ | [Cursor] improvements in .caps propagation/non-propagation
00:44 pugs_svn r25962 | lwall++ | [STD] better attachment of caps and args in EXPR
00:45 amoc sorry but where can i found spec test scripts ?
00:45 amoc oh i found it...
00:45 amoc sorry, i dumbed
00:46 * amoc he hurries himself
01:01 meppl joined #perl6
01:04 cspencer joined #perl6
01:15 xinming_ joined #perl6
01:31 xinming joined #perl6
01:33 s1n frooh: ping
01:37 frue s1n: phone
01:41 s1n lemme know when you're done
01:42 frue s1n: pong
01:42 frue (aka done)
01:49 frue s1n s1n s1n s1n s1n
01:49 drbean_ left #perl6
01:50 justatheory joined #perl6
01:55 s1n heh
01:55 s1n yeah, what's up?
01:55 s1n did you see your pm?
01:56 frue uh
01:56 frue no
01:57 frue sorry, frooh is the work computer
01:57 frue so if you pm'ed that one I won' see it
01:57 s1n doh, okay
01:57 frue actually
01:57 s1n you have too many nicks
01:57 frue lemme just ssh in
01:57 frue it will only take a sec
01:58 frue well, even if I was frue_ here it still wouldn't get to me :-)
01:58 s1n you should pick 1 active nick and make the others "*_away"
01:58 frue maybe I will...
01:59 s1n it's typical on IRC to do that when you can't see messages as that nick
01:59 frue ok, so I am reading these now
01:59 frue it will take a sec
01:59 s1n let me know when you're done reading
02:00 meteorjay joined #perl6
02:05 drbean_ joined #perl6
02:11 frue ok, I see how that workflow is attractive, but we really can't pull that off
02:11 frue that assumes Alice and Bob can merge with the central repo
02:13 s1n yes, but the central repo was not specified
02:14 s1n this is where the workflow change comes in
02:14 frue ok...
02:14 s1n that graham and i were talking about
02:14 frue I see exactly what you mean
02:14 s1n it won't go to rakudo/rakudo, that's only the topmost blessed official version
02:15 s1n alice/bob will send theirs to their respective .... "manager"?
02:15 frue so the idea would be that I do my stuff, like mentioned in thething
02:15 frue then post to my repo in a branch
02:15 frue and then jnthn or something pull from mine to theirs
02:15 s1n yes, there's also a subtle thing in there
02:15 frue do stuff with it
02:15 s1n yes, absolutely
02:15 frue and then merge
02:15 frue that makes sense
02:15 frue stumble thing?
02:15 s1n junio refers to them as "topic branchs"
02:16 s1n err s/s/es/
02:16 s1n to they tend to keep them for small changes
02:16 frue right...
02:16 frue oh, subtle, not stumble.  Read-o
02:16 s1n that's what i said :)
02:17 frue hence the read-o
02:17 frue :-)
02:17 s1n so, see what i mean by how we're doing it wrong
02:17 s1n i think we should try this out, you and i
02:17 frue sure...
02:17 s1n gimme some time though, i'm working on tagging my notes (school work)
02:17 frue but in general the main thing that will change is that instead of mailing a patch I push to my remote repo and email you (or send a pull request)
02:18 frue that's fine
02:18 s1n yes
02:18 s1n where RT is just a linkfarm to patches
02:18 frue ah...I like that
02:18 s1n rt would be used only for discussion
02:18 frue which makes sense
02:19 s1n yes, i actually like this better
02:19 frue and then instead of squashing stuff, you pull fromme (or vice versa) and to see what went down you (or I) just use git diff branch master or whatever
02:19 s1n but in reality, we need the lieutenants
02:19 frue right
02:19 s1n without them, the git model breaks down
02:20 frue but it would make more sense if we figured out the mechanics of that and showed someone else how to do it
02:20 s1n and it reverts back to svn with blessed access
02:20 frue yeah
02:20 frue well, slightly nicer than just svn
02:20 frue we can move files and delete files without hassle
02:20 s1n yeah, but you get the idea
02:20 frue yeah, agreed
02:21 s1n i'd like to try this out soon, maybe spend an hour or so, and see how it works
02:21 frue so you wanna experiment with stuff and then when we figure out what works well take the next steps?
02:21 s1n yes, absolutely
02:21 frue well, let's plan a time next week to do it
02:21 frue is that cool with you?
02:22 justatheory joined #perl6
02:22 s1n well, we don't have to do anything meaningful
02:22 frue yeah
02:22 s1n just set up a dummy repo and try it out, shouldn't take longer than an hour
02:22 frue but I am busy on sundays and I am sick right now
02:22 s1n i should have time for that tomorrow after the dog training class
02:22 frue so we can't do it till monday
02:22 frue well....
02:23 s1n ahh okay, then it'll have to be wednesday night or later
02:23 frue yeah, sunday the earliest I could would be 10ish
02:23 meppl good night
02:23 s1n that's a bit late, i get up for work at 5
02:23 frue yeah, then lets not tomorrow
02:23 s1n wed night or later is fine for me
02:24 frue k
02:24 frue lemme make a mark on the old calendar
02:24 frue let's say wed at 8?
02:24 s1n ...
02:24 s1n that might be alright, i get out of my exam ar around 6
02:25 frue well, 8-10 is a fine range
02:25 s1n sounds good
02:25 frue we'll say 8 and if it's later that's not a huge deal
02:25 s1n lemme send you another good link
02:25 frue alrighty
02:26 s1n read that, it's very useful
02:26 frue on it
02:33 AzureStone joined #perl6
02:33 justatheory_ joined #perl6
02:52 hercynium joined #perl6
04:22 Kisu joined #perl6
04:36 alester joined #perl6
04:41 OuLouFu joined #perl6
04:59 Guest89727 joined #perl6
05:10 dukeleto joined #perl6
05:30 msmatsko joined #perl6
05:31 eternaleye joined #perl6
05:53 msmatsko_ joined #perl6
05:55 msmatsko left #perl6
05:55 msmatsko joined #perl6
05:58 msmatsko_ joined #perl6
06:38 Eevee joined #perl6
07:42 disismt joined #perl6
08:01 parduncia joined #perl6
08:24 kate21de joined #perl6
08:31 amoc joined #perl6
08:33 DemoFreak joined #perl6
08:55 masak joined #perl6
08:55 masak greetings, six-humped camels.
09:00 schmalbe joined #perl6
09:07 masak rakudo: module Foo { if 1 { say 42 } }
09:07 p6eval rakudo de786f: OUTPUT«Null PMC access in get_pmc_keyed()␤current instr.: 'parrot;Foo;_block26' pc 129 (EVAL_20:71)␤»
09:08 masak I don't see this one (from yesterday) being rakudobug-reported.
09:09 * masak submits
09:16 masak rakudo: class A { has $.a = 5; has @.a = (1,2,3) }; say A.new.a
09:16 p6eval rakudo de786f: OUTPUT«123␤»
09:16 disismt joined #perl6
09:16 masak rakudo: class A { has @.a = (1,2,3); has $.a = 5 }; say A.new.a
09:16 p6eval rakudo de786f: OUTPUT«5␤»
09:16 masak I believe both these should die at compile-time.
09:16 * masak submits rakudobug
09:19 masak rakudo: say &foo.arity
09:19 p6eval rakudo de786f: OUTPUT«Null PMC access in can()␤current instr.: '!dispatch_method' pc 17078 (src/builtins/guts.pir:104)␤»
09:19 * masak submits rakudobug
09:22 masak rakudo: my %p; %p<a> = [%p<a>, 4]; say %p.perl
09:25 masak infinite recursion.
09:26 masak on my box, it eventually says: 'maximum recursion depth exceeded'
09:26 p6eval rakudo de786f: OUTPUT«maximum recursion depth exceeded␤current instr.: 'parrot;Int;Scalar' pc 4734 (src/classes/Int.pir:35)␤»
09:26 masak there we go.
09:26 masak AFAIKS, there's nothing wrong with the statement as such; it shouldn't create a pretzel.
09:26 * masak submits rakudobug
09:58 M_o_C joined #perl6
09:59 pmurias joined #perl6
10:13 Meijito joined #perl6
10:15 mberends joined #perl6
10:19 mberends Good euro-morning, masak, you're doing a good job rakudo-bashing today!
10:19 masak mberends: I had a few saved up.
10:19 masak and good Eurozone morning to you, sir :)
10:20 Tene_ joined #perl6
10:24 mberends socat is a brilliant improvement on netcat, it makes podserver forking concurrent in a manner of speaking.
10:26 mberends it may even make podserver platform independent, if somebody running OSX has time to try it out ;)
10:26 kate21de1 joined #perl6
10:26 masak hint taken.
10:27 mberends that's so good of you! and hopefully worth the effort.
10:28 sunnavy joined #perl6
10:29 buu joined #perl6
10:29 masak rakudo: my %d = a => 1, b=>2; my @a; @a.push(%d); @a.perl.say;
10:29 ihrd joined #perl6
10:29 p6eval rakudo de786f: OUTPUT«["a" => 1, "b" => 2]␤»
10:29 masak rakudo: my %d = a => 1, b=>2; my @a; @a.push(\%d); @a.perl.say;
10:29 p6eval rakudo de786f: OUTPUT«[{"a" => 1, "b" => 2}]␤»
10:29 masak could someone explain what the '\' is doing here?
10:30 aindilis joined #perl6
10:30 ihrd I think first example should work
10:30 ihrd as second
10:30 Meijito How to get random text from @list = ("aaa", "bb"); ? I used $text = rand(@list);, but my answer be just: 1.13671875.
10:31 ihrd Meijito: use .pick
10:31 Meijito .pick?
10:31 masak Meijito: @list.pick
10:31 Meijito Ok.
10:31 ihrd rakudo: <a b c>.pick.say
10:31 mberends Meijito: it was calculating rand( 2 );
10:31 p6eval rakudo de786f: OUTPUT«a␤»
10:33 ihrd so, should @array.push(%hash) put one item in list, or rakuso work properly when put list of pairs insted?
10:33 masak somehow it seems reasonable that it pushes a list of pairs.
10:34 masak it's analogous to @array.push(@other-array) which pushes the elements separately.
10:35 ihrd hm... but > my @l; @l.push({a=>1, b=>2}); say @l.perl;
10:35 ihrd [{"a" => 1, "b" => 2}]
10:36 mberends there is a reluctance to flatten lists, because that loses structure
10:36 masak well, that's different.
10:36 ihrd but, why it loose structure?
10:37 ihrd why {} and %hash in push have diffirence?
10:37 mberends it should be that if you push two hashes one after the other, they don't merge.
10:39 masak ihrd: it's just as [] and @array in push are different.
10:41 ihrd hm, I see.
10:41 ihrd but with hash it still looks strange for me :)
10:41 masak aye :)
10:42 masak I didn't even realize we still had \ for this :)
10:42 ihrd this is capture constructor
10:42 masak rakudo: my %d = a => 1, b=>2; my @a; @a.push(%d.hash); @a.perl.say;
10:42 p6eval rakudo de786f: OUTPUT«["a" => 1, "b" => 2]␤»
10:44 masak rakudo: my %d = a => 1, b=>2; my @a; @a.push({%d}); @a.perl.say;
10:44 p6eval rakudo de786f: OUTPUT«[{ ... }]␤»
10:45 masak oops :)
10:45 masak rakudo: my %d = a => 1, b=>2; my @a; @a.push({%d,}); @a.perl.say;
10:45 p6eval rakudo de786f: OUTPUT«[{"a" => 1, "b" => 2}]␤»
10:46 disismt joined #perl6
10:47 mberends that oops does not seem to be wrong, just beyond the expressiveness of .perl
10:47 ihrd .perl cant show deeper?
10:48 mberends it looks that way
10:49 masak that's right.
10:49 ihrd ah, this is make closure
10:49 masak the 'oops' was because I expected something else, not really because there's anything wrong with Rakudo.
10:49 masak ihrd: aye.
11:01 NordQ joined #perl6
11:12 mberends masak: podserver response times: http://gist.github.com/83138
11:13 masak mberends: nice.
11:13 masak aye, scaling problems will haunt us for some time, I think.
11:14 mberends it's disappointing not to be able to render all the Synopses :(
11:14 masak it's just a matter of finding and fixing the leaks. ;)
11:15 mberends just. indeed.
11:18 mberends how much RAM does Mr. Masak have available?
11:18 * masak looks
11:18 masak 4 Gb.
11:18 mberends that's good.
11:19 mberends 2GB here, and meee only 1GB
11:20 masak mberends: I'll see what I can do about that socat thing.
11:20 masak but first, lunch.
11:20 masak &
11:21 mberends excellent. going out for a few hours here also.
11:22 M_o_C joined #perl6
11:23 Helios joined #perl6
11:32 jnthn masak: We already had a ticket on .perl on recursive data structures...
11:37 pmurias joined #perl6
11:51 smtms joined #perl6
12:15 Southen_ joined #perl6
12:21 r0bby_ joined #perl6
12:27 DemoFreak joined #perl6
13:04 masak jnthn: I looked, but only found the closed [perl #60820].
13:10 FurnaceBoy joined #perl6
13:11 jnthn masak: Closed? Hmm.
13:12 jnthn masak: tbh I've not much idea yet how to cleanly handle recursive data structures with .perl.
13:12 jnthn Part of me wonders if we should.
13:13 masak jnthn: thing is, I don't see why this should be recursive in the first place.
13:13 masak it's not like I'm doing binding.
13:13 masak just regular assignment.
13:14 Whiteknight joined #perl6
13:16 jnthn You're still creating a circular reference.
13:16 parduncia joined #perl6
13:16 jnthn So far as I can tell.
13:17 jnthn I guess context vars would make a recursive .perl easier.
13:17 jnthn erm, sorry
13:17 jnthn a recursive-data-structure-safe .perl easier.
13:17 jnthn Alas, we don't have those. Yet.
13:19 masak jnthn: if that creates a circular reference, how does one spell what I meant to write?
13:20 cognominal joined #perl6
13:20 jnthn masak: What is it you want exactly?
13:20 masak i.e. take the hash _value_ of that particular key, insert it into an array, and make the new hash value that array. without circular references.
13:20 jnthn Oh, hmm.
13:22 jnthn rakudo: my %h<a> = 42; $p = [%h<a>]; say %h<a>; $p[0] = 100; say %h<a>;
13:22 p6eval rakudo de786f: OUTPUT«Scope not found for PAST::Var '$p' in ␤current instr.: 'parrot;PCT;HLLCompiler;panic' pc 146 (src/PCT/HLLCompiler.pir:102)␤»
13:22 jnthn rakudo: my %h<a> = 42; my $p = [%h<a>]; say %h<a>; $p[0] = 100; say %h<a>;
13:22 p6eval rakudo de786f: OUTPUT«Could not find non-existent sub a␤current instr.: '_block14' pc 61 (EVAL_17:42)␤»
13:22 jnthn wtf
13:22 masak indeed -- wtf?
13:23 jnthn rakudo: my %h<a> = 42; my $p = [%h<a>]; say %h<a>;
13:23 p6eval rakudo de786f: OUTPUT«Could not find non-existent sub a␤current instr.: '_block14' pc 56 (EVAL_17:40)␤»
13:23 jnthn rakudo: my %h<a> = 42; my $p = [%h<a>];
13:23 p6eval rakudo de786f: OUTPUT«Could not find non-existent sub a␤current instr.: '_block14' pc 56 (EVAL_17:40)␤»
13:23 jnthn rakudo: my %h<a> = 42;
13:23 p6eval rakudo de786f: OUTPUT«Could not find non-existent sub a␤current instr.: '_block14' pc 56 (EVAL_17:40)␤»
13:23 jnthn oh
13:23 jnthn rakudo: my %h; %h<a> = 42; my $p = [%h<a>]; say %h<a>;
13:23 p6eval rakudo de786f: OUTPUT«42␤»
13:23 masak heh.
13:24 * jnthn isn't sure what "my %h<a>" should actually do...
13:24 jnthn ...but I'm pretty sure that error is not it.
13:24 jnthn rakudo: my %h; %h<a> = 42; my $p = [%h<a>]; say %h<a>; $p[0] = 100; say %h<a>;
13:24 p6eval rakudo de786f: OUTPUT«42␤42␤»
13:25 jnthn Hmm. That doesn't tie things up in bad ways...
13:25 jnthn rakudo: my %h; %h<a> = 42; %h<a> = [%h<a>]; say %h<a>;
13:25 p6eval rakudo de786f: OUTPUT«42␤»
13:25 jnthn rakudo: my %h; %h<a> = 42; %h<a> = [%h<a>]; say %h<a>.perl;
13:25 p6eval rakudo de786f: OUTPUT«[42]␤»
13:25 masak well, fwiw, I didn't init %h<a> before I introduced the array...
13:25 jnthn rakudo: my %h; %h<a> = [%h<a>]; say %h<a>.perl;
13:26 masak that's it :)
13:26 masak and that's what I consider a bug.
13:26 masak the semantics shouldn't differ just because %h<a> wasn't init'ed.
13:26 jnthn rakudo: my %h; say [%h<a>].perl
13:26 masak this will take a while.
13:27 masak it did when I tried that this morning.
13:27 jnthn rakudo: my %h; say %h<a>.perl
13:27 jnthn Aha. That golfs the but quite a bit. :-)
13:27 masak jnthn: you now have three requests pending! :)
13:27 jnthn *bug
13:27 jnthn hehe!
13:27 masak jnthn: no, wait until it finishes the first one.
13:27 masak until then, you can draw no conclusions about the second and third.
13:28 jnthn masak: Oh. :-|
13:28 jnthn What, it takes this long to blow up on infinite recursion?
13:28 masak aye.
13:28 masak it's faster on my box.
13:28 jnthn Still...
13:28 jnthn Rakudo will need quite some optimization at some point...
13:29 p6eval rakudo de786f: OUTPUT«maximum recursion depth exceeded␤current instr.: 'parrot;P6object;HOW' pc 54 (runtime/parrot/library/P6object.pir:96)␤»
13:29 p6eval rakudo de786f: OUTPUT«[undef]␤»
13:29 p6eval rakudo de786f: OUTPUT«undef␤»
13:29 jnthn (not that that's news.)
13:29 jnthn Ah.
13:29 jnthn Golf fail.
13:33 meppl joined #perl6
14:05 disismt joined #perl6
14:07 jferrero joined #perl6
14:08 nihiliad joined #perl6
14:09 ihrd left #perl6
14:12 Meijito How in perl I can calculate?
14:13 Meijito I wanna my $answer = 10 : 2; print "Answer is: $answer\r\n"; "Answer is: 5"
14:15 masak rakudo: my $answer = 10 / 2; say "Answer is: $answer";
14:15 p6eval rakudo de786f: OUTPUT«Answer is: 5␤»
14:16 Meijito Thanks. :)
14:21 Meijito But how I can make just two numbers after comma?
14:22 pmurias use scanf
14:22 pmurias well printf
14:22 pmurias ;)
14:22 jnthn rakudo: my $answer = 10 / 3; printf "%.2f\n", $answer;
14:22 p6eval rakudo de786f: OUTPUT«3.33␤»
14:22 * jnthn wonders if there should be a sayf ;-)
14:23 masak jnthn: I had the same thought a week ago! :)
14:23 masak and ssayf.
14:23 jnthn Eww. :-)
14:23 masak indeed.
14:23 jnthn It looks so vowel-deprived.
14:24 Meijito Thanks for help again.
14:24 masak we could take a cue from the Japanese and throw a few vowels in there: susayfu.
14:25 masak ah, the advantages of a spec with commit access. >:-)
14:25 jnthn .oO( a Japanese rendering of the Slovak village Strbske Plesso might be amusing )
14:26 masak Sutubusuke Puleso?
14:27 jnthn The first time I saw the sign for that place (before I started learning Slovak) I was like...no...no way.
14:27 masak :)
14:27 masak consonant clusters FTW.
14:28 * jnthn might hack on some Perl 6 stuff a bit later
14:28 jnthn Going to do some natural language stuff first. :-)
14:28 masak jnthn: thing is (and I'm guessing here), you'd get a kind of schwa half-sound between the 'str' and the 'bske'. it sort of has to be there to make it pronouncable.
14:29 masak s/ca/ci/
14:29 jnthn masak: Right. r and l can act vowel-ish in Slovak if needed. :-)
14:29 masak ah, that's the solution.
14:29 masak makes sense.
14:30 jnthn Yeah
14:30 jnthn Pronunciation is generally not so bad after a while.
14:30 amoc joined #perl6
14:30 masak natural language fascinates me.
14:30 jnthn It's the grammar that's trickier.
14:31 jnthn Yeah, me too.
14:31 disismt joined #perl6
14:32 * jnthn bbiab
14:33 masak rakudo: say <>; say <STDIN>
14:33 p6eval rakudo de786f: OUTPUT«␤STDIN␤»
14:33 masak std: say <>; say <STDIN>
14:33 p6eval std 25962: OUTPUT«##### PARSE FAILED #####␤Obsolete use of <>; in Perl 6 please use =<> or () instead at /tmp/Ho8g0yOlRg line 1:␤------> [32msay <[31m>; say <STDIN>[0m␤FAILED 00:02 34m␤»
14:33 masak std: say <>
14:33 p6eval std 25962: OUTPUT«##### PARSE FAILED #####␤Obsolete use of <>; in Perl 6 please use =<> or () instead at /tmp/HqpUaw1X2B line 1:␤------> [32msay <[31m>[0m␤FAILED 00:02 34m␤»
14:33 masak std: say <STDIN>
14:33 p6eval std 25962: OUTPUT«##### PARSE FAILED #####␤Obsolete use of <STDIN>; in Perl 6 please use =$*IN instead at /tmp/aXlLRR5tDU line 1:␤------> [32msay <[31mSTDIN>[0m␤FAILED 00:02 34m␤»
14:33 * masak submits
14:35 Meijito jnthn, maybe exist other way to las thing?
14:35 Meijito Cause I getting error:
14:35 Meijito $Tekstas5->configure(-text => "Atsakymu reitingas: %.2f\n", $TekstoAtsakymas);
14:35 Meijito unknown option "0.666666666666667" at C:\Documents and Settings\Mantas B\My Documents\Learning\foo.pl line 145.
14:35 Meijito I using Tk and here aren't printf.
14:35 masak heh, looks like I already submitted that one two weeks ago.
14:36 masak Meijito: this is #perl6. we gladly answer questions about Perl 6.
14:36 masak for Perl 5, there are other fora.
14:56 jan_ joined #perl6
14:57 aindilis joined #perl6
15:00 amoc joined #perl6
15:13 bigpresh joined #perl6
15:17 jnthn Wow. To say I'd been answering Meijito's questions thinking he was meaning Perl 6... :-)
15:18 jnthn Meijito: look up sprintf. But yes, this channel is about Perl 6, rather than Perl 5. :-)
15:21 alester joined #perl6
15:23 * jnthn wonders how to resovle merge conflicts with git...
15:24 masak jnthn: just add the files when you've edited the conflicts.
15:25 jnthn masak: I get: error: Entry 'src/classes/IO.pir' not uptodate. Cannot merge.
15:25 jnthn masak: It didn't give me the both versions as svn would have, so I can go in and pick what I want.
15:25 masak huh? you get that when you do 'git add src/classes/IO.pir'?
15:26 jnthn No, I did it when I did git pull
15:26 masak ah.
15:26 jnthn I have local changes to it, and someone else has also made changes.
15:26 masak yes.
15:26 masak that's why you cannot merge.
15:26 jnthn Suggestions? :-)
15:26 masak hm.
15:26 masak git stash?
15:26 masak maybe not.
15:27 jnthn damm, I jus typed it! :-P
15:27 masak jnthn: this will sound a little haughty, but I seldom end up in that kind of situation nowadays in my git usage. :)
15:27 masak so I don't know what the best measures might be.
15:28 jnthn heh
15:28 masak anyway, did the stash thing work?
15:28 jnthn git stash followed by git pull worked.
15:28 masak I'm not sure you'll be able to stash apply after that, though.
15:28 masak but do try.
15:29 jnthn And git stash apply...yes, nice. :-)
15:29 jnthn masak++
15:29 masak jnthn: in other news, you should do development in a branch. kthxbai.
15:29 jnthn But I fear I might have just damaged the other person's change...
15:31 jnthn masak: I struggle to see how that would have helped me.
15:31 masak jnthn: let me put it like this: git rocks. :P
15:31 masak no, seriously. branches do help here.
15:32 masak at least in my workflow.
15:32 masak it goes like this: branch, hackhackhack, switch back to master, pull, switch back to branch, rebase, switch back to master, merge, push.
15:33 masak it's the rebase step that contains all the wonderfulness.
15:37 masak it makes the strife of mergine occur (1) in my local branch, away from all official things, (2) one commit at a time, and they're _my_ commits, so I can manage the conflicts better.
15:37 masak s/ine/ing/
15:39 jnthn Aye
15:39 masak git++
15:45 * jnthn tries to work out why on earth we've ended up with eval in control.pir rather than eval.pir
15:46 masak :)
15:46 * masak remembers talking to pmichaud about that
15:46 jnthn I'd be bothered to move it, apart from stuff is getting migrated to the Perl 6 setting anyways...
15:46 masak don't remember the rationale, though.
15:50 Meijito Is it possible write in file in 5 line info without overwritening whole file?
15:51 masak jnthn: right, how does one append in Perl 6?
15:51 masak :rw overwrites, right?
15:51 Tene joined #perl6
15:52 jnthn :a
15:52 masak jnthn: really? that's great, then.
15:52 jnthn IIRC
15:52 masak buubot: spack :a
15:52 buubot masak: S01-overview.pod:81 S02-bits.pod:2274 S03-operators.pod:2396 S04-control.pod:874 S05-regex.pod:2038 S06-routines.pod:1799 S07-iterators.pod:109 S09-data.pod:770 S10-packages.pod:104 S11-modules.pod:342 S12-objects.pod:1387 S13-overloading.pod:139 S16-io.pod:243 S17-concurrency.pod:307 S19-commandline.pod:227 S22-package-format.pod:142 S26-documenta
15:53 masak oops.
15:53 masak buubot: spack \:a
15:53 buubot masak: S02-bits.pod:14 S03-operators.pod:1 S05-regex.pod:3 S06-routines.pod:5 S11-modules.pod:12 S12-objects.pod:4 S19-commandline.pod:2 S26-documentation.pod:85 S29-functions.pod:2
15:53 masak buubot: spack \:a\b
15:53 buubot masak: S02-bits.pod:12 S03-operators.pod:1 S05-regex.pod:2 S06-routines.pod:3 S19-commandline.pod:1
15:53 jnthn masak: Implmemnted, even.
15:53 masak ooh! bonus points!
15:54 jnthn aye
15:54 * jnthn fixes a Friday night braino
15:56 masak ah, we did _something_ right in proto. Upgrading to Rakudo Oslo is a one-char commit. :)
15:58 jnthn wow
15:58 Matt-W nice!
15:58 masak I'll nopaste it for you. :)
15:58 jnthn masak: Is November targeting Oslo now?
15:59 masak jnthn: theoretically, yes.
15:59 masak ihrd and I tried it on HEAD today, but we're supposed to be targetting Oslo.
15:59 masak so is proto, I guess.
16:00 masak I want to start dogfooding proto; then I can build everything off Oslo.
16:01 Matt-W I think I'll target HEAD with Form, I seem to need bugfixes a lot :)
16:01 Matt-W And it's in no way a product yet
16:01 masak http://gist.github.com/83212
16:01 Matt-W masak: :)
16:01 masak Matt-W: that's fine. just be aware that proto targets latest-release Rakudo by default.
16:02 masak but I suspect that proto still has very few users, so...
16:02 Matt-W Since Form can't do anything yet, I'm not hugely worried :)
16:02 pmurias joined #perl6
16:02 Matt-W At some point that will change
16:03 masak Matt-W: yah, you should add that 'do anything' feature we've been discussing. :P
16:03 Matt-W :)
16:05 * masak hacks on proto so that he can start dogfooding
16:05 masak I should really blog about proto, too.
16:06 cspencer joined #perl6
16:12 * jnthn ponders the least nasty hack to get %*INC to contain setting stuff
16:17 sri_kraih_ joined #perl6
16:19 cspencer generally speaking, should methods in the setting be arranged in alphabetical order?
16:19 cspencer or to put it another way, if i alphabetize them, will anyone complain? :)
16:20 masak I might, for 'git blame' reasons. but not very loudly.
16:20 jnthn cspencer: Alphabetical order is good, yes.
16:20 cspencer alrighty :)
16:21 jnthn But maybe not worth the effort to go through re-ordering everything for now.
16:21 cspencer well
16:21 cspencer i was going to add more methods to a particular file and clean it up at the same time
16:21 jnthn Ah, OK.
16:21 jnthn Which one, BTW?
16:21 cspencer so it's not too much of an effort issue for me
16:21 jnthn In that case, fine.
16:21 cspencer Any-*.pm primarily
16:21 jnthn OK.
16:25 * jnthn spectests his evil creation
16:25 jnthn (Getting things marked is export in the setting actually imported by default)
16:26 jnthn (So we can move more stuff to the setting.)
16:35 masak rakudo: my Regex $r = /foo/
16:35 p6eval rakudo de786f: OUTPUT«Type mismatch in assignment.␤current instr.: 'die' pc 15868 (src/builtins/control.pir:204)␤»
16:36 jnthn Aye, we don't have .loadinit() support for PGE thingies yet.
16:36 masak ah.
16:37 jnthn So can't re-bless the Parrot sub.
16:37 masak I won't report that one.
16:37 masak something similar is likely already in there.
16:37 jnthn Can if you wish, it's on pmichaud's near-time task list.
16:37 jnthn Ah, OK.
16:37 masak I'll look and see if I find anything similar, then submit.
16:38 jnthn awww...damm...I might have broken something important. :-|
16:39 lumi joined #perl6
16:42 masak I still think there's a vacancy for a second type of "bug wrangler" in the Perl 6 commune: one who does his damndest to keep the bug count down. :) i.e. closing bugs that are fixed but forgotten, merging bugs that are the same, rejecting bugs that are wrong...
16:42 * jnthn wonders how on earth he managed to pass the whole suite apart from crashing on tspecS05-massrx.rakudo
16:42 masak that work is still distributed on many people right now.
16:43 jnthn Aye, there's certainly space for somebody to take that role.
16:43 mberends joined #perl6
16:43 masak no, didn't find anything on Code/Regex
16:43 * masak submits rakudobug
16:45 * jnthn looks in despair at the error he has.
16:45 jnthn A method named '_block1033' already exists in class 'PGE;Grammar'. It may have b
16:45 jnthn een supplied by a role.
16:46 jnthn If only a small test had failed... :-|
16:48 jnthn Gah. Worse. I found it and it's gonna be one of those heisen-bugs... :-|
16:49 jnthn masak: ping
16:50 jnthn masak: Is unpack meant to work as a method on string?
16:50 masak jnthn: not that I know.
16:50 jnthn Hmm.
16:50 jnthn Ok
16:50 masak though the specs on unpack are a bit vague.
16:51 jnthn unpack is the unlucky (completely by chance, but no fault of its implementation) function that manages to have a regex block that ends up conflicting with the name of one in the setting.
16:51 Psyche^ joined #perl6
16:51 masak jnthn: interesting.
16:51 jnthn And sicne they are methods, they end up conflicting sicne they are int he same namespace.
16:52 masak it's a method? I don't think it should be.
16:52 masak feel free to demote it.
16:52 jnthn All regexes are method-y.
16:52 masak oh, the regex.
16:52 jnthn masak: Yeah, but it's not a problem with unpack.
16:53 jnthn Just an issue of things conflicting.
16:53 masak is there a way to resolve the conflict?
16:53 jnthn Turns out, putting unpack after lines in Any-str.pm rather than before makes the test pass again. ;-)
16:54 jnthn I think I'll do that and ask pmichaud for his thoughts on a real solution.
16:54 jnthn He may already have one in mind.
16:54 gdonald joined #perl6
16:54 masak ok, good.
16:54 jnthn Anyway, this means I can put in my patch to import stuff from the setting.
16:55 jnthn Which means that, say, lines written in the setting in IO (the lines variant that takes a file handle rather than a string) now works.
16:55 jnthn As lines($fh);
16:55 jnthn When put in the setting.
16:58 masak rakudo: class A is Array { method foo($x) { say $x } }; my A $a .= new; $a.push(5); $a.foo("OH HAI")
16:58 p6eval rakudo de786f: OUTPUT«OH HAI␤»
16:58 masak it boggles my mind that that works.
16:59 jnthn Why?
16:59 masak I don't know, really.
16:59 jnthn A is just a class, you can inherit from it. :-)
16:59 masak it feels like a one-liner with many possible points of failure.
16:59 jnthn erm, Array, rather...
16:59 masak anyway, Rakudo++
17:03 skids joined #perl6
17:05 dalek rakudo: 3d030b0 | jnthn++ | src/builtins/eval.pir:
17:05 dalek rakudo: Fix a braino in my first cut of import; we may only want to load the module once, but we may need to import many times into many different scopes, so checking we only imported the first time was completely bogus.
17:05 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/3​d030b0943c5edf3da86a19639aa79aa80f910d9
17:05 dalek rakudo: f6e7fcb | jnthn++ | build/gen_setting_pm.pl:
17:05 dalek rakudo: Get gen_setting_pm.pl to generate use statements at the end, which import the various classes in the setting. We also have to make sure we note them in %*INC so it doesn't go trying to load Any.pm, etc from disk. This is fine for when we're compiling - just use a BEGIN - but since those aren't persisted we need to make sure we set up %*INC in the pre-compiled version too. Did it with a sick hack for now; hopefully someone thinks of a good way...
17:05 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/f​6e7fcbae4d3a4683ce9a1aa908c4bdeeab84f2c
17:05 dalek rakudo: 34d36f0 | jnthn++ | src/ (3 files):
17:05 dalek rakudo: Four more methods from IO moved to the setting, including lines (which is now imported from the setting, by other recent changes, thus why it is safe to mvoe without breaking any tests).
17:05 mahen joined #perl6
17:05 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/3​4d36f0b0124b9bb2b72e400717c8b160f0df031
17:05 mahen hello all
17:05 mahen when is perl6 comming?
17:05 Diederich it's already here!
17:06 Diederich rakudo: say "Howdy mahen!"
17:06 p6eval rakudo de786f: OUTPUT«Howdy mahen!␤»
17:06 masak mahen: is there any particular feature you're waiting for?
17:06 mahen what, you mean the final release?
17:06 masak mahen: even Perl 5 hasn't had a "final release".
17:06 masak mahen: not many programming languages do.
17:07 jnthn mahen: If what you mean is, do we have a complete implementation of the Perl 6 spec yet, the answer is no. But there's plenty that is implemetned today that you can play with. :-)
17:07 mahen so can we call it stable enough to use
17:07 Diederich Regarding a 'GA' version,
17:07 masak mahen: I use it daily. it's fairly stable by now.
17:07 Diederich it's closer now than ever
17:08 mahen r u still bootstrapping it from parrot
17:08 mahen ?
17:08 masak mahen: aye, Rakudo Perl 6 is built on top of Parrot.
17:09 mahen there are 3 choices on dev.perl.org
17:09 mahen which should i choose?
17:10 masak Rakudo.
17:10 masak satisfaction guaranteed, or money back.
17:10 mahen ok
17:15 * jnthn realizes that if we can port almost all methods of List and Array over to the setting, it will make the refactoring that is needed later on far, far, easier.
17:15 masak dang! lines($file) isn't in Oslo! :P
17:15 masak I've already come to depend on it...
17:16 jnthn Oh?
17:16 jnthn Hmm.
17:16 Matt-W jnthn: how many is 'almost all'?
17:16 jnthn Matt-W: Pretty much everything bar iterator and postcircumfix:[ ]
17:17 Matt-W everything that can be implemented in terms of iterator and postcircumfix:[ ]?
17:17 grwi joined #perl6
17:17 jnthn I think everything else can be...
17:17 jnthn Oh, not !flatten
17:17 Matt-W seems likely that the great majority can be
17:17 jnthn Aye.
17:17 grwi left #perl6
17:18 mberends jnthn: is there a greater risk of poor performance in setting? would PIR in setting avoid that?
17:18 jnthn I need to do this so I can then make it has-a RPA for storage or something. Then it can become a role...
17:18 jnthn mberends: We're going to take a performance hit at first, for sure.
17:18 davidfetter joined #perl6
17:18 jnthn mberends: However, if we don't, we're never going to get a bunch of stuff we're getting wrong now right.
17:18 davidfetter hello
17:18 mberends no gain without pain, ok
17:19 Matt-W hopefully we can make that up and more with compiler performance work
17:19 davidfetter anybody packaging rakudo into RPMs?
17:19 jnthn But once we migrate stuff into the setting, they get Perl 6 signatures and auto-threading just falls out naturally too.
17:19 jnthn So it should be for postcircumfix:[ ] also.
17:20 Matt-W jnthn: does Perl 6 with inline PIR still autothread?
17:20 jnthn davidfetter: I haven't heard of anyone doing that.
17:20 davidfetter k
17:20 jnthn Matt-W: Yes and no, depends what you mean.
17:20 davidfetter would you likely have if there were somebody?
17:20 Matt-W davidfetter: if you want an easy way to try it out, look at proto
17:21 jnthn Matt-W: If you mean, you write something in the setting and it has embedded PIR in a method, then calls to that method would still auto-thread.
17:21 jnthn It's that the method has a Perl 6 signature that is key;.
17:21 davidfetter Matt-W, actually, i'm looking for a way to package it so others can try it out. i'm ok with perl Configure, but yum install will get more people on it
17:21 Matt-W jnthn: excellent
17:21 mahen left #perl6
17:21 Matt-W davidfetter: true, true. now we have parrot 1.0, there may be people looking at packaging that
17:21 jnthn davidfetter: Agree it would be a nice thing.
17:22 * davidfetter has a yum-installed parrot 1.0.0 on his f10 box atm :)
17:22 Matt-W ah it's already done, great
17:22 davidfetter which is what got me on this track
17:22 davidfetter well, it was yum localinstall
17:22 jnthn davidfetter: Don't think that Rakudo plays too well with installed Parrot right now, though...
17:22 davidfetter but still :)
17:22 davidfetter hrm
17:22 jnthn That might get in the way of what you want to do.
17:22 davidfetter that's not so great
17:22 Matt-W yeah Rakudo's build system may need some work to support that properly
17:22 davidfetter what all's in the way at the moment?
17:23 jnthn davidfetter: I'm not sure what the issues are, pmichaud is more likely to have a better idea.
17:24 davidfetter k
17:24 jnthn I don't know that there's that many things in the way of making Rakudo installable and using an installed Parrot, it's just not something anybody has had tuits to do yet.
17:24 davidfetter hrm. looks like he's out for the weekend
17:25 jnthn I think other languages, e.g. Lua, have looked at this a bit.
17:26 davidfetter oh? do those devs hang out in irc.perl.org/parrot?
17:26 jnthn Some will, I think fperrad has done the Lua stuff and I don't think he's on IRC that much though.
17:26 davidfetter k
17:28 santax joined #perl6
17:29 santax hello
17:30 skids OH HAI
17:30 davidfetter HAI
17:31 mberends santax: hi, many people here are waiting for Santa to bring them Perl 6
17:31 santax :)
17:31 * Matt-W puts on his giant beard
17:31 santax i have a quick question
17:32 santax just installed parrot 1.0 and rakudo
17:32 santax so I wanted to try it as cgi
17:32 santax i have Webweaver as web server
17:33 santax so I made a small hello world cgi, but it gives: "This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. src\io\api.c:451: failed assertion 'pmc'"
17:34 santax the script runs nice in command line though
17:34 skids IIRC the perl6 executable kinda still expects to be run from inside the source tree.
17:35 skids It's not a real executable yet, unless things have changed recently.
17:35 santax it's in the path
17:35 skids It may have to be the cwd
17:35 jnthn santax: Also, libparrot.dll maybe needs to also be in the path if it's not already.
17:35 jnthn erm
17:35 jnthn I just assumed you were on Win32, which may have been a bad assumption. :-)(
17:36 santax win32, test environment on my laptop
17:38 jnthn OK.
17:38 jnthn Hmm. I don't remember seeing that assertion fail before. Odd.
17:38 jnthn Check libparrot.dll is in your path though, that may be it.
17:39 santax the dll is in the same place as the perl6.exe
17:39 santax so it is the path
17:40 jnthn Ah, OK.
17:40 * jnthn ponders what it could be.
17:41 ejs joined #perl6
17:42 braceta joined #perl6
17:46 Schnueff joined #perl6
17:48 jnthn santax: I think perhaps best is to file a bug report about this and I or something else can try and re-produce it locally, under a debugger.
17:50 Matt-W Right
17:50 Matt-W Time to try and get a test case for my apparently-infinite loop
17:50 jnthn santax: rakudobug@perl.org
17:50 jnthn Matt-W: I've just managed to trigger a GC bug in Parrot. :-(
17:51 jnthn By moving some methods around.
17:51 Matt-W fun
17:51 Matt-W I just tried to call a subroutine :(
17:51 jnthn (into the setting)
17:51 jnthn Yeah, worse, the bug evaporates under the debugger.
17:52 Matt-W oh joy
17:52 Matt-W They're my favourite, favourite kind
17:52 jnthn Which means it's near-impossible to get a handle on...
17:53 Matt-W Even better than the ones that only happen to one customer once, but which they hound you about for six months
17:54 Southen joined #perl6
17:54 santax ok, i'll send a bug report
17:55 jnthn santax: Thanks.
17:57 msmatsko left #perl6
17:57 jnthn Matt-W: eh, curious. It's moving item from PIR to setting that triggers it.
17:57 jnthn Moving just that one back makes it go away.
17:58 jnthn Serious wtf.
17:58 Matt-W jnthn: Okay you win the weird prize
18:00 cspencer anyone know where i might find the official signature for the Any.trim() method?  it doesn't appear to be in S32...
18:00 cspencer (or perhaps it's not been fully specced yet?)
18:01 msmatsko joined #perl6
18:01 jnthn cspencer: The latter is quite possible.
18:02 cspencer alright - should i just leave it as it right now or redo the PIR version it P6?
18:02 cspencer s/it P6/in P6/
18:04 Matt-W do it, do it!
18:05 jnthn cspencer: Do it, and patch S32 also. ;-)
18:06 cspencer will do :)
18:06 Matt-W gargh
18:06 Matt-W why won't this bug reproduce
18:06 Matt-W oooh
18:07 Matt-W ooooooh
18:07 Matt-W it's different if I don't run it under prove
18:07 Matt-W hmmm
18:07 jnthn Ouch. That's never a good sign.
18:07 Matt-W yeah
18:08 Matt-W it still loops but it seems to do it in a different place
18:08 jnthn Matt-W: If you want to find out something very nasty
18:08 jnthn ../../parrot -G perl6.pbc thingy.p6
18:08 jnthn which disables GC
18:08 jnthn If it's a garbage collection bug, this will make the problem go away.
18:09 Matt-W jnthn: no still does it
18:09 Matt-W memory climbs like crazy though
18:10 jnthn Matt-W: Sure, it will because it's not re-claiming any. :-)
18:10 jnthn Matt-W: OK, that this didn't help is something to be glad for. :-)
18:10 jnthn If -G helps, we're in the crap.
18:10 Matt-W yeah but it shows that the loop is causing stuff that's being reclaimed, rather than allocating endlessly
18:10 Matt-W which might be a hint as to what's going on
18:10 Matt-W not a very good hint though :)
18:11 Southen_ joined #perl6
18:15 moritz_ hi there
18:16 jnthn hi, moritz_
18:16 Matt-W hey moritz_
18:17 moritz_ I see there was quite some activity during the weekend...
18:17 moritz_ (or at least on Friday after I went)
18:17 Matt-W ooh
18:18 jnthn moritz_: Aye, some bits. :-)
18:18 jnthn moritz_: Mainly on importing from me.
18:18 jnthn And a few more bits to setting.
18:18 moritz_ I have done some small bits as well, but I want to smoke (after git pull --rebase) before I push it
18:19 Matt-W jnthn: found it
18:19 Matt-W rakudo: my $x = "wibble"; $x.subst(/<ws>+ $$/, "");
18:19 Matt-W probably shouldn't have done that...
18:20 Matt-W sorry feather...
18:20 jnthn Matt-W: It infinite-loops?
18:20 Matt-W yes that was ridiculously dumb
18:20 Matt-W can anybody get in and kill it?
18:20 jnthn Apparently so.
18:20 moritz_ it's doing that itself
18:20 p6eval joined #perl6
18:20 Matt-W oh cool
18:20 Matt-W very cool
18:20 moritz_ it has a CPU time limit
18:20 santax jnthn: I downloaded your pugs binary and tried cgi with it - works like charm :)
18:20 Matt-W and that would've chewed CPU like crazy
18:21 jnthn santax: Oh my, those binaries are...oooold.
18:21 moritz_ so the only condition where p6eval hangs is when it reads from a (blocking) stream
18:21 Matt-W moritz_: the usual problem, hard business to solve that
18:21 cspencer i see trim.t references "trim_start" and "trim_end" methods but indicates that they're not implemented - were they destined for S32 but never happened?
18:21 * Matt-W doesn't like blocking network IO
18:21 Matt-W jnthn: anyway, that's where my loop seems to be ,shall I file a rakudobug?
18:22 jnthn cspencer: I seem to remember there was a p6l thread not so long back abotu trim
18:22 cspencer ah ok, i'll search the archive then and see what the results were
18:22 jnthn cspencer: Suggest looking it up and seeing what (if any) conclusions it came to.
18:22 santax 2007 june... yepp, really old...
18:22 santax :)
18:27 Matt-W jnthn: bug filed
18:29 jnthn Matt-W: Thanks.
18:30 dhoss joined #perl6
18:31 Matt-W jnthn: I'm going to implement a workaround for now
18:32 Norm joined #perl6
18:36 cspencer jnthn: there didn't seem to be any conclusions reached in the p6l thread, but i've gone ahead and implemented trim in the setting as it was in the PIR version and submitted it
18:40 jnthn cspencer: OK, nice. :)
18:43 ejs joined #perl6
18:46 pugs_svn r25963 | moritz++ | [t/spec]
18:46 pugs_svn r25963 | moritz++ |  * tests for RT #63956
18:46 pugs_svn r25963 | moritz++ |  * state variables in subset types
18:46 pugs_svn r25963 | moritz++ |  * subsets of subset types
18:46 pugs_svn r25963 | moritz++ |  * sub form of split with limits
18:47 pugs_svn r25963 | moritz++ |  * Str.split('', $limit) tests
18:47 dalek rakudo: 02fb9da | (Moritz Lenz)++ | t/spectest.data:
18:47 dalek rakudo: add test file for RT #63956 to t/spectest.data
18:47 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/0​2fb9da9e424be159fd52bad2d18d48cff3ba970
18:47 dalek rakudo: 28a2792 | (Moritz Lenz)++ | src/setting/Any-str.pm:
18:47 dalek rakudo: Str.split used to ignore limits while splitting on the empty string. Corrected that
18:47 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/2​8a2792ed4aedaffd7844e3acd81a6a7c5e3a574
18:47 dalek rakudo: eefb89f | (Moritz Lenz)++ | src/setting/Any-str.pm:
18:47 dalek rakudo: sub form of split now supports a limit
18:47 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/e​efb89fd00232cc62a927649c80d33689a110c98
18:47 dalek rakudo: 1d2451d | (Moritz Lenz)++ | Test.pm:
18:47 dalek rakudo: [Test.pm] remove unused function approx()
18:47 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/1​d2451d109af40453ca220c75df5e411304aa6b5
18:47 dalek rakudo: 07ad307 | (Moritz Lenz)++ | src/setting/Match.pm:
18:47 dalek rakudo: add $.ast to Match.perl output
18:47 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/0​7ad3072bd2eac63fe29bb5f4e2a42d94283b6d2
18:48 jnthn NOM NOM NOM
18:48 jnthn oh
18:48 jnthn .ast
18:48 jnthn I totally read that as .eat.
18:49 * jnthn really, really should go and get dinner.
18:49 Matt-W lol
18:49 Matt-W hungry?
18:49 dhoss left #perl6
18:49 jnthn Yeah
18:49 jnthn Now just need to decide...to cook or to go out.
18:50 Norm left #perl6
18:51 Matt-W may I suggest... if $fridge.contains(Steak) { jnthn.cook; } else { jnthn.go; }
18:52 jnthn $fridge contains many @thing, but steak ain't one of them.
18:52 Matt-W mine doesn't either actually
18:52 Matt-W but there's some in the freezer
18:52 jnthn That's something I do miss about living in Spain. Availability of good steak for pretty low prices.
18:52 Matt-W hmm
18:53 Matt-W until now I've never wanted to go to Spain
18:53 jnthn Here it seems hard to find that.
18:53 Matt-W It tends to be fairly pricey here
18:53 jnthn Spain is good if you can go when/where the masses of tourists aren't.
18:55 * moritz_ just closed one ticket... and opened four new ones
18:55 Matt-W jnthn: yes that would be a problem
18:55 Matt-W I can only remember about five words of spanish
18:55 davidfetter .oO(ticket whack-a-mole)
18:55 moritz_ BTW I found that state vars work in subset types *evil grin*
18:56 jnthn moritz_: omfg.
18:56 davidfetter moritz_, that's kinda scary
18:56 Matt-W moritz_: are they supposed to?? that could be... scary weird
18:56 jnthn Yeah, I see no reason why they wouldn't work.
18:56 moritz_ I see no reason why the should be disallowed
18:56 jnthn Did you know that you can also subset Foo of Bar where <-> $x { ... }
18:56 Matt-W I suppose
18:56 Matt-W rope... hang...
18:56 jnthn or where -> $x is rw { ... }
18:57 jnthn And then the constraint can modify the variable too.
18:57 Matt-W oh nice
18:57 moritz_ ouch
18:57 Matt-W I have no idea why I might want to do that
18:57 Matt-W but somebody very very clever might think of something cunning
18:57 davidfetter iop6cc
18:57 moritz_ rakudo: subset Two of Int where <-> $x { $x = 2 }; my Two $x = 3; say $x;
18:57 davidfetter not that there's much reason to hold such a thing
18:57 p6eval rakudo 34d36f: OUTPUT«2␤»
18:57 jnthn moritz_: Anyway, glad to here it works. Feel free to add a test.
18:58 Matt-W jnthn: I don't think my bug did happen in a different place under prove, I think prove was just doing things with the output buffering
18:58 moritz_ will do
18:58 jnthn Matt-W: Ah, OK.
18:58 Matt-W jnthn: which is a bit more reassuring
18:58 * jnthn isn't sure if what moritz_ just ran is sick or awesome.
18:59 Matt-W actually I should add a note to the bug
18:59 moritz_ probably both ;-)
18:59 Matt-W it seems to be to do with repetition quantifiers on <ws>
18:59 Matt-W because I tried another match with <ws>+ in it and it looped too
18:59 moritz_ jnthn: just a weird idea... you could implement coercion like that
18:59 jnthn Erm
18:59 jnthn Doesn't <ws> actually match multiple whitespace anyway?
18:59 jnthn By default, that is...
19:00 Matt-W I don't know
19:00 jnthn moritz_: That'd be...weird. :-)
19:00 Matt-W but it shouldn't cause an infinite loop
19:00 jnthn Matt-W: Oh yes, it's a bug for sure.
19:00 moritz_ rakudo: subset ToStr of Any where <-> $x { $x = ~$x; True }; sub f(ToStr $a) { say $a.WHAT }; f(3);
19:00 p6eval rakudo 34d36f: OUTPUT«Str␤»
19:00 jnthn But we use <ws> all over the Rakudo grammar to mean ""one or more whitespace"
19:00 Matt-W but I had wondered why have <ws> and \s, I guess I know now
19:00 moritz_ it sure *is* weird
19:01 jnthn moritz_: There's what can be done and what should be done. :-)
19:01 moritz_ <ws> optional unless between two identifier characters
19:01 jnthn yeah
19:01 jnthn Matt-W: Any reason not to use \s+ ?
19:01 moritz_ jnthn: I know, just playing around with the stuff
19:01 jnthn ws is a tad magical.
19:01 cspencer i'm attempting to move sqrt from PIR into Any.pm but i'm having some issues
19:01 cspencer there's a version for Float/Int in any-num.pir
19:01 jnthn moritz_: Aye. I'm kinda happy it works in Rakudo.
19:02 cspencer and another for Complex in classes/Complex.pir
19:02 jnthn cspencer: Ah. Are they exported/multis?
19:02 cspencer but i can't seem to get the complex one to be called
19:02 cspencer yes, exported/multi's
19:02 jyy joined #perl6
19:02 jnthn You've probably hit on a limitation in my "things to fix soon" list. :-(
19:03 cspencer ah, ok :)  i'll back off of sqrt for the moment then :)
19:03 jnthn We aren't sticking the type properly on invocants in signatures.
19:03 cspencer gotcha
19:03 moritz_ rakudo: sub sqrt(Complex $x) { say "in Complex" }; sqrt(1+1i)
19:03 p6eval rakudo 1d2451: OUTPUT«in Complex␤»
19:03 Matt-W jnthn: no not particularly, in fact that's what  idid to dodge the loop
19:03 jnthn moritz_: That's fine. The problem is when you write it in a class and expect the invocant to automatically get the type of the class.
19:03 moritz_ rakudo: multi sub sqrt(Complex $x) { say "in Complex" }; multi sub sqrt(Any $x) { say "in Any" };  sqrt(1+1i)
19:03 p6eval rakudo 1d2451: OUTPUT«Null PMC access in find_method()␤current instr.: '_block14' pc 105 (EVAL_16:48)␤»
19:04 cspencer jnthn: that would explain some other issues too then
19:04 cspencer thanks ;)
19:04 moritz_ but that... shouldn'T happen, right?
19:04 jnthn moritz_: That's likely because sqrt is already defined as a non-Rakudo multi-sub.
19:04 jnthn moritz_: Combining the two causes issues - we have a ticket saying as much, though it was max in the ticket.
19:04 moritz_ ah. One more reason to move stuff to the setting
19:04 jnthn This is yet another...right.
19:05 moritz_ rakudo: multi sub s(Complex $x) { say "in Complex" }; multi sub s(Any $x) { say "in Any" };  s(1+1i)
19:05 p6eval rakudo 1d2451: OUTPUT«in Complex␤»
19:05 jnthn Seriously need to fix that invocant thing though.
19:05 jnthn OTOH, on Friday night I seriously needed to fix importing of multi subs, so that was another step to getting us able to shove everything in the setting.
19:06 Matt-W whenever you fix something, there'll be something else you really need to fix right behind it
19:07 jnthn Aye.
19:07 skids Damn, and I was so looking forward to my daily bombardment-of-ruoso-with-minutia session.
19:07 NordQ joined #perl6
19:08 skids Anyone else like iterators enough to speculate on them?
19:09 Matt-W I'm always happy to baselessly speculate
19:09 skids OK. easy one first: what do you get if you @a <== 1..Inf; @a.pop; ?
19:10 Matt-W hmm
19:10 Matt-W Inf, I suspect
19:12 msmatsko_ joined #perl6
19:12 Matt-W but doing it again probably wouldn't be wise
19:12 skids Then, what do you get if you @a <== map({ $_ ~ "#"}) <== 1..Inf and then pop?
19:13 Matt-W depends what Inf stringifies to?
19:13 skids My vote is for a thrown exception, actually :-)
19:13 moritz_ it'll probably loop
19:13 moritz_ because @a.pop will try to access the last item
19:13 Matt-W my original answer depends if it's smart enough to spot that Inf is the last item without iterating the entire list
19:14 Matt-W it might not be
19:14 skids It may have to, because if you have a generator of unknown but finite length, you'd want it to work.
19:14 moritz_ so it'll try consume the iterator, and run out of space somewhere
19:14 Matt-W if you're dealing with finite lists, you're going to have to accept evaluation of it at some point
19:15 wknight8111 joined #perl6
19:15 skids Maybe the safest answer is that you "MAY get an exception if the implementation can detect an infinite loop beforehand, but in any case MAY get and infinite loop" (where MAY is spectalk)
19:16 Matt-W playing around with the far end of an infinite list is potentially dangerous
19:16 Matt-W Haskell can't spot them
19:16 skids Now the trickier one.
19:16 jnthn skids: I think that sounds reasonable.
19:16 moritz_ indeed
19:17 skids If you index a finite but unknown iterator until it runs out of elements:
19:18 skids @a <== some_generator(); while (@a[$i]:exists) $i++;
19:18 lambdabot Maybe you meant: activity activity-full admin all-dicts arr ask . ? @ v
19:18 skids Then @a has cached values.
19:18 skids But is it shaped?
19:19 moritz_ if you don't know the size beforehands, and @a isn't declared to be shaped, it's not shaped
19:19 davidfetter left #perl6
19:19 skids So then you can @a.push at that point and it is a normal array?
19:20 moritz_ when you push to @a, it'll block at the point until the generator is exhausted
19:20 moritz_ at least that's my understanding
19:20 ZuLuuuuuu joined #perl6
19:21 skids So once the generator is exhausted, it becomes a normal array?
19:21 moritz_ yes
19:23 * skids is out of minutia for the time being.
19:23 skids Thanks
19:27 moritz_ I've pushed a branch called 'autounfudge-with-limits' to github, it contains rather hacky way to run autounfudge with resouce limits
19:27 moritz_ so that looping tests will die after 2 minutes or so
19:30 dalek rakudo: 351793a | jnthn++ | src/ (2 files):
19:30 dalek rakudo: Move .reverse and .list of List into the setting.
19:30 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/3​51793ad8e9416c87eb86fd4e1f28dfb70c57e78
19:30 dalek rakudo: 637767b | jnthn++ |  (4 files):
19:30 dalek rakudo: Merge branch 'master' of git@github.com:rakudo/rakudo
19:30 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/6​37767bb25acff61a507469c042f1a97bad82bc5
19:30 * skids resists the urge to write "If you attempt to ass-grab an Infinite list."
19:38 Meijito How activate in perl utf8?
19:38 Meijito I do: use utf8;
19:38 Meijito But my program still not understan my charackters.. (����������)
19:39 moritz_ Meijito: in Perl 6 UTF-8 is the default. For Perl 5 this is the wrong channel.
19:39 Meijito Damn.
19:39 Meijito perl5 is empty
19:39 Meijito :/
19:39 moritz_ maybe #perlhelp or #perl
19:39 moritz_ or perlmonks.org
19:39 Meijito In perl I can't join.. I don't know why.. :/
19:40 Meijito Ok, I will try in perlhelp.
19:40 moritz_ then try perlmonks, they're usually quite helpful
19:40 pugs_svn r25964 | moritz++ | [t/spec] tests for captures in Str.split, clinton++
19:45 Schnueff_ joined #perl6
19:48 msmatsko joined #perl6
19:51 skids $foo <== (1,2,3;4,5,6;7,8,9); =$foo;
19:51 skids Is it intended that =$foo is to be flattenning that?
19:51 skids Or returning captures?
19:52 skids Erm well maybe my @@ literal syntax isn't up to snuff.
19:52 msmatsko_ joined #perl6
19:53 moritz_ when you pipe to a scalar, it'll retain the captures
19:53 moritz_ when you pipe to slice (@@ sigil) it'll turn the captures into arrays
19:53 moritz_ and when you pipe to an array, it'll flatten
19:54 skids That's what I thought.
19:56 skids Just needed to be sure, thanks.
19:59 skids The language is a bit muddled.  Is $foo <== going to automatically discard empty captures, or is S07 saying that it is raw slice access, and "operators like map" do that internally because it is raw access?
20:04 pugs_svn r25965 | leto++ | Adding many roots tests and improve approx() to deal with various types correctly
20:04 skids also: $foo <== -- $foo must be of type... Any?  @foo <== -- @foo must be of type Postional?  Array?
20:05 dukeleto jnthn: my roots branch on github has all 30 of the tests in roots.t passing
20:05 dukeleto jnthn: there are still some edge cases of invalid input that need to die correctly, but I think the algorithm is solid for valid input.
20:06 bacek joined #perl6
20:07 * moritz_ git-remote add's leto's rakudo fork
20:08 mberends bacek: good morning.
20:08 bacek mberends: good morning
20:09 moritz_ Your branch and the tracked remote branch 'origin/master' have diverged,
20:09 moritz_ and respectively have 122 and 135 different commit(s) each.
20:09 moritz_ that's bad, isn't it?
20:11 dukeleto moritz_: it at least sounds interesting
20:11 mberends bacek: the Debian libperl-test-harness version issue had a peculiar solution. The installation had only DVD1 in sources.list. When I switched to an online mirror Lenny was able to install Test::Harness 3.12 :)
20:11 dukeleto moritz_: I think I will make a patch and then apply it to a fresh branch
20:11 moritz_ dukeleto: that was on my copy, not yours...
20:12 bacek mberends: congratulations :)
20:12 dukeleto moritz_: 10-4
20:12 jnthn moritz_: If you have time, I'm happy to hand off reviewing and applying dukeleto's patch to you. It's maths-y stuff so you're more qualified. :-)
20:12 moritz_ jnthn: ok, will do
20:12 jnthn Thanks. :-)
20:13 dukeleto moritz_: I would like to describe the algorithm in detail in POD, where should I put that?
20:13 moritz_ dukeleto: just above the implementation
20:13 dukeleto moritz_: is there something like Parrot Developer Document's for Rakudo?
20:14 dukeleto moritz_: as comment or documentation?
20:14 moritz_ dukeleto: not that I know of, and as you prefer
20:14 dukeleto moritz_: ok
20:17 jnthn dukeleto: If it will be valuable to people using the implementation, I suggest as (pod) documentation.
20:21 nbrown joined #perl6
20:25 moritz_ dukeleto: that's my attempt at merging your branch.. does that look sane to you? http://nopaste.snit.ch/15942
20:25 moritz_ I'm still learning the git fu...
20:26 szabgab joined #perl6
20:27 dukeleto moritz_: looks pretty good, I don't know that I added the sign/floor/trunc functions, but maybe they weren't in your branch yet?
20:28 moritz_ dukeleto: maybe...
20:28 dukeleto moritz: i did add the NaN checking to sign
20:29 moritz_ dukeleto: one more thing... you're implementing the fundamental functionailty in the sub, and in the method you retrieve the sub and call that... usually we do it the other way round
20:29 moritz_ so that people get all the merits of polymorphic method calls when the use the sub as well
20:30 moritz_ would you mind doing it "our" way?
20:30 dukeleto moritz: sounds good, that was just the first way I got stuff to work, there is much refactoring to be done
20:30 dukeleto moritz: of course
20:30 dukeleto so I should make the stuff in math.pir call the functions in any-num.pir ?
20:31 moritz_ dukeleto: I think you should implement the method that does all the work in src/classes/Complex.pir
20:32 moritz_ and then add subs in math.pir which call that method
20:32 jnthn moritz_: For .sub 'roots' :multi('Complex', 'Integer')
20:32 jnthn That makes sense.
20:33 jnthn Does .sub 'roots' :multi(_, 'Integer')
20:33 jnthn not belong in Any-num?
20:33 moritz_ yes, jnthn++
20:36 moritz_ wow, the "network" tab on github is quite impressive, with 31 entries
20:37 dukeleto i must admit, I did not fully understand multi method dispatch when I starting roots(), and I feel that I only marginally grasp it's full power now. I am sure there is much room for improvement
20:37 moritz_ I think that from the Perl 6 side it's much clearer
20:38 moritz_ one more reason to write built in functions in Perl 6 ;-)
20:38 moritz_ (with inline PIR where appropriate)
20:39 dukeleto moritz: i was fighting PIR syntax mostly
20:39 dukeleto moritz: the algorithm is ~3 lines in Rakudo
20:40 moritz_ dukeleto: then do it in Rakudo ;-)
20:40 dukeleto moritz: i guess I was optimizing for speed
20:42 moritz_ first get it run, then get it right... then get it fast
20:49 dalek rakudo: f782958 | jnthn++ | src/ (2 files):
20:49 dalek rakudo: Move fmt and interator methods of List to setting.
20:49 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/f​7829589f253d6cd6f0220e42900db3ec2274b12
20:53 moritz_ brevity++
20:58 jnthn Ouch. Moving elems into setting causes...issues.
20:58 pugs_svn r25966 | moritz++ | [S14] use named arguments to .new() in an example
20:58 moritz_ jnthn: because it's used by the compiler at compile time?
20:59 jnthn Yeah, inside a begin block in the setting of all places.
20:59 jnthn The BEGIN block I put in to hack a bunch of entires into %*INC...damm.
21:07 jnthn Will leave that for another day, though
21:09 jnthn I fear we're going to run into all kinds of curious stuff related to dependencies etc.
21:16 pugs_svn r25967 | moritz++ | [t/spec] test .caps on Match objects
21:17 pugs_svn r25968 | moritz++ | [t/spec] svn props for new files
21:20 szabgab std: say #( embedded comment ) "hello, world!";
21:20 p6eval std 25968: OUTPUT«ok 00:04 35m␤»
21:20 szabgab rakudo: say #( embedded comment ) "hello, world!";
21:20 p6eval rakudo f78295: OUTPUT«say requires an argument at line 1, near " #( embedd"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
21:21 moritz_ I don't think rakudo does embedded comments at all
21:21 xinming joined #perl6
21:21 moritz_ rakudo: my $x = #( foo ) 3; say $x;
21:21 p6eval rakudo f78295: OUTPUT«Statement not terminated properly at line 1, near "= #( foo )"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
21:22 * jnthn didn't even remember those existed
21:23 * moritz_ tries to implement $/.caps in Perl 6
21:23 moritz_ doesn't seem as hard as I feared, as long as no evil things like $regex1_with_capture & $regex_2_with_capture occurs
21:24 szabgab my @lines = slurp $filename;
21:24 skids How hard would it be to make exported PIR functions just serve a fallback role?
21:25 szabgab should that put one lline in one element of the array ?
21:25 moritz_ szabgab: no, it should slurp all lines
21:25 szabgab so no list context for slurp?
21:26 eternaleye_ joined #perl6
21:26 moritz_ wait
21:26 moritz_ I think I got you wrong
21:26 moritz_ it should read all lines, and place each into a separate item of @liens
21:26 szabgab it certainly does not work
21:27 moritz_ there's the lines($filename) function
21:27 skids Does slurp return a Cat?
21:27 moritz_ rakudo doesn't really implement contexts, I think
21:27 moritz_ skids: would make sense to me
21:27 skids And by the way, people stop using "Cat|Dog" in the examples :-)
21:28 moritz_ ;-)
21:28 jnthn Plz uze LolCat|HotDog insted, kplzthnx.
21:28 skids LolKAT PLZ tanx uz.
21:29 jnthn OH NOES i failed it!
21:29 szabgab moritz_,  lines ?
21:29 moritz_ rakudo: my @a = 1, 2; @a.=map: {2 * $_ }; say @a.perl;
21:29 p6eval rakudo f78295: OUTPUT«Statement not terminated properly at line 1, near ": {2 * $_ "␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
21:30 jnthn szabgab: lines gets an array with a line from the file in each element.
21:30 jnthn rakudo: my @lines = lines("README"); say @lines.elems;
21:30 p6eval rakudo f78295: OUTPUT«No applicable candidates found to dispatch to for 'lines'␤current instr.: 'lines' pc 31547 (src/gen_setting.pir:3126)␤»
21:30 szabgab it said the same to me :-)
21:30 jnthn huh
21:30 jnthn Damm.
21:30 jnthn That sucks.
21:30 moritz_ rakudo: my @lines = lines(open('README')); say @lines.elems;
21:30 p6eval rakudo f78295: OUTPUT«No applicable candidates found to dispatch to for 'lines'␤current instr.: '_block14' pc 80 (EVAL_17:43)␤»
21:31 moritz_ .oO( I wonder if that's tested anywhere... )
21:31 skids Hrm, we have Cat, and we have Rat.  Maybe Dog should be a "do gather" or something?
21:31 jnthn rakudo: &lines.WHAT.say
21:31 p6eval rakudo f78295: OUTPUT«Multi␤»
21:31 jnthn rakudo: for &lines.WHAT.candidates { .signature.perl.say }
21:31 moritz_ rakudo: &lines.candidates.perl.say
21:32 p6eval rakudo f78295: OUTPUT«Null PMC access in isa()␤current instr.: 'parrot;List;!flatten' pc 5960 (src/classes/List.pir:227)␤»
21:32 p6eval rakudo f78295: OUTPUT«[{ ... }]␤»
21:32 moritz_ jnthn: I think the .WHAT is not needed
21:32 jnthn jebat *sigh*
21:32 jnthn oh, damm
21:32 jnthn rakudo: for &lines.candidates { .signature.perl.say }
21:32 moritz_ rakudo: for &lines.candidates { .signature.perl.say }
21:32 p6eval rakudo f78295: OUTPUT«:(Str $filename, Any $bin?, Any $enc?, Any $nl?, Any $chomp?)␤»
21:32 p6eval rakudo f78295: OUTPUT«:(Str $filename, Any $bin?, Any $enc?, Any $nl?, Any $chomp?)␤»
21:33 jnthn Hmm.
21:33 moritz_ first of all they should be named
21:33 jnthn Aye, apart from the first one.
21:34 moritz_ right
21:34 jnthn But a candidate seems to be missing too.
21:34 jnthn And also I dunno why it fails on lines("README") which is a string.
21:34 moritz_ right
21:34 jnthn rakudo: lines("README")
21:34 p6eval rakudo f78295: OUTPUT«No applicable candidates found to dispatch to for 'lines'␤current instr.: 'lines' pc 31547 (src/gen_setting.pir:3126)␤»
21:34 jnthn rakudo: lines("README", 1, 1, 1, 1)
21:34 moritz_ (I keep saying that, don't I? ;-)
21:34 p6eval rakudo f78295: OUTPUT«No applicable candidates found to dispatch to for 'lines'␤current instr.: '_block14' pc 94 (EVAL_16:48)␤»
21:34 jnthn moritz_: right.
21:35 moritz_ ;-)
21:35 jnthn OK, well, that's...odd.
21:37 szabgab what is this .candidates and why does'nt it work on my rakudo ?
21:37 moritz_ it's pretty new
21:38 moritz_ and it gives a list of all multis of which have the same name
21:38 szabgab wonderful
21:38 jnthn Useful for introspection.
21:38 jnthn Or debugging, as demonstrated here. ;-)
21:38 moritz_ and debugging ... what jnthn said ;-)
21:38 szabgab or for instrospection for and IDE...
21:39 jnthn That too. ;-)
21:39 jnthn Ugh. My attempts to move .uniq into setting are epic fail.
21:39 moritz_ especially when pmichaud does his PGE magic to also include line numbers in the parse tree...
21:39 szabgab so a totally unrelated question, can someone help me write a PIR sub that gets a string and executes it in rakudo in the same process ?
21:40 jnthn (assuming you've loaded perl6.pbc beforehand)
21:40 moritz_ then each candidate could also report where it's being defined in the source file
21:40 jnthn $P0 = compreg 'Perl6'
21:40 jnthn $P1 = $P0(the_string_to_compile)
21:40 jnthn $P1() # $P1 now holds compiled code, this invokes it
21:41 jnthn Or similar.
21:41 szabgab I'll try that
21:41 szabgab just need to find the yak...
21:42 moritz_ I have Match.caps working, smoking...
21:43 jnthn szabgab: http://www.jnthn.net/photos/full/4753.jpg
21:43 lichtkind joined #perl6
21:44 * szabgab taking out the shaving machine
21:45 icwiener joined #perl6
21:45 moritz_ rakudo: 'abcdefg' ~~ /.*/; say $/.substr(2, 2)
21:45 p6eval rakudo f78295: OUTPUT«cd␤»
21:50 s1n joined #perl6
21:52 bacek_ joined #perl6
21:55 moritz_ it's amazing how much stuff actually works in Rakudo
21:55 jnthn Sadly, the opposite is equally true...
21:55 lichtkind moritz_: wie lang bleibst noch wach?
21:56 Matt-W no that's not amazing
21:56 Matt-W progress is amazing
21:56 mberends the collaborative spirit is amazing
21:57 jnthn Oh, the progress ain't bad. But there's still plenty to do.
21:57 Matt-W this is the best group of people I've ever tried to work with for open source stuff
21:57 mberends Matt-W: aye. is form unbroken yet?
21:57 Matt-W I just pushed one that doesn't loop during tests
21:57 Matt-W so kind of :)
21:57 Matt-W it doesn't pass them yet, but at least they run to completion
21:58 jnthn Yes, the people are great. :-)
21:58 Matt-W I'm getting a compiler error from one of them too
21:58 szabgab jnthn, $P1 = $P0("say 'abc'")   gives me Null PMC access in invoke()  current instr.: 'perl6' pc 12 (EVAL_1:4)  called from Sub 'parrot;Perl6;Compiler;main' pc -1 ((unknown file):-1)
21:58 jnthn szabgab: eww, hmm
21:59 jnthn szabgab: You did loadlib 'perl6.pbc' ?
21:59 Matt-W I'll worry about my other problems tomorrow.. for now, bed!
21:59 Matt-W happy hacking everyone
21:59 Matt-W &
21:59 jnthn night, Matt-W :-)
22:00 szabgab I am using the Parrot::Interpreter and it has a load_file method
22:00 szabgab I loaded the perl6.pbc
22:00 szabgab can I somehow checck that it was really loaded?
22:00 jnthn Actually looking at the error...
22:01 jnthn It seems that you made it into the compiler...
22:01 jnthn Oh, maybe not
22:01 jnthn hang on
22:02 jnthn szabgab: oh, sorry
22:02 jnthn I suck.
22:02 szabgab really ?
22:02 jnthn compiler = compreg 'Perl6'
22:02 jnthn invokable = compiler.'compile'(code)
22:02 jnthn invokable()
22:03 jnthn where code is the string you want to compile
22:03 jnthn I shoulda looked it up in eval.pir rather then scribbled it here from memory. Sorry.
22:03 moritz_ how I *hate* that Null PMC acces in get_bool() from Match.perl
22:03 jnthn So you call .compile on the thing you get back from compreg
22:04 * jnthn thinks he's worked out why uniq blew up when moved to the spectests...
22:04 moritz_ s/spectests/setting/ ;-)
22:04 moritz_ not everything that I work with and that's Perl is the test suite ;-)
22:05 jnthn oh yeah
22:05 jnthn setting
22:05 jnthn damm, I'm still failing weird stuff
22:05 jnthn :-(
22:06 cspencer joined #perl6
22:06 szabgab error:imcc:syntax error, unexpected '=', expecting '(' ('=') in file 'EVAL_1' line 3  Could not find non-existent sub compiler
22:06 moritz_ that looks like missing dynops..
22:06 jnthn szabgab: you'd need to add .local pmc compiler, invokable above that
22:07 jnthn (above what I showed you)
22:07 jnthn Just to declare them
22:07 jnthn (I used named ones rather than registers there)
22:10 moritz_ I hate this off-by-one thinking when $str.chars is 1-based and $str.substr($offset) is 0-based
22:10 szabgab the compreq now worked but the following line is still failing:
22:10 szabgab invokable = compiler.'compile'("say 'abc'")
22:11 szabgab Null PMC access in find_method() current instr.: 'myperl6' pc 10 (EVAL_1:5) called from Sub 'parrot;Perl6;Compiler;main' pc -1 ((unknown file):-1)
22:11 szabgab The whole thing I wrapped in a .sub myperl6
22:13 moritz_ in control.pir the thing that's passed to .'compile'() is actually a pmc, not a (native) string
22:13 moritz_ don't know if that makes a difference
22:14 szabgab so how do I turn the string into a pmc?
22:14 moritz_ $P0 = $S0
22:16 jnthn moritz_: I think it just gets strigified anyway.
22:16 jnthn But I think the problem is actually that compreg is returning a Null PMC
22:17 jnthn Which means the Perl 6 compiler ain't registered.
22:17 jnthn szabgab: Just to be sure, try a loadlib 'perl6.pbc'
22:17 jnthn Before calling compreg
22:17 jnthn And see what happens.
22:20 szabgab hmm, does not seem to like it
22:21 Limbic_Region joined #perl6
22:21 jnthn szabgab: The loadlib?
22:22 cspencer i've just moved the PIR version of chr into the setting but didn't see a version of ord - has that been removed from the spec or just not implemented?
22:22 szabgab it does not complain but after I added loadlib  the  $interpreter->find_global would return undef
22:22 dalek rakudo: 4da394c | (Moritz Lenz)++ |  (2 files):
22:22 dalek rakudo: implement and test Match.caps (captures in match order)
22:22 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/4​da394c29088033ee0bf3b794fd4a397cd51ffab
22:22 dalek rakudo: 1c263b0 | (Moritz Lenz)++ | src/setting/Match.pm:
22:22 dalek rakudo: implement Match.chunks
22:22 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/1​c263b0b320a2f89b559bf75c56bad1af14581e8
22:22 moritz_ cspencer: src/builtins/any-str.pir
22:22 moritz_ 955:.sub 'ord' :method :multi(_)
22:24 jnthn szabgab: My suspiciion is that Rakudo is - in some way - not being loaded properly.
22:24 jnthn Have you tried just straight in PIR a simple file like
22:25 jnthn .sub 'test'
22:25 jnthn loadlib 'perl6.pbc'
22:25 jnthn $P0 = compreg 'Perl6'
22:25 jnthn $P1 = $P0.'compile'('say 42')
22:25 jnthn $P1()
22:25 jnthn .end
22:26 jnthn szabgab: Ohh! Sorry again.
22:26 jnthn .sub 'test'
22:26 jnthn load_bytecode 'perl6.pbc'
22:26 jnthn $P0 = compreg 'Perl6'
22:26 jnthn $P1 = $P0.'compile'('say 42')
22:26 jnthn $P1()
22:26 jnthn .end
22:27 jnthn OK, load_bytecode, not loadlib...
22:27 jnthn just tested that here though
22:27 jnthn And above that I just pasted works here for me.
22:28 szabgab jnthn+++++++++++++
22:28 szabgab workz here too!
22:29 szabgab pastebin?
22:29 moritz_ @karma jnthn+++++++++++
22:29 lambdabot jnthn+++++++++++ has a karma of 1
22:29 moritz_ szabgab: see /topic
22:30 pasteling "szabgab" at 192.117.127.193 pasted "perl invokation" (9 lines, 290B) at http://sial.org/pbot/35652
22:31 cspencer moritz: thanks, i was looking in the wrong place :)
22:31 szabgab so that's what I have now, how can I now pass call a sub in perl6 and pass parameters to it?
22:32 szabgab and get the results back?
22:32 jnthn A sub that you haven't yet compiled?
22:33 jnthn If not, first compile it, as you've already seen how to do.
22:33 jnthn Then
22:33 szabgab let's start with a builtin
22:33 jnthn Ah, OK.
22:34 jnthn .sub 'test'
22:34 jnthn load_bytecode 'perl6.pbc'
22:34 jnthn $P0 = get_hll_global 'prompt'
22:34 jnthn $S0 = $P0('Enter your name: ')
22:34 jnthn print "Got back "
22:34 szabgab BTW basically this means we can start writing plugins for padre in Perl 6
22:34 jnthn say $S0
22:34 jnthn .end
22:34 jnthn (prompt is a Perl 6 built-in)
22:35 jnthn Suppose you want to call something in a namespce, like Foo::Bar::Baz
22:35 jnthn You'd do
22:36 jnthn $P0 = get_hll_global ['Foo';'Bar'], 'Baz'
22:36 szabgab are print and say in PIR ?
22:37 szabgab oh and I want to .return() the value(s)
22:37 moritz_ rakudo: my $x = 5; Q:PIR { $P0 = get_hll_global '$x'␤ say $P0 };
22:38 p6eval rakudo 1c263b: OUTPUT«Null PMC in say␤current instr.: '_block14' pc 74 (EVAL_16:44)␤»
22:38 moritz_ rakudo: my $x = 5; Q:PIR { $P0 = find_lex '$x'␤ say $P0 };
22:38 p6eval rakudo 1c263b: OUTPUT«5␤»
22:38 moritz_ rakudo: my $x = 5; say Q:PIR { $P0 = find_lex '$x'␤ upcase $P0␤ %r = $P0 };
22:38 p6eval rakudo 1c263b: OUTPUT«The opcode 'upcase_p' (upcase<1>) was not found. Check the type and number of the arguments␤current instr.: 'parrot;PCT;HLLCompiler;evalpmc' pc 888 (src/PCT/HLLCompiler.pir:494)␤»
22:39 jnthn Rather than $S0 = $P0('Enter your name: ') do .tailcall $P0('Enter your name: ')
22:39 moritz_ rakudo: my $x = 5; say Q:PIR { $P0 = find_lex '$x'␤ $S0 = $P0 ␤  upcase $S0␤ %r = box $S0 };
22:39 p6eval rakudo 1c263b: OUTPUT«5␤»
22:39 szabgab I get back Parrot::PMC=SCALAR(0x86fe4a0)
22:40 jnthn Right.
22:40 jnthn So I guess you can stringify it afterwards?
22:40 cspencer hmmm....when i do a "make spectest" i'm getting a lot of "Unknown introspection value 'symbols'" - is that something i've done to break my local tree?
22:41 jnthn cspencer: That or excessively old Parrot.
22:41 moritz_ cspencer: it's nothing I get here
22:41 jnthn symbols is for lexpad introspection
22:41 cspencer hmmmm
22:41 jnthn er, lexinfo
22:41 jnthn And was added not that long ago.
22:42 cspencer should that happen with the --get-parrot option to configure or should i pull the latest and greatest parrot version?
22:42 cspencer s/get-parrot/gen-parrot/
22:43 jnthn For anyone interested I've uploaded my slides now from Belgian and Ukrainian workshops. http://www.jnthn.net/articles.shtml
22:43 cspencer ah ok, i was way out of date
22:43 jnthn --gen-parrot should do it...
22:43 cspencer i'm working on a different machine than i'm normally on and had forgot to use --gen-parrot that recently
22:46 szabgab jnthn, that was my typo, now fixed it and Iget :
22:46 szabgab Enter your name: Segmentation fault
22:46 szabgab much beter :-)
22:46 szabgab better
22:47 jnthn ...wow.
22:47 jnthn I'm going to struggle to help you much with that one, I fear...
22:47 szabgab don't worry
22:48 jnthn (Since it's hard to debug those without local reproduction...)
22:48 szabgab I am ok with what I have now as the perl5 code does not support parameter passing anyway
22:48 szabgab I'll submit a bug report later with the code example
22:49 jnthn OK, great.
22:50 szabgab for now I might need some data stringification that works both in perl5 and perl 6
22:50 szabgab is there something already ?
22:51 jnthn Not quite sure I understand what you're looking for?
22:53 szabgab yaml, json or storable in perl 6
22:53 szabgab I think
22:53 moritz_ CSV ;-)
22:53 szabgab LSD
22:54 moritz_ szabgab: ok, you finally convinced me that we need a YAML or JSON parser in Perl 6 ;-)
22:54 jnthn .perl may help
22:54 jnthn It's like data-dumper.
22:54 moritz_ but it's not cross perl5/6
22:55 szabgab I'll start with something simple for now (such as passing a single string :-)
22:55 araujo joined #perl6
22:57 moritz_ rakudo: say 'aba' ~~ /a ** b/;
22:57 p6eval rakudo 1c263b: OUTPUT«perl6regex parse error: Error in closure quantifier at offset 19, found 'b'␤current instr.: 'parrot;PGE;Perl6Regex;parse_error' pc 10167 (compilers/pge/PGE/Perl6Regex.pir:1219)␤»
22:57 ZuLuuuuuu left #perl6
22:57 moritz_ what a pity
22:58 szabgab wow its 1 am again
22:58 moritz_ just 0am here ;-)
22:59 Limbic_Region szabgab - it really isn't much to marvel at - I mean, it happens every day you know
22:59 Limbic_Region :P
22:59 szabgab and I see it happening every day :-(
23:00 szabgab so good night &
23:00 Limbic_Region well - when you do sleep, I hope you rest well
23:00 moritz_ good night
23:00 * Limbic_Region &
23:09 skids What happens when you feed from an iterator?
23:09 skids my $it <== @a; my $it2 <== $it; my $it3 <== $it; =$it2; =$it3;
23:11 skids Conjecture: dwimmery here would be dangerous.
23:11 diakopter danger is dwim's pseudonym
23:12 skids :-) unless someone can come up with an earth shaking stroke of genius.
23:13 moritz_ rakudo: say "gf" ~~ m/<xdigit>/;
23:13 p6eval rakudo 1c263b: OUTPUT«f␤»
23:19 skids @@it <== (1,mysub(),2;1,2,3); @it[0]; #has mysub() been called yet, or only when @@it[0][1];
23:19 FurnaceBoy joined #perl6
23:20 hercynium joined #perl6
23:24 skids basically, is @@a[N] still a capture, both in the generic case of a normal array assigned captures, and the special generic slice iterator construct.
23:25 moritz_ szabgab: I can't answer your question, but istr that TimToady agreed to removing the alias between @it and @@it, so these are two totally different variables now... I just fear this hasn't been updated in the specs yet
23:26 skids Useful to know, thanks.
23:26 moritz_ erm, sorry szabgab for accidentially hilighting ;-)
23:28 kate21de joined #perl6
23:28 skids The answer to both would probably have to be the same if @@it truly were to collapse to a normal slice array when the feed source exhausted.
23:31 skids hrm... how to do something like @a.push(<== 1..1000);
23:32 moritz_ I don't think that's valid syntax ;-)
23:32 skids @a[*..Inf] <== 1..1000?
23:32 lambdabot Unknown command, try @list
23:33 moritz_ did you mean @a <<== 1..1000?
23:35 skids You are very clever :-)  but that doesn't cover feeding to the end of @@a
23:35 moritz_ why not?
23:36 moritz_ <<== does the same as lazy push
23:36 skids Oh wait, you are right.
23:36 skids For some reason I thought <<== had something to do with @@.
23:36 moritz_ anyway, it's a long time since I read about feeds, so MMMV
23:38 skids No you're dead on.  Good.  One less open issue.
23:40 skids Though the spec does stop short of actually saying a normal @a can be on the pointy end of that, and thus get promoted.
23:41 moritz_ well, the spec was written when @ and @@a were really the same variable
23:41 moritz_ (or the other way round ;-)
23:42 skids I think <<== and slices are ortho ... I can;t find where I might have got that idea from.
23:43 * moritz_ is too long in the business to believe in orthogonality ;-/
23:44 skids You mean there's a reason why 2 ** 0.5 is irrational?!?
23:44 diakopter moritz_: too long on any axis and you can't see the origin :P
23:44 skids :-)
23:45 moritz_ ;-)
23:52 jferrero joined #perl6

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

Perl 6 | Reference Documentation | Rakudo