»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend! Set by sorear on 4 February 2011. |
|||
Radvendii | no. i'll look it up | 00:00 | |
benabik | perlgeek.de/blog-en/perl-6/dissecti....writeback | ||
Radvendii | HAHAHA | ||
win | |||
dalek | ecza: 3e212e9 | sorear++ | lib/C (2 files): Implement a crude approximation of immutable objects, use it in does |
||
shinobicl___ | perl6: class C { has Int $.v = 0; submethod BUILD() {say "Constructing with " ~ $.v}; }; my C $A=C.new(); | 00:01 | |
p6eval | rakudo 2b5363: OUTPUT«use of uninitialized value of type Int in string contextConstructing with » | ||
..niecza v13-327-g5a9c36f: OUTPUT«===SORRY!===Virtual call $.v may not be used on partially constructed object at /tmp/F4LJYPYujB line 1:------> hod BUILD() {say "Constructing with " ~ ⏏$.v}; }; my C $A=C.new();Potential difficulties: $A is decl… | |||
..pugs b927740: OUTPUT«Constructing with 0» | |||
00:26
Radvendii left
00:36
Chillance left
00:38
replore joined
|
|||
[Coke] | sorear: if we took rakudo's temporal.pm files, how would you want to include them into niecza? doesn't look like we have any non-CORE perl6 files. (but we do have some non-CORE .cs files) | 00:50 | |
00:58
LlamaRider joined
00:59
molaf_ joined
|
|||
sorear | [Coke]: are they import modules or part of the setting? | 00:59 | |
[Coke] | it looks like they are separate files that are included into the setting. | ||
sorear | then they'd have to be incorporated into CORE.setting | 01:00 | |
[Coke] | inline, or is there a way to just refer to the external files? | 01:01 | |
sorear | inline | ||
[Coke] | OK. | ||
01:02
molaf left
01:03
cognominal_ joined
01:06
cognominal left
01:16
shinobicl___ left
01:19
Radvendii joined
|
|||
Radvendii | is there a shorthand for "@a[@b[0]][@b[1]]"? | 01:20 | |
benabik | nom: my @b = 7,8,9; say @b[0,1] | 01:21 | |
p6eval | nom 2b5363: OUTPUT«7 8» | ||
Radvendii | A.K.A using vectors | ||
benabik: I'm talking about a multidimensional array | |||
benabik | Radvendii: Yeah, I realized I didn't know how to split that to use in a multi-dim... | 01:22 | |
Radvendii | oh | ||
okay | |||
dalek | ecza: 0da7a8d | sorear++ | / (6 files): Allow "constant" declarations to be folded as constants |
01:23 | |
sorear | Radvendii: what is @b? | 01:24 | |
Radvendii | nom: my @a=[0,1],[2,3]; my @b=0,1; say @a[@b[0]][@b[1]] | ||
p6eval | nom 2b5363: OUTPUT«1» | ||
Radvendii | something like that | ||
except that i'm doing it over and over again | |||
so it would be more useful to be able to say "say @a[[@b]]" or something... | 01:25 | ||
sorear | You haven't explained what @b is | ||
Radvendii | what do you mean... it's an array holding the location of the information in @a | 01:26 | |
01:26
swarley joined
|
|||
sorear | can you guarantee that @b will always have exactly as many elements as dimensions in @a? | 01:26 | |
the code you presented earlier doesn't seem to require that | 01:27 | ||
[Coke] | nieczaa: my int $a = 32; | ||
Radvendii | you can assume that if that makes the solution simpler | ||
sorear | generally, if you want help with a problem, you should present it in English | ||
it's a LOT easier that way | 01:28 | ||
[Coke] | niecza: my int $a = 32; | ||
p6eval | niecza v13-329-g3e212e9: OUTPUT«===SORRY!===Malformed my at /tmp/gqHrzQ1HFT line 1:------> my ⏏int $a = 32;Parse failed» | ||
Radvendii | sorry, i was trying, but i didn't know how to render it exactly. | ||
sorear | anyways, if @a was a real multidimensional array (NYI), you could use @a[||@b] | ||
LlamaRider | S09 says something about || | ||
aaaaaand I'm late :D | |||
Radvendii | what do you mean "real"? | ||
sorear | my @a[3;4] | 01:29 | |
LlamaRider | sorear: rakudo doesn't seem to support || at the moment though | ||
sorear | LlamaRider: that's what NYI means, yes | 01:30 | |
[Coke] | nothing supports multidim arrays atm. | ||
NYI == not yet implemented. | |||
LlamaRider | ah, those acronyms... sorry | ||
[Coke] | sorear, you can't say "use english" and then not define terms. ;) | ||
Radvendii | oh! we can do @a=(0,1),(2,3) now? | ||
[Coke] | niecza: say sprintf "%20d", 30.2 | 01:31 | |
p6eval | niecza v13-329-g3e212e9: OUTPUT« 30» | ||
Radvendii | without using references? | ||
and by "now" i mean when they implement it? | |||
[Coke] | sorear: copying Temporal into the setting, this sub dies at the !! 'Z'; - | ||
gist.github.com/1659855 | |||
sorear | No, you can't use that syntax to initialize multi-dim arrays | 01:32 | |
sorear seems to be in a bad mood now, sorry | |||
Radvendii | alright, i'll look it up when they actually implement it... | ||
sorear | that is some strange code formatting, [Coke] | 01:33 | |
[Coke] | # 01/22/2012 - niecza at 99.72% | ||
(we're slipping). | |||
sorear | I wonder if putting parens arround the sprintf args would help it parse? | ||
[Coke] | also, we have more failures than yesterday. | ||
sorear | [Coke]: why? | ||
Radvendii | are we going to be able to make our own sigils at some point? (for important enough classes) | 01:34 | |
[Coke] | feather.perl6.nl/~coke/niecza_summary.out | ||
sorear | the answer to all questions like that is "yes" | ||
[Coke] | failures are at the bottom; and that's missing the last commit or 2. | 01:35 | |
Radvendii | cool. :P no rush, and i really do appreciate all the effort you guys are putting into this language. | ||
[Coke] | what is ObjAt? (found in nom source) | 01:37 | |
ah, perlcabal.org/syn/S02.html#The_ObjAt_Type | 01:38 | ||
sorear | ahahaha I know why env.t passes for me and fails for you | ||
[Coke] | sorear: can't use rakudo's Temporal.pm without ObjAt. | ||
sorear: yeeeees? | |||
01:38
Radvendii left
|
|||
LlamaRider | Radvendii: a (perverted?) way of getting what you want right now would be: | 01:38 | |
rakudo: my @a=[0,1],[2,3]; my @b=0,1; my @c = @a; @c = @c[$_][] for @b; say @c; | |||
p6eval | rakudo 2b5363: OUTPUT«1» | ||
sorear | [Coke]: you have TERMCAP set in your environment | 01:39 | |
[Coke] | Aye. | ||
sorear | env.t relies on .perl/eval to move data | ||
niecza's Str.perl doesn't escape all the funny characters in your $TERMCAP properly | |||
and the eval dies | |||
LlamaRider | he quit just as I wrote oO unlucky | 01:40 | |
sorear | "I only have reasonable characters in my %ENV" | ||
[Coke] | sorear: ()'s helped with the !! ?? parsing. | 01:41 | |
01:41
Radvendii joined
|
|||
Radvendii | hey, "method BUILD" is used to initialize variables right? | 01:42 | |
sorear | no | ||
first, it has to be _sub_method BUILD | |||
second, BUILD is used *only* for classes and instance setup | 01:43 | ||
Radvendii | but this is for a class... what else would one think to use it for? | 01:44 | |
sorear | anything else you want to do at construct time | ||
dalek | ast: e6549e8 | sorear++ | S14-roles/basic.t: [S14-roles/basic] Do not try to mutate 3 |
||
sorear | [Coke]: this gets us 35 tests back, ~0.18% | 01:45 | |
Radvendii | i dont understand... so i would or wouldnt use it to initialize an instance variable? | ||
sorear | you should ideally use initializers to initialize instance variables | ||
01:46
LlamaRider left
|
|||
Radvendii | is that like saying "has $a=5"? | 01:47 | |
sorear | yes | ||
Radvendii | ah | 01:48 | |
okay | |||
01:51
Trashlord left
01:52
Radvendii left,
Trashlord joined
01:54
shinobicl___ joined
01:59
whiteknight left
02:03
thou joined
|
|||
shinobicl___ | rakudo: class C { has $!val; method new(Int $x){ say $x } }; my $var = C.new(100); | 02:11 | |
p6eval | rakudo 2b5363: OUTPUT«100» | ||
shinobicl___ | rakudo: class C { has $!val; method new(Int $x){ say $x } }; my C $var = C.new(100); | ||
p6eval | rakudo 2b5363: OUTPUT«100Type check failed in assignment to '$var'; expected 'C' but got 'Bool' in block <anon> at /tmp/KGDJ1lBWbJ:1 in <anon> at /tmp/KGDJ1lBWbJ:1» | ||
shinobicl___ | is that a bug? | 02:12 | |
02:21
shinobicl___ left
02:33
swarley left
02:55
drbean left
02:56
drbean joined
03:12
drbean left
03:13
drbean joined
03:26
orafu left
03:27
orafu joined
03:42
Patterner left
03:44
Psyche^ joined,
Psyche^ is now known as Patterner
03:55
drbean left
03:56
drbean joined
04:35
thou left
04:48
birdwindupbird joined
04:50
araujo left
05:04
jjore joined
05:10
Trashlord left
05:12
xinming left
05:31
thou joined
|
|||
moritz | good morning | 05:33 | |
06:07
araujo joined,
araujo left,
araujo joined
06:21
koban joined,
koban left
|
|||
moritz | rakudo release uploaded and tagged | 06:38 | |
masak | morning, #perl6 | 06:39 | |
moritz++ | |||
shinobicl___: no, it's not a bug. 'say $x' returns a Bool, which you then try to assign to $var typed as C. boom. | 06:40 | ||
masak --> $dayjob | |||
06:41
sftp_ left
06:51
wtw_ joined
06:58
sftp_ joined
07:15
overrosy left
07:22
overrosy joined
08:01
replore left
08:02
kaleem joined
08:13
GlitchMr joined
|
|||
sorear | o/ GlitchMr | 08:13 | |
moritz++ | |||
dalek | kudo/nom: 63663bd | moritz++ | docs/release_guide.pod: correct release date and copyright in release_guide.pod |
08:30 | |
08:35
drbean left
|
|||
tadzik | 'morning | 08:36 | |
GlitchMr | Hi (late) | 08:37 | |
moritz | \o tadzik | ||
08:37
drbean joined
|
|||
moritz just noticed that he did something stupid | 08:37 | ||
the released rakudo wants parrot 3.11 | |||
since the PARROT_REVISION in nqp had a full release number in it, I thought it had already been bumped | 08:38 | ||
and I didn't notice that the newest parrot is 4.0, not 3.11 | |||
08:41
mj41 joined
|
|||
dalek | ar: cc390ba | moritz++ | skel/docs/announce/2012.01: small fixes to the release annoucement turns out we accidentally ship parrot 3.11, not 4.0, unless somebody fixes it |
08:45 | |
ecza: 155a5c1 | sorear++ | / (5 files): Avoid excess subcalls when a default or type constraint (sometimes) is a compile-time constant |
08:49 | ||
sorear | (yes, I know Rakudo got to that optimization first) | 08:50 | |
moritz | you started later :-) | ||
moritz had a weird idea the other day... | 08:55 | ||
somebody could write a script that searches for tests that are todo'ed or skip'ped for both rakudo and niecza | |||
and compile a list of them | |||
because they are much more likely to be dubious than the average test | |||
then we could review those tests more efficiently | |||
sorear | I recommend basing it off test_summary, and finding 'matching tests' by file/index pairs in the TAP | 08:56 | |
nom: sub foo($) { }; say &foo.signature.params.[0].name | 08:57 | ||
p6eval | nom 2b5363: OUTPUT«» | ||
sorear | nom: sub foo($) { }; say &foo.signature.params.[0].name.WHAT | ||
p6eval | nom 2b5363: OUTPUT«Str()» | ||
sorear | nom: sub foo($) { }; say &foo.signature.params.[0].name.perl | ||
p6eval | nom 2b5363: OUTPUT«""» | ||
sorear | nom: sub foo($bar) { }; say &foo.signature.params.[0].name.perl | ||
p6eval | nom 2b5363: OUTPUT«"\$bar"» | ||
dalek | ecza: 677cf15 | sorear++ | src/ (2 files): mergeback |
||
sorear | tomorrow's agenda: major additions to Sub introspection API. Time permitting, also add MAIN | 09:03 | |
(also, first day of spring classes) | |||
sorear -> sleep | |||
jnthn | o/ folks | 09:16 | |
jnthn got grabbed the moment he walked through the door at $dayjob today :) | |||
moritz: (3.11) main worry is that we may miss cygwin build fixes put in to Parrot | 09:17 | ||
moritz | jnthn: oh. Should I make a 2012.01.1 point release that depends on 4.0? | 09:18 | |
jnthn | moritz: Maybe hold on a bit and see if not_gerd appears and ask. | 09:22 | |
Or maybe somebody on #parrot knows if they got cygwin fixes. | |||
moritz | jnthn: just read the logs, the commits went in after the release | 09:27 | |
jnthn | moritz: After 4.0? | 09:28 | |
moritz | jnthn: yes | ||
jnthn | OK | ||
moritz: I just looked over the commits between 3.11 and 4.0. Nothing jumped out at me as making it worth re-cutting the release. | 09:32 | ||
09:32
thou left
09:56
dakkar joined
10:12
domidumont left
10:13
domidumont joined
10:29
daxim joined
10:36
fhelmberger left,
fhelmberger joined
|
|||
moritz | jnthn: at some point I'd like to discuss with you how to discuss typed exceptions from the MOP | 10:43 | |
s:2nd/discuss/throw/ | |||
10:48
dbr joined
|
|||
moritz | hm, maybe $*W.throw simply works? | 10:49 | |
10:54
lutok left
|
|||
jnthn | moritz: Can't really rely on a $*W being available. | 10:58 | |
moritz: What if somebody is using the MOP at runtime, etc. | |||
moritz | jnthn: right. Urks. | 10:59 | |
hm | 11:00 | ||
jnthn | Well, it'll need a circularity saw somewhere, because we're defining the MOP that says how the Exception classes work. :) | ||
moritz | so we need something that at compile time uses $*W, and at run time searches the caller's lexpad, and if both fails, dies the old way without typed exceptions | 11:01 | |
does that sound about right? | |||
jnthn | It gets "worse" in so far as we probably need to throw typed exceptions from ops in some cases too. | ||
moritz | you mean C-level ops? | 11:02 | |
jnthn | Yeah...I think some of those throw. | ||
Or think about | |||
nom: class A { has $.a }; A.a | |||
moritz | indeed that's worse, but thankfully those aren't covered in my grant :-) | ||
p6eval | nom 63663b: OUTPUT«Cannot look up attributes in a type object in method a at src/gen/CORE.setting:1384 in block <anon> at /tmp/0yJ3JndYqf:1 in <anon> at /tmp/0yJ3JndYqf:1» | ||
jnthn | moritz: That may be, but I'd rather think up a mechanism that'll let us get those at some point too :) | 11:03 | |
moritz | jnthn: sure, if it turns out that we can cover both with the same approach | ||
jnthn | moritz: Lemme think it over some. | ||
moritz | jnthn: ok, no hurry. Still plenty of LHFs in the actions and maybe setting | 11:04 | |
nom: class A { $^x } | 11:11 | ||
p6eval | nom 63663b: ( no output ) | ||
jnthn | Hm. :) | 11:12 | |
moritz | nom: do { $^x } | ||
p6eval | nom 63663b: OUTPUT«===SORRY!===Cannot use placeholder parameters in this kind of block at line 1, near ""» | ||
moritz | I guess the first one should die with the same error, no? | ||
jnthn | I guess | ||
Though | |||
nom: role R { say $^x }; 'lol' but R[42] | |||
p6eval | nom 63663b: OUTPUT«None of the parametric role variants for 'R' matched the arguments supplied.No applicable candidates found to dispatch to for '_block1400'. Available candidates are::(Mu ) in specialize at src/gen/Metamodel.pm:1810 in specialize at src/gen/Metamodel.pm:1480 i… | ||
jnthn | could argue that one should be allowed ;) | 11:13 | |
Looks like package_def just doesn't go looking at if any placeholder signature was set on the block, though. | |||
Should be an easy fix. | |||
moritz tries to fix it | 11:14 | ||
looks easy indeed | 11:15 | ||
11:26
Exodist left
11:31
Exodist joined
11:58
Woodi left,
Woodi joined
11:59
Vlavv` left
12:00
Vlavv` joined
|
|||
moritz | niecza: class A { $^x } | 12:02 | |
p6eval | niecza v13-332-g677cf15: OUTPUT«===SORRY!===Placeholder variable $^x may not be used here because the surrounding package block takes no signature at /tmp/LwCSTfwG4B line 1:------> class A { ⏏$^x }Unhandled exception: Check failed at /home/p6… | ||
dalek | kudo/nom: 3ddd2fb | moritz++ | src/ (2 files): throw typed exception on illegal use of placeholder parameters also catches class A { $^x }, which used to live errornously |
||
moritz | niecza: do { $^x } | ||
p6eval | niecza v13-332-g677cf15: OUTPUT«===SORRY!===Placeholder variable $^x may not be used here because the surrounding block takes no signature at /tmp/EcwqtNwCuw line 1:------> do { ⏏$^x }Unhandled exception: Check failed at /home/p6eval/niecza/b… | ||
moritz | niecza++ | 12:03 | |
dalek | ast: fbb78ed | moritz++ | S32-exceptions/misc.t: test for X::Placeholder::Block |
12:04 | |
moritz | niecza: role a { $^x } | ||
p6eval | niecza v13-332-g677cf15: OUTPUT«===SORRY!===Placeholder variable $^x may not be used here because the surrounding package block takes no signature at /tmp/Z5NeXH4TUF line 1:------> role a { ⏏$^x }Unhandled exception: Check failed at /home/p6e… | 12:05 | |
jnthn | moritz: Did you allow it for roles? | 12:06 | |
moritz | jnthn: yes | ||
jnthn | hehe :) | 12:07 | |
moritz | $*PKGDECL ne 'role' && ... | ||
jnthn | *nod* | ||
lumi___ | nom: class A is Hash { }; my $x = A.new; say $x.WHAT; | ||
p6eval | nom 63663b: OUTPUT«Hash()» | ||
lumi___ | That's not right, is it? | ||
moritz | it's not | 12:08 | |
method new(*args) { @args.hash } | |||
jnthn wonders how on earth Hash's .new method has been written... | |||
...ouch. | 12:09 | ||
moritz | perl6: class A { method x { $^x } } | 12:10 | |
p6eval | rakudo 63663b: OUTPUT«===SORRY!===Placeholder variables cannot be used in a method at line 1, near "}"» | ||
..pugs b927740, niecza v13-332-g677cf15: ( no output ) | |||
jnthn | std: class A { method x { $^x } } | 12:11 | |
p6eval | std 40d10f7: OUTPUT«ok 00:01 108m» | ||
jnthn | Hm. | 12:12 | |
moritz | rakudo now takes about a quarter of an hour to compile the setting | 12:37 | |
which significantly slows down my development cycle | |||
to be more precise, 17 minutes alone for the .pm -> .pir step | 12:38 | ||
jnthn | moritz: Is that a sudden jump? | ||
moritz | jnthn: dunno, it felt slow for some time, and now it feels really, really slow | 12:39 | |
jnthn | moritz: OK. Will profile, but I strongly suspect the serialization work is going to be what we really need. | 12:41 | |
That's how it looked last time I did so. | |||
Once we get a Star release out, I'll be happy to dig back into these big picture things. | |||
moritz | ok | 12:42 | |
... plus another 4.5 minutes for .pir -> .pbc | |||
jnthn | Virtually all of which is spent in register allocation. | 12:44 | |
I should be able to make a start on the serialization stuff within the next week. | 12:47 | ||
I've got a bunch of the design work for it already sketched out in my notebook. | |||
jnthn still wonders how on earth it takes so long and thinks something is scaling non-linearly. | 12:48 | ||
12:50
fsergot left
|
|||
flussence | o/ | 12:51 | |
jnthn, seen this? doc.rust-lang.org/doc/tutorial.html...reign-code | |||
the blockish syntax seems like a good idea, I'm wondering if there's an easy way to do something similar in perl6 code | 12:53 | ||
13:02
kaleem left,
kaleem joined
13:07
kaleem left
|
|||
moritz | wow, just found glx.sourceforge.net/index.html | 13:08 | |
13:12
avar left,
literal left,
groky left
|
|||
jnthn | flussence: Which "blockish syntax" are you refering do? | 13:12 | |
fn SHA1(src: *u8, sz: uint, out: *u8) -> *u8; | |||
Would be something like | |||
hmm, I dunno that languages syntax well enough to know what *8 is | 13:13 | ||
moritz | *u8 is just char* | ||
jnthn | Ah | ||
moritz | (in first approximation) | 13:14 | |
flussence | no, I mean the "native mod crypto { ... }" | ||
jnthn | sub SHA1(Str, Int) returns Str is native('crypto') { } # or some such | ||
flussence | (as opposed to "is native()" on every sub | ||
) | |||
jnthn | Aha | ||
13:15
avar joined,
avar left,
avar joined,
literal joined,
groky joined
|
|||
jnthn | Interesting idea. | 13:15 | |
moritz | nom: { $^a; $^a } | 13:17 | |
p6eval | nom 3ddd2f: OUTPUT«Not enough positional parameters passed; got 0 but expected 1 in block <anon> at /tmp/bTWJkorzpl:1 in block <anon> at /tmp/bTWJkorzpl:1 in <anon> at /tmp/bTWJkorzpl:1» | ||
moritz | nom: do { @_ } | ||
p6eval | nom 3ddd2f: OUTPUT«===SORRY!===Cannot use placeholder parameters in this kind of blockat /tmp/JoseEFE9NX:1» | ||
flussence | hm... I wonder if this could work | 13:20 | |
moritz | flussence: push it onto the growing stack of stuff that masak++'s macro work should accomplish :-) | 13:21 | |
13:22
xinming joined
|
|||
flussence | oh, why didn't I think of using that! :) | 13:22 | |
flussence was trying to figure out a way to mess with the Routine object in a lexical scope, which probably wouldn't DWIW anyway | 13:23 | ||
13:24
_twitch joined
|
|||
[Coke] | jnthn++ # starring | 13:28 | |
jnthn: do you anticipate any growls of "hey, I thought you said this was STABLE"? | |||
jnthn: s/another month/another release/ ? | 13:31 | ||
otherwise, all looks good to me! | |||
13:36
cognominal_ left
|
|||
[Coke] | sorear: any plans for the last week before the next release? | 13:38 | |
13:39
drbean left
13:47
cognominal joined
|
|||
dalek | ast: 6c236a2 | coke++ | S29-context/exit.t: niecza fudge |
13:57 | |
ecza: a8940ad | coke++ | t/spectest.data: Run (fudged) S29-context/exit.t |
13:58 | ||
kudo/nom: 2c3f642 | moritz++ | src/ (2 files): include parameter name in error message also more awesome error message stolen from STD and niecza |
13:59 | ||
ast: f52c2ed | moritz++ | S32-exceptions/misc.t: test presence of placeholder attribute of X::Placeholder::Block exceptions |
14:00 | ||
jnthn | [Coke]: People will always find something to growl about. :) I think if we'd done a Star distribution release on nom a month or two ago, there woulda been quite a few howls. Nowadays, I think much less so - the benefits of this release generally far outweigh the few regressions here or there. | 14:01 | |
[Coke]: Take MiniDBI. My changes were entirely to update it to use the latest NativeCall module and to fix places it did stuff that was no longer in compliance with current spec. No changes due to nom bugs. | 14:02 | ||
lumi___ | moritz: There's a typo in the message in your last commit: "may not be usere" | 14:06 | |
moritz | uhm, the whole sentence reads as if I had been drunk :/ | 14:08 | |
lumi___ | I stopped parsing there :P | ||
dalek | kudo/nom: bb2f072 | moritz++ | src/core/Exceptions.pm: fix error message, lumi++ |
14:09 | |
kudo/nom: 355430c | moritz++ | src/core/Exceptions.pm: another spelling fix, kboga++ moritz-- |
14:10 | ||
ast: 6b9e653 | coke++ | S12-methods/multi.t: fudge for niecza |
14:11 | ||
ecza: 9736793 | coke++ | t/spectest.data: run (fudged) S12-methods/multi.t |
|||
14:15
kaleem joined
|
|||
tadzik | I thought "usere" is the awesomeness in this message :) | 14:16 | |
usere as in sincere, or something :) | |||
14:17
Alias joined
|
|||
[Coke] checks for LowHangingFudge in Rakudo. | 14:20 | ||
moritz | [Coke]: autounfudge? | 14:21 | |
[Coke] | ugh. probably 100 more. | 14:22 | |
moritz: no, update_passing... | |||
moritz | ah | ||
[Coke] | one with 47 passing, another with 20, lots of little ones. | 14:23 | |
14:24
Exodist left
14:25
jjore left
14:26
Exodist joined
14:27
jjore joined
|
|||
jnthn wonders if S05-mass/rx.t wouldn't have a bunch more after the fixed backtracking into subrules | 14:28 | ||
moritz | jnthn: possible. I'll run autounfudge once my current build (on newest parrot) finishes | 14:29 | |
[Coke] | moritz: S24-testing/0-compile.t passes 100% as is. | ||
moritz | [Coke]: I've never enabled that because it contains only stuff we test elsewhere | 14:30 | |
[Coke] | and t/spec/S32-hash/kv.t is fudged, but not being run. | ||
moritz | [Coke]: and the whole S24-testing looks suspicious to me | ||
[Coke] | moritz: if the spec test is invalid, we should remove it. *shrug* | ||
moritz | it's not invalid. It just doesn't make much sense | 14:31 | |
[Coke] | ... if it doesn't make sense, why are we keeping in the repository and forcing people to think about it? | ||
invalid doesn't necessarily mean "not to spec." | 14:32 | ||
[Coke] now remembers why he doesn't do this for rakudo. ;) | |||
moritz | I've simply never mustered the energy to check S24-*/*.t more closely. If you want to remve it, go ahead | 14:33 | |
jnthn | [Coke]: ? | 14:36 | |
[Coke] | jnthn: ? ? | 14:38 | |
jnthn | [Coke]: Why you don't do what for Rakudo? | ||
[Coke] | identify more tests that can be run. | 14:39 | |
though it was a snarky comment, in that I don't actually remember this as a problem. | |||
14:39
PacoAir joined
|
|||
[Coke] | feather.perl6.nl/~coke/rakudo_update_passing.txt has a fresh run of update_passing_test_data.pl | 14:41 | |
moritz | [Coke]: thanks | 14:42 | |
14:42
Trashlord joined,
renormalist joined
|
|||
[Coke] | (S05-modifier was nontrivial to fudge) | 14:42 | |
er, feather.perl6.nl/~coke/rakudo_update_passing.txt | |||
er, t/spec/S05-modifier/counted.t ! | |||
jnthn looks confusedly at the output | 14:43 | ||
[ PA] ( 0/1 ) t/spec/S01-perl-5-integration/import.t | |||
[ A] = all passed | |||
...why does that get A? :) | |||
moritz | jnthn: maybe one was skipped (and thus passed) | 14:44 | |
jnthn | ah, ok | ||
moritz | jnthn: or maybe something else. The harness doesn't give us all the numbers that I want/need, so I calculate the rest; maybe some of them are a bit off | ||
[Coke] | i just use it as a guidline for unrun tests to look at, higher numbers generally being the first things to touch. | 14:45 | |
(though anything with SPA is usually an easy win.) | |||
moritz | [Coke]: that was my original intention when I wrote that script | 14:46 | |
so it works as designed, even if not always free of surprises :-) | 14:47 | ||
14:51
cognominal_ joined
14:54
cognominal left
14:56
renormalist left
15:08
fsergot joined
15:09
birdwindupbird left
15:11
pmurias joined
|
|||
pmurias | sorear: hi | 15:11 | |
sorear: i'm thinking about implementing use Foo:from<perl5> | |||
sorear: the hard parts seems to be that it happens at compile time but we also need to load stuff at runtime | 15:13 | ||
moritz | but not with 'use' | ||
pmurias | sorear: forget the last sentence ;) | 15:15 | |
sorear: the hard part is that use loads stuff into the lexical namespace at compile time, but we want to use the perl5 things at runtime | 15:16 | ||
sorear: and i'm not aware of a sane way to serialize code refs | |||
pmichaud | good morning, #perl6 | ||
moritz | \o/ pmichaud! | 15:17 | |
pmurias | pmichaud: good morning | ||
15:17
tokuhirom joined
|
|||
pmurias | sorear: and p5 modules don't have a clear runtime/compile time distinction so they may depend on it being in the same process | 15:17 | |
sorear: what seems to be the best solution seems load stuff into the lexical namespace as placeholders, that is &foo would know it's imported from Foo | 15:18 | ||
[Coke] | pmichaud: Good morning! | ||
pmurias | sorear: and then replace them at runtime | 15:19 | |
[Coke] | for a second, I thought moritz had mis-tabbed again. ;) | ||
tadzik | hello pmichaud | ||
moritz | colomon: as if I'd ever mis-tab :-) | 15:21 | |
pmichaud | [Coke]: yes, it's really me. | ||
moritz: :-P | |||
pmurias | moritz: re "not with use" ? | ||
jnthn | pmichaud!! \o/ | 15:22 | |
moritz | pmurias: "use" + p5 doesn't do any more runtime loading than "use" + p6 | ||
15:23
arlinius left
|
|||
jnthn | .oO( Just as predicted, pmichaud shows up within 48 hours of me fixing backtracking into subrules :P ) |
15:23 | |
moritz | pmurias: when precompiling a module that loads a p5 module, you'll not get around loading the p5 module twice | 15:24 | |
because use Foo:from<perl5>; BEGIN run_imported_sub(); should work | |||
jnthn: so what was the plan? let him fix all the list issues? :-) | |||
15:24
arlinius joined
|
|||
jnthn | moritz: I suspect that depends on the tuit supply. ;-) | 15:25 | |
pmichaud | jnthn: :-) | ||
my tuit supply should be pretty good. today is a little busy, but I should get some good hacking in this week | |||
moritz | \o/ | ||
jnthn | pmichaud: yay! | 15:26 | |
tadzik | wow, great! | ||
jnthn will have lots of availability this week too :) | |||
pmurias | moritz: the difference between "use"+p5 and "use"+p6 is that we can serialize the stuff from the p6 module much more easily (as we control the implementation) | 15:30 | |
re 'BEGIN run_imported_sub()' i could sacrifice that but even discovering what &import imports requires loading the p5 module | 15:32 | ||
15:33
_twitch left
|
|||
[Coke] | jnthn: ah, but now he can work on stuff that's actually hard. ;) | 15:37 | |
dalek | ast: 40f4b64 | moritz++ | S03-operators/range.t: rakudo unfudges for non-numeric ranges |
15:38 | |
15:38
Chillance joined
15:39
pmurias_ joined
|
|||
jnthn | [Coke]: :P | 15:40 | |
moritz | jnthn: the autounfudge run didn't find any newly passing regex tests, but that might be because the resource limit is a bit too tight | 15:41 | |
15:41
pmurias left
|
|||
moritz | jnthn: but it could also be that S05-mass/rx.t doesn't use backtracking over captures a lot, because it doesn't use many captures at all | 15:42 | |
jnthn | moritz: ah, k | 15:43 | |
15:44
thou joined
|
|||
moritz | perl6: say "\x5" | 15:44 | |
p6eval | pugs b927740, rakudo 355430, niecza v13-332-g677cf15: OUTPUT«» | ||
moritz | perl6: say "\x5c" | ||
p6eval | pugs b927740, rakudo 355430, niecza v13-332-g677cf15: OUTPUT«\» | ||
15:44
GlitchMr left
15:45
GlitchMr joined,
wtw_ left
15:47
GlitchMr left,
GlitchMr joined
15:48
jferrero left
|
|||
jnthn | decommute & | 15:49 | |
dalek | ast: e10ffa7 | moritz++ | S05-mass/rx.t: correct two tests |
15:50 | |
moritz | niecza might pass tests too | ||
nom: say 'a\\b' | |||
p6eval | nom 355430: OUTPUT«a\b» | ||
moritz | nom: say 'a\\b' ~~ /"a\\b"/ | ||
p6eval | nom 355430: OUTPUT«=> <a\b>» | ||
moritz | nom: say 'a\\b' ~~ /"a\b"/ | 15:51 | |
p6eval | nom 355430: OUTPUT«#<failed match>» | ||
15:56
not_gerd joined
|
|||
not_gerd | hello, #perl6 | 15:57 | |
moritz | \o not_gerd | 15:58 | |
not_gerd | [Amoritz: could you pull github.com/parrot/parrot/pull/704 into a new branch in the Parrot repo (NOT master)? | ||
(no one else around in #parrot...) | |||
16:00
zb left
|
|||
moritz | not_gerd: doing so now | 16:00 | |
16:01
nwc10 joined
|
|||
nwc10 | Yay, a pmichaud! | 16:01 | |
moritz | not_gerd: pushed to parrot/auto-sizes | 16:03 | |
not_gerd | moritz: thanks | ||
16:04
kaare_ joined
16:05
SHODAN left
16:06
SHODAN joined
|
|||
not_gerd | jnthn is the only one around with Win64 + MSVC, correct? | 16:07 | |
[Coke] | aye. I have win32 + msvc, but don't often build on it. | 16:09 | |
16:10
simcop2387 left,
simcop2387_ joined
16:11
simcop2387_ is now known as simcop2387
16:13
Trashlord left
|
|||
jnthn home | 16:24 | ||
not_gerd: Yes, I build very often on that. | |||
not_gerd: Does that fix the need to do --intval="long long" on Win64? | 16:25 | ||
not_gerd | jnthn: yes, among other things | 16:28 | |
jnthn | not_gerd: Excellent. | ||
not_gerd | still accepts standard-integer types only, though, as auto::format will fail if you do something like --intval=__int64 | 16:29 | |
[Coke] | pmichaud: mind if I ask what's on your TODO list this week? Any itches need scratching? | 16:31 | |
pmichaud | you mean perl6-wise? my todo list this week is to catch up and see where things stand and what needs doing | ||
lists sounds like the prime target (as well as the corresponding synopsis/grant) | 16:32 | ||
jnthn | pmichaud: Yes, lists decidedly need some love. | ||
pmichaud | I suspect jnthn++ would like me to double-check the regex engine stuff too :) | ||
jnthn | pmichaud: Please. ;) | 16:33 | |
16:34
kaleem left
|
|||
not_gerd | jnthn: if you have a minute, could you check that NQP's --gen-parrot=auto-sizes works out-of-the-box on Win64? | 16:37 | |
jnthn | not_gerd: Yes, I shall do that shortly. | ||
not_gerd | thanks | ||
16:37
nwc10 left
16:43
pmurias_ left
16:44
kmwallio joined
16:45
colomon joined
16:51
fsergot left
16:53
rindolf joined
16:55
alester joined
17:01
tokuhirom left
17:02
kmwallio left
17:07
jdv79_ is now known as jdv79
17:08
jdv79 left,
cognominal joined
17:09
MayDaniel joined
|
|||
jnthn | not_gerd: Fails :( | 17:10 | |
.\miniparrot.exe -Iruntime/parrot/include -o frontend/parrot2/prt0.pbc frontend/parrot2/prt0.pir | |||
PackFile_pack segment 'DIRECTORY' used size 2368 but reported 2664 | |||
17:11
cognominal_ left
|
|||
rindolf | Hi all. | 17:12 | |
not_gerd | jnthn: :( | 17:13 | |
17:14
fsergot joined
|
|||
not_gerd | first step: could you diff a config_lib.pir from a working and a non-working parrot? | 17:14 | |
if there's no difference, then I messed up when doing the unrelated cleanup... | 17:16 | ||
masak | evenin', #perl6 | 17:21 | |
jnthn | ohhai, masak | ||
moritz | \masak/ | ||
masak | \:D/ | ||
17:22
pmade joined
|
|||
jnthn | not_gerd: gist.github.com/1664386 | 17:29 | |
colomon | phenny: tell sorear in S14-roles/mixin.t, $x does R4b(3) test is failing. | 17:30 | |
phenny | colomon: I'll pass that on when sorear is around. | ||
not_gerd | jnthn: possible suspect is the change in opcodesize, but I'll probably need help from the parrot folks to debug that... | 17:33 | |
17:35
mj41 left
|
|||
not_gerd | jnthn: I think I know what's going on and can fix it on my own... | 17:36 | |
17:39
Trashlord joined
17:42
fsergot left
|
|||
not_gerd | jnthn: gist.github.com/1664459 _should_ do the trick... | 17:44 | |
17:47
Radvendii joined
|
|||
Radvendii | o/ | 17:47 | |
How do I run a map over key-value pairs? if i do @a.kv.map: {} It takes the keys and values as separate input. How do i make them get passed to .map at the same time | 17:49 | ||
jnthn | Radvendii: .pairs | ||
Radvendii: Or .kv and have your map block take two args | |||
Radvendii | jnthn: sweet. thanks | ||
TimToady | or map ->$k,$v {...} | ||
Radvendii | ooh. i didn't know you could do that | ||
cool | |||
TimToady | oh, jnthn++ said it 1st | ||
jnthn | ;) | 17:50 | |
Radvendii | thanks guys | ||
TimToady | ENOCOFFEEYET | ||
jnthn | not_gerd: Trying a build with that now | 17:53 | |
Radvendii | it keeps saying Can only use repr_get_attr_obj on a SixModelObject. this arises from initializing a hash instance variable from an array instance variable | ||
what am i doing wrong? | |||
jnthn | Radvendii: Hard to say without seeing your code | 17:54 | |
Radvendii | never mind | ||
fixed | |||
i forgot to comment out some code | |||
jnthn | not_gerd: Seems that helps :) | 17:55 | |
17:55
Trashlord left
|
|||
not_gerd | jnthn: great | 17:55 | |
now there's a question: why do we have separate configure options for intval and opcode if things break if we provide different values? | 17:56 | ||
17:57
kaleem joined
|
|||
jnthn | not_gerd: That's one you'll probably have to ask on #parrot ;) | 17:58 | |
moritz | hysterical raisins | 17:59 | |
somebody thought at some point it was necessary to be able to configure both, nobody ever tested it with diverging values, and thus it's broken | |||
that's how it always goes | |||
jnthn | OK, shopping, dinner, then I'll have some hacking tuits | 18:00 | |
bbl | |||
18:00
dakkar left
|
|||
sorear | good * #perl6 | 18:00 | |
phenny | sorear: 17:30Z <colomon> tell sorear in S14-roles/mixin.t, $x does R4b(3) test is failing. | ||
Radvendii | o/ jnthn | ||
18:00
Trashlord joined
|
|||
colomon | \o | 18:00 | |
sorear | [Coke]: The last big thing I want to squeeze in is MAIN | 18:01 | |
18:03
jaldhar left
|
|||
[Coke] | sorear: as a coding contest contestant, that'd be nice! | 18:06 | |
18:10
MayDaniel left
|
|||
Radvendii | is there an equivalent in perl6 to overloading perl5 STORE? | 18:10 | |
as in, a method that get's called when i do $a<key> = 5; as different from when i simply access $a<key> | 18:13 | ||
sorear | No, it doesn't work like that | ||
$a<key> = 5 calls the same method that $a<key> does | 18:14 | ||
$a<key> = 5 means $a.at-key('key') = 5 | |||
make sure at-key returns something that can be assigned to | |||
dalek | ast: 52e9965 | sorear++ | S14-roles/mixin.t: [S14-roles/mixin] Do not attempt to mutate Int objects here, either |
18:15 | |
Radvendii | so if i overload at-key (is that the same as at_key?) i can't know what is being assigned to it? | ||
tadzik | maybe the Proxy object is what you want | 18:16 | |
18:16
fsergot joined
|
|||
Radvendii | Proxy? | 18:16 | |
there seems to be a STORE_AT_POS method of Array | 18:18 | ||
tadzik | see perlcabal.org/syn/S06.html#Lvalue_subroutines | ||
pmichaud | STORE_AT_POS is typically used for creating new array elements | 18:21 | |
TimToady | o/ | 18:22 | |
sorear | Radvendii: I do not think you understand the core principle at work here | ||
pmichaud | TimToady: o/ | ||
Radvendii | probably not... | ||
sorear | Radvendii: '=' does not care what is on the left | ||
TimToady | (unless it's pseudoassignment) | 18:23 | |
18:23
flussence left
|
|||
sorear | Radvendii: every expression in Perl 6 can return a 'container', which is something that can be either read or written | 18:23 | |
18:23
flussence joined
|
|||
sorear | PMICHAUD! \o/ | 18:23 | |
18:24
_RobiX_ joined
|
|||
pmichaud | sorear: o/ | 18:25 | |
sorear | TimToady: didn't you just get rid of pseudoassignments? | 18:27 | |
TimToady | no, I just turned assigments into pseudoassignments | ||
[Coke] ponders doing another spectest run before pmichaud starts adding things. ;) | |||
18:27
_RobiX_ is now known as hello2u2
18:28
xinming left
|
|||
TimToady | the = is now parsed by the declarator, not by EXPR | 18:28 | |
(but only for declarators, of course--normal assignment is still, er, normal) | 18:29 | ||
18:31
spine joined
|
|||
sorear | [Coke]: I only fixed one test ... | 18:32 | |
18:33
pmade left
|
|||
PerlJam wonders if the "different things should look different" rule will ever kick in. | 18:33 | ||
TimToady | what would you suggest that will not provoke widespread disdain? :) | 18:34 | |
contextually, it's pretty easy to distinguish from normal assignment for a human, I think | 18:35 | ||
we could go all cobolly and say 'my $x INITIALIZED TO 42' :P | 18:37 | ||
jnthn | Radvendii: Were you not delegating to a hash/array that you "has"? If so, it returns a container - just be sure to mark your at_pos with "is rw", and either let the result be the last statement or use return-rw instead of return on it. | ||
std: sub infix:<INITIALIZED TO>($a, $b) { }; my $x INITIALIZED TO 42 | |||
p6eval | std 40d10f7: OUTPUT«Potential difficulties: $b is declared but not used at /tmp/esTkeEiMbH line 1:------> sub infix:<INITIALIZED TO>($a, ⏏$b) { }; my $x INITIALIZED TO 42 $a is declared but not used at /tmp/esTkeEiMbH line 1:------> sub infix:<INITIALIZED T… | ||
PerlJam | TimToady: I like nice, simple rules. Telling people that = is assignment *except* when it comes after a declarator isn't so simple. | ||
TimToady | but = has the advantage of being very easy to type too | 18:38 | |
jnthn | std: sub infix:<INITIALIZED TO>($, $) { }; my $x INITIALIZED TO 42 | ||
p6eval | std 40d10f7: OUTPUT«ok 00:01 116m» | ||
[Coke] | sorear: there's the 13 or so you fixed yesterday. I added a dozen or two. | ||
jnthn | heh :) | ||
TimToady | same reason C stole it from == | ||
18:40
rindolf left
|
|||
TimToady | PerlJam: human languages are most irregular at the point of greatest use, if you want to view this as an irregularity | 18:40 | |
flussence | .oO( we could steal "my $x default 42" from SQL, but that's not much better than COBOL... ) |
18:41 | |
PerlJam | flussence: *way* too much typing | ||
flussence | agreed :) | ||
TimToady | .oO(use COBOL :lc;) |
||
PerlJam | my $x is (42); # crazy? | 18:42 | |
maybe never mind the parens, I'm not sure where I was going with them. | |||
TimToady | hard to get a list into it like my @a = 1,2,3 | 18:43 | |
at least in sigs, 'is' is tighter than comma | |||
with pseudoassignment we can at least preserve the $ vs @ distinction on precedence of = | 18:44 | ||
18:44
hello2u2 left
|
|||
moritz | as a user, I like the pseudoassignment initialization | 18:44 | |
TimToady | it's kind of a useful confusion :) | ||
moritz | as a compiler writer, I like it as long as somebody else is responsible for it :-) | ||
flussence | .oO( let's get rid of `has` entirely and give classes signatures like subs! :) |
18:45 | |
PerlJam | maybe pseudoassignment bothers me so much because I foresee another FAQ entry ... but maybe some FAQs are just a necessary evil | ||
dalek | kudo/nom: d469892 | moritz++ | t/spectest.data: enable kv.t, [Coke]++ |
||
18:46
hello2u2 joined,
hello2u2 left,
rindolf joined
|
|||
moritz | PerlJam: at least we now know where to put them. faq.perl6.org :-9 | 18:46 | |
sorear | o/ rindolf | ||
rindolf | sorear: hi. | 18:47 | |
sorear: I got disconnected. | |||
TimToady | if we wanted a bit more regularity, we could actually take back the precedence-dropping of pseudoassignments into normal assignments, so all list assignments parse like listops | ||
PerlJam | "How do I overload assignment and pseudoassignment?" or perhaps "I've implemented my own assignment operator, but it doesn't appear to work with variable declarations.." | ||
TimToady | but I don't know that we need to do that | 18:48 | |
moritz | PerlJam: the answer is probably "don't mess with assignment" :-) | ||
PerlJam | Perl's answer is never "don't" | ||
TimToady | Perl's answer is: "Easy, write your own compiler!" | ||
PerlJam | It's always "proceed at your own risk and watch out for the pointy bits!" | 18:49 | |
moritz | ok, maybe the answer should be "If you have to ask, you're not ready to overload assignment" | ||
PerlJam | moritz: perhaps | ||
TimToady | It could be a very short FAQ entry: "No, for certain values of no." | 18:52 | |
moritz | TimToady: an MJD-style FAQ :-) | ||
TimToady invents the Frequently Unanswered Questions ;) | 18:53 | ||
PerlJam | heh | ||
TimToady bows | 18:54 | ||
sorear | just so long as we don't get a FQA... | ||
dalek | q: 4aa6be5 | moritz++ | answers.md: "Why sigils?" Mostly compiled from irclog.perlgeek.de/perl6/2012-01-19#i_5016530 |
||
18:54
PacoAir left
|
|||
moritz | sorear: we just give potential FQA answers commit access to faq.perl6.org :-) | 18:54 | |
[Coke] | NOMMAP still hints that nom will become master someday. | 18:55 | |
TimToady | just so we don't get a FQU too | ||
PerlJam | [Coke]: it still might! | ||
masak | I gave a Perl 5 course today. the question wasn't so much "why sigils?" as "why variant sigils?" | ||
PerlJam | :-) | ||
masak | (from the attendees) | 18:56 | |
TimToady | former Perl 6 programmers? :) | ||
dalek | kudo/nom: 268e0c9 | moritz++ | NOMMAP.markdown: nom will not become master. [Coke]++ |
18:57 | |
masak | TimToady: probably in a prior life or sump'n. | ||
[Coke] | nom: my @a; say @a.WHAT; | 18:59 | |
p6eval | nom 355430: OUTPUT«Array()» | ||
TimToady | ah well, not suprisingly, looks like other people invented FUQ first | ||
masak .oO( aw FUQ ) | 19:00 | ||
19:00
thou left
|
|||
TimToady | FQU too | 19:00 | |
[Coke] | moritz: I don't know how to ask @a if it's the type object. If it is, that covers one of the remaining TODOs. | ||
sorear | @a has to be defined | 19:02 | |
unless you beleive the stuff in S02 about assigning Nil to aggregate containers, but that doesn't make much sense | |||
pmichaud | [Coke]: I'm not likely do be doing any significant committing until tomorrow or a bit later in the week | 19:03 | |
it may take me that long to get re-settled in here | |||
PerlJam | rakudo: my @a := Nil; | ||
p6eval | rakudo d46989: OUTPUT«Type check failed in binding in block <anon> at /tmp/7Xz5wuXvnv:1 in <anon> at /tmp/7Xz5wuXvnv:1» | ||
PerlJam | rakudo: my @a := (); | ||
p6eval | rakudo d46989: ( no output ) | ||
jnthn | nom: say Nil ~~ Positional | ||
p6eval | nom d46989: OUTPUT«Bool::False» | ||
pmichaud | plus I still have a lot of cleaning up to do at the house | ||
PerlJam | Shouldn't those be the same? Or am I outdated in my thinking? | ||
masak | pmichaud! \o/ | 19:04 | |
pmichaud | masak: o/ | ||
masak | \o/ \o/ \o/ | ||
moritz | [Coke]: @a.defined | ||
perl6: my @a; say @a.defined | |||
p6eval | rakudo d46989, niecza v13-332-g677cf15: OUTPUT«Bool::True» | ||
19:04
crashtest joined
|
|||
p6eval | ..pugs b927740: OUTPUT«1» | 19:04 | |
masak | crashtest: aloha. | ||
sorear | PerlJam: I'm talking about my @a = Nil, not := | ||
pmichaud | rakudo; my @a; say @a.defined; # does Rakudo have this correct yet? | 19:05 | |
PerlJam | sorear: I'm aware. You're assertion led me to muck with := though | ||
pmichaud | rakudo: my @a; say @a.defined; # does Rakudo have this correct yet? | ||
p6eval | rakudo d46989: OUTPUT«Bool::True» | ||
PerlJam | s/You're/Your/ | ||
pmichaud | no, it doesn't. | ||
benabik | nom: my @a; say @a.perl | 19:06 | |
sorear | pmichaud: as far as I'm concerned that *is* correct | ||
p6eval | nom d46989: OUTPUT«Array.new()» | ||
masak | pmichaud: me too. | ||
pmichaud: spec? | |||
sorear | b: my @a; say @a.defined | ||
moritz | so should it autovivify to a defined Array on assignment? | ||
p6eval | b 1b7dd1: OUTPUT«Bool::True» | ||
sorear | look, all four major implementations agree, @a makes a defined Array | ||
masak | I like that it's defined. | ||
(I think.) | |||
moritz | masak: I think you were one of the proponents for having it undefined | 19:07 | |
pmichaud | I think we've had discussions on this in the past; also, p5 says that uninitialized arrays are undefined | ||
masak | moritz: yeah, that's what makes me uncertain. | ||
moritz | so that one could distinguish sub f(@a?) { } f(()); f(); | ||
masak | moritz: I remember the discussions. | ||
sorear | eval: my @foo; defined @foo | ||
buubot_backup | sorear: No output. | ||
sorear | eval: my @foo = (); defined @foo | ||
buubot_backup | sorear: No output. | ||
masak | moritz: not so sure anymore I was right. | ||
sorear | eval: my @foo = (3); defined @foo | ||
buubot_backup | sorear: 1 | ||
sorear | eval: my @foo = (3); @foo = (); defined @foo | ||
buubot_backup | sorear: 1 | ||
moritz | masak: I guess nowadays you don't often check if optional arguments have been filled | 19:08 | |
masak | moritz: whether something was passed or not is more a property of the Capture than of the variable in the sub. | ||
moritz | masak: because you've (maybe subconciously) realized it's often design smell | ||
that too | |||
masak | moritz: it feels... wrong to laden the variable with that information. | ||
Radvendii | @people, thanks for the help (way up there). The issue is that I want to have the hash and the array linked, so that when you modify the array part, it still modifies the array part, but also does something to the hash part depending on what is being assigned | ||
sorear | pmichaud: looks like p5's rule is actually "has this array ever held an element", not "has this array been initialized" | 19:09 | |
masak | Radvendii: that's entirely possible. just implement your own class with custom .[] and .{} | ||
pmichaud | sorear: okay, good correction. | ||
masak | Radvendii: I could put together a small example for you if you want. | ||
sorear | Use of "defined" on aggregates (hashes and arrays) is deprecated. It used to report whether memory for that aggregate has ever been allocated. This behavior may disappear in future versions | ||
of Perl. You should instead use a simple test for size: | |||
does Perl 6 count as a future version of Perl? | 19:10 | ||
masak | Radvendii: sort of like a sorted hash or something like that? | ||
moritz | ... and it would be crazy to replicate p5s behaviour in p6 | ||
19:10
thou joined
|
|||
Radvendii | masak: I tried, but [] is unaware of what value is being "equalled" to it. | 19:10 | |
19:10
thou left,
thou joined
|
|||
pmichaud | fwiw, the "all four implementations agree" just means that all four could be wrong. We're looking at Second System Syndrome Done Right, even if all of the implementations are Wrong. :-) | 19:11 | |
masak | Radvendii: I did not understand that response. we might be talking at cross purposes. | ||
19:11
DarthGandalf left
|
|||
masak | pmichaud: you have a point -- but that doesn't mean you're right :P | 19:11 | |
TimToady | p5's behavior is insane because it depends on the allocatedness of its memory, not on the actual semantics in question | ||
pmichaud | I don't have a strong opinion as to whether "my @a" should be defined or undefined; I just know that it's been declared differently from what Rakudo does in the past. | ||
rephrase: I just know that in the past it's been declared to be different from what Rakudo is doing now. | 19:12 | ||
Radvendii | masak: When i say @a[0] = 1, it calls @a.[] but if i overload .[], it can't know that 1 is being assigned to it, which is what i need. | ||
TimToady | I think it's very useful for any bindable variable to have a state that says it is not meaningful | ||
masak | pmichaud: well, I think that declaration is part of a long rambling open RT ticket that someone named masak (no relation) filed once. | ||
moritz | Radvendii: you can return a Proxy object from @a[0], but it is usually a sign of design smell if you need to do that | 19:13 | |
masak | Radvendii: maybe you need to overload at_pos? | ||
sorear | pmichaud: hey, you just got back and I'm already getting to the antagonizing-you stage. Sorry :| | ||
masak | moritz: what? Proxy objects are a design smell now!? :) | ||
Radvendii | masak: I've been making the problem more abstract, what I am doing is making a chess board which is represented both as a two-dimensional array of spaces, and as a hash of pieces (and where they are on the board) | ||
benabik | moritz: I'm not so sure it's design smell. Being able to enforce invariants at assignment is useful. | ||
masak | sorear++ # tormenting implementor | ||
sorear | pmichaud: welcome back. I hope thinks are going adequately well for you | ||
pmichaud | sorear: no problem; I've missed that a bit. :-) | 19:14 | |
moritz | masak: usually. | ||
Radvendii | masak: i am overwriting at_pos | ||
masak | moritz: I thought Proxies were the best. | ||
moritz | nom: my Int $x = 3; sub f() is rw { $x }; f() = 'foo' | ||
pmichaud | and yes, things are going adequately well here. | ||
p6eval | nom d46989: OUTPUT«Type check failed in assignment to '$x'; expected 'Int' but got 'Str' in block <anon> at /tmp/xkuqahwsvL:1 in <anon> at /tmp/xkuqahwsvL:1» | ||
19:14
preflex left
|
|||
moritz | benabik: that also enforces an invariant at assignment, and doesn't need a proxy | 19:14 | |
Radvendii | oh oops. i've been putting the wrong name at the beginning of my messages | 19:15 | |
jnthn | nom: my Int $x = 3; sub f() is rw { return-rw $x }; f() = 'foo' | ||
p6eval | nom d46989: OUTPUT«Type check failed in assignment to '$x'; expected 'Int' but got 'Str' in block <anon> at /tmp/UqhksAIsX2:1 in <anon> at /tmp/UqhksAIsX2:1» | ||
PerlJam | Radvendii: that's okay, we always get them confused too ;) | ||
jnthn | oh, duh, I didn't read the error :) | ||
TimToady doesn't channel MJD | |||
benabik | moritz: A language invariant, yes... But there are invariants that can't be as easily enforced that way... Like "array can't contain duplicates" | 19:16 | |
PerlJam | .oO( * TimToady doesn't channel MJD, RETARDO!? ) |
||
masak | moritz: I think in order to claim that something like a Proxy is a design smell, it'd be nice if you could say why you think so. if you said roles are a design smell, I wouldn't believe you. with Proxy, I don't know. | ||
pmichaud | I have to run errands now; unlikely I'll be back much more today. I should be around most of tomorrow, however. | ||
masak | PerlJam: :D | 19:17 | |
[Coke] | pmichaud: be well. | ||
Radvendii | pmichaud: o/ | ||
masak | pmichaud: o/ | ||
moritz | masak: my statement might have been a bit harsh; what I should have said is that IME people tend to reach for proxies when there are better options, just like people overuse junctions | 19:18 | |
19:18
GlitchMr left
19:19
DarthGandalf joined,
dbr left
|
|||
Radvendii | In any case, I am using at_pos. The problem is at_pos is unaware of what is being assigned, and it is called before the assignment takes place (so i can't even do an update of the entire hash. | 19:19 | |
sorear | niecza: class A { method foo { say @_; say self } }; A.foo(5) | 19:20 | |
p6eval | niecza v13-332-g677cf15: OUTPUT«5A()» | ||
moritz | Radvendii: then a Proxy is indeed what you need | ||
jnthn | Radvendii: It's meant to work like that. | ||
Radvendii | i suppose i could just represent it as an array, and convert to a hash every time they ask for the value at a key... | 19:21 | |
moritz: how would a Proxy help? | |||
moritz | Radvendii: it lets you run a piece of code when somebody assigns to it | ||
PerlJam | Radvendii: it's too bad shaped array aren't implemented anywhere. | ||
Radvendii | PerlJam: shaped arrays? | ||
moritz | see S09 | ||
Radvendii | moritz: oh! how do i do that? | ||
ah | |||
moritz | Radvendii: there are examples in S06 and in the test suite | 19:22 | |
just grep for Proxy | |||
sorear out | |||
masak | moritz: ok -- to me "code smell" and "cargo-cult overuse" are two different mental bins. | 19:23 | |
PerlJam | Radvendii: I guess I really mean "user-defined array indices", but I tend to think of them in conjunction with shaped arrays. | ||
moritz | masak: for me too, but I often conflate them when talking to somebody who doesn't express where well what he wants | ||
masak | it's hard to know what you want in a language you're in the process of learning :) | 19:24 | |
moritz | masak: aye | 19:25 | |
Radvendii | PerlJam: I don't understand what you mean... | ||
jnthn | nom: class A { has @.x; method at_pos($self: $i) is rw { Proxy.new: FETCH => method () { $self.x[$i] }, STORE => method ($val) { $self.x[$i] = 2 * $val } } }; my $a = A.new; $a[0] = 21; say $a[0] | ||
p6eval | nom d46989: OUTPUT«42» | ||
jnthn | Radvendii: ^^ example | ||
Radvendii | jnthn: yes. thanks. i just found the part in 06. | 19:26 | |
19:26
birdwindupbird joined
|
|||
PerlJam | Radvendii: you can safely ignore me, what I was thinking of would only satisfy a part of what you want. | 19:26 | |
19:26
dbr joined
|
|||
Radvendii | do i have to impliment anything but FETCH and STORE? | 19:26 | |
masak | nom: say ('bird' xx 2).join('windup') | ||
p6eval | nom d46989: OUTPUT«birdwindupbird» | ||
[Coke] | b: say 19284-19269; # 01/23/2012 - niecza at 99.92% | ||
p6eval | b 1b7dd1: OUTPUT«15» | ||
Radvendii | PerlJam: okay... I'll look it up later. it does look interesting | ||
jnthn | Radvendii: Proxy only knows about FETCH and STORE :) | 19:27 | |
[Coke] | niecza still has 10 fails, rakudo 28. | ||
jnthn | [Coke]: overflow.t? | ||
Radvendii | jnthn: awesome. | ||
masak loves living in a post-Easter world | |||
moritz | .oO( now where are my Perl 6 Eaters? ) |
19:28 | |
[Coke] | feather.perl6.nl/~coke/ has the individual reports if you want to dig for the failures. | ||
jnthn: yup | |||
jnthn | [Coke]: Thanks | ||
[Coke] | niecxza is still the TERMCAP issues. | ||
ugh, 15 tests. :P | 19:29 | ||
19:29
birdwind1pbird joined,
cognominal_ joined
19:32
cognominal left
|
|||
dalek | ast: 22fb63e | jnthn++ | integration/99problems-31-to-40.t: Bring a test inline with spec. |
19:32 | |
19:32
kaleem left
19:34
daxim left
|
|||
dalek | ast: 3dd2b4d | coke++ | integration/99problems-31-to-40.t: unfudge for niecza |
19:35 | |
19:35
sromanov joined
|
|||
[Coke] treads water. ;) | 19:36 | ||
moritz | "I pass that test" -- "me too!" | ||
:-) | |||
TimToady | I wish there were a niecza user so that I could autocomplete its name... | ||
moritz | should I rename hugme to niecza? :-) | ||
[Coke] | niecza: my @a = 4,6,12 .. *; say @a[3]; | 19:37 | |
TimToady | nah, rename buubot if you really want to confuse people | ||
p6eval | niecza v13-332-g677cf15: OUTPUT«(timeout)» | ||
TimToady | .. is not ... | ||
though that shoulda worked, I guess | 19:38 | ||
on the theory that 12 .. * should transmute to 12 ... * | |||
[Coke] | niecza: my @a = 4,6,12...*; say @a[^10]; | ||
p6eval | niecza v13-332-g677cf15: OUTPUT«Unhandled exception: Unable to figure out pattern of series at /home/p6eval/niecza/lib/CORE.setting line 1168 (die @ 3)  at /home/p6eval/niecza/lib/CORE.setting line 2555 (get-next-closure @ 25)  at /home/p6eval/niecza/lib/CORE.setting line 2567 (AN… | ||
TimToady | well, it's that my's pseudoassignment is eager | ||
[Coke] | so much for using perl 6 on this week's car talk puzzler. ;) | 19:39 | |
TimToady | unlike other pseudoassignments | ||
[Coke]: you're looking for constant, I think | |||
moritz | niecza: my @a := 4, 6, 12 ... *; say @a[^10] | ||
p6eval | niecza v13-332-g677cf15: OUTPUT«Unhandled exception: Unable to figure out pattern of series at /home/p6eval/niecza/lib/CORE.setting line 1168 (die @ 3)  at /home/p6eval/niecza/lib/CORE.setting line 2555 (get-next-closure @ 25)  at /home/p6eval/niecza/lib/CORE.setting line 2567 (AN… | ||
TimToady | niecza: constant my @a = 4,6,12...*; say @a[^10]; | ||
p6eval | niecza v13-332-g677cf15: OUTPUT«===SORRY!===Malformed constant at /tmp/iI8A3FsHb7 line 1:------> constant my ⏏@a = 4,6,12...*; say @a[^10];Parse failed» | ||
TimToady | niecza: constant @a = 4,6,12...*; say @a[^10]; | ||
p6eval | niecza v13-332-g677cf15: OUTPUT«Unhandled exception: Unable to figure out pattern of series at /home/p6eval/niecza/lib/CORE.setting line 1168 (die @ 3)  at /home/p6eval/niecza/lib/CORE.setting line 2555 (get-next-closure @ 25)  at /home/p6eval/niecza/lib/CORE.setting line 2567 (AN… | ||
TimToady | niecza: constant @a = 4,6,12..*; say @a[^10]; | ||
p6eval | niecza v13-332-g677cf15: OUTPUT«4 6 12..Inf Any() Any() Any() Any() Any() Any() Any()» | 19:40 | |
colomon | 4,6,12 isn't a p6-solvable series, is it? | ||
TimToady | uh, ranges should flatten in list context | ||
moritz | colomon: nope | ||
TimToady | the ... never sees the 4 or 6 if you start with .. | ||
dalek | ast: 70ffbf0 | jnthn++ | integration/99problems-11-to-20.t: Correction, re-fudging (remove some skips and turn some others into todos). |
||
TimToady | since .. is tighter than , | 19:41 | |
moritz | jnthn: are you doing an epic walk through the fudges? | ||
TimToady | niecza: my @a; @a = 1..12; say +@a | 19:43 | |
p6eval | niecza v13-332-g677cf15: OUTPUT«12» | ||
TimToady | niecza: constant @a = 1..12; say +@a | ||
p6eval | niecza v13-332-g677cf15: OUTPUT«12» | ||
jnthn | moritz: More like just a gentle stroll :) | ||
TimToady | niecza: constant @a = 0,1..12; say +@a | ||
p6eval | niecza v13-332-g677cf15: OUTPUT«2» | ||
TimToady | Oopsie! | ||
jnthn | moritz: If you fancy what looks like 17 more easy passes, see S32-num/stringify.rakudo :) | 19:44 | |
moritz | jnthn: you mean the Rat.perl thing in there? | ||
TimToady | sorear: ^^ | ||
jnthn | moritz: Complex.perl also | 19:45 | |
moritz | jnthn: problem is that it tests for a form that we don't parse as Complex | ||
jnthn: so while we win tests, we lose roundtripping | |||
jnthn | moritz: ah. | ||
19:45
Bzek joined
|
|||
dalek | ast: dca332d | moritz++ | S32-exceptions/misc.t: test for typed redeclaration error |
19:46 | |
kudo/nom: d83a1c0 | moritz++ | src/ (2 files): typed Redeclaration errors |
|||
TimToady | niecza: my @a = 0,1..12; say +@a | 19:47 | |
p6eval | niecza v13-332-g677cf15: OUTPUT«13» | ||
masak | it's interesting that there's +/- and ?/!, but that prefix:<~> has no negation. | ||
Radvendii | when i do "@a[0][1]=1" it really does [email@hidden.address] correct? and the at_pos(0) would be using the FETCH part of the proxy, no? | 19:48 | |
TimToady | perl6: say ~^ "FOO" | ||
p6eval | niecza v13-332-g677cf15: OUTPUT«Unhandled exception: Buffer bitops NYI at /home/p6eval/niecza/lib/CORE.setting line 1168 (die @ 3)  at /home/p6eval/niecza/lib/CORE.setting line 2680 (prefix:<~^> @ 3)  at /tmp/qhEnln36Dg line 1 (mainline @ 2)  at /home/p6eval/niecza/lib/CORE.sett… | ||
..rakudo 268e0c: OUTPUT«Failure.new(exception => Exception.new())» | |||
..pugs b927740: OUTPUT«Â¹Â°Â°» | |||
benabik | Radvendii: The .at_pos(1) would use FETCH from the result of .at_pos(0) | ||
Radvendii: Then the = 1 would use STORE on the one from at_pos(1) | |||
Radvendii | okay | ||
that's good | 19:49 | ||
thanks | |||
19:49
Vlavv` left
|
|||
TimToady | Radvendii: the point is that we make a very careful distinction between determining the identity of the operand from performing the operation | 19:49 | |
subscripting is only for determining identity | |||
Radvendii | right. that makes sense. | 19:50 | |
TimToady | likewise an rw function only identifies the operand, it never actually does anything to it | ||
benabik | @a[0][1] = 1 is approx. @a.at_pos(0).FETCH.at_pos(1).STORE(1) as I understand it. | ||
Radvendii | so how would i write a nested Proxy? Proxy.new: FETCH => method { Proxy/new: FETCH => method {}}? | 19:51 | |
but then where do i input the second index? | |||
moritz | Radvendii: you don't special-case nested access | ||
benabik | Radvendii: The first proxy returns something that has at_pos. | 19:52 | |
moritz | Radvendii: if you want to allow @a[0][1], then @a[0] needs to return a Proxy which holds another object, which again can have a Proxy | ||
19:52
GlitchMr joined
|
|||
moritz | if they are arrays, @a[0] simply returns an array | 19:52 | |
and that array knows how to deal with .[1] | |||
Radvendii | so i have to make a new class for my second level arrays? | 19:53 | |
moritz | no | ||
you can just reuse your custom array class | |||
Radvendii | then how do i overload their at_pos? | 19:54 | |
huh? | |||
but the one that i am making also acts as a hash, it wouldn't work for this... | |||
moritz | Radvendii: are you familiar with recursion? | 19:55 | |
Radvendii | yeah | ||
o-oh | |||
moritz | just like with recursion, you just deal with one level | ||
TimToady | moritz: it's possible he wants a different type at the next level... | ||
moritz | and for the second level, you can return an object of the same type, which will handle the second level for you | ||
TimToady: then it must be different types, yes | 19:56 | ||
TimToady | possibly with the same role mixed in though | ||
Radvendii | yeah... the top level is just returning the second level. Whereas the second level is doing weird things when you STORE to it | ||
so i need another class? | |||
TimToady | sounds like a Node vs Leaf type problem | 19:57 | |
Radvendii | can i do an inline overloading? | ||
@a.overload : at_pos => method {} | 19:58 | ||
? | |||
moritz | @a does role { method at_pos { } } | 19:59 | |
19:59
sromanov left
|
|||
masak | perl6++ | 19:59 | |
Radvendii | okay... ("role" is kind of a misnomer) | ||
moritz | is it? it's just much more general than that particular use case | 20:00 | |
masak | Radvendii: it's just an anonymous role used here because it's silly to name such a small role. | ||
Radvendii: helps to know that roles are used for runtime overriding of methods. | 20:01 | ||
Radvendii | oh... i guess that does make sense | ||
TimToady | .oO( All of life is a stage, and we all play many anonymous roles... ) |
||
20:01
Vlavv` joined
|
|||
Radvendii | TimToady: :P | 20:01 | |
20:01
baest left
|
|||
moritz | nom: class A { method x() { }; method x() { } } | 20:02 | |
p6eval | nom d83a1c: OUTPUT«===SORRY!===Package 'A' already has a method 'x'; did you mean to declare a multi-method?» | ||
moritz | nom: sub a { }; sub a { }; | 20:03 | |
p6eval | nom d83a1c: OUTPUT«===SORRY!===Illegal redeclaration of routine 'a' at line 1, near ";"» | ||
TimToady | I usually put questions like that in parens | ||
so that the ? doesn't look funny with " at foo line 42" after it | |||
masak submits rakudobug | |||
jnthn | heh | 20:04 | |
TimToady realizes he never made that nano-principle clear... :) | |||
jnthn | nom: say [^^] 5, 9, 17 | ||
p6eval | nom d83a1c: OUTPUT«17» | ||
jnthn | [^^] is a curious beast. | ||
masak | TimToady: there are many good things to steal from Perl 5's error messages. | ||
TimToady | nom: say 5 ^^ 9 ^^ 17 | 20:05 | |
p6eval | nom d83a1c: OUTPUT«Nil» | ||
masak | I prefer Nil to 17. | ||
jnthn | 5 ^^ 9 gives False. False ^^ 17 of course gives 17... | ||
Radvendii | what is ^^? | ||
masak | Radvendii: eyebrows. | ||
:P | |||
Radvendii | haha | ||
TimToady | short-circuit XOR | ||
but it's a list infix | |||
jnthn | masak: Well, same. Any idea how we get reduce to do the right thing? :) | 20:06 | |
TimToady | so it's only true if there's one true value | ||
nom: say 5 ^^ 9 ^^ 17 ^^ 'phooey' | |||
p6eval | nom d83a1c: OUTPUT«Nil» | ||
TimToady | nom: say [^^] 5, 9, 17, 'phooey' | ||
p6eval | nom d83a1c: OUTPUT«Nil» | ||
TimToady | nom: say [^^] 5, 9, 'phooey' | ||
p6eval | nom d83a1c: OUTPUT«phooey» | ||
Radvendii | haha, weird | 20:07 | |
jnthn | TimToady: Only happens with odd number of 'em. :) | ||
masak | jnthn: none whatsoever. ISTR hearing about the problem years ago. | ||
jnthn: like, 2009. | |||
jnthn | TimToady: You can probably imagine why it's getting the result it is... :) | ||
20:07
baest joined
|
|||
TimToady | so it's right half the time, which is better than a stopped clock, barely | 20:07 | |
masak | "Perl 6: better than a stopped clock, barely" | 20:08 | |
TimToady | I can imagine, sure, but [op] 1,2,3 is defined to be the same as 1 op 2 op 3 | ||
moritz | modulo short-circuitry | ||
colomon | niecza: say [^^] 5, 9, 17 | ||
jnthn | Right. | ||
p6eval | niecza v13-332-g677cf15: OUTPUT«Unhandled exception: System.Exception: Unable to find lexical &infix:<^^> in mainline at Niecza.CLRBackend.NamProcessor.ResolveLex (System.String name, Boolean upf, System.Int32& uplevel, Boolean core) [0x00000] in <filename unknown>:0  at Niecza.CLRB… | ||
TimToady | niecza: say 5 ^^ 0 | 20:09 | |
p6eval | niecza v13-332-g677cf15: OUTPUT«Unhandled exception: System.Exception: Unable to find lexical &infix:<^^> in mainline at Niecza.CLRBackend.NamProcessor.ResolveLex (System.String name, Boolean upf, System.Int32& uplevel, Boolean core) [0x00000] in <filename unknown>:0  at Niecza.CLRB… | ||
TimToady | hah | ||
jnthn | The spec says that ^^ doesn't short-circuit. | ||
er | |||
The spec says that [^^] doesn't short-circuit. | |||
TimToady | doesn't thunk | ||
Radvendii | nom: @a does role { at_pos | ||
p6eval | nom d83a1c: OUTPUT«===SORRY!===Variable @a is not predeclared at line 1, near " does role"» | ||
Radvendii | aaah! | ||
premature send | |||
moritz | but still the error was right :-) | 20:10 | |
TimToady | jnthn: the spec doesn't say it doesn't short-circuit; it says it doesn't thunk its args, S03:1377 | 20:11 | |
Radvendii | nom: my @a does role { at_pos($j) { say "test" } }; @a[0]; | ||
p6eval | nom d83a1c: OUTPUT«===SORRY!===Variable $j is not predeclared at line 1, near ") { say \"t"» | ||
Radvendii | yeah, that's the error i'm getting | ||
jnthn | TimToady: ah, I see | ||
Radvendii | but $j is an argument... | ||
colomon is trying to remember the details of niecza doing something funky with reduce and list ops.... | 20:12 | ||
TimToady | perl6: say [||] 1, 0 xx *; # should terminate | ||
benabik | Radvendii: try method at_post | 20:13 | |
*at_pos | |||
p6eval | niecza v13-332-g677cf15: OUTPUT«===SORRY!===This macro cannot be used as a function at /tmp/_KOy8dLfF6 line 1:------> say [||] 1, 0 xx *⏏; # should terminateUnhandled exception: Check failed at /home/p6eval/niecza/boot/lib/CORE.setting line … | ||
..pugs b927740, rakudo d83a1c: OUTPUT«(timeout)» | |||
TimToady | perl6: say (1, 0 xx *)[0]; # should terminate | ||
p6eval | pugs b927740, rakudo d83a1c, niecza v13-332-g677cf15: OUTPUT«1» | 20:14 | |
Radvendii | benabik: that works | ||
TimToady | reductions on list associative operators must take that into account | 20:15 | |
masak | perl6: multi postfix:<!>(0) { 1 }; multi postfix:<!>(Int $n) { $n * ($n - 1) }; say 5! | 20:21 | |
p6eval | rakudo d83a1c, niecza v13-332-g677cf15: OUTPUT«20» | 20:22 | |
..pugs b927740: OUTPUT«***  Unexpected "0" expecting formal parameter or ")" at /tmp/WnOGKkiQFs line 1, column 19» | |||
masak | augh | ||
perl6: multi postfix:<!>(0) { 1 }; multi postfix:<!>(Int $n) { $n * ($n - 1)! }; say 5! | |||
p6eval | rakudo d83a1c, niecza v13-332-g677cf15: OUTPUT«120» | ||
..pugs b927740: OUTPUT«***  Unexpected "0" expecting formal parameter or ")" at /tmp/N95bZ46NKD line 1, column 19» | |||
masak | niecza: multi postfix:<!>(0) { 1 }; multi postfix:<!>(Int $n) is looser(&infix:<+>) { $n * $n - 1! }; say 5! | 20:23 | |
p6eval | niecza v13-332-g677cf15: OUTPUT«(timeout)» | ||
masak | hm. | ||
niecza: multi postfix:<!>(0) { 1 }; multi postfix:<!>(Int $n) is looser(&infix:<+>) { $n * ($n - 1!) }; say 5! | |||
p6eval | niecza v13-332-g677cf15: OUTPUT«(timeout)» | ||
masak | hm. | 20:24 | |
moritz | maybe that tries to install two postfixes, one tighter than +, one looser | ||
Radvendii | hm... is there any way to give something access to private variables without making them public? | ||
something specific, that is | |||
masak | I think multi subs shouldn't accept looser/tighter/equal at all. only only and proto should. | 20:25 | |
Radvendii: yes. a method. | |||
moritz | masak: aye | ||
20:25
fridim_ joined
|
|||
masak | Radvendii: methods are the way to provide specific access to attributes. that's what mehtods do. | 20:25 | |
Radvendii | masak: got it. | ||
colomon | niecza: multi postfix:<!>(0) { 1 }; multi postfix:<!>(Int $n) { $n * ($n - 1!) }; say 5! | ||
p6eval | niecza v13-332-g677cf15: OUTPUT«(timeout)» | 20:26 | |
dalek | ecs: c6c7fcf | larry++ | S03-operators.pod: clarify semantics of [op] for list associatives |
||
benabik | colomon: ($n - 1!) ? | ||
colomon | niecza: multi postfix:<!>(0) { 1 }; multi postfix:<!>(Int $n) { $n * ($n - 1)! }; say 5! | ||
p6eval | niecza v13-332-g677cf15: OUTPUT«120» | ||
colomon | benabik: just a cut-n-paste from masak, but yeah, that's his problem | ||
Radvendii | if i wanna just make them public, do i say "has $a=5 is rw;" or "has $a is rw = 5;"? | ||
masak | colomon: right, but mine was s'posed to be looser than infix:<-> | 20:27 | |
Radvendii | hmm... it doesn't seem to like either one | 20:29 | |
can i initialize an instance variable and make it rw? | |||
benabik | has $.a ? | 20:30 | |
Radvendii | that's what i meant | ||
moritz | Radvendii: has $.x is rw = 5; | ||
benabik | nom: class A { has $.a = 5 }; A.new.a = 4 | ||
p6eval | nom d83a1c: OUTPUT«Cannot assign to a readonly variable or a value in block <anon> at /tmp/DV29G8tr7m:1 in <anon> at /tmp/DV29G8tr7m:1» | ||
benabik | nom: class A { has $.a is rw = 5 }; A.new.a = 4 | 20:31 | |
p6eval | nom d83a1c: ( no output ) | ||
benabik | nom: class A { has $.a is rw = 5 }; my $a = A.new; say $a.a; $a.a = 0; say $a.a | ||
p6eval | nom d83a1c: OUTPUT«50» | ||
benabik | Radvendii: ^^ seems to work | 20:32 | |
Radvendii | okay... | ||
then my error must be coming from elsewhere | |||
TimToady | sure, ^^ works, but [^^] doesn't # rim shot | ||
Radvendii | TimToady: :P | ||
it doesn't like it when i say method at_pos($s:, $i). what's wrong with that? | 20:33 | ||
20:33
fridim_ left
|
|||
Radvendii | isn't that the syntax for getting self into $s? | 20:33 | |
masak | no. | 20:34 | |
Radvendii | :P | ||
jnthn | Don't need the , | ||
masak | s/:,/:/ | ||
Radvendii | got it | ||
20:34
birdwind1pbird left
|
|||
Radvendii | that's odd... | 20:34 | |
why is that? | |||
20:34
birdwindupbird left
|
|||
arnsholt | Well, the colon serves as separator, instead of the comma | 20:36 | |
Much like in normal text, really | |||
Radvendii | yeah, but programming isn't supposed to parse like english. i guess it doesnt really matter | ||
benabik | Radvendii: Perl _is_ supposed to parse like English. | 20:37 | |
moritz | www.hirewolf.com/blog/hirewolf-open...ce-contest # might be interesting for some or the other p6 hacker :-) | 20:38 | |
Radvendii | huh? since when. i thought that was python's gig. or applescript. perl has all of that punctuation. | ||
moritz | Radvendii: read "Programming Perl", section 27.2. "Perl Poetry" | 20:40 | |
TimToady | why do you think punctuation is the opposite of English? Spoken English is full of punctuation... | ||
moritz | Radvendii: and also en.wikipedia.org/wiki/Black_Perl | ||
TimToady wonders if ancient Hebrews actually thought their language didn't contain vowels... | 20:42 | ||
20:42
mj41 joined
|
|||
Radvendii | that's hillarious (black perl) | 20:43 | |
TimToady: vowels were probably second-class letters. just like we dont think english contains a glottal stop (think of the - in uh-oh) | |||
TimToady | or the tt in glottal, if you're Cockney :) | 20:44 | |
Radvendii | haha, yup. more people pronounce t in fountain that way | ||
foun-n | |||
TimToady | funny that IPA seems to be a second-class citizen in Unicode | 20:45 | |
Radvendii | how so? | 20:46 | |
if i "has" $.a and @.a, how does it know which "$obj.a" is refering to? | 20:47 | ||
TimToady | [fæunʔn] or some such, but that's latin 'ʔ' | ||
moritz | Radvendii: the answer is "don't do that" | ||
Radvendii | moritz: haha. okay | ||
moritz: but what would it do? | 20:48 | ||
moritz | Radvendii: give them other names | ||
dalek | kudo/nom: 00e5547 | moritz++ | src/ (2 files): throw X::Phaser::Once exceptions when two CATCH or CONTROL blocks appear in a block |
||
kudo/nom: ef67fd4 | moritz++ | src/ (2 files): more typed redeclaration exceptions |
|||
moritz | you can always use singular and plural if you want | ||
Radvendii | nom: class A {has $.a=5; has @.a=(1,2)}; my A $a .= new; say $a.a; | ||
p6eval | nom d83a1c: OUTPUT«5» | ||
Radvendii | im just curious | ||
interesting | 20:49 | ||
TimToady | e pluribus unum | ||
dalek | ast: 0b7d7d2 | moritz++ | S32-exceptions/misc.t: more typed exception tests |
||
Radvendii | it's probably whichever you declare first | ||
moritz | $a.foo and $a.foos | ||
Radvendii | nom: class A {has $.a=5; has @.a=(1,2)}; my A $a .= new; say $a.a[0]; | ||
p6eval | nom d83a1c: OUTPUT«5» | ||
TimToady | e pluribus unum -> $() | ||
masak | Radvendii: yes, but it's a bug. | ||
Radvendii | masak: oh, okay | ||
moritz: i know, i'm just curious as to what it _would_ do | |||
masak | Radvendii: see rt.perl.org/rt3/Ticket/Display.html?id=108670 | 20:50 | |
Radvendii | alright, alright :P | ||
benabik | nom: class A {has @.a=(1,2); has $.a=5}; my A $a .= new; say $a.a; | ||
p6eval | nom d83a1c: OUTPUT«1 2» | ||
benabik | It is whichever was done first. | 20:51 | |
*declared | |||
Radvendii | benabik: yeah | ||
why not just say $obj.$a | |||
and $obj.@a | |||
moritz | eeks | ||
because object names are identifiers | |||
and if we allow sigils in identifiers, we lose the distiction between the two | |||
Radvendii | so? | ||
moritz | and then we don't know if $@a really means $( @a ), or a variable named $@a | 20:52 | |
20:52
fridim_ joined
|
|||
moritz | and ... a whole can of worms. | 20:52 | |
Radvendii | it would only work directly after the . | 20:53 | |
$a.$b $a$b would still be illegal. | |||
moritz | and then somebody wants to override the accessors | 20:54 | |
jnthn | hmmm...so: has $.x; has @.x; method x() { } # did we settle on this being allowed or disallowed? | ||
jnthn can't quite tell from the ticket :) | |||
moritz | and wants to write method $x { } and method @x { } | ||
also $a.$b is taken | |||
Radvendii | moritz: with what? | 20:55 | |
moritz | nom: sub f($x) { say $x }; my $a = &f; 'foo'.%a | ||
nom: sub f($x) { say $x }; my $a = &f; 'foo'.aa | |||
nom: sub f($x) { say $x }; my $a = &f; 'foo'.$a | |||
p6eval | nom d83a1c: OUTPUT«===SORRY!===Confused at line 1, near "'foo'.%a"» | ||
nom d83a1c: OUTPUT«Method 'aa' not found for invocant of class 'Str' in block <anon> at /tmp/cxsR70bPFo:1 in <anon> at /tmp/cxsR70bPFo:1» | |||
nom d83a1c: OUTPUT«foo» | |||
Radvendii | alright fine | 20:56 | |
be that way | |||
;) | |||
moritz is that way :-) | |||
benabik | nom: sub f($_) { .say }; 'foo'.&f # ? | 20:57 | |
p6eval | nom d83a1c: OUTPUT«foo» | ||
benabik | \o/ | ||
Radvendii | :P | ||
brb guys | 20:58 | ||
Radvendii is updating iTerm | |||
20:59
Radvendii left,
Radvendii joined
|
|||
Radvendii | o/ | 20:59 | |
TimToady | jnthn: I think the consensus was leaning toward "allowed" | 21:00 | |
Radvendii | TimToady: allowed but not for long i thoguh | 21:01 | |
moritz | I think the consensus was that two attributes with accessors and the same short name were disallowed | ||
because of .new(foo => $bar) ambiguty | |||
Radvendii | or "shouldnt be but is" | ||
21:01
mj41 left
|
|||
moritz | has $.a; has @.a; ::?CLASS.new(a => 1) # which one is it? | 21:02 | |
TimToady | not if there's a disambuating method explicitly put there | ||
jnthn | Locally: | ||
> class A { has @.a = 2,3; has $.a = 1 } | |||
Two or more attributes declared that both want an accessor method 'a' | |||
Wordsmithing? :) | |||
At the moment also: | |||
> class A { has @.a = 2,3; has $.a = 1; method a() { } } | |||
Two or more attributes declared that both want an accessor method 'a' | |||
TimToady | but I see the problem with BUILD args | ||
jnthn | Can easily change that. | ||
But the .new/BUILD issue makes me prefer it as it is. | 21:03 | ||
21:04
MayDaniel joined
|
|||
moritz | std: f($x!) { } | 21:04 | |
p6eval | std 40d10f7: OUTPUT«===SORRY!===Variable $x is not predeclared at /tmp/S19nrfX0VF line 1:------> f(⏏$x!) { }Negation metaoperator not followed by valid infix at /tmp/S19nrfX0VF line 1:------> f($x!⏏) { }Parse failedFAILED 00:… | ||
moritz | std: sub f($x!) { } | ||
p6eval | std 40d10f7: OUTPUT«Potential difficulties: $x is declared but not used at /tmp/icxc_zgq0E line 1:------> sub f(⏏$x!) { }ok 00:01 109m» | ||
moritz | std: sub f($x! = 3) { } | ||
p6eval | std 40d10f7: OUTPUT«===SORRY!===Cannot put a default on a required parameter at /tmp/ZwFtvK3hq3 line 1:------> sub f($x! = 3⏏) { }Potential difficulties: $x is declared but not used at /tmp/ZwFtvK3hq3 line 1:------> sub f(⏏$x! = … | ||
Radvendii | why not? | 21:05 | |
moritz | because you have to provide a value for it anyway | ||
so what use is the default? | |||
it just means you are confused | |||
Radvendii | oh | ||
good call | |||
TimToady | we don't classify all unreachable code that way, but in this case it seems reasonable | 21:06 | |
jnthn: it seems to me that having the disambuating function able to "fix" it is necessary for composing two roles with conflicting attributes | 21:08 | ||
masak | that's essentially the same rationale for forbidding auto-generation of a public accessor that would never be generated. | ||
moritz | there's a huge number of errors related to signatures | ||
because they are complex beasts, and much can go wrong | |||
sleep& | 21:09 | ||
jnthn | o/, moritz | ||
TimToady: Two roles with conflicting attributes will conflict on the attribute storage names even if accessor methods are resolved. | |||
TimToady | they're not stored with the sigil? | 21:10 | |
jnthn | TimToady: oh, sorry | ||
TimToady: OK, in that case they won't. :) | |||
(Was thinking of the same sigil case...for some reason...) | |||
21:12
mtk joined
|
|||
dalek | Heuristic branch merge: pushed 28 commits to nqp/qbootstrap by jnthn | 21:12 | |
21:14
fridim_ left
21:15
Radvendii left,
MayDaniel left
21:19
molaf_ left
21:20
GlitchMr left
|
|||
dalek | kudo/nom: 71225d3 | jnthn++ | docs/ROADMAP: A few difficulty estimates. |
21:21 | |
kudo/nom: ccd75fa | jnthn++ | src/Perl6/Metamodel/AttributeContainer.pm: Catch case of a class that does 'has $.x; has @.x'. |
|||
kudo/nom: 4ffbd61 | jnthn++ | src/Perl6/Metamodel/AttributeContainer.pm: Allow an explicit method to resolve an attribute accessor conflict. |
|||
21:22
rindolf left
21:25
not_gerd left
21:29
Radvendii joined,
kaare_ left
|
|||
Radvendii | im getting a weird maximum recursion levels error that is due to some behind the scenes method calling | 21:30 | |
where's that code-posting website thing? | |||
colomon | gist.github.com | 21:31 | |
21:33
bbkr1 joined
|
|||
Radvendii | gist.github.com/1665643 | 21:35 | |
that's the code that's producing the problem | |||
21:35
SHODAN left,
BinGOs left,
geekosaur left,
SHODAN joined,
BinGOs joined,
geekosaur joined
|
|||
Radvendii | alright | 21:36 | |
i think i fixed that error... | |||
but now I'm getting a weirder error. | |||
website is updated... | 21:37 | ||
it thinks i'm trying to access the method $s.a instead of the variable $s.a (@.a) | 21:39 | ||
jnthn | $s.h< $p > | 21:42 | |
That's probably not what you meant | |||
$s.h{$p} # think you wanted this | |||
the ... in $h<...> is always literal | |||
Radvendii | o-oh | 21:46 | |
i get the same error though... | 21:47 | ||
(also, i thought <...> was double-quoted...) | |||
the error is coming from the line "FETCH => method {$s.a[$i][$j]}," | 21:48 | ||
is it possible that the $s is not following through to the "role{}" | 21:49 | ||
jnthn | Will that not mix the role in every time the variable is accessed? | 21:50 | |
Perhaps the issue is that you're expecting to get a fresh instance of the role each time you use it, though, and in reality roles are declarational so you're only getting one of them. | 21:51 | ||
Radvendii | mayeb... | 21:52 | |
but that still shouldn't be telling me that $s doesnt have a method "a" | |||
right? | 21:53 | ||
jnthn | Note that $s.a[$i][$j] is a method call to the method a. | ||
That's what accessors are - method calls. | |||
Radvendii | right. but it should automatically create that, no? | ||
jnthn | Radvendii: I suspect the issue isn't that it doesn't have one, it's that the $s inside the role doesn't work out. | 21:54 | |
Radvendii | a-ah... | ||
jnthn | Radvendii: I suspect it's getting tied to the static lexpad or some such. | ||
Radvendii | so then how do i do this? making another class wouldn't work either... | 21:55 | |
would it? | |||
jnthn | Radvendii: No, but if you declare a my role MyAtPos[$s] { method at_pos ... } rather than the anonymous one | 21:57 | |
And then do ... does MyAtPos[$s] | |||
Then you probably get what you're after. | |||
Radvendii | ah | ||
okay | |||
let me try that... | |||
jnthn | (that's a parametric role) | 21:58 | |
Radvendii | where do i declare the role? | ||
and what's parametric? | |||
jnthn | Radvendii: Maybe declare it just above your at_pos method (the outermost one) | 21:59 | |
Radvendii | and what's that [$s] syntax... | ||
jnthn | Radvendii: Parametric means a role that takes some parameters | ||
Radvendii | ah | ||
that answers my other question as well | |||
jnthn | :) | ||
Radvendii | if roles are very much like classes in the underlying code, can i make classes that take in parameters? | ||
fsergot | good night o/ | 22:02 | |
Radvendii | o/ | ||
role test[$a,$b]{} | 22:03 | ||
nom: role test[$a,$b]{} | |||
p6eval | nom 4ffbd6: ( no output ) | ||
jnthn | Radvendii: They're not much like classes in the underlying code. :) | 22:05 | |
Radvendii | oh. i thought i'd heard that | 22:06 | |
jnthn | And no, you can't parameterize classes. | ||
Radvendii | dang :P | ||
jnthn | They have things in common, but plenty of things different too :) | ||
Radvendii | do i have to put a ';' at the end of a method declaration? | 22:07 | |
jnthn | not if there's a new line after the } | 22:08 | |
masak | wow, Regexp::Grammars has the new % syntax! | 22:09 | |
masak impressed | |||
Radvendii | jnthn: Weird.. this is probably just in the semantics, but when i try to access $a[0][1] (where $a is an object of the class), i get Proxy.new() | 22:12 | |
jnthn | Radvendii: Hm. Sounds like somewhere along the way some kind of double-wrapping is going on. | 22:14 | |
Radvendii | yeah, that's what i figured... | 22:15 | |
gist.github.com/1665643 is updated | |||
at-pos is the same as at_pos right? | 22:18 | ||
22:18
benabik left
22:19
benabik joined
22:21
alester left
|
|||
Radvendii | jnthn: is there a reason i can't manually call FETCH? | 22:23 | |
(on a proxy object) | |||
22:23
cognominal_ left
|
|||
Radvendii | never mind | 22:24 | |
i can | |||
jnthn | Radvendii: I think your method at_pos's want to be "is rw" | 22:25 | |
22:25
cognominal joined
|
|||
Radvendii | i hate it when my methods make unions and have demands and all that :P | 22:26 | |
that doesn't seem to help... | |||
bbkr1 | I have difficult question that I need to solve for JSON-RPC refactoring. How to recognize dispatch failure? For example my server was given handler class with method foo(Int,Str){…} while someone called server with foo("bar","baz"). Can I recognize that dispatch is not possible without calling foo? Maybe somehow through meta? | 22:27 | |
22:27
Trashlord left
|
|||
masak | 'night, #perl6 | 22:27 | |
Radvendii | masak: o/ | ||
bbkr1 | good night | ||
jnthn | bbkr1: Yeah, because Rakudo's MAIN implementation does it | 22:28 | |
22:28
renormalist joined
|
|||
jnthn | bbkr1: The .candidates_matching method in any Routine (sub or method) will do it | 22:29 | |
bbkr1 digs into spec | 22:30 | ||
22:35
dbr left
|
|||
Radvendii | jnthn: woah. | 22:36 | |
dalek | p/bs: 1d0b7f2 | jnthn++ | src/6model/sixmodelobject.h: Give STables a slot for marking them with an SC. |
||
p/bs: 8071678 | jnthn++ | src/6model/knowhow_bootstrapper.c: Mark STables created during bootstrap with the bootstrap SC also. |
|||
Radvendii | jnthn: if i try to assign to $a[0], it doesnt even call STORE | ||
it calls FETCH about 5 times, and then raises an error because i'm trying to assign to a non-container | 22:37 | ||
is there a problem with having multiple arguments to roles? | 22:38 | ||
like role MyAtPos[$s, $i] | |||
because my syntax hylighter goes screwy when i do that | |||
jnthn | Should be fine. | ||
22:38
fridim_ joined
|
|||
Radvendii | okay. it's probably just the highlighter | 22:39 | |
but still, why doesn't it call STORE? | |||
jnthn | Not sure - I thought you had that bit working. | ||
(the one level deep bit) | |||
Radvendii | i thought so too | ||
bbkr1 | jnthn: I've found Routine class in source code and read methods. But how can I get Routine object from class? | 22:40 | |
jnthn | bbkr1: Oh! | ||
bbkr1: TheClass.^find_method('foo') | |||
bbkr1: Can be on an object also | 22:41 | ||
Radvendii | Oh! it's because i was saying "say $a[0]=1;" | 22:42 | |
that's odd.. it should still be doing $a[0]=1 first, which would call STORE | 22:43 | ||
bbkr1 | rakudo: class Foo { method bar (Int, Str) {}}; my $method = Foo.^find_method("bar"); $method.candidates_matching.say # empty parcel. weird | 22:45 | |
p6eval | rakudo 4ffbd6: OUTPUT«» | ||
Radvendii | i don't understand why it's calling FETCH over and over again | 22:46 | |
and why 6 times? | |||
that's so arbitrary | |||
bbkr1 | rakudo: class Foo { method bar (Int, Str) {}}; my $method = Foo.^find_method("bar"); $method.candidates_matching(Foo, 1, "x").perl.say # yay, jnthn++, thanks! | 22:48 | |
p6eval | rakudo 4ffbd6: OUTPUT«(method bar(Foo , Int , Str , Mu %_!) { ... },)» | ||
jnthn | bbkr1: Well, you didn't pass in any arguments :) | ||
bbkr1: yes, like that | |||
Radvendii: It's not particularly surprising FETCH would be called multiple times. | |||
Radvendii | why? | ||
i'm just accessing it once | |||
jnthn | Radvendii: Proxy is a scalar container. Various bits of the runtime - as you pass the container around - will want to decontainerize it. | 22:49 | |
Radvendii | weird. but OK | ||
jnthn | Radvendii: For example, whenever they bind it to the symbol "self", they do so. | ||
Radvendii | so the first layer of at_pos is working | 22:50 | |
jnthn | OK, time for me to take some rest. | 22:54 | |
Radvendii | haha alright | ||
jnthn | 'night o/ | ||
Radvendii | goodnight o/ | ||
SO |O| O|Z | 22:56 | ||
oops | |||
did not mean to hit enter :P | |||
23:04
Radvendii left
23:12
fridim_ left
23:18
whiteknight joined
23:23
spine left
23:29
crashtest is now known as autark
23:31
tokuhirom joined
23:34
autark is now known as jaschob
23:35
jaschob is now known as autark
23:37
tokuhirom left
23:38
tokuhirom joined
23:50
nebuchadnezzar left
|
|||
sorear | good * #perl6 | 23:50 | |
TimToady: I do not understand very well how non-flattening is supposed to work | 23:54 | ||
moritz: on a candidate set, niecza only respects precedence for the proto | 23:55 | ||
23:56
nebuchadnezzar joined
|