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