»ö« 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. |
|||
00:08
awwaiid left
00:09
awwaiid joined
|
|||
dalek | ecza: eeed873 | sorear++ | docs/announce.v14: Finish writing up announce.v14 |
00:09 | |
01:04
Chillance left
01:28
trippeh_ left
|
|||
dalek | ast: 330bd62 | (Solomon Foster)++ | S02-magicals/env.t: Tweaks to avoid reams of "Use of uninitialized value in string context" errors. |
01:40 | |
01:41
whiteknight joined
01:44
aaaswwefff joined
01:51
aaaswwefff left
01:56
kfo_ left
01:57
kfo joined
|
|||
sorear | I try to reserve the word 'error' for situations where the computation stops | 02:00 | |
phenny: tell pmurias If you see this message before Monday, I'd like it if you could give a better description of your changes for announce.v14 | 02:01 | ||
phenny | sorear: I'll pass that on when pmurias is around. | ||
sorear | anyone else who wants to look at announce.v14, please go ahead | 02:03 | |
diakopter | sorear: Parameters like @foo and %foo now insist that their arguments to Positional and Associative respectively. missing a verb? | 02:04 | |
02:13
PZt left
|
|||
Yary | Hi all... I was hoping to initialize a "lazy" attribute using Rakudo but I seem to be doing it wrong- | 02:16 | |
rakudo: class B {has @.x; method new(Int $y) {self.bless(*);@.x <== (0..$y)}} | |||
p6eval | rakudo 9719f7: OUTPUT«===SORRY!===Sorry, do not know how to handle this case of a feed operator yet. at line 1, near " (0..$y)}}"» | ||
Yary | is there a way around that? | ||
dalek | ecza: 830a9ed | sorear++ | docs/announce.v14: Fix verb (diakopter) |
02:19 | |
sorear | Yary: keep it simple | ||
Yary: <== is a parallel processing operator, it is not "simple" by any stretch | |||
Yary | was just looking at the example in Iterators on initializing a range | 02:20 | |
s07 | |||
sorear | S07 is completely obsolete | ||
Yary | well my code will work with eager semantics, easily | 02:21 | |
so I can use | |||
sorear | <== has nothing to do with laziness anymore | 02:22 | |
Yary | rakudo: class B {has @.x; method new(Int $y) {self.bless(*, x=> (0..$y)}} | ||
p6eval | rakudo 9719f7: OUTPUT«===SORRY!===Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 2» | ||
Yary | typo | ||
sorear | <== is the opposite of lazy, it will start extra threads to fill your array | ||
Yary | rakudo: class B {has @.x; method new(Int $y) {self.bless(*, x=> (0..$y))}} | ||
p6eval | rakudo 9719f7: ( no output ) | ||
Yary | any pointers for up-to-date lazy/eager docs? | ||
rakudo: class B {has @.x; method new(Int $y) {self.bless(*, x=> (0..$y))}}; my $b=B.new(3);say $b.x | 02:23 | ||
p6eval | rakudo 9719f7: OUTPUT«0 1 2 3» | ||
02:25
ponbiki joined
02:27
birdwindupbird joined
|
|||
[Coke] | # 01/29/2012 - niecza at 99.52% | 02:31 | |
b: say 19548 - 19456 | |||
p6eval | b 1b7dd1: OUTPUT«92» | ||
02:32
birdwindupbird left
|
|||
sorear | [Coke]: do you have a breakdown by synopsis for that? is rakudo gaining or niecza losing? | 02:37 | |
Yary: no | |||
[Coke] | I don't keep the synopsis breakdown. | ||
I have the latest numbers and can plug them into the google spreadsheet. lemme do that. | |||
Updated: docs.google.com/spreadsheet/ccc?ke...URFM1A0cHc | 02:42 | ||
rakudo's biggest lead is in S12. | |||
(Objects) | 02:43 | ||
colomon | it's all the metaprogramming and introspection | ||
[Coke] | niecza is leading in S32, even without Temporal. | ||
colomon | that's just the FatRat tests. :) | ||
Yary | I like s07, 0 vs 0, I'll have to remember to take that one with a grain of salt for now | 02:47 | |
TimToady | sorear: it still sez v13 on the first line | 02:48 | |
[Coke] | TimToady: good catch. ;) | 02:51 | |
02:53
ponbiki left
|
|||
dalek | ecza: ff52ee4 | sorear++ | docs/announce.v14: s/13/14/ TimToady++ |
02:56 | |
02:56
ponbiki joined
03:00
whiteknight left
03:06
skids left
|
|||
colomon | Dang, that is an utterly insane list of niecza progress in the last month. | 03:08 | |
03:19
orafu left,
orafu joined
|
|||
TimToady | hmm, not a criticism of the document, but infix operators returning Bool should default to iffy, and ones where the returned type is different from the left argument should default to diffy | 03:19 | |
03:32
kmwallio joined
03:44
wolfman2000 joined
|
|||
wolfman2000 | masak: you awake? | 03:47 | |
03:48
kmwallio left
|
|||
Yary | Hello again, world, basic question- how do I override my class' stringification & numification? | 03:49 | |
or more accurately, change how objects in that class stringify/numify? | 03:53 | ||
TimToady | wolfman2000: doubtful, he's in Sweden | 03:54 | |
wolfman2000 | right, I forgot that. | ||
I was hoping to see what updates were made to his web framework that I recall he was working on. | 03:55 | ||
TimToady | Yary: typically we've just defined Str or Num methods, though we might generalize that at some point | 04:02 | |
Yary | OK I'll try that, thanks | ||
TimToady | they should probably be submethods, as should .perl and .gist unless you're willing to speak for subclasses as well | ||
04:05
lutok joined
04:09
Radvendii left
04:11
lutok left
04:36
Trashlord left
04:37
birdwindupbird joined
|
|||
moritz | \o | 04:38 | |
offby1 | _/o | ||
sorear | \o | 04:41 | |
04:51
Trashlord joined
|
|||
eviltwin_b | /o\ | 05:03 | |
offby1 pours rubbish on eviltwin_b, since he's already taken cover | 05:07 | ||
05:11
ponbiki left
05:57
alvis left
06:00
shinobicl_ left
06:12
alvis joined
06:14
kaleem joined
06:22
lestrrat left
06:23
lestrrat joined
06:27
PZt joined
06:33
xinming left
06:54
xinming joined
06:59
wtw joined
07:01
zby_home_ left
07:07
sftp joined
07:28
flussence left
07:29
flussence joined
07:35
passr joined,
am0c_ joined
|
|||
passr | perl6: say [!=] 1,2,3,1 | 07:35 | |
p6eval | rakudo 9719f7: OUTPUT«Bool::True» | ||
..niecza v13-381-g4158fa9: OUTPUT«Unhandled exception: assigning to readonly value at /tmp/fYOEjkWoSB line 0 (ANON @ 1)  at /home/p6eval/niecza/lib/CORE.setting line 2276 (reduceop @ 17)  at /tmp/fYOEjkWoSB line 1 (mainline @ 2)  at /home/p6eval/niecza/lib/CORE.setting line 3609 (… | |||
..pugs b927740: OUTPUT«1» | |||
07:35
am0c left
07:36
am0c_ is now known as am0c
|
|||
passr | hi perl6! why rakudo say true?say [!=] 1,2,3,1 | 07:37 | |
moritz | because it's the same as 1 != 2 != 3 != 1, which in turn in the same as (1 != 2) && (2 != 3) && (3 != 1) | 07:39 | |
which is True | |||
passr | moritz: If I want test all the numbers all diffrent, how to code? | 07:43 | |
moritz | passr: you could use a hash, for example | ||
rakudo: sub all_uniq(*@a) { my %h; for @a { return False if %h{$_}++ }; True }; say all_uniq(<1 2 3>), all_uniq(<1 2 3 1>) | 07:44 | ||
p6eval | rakudo 9719f7: OUTPUT«Bool::TrueBool::False» | ||
moritz | rakudo: sub all_uniq(*@a) { @a.uniq.elems == @a.elems}; say all_uniq(<1 2 3>), all_uniq(<1 2 3 1>) | ||
p6eval | rakudo 9719f7: OUTPUT«Bool::TrueBool::False» | ||
passr | moritz:thanks! | 07:45 | |
moritz | rakudo: sub all_uniq(*@a) { so all(@a) == one(@a) }; say all_uniq(<1 2 3>), all_uniq(<1 2 3 1>) | ||
p6eval | rakudo 9719f7: OUTPUT«Bool::TrueBool::False» | ||
Timbus | i like that last one | 07:53 | |
its the solution i would have came up with, but at the same time, wouldn't have known how to do it | 07:55 | ||
sorear | welcome, passr | 08:11 | |
passr | sorear:hi~ | 08:12 | |
08:24
snearch joined
|
|||
passr | rakudo: say ([1,2,3],[1,2,2],[4,5,6]).grep: {so all @$_ == one @$_} | 08:27 | |
p6eval | rakudo 9719f7: OUTPUT«1 2 3» | ||
moritz | hrmpf | 08:28 | |
uses hashes then :-) | |||
passr | moritz: something wrong? | 08:29 | |
masak | mornink, #perl6 | 08:33 | |
passr: useless use of 'so' | |||
passr | moritz: thanks! | 08:34 | |
masak | it makes sense in the all_uniq sub, not so much in the grep, which already boolifies for you. | ||
08:34
mj41 joined
|
|||
moritz | shouldn't that have also returned [4, 5, 6] ? | 08:35 | |
passr | but no output? | 08:36 | |
Timbus | nom: say all @$_ == one @$_ for ([1,2,3]) | 08:37 | |
p6eval | nom 9719f7: OUTPUT«all(one(Bool::False, Bool::False, Bool::True))» | ||
Timbus | got intified | ||
08:40
TimToady left,
daxim joined
08:41
TimToady joined
|
|||
Timbus | does one() not work on arrays or something or | 08:41 | |
08:41
mj41 left
|
|||
passr | maybe? | 08:42 | |
masak | nom: say all @$_ for [1, 2, 3] | ||
p6eval | nom 9719f7: OUTPUT«all(1, 2, 3)» | ||
masak | nom: say one @$_ for [1, 2, 3] | ||
p6eval | nom 9719f7: OUTPUT«one(1, 2, 3)» | ||
masak | nom: say all([1,2,3]) == one([1,2,3]) | 08:43 | |
p6eval | nom 9719f7: OUTPUT«all(one(Bool::True))» | ||
masak | nom: say all(1,2,3) == one(1,2,3) | ||
p6eval | nom 9719f7: OUTPUT«all(one(Bool::True, Bool::False, Bool::False), one(Bool::False, Bool::True, Bool::False), one(Bool::False, Bool::False, Bool::True))» | ||
masak | nom: say all([1,2,3].list) == one([1,2,3].list) | 08:44 | |
p6eval | nom 9719f7: OUTPUT«all(one(Bool::True, Bool::False, Bool::False), one(Bool::False, Bool::True, Bool::False), one(Bool::False, Bool::False, Bool::True))» | ||
Timbus holds his head and walks away | |||
08:44
daemon left
|
|||
masak | that, believe it or not, is the correct response to anything junction-y. | 08:44 | |
Timbus | yes but | ||
masak | use them below the headache threshold :) | ||
08:45
cosimo left
|
|||
Timbus | nom: say all @$_ == one @$_ given [1,2,3] | 08:45 | |
p6eval | nom 9719f7: OUTPUT«all(one(Bool::False, Bool::False, Bool::True))» | ||
Timbus | whats up with that | ||
better shown | |||
masak | nom: say all(@$_) == one(@$_) given [1,2,3] | ||
p6eval | nom 9719f7: OUTPUT«all(one(Bool::True, Bool::False, Bool::False), one(Bool::False, Bool::True, Bool::False), one(Bool::False, Bool::False, Bool::True))» | ||
masak | Timbus: precedence. | ||
Timbus | nom: say all @$_ == one @$_ given [9,3,6] | ||
p6eval | nom 9719f7: OUTPUT«all(one(Bool::False, Bool::True, Bool::False))» | ||
Timbus | oh | 08:46 | |
masak | Timbus: 'all' is a listop, so it eats '@$_ == one @$_' | ||
case closed. :) | |||
use parens. | |||
08:46
cosimo joined
|
|||
Timbus | arg | 08:46 | |
masak .oo( use parens for you arg ) | 08:47 | ||
your* | |||
sorear | all(@$_) perhaps better written .all | ||
08:48
daemon joined
|
|||
Timbus | i blame passr for everything that just happened :I | 08:48 | |
masak | :D | ||
passr | Thanks!Timbus,masak. | ||
sorear -> sleep | |||
passr | masak: can you write any shorter code than that? | 08:53 | |
masak | nom: say .all == .one given [1, 2, 3] | 08:54 | |
p6eval | nom 9719f7: OUTPUT«all(one(Bool::True, Bool::False, Bool::False), one(Bool::False, Bool::True, Bool::False), one(Bool::False, Bool::False, Bool::True))» | ||
masak | nom: say so .all == .one given [1, 2, 3] | ||
p6eval | nom 9719f7: OUTPUT«Bool::True» | ||
masak | by sorear++'s suggestion. | 08:55 | |
passr | wow! | ||
08:55
lestrrat left,
lestrrat joined
08:57
mj41 joined
|
|||
moritz | nom: say so .all == .one given [1, 2, 4, 1] | 09:13 | |
p6eval | nom 9719f7: OUTPUT«Bool::False» | ||
passr | masak: how to write it shorter.about this code: my @a = ^4; my @b = @a X~ @a X~ @a X~ @a | ||
masak | niecza: my @a = ^4; @a = @a X~ @a for ^2; say @a | 09:17 | |
p6eval | niecza v13-381-g4158fa9: OUTPUT«0000 0001 0002 0003 0010 0011 0012 0013 0020 0021 0022 0023 0030 0031 0032 0033 0100 0101 0102 0103 0110 0111 0112 0113 0120 0121 0122 0123 0130 0131 0132 0133 0200 0201 0202 0203 0210 0211 0212 0213 0220 0221 0222 0223 0230 0231 0232 0233 0300 0301 0302 … | ||
masak | niecza: my @a = ^4; @a X~= @a for ^2; say @a | 09:18 | |
p6eval | niecza v13-381-g4158fa9: OUTPUT«0012300123100123100123232001231001231001232320012310012310012323330012310012310012323200123100123100123232001231001231001232333001231001231001232320012310012310012323200123100123100123233 1001231001232300123001231001231001232320012310012310012323200123100… | ||
09:18
takesako joined
|
|||
masak | niecza: my @a = ^4; @a [X~]= @a for ^2; say @a | 09:18 | |
p6eval | niecza v13-381-g4158fa9: OUTPUT«0000 0001 0002 0003 0010 0011 0012 0013 0020 0021 0022 0023 0030 0031 0032 0033 0100 0101 0102 0103 0110 0111 0112 0113 0120 0121 0122 0123 0130 0131 0132 0133 0200 0201 0202 0203 0210 0211 0212 0213 0220 0221 0222 0223 0230 0231 0232 0233 0300 0301 0302 … | ||
daxim | d.hatena.ne.jp/tokuhirom/20120130/1327912149 | 09:19 | |
jnthn | morning, #perl6 | ||
masak | niecza: my @a = (@a = ^4) X~ @a; say @a | ||
p6eval | niecza v13-381-g4158fa9: OUTPUT«00 01 02 03 10 11 12 13 20 21 22 23 30 31 32 33» | ||
masak | niecza: my @a = (@a = ((@a = ^4) X~ @a) X~ @a); say @a | ||
p6eval | niecza v13-381-g4158fa9: OUTPUT«000 001 002 003 010 011 012 013 020 021 022 023 030 031 032 033 100 101 102 103 110 111 112 113 120 121 122 123 130 131 132 133 200 201 202 203 210 211 212 213 220 221 222 223 230 231 232 233 300 301 302 303 310 311 312 313 320 321 322 323 330 331 332 333… | ||
masak | niecza: my @a = ((@a = ((@a = ^4) X~ @a)) X~ @a); say @a | 09:20 | |
p6eval | niecza v13-381-g4158fa9: OUTPUT«0000 0001 0002 0003 0010 0011 0012 0013 0020 0021 0022 0023 0030 0031 0032 0033 0100 0101 0102 0103 0110 0111 0112 0113 0120 0121 0122 0123 0130 0131 0132 0133 0200 0201 0202 0203 0210 0211 0212 0213 0220 0221 0222 0223 0230 0231 0232 0233 0300 0301 0302 … | ||
09:22
dakkar joined
09:23
snearch left
|
|||
moritz | nom: print .base(4).fmt('%04s ') for ^(4**4) | 09:26 | |
p6eval | nom 9719f7: OUTPUT«0000 0001 0002 0003 0010 0011 0012 0013 0020 0021 0022 0023 0030 0031 0032 0033 0100 0101 0102 0103 0110 0111 0112 0113 0120 0121 0122 0123 0130 0131 0132 0133 0200 0201 0202 0203 0210 0211 0212 0213 0220 0221 0222 0223 0230 0231 0232 0233 0300 0301 0302 0303 0310 031… | ||
jnthn | :) | 09:27 | |
moritz | is that considered cheating? :-) | ||
masak | it's indistinguishable from the real solution :P | ||
tadzik | good morning! | 09:29 | |
moritz | o/ tadzik | 09:30 | |
jnthn | ...and easier to read. :) | ||
tadzik: Wow, tadzik *in the morning*! | |||
;) | |||
masak | (tadzik in the morning)++ | 09:31 | |
nom: say (.base(4) for ^256).fmt('%04s') | 09:32 | ||
p6eval | nom 9719f7: OUTPUT«0000 0001 0002 0003 0010 0011 0012 0013 0020 0021 0022 0023 0030 0031 0032 0033 0100 0101 0102 0103 0110 0111 0112 0113 0120 0121 0122 0123 0130 0131 0132 0133 0200 0201 0202 0203 0210 0211 0212 0213 0220 0221 0222 0223 0230 0231 0232 0233 0300 0301 0302 0303 0310 031… | ||
tadzik | Achievement unlocked! :) | ||
passr | Is it impossible use reduce operator? [ ] | 09:34 | |
moritz | I don't think so. | 09:35 | |
passr | it must be shortest,I think? | 09:36 | |
moritz | must it be? | ||
nom: say [X~] [^4] xx 4 | |||
p6eval | nom 9719f7: OUTPUT«0000 0001 0002 0003 0010 0011 0012 0013 0020 0021 0022 0023 0030 0031 0032 0033 0100 0101 0102 0103 0110 0111 0112 0113 0120 0121 0122 0123 0130 0131 0132 0133 0200 0201 0202 0203 0210 0211 0212 0213 0220 0221 0222 0223 0230 0231 0232 0233 0300 0301 0302 0303 0310 031… | ||
moritz | maybe :-) | ||
passr | I love it !! | 09:37 | |
moritz: That's all I need!Thanks! | 09:40 | ||
masak | moritz++ | 09:42 | |
passr | masak++ too | 09:44 | |
masak | nom: say [X~] ^4 xx 4 | ||
p6eval | nom 9719f7: OUTPUT«0123012301230123» | ||
masak | just had to try :) | ||
09:47
Psyche^ joined
09:48
Patterner left,
Psyche^ is now known as Patterner
|
|||
passr | masak:precedence? | 09:52 | |
masak | nom: say ^4 xx 4 | 09:53 | |
p6eval | nom 9719f7: OUTPUT«0 1 2 3 0 1 2 3 0 1 2 3 0 1 2 3» | ||
moritz | flattening, not precedence | ||
masak | passr: more like, without the array, you don't get X~ to cross four arrays against each other. | 09:54 | |
passr | thanks guys | 09:57 | |
Is it impossible use reduce operator? ([1,2,3],[1,2,2],[4,5,6]).grep: {so all(@$_) == one(@$_)} | 10:05 | ||
masak | useless use of 'so' again. | ||
moritz | passr: I don't think it's impossible. But I don't want to spoil your fun when you try to figure it out on your own | 10:06 | |
passr | :masak:thanks | 10:07 | |
moritz: Can you try to do that? | |||
Timbus | heh | ||
passr | o/ | 10:08 | |
moritz | passr: not spoil your fun? sure thing. | ||
10:09
am0c left
|
|||
passr | don't worry. moritz.i just want to find a shortest code for that.but I can't do that myself. | 10:10 | |
masak | sure you can! | ||
moritz | passr: why not? | ||
masak | but why are you so obsessed with short code? | ||
there are so many other things to optimize for. | 10:11 | ||
passr | I love short code | ||
masak | the ability to grok the code tomorrow, for example :) | ||
passr | moritz: If Ican do that ,I 'll not ask question here. | 10:14 | |
moritz | passr: it's not an either-or | 10:15 | |
passr: you can try, show us some partial successes, and then tell us why you can't get further | |||
passr: right now it juts feels like "golf that for me!", which is not the friendliest way to interact with us | 10:16 | ||
passr | moritz:I'll try | ||
masak | it's not unfriendly as such. just a bit lazy. :) | 10:17 | |
passr | masak:not lazy,but stupid. | 10:18 | |
masak: not so smart as you | 10:19 | ||
masak | passr: I refuse to believe that, since I know my brain from the inside :) | 10:20 | |
the trick isn't to be smart all the time. the trick is to notice when you have smart days, or smart afternoons, and do something cool then. :) | 10:21 | ||
I've been planning to put out a blog post saying "we're all stupid sometimes" | |||
passr | masak: You are my teacher | ||
masak | tools like RT and git and the test suite really help to even out the smart/stupid fluctuations. | ||
Timbus | another illegitimate student | ||
D: | 10:22 | ||
moritz | the trick is also not to think of yourself as being stupid, because you start to believe it, and feel discouraged to try | ||
masak | Timbus: I was thinking that -- "oh no, not again" :P | ||
moritz | the trick is also not to think of yourself as being smart, because it implies some hard-bounded limit that you can't bend | ||
which isn't the case | |||
masak | also, if you think you're smart, you might not be humble enough to learn when you need to. | 10:23 | |
moritz | the trick is to think yourself of exploring, because that's what you should do | ||
masak | development. it's an exploration. | ||
Timbus | the only time im smart is when im doing something fundamentally dumb :< | ||
see: my independent discovery of sleep sort rosettacode.org/wiki/Sorting_algori..._sort#Perl | |||
moritz | there have been interesting behavioral studies involving children who solved some tasks, and then one group was praised for being smart, and the other for working hard on the problem | 10:24 | |
the first group, when faced with a more difficult task, gave up much earlier, and thust performed worse | |||
Timbus | the "smart" children got a payrise, the "hard working" ones lobbied for one but didnt get it | 10:25 | |
passr | Timbus: I love it .but i can't understand that code at the first time | 10:26 | |
10:27
lestrrat left
10:28
lestrrat joined
10:32
lestrrat left
10:33
lestrrat joined
10:35
passr left
|
|||
masak | everybody, thank you so much for your p6cc solutions. | 10:37 | |
moritz | indeed. It is a joy to read, test and review | 10:38 | |
masak | moritz and I are having way too much fun analyzing them and comparing them. | ||
11:02
baest left
11:03
bloonix left
|
|||
flussence | perl6: [1..10].pick(*)».map: { sleep $_; say $_ } | 11:07 | |
p6eval | pugs b927740: OUTPUT«decodeUTF8': bad data: '\187'» | ||
..rakudo 9719f7, niecza v13-381-g4158fa9: OUTPUT«(timeout)8» | |||
flussence | heh, trying to be too clever :) | 11:08 | |
moritz | >> doesn't parallelize | ||
(yet) | |||
11:09
Trashlord left
11:10
Trashlord joined
|
|||
flussence | OTOH, maybe I've just invented threaded bogosort... | 11:10 | |
11:42
icwiener joined
11:58
mupon joined
|
|||
mupon | nom: (1..10).map: { sleep $_; say $_ } | 11:59 | |
p6eval | nom 9719f7: ( no output ) | ||
mupon | it works | ||
12:00
mupon left
|
|||
flussence | .oO( methinks the audience missed the point... ) |
12:05 | |
jnthn was trying to work out what the point was | 12:09 | ||
Maybe it's something like: "hi! I don't understand that map is lazy!" | |||
Not sure if the "it works" was a statement of fact or satire ;) | 12:10 | ||
masak | I agree that it works. | 12:21 | |
12:22
fasad joined
|
|||
masak | just not the way the person might've expected. | 12:22 | |
but clearly, it's the expectations that were wrong. | |||
fasad | hi | 12:40 | |
masak | \o | 12:41 | |
fasad | so 'man perl6' says 'perl -v' should work just the same as 'perl6 --version' but for me it enters the REPL. Regression? or it never worked? | 12:43 | |
moritz | I think it worked back in the old (alpha) days | 12:44 | |
fasad | time to fix it? | 12:46 | |
masak submits rakudobug | |||
moritz | I hope you have the time to fix it :-) | ||
fasad | * fasad lowers his eyes | 12:47 | |
damn | |||
fasad lowers his eyes | |||
12:48
timotimo left
12:49
timotimo joined
|
|||
masak | fasad: it's probably easier than you think. | 12:50 | |
fasad | masak: ok, offhand, what skills do i need? | ||
masak | ability to read code. | 12:51 | |
knowledge of where the flags are defined. | |||
luck. | |||
moritz | (grep can help you, if you don't know where stuff happens) | ||
fasad | and masak+moritz's blessings :p | 12:52 | |
masak | command_eval in nqp/HLL/Compiler.pm seems to have something to do with it all. | 12:53 | |
but there ought to be some place where the flags are *set*. | |||
moritz | that's typically in some Compiler.pm | ||
jnthn | Either src/main.nqp or src/Perl6/Compiler.pm I suspect | 12:54 | |
moritz | so src/Perl6/Compiler.nqp | ||
or main.nqp | |||
jnthn | er, yes | ||
moritz | or nqp's NQP::Compiler | ||
or HLL::Compiler | |||
masak | see? it's easy! :) | 12:55 | |
fasad | LOL | ||
moritz | ... except that it's not so easy as it seems | 12:56 | |
because my initial tests seem to show that no single-letter versions of multi-letter options work | |||
12:59
rindolf joined
|
|||
rindolf | Hi all. I'm getting a compilation error with the latest Rakudo Star using Parrot-4.0.0. Is it a known issue? | 12:59 | |
moritz | rindolf: no, but that's not the parrot that rakudo recommends | 13:00 | |
rindolf | moritz: OK. | ||
moritz | rindolf: is there any reason for deviating from the recommendation? | ||
rindolf | moritz: well, I've been packaging the new parrot/Rakudo/etc. for Mageia Linux Cauldron. | 13:01 | |
moritz | rindolf: anyway, what's the error? | ||
rindolf | moritz: let me pastebot it. | ||
fasad | rindolf: welcome :p | ||
rindolf | moritz: here - paste.debian.net/154062/ | 13:02 | |
moritz | never seen that one | 13:04 | |
13:06
pomysl left,
pomysl joined,
pomysl left,
pomysl joined
|
|||
dalek | p: b23ee76 | moritz++ | src/HLL/Compiler.pm: fix -v short form of --version |
13:10 | |
moritz | fasad: now tell me if that patch really looks complicated to you | 13:11 | |
fasad | moritz: no it doesn't *look* complicated, but there is so much knowledge & experience behind it which fails to meet the eye... | 13:14 | |
moritz | fasad: not at all | ||
fasad: I just grepped for 'version' in HLL/Compiler.pm | |||
fasad: the only other knowledge I had was that %adverbs holds the command line options | |||
there aren't that many places mentioning 'version', and only one that does something conditionally on the presence of something version-y | 13:15 | ||
13:20
kaleem left,
mtk joined
|
|||
fasad | ok, so i'm inspired now. 'perl6 -h' also does not work. so may i request that no one fixes it, & i''l fix it within 24hrs ! (coz i have to understand some git basics, get a github account!, etc.) | 13:20 | |
*i'll | 13:21 | ||
moritz | fasad: +1 | ||
masak | ++fasad | 13:23 | |
go go go! :) | |||
fasad: learn.github.com/p/intro.html looks good for learning Git. | 13:24 | ||
fasad | masak: thanks. 'coz i need a crash course ! | 13:25 | |
13:27
rindolf left
|
|||
moritz | phenny: tell rindolf fwiw on my machine (debian stable), rakudo compiles fine on a recent parrot | 13:29 | |
phenny | moritz: I'll pass that on when rindolf is around. | ||
dalek | kudo/nom: d63e72d | moritz++ | src/ (2 files): more typed syntax errors |
13:36 | |
kudo/nom: 0683298 | moritz++ | src/ (2 files): more typed exceptions |
|||
p: cf6203f | moritz++ | tools/build/PARROT_REVISION: bump parrot revision to get some testing |
13:37 | ||
[Coke] | b: say 668-100 # rt-testneeded | 13:49 | |
p6eval | b 1b7dd1: OUTPUT«568» | ||
moritz | oh my, 100 testneeded again? | ||
jnthn | Dammit, I should stop fixing stuff :P | ||
[Coke] | rakudo: "foo" ~~ /<B::TOP>/ | 13:50 | |
p6eval | rakudo 9719f7: OUTPUT«===SORRY!===Could not locate compile-time value for symbol B» | ||
jnthn | Hm, not a *bad* error, but would be better off saying that B is not predeclared or some such. | ||
Good we catch it at compile time, though :) | 13:51 | ||
[Coke] | jnthn: it's upgraded from "null PMC" | ||
RT #64366 if you really want a better error msg. ;) | |||
jnthn | [Coke]: Then it's a huge improvement. That means compile time error, includes the name of the thing that's wrong, and not a Null PMC error | ||
[Coke]: No, I'll take this as sufficient improvement to say the ticket is done | |||
[Coke] | so, 101 now. ;) | 13:52 | |
jnthn | moritz++ will probably make a pass through this stuff when doing typed exception things anyway. | ||
13:52
colomon left
|
|||
[Coke] | rakudo: class foo { has $!baz; method bar { my $!baz = 'lorem'; say $!baz; }; }; my $foo = foo.new; $foo.bar; | 13:53 | |
p6eval | rakudo 9719f7: OUTPUT«===SORRY!===Cannot use ! twigil on my variable at line 1, near " = 'lorem'"» | ||
moritz | jnthn: yes, but I still need some ideas how to throw typed exceptions from the MOP | ||
jnthn | moritz: Well, that one's from World. | ||
[Coke] | rakudo: class foo { method bar { my $!baz = 'lorem'; say $!baz; }; }; | ||
jnthn | moritz: But yes, you do. :) | 13:54 | |
p6eval | rakudo 9719f7: OUTPUT«===SORRY!===Cannot use ! twigil on my variable at line 1, near " = 'lorem'"» | ||
jnthn | std: class foo { method bar { my $!baz = 'lorem'; say $!baz; }; }; | ||
p6eval | std 48335fc: OUTPUT«ok 00:01 110m» | ||
jnthn | niecza: class foo { method bar { my $!baz = 'lorem'; say $!baz; }; }; | ||
[Coke] | rakudo: class foo { has $!baz = 'ipsum'; method bar { my $!baz = 'lorem';say $!baz; }; }; my $foo = foo.new; $foo.bar; | ||
fasad | what is the relationship between nqp & rakudo ? | ||
p6eval | niecza v13-381-g4158fa9: OUTPUT«===SORRY!===Unable to resolve method add_method in class Any at /tmp/ZYTyuEsibA line 1:------> class foo { method bar { my $!baz ⏏= 'lorem'; say $!baz; }; };Unhandled exception: Check failed at /home/p6eval/nie… | ||
rakudo 9719f7: OUTPUT«===SORRY!===Cannot use ! twigil on my variable at line 1, near " = 'lorem'"» | |||
moritz | rakudo: try eval q[class foo { method bar { my $!baz = 'lorem'; say $!baz; }; };]; say $!.WHAT | ||
p6eval | rakudo 9719f7: OUTPUT«Exception()» | ||
jnthn | niecza?! :) | ||
moritz | fasad: much of rakudo's code is written in nqp | 13:55 | |
jnthn | [Coke]: What ticket are you looking at for the my $!x decl, ooc? | ||
[Coke] | 69230 | ||
looks closable now. | |||
(no longer silently fails in some cases.) | |||
fasad | moritz: nqp is a compiler or a language? | 13:56 | |
moritz | fasad: nqp is a compiler for a subset of Perl 6 (and in that subset, much of rakudo is written) | ||
jnthn | [Coke]: Sounds good. I think Rakudo's response there is fine. | ||
[Coke] | std: std: 555 ~~!~~ 666 | 13:58 | |
p6eval | std 48335fc: OUTPUT«===SORRY!===Expecting a term, but found either infix ~~ or redundant prefix ~ (to suppress this message, please use space between ~ ~) at /tmp/sSDQhqr_KH line 1:------> std: 555 ~~!~~⏏ 666Parse failedFAILED 00:01 109m»… | ||
[Coke] | std: 555 ~~!~~ 666 | 13:59 | |
p6eval | std 48335fc: OUTPUT«===SORRY!===Expecting a term, but found either infix ~~ or redundant prefix ~ (to suppress this message, please use space between ~ ~) at /tmp/lT9_wQlZ86 line 1:------> 555 ~~!~~⏏ 666Parse failedFAILED 00:01 109m»… | ||
[Coke] | rakudo: 555 ~~!~~ 666 | ||
p6eval | rakudo 9719f7: ( no output ) | ||
fasad | moritz: oh, so nqp implemented some of Perl 6 features and using that primitive/incomplete set of features much of rakudo is written. correct? | ||
[Coke] | (RT#76436) | ||
jnthn | fasad: Yes | ||
fasad: Also, nqp is bootstrapped, which means it is written in itself and can compile itself. | |||
[Coke] | rakudo: use Test; eval_lives_ok '1<&1' | 14:00 | |
p6eval | rakudo 9719f7: OUTPUT«(timeout)» | ||
fasad thinks of oroboros | |||
[Coke] | O_o | ||
moritz | fasad: most C compilers are also written in C | 14:01 | |
PerlJam | fasad: this is perl, not python ;) | ||
fasad | PerlJam: sorry i'm not familiar with the python compiler | 14:02 | |
[Coke] | nom: gist.github.com/1704540 | ||
p6eval | nom 068329: OUTPUT«===SORRY!===Confusedat /tmp/yOdOLj5os1:1» | ||
moritz | [Coke]: looks like a newline slipped in so that line 4 isn't a comment | 14:03 | |
[Coke] | nom: gist.github.com/1704540 | ||
p6eval | nom 068329: OUTPUT«Not enough positional parameters passed; got 0 but expected at least 1 in sub-signature of parameter @x in sub infix:<merge> at /tmp/mYJTOtWcrz:1 in block <anon> at /tmp/mYJTOtWcrz:7 in <anon> at /tmp/mYJTOtWcrz:1» | ||
moritz | probably want $x? and $y? in the signature | ||
fasad | PerlJam: what's unique about python compiler? | 14:04 | |
*s/unique/different/ | |||
[Coke] | rakudo: END { say "OH HAI" }; die "oh noes" | ||
p6eval | rakudo 068329: OUTPUT«oh noes in block <anon> at /tmp/KMF2Dt0ZAK:1 in <anon> at /tmp/KMF2Dt0ZAK:1» | ||
dalek | ast: 31654a6 | moritz++ | S03-junctions/misc.t: RT #109188, junctions with the List type object |
||
ast: 2002a2f | moritz++ | S32-exceptions/misc.t: more typed exceptions |
|||
PerlJam | fasad: sorry, that was meant as humor. oroboros is a serpent eating its own tail. a python is a serpent. etc. | ||
[Coke] | moritz: that's for TimToady's script in RT#77474 | ||
(the gist) | 14:05 | ||
fasad | Perljam: oh! | ||
masak | PerlJam: oh! | ||
fasad is a flickering tubelight | |||
masak | henceforth, explain all obscure jokes :) | ||
[Coke] | rakudo: END { say "OH HAI" }; die "oh noes" | ||
p6eval | rakudo 068329: OUTPUT«oh noes in block <anon> at /tmp/iy3m4BMs6U:1 in <anon> at /tmp/iy3m4BMs6U:1» | ||
[Coke] | argh. | ||
PerlJam | I didn't realize it was that obscure :) | ||
masak | niecza: END { say "OH HAI" }; die "oh noes" | ||
p6eval | niecza v13-381-g4158fa9: OUTPUT«Unhandled exception: oh noes at /home/p6eval/niecza/lib/CORE.setting line 1347 (die @ 3)  at /tmp/2tAsrBgd0z line 1 (mainline @ 2)  at /home/p6eval/niecza/lib/CORE.setting line 3609 (ANON @ 3)  at /home/p6eval/niecza/lib/CORE.setting line 3610 (mo… | ||
[Coke] | rakudo: say ( { 1 + 1 }, { 2 + 2 } ).>>.() ; # RT#77670 | 14:06 | |
p6eval | rakudo 068329: OUTPUT«===SORRY!===Confusedat /tmp/SoxLivAO_Z:1» | ||
[Coke] | rakudo: my %h; %h<a> = 3; %h.nonexist | ||
p6eval | rakudo 068329: OUTPUT«Method 'nonexist' not found for invocant of class 'Hash' in block <anon> at /tmp/Eaa4YvK50_:1 in <anon> at /tmp/Eaa4YvK50_:1» | ||
jnthn | rakudo: say ( { 1 + 1 }, { 2 + 2 } )>>.() | 14:07 | |
p6eval | rakudo 068329: OUTPUT«2 4» | ||
jnthn | std: say ( { 1 + 1 }, { 2 + 2 } )>>.() | ||
p6eval | std 48335fc: OUTPUT«ok 00:01 111m» | ||
jnthn | std: say ( { 1 + 1 }, { 2 + 2 } ).>>.() | ||
p6eval | std 48335fc: OUTPUT«ok 00:01 111m» | ||
moritz | nom: gist.github.com/1704555 | ||
p6eval | nom 068329: OUTPUT«===SORRY!===Variable @y is not predeclared at line 2, near " };\nmulti "» | ||
moritz | nom: gist.github.com/1704555 | 14:08 | |
p6eval | nom 068329: OUTPUT«Ambiguous dispatch to multi 'infix:<merge>'. Ambiguous candidates had signatures::(, @y):(@x, ) in block <anon> at /tmp/73ZfGPG0we:9 in <anon> at /tmp/73ZfGPG0we:1» | ||
fasad | i have rakudo installed, so do i need to clone nqp too for my task & if yes, will it interfere with my rakudo installation ? | ||
[Coke] | jnthn: does your recent work make rt.perl.org/rt3/Ticket/Display.html?id=62244 closable? | ||
moritz | fasad: how did you install rakudo? via the git repo? | ||
fasad | moritz: yes. i have full rakudo source code. | 14:09 | |
moritz | fasad: then you already have a copy of nqp in the nqp/ dir | ||
fasad: cd nqp; git checkout master; git pull # now you're ready for hacking | |||
nom: gist.github.com/1704555 | |||
p6eval | nom 068329: OUTPUT«1» | 14:10 | |
jnthn | [Coke]: It's obsolete. The way we do NCI has changed, the way we do namespaces has changed, etc. | ||
[Coke]: Mention Zavolaj in the closing message, perhaps. | |||
"We have working NCI now, see ..." | |||
[Coke] | is zavolaj shipped with star? | 14:12 | |
moritz | star: use NativeCall; | 14:13 | |
p6eval | star 2012.01: ( no output ) | ||
jnthn | [Coke]: yes | ||
moritz | yes! | ||
[Coke]: I've responded to the hamming ticket | 14:14 | ||
jnthn | star: use NativeCall; sub fork() returns Int is native() { * }; say fork(); | 14:15 | |
p6eval | star 2012.01: OUTPUT«029346» | ||
fasad | moritz: so i have made the necesarry changes to the code. obviously i need to recompile rakudo with 'make install', right ? | ||
moritz | fasad: well, first you recompile nqp | ||
fasad: run 'make' | 14:16 | ||
in the nqp dir | |||
[Coke] | moritz++ jnthn++ | ||
jnthn | 'make install' in nqp dir | ||
masak | the new Hamming code... outputs '1'? | ||
PerlJam | jnthn: did you just show how to fork bomb the bot? | ||
masak | that can't be right :) | ||
14:16
kaleem joined
|
|||
moritz | PerlJam: no, it was not a loop | 14:16 | |
jnthn | PerlJam: No, that'd be like | ||
[Coke] | I suspect we have to harden safe with NativeCall in place. :P | 14:17 | |
PerlJam | moritz: that exercise is trivial :) | ||
[Coke]: indeed | |||
jnthn | stаr: use NativeCall; sub fork() returns Int is native() { * }; say fork() while 1; | ||
[Coke] | b: say 666-103; #rt | ||
p6eval | b 1b7dd1: OUTPUT«563» | ||
jnthn | ;-) | ||
dalek | ast: b09f2a9 | moritz++ | S05-metasyntax/angle-brackets.t: fix and unfudge RT #64464 tests |
14:18 | |
jnthn | .oO( oh fork() :-) ) |
14:19 | |
moritz | nom: say 'alive' | ||
p6eval | nom 068329: OUTPUT«alive» | ||
jnthn | .u stаr | ||
phenny | jnthn: U+0073 U+0074 U+0430 U+0072 | ||
jnthn | ;-) | ||
[Coke] | nom: our Str a | ||
p6eval | nom 068329: OUTPUT«===SORRY!===In "our" declaration, typename Str must be predeclared (or marked as declarative with :: prefix) at line 1, near " a"» | 14:20 | |
masak | std: our Str a | ||
p6eval | std 48335fc: OUTPUT«===SORRY!===Multiple prefix constraints not yet supported at /tmp/z5kimkhvrl line 1:------> our Str ⏏aMalformed our at /tmp/z5kimkhvrl line 1:------> our Str ⏏a expecting any of: multi_declarator typen… | ||
[Coke] | RT #76830 | ||
fasad | moritz: nqp 'make' & 'make install' done. next? | 14:22 | |
moritz | fasad: run ./nqp -h | 14:23 | |
fasad: see if that works | |||
fasad: if it does, go back to the rakudo dir, and run perl Configure.pl && make | |||
14:27
Yary_ joined
|
|||
moritz | nom: class A { my $!foo } | 14:27 | |
p6eval | nom 068329: OUTPUT«===SORRY!===Cannot use ! twigil on my variable at line 1, near " }"» | ||
14:31
Yary left
14:32
Yary_ is now known as Yary
|
|||
masak | S12 has example uses of 'my' and the ! twigil. | 14:32 | |
but you know that :) | |||
moritz | std: my $!foo; | ||
p6eval | std 48335fc: OUTPUT«ok 00:01 108m» | ||
moritz | fwiw I plan to test RT #69230 properly with a typed exception | 14:39 | |
14:39
PacoAir joined
14:42
Yary left
|
|||
jnthn | masak: Oh, that role private attribute thingy? | 14:46 | |
14:46
Yary joined
|
|||
PerlJam | jnthn: class attrs too | 14:47 | |
jnthn | PerlJam: There's no such thing as class attrs. | ||
my $.x; # a lexical and an accessor | |||
dalek | ast: 56d7207 | moritz++ | S12-enums/basic.t: RT #77982, spooky interactions between enums |
||
ast: 33e961e | moritz++ | S32-exceptions/misc.t: RT #69230, my $!foo |
|||
masak | right. | ||
that's what I meant. | |||
no, wait. | |||
jnthn | S12 may want some cleanup here | ||
masak | the spec mentions 'my %!something' too. | ||
jnthn | I mean, we *could* say that my $!x; is just a lexical. | ||
masak looks | |||
PerlJam | S12:776 | ||
moritz | but that would be very strange | ||
jnthn | But, why? That screws up your ability to read code and know what the scope of a $!foo thingy is. | ||
moritz | because the ! twigil means 'attribute' | ||
jnthn | Right. | 14:49 | |
moritz | \o/ first RT closed that is tested by typed exceptions | ||
jnthn | nah, "my $!foo" just makes no sense to me. | ||
masak | I can sort of see the symmetry in it. | ||
flussence | .oO( heh... calling fork() in a repl has some amusing side effects ) |
||
masak | you can do 'has $looknotwigil' too. | ||
moritz | no reason to mess it up even further | ||
fasad | moritz: perl Configure.pl && make done. next 'make install' ? | 14:50 | |
jnthn | masak: Yeah, I'm not entirely fond of that either, but can live with "sigilless = you figure it out, dear compiler" | ||
er | |||
twigilless | |||
masak | moritz: there will be people who think "class attribute" and expect "my $!twigilmeansnothing" to work. | 14:51 | |
PerlJam | masak: only if we prime them to expect that | ||
moritz | masak: that's why we'll have a good error message for them | 14:52 | |
PerlJam | moritz: so ... what's the answer to "class attributes"? :) | ||
an ordinary lexical? | |||
moritz | I think so | 14:53 | |
PerlJam | do they have to create the accessor? | ||
14:53
Yary left
|
|||
masak | yes, an ordinary lexical. | 14:53 | |
'my @.classattr' creates the accessor. | |||
it's because we allow the dot that allowing the bang makes sense. | |||
14:53
am0c joined
|
|||
masak | it's just filling out the table with sensible defaults. | 14:53 | |
I oppose changing the status quo. | 14:54 | ||
moritz | well | ||
let's look at what the twigil mean: | |||
jnthn | masak: The status quo is an error saying don't do that. :) | ||
moritz | . make me an accessor | ||
! attribute | |||
(no twigil) let the compiler figure it out | 14:55 | ||
from that table, I don't see how 'my $.foo' implies we should allow 'my $!foo' | |||
dalek | ast: 15c94ed | moritz++ | S12-attributes/instance.t: RT #108670, accessor name clash |
14:56 | |
kudo/nom: 5fcfed5 | moritz++ | src/Perl6/Actions.pm: fix thinko |
|||
kudo/nom: cb00ad1 | moritz++ | src/ (2 files): typed exceptions for "my $!foo" |
|||
masak | it's because you made the table up as you think it is, not how I see it :) | ||
. make me an accessor | |||
! no accessor | |||
(no twigil) I don't know or don't care about attributes | 14:57 | ||
moritz | my $x; # no accessor either | 14:58 | |
class A { has $.x; method foo() { $!x # look, I can use that, even though it means "no accessor", and we have an accessor | |||
fasad | moritz: 'perl6 -h' now works for me. next? | ||
moritz | fasad: go back to nqp, and commit your changes | ||
git add src/HLL/Compiler.pm | 14:59 | ||
git commit -m 'fix -h option' | |||
fasad: and tell me your github ID | |||
fasad | moritz: Siddhant | 15:00 | |
^my github ID | |||
15:00
icwiener left
|
|||
moritz | fasad: you now have commit access | 15:00 | |
so once you've committed your stuff, do a git push | 15:01 | ||
masak | moritz: sure, it means "no accessor" if you did "has $foo". if you did "my $foo" it even means "no attribute" :) | 15:02 | |
fasad | moritz: from the rakudo dir or nqp ? | ||
moritz | fasad: nqp | ||
masak: well, if, you think '! means attribute', you don't have to do that distinction in the first place | 15:03 | ||
masak: ie it gives you a more consistent picture which doesn't need further distinctinos | |||
PerlJam | And if you guys can't agree on how to think about it, imagine the newbie Perl 6 programmer's quandry! | ||
moritz | now apply ocaml's razor... erm, whatever it's called... :-) | ||
PerlJam: well, she'll read the version of whoever last edited the UP6 chapter :-) | 15:04 | ||
PerlJam | heh | ||
fasad | moritz: i get "fatal: remote error: You can't push to git://github.com/perl6/nqp.git Use [email@hidden.address] | 15:05 | |
moritz | fasad: then edit the .git/config files, substituting git://github.com/perl6/nqp.git by [email@hidden.address] | ||
fasad: and then try again to git push | 15:07 | ||
masak | PerlJam: moritz argues out of orthogonality. I'm arguing out of DWIM. | ||
PerlJam: there's not really a right or wrong here. just whether to be strict or permissive. | 15:08 | ||
moritz | well, not just orthogonality, but also readability | ||
flussence | `git remote set-url --push origin [email@hidden.address] should work too | ||
moritz | ie if you can safely make the connection ! => attribute | ||
masak | people who think they'll get class attributes can still do that. | 15:09 | |
I don't see the problem. | |||
15:09
birdwindupbird left
|
|||
moritz | or git config remote.origin.pushurl [email@hidden.address] | 15:09 | |
masak | people who know that class attributes don't exist will be surprised the variable is shared between instances, but if they're surprised at that, they haven't understood the class anyway. | ||
and will need to read source anyway. | 15:10 | ||
PerlJam | in any case, the spec needs updating I think. | ||
masak | I agree it's not clear enough. | 15:12 | |
moritz: the 'safely make the connection ! => attribute' argument would be much stronger if it weren't for 'has $sans_twigil' | 15:13 | ||
moritz | masak: no, that only influences the opposite direction | 15:14 | |
but I won't shed a tear if we'd abolish that one too | |||
15:14
phenny left
|
|||
PerlJam | me either | 15:14 | |
masak | I'm fine with shedding both, yes. | 15:15 | |
but I'm not sure everyone is. | |||
15:15
kaare_ joined
15:16
phenny joined
|
|||
fasad | moritz: on 'git push' i'm getting 'Permission denied (publickey).' | 15:16 | |
jnthn | A case for has $sans_twigil; is that iirc the Perl 5 MOP work will have things that look that way | ||
moritz | fasad: have you told github about your public ssh key? | ||
PerlJam | jnthn: sounds weak | 15:17 | |
(this is Perl *6* after all ;) | |||
masak | fasad: help.github.com/linux-set-up-git/ | ||
jnthn | PerlJam: Yeah, it's not a strong argument, just an existing one :) | ||
masak | another case for 'has $sans_twigil': some people hate twigils. | 15:18 | |
[Coke] brings up perl6.org in IE5.5 | |||
masak | this will be a kind of safety valve for them. | ||
dalek | ast: 5514f34 | moritz++ | S04-statements/given.t: RT #99912, regex in when-block failed to set $/ |
15:22 | |
moritz | that kinda fails to impress me too | ||
we don't have a safety valve for those who hate curlies | |||
and it's much harder to program in Perl 6 without curlies than without private attributes :-) | 15:23 | ||
15:25
baest joined
|
|||
masak | if everyone else is fine with removing all('has $sans_twigil', 'my $!fake_twigil'), I am too. | 15:27 | |
but not just one of them. | |||
15:27
pothos left
|
|||
moritz | +2 then :-) | 15:27 | |
erm, -2 | |||
you know what I mean :-) | |||
15:27
pothos joined
|
|||
masak | :P | 15:28 | |
dalek | ast: c0c67ef | moritz++ | S02-literals/misc-interpolation.t: RT #104594, lexicals in blocks in double-quoted strings |
15:30 | |
p: e6c8684 | (Siddhant Saraf)++ | src/HLL/Compiler.pm: fix -h short form of --help |
|||
moritz | fasad++ | 15:31 | |
down to 97 testneeded tickets | |||
masak | fasad++ | ||
fasad | * pops open a champagne and pours out to everyone in #perl6 | 15:32 | |
Cheers ! | |||
felher | If i want to specify: 'everything that is matched by <all-words> but not by <bad-words>', is "regex good-words { <!bad-words> <all-words>" in a | ||
fasad pops open a champagne and pours out to everyone in #perl6 | |||
felher | * the way to go? | ||
masak | er. | ||
could you repeat that so that it makes sense? :) | 15:33 | ||
felher | If i want to specify: 'everything that is matched by <all-words> but not by <bad-words>', is "regex good-words { <!bad-words> <all-words> | ||
Damn it. | |||
felher brb | |||
masak | felher: it sounds like you need a negative lookahead or something. | ||
or maybe '$string ~~ /<@good-words>/ && $string !~~ /<@bad-words>/' | 15:34 | ||
moritz | <!bad-words> is a negative look-ahead | ||
jnthn | fasad++ # contributing to Rakudo :) | ||
felher is back with a new x-server. | 15:35 | ||
moritz,masak: thnx. so if i need a negative-lookahead and <!bad-words> is one, i'll use that :) | |||
masak | <!before <bad-words>> is another. | 15:36 | |
I'm not really sure what the difference is. | |||
jnthn | The latter burns more CPU cycles :P | ||
fasad | jnthn: :) this was my first ever code contribution to any open source project. Which was your first? | ||
moritz | felher: but what you want often has many nasty edge cases, dependent on what exactly you want | ||
jnthn | fasad: Fixing some Win32 build bug in Parrot, I think. :) | ||
moritz | for example you should anchor stuff with word boundary | 15:37 | |
felher | moritz: yep, thnx :) | 15:38 | |
fasad | moritz, masak: what was your first code contribution ever to an open source project ? | ||
*were | |||
masak | hm, good question. | 15:40 | |
might've been to Pugs, actually. but I'm not 100% sure. | |||
moritz | fasad: I'm not sure I remember. Either some p5 module, or pugs docs | ||
oh wait, code. then probably test cases for complex numbers for pugs | 15:41 | ||
fasad will always remember | |||
masak | moritz: I thought your first contribution was some web page fix. | 15:43 | |
to the Pugs project, I mean. | 15:44 | ||
wasn't that why you got a commitbit? | |||
moritz | masak: I just mentioned that a link was broken, but I didn't fix it | ||
masak | oh! | ||
flussence | come to think of it, perl6 is the first thing I remember contributing code for too... | ||
fasad | :) | 15:45 | |
moritz | around that time I also fixed some code in igal (a html gallery generator written in perl), and some stuff in a syntax hilighter | ||
can't say for sure which one was first | |||
15:47
wtw left
|
|||
fasad is reading Bootstrapping (compiler) on Wikipedia & trying to wrap his head around the concept :) | 15:48 | ||
masak | fasad: it's not so tricky. you write the compiler in such a way that it can compile its own source code. | 15:49 | |
first you compile it with something else. then you compile it with itself. | |||
that's all, really. | |||
fasad | yeah, but the first time you read it ... :) | 15:51 | |
but then you realize that that you were taught English in English, & things start making sense | 15:53 | ||
moritz | that's a nice way to look at it. | 15:54 | |
masak | yeah. it's a good thing brains are better at filling in the blanks than programs :) | ||
15:59
skids joined
16:01
lrnperl6 joined
|
|||
fasad | so en.wikipedia.org/wiki/Bootstrapping..._compilers does not list perl 6. Should it? | 16:02 | |
masak | Perl 6 is not a compiler. | 16:03 | |
it's a language specification. | |||
jnthn | decommute & | ||
masak | I guess both Rakudo and Niecza can be said to be partly self-hosting, but not fully. | 16:04 | |
well, maybe Niecza is at this point. | |||
moritz | nqp is self-hosting | 16:05 | |
fasad | actually the heading is a bt misleading, it should be 'List of >programming languages having< self-hosting compilers' | 16:06 | |
^^based on the content of the section | |||
PerlJam | "Languages that have self-hosting compilers" sure sounds like Perl 6 should be on that list | 16:07 | |
16:07
am0c left
|
|||
PerlJam | fasad: but, yeah, the title is all off | 16:07 | |
fasad is now fixing the wikipedia article | 16:08 | ||
16:10
GlitchMr joined
16:11
MayDaniel joined
|
|||
fasad | is perl 5 also self-hosting? #cause i've heard 'only perl can parse perl' | 16:12 | |
scratch that. perl's compiler is written in C, IIRC | |||
16:13
spine joined
|
|||
arnsholt | The Perl 5 compiler is written in C, yes | 16:13 | |
16:13
nsh left
|
|||
arnsholt | "Only perl can parse Perl" means that only perl (the program) can parse Perl (the language) | 16:14 | |
(Which is accomplished by deep magical sorcery, if you wondered =) | |||
PerlJam | though the magic has been bubbling closer to the surface lately. | 16:15 | |
skids wonders as to the meaning of "as" trait on a parameter as used in Rakudo src/core. Can't find "as" in spec except as a sub trait for inner return type specifier. | 16:16 | ||
16:16
MayDaniel left
|
|||
masak | Perl 6 is all about building the awesomeness from the ground up and then making it perform. Perl 5 is all about condensing the awesomeness from Unix mythology and then trying to make it extensible and less magical while not breaking backwards compatibility. :) | 16:17 | |
skids: "as" was de-spec'd and replaced by constructs such as Int(Any) | 16:18 | ||
flussence | "as" is gone? when'd that happen? | ||
(is it the as I'm thinking of?) | 16:19 | ||
masak | what "as" are you thinking of? :) | ||
flussence | the one in function signatures... | 16:20 | |
skids | masak: just the answer I was hoping for, since I was missing the Int(Num) feature... so I can use that until things congeal. masak++ | ||
flussence | ah, that one's still there. | ||
I think :/ | 16:21 | ||
skids | "sub A () as Int" is still there. | 16:22 | |
flussence | yeah, I can find that one... can't find "sub A ($a as Int)" | ||
masak | hm, yes. maybe "as" survives for return casting. | 16:23 | |
16:24
lrnperl6 left
16:25
kaleem left
|
|||
skids | That would apparently now be "sub A (Mu(Int) $a)" or somesuch. Though I'm not quite sure what Mu(Int) would acheive where Int(Mu) makes sense to me. | 16:26 | |
flussence | std: sub A(Int(Str) $b) { ... } | 16:27 | |
p6eval | std 48335fc: OUTPUT«Potential difficulties: $b is declared but not used at /tmp/g21e5TUidb line 1:------> sub A(Int(Str) ⏏$b) { ... }ok 00:01 111m» | ||
flussence | perl6: sub A(Int(Str) $b) { say $b.WHAT }; A(1); A("1"); | 16:28 | |
p6eval | niecza v13-381-g4158fa9: OUTPUT«Int()Unhandled exception: Nominal type check failed in binding $b in A; got Str, needed Int at /tmp/9me2s0mHyg line 0 (A @ 1)  at /tmp/9me2s0mHyg line 1 (mainline @ 3)  at /home/p6eval/niecza/lib/CORE.setting line 3609 (ANON @ 3)  at /home/p6eval… | ||
..pugs b927740: OUTPUT«***  Unexpected "Int" expecting word character, "|", ":", "*", parameter name or ")" at /tmp/5yh5OIv89L line 1, column 7» | |||
..rakudo cb00ad: OUTPUT«===SORRY!===Malformed block at line 1, near "(Int(Str) "» | |||
flussence | niecza's doing *something*, but I'm not sure what. | 16:29 | |
16:30
DarthGandalf left
16:34
DarthGandalf joined
16:47
fasad_ joined,
fasad left
|
|||
TimToady | perl6: my @elems = <1 2 3 1>; say @elems == set @elems; | 16:48 | |
p6eval | rakudo cb00ad: OUTPUT«===SORRY!===CHECK FAILED:Undefined routine '&set' called (line 1)» | ||
..pugs b927740: OUTPUT«*** No such subroutine: "&set" at /tmp/smunr20Bbi line 1, column 28-48» | |||
..niecza v13-381-g4158fa9: OUTPUT«Bool::False» | |||
TimToady | niecza++ | 16:49 | |
niecza: my @elems = <1 2 3 1>; say @elems == set @elems; | |||
p6eval | niecza v13-381-g4158fa9: OUTPUT«Bool::False» | ||
TimToady | niecza: my @elems = <1 2 3 4>; say @elems == set @elems; | ||
p6eval | niecza v13-381-g4158fa9: OUTPUT«Bool::True» | ||
TimToady | just checking :) | ||
eviltwin_b was just wondering about that :) | 16:50 | ||
TimToady | anyway, that's likely to be faster than almost anything else | 16:51 | |
16:52
mj41 left
|
|||
ashleydev | TimToady: why faster? | 16:56 | |
TimToady | only constructs one object, which is really a hash | 16:58 | |
and only uses it for its size | |||
at least, it's likely to be faster when set operations optimize away all the => True bits | 16:59 | ||
sorear | good * #perl6 | ||
TimToady | howdy | 17:00 | |
masak | sorear! \o/ | ||
TimToady | I'm getting really tired of seeing things like all(one(Bool::False, Bool::False, Bool::True)) | 17:01 | |
I'm not sure .gist should add the Bool | |||
after all, you'd think the "gist" would be shorter | |||
jnthn | nom: say True | 17:02 | |
p6eval | nom cb00ad: OUTPUT«Bool::True» | ||
TimToady | instead it *adds* meta info | ||
jnthn | Hm, should be trivial to fix. | ||
TimToady | nom: print True," | ||
p6eval | nom cb00ad: OUTPUT«===SORRY!===Confusedat /tmp/aJ1ejYtB4P:1» | ||
moritz | nom: say ~True | ||
TimToady | nom: print True,"\n"; | ||
p6eval | nom cb00ad: OUTPUT«True» | ||
TimToady | nom: print True.perl | ||
p6eval | nom cb00ad: OUTPUT«Bool::True» | ||
TimToady | I think maybe only that one should add the type | ||
it's a lot easier to understand all(one(False, False, True)) | 17:03 | ||
sorear | TimToady: pastie.org/3283332 ? | ||
jnthn | TimToady: Will make it happen. | 17:04 | |
TimToady | yes, that's what I am proposing | ||
sorear | shall I commit? | ||
or are you about to | |||
TimToady | お願いします! | 17:05 | |
masak decommutes | |||
sorear | dalek? | 17:07 | |
[Coke] | nom: say (22-1)/4 ; # averge numbers of submissions per not-me. | 17:08 | |
TimToady | had a long weekend, apparently | ||
p6eval | nom cb00ad: OUTPUT«5.25» | ||
sorear | I guess maybe it's blocking on email | ||
[Coke] | O_o | ||
jnthn | > say all(one(True, False), True) | 17:09 | |
all(one(True, False), True) | |||
:) | |||
17:09
wolfman2000 left
|
|||
TimToady | \o/ | 17:09 | |
sometimes we are very slow to see the obvious... | |||
[Coke] | nom: next say all for one time | 17:10 | |
p6eval | nom cb00ad: OUTPUT«all()» | ||
TimToady | nom: next | 17:11 | |
p6eval | nom cb00ad: OUTPUT«next without loop construct in block <anon> at /tmp/5NnTtLEWFM:1 in <anon> at /tmp/5NnTtLEWFM:1» | ||
17:11
fasad_ is now known as fasad
|
|||
TimToady | how does that not get the error in yours? | 17:11 | |
oh, there's a for, duh | |||
for one time { say Cool } | 17:12 | ||
perl6: for one time { say Cool } | |||
p6eval | pugs b927740: OUTPUT«*** No such subroutine: "&Cool" at /tmp/2K8M7nvC6J line 1, column 20-25» | ||
..rakudo cb00ad, niecza v13-381-g4158fa9: OUTPUT«Cool()» | |||
TimToady | we now have an official one-time loop :) | 17:13 | |
[Coke]++ | 17:14 | ||
jnthn gently pokes at dalek | |||
dalek | ecs: f4488b0 | sorear++ | S12-objects.pod: Change .gist on enums to not include the type Because .gist should be shorter, and the types are rarely needed. .perl stays as is, for disambiguation. |
||
17:15
colomon joined
|
|||
felher | jnthn: Oh, now that i see you. Does nom do backtracking into subrules yet? :) | 17:16 | |
jnthn | felher: Yeah, I fixed that just before the last compiler release | 17:17 | |
(So that compiler release has it, and the Star release from this weekend has it too) | |||
[Coke] | nom: for all time { say Cool} | 17:18 | |
p6eval | nom cb00ad: OUTPUT«Cool()» | ||
dalek | ast: 8d71270 | jnthn++ | S02-types/bool.t: Update Bool.gist tests. |
||
felher | jnthn++: Awesome! Thanks :) | ||
dalek | kudo/nom: 683a387 | jnthn++ | src/core/ (2 files): Enumerations should .gist to just the key, not including the full package name. |
17:19 | |
17:22
daxim left
17:27
timotimo left
|
|||
colomon | sorear: ping? | 17:28 | |
[Coke] | ooh, nclark doing ticket triage on perl6. | ||
sorear | colomon: pong | 17:29 | |
dalek | ecza: fb2bb1e | sorear++ | lib/CORE.setting: Enumerations should .gist to just the key, not including the full package name. |
||
sorear | Nicholas in #p5p -- funny he's not here | ||
release day! | 17:31 | ||
colomon | \o/ | 17:33 | |
sorear will, ahem, cheat and run a spectest on the p6eval box | 17:35 | ||
colomon: pong? | |||
colomon | sorear: I've been messing about with KeySet while waiting for the doctor this morning. I can see Hash is doing some sort of proxy thing, ideally I need to figure out how to overload it so that I can remove False things from the KeySet in an efficient fashion. | ||
17:36
kaleem joined
|
|||
dalek | kudo/nom: ef22e37 | jnthn++ | src/core/Str.pm: Forbid :8(non-Str-here), as per spec. |
17:38 | |
jnthn nudges testneeded back up by 1 again ;) | 17:39 | ||
Also found two tickets to close that were already fixed and tested. :) | |||
Guess I should get on with my slides for $dayjob-event now... | |||
sorear | or maybe I'll use feather instead, seems to be faster | 17:40 | |
17:46
Chillance joined
|
|||
[Coke] | Juerd++ #feather | 17:49 | |
jnthn++ moritz++ queue attrition | 17:50 | ||
Juerd | Also, feather as a secure sudo which is rare these days :) | 17:52 | |
[Coke] | nom: enum Boo <True False Meh>; say any(Bool::True,Boo::True) | ||
p6eval | nom 683a38: OUTPUT«any(True, True)» | ||
[Coke] | nom: enum Boo <True False Meh>; say any(Bool::True,Boo::True).perl | ||
p6eval | nom 683a38: OUTPUT«any(Bool::True, Boo::True)» | ||
17:52
GlitchMr left
17:58
dakkar left
|
|||
[Coke] | that's ok für gist? | 17:58 | |
sorear | I think so | 17:59 | |
17:59
alester joined
|
|||
[Coke] | hokay. | 18:00 | |
18:03
ksi joined
18:10
icwiener joined
|
|||
sorear | sweet, 'All tests successful' | 18:12 | |
*however* the bootstrap failed! | |||
colomon | all tests successful here as well. | ||
[Coke] | sorear: OOC, did you run with TEST_JOBS=n ? | 18:14 | |
18:15
supernovus joined
|
|||
dalek | kudo/nom: ce5ccae | moritz++ | tools/build/NQP_REVISION: bump NQP revision to get option handling and charclass fixes |
18:22 | |
sorear | [Coke]: no | 18:23 | |
fff. bootstrap is not cooperating at all | 18:24 | ||
looks like I won't get to the release until tonight, if at all :| | |||
18:24
kmwallio joined
|
|||
moritz | fwiw bumping the parrot revision seem to have helped with the setting build times | 18:25 | |
from ~16min down to about 4min for the .pm -> .pir step | |||
which is closer to what I remember from a while go | |||
tadzik | ooh | 18:27 | |
what did Parrot do? | |||
18:28
pmurias joined
|
|||
sorear | apparently I majorly broke something somewhere | 18:28 | |
pmurias! | |||
pmurias | sorear: hi | ||
phenny | pmurias: 28 Jan 00:07Z <colomon> tell pmurias gist.github.com/1691700 # p5test results | ||
pmurias: 02:01Z <sorear> tell pmurias If you see this message before Monday, I'd like it if you could give a better description of your changes for announce.v14 | 18:29 | ||
pmurias | pmurias: re release annoucement, the description of changes is perfect | ||
benabik | pmurias: Talking to yourself again? ;-) | 18:30 | |
pmurias | again? | ||
sorear: re release annoucement, the description of changes is perfect | |||
supernovus | Guh, tracking down grammar related bugs can be a pain. :p | ||
tadzik | do you know Grammar::Tracer yet? :) | 18:31 | |
pmurias | sorear: i'm currently studing for my (numerical analysis)-- exam, but i hope to get much more work done on the p5 interop after the exam | 18:32 | |
supernovus | Not yet. At this point, I'm willing to try anything. I just want to make Exemel work properly under nom. I don't remember having this many problems porting from alpha to ng, but given how long ago it was, I probably did ;-) | ||
tadzik | :) | ||
pmurias | sorear: did you read the use :from<perl5> messages? | 18:34 | |
supernovus | It can now parse <thing name="blah"/> just fine, and stores the attributes "name" => "blah". But if the element has content, such as <a href="woot">this</a> it parses it, but doesn't find the "href" => "woot" part. | ||
18:35
fasad left
|
|||
[Coke] | supernovus: you have any WIP on a branch? | 18:36 | |
moritz | tadzik: re what did parrot do, either they unbroke some earlier breakage, or maybe it was just my installation that was somehow busted | ||
supernovus | [Coke]: github.com/supernovus/exemel the master branch has my latest tests, and includes all the stuff I've done so far to get it to work with nom. | 18:38 | |
[Coke] | how do you test it? just "prove t/"? | ||
sorear | pmurias: yes | 18:39 | |
pmurias: I don't have a good answer | |||
supernovus | [Coke]: the t/03-query.t is the file I'm currently playing with. | ||
[Coke]: and I don't expect it to pass at the moment even if the grammar bug is tracked down, as I added some extra stuff to t/query.xml to test the bug more. I may pull out the extra stuff so that the file is in a state where it should pass if all the bugs were fixed. | 18:40 | ||
18:41
tjrandall joined,
tjrandall left
|
|||
pmurias | sorear: i'll propably try reimporting stuff from the module twice, as serializing arbitary perl5 modules seems too crazy | 18:41 | |
sorear | pmurias: I agree | 18:42 | |
sorear tries reverting the latest LTM changes | |||
supernovus | there query.t is now in its proper state again | ||
err, query.xml | |||
tadzik | btw, any comments on github.com/rakudo/rakudo/compare/n...prints-WHY ? | 18:45 | |
sorear | There is no way I am going to finish the release in the next ten minutes - tonight it is | 18:46 | |
[Coke] | nom: my %a = { $.idattr => 3 }; say %a.perl | 18:47 | |
p6eval | nom ef22e3: OUTPUT«Null PMC access in find_method('idattr') in block <anon> at /tmp/nLqcRL3iFS:1 in <anon> at /tmp/nLqcRL3iFS:1» | ||
[Coke] | masak, is there a ticket for that? | 18:48 | |
18:49
estrabd joined,
estrabd left
18:50
estrabd joined
|
|||
masak | [Coke]: no. | 18:51 | |
[Coke] | enjoy. ;) | 18:52 | |
supernovus: you are returning False and then trying to use it as a list, I tihnk. | |||
supernovus | [Coke]: I know that part. It should never get there. The test failing isn't the issue, the fact that the attributes are entirely missing is. :-) | 18:53 | |
[Coke] | do you have a smaller snippet than 03*.t that demonstrates the failure? | ||
supernovus | Sure, I'll write a quick snippet that will show exactly what's wrong. | 18:54 | |
[Coke] | If nothing else, we got another RT out of it. :P | ||
dalek | ecza: 74ba1ec | sorear++ | / (2 files): Revert "Ignore arguments to rules for LTM purposes" This reverts commit 6915253d906f76e33c0a292a3cb5129310da238e. Seems to break the bootstrap and I don't have time to study why just yet. |
||
ecza: 852f0ff | sorear++ | lib/Cursor.cs: Fix use of variables in propagation |
|||
sorear | bootstrap succeeded; will finish release in a few hours | 18:55 | |
supernovus | [Coke]: Okay, take a look at the newly added what-is-wrong.p6 in the main folder. | 18:59 | |
[Coke] | supernovus: gist.github.com/1705999 | 19:02 | |
the only difference I see between the 2 lines is the <?xml> prefix. | 19:03 | ||
supernovus | hmm, that's not the output I'm getting at all... | ||
[Coke] | but the comment makes me think I should be seeing something else. | ||
$ perl6 --version | 19:04 | ||
This is perl6 version 2012.01-45-g9719f7d built on parrot 3.11.0 revision RELEASE_3_11_0 | |||
supernovus | This is perl6 version 2012.01-43-g396f827 built on parrot 3.11.0 revision RELEASE_3_11_0 | ||
I will rebuild and see what happens. | |||
[Coke] | looks like mine is slightly newer. | ||
(mine's probably a day or 2 old at this point.) | 19:05 | ||
supernovus | Rebuilding from git to see if that helps. I last rebuilt 2 days ago. | 19:07 | |
masak submits [Coke]'s rakudobug | 19:08 | ||
nom: my %a = { $.idattr => 3 }; say "alive" | 19:11 | ||
p6eval | nom ce5cca: OUTPUT«Null PMC access in find_method('idattr') in block <anon> at /tmp/TfNWmA8_Lz:1 in <anon> at /tmp/TfNWmA8_Lz:1» | ||
masak | nom: class A { my %a = { $.idattr => 3 } }; say "alive" | ||
p6eval | nom ce5cca: OUTPUT«Null PMC access in find_method('idattr') in <anon> at /tmp/IjSkXH_snl:1 in block <anon> at /tmp/IjSkXH_snl:1 in <anon> at /tmp/IjSkXH_snl:1» | ||
masak | nom: my %a = { self.idattr => 3 }; say "alive" | ||
p6eval | nom ce5cca: OUTPUT«===SORRY!===Symbol 'self' not predeclared in <anonymous> (/tmp/g6qCPc4vDg:1)» | ||
masak | nom: class A { my %a = { self.idattr => 3 } }; say "alive" | ||
p6eval | nom ce5cca: OUTPUT«===SORRY!===Symbol 'self' not predeclared in <anonymous> (/tmp/XwlqA54gqp:1)» | ||
masak | nom: class A { method foo { my %a = { self.idattr => 3 } } }; say "alive" | ||
p6eval | nom ce5cca: OUTPUT«alive» | ||
masak | nom: say "before"; my %a = { self.idattr => 3 }; say "alive" | 19:12 | |
p6eval | nom ce5cca: OUTPUT«===SORRY!===Symbol 'self' not predeclared in <anonymous> (/tmp/0Sw1hpQTdv:1)» | ||
masak | nom: say "before"; my %a = { $.idattr => 3 }; say "alive" | ||
p6eval | nom ce5cca: OUTPUT«beforeNull PMC access in find_method('idattr') in block <anon> at /tmp/i4okZIdPp8:1 in <anon> at /tmp/i4okZIdPp8:1» | ||
masak | nom: class A { has $.idattr; my %a = { $.idattr => 3 } }; say "alive" | 19:14 | |
p6eval | nom ce5cca: OUTPUT«Null PMC access in find_method('idattr') in <anon> at /tmp/F_HeJ0RhYK:1 in block <anon> at /tmp/F_HeJ0RhYK:1 in <anon> at /tmp/F_HeJ0RhYK:1» | ||
TimToady | 'my $!classattr' makes much more sense when you think about 'trusts' and private accessors | ||
masak | ooh | 19:15 | |
moritz | so 'my' doesn't (just) declare a lexical in that case? | ||
jnthn | masak: We must have a ticket for that $.a in a place it ain't meant to be issue. | 19:16 | |
TimToady | anything with ! also gets a private accessor (which is not called when you just say $!foo) | ||
the private accessor is only for trusts-style calls | |||
jnthn | Oh, that idea lives on? | 19:17 | |
jnthn thought it'd been gotten rid of... | |||
That's mean that "has $!a; has @!a" is problematic as well as the . variants that we recently disallowed. | 19:18 | ||
dalek | ast: 6cfc6bd | moritz++ | S12-class/stubs.t: test for stubbed-but-not-filled-in class |
||
TimToady | how are you implementing $obj!THAT::CLASS::a then? | 19:19 | |
jnthn | TimToady: I'm not at the moment; if you want such an accessor you have to explicitly declare it. | 19:20 | |
TimToady: I'm still a little bothered about generating them all when they won't be used the majority of the time. I guess some lazy technique would do. | |||
TimToady | they don't need to be autogenerated unless you trust someone | ||
jnthn | True. | ||
TimToady: Would "has $!x" only generate an ro private accessor? | 19:21 | ||
TimToady: And "is rw" needed for a rw one? | |||
e.g. has $!x is rw; | |||
TimToady | I suspect all private accesses are born lvalues | 19:22 | |
jnthn | Another option would be not to generate accessors methods, but instead to spot the lack of one at compilation time and just compile it down to an attribute access. | ||
TimToady | otherwise we don't know the intended state of $!x when 'has $.x is rw' | ||
and it seems to me if you trust yourself to modify $!x, you trust others too | |||
jnthn | That is, $x!Foo::Bar::a would first look for a private method 'a', and failing one of those being in the private methods table, it'd consider whether there's an attribute. | 19:23 | |
TimToady | yes, private access is just a sub call really, and can be inlined | ||
jnthn | Yeah, we already optimize those somewhat in Rakudo | ||
We also detect missing privates at CHECK time | |||
I think | 19:24 | ||
TimToady omits pun on Unix | |||
jnthn | :P | ||
TimToady | or were you speakiing of deserters? | ||
jnthn | TimToady: Well, what I'm really getting at is, would we expect Foo.^methods(:private) to come back with a bunch of generated private accessors? | 19:25 | |
If yes, that probably means they have to be generated up front. If not, we can play tricks more easily. :) | |||
Though of course meta-objects can lie as much as they want too :) | |||
TimToady | ^methods could generate them lazily for all that :) | 19:26 | |
jnthn suspected that answer was coming... :) | |||
moritz | (test plan)++ # caught my accidental use of say() instead of is() | ||
dalek | ast: ecd8da2 | moritz++ | S02-types/hash.t: RT #77922, Hash.new |
19:27 | |
supernovus | Okay, now I am really confused. The output from [Coke]'s rakudo is entirely different than mine. I just used a fresh compile. gist.github.com/1706138 | ||
19:28
mdxi is now known as sboyette
|
|||
[Coke] | supernovus: your updated sample doc works for me still. | 19:28 | |
supernovus: did you install rakudo? | |||
supernovus | [Coke]: Yeah, it's installed. | 19:29 | |
[Coke] | I'm on feather, if that helps. | ||
supernovus | $ perl6 --version This is perl6 version 2012.01-52-gce5ccae built on parrot 4.0.0 revision RELEASE_4_0_0-85-g8a1265a | ||
jnthn | Where's the code for what-is-wrong.p6? | ||
jnthn can try it | |||
supernovus | jnthn: github.com/supernovus/exemel | ||
I am going to try it on another machine and see what happens. | 19:31 | ||
TimToady | and if you guys think 'has $x' is so terrible, I can only imagine what you'll think of: | 19:32 | |
std: class X { has \x = 42; method sayit { x.say } } | |||
p6eval | std 48335fc: OUTPUT«ok 00:01 109m» | ||
TimToady | :P | ||
dalek | ast: bddc607 | moritz++ | S12-attributes/instance.t: RT #74274, sneaking in access to private attributes through the back door |
19:33 | |
moritz | masak: ^^ one of your favorite bugs being close right now. | ||
[Coke] | TimToady: yah, I don't particularly like it. ;) | ||
19:33
birdwindupbird joined
|
|||
TimToady | std: class X { has \x is public = 42; method sayit { x.say } } | 19:33 | |
p6eval | std 48335fc: OUTPUT«===SORRY!===Term definition requires an initializer at /tmp/VuUWfstGP8 line 1:------> class X { has \x ⏏is public = 42; method sayit { x.say } }Confused at /tmp/VuUWfstGP8 line 1:------> class X { has \x ⏏is pub… | ||
TimToady | innersting | 19:34 | |
19:34
Trashlord left
|
|||
jnthn | supernovus: Here is output I get: gist.github.com/1706190 | 19:34 | |
supernovus | jnthn: So yours is like mine, in that the attributes magically vanish. | 19:36 | |
jnthn | Yeah. | ||
jnthn looks around for a pmichaud :) | 19:37 | ||
supernovus | Okay, I'm using Debian sid on the current testing box (which is actually a 32 bit VM running on virtualbox). How about jnthn and [Coke] ? | ||
jnthn | supernovus: It's certainly a bug. | 19:38 | |
supernovus: If you change | |||
rule element { | |||
to | |||
regex element { | |||
Then it captures properly. | |||
jnthn whines about the bstack cut logic | |||
dalek | ast: ba5ee93 | moritz++ | S06-traits/is-copy.t: RT #82810, ||= on an "is copy" array parameter |
19:39 | |
supernovus | Interesting. I'll try that and see what happens. Still doesn't explain why the bug doesn't show up on [Coke]'s computer. | 19:40 | |
jnthn | supernovus: No, I'm confused about that too | ||
TimToady | if the 'b' stands for backtracking, I'd point out that keeping backtracking info outside of cursors is fraught with peril; I much prefer the view that backtracking is simply throwing away unwanted cursors | 19:41 | |
jnthn | I'm running a 64-bit build on Windows | ||
TimToady: $!bstack is an attribute of Cursor, which contains marks. It works in conjunction with $!cstack, which is a stack of cursors, and those are thrown away during backtracking involving captures or subrules. | 19:42 | ||
supernovus | 64-bit Windows and 32-bit Linux are both showing the same bug. I'm going to try running this on 64-bit Linux and see what that does. | ||
[Coke] | if you're on feather, it's /home/coke/sandbox/perl6pass/rakudo/install/bin/perl6 | ||
(which is also a 32bit linux.) | 19:43 | ||
jnthn | TimToady: Or so far as I understand the design, anyway. ;-) | ||
[Coke] dunno what's up, either. | |||
19:44
GlitchMr joined
|
|||
supernovus | I don't know if I still have a feather account, it's been three lifetimes and several iterations of rakudo since I last logged in there :-) | 19:44 | |
19:44
twirp joined
|
|||
TimToady | ah, in that case, I'd say the problem is that the stack of cursors is getting out of sync with your control flow somehow; in STD-based grammars, this is managed by using lexically scoped lazy lists, so when you exit a scope it automatically trims the lazy lists that need to go away, and leaves the rest | 19:44 | |
jnthn | TimToady: It's something along those lines. It basically throws away cursors that it should not. | 19:45 | |
TimToady | well, I'm just guessing ignorantly, so take with eighteen grains of salt | ||
jnthn | :) | ||
Well, with a little luck pmichaud++ may have a tuit or two to look at in sometime soon :) | 19:46 | ||
*it | |||
19:46
Vlavv_ joined,
GlitchMr left
|
|||
TimToady | basically, the "cut" in a STD engine is the difference between the lazy lists you throw away, and the lazy list you return | 19:47 | |
supernovus | Well, none of novus@feather, supernovus@feather or huri@feather work, so I'm assuming I don't have an account on there anymore. | ||
TimToady | STD is basically emulating continuations with lazy lists of closures | 19:48 | |
masak | moritz: nice! | ||
19:49
Vlavv` left
19:51
kaleem left
19:52
pmurias_ joined
|
|||
jnthn | TimToady: Ah, that makes sense. | 19:52 | |
[Coke] checks. | |||
jnthn | OK, I really should stop peeking at that and do the $dayjob slides... :) | ||
[Coke] | supernovus: yah, don't see those. | ||
19:53
pmurias left
|
|||
supernovus | okay, changing "rule element" to "regex element" now has all the included tests passing. I can't guarantee it's perfect, as I'm sure the test coverage should be a heck of a lot more, but basic XML parsing, manipulation, querying and output is now ready for the newest rakudo :-) | 19:58 | |
masak | supernovus++ | 19:59 | |
supernovus | There, I updated the "State of modules on nom" list to show Exemel as working again. Next up DateTime::Utils. | 20:06 | |
jnthn | supernovus++ | ||
moritz | supernovus++ indeed | ||
[Coke] | supernovus++ | 20:09 | |
dalek | ast: 4808a9d | moritz++ | S05-metasyntax/charset.t: RT #89470, char classes with exclusions |
20:13 | |
moritz | jnthn: when you have some spare tuits, it would be very helpful for me if you could implement named arguments in nqp regexes (<.typed_panic: 'X::Malformed', what => "Block">). My attempts to wire up <LANG('MAIN', 'arglist')> for that task have failed :/ | 20:16 | |
tadzik | huh, nom compilation fails for me | ||
gist.github.com/1706413 | |||
moritz | tadzik: uhm | 20:17 | |
20:17
birdwindupbird left
|
|||
moritz | tadzik: SymbolTable has long been renamed to World | 20:17 | |
tadzik: something is very outdated in your nom (maybe the Makefile?) | 20:18 | ||
jnthn | moritz: In NQP, right? | ||
tadzik tries git clean -fdx | |||
moritz | jnthn: yes | ||
jnthn: I want to use it Grammar.pm | |||
jnthn | nom: grammar G { rule x(:$y) { { say $y } '' }; rule TOP { <x(y => 42)> } }; G.parse('') | 20:19 | |
p6eval | nom ce5cca: OUTPUT«Too many positional parameters passed; got 2 but expected 1 in regex x at /tmp/rY6d3MZgc7:1 in regex TOP at /tmp/rY6d3MZgc7:1 in method parse at src/gen/CORE.setting:7642 in block <anon> at /tmp/rY6d3MZgc7:1 in <anon> at /tmp/rY6d3MZgc7:1» | ||
jnthn | Hm, needs doing there too | ||
20:19
birdwindupbird joined
|
|||
moritz | I thought it worked in nom.. | 20:20 | |
20:20
icwiener left
|
|||
moritz | nom: grammar G { method x(:$y) { say $y }; rule TOP { <x: y => 42> } }. G.parse('') | 20:20 | |
p6eval | nom ce5cca: OUTPUT«===SORRY!===Confusedat /tmp/FdxsaWZFZf:1» | ||
tadzik | argh, I'm on rakudo/master :/ | 20:23 | |
moritz | didn't we mean to delete that branch? | 20:24 | |
tadzik | I don't think it matters when you do 'g co master' | ||
and then 'git pull' appears to be up-to-date | |||
moritz deletes the branch | |||
tadzik: then delete it locally too | |||
git branch -D master | |||
tadzik | I will | 20:25 | |
flussence | 'git remote prune origin' is a good idea to run once in a while too :) | ||
jnthn | .u ௐ | 20:26 | |
phenny | U+0BD0 TAMIL OM (ௐ) | ||
masak | I love seeing RT tickets get closed. | 20:27 | |
moritz | there's just a wee problem; I tend to write tests for those tickets that seem sensible and not too hard to test for | 20:28 | |
jnthn | .u ഇ | 20:29 | |
phenny | U+0D07 MALAYALAM LETTER I (ഇ) | ||
20:29
jaldhar left
|
|||
moritz | so over time the 'testneeded' tag accumulates a bunch of weird tickets | 20:29 | |
which makes it not much fun to attack | |||
skids tries to wrap head around S14:516 | 20:33 | ||
All the example have role Foo[Bar] but then we have Array[Bar] whichis a class, not a role... | 20:34 | ||
20:36
nwc10 joined
|
|||
TimToady | we can have punned roles as classes; in this case it would presumably override the default pun of Array[Any] | 20:37 | |
though we still need to detangle the 'of' type from the default value | 20:39 | ||
skids | Ah, so Array is supposed to be a punned class? | ||
erm, punned role as a class. | |||
jnthn | Well, Foo[Bar] in Rakudo desugars to Foo.^parameterize(Bar) and the meta-class can do what it wants. | ||
TimToady | the Array role would presumably be a slightly more concrete version of Positional | 20:40 | |
where Array assumes mutability | |||
jnthn | (So people can implement custom parametric types.) | ||
Note that this call may well happen at compile time, like many other MOP calls. | |||
TimToady | sure, mostly just thinking about user-visible syntax, as is my wont | 20:41 | |
skids | so my Array[Recipe] %book; is really my Mu does Array[Recipe] %book;? | ||
TimToady | no | ||
moritz | std: $@*ARGS | ||
p6eval | std 48335fc: OUTPUT«===SORRY!===Unsupported use of $@ variable as eval error; in Perl 6 please use $! at /tmp/t94nayz7EE line 1:------> $@⏏*ARGSParse failedFAILED 00:01 107m» | ||
jnthn | More like my %book := Hash[Array[Recipe]].new | 20:42 | |
moritz | jnthn: which method in World do i use to check if a symbol is in scope? find_symbol? | 20:43 | |
jnthn | moritz: What do you mean by "in scope"? | 20:44 | |
moritz | jnthn: declared, in visible in the lexical scope we're currently in | ||
s/in/and/ | |||
jnthn | moritz: find_symbol works provided the thingy has a known compile time value. It throws if not. But some things aren't known at compile time at all | 20:45 | |
moritz: already_declared may do it | |||
moritz: is_lexical is perhaps more what you're after | 20:46 | ||
Though it doesn't do multi-part names | |||
moritz | that's OK | ||
I just want to search for 'self' | 20:47 | ||
jnthn | ah | ||
moritz | std: $.foo | ||
p6eval | std 48335fc: OUTPUT«===SORRY!===Variable $.foo used where no 'self' is available at /tmp/HWV9y7rZDq line 1:------> <BOL>⏏$.fooCheck failedFAILED 00:01 108m» | ||
jnthn | Is this for the $.foo bug? | ||
moritz | yes | ||
at least that's what I'm trying to fix :-) | 20:48 | ||
jnthn | moritz: Yeah, that's best done by the way STD does it | ||
moritz: Which is by tracking invocant availability in some other way that also handles $!x being used in submethods | |||
er, $.x not being allowed there, I mean | |||
moritz | I thought I'd just check if 'self' is declared, to catch those cases that generate a Null PMC Access | 20:50 | |
20:50
nwc10 left
|
|||
TimToady | the remaining 'as Int' should probably be replaced with --> Int(Any) | 20:51 | |
moritz | std: class A { has $.x; has $.y = $.x } | 20:52 | |
p6eval | std 48335fc: OUTPUT«===SORRY!===Virtual call $.x may not be used on partially constructed object at /tmp/euGptSo2wj line 1:------> class A { has $.x; has $.y = ⏏$.x }Check failedFAILED 00:01 110m» | ||
moritz | SVG::Plot uses that syntax heavily :/ | ||
TimToady | if you really want to cheat, you can say $.y = self.x | 20:53 | |
jnthn | moritz: Was the virtualness intended or not? | ||
TimToady | but we don't turn on virtualness of $.x by default there | ||
because it often is a think-o | |||
moritz | jnthn: no. I just wanted dependent defaults | ||
TimToady | $.y = $!x would work too | ||
jnthn | std: class A { has $.x; has $.y = $!x } | ||
masak | TimToady: +1 on --> Int(Any) | ||
p6eval | std 48335fc: OUTPUT«ok 00:01 110m» | ||
TimToady | funny thing about --> Int(Any) is it's opposite on what the type looks like from the outside, in a contravariant kind of way | 20:54 | |
moritz | jnthn: maybe I'll tackle $.foo in the STD way tomorrow | ||
jnthn | moritz: +1 | 20:55 | |
masak | TimToady: er. it's params that are contravariant, and return values are covariant :) | ||
TimToady | sub foo (Int(Any) $x --> Int(Any)) {...} looks to the outside world like (Any --> Int) | ||
masak | TimToady: I finally learned that by heart when re-learning Java generics not long ago. | ||
TimToady | masak: yes, I always get those backwards :) | ||
masak | :P | ||
TimToady | and to the inside like (Int --> Any) | 20:56 | |
masak | TimToady: it's quite easy. it's not really params vs return values, it's consumers vs producers. | ||
consumers are naturally contravariant, producers naturally covariant. | |||
TimToady | sure, and that's why it makes sense to use Int(Any) in both places | ||
masak | er. perhaps I should call'em "sinks" and "sources". that seems to be the prevailing terminology. | ||
TimToady | we don't have to tell people it will do what they expect :) | 20:57 | |
masak | :) | ||
supernovus | Hmm, another interesting bug/feature. In DateTime::Math there are + and - subs. The one for adding seconds to a DateTime object works fine: multi infix:<+>(DateTime $dt, Numeric $x) is export { ... } but the one for substracting seconds from a DateTime object never gets dispatched to: multi infix<->(DateTime $dt, Numeric $x) is export { ... } instead a default infix:<->(\$a, \$b) { ... } from the CORE.setting gets called. | ||
masak | read-write containers can't be co-/contravariant, because they try to be both sources and sinks, and therefore end up being neither. | ||
TimToady | they're invariant in their variance :) | 20:58 | |
20:58
twirp left
|
|||
supernovus | and no, the typo between infix and <-> is not in the actual code, that's just me mistyping things instead of copy/pasting. | 20:59 | |
skids | .oO(In soviet Perl6 the context of "sink" alters expectations of "kitchen") |
21:00 | |
TimToady | masak: though copy-in/copy-out params can coerce both ways; we don't really have those | 21:07 | |
is copy is rw ? | |||
21:09
cognominal left
21:10
cognominal joined
|
|||
TimToady | probably not something we need to encourage right now, but might be useful for explicit boxing/unboxing coercions, I suppose | 21:10 | |
21:12
birdwindupbird left
|
|||
supernovus | guh, hand testing shows a bunch of the infix: stuf is not dispatching to the custom versions, but instead is going to the "default" versions in the setting. For instance >, >=, <=, !=, cmp, and <=> (as well as +) are going to the custom version, but <, == and of course - aren't. This seems slightly odd to me. | 21:13 | |
benabik | Are they defined differently in the setting? | 21:14 | |
21:19
timotimo joined,
PacoLinux joined
|
|||
supernovus | benabik: not that I can tell. For instance, multi infix:<+>(\$a, \$b) { ... } in the setting gets overridden by multi infix:<+>(DateTime $dt, Numeric $x) is export { ... } in the library, but multi infix:<->(\$a, \$b) { ... } DOES NOT get overriden by multi infix:<->(DateTime $dt, Numeric $x) is export { ... } in the library. There seems to be no reason for the inconsistencies. | 21:20 | |
PerlJam | supernovus: show the code? | 21:21 | |
21:22
zby_home joined
|
|||
supernovus | PerlJam: github.com/supernovus/temporal-utils the library in question is lib/DateTime/Math.pm6 and the test in question is t/DateTime-math.t | 21:22 | |
21:28
kaare_ left
21:29
PacoLinux left
|
|||
skids | If I'm getting things right, the only reason I can't seem to figure out how to write a class that is cool with being assigned integers is because that should try postcircumfix:<( )> -- as long as there's an "as Int" a.k.a. Int(Mu) there -- but A) postcircumfix:<( )>'s actually gets an unchewed capture and B) just NIY? Or do I miss a trick? | 21:38 | |
supernovus | nom: class Foo {}; multi infix:<+>(Foo $a, Numeric $b) { say "Foo went up $b"; }; multi infix:<->(Foo $a, Numeric $b) { say "Foo went down $b"; }; my $a = Foo.new; $a + 1; $a - 1; | 21:41 | |
p6eval | nom ce5cca: OUTPUT«Foo went up 1No applicable candidates found to dispatch to for 'Numeric'. Available candidates are::(Mu:U \$v, Mu %_!) in method Numeric at src/gen/CORE.setting:649 in sub infix:<-> at src/gen/CORE.setting:2233 in block <anon> at /tmp/MJakwXcjJO:1 in <anon>… | ||
skids | Heh, well I suppose that one way around it :-) | 21:42 | |
PerlJam | nom: class Foo {}; class Bar {}; multi infix:<+>(Foo $a, Bar $b) { say "up" }; multi infix:<->(Foo $a, Bar $b) { say "down" }; my $a = Foo.new; my $b = Bar.new; $a + $b; $a - $b; | 21:47 | |
p6eval | nom ce5cca: OUTPUT«upNo applicable candidates found to dispatch to for 'Numeric'. Available candidates are::(Mu:U \$v, Mu %_!) in method Numeric at src/gen/CORE.setting:649 in sub infix:<-> at src/gen/CORE.setting:2233 in block <anon> at /tmp/TmAPl2na81:1 in <anon> at /tmp/Tm… | ||
21:48
BlueMatt joined
|
|||
supernovus | PerlJam: Yeah, it seems -, == and < are the operators that don't seem to be overridable at the moment. All the rest work fine. Beats me. :p | 21:48 | |
benabik | nom: class Foo {}; multi infix:<->(Foo $a, Numeric $b) { say "down" }; multi infix:<+>(Foo $a, Numeric $b) { say "up" }; my $a = Foo.new; $a - 1; $a +1 | ||
p6eval | nom ce5cca: OUTPUT«No applicable candidates found to dispatch to for 'Numeric'. Available candidates are::(Mu:U \$v, Mu %_!) in method Numeric at src/gen/CORE.setting:649 in sub infix:<-> at src/gen/CORE.setting:2233 in block <anon> at /tmp/BWzKASfJsI:1 in <anon> at /tmp/BWzKA… | ||
benabik | Not order dependent. :-) | ||
21:49
BlueMatt left
|
|||
PerlJam | mine showed that it's trying to turn something Numeric though. (there was no Numeric in my code, just the setting) | 21:51 | |
supernovus | Yeah, it's getting dispatched to the infix:<->(\$a, \$b) { $a.Numeric - $b.Numeric } version from the setting rather than the custom version. | 21:52 | |
21:53
imarcusthis joined
21:56
imarcusthis left
21:57
skids left
21:59
imarcusthis joined
|
|||
spine | nom: (1=>1).map({ .key => 1}).say; | 22:02 | |
p6eval | nom ce5cca: OUTPUT«Method 'key' not found for invocant of class 'Any' in block <anon> at /tmp/QxKemmos8k:1 in <anon> at /tmp/QxKemmos8k:1» | ||
spine | nom: (1=>1).map({ ; .key => 1}).say; | ||
p6eval | nom ce5cca: OUTPUT«1 1» | ||
spine | I don't get it why those produce different output... | ||
22:02
cooper left,
cooper joined
|
|||
supernovus | Well, I marked DateTime::Utils as working in nom, and noted the exception for DateTime::Math, which is broken until we can figure out the issue with certain infix operators not being overridable outside the setting. | 22:03 | |
22:09
mj41 joined
22:25
cj joined
22:35
ksi left
22:39
bbkr1 joined
22:43
zby_home left
22:48
vlixes joined
23:12
kmwallio left
23:37
mj41 left
23:44
spine left,
PacoAir left
23:47
whiteknight joined
23:57
supernovus left
|