Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2011-12-09

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:07 shinobicl_ joined #perl6
00:11 dalek roast: fbb9534 | moritz++ | S (11 files):
00:11 dalek roast: rakudo unfudges
00:11 dalek roast: review: https://github.com/perl6/roast/commit/fbb95345a2
00:32 pat_js joined #perl6
00:37 drbean joined #perl6
00:58 drbean joined #perl6
01:01 [Coke] moritz++
01:27 skangas joined #perl6
01:29 Sarten-X joined #perl6
01:31 shinobicl_ left #perl6
01:35 plutoid joined #perl6
01:41 benabik joined #perl6
01:42 envi_ joined #perl6
01:56 drbean joined #perl6
02:21 replore_ joined #perl6
02:29 orafu joined #perl6
02:48 wolfman2000 joined #perl6
03:23 Radvendii joined #perl6
03:27 Radvendii i have a question... is anyone here to answer it?
03:28 colomon sure
03:28 colomon though no promises
03:29 colomon :)
03:29 Radvendii of course, i've just spoken to an empty channel one to many times...
03:30 Radvendii how can i define an infix subroutine • that does exactly the same thing as * (multiplication) and then redefine the * operator to do ** (exponents)?
03:30 colomon right, you were asking that earlier.
03:30 Radvendii oh, did you not know?
03:30 colomon too busy to answer, and not sure about it.
03:30 colomon but thinking now, it's a tricky question, I think
03:31 colomon basic answer is probably no
03:31 colomon but there may be ways of doing it I'm not familiar with.
03:31 Radvendii dang. no way to rename an operator?
03:32 colomon The thing is, infix:<*> is a multi
03:32 Radvendii so i can't trivially replace it wiht •... and there's no rename sub command?
03:33 colomon so at a first approximation, if you define an infix:<*>, it will just be another multi
03:33 Radvendii can't i do "our sub infix:<•> := &[*]"?
03:33 colomon I've not heard of a rename sub command.  (Which is not the same as it not existing at all!)
03:34 colomon That's the thing... there are a whole bunch of sub infix:<*>
03:34 Radvendii that's why i used :=
03:35 colomon TimToady's really the one to be answering this.
03:35 Radvendii okay
03:35 Radvendii TimToady: are you here?
03:35 colomon I'm pretty sure you can override normal functions.
03:36 colomon at least in theory (and in limited scope)
03:36 Radvendii i know you can. the quesiton is can you copy all of the functionality
03:36 colomon oh sure, that's easy
03:37 colomon as an example:
03:38 colomon nom: sub foo($x) { say "foo $x" }; sub bar($x) { foo($x); }; { my sub foo($x) { say "different foo $x"; }; foo("a"); bar("b"); };
03:38 p6eval nom a2f3f4: OUTPUT«different foo a␤foo b␤»
03:38 colomon nom: sub foo($x) { say "foo $x" }; sub bar($x) { foo($x); }; { my sub foo($x) { say "different foo $x"; }; foo("a"); bar("b"); }; foo("g");
03:38 p6eval nom a2f3f4: OUTPUT«different foo a␤foo b␤foo g␤»
03:38 colomon there you are
03:38 colomon but I don't know how that interacts with multis
03:39 Radvendii right. i meant with all of the multis
03:39 colomon certainly you could do infix:<•>($a, $b) { $a * $b } and that would work
03:40 colomon with all the multis
03:40 colomon but I don't know how override the default infix:<*> after that
03:40 colomon or even if it is possible
03:41 Radvendii oh. i see
03:41 Radvendii :(
03:41 colomon like I said, doesn't mean it's not possible
03:41 Radvendii mhmm
03:41 Radvendii i'll ask again later
03:42 colomon I can kind of imagine doing a new proto in a scope, or something like that, but I've never heard of it being done...
03:43 Radvendii haha. i it would make it hard to use perl eslewhere. i
03:43 Radvendii i'd have to make a module and take it everywhere with me
03:44 colomon yeah, if you ask me the wisdom of overriding basic operators, I think it's a Very Bad Idea.  :)
03:44 colomon but I kind of hope it is still possible.
03:44 Radvendii mhmm
03:46 Radvendii how do i make a continous range? like 1.4 ~~ 1..3 would match true.
03:46 colomon Perl makes it possible to do all sorts of crazy things, but there is a strong convention that operators should have strict meanings.
03:46 colomon nom: say 1.4 ~~ 1..3
03:46 p6eval nom a2f3f4: OUTPUT«Bool::True␤»
03:47 colomon It's as easy as that
03:48 colomon back to the other thing, maybe strict meanings isn't quite right.  But for instance, lots of languages overload infix:<+> for string concatenation.
03:48 colomon Perl 6 says "No way, that is a fundamentally different operation and should be a different operator."  (infix:<~>, to be precise)
03:49 colomon trying to make infix<*> be the power operator is very much against the spirit of that.
03:51 colomon gotta go to bed now.  keep trying stuff!
04:09 donri left #perl6
04:11 Radvendii thanks.
04:12 PerlJam Do we have an advent post for tomorrow? (today)
04:16 * PerlJam assumes for the time being that colomon's post is it and starts thinking about the day after tomorrow
04:27 jimmy1980 joined #perl6
04:27 packetknife joined #perl6
04:28 Radvendii someone should make a macport of rakudo...
04:49 sorear good * #perl6
04:55 overrosy joined #perl6
05:17 mkramer joined #perl6
05:17 mkramer left #perl6
05:28 djanatyn developing a small site with Dancer is so pleasant, but I still wish I could use perl6 features
05:42 sorear PerlJam: you mean "Improving Niecza"?
05:47 sorear .u ••
05:47 phenny U+2022 BULLET (•)
05:47 phenny U+2022 BULLET (•)
05:48 sorear niecza: sub infix:<•> is equiv<*> ($x, $y) { CORE::infix<*>($x,$y) }; sub infix:<*>($x,$y) is equiv<**> { $x ** $y }; say 1 + 2 • 3 + 4
05:48 p6eval niecza v12-7-g6243435: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Lexical symbol '&infix:<*>' is already bound to an outer symbol (see ??? line 0);â�¤  the implicit outer binding at line 1 must be rewritten as &infix:<*>â�¤  before you can unambiguously declare a new '&infix:<*>' in this scope …
05:49 sorear niecza: sub infix:<•> is Niecza::absprec<u=> ($x, $y) { CORE::infix<*>($x,$y) }; sub infix:<*>($x,$y) is equiv<**> { $x ** $y }; say 1 + 2 • 3 + 4
05:49 p6eval niecza v12-7-g6243435: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Undeclared name:â�¤ 'CORE::infix' used at line 1â�¤â�¤Potential difficulties:â�¤  &infix:<*> is declared but not used at /tmp/CNKHnd_cvd line 1:â�¤------> [32m{ CORE::infix<*>($x,$y) }; sub infix:<*>[33mâ��[31m($x,$y) is equiv<**> { $…
05:49 sorear niecza: sub infix:<•> is Niecza::absprec<u=> ($x, $y) { CORE::infix:<*>($x,$y) }; sub infix:<*>($x,$y) is equiv<**> { $x ** $y }; say 1 + 2 • 3 + 4
05:49 p6eval niecza v12-7-g6243435: OUTPUT«Potential difficulties:â�¤  &infix:<*> is declared but not used at /tmp/dOerkPTRNj line 1:â�¤------> [32m CORE::infix:<*>($x,$y) }; sub infix:<*>[33mâ��[31m($x,$y) is equiv<**> { $x ** $y }; say 1[0mâ�¤â�¤Unhandled exception: Unable to resolve method postcircumfi…
05:49 sorear niecza: sub infix:<•> is Niecza::absprec<u=> ($x, $y) { (&CORE::infix:<*>).($x,$y) }; sub infix:<*>($x,$y) is equiv<**> { $x ** $y }; say 1 + 2 • 3 + 4
05:49 p6eval niecza v12-7-g6243435: OUTPUT«Potential difficulties:â�¤  &infix:<*> is declared but not used at /tmp/bqeoBAZQPk line 1:â�¤------> [32mORE::infix:<*>).($x,$y) }; sub infix:<*>[33mâ��[31m($x,$y) is equiv<**> { $x ** $y }; say 1[0mâ�¤â�¤Unhandled exception: Unable to resolve method postcircumfi…
05:50 sorear niecza: sub infix:<•> is Niecza::absprec<u=> ($x, $y) { (&CORE::infix:<*>).($x,$y) }; sub infix:<*>($x,$y) is equiv<**> { $x ** $y }; say 1 + 2 • 3 + 4; say 5 * 2;
05:50 p6eval niecza v12-7-g6243435: OUTPUT«Unhandled exception: Unable to resolve method postcircumfix:<( )> in class Any␤  at /tmp/Ltmu5HM8GS line 1 (infix:<•> @ 2) ␤  at /tmp/Ltmu5HM8GS line 1 (mainline @ 1) ␤  at /home/p6eval/niecza/lib/CORE.setting line 2225 (ANON @ 2) ␤  at /home/p6eval/niecza/…
05:50 sorear niecza: sub infix:<•> is Niecza::absprec<u=> ($x, $y) { CORE::('&infix:<*>').($x,$y) }; sub infix:<*>($x,$y) is equiv<**> { $x ** $y }; say 1 + 2 • 3 + 4; say 5 * 2;
05:50 p6eval niecza v12-7-g6243435: OUTPUT«11␤25␤»
05:50 sorear weird
05:51 sorear I wonder why it wasn't working with staticer lookup
05:56 * sorear is looking through eir Compose file, finds <Multi_key> <C> <C> <C> <P>
05:58 alvis joined #perl6
06:00 kaleem joined #perl6
06:07 dalek rakudo/nom: 1a9a4a5 | moritz++ | src/core/Num.pm:
06:07 dalek rakudo/nom: return integers from rounders
06:07 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1a9a4a5993
06:07 dalek rakudo/nom: 638029b | moritz++ | t/spectest.data:
06:07 dalek rakudo/nom: run perl.t
06:07 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/638029b80f
06:08 moritz good morning
06:14 odoacre joined #perl6
06:14 sorear good morning moritz
06:17 JimmyZ joined #perl6
06:18 JimmyZ good morning, moritz
06:18 JimmyZ moritz: 638029b80f is bad ?
06:22 molaf joined #perl6
06:24 jimmy1980 joined #perl6
06:29 dalek rakudo/nom: 011993e | moritz++ | t/spectest.data:
06:29 dalek rakudo/nom: remove conflict marker, JimmyZ++
06:29 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/011993e1e2
06:43 JimmyZ joined #perl6
06:44 JimmyZ phenny: tell moritz  S02-names-vars/list_array_perl.t still is lost
06:44 phenny JimmyZ: I'll pass that on when moritz is around.
06:45 moritz JimmyZ: you can just talk to me :-)
06:45 phenny moritz: 06:44Z <JimmyZ> tell moritz  S02-names-vars/list_array_perl.t still is lost
06:45 * JimmyZ thought moritz  is away
06:47 dalek rakudo/nom: 6d0867e | moritz++ | t/spectest.data:
06:47 dalek rakudo/nom: fix t/spectest.data, JimmyZ++ again
06:47 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6d0867eb50
06:53 koban joined #perl6
07:05 grondilu joined #perl6
07:05 grondilu thumbs up for jnthn who has reimplemented the custom postfix operators feature in no time!
07:06 grondilu you guys are just great.  I just can't wait to see the whole thing running with 100% feature.
07:07 jimmy1980 joined #perl6
07:10 moritz there's a solution to not being able to wait :-)
07:11 jeffreykegler joined #perl6
07:11 grondilu yeah sometimes I try to help by looking at the code but I must confess it's quite hard to grasp.  But I'll keep trying.
07:11 moritz grondilu++
07:12 moritz grondilu: I found it easier to start with tests than with the compilers directly
07:12 grondilu by the way, what's the difference between the *.t and the *.rakudo files in the test dir?
07:14 grondilu (I guess the explaination is somewhere in the doc but I haven't found it yet)
07:15 moritz grondilu: the .rakudo files are generated from the .t files by t/spec/fudge
07:15 moritz grondilu: the test file contain  #?rakudo skip 'reason'   markers
07:16 grondilu ok
07:16 moritz grondilu: and t/spec/fudge interprets those, and actually skips the test files
07:32 jnthn morning
07:36 jnthn moritz: thanks for the various unfudgings. I think there's some operator overloading related tests in S06 too...I'd hoped we may be able to run those again with the operator bits.
07:38 tadzik good morning
07:39 jnthn hi tadzik
07:50 replore_ joined #perl6
07:51 koban left #perl6
07:55 mj41 joined #perl6
08:08 jimmy1980 joined #perl6
08:19 wtw joined #perl6
08:37 Sarten-X joined #perl6
08:51 daxim joined #perl6
08:54 pat_js joined #perl6
09:00 pat_js /msg p6eval perl6: my &tag = {"<$^tag>$^that<$^tag>"}; tag 'b', "hallo 6"
09:02 pat_js perl6: my &tag = {"<$^tag>$^that<$^tag>"}; tag 'b', "hallo perl6"
09:02 p6eval rakudo 6d0867: OUTPUT«Method 'at_key' not found for invocant of class 'Str'␤  in method postcircumfix:<{ }> at src/gen/CORE.setting:1136␤  in block <anon> at /tmp/HxYm7qDF0h:1␤  in block <anon> at /tmp/HxYm7qDF0h:1␤  in <anon> at /tmp/HxYm7qDF0h:1␤»
09:02 p6eval ..niecza v12-7-g6243435: OUTPUT«Unhandled exception: Cannot use hash access on an object of type Str␤  at <unknown> line 0 (ExitRunloop @ 0) ␤  at /home/p6eval/niecza/lib/CORE.setting line 248 (Any.at_key @ 6) ␤  at <unknown> line 0 (ExitRunloop @ 0) ␤  at /tmp/gNRVJXfugu line 1 (ANON @ 1…
09:02 p6eval ..pugs b927740: OUTPUT«*** Can't modify constant item: VStr "MkCode {isMulti = True, subName = \"&\", subType = SubPrim, subOuterPads = [], subInnerPad = MkPad (padToList []), subPackage = , subAssoc = AIrrelevantToParsing, subParams = [], subBindings = [], subSlurpLimit = [], subReturns …
09:03 pat_js ah sorry, read error messages properly, and you get what's going on…
09:11 HarryS joined #perl6
10:01 odoacre joined #perl6
10:29 jimmy1980 joined #perl6
10:41 jimmy1980 joined #perl6
10:55 moritz jnthn: fwiw I sometimes get an error like this:
10:56 moritz No applicable candidates found to dispatch to for 'Numeric'. Available candidates are:
10:56 moritz which doesn't mention the invocant type
10:56 moritz jnthn: would be helpful for debugging to know the invocant type
10:58 moritz seems to come from src/binder/multidispatch.c line 785
11:07 jnthn moritz: hmm...it'd be nice if it told you the types of all the args really
11:12 moritz troo
11:15 dalek roast: d4b6b16 | moritz++ | S06- (3 files):
11:15 dalek roast: rakudo fudges
11:15 dalek roast: review: https://github.com/perl6/roast/commit/d4b6b16d41
11:15 dalek rakudo/nom: 0eed6ff | moritz++ | t/spectest.data:
11:15 dalek rakudo/nom: run operator overloading tests
11:15 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0eed6ff1e6
11:16 moritz nom: sub postcircumfix:<foo bar>(|$) { say 42 }; foo 1 bar
11:16 p6eval nom 6d0867: OUTPUT«===SORRY!===␤Cannot add tokens of category 'postcircumfix' with a sub␤»
11:16 moritz nom: multi sub postcircumfix:<foo bar>(|$) { say 42 }; foo 1 bar
11:16 p6eval nom 6d0867: OUTPUT«===SORRY!===␤Cannot add tokens of category 'postcircumfix' with a sub␤»
11:16 moritz nom: multi sub circumfix:<foo bar>(|$) { say 42 }; foo 1 bar
11:16 p6eval nom 6d0867: OUTPUT«===SORRY!===␤Confused at line 1, near "foo 1 bar"␤»
11:16 moritz nom: multi sub circumfix:<` `>(|$) { say 42 }; `1`
11:16 p6eval nom 6d0867: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine 'circumfix:<` `>' called (line 1)␤»
11:27 jnthn I know postcircumfix doesn't work, but I'm more surprised about circumfixes...
11:30 jnthn oh...there's surely a missing &
11:31 arlinius joined #perl6
11:33 jnthn moritz: maybe try changing line 2632 in Grammar.pm to have :name('&' ~ $subname)
12:13 tokuhirom joined #perl6
12:16 shinobicl left #perl6
12:22 * moritz tries
12:28 fridim_ joined #perl6
12:36 dalek rakudo/nom: 68d0b8f | moritz++ | src/Perl6/Grammar.pm:
12:36 dalek rakudo/nom: fix circumfix dispatch, jnthn++
12:36 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/68d0b8fceb
12:41 moritz erm, s/dispatch/lookup/
12:43 jimmy1980 joined #perl6
12:44 alim joined #perl6
12:48 flussence is zavolaj usable in nom yet? I haven't been paying much attention lately...
12:49 alim joined #perl6
12:54 tadzik yes, it is
12:55 tadzik not sure if it passes its tests though
12:55 tadzik istr it needs new tests :P
12:55 flussence well, tests definitely don't pass here...
13:07 icwiener joined #perl6
13:07 jnthn zavolaj works well for various cases
13:07 jnthn not arrays
13:08 jnthn (yet)
13:09 jnthn and yeah, I need to look at the tests.
13:12 flussence the bit that concerns me is seeing "No applicable candidates found to dispatch to for 'trait_mod:<is>'.", when it tries to do "is native()"
13:26 jnthn flussence: I didn't add support for being able to call into functions within the current executable yet
13:26 jnthn so it always expects a name
13:27 flussence hm, would changing that to "is native('libc.so')" or something similar work then?
13:28 flussence (I could try it myself, but I'm waiting for rakudo to compile...)
13:28 jnthn yeah
13:28 jnthn well, probably
13:28 flussence oh. ran out of RAM.
13:28 jnthn That's baaaaad.
13:29 flussence meh
13:29 jnthn How much ram do ewe have?
13:30 flussence not as much as I woold like (ok, 1GB and I forgot I had a browser open :)
13:30 moritz last I looked, I needed about 1.5G on a 64bit system
13:31 * jnthn really needs to work out where that's all going
13:31 moritz mls_: any ideas on how to a memory profiler on parrot? :-)
13:32 moritz hm, can't we track allocations in the 6model constructors someehow?
13:32 hrj joined #perl6
13:32 flussence .oO( maybe it's time for a new netbook. 1st-gen Atom isn't exactly fast )
13:33 jnthn moritz: yes, I can instrument the repr stuff
13:34 jnthn moritz: Though PAST ain't 6modelized yet
13:34 jnthn Which is likely part of why the nodes cost some..
13:40 dalek roast: 60bb371 | moritz++ | S06-operator-overloading/sub.t:
13:40 dalek roast: unfudge circumfix test for rakudo
13:40 dalek roast: review: https://github.com/perl6/roast/commit/60bb371c24
13:46 moritz jnthn: afaict the current compilation model is to build the complete PAST tree for the file (or eval) first, and then compile that to PIR. Can we somehow change it to compile each statement to PIR, and discards its PAST, keeping the declarational parts in the symbol table?
13:47 JimmyZ joined #perl6
13:53 jnthn moritz: not really
13:53 jnthn moritz: we need the compilation unit to be fully done before we pass it off tot he optimizer
13:54 jnthn moritz: in reality our PAST tree simply should not be taking up so much memory
13:54 jnthn And we could do with not keeping all the match objects around.
13:54 jnthn Those are the things I wish we could mroe easily throw out.
13:54 jnthn *more
13:57 moritz well, we only need $.orig and $.pos from $/ for the error messages
13:59 jnthn right.
14:00 jnthn PAST notes are a bit heavier than would be ideal at the moment, though.
14:01 jnthn er, nodes
14:01 moritz .oO( the music of the PAST notes )
14:03 thundergnat joined #perl6
14:13 thundergnat Hi #perl6.
14:13 PerlJam greetings thundergnat
14:13 thundergnat I've got some free time over the christmas season so am trying to get some perl6 hacking in.
14:13 PerlJam thundergnat++
14:13 thundergnat I've been running into some odd problems though.
14:14 colomon has anyone come up with an Advent post for today, or is my spare post going to go live?
14:14 moritz colomon: please activate your spare post
14:14 PerlJam colomon: looks like you're it
14:14 thundergnat I am augmenting a base class with a new method. If I do it in a module and then C<use> that module, it autogenerates a sub call to match the method.
14:14 colomon moritz: okay, want to write a last paragraph first.  :)
14:14 thundergnat However if I augment the class within the script, the sub isn't generated.
14:15 thundergnat rakudo: https://gist.github.com/1451638
14:15 p6eval rakudo 68d0b8: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&nsort' called (line 23)␤»
14:15 thundergnat Furthermore, it then doesn't allow me to add the sub in as a multi.
14:15 thundergnat "A symbol &nsort has already been exported"
14:16 PerlJam thundergnat: the "autogenerates a sub" part doesn't sound right to me.
14:17 thundergnat If I put the augment into a separate module and load it with use whatever; It autogenerates a sub.
14:18 thundergnat Or at least it allows calling the method with subroutine calling conventions.
14:19 moritz PerlJam: that's what 'is export' on a method does
14:19 thundergnat @array.nsort vs. nsort(@array)
14:19 PerlJam yeah, I didn't look at the code until just now
14:20 moritz thundergnat: looks like a rakudobug
14:20 thundergnat It seems like it isn't happening if the augmented method is defined within the script it is called from.
14:20 jnthn where is it imported if it's in the same script
14:20 moritz thundergnat: though I'm surprised you want to do it that way; I'd rather have a *@ signature in the sub
14:21 Sarten-X joined #perl6
14:22 thundergnat I'm open to suggestions. I'm still kind of fumbling around.
14:23 moritz I'd also not use augment on Any in a library; it's really bad style and infests all scopes, not just the scope that user loads the library into
14:24 thundergnat Yeah, that is certainly a shotgun approach.
14:26 PerlJam It's worked for Ruby so far :)
14:28 colomon it's live: http://perl6advent.wordpress.com/2011/12/09/day-9-contributing-to-perl-6/
14:30 PerlJam colomon++
14:31 moritz PerlJam: ... except when not :-)
14:32 PerlJam well ... it all depends on how you define "worked"  :)
14:33 tadzik weekend! \o/
14:33 moritz \o/ indeed
14:34 tadzik time for hacking, advent blogging and cheeseburgers
14:34 tadzik when's the next free slot?
14:34 moritz tadzik: would you have time to prepare an advent post on POD over the weekend?
14:34 moritz ah, tomorrow :-)
14:34 tadzik sure
14:34 tadzik I can write it tomorrow
14:34 tadzik or today due tomorrow
14:34 moritz that would be really great
14:35 colomon \o/
14:35 dalek mu: d6512b7 | colomon++ | misc/perl6advent-2011/schedule:
14:35 dalek mu: Added day 9 to the list after the fact.  :)
14:35 dalek mu: review: https://github.com/perl6/mu/commit/d6512b7e8a
14:35 colomon tadzik++
14:35 thundergnat moritz: The reason I chose to augment Any was I wanted nsort (natural sort) to have the same scope as sort... and that IS a method of Any. So, perhaps ill advised, but not unreasonable IMO.
14:36 moritz thundergnat: reasonableness is a matter of point of view
14:36 moritz :-)
14:36 thundergnat Not saying you are wrong, just explaining my reasoning. :-)
14:36 moritz sure sure
14:40 colomon hey, can we use dashes in grammar method names yet?
14:41 * PerlJam wasn't aware that we couldn't
14:41 dalek mu: 6ebc0c7 | tadzik++ | misc/perl6advent-2011/schedule:
14:41 dalek mu: Claim 10th with Pod
14:41 dalek mu: review: https://github.com/perl6/mu/commit/6ebc0c7449
14:41 colomon PerlJam: it didn't work in b
14:41 tadzik this github has a nice editor
14:41 colomon leading to a lot of IMO ugly underscores in the ABC grammar
14:42 colomon tadzik: yeah, it's really handy for things like adding one line to a text file.  :)
14:42 tadzik yeah :)
14:47 mkramer joined #perl6
14:53 Radvendii joined #perl6
14:55 JimmyZ joined #perl6
14:57 xuebo joined #perl6
15:09 Trashlord joined #perl6
15:11 mkramer joined #perl6
15:12 * [Coke] throttles oracle 11g. "unicode shouldn't be this hard!"
15:12 Juerd Oh, it's very simple. Just utf-8 encode everything and store it in base64
15:12 Juerd Works everywhere!!!1
15:13 moritz :/
15:15 flussence I'm trying to get the NativeCall stuff I wrote last year working again, which means undoing all the tricks I did to make the code look readable :(
15:16 [Coke] Juerd: I'm querying LDAP from inside pl/sql
15:25 mkramer joined #perl6
15:27 dudulz joined #perl6
15:30 mux_ joined #perl6
15:31 Psyche^ joined #perl6
15:35 moritz what could possibly go wrong :-)
15:41 simcop2387 joined #perl6
15:42 plutoid joined #perl6
15:49 * jnthn heads to the station to go home
15:49 jnthn bbi5h
16:07 mkramer joined #perl6
16:12 MayDaniel joined #perl6
16:13 mkramer joined #perl6
16:20 icwiener joined #perl6
16:26 moritz http://blogs.usenix.org/2011/12/06/perl-6-for-users-and-sysadmins/ # just discovered this one on twitter
16:26 mkramer1 joined #perl6
16:28 PerlJam "raduko Perl 6 interpreter" [sic]
16:30 jimmy1980 joined #perl6
16:31 MayDaniel joined #perl6
16:36 mkramer joined #perl6
16:36 thou joined #perl6
16:39 JimmyZ nice post
16:39 * JimmyZ sleeps
16:41 mkramer1 joined #perl6
16:53 ashleydev I had in interesting conversation about the perl 6 type system last night
16:53 ashleydev my friend said that it's going to lead to choice paralisys
16:53 ashleydev "do I annotate or not"
16:54 PerlJam your friend is wrong :)
16:54 ashleydev he compared it to python -- do you compile the regex or not
16:54 ashleydev makes the user think a lot more about writing the same code, having to make more choices
16:54 TimToady choice paralysis tends to arise primarily in those who are used to living under totalitarian societies
16:54 phenny TimToady: 08 Dec 21:57Z <japhb> ask TimToady Would you mind taking a look at http://perlcabal.org/syn/S12.html#Abstract_vs_Concrete_types in the context of the discussion starting at http://irclog.perlgeek.de/perl6/2011-12-08#i_4808300 and clarifying your current intent?
16:54 ashleydev of when to use types or not
16:56 ashleydev TimToady: so about 1/2 the planet?
16:56 TimToady yep :)
16:56 moritz ashleydev: it's a simple matter of experience
16:56 ashleydev that's not that simple for the noob
16:57 TimToady the noob will leave off the types, generally
16:57 moritz ashleydev: in the beginning, people tend to over-type, then they notice that it makes problems, and reduce the number of type annotations
16:57 ashleydev moritz: agreed.
16:57 PerlJam heh
16:57 TimToady well, depends on their background, and surrounding type culture
16:57 * PerlJam thinks more like TimToady in this regard.
16:57 ashleydev but it still makes more decisions and mental motions for the noob
16:57 PerlJam the historical Perl default is "no types"
16:58 moritz ashleydev: as do any advanced concepts. You can advice the noob to ignore them
16:58 TimToady but typey people tend to look down on nontypey people :)
16:58 PerlJam but, yeah if you're coming from Java or such, then you might start out typing everything
16:58 moritz ashleydev: just like you can tell them to ignore meta objects and inline assembler
16:58 ashleydev eh that's more ignorable
16:58 moritz PerlJam: ("no types") not quite correct. Think about % and @ sigils
16:59 ashleydev they don't have to make choices about that on every line of code
16:59 TimToady if you start out typing everything, you don't have type paralysis of the whether-to variatey
16:59 TimToady *ty
16:59 TimToady *variety, grr
16:59 ashleydev right it's the choice that makes the difficulty
16:59 moritz ashleydev: you can ignore type annotations in just the same way
16:59 PerlJam The neat thing about Perl 6 is that there's a middle ground.  It's not "all types" or "no types", it's "type in small bits as needed"
16:59 moritz ashleydev: if you teach a newby, you can just fail to tell them about type annotations in the beginning
16:59 ashleydev "as needed" is an experience question
17:00 ashleydev moritz: right for a new to programming noob, but not for the new to perl6 noob
17:00 moritz ashleydev: why not?
17:00 TimToady for the latter, you just fail to teach them that they can omit the type :)
17:01 ashleydev haha
17:02 monk joined #perl6
17:02 ashleydev back to the python example -- my friend learned python after perl -- and said that it did make him annoyed about having to make choices about compiling the regex or not
17:02 ashleydev and said that that's going to be minor compared to the perl 6 type system ---
17:03 ashleydev so it's at least something to watch for as this thing gets more new users
17:03 ashleydev for perl 5 to per 6 people I don't think its going to be as big of a deal...
17:03 TimToady well, python is one of those totalitarian regimes :)
17:03 ashleydev haha
17:04 PerlJam ashleydev: it's true more than funny.
17:04 moritz ashleydev: well, it doesn't hurt to be aware of the problem; maybe we should devote a paragraph or two to that subject in the "Using Perl 6" book
17:04 ashleydev moritz: right
17:04 PerlJam ashleydev: in python you *have* to make certain choices.  In Perl those same choices become DWIM with sane defaults
17:05 ashleydev and if we have a NYTProf for perl 6 that can tell us when to add the types it makes it easer to live with leaving them off at first
17:08 PerlJam that would be interesting
17:10 arnsholt Common Lisp has a similar typing discipline to Perl 6, and Allegro CL has a mode where it tells you about inlining and type inference which is quite useful
17:10 arnsholt It's also preposterously verbose, but that's a different question
17:12 Chillance joined #perl6
17:27 fridim_ joined #perl6
17:28 pyrimidine joined #perl6
17:36 MayDaniel joined #perl6
17:36 thou joined #perl6
17:38 lichtkind joined #perl6
17:48 jimmy1980 joined #perl6
17:52 xinming joined #perl6
17:53 moritz I now know why radcalc() is usually called twice in the actions
17:53 benabik moritz: Do tell.
17:53 moritz there's a token number:sym<complex> { <img=numish> '\\'='i' }
17:54 moritz s/=/?/
17:54 moritz which runs the action method for <numish> even if the 'i' never matches
17:55 benabik As it's supposed to.
17:55 moritz not entirely
17:55 moritz see also: LTM
17:56 benabik Isn't the action supposed to be called when the rule matches?  I'd expect numish to be called, but not complex.
17:56 benabik Delaying subrule action methods from being called until the outer matches would mean they'd all have to get called post-parse, wouldn't it?
17:57 moritz yes, but since the declarative prefix includes the '\\'?'i', the LTM matcher should find out early that the whole rule never matches, no?
17:58 benabik the '\\'?'i' is postfix, not prefix.  It would have to parse numish before knowing if '\\' will match.
18:00 xinming joined #perl6
18:01 moritz benabik: there's also a token number:sym<numish> { <numish> }
18:01 moritz benabik: both participate in LTM
18:02 moritz benabik: do you think that the action methods for both <numish> calls should be executed?
18:03 benabik moritz: It has no way to know without parsing numish which rule to run.  Since actions are run immediately after the token parses, I would expect them both to be called.
18:03 moritz benabik: but it is supposed to inline <numish>, and have it participate in the LTM
18:04 benabik moritz: Really?  That's a good optimization, but I didn't think it was required.
18:05 moritz benabik: LTM is specced not to spec at rule boundaries
18:05 benabik "Subpatterns (captures) specifically do not terminate the token pattern, but may require a reparse of the token to find the location of the subpatterns."
18:06 xinming joined #perl6
18:06 benabik So they don't terminate LTM, but they still may get reparsed.
18:06 moritz but only int he branch that actually matched
18:07 moritz "location of the subpatterns" only makes sense for constructing the match object, which implied a successful match
18:08 benabik So it's supposed to delay the success of parsing subrules until LTM is over?
18:08 moritz well, LTM implies parsing subrules
18:09 moritz but it should delay the execution of action methods until LTM is over
18:09 moritz the action methods are side effects, which don't mix with LTM (which is purely declarational
18:09 moritz )
18:17 tadzik Classes are easily defined with the ‘class’ directive, and [single] class inheritance is supported.
18:18 tadzik don't we have MI?
18:18 PerlJam tadzik: yes
18:18 tadzik I hate it when they want me to log in to comment
18:20 benabik It is not completely clear to me from S05 when actions fire.  But it does seem to imply all actions are delayed until LTM finishes, but it uses "action" to refer to certain bits of the regex and the actions object.
18:21 benabik It says you can pass an actions object, but it doesn't seem to indicate when they are called.
18:25 kaleem joined #perl6
18:25 donri joined #perl6
18:30 xinming joined #perl6
18:40 xinming joined #perl6
18:44 sorear good * #perl6
18:45 dalek book: e45d20d | duff++ | src/grammars.pod:
18:45 dalek book: update/correct some text
18:45 dalek book: review: https://github.com/perl6/book/commit/e45d20d311
18:52 xinming joined #perl6
18:54 overrosy joined #perl6
18:57 pyrimidine left #perl6
18:59 tokuhirom joined #perl6
19:10 mkramer joined #perl6
19:23 birdwindupbird joined #perl6
19:23 birdwindupbird left #perl6
19:32 thou joined #perl6
19:40 mj41 joined #perl6
19:41 sorear perl6: my $str = "abcdef"; substr($str,2,2) = "xyz"; say $str
19:41 p6eval pugs b927740, niecza v12-7-g6243435: OUTPUT«abxyzef␤»
19:41 p6eval ..rakudo 68d0b8: OUTPUT«Cannot assign to a non-container␤  in block <anon> at /tmp/_79b1UJIMc:1␤  in <anon> at /tmp/_79b1UJIMc:1␤»
19:43 colomon sorear: how did you implement that?
19:43 sorear colomon: same way p5 does - substr returns a tied variable
19:44 sorear said tied variable holds a lvalue reference to $str
19:44 colomon that is the classic approach, I guess!  :)
19:45 moritz niecza: my $str = 'abcdefg'; substr($str, 1, 3) ~~ s/\w ** 2/12/; say $str
19:45 p6eval niecza v12-7-g6243435: OUTPUT«a12defg␤»
19:46 [Coke] I wonder if we can have a useful NYTProf that is implementation-agnostic.
19:46 moritz I'd be very surprised
19:46 [Coke] can we have perl6 code today that has niecza-specific code in one branch, rakudo-specific in another, and runs in both perls?
19:47 sorear perl6: say $*PERL
19:47 p6eval rakudo 68d0b8: OUTPUT«Failure.new()␤»
19:47 p6eval ..niecza v12-7-g6243435: OUTPUT«Any()␤»
19:47 p6eval ..pugs b927740: OUTPUT«␤»
19:47 moritz [Coke]: sure. Conditionals and evals exists
19:47 sorear you do have to use eval though.  TimToady is pretty adamantly against conditional compilation
19:47 PerlJam Having NYTProf for Rakudo would be very nice though
19:48 [Coke] moritz: ah, it'd have to be eval'd, huh? I was thinking compiled, which would be tricky.
19:48 moritz [Coke]: well, depends
19:48 dalek Module-Starter: e8b9c9e | dukeleto++ | LICENSE:
19:48 dalek Module-Starter: Add a MIT license
19:48 dalek Module-Starter: review: https://github.com/tadzik/Module-Starter/commit/e8b9c9e690
19:49 moritz [Coke]: stuff that compiles in both compilers doesn't need to be eval'ed, of course
19:49 aindilis joined #perl6
19:56 mkramer left #perl6
19:57 wolfman2000 joined #perl6
20:03 shinobicl_ joined #perl6
20:20 [Coke] rakudo: say $*VM
20:20 p6eval rakudo 68d0b8: OUTPUT«("name" => "parrot", "config" => {"git_describe" => "RELEASE_3_10_0-123-gbd49640", "sha1" => "bd496407faa0fcf0444807b4db9f81c0ebd4960e", "a" => ".a", "ar" => "ar", "ar_extra" => "", "ar_out" => "", "archname" => "x86_64-linux-gnu-thread-multi", "arflags" => "cr", "…
20:21 [Coke] wonder how much of that is just crap from perl5 we're lugging around.
20:22 [Coke] hey! when we can switch to using rakudo for our build system? ;)
20:23 overrosy joined #perl6
20:23 moritz :-)
20:26 * sorear tried to find good documentation of exactly what $*VM et al should contain, but couldn't
20:27 sorear I guess I'll just mirror Rakudo
20:28 moritz feel free to add more useful information :-)
20:29 Trashlord joined #perl6
20:32 zby_home_ joined #perl6
20:32 overrosy joined #perl6
20:33 hundskatt joined #perl6
20:33 [Coke] sorear: were those tickets at all helpful?
20:33 [Coke] I mean, I basically just said "moritz++ added a spec test we don't pass."
20:34 [Coke] It would be nice to have a CI server for the various implementations to check their spec status.
20:34 mkramer joined #perl6
20:35 mkramer left #perl6
20:37 localhost joined #perl6
20:40 sorear [Coke]: we already have a server that builds all the implementations every 30m to 2h
20:41 [Coke] sweet. can we get it to run "make spectest" and submit the results to, say http://feather.perl6.nl:2653/ ?
20:41 sorear [Coke]: I don't know anyhing about CI servers, though
20:41 sorear what
20:41 sorear Unable to retrieve http://feather.perl6.nl:2653/:  Network is unreachable
20:42 [Coke] bah. give me 2m.
20:43 [Coke] (it's a replacement for smolder.)
20:43 sorear I'm WTFing at the fact that I'm talking on IRC while other programs return ENETUNREACH
20:43 [Coke] still a WIP, but intended to be a server to receive TAP output and report on it.
20:44 [Coke] there's nothing listening at the moment.
20:47 Moukeddar joined #perl6
20:47 Moukeddar o/ guys
20:53 [Coke] ok, http://feather.perl6.nl:2653/ is back, but after switching to a new perl, I'm getting an odd failure. Wonder if it's a new version of Mojo or something.
20:55 _sri [Coke]: missing YAML.pm is odd?
20:56 alim joined #perl6
20:57 [Coke] _sri: that is not the error I'm seeing.
20:57 [Coke] Global symbol "$projects" requires explicit package name at template
20:58 _sri hmm, i see it only after reload
20:58 [Coke] I was in the middle of installing YAML (since I need it for something else). morbo might have gotten confused.
20:58 _sri also not odd, there's no projects stash value
20:59 [Coke] woof. and after installing YAML (which i needed only for the uploads) now it works. but I had to restart morbo because it didn't notice.
20:59 sorear o/ Moukeddar
20:59 sorear how are you
20:59 [Coke] _sri: but I was setting it; how do you see it wasn't set?
20:59 Moukeddar seen better days, how about you?
20:59 aloha better days, how about you was last seen in  15317 days 20 hours ago .
20:59 _sri that's allright, morbo watches only the project by default
21:00 [Coke] aloha--
21:00 aloha [Coke]: 1 (pffft)
21:00 Moukeddar i have a question, but it's more related to learning than Perl6, can i ?
21:00 [Coke] {aloha}--
21:00 sorear Moukeddar: go ahead
21:00 _sri [Coke]: missing stash value is the only case that triggers that error usually
21:00 Moukeddar aloha, i don't get your point
21:00 _sri it's rather common
21:01 Moukeddar so, when it's a good time to start writing? like a blog for example
21:01 [Coke] _sri: Except that I didn't change any of that code. only installed YAML. so it's not that I wasn't setting it, it's that something was throwing an error, and it was getting eaten.
21:01 _sri and of course, there is no stash value in the dump below the code :)
21:01 sorear 15317 days ago?  that's, uh, 40 years ago, 1970...
21:01 [Coke] sorear: yes, it's epoch.
21:01 [Coke] bug in the basicbot module aloha is using, no doubt.
21:01 _sri at the time of that exception you only had action and controller in the stash
21:03 [Coke] _sri: yes, but it didn't show me /the thing that caused the error/
21:03 sorear Carp::Always is your friend
21:03 Moukeddar for example, do you have to be a pro to blog/write? or writing enhances the learning experience ?
21:03 _sri [Coke]: not following i'm afraid
21:04 sorear Moukeddar: you're writing right now!
21:04 * sorear often wonders whether ey should start a blog
21:04 Moukeddar lol, i'm aware of it
21:05 [Coke] _sri: e.g. I have changed the code that does "use YAML" to now say "use YAML2" and it's showing the same error regarding $projects.
21:05 Moukeddar i mean something like an article
21:05 [Coke] ey?
21:05 _sri [Coke]: somethign obviously prevents the stash value from getting set
21:06 _sri not sure what more you could expect
21:07 [Coke] _sri: I would expect it to tell me that YAML2 is not found. ;)
21:08 _sri [Coke]: umm, that's exactly what it just tells me ;p
21:08 [Coke] which added Carp::Always does for me. good enough.
21:08 [Coke] _sri: because I JUST added Carp::Always.
21:08 [Coke] let me remove it.
21:09 [Coke] ok. reload it now.
21:09 [Coke] where does it say "YAML2" ?
21:09 _sri interesting
21:09 _sri could be a bug
21:10 [Coke] sorear++ #helpful suggestion
21:10 gfldex joined #perl6
21:11 [Coke] sorear: so, anyway, to something like http://feather.perl6.nl:2653/
21:22 _sri [Coke]: is there anything special about that controller or route? because i can't replicate the issue
21:24 jimmy1980 joined #perl6
21:25 [Coke] _sri: because it is fixed.
21:26 sorear [Coke]: cool.
21:26 _sri [Coke]: no, i was trying to replicate your problem in a test case
21:26 sorear [Coke]: how much can I expect this to stay up?
21:26 _sri missing module not throwing an exception is weird
21:27 sorear [Coke]: what is the protocol for uploads?
21:27 [Coke] sorear: if people start relying on it? it's on feather, so barring unforseen circumstances...
21:27 [Coke] sorear: same as for smolder, for now.
21:28 [Coke] _sri: nothing special, though you might want to create the DB first.
21:28 [Coke] one of muddle's make targets should build you a sample db.
21:29 _sri [Coke]: out of time now i'm afraid, if it is a mojolicious issue please file a bug report with something we can replicate
21:29 _sri we'll have it fixed in no time
21:29 [Coke] _sri: no worries, Carp::Always is my friend.
21:29 sorear [Coke]: I've never used smolder
21:30 [Coke] sorear: I can leave that one as more of a stage and do my dev on another instance.
21:30 whiteknight joined #perl6
21:30 [Coke] sorear: let me see if I can find/make some docs for you on that.
21:31 [Coke] finishing out $DAYJOB, will do this tonight.
21:31 [Coke] _sri++ # danke.
21:32 _sri [Coke]++ # sure
21:33 [Coke] sorear: added http://feather.perl6.nl:2653/niecza/
21:34 sorear [Coke]: I get that I should be sending POST requests to http://feather.perl6.nl:2653/niecza/upload of type multipart/form-data
21:36 MayDaniel joined #perl6
21:42 [Coke] the code to parse the request is here:
21:43 [Coke] https://github.com/coke/muddle/blob/master/lib/Muddle/Import/Smolder.pm
21:43 [Coke] I can write up real docs on how to generate that tonight.
21:43 [Coke] parrot and rakudo are also setup to submit to smolder, so you could just steal their stuff.
21:44 [Coke] rakudo is 'make spectest_smolder'
21:45 [Coke] (changing that to point to muddle should just be a URL change.)
21:48 sorear looks like I can use curl -F
21:48 sorear ah
21:50 sorear hmm, spectest_smolder sets a lot of fields that aren't on the muddle upload form
21:51 [Coke] I ignore some stuff. ;)
21:51 [Coke] (you are the first person to have to do anything other than upload already-run smolder .tgz's. ;)
21:52 sorear is smolder.parrot.org gone?
21:52 y3llow_ joined #perl6
21:53 pothos_ joined #perl6
21:55 [Coke] I don't think so, but it's a PITA to maintain.
21:55 [Coke] so it's on the way out.
21:58 sorear hmm, looks like I need to replace niecza's spectest harness with something closer to Rakudo's
22:03 sorear hey, crazy idea time
22:04 sorear the server I'm looking into running CI on is, coincidentally, the same server that runs dalek
22:04 sorear ...what if we integrated them?
22:04 sorear you push, CI run starts 3 seconds later
22:05 PerlJam sorear: how continuous do you want CI?
22:05 sorear ... and then it reports failures on IRC
22:05 sorear PerlJam: huh?
22:06 PerlJam jnthn pushes, 10 seconds later moritz pushes ... what happens?
22:06 PerlJam (given that the CI run started 3 seconds after jnthn's push)
22:07 sorear PerlJam: second run doesn't start until the first run finishes
22:07 sorear when a run finishes, a new run is started if there were commits during the previous run
22:09 hillu joined #perl6
22:11 donri joined #perl6
22:13 imarcusthis joined #perl6
22:17 sorear how about this: start a #p6eval channel.  All test and build reports get reported there.  _failing_ reports also go here.
22:17 [Coke] that sounds nice.
22:18 [Coke] would you be posting stuff to smolder and or muddle also?
22:18 sorear to muddle, yes
22:18 [Coke] (which means I need to get my act together and clean up that project.)
22:18 sorear does muddle have any way to report the provenance of a report?
22:19 sorear I think it would be useful to distinguish reports generated from the precise p6eval chroot from general reports
22:20 [Coke] right now it's in the DB as generic tags on any smoke report.
22:20 [Coke] if we want to make some of the required, that's doable.
22:20 [Coke] (and the version out there now doesn't report on them.)
22:21 [Coke] 3|Submitter|coke@slurpee.local
22:21 [Coke] (there's one of the tags...)
22:22 [Coke] I need to adda  way to report on those.
22:22 [Coke] -> stuff. later.
22:25 cognominal_ joined #perl6
22:25 arlinius joined #perl6
22:29 * jnthn home
22:29 jimmy1980 joined #perl6
22:30 PZt joined #perl6
22:31 sorear hello jnthn
22:36 jnthn hi sorear
22:36 jnthn how's things?
22:36 sorear yesterday was the last day of classes for the fall2011 semester
22:37 sorear I've got plenty of time, but also a bit of transition-stress
22:39 jnthn Well, remember to get enough rest and relaxation amongst everything. :)
22:40 * jnthn could really use a relaxing weekend, but really must tend to some $dayjob things...alas, due to neglecting them in November because hacking on Rakudo was more fun.
22:49 wolfman2000 joined #perl6
22:56 jimmy1980 joined #perl6
22:58 dalek niecza: 0f282bf | sorear++ | lib/Builtins.cs:
22:58 dalek niecza: Improve documentation of Builtins.cs functions for colomon
22:58 dalek niecza: review: https://github.com/sorear/niecza/commit/0f282bfeb4
23:42 fridim_ joined #perl6
23:42 jimmy1980 joined #perl6
23:46 snearch joined #perl6

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

Perl 6 | Reference Documentation | Rakudo