Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2009-12-20

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:00 colomon Cool, eh?
00:00 holli (but still relying on firebug for development)
00:01 holli colomon: i like it. it's slick and blazing fast
00:02 colomon I've been loving Chrome (beta) for OS X.
00:03 zaslon lolperl6adventhazblogged! perl6advent++ 'Day 20: Little big things': http://perl6advent.wordpress.com/20​09/12/20/day-20-little-big-things/
00:06 mdxi joined #perl6
00:06 mdxi joined #perl6
00:21 adhoc joined #perl6
00:21 lisppaste3 vamped pasted "Method 'prime' not found for invocant of class 'Integer'" at http://paste.lisp.org/display/92371
00:23 vamped S02 mentions a .prime method in an example, but .prime is not yet implemented. I tried making my own.
00:23 lumi joined #perl6
00:41 colomon joined #perl6
00:42 colomon vamped: I don
00:43 colomon vamped: I don't think prime is intended to be part of Perl 6.
00:43 colomon At least, it's never mentioned except as an example in the documentation of other things...
01:06 xomas_ joined #perl6
01:06 kensanata joined #perl6
01:18 cls_bsd joined #perl6
01:23 vamped colomon: your comment never posted here - but did in the irc log.
01:24 colomon vamped: weird.
01:24 vamped colomon: still -- any advice on how to make my example work?
01:25 colomon This is in rakudo master, I presume?
01:25 vamped joined #perl6
01:25 colomon rakudo: class Int is also { method prime() { say "prime!"; }; }; 1.prime;
01:25 p6eval rakudo 8dc189: prime!␤
01:25 vamped yes
01:27 colomon Trying it locally now.
01:27 colomon It works for the first six tests and then fails for you, too?
01:28 colomon looks to me like you have found a very weird bug.
01:28 vamped 1.prime 2.prime ... work. but: for 1..25 { .prime } fails at 2
01:29 colomon I added .WHAT.say before the .prime in the loop and both 1 and 2 are Ints.
01:30 lumi_ joined #perl6
01:30 colomon I don't see how it can be anything other than a Rakudo bug.
01:30 vamped i did that too. but then it complains about an "Integer" class
01:32 vamped I guess I'll email rakudobug@perl.org (right?)
01:32 colomon right
01:32 colomon afk
01:32 TimToady rakudo: say "divisible" if 30 !% 3;
01:32 p6eval rakudo 8dc189: divisible␤
01:33 TimToady vamped: you can also us !%
01:33 vamped ok cool.
01:35 TimToady also, you really only need to test 2..^ sqrt(self)
01:36 TimToady er, 2 .. sqrt(self) rather
01:36 TimToady can't exclude the sqrt in that case
01:36 vamped that will speed it up a bit. good to know.
01:37 TimToady another normal trick is to special case 2, and then just test odd numbers
01:38 TimToady rakudo: for 2, 3 ... *+2, 25 { .say }
01:38 p6eval rakudo 8dc189: 2␤3␤5␤7␤9␤11␤13␤15␤17␤19␤21␤23␤25␤
01:39 vamped TimToady: did you look at my lisppaste? code? Did you see any errors (b4 I post bug)
01:55 TimToady looked okay to me
01:55 vamped thanks. I'll report bug.
02:07 colomon Occurs to me it might be something weird with the internal type... like the Parrot type for second element of the series is wrong, even though it claims to be Int.
02:07 colomon But that's still a bug, of course.
02:15 Baggio_ joined #perl6
03:03 vamped left #perl6
03:14 astrojp left #perl6
03:20 _jaldhar joined #perl6
03:43 diakopter pugs: my bit $a = 0; say $a.WHAT
03:43 p6eval pugs: Int␤
03:43 diakopter o i c
03:45 rachelBROWN joined #perl6
03:58 TimToady native types are really subset types that can be relied on for smaller storage footprint
03:59 TimToady but semantically they are really the base type like Int
04:11 meppel joined #perl6
04:12 lumi joined #perl6
04:25 pointme joined #perl6
04:25 mubot joined #perl6
04:26 zaslon joined #perl6
04:36 gabiruh joined #perl6
04:37 carlin rakudo: "say 1".eval
04:37 p6eval rakudo 8dc189: maximum recursion depth exceeded␤in Main (file <unknown>, line <unknown>)␤
04:41 diakopter oo
04:42 diakopter rakudo: "say 1"
04:42 p6eval rakudo 8dc189:  ( no output )
04:42 diakopter rakudo: "say 1".()
04:42 p6eval rakudo 8dc189: invoke() not implemented in class 'Perl6Str'␤in Main (file <unknown>, line <unknown>)␤
04:42 diakopter rakudo: "say 1".eval()
04:42 p6eval rakudo 8dc189: maximum recursion depth exceeded␤in Main (file <unknown>, line <unknown>)␤
04:42 diakopter rakudo: Str.eval("say 1")
04:42 p6eval rakudo 8dc189: No applicable candidates found to dispatch to for 'eval'␤in Main (file <unknown>, line <unknown>)␤
04:43 diakopter rakudo: eval("say 1")
04:43 p6eval rakudo 8dc189:  ( no output )
04:43 diakopter o_O
04:43 diakopter O_o
04:44 gfx joined #perl6
04:45 TimToady might be disabled in the bot
04:45 TimToady if so, message is LTA
04:46 JimmyZ joined #perl6
05:04 mberends phenny, tell masak when you interrupted the first LLVM make and reconfigured, maybe it carried some files over and did not rebuild them. try 'make clean', ./configure, make.
05:04 phenny mberends: I'll pass that on when masak is around.
05:04 Baggio_ joined #perl6
05:08 mberends diakopter: ping
05:10 diakopter mberends: PONG
05:13 Baggio_ joined #perl6
05:14 mberends diakopter: I would like to pick you brains about AST walking use cases.  I'm considering abstracting my depth first traversal algortihm, into a generic utility method, and want to go over its to-be-designed API
05:14 matsuzine joined #perl6
05:14 mberends first off, the current one is recursive - is this bad?
05:14 diakopter not necessarily
05:15 diakopter depends on how you want to be able to exit the traversal
05:15 diakopter if at all
05:15 diakopter or change the order/tree while you're traversing it
05:15 mberends that was question #2
05:16 mberends apart from full traversals, should I be designing for partial traversals too, in the case of processing VAST ?
05:17 mberends considering that the use case is a compiler, not an interpreter
05:18 diakopter hm
05:18 mberends I'm thinking full only, a lot easier to build
05:19 mberends error cases don't matter, we can abandon them
05:20 diakopter SGTM
05:20 diakopter seems/sounds good to me
05:21 mberends good to know :) in the extreme, your %seen reduces to 1 bit in each node itself - that's already working, just a matter of refactoring it :)
05:22 diakopter yep; 1 bit
05:23 mberends what worried me was the partial traversals, but I could not imagine when they might occur
05:23 TimToady constant folding
05:23 mberends oh
05:23 mberends yes
05:24 TimToady anything evaluated at compile time, like a use expression
05:24 TimToady or a constant initializer
05:24 mberends there may be a 2 bit solution, but more use cases propel them to n bit
05:24 diakopter well, at some level it will always be an interpreter
05:25 diakopter so now that I'm reminded of that by this TimToady fellow, I'll backpedal from the SGTM
05:25 mberends I'm glad I asked
05:25 diakopter well, unless you're compiling to a system that knows how to compile
05:25 mberends I guess anything that stores state in the tree itself is vulnerable
05:27 mberends constant folding etc were not on my roadmap, but perhaps they should be.  Talk about answering a question with a question :-/
05:28 diakopter I'm still a fan of an implementation implementing eval() first :)
05:28 mberends I'm definitely not ;)
05:29 diakopter the *idea* of it, I mean :D
05:29 mberends ok, the next most complex implementation replaces recursion with state in a linked list
05:30 mberends question #3: does breadth first occur in this problem space?
05:31 mberends the difference between depth first and breadth first can be accommodated in the linked lists, but may be overkill
05:32 mberends I cannot think of a use case
05:35 mberends this is enough to go on - it's easier for me right now, I've just woken up and you guys are probably beyond the help of coffee
05:36 mberends thanks
05:36 TimToady thanks :)
05:37 diakopter mberends: yeah, breadth first will occur if you implement LTM parsing (eventually) as an interpreter
05:39 mberends :D your brain's still ok.  that won't happen in the AST, but it will in a regex engine. good to know :)
05:40 * mberends is happy with the answers :)
05:40 * diakopter isn't
05:41 mberends oh?
05:45 diakopter 'tsjust ...
05:45 diakopter brings back memories
05:45 mberends diakopter: ah, reading your last answer carefully, there is a problem when replacing viv with another LTM parser for STD.pm
05:46 diakopter yah, but that's my department (someday) :P
05:47 mberends this began with the idea of separating out the tree walker code, so I'd like to cover all the cases
05:47 TimToady LTM is sort of "breadth last"
05:49 * mberends thinks. longer.
05:50 mberends sorry about the coffee remark
05:51 diakopter breadth last outside the LTM itself; breadth first if you do it char-by-char inside the LTM
05:51 * diakopter hopes
05:52 mberends char-by-char sounds inefficient, there should be bigger atoms
05:52 diakopter char-by-char meaning breadth-first-in-parallel
05:52 diakopter keeping-priority/order
05:53 diakopter where in-parallel means one-char-at-a-time per branch
05:54 diakopter it's just another way of simulating the implementation of something that compiles POSIX-style regexes to a DFA
05:55 mberends ok, it doesn't feel right to be anticipating that right now in AST processing code
05:55 diakopter no
05:55 diakopter I mean: I agree
05:55 * mberends is happy again
05:56 * diakopter almost getting annoyed with writing IL *in* C# b/c I haven't quite learned the [any] idia
05:56 diakopter TimToady: plural of idiom ?
05:57 diakopter idiomi?
05:57 diakopter idiomses?
05:57 mberends what is [any] ? a kind of untyped container?
05:57 diakopter any meaning, I haven't quite learned any idioms
05:57 mberends oh dear, that's worse
05:58 diakopter heh
05:58 * mberends feels like making coffee. care for some?
06:03 diakopter yes, but starbucks isn't open at 10 pm nearby
06:11 zloyrusskiy joined #perl6
06:15 mberends backloggers: s/next most complex/next simplest/
06:15 diakopter mberends: next least complex?
06:16 mberends er
06:16 mberends yes, that, too ;)
06:17 mberends depends on your half empty/half full perspective
06:18 * mberends hopes masak gets vill to make on OS X
06:39 Baggio_ joined #perl6
06:40 diakopter _yes_ I got arbitrary type local declaration/assignment generators working in runsharp
06:40 diakopter whee
06:41 diakopter it could do only built-in types as far as I could tell
06:42 mberends runsharp looks cool, and your extensions make it even better
06:47 diakopter its binder needs a bit of help
07:04 JimmyZ joined #perl6
07:13 JimmyZ joined #perl6
07:35 langs joined #perl6
07:42 Baggio_ joined #perl6
08:02 Baggio_ joined #perl6
08:21 Chillance joined #perl6
08:25 Baggio_ joined #perl6
08:29 Chillance joined #perl6
08:30 Chillance joined #perl6
08:40 pdcawley joined #perl6
08:41 mberends snowing now in southern NL - depth increasing to 15-20cm
08:41 lumi_ joined #perl6
08:50 JimmyZ wow
08:51 Su-Shee joined #perl6
09:12 kaare joined #perl6
09:14 FalseVinylShrub joined #perl6
09:26 iblechbot joined #perl6
09:43 cls_bsd joined #perl6
09:58 tgrasp joined #perl6
10:21 FalseVinylShrub left #perl6
11:29 holli_ joined #perl6
11:32 mberends holli_: hi
11:33 holli_ salutations
11:35 arthur-_ joined #perl6
11:56 Supaplex return $hello->standard;
11:59 holli_ purl, weather EDDR
12:00 holli_ ah, wrong channel
12:00 mberends ENOPURL
12:00 Supaplex lol. nice one mberends.
12:03 deepu joined #perl6
12:04 mikehh joined #perl6
12:06 colomon ng: "say 1".eval;
12:06 p6eval ng 9d5018: 1␤
12:06 colomon rakudo: "say 1". eval;
12:06 p6eval rakudo 8dc189: Confused at line 2, near ". eval;"␤in Main (file <unknown>, line <unknown>)␤
12:06 colomon rakudo: "say 1".eval;
12:06 p6eval rakudo 8dc189: maximum recursion depth exceeded␤in Main (file <unknown>, line <unknown>)␤
12:20 holli_ rakudo:say [+] <1 2 3>
12:20 holli_ rakudo: say [+] <1 2 3>
12:20 p6eval rakudo 8dc189: 6␤
12:21 holli_ rakudo: my $f = sub { say "foo" }; [$f] <1 2 3>
12:21 p6eval rakudo 8dc189: Confused at line 2, near "2 3>"␤in Main (file <unknown>, line <unknown>)␤
12:31 colomon holli_: I believe you can only use/pass an operator to [ ].
12:31 lumi joined #perl6
12:32 colomon and I'm fairly certain you can't pass it as a variable currently.  (Not sure if that is ever intended to work.)
12:32 colomon rakudo: my $f = sub { say $_ ~ "foo" }; <1 2 3>.reduce($f);
12:32 p6eval rakudo 8dc189:  ( no output )
12:35 colomon ack, that's still very wrong.
12:35 colomon I think maybe you wanted
12:35 colomon want something like this:
12:36 deepu left #perl6
12:36 colomon rakudo: my $f = -> $a { say "foo $a"; }; <1 2 3>.map($f);
12:36 p6eval rakudo 8dc189: foo 1␤foo 2␤foo 3␤
13:10 JimmyZ joined #perl6
13:11 pmurias joined #perl6
13:17 colomon joined #perl6
13:18 Astoria` joined #perl6
13:18 FalseVinylShrub_ joined #perl6
13:23 FalseVinylShrub_ left #perl6
13:39 iblechbot joined #perl6
13:41 masak joined #perl6
13:42 masak no, because I didn't just rebuild, I removed the whole folder and untarred it again.
13:42 phenny masak: 19 Dec 20:50Z <mberends> tell masak an expert at #llvm said the --prefix=/usr *should* work on OS X as well. "probably something is expecting 32-bit code and using 64-bit or vice versa"
13:42 mberends .oO( here goes! )
13:42 phenny masak: 05:04Z <mberends> tell masak when you interrupted the first LLVM make and reconfigured, maybe it carried some files over and did not rebuild them. try 'make clean', ./configure, make.
13:42 masak though admittedly, I didn't do --prefix=/usr either.
13:43 mberends could you focus on 'make test' in LLVM first, before 'make install' ?
13:43 masak certainly.
13:43 mberends :)
13:44 * mberends is very happy with diakopter's ideas for graph_traverse.h
13:45 masak cool. I read http://swtch.com/~rsc/regexp/regexp1.html today for lunch.
13:45 masak a nice read.
13:45 masak but I guess you're traversing VAST, not regex nodes.
13:46 mberends indeed, but regexen will interest me soon
13:47 masak it strikes me that if I equip GGE with a 'Thompson mode', I can beat PGE for speed in some (pathological) cases.
13:48 mberends skim skim skim. presumably the mode entails a major redesign
13:49 masak it's more of a plug-in that can be activated if/when the regex is pure enough.
13:50 mberends nice!
13:51 mberends the "knee" of the Perl graph scares me enough to consider using Thompson all the time
13:51 masak you can't.
13:51 * mberends doesn't know what he's talking about
13:51 masak but certainly in a large percentage of cases.
13:52 masak Thompson starts to blow up when we use more advanced features, such as variable interpolation, formerly known as 'backreferences'.
13:53 orafu joined #perl6
13:53 masak I suspect, but haven't proved to myself yet, that code assertions and re-entrant subrule calls will be similarly problematic.
13:54 mberends good luck masak, I'll apply my precious tuits to VAST
13:55 masak the good news is that one can enable Thompson for the small sub-part where it's known to work, and then switch it on for other sub-parts later as one gets nice ideas about how to reduce problematic things to Thompson-friendly ones.
13:55 masak thanks; I'll try to get GGE 'done' before doing Thompson experiments.
13:55 masak but today I'll see if I can implement the TreeSpider in GGE. :)
13:57 mberends does the pge -> nqp-rx replacement give you a GGE-ng todo?
13:59 masak I was thinking of doing a refactor. pmichaud_ opined that that doesn't sound quite right, since nqp-rx is a complete re-implementation. so we'll see. maybe I'll do a complete re-implementation too. but it feels... less motivated to port NQP to Perl 6 than to port PIR to Perl 6. :)
14:00 masak what most attracts me, of course, is the things we'll be able to do with a Perl 6 Perl 6 parser.
14:00 masak actually, I should write a separate document about that for GGE.
14:00 * mberends wonders what to port to C
14:01 masak well, the TreeSpider will actually be quite a big deviation (semantically) from PGE.
14:02 masak it's because I'm not smart enough to emulate STD.pm's LazyMap yet.
14:02 masak so I have no way of faking continuations. instead I play call stack myself, and backtrack 'manually'.
14:03 mberends it's head-hurting to think of that. does viv do that too?
14:03 pmurias joined #perl6
14:03 masak dunno.
14:03 masak I should say gimme5's LazyMap, not STD.pm's.
14:04 pmurias mberends: you are planning to write a grammar engine in C?
14:04 mberends pmurias: I'm too scared to even answer that question to myself
14:06 mberends there are so many unknowns, all we can assume is that the other solutions will probably have C in their toolchains. That implies that it's doable, if you peel off al the layers of abstractions.
14:07 masak of course it's doable. :)
14:07 masak the question is more like, how painful is it.
14:07 mberends yes
14:09 patspam joined #perl6
14:10 pmurias we can use B::C to compile STD.pmc, that would be neither painfull nor usefull
14:11 masak I nominate that the oddest remark so far today. :)
14:13 mberends if there was the slightest use in it, it would still merit consideration.  However, there are like to be more elegant or efficient solutions out there, somewhere.
14:13 arnsholt One option might be a compiler-compiler using Perl 6 grammar syntax but C in the actions?
14:13 arnsholt (long-term)
14:13 * mberends likes
14:13 arnsholt A port og PGE, for example
14:13 arnsholt *of
14:14 masak arnsholt: I think only masochists should attempt to port PGE, now that nqp-rx exists.
14:15 mberends (the voice of experience :)
14:15 pmurias arnsholt: what would be the point of having C in actions?
14:16 mberends emit LLVM IR, for example
14:17 arnsholt pmurias: Well, if it's a C library, having Perl 6 in the actions would be kind of hard
14:17 arnsholt masak: True, true. A port of an existing implementation, at any rate
14:17 masak arnsholt: nod. nqp-rx has the capacity to take us much longer than PGE.
14:19 mberends it's not LTM today, but can get there if necessary
14:19 arnsholt mberends: That's certainly an option as well. It just means I have to learn LLVM. How would one do actions with that approach though?
14:20 mberends arnsholt: I cannot imagine the implementation right now, but I'd like to spend a while thinking about the possibility
14:21 arnsholt Certainly. I'm already pondering the C approach =)
14:23 * masak is made happy by http://twitter.com/mcmire/status/6841786387
14:24 arnsholt Hooray!
14:25 colomon \o/
14:25 arnsholt If one has said it, more are probably thinking it
14:26 rjbs joined #perl6
14:26 rjbs I'm looking at today's Advent calendar article, which goes from discussing &foo.arity to a map block that does -> $x, $y
14:27 Bill joined #perl6
14:27 rjbs Is there some object being created there which responds to .arity?
14:27 rjbs C<< my @foo = map -> $x, $y { ... },  @bar; >>
14:27 masak rjbs: yes. the block.
14:27 masak the point block, even.
14:28 masak s/point/pointy/
14:28 rjbs is the -> the beginning of the pointy block?
14:28 colomon rjbs: -> $x, $y { ... } is a block object with arity 2.
14:28 rjbs great, thanks.
14:28 masak rjbs: yes, exactly.
14:28 masak rjbs: the '->' is pronounced 'lambda' :)
14:28 rjbs (but "pointy" means the {} right, not the -> ?
14:28 masak rjbs: no, it means the '->'.
14:29 rjbs All these years, I thought it was the braces that were pointy!
14:29 masak that doesn't work becayse '{}' without '->' have the same braces. :)
14:29 rjbs Yeah, but I thought -that- was a pointy block.  my $block = { .. };
14:29 rjbs I thought that was considered a pointy blocky.
14:29 rjbs but everything I know about perl 6 I learned from the telephone game.
14:33 masak rjbs: that's all everyone does. it's possible to learn everything from the primary sources, because the primary sources presuppose knowledge of Perl 6. :)
14:34 pmurias mberends: you meant impossible?
14:34 huf patspam: you meant masak?
14:34 colomon my favorite trick is to try to work out what I want to do using p6eval here.  If I can't figure it out, someone else usually chimes in pretty quickly.
14:34 masak pmurias: yes.
14:34 pmurias huf: yes
14:34 masak huf: you meant pmurias?
14:35 huf yes ;)
14:37 * masak is trying to remember the name of the (deeply ironic) effect wherein a correction often contains errors
14:40 payload joined #perl6
14:40 arnsholt On UserFriendly it was called Naruki's law
14:40 arnsholt But there's another name as well, I think
14:41 Baggio_ joined #perl6
14:44 masak mberends: says "make: Nothing to be done for `test'".
14:44 masak mberends: this is on a completely clean build of llvm-2.6.
14:44 carlin masak: Muphry's law?
14:45 masak carlin: well, no, it's more specific than that.
14:45 carlin (the typo is intentional)
14:45 masak I'm pretty sure I've seen a name for the phenomenon on Language Log, but my Google-fu fails me.
14:45 masak carlin: ah. I missed that. :)
14:45 masak nice one, but I think there's a name for it already.
14:46 carlin http://en.wikipedia.org/wiki/Muphry%27s_law
14:47 masak oh, I see.
14:47 rjbs ha
14:47 masak strange; that's not the name I remember.
14:47 arnsholt "Harman's Law of Prescriptivist Retaliation" that name tickles my (descriptive) linguist bone ^^
14:48 arnsholt masak: There are a few alternatives in the article
14:48 arnsholt McKean and Skitt's for example
14:49 masak 'The Law of Prescriptive Retaliation' sounds most familiar.
14:50 masak "any article or statement about correct grammar, punctuation, or spelling is bound to contain at least one eror"
14:52 mberends pmurias: C language action methods are not specced, but imaginable (not portable across implementations though)
14:53 mberends a bit like Q:PIR in Rakudo
14:55 mberends masak: currently no other idea, will check more LLVM docs :(
14:58 masak mberends: thanks. I'll try to put a spider in my GGE in the meantime.
14:59 mberends know any Darwin emulator available for test purposes?
15:03 masak mberends: no. :( I never have the need.
15:03 masak today's line of code:
15:03 masak GGE::TreeSpider.new(:exp($!regex), :$target, :pos(*)).crawl(:$debug);
15:05 mberends :) somewhat like my  struct ... graph_traverse_begin(...)  ;)
15:05 arnsholt Is there a simple way to convert the Synopsis PODs to PDF?
15:05 mberends there are several Perl 5 POD->PDF modules, YMMV
15:06 Su-Shee left #perl6
15:08 mberends masak: what was :pos(*) for?
15:08 Psyche^ joined #perl6
15:10 masak` joined #perl6
15:12 masak` mberends: I somehow want to specify that this traversal should start over after it's tried position 0, and try to match on position 1 ... up to position $target.chars - 1.
15:13 mberends oh, ok
15:24 masak which looks nicer, `$pos ~~ Whatever` or `$pos === *`?
15:25 mberends ~~ Whatever is more mnemonic
15:26 masak I'll go with that, then.
15:29 Baggio_ joined #perl6
15:42 will__ joined #perl6
15:45 masak rakudo: enum A::B <a b c>; say b
15:45 payload1 joined #perl6
15:45 p6eval rakudo 8dc189:  ( no output )
15:45 masak locally, 'Null PMC access in type()'.
15:45 * masak submits rakudobug
15:46 * masak hopes enums will be less full of fail in ng
15:48 dbrock when you say `std: ...', what does that run?
15:48 masak dbrock: it runs TimToady's Perl 6 grammar.
15:49 mberends dbrock: viv from /pugs/src/perl6
15:49 masak STD.pm. you'll find it in the Pugs repo, under src/perl6/
15:49 colomon_ joined #perl6
15:49 masak dbrock: what mberends said. viv is the technology allowing STD.pm to run without a Perl 6 implementation. :)
15:50 dbrock hmm :-)
15:51 masak the sad thing about the enum bug above is that I pondered giving my enum a name with '::' in it, but though "hm, will that really work? better check first...". that's how low my trust in enums is. :/
15:52 arnsholt Hmm. S05 uses some kind of weird spacing
15:53 masak O RLY?
15:53 arnsholt Yep
15:53 arnsholt If you load it up in less and search for a literal space
15:53 arnsholt you'll notice that the space between Perl and 5 isn't highlighted
15:54 arnsholt A non-breaking space, probably
15:54 mberends yes, 0xa0 possibly
15:56 masak arnsholt: the whole spec does that, by design.
15:56 masak it's not some kind of weird spacing, it's a non-breaking space.
15:58 will_ joined #perl6
16:00 nihiliad joined #perl6
16:01 mberends masak, may I call my thingy that walks the AST 'spider' as well?
16:02 masak I'd be honoured.
16:02 mberends :) thanks
16:02 masak I stole the name for those web crawlers.
16:03 mberends 'course, it's _just_ right
16:03 masak I think it's more lively than RegexControlFlowManager or something.
16:03 mberends live spiders!
16:03 arnsholt masak: If it's not a literal space, it's weird ;p
16:04 mberends afk &
16:04 masak arnsholt: that feels like a slightly outdated opinion on character sets. :)
16:04 * carlin would prefer something more entomophobic friendly
16:04 cognominal joined #perl6
16:05 arnsholt masak: True, true. But it turns out that my LaTeX doesn't like it =)
16:06 masak arnsholt: if only there were some convenient tool which can process text. preferably with regular expressions...
16:07 masak carlin: TreeSnake? :)
16:09 masak rakudo: say (* ~~ Whatever).WHAT
16:09 p6eval rakudo 8dc189: Int()␤
16:09 masak Int!?
16:09 masak can I submit this as a bug?
16:10 arnsholt masak: =p
16:10 arnsholt I got that particular wrinkle fixed
16:10 arnsholt Now it's something different
16:10 masak rakudo: say ("OH HAI" ~~ Str).WHAT
16:10 p6eval rakudo 8dc189: Int()␤
16:10 * masak submits rakudobug
16:11 carlin masak: preferably something non-venomous
16:12 carlin TreeKitten :-)
16:12 carlin Although that may upset the ailurophobiacs
16:14 colomon_ ummm.
16:14 colomon_ rakudo: "    " ~~ m/ <ws>+ / ; say $/;
16:14 colomon_ appears to hang on my system.
16:14 p6eval rakudo 8dc189:  ( no output )
16:14 colomon_ wth?
16:15 colomon_ rakudo: "     " ~~ m/ \s+ /; say $/;
16:15 p6eval rakudo 8dc189:      ␤
16:15 colomon_ rakudo: "    " ~~ m/ (\s+) /; say $/;
16:15 p6eval rakudo 8dc189:     ␤
16:16 colomon_ rakudo: "    " ~~ m/ <ws> /; say $/;
16:16 p6eval rakudo 8dc189:     ␤
16:16 colomon_ hmmm....
16:21 Chillance_ joined #perl6
16:27 ilogger2 joined #perl6
16:34 mberends masak: spider is the "TraversalControlFlowManager" and spidey is the little guy that moves around ;)
16:37 masak heh :) in my implementation, I call the spidey '$!current'
16:46 holli_ anybody seen "Avatar" yet?
16:47 holli_ i wonder if it's worth the 15€ for the 3D show
16:50 masak my eyes are of the kind that they don't pick up 3D, so I wonder too. :)
16:51 holli_ huh? i assuma
16:51 holli_ e you're talkkin about artificial 3d
16:52 masak no, I only have 2D vision.
16:52 masak I've never seen depth.
16:52 holli_ how does this work? or rather "not work"
16:53 holli_ unless you have only one eye left of course
16:53 masak early in infancy the brain does a check: can it get the eyes to produce a coherent signal necessary to build a 3D experience?
16:53 masak if it can't (as in my case), it turns off that ability.
16:54 masak I do have both eyes, but they don't do the consensus bit.
16:55 masak I went to a 3D movie a couple of months back. waste of time :)
16:55 masak and not only because the movie was really bad. ('Final Destination')
16:56 holli_ wtf? final destination is cool.
16:56 masak I think we'll have to disagree on that point. :)
16:56 holli_ but i envision you had some interesting experiences in school sports
16:56 masak I was never very good, if that's what you mean. but I guess that goes for most geeks.
16:57 masak I got pretty decent at dancing. :)
16:57 fagzal joined #perl6
16:58 holli_ i mean like not catching balls because of a misconception how far its away et al
16:58 masak it happens, yeah.
16:58 masak I'll probably never excel at tennis and badminton for that reason -- even if I try real hard.
17:01 holli_ me neither. i'm too small =)
17:01 masak :)
17:07 holli_ lol. i'll buy for $100 ( http://thedailyworsethanfailure.com/Buy.aspx )
17:11 masak holli_: if you go with Perl 6, your lines of code will last longer!
17:13 holli_ tell me again next xmas. when we have something production ready =)
17:14 masak quite. different people get on at different times.
17:14 carlin I wonder what rakudo will be like next Christmas
17:15 holli_ .oO( rakudo bucks )
17:18 colomon_ joined #perl6
17:24 masak oh dear.
17:24 masak I just got this error message:
17:24 masak compiler returned NULL ByteCode './lib/GGE/TreeSpider.pir' - The opcode 'getattribute_p_ic_sc' (getattribute<3>) was not found. Check the type and number of the arguments
17:24 masak is that... bad? :/
17:24 holli_ say these .pir files, are they hand written or generated from something?
17:25 masak holli_: Rakudo has the ability to compile Perl 6 code down to .pir files.
17:25 masak holli_: I do that because it decreases startup time, by not having to parse all the source files each time.
17:26 holli_ looks like i'm still confused of how rakuperl6 is bootstrapped/implemented
17:27 iblechbot joined #perl6
17:27 masak may I recommend this? http://perlgeek.de/blog-en/​perl-6/rakudo-overview.html
17:28 Tene ack.  only like 5 days left before christmas.  I should start working on my secret project.
17:28 kcwu joined #perl6
17:28 masak Tene: yes, you should.
17:29 holli_ mask: interesting. thx
17:29 Tene I'll start on it tonight, then.
17:29 Tene AFK, grinding social reputation.
17:30 holli_ reputation is overrated
17:35 IllvilJa joined #perl6
17:41 mberends speaking of sekrits, I was thinking of blogging in Perl6Advent about 'vill', if it's generally considered an appropriate kind of article and if someone scheduled for one of the few remaining days is willing to donate the space.
17:42 masak rakudo: class A { has $!to; method x { loop { (:$!to); } } }
17:42 p6eval rakudo 8dc189: The opcode 'getattribute_p_ic_sc' (getattribute<3>) was not found. Check the type and number of the arguments␤in Main (file <unknown>, line <unknown>)␤
17:42 * masak submits horrible rakudobug
17:45 masak mberends: I definitely don't speak for everyone -- and I'd love for vill to get attention. but what makes it deserve space in the Advent Calendar more than Elf, Sprixel or M0ld?
17:45 holli_ so vill is yap6i?
17:47 masak I've gotten awfully profit-centered lately, seeing people be inspired for Perl 6 from reading the blog. I hope we can use the last few days to keep doing that. a vill post might pull in interest towards vill, but at the expense of pulling in interest towards Perl 6. maybe.
17:47 masak on the other hand, pmichaud_ is thinking of doing an ng branch post on the 24th, so I guess I should have similar reservations against that. :)
17:48 mberends masak: The Advent theme has been excellent examples of Perl 6 language, so a new implementation announcement is a bit off topic. Elf, Sprixel and M0ld are even more worthy, but I'm less qualified to write about them.
17:48 PerlJam What is vill exactly?
17:49 rjbs As a random reader of the p6advent blog, it would take a *lot* for me to be interested in reading about yet another implementation rather than language features.
17:49 mberends a viv + llvm mashup, to compile native executables from a Perl 6 subset
17:49 PerlJam gotch
17:49 masak mberends: again, no offense intended, but it would be a bit like: cool code... cool code... cool code... would people be interested to help me work on my implementation which is just getting started and doesn't do 1% of the things we've shown here lately?
17:49 PerlJam er, gotcha
17:51 holli_ viv? llvm?
17:51 mberends yeah, I had my doubts anyway, I think you guys make good points.
17:51 masak holli_: viv is that STD.pm converted we just talked about. llvm is a virtual machine.
17:52 PerlJam We did talk the other day about continuing to do a perl6 post a day in the new year.  (similar to the advent calendar, but perhaps the focus could be broadened a bit)
17:53 masak mberends: I -do- think we should go out with a bang somehow. and with all due respect, I'm not sure pmichaud_'s ng branch post is it either. but pmichaud_ has surprised me before, so I'll withhold judgement. besides, I don't have any better ideas at present.
17:53 masak PerlJam: interesting.
17:54 rjbs PerlJam: I think if you do that, you'll want to have themed runs.
17:54 rjbs like "January is all about foo"
17:54 rjbs so that it's easier to tune in or out
17:54 masak and a plan for how to keep the volunteers motivated.
17:54 PerlJam indeed.
17:54 masak the 1-post-a-day tempo is all fine for December...
17:55 holli_ .o( oh yeah, baby. motivate me )
17:55 PerlJam 1 a week could work.
17:55 masak PerlJam: many of us are doing that already :)
17:55 PerlJam true :)
17:55 cognominal joined #perl6
17:55 holli_ at the yapc, mst promised to blog about catalyst once a week for one year.
17:56 holli_ or otherwise he'd pay a penalty of some sort (forgot what it was exactly)
17:56 masak well, blog about Perl.
17:56 holli_ but i think it inviolved his hair
17:57 masak and the penalty was that someone got to choose talk title and hair color for mst for an upcoming conference.
17:58 PerlJam masak: perhaps a nice moniker for people to rally behind would be good as far as publicity and garnering contributors beyond the current #perl6 regulars
17:58 PerlJam "Your Weekly Perl 6"
17:59 holli_ do we have an official mascot yet? pleaso not this stupid butterfly
17:59 PerlJam holli_: Camelia is the official mascot.
18:00 mberends holli_: aww, you may have just hurt Larry Wall's feelings ;)
18:00 masak holli_: it's the stupid butterfly.
18:00 masak holli_: besides, it's cute! :)
18:00 masak .oO( embrace your inner butterfly... )
18:01 PerlJam holli_: denigrating someone else's work or ideas is hardly in the spirit of the Perl 6 community.
18:01 holli_ yeah, you're right. i'm sorry.
18:01 holli_ but http://www.yopi.de/image/prod_pics/23/e/23562.jpg
18:01 masak hugme: hug holli_
18:01 * hugme hugs holli_
18:02 holli_ lol
18:02 rjbs nice bot
18:03 holli_ to clarify: in germany camelia is a sanitary (womens) towel
18:03 mberends holli_: I'm not that impressed by the butterfly either, fwiw
18:04 masak I used to have my doubts about the butterfly, but not anymore.
18:04 holli_ and actually, the butterfly would be a nice fit on the towel package xD
18:04 PerlJam holli_, mberends: You're free to try your hand at coming up with something better.
18:04 PerlJam :-)
18:05 holli_ i'd chose some kind of parrot, one distinct kind for every implementation
18:05 mberends my efforts would be worse, I recall earlier discussions on this subject as well.
18:05 holli_ ah no, too specific
18:08 holli_ probably camelia will share fate with the onion.
18:08 holli_ let's see what o'reilly comes up with xD
18:09 * pmurias likes camelia
18:09 carlin http://www.oreilly.de/catalog/n​ewcovers/9780596007379_cat.gif
18:10 holli_ now that's a strong beast =)
18:31 * colomon_ 's little boy likes camelia
18:33 PerlJam And that's the strongest commendation for Camelia that I can think of.
18:34 mberends :)
18:36 colomon_ It actually has gotten to be a bit of a problem, because if he sees Camelia on the top of the #perl6 log, he fusses if I scroll away from it...
18:41 masak :D
18:42 pmurias joined #perl6
18:54 nihiliad joined #perl6
18:57 masak food &
18:57 matsuzine joined #perl6
19:02 ash___ joined #perl6
19:04 [particle]1 joined #perl6
19:23 nacho__ joined #perl6
19:39 nihiliad1 joined #perl6
20:09 kensanata joined #perl6
20:23 pmurias joined #perl6
20:42 pmurias_ joined #perl6
20:50 colomon joined #perl6
20:50 pmurias joined #perl6
20:58 pugs_svn r29382 | pmurias++ | [mildew-js] compiled code now lives in js-compiled
20:58 pugs_svn r29382 | removed debugging leftover in say
20:58 pugs_svn r29383 | pmurias++ | [mildew] remove unused STD snapshot
21:08 nihiliad joined #perl6
21:10 nacho__ joined #perl6
21:15 pmurias joined #perl6
21:42 masak joined #perl6
21:42 masak mwhaha!
21:43 masak I'm back to bother you with my endless bug reports :)
21:43 masak rakudo: class A { method foo(@a: $x) { say $x } }; A.new.foo("OH HAI")
21:43 p6eval rakudo 8dc189:  ( no output )
21:43 masak locally, "OH HAI"
21:43 * masak submits rakudobug
21:43 masak rakudo: class A { method foo($_: $b) {} }; A.new.foo(1, 2)
21:44 p6eval rakudo 8dc189:  ( no output )
21:44 masak locally, "Too many positional parameters passed; got 3 but expected 2"
21:44 masak (which is fine, but now...)
21:44 masak rakudo: class A { method foo($_: %b) {} }; A.new.foo(1, 2)
21:44 p6eval rakudo 8dc189:  ( no output )
21:44 masak locally, "Nominal type check failed for parameter '11111111111000000000100000101100'; expected Associative but got Int instead"
21:45 masak (which means that locally, I'm doing this: o.O)
21:45 * masak submits rakudobug
21:50 masak rakudo: sub foo(%h) {}; foo(1, 2)
21:50 p6eval rakudo 8dc189: ''' is not a valid sprintf format␤in Main (file <unknown>, line <unknown>)␤
21:50 masak something weird is definitely going on here...
22:03 jnthn ...wtf...
22:03 jnthn Yes, weird indeed.
22:03 jnthn Looks like a bug in generating the error message.
22:04 masak ah, there you are. :)
22:04 masak I'm starting to find those holes in the new binder you requested long ago. :)
22:05 masak one of the silly error messages even has a fan on Twitter. :)
22:05 jnthn oh great, soon CNN will be reporting on it then.
22:05 masak only a matter of time. :)
22:05 * jnthn has been kinda ill today. :-/
22:06 masak :/
22:06 masak here it is: http://twitter.com/flexibeast/status/6598140411
22:06 masak when you take it literally, it's acutally kinda... interesting.
22:06 jnthn hehe
22:06 masak did it expect 1.5 parameters?
22:06 jnthn I wonder how on earth it's managed to come up with *that* error.
22:07 masak jnthn: I know, I checked.
22:07 masak jnthn: there's a variable called whoz_op...
22:07 masak I am not making this up.
22:07 Astoria` joined #perl6
22:07 jnthn ;-)
22:07 masak I can't imagine who wrote this code...
22:07 jnthn Me either.
22:07 masak anyway,
22:07 masak whoz_op assumes that the error message was caused for legitimate reasons.
22:07 jnthn Guy should probably be shot or something.
22:08 masak or punished by having to implement Perl 6.
22:08 masak or something.
22:08 jan_ joined #perl6
22:08 jnthn Well, at least we get something useful out of that approach. ;-)
22:08 jnthn Heh, I doubt we should end up in that routine if we've got not got an arg count mis-match.
22:08 masak this error, however, did not occur under circumstances which, in layman speech, "should happen".
22:09 jnthn Oh?
22:09 jnthn I'm guessing we somehow construct a very wrong signature object.
22:09 masak thus, whoz_op falls back on the number of parameters being too few, since there is no third choice.
22:09 masak jnthn: the problem is that the error should be caught at compile time.
22:09 jnthn Ah.
22:10 jnthn That's why the binder doesn't handle it then.
22:10 masak and when it isn't, the impossible happens, and hurts a bit.
22:10 jnthn Yeah
22:10 jnthn So the fix is enforcing the zone constraints or something I guess.
22:10 jnthn But anyway, at least it isn't a binder bug, just a lack of error detection earlier.
22:10 jnthn Which should be easy to fix.
22:11 jnthn Anyways, I'm sure you've filed a ticket so it won't get forgotten. :-)
22:11 masak there is a ticket.
22:11 jnthn masak++
22:11 masak that's how the guy on Twitter saw it.
22:11 masak apparently, people read my tickets. :>
22:12 pointme joined #perl6
22:12 mubot joined #perl6
22:12 zaslon joined #perl6
22:14 snearch joined #perl6
22:14 jnthn masak: Yeah, I do that occasionally too.
22:14 masak cool.
22:14 jnthn There's been this branch distracting me of late though.
22:14 masak jnthn: so, what about that branch?
22:15 masak it should have been merged ages ago, eh?
22:15 * masak is impatient
22:15 jnthn Yes, it's dragged out.
22:15 jnthn It's ended up doing more stuff than I first expected.
22:15 masak first it was to be merged for the November release...
22:15 carlin so it has branched out a bit?
22:16 masak and then for the December release...
22:16 masak at the latest early January...
22:17 masak I think it would be good to merge it soon, so that we have a chance to make the April release stable.
22:17 jnthn Yes, me too.
22:17 jnthn But it's kinda not exactly ready yet. :-|
22:17 jnthn We don't even really have hashes together.
22:17 masak it'd be easier if we weren't blocking on stuff that we can't help with.
22:18 masak things like laziness.
22:18 masak pmichaud_ keeps saying he has it covered.
22:18 jnthn I think part of the problem is that it hasn't been done before and the spec is evolving.
22:19 jnthn but yes, I really hope pmichaud will be able to get that in shape Real Soon.
22:19 masak I'm expressing concern and impatience because it seems to me that we are slipping from our estimates.
22:19 masak and that means that we'll have to compromise on things.
22:19 jnthn Oh, I'd agree it's slipped a long way.
22:20 jnthn Well, yes. It's just a case of "what do we want to compromise on".
22:20 masak the estimates themselves were pretty optimistic, to be sure. but for a while it seemed they were possible.
22:20 masak I don't want to compromise on anything. I want all the things slated for April. :)
22:21 masak if I knew back in August that they were in jeopardy, I would have groaned louder, sooner.
22:21 jnthn The fact that the branch covers laziness and enables most of the priority 1 items in the roadmap (or does them) is an encouraging sign.
22:22 jnthn But yes, I am concerned.
22:22 masak equip me with the means to make a difference, and I'll help.
22:22 jnthn We really, really should try and get this merged by the next release, but that feels oh so close already.
22:22 masak but right now my hands are tied, and I don't know what to do.
22:24 jnthn The ability to write stuff in the setting is already in place - that's a place to help.
22:24 jnthn colomon++ has found plenty to do and done plenty
22:24 jnthn The iterator design/impl missing is quite an issue at the moment though.
22:25 masak I'll have another look at the setting.
22:25 jnthn I really didn't expect us to not have that laid down by now.
22:25 jnthn masak: Another thing that you may or may not be interested in is starting to sketch out Hash.
22:25 masak that sounds like fun.
22:25 jnthn Starting from role Hash[::T] does Associative[T] { ... } and filling it out from there.
22:26 masak \o/
22:26 jnthn A Parrot Hash PMC can be used for underlying storage.
22:26 masak nodnod.
22:26 jnthn I think we can write the whole thing in the setting.
22:26 masak 'write the whole thing in one sitting'
22:26 justatheory joined #perl6
22:26 jnthn I've been working on parametric roles.
22:26 masak cool.
22:26 jnthn Almost there.
22:26 masak enough to do the above?
22:26 jnthn Wanted to finish it this weekend, but haven't felt up to it.
22:27 masak do you have a cold?
22:27 jnthn I think so
22:27 masak gesuntheit.
22:27 jnthn Not a bad one as such. Just feel rather tireder than expected.
22:27 jnthn And struggling to concentrate on much. And working on ng tends to need some concentratoin.
22:28 masak aye.
22:28 ash___ jnthn: i think i figured out part of whats wrong with RoleHOW#methods, its expecting the thing passed to be a RoleHOW, doing A.HOW.methods(A.HOW) seems okay, altough i am getting a funny result and am not sure why
22:28 jnthn Anyway, I'm hoping some decent sleep tonight might have me in better shape tomorrow.
22:28 masak it seems pmichaud_ has similar issues, but with holidays instead of a cold.
22:29 meppl joined #perl6
22:30 jnthn ash___: Yes. I think there's a design isuse somewhere in it all, but I'm not clear headed enough to think it through just yet.
22:30 jnthn masak: Yup.
22:30 jnthn masak: I've holidays here too, but it's going to be fairly quiet.
22:30 masak same here.
22:30 jnthn I'm hoping that I'll be able to spend some decent time on Rakudo over the next week or so.
22:31 masak \o/
22:31 masak jnthn++ # Get Well Soon
22:31 jnthn Thanks :-)
22:32 ash___ well, i have it returnning the right list now, but its acting funny, like its not getting turned into a rakudo type, like if i say:  "say Foo.^methods" it returns the lenght of the array, and if i do $a = Foo.&methods; say $a.WHAT; i get an error saying "WHAT" not found on "ResizablePMCArray"
22:32 jnthn There's a bit of a bootstrapping issue there, yes.
22:32 ash___ being sick's no good jnthn, get better soon
22:33 jnthn Problem is that we want to use the metaclass when defining various List and Array classes.
22:33 jnthn So we can't rely on them being available.
22:33 jnthn But we also want to return instances of them.
22:33 jnthn :-)
22:34 jnthn We'll probably have to just replace those methods at a certain point in the bootstrap with ones that do the Right Thing.
22:34 ash___ i was thinking maybe there is a way to send it to the ClassHOW methods
22:35 ash___ then you'd only need to maintain 1 instance of the function and then just have RoleHOW go to it maybe?
22:35 jnthn No
22:35 jnthn I did ponder that route at one point.
22:35 jnthn Thing is that RoleHOW keeps the data mostly in its attributes directly.
22:35 jnthn We don't use the underlying Parrot role for very much now.
22:36 jnthn Whereas ClassHOW will keep on using the Parrot class PMC.
22:37 jnthn In the end (but not in ng) I probably want to write RoleHOW in NQP.
22:37 jnthn (Eventually maybe ClassHOW too, but we'll see.)
22:38 jnthn Anyway, I think we'll have to adopt a "replace it later" approach.
22:39 ash___ okay, well, for now i made a small change that got RoleHOW#methods to get to the right stuff so it doesn't give an error
22:39 jnthn We can avoid a lot of issues by getting the ordering of things right, but not everything, I fear.
22:39 jnthn ash___: OK. And roles still work?
22:39 jnthn As in, the composition stuff?
22:39 ash___ yeah
22:39 jnthn OK, great.
22:40 jnthn (They use .methods to find the methods to compose. :-))
22:40 jnthn ash___++
22:40 jnthn heh heh # "to see if jnthn++ freaks
22:40 jnthn "
22:41 * jnthn will review that change more tomorrow and decide whether to freak or not.
22:41 jnthn ;-)
22:41 ash___ are you sure?
22:41 ash___ i added a few says and a _dumper to the pir code for RoleHOW.methods and it only is getting called once
22:41 ash___ well, the output's happening once
22:42 cotto joined #perl6
22:42 ash___ so i assume its only getting called once
22:42 ash___ and its only when i call it
22:42 jnthn ash___: See RoleToRoleApplier.nqp for example.
22:43 jnthn Heh. "cool typing".
22:45 ash___ jnthn: i see why i am not getting any problems, in RoleToClassApplier.nqp they avoid directly calling the .methods funciton
22:45 ash___ i'll check if it works with RoleToRoleApplier.nqp
22:46 ash___ yup, it does call it
22:46 ash___ but it still working
22:46 ash___ just need to figure out how to turn ResizablePMCArray into a rakudo type
22:46 ash___ do you know how?
22:48 jnthn ash___: Now, it's calling it.
22:48 jnthn for @composees {
22:48 jnthn my @methods := $_.HOW.methods($_.HOW);
22:48 ash___ ng is very lazy, it didn't compose the second role I defined until i actually call use it
22:49 ash___ jnthn: well, what I am trying to fix is when you use RoleName.^methods; in your actual code
22:49 ash___ ng: role A { }; say A.^methods;
22:49 p6eval ng 9d5018: No such attribute 'parrotclass'␤current instr.: 'perl6;RoleHOW;methods' pc 4866 (src/metamodel/RoleHOW.pir:47)␤
22:49 ash___ all i effectively did was:
22:49 ash___ ng: role A { }; say A.HOW.methods(A.HOW);
22:49 p6eval ng 9d5018: 0␤
22:50 ash___ i just added a check to methods to see if the first param was a RoleHOW, if not i call 'HOW' on the object
22:51 jnthn ash___: The problem is that List does Positional, Positional has methods and so we can't use List at that point.
22:51 jnthn Since role composition needs to use .methods
22:51 masak I don't know why, but I'm constantly surprised that the \ in push @a, \%h; is necessary.
22:51 ash___ hmm *that went over my head*
22:52 jnthn ash___: The right Rakudo type to return would most likely be a List.
22:52 masak ash___: jnthn is suffering from the fact that he can't use the full arsenal of the type system during the construction of same.
22:52 ash___ so, the right type that should return is a list, but that's not useable at that point since list require .methods?
22:52 jnthn ash___: But we need to call the methods method of RoleHOW before the class List is defined.
22:52 ash___ okay, i see
22:53 jnthn ash___: Yes, thus why I suspect we may have to patch in / update those methods later in the "bootstrap".
22:53 ash___ okay, yeah that makes sense
22:53 jnthn masak: That surprises me a bit too.
22:54 masak jnthn: hashes flatten to a list of pairs there.
22:54 jnthn masak: I mean, I know why it...yes, right.
22:54 masak yes, same here.
22:54 masak I know why, but it feels... odd.
22:54 jnthn Yeah. A place you have to care about "references" in a sea of not caring.
22:55 masak maybe the semantics are wrong, and neither arrays nor hashes should flatten in Perl 6 push :)
22:55 masak and so you'll have to use prefix:<|> for both when you actually want flattening.
22:55 ash___ jnthn: does that seem right to you? to have to replace a function like that at a later point? (is that the "Right way" to fix the problem?)
22:55 jnthn masak: I could go with that, but then it's siggy probably needs to change.
22:55 * masak .oO( flattening will get you anywhere... )
22:56 jnthn .oO( well flattering her got me nowhere, next time I'll try that... )
22:56 jnthn ash___: It doesn't strike me as especially wrong.
22:57 ash___ jnthn: what if at runtime you wanted to compose a role and you had already replaced that method with a new one, would it still be compatable?
22:57 jnthn ash___: Should be provided the composer is able to deal with Rakudo arrays and Parrot arrays.
22:58 jnthn Which as it's currently written it probably should be.
22:59 jnthn masak: Question is what would the right signature for push be.
22:59 masak jnthn: the same, I think.
23:00 masak it's convenient to be able to push several things at once.
23:00 jnthn masak: No, it can't be.
23:00 jnthn masak: Binding to a slurpy param enforces list context.
23:00 jnthn masak: That's what causes the flattening.
23:00 masak oh!
23:00 jnthn masak: Also, what would you expect push @a, @b to do?
23:01 masak put the @b inside @a, at the end.
23:01 jnthn And not flatten it?
23:01 masak right.
23:01 masak in my new, imagined model.
23:01 jnthn Yeah, we kinda lack a way to take a variable number of arguments and not enforce the list context, I think.
23:02 jnthn *\@array would be the "logical" way to say htat I guess. ;-)
23:02 masak the current way, yes.
23:02 PerlJam greetings.
23:03 jnthn masak: My other comment if you had wanted push @a, @b to still flatten woulda been to ask "should a hash do .paris in list context?
23:03 jnthn oh hai, PerlJam
23:03 * masak would like to do Paris
23:03 PerlJam If we have .paris, is there also .rome ?
23:04 jnthn masak: Hilton? ;-)
23:04 * masak blushes
23:04 masak not necessarily.
23:04 masak she's not my type.
23:04 jnthn No, mine either.
23:05 jnthn masak: Anyway, it's an interesting question. It does feel a bit odd.
23:09 jnthn TimToady: fwiw, I need to give the Cool failover thing a bit more thought (preferably when my brain is in better working order). It doesn't make me immediately freak out. I'm curious why single dispatch has to care about the Cool package. I'm also curious what failover subs we'll put in there by default, e.g. will the most generic multi infix:<+> live in there too.
23:13 ash___ jnthn: do you know where the 'bootstrap' should take place? I am not sure where that should be happening
23:15 jnthn ash___: Not exactly, sorry.
23:15 jnthn ash___: It needs more thought yet.
23:15 ash___ k
23:15 ash___ thats fine
23:15 jnthn Will think on it when my thinker works better again. :-)
23:16 jnthn Feel free to take a look and propose a place too.
23:16 ash___ will do, i was just making sure there wasn't an established place already
23:18 masak look! pretty! http://gist.github.com/260687
23:18 ash___ in ClassHOW you call: new "Array" , which kind of array is that?
23:19 jnthn ash___: That'd be the Rakudo one, I believe.
23:19 jnthn ash___: We may get away with it there.
23:19 jnthn ash___: Or alternatively, it may be a relic.
23:20 ash___ jnthn: alright, just checking
23:20 jnthn masak: Nice!!
23:20 jnthn masak++
23:20 masak jnthn: that's the new traversal engine at work. :)
23:21 masak I'm -so- glad I developed it standalone before trying to get it working inside GGE.
23:21 masak it was a lot of work to develop it standalone, and it's a lot of work now.
23:22 masak the two combined would likely have made me give up.
23:24 will_ joined #perl6
23:24 jnthn Wow. By the time my new laptop reaches me it will have been through 4 countries already. :)
23:24 * jnthn is hopefull he'll have it tomorrow
23:24 jnthn Then my Rakudo compiles will be a LOT faster!
23:24 jnthn otoh, the snow may spoil things.
23:25 ash___ what kind of new toy did you get?
23:26 jnthn ash___: A new ThinkPad.
23:26 jnthn ash___: Hoped to have it a week or two ago, but they've been a bit slow to build and ship it.
23:27 ash___ jnthn: holiday rush i am sure
23:27 jnthn ash___: Aye.
23:27 jnthn I'm hoping for fast compiles since it's got some solid state caching in too. :-)
23:28 masak fast compiles for jnthn means Rakudo gets better faster \o/
23:28 ash___ does it have a solid state hard drive?
23:29 ash___ those are amazing, i can't wait for their prices to come down
23:30 jnthn ash___: No, too pricey. I went for conventional hard drive but one of those Intel Turbo thingies.
23:30 jnthn That keeps a solid state cache of your most frequently accessed stuff.
23:31 jnthn Not sure how well it works.
23:31 jnthn But wasn't especially expensive to add, so figured it was worth a try. :-)
23:31 jnthn OK, time for me to take some rest.
23:32 ash___ wonder how those work. i have always wished they had a combo drive for laptop's that was part solid state part normal drive, but i can see why, partically speaking, thats hard to do
23:32 jnthn Catch y'all tomorrow.
23:32 ash___ jnthn: if i make any productive progress on the role thing i'll send you a patch
23:32 jnthn ash___: Yay! Thanks. :-)
23:32 jnthn o/
23:34 pmurias jnthn: does the compilation access enough stuff that it won't all fit in the ram?
23:41 silent11 joined #perl6
23:42 colomon joined #perl6
23:42 pugs_svn r29384 | pmurias++ | [mildew] removing debugging leftover
23:42 pugs_svn r29385 | pmurias++ | [mildew-js] optimalisation, .DISPATCH() can return a value
23:45 soupdragon joined #perl6
23:57 eternaleye joined #perl6

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

Perl 6 | Reference Documentation | Rakudo