Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2009-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 Infinoid eternaleye: Thanks for the patches.  Sorry, I'm not qualified to review/apply rakudo patches, I'm more of a parrot guy
00:07 Infinoid I can certainly test it tho
00:10 icwiener joined #perl6
00:15 eternaleye Infinoid: Okay, I'll pass it to moritz_ then, since he's the source of infix:<...>
00:16 eternaleye It's a decidedly cool operator
00:16 eternaleye And once junctive autothreading actually _threads_, there will be a lot of awesome things that can be done (like a maximally parallelized Sieve of Eratosthenes)
00:35 FCO joined #perl6
00:38 lichtkind is | also a sigil like @@ ?
00:45 TimToady nope
00:45 lichtkind why?
00:46 lichtkind it makes deref in that context
00:49 TimToady @@ preserves structure when interpolated, while | takes away one level of capture
00:49 lambdabot preserves structure when interpolated, while | takes away one level of capture
00:50 TimToady you can say that again...
00:50 TimToady @@ lambdabot is an idiot
00:50 lambdabot lambdabot is an idiot
00:53 lichtkind TimToady: thanks, in case you wonder i ask all these questions http://www.perlfoundation.org/p​erl6/index.cgi?perl_table_index
00:55 pugs_svn r27295 | lwall++ | [STD] refix problem with broken aliasing of our vs my
00:55 pugs_svn r27295 | lwall++ | [STD] move symbol table code down with service routines
00:55 pugs_svn r27295 | lwall++ | [Cursor] call TOP by default, as documented in S05
00:56 pugs_svn r27296 | skids++ | Combine RI member/macro descriptions so it doesn't all have to be explained twice.
00:56 pugs_svn r27296 | skids++ | Sync macro parameter names with what is actually in the headers.
00:56 pugs_svn r27296 | skids++ | Add markup and resection a bit.
00:56 pugs_svn r27296 | skids++ | Correct things a bit after getting better look at the code.
00:58 nErVe joined #perl6
01:15 lichtkind_ joined #perl6
01:20 eternaleye TimToady: Doesn't a leading | in signatures mean "unchanged capture"? e.g sub foo( |$bar ) { &baz.callwith( |$bar ) #cf Argument List Binding in S06
01:21 eternaleye +}
01:21 eternaleye Rakudo doesn't seem to support it, though
01:22 frew joined #perl6
01:23 eternaleye It would be very nice if it did, since infix:<...>( |$seed, Code $generator ) would DWIM on 0,1 ... &[+] as opposed to my @seed = 0,1; @seed ... &[+]
01:39 agentzh left #perl6
01:40 agentzh joined #perl6
01:48 TimToady most list infixes really need to receive two captures, I think
01:49 TimToady |$cap in a sig is currently defined to return all the rest of the capture, so it has to be the last thing
01:49 TimToady \$cap is currently defined as a single capture, but that may change to @@ or ¢ sigils
01:52 snarkyboojum joined #perl6
01:52 amoc joined #perl6
01:56 molaf_xx joined #perl6
02:15 rjbs joined #perl6
02:20 icwiener_ joined #perl6
02:20 rjbs seen moritz_
02:20 rjbs Lordy, where's a bot when you need one?
02:21 rjbs moritz_: I'm trying to use JSON::Tiny
02:23 rjbs Well, I have no idae how I'm suppose to install or test things.
02:24 rjbs ./Configure complains because perl6 isn't to be found; no idea.
02:54 eternaleye @seen moritz_
02:54 lambdabot moritz_ is in #perl6. I last heard moritz_ speak 8h 42m 11s ago.
02:56 rjbs eternaleye: thanks
02:56 eternaleye rjbs: np
03:03 elmex joined #perl6
03:38 chipdude I'm unsure but given that := is for signautres does that imply you can't := an existing variable?
03:45 scottp joined #perl6
03:48 FCO (Sorry, my english isnt good). Hi, I am new to perl6, and I have a question: I saw this post in perlmonks (http://www.perlmonks.org/?node_id=771635) saying that I can help to write built-in methods and functions for perl6. My question is: where can I find a list of all perl6' methods and functions, and theirs definitions?
03:49 scottp Hey guys... I am just working out how to access the built in 'sha1' in parrot from rakudo perl?
03:53 TimToady FCO: see http://perlcabal.org/syn/ especially S32
03:54 FCO TimToady, Thanks!
03:54 TimToady chipdude: yes, you can use := on existing variables
03:54 TimToady it just makes the variable an alias for whatever is on the right
03:55 TimToady rakudo: my $a; my $b = "hi"; $a := $b; say $a
03:55 p6eval rakudo 6c43f9: OUTPUT«hi␤»
03:56 chipdude TimToady: excellent; so the 'my' is implicit for actual subroutine signatures, but in other code you have to declare the variables in the usual fashion even if you're going to := them
03:57 pugs_svn r27297 | lwall++ | [STD] document and refactor context variables for more consistency
03:57 TimToady yes, sub sigs also default to readonly, while my sigs are rw by default
03:58 TimToady otherwise binding is the same everywhere
03:58 chipdude not quite my Q. in    sub foo ($a) { ... }   the 'my' is implicit, whereas in other sig usage any 'my' is explicit?
03:58 TimToady yes
03:59 TimToady and parameters are the only way that "my" variables can be declared outside their block
03:59 chipdude ok, thanks
04:01 chipdude re my design problem: "I don't have an answer, but I have a more interesting name for the problem." :-)
04:02 TimToady sometimes naming the problem correctly is halfway to a solution
04:02 scottp FCO/TimToday - re: S32 - is there a way of knowing which are done and not in Rakudo without trying each?
04:03 TimToady you could look at the corresponding t/spec tests and see which ones are fudged with #?rakudo
04:03 TimToady or you can just start writing something and then you'll discover which ones aren't implemented :)
04:03 scottp ta
04:04 scottp yes that is how I started. Probably best, as then I am testing too :-)
04:04 scottp Don't supposed you know how to access the sha1 in parrot?
04:04 scottp (or any way to do sha1)?
04:04 TimToady sorry, I'm parrot-stupid
04:05 scottp No prob
04:05 FCO TimToady, the t/spec is in pugs repo, right?
04:06 TimToady and is duped into rakudo
04:07 TimToady FCO: do you need a pugs repo commit bit?
04:07 FCO TimToady, thanks I found it!
04:09 Ryan52 left #perl6
04:31 FCO for test, i wrote the not method in class Object, I run make and it's OK, what do I do now?
04:37 scottp you can fork on github then push the changes
04:42 FCO but Is that right? does exist a not method on Object class? Did I understand the pod?
04:58 xinming_ joined #perl6
05:05 xinming__ joined #perl6
05:05 FCO scottp, OK, done, and now? (I've never used github)
05:10 Snublefot joined #Perl6
05:13 xinming joined #perl6
05:17 alester joined #perl6
05:21 scottp Now what you do is push that to the owner. Just looking it up, because I forget too.
05:21 scottp Ahh - you click "Pull Request"
05:22 scottp Click on Rakudo and put in some text. The rakudo main user should then get a request to accept your patch.
05:22 scottp Personally I have not actually done it, but that is the theory
05:25 xinming_ joined #perl6
05:30 xinming__ joined #perl6
05:30 finanalyst joined #perl6
05:35 ihrd joined #perl6
05:38 meppl joined #perl6
05:44 pugs_svn r27298 | lwall++ | [STD] various minor warning suppressions
05:51 nbrown_ joined #perl6
05:51 moritz_ rjbs: if your perl6 exec is not in $PATH, you can also run /path/to/rakudo/perl6 Configure
05:52 desertm4x joined #perl6
05:56 pugs_svn r27299 | lwall++ | [Cursor] factor out longest token compositor to separate file
06:05 pugs_svn r27300 | lwall++ | [Cursor] revert previous change, loops
06:08 TimToady std: 00
06:08 p6eval std 27298:  ( no output )
06:11 xinming joined #perl6
06:13 TimToady std: 00
06:13 p6eval std 27298:  ( no output )
06:14 TimToady std: 00
06:14 p6eval std 27298: OUTPUT«Potential difficulties:␤  Leading 0 does not indicate octal in Perl 6 at /tmp/jSi4vInSNy line 1:␤------> [32m00[31m[0m␤ok 00:02 35m␤»
06:15 azawawi joined #perl6
06:15 FCO scottp, thanks!
06:15 azawawi hi
06:16 TimToady howdy
06:16 azawawi TimToady: I see a lot of STD refactoring :)
06:17 agentzh left #perl6
06:17 TimToady the only thing that might affect you is that it runs TOP by default as the top rule now, not comp_unit
06:17 pugs_svn r27301 | moritz++ | [t/spec] slurpy generator for series, eternaleye++
06:17 TimToady oh, and if you used to look at $::COMPILING::FILE, it's now just $::FILE
06:18 TimToady a few of the other context vars are also renamed
06:18 azawawi TimToady: will the symbol table be accessible once a parse is finished?
06:18 dalek rakudo: d3e040f | (Alex Elsayed)++ |  (2 files):
06:18 dalek rakudo: Slurpy generators for series operator
06:18 dalek rakudo: Plus whitespace fixes, and a comment fixes by Moritz
06:18 dalek rakudo: Signed-off-by: moritz <moritz@faui2k3.org>
06:18 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/d​3e040f159790d00d8e39ae298ff2bb05ee9f48e
06:18 agentzh joined #perl6
06:19 TimToady it will if we put it somewhere; alternately, the std program will dump out the symbol table for a module now
06:20 TimToady Test.pm is actually compiled down to Test.syml and that's what all the tests are using when they say "use Test"
06:20 azawawi anyway, what i really need is a token table...
06:20 rfordinal joined #perl6
06:23 TimToady std: use Test; dies_ok
06:23 moritz_ TimToady: which Test.pm? pugs'? or rakudo's?
06:23 p6eval std 27300:  ( no output )
06:23 TimToady neither, the Test.pm in src/perl6
06:24 moritz_ ah
06:24 TimToady basically just the names, but in Perl 6 form
06:24 moritz_ throws_ok seems superfluous since we have dies_ok
06:24 TimToady std: 00
06:25 moritz_ it's not used anywhere
06:25 p6eval std 27300:  ( no output )
06:25 TimToady hmm
06:26 TimToady which feather does STD recompile on?
06:26 moritz_ not on feather
06:27 TimToady I might have broken it
06:27 TimToady std: 00
06:27 moritz_ rm: cannot remove `CORE.syml.store': No such file or directory
06:27 moritz_ make: [CORE.syml] Error 1 (ignored)
06:27 p6eval std 27300: OUTPUT«Potential difficulties:␤  Leading 0 does not indicate octal in Perl 6 at /tmp/L9BcQVTSTb line 1:␤------> [32m00[31m[0m␤ok 00:02 35m␤»
06:27 TimToady std: use Test; dies_ok
06:27 moritz_ that's the only error message I get when recompiling (at least so far)
06:27 p6eval std 27300:  ( no output )
06:27 TimToady std: dies_ok
06:28 p6eval std 27300:  ( no output )
06:28 TimToady you might have a looping compile in the background somewhere
06:29 TimToady std: foo
06:29 p6eval std 27300:  ( no output )
06:31 iblechbot joined #perl6
06:32 TimToady std: dies_ok
06:32 p6eval std 27301:  ( no output )
06:34 TimToady std: 42;
06:34 p6eval std 27301: OUTPUT«ok 00:02 35m␤»
06:34 TimToady std: dies_ok
06:35 p6eval std 27301: OUTPUT«Undeclared routine:␤   dies_ok used at 1 ␤ok 00:02 35m␤»
06:35 TimToady std: use Test; dies_ok
06:35 p6eval std 27301: OUTPUT«ok 00:02 35m␤»
06:36 mtve joined #perl6
06:36 TimToady std: use DEBUG; autolexer
06:36 p6eval std 27301:  ( no output )
06:37 TimToady std: use DEBUG; autolexer
06:37 p6eval std 27301: OUTPUT«ok 00:02 35m␤»
06:37 azawawi std: use STD_SYMBOL_TABLE; # :)
06:37 p6eval std 27301:  ( no output )
06:38 TimToady std: use STD; STD::TOP
06:38 p6eval std 27301:  ( no output )
06:40 TimToady std: use STD; STD::Regex
06:40 p6eval std 27301:  ( no output )
06:40 xinming joined #perl6
06:40 TimToady aw, works here :)
06:40 TimToady probably times out trying to slurp in STD.pm.syml
06:42 FCO who can I mark as recipient on a Pull Request on Rakudo's github?
06:45 pugs_svn r27302 | lwall++ | [Cursor] worry about failed use statements
06:50 DanielC joined #perl6
06:54 pugs_svn r27303 | lwall++ | [Makefile] copy *.syml down to snap so we get STD.pm.syml too
06:56 TimToady std: use Blurfl;
06:57 TimToady o_O
06:58 moritz_ the host seems to be unreachable, or hangs
06:58 xinming_ joined #perl6
06:58 ihrd joined #perl6
06:59 ihrd left #perl6
07:01 moritz_ just very hihg load, it seems
07:01 moritz_ load average: 14.56, 10.61, 6.81
07:01 p6eval joined #perl6
07:02 moritz_ afk&
07:02 rfordinal joined #perl6
07:03 TimToady std: use NoneSuch;
07:04 p6eval std 27301:  ( no output )
07:04 xinming__ joined #perl6
07:08 TimToady std: use NoneSuch;
07:09 p6eval std 27303: OUTPUT«Potential difficulties:␤  Can't locate module NoneSuch at /tmp/AILPtAKaPV line 1:␤------> [32muse NoneSuch[31m;[0m␤ok 00:04 41m␤»
07:09 TimToady std: use STD; STD::Regex
07:09 p6eval std 27303:  ( no output )
07:09 TimToady std: use STD; STD::Regex
07:09 p6eval std 27303:  ( no output )
07:10 TimToady just takes too long to load the big .syml, I guess
07:13 twigil joined #perl6
07:15 xinming joined #perl6
07:18 mvuets joined #perl6
07:23 ejs joined #perl6
07:24 krunen joined #perl6
07:25 xinming joined #perl6
07:26 payload joined #perl6
07:30 clintongormley joined #perl6
07:31 rfordinal left #perl6
07:31 DemoFreak joined #perl6
07:36 krunen joined #perl6
07:44 jnthn morning, all
07:45 DanielC jnthn is back!
07:45 moritz_ oh hai jnthn
07:45 * DanielC waves
07:45 moritz_ are you, actually?
07:45 * DanielC is back too
07:45 mvuets left #perl6
07:46 jnthn Yes, I'm back. :-)
07:46 moritz_ but isn't it way too early for you to be awake? I mean come on, it's not even 10am in GMT+2 :-)
07:47 jnthn Yeah, it's odd, I just kinda found myself awake at 9am and figured, well, might as well get up..
07:47 xinming_ joined #perl6
07:47 moritz_ jet lag?
07:47 jnthn Unlikely, since I didn't change timezone at all on my trip. :-)
07:48 jnthn Probably just because I had to get up early for travel on the last couple of days of it.
07:49 jferrero joined #perl6
07:49 jnthn OK, so does Rakudo have to be built against an installed Parrot these days? Changes were starting to happen when I left...
07:49 moritz_ no, still build tree
07:50 mvuets joined #perl6
07:50 jnthn ok, that's easy then :-)
07:52 * jnthn gets latest Rakudo and Parrot
07:53 moritz_ I've implemented the first operator in the setting
07:53 moritz_ infix:<...>
07:53 moritz_ others didn't work that well
07:53 moritz_ rakudo: say 1 eqv 1
07:53 p6eval rakudo d3e040: OUTPUT«Null PMC access in find_method()␤in Main (/tmp/1IXm15AqdC:2)␤»
07:57 viklund joined #perl6
07:57 rfordinal3643 joined #perl6
08:02 pmurias joined #perl6
08:07 jnthn moritz_: Ah, I can guess why that is.
08:07 jnthn moritz_: Try removing it from the list of operators in gen_junction.pl perhaps.
08:08 moritz_ jnthn: I'll try that, thanks
08:09 moritz_ (why was an entry for a not-yet-implemented operator in that script anyway? :-)
08:09 Matt-W Good morning
08:09 pmurias godd morning
08:09 jnthn moritz_: Oh, it wasn't yet implemented?
08:10 jnthn moritz_: Ah. In that case, that's more of a "hmm" then.
08:10 moritz_ jnthn: it was parsed, but there was no sub to dispatch to
08:10 Matt-W \o/ jnthn's back
08:10 drbean_ joined #perl6
08:10 jnthn moritz_: Send me the implementation if you like, I'll try and work out what's going on.
08:11 moritz_ jnthn: it works now.
08:13 xinming joined #perl6
08:14 rfordinal3643 left #perl6
08:16 dalek rakudo: 13b1ff5 | moritz++ | build/gen_junction_pir.pl:
08:16 dalek rakudo: don't generate junction for infix:<eqv> which lives in the setting anyway. jnthn++
08:16 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/1​3b1ff5c8ab2495161bf182d1e44152f4ef923c9
08:16 jnthn moritz_: Oh. Clearly because I'm back.
08:16 jnthn ;-)
08:16 jnthn Oh, it was that problem.
08:16 jnthn OK. :-)
08:16 jnthn The reason is that Perl6MultiSub is smart enough to generate the junction dispatch multi variant and cache it "on demand".
08:16 jnthn So we don't need to generate a bunch more of them.
08:17 moritz_ rakudo: say 1 eqv 1
08:17 p6eval rakudo d3e040: OUTPUT«Null PMC access in find_method()␤in Main (/tmp/Yz0HZqTTTk:2)␤»
08:17 jnthn Not updated yet I guess?
08:17 moritz_ bah, not yet updated
08:18 moritz_ I don't understand the eqv tests
08:18 moritz_ ok !([]      eqv []),      "eqv on anonymous array references (3)";
08:18 moritz_ it looks like it tests ===, not eqv
08:19 jnthn Aye
08:19 jnthn I never 100% got eqv anyway.
08:19 snarkyboojum joined #perl6
08:21 scottp Hey dudes. I am trying to access "sha1" - I notice it exists in Parrot, is there a way to access that version, or another, from Rakudo/
08:21 Matt-W Someone wrote a module for that
08:22 xinming_ joined #perl6
08:22 Matt-W Puts a Perl 6 wrapper around some inline PIR to get at the Parrot functionality. Anybody remember who it was?
08:22 pugs_svn r27304 | moritz++ | [t/spec] fudge eqv.t for rakudo
08:22 viklund danielc
08:22 viklund it's in perl6-modules on github
08:22 scottp ta
08:23 DanielC hi
08:24 viklund http://github.com/perl6/modules
08:24 DanielC Yeah, that's right.
08:24 DanielC Thanks viklund. I couldn't remember the URL.
08:25 viklund DanielC++ we're using the Digest module in november now, no more passwords in plain-text :D
08:25 DanielC :-D
08:25 moritz_ can I change my password in november over the web interface?
08:25 viklund (but I had to install libssl-dev on my lappy in order to make it work)
08:25 moritz_ viklund: do you use salts?
08:25 viklund moritz_: no
08:25 viklund yes
08:26 moritz_ very good
08:26 moritz_ otherwise I'd submitted a patch now :-)
08:26 scottp Thanks viklund and Matt-W, the SHA1 worked well.
08:26 moritz_ (because salts are easy to implement, and gain much)
08:27 viklund here's the commit: http://github.com/viklund/november/commit​/e03a79b2f8a220f186ae1cc9f4ea1cedf55a2192
08:27 scottp Since there is no "make install" in most modules, how are people dealing with multiple module usage - location of installations ?
08:27 jnthn What spectest fails are folks seeing at the moment?
08:27 cogno joined #perl6
08:27 dalek rakudo: d95def2 | moritz++ |  (2 files):
08:27 dalek rakudo: test infix:<eqv>. Added variant for Code objects
08:27 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/d​95def257bf3c9279906d9f7c4cca28363b1119a
08:29 moritz_ jnthn: lots, actually
08:29 jnthn :-(
08:30 jnthn I was gonna say, either something is hosed on Win32 more than usual or some stuff is br0ked.
08:30 moritz_ are you using the newest parrot?
08:30 jnthn No, the one in PARROT_REVISION
08:30 jnthn But like, stuff that I know full well worked when I left is broken.
08:30 jnthn t\spec\S12-introspection\methods.rakudo                 40   38  3-40
08:31 jnthn That was one of the last things I worked on before leaving, and it passed everything in there. :-(
08:31 moritz_ I'm doing a spectest now
08:31 moritz_ and paste the result
08:31 jnthn Are you aware of any spectests checking for =head1 Interface Consistency
08:31 jnthn section of S12?
08:32 * moritz_ takes a look what's described there
08:33 moritz_ for the first paragraph there should be some
08:33 jnthn Yes, I mean the BUILD tests implicitly test this.
08:33 jnthn Maybe it'd be good to have some more explicit tests though.
08:33 drbean joined #perl6
08:34 moritz_ I thought I wrote some, but I can't find them anymore :(
08:35 jnthn OK, I'm happy to make a couple. Is S12-class/interface-consistency.t OK as a name?
08:35 moritz_ sure
08:35 lichtkind joined #perl6
08:37 moritz_ wait
08:37 moritz_ S12-methods/interface-consistency.t might be better
08:38 explorer__ joined #perl6
08:38 jnthn Hmm, maybe
08:39 jnthn I was planning to test the is hidden bits in there too (at least, once they're implemented)
08:39 moritz_ S12-interface-consistency/methods.t
08:39 moritz_ S12-interface-consistency/is-hidden.t
08:40 jnthn Perhaps, though that's explosion of test files. :-)
08:40 moritz_ that's fine
08:40 scottp joined #perl6
08:40 moritz_ merging later on is cheap
08:40 jnthn true
08:40 moritz_ anyway, do as you see fit, all proposals so far were not bad
08:41 Matt-W How do classes export from modules? Or don't they?
08:43 zamolxes joined #perl6
08:44 moritz_ Matt-W: example?
08:44 Matt-W moritz_: well can you say something akin to class A is export {}
08:44 Matt-W obviously you can't say that, or it'll try to subclass 'export'
08:45 Matt-W or do you always have to say Module::ClassName
08:45 moritz_ Matt-W: class names are exported by default, I think
08:45 moritz_ hm
08:45 moritz_ actually I'm not sure
08:45 moritz_ Matt-W: ask p6l?
08:45 Matt-W might do
08:46 Matt-W they might find it more answerable than my question about adding mixins to method objects
08:46 moritz_ :-)
08:46 moritz_ warnocked :/
08:46 Matt-W But I want to attach data to my methods!
08:47 Matt-W how else am I goign to do it??
08:47 Matt-W and I don't seem to be able to add methods programatically except by redefining names that already exist
08:48 moritz_ I guess that's more of a Rakudo limitation than a Perl 6 limitation
08:48 jnthn You should be able to add mixins to code objects.
08:48 Matt-W jnthn: I triggered all sorts of weird bugs in Rakudo when I tried
08:48 Matt-W jnthn: only one got filed, it's the one about getting different errors with different use of whitespace
08:49 jnthn rakudo: sub foo() { say 42 }; role lol { method hi { say "oh hai" } }; &foo does lol; &foo.hi
08:49 p6eval rakudo d95def: OUTPUT«oh hai␤»
08:49 mvuets left #perl6
08:49 jnthn I've no doubt there are things that don't work, but it seems that basic case does.
08:49 Matt-W yeah
08:50 jnthn But anyway, in the near-ish future we'll have user defined traits in Rakudo.
08:50 jnthn Then you can write a trait auxiliary.
08:50 Matt-W aaah
08:50 Matt-W that'd be nice
08:50 Matt-W I did get parts of method mixins working, but I can't remember which bits now
08:50 Matt-W I've got all the code at home though
08:50 jnthn Which means you can write sub foo is wtf('omg') { } to annotate the extra data.
08:51 jnthn And the trait handler for wtf will get the 'omg' and can mix in whatever role it sees fit (if it's well behaved, the wtf role probably, or something with a $.wtf)
08:51 jnthn I think TimToady has been re-thinking trait application a bit of late, and not caught up on p6l yet.
08:52 jnthn But anyway, I do plan to implement this stuff within the next month or so.
08:52 moritz_ cool
08:52 Matt-W That is exceedingly cool
08:52 jnthn Really I'm just waiting on the spec to settle a bit, but thay may have already happened.
08:52 Matt-W That gets us something a bit like decorators doesn't it
08:52 jnthn If not, I'll badger TimToady++ on it. :-)
08:53 lisppaste3 moritz_ pasted "test summary for jnthn++" at http://paste.lisp.org/display/82671
08:53 Matt-W Can traits interfere with the calling of the routine?
08:53 moritz_ (that's with parrot r39796)
08:53 jnthn Yes and no.
08:54 jnthn moritz_: Matches what I see.
08:54 jnthn moritz_: Apart from t\spec\S12-introspection\methods.rakudo fails for me...and apparently not for you. :-/
08:54 jnthn Thanks.
08:55 moritz_ well, my parrot is more than 100 revisions younger than yours
08:55 jnthn Matt-W: I mean, if the trait handler takes the routine and installs a wrapper with .wrap...
08:55 Matt-W jnthn: yes and no? That's not a good 10am answer
08:55 Matt-W jnthn: so they can if they want to
08:55 jnthn Then of course it's interfered with the call.
08:55 Matt-W can the inside of a routine get hold of its own object and examine it?
08:56 jnthn &?ROUTINE I think.
08:56 jnthn (nyi)
08:56 Matt-W woohoo
08:56 * Matt-W adds it to 'list of things to nag people about'
08:56 jnthn That had probably better return the thing that invokes with the wrappers though.
08:56 jnthn Since they are meant to be in-place modifications.
08:56 Matt-W and if you have a wrapped routine but you don't have the handle you get back from wrap(), can you still unwrap it
08:57 jnthn as far as I could tell, you needed the unwrap handle.
08:57 Matt-W hmm
08:58 jnthn We could say that parameterless unwrap just strips off the latest wrapper or something.
08:58 Matt-W It'd be nice if you could introspect that somehow
08:58 Matt-W ack, meeting time
08:58 jnthn But thing is, you can do out-of-order unwrapping (Rakudo handles that already).
08:58 jnthn And it might create weird action-at-a-distance effects to unwrap the latest one.
09:07 mvuets joined #perl6
09:09 pugs_svn r27305 | mvuets++ | [Spec] Minor formatting fixes
09:14 azawawi joined #perl6
09:16 azawawi TimToady: redspans is not working anymore. http://gist.github.com/137540
09:21 masak joined #perl6
09:21 masak hoi!
09:21 phenny masak: 28 Jun 19:39Z <eternaleye> tell masak Why make PERL6LIB be a list of _directories_? Why not have the tools that generate a database have a switch, --global, that only works for UID 0, and everyone else passes, say, --database-location and it builds an unpriviledged database?
09:21 phenny masak: 28 Jun 19:40Z <eternaleye> tell masak And then PERL6LIB can point at individual _databases_
09:21 phenny masak: 28 Jun 19:41Z <eternaleye> tell masak Or even simpler, just have --database-locaton and use filesystem permissions
09:21 phenny masak: 28 Jun 19:42Z <eternaleye> tell masak Then, @*INC can be an Array of ModuleLibrary or summat, with introspection and everything
09:22 masak whoa. :)
09:22 jnthn oh hai
09:22 masak glad to see people are thinking about the library stuff.
09:23 masak jnthn: hi!
09:23 masak I have a question about the Blob type, which is mentioned in the spec exactly once: how does one use it?
09:23 jnthn I didn't know we had a Blob type.
09:24 jnthn buubot: spack Blob
09:24 buubot Couldn't match input.
09:24 jnthn Where's it mentions?
09:24 eMaX joined #perl6
09:25 moritz_ S02
09:26 masak buubot hasn't been spacking very reliably lately...
09:26 buubot Couldn't match input.
09:26 masak my point. :)
09:26 lichtkind moin
09:26 masak lichtkind: aloha.
09:26 viklund helo lichtkind
09:26 lichtkind haha :)
09:27 jnthn ahoj lichtkind
09:27 masak saluton, moritz_, viklund.
09:27 lichtkind jnthn: ahoj jsi saz vshuru?
09:29 jnthn ...is that Czech?!
09:30 scottp Anyone got "proto" working with current Rakudo ? I get "invalid arg type in named portion of args" at lib/Ecosystem.pm:10
09:30 masak scottp: checking, hold on.
09:30 jnthn scottp: How are you trying to use it?
09:30 masak scottp: 'current' Rakudo as in bleeding or as in latest monthly?
09:30 jnthn oh wait
09:31 jnthn proto as in the installer?
09:31 masak :)
09:31 jnthn Not proto plurality thingy?
09:31 scottp current being "master' on github for both rakudo and proto
09:31 masak okie.
09:31 scottp yes re: installer
09:31 masak please hold. :)
09:31 viklund its the BUILD method!
09:31 masak jnthn: lib/Ecosystem.pm is a module in proto. it tracks all Perl 6 projects.
09:32 jnthn ah, ok
09:32 viklund remove the # in ecosystem.pm and Installer.pm
09:32 masak oh, right.
09:33 masak I upgraded to Pittsburgh and forgot to remove that #.
09:33 viklund yees
09:33 masak shall I make penance by committing the patch?
09:34 viklund you shall.
09:34 masak right now proto doesn't run here at all, due to that elusive 'cannot load lib' bug... :/
09:34 masak I'll remake Parrot/Rakudo and try again.
09:35 lichtkind jnthn: yes that was czech for, you are finally awake
09:35 viklund masak: the one only you have?
09:35 masak aye.
09:35 masak and feather.
09:35 mvuets left #perl6
09:35 jnthn lichtkind: I hadn't realized that the Czechs spelt Slovak so badly. ;-)
09:36 viklund feather?
09:36 masak jnthn is objective as usual... :)
09:36 viklund I run proto on feather
09:36 masak viklund: I'm doing november smokes on feather. the past month I've had that library bug there.
09:36 masak but maybe it'll go away if I update and rebuild...
09:40 sri_kraih_ joined #perl6
09:47 masak waitwait, this isn't how I should do this, right?
09:47 masak I should be mergin bleeding into master, not make new commits in master.
09:51 jnthn wtf over 400 tickets now?!
09:52 viklund merry christmas!
09:52 masak sorry... :)
09:53 jnthn masak: Nothing to be sorry for, was just a bit surprised we'd hit that number. :-)
09:53 masak it wasn't easy. :)
09:54 jnthn Won't be easy to come back down from it either, but I'll try and move things in that direction.
09:55 masak jnthn++
09:57 payload left #perl6
09:58 masak I'm having a git problem, for once.
09:58 viklund ;)
09:58 masak trying to rebase the 'bleeding' branch on 'master' in proto.
09:58 masak viklund: could you try it, and see if you fare better?
09:59 masak I get a conflict, which to me looks silly, but still. I fix the conflict, add the file and do --continue.
09:59 masak but then I get the error "No changes - did you forget to use 'git add'?"
09:59 masak and there's no way I can continue the rebase.
09:59 Matt-W jnthn: I suppose just saying 'unwrap the last one' could muck up someone who's got a handle to that, but then you'd need a way to promise that unwrapping something that's already been unwrapped (via handle) is a no-op. But you need that anyway, because someone could easily use the same handle twice.
10:00 viklund masak: I don't think you can do that
10:00 viklund or maybe you can, I would just cherry-pick the commit
10:00 masak viklund: do what? rebase...? oh!
10:01 masak no, I can't. well, I can, but then I can't push. well, I can, but then people will have problems if they pull...
10:01 * masak is cascaded by realizations
10:01 masak I'll cherry-pick.
10:01 masak or merge. or something.
10:01 scottp Is there an example of exporting a sub?
10:02 viklund masak: it is ok to merge ;)
10:02 viklund sometimes...
10:02 masak scottp: most of the setting.
10:02 bpetering joined #perl6
10:02 Matt-W scottp: module Foo; sub A is export { }
10:02 scottp ta
10:03 masak mergin worked! I've now done due penance.
10:03 masak but I still don't have a working proto. :/
10:04 viklund masak: or you could just fix it and commit, it's only a few characters
10:04 viklund and then remove the bleeding branch, I don't think it solved any problems
10:04 masak I'll remove it.
10:05 masak we'll recreate it if there's a new between-monthlies divergence.
10:05 viklund masak: it isn't used, adding a comment to the source I think is better, like mberends first did
10:06 viklund if it's not a really big change that is needed...
10:07 masak I like the idea of doing a merge after a monthly release, and just have all the changes apply to master.
10:07 masak but you're right, unless it's something bigger it might not be worth it.
10:08 viklund masak: then it's better to have a release two days after rakudos release ;)
10:08 viklund and just have bleeding the default in github
10:08 masak maybe we should have regular proto releases.
10:09 masak that's actually a nice idea.
10:09 masak but in that case, we need a test suite.
10:09 masak and a way to mock the installation process.
10:13 bpetering does anybody have experience porting C to perl6?
10:19 masak moritz_: do you happen to know who runs dalek?
10:21 Matt-W bpetering: I'd say the best route is probably to set down precisely what the problem the C solves is and then implement a solution in Perl 6, rather than trying to port the existing code which is not likely to get you very much of Perl 6's benefit
10:22 bpetering i've already got some C code ported to p6, it parses but may not work correctly
10:23 Matt-W test suite!
10:23 masak that's what I was thinking, too. :)
10:24 Matt-W (we're big fans of test suites)
10:24 DanielC I've noticed that Perl dudes like test suites.
10:24 bpetering oh i know :)
10:25 Matt-W well we've got TAP and some good modules that use it
10:25 DanielC Perl has a lot more tests than, say, Ruby. I forget the numbers, but the difference was impressive.
10:25 Matt-W so it's really easy to like test suites
10:25 bpetering ok... so i write a test suite for the C, then get the p6 impl passing it?
10:26 Matt-W maybe
10:26 bpetering maybe?
10:26 Matt-W well depends what it is
10:26 Matt-W if you're testing it as a black box external programme, you could use the same test suite for both of course
10:26 bpetering it's for the p6 test suite itself, actually
10:26 Matt-W if it's a library or something, you'd need two different ones
10:28 masak I'd write one test, then implement the p6 to satisfy that test, then repeat. :)
10:29 jferrero joined #perl6
10:31 Chillance joined #perl6
10:38 pmurias masak: you should write all your tests first and then start implementing... ;)
10:38 masak that's another way to go about it. :)
10:39 masak I guess that lends itself better to a consistent design.
10:49 pmurias bpetering: re for the test suit itself - you are porting a C test?
10:50 bpetering pmurias: nope, porting some C code I'm hoping will turn into a test easily
10:51 bpetering it's for S29, "tests to ensure that rand has a bit of entropy
10:51 bpetering this is still in pugs/t/spec/TODO so I'm assuming it still needs to be written
10:52 bpetering it may not even pan out, but if it does it'll be my first contribution to the test suite, which is why i'm asking on here
10:53 bpetering about the only thing I'm unsure about is whether C's 'double' maps well to p6's 'Num'
10:55 moritz_ masak: Infinoid runs dalek
10:56 masak thanks.
10:58 pmurias bpetering: i think num64 would be exactlly the double
10:59 moritz_ bpetering: using Num should do if you don't rely too closely on the bit structure
11:02 bpetering well, I'm trying to port statistical code I don't really understand
11:02 bpetering but the C has no bit operations :)
11:02 moritz_ use Num then
11:03 bpetering ok
11:06 bpetering thanks
11:14 mizioumt joined #perl6
11:18 mjk joined #perl6
11:30 xomas joined #perl6
11:30 * jnthn hits a weird auto-viv issue that causes some great oddness.
11:31 jnthn (in NQP, of all things...)
11:31 moritz_ nqp does auto-viv?
11:31 * moritz_ puzzled
11:32 jnthn I'm not sure
11:32 jnthn but
11:32 jnthn if $_<trait_auxiliary> { .... }
11:33 jnthn That if statement manages to modify the parse tree sufficient to upset things later on.
11:33 moritz_ ouch.
11:35 jnthn I shoulda been looking at the PAST really anyway, tbh.
11:35 jnthn But still, very odd.
11:37 jnthn ah crap, getting the .ast and looking at that also triggers it too, it seems.
11:37 jnthn hmm, wtf
11:43 _Chillance_ joined #perl6
11:48 zulon joined #perl6
11:48 zulon hello!
11:48 moritz_ ehlo
11:49 Matt-W jnthn: that is odd. Are you implementing user-defined traits by any chance?
11:49 jnthn no
11:49 jnthn Trait related bits though
11:49 zulon I was trying to explain to some friends how the type system worked in Perl 6 (they're the kind of person with lots of prejudices about Perl)
11:49 Matt-W jnthn: I suppose it's a step in the right direction :P
11:49 zulon but I discovered that I didn't really know how &infix:<+> worked :-'
11:49 Matt-W jnthn: Really I should make the effort to learn how to help with these things
11:50 zulon so, er, what really happens when one writes "1.5" + 3 ?
11:50 Matt-W it converts "1.5" to a number of some sort, and adds it to 3
11:50 moritz_ zulon: there are various variants of that operator
11:50 Matt-W or rather, adds 3 to it
11:50 Matt-W (I think)
11:50 zulon but how does it know how to convert?
11:50 moritz_ zulon: the version that's picked here is the one with the signature (Any, Any)
11:51 zulon hm
11:51 moritz_ zulon: so that will coerce both arguments to Num
11:51 zulon ok
11:51 moritz_ "1.5" -> 1.5, 3 stays (Int does Num)
11:51 Matt-W moritz_: $^a.Num + $^b.Num?
11:51 moritz_ and then then (Num, Num) multi is called on the result
11:51 zulon but how does it know how to convert a Str to a Num ?
11:51 Matt-W zulon: Str knows how to convert itself to a Num
11:51 moritz_ zulon: that's hard-coded in the Str class
11:52 zulon okay
11:52 Matt-W class Str { method Num { } }
11:52 moritz_ Matt-W: prefix:<+> or .Num, yes
11:52 zulon but er
11:52 Matt-W moritz_: oh yes I keep forgetting about prefix:<+>
11:52 zulon rakudo: say "3".Num
11:52 jnthn otoh I have got t\spec\S12-class\rw.t passing...
11:52 p6eval rakudo d95def: OUTPUT«Method 'Num' not found for invocant of class 'Str'␤»
11:52 moritz_ zulon: that should work
11:52 Matt-W jnthn++
11:52 moritz_ ie you've found a bug :-)
11:52 zulon oh :)
11:53 Matt-W rakudo: say +"3"
11:53 p6eval rakudo d95def: OUTPUT«3␤»
11:53 zulon I've contributed a tiny little bit to Perl 6 :p
11:53 Matt-W rakudo: say (+"3").perl
11:53 p6eval rakudo d95def: OUTPUT«3␤»
11:53 Matt-W yes, that's a bug
11:53 Matt-W congratulations
11:53 moritz_ rakudo> say (+"3").WHAT # should be Int, is probably Num
11:53 moritz_ rakudo: say (+"3").WHAT # should be Int, is probably Num
11:53 Matt-W rakudo: say (+"3").WHAT
11:53 p6eval rakudo d95def: OUTPUT«Num()␤»
11:53 p6eval rakudo d95def: OUTPUT«Num()␤»
11:54 moritz_ that's known, though
11:54 Matt-W But it should also have a Num method...
11:54 moritz_ aye
11:54 * moritz_ submits
11:55 zulon okay, thanks for the explanation
11:55 zulon I was really confused when I saw no .Num method
11:55 jnthn Matt-W: The first thing to fix up is to get Rakudo's parsing updated to parse traits more as STD does.
11:56 jnthn I'm still not sure S14's updated status answers the "where does the rw role we dispatch on live" thing though.
11:57 Matt-W well that's what nagging is for
11:58 Matt-W to get explanations :)
11:58 masak nagging++
11:59 * Matt-W plans a blog post
11:59 Matt-W how do I get on Planet Perl 6?
11:59 moritz_ Matt-W: write a few Perl 6 related posts, then /msg obra_
12:00 Matt-W I shall write the planned one first then
12:00 Matt-W As I've only got one at the moment
12:00 DanielC There is a Planet Perl 6?
12:00 DanielC I have already written a few Perl 6 related posts.
12:01 moritz_ DanielC: planetsix.perl.org
12:02 DanielC *click*
12:02 moritz_ DanielC: URL? (to your blog, I mean)
12:02 DanielC daniel.carrera.bz
12:02 jnthn rakudo: sub foo($a) { }; foo(1, :x<1>)
12:02 p6eval rakudo d95def:  ( no output )
12:02 jnthn ...surely that should die.
12:02 jnthn Parrot bug I suspect.
12:03 DanielC moritz_: My posts are infrequent (~1/week) but long. I'm not sure if that's appropriate for Planet Perl 6.
12:03 moritz_ DanielC: most of us blog with such a frequency
12:03 masak DanielC: sure it is!
12:03 DanielC ok :-)
12:03 DanielC Then please, do add me to Planet Perl 6.
12:04 DanielC obra_: ping? You are in charge of Planet Perl 6, right?
12:04 clintongormley1 joined #perl6
12:04 moritz_ DanielC: do you have an RSS feed that only includes Perl 6 related posts (ie sorted by tag or category)
12:04 moritz_ if yes, that would be preferrable
12:05 DanielC I'm sure there is a way to do that with Word Press.
12:05 moritz_ http://daniel.carrera.bz/c​ategory/programming/feed/ seems to be fine
12:06 DanielC ah! So that's how feeds work in Word Press...
12:06 Matt-W yeah wordpress usually provides category feeds
12:06 Matt-W that's what I plan to do for mine
12:06 pugs_svn r27306 | jnthn++ | [t/spec] Add a few initial tests for interface consistency section of S12. One fudged for Rakudo due to Parrot bug.
12:06 Matt-W I've got a perl 6 category
12:07 Matt-W Might even get to write this new post tonight
12:07 Matt-W that'd be nice
12:07 Matt-W distract me from tomorrow
12:07 pmichaud --good morning, #perl6
12:07 Matt-W hi pmichaud
12:07 DanielC I'll make a "Perl 6" category, because I might write some posts that are programming but not Perl 6.
12:07 pmichaud s/'--'//
12:07 DanielC hi pmichaud
12:07 pmichaud only here a bit before leaving for airport
12:07 DanielC pmichaud: Holidays?
12:07 pmichaud YAPC::NA, followed by a short vacation
12:07 DanielC ah
12:08 moritz_ DanielC: please do that, and /msg the feed URL to obra_ then
12:08 DanielC ok
12:09 molaf_xx joined #perl6
12:09 jnthn pmichaud: Any idea at all why:
12:09 jnthn if +@($ast) >= 2 && $ast[0] eq 'trait_auxiliary:is' && $ast[1] eq $name {
12:09 jnthn That check being done would cause us to fail the isa.t sanity test?
12:10 jnthn Or more widely, fail every .isa('string') while the .isa(TypeName) still works fine?
12:10 pmichaud no.  But try running with parrot -G .
12:10 pmichaud I think you'll find that it passes.  :-|
12:11 jnthn OMFG
12:11 jnthn You're right.
12:11 jnthn I've wasted an hour on that.
12:11 Matt-W :(
12:11 jnthn How on earth can we have a GC bug like that?
12:11 pmichaud The parrot folks have been cleaning up memory leaks in context handling, but the end result of that is that we're seeing problems in Rakudo.
12:11 pmichaud especially with  .isa('string')
12:12 jnthn That's a bizzare place to see it.
12:12 pmichaud agreed.
12:12 pmichaud when I did my stuff working on adding 'rw' properties to containers, I was seeing the same thing (more)
12:12 jnthn I've done some fairly minor-ish changes to trigger it too. :-(
12:12 pmichaud in particular, at some point it would end up calling   'increment' on the string, so that   'Hash' was getting converted to 'Hasi' and then the check would fail.
12:13 moritz_ ouch.
12:13 jnthn erm....
12:13 jnthn I don't even want to think about how that could happen.
12:13 Matt-W oh man
12:13 pmichaud I don't know _why_ it called increment on the string.... I suspect that a pointer is being corrupted somewhere.
12:13 jnthn Epic memory corruption...
12:13 Matt-W Sounds about as fun as the bug I'm trying to track down at work at the moment
12:13 pmichaud anyway, I haven't had a chance to track it down yet.
12:14 jnthn Maybe register sets are getting re-used or something.
12:14 pmichaud but it's a _huge_ blocker for us at the moment.
12:14 jnthn While they're still alive.
12:14 jnthn Agreed.
12:14 jnthn Shit.
12:14 pmichaud (it's the one I've kept running into over the past couple of weeks)
12:14 jnthn OK, I don't remember seeing it before I went away on vacation.
12:14 jnthn Hm.
12:14 pmichaud it started appearing just then.
12:14 jnthn :-/
12:15 Matt-W It's a special welcome back jnthn bug
12:15 pmichaud anyway, if you can track it down, that'd be great.  If not, I guess it'll be the subject of my Rakudo day tomorrow.
12:15 jnthn That's really odd.
12:15 Matt-W it must be something going pretty crazy
12:15 pmichaud I'm planning to do two Rakudo days this week to make up for missing one last week (with YAPC::NA)
12:15 Matt-W the GC presumably thinks it's incrementing something else
12:15 jnthn Wait, so is your flight now back home from YAPC::NA + vacation?
12:16 pmichaud yes.
12:16 jnthn Ah, OK.
12:16 jnthn I plan to do a Rakudo day this week too.
12:16 jnthn Any preference on when?
12:17 jnthn More generally though this week I'm working on grant stuff too.
12:17 jnthn Also, what should I do with my patches that trigger the GC bug? Hold off until it's fixed?
12:18 moritz_ jnthn: maybe a branch?
12:18 pmichaud no preference on rakudo day.  I should be around all week.
12:18 pmichaud hold off on the patches until I get a chance to look at it tomorrow, I guess.
12:19 pmichaud I may have to start bisecting parrot.
12:19 pmichaud anyway, I'd say we only hold the patches for a day.
12:20 moritz_ if you bisect, use a git copy of parrot
12:20 jnthn I've got them committed locally, so can just push the bunch later when we're happy things are fixed up.
12:20 moritz_ much faster than with svn :/
12:20 pmichaud if after tomorrow we're still not able to track it down, then we'll go ahead and apply the patches
12:20 pmichaud moritz_++ # good idea
12:21 pmichaud anyway, time for me to depart for airport.  I'll be back in a few hours (likely while waiting for plane ... pittsburgh has free airport wifi)
12:21 pmichaud bbl
12:21 jnthn safe journey
12:21 Matt-W oooh free wifi
12:21 Matt-W all airports should have that
12:22 * jnthn is very happy that both of the ones near to him do
12:22 masak wow, I had forgotten about Rakudo Days! wohoo!
12:22 Matt-W London Stansted doesn't
12:22 Matt-W neither does Basel
12:22 * Matt-W paid €stupid for wifi at Basel when he was stuck there for six hours once
12:23 Matt-W still, stopped me going mad
12:23 jnthn Brussels not only didn't have free wifi, but would only sell something like a day pass for like 20 euros or something insane.
12:23 Matt-W yup that's normal in European airports
12:23 jnthn Maybe my little bit of Europe is just less retarted.
12:23 jnthn Bratislava and Wien both have free wifi.
12:23 jnthn Always have since I moved here.
12:24 avar Keflavík Airport used to be my favorite int airport. They had comfortable seats you could sleep on, free wifi and an environment that didn't look like something cut out of a dystopian "everything must be glass & silver with bright lights" movie. They've now rectified all three.
12:24 Matt-W jnthn: the enlightenment comes to eastern europe before the rest, obviously
12:24 Matt-W jnthn: although to be fair, in the case of Heathrow I'd rather they make little things like the baggage handling system work before they worry about free wifi
12:26 mvuets joined #perl6
12:26 jnthn Heathrow is such a failport.
12:27 jnthn OK, I need lunch and to do $other_job for a while...
12:27 skids joined #perl6
12:27 jnthn In my local currently uncomittable patches, is rw on classes now works (makes all accessors is rw by default), is hidden surpresses generation of *%_ and also .signature has the *%_ in it properly for when it is added.
12:27 clintongormley joined #perl6
12:29 Matt-W hmm
12:29 * Matt-W will have to read up on is hidden
12:29 moritz_ jnthn: git checkout -b uncommitable; git push origin uncommitable
12:30 obra_ pmichaud: ping?
12:30 moritz_ then we can look at it too :-)
12:31 Matt-W obra_: he's gone to the airport
12:32 obra_ ah :)
12:33 masak if a module exists in the database in the same version but by two different authors, and a program has no requirements on which author's module to use, how will the choice be made? or will the program refuse to run?
12:34 mizioumt1 joined #perl6
12:35 DanielC masak: That's probably left to the implementation, but I think that making the program not run is probably the wrong solution.
12:35 masak me too.
12:35 pmurias jnthn: rakudo's multi dispatch works by sorting the variants beforehand and failing if two thing of equal/uncomparable specificness match?
12:36 DanielC masak: I think I'd go for the most recently installed, but that means that the implementation has to keep track of the install date.
12:36 masak DanielC: I was just going to say 'the oldest installed'.
12:36 jnthn pmurias: At the moment, we sort them the first time we need to do a dispatch and keep hold of that computed order.
12:36 DanielC masak: Ok. Honestly I can't think of any good reason to choose one or the other.
12:36 masak that way, behaviour doesn't change when things are added to the database.
12:36 DanielC ah
12:36 masak feels saner. :)
12:37 DanielC That's a good reason.
12:37 DanielC It makes the programs more predictable.
12:37 DanielC yeah
12:37 jnthn Then we know we have dupes if we find on unique solution at the same "narrowness level"
12:37 jnthn See do_dispatch in src/pmc/perl6multisub.pmc
12:37 moritz_ maybe we can do multi dispatch with module name, auth and version? :-)
12:37 jnthn There's a lot of comments.
12:37 jnthn So you can probably get a good sense of the algorithm from that rather than having to read the code. :-)
12:39 DanielC But if there are multiple versions available, the implementation should pick the latest one, right?
12:39 DanielC use Foo;  <-- Rakudo grabs the highest-number version of Foo available.
12:40 moritz_ presumably
12:40 moritz_ or maybe we can just set a default per module name
12:40 obra_ I'm presuming that module resolution algorithms will be pluggable and program-selectable.
12:40 moritz_ like debian's update-alternatives
12:42 DanielC So, the general rule becomes: Pick the latest version that matches the 'use' statement, and if there is more than one installed, pick the one that was installed first.
12:42 icwiener joined #perl6
12:42 masak moritz_: http://perlgeek.de/blog-en/perl-5-​to-6/24-reduce-meta-operator.html -- I think you might want to reverse the order of the two elsif conditions, so that the third will have a chance to execute.
12:43 masak it's just an example, I know, but it's more convincing if it's a correct example. :)
12:43 moritz_ masak: I'll take a look... I'll take it you're more than half a year behind with your firefox tabs? :-)
12:44 masak moritz_: no, just over a month. :)
12:44 masak but some posts keep re-appearing for different reasons. and sometimes I read them again.
12:46 Lorn joined #perl6
12:47 moritz_ masak: thanks, fixed
13:02 synth joined #perl6
13:16 rjbs moritz_: In the final "or" in t/04-roundtrip.t, it should be:         or say "# Got: {$r.perl}\n# Expected: {$_.value.perl}";
13:16 rjbs not $_.perl
13:16 * rjbs can't tell why it's failing.
13:17 rjbs Is this in git somewhere?
13:17 moritz_ rjbs: do you have a github account?
13:17 rjbs I do.
13:17 rjbs rjbs
13:17 moritz_ http://github.com/moritz/json/tree/master
13:17 rjbs Cool, will poke more later; time to get into the office.
13:18 moritz_ rjbs: you're a committer now; feel free to fix whatever you encounter :-)
13:21 particle-264b joined #perl6
13:22 mvuets left #perl6
13:23 * particle-sugaros just created a sugaros vm, and will soon attempt to build rakudo here
13:26 jnthn sweet
13:27 rjh joined #perl6
13:27 Matt-W nice
13:32 mvuets joined #perl6
13:41 ejs0 joined #perl6
13:42 * rjbs pushes that fix, will see if he can figure out that bug later.
13:49 ruoso joined #perl6
13:49 azawawi joined #perl6
13:49 azawawi hi
13:52 masak azawawi: bye? :)
13:54 ruoso hello1
13:54 nihiliad joined #perl6
13:57 KyleHa joined #perl6
14:01 pmurias ruoso: hi
14:01 pmurias ruoso: how did you talk go?
14:02 pmurias * your
14:02 ruoso very well...
14:03 ruoso I'll be posting about it (with slides) very soon
14:03 PacoLinux joined #perl6
14:06 gbacon joined #perl6
14:08 pmurias ruoso: after i get signature sorting working what should i work on?
14:14 ruoso pmurias, do the multi sort the candidates already?
14:15 kidd_ joined #perl6
14:16 pmurias not yet
14:16 ruoso I think that would be a good thing to do
14:16 pmurias i asked about the next thing ;)
14:17 ruoso ah...
14:17 ruoso now I read it right
14:17 ruoso I think you could work on the module improt
14:19 pmurias the current scheme (see lib/Test.pm) is that use calls EXPORTALL on the package object with the scope where it import stuff to as the argument
14:20 ruoso I still need to look that...
14:20 ruoso just got back to work today
14:22 pmurias ok, i had a cold and was preparing for my last exam tommorrow so i didn't much done lately
14:23 pmurias rakudo: multi foo(Int $a,$b?) {say "#1"};multi foo($a,Int $b?) {say "#2"};foo(1)
14:23 p6eval rakudo d95def: OUTPUT«Ambiguous dispatch to multi 'foo'. Ambiguous candidates had signatures:␤:(Int $a, Any $b?)␤:(Any $a, Int $b?)␤in Main (/tmp/XDJ2KRXJ70:2)␤»
14:25 jnthn Think that's right - those two candidates are tied in the sort, and both accept one parameter.
14:26 pmurias that's a bug
14:26 jnthn Why?
14:26 pmurias in that case the first one is most specific
14:26 jnthn Why?
14:27 jnthn Remember the sort is independent of the parameters that are passed.
14:27 pmurias is it specced that way
14:27 pmurias ?
14:27 jnthn Yes.
14:28 jnthn The point is that we sort once.
14:28 jnthn And use that ordering for all dispatches.
14:28 jnthn Unless we want to add some other level of tie-breaking specific to optionals...but I don't see anything like that in the spec.
14:29 jnthn The sort isn't cheap, thus why we want to be able to do it once, and have it invariant (unless another candidate comes to exist at runtime somehow, but that is evil).
14:30 masak is the MMD exposed in any way? could it theoretically be replaced in a module?
14:33 Matt-W oh of course
14:33 Matt-W you dynamically generate methods in code by doing it in a macro
14:33 * Matt-W bangs his head on the desk
14:33 * Matt-W then books a flight on the next time machine to after Rakudo has macros
14:34 jnthn class MyMulti { has @!candidates; method postcircumfix:<( )>(|$args) { ... } } # or some such
14:35 pmurias jnthn: the reason i thought that behaviour was erroneuous is because the first variant matched the arguments more closely
14:35 jnthn pmurias: Aye, I follow your line of thought.
14:36 jnthn I don't see anything in the spec that suggests different mind.
14:36 jnthn That is, that says if optional parameters make the sort any different.
14:38 pmurias it depends if multi dispatched is specced to be (or behave like it is) implemented by sorting the candidate list
14:38 jnthn Oh, I'm quite sure it's spec'd to sort the candidate list statically.
14:38 jnthn I'd considered that one of the underlying design principles.
14:39 TimToady if we can't sort statically, we're completely hosed performance-wise
14:40 pmurias so do you officially declare that behaviour correct?
14:40 pmurias or do we register to candidates on with the other withought the optional argument?
14:42 TimToady let me backlog and coffee (not necessarily in that order) before I say anything more specific and/or stupid
14:43 pmurias ok
14:44 frew joined #perl6
14:45 nihiliad joined #perl6
14:46 pmurias train&
14:48 TimToady say {"b" => 2, "a" => 1}.perl eq { a => 1, b => 2}.perl
14:48 TimToady rakudo: say {"b" => 2, "a" => 1}.perl eq { a => 1, b => 2}.perl
14:48 p6eval rakudo d95def: OUTPUT«0␤»
14:49 TimToady jnthn: if .perl were to sort its hash keys, that would implement eqv
14:49 TimToady slowly, but correctly
14:49 ejs joined #perl6
14:50 TimToady rakudo: say {b => 2, a => 1}.perl eq { a => 1, b => 2}.perl
14:50 p6eval rakudo d95def: OUTPUT«0␤»
14:50 moritz_ ok, that means that some of the tests are simply wrong
14:50 moritz_ for example [] !eqv []
14:50 TimToady those should be eqv
14:50 moritz_ aye
14:50 moritz_ but what about \@a eqv \@b
14:50 moritz_ doesn't the capture contain the variable names somehow?
14:54 TimToady yes, I'd think so, since the identity is part of the "value" there
14:54 TimToady or we could never bind rw
14:54 moritz_ so \@a !eqv \@b for all @a, @b
14:55 moritz_ ok, I'll fix the tests
14:55 TimToady unless @a === @b
14:55 KyleHa joined #perl6
14:55 * ruoso from one meeting to another, then to a work lunch, then to another meeting...
14:55 * ruoso wonders if he's going to work today...
14:55 moritz_ ok
14:56 TimToady or @a =:= @b rather, maybe
14:56 * TimToady is still looking around for a brane
14:58 TimToady rakudo: my @a = 1,2,3; say (\@a).perl
14:58 p6eval rakudo d95def: OUTPUT«[1, 2, 3]␤»
14:58 TimToady that seems to lose the @a-ness however
14:58 TimToady which seems to be a bug
14:58 moritz_ aye
14:59 TimToady except maybe capture-of-one-item is getting us
14:59 TimToady rakudo: my @a = 1,2,3; say (\@a, \$_).perl
14:59 masak rakudo: my @a = 1,2,3; say [\] @a
14:59 p6eval rakudo d95def: OUTPUT«[[1, 2, 3], undef]␤»
14:59 p6eval rakudo d95def: OUTPUT«say requires an argument at line 2, near " [\\] @a"␤in Main (src/gen_setting.pm:2416)␤»
14:59 moritz_ so what would you think that (\($a, \@b)).perl should look like?
15:00 TimToady also possible that .perl is misspecked
15:00 moritz_ I mean it's hard to emit both the value and the variable name
15:00 moritz_ std: \$a
15:01 p6eval std 27306: OUTPUT«Potential difficulties:␤  Variable $a is not predeclared at /tmp/74IZ27ewfR line 1:␤------> [32m\$a[31m[0m␤ok 00:02 36m␤»
15:01 TimToady masak: you can't use reduce on a unary operator
15:01 TimToady on top of which, \ isn't a unary operator really
15:01 masak TimToady: yes, I realised.
15:02 masak would \<< work?
15:02 TimToady though I'm curious
15:02 TimToady std: my @a = 1,2,3; say [\] @a
15:02 p6eval std 27306: OUTPUT«##### PARSE FAILED #####␤Unable to parse array composer; couldn't find final ']' at /tmp/Txk4kpbUf0 line 1:␤------> [32mmy @a = 1,2,3; say [\[31m] @a[0m␤    expecting any of:␤   capterm␤  prefix or noun␤   standard stopper␤ terminator␤FAILED 00:03 40m␤»
15:02 TimToady that's...funny
15:03 KyleHa Yeah, I giggled.
15:03 TimToady masak: no, \ isn't an operator
15:03 TimToady well, maybe it is
15:04 TimToady ENOBRANEYET
15:04 masak it sure looks like one.
15:04 masak even = can be []-ed over...
15:04 obra_ it's always confusing when someone fails with that error code, as it triggers my nick hilighting
15:04 masak :)
15:04 masak obra_: bet it happens a lot.
15:05 TimToady no, it's just a <capterm>
15:06 * ruoso lunch
15:07 TimToady std: use STD; STD::Regex
15:07 p6eval std 27306: OUTPUT«ok 00:02 35m␤»
15:07 TimToady yay!!
15:08 TimToady std: use STD; STD::NoneSuch
15:08 p6eval std 27306: OUTPUT«Undeclared name:␤      STD::NoneSuch used at 1 ␤ok 00:02 35m␤»
15:08 mvuets Is 'std' some grammar parser or what?
15:08 moritz_ it's the standard grammar, yes
15:08 TimToady it's what is running when you say std: here
15:09 TimToady it's actually running a version that has been translated automatically to Perl 5
15:09 mvuets I mean what is behind that bot?
15:09 mvuets Maybe i'll find it useful to use locally (:
15:09 TimToady the actual program is probably "tryfile" in src/perl6 (pugs repo(
15:09 moritz_ http://svn.pugscode.org/pugs/src/perl6/STD.pm that's the grammar it uses
15:10 TimToady *)
15:10 moritz_ you need a perl 5.10 in /usr/local/bin/perl and then type 'make'
15:10 moritz_ (in src/perl6/ )
15:10 moritz_ and a few modules, like Moose
15:11 TimToady this weekend I hacked in the ability to pull in .pm symbol tables via .syml files, and the ability to emit .syml files when parsing .pm or .setting
15:11 mvuets Oh, ok. So it can be used to check just syntax, right?
15:11 TimToady and the CORE.syml is now automatically generated from CORE.setting, which is P6ish
15:11 moritz_ right
15:11 mvuets Thanks guys.
15:11 TimToady mvuets: so far, just syntax
15:12 TimToady that will change pretty soon, as soon as I finish making viv replace gimme5
15:13 TimToady alternately, you can consider that mildew is already executing the output of STD
15:13 moritz_ TimToady is on his crusade to implement Perl 6 single-handedly :-)
15:13 mvuets TimToady, wtf mildew?
15:14 mvuets moritz_, (:
15:14 TimToady mildew: say "hi mvuets!"
15:14 p6eval mildew: OUTPUT«hi mvuets!␤»
15:14 TimToady that's using STD and smop, I believe
15:14 moritz_ it does
15:15 mvuets Another implementation?
15:15 TimToady though I believe it's compiling directly from the match tree rather than the ast tree as viv is aiming for; could be wrong about that
15:17 TimToady depends on how you count implementations, which is a fuzzy concept
15:17 TimToady if we all agreed on an AST format, we could play mix and match with frontends and backends
15:18 masak rakudo: class Meter { has $.n; method new($n) { self.bless(*, n => $n) } }; multi postfix:<m>(Num $a) { Meter.new($a) }; multi postfix:<km>(Num $a) { Meter.new(1e3*$a) }; multi infix:<===>(Meter $a, Meter $b) { $a.n == $b.n }; say 1000m === 1km
15:18 p6eval rakudo d95def: OUTPUT«Null PMC access in find_method()␤in Main (/tmp/Jci8aFRkSS:2)␤»
15:18 masak oh well.
15:18 gfldex joined #perl6
15:19 masak rakudo: class Meter { has $.n; method new($n) { self.bless(*, n => $n) } }; multi postfix:<m>(Num $a) { Meter.new($a) }; multi postfix:<km>(Num $a) { Meter.new(1e3*$a) }; multi infix:<=-=>(Meter $a, Meter $b) { $a.n == $b.n }; say 1000m =-= 1km
15:19 p6eval rakudo d95def: OUTPUT«1␤»
15:19 masak \o/
15:19 mvuets Oh, too much unknown abbreviations for the moment. Forget that (:
15:20 masak mvuets: for what it's worth, I know the feeling.
15:20 masak one grows into it.
15:20 moritz_ AST = abstract syntax tree
15:20 masak the black magick of parsing kinda has its own language.
15:20 Matt-W parsing is fun
15:21 TimToady not parsing is even more fun
15:21 * Matt-W -> music-making -> home -> food -> thinking about Perl 6
15:21 moritz_ mvuets: you can also view the IRC logs online (see /topic), it explains some of the abbreviations as tooltips
15:21 mvuets moritz_, good idea.
15:22 TimToady std: [cmp] 1,2,3
15:22 p6eval std 27306: OUTPUT«##### PARSE FAILED #####␤Can't reduce a nonchaining operator because it's diffy and not chaining at /tmp/uSidnuwYkT line 1:␤------> [32m[cmp][31m 1,2,3[0m␤    expecting prefix_circumfix_meta_operator__S_290reduce␤FAILED 00:02 36m␤»
15:23 TimToady or this one
15:23 TimToady std: for map {$_+1}, 1,2,3, { .say }
15:23 p6eval std 27306: OUTPUT«##### PARSE FAILED #####␤Function 'map' needs parens to avoid gobbling block at /tmp/8pKKfhm8iB line 1:␤------> [32mfor map[31m {$_+1}, 1,2,3, { .say }[0m␤Missing block (apparently gobbled by 'map') at /tmp/8pKKfhm8iB line 2:␤------> [32m[31m;[0m␤    expecting any of:␤
15:23 p6eval ..parame…
15:23 lichtkind joined #perl6
15:24 TimToady you know, the place where p6eval truncates is either too short or too long
15:24 moritz_ TimToady: just add an option for a shorter error message
15:24 TimToady it should either do one message or two full messages, not one message and a little bit of a second
15:24 moritz_ TimToady: the ----> pointers are pretty useless on IRC anyway
15:25 TimToady they look fine in irssi
15:25 lichtkind TimToady: if | is no sigil so thenn all the other context forcer like ? ~ + are also no sigil
15:25 moritz_ since the \n isn't a real linebreak in irssi, it doesn't point anywhere (at least here)
15:26 TimToady std: for map {$_+1}, 1,2,3, {␤.say;␤}
15:26 masak TimToady: the [cmp] example just made me understand why we have 'diffy'.
15:26 p6eval std 27306: OUTPUT«##### PARSE FAILED #####␤Function 'map' needs parens to avoid gobbling block at /tmp/EFg9CFeKhg line 1:␤------> [32mfor map[31m {$_+1}, 1,2,3, {[0m␤Missing block (apparently gobbled by 'map') at /tmp/EFg9CFeKhg line 4:␤------> [32m[31m;[0m␤    expecting any of:␤
15:26 p6eval ..parameterized…
15:27 TimToady it really ought to translate "line 4" back to EOF at the last minute
15:27 TimToady lichtkind: correct
15:28 mvuets masak, does yarn work somehow already?
15:28 TimToady nobody ever considered those to be sigils
15:28 masak mvuets: well, it worked for making posts.
15:29 masak mvuets: might have bit-rotted since then.
15:29 lichtkind TimToady: thanks but what is their correct name ?
15:29 masak mvuets: mberends++ said he'd do a complete rewrite and start using it for blogging.
15:30 moritz_ lichtkind: they are prefix operators
15:30 TimToady lichtkind: depends on how specific you want to be: contextualizers or prefix operaotrs
15:30 * masak -> store -> home -> swimming -> home -> thinking about Perl 6
15:30 TimToady spell it moritz_'s way though :)
15:31 lichtkind TimToady: i ask because i want to categorize them properly in appendix B, looks like they should get a subkat: contextualizers under operators
15:31 mvuets I guess it is possible to leave a message for offline one via a bot: how? "tell <nick> blah"?
15:32 moritz_ phenny, tell mvuets like that
15:32 phenny moritz_: I'll pass that on when mvuets is around.
15:32 TimToady but don't bother with people who always backlog, like me :)
15:33 TimToady don't worry about that in advance; we'll tell you if you forget :)
15:33 moritz_ or me, a hilight is usually enough
15:33 TimToady moritz_: class A is export {...} is fine
15:33 TimToady as long as you don't have a type named "export"
15:34 moritz_ ok
15:34 mvuets I wanted to tell masak something, but he has loged off. I think hilight will not help here.
15:34 phenny mvuets: 15:32Z <moritz_> tell mvuets like that
15:34 moritz_ mvuets: right, use the bot then
15:34 mvuets TimToady, sorry, what "backlog" means? My dictionary does not contain it (=
15:35 TimToady reading back through everything that was said overnight
15:35 TimToady or while one was gone
15:35 TimToady I currently have http://irclog.perlgeek.de/perl6/today up in another window to see what happened while I was asleep
15:36 TimToady my response to moritz_ on "class is export" tells you where I've gotten to in my backlogging :)
15:36 moritz_ TimToady: ... and that you didn't get far enough to notice that it wasn't my question, originally :-)
15:36 mvuets Ah, well (:
15:36 TimToady Matt-W: see ^^^
15:37 TimToady moritz_: sorry :)
15:37 moritz_ no problem
15:37 TimToady but I can tell you the class names don't export by default
15:38 TimToady I think only multis do that currently
15:38 mvuets Are all these bots somewhere mentioned on the web?
15:38 moritz_ I don't think so
15:38 TimToady and possibly methods, but maybe we should rename method...is export to somethign else
15:39 moritz_ feel free to summarise it an tell the URL, though :-)
15:39 moritz_ TimToady: is it really a good idea to export multis by default?
15:39 mvuets moritz_, OK (:
15:39 moritz_ I mean a verb can mean two totally different things in different contexts
15:40 TimToady their purpose in life is generally to show up in lots of places
15:40 TimToady most MMD systems make them global
15:40 moritz_ Perl 6 does not resemble most systems :-)
15:41 TimToady Perl 6 is about picking sane defaults, and I think this might be one of them :)
15:41 moritz_ so if you want two versions of one module, you have to explicitly tell it not to export its multis?
15:41 moritz_ I mean if you use two modules, A and B
15:41 moritz_ and A depends on C version 1
15:41 moritz_ and B depends on C version 2
15:42 moritz_ if C version 1 and 2 have similar multis defined, and the authors of A and B weren't that careful, you have a problem, no?
15:42 TimToady if you get a tied dispatch, you'll have to disambiguate
15:42 mvuets phenny, tell masak I'm thinking about a try to write my own blogging software in Perl 6. Thus want to learn Perl 6 practically and make it as my degree work.
15:42 phenny mvuets: I'll pass that on when masak is around.
15:42 TimToady in some cases this will even be determinable at compile time
15:44 TimToady (the fact that it will fail, we always know there's a tie, and could warn)
15:45 TimToady but I think biasing multis in the direction of too many rather than too few will minimize the FAQ count
15:46 TimToady unless we start emitting messages like "module X could have exported multi foo, and then your program would have blown up differently"
15:46 finanalyst left #perl6
15:47 pugs_svn r27307 | moritz++ | [perl6-projects.org] remove two blogs that are on the planetsix aggregator
15:47 KyleHa joined #perl6
15:48 jnthn TimToady: While I was away, did you get to thinking any more about where the roles for trait names go?
15:48 jnthn I'm going to start getting Rakudo using the combined trait_mod thing.
15:48 dalek grok: 5b7798e | (Hinrik Örn Sigurðsson)++ |  (2 files):
15:48 dalek grok: Update README
15:48 dalek grok: review: http://github.com/hinrik/grok/commit/5b​7798e1c968c962e5c835917434e50758a6a0ee
15:49 TimToady I think S14 is now closer to the truth
15:49 jnthn Yes, I noticed the updates there. They looked good, and are starting to sink into my branes.
15:50 jnthn But I didn't see an answer to the "where does the role rw { } that maps to "is rw" go?"
15:50 moritz_ in the setting?
15:50 TimToady it's still a little bit fuzzy how the new word gets installed in the outer syntax
15:51 TimToady some syntax needs exporting somewhere, probably
15:51 jnthn moritz_: The problem is more that we maybe don't want to pollute the namespace with things like rw
15:51 TimToady and importing a category:<symbol> needs to mod the current syntax that's doing the importing
15:51 moritz_ jnthn: aye. I'd also wish we didn't polute so much of Any...
15:52 TimToady Matt-W: the question seems odd to me; you can mixin to any object, and a method is an object, but the mixing in has nothing to do with the fact that it's a method, and everything to do with the fact that it's an object
15:53 moritz_ hm, maybe a different slang that contains trait names?
15:53 TimToady it's just the trait_mod category
15:53 TimToady a category is a kind of slang
15:53 silug joined #perl6
15:54 TimToady just one that is recognized in a particular syntactic slot
15:54 moritz_ I didn't fully understand slangs either, mind you :-)
15:55 TimToady anyway, installing trait_mod:<rw> in the user's grammar ought to be sufficient somehow; doesn't need a full-blown language braid
15:56 TimToady and rw will presumably already be installed by the CORE setting
15:56 moritz_ is there a good reason to keep the underscore in trait_mod and similar identifiers? a hyphen would be much nicer, IMHO
15:57 TimToady hyphens are more user-landy; underscores more impl-landy
15:57 moritz_ ok
15:57 jnthn TimToady: I'm confused. traid_mod:<is> is the one that handles "is rw", no?
15:58 TimToady and anything we can do to discourage people from using the wonderful features of Perl 6 is all to the good. :)
15:58 TimToady yes, I'm probably confused too :)
15:58 jnthn More coffee!
15:58 TimToady so it's trait_mod:<is> that is installed in CORE
15:59 jnthn Right, which is fine.
15:59 TimToady but the multis also have to be visible/exported
15:59 jnthn But is rw needs some "rw" thingy to dispatch on.
15:59 jnthn A role or a class.
15:59 particle-2978 joined #perl6
16:00 TimToady yeah, that's currently xxx in S14 :)
16:00 jnthn aww.
16:00 TimToady maybe it's just "rw" as a value match
16:01 jnthn That'll miss the MMD cache.
16:01 jnthn (e.g. not be fast)
16:01 TimToady traits are called primarily at declaration time
16:02 TimToady so it would mostly only slow down the compile
16:02 jnthn True, though we'd like our startup time not to suck.
16:02 jnthn Rakudo is going to need to apply them at startup for the foreseeable future, I suspect.
16:02 TimToady well, strings are immutable, so seems like we could optimize it somehow
16:03 jnthn True.
16:03 TimToady I am told by the Powers That Be that now would be the correct time to take my shower with respect to the laundry cycle :)
16:04 TimToady later &
16:04 obra_ Say hi to the Powers for me
16:04 TimToady said
16:05 obra_ :) Thanks. /me waves
16:05 rfordinal joined #perl6
16:15 cdarroch joined #perl6
16:18 mvuets What 'bootstrapped' means when one talks about perl compilers?
16:19 alester joined #perl6
16:20 moritz_ mvuets: that it can compile itself
16:20 mvuets Kinda Lisp is written in Lisp?
16:21 moritz_ right
16:23 cls_bsd_ joined #perl6
16:29 lichtkind TimToady: but @@ is a sigil?
16:33 rfordinal left #perl6
16:33 jnthn OK, so now my latest changes hide the GC issues as much as they were hidden when I pulled this morning. Epic heisenbug...
16:33 jnthn Well, push...
16:33 TimToady lichtkind: yes, possibly it's really the same as ¢, the capture sigil
16:33 TimToady but maybe not
16:34 TimToady since slices are only one level deep of sublists
16:34 TimToady but maybe unpacking a capture that was is just operational, and not contextual
16:34 TimToady s/was/way/
16:35 lichtkind TimToady: oh captures have sigils, i missed that
16:36 TimToady not specced yet, really, but likely
16:36 TimToady in which case a sig's \$cap becomes ¢cap
16:37 TimToady or ¢ap  :)  # "ap" == argument pointer
16:38 lichtkind TimToady: nah as long it isnt specced i ignore it :)
16:38 dalek joined #perl6
16:38 jnthn awww...my commits made dalek flood!
16:41 mvuets rakudo: my @a=1..10; for @a -> $odd, undef { say $odd }  # just recalled one my question: i expect this to be worked, why not?
16:41 p6eval rakudo d95def: OUTPUT«Statement not terminated properly at line 2, near "-> $odd, u"␤in Main (src/gen_setting.pm:3225)␤»
16:42 Psyche^ joined #perl6
16:42 DemoFreak joined #perl6
16:43 TimToady rakudo: my @a = 1..10; for @a -> $odd, Object { say $odd }
16:43 p6eval rakudo d95def: OUTPUT«1␤3␤5␤7␤9␤»
16:43 TimToady there's no such thing as undef in Perl 6, actually
16:43 moritz_ mvuets: 2 ~~ undef is not true
16:44 jnthn rakudo: my @a = 1..10; for @a -> $odd, * { say $odd }
16:44 p6eval rakudo d95def: OUTPUT«Statement not terminated properly at line 2, near "-> $odd, *"␤in Main (src/gen_setting.pm:3225)␤»
16:44 moritz_ if you want to ignore a scalar, use a $ instead
16:44 jnthn ooops
16:44 jnthn rakudo: my @a = 1..10; for @a -> $odd, $ { say $odd }
16:44 moritz_ rakudo: my @a = 1..10; for @a -> $odd, $ { say $odd }
16:44 jnthn is what I meant :)
16:44 TimToady you can't use * in a sig like that
16:44 p6eval rakudo d95def: OUTPUT«1␤3␤5␤7␤9␤»
16:44 p6eval rakudo d95def: OUTPUT«1␤3␤5␤7␤9␤»
16:44 jnthn TimToady: Aye. I'm rusty from vacation. :-)
16:44 TimToady you can assign though, in theory
16:44 mvuets TimToady, but it is. Temporary?
16:45 TimToady rakudo: my $a; ($a,*,$a) = 1..3
16:45 p6eval rakudo d95def:  ( no output )
16:45 TimToady std: my $a; ($a,*,$a) = 1..3
16:45 p6eval std 27307: OUTPUT«ok 00:02 38m␤»
16:45 jnthn TimToady: I see trait is either a trait_mod or a colonpair
16:45 mvuets rakudo: my $a; (undef, $a) = (1, 2); say $a
16:45 p6eval rakudo d95def: OUTPUT«sh: ./perl6: No such file or directory␤»
16:45 jnthn What is the colonpair version for?
16:46 jnthn And how does it map to a dispatch?
16:46 TimToady std: sub foo ($a,$b,$c) :rw {...}
16:46 p6eval std 27307: OUTPUT«ok 00:02 37m␤»
16:46 TimToady same as "is rw"
16:46 jnthn OK, so it's like an is
16:46 TimToady actually, is is like a :
16:47 jnthn ?
16:47 TimToady I think of the "is" as the syntactic sugar for :
16:47 TimToady but it's okay to think of it the other way around too
16:47 jnthn OK, but it will call trait_mod:<is>($thingy, rw) no?
16:48 TimToady yes
16:48 mvuets rakudo: my $a; (undef, $a) = (1, 2); say $a # once again
16:48 p6eval rakudo d95def: OUTPUT«sh: ./perl6: No such file or directory␤»
16:48 jnthn OK, good.
16:48 TimToady rakudo: my $a; (*, $a) = 1,2; say $a # should work
16:48 p6eval rakudo d95def: OUTPUT«2␤»
16:48 TimToady does work
16:49 TimToady but use $ or Object or Any in a signature
16:49 mvuets As i understand, undef in Rakudo is just a cheat.
16:49 TimToady std: my $a; ($, $a) = 1,2; say $a # should work
16:49 jnthn TimToady: How strongly do you think the "we pass the name of the trait" is an option?
16:49 p6eval std 27307: OUTPUT«##### PARSE FAILED #####␤Obsolete use of $, variable; in Perl 6 please use .join() method instead at /tmp/tCcBbjLxnc line 1:␤------> [32mmy $a; ($,[31m $a) = 1,2; say $a # should work[0m␤FAILED 00:02 36m␤»
16:50 TimToady std: my ($, $a) = 1,2; say $a # should work
16:50 p6eval std 27307: OUTPUT«ok 00:03 39m␤»
16:51 jnthn It does present a bit of a problem in the case of say
16:51 mvuets I see. Thanks.
16:51 jnthn my class Foo { }; my class Bar is Foo { }; # can't really pass "Foo" here, at least not unless we want to be doing funky lookup stuff.
16:52 TimToady the compiler knows Foo is a class, so could call differently
16:52 jnthn "If it's a typename look it up and pass it; if not, pass the string"?
16:52 TimToady if it's a typename; you've already looked it up :)
16:53 jnthn ;-)
16:53 DanielC_ joined #perl6
16:53 TimToady actually, might just pass a Pair for the other
16:53 TimToady so rw ends up the key
16:53 TimToady just as with :rw
16:53 TimToady or :!rw
16:53 TimToady std: sub foo ($x) is !foo {...}
16:54 p6eval std 27307: OUTPUT«##### PARSE FAILED #####␤Malformed block at /tmp/oUA55qkgGp line 1:␤------> [32msub foo ($x) is [31m!foo {...}[0m␤    expecting name␤FAILED 00:02 37m␤»
16:54 TimToady hmm
16:54 TimToady std: sub foo ($x) :!foo {...}
16:54 p6eval std 27307: OUTPUT«ok 00:02 37m␤»
16:54 TimToady thought that worked, oh well
16:55 TimToady std: sub foo ($x) is foo<this part is parsed as adverbial> {...}
16:55 p6eval std 27307: OUTPUT«ok 00:03 37m␤»
16:56 TimToady must require \w there at foo, I guess
16:56 TimToady std: sub foo ($x) :$foo {...}
16:56 p6eval std 27307: OUTPUT«ok 00:02 37m␤»
16:56 TimToady (would require $foo to have compile-time value)
16:57 TimToady but same as
16:57 TimToady std: sub foo ($x) is foo($foo) {...}
16:57 p6eval std 27307: OUTPUT«Potential difficulties:␤  Variable $foo is not predeclared at /tmp/zvCTBFzG0I line 1:␤------> [32msub foo ($x) is foo($foo[31m) {...}[0m␤ok 00:02 38m␤»
16:57 payload joined #perl6
16:57 TimToady ooh, :$foo doesn't check to see if $foo exists # BUG
16:58 jnthn aye
16:58 TimToady std: sub foo ($x) is foo($x) {...}  # nonsensical
16:58 p6eval std 27307: OUTPUT«ok 00:02 38m␤»
16:59 TimToady std: sub foo ($x) is foo(foo($x)) {...}  # also nonsensical
16:59 p6eval std 27307: OUTPUT«ok 00:02 38m␤»
16:59 TimToady but syntactically legal
16:59 TimToady std: sub foo ($x) :foo(foo($x)) {...}  # same thing
17:00 p6eval std 27307: OUTPUT«ok 00:02 38m␤»
17:00 KyleHa rakudo: sub a { state $x //= 3; $x++; say $x }; a(); a()
17:00 p6eval rakudo 1831bd: OUTPUT«4␤4␤»
17:00 TimToady so I think we can get rid of the optional $arg? in trait_mods
17:00 TimToady it's just the value of the pair
17:00 jnthn And then you write a kind of
17:01 jnthn multi trait_mod:<is>($declarand, Pair $p where { .key eq 'rw' }) { ... }
17:01 TimToady wonder if we could force it to be a named arg...
17:01 jnthn Remember that named args do not participate in multiple dispatch.
17:02 TimToady I know we don't mmd on that
17:02 TimToady but it's still a constraint on matching
17:02 jnthn Rakudo's MMD completely ignores named parameters at the moment.
17:02 TimToady you have to bind and succeed
17:02 jnthn I thought that's what was meant by them not participating in the dispatch.
17:02 jnthn OK, but that's an "after MMD gave us the candidate to call" thing, no?
17:03 justatheory joined #perl6
17:03 TimToady it would be relatively easy to weed out the candidates that can't possibly match at compile time
17:04 TimToady (for a given call, not for the &foo candidate list)
17:04 jnthn As an optimization, I guess, yes.
17:04 TimToady when we say "doesn't participate in mmd" we really mean doesn't contribute to the sort order
17:05 jnthn I'd always taken it as the multi-dispatcher didn't care about named parameters.
17:05 TimToady but sooner or later you have to match the capture to the sig
17:05 TimToady the multi-dispatch has to care about failed bindings
17:05 icwiener_ joined #perl6
17:05 TimToady otherwise where doesn't work either
17:06 jnthn Sure, but as I have it now the binding will fail because the multi-dispatcher says "invoke this one" and on the invocation of what the multi-dispatcher chose, we bind.
17:06 TimToady and then the dispatcher keeps trying
17:06 jnthn I'd also been treating only where's on positionals as significant to the multi-dispatcher.
17:07 jnthn So, hmm.
17:07 jnthn I don't know how far changing this will hurt our caching of multis.
17:08 jnthn It may just make the caching criteria (even) more complex.
17:08 jnthn Anyway, that represents a fairly notable change to how I'd understood named parameters participating in the multiple dispatch.
17:11 jnthn (S12 is very easily readable as I have construed it up until now: Perl 6.0.0 is not required to support multiple dispatch on named parameters, only on positional parameters.)
17:12 TimToady how do you handle ties with exclusive where clauses now?
17:12 moritz_ (though I've wished to lift that restriction a few times already)
17:12 TimToady Any $x where { 1} vs Any $x where {2}
17:13 TimToady this is just another where that happens to require the rest of the sig to bind successfully, in a sense
17:13 jnthn The dispatcher just takes the value and runs the where block.
17:14 TimToady you have a set of tied candidates, and you have to run their constraints to see if you only get 1
17:14 moritz_ TimToady: so you mean it should be able to act as tie-breaker?
17:14 jnthn where does act as a tie-breaker today.
17:14 TimToady yes, as long as only one sig matches correctly, we can do it that way
17:15 jnthn rakudo: multi m($a where 1) { say 1 }; multi m($a where 2) { say 2 }; m(1); m(2);
17:15 p6eval rakudo 1831bd: OUTPUT«1␤2␤»
17:15 TimToady rakudo: multi m(1) { say 1 }; multi m(2) { say 2 }; m(1); m(2);
17:15 p6eval rakudo 1831bd: OUTPUT«Malformed routine definition at line 2, near "m(1) { say"␤in Main (src/gen_setting.pm:3257)␤»
17:15 jnthn Rakudo doesn't support that sugar yet.
17:15 TimToady std: multi m(1) { say 1 }; multi m(2) { say 2 }; m(1); m(2);
17:16 TimToady just checking
17:16 p6eval std 27307: OUTPUT«ok 00:03 38m␤»
17:16 jnthn rakudo: multi m($a, :x) { }; multi m($a, :y) { }; m($a, :x<1>);
17:17 p6eval rakudo 1831bd: OUTPUT«Unable to parse multisig; couldn't find final ')' at line 2, near ":x) { }; m"␤in Main (src/gen_setting.pm:3257)␤»
17:17 TimToady the trick would be to see if the candidate *would* bind without actually calling it
17:17 jnthn huh?
17:17 TimToady need a variable?
17:17 jnthn std: multi m($a, :x) { }; multi m($a, :y) { }; m($a, :x<1>);
17:17 p6eval std 27307: OUTPUT«##### PARSE FAILED #####␤Unable to parse multisig; couldn't find final ')' at /tmp/AqudHIp3Py line 1:␤------> [32mmulti m($a, [31m:x) { }; multi m($a, :y) { }; m($a, :x<1[0m␤    expecting signature␤FAILED 00:02 37m␤»
17:18 TimToady a formal param
17:18 jnthn oh!
17:18 TimToady std: multi m($a, :x($)) { }; multi m($a, :y($)) { }; m($a, :x<1>);
17:18 jnthn rakudo: multi m($a, :$x) { }; multi m($a, :$y) { }; m(1, :x<1>);
17:19 p6eval std 27307: OUTPUT«Potential difficulties:␤  Variable $a is not predeclared at /tmp/Oeic4cNKak line 1:␤------> [32m:x($)) { }; multi m($a, :y($)) { }; m($a[31m, :x<1>);[0m␤ok 00:03 40m␤»
17:19 p6eval rakudo 1831bd: OUTPUT«Ambiguous dispatch to multi 'm'. Ambiguous candidates had signatures:␤:(Any $a, Any $x?)␤:(Any $a, Any $y?)␤in Main (/tmp/FesaQR0N9C:2)␤»
17:19 TimToady std: multi m($a, :x($)) { }; multi m($a, :y($)) { }; m(42, :x<1>);
17:19 jnthn So in this case, should the multi-dispatcher have cared about the named parameters and managed to dis-ambiguate based upon them?
17:19 p6eval std 27307: OUTPUT«ok 00:03 39m␤»
17:20 jnthn (In 6.0.0, that is.)
17:20 jnthn If so, then we should be able to use a named param in the traits handling.
17:21 jnthn But then, what happens to
17:21 jnthn class Foo is Bar { }
17:21 jnthn Bar can't become a named parameter in this case, surely?
17:21 jnthn As in, the key of the pair that becomes the named parameter...
17:21 TimToady that's more like Foo.add_isa(Bar)
17:21 jnthn Erm
17:22 TimToady as I said, we can distinguish Foo as a type at compile time
17:22 jnthn That's what trait_mod:<is>(...whatever here...) would call in its body though
17:22 jnthn Ah, so we would just not construct a pair at all in this case?
17:22 TimToady is Foo doesn't have to call trait_mod:<is> necessarily
17:23 TimToady Moose actually distinguishes is from isa
17:23 TimToady we're just overloading based on the fact that all types are predeclared
17:23 jnthn It probably will need to call trait_mod:<is> unless the optimizer can decide not do though.
17:23 TimToady the moment the parser looks up Foo it knows
17:24 jnthn Because we don't know nobody introduced a trait_mod:<is>($cont, Foo $x) { } that is more specific.
17:24 TimToady it could turn it into a completely different AST node
17:24 TimToady it might also be workable thorugh trait_mod:<is>, not saying we have to hardwire it
17:24 jnthn OK, but basically...
17:25 TimToady but a type could come in as itself, and not pair, yes
17:25 jnthn class Foo is Bar { } # trait_mod:<is>($foo_metaclass, Bar)
17:25 jnthn class Foo is rw { } # trait_mod:<is>($foo_metaclass, :rw)
17:26 jnthn Where Bar is a pre-declared type, and rw is not.
17:26 TimToady or could require the sig to say Pair where {.key eq 'rw'}, but then we'd have trouble switching to named later
17:26 jnthn Aye.
17:27 jnthn It'd be a slight pain to re-work the multi-dispatcher, but there's already some changes needed at some level anyway.
17:27 TimToady and I'd rather have the nameds show up at least as a kind of run-time constraint, since STD uses that already :)
17:27 jnthn I think I can make it fly without blowing away the ability to keep on caching simple fully-positional calls.
17:28 jnthn like infix:<+>($a, $b)
17:28 jnthn Which need to stay fast.
17:28 TimToady as I said, the only trick will be to determine that it binds without calling, unless we relax the tie-breaking semantics to first match rather than only match
17:29 jnthn Well, my caching condition has been "can we make a purely nominal type-based decision"
17:29 jnthn That is, not dependent on where clauses which need a runtime check.
17:29 TimToady this is all in the subsequent tiebreaking for now
17:29 jnthn So another question related to this
17:30 TimToady but I've always thought the candidate list was somehow weeded down to only those sigs that *could* match
17:30 jnthn multi m(Int $x where 1) { }; multi m($x) { }; m(2); # what gets called
17:30 jnthn In rakudo now
17:30 jnthn rakudo: multi m(Int $x where 1) { }; multi m($x) { }; m(2);
17:30 p6eval rakudo 1831bd: OUTPUT«No applicable candidates found to dispatch to for 'm'␤in Main (/tmp/aRMVWtzF7m:2)␤»
17:30 jnthn Because we say "ah, we have a candidate"
17:31 TimToady the presence of a constraint is narrower than the absence
17:31 jnthn And then use the where's to tie-break.
17:31 TimToady yeah
17:31 jnthn OK, but the issue here is that we took a candidate based on the nominal type match.
17:31 jnthn And then went to apply the where check afterwards to narrow down what the type based search found us.
17:31 jnthn And then our one narrowest candidate has been eliminated.
17:32 TimToady Type+constrained is nominal to my way of thinking
17:32 jnthn Did you see it more as, we'd match there where's "in line"?
17:32 TimToady but not the particular constraint
17:32 TimToady only the fact that it is constrained
17:32 jnthn s/there/the/
17:32 TimToady so constrained can never tie with unconstrained
17:32 jnthn And if the where's left us with nothing, continue looking for wider candidates that could match, and in this case pick the second one?
17:33 jnthn Oh, that doesn't happen now.
17:33 TimToady and if the set of tied candidates is all constrained, we can tiebreak on success somehow
17:33 jnthn Note
17:33 jnthn rakudo: multi m(Int $x where 1) { }; multi m(Int $x) { }; m(2);
17:33 p6eval rakudo 1831bd:  ( no output )
17:33 jnthn That isn't ambiguous.
17:33 TimToady yes, if none of the constraints match, fallback to unconstrained candidate
17:33 jnthn OK, even if it's less narrow.
17:34 jnthn OK.
17:34 jnthn That will want a little re-working too then.
17:34 TimToady so basically named params are a constraint on ¢remainder
17:34 jnthn I had pondered implementing this using continuations.
17:35 jnthn That is, we invoke the thing, it binds, and then returns with a continuation, and then we invoke the continuation on the winner.
17:35 TimToady ¢rest where { "rw" ~~ %¢rest } or some such
17:35 jnthn Thus how we can manage the binding without running the body of the thing.
17:35 TimToady but I'm inclined to think that we can assume a call ordering and just let the first
17:36 TimToady one succeed that succeeds
17:36 TimToady er...
17:36 TimToady so forget what I said about ¢rest
17:37 TimToady there can be other constraints there too that prevent binding
17:37 jnthn good, because I didn't really follow it anyway :-)
17:37 mxxm joined #perl6
17:37 jnthn So anyway, to conclude:
17:37 TimToady but if we have constrained ties, we call them in some order, and just assume (for now) that there's only one likely candidate
17:37 TimToady we can maybe sort the order somehow if we think of something rational
17:37 pugs_svn r27308 | kyle++ | [t/spec] Test for RT #67058
17:38 mxxm left #perl6
17:38 jnthn multi m(Int $x where 1) { }; multi m($x) { }; m(2); # should not be ambiguous because we call back to the wider, but unconstrained andidate
17:38 jnthn *candidate
17:38 TimToady correct
17:38 jnthn And
17:39 jnthn multi m($a, :$x) { }; multi m($a, :$y) { }; m(1) # is ambiguous
17:39 jnthn multi m($a, :$x) { }; multi m($a, :$y) { }; m(1, :x) # is not, calls the first
17:39 jnthn multi m($a, :$x) { }; multi m($a, :$y) { }; m(1, :y) # is not, calls the second
17:39 TimToady correct
17:39 jnthn multi m($a, Int :$x) { }; multi m($a, Str :$x) { }; m(1, :x(1)) # ambiguous
17:39 jnthn or not?
17:40 jnthn oh, bad example
17:40 jnthn multi m($a, Int :$x) { }; multi m($a, Num :$x) { }; m(1, :x(1)) # ambiguous
17:40 jnthn That's the one I meant to type.
17:40 TimToady if we assume the wrong binding fails, it's okay
17:40 TimToady but it's not nominal
17:40 jnthn Right, but in that latest one I wrote, binding wins for both of them.
17:40 TimToady right, so maybe it's time to just say it tries them in textual order :)
17:40 jnthn But named parameters don't participate in the sort order, so that last one would be ambiguous.
17:41 jnthn Let's not! :-P
17:41 jnthn Well, it's not about the order we try them anyway, when they are tied candidates.
17:41 jnthn It's that we can get ourselves down to only one that binds.
17:42 TimToady but I think I'd rather just assume that, rather than having to test them all
17:42 TimToady (for now, anyway)
17:42 TimToady and order of declaration is certainly what a Haskell programmer would expect :)
17:42 jnthn I really don't like that idea.
17:42 TimToady why not?
17:42 jnthn If your multis are coming from various modules, for example.
17:42 TimToady (just for tiebreaking order)
17:43 jnthn I'd rather ambiguity is flagged up.
17:43 TimToady you define "use" to come either before or after
17:43 jnthn And what about the things that you use then use?
17:43 TimToady tiebreakers are inherently ambiguous and "switchy"
17:43 TimToady I have a similar rule for LTM ties already
17:44 jnthn OK but IIUC what you're saying is:
17:44 jnthn multi foo(Int $x) { }; multi foo(Int $x) { }; foo(1)
17:44 jnthn That would not be ambiguous any more.
17:44 TimToady I think the abiguity hoisting is only useful for the nominal case
17:44 jnthn We'd just call the first one.
17:44 pugs_svn r27309 | kyle++ | [t/spec] Test for RT #67040
17:45 jnthn Oh, you mean what you're saying only applies to where clauses and named parameters being bindable?
17:45 TimToady no, that's ambiguous without constraints
17:45 TimToady since purely nominal, can be flagged as error
17:45 jnthn And we complain about ambiguity in examples where there is one detectable from the "nominal type"?
17:45 jnthn OK.
17:45 jnthn That bothers me a whole lot less than what I thought you were first meaning.
17:46 jnthn OK, so looks like Rakudo's multi-dispatcher needs some attention.
17:46 KyleHa Is it legal to say 'sub foo { state $x //= 42; ... }' to mean the same thing as 'sub foo { state $x = 42; ... }'  ?
17:46 TimToady this feels like the right way forward, especially if we consider values as params to be constraints
17:46 jnthn Why would you? But it should probably work the same.
17:47 jnthn TimToady: Yes.
17:47 jnthn TimToady: Did you settle on what
17:47 TimToady that is, subsets are a base nominal type plus constraint
17:47 jnthn multi foo(1) { }; multi foo(2) { }; mean?
17:47 jnthn Are they equivalent to
17:47 TimToady sub foo (Odd) is really Int where Odd
17:47 KyleHa jnthn: It doesn't work the same, so it needs to be either fixed or declared illegal.
17:48 jnthn multi foo(Int $x where 1) { }; multi foo(Int $x where 2) { };
17:48 jnthn or
17:48 jnthn multi foo(Any $x where 1) { }; multi foo(Any $x where 2) { };
17:48 jnthn (sub foo (Odd) is really Int where Odd) - yes, completely agree, that's exactly what we do in Rakudo.
17:48 jnthn KyleHa: It doesn't, but that's a Rakudo bug.
17:48 TimToady I think anyone would think 1 is Int
17:48 KyleHa jnthn: OK, thanks.
17:49 jnthn KyleHa: Almost certain that one has come up before and is ticketed. Just needs a fix. :-)
17:49 jnthn TimToady: So we do .WHAT on the value and use what it hands back and the nominal type?
17:49 TimToady oh crap, I forgot to go to work
17:49 jnthn ...oops.
17:49 TimToady have a meeting in 10 minutes, and takes 30 to hike there...
17:50 TimToady commuting & # later
17:50 KyleHa Yes, I just wrote tests for the ticket, and another bug I found in the process, and I wanted to make sure I didn't put it in the spec when it's just some fanciful blah blah blah.
17:50 ruoso joined #perl6
17:50 jnthn It's certainly a rakudobug.
17:51 KyleHa How are the contents of t/spectest.data decided?
17:51 jnthn What will Rakudo pass all or some of.
17:52 jnthn e.g., no use running tests for features we don't implement at all yet.
17:52 ruoso http://daniel.ruoso.com/ca​tegoria/perl/perl6-fisl10 - the slides for the talk I gave saturday at FISL
17:52 KyleHa jnthn: So a file that's all TODO is not there.
17:54 jnthn Right.
17:54 KyleHa Thanks.
17:55 payload nice slides, ruoso++
17:57 jnthn ruoso: Nice slides! :-)
17:59 ruoso the audience was much more receptive than I expected
17:59 ruoso I saw mostly a "wow" face
17:59 dkz joined #perl6
18:04 Molaf joined #perl6
18:05 mizioumt joined #perl6
18:07 dkz left #perl6
18:16 lichtkind joined #perl6
18:21 mvuets ruoso, very interesting slides.
18:44 FCO ruoso, that was a very good talk!
18:44 ruoso thanks all!
18:54 japhb joined #perl6
18:56 KyleHa rakudo:  say [+] 1, 2, 3, 4, 5;
18:56 p6eval rakudo 1831bd: OUTPUT«15␤»
18:58 payload rakudo: my $a = 0 but True; say ?$a
18:58 p6eval rakudo 1831bd: OUTPUT«The but operator can only be used with a role or enum value on the right hand side␤in Main (/tmp/qMexwJCIu9:2)␤»
18:58 payload :(
18:58 TimToady rakudo: say [+] 1,2...{$_ + 1 if $_ < 5}
18:58 p6eval rakudo 1831bd: OUTPUT«15␤»
19:00 payload oh cool. i need to pull a new rakudo version for this feature ^^
19:02 amoc now looking forward to be implemented laziness yay yay
19:03 payload :-/ github refuses connection, wtf
19:03 amoc => looking forward to implementing the laziness yay yay
19:03 ruoso rakudo: my @a = 1,1 ... { $^a + $^b if $^a < 30 }; say @a[16];
19:03 p6eval rakudo 1831bd: OUTPUT«Use of uninitialized value␤␤»
19:04 ruoso what's wrong?
19:04 TimToady didn't generate enough values
19:04 TimToady try < 300000
19:04 ruoso ah...
19:04 ruoso right...
19:04 ruoso rakudo: my @a = 1,1 ... { $^a + $^b if $^a < 3000000 }; say @a[16];
19:04 p6eval rakudo 1831bd: OUTPUT«1597␤»
19:04 payload :D
19:05 TimToady I guess you only needed < 3000 :P
19:05 KyleHa I guess you CAN overestimate the fertility of rabbits.
19:07 TimToady rabbits is more like 2...{ $^n * 2 if $^n < 300000000000 }
19:09 TimToady rakudo: say 1...{$_+1 if $_ < 10}...{$_+10 if $_ < 100}...{$_+100 if $_ < 1000}
19:09 p6eval rakudo 1831bd: OUTPUT«No applicable candidates found to dispatch to for 'infix:...'␤in Main (/tmp/s08nx0TvDo:2)␤»
19:10 amoc std: 1...2...3...4 ;
19:10 p6eval std 27309: OUTPUT«ok 00:02 36m␤»
19:10 TimToady rakudo: say ((1...{$_+1 if $_ < 10})...{$_+10 if $_ < 100})...{$_+100 if $_ < 1000}
19:10 p6eval rakudo 1831bd: OUTPUT«No applicable candidates found to dispatch to for 'infix:...'␤in Main (/tmp/sIFlfPBP23:2)␤»
19:10 amoc oh,
19:11 TimToady so a sig problem, not (just) an associativity problem
19:11 KyleHa ...got a theory about bunnies...
19:11 amoc rakudo: say(  ( ((1...{$_+1 if $_ < 10})...{$_+10 if $_ < 100}) ) ...{$_+100 if $_ < 1000}   );
19:11 p6eval rakudo 1831bd: OUTPUT«No applicable candidates found to dispatch to for 'infix:...'␤in Main (/tmp/MaW3d7w0z7:2)␤»
19:12 TimToady rakudo: say WHAT( 1,2...{$_ + 1 if $_ < 5} )
19:12 p6eval rakudo 1831bd: OUTPUT«Array()␤»
19:13 TimToady should probably be List or some such
19:13 ruoso sometimes rakudo does something like that... I never could actually isolate a simple example explaining how it happens
19:15 dil joined #perl6
19:15 dil left #perl6
19:15 amoc rakudo: sub foo () { return 1, 2, 3, 4 }; say WHAT( foo() );
19:15 p6eval rakudo 1831bd: OUTPUT«too many arguments passed (4) - at most 1 params expected␤in sub foo (/tmp/VHyY7gccjr:2)␤called from Main (/tmp/VHyY7gccjr:2)␤»
19:16 TimToady agh
19:16 TimToady foo() should not flatten its return capture
19:16 amoc rakudo: sub foo () { return 1, 2, 3, 4 }; ( foo() ).WHAT.say
19:16 p6eval rakudo 1831bd: OUTPUT«too many arguments passed (4) - at most 1 params expected␤in sub foo (/tmp/X78NPDtULU:2)␤called from Main (/tmp/X78NPDtULU:2)␤»
19:16 amoc I see
19:16 dil joined #perl6
19:16 TimToady foo() should not assume |foo()
19:18 TimToady rakudo: sub foo () { my @a = 1,2,3,4; return @a }; foo().WHAT.say
19:18 p6eval rakudo 1831bd: OUTPUT«Array()␤»
19:20 amoc mm..
19:22 amoc rakudo: sub foo () { return (1, 2, 3, 4) }; foo().WHAT.say; ({1,2,3}).WHAT.say
19:22 p6eval rakudo 1831bd: OUTPUT«List()␤List()␤»
19:23 ruoso TimToady, the problem is that return in rakudo is still not as-spec
19:23 ruoso it doesn't yet use a control exception iirc
19:23 jnthn It's exception based.
19:24 jnthn It's just that the throw was, last time I checked, dynamic rather than lexical.
19:24 ruoso ah.. the problem is with the implicit CONTROL block... yes... now I remember
19:25 jnthn But there is a separate "rakudo doesn't really do multiple return values properly yet".
19:25 amoc rakudo: say(  list(list(list(1...{$_+1 if $_ < 10})...{$_+10 if $_ < 100})) ...{$_+100 if $_ < 1000}  ); #may i test once more
19:25 p6eval rakudo 1831bd: OUTPUT«No applicable candidates found to dispatch to for 'infix:...'␤in Main (/tmp/dObt7InkgL:2)␤»
19:26 jevin joined #perl6
19:28 amoc rakudo: my @a=1,2,3; say @a ... { $_+1 if $_<10 }
19:28 p6eval rakudo 1831bd: OUTPUT«12345678910␤»
19:28 ruoso hmm... it seems that the alternative title of my talk has just generated a twitter meme...
19:39 lumi_ joined #perl6
19:40 ejs joined #perl6
19:46 nbrown_ joined #perl6
19:49 justatheory joined #perl6
19:55 khisanth__ joined #perl6
20:03 jferrero joined #perl6
20:07 mizioumt1 joined #perl6
20:12 payload something is wrong with the printed tests in http://feather.perl6.nl/syn/
20:13 payload http://feather.perl6.nl/~azawawi/html/sp​ec/S02-one-pass-parsing/less-than.t.html
20:16 xinming joined #perl6
20:22 moritz_ phenny, tell azawawi 22:12 < payload> something is wrong with the printed tests in http://feather.perl6.nl/syn/ http://feather.perl6.nl/~azawawi/html/sp​ec/S02-one-pass-parsing/less-than.t.html
20:22 phenny moritz_: I'll pass that on when azawawi is around.
20:23 moritz_ szabgab: any tuits look at the missin line numbers from http://perlcabal.org/syn/*.html?
20:24 mvuets left #perl6
20:39 ruoso rakudo: say [~] [<a b c>] xx 3
20:39 p6eval rakudo 1831bd: OUTPUT«a b ca b ca b c␤»
20:39 ruoso rakudo: say [X] [<a b c>] xx 3
20:39 p6eval rakudo 1831bd: OUTPUT«Statement not terminated properly at line 2, near "[<a b c>] "␤in Main (src/gen_setting.pm:3257)␤»
20:39 ruoso std: say [X] [<a b c>] xx 3
20:40 p6eval std 27309: OUTPUT«ok 00:03 38m␤»
20:40 ruoso is that a known bug?
20:41 jnthn More nyi than bug I think (lack of support for nested meta-ops)
20:41 TimToady X isn't a meta-op
20:42 jnthn Eh, true.
20:42 jnthn In that case I guess we could add it to our generation list perhaps.
20:42 ruoso should I rakudobug it?
20:42 jnthn If you're wanting to use it, feel free.
20:44 masak joined #perl6
20:44 jnthn (If not, it'll just start working when the way Rakudo parses and does meta-ops is brought inline with std)
20:44 masak ahoyvning!
20:44 phenny masak: 15:42Z <mvuets> tell masak I'm thinking about a try to write my own blogging software in Perl 6. Thus want to learn Perl 6 practically and make it as my degree work.
20:44 masak mvuets++
20:46 ruoso p6eval, come back!
20:46 moritz_ rakudo: say 1
20:46 p6eval rakudo 1831bd: OUTPUT«sh: ./perl6: No such file or directory␤»
20:51 KyleHa Testing rand() for randomness kinda stinks.
20:51 ruoso is there a twigil for declaring state variables?
20:52 jrtayloriv joined #perl6
20:53 jnthn no, use the state scope declarator.
20:53 PerlJam ruoso: nope
20:53 pmurias joined #perl6
20:54 pmurias TimToady: mildew is using old viv AST
20:57 payload masak: i currently play with Tags. is there a nice way to say something like following? http://pastebin.com/d378febc7
20:58 masak payload: not that I know of. though it might be that can be added.
20:58 justatheory joined #perl6
20:58 masak payload: you should grovel before Tene++, the chief maintainer of Tags.
20:58 masak I only patch it when it contains horrible bugs. :)
21:03 Tene What's going on?
21:04 payload Tene: http://pastebin.com/d378febc7
21:04 Tene payload: b 'say'; outs 'Hello world!';
21:04 payload ah ^^
21:04 masak Tene++
21:04 pmichaud hello, #perl6
21:04 Tene hi pm
21:05 payload thx, now my blog will be ready in 2 days or so ^^
21:05 * ruoso later &
21:06 Tene payload: ping me any time.
21:06 masak payload: I think I speak for many here when I say I'm very interested in your progress. blog posts, github repositories, gists -- all are welcome.
21:08 payload :-[
21:09 KyleHa rakudo: my @arr[10];
21:09 p6eval rakudo 1831bd: OUTPUT«Statement not terminated properly at line 2, near "[10];"␤in Main (src/gen_setting.pm:3257)␤»
21:09 KyleHa NYI?
21:11 jnthn nyi.
21:11 masak nYi.
21:11 jnthn NYi.
21:12 * moritz_ agrees with masak
21:12 jnthn rakudo: (<N n> X~ <Y y> X~ <I i>).perl.say
21:12 moritz_ KyleHa++ # writing tests for tickets
21:12 p6eval rakudo 1831bd: OUTPUT«["NYI", "NYi", "NyI", "Nyi", "nYI", "nYi", "nyI", "nyi"]␤»
21:13 masak rakudo: ([X~] <N n>, <Y y>, <I i>).perl.say
21:13 p6eval rakudo 1831bd: OUTPUT«Statement not terminated properly at line 2, near "~] <N n>, "␤in Main (src/gen_setting.pm:3257)␤»
21:14 masak should that work?
21:14 moritz_ aye
21:14 moritz_ but second-level meta ops are...
21:14 jnthn yeah but it's...
21:14 moritz_ NYI
21:14 jnthn :-)
21:14 masak 哈哈
21:14 KyleHa moritz_: It'd be nice if RT could track and search which tickets have test coverage and which don't.
21:15 KyleHa I'm just dreaming.
21:15 moritz_ KyleHa: aye. So far we just have comment/reply on the ticket.
21:15 moritz_ but that's nothing a short perl script can't fix ;-)
21:16 moritz_ I use git-svn anyway, and parsing 'git log' is easy
21:16 KyleHa Oh?  I should learn about that.
21:16 KyleHa I thought git-svn had some drawback for two-way communication.
21:17 moritz_ if we agree on a standard syntax for the commit mesage, then I'll write such a script and run it from time to time
21:17 moritz_ KyleHa: it has, but not enough to stop me from using it ;-)
21:17 KyleHa Heh.
21:18 moritz_ the two biggest are 1) poor svn meta data handling
21:18 moritz_ and 2) git tracks file moves differently than svn
21:19 moritz_ but that's outweighted by having the full history locally, local commits and local branches
21:21 moritz_ so, is m/test?s\s+(for\s+)?(rt|perl)\s*#\d/i an acceptable format?
21:22 KyleHa Yes.
21:23 KyleHa I'd swap the ? and the 's'.
21:23 masak :)
21:23 moritz_ uhm, yes
21:23 KyleHa Might put optional brackets around the "perl #\d" part in case of paste.
21:24 moritz_ aye
21:25 masak moritz_++ # implementing people's dreams
21:25 moritz_ masak: so far I only talked about it ;-)
21:25 masak oh.
21:25 masak moritz_--, then. :)
21:25 moritz_ ;-)
21:30 Whiteknight joined #perl6
21:31 KyleHa Runs for over two minutes ($samples = 10 * 2 ** 16): @freq_observed[ $cells.rand ]++ for 1 .. $samples;
21:31 moritz_ s/16/8/ # make it faster ;-)
21:31 KyleHa Yeah!
21:31 KyleHa I should say it's been running over two minutes...I haven't seen it finish yet.
21:32 bruce joined #perl6
21:34 bruce what's the right way to have a wek ref in perl6?
21:34 moritz_ bruce: since Perl 6 is garbage collected you don't have to care about that.
21:35 bruce isn't that precisely the reason I have to care?
21:35 moritz_ no
21:35 moritz_ in Perl 5 you have to care because it's refcounted
21:35 KyleHa bruce: Perl 5 uses reference counting, which is a sort of a retarded garbage collector.
21:35 bruce I have an object that has a list of other objects that all have references back
21:36 moritz_ with mark-and-sweep (or similar techniques) you don't care at all
21:36 jnthn The Rakudo implementation of Perl 6 uses reachability analysis rather than ref-counting.
21:36 jnthn So circular references aren't a problem.
21:37 bruce I'm really enjoying perl6 so far, just a lot to unlearn
21:39 jnthn :-)
21:41 perl7 joined #perl6
21:42 bruce Is there a good doc somewhere on when to use package and module instead of just defining a class, role, etc?
21:43 moritz_ basically if you don't need any OO
21:43 moritz_ and just want to export subroutines
21:43 bruce I see
21:44 pugs_svn r27310 | kyle++ | [t/spec] Test the distribution of results from rand()
21:44 bruce then there is a subtle difference between package and module that I haven't quite figured out
21:44 moritz_ same here ;-)
21:44 moritz_ so far I've never seen a reason to use 'package'
21:44 moritz_ it seems to be for Perl 5 compatiblity, but I'm not sure
21:45 jnthn Rakudo day tomorrow, folks. :-)
21:45 gbacon joined #perl6
21:45 moritz_ YaY
21:46 bruce \o/
21:47 cognominal joined #perl6
21:48 masak yay, Rakudo day!
21:51 skids joined #perl6
21:55 perl7 this is a begginer question: Will be perl5 cpan modules ready for use from perl6?
21:55 moritz_ at some point yes.
21:56 moritz_ it doesn't work right now, though
21:57 perl7 is easy to translate a perl5 module to perl6?
21:58 PerlJam depends on how well you know perl 6  :)
21:58 Tene And on the module.
21:58 PerlJam but generally, I'd say yes (modulo those features of perl 6 that are unimplemented)
21:58 Tene In general, though, fairly easy.
21:59 athomason joined #perl6
22:00 perl7 I suposse that perl5-modules on perl6 run over parrot, so it's possible to run perl5 on top of parrot?
22:00 moritz_ not yet.
22:02 perl7 is there any project planned to do this task?
22:02 PerlJam perl7: are you volunteering?  ;>
22:03 perl7 not yet...
22:03 Tene perl7: there have been many suggestions over the years, but I don't know anyone currently planning to work on it.
22:03 masak perl7: as far as I understand, it was attempted, but that was quite a while ago, and Parrot wasn't very mature by then.
22:03 Tene Suggestions from reimplementing Perl 5, to embedding Perl 5, and a few others.
22:04 Tene Getting Perl 5 to emit an opcode tree that's translated into parrot ops, iirc...
22:04 masak perl7: at this point, it might actually be doable, but I'd be lying if I said I think it'd be easy. :)
22:05 masak time to go home and try to sleep a bit.
22:05 perl7 interesting, do you know what is the strategy to run perl5-code from perl6?
22:06 moritz_ perl7: Tene mentioned a few
22:06 PerlJam perl7: I imagine that as a first approximation perl 6 will just punt to a real perl 5 compiler.
22:06 Tene There is currently no strategy.  The strategy will likely be whatever is proposed by the first person to work on it.
22:08 perl7 this is a serious problem, isn't it? if perl5 strongest point is cpan, and cpan isn't available from perl6...
22:09 moritz_ it is.
22:10 moritz_ attempts to fix it are welcome
22:10 perl7 or the project is a new cpan6, translating the key modules...
22:12 bruce sounds like a more generic problem though, supporting languages that aren't available via parrot
22:13 ruoso joined #perl6
22:14 moritz_ implement them im parrot ;-)
22:15 bruce I see that pugs has a somewhat working version with perl5
22:15 perl7 a language without the richness of libraries, has a big problem
22:16 moritz_ perl1 didn't have that either
22:17 PerlJam perl7: what makes you think that Perl 6 won't have these things?
22:17 huf to be fair, it doesnt have them now... :)
22:17 PerlJam huf: it doesn't have many things now, but that doesn't mean it won't.
22:17 huf but that's basically an argument against *any* change
22:18 huf so yeah :
22:18 huf )
22:19 perl7 I'm sure it will, but I'm thinking there is a big work to do in order to translate/create modules in perl6, this means more time to be spent until a powerfull perl6 platform simplify app development
22:19 moritz_ perl7: that's true, but it's also a chance
22:20 moritz_ perl7: many maintainers of mature modules see some things they don't like about their module
22:20 moritz_ but they can't change it easily, because it would break backwards compatibilty
22:20 moritz_ Perl 6 offers them a natural way to start off a clean slate
22:20 gfldex 90% of all written code was found as not being usefull and replaced by the 10% that are still in use
22:21 perl7 this is a common problem, how perl6 resolves module versioning?
22:21 gfldex to _know_ that something is usefull is halve the work
22:21 gfldex and that's what cpan is telling us
22:21 gfldex in fact it tells us what is not usefull in quite a lot cases :)
22:22 bruce so, slightly off topic, does pulling libraries from supported parrot languages (ex: lua) work at the moment
22:23 jferrero joined #perl6
22:24 jnthn bruce: See this post from Tene++: http://blogs.gurulabs.com/stephen/2009/​05/cross-language-library-loading.html
22:25 perl7 this is the same idea that .net CLR, isn't it?
22:25 Tene bruce: lua doesn't have support for inter-language libraries yet.  If you're interested in using lua for that, I can work on it.
22:25 Tene It currently works for Perl 6, Ruby, Scheme, Tcl
22:25 bruce lua was just an example
22:26 jnthn Tene: Not LOLCODE yet? :-(
22:26 jnthn ;-)
22:26 Tene jnthn: lolcode doesn't have libraries, afaik.
22:26 bruce My question was mere curiosity
22:26 Tene If you have evidence to the contrary, I'll fix it.
22:27 Tene bruce: Yes, it works right now.
22:27 jnthn :-)
22:29 hercynium joined #perl6
22:30 PerlJam Tene: so ... when will it work for perl5?   ;-)
22:31 moritz_ now you're just being evil ;-)
22:31 Tene PerlJam: as soon as we can use Perl 5 on Parrot.
22:33 jnthn It's going to be a lot of work to get the interop good, but I suspect as a first cut: embed Perl 5 interpreter and make it possible to eval('print "hello";', :lang<perl5>). Then work from there.
22:33 PerlJam Well, as soon as we have perl 6, we'll have a nice platform to build a perl 5 compiler that runs on parrot.
22:34 PerlJam (of course, we'll have to forego bug-for-bug compatibility)
22:34 moritz_ more importantly, XS compatibility
22:34 buubot moritz_: Sorry, no more output
22:35 moritz_ wtf?
22:40 PerlJam more foo
22:40 buubot PerlJam: Sorry, no more output
22:40 jnthn more /etc/passwd
22:40 buubot jnthn: Sorry, no more output
22:40 jnthn aww
22:40 Tene more jnthn
22:40 buubot Tene: Sorry, no more output
22:40 moritz_ more
22:40 buubot moritz_: Sorry, no more output
22:40 Tene more more
22:40 buubot Tene: Sorry, no more output
22:40 moritz_ buubot--
22:40 buubot Couldn't match input.
22:40 pugs_svn r27311 | lwall++ | [redspans] pass actions as option to parsefile, as specced
22:41 Tene morexlsqbq
22:46 moritz_ phenny: tell KyleHa I've got a mailing script working, but perl.org rejects my mails due to blacklisting, maybe you want to give it a try: http://gist.github.com/137857 it needs to be run from within the git-svn clone
22:46 phenny moritz_: I'll pass that on when KyleHa is around.
22:51 Limbic_Region joined #perl6
23:04 frew_ joined #perl6
23:08 ssm joined #perl6
23:08 stepnem joined #perl6
23:16 Veejay joined #perl6
23:17 Veejay left #perl6
23:19 ssm joined #perl6
23:31 ssm joined #perl6
23:43 nbrown_ joined #perl6
23:44 pugs_svn r27312 | lwall++ | [S11] some notes on ambiguous authority specs
23:49 snarkyboojum joined #perl6

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

Perl 6 | Reference Documentation | Rakudo