Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2010-06-29

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:04 redicaps joined #perl6
00:07 jaldhar joined #perl6
00:09 dalek csmeta: r353 | stefa...@cox.net++ | trunk/vicil/Kernel.cs:
00:09 dalek csmeta: [vicil] Fix numerous syntax errors.  Modernize implementation of &die.
00:09 dalek csmeta: review: http://code.google.com/p/csmeta/source/detail?r=353
00:14 amkrankruleuen joined #perl6
00:20 redicaps left #perl6
00:26 lkk- joined #perl6
00:37 amkrankruleuen joined #perl6
00:44 dalek csmeta: r354 | stefa...@cox.net++ | trunk/vicil/Kernel.cs:
00:44 dalek csmeta: [vicil] Add a bunch of stubs using the new KernelSetting.Die
00:44 dalek csmeta: review: http://code.google.com/p/csmeta/source/detail?r=354
00:48 yinyin joined #perl6
01:01 frew can anyone explain to me how to use the <?> regex directive?
01:02 frew patrick explained it to me once and it seemed helpful, and I think I can use it now, but I can't recall what it does
01:02 frew a link to what/where to look for doc would be good too
01:03 frew it seems like some way to sprinkle some kind of anchor like things in your document, but I don't really understand
01:03 sorear <?> does absolutely nothing
01:03 frew sorear: so why use it?
01:04 sorear because a regex with no text in it is illegal as a probable error
01:04 sorear <?> makes clear that you actually wanted to match nothing
01:04 sorear "" is the same effect
01:04 frew ok, so why would you want to match nothing I guess I'm asking
01:05 sorear anchoring common actions is a common thing
01:05 sorear token foo { <?> }
01:05 sorear whenever <foo> appears, Actions.foo is called
01:05 frew ooh
01:05 sorear but <foo> matches nothing and doesn't affect the parse in any way
01:05 frew ok, so for actions
01:05 frew that makes sense
01:05 frew that makes it make perfect sense
01:05 frew thanks sorear++
01:06 frew I forget how actions tie in since I haven't used that much yet
01:06 sorear it's also occasionally useful in conjunction with the more unusual quantifiers
01:06 sorear [ foo | <?> ] is the same as [foo]?
01:06 sorear but there's no similar simplification of <?> ~ ')' foo
01:07 frew ah, interesting
01:07 frew what's that last one do?
01:08 sorear matches foo followed by ')', treating ')' as a closing delimiter for parse erors
01:09 frew hm, less dense than the regex, but I still don't understand :-)
01:09 sorear it *is* a pretty unusual quantifier
01:09 frew well, leave it for now :-)
01:09 sorear it's mostly intended for use in STD.pm6
01:09 frew sure
01:09 sorear stuff like '(' ~ ')' <EXPR>
01:10 Schwern joined #perl6
01:10 Schwern I have a question about pick().  If I say @picks = @list.pick(2) am I guaranteed to get two *different* items?
01:11 Schwern Or is pick sugar for @picks = map { $list[rand @list] } 1..2 (perl5 style) ?
01:12 frew Schwern: looks like either
01:13 frew Schwern: look at http://svn.pugscode.org/pugs/docs/Perl6/Spec/S32-setting-library/Containers.pod
01:13 frew Schwern: search for pick
01:13 Schwern Yeah, its not clear in the synopsis
01:13 frew Schwern: but the default is different it seems
01:13 Schwern What replace doesn't isn't clear either
01:14 Schwern And there's no illustration of what @values does.
01:14 frew I thought replace was the statistical term for that
01:14 Schwern <-- not a statistician.
01:14 Schwern Or C programmer.  Or Lisp programmer.
01:14 frew Schwern: heh
01:15 frew Schwern: http://svn.pugscode.org/pugs/t/spec/S32-list/pick.t <-- examples?
01:16 Schwern ok ~(@arr.pick(4)) eq 'z z z' implies you get different items
01:17 Schwern And @values are used to replace the items picked?
01:17 Schwern In order?
01:19 Schwern Apparently not
01:20 Schwern How do I go about correcting/clarifying this
01:21 sorear I don't understand what you mean by "@values are used to"
01:22 sorear (1..6).pick(3) # never returns the same value twice
01:22 sorear (1 xx 6).pick(3) # always returns 1 1 1
01:22 sorear (1..6).pick(3, :replace) # can return the same value twice
01:22 Schwern Oh, I got confused by the fact that pick() appears to be both a method and a function
01:22 sorear (1..6).pick(*) # Shuffles the list
01:23 Schwern Which is... why is that?
01:23 sorear A lot of Perl 6 methods have function aliases which use the first argument as the invocant
01:23 sorear push @foo, 1, 2, 3;  is an alias for @foo.push(1, 2, 3)
01:23 redicaps joined #perl6
01:23 sorear same with pick
01:23 Schwern Except pick is backwards
01:23 Schwern our multi pick ( Int $num, Bool :$replace, *@values )
01:24 dalek csmeta: r355 | stefa...@cox.net++ | trunk/vicil/Kernel.cs:
01:24 dalek csmeta: [vicil] Many miscellaneous fixes.
01:24 dalek csmeta: review: http://code.google.com/p/csmeta/source/detail?r=355
01:24 Schwern And it seems silly to pollute the global namespace when you have methods.
01:25 sorear Rakudo's definition is that pick $num, $a, $b, $c  =   ($a, $b, $c).pick($num)
01:25 Schwern sorear:  The function version of push appears to be missing from S32/Setting/Containers.
01:25 Schwern Unless "is export" handles that?
01:25 sorear don't trust anything you read in S32
01:25 sorear ah
01:26 sorear is export handles the non-reversed form
01:26 sorear so S32 defines a function pick, but the wrong one
01:26 sorear but that's ok; S32 isn't right about very much else
01:26 Schwern Joy
01:27 Schwern And "replace" is a weird name for "don't pick the same item twice"
01:27 sorear as the synopsis numbers increase, they become more fantastical and less wedded to implemented or thought
01:27 Schwern How can I bitch about this productively?
01:27 sorear replace means *allow* picking the same item twice
01:27 sorear imagine a deck of cards.. if you pick two, you won't pick the same one twice
01:28 sorear but if you pick one, replace it back in the deck, then pick another one, you could get two of the same
01:28 Schwern Sure.  Its link to "replace" is a stretch.
01:28 Schwern I guess "pick one then REPLACE it in the deck"
01:28 Schwern Which is not what I'd think.  I thought it was "pick one and replace it with something else"
01:28 sorear it's established statistics jargon.  I can see adding allow-dup as a synonu,
01:28 sorear synonym
01:29 Schwern That would be nice
01:29 Tene IME, that tends to be an evil road to go down.
01:29 sorear What?
01:29 Tene Having multiple completely-identical names for one thing.
01:29 Schwern Tene:  Well, we're not all statisticians.
01:30 Schwern Or awk programmers.  Or C programmers.  Or <pick implied background knowledge here>
01:31 Tene Right, but nobody is actually expecting you to guess the API.  There's always some learning curve to an API, and adding "You can call it by any of these N names" is going to make things more difficult.
01:31 Tene If you see one name in one place and the other name in another place, you're going to assume they mean different things.
01:31 Tene If you only know one name, and you search for all instances of it, you'll miss uses of the other name.
01:31 Tene etc.
01:32 Tene It increases the number of things to be learned, for (IMO) negligible benefit.
01:35 frew so for protoregexen, is the <...> what the ..implemenetation? regexen slot into?
01:36 frew so I could do proto token foo { a<...> }; token foo:sym<a> { a }; token foo:sym<b> { b }; to mean aa | ab?
01:38 Schwern Tene:  In that case, one should pick the one that means something to the layman rather than the technical term.
01:39 plobsing joined #perl6
01:39 Ambiguity joined #perl6
01:40 Schwern Anyhow, how can I do something productive about this?
01:42 frew Schwern: well, obvious the top man to talk to would be TimToady
01:42 frew Schwern: there's also the Mailing list
01:43 frew Schwern: well, there's three mailing lists, I htink you want p6-lang
01:44 Schwern Ok, thanks.
01:56 sorear I'd start with TimToady
02:16 felliott joined #perl6
02:22 ciphertext joined #perl6
02:23 agentzh joined #perl6
02:30 felliott joined #perl6
02:36 amk joined #perl6
02:37 songmaster joined #perl6
02:42 TiMBuS joined #perl6
02:43 dalek csmeta: r356 | stefa...@cox.net++ | trunk/vicil/Kernel.cs:
02:43 dalek csmeta: [vicil] Flesh out the concept of user-definable classes
02:43 dalek csmeta: review: http://code.google.com/p/csmeta/source/detail?r=356
02:55 prammer joined #perl6
03:04 masonkramer joined #perl6
03:34 rv2733 joined #perl6
03:42 frew how do I make a regex that doesn't backreference at all?
03:43 sorear That word does not make sense in that context.
03:43 frew hehe
03:43 frew ok
03:44 frew so I have a grammar
03:44 tylercurtis frew: Do you mean, backtrack?
03:44 frew yes
03:44 frew I want to know if it matched
03:44 frew but not the value of the match
03:44 frew does that make sense?
03:45 sorear yes
03:45 sorear the word you are looking for is "capture"
03:45 frew what words should I use next time, and how do I tell perl?
03:45 frew ah
03:45 frew ok
03:45 frew non-capturing regex
03:45 sorear well, there's no way to globally say "no captures here"
03:46 sorear and I'm a little suspicious of your reason to want such a thing
03:46 frew fine, so inside the regex then I guase?
03:46 sorear captures are things you put into a regex; if you don't want them, don't use them
03:46 frew eh, no reason not to want it really, mostly I just don't need it
03:46 frew but sure, I'll defer to your judgement for now :-)
03:46 sorear then don't use () or <foo>
03:47 sorear instead, use the non capturing forms [] and <.foo>
03:47 frew ok, I must be confused
03:47 frew when I print out the generated ast it has the values inside
03:47 frew ok
03:47 frew I get it
03:47 sorear print out the ast?  you mean perl6 --target=past?
03:47 frew I'm actually using nqp
03:47 frew but yes
03:47 frew that
03:50 tylercurtis frew: can you give us an example of what's happening?
03:54 sftp joined #perl6
03:57 ash_ :ratchet in perl6 causes regex's to not backtrack
03:57 ash_ rule/token have :ratchet enabled
03:57 sorear but that's not important right now
03:58 ash_ sorry, backlogging
03:58 ash_ i should finish reading before commenting
04:12 frew I'm just curious is all
04:12 frew it's a regex matvhinbg a single char, so I figure why capture it?
04:14 sorear what char
04:15 frew 'd' ?
04:15 frew 'x'
04:15 frew etc
04:17 frew it's a grammar for vi
04:18 frew so...
04:20 ash_ joined #perl6
04:20 sorear when you said "regex" I thought you were talking about / SOMETHING HERE ?
04:21 ash_ joined #perl6
04:21 sorear /
04:21 sorear please explain what you were actually talking about
04:22 frew well
04:22 frew when I said grammar I thought that explained it
04:22 frew a grammar is a group of regexes right?
04:22 ash_ yeah
04:22 frew so...
04:22 frew that :-)
04:23 ash_ kinda how an object is a group of properties and methods (or just properties if you consider methods variables), a grammar is just regex's
04:23 frew right
04:23 frew so I have a TOP on it, ofc
04:23 frew and I pass it a string
04:24 frew (automatically, with the nqp compiler stuff)
04:24 frew and it parses to a tree
04:24 frew and I was wondering if I could just have the regexen say that they matched, and not specifically wat, since they can only match a single char anyway
04:26 sorear regexen never say what they match
04:26 frew so tokens do?
04:26 sorear they only say where they match, and the .Str is created on demand
04:26 * frew is using the token keyword
04:26 sorear um, tokens and regexes are exactly the same thing
04:27 frew sorear: note that I called them regexes, I was just clarifying :-)
04:28 frew http://paste.scsys.co.uk/45298
04:29 ash_ rakudo: say ?('a' ~~ /./), ' and ', ?('b' ~~ /a/); # like sorear said, they tell you if they matched
04:29 p6eval rakudo d18b5e: OUTPUT«1 and 0␤»
04:31 ash_ in nqp and perl6 you can add actions to your regex's too
04:31 ash_ if you want
04:32 frew that's step twpo
04:32 ash_ rakudo: 'a' ~~ /a { say 'got an a'; }/
04:32 p6eval rakudo d18b5e: OUTPUT«got an a␤»
04:33 ash_ 3dd is delete 3 lines in vi right?
04:34 frew ash_: yeah
04:34 frew sam as d3d
04:34 frew and d2j
04:34 frew my plan is to make a thing that can hook into vim and somehow set up an achievements system for vi
04:34 frew since that would be the funnest thing ever
04:34 frew obv the hard part is hooking in
04:35 frew like, there's no mechanism in vim to do it, and using a keylogger is gross for a million different reasons
04:36 lrnperl6 joined #perl6
04:36 ash_ you want vim to hook into vi?
04:36 ash_ i don't think i understood that correctly ><
04:40 redicaps joined #perl6
04:40 frew heh
04:40 frew no, I just want to hook into vim
04:40 frew and somehow get EVERY command the user types
04:41 frew including hjlk etc
04:41 ash_ isn't there a command buffer?
04:41 frew so that I can make a game out of it; where if you use arrow keys or w/e you lose points
04:41 frew not that I could find
04:41 ash_ although that might not include moving the curious...
04:43 frew some guys in #vim are interested in adding the hooks for me
04:43 frew I figure I'l work on the parser for now, since it's fun and easy
04:46 ash_ have you looked at the viminfo file? :help viminfo in vim
04:47 ash_ viminfo can store "- The input-line history." (which sounds similar to what you want) /shrug
04:49 ciphertext frew:  potentially useful vim commands:
04:49 ciphertext :noremap {lhs} {rhs}   <-- override/define {lhs} to do {rhs}, without recursively looking up {rhs} for mappings; e.g. ":noremap j jj"  would make typing 'j' move down two lines
04:49 ciphertext :function
04:50 ciphertext for instance:
04:55 ciphertext :function Game_cmd(cmd)
04:55 ciphertext :     echo a:cmd  # replace this with something that calls your script, e.g. :exe
04:55 ciphertext :endf
04:55 ciphertext :noremap j :call Game_cmd(j)<cr>j
04:56 ciphertext * should be :call Game_cmd("j")<cr>j
04:57 ash_ left #perl6
04:59 frew zomg
04:59 frew ciphertext: the only problem there is that I'd need to remap every single thing to that thing somehow
04:59 frew but I'll look at that and viminfo both
05:00 frew ciphertext++, ash_++ # more helpful than #vim
05:06 araujo joined #perl6
05:17 Mowah joined #perl6
05:26 dalek csmeta: r357 | stefa...@cox.net++ | trunk/vicil/Kernel.cs:
05:26 dalek csmeta: [vicil] Turn Sub and ScalarContainer into ordinary classes in the P6 metamodel
05:26 dalek csmeta: review: http://code.google.com/p/csmeta/source/detail?r=357
05:28 sorear next, I'm going to start getting the compiler into shape
05:30 sorear the vicil Kernel already supports lexical scope, full protolexpad semantics, binding, readonly binding, custom containers, resumable exceptions, and CATCH skipping
05:36 diakopter vicil: vicil: ++sorear; goto vicil;
05:38 tylercurtis Does the spec actually say anything in detail about $*ARGFILES? lines() defaults to it. It's the magic command-line input handle. It defaults to $*IN. Anything else at all?
05:39 sorear Like P5 unless notes
05:39 sorear noted
05:39 sorear see "I/O Operators" in perlop(1)
05:39 sorear and the magic ARGV filehandle
05:40 sorear note that some guy already posted an $*ARGFILES implementation to p6l or p6c
05:40 kaare joined #perl6
05:41 tylercurtis sorear: mine's more feature complete(and I already had it mostly done by the time I saw that post). I just want to see if there's any other useful methods I should implement.
05:44 tylercurtis sorear: thanks for pointing me to perlop, by the way.
05:47 tylerni7 joined #perl6
05:47 tylerni7 joined #perl6
05:49 kaare_ I wrote about yesterday, http://blogs.perl.org/users/kaare/2010/06/my-first-perl6-code.html
05:55 sorear kaare_: that code there will be far more efficient than FakeDBI
05:56 sorear what makes FakeDBI "fake" is that it doesn't actually connect to any databases.  It forks a DB client shell
05:56 rcsheets oh hey i did that once with sybase, but by hand and in perl5. it was horrible.
05:57 diakopter interesting
05:58 kaare_ sorear: I hope to be able to work more on FakeDBI. But not sure. I have vacation starting Friday
05:58 rcsheets kaare_: the "ING" of RETURNING on your next-to-last line is cut off in my browser, if you care.
06:00 kaare_ rcsheets: It's the styling of blogs.perl.org, if you select it, it's there.
06:01 kaare_ select it with the mouse, that is.
06:01 rcsheets yeah, i could tell it was there. didn't realize it was a site-wide problem. sorry.
06:02 kaare_ I just put a pair of <pre></pre> around. If I can do it better, it would be great.
06:02 rcsheets seems reasonable to me
06:03 kaare_ I know that cxreg has been working on a FakeDBD::Pg. I hope he will share his code. Perhaps we could work something out.
06:05 Su-Shee joined #perl6
06:35 cxreg kaare_: ive got some code, but it died on a missing thunk
06:36 cxreg because i was using PQsetdbLogin instead of PQconnectdb
06:36 cxreg needs some work to use PQconnectdb which has a simpler signature, but requires some finessing to get the connect string set up
06:37 cxreg im happy to push to github
06:37 redicaps left #perl6
06:37 eternaleye joined #perl6
06:38 tylercurtis cxreg: I think ash_'s libffi NCI work is coming along pretty well, so that might fix your problem whenever it gets merged into Parrot trunk.
06:38 kaare_ cxreg: Please do. Don't know if I can help, but it can't hurt.
06:39 jhuni joined #perl6
06:39 cxreg tylercurtis: that'd be nice
06:41 tylercurtis cxreg: I don't know for certain that it will(not sure exactly of the scope of it, but I'm pretty sure libffi has support for runtime generation of functions(which could be used to generate missing NCI thunks)), nor do I know that it will be merged soon, but it might and it might be.
06:42 cxreg looks like PQconnectdb is super easy anywa
06:42 cxreg im testing it now
06:46 literal joined #perl6
06:49 eternaleye joined #perl6
06:50 JimmyZ joined #perl6
07:02 moritz_ oh, btw I have some untested DBD::Pg lying around here
07:02 moritz_ from yesterday's train ride :-)
07:02 moritz_ I'll paste it
07:02 moritz_ maybe it's useful to somebody
07:03 moritz_ http://nopaste.snit.ch/21655
07:06 moritz_ hugme: add moritz to zavolaj
07:06 hugme moritz_: sorry, I don't know anything about project 'zavolaj'
07:07 foodoo joined #perl6
07:14 moritz_ phenny: tell mberends that currently 'use FakeDBI' requires NativeCall and libmysql even when the mysql fakedbd isn't loaded
07:14 phenny moritz_: I'll pass that on when mberends is around.
07:21 dukeleto what does Nil inherit from?
07:21 moritz_ Nil is an empty Parcel
07:21 moritz_ rakudo: say Parcel.^parents
07:21 p6eval rakudo d18b5e: OUTPUT«Iterable()Cool()Any()Mu()␤»
07:21 moritz_ rakudo: say Nil.^parents
07:21 p6eval rakudo d18b5e: OUTPUT«Iterable()Cool()Any()Mu()␤»
07:22 sorear rakudo: say Nil.WHAT
07:22 p6eval rakudo d18b5e: OUTPUT«Parcel()␤»
07:24 dukeleto moritz++, sorear++
07:27 * dukeleto just made good progress on PL/Perl6
07:28 mathw Morning
07:29 dukeleto mathw: good $localtime
07:32 agentzh joined #perl6
07:34 kaare_ dukeleto: cool.
07:36 dukeleto kaare_: yes, after taking a break for a while, the problem I was having dissolved away, which is very nice indeed
07:41 azawawi joined #perl6
07:41 azawawi hi
07:41 azawawi sorear: ping
07:41 sorear Hello
07:41 sorear Pong
07:41 azawawi wow
07:41 azawawi :)
07:41 azawawi realtime response
07:42 kaare_ dukeleto: What's the status / timeframe of the project?
07:42 Ross joined #perl6
07:42 kaare_ It's not connected to PL/Parrot, I suppose?
07:42 dukeleto kaare_: it is part of PL/Parrot
07:43 azawawi sorear: I noticed that we have lib6 and syml. should these be in PERL6LIB?
07:43 azawawi sorear: as a result of make dist (STD.pm6)
07:44 dukeleto kaare_: it is in constant development. I would like to have a working PL/Perl6 when Rakudo* comes out. It works reasonably well as of tonight, it needs a bunch more tests and docs
07:44 sorear lib6 should be in PERL6LIB, but I don't think there's anything in it yet
07:44 sorear oh
07:44 sorear yes
07:44 mberends joined #perl6
07:45 sorear syml should get sent to whatever your tmp_prefix dir is
07:45 azawawi sorear: aha ok
07:45 sorear (yes, it's not a very temporary file.  LTA.)
07:45 * azawawi is updating S:H:P6
07:46 kaare_ dukeleto: Is it on github or anywhere else?
07:47 dukeleto kaare_: http://github.com/leto/plparrot
07:48 mjk joined #perl6
07:48 dukeleto kaare_: also check out pl.parrot.org
07:48 mj41 joined #perl6
07:54 mberends moritz_: good point. I wanted to avoid separate installs of DBI and DBDs for a while but this kind of issue might make it inevitable.
07:54 phenny mberends: 07:14Z <moritz_> tell mberends that currently 'use FakeDBI' requires NativeCall and libmysql even when the mysql fakedbd isn't loaded
07:55 kaare_ dukeleto: cool++
07:55 lkk- joined #perl6
08:02 kaare_ dukeleto: If you, or anyone else, has any control over parrot's Pg.pir (or rather the original), it would be nice to add an array and a hash return option for the result class.
08:02 dukeleto kaare_: are you using Pg.pir ?
08:02 * moritz_ does
08:03 * dukeleto can happily apply patches to Pg.pir, but hasn't worked on it directly
08:06 thebird joined #perl6
08:06 dukeleto Here is a gist of PL/Perl 6 in action: http://gist.github.com/456954
08:09 sftp joined #perl6
08:13 moritz_ wow, .finish on a Pg handle segfaults
08:13 dukeleto moritz_: feel free to open a TT for that, with a code snippet and backtrace, if you can
08:14 moritz_ dukeleto: I'm trying to reproduce in pure PIR first
08:18 flw joined #perl6
08:19 kaare_ dukeleto: Currently just for fun. Perhaps cxreg could use it for FakeDBD::Pg.
08:23 moritz_ dukeleto: http://trac.parrot.org/parrot/ticket/1695
08:25 dukeleto moritz++ # that is some epic fail
08:26 moritz_ it shows how many users the Pg library has :/
08:28 tylercurtis dukeleto, moritz_: glancing at Pg.pir(although my trunk checkout is a day or two old), .finish doesn't appear to check that the 'con' attribute is valid before calling the PQfinish function on it.
08:32 moritz_ tylercurtis: I've noticed that too, but I wasn't sure if that's the actual problem, or only a symptome of it
08:36 tylercurtis Probably at least an actual problem, if not the actual root problem in this case.
08:36 moritz_ tylercurtis++ # $*ARGFILES patch
08:40 tylercurtis moritz_: I'm not 100% sure the *patch* will work. When I did "patch argfiles.patch", it didn't seem to do anything for a very long time. I'm not sure if I was using patch correctly though. Nor if I was creating the patch correctly("git diff HEAD >argfiles.patch"?). But the code will work, as far as my testing indicates. I previously had a .getc method implemented, but it caused a parrot assertion failure when I tested it and I didn't feel like debuggin
08:40 tylercurtis that this late.
08:43 sorear the correct way to make a patch with git is git format-patch -1
08:44 yinyin joined #perl6
08:45 tylercurtis On a very unrelated note, I'd love to get some eyeballs on a little project I've been working on this weekend: http://perlmonks.org/?viewmode=public;node_id=846756 it's basically a conversion of the paper "Notation as a Tool of Thought"(written in APL) to Perl 6, where possible(so far, the only lacks have been specifying the axis on which operations on multi-dimensional arrays work and built in mixed base arithmetic). Well, the beginning of a conversio
08:45 tylercurtis said paper. The repo with the source that generated it is linked there, as is the original paper.
08:45 tylercurtis sorear++, thanks. I'll send a proper patch then.
08:48 moritz_ tylercurtis: application works as 'patch -p1 < argfiles.patch'
08:48 moritz_ patch reads from STDIN by default
08:54 tylercurtis moritz_: I've sent properly-created patches to the list now. But now I shall go to bed. Good night, folks.
08:54 moritz_ tylercurtis: too late, already pushed it :-)
08:56 * sorear out
08:56 tylercurtis One last thing: I don't know how $*ARGFILES is an acceptable default argument for lines(since it "is" not IO), but it works.
08:57 dalek rakudo: 68852e4 | tcurtis++ |  (5 files):
08:57 dalek rakudo: Implement $*ARGFILES, and make it the default handle for lines()
08:57 dalek rakudo: Signed-off-by: Moritz Lenz <moritz@faui2k3.org>
08:57 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/68852e4e7b0fa5c7845540ad261c14c449d9667b
08:58 dalek csmeta: r358 | stefa...@cox.net++ | trunk/vicil/Compiler.pm:
08:58 dalek csmeta: [vicil] Start prototyping the Perl code generator
08:58 dalek csmeta: review: http://code.google.com/p/csmeta/source/detail?r=358
09:06 dukeleto perl6: my $r = sub { @_[0].WHAT }; $r.()
09:06 p6eval pugs, rakudo d18b5e:  ( no output )
09:06 p6eval ..elf 31494: OUTPUT«Global symbol "$a__" requires explicit package name at (eval 123) line 5.␤ at ./elf_h line 5881␤»
09:08 dukeleto perl6: my $r = sub { say @_[0].WHAT }; $r.()
09:08 p6eval pugs: OUTPUT«Scalar␤»
09:08 p6eval ..rakudo d18b5e: OUTPUT«Proxy()␤»
09:08 p6eval ..elf 31494: OUTPUT«Global symbol "$a__" requires explicit package name at (eval 124) line 5.␤ at ./elf_h line 5881␤»
09:08 pugssvn r31495 | moritz++ | [evalbot] remove elf from perl6: target
09:09 dukeleto who is right? should it be a Scalar or a Proxy or neither?
09:09 timbunce joined #perl6
09:10 dukeleto timbunce: howdy!
09:11 timbunce dukeleto: howdy!
09:11 dukeleto timbunce: i just got the basics of PL/Perl 6 working. it can return ints/floats and strings back to Postgres
09:11 rgrau rakudo: <keep it simple stupid>.map: {/^./}
09:11 p6eval rakudo d18b5e:  ( no output )
09:11 timbunce dukeleto: great!
09:11 dukeleto timbunce: still figuring out how to data marshall from Rakudo to PG
09:12 rgrau rakudo: (<keep it simple stupid>.map: {/^./}).say
09:12 p6eval rakudo d18b5e: OUTPUT«_block59_block59_block59_block59␤»
09:12 timbunce dukeleto: worth spending time to get that right.
09:13 dukeleto timbunce: yes, and getting things right is usually correlated to having slept ;)
09:13 * dukeleto should do some of that
09:13 masak joined #perl6
09:13 masak oh hai, #perl6!
09:14 arnsholt It's you!
09:14 dukeleto masak: hai and bai :)
09:14 masak 百百
09:18 rgrau Am I doing something wrong here?
09:18 rgrau rakudo: say <keep it simple stupid>.map: {/^./}
09:18 p6eval rakudo d18b5e: OUTPUT«_block59_block59_block59_block59␤»
09:19 mathw oh hai masak
09:20 masak rakudo: say <keep it simple stupid>.map: {$_ ~~ /^./}
09:20 p6eval rakudo d18b5e: OUTPUT«kiss␤»
09:20 rgrau yay! thanks masak
09:20 * masak bows
09:23 moritz_ is there a #phasers today?
09:23 azert0x joined #perl6
09:23 * masak guesses so
09:23 masak I can't make it today. :/
09:24 moritz_ I'm not sure if I can
09:24 azawawi sorear: ping
09:24 moritz_ 10:56  * sorear out
09:24 moritz_ that was half an hour ago
09:24 azawawi moritz_: so the old lex/ directory is now pre-compiled into a pmc file, right?
09:25 moritz_ azawawi: I have no idea
09:26 azawawi moritz_: thx
09:42 timbunce dukeleto: you're probably aware of this prior art, but just in case http://python.projects.postgresql.org/pldocs/plpython3.html
09:44 masak moritz_: your physical-modeling blog post was mentioned in a Japanese tweet: http://twitter.com/1VQ9/status/17293317782
09:45 moritz_ masak: \o/ and thanks for letting me know.
09:47 moritz_ rakudo: say (-5 ... ^5).perl
09:47 p6eval rakudo d18b5e: OUTPUT«((-5, -4, -3, -2, -1, 0), [1, 2, 3, 4])␤»
09:47 IllvilJa o/
09:47 masak IllvilJa: \o
09:47 moritz_ rakudo: say (^5).perl
09:47 p6eval rakudo d18b5e: OUTPUT«0..^5␤»
09:47 moritz_ rakudo: say (^5).list.perl
09:47 p6eval rakudo d18b5e: OUTPUT«(0, 1, 2, 3, 4)␤»
09:47 moritz_ rakudo: say (-5 ... ^5).flat.perl
09:47 p6eval rakudo d18b5e: OUTPUT«(-5, -4, -3, -2, -1, 0, 1, 2, 3, 4)␤»
09:48 IllvilJa how's things going in the land of perl6?
09:48 moritz_ quite well, I'd say
09:49 moritz_ we now have $*ARGFILES, which is the same as the magic empty file handles known from Perl 5: while (<>) { ... }
09:49 IllvilJa cool!
09:49 moritz_ is now in Perl 6: for lines() -> $l { ... }
09:49 IllvilJa I've had too little time to "play around" with programming for the last few months... so I've lost track of what's happening with Perl 6.
09:50 moritz_ last month?
09:50 moritz_ oh, then there's more news :-)
09:50 IllvilJa I can imagine :-)
09:50 moritz_ rakudo has proper lazy lists and arrays
09:50 moritz_ rakudo: my @a = 1 ... *; ;say @a[5];
09:50 IllvilJa \o/
09:50 * moritz_ prais it acutally works :-)
09:50 p6eval rakudo d18b5e:  ( no output )
09:50 cono :D
09:50 moritz_ rakudo: my @a = 1 .. *; ;say @a[5];
09:50 p6eval rakudo d18b5e:  ( no output )
09:51 moritz_ it works locally heere
09:51 IllvilJa did a 'git pull' for rakudo recently and quite a LOT of code were altered, so I expected quite some progress.
09:51 moritz_ seems p6eval is too oold
09:51 cono rakudo: my $a = 1 ... *; say $a[5];
09:51 masak rakudo: say (1..*)[5]
09:51 p6eval rakudo d18b5e: OUTPUT«Method 'postcircumfix:<[ ]>' not found for invocant of class 'Int'␤  in main program body at line 1␤»
09:51 p6eval rakudo d18b5e: OUTPUT«6␤»
09:51 hejki cono: hehe. perl5 just owned you ;>
09:52 cono rakudo: my $a = 1 .. *; say $a[5];
09:52 p6eval rakudo d18b5e: OUTPUT«6␤»
09:52 cono hejki: p6 works too :p
09:53 moritz_ anyway, the array version works locally here
09:53 moritz_ other news: we have proper MAIN subs
09:54 zakame joined #perl6
09:54 hejki whot :O
09:57 pugssvn r31496 | moritz++ | [t/spec] test for RT #75698, -5 ... ^5 should contain only one 0
10:01 pugssvn r31497 | moritz++ | [t/spec] test for RT #75950, my ($x) = grep $early_hit, @long_range
10:03 masak std: / <?> /
10:03 p6eval std 31495: OUTPUT«ok 00:01 111m␤»
10:05 moritz_ masak: ha, http://rt.perl.org/rt3/Ticket/Display.html?id=75950
10:05 masak moritz_: what about it? :)
10:07 moritz_ masak: your bug was more persistent than pmichaud++ thought :-)
10:10 masak so it would seem :)
10:11 masak wonder why it matters whether the declaration is there or not.
10:16 bbkr rakudo: my $i = 0; $i++ for \[1,2,3]; say $i; # is it the right output?
10:16 p6eval rakudo 68852e: OUTPUT«1␤»
10:18 bbkr rakudo: (\[1,2,3]).WHAT.say # "for" should iterate over it 3 times?
10:18 p6eval rakudo 68852e: OUTPUT«Capture()␤»
10:23 masak bbkr: no, I think one iteration is right there. the prefix:<\> probably puts it in item context.
10:24 bbkr masak: cool, then http://rt.perl.org/rt3/Ticket/Display.html?id=73400 can be closed after tests
10:25 bbkr rakudo: my $i = 0; $i++ for [1,2,3]; say $i; # how about this one? looks correct, shouldn't flatten IMO, right?
10:25 p6eval rakudo 68852e: OUTPUT«1␤»
10:28 moritz_ that's correct
10:28 pugssvn r31498 | moritz++ | [t/spec] test for RT #75794 - take() with multiple arguments
10:28 moritz_ should only flatten with .flat or @([1, 2, 3])
10:29 bbkr moritz_: thanks, then http://rt.perl.org/rt3/Ticket/Display.html?id=73398 can also be closed. i'll add tests to both today.
10:30 moritz_ bbkr: do you have an RT account?
10:30 bbkr ofc
10:30 moritz_ what's your nick there?
10:30 bbkr bbkr
10:31 masak 'for [1, 2, 3]' doesn't flatten, but 'for @a' flattens even when @a eqv [1, 2, 3]
10:31 moritz_ phenny: tell pmichaud to please give 'bbkr' (same RT nick) privileges for the perl6 RT queue. Thanks!
10:31 phenny moritz_: I'll pass that on when pmichaud is around.
10:31 moritz_ bbkr: you can soon close the tickets yourself :-)
10:31 * moritz_ likes to delegate work
10:32 bbkr moritz_: I already have priviledges for RT and I'm closing tickets :)
10:32 bbkr privileges*
10:33 moritz_ oh
10:33 moritz_ sorry, I mis-interprted what you said
10:34 moritz_ I thought you didnt' have privs, which is why you wanted me to close them
10:34 moritz_ phenny: tell pmichaud never mind, has already happened
10:34 phenny moritz_: I'll pass that on when pmichaud is around.
10:38 bbkr moritz_: no problem :) I've checked 50% RT queue on Kiev build, will finish all by the end of the week.
10:38 moritz_ bbkr++ # going wild on RT queue
10:39 moritz_ it would be kinda cool to have a 'I've checked this ticket, still fails' button
10:39 moritz_ which would then store a timestamp
10:40 moritz_ and then one could generate a report ordered by last-checked-date
10:41 bbkr moritz_: indeed, good idea.
10:43 arnsholt An approximation of that might be to sort by timestamp of last comment?
10:45 moritz_ yes, but people don't comment with "nothing changed"
10:45 moritz_ too much effort
10:46 lrnperl6 joined #perl6
10:46 moritz_ anywy, it feels good not to be the only one working on tests for RT tickets
10:47 lrnperl6 hi moritz_
10:50 moritz_ hi lrnperl6
10:55 lrnperl6 I was browsing ruby-lang.org other day and found this: http://www.ruby-lang.org/en/documentation/ruby-from-other-languages/
10:55 eiro_ joined #perl6
10:55 lrnperl6 i think it will a good 5 mins introduction to perl6
10:56 masak tylercurtis++ # http://perlmonks.org/?viewmode=public;node_id=846756
10:57 moritz_ lrnperl6: having something like that for Perl 6 would be really great
10:58 lrnperl6 masak: Anonymous users can't see the scratchpads, sorry
10:59 lrnperl6 moritz_: trouble is I don't know perl6 to contribute there
10:59 bbkr t/spec/S03-operators/series.t goes into infinite loop somewhere. how can i execute it with --fudge and see output for separate tests to find the faulty one?
11:00 charsbar_ joined #perl6
11:00 moritz_ lrnperl6: then learn first, and contribute then :-)
11:01 lrnperl6 moritz_: that's the plan :)
11:01 moritz_ bbkr: when I run fudge, I usually just kill processes running too long
11:01 jnthn hi all
11:01 moritz_ erm
11:01 moritz_ wait
11:01 jnthn I may not be able to make #phasers today - sorry
11:02 jnthn (Got work evening out.)
11:02 masak jnthn! \o/
11:02 moritz_ bbkr: sorry, was confused, ignore me
11:02 jnthn s/may/likely/
11:02 jnthn masak! \O/
11:02 moritz_ bbkr: if you run the .rakudo file, you see the last successful test
11:03 jnthn I'd pre-post a report but I didn't do a lot this last week. :-/
11:03 jnthn Vacation and all that.
11:03 jnthn ooh, I probably need to pay attention to work meeting again now :-)
11:03 masak jnthn: http://use.perl.org/~masak/journal/40422
11:03 bbkr moritz_: this test doesn't have .rakudo version in Pugs repo, can this be auto-generated somehow?
11:03 masak (my last GSoC status report)
11:04 moritz_ bbkr: when you run 'make t/spec/S03-operators/series.t' a .rakudo file is generated
11:04 moritz_ at least if there's a fudge directive in the file
11:04 moritz_ it is, in this case
11:04 jnthn masak: I readed it last night I think
11:04 masak oki :)
11:05 jnthn You had to synch with me
11:05 jnthn But can't do that right now :-)
11:05 masak that's ok. :)
11:05 masak we'll meet up Friday at the latest :)
11:05 jnthn Yes, exactly.
11:05 masak \o/
11:05 jnthn Yay...hackathon med masak!
11:05 masak yay
11:06 bbkr moritz_: found it, thanks!
11:06 masak хакмит с jnthn! :)
11:08 jnthn \o/
11:08 bbkr rakudo: (1, 2 ... 0)
11:08 jnthn afk, work
11:08 p6eval rakudo 68852e:  ( no output )
11:08 moritz_ rakudo: say (1, 2 ... 0)
11:09 p6eval rakudo 68852e:
11:09 p6eval ..OUTPUT«123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130…
11:10 mjk joined #perl6
11:10 bbkr rakudo: use Test; is (1, 2 ... 0), Nil; # this one is already reported?
11:10 p6eval rakudo 68852e:  ( no output )
11:12 * masak thinks it's already reported
11:14 bbkr masak: thanks, i'll find this ticket and fudge those tests in series.t to make it usable again.
11:14 masak ++bbkr
11:15 moritz_ btw, this week's contribution was a huge success again
11:15 moritz_ I posted it before going to bed
11:16 moritz_ and when I woke up, I had two high-quality submissions
11:16 dalek rakudo: 6f66e96 | moritz++ | src/core/IO.pm:
11:16 dalek rakudo: $*ARGFILES as default for get()
11:16 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/6f66e96d049227c3fe6049c50392b10fbfe8b5f2
11:16 dalek rakudo: 871e2fb | moritz++ | src/core/IO/ArgFiles.pm:
11:16 dalek rakudo: IO::ArgFiles is IO
11:16 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/871e2fb0b3f5346b9f900bdfd82bb1770bd00544
11:16 dalek rakudo: 1576d48 | moritz++ | tools/ (2 files):
11:16 dalek rakudo: [autounfudge] run perl6 process with time and memory limit; evil, unix-only hack
11:16 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/1576d48ad5480c7dac2d71345a9e2118a31b4577
11:16 moritz_ one of them is in rakudo already
11:16 masak moritz_: clearly those challenges help fill a void of some kind.
11:17 masak it's heartening to know that not only is there that kind of support from non-core people, it's even strong enough that people jump at helping when they get the chance.
11:18 moritz_ so we need to try to activate this potential as good as possible
11:19 masak I wonder what's the biggest driving force; the promise of a t-shirt, or the chance to contribute?
11:20 moritz_ this week came without the promise of t-shirts
11:20 Su-Shee masak: telling people something concrete, tangible to do instead of leaving it to them "well contribute something, if you like.."
11:20 masak Su-Shee: aye, point.
11:21 Su-Shee masak: you can easily decide "oh, yes, I can do _that_" (and it's specifically ask for, so you don't add feature blindfolded.)
11:21 azert0x joined #perl6
11:21 masak indeed.
11:21 masak lunch &
11:21 moritz_ I found that hard to do
11:22 moritz_ because it looks like it goes contrary to the "do what you want, have fun" paradigm
11:22 moritz_ and the general truth that you can't tell volunteers what to do
11:23 moritz_ fact is, you can. Within limits.
11:23 mathw depends on the type of volunteer
11:23 mathw but it's good to present to people a project they can do
11:23 arnsholt Depends on how you tell them too
11:23 Su-Shee actually in my experience it's totally wrong that you can't volunteers tell what to do.. also, there plenty of possiblities _how_ to tell..
11:23 moritz_ arnsholt: that too
11:24 arnsholt This initiative of "Wanna help? Try starting here!" is awesome
11:24 azert0x joined #perl6
11:24 Su-Shee some do well with "I do what I like and think is good for the project". Other like to pick from a list of items and do those. other like concrete tasks where they feel they do something needed and useful.
11:25 arnsholt One of the hardest things when trying to contribute to a large projects is figuring out what to do and where to start
11:25 Su-Shee exactly.
11:27 Su-Shee and telling people how they should write their code and refactor this or that is also a pretty massive "telling volunteers what to do". even IF someone codes what he wants, he usally gets reviewed by peers and has to stay within the project's code culture. (some are anal, others are more liberal..)
11:28 moritz_ rakudo: 'blah foo blah' ~~ / foo { make 'bar' } /; say ?$/
11:28 p6eval rakudo 68852e: OUTPUT«1␤»
11:30 mjk joined #perl6
11:31 azert0x joined #perl6
11:36 Chillance joined #perl6
11:52 timbunce joined #perl6
11:56 daxim joined #perl6
11:58 daxim I managed to crash rakudo: http://stackoverflow.com/questions/3135673#3136410
12:00 takadonet morning all
12:01 mjk joined #perl6
12:03 envi^home joined #perl6
12:07 felliott joined #perl6
12:10 ruoso joined #perl6
12:10 masak takadonet: \o
12:12 takadonet masak: how are you?
12:12 masak takadonet: a bit too busy, but otherwise very good. and you?
12:12 takadonet masak: about the same
12:13 masak daxim: huh? where does the 'Divide by zero' come from? you're not doing any divisions in the script...
12:14 pugssvn r31499 | bbkr++ | t[t/spec] tests for RT #75832 fudged tests that cause infinite loops because of lack of stop at wrong end point in series
12:15 daxim masak, http://paste.scsys.co.uk/45302
12:16 masak daxim: I try and reproduce it here. the script outputs nothing for me. it doesn't give an error.
12:17 masak daxim: the gdb output unfortunately doesn't tell me much. maybe it'll tell someone else on the channel more. or someone on #parrot.
12:17 daxim it used to work 1½ years ago
12:17 masak it looks like it should work.
12:23 pugssvn r31500 | bbkr++ | t[t/spec] tests for RT #75316 1...1..0 keeps Rakudo on 100% CPU usage
12:30 skids joined #perl6
12:30 pugssvn r31501 | bbkr++ | [t/spec] tests for RT #73508 Rakudo doesnt print anything on "say (1,2,4...*)[10]"
12:34 masak moritz_: I pasted your starry obfu at http://perlgeek.de/blog-en/perl-6/starry-obfu.html into a file and did 'perl6 obfu'. it prints nothing. :/
12:35 masak oh wait. it uses the old * semantics...
12:35 masak maybe add a little comment about that, anyway.
12:41 pugssvn r31502 | bbkr++ | [t/spec] tests for RT #72914 Rakudo doesnt treat ^$n at the end of an infix:<...>
12:44 moritz_ masak: yep, it also assumes that ** isn't a term (it's HyperWhatever by current spec)
12:49 proller joined #perl6
12:50 jnthn oh heh
12:50 jnthn that backtrace looks like it crashes while trying to produce a backtrace or something
12:52 rv2733 joined #perl6
12:54 pugssvn r31503 | bbkr++ | [t/spec] tests for RT #73400 Cannot loop over Capture object in Rakudo
12:57 bluescreen joined #perl6
12:57 masonkramer joined #perl6
12:58 dalek rakudo: adf0342 | moritz++ | t (2 files):
12:58 dalek rakudo: run more test files
12:58 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/adf03425b5bbc87497d43cdd6557e9013f36749b
13:00 proller joined #perl6
13:06 moritz_ urks
13:06 moritz_ 68852e4e7b0fa5c7845540ad261c14c449d9667b broke main-usage.t
13:11 rgrau_ joined #perl6
13:16 macdaddy joined #perl6
13:18 mmcleric joined #perl6
13:19 pmichaud good morning, #perl6
13:19 phenny pmichaud: 10:31Z <moritz_> tell pmichaud to please give 'bbkr' (same RT nick) privileges for the perl6 RT queue. Thanks!
13:19 phenny pmichaud: 10:34Z <moritz_> tell pmichaud never mind, has already happened
13:19 moritz_ good morning pmichaud
13:20 masak morning, pm!
13:20 daxim sent pull request to github user rakudo for http://github.com/daxim/rakudo/commit/1fea9417f10903614195ff1f0b858d3402e8e431
13:20 timbunce joined #perl6
13:22 colomon o/
13:23 moritz_ daxim: I'll cherry-pick it if nobody else beats me to it (currently working on some other mess, have to wait until my working tree is clean again)
13:25 pmichaud daxim:  applied, thanks!
13:25 daxim that went quick
13:25 cono moritz_: git stash :)
13:26 moritz_ cono: I know about it, but it still means I have to get back to that commit I was working on (which isn't a branch right now...)
13:26 daxim git stash pop does that
13:26 moritz_ it does? cool, didn't know that
13:26 daxim what good is stashing without unstashing?
13:27 moritz_ I knew it applied the patch
13:27 moritz_ which is already helpful
13:27 moritz_ but that alone doesn't restore my position in the commit tree
13:27 dalek rakudo: f008ccd | (Lars Dɪᴇᴄᴋᴏᴡ 迪拉斯)++ | Configure.pl:
13:27 dalek rakudo: clarify --parrot-config
13:27 dalek rakudo: http://use.perl.org/~lilstevey/journal/39804
13:27 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/f008ccde043836cdf4dbf058a6213211181ab909
13:28 pmichaud ....looking at the series code makes me cringe.
13:28 masak that's not a good sign.
13:28 masak std: / $<foo> = [ foo ] /
13:28 p6eval std 31503: OUTPUT«ok 00:01 113m␤»
13:29 masak std: / $<foo><bar> = [ foo ] /
13:29 p6eval std 31503: OUTPUT«ok 00:01 110m␤»
13:29 masak rakudo: "foo" ~~ / $<foo><bar> = [ foo ] /; say $<foo><bar>
13:29 p6eval rakudo 1576d4: OUTPUT«===SORRY!===␤Confused at line 11, near "\"foo\" ~~ /"␤»
13:30 pmichaud rakudo doesn't know how to do captures like that yet
13:30 masak but it's spec'd?
13:30 pmichaud I suspect it is.
13:30 masak ok.
13:30 moritz_ don't think it's specced for the nested case
13:31 * masak submits rakudobug
13:31 masak moritz_: STD parses it, at least.
13:31 ciphertext pmichaud: colomon and i were working on series this weekend.  I sent him a final update: http://nopaste.snit.ch/21663 but I don't think he ever saw it...
13:31 masak so it's some sort of spec.
13:32 pmichaud ciphertext: yes, I'm looking at the commits in the fork queue on github
13:32 pmichaud it looks to me as though the implementation is doing *way* too much special-case consideration
13:33 mjk joined #perl6
13:34 ciphertext what do you mean?
13:34 pmichaud shouldn't need to do all of that testing for numeric versus string
13:34 pmichaud a variety of other things
13:36 bbkr http://rt.perl.org/rt3/Ticket/Display.html?id=73162 - in which file should I put test for that?
13:37 * moritz_ takes a look
13:37 bbkr rakudo: my @a=0..*; @a[Inf]=3; say @a[Inf];
13:37 moritz_ bbkr: S02-builtin_data_types/whatever.t
13:38 bbkr moritz_: thanks
13:38 p6eval rakudo 1576d4:  ( no output )
13:38 moritz_ bbkr: because the * in there is a Whatever star
13:38 pmichaud part of me really wishes that S02-builtin_data_types/  was S02-builtin-data-types/   or   S02-builtin-types/   or   S02-types/    :-)
13:39 moritz_ pmichaud: can be done in a few minutes
13:39 [particle] death to underscore!
13:39 moritz_ bbkr: if you find tickets where the problem is gone, but you don't know how to test, feel free to assign them to me
13:39 moritz_ (or ask here, of course)
13:41 bbkr moritz++
13:44 moritz_ pmichaud: btw did you look at my commits to the 'star' repo?
13:45 bbkr rakudo: WhateverCode;
13:45 p6eval rakudo 1576d4:  ( no output )
13:45 pmichaud moritz_: not yet, will do that today.
13:45 moritz_ it's not much yet, so far only the code to download stuff into a dist/ dir
13:45 moritz_ I kinda don't like the idea of keeping a copy of everything
13:45 bbkr rakudo: $x = *-1; $x ~~ WhateverCode;
13:45 p6eval rakudo 1576d4: OUTPUT«===SORRY!===␤Symbol '$x' not predeclared in <anonymous> (/tmp/SQLsnq0aJJ:11)␤»
13:46 bbkr rakudo: my $x = *-1; $x ~~ WhateverCode;
13:46 felliott joined #perl6
13:46 p6eval rakudo 1576d4:  ( no output )
13:46 moritz_ rakudo: my $x = *-1; say $x ~~ WhateverCode
13:46 p6eval rakudo 1576d4: OUTPUT«1␤»
13:46 synth joined #perl6
13:47 synth_ joined #perl6
13:47 moritz_ keeping a copy checked into the repo, that is
13:47 bbkr rakudo: use Test; my $x = *-1; isa_ok $x, WhateverCode;
13:47 p6eval rakudo 1576d4: OUTPUT«ok 1 - The object is-a 'WhateverCode()'␤»
13:49 bbkr weird, i get "Could not find sub &WhateverCode" while running S02-builtin_data_types/whatever.t on this test
13:49 moritz_ pmichaud: don't know how much backlog (or p6c reading) you have done, but we have two submission for the $*ARGFILES implementation already, and one of them is in rakudo already
13:49 moritz_ bbkr: your rakudo is too old :-)
13:49 pmichaud moritz_: Win!
13:49 moritz_ pmichaud: indeed
13:49 pmichaud moritz_: haven't backlogged yet
13:49 pmichaud I'm looking at &infix:<...>  to see if it bugs me enough to refactor :)
13:52 pmichaud $is-geometric-switching-sign = Bool::True if (@lhs[*-2] * @lhs[*-1] < 0);
13:52 pmichaud argggggggh
13:53 pmichaud :-)
13:53 masak wtf
13:54 pmichaud oh, maybe not.  Still, weird.
13:54 moritz_ what's wrong with it?
13:54 masak parens.
13:54 masak doesn't use ||= :)
13:54 dalek rakudo: 4e69c43 | moritz++ | src/core/IO/ArgFiles.pm:
13:54 dalek rakudo: avoid modifying @*ARGS in setting up $*ARGFILES; unbreaks USAGE subs
13:54 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/4e69c431925b1488e7d9f8c1e4ade01b48c685e8
13:54 moritz_ I mean, it can probably be simplified to is-geometric-switching-sign = (@lhs[*-2] * @lhs[*-1] < 0); # or with ||=, depending on context
13:54 pmichaud it's not part of a loop, so one could s/Bool::True if//
13:55 masak right.
13:55 hejki ||= works same as in perl5?
13:55 masak hejki: sure.
13:55 hejki aww <3
13:57 masak on the REPL, when I write 'role R {}', it prints 'R()'. but when I do 'class C {}', it prints '!class_init_36'. I'm guessing there's a metamodel explanation for that, but it feels Less Than Pretty.
13:58 pmichaud I'm guessing the class code is returning the closure instead of the class.  That's likely a bug.
13:58 moritz_ rakudo: my $x = class C { }; say $x.WHAT
13:58 p6eval rakudo 1576d4: OUTPUT«Code()␤»
13:58 moritz_ there you go
13:58 pmichaud yes, exactly.
13:58 moritz_ same bug without REPL
13:58 * masak submits rakudobug
14:00 masak you guys have been fixing bugs so fast lately, I almost can't keep up! :)
14:01 pmichaud masak: isn't that the point?  ;-)
14:01 moritz_ masak: hey, cognominal is helping you, don't complain :-)
14:01 masak :)
14:02 masak we're down to 634 new/open tickets in RT.
14:03 cognominal I am seeing XCode 4, now we need tools!!
14:03 bbkr on HEAD Rakudo build why I run from rakudo dir "perl t/harness --fudge --keep-exit-code --icu=0 --jobs some_test_file.t" I get Can't open perl script "t/spec/fudgeall" error, something has changed here?
14:04 moritz_ bbkr: did you run 'make spectest' or 'make testable'?
14:05 bbkr moritz_: "make test", trying "make spectest" right now
14:05 cognominal C ObjC, OObjC (appaenently some even more OO ObjC), C++ suck but XCode 4 is the first IDE I ever wanted to try. No available yet. But the demos (need a Apple Developer account to see them) are great.
14:06 moritz_ bbkr: 'make spectest' or 'make testable' will download the pugs repo for you
14:06 bbkr moritz_: thanks, works now. few tickets more will bite the dust :)
14:06 moritz_ without it, no t/spec/$anything exists
14:06 cognominal Maybe some guy will be able to adapt LLVM for Perl 6 because  Apple built an impressive toolchain around it.
14:07 moritz_ cognominal: there are plans to use the LLVM for JIT-compiling parrot
14:09 cognominal that's great, but JIT is only a late stage.
14:09 moritz_ cognominal: and I think one GSOC project prepares configuring stages for parrot already
14:09 moritz_ and you can already compile parrot with clang
14:12 cognominal lines 80-85 of   src/core/Signature.pm seems very suspicious to me
14:12 cognominal moritz_, parrot with clang? that's great
14:13 moritz_ these lines are for paramter renaming
14:13 cognominal If many named parameters, that can't work
14:13 moritz_ rakudo: say :(:a(:b($c))).perl
14:13 p6eval rakudo 1576d4: OUTPUT«:(Mu :b(:a($c)))␤»
14:14 masak nice.
14:14 pugssvn r31504 | bbkr++ | [t/spec] tests for RT #73162 Rakudo cant parse "{*.{}}()" (but STD.pm can)
14:14 moritz_ nothin' wrong with it
14:14 cognominal hum, apparently I need to thing harder.
14:14 mathw cognominal: there has been talk of an implementation using viv and LLVM. Just talk, as far as I'm aware, though.
14:15 moritz_ mberends++ started vill, which compiled to LLVM
14:15 bbkr rakudo: say 0xFFFFFFFFFFFFFFFF
14:15 p6eval rakudo 1576d4: OUTPUT«-1␤»
14:15 moritz_ but afaict it's pretty much stalled, due to different priorities
14:15 cognominal ho, I missed the  x +@names, I still think in term of loops. Silly me.
14:16 bbkr rakudo: sub foo() { try { return 42 }; return 5 }; say fo
14:16 p6eval rakudo 1576d4: OUTPUT«Could not find sub &fo␤  in main program body at line 11:/tmp/P5HiPgGrY9␤»
14:17 moritz_ cognominal: it took me a third look to find them too
14:17 bbkr rakudo: sub foo() { try { return 42 }; return 5 }; say foo
14:17 p6eval rakudo 1576d4: OUTPUT«5␤»
14:17 hejki :O
14:18 arnsholt hejki: return (and some other things) is actually throwing a control-flow exception
14:18 masak still, that's wrong.
14:18 masak (and known)
14:19 arnsholt True, true
14:23 bbkr rakudo: sub foo($v, $w?, $x?, $y?){ say $v~"|"~$w~"|"~$x~"|"~$y};
14:23 p6eval rakudo 1576d4:  ( no output )
14:23 bbkr rakudo: sub foo($v, $w?, $x?, $y?){ say $v~"|"~$w~"|"~$x~"|"~$y}; foo(1,,3,);
14:23 p6eval rakudo 1576d4: OUTPUT«1|3|Any()|Any()␤»
14:24 masak std: sub foo($v, $w?, $x?, $y?){ say $v~"|"~$w~"|"~$x~"|"~$y}; foo(1,,3,);
14:24 p6eval std 31503: OUTPUT«[31m===[0mSORRY![31m===[0m␤Preceding context expects a term, but found infix , instead at /tmp/5ifHYwLneY line 1:␤------> [32m?){ say $v~"|"~$w~"|"~$x~"|"~$y}; foo(1,[33m⏏[31m,3,);[0m␤Parse failed␤FAILED 00:01 116m␤»
14:24 moritz_ ,, should parsefail
14:31 bbkr i know, not fixed yet...
14:31 bbkr rakudo: my @b= 5, 1, 2; if(@b>2) {say 'yes';}
14:31 p6eval rakudo 1576d4: OUTPUT«yes␤»
14:31 masak right. should fail because &if hasn't been declared.
14:31 mmcleric joined #perl6
14:31 masak ...and two terms in a row :)
14:33 bbkr rakudo: say all(42) ~~ Int
14:33 p6eval rakudo 1576d4: OUTPUT«0␤»
14:34 gbacon joined #perl6
14:36 bbkr rakudo: multi f(Num $x) { say "Num" }; multi f(Int $x) { callsame; say "Int" }; f(42)
14:36 p6eval rakudo 1576d4: OUTPUT«Null PMC access in clone()␤  in 'f' at line 1␤  in main program body at line 11:/tmp/7rgKi5UAy1␤»
14:37 masak rakudo: .say for grep { $_ % all 2..$_/2 }, 2..*
14:37 p6eval rakudo 1576d4: OUTPUT«2␤3␤5␤7␤11␤13␤17␤19␤23␤29␤31␤37␤41␤43␤47␤53␤»
14:38 masak \o/
14:38 JimmyZ joined #perl6
14:39 pmichaud $_/2 could be .sqrt
14:39 bbkr rakudo: 1.0.WHAT.say # this should be Num or Rat according to the Spec?
14:39 p6eval rakudo 1576d4: OUTPUT«Rat()␤»
14:39 pmichaud bbkr: Rat.
14:39 bbkr pmichaud: thanks, then tests in http://rt.perl.org/rt3/Ticket/Display.html?id=69869 are no longer valid... fixing...
14:39 masak rakudo: .say for grep { $_ % all 2.. .sqrt }, 2..*
14:40 p6eval rakudo 1576d4: OUTPUT«2␤3␤5␤7␤11␤13␤17␤19␤23␤29␤31␤37␤41␤43␤47␤53␤59␤61␤67␤71␤73␤79␤83␤89␤97␤101␤103␤107␤109␤113␤127␤131␤137␤139␤149␤151␤157␤163␤167␤173␤179␤181␤»
14:40 masak that got us a bit further. pmichaud++
14:40 masak can probably be sped up even more by breaking ASAP.
14:43 masak rakudo: .say for grep { my $p = 1; for 2.. .sqrt -> $d { if $_ %% $d { $p = 0; last } }; $p }, 2..*
14:43 p6eval rakudo 1576d4: OUTPUT«2␤3␤5␤7␤11␤13␤17␤19␤23␤29␤31␤37␤41␤43␤47␤53␤59␤61␤67␤71␤73␤79␤83␤89␤97␤101␤103␤107␤109␤113␤127␤131␤137␤139␤149␤151␤157␤163␤167␤173␤179␤181␤191␤193␤197␤199␤211␤»
14:43 masak rakudo: .say for grep { my $p = 1; for 2, (3, 5 ... .sqrt) -> $d { if $_ %% $d { $p = 0; last } }; $p }, 2..*
14:43 p6eval rakudo 1576d4: OUTPUT«3␤5␤7␤29␤31␤37␤41␤43␤47␤53␤59␤61␤67␤71␤73␤79␤83␤89␤97␤101␤103␤107␤109␤113␤127␤131␤137␤139␤149␤151␤157␤163␤167␤173␤179␤181␤191␤193␤197␤199␤211␤223␤227␤229␤233␤239␤241␤251␤257␤263␤269␤271␤»
14:43 masak :)
14:44 masak might be slightly faster if one doesn't use grep and infix:<...> and all that, but that's enough micro-optimisation for now.
14:44 bbkr rakudo: "".subst(/x/, "").trans()
14:45 p6eval rakudo 1576d4:  ( no output )
14:45 molaf joined #perl6
14:45 timbunce_ joined #perl6
14:46 redicaps joined #perl6
14:47 JimmyZ rakudo: .say for grep { my $p = 1; for 1,(2, 3, 5 ... .sqrt) -> $d { if $_ %% $d { $p = 0; last } }; $p }, 2..*
14:47 p6eval rakudo 4e69c4: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 11␤»
14:47 JimmyZ wrong channel
14:49 masak JimmyZ: don't put the 1 there. it makes the %% condition rather superfluous.
14:49 JimmyZ rakudo: .say for grep { my $p = 1; for 2, (3, 5 ... .sqrt) -> $d { if $_ %% $d { $p = 0; last } }; $p }, 2..*
14:49 p6eval rakudo 4e69c4: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 11␤»
14:50 JimmyZ doesn't work for me ?
14:50 masak missing one }, I think.
14:50 masak grap/for/if. three }s
14:50 masak oh wait.
14:51 masak rakudo: .say for grep { my $p = 1; for 2, (3, 5 ... .sqrt) -> $d { if $_ %% $d { $p = 0; last } }; $p }, 2..*
14:51 p6eval rakudo 4e69c4: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 11␤»
14:51 JimmyZ I copy your code
14:51 masak I pressed 'up' in the IRC history.
14:51 masak something just broke.
14:54 felliott joined #perl6
14:57 bbkr rakudo: class PrivateDemo { method !private($str) {say "you takling to me?"}; }; PrivateDemo.new()!private("abc");
14:57 p6eval rakudo 4e69c4: OUTPUT«you takling to me?␤»
14:57 bbkr std: class PrivateDemo { method !private($str) {say "you takling to me?"}; }; PrivateDemo.new()!private("abc");
14:57 p6eval std 31504: OUTPUT«ok 00:01 114m␤»
14:57 bbkr this should not parsefail?!?!
14:58 masak bbkr: no, why?
14:59 masak where's the syntactic error?
14:59 masak the *syntactic* error. :)
14:59 bbkr masak: private method should be seen outside class scope?
15:00 masak I guess they could, if a class trusted another class.
15:01 am0c joined #perl6
15:01 pmurias joined #perl6
15:01 masak I'm so used to things having to do with methods being late-bound, that I don't think it's odd at all that the above parses.
15:02 bbkr masak: then what is the difference between public and private method then, if both can be called on  object instance from outside this object?
15:02 masak *syntactic*.
15:03 masak is this on?
15:03 arnsholt The Rakudo behaviour is still wrong, though, isn't it?
15:04 masak oh yes.
15:04 arnsholt Then we're in perfect agreement =)
15:04 bbkr masak: thanks. this is a bit counterintuitive, because for example in C private method called this way gives compile time error.
15:05 * bbkr gets back to checking RT
15:05 masak bbkr: I see. I guess it could be done even in Perl 6.
15:06 arnsholt Remember that Perl is a dynamic language, which means that names can come and go quite a bit more than in C
15:06 masak maybe someone augments a class in an eval string to trust things at runtime... :)
15:06 dakkar joined #perl6
15:07 arnsholt Exactly
15:08 hercynium joined #perl6
15:10 bbkr it falls into "enough rope" philosophy, however decreases security. method is private for a reason - it's not intended to be called from outside class scope because bad things may happen :)
15:13 masak indeed. in a similar vein, people shouldn't use 'trusts' at all.
15:13 JimmyZ masak: Is it rakudo bug?
15:13 masak is what?
15:14 masak JimmyZ: I think bbkr is currently going through open RT tickets. so, yes. :)
15:14 JimmyZ I copied your code
15:14 masak JimmyZ: oh, that one.
15:14 masak JimmyZ: I think p6eval broke.
15:14 JimmyZ oh
15:15 JimmyZ rakudo: say 'hi'
15:15 p6eval rakudo 4e69c4: OUTPUT«hi␤»
15:15 masak that's my buest guess. but it seems only to trigger on the prime code so far.
15:16 masak s/buest/best/
15:16 Ross joined #perl6
15:17 patrickas joined #perl6
15:19 cognominal how I declare the type of integers belonging to a span?
15:19 patrickas hello
15:19 cognominal hum, /me ack subset
15:20 patrickas I think p6eval is a few days behind even if the version reported is the latest.... can someone confirm / fix ?
15:25 JimmyZ std: .say for grep { my $p = 1; for 2, (3, 5 ... .sqrt) -> $d { if $_ %% $d { $p = 0; last } }; $p }, 2..*
15:25 p6eval std 31504: OUTPUT«ok 00:01 115m␤»
15:26 JimmyZ :(
15:27 masak rakudo: my $min = 5; my $max = 42; subset Span of Int where $min..$max; say 5 ~~ Span; say 43 ~~ Span
15:27 p6eval rakudo 4e69c4: OUTPUT«1␤0␤»
15:28 patrickas rakudo: .say for grep { my $p = 1; for 2, (3, 5 ... .sqrt) -> $d { if $_ !% $d { $p = 0; last } }; $p }, 2..*
15:28 p6eval rakudo 4e69c4: OUTPUT«29␤31␤37␤41␤43␤47␤53␤59␤61␤67␤71␤73␤79␤83␤89␤97␤101␤103␤107␤109␤113␤127␤131␤137␤139␤149␤151␤157␤163␤167␤173␤179␤181␤191␤193␤197␤199␤211␤223␤227␤229␤233␤239␤241␤251␤257␤263␤»
15:28 xinming @_@ perl6 sucks.
15:29 pmichaud ...I think I need to make a hard-and-fast rule that we do *not* put helper subs into the core setting.
15:29 * patrickas hugs xinming, it's OK.
15:29 JimmyZ xinming: 晚上好
15:29 xinming JimmyZ: 你好
15:29 xinming Well, don't talk Chinese here.
15:30 masak 为什么? :)
15:30 ashleydev joined #perl6
15:31 patrickas @pmichaud you mean like main_helper ?
15:31 songmaster joined #perl6
15:31 JimmyZ 呵呵
15:31 xinming masak: Because, when we talk too much Chinese, people start thinking in Chinese and ignore the higher priority job. :-)
15:32 masak sometimes what you need to solve a problem is to think in Chinese :)
15:32 masak it's a bit like doing a Fourier transform. some things get easier. :P
15:33 JimmyZ I don't think people will pay much attention on chinese.
15:37 arnsholt Well, I won't, seeing how I don't understand it =)
15:37 masak rakudo: sub 你好($greetee) { say "你好, $greetee!" }; 你好("世界")
15:37 p6eval rakudo 4e69c4: OUTPUT«你好, 世界!␤»
15:40 masak rakudo: say "我不是中国人".trans("我" => "你")
15:40 p6eval rakudo 4e69c4: OUTPUT«你不是中国人␤»
15:40 masak \o/
15:41 ashleydev joined #perl6
15:44 amkrankruleuen joined #perl6
15:44 cognominal is there an Discrete Ordered role with a succ and prec method?
15:44 amkrankruleuen Hello.
15:44 masak amkrankruleuen: hi!
15:44 patrickas hello amkrankruleuen
15:47 masak I find that reading the RFCs is a very good way to gain appreciation of the current design of Perl 6. :)
15:47 masak s/of/for/
15:50 cxreg masak: Perl 6 is sentient and self-designed.  Of the Perl 6, by the Perl 6, and for the Perl 6
15:50 xinming masak: Is syopsis stablized for first 6.0 release? :-)
15:51 masak cxreg: careful -- on the Internet, not everyone understands hyperbole. :P
15:51 ingy hi masak!
15:51 xinming or, lwall is still changing it, and implementation designer only choose one version of it?
15:51 masak ingy: hi!
15:51 patrickas "Could not find sub ARGFILES_CREATE   in main program body at <unknown line>" for an empty program ...
15:52 masak xinming: I'm not sure it works like either of those two questions imply. :)
15:52 patrickas Oh is that the reason for @pmichaud's hard-and-fast rule ?
15:52 ingy masak: would you like to take some time to pair with me on TestML.pm6?
15:52 ingy patch and I got it almost ported
15:52 masak ingy: not sure I can spare the time right now, unfortunately.
15:52 masak ingy: but it does sound very alluring.
15:52 ingy but we are a little stuck on grammar stuff
15:52 PerlJam xinming: Perhaps at the 6.0 release, all of the Synopses will be tagged in some way so that we know what version of the S corresponds with Perl 6.0
15:53 ingy is there a good time for you?
15:53 masak hm.
15:53 ingy it would only be ~30 mins
15:53 xinming PerlJam: Is it the "almost" final stage now?
15:53 masak ingy: oh, in that case, let's go for it.
15:53 xinming I mean for languag.
15:53 masak ingy: I might get pulled away, but that's always a risk.
15:54 ingy masak: join #testml
15:54 PerlJam xinming: um ... sure.
15:54 masak xinming: it's changing more than any implemented language I know. but it's more stable than it's ever been.
15:55 masak people who are wary of change should perhaps... wait a bit still.
15:55 PerlJam masak++ an excellent synopsis
15:55 masak but core things are increasingy stable.
15:56 masak the current set of people invited are usually label'd "early adopters". those are the ones that can take a little pain to get a lot of cool stuff before everyone else. :)
15:58 uniejo joined #perl6
16:00 JimmyZ good night
16:01 tadzik joined #perl6
16:03 justatheory joined #perl6
16:03 masak JimmyZ: 晚安!
16:03 JimmyZ masak: :)
16:03 JimmyZ thanks
16:10 pmichaud 15:29 <pmichaud> ...I think I need to make a hard-and-fast rule that we do *not* put helper subs into the core setting.
16:10 pmichaud yeah, I was referring to ARGFILES_CREATE.  But there are a lot of others as well.
16:11 pmichaud What is happening is that people see that others are doing it, and using that as a pattern for their own patches.
16:12 xinming masak: I wish start writing perl 6 as before. I mean write some of my scripts into perl 6. But afraid of rewriting them again. :-)
16:13 patrickas what is the right pattern ?
16:13 masak xinming: neither I nor anyone else can promise you that nothing will change from now on.
16:13 meppl joined #perl6
16:13 masak xinming: our goal right now isn't keeping things extremely stable, it's putting out a good, consistent Perl 6.
16:16 cxreg at least if you have to make changes later, they wont likely need to be huge ones
16:19 masak I'd characterise the changes needed for the app cheese to transfer from alpha to master as "huge ones". based on that, I'd be wary of making promises about the immediate future. :)
16:20 pmichaud iirc, $*ARGFILES is supposed to directly manipulate @ARGS
16:20 pmichaud (albeit lazily)
16:21 masak what's the downside of sending the type object of an action class, rather than an instance?
16:21 pmichaud masak: none that I know of.  In fact, that's pretty much canonical nowadays, at least for the code I write.
16:21 masak ok.
16:23 macdaddy joined #perl6
16:23 pmichaud moritz_: ping
16:24 songmaster rakudo: class A {has $.v; method set($v){$.v=$v}}; my $a=A.new;$a.set(1)
16:24 p6eval rakudo 4e69c4: OUTPUT«Cannot assign to readonly value␤  in '&infix:<=>' at line 1␤  in 'A::set' at line 11:/tmp/4rZsVl5eQG␤  in main program body at line 11:/tmp/4rZsVl5eQG␤»
16:24 dalek rakudo: 6ea4d0c | pmichaud++ | src/core/Block.pm:
16:24 dalek rakudo: Refactor Block.arity and Block.count; make .count return Inf.
16:24 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/6ea4d0cc1a3f74917b569ec473141ff92e51e5bc
16:24 dalek rakudo: 451b409 | pmichaud++ | src/core/IO/ArgFiles.pm:
16:24 dalek rakudo: Merge branch 'master' of github.com:rakudo/rakudo
16:24 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/451b4097cb8be4f2e5879fa2a9a471caf3c07989
16:25 songmaster Where does rakudo get the idea that $.v is readonly?
16:25 pmichaud songmaster: ....from the spec?  ;-)
16:26 songmaster Ok, where did I *say* it's readonly?
16:26 pmichaud by not specifying 'is rw'
16:26 pmichaud same with parameters
16:26 pmichaud they default to readonly unless you explicitly make them rw
16:26 songmaster Isn't that for external access though? A::set is a method...
16:27 pmichaud internally, a method uses $!v
16:27 pmichaud if a method uses $.v, it's using the public method interface
16:27 pmichaud if the method uses $!v, it's accessing the attribute directly
16:27 songmaster Ahhhhh.  I don't remember seeing that written down, but I didn't study twigils very much.  Thanks.
16:28 pmichaud opinion request:  should I file a bug report against the IO::ArgFiles implementation or should I just fix it myself?
16:29 xinming masak: Yes, I know, So I think I need to wait a bit more. Still many things to do in real life.
16:29 [particle] pmichaud: file the bug report with a patch, and apply it?
16:30 pmichaud [particle]: if I'm applying, I should just fix and bypass the bug report.
16:30 [particle] that seems a little like busywork
16:30 [particle] i don't think anyone will get upset with you advancing things on your own initiative
16:30 pmichaud my question is more whether it's better to say "this needs fixing" and let someone else pick up the ball, or to just fix myself.
16:30 pmichaud I'm not worried about upset-ness as much as opportunity-for-others-to-develop
16:31 [particle] ah, well i've seen people asking for LHF
16:31 [particle] if it's not an urgent fix, it's an opportunity for that
16:31 patrickas pmichaud I am worried that not too many people know how to create the HELPER the right way
16:31 pmichaud patrickas: me also.
16:32 patrickas so I would suggest fixing it this time and adding an RT for other places like it
16:32 patrickas I suspect MAIN_HELPER is in the same case .. so someone could pick that up
16:34 patrickas even though it feels bad taking time from the only pmichaud we have for such things :-(
16:35 timbunce joined #perl6
16:37 alester joined #perl6
16:39 pmichaud http://gist.github.com/457450  # $*ARGFILES fail
16:40 mberends joined #perl6
16:47 Sarten-X joined #perl6
16:55 ash_ joined #perl6
16:55 whereischewacca joined #perl6
16:55 whereischewacca hello
17:09 uniejo joined #perl6
17:10 [Coke] pmichaud: you should let other people fix it. Your tuits are very specially shaped. =-)
17:16 cdarroch joined #perl6
17:16 cdarroch joined #perl6
17:29 pmichaud [Coke]: I think that assumes that it takes less tuits to mentor someone through the problem than it does to solve it :-)
17:30 PerlJam pmichaud: or that mentoring is more important that just solving it.  (community building and all that)
17:31 amkrankruleuen joined #perl6
17:40 pmichaud PerlJam: right, thus my question
17:40 pmichaud where do we want the priority in this particular case?  ;-)
17:40 pmichaud (and others like it that occur over the next few weeks)
17:42 PerlJam ah ..  I didn't even look at the scrollback this time and so didn't see the question
17:42 gbacon joined #perl6
17:43 PerlJam The rule of thumb that I might use would be if it's easyish for you to fix and it would cause some annoyance to R* users if it were not fixed, fix it yourself.
17:45 ashleydev joined #perl6
17:48 justatheory_ joined #perl6
17:52 sorear hello #perl6
17:52 colomon o/
17:53 cxreg is ^10...^10 supposed to be an infinite series?
17:53 cxreg it seems to be, but i'm not sure why
18:01 pmichaud that would be the same as  (0..9)...^(10)
18:01 pmichaud which should just be 0..9
18:03 colomon no
18:03 colomon it should be treated like 7, 8, 9 ... 0
18:04 pmichaud why is that?
18:04 colomon errr... okay, maybe pmichaud is right here.
18:04 colomon if there's no generator, you look at the last three numbers on the LHS
18:05 pmichaud right. :)
18:05 pmichaud which would be 7, 8, 9
18:05 pmichaud which would make the next item in sequence a 10
18:05 pmichaud which isn't less than 10
18:05 pmichaud so we stop :-)
18:05 colomon less than 10 doesn't enter into it.
18:05 colomon but actually, the sequence is
18:05 colomon 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ... 0
18:05 pmichaud why 0?
18:05 colomon which should be just 0
18:05 pmichaud that's what I don't understand
18:06 pmichaud where are you getting that last 0 from?
18:06 colomon sorry, was parsing it as ... ^10
18:06 pmichaud right, it parses as   ...^ 10
18:06 colomon if it's ...^ 10, then you're absolutely right.
18:06 pmichaud even if it's the other way, I'm absolutely right :)
18:07 pmichaud because then it's
18:07 pmichaud (0..9) ... (0..9)
18:07 pmichaud which ends up acting like
18:07 colomon pmichaud++
18:07 pmichaud (0..9) ... 0, (1..9)
18:07 pmichaud which ends up being 0..9
18:07 colomon that's kind of freaky, actually.
18:07 pmichaud unless that ... 0   ends up making an infinite series
18:07 pmichaud but I think not, since we have an exact match
18:08 colomon it might at the moment, but it definitely shouldn't.
18:22 patrickas joined #perl6
18:23 patrickas about ^10 ... ^10, shouldn't it be null ?
18:23 patrickas i mean Nil
18:26 songmaster joined #perl6
18:27 colomon nope.  pmichaud explained why very nicely
18:27 patrickas colomon I either did not understand or do not agree :-)
18:27 colomon okay, do you agree it would be the same as
18:28 colomon (0...9) ... (0...9) ?
18:28 colomon (assuming space between ... and ^ here)
18:28 patrickas the first series ends in 7,8,9 and the second one starts with 0
18:29 patrickas zero is on the "wrong" side of 7,8,9 ( arithmetic increasing)
18:29 colomon it doesn't matter what the first one ends with in this case.  only what it begins with
18:29 patrickas so it shoudl be Nil
18:30 patrickas you mean : 7,8,9 ... 0 is not Nil ?
18:30 colomon oooh, you're right.
18:30 colomon I think the spec is broken there.
18:30 colomon but in that case, the series is 1...9
18:31 mberends #phasers in 30 minutes, right?
18:32 patrickas I am not sure
18:33 pmichaud I'll walk through it
18:33 pmichaud (0..9) ... (0..9)
18:33 pmichaud is the same as
18:33 pmichaud (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) ... (0, 1, 2, 3, 4, 5, 6, 7, 8, 9)
18:33 pmichaud is the same as
18:34 pmichaud ( (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) ... 0), 1, 2, 3, 4, 5, 6, 7, 8, 9
18:34 pmichaud now the only question is what happens to that first series
18:34 patrickas the spec says Nil
18:35 pmichaud no
18:35 colomon "For intuited numeric generators that don't involve geometric sign changes, all values are assumed to be monotonically increasing or decreasing, as determined by the (up to) three values used above; if a supplied limit value is on the "wrong" side of the first of those values, Nil is returned"
18:36 pmichaud in this case, the supplied limit value is not on the "wrong" side of the first of the values
18:36 colomon I think patrickas is reading the spec correctly, but the spec is pretty clearly broken.
18:36 colomon the first of the values is 7
18:36 pmichaud the supplied limit value *is* the first of the values, which I would interpret as meaning "exact match"
18:36 pmichaud I think it's the zero.
18:36 pmichaud not the 7.
18:37 pmichaud although the spec seems to indicate it's the 7, yes.
18:37 colomon I think it's intended to be the 0, for sure, but I don't think it reads that way.
18:37 pmichaud if it's just the 7, then the resulting sequence would be
18:37 pmichaud (0, 1, 2, 3, 4, 5, 6), 1, 2, 3, 4, 5, 6, 7, 8, 9
18:38 pmichaud and I think that doesn't make much sense.  :-)
18:38 patrickas :-)
18:38 colomon is TimToady around atm?
18:38 pmichaud likely not, I think he would've chimed in already.  :)
18:38 patrickas I think the three values talked about in the spec are the last three numbers in the rhs
18:39 patrickas i mean lhs :-)
18:39 pmichaud I think it probably means the entire lhs
18:39 pmichaud because if I write      1, 2, 3, 4, 5, ... $n
18:39 pmichaud I think it should be smart enough to stop at 2 when $n is 2.
18:39 colomon absolutely agreed, I will attempt to patch the spec.  ;)
18:40 pmichaud more to the point
18:40 pmichaud if I have
18:40 pmichaud @a ... $n
18:40 pmichaud then it should figure out the sequence from @a, but still be smart enough to stop at $n
18:41 lue ohai
18:41 colomon I think it's just a matter of clarifying that sentence.
18:42 patrickas yes that would make sense ... but I was already bitten by this earlier and I think I was told "that's not what the spec says" :-)
18:45 tylercurtis joined #perl6
18:47 colomon For intuited numeric generators that don't involve geometric sign changes, all
18:47 colomon values are assumed to be monotonically increasing or decreasing, as determined
18:47 colomon by the (up to) three values used above; if a supplied limit value is on the
18:47 colomon "wrong" side of the first value of the full left list, Nil is returned....
18:47 colomon does that seem okay?
18:47 pmichaud seems okay to me.
18:49 pugssvn r31505 | colomon++ | [Spec] Clarify when to return Nil from the series operator.
18:53 hudnix joined #perl6
18:56 mmcleric_ joined #perl6
19:00 sorear #phasers this week?
19:01 pmichaud yes, afaik
19:04 lue .oO(phasers?)
19:11 patrickas back
19:13 patrickas so colomon, pmichaud how according to the new clarification (0..9) ... 0 should be 0 and not Nil ?
19:13 patrickas s/how/now/
19:14 pmichaud yes.
19:14 pmichaud although (1..9) ... 0   would be Nil
19:15 patrickas ok thanks
19:16 lue it doesn't count backwards? Must be that extra .   :)
19:17 patrickas lue (0,9),8,7 ... 0 should do that
19:18 lue I thought it could go 1,2,3,4,5…9,8,7,6,5,4,3,2,1,0. But I see why it returns Nil.
19:18 colomon lue: Range doesn't count backwards.
19:18 colomon lue, 1 ... 9 ... 0 should do that.  but I don't think it works yet.
19:19 Guest23195 joined #perl6
19:20 lue would series (..) do that?
19:20 patrickas colomon is ... right associative ?
19:21 colomon patrickas: good question.
19:21 moritz_ pmichaud: pong
19:22 patrickas hello moritz_, I think p6eval is acting up again
19:23 patrickas pretending to be up to date when it is actually a few days old
19:23 moritz_ pmichaud: the rakudo target?
19:23 patrickas yes
19:24 moritz_ erm sorry, meant patrickas :-)
19:24 patrickas :-)
19:24 moritz_ rakudo: say 9 %% 3
19:24 p6eval rakudo 451b40: OUTPUT«===SORRY!===␤Confused at line 11, near "say 9 %% 3"␤»
19:25 patrickas rakudo: say 9 !% 3
19:25 p6eval rakudo 51b40: OUTPUT«1␤»
19:26 moritz_ trying to trigger a new rebuild
19:26 patrickas the same thing hapened a few weeks ago... one of the two builds was acting up
19:29 lue even the revision numbers are acting up (look up)
19:31 moritz_ lue: I've manipulated the version number to trigger a rebuild
19:33 lue ah, that's what it is.
19:39 moritz_ rakudo: say 9 %% 3
19:39 p6eval rakudo 451b40: OUTPUT«1␤»
19:39 moritz_ rakudo: my @a = 1..*; say @a[5]
19:39 patrickas thanks :-)
19:39 p6eval rakudo 451b40: OUTPUT«6␤»
19:40 colomon \o/
19:40 moritz_ triggering another rebuild to update the second copy
19:45 ash_ joined #perl6
20:17 kensanata joined #perl6
20:22 lue afk
20:22 Tene It really makes me sad to see people talking about things that I put on my todo list ages ago, and never got around to.
20:22 Tene My todo list is looking more and more like a graveyard of burned-out ideas, lately.
20:28 mberends Tene: you have all my sympathy. It's a familiar feeling :/
20:30 arnsholt I suspect everyone has that feeling
20:31 arnsholt Having ideas is a lot easier than actually doing them =)
20:31 tylercurtis And starting them is also a lot easier than actually finishing them.
20:33 arnsholt Oh definitely
20:34 mberends .oo( finishing Perl 6 is the hardest thing of all )
20:34 arnsholt That's why it's a collective effort
20:34 arnsholt We take turns procrastinating =)
20:37 mberends moritz_: I think I have solved your problem of building FakeDBI without FakeDBD::mysql, by wrapping the potentially failing code in an eval()
20:48 pugssvn r31506 | lwall++ | [STD] don't complain on anonymous package
20:53 justatheory joined #perl6
20:57 patrickas rakudo: (1...3).batch(5).join(',').say
20:57 p6eval rakudo 451b40: OUTPUT«1,2,3,Any(),Any()␤»
21:06 japhb joined #perl6
21:12 Guest23195 left #perl6
21:12 felliott joined #perl6
21:21 pmurias joined #perl6
21:21 songmaster joined #perl6
21:28 timbunce joined #perl6
21:30 gbacon joined #perl6
21:45 colomon wow, $*IN.slurp.words is shockingly more efficient than $*IN.lines.split(/\s+/)
21:46 sorear why shocking?  many less syscalls
21:46 colomon on the same 100 line test file, lines.split takes 69 seconds, slurp.words 2.5.
21:47 pmichaud what about .lines.words, ooc?
21:47 colomon It's only 100 line file, it definitely should not make that much of a difference.
21:47 sorear try stracing both
21:47 slavik pmichaud: I think .words is a bad idea
21:47 slavik pmichaud: unless you mean to say split /\W/
21:48 colomon lines.words is 20 second
21:48 pmichaud that makes more sense
21:48 pmichaud using .split is definitely p5-think.
21:48 pmichaud and it's far easier to capture what you ask for than to capture what you ask to exclude :-)
21:48 slavik pmichaud: I mean if .words is the same as split /\W/
21:48 pmichaud slavik: it's not.
21:49 slavik because .words can be different depending on the language/context
21:49 pmichaud .words is more like   .comb(/\S+/)
21:49 slavik like numbers or something
21:49 masonkramer what is .words doing under the hood that makes it better than split?
21:49 slavik masonkramer: not what it does, but what it means
21:49 pmichaud split says what you don't want.  It has to compute captures for the things between the matches.
21:49 slavik pmichaud: right
21:50 pmichaud comb (and thus .words)  says what you do want.
21:50 slavik I see
21:51 masak joined #perl6
21:51 masak o/
21:51 masak got an envelope from Google today. \o/
21:51 jnthn \o/
21:51 dju joined #perl6
21:52 masak I must say, pretty motivating to get that.
21:53 masak I'm glad the grant's going pretty well. if anything, this'll make me shift up a gear.
21:53 * jnthn looks forward to seeing the next round of commits on binary files :-)
21:53 colomon \o/
21:53 masak we figured out the grand scheme of things on #parrot yesterday.
21:54 masak if I don't get to it before the weekend, surely I'll do it during. :)
21:54 colomon pmichaud: I was worried performance might be pretty bad on combining the array of strings from .lines into one string to feed to .split.  Maybe an n^2 issue?  but I don't have time to drill down atm, off for noms.
21:54 dju joined #perl6
21:55 jnthn masak: :-)
21:56 kensanata joined #perl6
21:59 pmichaud in S03, on the series operator, we have:
21:59 pmichaud If no closure is provided, and the sequence is numeric, and is obviously
21:59 pmichaud arithmetic or geometric (from examining its I<last> 3 values), the appropriate function is deduced:
22:00 pmichaud when it says "the sequence is numeric", is that testing only the last three values, or the entire sequence?
22:00 masak the last three values. more flexible, and easier to grok.
22:01 pmichaud so it should probably read
22:01 pmichaud "If no closure is provided, and the last three values are obviously arithmetic or geometric, ...
22:01 pmichaud s/,//
22:04 pmichaud also, the spec doesn't seem to be clear about what happens if we have three numeric values that aren't obviously geometric nor arithmetic
22:04 pmichaud for example
22:04 pmichaud 1, 3, 7 ... *
22:04 masak xinming: I respect those people who say "Perl 6 is still too volatile, let me wait just a bit for it to settle down". there should still be plenty of people who are willing to trade a bit of risk for the opportunity to test-drive Perl 6 as it comes in for a landing. :)
22:05 masak pmichaud: I'd as
22:05 masak oops
22:05 masak pmichaud: I'd say error,
22:05 masak with the opportunity to overload with multies.
22:05 pmichaud overloading with multis is likely to be hard, since &infix:<...> is  list associative
22:05 masak in general, it'd be nice if the series operator were dispatched through multies... :)
22:05 pmichaud see last irc line.
22:06 masak why does list associativity make overloading hard?
22:06 masak probably does, but I don't immediately see it.
22:06 pmichaud the general signature for &infix:<...>   is likely     multi sub infix:<...>(**@lists)
22:07 pmichaud I suppose that could be broken down into multiple binary cases
22:07 pmichaud and mmd on the binary case
22:07 masak yes.
22:08 pmichaud doing this with mmd might be.... very interesting.
22:08 pmichaud I'll try that :-)
22:08 masak pmichaud++
22:09 pmichaud although the where clauses get really ugly
22:10 jnthn pmichaud: What are you trying to dispatch based on?
22:10 masak pmichaud: turn the where clauses into subtypes or subroutines or something.
22:10 pmichaud jnthn: I'm disliking the current implementation of &infix:<...>
22:10 jnthn pmichaud: That is, what seperates the things in question?
22:10 masak **@lists where ArithmeticSequence
22:10 pmichaud so, there are a few cases
22:10 pmichaud the basic pattern is     multi sub infix:<...>(@a is copy ... , $limit)
22:11 pmichaud where we're looking for certain patterns in @a
22:11 pmichaud so
22:12 pmichaud @a >= 3 && @a[*-2] - @a[*-3] == @a[*-1] - @a[*-2] && @a[*-2] != @a[*-1] ....
22:13 pmichaud but perhaps a subroutine makes more sense here
22:13 pmichaud I'll try that.
22:13 masak eew
22:13 masak .[*-2] - .[*-2] etc given @a
22:13 masak :)
22:13 masak er, *-3
22:14 pmichaud still too ugly for my taste.
22:14 masak but probably a lexical subroutine will help as well.
22:14 masak that's what immediate blocks were made for :)
22:14 jnthn .oO( infix:<...>(@a is copy [$a, $b, $c where $a - $b == $c - $b], ... )  )
22:14 pmichaud jnthn: has to be the last three elements of @a
22:14 jnthn Not quite sure you can twist what you wnat out of nested signatures.
22:14 patrickas i got a local patch that fixes (1..9) ... 5
22:14 jnthn Ah
22:14 jnthn :/
22:15 patrickas who can I ask for review ?
22:15 jnthn Then you can't.
22:15 patrickas with a warning that it might lead to hair loss (or hair pulling) :-)
22:15 * masak .oO( @a.reverse is copy )
22:15 jnthn :P
22:15 jnthn though
22:15 pmichaud patrickas: you can post it to a ticket or something.  But I really am planning to refactor all of &infix:<...> fairly significantly, so most patches are likely to be rendered obsolete.
22:16 masak man, that'd be a great extension of siggies! @a.sort is copy! @a>>.uc is copy!
22:16 jnthn @a is copy where .reverse ~~ :([$a, $b, $c where ... ])
22:16 jnthn ;-)
22:16 masak hugme: hug #perl6
22:16 * hugme hugs #perl6
22:17 jnthn Or to modify it I guess where .= reverse
22:17 jnthn maybe
22:17 jnthn ;-)
22:17 pmichaud masak: (error on series not able to determine progression) -- that seems to go against the way much of the rest of series is defined
22:17 jnthn rakudo: sub foo(@a is copy where .= reverse) { say @a }; foo([1,2,3]);
22:17 p6eval rakudo 451b40: OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 11␤»
22:17 jnthn rakudo: sub foo(@a is copy where {.= reverse}) { say @a }; foo([1,2,3]);
22:17 p6eval rakudo 451b40: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 11␤»
22:18 jnthn rakudo: sub foo(@a is copy where {.=reverse}) { say @a }; foo([1,2,3]);
22:18 masak pmichaud: then maybe default on arith on the last two terms?
22:18 p6eval rakudo 451b40: OUTPUT«Cannot assign to readonly value␤  in '&infix:<=>' at line 1␤  in <anon> at line 11:/tmp/4KqkpxNkPw␤  in 'Block::ACCEPTS' at line 4985:CORE.setting␤  in 'foo' at line 1:/tmp/4KqkpxNkPw␤  in 'foo' at line 11:/tmp/4KqkpxNkPw␤  in main program body at line 11:/tmp/4KqkpxNkPw␤»
22:18 ash_ std: sub foo(@a is copy where {.=reverse}) { say @a }; foo([1,2,3]);
22:18 pmichaud masak: yeah... not really sure about this one.
22:18 p6eval std 31506: OUTPUT«ok 00:01 117m␤»
22:18 jnthn rakudo: sub foo(@a is copy where -> @x is rw { @x.=reverse }) { say @a }; foo([1,2,3]);
22:18 p6eval rakudo 451b40: OUTPUT«Cannot assign to readonly value␤  in '&infix:<=>' at line 1␤  in <anon> at line 11:/tmp/ghfWIaPJen␤  in 'Block::ACCEPTS' at line 4985:CORE.setting␤  in 'foo' at line 1:/tmp/ghfWIaPJen␤  in 'foo' at line 11:/tmp/ghfWIaPJen␤  in main program body at line 11:/tmp/ghfWIaPJen␤»
22:18 jnthn aww!
22:18 jnthn I think you hit an ordering problem there though
22:18 masak ash_: that's cool, but it'll disallow empty arrays :)
22:18 jnthn It doesn't make the copy until later
22:19 masonkramer from the p5->6 guide, newb question about this line:
22:19 ash_ i was just checking jnthn to see if that was valid
22:19 masonkramer doit(:when<noon>, :what('more stuff')); # what's the difference between <> and ('') here?
22:19 jnthn rakudo: subset reverse; sub foo(@a as reverse) { say @a }; foo[1,2,3]; # please don't work...
22:19 p6eval rakudo 451b40: OUTPUT«Not enough positional parameters passed; got 0 but expected 1␤  in 'foo' at line 11:/tmp/ztgRzX6OUY␤  in main program body at line 11:/tmp/ztgRzX6OUY␤»
22:19 pmichaud masonkramer: in that particular example, not much
22:19 jnthn rakudo: subset reverse; sub foo(@a as reverse) { say @a }; foo([1,2,3]); # please don't work...
22:19 p6eval rakudo 451b40: OUTPUT«Unable to coerce value for '@a' from Array to Any; no coercion method defined␤  in 'foo' at line 11:/tmp/jt7Bsg0K53␤  in main program body at line 11:/tmp/jt7Bsg0K53␤»
22:19 pmichaud masonkramer: however, note that  :what<more stuff>   doesn't do the same as :what('more stuff')
22:19 jnthn heh :-)
22:20 ash_ masonkramer: <a> = ('a'); but <a b> = ('a', 'b')
22:20 jnthn rakudo: class reverse { }; sub foo(@a as reverse) { say @a }; foo([1,2,3]); # please don't work...
22:20 masonkramer <> is qw() ?
22:20 p6eval rakudo 451b40: OUTPUT«321␤»
22:20 jnthn omfg.
22:20 pmichaud masonkramer: yes.
22:20 masonkramer love it
22:20 jnthn (Don't ever do what I just did in your code. :-))
22:21 masak jnthn: wtf?
22:21 patrickas here is the diff but I suppose it won't bee needed since pmichaud++ will refactor anyway!  http://github.com/patrickas/rakudo/commit/4d51a9124f9a21e5cbdf8ad33197a8590ec66bb5
22:21 masak jnthn: I should throw *you* into RT! :)
22:21 jnthn masak: The default implementation of coercion is .TypeName
22:21 jnthn masak: If you declare a type that has the same name as a method on the object, it'll get called. :-)
22:22 masak jnthn: wow. that's actually correct then.
22:22 pmichaud patrickas: yes,  defining a flag like "$early-exit" is almost certain to be rejected by the pumpking.
22:22 patrickas jnthn WHOA!
22:22 jnthn masak: Er, I fear so. :-)
22:22 masak jnthn: just... really twisted.
22:22 jnthn masak: Though maybe not.
22:22 jnthn masak: I can't think why it's wrong though.
22:22 masak jnthn: perhaps the above code is horrid enough for us to convince TimToady that a special syntax is needed for this. :)
22:23 masak sub foo(@a as .reverse) would fly, maybe.
22:23 jnthn Even when we do coercion more properly I'd still expect us to hit the default of "call .TypeName" in this cae.
22:23 jnthn *case
22:23 ingy q: is using 'ast' in grammars just a convention?
22:23 moritz_ ingy: nope
22:23 jnthn ingy: No
22:23 moritz_ ingy: make() sets the .ast
22:23 jnthn ingy: It gets what was stored by make
22:23 patrickas pmichaud it's ok ... I guess I won't be cleaning it though if you are going to refactor the whole thing anyway...
22:23 moritz_ and $() defaults to $/.ast if it exists
22:23 jnthn gah, moritz_++ beats me twice. :-)
22:23 masak I'm having lags, so if my jokes are not on time, that's why. totally.
22:24 ingy haha
22:24 ingy thanks guys
22:24 masak ingy: I suspected as much. so maybe calling .ast will solve your problem.
22:25 ingy one more q: how do I access [ ] groups from a action routine?
22:25 moritz_ you don't
22:25 moritz_ they don't capture
22:25 moritz_ use ( ) if you want captures
22:25 ingy masak: ashleydev has been helping me
22:25 pmichaud you can also alias
22:25 pmichaud $<xyz>=[ ... ]
22:25 ingy moritz_: btw, been studying your excellent JSON::Tiny
22:25 moritz_ rakudo: $()
22:26 p6eval rakudo 451b40:  ( no output )
22:26 masak ashleydev++
22:26 ingy moritz_++
22:26 pmichaud use an alias to grab whatever is inside of [...]
22:26 moritz_ ingy: glad it's useful
22:26 ingy ossum!
22:26 masak rakudo: "foo" ~~ /foo/; say "What kind of $()l am I?"
22:26 p6eval rakudo 451b40: OUTPUT«What kind of l am I?␤»
22:27 masak hm, shouldn't that say 'fool'?
22:27 pmichaud no
22:27 pmichaud spec was changed
22:27 pmichaud .ast is undef if not set.
22:27 ingy so how do I access ( ) groupings from inside an Action method?
22:27 pmichaud (it used to be .Str if not set)
22:27 masak ahah
22:27 masak right.
22:27 pmichaud ingy: $/[0] $/[1] $[2]
22:27 moritz_ pmichaud: $() should be $/.ast // $/.Str iirc
22:27 pmichaud er, $/[2]
22:27 masak good. that's separation for you.
22:27 ingy thanks
22:27 pmichaud moritz_: oh, that's possible, yes.
22:27 masak rakudo: "foo" ~~ / foo {make "foo"} /; say "What kind of $()l am I?"
22:27 moritz_ S05:2577:C<$()> is a shorthand for C<$($/.ast // ~$/)>.
22:27 p6eval rakudo 451b40: OUTPUT«What kind of l am I?␤»
22:27 ingy <3
22:28 masak pmichaud: what about that?
22:28 pmichaud masak: that looks buggish.
22:28 * masak submits rakudobug
22:28 masak pmichaud: also, what moritz_ said.
22:28 moritz_ $() is just coercion to item
22:28 pmichaud rakudo:  'foo' ~~ / foo { say $/ } /
22:28 p6eval rakudo 451b40: OUTPUT«foo␤»
22:28 moritz_ in rakudo
22:28 pmichaud ah
22:28 jnthn I think make not done inside an action method has always been buggy, fwiw.
22:28 pmichaud I think make is just broken in rakudo
22:28 masak so, two bugs.
22:29 jnthn pmichaud: Yes, that matches my experience.
22:29 * masak submits the other rakudobug
22:29 pmichaud nqp:  'foo' ~~ / foo { make 'foo' } /;  say($/.ast);
22:29 p6eval nqp: OUTPUT«Symbol '$/' not predeclared in <anonymous>␤current instr.: 'parrot;PCT;HLLCompiler;panic' pc 152 (compilers/pct/src/PCT/HLLCompiler.pir:109)␤»
22:29 drbean joined #perl6
22:29 pmichaud nqp:  say(('foo' ~~ / foo { make 'foo' }/).ast)
22:29 p6eval nqp: OUTPUT«␤»
22:29 pmichaud hmmm.
22:29 pmichaud okay, I'll look at that one.
22:30 pmichaud but I do suspect a bug in rakudo's &make
22:30 * moritz_ tries to patch $()
22:30 pmichaud as in, it appears that rakudo doesn't have one.
22:30 masak pmichaud: sometimes when you respond quickly to things, I feel I'm breaking your focus. weren't you fixing the infix:<...> operator just now? :)
22:30 pmichaud masak: yes, but I need to think about it a bit more
22:31 masak ok, good.
22:31 pmichaud so the topic switch isn't really a distraction
22:31 masak just checking. :)
22:31 pmichaud and it's not nearly as distracting as the various background noises here at the house :-(
22:32 jnthn rakudo: say class C {}
22:32 p6eval rakudo 451b40: OUTPUT«!class_init_11␤»
22:32 jnthn rakudo: say anon class C {}
22:32 p6eval rakudo 451b40: OUTPUT«C()␤»
22:32 jnthn rakudo: say my class C {}
22:32 p6eval rakudo 451b40: OUTPUT«C()␤»
22:32 jnthn rakudo: say our class C {}
22:32 p6eval rakudo 451b40: OUTPUT«!class_init_11␤»
22:33 meteorjay joined #perl6
22:33 jnthn ...who on earth implemented this...
22:33 diakopter someone on earth?
22:34 masak someone in a country starting with an S?
22:34 jnthn .oO( Looks like it came out of Uranus )
22:34 amkrankruleuen joined #perl6
22:35 * jnthn adds it to his open RT tickets to deal with
22:37 cxreg FakeDBI Pg support: http://github.com/cxreg/fakedbi/commit/b4fd1dc042a5a40bcf773b85612e02e3a8d120b7
22:37 cxreg implementing only what was already in mysql.pm6
22:37 cxreg lots more needed, certainly
22:37 cxreg mberends: ping
22:38 jnthn cxreg++!
22:38 moritz_ cxreg++
22:38 jnthn phenny: tell mmcleric Thanks for the whatevercode patch - bit too tired to review it tonight, but will give it a proper look tomorrow. :-)
22:38 phenny jnthn: I'll pass that on when mmcleric is around.
22:38 jnthn Tack, phenny.
22:38 moritz_ hugme: add cxreg to fakedbi
22:38 * hugme hugs cxreg. Welcome to fakedbi!
22:39 cxreg i need to write a test
22:39 masak we all do :)
22:39 cxreg database driver tests are an interesting challenge
22:40 cuppe I'm looking for a reference for the List type, having trouble finding one
22:40 cxreg to where?  as whom?
22:40 tylercurtis cuppe: http://perlcabal.org/syn/S32/Containers.html#List ?
22:41 cuppe thanks. was looking through synopses
22:43 masak cuppe: don't believe everything you read in S32. they're less clairvoyant than many of the lower-number synopses.
22:43 pugssvn r31507 | jnthn++ | [t/spec] Tests for [&&] and [and]. Patch courtesy of (Alex Kapranoff)++.
22:44 moritz_ it seems that the patch for $() is a bit too much for nearly 1AM
22:44 jnthn :-)
22:44 moritz_ rakudo: ::()
22:44 p6eval rakudo 451b40: OUTPUT«===SORRY!===␤ResizablePMCArray: Can't pop from an empty array!␤»
22:44 moritz_ masak: want to report? :-)
22:45 moritz_ rakudo: class A { method item { 'foo' } }; say ::(A.new)
22:45 p6eval rakudo 451b40: OUTPUT«===SORRY!===␤Indirect name lookups not yet implemented at line 11, near ""␤»
22:46 jnthn Well, that's more helpful. ;-)
22:47 pmichaud cuppe: I'm in the midst of rewriting the List docs.
22:47 cxreg i wonder what the interface to libclntsh.so looks like
22:47 dalek rakudo: 36998b8 | jonathan++ | src/core/operators.pm:
22:47 dalek rakudo: Make [&&] and [and] work. Patch courtesy of (Alex Kapranoff)++.
22:47 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/36998b8bb9fda96d69adc5645bb43d5c8103f469
22:48 cuppe pmichaud: cool
22:49 * masak submits ::() rakudobug
22:50 tedv joined #perl6
22:55 ashleydev joined #perl6
22:56 hairykary joined #perl6
22:56 dukeleto std: my $r = sub { say @_[0].WHAT }; $r.()
22:56 p6eval std 31506: OUTPUT«ok 00:01 114m␤»
22:57 masak rakudo: say "alive"; ::()
22:57 p6eval rakudo 451b40: OUTPUT«===SORRY!===␤ResizablePMCArray: Can't pop from an empty array!␤»
22:57 masak at compile time.
23:00 whiteknight joined #perl6
23:05 * diakopter waves to feather
23:05 Juerd joined #perl6
23:05 pmichaud joined #perl6
23:05 hatseflats joined #perl6
23:06 cxreg i can't find the take-away from that earlier discussion about ^10...^10, but it sounds like it should probably not be the same as 0..Inf? :)
23:06 cxreg the whole thing is a mindfsck
23:07 moritz_ it's a sign of too much magic in too little space :-)
23:07 masak cxreg: if you find yourself *writing* ^10...^10, take a step back and review your objectives :)
23:07 cxreg :-)
23:08 cxreg it's certainly off the deep end, but the result was surprising
23:08 diakopter rakudo: say ^10...^10
23:08 p6eval rakudo 451b40:
23:08 p6eval ..OUTPUT«012345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913…
23:09 diakopter oh.
23:09 diakopter okay.
23:10 dukeleto joined #perl6
23:10 Util joined #perl6
23:10 PerlJam joined #perl6
23:13 ruoso joined #perl6
23:14 ash_ ^10 is 0...10
23:14 masak ash_: and v10 is 10..0 :)
23:14 ash_ it is? neat, didn't know that one
23:14 ash_ rakudo: say v10
23:14 p6eval rakudo 451b40: OUTPUT«Could not find sub &v10␤  in main program body at line 11:/tmp/NtJQwV5klJ␤»
23:14 moritz_ ^10 is actually 0..^10
23:15 masak right. then v10 must be 10v..0
23:15 ash_ ah, oops, it doesn't do 10? only 10 digits?
23:15 ash_ rakudo: my $a = 4; say ^$a;
23:15 p6eval rakudo 451b40: OUTPUT«0123␤»
23:15 ash_ cool
23:16 masak rakudo: my @a = <a b c d>; .say for ^@a
23:16 p6eval rakudo 451b40: OUTPUT«0␤1␤2␤3␤»
23:16 sorear ok, best not to commit anything until dalek resurfaces
23:16 tylercurtis rakudo: say (0..9)..(0..9)
23:17 p6eval rakudo 451b40: OUTPUT«0 1 2 3 4 5 6 7 8 9␤»
23:17 masak sorear: I'm just leaving :P
23:19 masak 'night, #perl6!
23:19 dju joined #perl6
23:21 ash_ nqp: say(:min-depth(4));
23:21 p6eval nqp: OUTPUT«␤»
23:22 jnthn ash_: iirc nqp does nee recognize - in identifiers.
23:22 pmichaud it does now
23:22 pmichaud say doesn't recognized any named arguments.
23:22 jnthn oh \o/
23:23 jnthn *nod*
23:23 pmichaud *recognize
23:23 jnthn pmichaud++ # fixing the - thingy
23:23 pmichaud rakudo:  say(:min-depth(4))
23:23 ash_ yeah, i was more seeing if it complained about the syntax than being useful
23:23 p6eval rakudo 451b40: OUTPUT«Unexpected named parameter 'min-depth' passed␤  in 'say' at line 4637:CORE.setting␤  in main program body at line 11:/tmp/fFpyGinbsb␤»
23:24 ash_ rakudo: say :min-depth(4)
23:24 p6eval rakudo 451b40: OUTPUT«Unexpected named parameter 'min-depth' passed␤  in 'say' at line 4637:CORE.setting␤  in main program body at line 11:/tmp/LS6oP6X7Ua␤»
23:24 ash_ i thought that made a pair, oh well
23:24 pmichaud it's a named argument to say
23:24 pmichaud rakudo:  say (:min-depth(4))
23:24 p6eval rakudo 451b40: OUTPUT«min-depth  4␤»
23:25 pmichaud that one is a pair :-)
23:25 ash_ ah, k, i see the difference now
23:25 Tene say((:min-depth(4)))
23:25 Tene nqp: say((:min-depth(4)))
23:25 p6eval nqp: OUTPUT«␤»
23:25 Tene rakudo: say((:min-depth(4)))
23:25 pmichaud Parrot doesn't have pairs, so nqp doesn't support them.
23:25 p6eval rakudo 451b40: OUTPUT«min-depth  4␤»
23:26 Tene rakudo: say (:a(:b(:c(:d(:cons-list(:tail))))))
23:27 p6eval rakudo 451b40: OUTPUT«a  b       c       d       cons-list       tail    1␤»
23:27 pmichaud rakudo:  say (:a(:b(:c(:d(:cons-list(:tail)))))).perl
23:27 p6eval rakudo 451b40: OUTPUT«"a" => "b" => "c" => "d" => "cons-list" => "tail" => Bool::True␤»
23:27 pmichaud rakudo:  say (:a(:b(:c(:d(:cons-list(:tail)))))).value
23:28 p6eval rakudo 451b40: OUTPUT«b  c       d       cons-list       tail    1␤»
23:28 pmichaud rakudo:  say (:a(:b(:c(:d(:cons-list(:tail)))))).key
23:28 p6eval rakudo 451b40: OUTPUT«a␤»
23:28 pmichaud sooner or later, everything becomes Lisp.
23:28 ash_ lol
23:29 ash_ if perl6's syntax fit on a note card...
23:29 pmichaud how small can I make the font?
23:30 pmichaud or, how big can I make the note card?
23:30 ash_ both good points
23:33 ingy make $<quoted_string>.ast // $<unquoted_string>.ast; fails because quoted_string has no ast. fix?
23:34 pmichaud make $<quoted_string> ?? ... !!
23:34 ingy k
23:34 pmichaud or
23:35 pmichaud make $<quoted_string>.?ast || $<unquoted_string>.ast   # if you know that .ast always returns a non-false value
23:36 ingy is "0" false? :)
23:36 pmichaud yes.
23:36 ingy anyway first thing works great, pmichaud++
23:36 ingy thx!
23:37 ingy your patience will pay off, I promise :)
23:42 ashleydev cool
23:43 rv2733 joined #perl6
23:54 gbacon joined #perl6
23:54 Psyche^ joined #perl6
23:54 ingy how do I write a universal method like .perl ?
23:55 [Coke] at a guess, monkey patch something near the top of the hierarchy, like Cool?
23:55 [Coke] .perl is probably written in Perl 6 in the setting, so you can probably do what it did.
23:56 * ingy wants to write .json .yaml and .jsync methods

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

Perl 6 | Reference Documentation | Rakudo