»ö« 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:04 shinobicl_ joined 00:28 mj41 left
colomon sorear: nextwith works again? 00:29
sorear colomon: nextwith has always worked, but the semantics changed recently 00:34
colomon I was under the impression you'd removed it recently because of the semantic change. 00:35
sorear ah, no, sorry about that - I removed uses of it from the compiler
00:35 nacho joined
colomon I'd hesitated messing further with panda because I knew panda used it. 00:35
00:35 nacho is now known as Guest34864
sorear in order for the compiler to work on both new-niecza and old-niecza, it can't use nextwith at all 00:35
colomon so imagine my surprise again when I tried my version of panda and it Just Worked.
sorear: ah, gotcha. 00:36
I'm working on getting Math::Prime niecza friendly atm.
sorear cool
sorear is currently trying to get $obj.::('Foo::Bar') to work 00:38
colomon success! just used my (installed) version of panda-niecza to install Math::Prime. 00:39
it's less than completely elegant, but it works 00:40
sorear WOW
colomon++ # panda-niecza actually working?!
colomon there are a couple of issues which still need to be resolvedd
right now it's hard-wired to use my personal install of niecza
00:41 shinobicl_ left
colomon I need to figure out a better approach than that. (normal panda just calls a perl6 executable) 00:41
and there are some warnings that should be silenced (or possible represent bugs that need to be fixed)
but yeah, it works 00:42
(oh, and there are issues with a lock file not being cleaned up if an install aborts)
sorear hmm, is END working for you?
colomon I don't know. (panda is definitely not trying to use it.) 00:43
jnthn sleep &
colomon there's probably a spectest for it, no?
jnthn: 'night
00:45 dorlamm left
sorear colomon: yes, there are a few END spectests (which weren't working for [Coke] at one point) 00:45
colomon .... looks like the END spectests are mostly marked todo. :( 00:46
errr, they're all eval based.
sorear ascending-order has nontodo END tests 00:47
colomon looks like it does work for me. (Just tried END { say "In end!" }; and it printed okay.) 00:48
so if I can figure out the lock thing, I maybe can fix it that way.
00:51 Maddingue left
tadzik colomon: wow, that's awesome! 00:51
colomon tadzik: most of the changes have been basically cosmetic, it definitely ought to be possible to re-merge the versions in the long run 00:52
dalek ecza: 59f5ccb | sorear++ | / (5 files):
Implement $foo.::($bar)() form
00:55 lestrrat left 00:56 lestrrat joined 00:57 Maddingue joined
dalek ecza: 797fd44 | sorear++ | / (2 files):
Support <::($bar)>, <Foo::($bar)> regex syntax (possibly this should not capture?)
00:58
00:58 Guest34864 left
colomon sorear: with 797fd44, spectest is clean except for the usual S02-magicals/env.t fail. 01:13
tadzik: hmmm, I've still got some sort of issue here 01:23
it's .panda/state 01:26
~/.panda/state 01:27
01:30 Yary joined
colomon just installed HTTP::Easy, though it doesn't seem to have much in the way of tests, so who knows if it works. 01:32
sorear: seems like $! is giving us problems in panda-niecza? 01:43
01:43 whiteknight joined 02:17 Gruber joined 02:18 Grrrr left 02:19 clkao left 02:20 clkao joined 02:34 wolfman2000 joined 02:52 PacoAir left 02:57 whiteknight left 02:58 bbkr1 left, bbkr1 joined 03:01 Exodist left, Exodist joined 03:02 raiph left, bloonix left 03:03 bloonix joined, buubot_backup left 03:05 aloha left 03:07 aloha joined 03:10 ksi left
colomon loliblogged: justrakudoit.wordpress.com/2012/01/...d-perl-6s/ 03:10
03:14 buubot_backup joined 03:20 orafu left, orafu joined
dalek ecza: 7b72ce0 | sorear++ | lib/NieczaCLR.cs:
Make CLR-interop not make duplicate wrappers so often
03:24
ecza: f072aab | sorear++ | lib/NieczaCLR.cs:
Give CLR class wrappers non-null HOW pointers (oops!)
03:29
03:36 ponbiki joined 03:41 Patterner left 03:44 Psyche^ joined, Psyche^ is now known as Patterner
colomon sorear: spectest still the same. :) 03:51
'night
sorear 'night 03:52
dalek ecza: 92251b1 | sorear++ | lib/NieczaCLR.cs:
Treat interfaces roleishly, allowing $obj.CLR::System::IDisposable::Dispose to work (fixes #56)
03:53
04:05 alvis joined 04:11 tokuhirom joined 04:13 Chillance left
dalek ecza: bc8344f | sorear++ | src/niecza:
Make it possible to pass arguments to ::(method)...
04:15
04:15 tokuhirom left 04:16 tokuhirom joined 04:19 ponbiki left 04:20 tokuhirom left, ponbiki joined 04:25 offby1 joined
dalek ecza: 20aa772 | sorear++ | lib/NieczaCLR.cs:
Actually, punning messes up calls, so do not treat interfaces as full roles ...
04:25
offby1 What's the file-test operator look like these days? I thought it was :f, but -- if ($cache_file_name ~~ :f) => Method 'f' not found for invocant of class 'Str'
sorear if $cache_file_name.IO ~~ :f 04:29
offby1 oho, tx 04:30
sorear niecza: class A { has $.x = 4; has $.y = $!y; } say A.new.y 04:33
p6eval niecza v13-376-g92251b1: OUTPUT«===SORRY!===␤␤Strange text after block (missing comma, semicolon, comment marker?) at /tmp/cVYNE9nlfG line 1:␤------> class A { has $.x = 4; has $.y = $!y; }⏏ say A.new.y␤␤Parse failed␤␤»
sorear niecza: class A { has $.x = 4; has $.y = $!x; }; say A.new.y
p6eval niecza v13-376-g92251b1: OUTPUT«Unhandled exception: System.Exception: Unable to find lexical self in A init␤ at Niecza.CLRBackend.NamProcessor.ResolveLex (System.String name, Boolean upf, System.Int32& uplevel, Boolean core) [0x00000] in <filename unknown>:0 ␤ at Niecza.CLRBackend.Na…
sorear niecza: class A { has $.x = 4; has $.y = $!x; }; 04:34
p6eval niecza v13-376-g92251b1: OUTPUT«Unhandled exception: System.Exception: Unable to find lexical self in A init␤ at Niecza.CLRBackend.NamProcessor.ResolveLex (System.String name, Boolean upf, System.Int32& uplevel, Boolean core) [0x00000] in <filename unknown>:0 ␤ at Niecza.CLRBackend.Na…
sorear niecza: class A { has $.y = die "moo"; };
p6eval niecza v13-376-g92251b1: ( no output )
offby1 is there some equivalent to python's "dir" function? That is, a uniform way that I can find out what methods are available on a given object?
sorear nom: say $*OUT.^methods
p6eval nom 9719f7: OUTPUT«open close eof get getc lines read seek tell write opened print slurp d e f l r s t w x z copy chmod say ins chomp path␤» 04:35
sorear offby1: that
offby1: also, welcome to #perl6
offby1 tx :)
I dip in about twice a year
04:37 benabik left 04:47 wooden left 04:58 benabik joined 05:28 bkolera joined 05:56 Trashlord joined 06:26 wooden joined, wooden left, wooden joined 06:33 kaare_ joined 06:35 kaare__ joined 06:37 kaare_ left
moritz o/ 06:38
06:54 wolfman2000 left
sorear o/ moritz 06:57
07:07 kaare__ left
sorear moritz: if you do perl6/specs@0de30c in the commit log, it'll show up as a link on github 07:16
e.g. see the last commit on github.com/perl6/roast
moritz sorear: ok, I'll try to remember the syntax 07:19
sorear I'm not by any means insisting you do it. IMO github is secondary, I'm mainly writing for 'git log' 07:20
moritz it is nice to have a standard syntax for that though 07:21
07:39 xinming left
moritz phenny: ask tadzik if there are any Pod related errors that the user can make that aren't syntax errors 07:52
phenny moritz: I'll pass that on when tadzik is around.
moritz std: loop(1; 1; 1) { }
p6eval std 48335fc: OUTPUT«===SORRY!===␤Word 'loop' interpreted as 'loop()' function call; please use whitespace around the parens at /tmp/G2PrJXo3eB line 1:␤------> loop⏏(1; 1; 1) { }␤Unexpected block in infix position (two terms in a row) at /tmp/G2PrJXo3…
moritz std: loop{ } 07:53
p6eval std 48335fc: OUTPUT«===SORRY!===␤Undeclared routine:␤ 'loop' used at line 1␤Check failed␤FAILED 00:01 108m␤»
moritz curious.
std: @ 07:55
p6eval std 48335fc: OUTPUT«===SORRY!===␤Non-declarative sigil is missing its name at /tmp/TTZQsbwYgY line 1:␤------> <BOL>⏏@␤Use of uninitialized value $first in string eq at STD.pm line 66226.␤Use of uninitialized value $sigil in string eq at STD.pm line 6…
07:56 s1n left 07:59 samlh left
moritz nom: #` 08:14
p6eval nom 9719f7: ( no output )
moritz huh.
08:17 birdwindupbird joined
dalek kudo/typed-exceptions-smoke: d63e72d | moritz++ | src/ (2 files):
more typed syntax errors
08:18
kudo/typed-exceptions-smoke: 5e82cc3 | moritz++ | src/ (2 files):
more typed errors; fix error for #` without following block
moritz that branch is just so that I can spectest my changes on a faster computer before pushing them to nom 08:19
08:21 ponbiki left
moritz std: } 08:25
p6eval std 48335fc: OUTPUT«===SORRY!===␤Unexpected closing bracket at /tmp/hOqa4Z0VzU line 1:␤------> <BOL>⏏}␤Parse failed␤FAILED 00:01 105m␤»
moritz std: -
p6eval std 48335fc: OUTPUT«===SORRY!===␤Prefix requires an argument at /tmp/dZ5Nv4ZsPf line 1 (EOF):␤------> -⏏<EOL>␤Parse failed␤FAILED 00:01 107m␤»
moritz what's an easy way to trigger a "Confused" message from STD?
sorear std: ∞ 08:26
p6eval std 48335fc: OUTPUT«===SORRY!===␤Bogus statement at /tmp/OkQ2LjfjJL line 1:␤------> <BOL>⏏∞␤Parse failed␤FAILED 00:01 109m␤»
08:26 bkolera left
sorear std: 1∞ 08:26
p6eval std 48335fc: OUTPUT«===SORRY!===␤Confused at /tmp/_hw3054A2J line 1:␤------> 1⏏∞␤ expecting any of:␤ POST␤ bracketed infix␤ infix or meta-infix␤ postfix␤ postfix_prefix_meta_operator␤ statement modifier loop␤Parse failed␤FAILED 00:01 08:27
..108m␤»…
sorear looks like that did the trick
08:28 bkolera joined
moritz thanks 08:29
sorear perl6: sub foo { say +(True ff False) }; for ^5 { foo } 08:36
p6eval pugs b927740: OUTPUT«*** No such subroutine: "&infix:ff"␤ at /tmp/T4AqNqN27e line 1, column 17-30␤»
..niecza v13-378-g20aa772: OUTPUT«1␤2␤3␤4␤5␤»
..rakudo 9719f7: OUTPUT«1␤1␤1␤1␤1␤»
sorear perl6: sub foo { say +(True ff True) }; for ^5 { foo } 08:37
p6eval pugs b927740: OUTPUT«*** No such subroutine: "&infix:ff"␤ at /tmp/fAqIT7FcxQ line 1, column 17-29␤»
..rakudo 9719f7, niecza v13-378-g20aa772: OUTPUT«1␤1␤1␤1␤1␤»
sorear perl6: sub foo { say +($_ ff False) }; for ^5 { foo 0; foo 1 }
p6eval rakudo 9719f7: OUTPUT«===SORRY!===␤CHECK FAILED:␤Calling 'foo' will never work with argument types (int) (lines 1, 1)␤ Expected: :()␤»
..niecza v13-378-g20aa772: OUTPUT«0␤1␤2␤3␤4␤5␤6␤7␤8␤9␤»
..pugs b927740: OUTPUT«*** No such subroutine: "&infix:ff"␤ at /tmp/9Dtgxu04hz line 1, column 17-28␤»
sorear perl6: sub foo($_) { say +($_ ff False) }; for ^5 { foo 0; foo 1 } 08:38
p6eval rakudo 9719f7: OUTPUT«0␤1␤1␤1␤1␤1␤1␤1␤1␤1␤»
..niecza v13-378-g20aa772: OUTPUT«0␤1␤2␤3␤4␤5␤6␤7␤8␤9␤»
..pugs b927740: OUTPUT«*** No such subroutine: "&infix:ff"␤ at /tmp/0w_Zr_vo_4 line 1, column 21-32␤»
sorear perl6: for ^5 { sub foo($_) { say +($_ ff False) }; foo 0; foo 1 }
p6eval rakudo 9719f7: OUTPUT«0␤1␤1␤1␤1␤1␤1␤1␤1␤1␤»
..niecza v13-378-g20aa772: OUTPUT«0␤1␤0␤1␤0␤1␤0␤1␤0␤1␤»
..pugs b927740: OUTPUT«*** No such subroutine: "&infix:ff"␤ at /tmp/MzfS9Cjo00 line 1, column 30-41␤»
sorear nom: sub foo { $_ }; say foo 15
p6eval nom 9719f7: OUTPUT«===SORRY!===␤CHECK FAILED:␤Calling 'foo' will never work with argument types (int) (line 1)␤ Expected: :()␤»
sorear moritz: known bug? 08:39
moritz bug?
you didn't put $_ in the signature
sorear there is no signature, so it defaults to \$_ = $OUTER::_
moritz for blocks, yes 08:40
for subs, the implicit signature is based on the presence of @_ and %_
sorear STD has the same implicit signature rules for blocks and subs
moritz that seems wrong 08:41
it means you can't do stuff like sub f { for 1..2 { say @_[$_] } }
because then the @_ ends up being in the signature of the block, not the sub
, 08:42
also when rakudo tried to implement those semantics back in the days, nobody knew how $_ and @_ interacted
sorear so there's something in the prose spec that contradicts STD.getsig? or is this an @Larry decision that somehow never got recorded? 08:43
moritz I don't think the specs well enough to tell
but I do know that $_ and @_ don't interact well in any intuitive way 08:44
perl6: sub f { say $_ }; f 3
p6eval niecza v13-378-g20aa772: OUTPUT«3␤»
..rakudo 9719f7: OUTPUT«===SORRY!===␤CHECK FAILED:␤Calling 'f' will never work with argument types (int) (line 1)␤ Expected: :()␤»
..pugs b927740: OUTPUT«␤»
moritz if the spec says nothing about it, I'd assume p5 behavior in having $_ not interact with arguments passed to subs 08:45
niecza: sub f { say $_.perl; say @_.perl }; f 1, 2, 3
p6eval niecza v13-378-g20aa772: OUTPUT«Any␤(1, 2, 3).list␤»
moritz niecza: sub f { say $_.perl; say @_.perl }; $_ = 5; f 08:46
p6eval niecza v13-378-g20aa772: OUTPUT«Any␤().list␤»
moritz that doesn't make any sense, if $_ defaults to OUTER::$_
nom: =begin 08:48
p6eval nom 9719f7: OUTPUT«===SORRY!===␤Preceding context expects a term, but found infix = instead at line 1, near "begin"␤»
moritz nom: =begin foo
p6eval nom 9719f7: OUTPUT«===SORRY!===␤Preceding context expects a term, but found infix = instead at line 1, near "begin foo"␤»
sorear moritz: the presence of @_ suppresses the generation of a $_ par ameter, so you're seeing the mainline $_ 08:49
niecza: say ({ 5 }).signature
p6eval niecza v13-378-g20aa772: OUTPUT«:(Any \$_)␤»
sorear niecza: say ({ $_ }).signature
p6eval niecza v13-378-g20aa772: OUTPUT«:(Any \$_)␤»
sorear niecza: say ({ $_, @_ }).signature
p6eval niecza v13-378-g20aa772: OUTPUT«:(*@_)␤»
sorear niecza: say ({ $^foo }).signature 08:50
p6eval niecza v13-378-g20aa772: OUTPUT«:(Any $foo)␤»
sorear hey, I just noticed I could probably port Math::Model now
moritz but the mainline $_ is 5, no?
niecza: sub f { say $_.perl; say @_.perl }; $_ = 5; f
p6eval niecza v13-378-g20aa772: OUTPUT«Any␤().list␤» 08:51
sorear erm... I think niecza does a 'my $_' in routines by default
if $_ is not created by the signature
I'll wait for the ruling 08:52
moritz my next suggestion would have been to wait for TimToady++, right :-)
sorear I should start on announce.v14 RSN too
dalek ecza: 6915253 | sorear++ | / (2 files):
Ignore arguments to rules for LTM purposes
09:03
09:10 birdwindupbird left
masak morning, #perl6! \o/ 09:11
sorear MASAK!
masak jnthn++ # 6guts.wordpress.com/2012/01/29/this...ming-next/
sorear \o/
masak sorear: re `-I=path` not working being intentional -- long-term, I hope there will be a convergence on command-line flags between Niecza and Rakudo. 09:12
sorear yes 09:15
dalek ecza: f341570 | sorear++ | / (2 files):
Implement protoregexes forwarding arguments to callees

The bit in spec where equal longest terms fall back to type-based MMD if there are arguments is not yet implemented, and probably never will be.
masak just a few hours remain of p6cc! hurry, hurry! 09:18
dalek ecza: 4158fa9 | sorear++ | docs/TODO.S05:
Check off parameters/LTM on TODO.S05
09:20
sorear oops, I guess I'll have to work on announce.v14 tomorrow 09:23
fasad hi !
sorear hello fasad
anything I can do for you real quick before I run off to bed?
fasad so i found out that declaring more than one array on the same my statement does not work. why ? 09:24
my @a, @b;
sorear need parens
std: my @a, @b;
p6eval std 48335fc: OUTPUT«===SORRY!===␤Variable @b is not predeclared (declarators are tighter than comma, so maybe your 'my' signature needs parens?) at /tmp/YcYIR98sOy line 1:␤------> my @a, ⏏@b;␤Check failed␤FAILED 00:01 111m␤»
fasad oh
sorear niecza: my @a, @b; # curious 09:25
p6eval niecza v13-379-g6915253: OUTPUT«===SORRY!===␤␤Variable @b is not predeclared (declarators are tighter than comma, so maybe your 'my' signature needs parens?) at /tmp/w0FeGzOazs line 1:␤------> my @a, ⏏@b; # curious␤␤Potential difficulties:␤ @a is de…
fasad one last thing, how to assign same value to all the array elements?
masak could have a better error message.
sorear masak: what do you propose?
masak fasad: my @a = $value xx $length;
sorear fasad: arrays go up to infinity. Assigning the same value to *all* of them could take a while 09:26
masak sorear: "Variable @b not predeclared (did you forget parentheses?)"
fasad sorear: couldn't it be lazy?
sorear masak: you think that's better than what STD already does?
masak fasad: lists are lazy, arrays are not.
sorear: oh!
sorear: didn't read properly. :/ 09:27
fasad btw, rakudo complains about @b being not predeclared. Its warning has room for improvement !
masak though I do think that "parens", cute as it is, is a less well-known term than "parentheses". 09:28
fasad: yes.
masak submits rakudobug
rakudo: my @a, @b;
p6eval rakudo 9719f7: OUTPUT«===SORRY!===␤Variable @b is not predeclared at line 1, near ";"␤»
sorear reminds me of bras and kets 09:29
sorear really -> sleep now
fasad masak: +1 (on "parenthesea")
*parentheses
masak 'night, sorear. dream of arrays going up to infinity. 09:30
fasad good night sorear
eviltwin_b niecza's ladder? 09:31
masak :)
there are 1243 #perl6 tickets with 'cmasak' as a requestor on RT. 816 resolved, 382 new/open, 44 rejected, 1 stalled. 09:38
664 new/open/stalled tickets overall. more'n half of the new/open bugs are from me :> 09:39
1985 resolved/rejected tickets overall. so, I only have 43% of those. the rest of you guys are still slightly ahead on that one. 09:42
09:49 Patterner left
bacek ~~ 09:55
seen jnthn 09:56
aloha jnthn was last seen in #perl6 9 hours 12 mins ago saying "sleep &".
masak bacek: he'll be around shortly. 09:57
(we didn't drink *that* much beer last night) :P
bacek phenny, tell jnthn rakudo/src/binder/bind.c, line 755 will be broken soon :)
phenny bacek: I'll pass that on when jnthn is around.
masak ooh, advance notice! bacek++ 09:58
bacek masak, yeah. Beer is good :)
masak especially good beer :)
bacek masak, indeed!
10:00 GlitchMr joined
moritz nom: say 9 ** 4 10:01
p6eval nom 9719f7: OUTPUT«6561␤»
masak moritz: t1? :) 10:02
moritz masak: t1. 10:03
10:03 SHODAN joined 10:17 Psyche^ joined, Psyche^ is now known as Patterner 10:20 espadrine joined 10:33 espadrine left 10:42 mj41 joined
bbkr1 moritz: I've reported #109306 about Socket:INET not handling line separator properly, but i'm not sure if it is rakudo bug or nqp problem with readline. 10:47
10:49 whiteknight joined
moritz bbkr1: migth be a problem in the chomping logic 10:51
which is done in IO::Socket somewhere 10:53
nom: say (9 + 9) * (9 + 9) 10:55
p6eval nom 9719f7: OUTPUT«324␤»
moritz nom: say 9 / ((9 + 9) / 9) 10:59
p6eval nom 9719f7: OUTPUT«4.5␤»
11:20 fsergot joined
fsergot o/ 11:21
masak \o 11:38
11:58 Moukeddar joined
masak Moukeddar! \o/ 12:07
Moukeddar Hello Sir o/
masak hello dear fellow.
blog post! strangelyconsistent.org/blog/the-pe...now-closed 12:11
jnthn afternoon o/ 12:14
phenny jnthn: 09:57Z <bacek> tell jnthn rakudo/src/binder/bind.c, line 755 will be broken soon :)
jnthn bacek: That's fine; hints on what to change it to are very helpful too :) 12:15
bacek: Or even *gasp* a proper API for me to actually implement the stuff I'm doing there. ;-)
12:19 xinming joined
masak +1 12:21
this is how the Rakudo<->Parrot collaboration should work, all the time :) 12:22
advance notices, friendly cross-channel banter, suggestions of APIs :)
12:23 birdwindupbird joined
felher masak++ # blog post about the p6cc :) 12:32
12:47 Moukeddar left 12:50 ksi joined
tadzik moritz: yeah, I can think of some 12:54
phenny tadzik: 07:52Z <moritz> ask tadzik if there are any Pod related errors that the user can make that aren't syntax errors
tadzik good morning
I think some of them are already reported by panic()
moritz good "morning" tadzik :-)
tadzik 13:54? Oh my
colomon \o 12:55
jnthn :) 12:57
tadzik colomon: re ~/.perl6 and ~/.niecza, do we assume that Rakudo modules are different than Niecza modules?
colomon tadzik: that's been my assumption, though in practice, a lot of modules can go both ways 12:58
tadzik I'd assume they're the same .pm files 12:59
colomon or perhaps the right way of saying it is modules should be installed separately for the two compilers even if they're the same .pm files.
tadzik well, do they?
I'm thinking about some sort of perl6-switcher tool (more) 13:00
masak good post-noon, tadzik
tadzik it'll keep modules for both, and when you do perl6-switcher rakudo, 'perl6' executable becomes /path/to/rakudo, and ~/.perl6 becomes ~/.perl6-switcher/rakudo/ or something
sort of like perlbrew manages multiple Perl fives 13:01
masak: good morn... good day masak
colomon yeah, that would be another interesting way of handling the situation.
tadzik It feels wrong to me to have both ~/.perl6 and ~/.niecza. Because then, why not ~/.rakudo and ~/.niecza? And then, what is perl6 after all? 13:02
moritz well, I'd say ~/.perl6/rakudo and ~/.perl6/niecza
colomon tadzik: well, I was trying to present a solution that wouldn't require changing how rakudo works; but obviously switching to ~/.rakudo makes more sense. ;)
tadzik imho, it doesn't :P 13:03
I think .niecza has a right to use ~/.perl6 as much as rakudo does, if you know what I mean
masak +1 13:04
here's my take on it: outsiders will always expect to run a 'perl6' executable.
that's why Rakudo got on in the first place.
there's a strain of thought saying Rakudo is encroaching on the 'perl6' name, but I don't think that's it. 13:05
no more than any particular C compiler is squatting the 'cc' name.
colomon right -- but when you install GCC (for instance), it installs "gcc" and /usr/lib/gcc... 13:06
masak I didn't say all compilers install themselves on /usr/bin/cc 13:07
I'm saying there is more than one that does.
13:07 cognominal_ left 13:08 cognominal_ joined
masak and it's not considered a problem. 13:08
colomon which cc
lrwxr-xr-x 1 root wheel 32 Jun 13 2011 /usr/bin/cc -> ../llvm-gcc-4.2/bin/llvm-gcc-4.2 13:09
If Rakudo installs "rakudo" and Niecza installs "niecza" and they use ~/.rakudo and ~/.niecza, then the perl6 executable can be whatever the user wants. That's a fine solution in my book. 13:13
(And yes, "perl6" can change just like perlbrew) 13:14
jnthn Either ~/.[rakudo|niecza] or ~/.perl6/[rakudo|niecza]/ seem workable to me. 13:15
colomon +1 13:16
moritz in the long run, do we want a shared installation dir, with custom subdirs for implementation specific files?
if so, we might want ~/.perl6/lib for .pm6 files, and ~/.perl6/rakudo/blib/ for .pir files or so 13:17
colomon moritz: I'm hesitant about shared installation dir, just because it seems like the cleanest way to avoid having modules which only work on one implementation muddle up the other implementation is to have separate include paths. 13:18
might be particularly important in the case where a module compiles but doesn't actually work (ie tests fail so it won't install in an implementation-specific /lib) 13:20
moritz right 13:21
13:26 icwiener joined 13:40 xinming left, PacoAir joined
colomon phenny: tell sorear The last test of S05-grammar/protoregex.t has gone from needing a todo to needing a skip. I know this is what you were working on last night, so I thought I'd bring it to your attention before refudging. 13:53
phenny colomon: I'll pass that on when sorear is around.
13:54 tokuhirom joined 14:05 ksi left
dalek p/bs: a32b456 | jnthn++ | t/serialization/01-basic.t:
Tests for VM array serialization.
14:11
p/bs: a7d8e0f | jnthn++ | src/6model/serialization.c:
Implement VM array serialization; tests pass.
p/bs: 1f52d8b | jnthn++ | t/serialization/01-basic.t:
Tests for hash serialization.
p/bs: 7ca562f | jnthn++ | src/6model/serialization.c:
Hash serialization. Tests pass.
14:11 mucker joined 14:16 kmwallio joined
fasad rakudo: say 3**5; 14:18
p6eval rakudo 9719f7: OUTPUT«243␤»
fasad rakudo: say "3**5"; 14:19
p6eval rakudo 9719f7: OUTPUT«3**5␤»
fasad rakudo: say "{3**5}";
p6eval rakudo 9719f7: OUTPUT«243␤»
moritz rakudo: say ([+] (3**5).comb) %% 9
p6eval rakudo 9719f7: OUTPUT«Bool::True␤»
fasad sweet :)
tadzik :) 14:20
fasad what does this error mean: Null PMC access in find_method('postcircumfix:<[ ]>') 14:21
tadzik that means "it shouldn't have happened, please report a bug"
what's the code?
fasad tadzik: let me paste it somewhere & come back 14:22
tadzik sure thing
masak short code trumps long code. 14:24
colomon nom: sub d(*@pos, *%named) { }; my @l = &d.signature.params; say @l>>.named
p6eval nom 9719f7: OUTPUT«Bool::False Bool::True␤»
colomon niecza: sub d(*@pos, *%named) { }; my @l = &d.signature.params; say @l>>.named 14:25
p6eval niecza v13-381-g4158fa9: OUTPUT«Potential difficulties:␤ @pos is declared but not used at /tmp/YSW4pSwbzD line 1:␤------> sub d(*⏏@pos, *%named) { }; my @l = &d.signature␤ %named is declared but not used at /tmp/YSW4pSwbzD line 1:␤------> sub d(*@pos, *⏏[…
colomon niecza: sub d(*@pos, *%named) #ok { }; my @l = &d.signature.params; say @l>>.named
p6eval niecza v13-381-g4158fa9: OUTPUT«===SORRY!===␤␤Malformed block at /tmp/vezcIOjQRS line 1 (EOF):␤------> @l = &d.signature.params; say @l>>.named⏏<EOL>␤␤Parse failed␤␤»
colomon niecza: sub d(*@pos, *%named) { say @pos.perl ~ %named.perl }; my @l = &d.signature.params; say @l>>.named 14:26
p6eval niecza v13-381-g4158fa9: OUTPUT«Bool::False Bool::False␤»
colomon ah 14:27
14:27 icwiener left, icwiener joined
dalek ast: 59e3518 | (Solomon Foster)++ | S06-signature/introspection.t:
Heavy fudging for niecza.
14:29
14:29 xinming joined
dalek ecza: e9bafb9 | (Solomon Foster)++ | t/spectest.data:
Turn on S06-signature/introspection.t.
14:29
14:30 LlamaRider joined
dalek p/bs: 76e62d8 | jnthn++ | src/6model/serialization.c:
Make some naming more consistent.
14:32
p/bs: b3b2a5b | jnthn++ | t/serialization/01-basic.t:
Tests for serializing integer and string arrays.
p/bs: dc73db6 | jnthn++ | t/serialization/01-basic.t:
Use explicit nqp::elems in element counting tests.
p/bs: d142652 | jnthn++ | src/6model/serialization.c:
Serialization of integer and string arrays. That should be all the primitives in place.
14:34 tokuhirom left, tokuhirom joined
fasad tadzik: i'm trying to draw a Chess Board; tinypaste.com/b1dea7fe ; warning: the code is not pretty ! 14:36
jnthn afk for a bit
fasad jnthn: oh. have a look :) 14:38
tadzik fasad: it's not bad. I'm looking into it
14:39 tokuhirom left
masak nom: my ((@a = 1, 2, 3), (@b = 4, 5, 6)); say @b.perl 14:39
p6eval nom 9719f7: OUTPUT«===SORRY!===␤Cannot put required parameter after optional parameters␤at /tmp/Zs99vI3Htt:1␤»
14:39 Yary left
masak fasad: that's not how you initialize multiple arrays. 14:39
nom: my (@a, @b); @a = 1, 2, 3; @b = 4, 5, 6; say @b.perl
p6eval nom 9719f7: OUTPUT«Array.new(4, 5, 6)␤»
tadzik nom: my ((@a)); say @a.perl; 14:41
p6eval nom 9719f7: OUTPUT«Null PMC access in find_method('perl')␤ in block <anon> at /tmp/_QVyc6Q8Fe:1␤ in <anon> at /tmp/_QVyc6Q8Fe:1␤»
tadzik aside from how should that react, I call LTA
niecza: my ((@a)); say @a.perl;
p6eval niecza v13-381-g4158fa9: OUTPUT«[].list␤»
tadzik or even a bug
std: my ((@a)); say @a.perl;
p6eval std 48335fc: OUTPUT«ok 00:01 112m␤»
fasad masak: yeah removing the parentheses gets rid of the error 14:42
but the code still does not dwim
14:42 whiteknight left
fasad darn. in the last but fourth line, i meant to write {9-$_}, i forgot the braces in the paste. however it still does not work 14:44
tadzik fasad: works for me 14:47
well, sort of
fasad ok, code with the parens removed & the including the braces: tinypaste.com/69154f0f
tadzik yeah, it's fine 14:48
fasad i get "use of uninitialized value of type Any in string context"
tadzik fasad: gist.github.com/1699126
note: say "{9-$_} | ...
masak my (@a = 1..3, @b = 4..6); say @b.perl 14:50
nom: my (@a = 1..3, @b = 4..6); say @b.perl
p6eval nom 9719f7: OUTPUT«Array.new()␤»
masak fasad: don't initialize arrays like that. it doesn't work.
fasad tadzik: ?
masak fasad: see my evaluation above.
nom: my (@a, @b); @a = 1, 2, 3; @b = 4, 5, 6; say @b.perl
p6eval nom 9719f7: OUTPUT«Array.new(4, 5, 6)␤»
14:50 kmwallio left
tadzik fasad: what's the problem? 14:50
fasad masak: but is it supposed to work?
tadzik; yeah i put the braces there but i still get "use of uninitialized value of type Any in string context" repeated eight times for each say "{9-$_ | ... 14:51
tadzik weird. I don't :) 14:52
fasad tadzik: rakudo, right?
tadzik yes
masak fasad: no, that's simply not how you do it.
tadzik This is perl6 version 2012.01-36-g6eae67e
masak fasad: at least I've never seen someone initialize a variable with a signature default, which is what you're trying to do. 14:53
fasad forgive my ignorance, what's a signature ? 14:54
masak fasad: though if it shouldn't work -- and I strongly suspect it shouldn't -- then there should be a compile-time warning, really.
fasad: a signature is the ($x) part of 'sub foo($x) { ... }'
fasad tadzik: how do i find my version? 'perl6 -v' does not work 14:55
tadzik fasad: perl6 --version
fasad tadzik: This is perl6 version 2012.01-39-g0bcf489
tadzik that's even newer than mine then 14:56
definitely not the case
fasad: did you run the code I pasted on github?
fasad tadzik: the github code works :| 14:58
tadzik then diff -uN github.code your.code :)
I changed only array declarations and added {} in say(), twice 14:59
fasad tadzik: i did the same. now trying out diff ...
15:00 Radvendii joined
Radvendii nom: say 1 <= all(0,5) <= 3 # i think someone already saw this but... broken? 15:02
p6eval nom 9719f7: OUTPUT«all(Bool::False, Bool::True)␤»
masak fasad: when you do 'my ($a, $b, $c)', the '($a, $b, $c)' is a signature too.
fasad masak: what is so signature-ly about it? 15:03
Radvendii oh wait 15:04
that's not a bug
i didn't see that it was all()
masak fasad: it's not signature-ly, it's an actual signature. 15:05
fasad tadzik: nailed it. i had only removed the parens but forgotten to split each my onto a different line 15:06
masak fasad: and the reason you could even use a '=' inside of it is that '=' means "default value" in signatures. however, default values only make sense for functions, not for variable initializations.
masak gets a vague sense he's been submitting an RT ticket about this once
fasad masak: sorry, i meant why is it called a signature? #in 'my ($a, $b, $c)'
masak fasad: hm, dunno exactly. 15:07
fasad: probably because it's how the function identifies itself to the world.
fasad the 'my' function ?! 15:08
masak nono, in the case of 'sub foo($x)'. 15:09
and then signatures are simply re-used for 'my' variable initialization.
but it's not a perfect match, and some things will not make perfect sense outside of function declarations.
'my ($x is copy)' doesn't make much sense either.
fasad masak: hmm. 15:10
jnthn Note that when you do a list assignment based on a signature, it just does the variable decls and degenerates to a simple Parcel. 15:12
fasad so to be clear, when declaring more-than-one array with 'my', i should not try to initialize them too. correct?
jnthn I suspect it should whine about signatures that are too complex to do that to.
Radvendii ummm... i have a ghost variable 15:13
i'm getting an error about variable $v
and i've checked every instance of the letter 'v' in my program
fasad jnthn: i'm still trying to understand the word 'Parcel' !
Radvendii $v doesn't exist in any form
# such as $^v $!v $.v $v, etc 15:14
masak jnthn: I'm of two minds about actually allowing defaults in 'my' declarations.
jnthn: I can even see real use cases for nested siggie declarations :)
jnthn masak: So long as you don't expect it to have any influence whatsoever on the assignment that follows... 15:15
masak: But that'd seem isleading
*misleading
masak: The defaults...yeah, that could be useful I guess.
15:17 shinobicl_ joined
masak jnthn: there isn't always an assignment after the declaration. 15:19
and of course any such assignment will win over any default.
TimToady one still might assign too few values 15:20
masak that, too. 15:21
TimToady @_ in a block is discussed at S06:1931
masak my ($a, $b, $c = 5) = @values;
ok, so I'm for allowing defaults to set variables. 15:22
fasad still thinks my ((@a = 1, 2, 3), (@b = 4, 5, 6)) should work :(
tadzik perl6: my @a = 1, 2, 3; @a = [] 15:23
p6eval pugs b927740, rakudo 9719f7, niecza v13-381-g4158fa9: ( no output )
tadzik hmm
perl6: my @a = 1, 2, 3; @a = []; say @a.perl
p6eval rakudo 9719f7: OUTPUT«Array.new([])␤»
..niecza v13-381-g4158fa9: OUTPUT«[[]].list␤»
..pugs b927740: OUTPUT«[[],]␤»
masak fasad: it will, but only with almost that syntax.
tadzik oddness
masak fasad: my (@a = (1, 2, 3), @b = (4, 5, 6));
fasad masak: but any fancy assignment will/does not work? 15:25
TimToady someone should write a Unicode input method that works like Anthy 15:26
but searches the names
masak fasad: question too vague :)
fasad: note, though, that I changed my mind 5 minutes ago. :) 15:27
fasad has not had anything to eat for last 7 hours :( 15:29
no, i was not coding perl6 for those 7 hours !
fasad is off to dinner
15:29 xinming left 15:30 xinming joined
tadzik declaring MAIN('ls', Bool :$all), '--all ls' works but 'ls --all' does not. Bug of feature? 15:36
15:36 nebuchadnezzar left
Radvendii is it *remotely* possible that given $i {} is changing the value of $i? 15:37
masak nom: my $i = 5; given $i { $_ = 42 }; say $i 15:41
p6eval nom 9719f7: OUTPUT«42␤»
Radvendii that's not what i'm saying 15:43
15:43 Trashlord left
Radvendii nom: my $i=5; $i.say; given $i { $i.say}; 15:43
p6eval nom 9719f7: OUTPUT«5␤5␤»
Radvendii and those two are different in my program
which is the same place, i should add, in which i'm getting the error use of uninitialized variable $v of type Any in numeric context 15:44
even though $v doesnt exist
in my program at least
15:44 LlamaRider left, Trashlord joined 15:46 nebuchadnezzar joined, leprevost joined
masak Radvendii: I've seen variables being called '$v' in error messages without actually having that name. there's a bug in some error message somewhere. 15:48
Radvendii: as to your strange given action-at-a-distance, feel free to golf a short example of it.
Radvendii masak: oh. that would make more sense. now i know what variable they are talking about at some point
masak: i'll try...
tadzik btw: USAGE printing .WHY for every MAIN candidate. Yay or nay? 15:50
masak a hesitant yay :) 15:51
tadzik why hesitant? :) 15:52
Radvendii oh come ON!
15:53 cognominal joined
Radvendii nom: my %a; %a<a> = 5; %a<a> = Nil; say %a.keys 15:53
p6eval nom 9719f7: OUTPUT«a␤»
masak Radvendii: looks correct to me.
Radvendii: if you want to delete the key, .delete it.
Radvendii really? 15:54
masak tadzik: because I haven't seen how it looks yet.
tadzik :)
Radvendii that's weird...
15:54 am0c joined
masak Radvendii: tell me why you are surprised at this. 15:54
Radvendii masak: it just seems like if i assign something to Nil, i'm saying it doesn't exist. 'defined' turns up False, so why should it still be a key of the hash? 15:55
masak Radvendii: because there's an undefined value at that location. 15:56
Radvendii: defined !=== exists
15:56 cognominal_ left
masak Radvendii: now, KeyHash behaves the way you expect. but not a normal Hash. 15:57
(KeyHash NYI)
Radvendii ^^ that was coming
i feel like the syntax %a<b>.delete should work... i even know a way to impliment it. 16:01
am i wrong that it should work though? 16:02
masak yes, what you want is spelled '%a<b> :delete' 16:05
Radvendii woah. i've never seen *that* syntax 16:06
16:10 GlitchMr42 joined 16:11 GlitchMr left
masak Radvendii: :delete is an adverb. it's something that modifies an operator, in this case the .<b> access 16:12
Radvendii how does one impliment it? 16:13
16:13 leprevost left
Radvendii for ones own classes 16:13
masak sub postfix:<[ ]>($arg, :$delete) { ... }
jnthn postcircumfix, that is 16:14
Note that Rakudo doesn't parse operator adverbs yet.
Radvendii but then how do i do it if i want to overload the {} method? # i've been overloading it by implimenting at_pos 16:15
and by at_pos i mean at_key
masak er, right. postcircumfix 16:17
Radvendii what?
16:19 snearch joined
masak sub postcircumfix:<[ ]>($arg, :$delete) { ... } 16:20
actually, method, not sub :/
Radvendii oh, right, but isn't it better practice to overload at_pos than postcircumfix:<[ ]>? 16:21
masak in general, yes. 16:25
but you asked how to declare the :delete adverb.
it's the same kind of distinction as with "BUILD" and "new". if you want to do ordinary things, you're fine with using build. if you want to do fancy things like change the method signature, you use new. 16:26
Radvendii but how do i not touch anything else? let's say i want to have it accept :delete, but not do anything else differently from normal [] (not even do anythnig with :delete) 16:28
do i have to re-write the whole method? 16:29
masak yes. 16:31
as things are currently factored, yes.
this is a general problem in design.
you have to factor things in *some* way, and anticipate the ways people want to break things apart and put them together again. 16:32
but factorings are always tradeoffs, and you can't please everybody.
Radvendii masak: i don't mean to keep bringing this up over and over again, but isn't that what SUPER is for in other languages? 16:33
tadzik masak: gist.github.com/1699545
#12 is to be fixed, of course 16:34
jnthn dupa.pl :D 16:35
masak Radvendii: :D
Radvendii: inheritance is a fine tool, but it doesn't help the fact that any factoring of a class will favor some and dis-favor some. 16:36
Radvendii: also, while it's not called SUPER in Perl 6, we have the same capabilities, and more. see perl6advent.wordpress.com/2010/12/1...s-cousins/ 16:37
Radvendii yeah, i know, that's a whole 'nother beast. a wild one at that. and would that work? could i say method postcircumfix:<[ ]>(@args, :$delete) { nextwith(@args) } ? 16:39
nom: class A { method postcircumfix:<[ ]>(@args, :$delete) {nextwith(@args) }; my A $a .= new; $a[0] = 5 16:41
p6eval nom 9719f7: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 2␤»
16:41 fasad left
Radvendii nom: class A { method postcircumfix:<[ ]>(@args, :$delete) {nextwith(@args) } }; my A $a .= new; $a[0] = 5; say $a[0]; 16:41
p6eval nom 9719f7: OUTPUT«Nominal type check failed for parameter '@args'; expected Positional but got Int instead␤ in method postcircumfix:<[ ]> at /tmp/p3t8t7m8zu:1␤ in block <anon> at /tmp/p3t8t7m8zu:1␤ in <anon> at /tmp/p3t8t7m8zu:1␤»
masak sure, if you inherit from something that already has a postcircumfix:<{ }> method.
er, postcircumfix:<[ ]> 16:46
Radvendii: I should add that I don't believe many have done what you are now doing, so don't be too surprised if you stumble on a Big Fat Bug. 16:47
Radvendii masak: haha, i've been coming across them all over the place, i'm used to it by now 17:03
like, for example, this 'given' changing variables business
isn't it just supposed to be the equivalent of "{$_ = $x; ...}" for "given $x {...}"? 17:04
but i assume that's not exactly what it does...
17:07 pomysl left
eviltwin_b perl has a longstanding thing of *binding* variables in blocks, not copying. that is, $_ is an alias to $x there, not a copy of it 17:12
and therefore if $x is an lvalue, you can mutate it by assigning to $_ 17:13
17:13 icwiener left, icwiener joined
eviltwin_b (this is not new to perl6; for example, for/foreach has had binding (instead of copying) semantics going back to perl 3, at least) 17:15
Radvendii eviltwin_b: right, i know that. the problem is that simply the fact of calling given $x {} is changing $x. here's a good illustration. as soon as i enter the block, $x !~~ $_ 17:17
17:17 birdwindupbird left
Radvendii (evaluates to true) 17:17
17:18 pomysl joined, pomysl left, pomysl joined 17:20 icwiener left, icwiener joined
masak Radvendii: you're meant to run your good examples on p6eval, so that we can all see what goes wrong :) 17:23
Radvendii: in this case, I think you're misunderstanding how infix:<~~> works.
17:23 mucker left
masak Radvendii: in particular, don't use smartmatching when number equality or string equality will do. 17:24
if you're smartmatching against $_, it means you're confused.
Radvendii masak: nono, i did try ~~ (which does work for number comparison) but i also just printed out the values of the variables, and they were different. 17:26
17:26 samlh joined 17:27 pomysl left
Radvendii masak: the reason i'm not running it on p6eval is because it's integrated into my program and i'm having a hard time isolating the problem 17:27
and what operator should i use for equality testing if i dont know whether it's a number or a string... 17:28
masak probably smartmatch. 17:29
but not against $_ :)
Radvendii why not? 17:32
17:36 kaare__ joined 17:37 snearch left
masak because smartmatch already topicalizes on $_ 17:37
or am I confused? is that just for things like m// ? 17:38
moritz no, smartmatching always topicalizes
so if you use $_ on the RHS of the smart match operator, it refers to the LHS
nom: 42 ~~ say($_)
p6eval nom 9719f7: OUTPUT«42␤»
jnthn That's a neat idiom. It looks like the 42 is swimming towards the say 17:39
nom: 42 ~~ .say
tadzik :P
p6eval nom 9719f7: OUTPUT«42␤»
jnthn Even better!
tadzik masak: okay, so how do you find the new Usage? 17:43
17:44 pomysl joined, pomysl left, pomysl joined
Radvendii oh right! i remember that. then i must have used $_ as the LHS (e.g. $_ !~~ $i) but regardless, my problem still holds (i'm working on narrowing down the problem) 17:45
dalek kudo/usage-prints-WHY: c6024fe | tadzik++ | src/core/Main.pm:
Make default USAGE print .WHY for the documented candidates
17:46
17:46 mj41 left
jnthn tadzik: Seems like a nice idea 17:47
masak Radvendii: smartmatch is not symmetric. 17:51
Radvendii masak: i know... that's why i said "i must have used $_ as the LHS" because it evaluated to !~~ evaluated to True, and as we said <anything> !~~ $_ is False 17:52
17:54 kaare_ joined, kaare__ left
masak Radvendii: it's a pity you can't use p6eval to better show me what you mean. 17:56
Radvendii yeah
i'm working on it
masak oh, good.
17:57 samlh left, cooper left 17:59 samlh joined 18:00 cooper joined 18:02 Chillance joined
moritz you can always point p6eval to gist URLs 18:04
colomon is wondering when sorear++ is going to wake up... 18:08
Radvendii moritz: oh really? 18:12
i feel like my whole program wouldn't help very much, it's not *that* much but still...
i feel like my whole program wouldn't help very much, it's not *that* much but still... 18:21
aaaagh
sorry 'bout htat
nom: say ("a" but 5).perl #not very good for debugging purposes... 18:22
p6eval nom 9719f7: OUTPUT«"a"␤»
Radvendii it's hard to tell if there's something sneaky going on
masak then don't use .perl 18:28
nom: say ("a" but 5).WHAT
p6eval nom 9719f7: OUTPUT«Str+{<anon>}()␤»
18:29 Trashlord left
Radvendii o-o-oh 18:32
thanks :D 18:33
masak Radvendii: it seems your data is very confused. you're actually getting things in some context, and you don't know whether they're strings or numbers, and you don't know (but need to know) whether they've been overloaded with 'but'? 18:34
something tells me you're using power tools where precision tools would do you more good.
Radvendii nono, they're strings. i just wanted to be *sure* because i'm still getting a feel for the language 18:35
masak ah. 18:37
blog post! \o/ strangelyconsistent.org/blog/macros...ing-things 18:40
18:45 cognominal_ joined 18:47 cognominal left 18:51 Trashlord joined
bbkr1 Is it possible to provide decimal char range in regexp? for example I can write in hex <[\x20]>, but <[\d32]> is interpreted as digit,3,2. 18:56
Radvendii are there any multi-line comments in p6? 18:59
masak bbkr1: \c20
Radvendii: #`[ ...] or Pod. 19:00
Radvendii ooooooh
what's Pod?
bbkr1 masak++ 19:01
Radvendii what if i have a [] in the part that i am commenting? 19:02
19:03 Trashlord left
moritz nom: #`( foo ) say 42 19:03
p6eval nom 9719f7: OUTPUT«42␤»
Radvendii nom: #`( (foo) say "uh-oh"; ) say 42 19:04
p6eval nom 9719f7: OUTPUT«===SORRY!===␤Confused at line 1, near ") say 42"␤» 19:05
Radvendii that's to be expected
but it's not a very effective multi-line comment if a very common programming symbol trips it up
unless...
jnthn nom: #`[ (foo) say "uh-oh"; ] say 42
p6eval nom 9719f7: OUTPUT«42␤»
Radvendii ah
i was just about to test that
jnthn std: #`( (foo) say "uh-oh"; ) say 42
p6eval std 48335fc: OUTPUT«ok 00:01 108m␤» 19:06
Radvendii nom: #`# (foo) say "uh-oh"; # say 42
p6eval nom 9719f7: OUTPUT«42␤»
19:06 rindolf joined
rindolf Hi all. 19:06
jnthn Radvendii: There's a known nom-issue in quoting where it doesn't count nested pairs in places it should.
Radvendii rindolf: o/
jnthn o/ rindolf
jnthn goes to sort out some food
Radvendii jnthn: ah...
offby1 blueberries in the left, bread in the middle, cream on the right. 19:07
sorted!
rindolf Radvendii: what's up?
felher masak++ # again, this time for macro-hacking and bloging :) 19:10
19:13 Trashlord joined
masak ;) 19:16
moritz phenny: ask [Coke] which nom revisioin he for his t1 solution
phenny moritz: I'll pass that on when [Coke] is around.
Radvendii OH 19:17
phenny is a bot!
moritz aye, she is 19:18
Radvendii :P i'm the *sharpest* knife in the drawr
drawer*
rindolf: trying to figure out what is causing my bug 19:19
rindolf Radvendii: OK, which bug?
Radvendii rindolf: for some reason just declaring given $i {} is changing the *value* of $i... 19:20
rindolf Radvendii: ah, I see. 19:21
Radvendii rindolf: but what's really odd, is that $_ get's set to what $i _used_ to be
rindolf Radvendii: OK.
Radvendii: does a debugger for NQP code exist? 19:22
offby1 Radvendii: "drawr.com"! My new domain name! Thanks!
Radvendii offby1: haha, no problem. i'm surprised it's not already taken... 19:23
masak offby1: with a main menu item "not the sharpest knife"... :)
offby1 Radvendii: it is :-|
Radvendii aww... 19:24
offby1 I suspect all of the following are already claimed: English words that are nouns, derived from a transitive verb, by adding "-er", but then eliding the hyphen and the "e"
moritz perl6: say 'foo'.length
p6eval pugs b927740: OUTPUT«*** No such method in class Str: "&length"␤ at /tmp/r6CedB25lf line 1, column 5 - line 2, column 1␤»
..niecza v13-381-g4158fa9: OUTPUT«Unhandled exception: Unable to resolve method length in class Str␤ at /tmp/egHSeK1pJE line 1 (mainline @ 2) ␤ at /home/p6eval/niecza/lib/CORE.setting line 3609 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 3610 (module-CORE @ 62) ␤ at /hom…
..rakudo 9719f7: OUTPUT«Method 'length' not found for invocant of class 'Str'␤ in block <anon> at /tmp/7gN3WsaSPE:1␤ in <anon> at /tmp/7gN3WsaSPE:1␤»
Radvendii moritz: (.chars) 19:25
moritz Radvendii: I know, I know
Radvendii oh
okay
moritz Radvendii: I was just checking a fact for a p6cc submission
Radvendii offby1: yeah probably, everyone's grasping for domain names nowadays 19:26
moritz: Okay
19:26 birdwindupbird joined 19:27 bbkr1 left 19:34 samlh left, birdwindupbird left
sorear good * #perl6 19:37
phenny sorear: 13:53Z <colomon> tell sorear The last test of S05-grammar/protoregex.t has gone from needing a todo to needing a skip. I know this is what you were working on last night, so I thought I'd bring it to your attention before refudging.
19:38 jferrero left 19:41 GlitchMr42 left
colomon sorear: I discovered this morning that @*INC in niecza doesn't actually do anything 19:44
Radvendii YAY 19:45
masak: i distilled the error down
nom: sub foo ($a, $f) { if $f { foo('z', 0) }; given $a {say $a; say $_} }; foo('x', 1)
p6eval nom 9719f7: OUTPUT«z␤z␤z␤x␤»
masak Radvendii++ 19:46
that is the real deal.
masak submits rakudobug
19:47 birdwindupbird joined
Radvendii masak: yay :D 19:47
moritz perl6: sub foo ($a, $f) { if $f { foo('z', 0) }; given $a {say $a; say $_} }; foo('x', 1)
p6eval rakudo 9719f7: OUTPUT«z␤z␤z␤x␤»
..pugs b927740, niecza v13-381-g4158fa9: OUTPUT«z␤z␤x␤x␤»
masak is surprised we still have this kind of lexpad bug 19:49
Radvendii assumes lexpad has to do with lexical scopes?
moritz yes 19:50
Radvendii cool
19:50 jferrero joined
masak Radvendii: if I had to guess, what you're seeing is the given block anchoring to the lexpad of the first invocation, and then when the lookup for $a is done in the second invocation, it finds the wrong -- the old -- OUTER for the given block. 19:52
at least that's a hypothesis consistent with the data. 19:53
fsergot good night! o/ 20:00
20:00 fsergot left
masak Radvendii: rt.perl.org/rt3/Ticket/Display.html?id=109322 20:01
jnthn Yes, it's another upshot of the FAIL of doing lexical capture at block entry. 20:10
At first glance.
masak but "doing lexical capture at block entry" sounds like it should work in this case. but it doesn't. 20:11
Radvendii slightly unrelated but: why do we even use "given" wouldn't "for" do the same thing on a scalar?
masak it would. 20:13
but not on a list.
also, 'for' has loop semantics; 'given' doesn't. 20:14
Radvendii oh, that makes sense 20:16
[Coke] phenny: tell moritz t1 should run on This is perl6 version 2012.01-2-g3ddd2fb built on parrot 3.11.0 revision RELEASE_3_11_0
phenny [Coke]: I'll pass that on when moritz is around.
[Coke]: 19:16Z <moritz> ask [Coke] which nom revisioin he for his t1 solution
colomon also sometimes it's important to say what you mean. :)
moritz [Coke]: thanks 20:17
phenny moritz: 20:16Z <[Coke]> tell moritz t1 should run on This is perl6 version 2012.01-2-g3ddd2fb built on parrot 3.11.0 revision RELEASE_3_11_0
Radvendii colomon: right... 20:18
[Coke] moritz: hopefully it works. It's the only I'll get around to submitting ;) 20:19
for your sake I hope I'm disqualified from winning. ;) 20:20
also, it's kind of lame. I feel like I wrote you some Java. :(
moritz [Coke]: my first run gave some errors, but I'm unable to reproduce it. Now it seems to work fine, albeit slow
Radvendii nom: sub foo ($a, $f) { if $f { foo('z', 0) }; {$_:=$a; say $a; say $_} }; foo('x', 1) #does it work explicitly?
p6eval nom 9719f7: OUTPUT«===SORRY!===␤Cannot use bind operator with this left-hand side␤at /tmp/xS1arfAU_K:1␤»
Radvendii aw, c'mon 20:21
[Coke] moritz: well, on the plus side, it'll run that slow no matter what number you pass to it!
Radvendii nom: sub foo ($a, $f) { if $f { foo('z', 0) }; {$_=$a; say $a; say $_} }; foo('x', 1) #does it work explicitly?
p6eval nom 9719f7: OUTPUT«z␤z␤z␤z␤» 20:22
Radvendii ooh. that's even worse...
moritz [Coke]: all solution have that in common
masak Radvendii: but it has exactly the same cause. 20:23
Radvendii masak: yup... i just realized that
i thought it maybe had to do with the "given" statement itself 20:24
masak me too.
no, it's just blocks inside reentrant blocks. 20:25
masak updates ticket
20:25 icwiener left, icwiener joined 20:33 shinobicl_ left 20:45 shinobicl_ joined 20:53 spine joined 21:03 birdwindupbird left
spine oh crap, I missed the p6cc deadline... 21:18
well was fun anyways :) 21:19
moritz spine: I kinda think it's still open until midnight UTC 21:21
masak: is that right?
shinobicl_ rakudo: class D2 is Date { }; my D2 $d2 = D2.new("2011-01-02"); say $d2.perl; say $d2.WHAT; 21:22
p6eval rakudo 9719f7: OUTPUT«Date.new(2011, 1, 2)␤D2()␤»
shinobicl_ why the 1st say reports "Date"? shouldn't that be "D2.new"? 21:23
spine moritz: well, strangelyconsistent.org made it seem like it's over :)
21:23 rindolf left
Radvendii shinobicl_: maybe p6 is smart enough to know that it can generalize to a Date object? 21:24
hmm... that shouldn't be it though
moritz no, the .perl method simply doesn't take inheritance into account 21:26
moritz -> sleep
21:26 y3llow_ joined, pothos_ joined
moritz one might argue that you have to write your own .perl if you subclass a value type 21:26
some for
21:27 pothos left
moritz nom: class A is Str { }; say A.new.perl 21:27
p6eval nom 9719f7: OUTPUT«""␤»
moritz -> really sleep
Radvendii nom: $_ = 5; say <w b>.grep: -> $x {$_}) 21:28
p6eval nom 9719f7: OUTPUT«===SORRY!===␤Confused at line 1, near ")"␤»
Radvendii nom: $_ = 5; say <w b>.grep: -> $x {$_}
p6eval nom 9719f7: OUTPUT«w b␤»
Radvendii hahaha
it puts it in $x and $_?
21:28 y3llow left 21:29 y3llow_ left
Radvendii nom: $_ = 5; say <a b c d e f>.grep: -> $x, $y {$_} 21:29
p6eval nom 9719f7: OUTPUT«Not enough positional parameters passed; got 1 but expected 2␤ in block <anon> at /tmp/wpi18hPfn3:1␤ in method ACCEPTS at src/gen/CORE.setting:1333␤ in method reify at src/gen/CORE.setting:4474␤ in method reify at src/gen/CORE.setting:4379␤ in method reify at src…
21:29 y3llow joined, pothos_ left 21:30 pothos joined
Radvendii nom: $_ = 5; say <a b c d e f>.map: -> $x, $y {$_} 21:30
p6eval nom 9719f7: OUTPUT«5 5 5␤»
Radvendii nom: $_ = 5; say <a b c d e f>.map: -> $x {$_}
p6eval nom 9719f7: OUTPUT«5 5 5 5 5 5␤»
21:30 kaare_ left
Radvendii nom: $_ = 5; eager <a b>.grep: -> $x {.say} 21:31
p6eval nom 9719f7: OUTPUT«5␤5␤»
21:31 y3llow left
Radvendii there we go 21:31
good
it doesn't overwrite $_
21:32 y3llow joined 21:33 pothos left, pothos joined, y3llow left 21:34 y3llow joined 21:36 y3llow left, y3llow joined
masak no, it's only for re-entrant scopes. 21:39
like a sub calling itself.
21:45 hundskatt joined
Radvendii i know, i was just wondering if .map made $_ refer to the arguments it passes _even_ if i specify parameters 21:48
apparently not
which is good
nom: my $a = 5; $_=$a; when Int { say "this works" } #possible temprorary replacement for given? 21:50
p6eval nom 9719f7: OUTPUT«this works␤»
Radvendii nom: sub foo ($a, $f) { if $f { foo('z', 0) }; $_=$a; say $a; say $_ }; foo('x', 1) #does it work explicitly? 21:51
p6eval nom 9719f7: OUTPUT«z␤z␤x␤x␤»
Radvendii okay
that'll work for now
masak Radvendii++ # workaround
'night, #perl6 21:52
Radvendii o/ masak
21:53 icwiener left
Radvendii nom: say True || False && False 22:17
p6eval nom 9719f7: OUTPUT«Bool::True␤»
Radvendii ## && binds tighter than ||
22:18 cooper left 22:19 Tenzen joined
Radvendii what is the conventional style/indentation format for writing complex logic... 22:19
22:19 cooper joined
Radvendii like <expression> || (<exp2> && (<exp3 || <exp4>)) 22:19
sorear typically, you avoid writing logic expressions more than a few lines 22:27
Radvendii dang 22:32
sorear phenny: tell colomon Do what you will with protoregex.t; it's not actually testing what it says it is, because of different anchoring rules 22:34
phenny sorear: I'll pass that on when colomon is around.
Radvendii nom: my $x=0; while($x<2) repeat { say $x++} 22:51
p6eval nom 9719f7: OUTPUT«===SORRY!===␤Confused at line 1, near "while($x<2"␤»
Radvendii nom: my $x=0; while $x<2 repeat { say $x++}
p6eval nom 9719f7: OUTPUT«===SORRY!===␤Missing block at line 1, near "repeat { s"␤»
Radvendii nom: my $x=0; repeat { say $x++} while $x<2 22:52
p6eval nom 9719f7: OUTPUT«0␤1␤»
22:53 bkolera left
sorear starts trying to do setting summarization 22:55
s/setting/changelog/
23:00 cognominal_ left 23:01 cognominal joined
Radvendii expected Array+{MyQs} but got Array+{MyQs} instead 23:03
:P
umm... say what?
23:11 PacoAir left
sorear sounds like you have two classes with the same name 23:12
a common danger of creating classes at runtime...
colomon sorear: roger, roger 23:15
phenny colomon: 22:34Z <sorear> tell colomon Do what you will with protoregex.t; it's not actually testing what it says it is, because of different anchoring rules
Radvendii sorear: but i'm not... oh, are you refering to the "but MyQs" syntax? 23:18
dalek ast: 8e86311 | (Solomon Foster)++ | S05-grammar/protoregex.t:
Refudge for latest niecza.
23:21
jnthn -> sleep, long day coming up tomorrow... 23:22
23:34 ggoebel left
sorear Radvendii: ye 23:37
felher masak: thnx for your gist.github.com/1548053 . Was nice to read :) 23:38
felher off
23:39 ggoebel joined
dalek ecza: 989c185 | sorear++ | docs/announce.v14:
First half of changelog summarization
23:46
ast: 9c25355 | (Solomon Foster)++ | S02-magicals/env.t:
Refudge for latest niecza.
23:52
23:52 spine left 23:58 Yary joined