Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2012-05-08

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:16 envi_ joined #perl6
00:18 xenu joined #perl6
00:22 replore_ joined #perl6
00:33 noam joined #perl6
00:33 wolfman2000 joined #perl6
00:40 wolfman2000 joined #perl6
00:47 tyatpi joined #perl6
00:55 Khisanth joined #perl6
01:00 noam joined #perl6
01:13 scott__ joined #perl6
01:22 thou joined #perl6
01:50 fgomez joined #perl6
01:54 tokuhirom joined #perl6
02:04 raiph .
02:08 ponbiki joined #perl6
02:13 lestrrat joined #perl6
02:16 bbkr_ joined #perl6
02:16 Grrrr joined #perl6
02:18 daemon joined #perl6
02:20 simcop2387 joined #perl6
02:25 thou joined #perl6
02:31 fgomez joined #perl6
02:31 fgomez joined #perl6
02:38 orafu joined #perl6
03:02 xenu joined #perl6
03:20 jaldhar joined #perl6
03:23 xenu_ joined #perl6
03:34 xenu_ joined #perl6
03:51 orphu joined #perl6
03:56 birdwindupbird joined #perl6
03:59 kaleem joined #perl6
04:15 carlin joined #perl6
04:29 lorn_ joined #perl6
04:30 orphu left #perl6
04:34 MContagious joined #perl6
04:36 spaceships joined #perl6
04:39 xenu joined #perl6
04:46 fgomez joined #perl6
04:46 icwiener joined #perl6
04:46 lestrrat joined #perl6
04:47 fgomez joined #perl6
04:49 icwiener Hi, I read about boolean types, that there is "bool" (primitive) and "Bool" (object) but for me only the opject type is working as described. Is that info outdated? http://cog.cognitivity.com/perl6/val.html
04:49 xenu_ joined #perl6
04:53 sorear icwiener: all current implementations provide a subset of the primitiv e types.
04:53 sorear Rakudo has int, num, and str; Niecza has none (a vacuous subset); I don't know for pugs
04:54 xenu_ joined #perl6
04:59 raiph icwiener: from that doc: "This document is obsolete. The design of Perl6 has changed in important ways since this was written: refer to the Perl6 documentation efforts elsewhere. These pages will stay up for archival interest only: don't rely on them!"
05:00 raiph icwiener: the specific thing u wrote, and related stuff on that page, contains things that are indeed outdated.
05:01 raiph icwiener: eg what is called "primitive" in that doc is now "native"
05:02 vlixes joined #perl6
05:02 icwiener Hmm, I do not see that info you quoted on that page.
05:03 raiph icwiener: it's back a few pages at the start
05:03 icwiener Ah, I see.
05:03 icwiener But well, I see so many in parts contradicting info about Perl 6 that it should not surprise me. :D
05:04 icwiener Hmm, so it is the best to look at the synopses, I guess?
05:07 raiph well, they are almost always the most definitive source
05:08 raiph there are some very well written articles from the last year or two that i think are very helpful for most folk
05:11 icwiener Ok, thanks for the help. I will read S02 now since I think I will find an answer there. :)
05:13 au__ joined #perl6
05:13 pmichaud_ joined #perl6
05:13 moritz_ joined #perl6
05:14 japhb_ joined #perl6
05:14 stepnem_ joined #perl6
05:14 diakopte1 joined #perl6
05:14 daxim_ joined #perl6
05:14 apejens_ joined #perl6
05:22 pjcj joined #perl6
05:22 orafu joined #perl6
05:22 fgomez joined #perl6
05:22 jaldhar joined #perl6
05:22 thou joined #perl6
05:22 simcop2387 joined #perl6
05:22 scott__ joined #perl6
05:22 REPLeffect joined #perl6
05:22 ocharles joined #perl6
05:22 araujo joined #perl6
05:22 sporous joined #perl6
05:22 cognominal joined #perl6
05:22 _sri joined #perl6
05:22 xinming_ joined #perl6
05:22 sisar joined #perl6
05:22 plobsing joined #perl6
05:22 dbr joined #perl6
05:22 sunnavy joined #perl6
05:22 felher joined #perl6
05:22 tkr joined #perl6
05:22 ddima joined #perl6
05:22 arnsholt joined #perl6
05:22 preflex joined #perl6
05:22 colomon joined #perl6
05:22 clkao joined #perl6
05:22 jnthn joined #perl6
05:22 BooK joined #perl6
05:22 szbalint joined #perl6
05:22 wolong joined #perl6
05:22 Guest46584 joined #perl6
05:22 jtpalmer joined #perl6
05:22 LoRe joined #perl6
05:22 patch joined #perl6
05:22 Bucciarati joined #perl6
05:22 frettled joined #perl6
05:22 doy joined #perl6
05:22 bonsaikitten joined #perl6
05:22 bjarneh joined #perl6
05:22 Util_ joined #perl6
05:22 domidumont joined #perl6
05:22 huf joined #perl6
05:22 tadzik joined #perl6
05:22 odoacre_ joined #perl6
05:22 Tene joined #perl6
05:22 shachaf joined #perl6
05:22 takesako joined #perl6
05:22 kcwu joined #perl6
05:22 Juerd joined #perl6
05:22 silug joined #perl6
05:22 cxreg joined #perl6
05:22 prammer joined #perl6
05:22 PZt joined #perl6
05:22 ingy joined #perl6
05:22 yves_ joined #perl6
05:22 Gothmog_ joined #perl6
05:22 rhr joined #perl6
05:22 sorear joined #perl6
05:22 charsbar___ joined #perl6
05:27 mtk joined #perl6
05:30 au joined #perl6
05:33 xenu_ joined #perl6
05:42 icwiener joined #perl6
05:42 moritz_ \o
05:53 sorear o/
05:55 mdupont joined #perl6
05:59 carlin joined #perl6
06:02 lestrrat joined #perl6
06:07 wtw joined #perl6
06:25 xenu joined #perl6
06:27 birdwindupbird joined #perl6
06:44 birdwindupbird joined #perl6
06:45 xenu_ joined #perl6
07:04 xenu joined #perl6
07:17 xinming joined #perl6
07:18 xenu_ joined #perl6
07:18 fglock joined #perl6
07:18 fglock o/
07:19 pjcj joined #perl6
07:20 lestrrat joined #perl6
07:24 fhelmberger joined #perl6
07:30 xenu_ joined #perl6
07:49 kresike joined #perl6
07:54 sorear r: val("perl").rindex("e").say
07:54 p6eval rakudo d9fd17: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&val' called (line 1)␤»
07:54 sorear r: say @*ARGV
07:54 p6eval rakudo d9fd17: OUTPUT«Dynamic variable @*ARGV not found␤  in method gist at src/gen/CORE.setting:8673␤  in sub say at src/gen/CORE.setting:6556␤  in block <anon> at /tmp/52p1PBwyga:1␤␤»
07:55 sorear r: say @*ARGS
07:55 p6eval rakudo d9fd17: OUTPUT«␤»
07:55 sorear r: say @*ARGS.perl
07:55 p6eval rakudo d9fd17: OUTPUT«Array.new()␤»
08:03 dalek perl6-examples: 0bbf113 | (Gerhard R)++ | other/bottles.pl:
08:03 dalek perl6-examples: add 99 bottles of beer, 'official' lyrics
08:03 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/0bbf113a8f
08:03 dalek perl6-examples: d147721 | (Gerhard R)++ | other/n-body.pl:
08:03 dalek perl6-examples: add high-level version of n-body problem
08:03 dalek perl6-examples: doesn't work with Niecza, but that's equally true for the existing script
08:03 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/d147721195
08:06 xenu joined #perl6
08:07 jnthn morning, #perl6
08:07 mikec__ morning jnthn
08:07 moritz \o jnthn
08:13 sisar joined #perl6
08:14 moritz jnthn++ # fixing traits + named arguments
08:14 jnthn OK, this one is fun.
08:14 jnthn r: package A { class Str {}; our sub foo() { return Str.new } }
08:14 p6eval rakudo d9fd17: OUTPUT«===SORRY!===␤This type cannot box a native string␤»
08:14 jnthn In here, the compiler wants to make a string constant.
08:14 jnthn So, it looks up Str.
08:14 jnthn Apart from you changed the meaning of the Str type in that lexical scope.
08:15 moritz so, what's our stance on that?
08:15 jnthn And changed it to something that won't actually work in place of the real Str type.
08:15 jnthn Well, my stance is "working as designed"
08:15 moritz "you told us so"?
08:15 xenu_ joined #perl6
08:15 moritz ok, +1
08:16 jnthn The box that fails actually is while trying to create a string constant, probably to attach a name ot "foo" or to install it in the package or something.
08:17 moritz jnthn: should I reject it, or will you?
08:17 jnthn moritz: Can leave it with me; I have some Perl 6 tuits today :)
08:17 moritz jnthn: ok, great
08:17 moritz jnthn: did you spectest the use-arglist branch with your changes?
08:17 moritz if it's all passing, any objections to merging?
08:18 * moritz spectests right now
08:18 jnthn moritz: 2 failures (more)
08:18 dalek perl6-examples: 1ce1e53 | (Gerhard R)++ | other/n-body.pl:
08:18 dalek perl6-examples: [other/n-body.pl] use given instead of explicit $_
08:18 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/1ce1e5368f
08:18 jnthn One is due to a wrong traits test, I think.
08:18 jnthn The other one is in the advent integration tests. I mentioned which one last night.
08:19 jnthn I think the test is wrong.
08:19 jnthn Should be easily fixable.
08:19 moritz ok
08:19 jnthn No objection to merging, but do spectest first to make sure I didn't miss anything :)
08:19 moritz ok
08:24 jnthn moritz: Did you fix this one: https://rt.perl.org/rt3/Tic​ket/Display.html?id=112766
08:25 moritz jnthn: ah, yes. But I don't know if we have test coverage
08:25 moritz will do that after use-malice merge :-)
08:26 jnthn \o/
08:26 jnthn bbi15
08:28 dakkar joined #perl6
08:32 moritz r: role A { method x($?CLASS:U:) { } }
08:32 p6eval rakudo d9fd17: OUTPUT«===SORRY!===␤In signature parameter $?CLASS, it is illegal to use the ? twigil␤at /tmp/878HwYBsll:1␤»
08:32 moritz r: role A { method x(::?CLASS:U:) { } }
08:32 p6eval rakudo d9fd17:  ( no output )
08:36 icwiener r: my Hash %h; %h.push: 'A' => 1;
08:36 p6eval rakudo d9fd17: OUTPUT«Type check failed in assignment to '$v'; expected 'Hash' but got 'Int'␤  in method _push_construct at src/gen/CORE.setting:5868␤  in method push at src/gen/CORE.setting:5846␤  in block <anon> at /tmp/y4a6RjciG1:1␤␤»
08:37 icwiener Ok, so it's not local. :) ... Not implemented yet?
08:37 moritz icwiener: it works as designed
08:37 moritz icwiener: you declared a hash that only hold elements of type Hash
08:38 moritz icwiener: so it complains that 1 isn't of type Hash
08:38 icwiener Umm ... let me reread something. :)
08:39 sorear jnthn: where is the making of a string constant in Str.new?
08:40 moritz sorear: there's a string constant being made for the name of the subroutine foo
08:41 sorear n: class Str { }; say "foo".flip # is jnthn trying to tell me this is wrong?
08:41 p6eval niecza v17-2-gb8fcf85: OUTPUT«oof␤»
08:41 sorear in niecza, string constants go for CORE::Str
08:41 sorear not MY::Str
08:41 moritz hm
08:41 sorear (I had to do this because STD contains a class 'Regex' and then tries to use regular expressions inside it.)
08:43 xenu_ joined #perl6
08:43 icwiener moritz: Oh my. I guess I confused it with other languages' habit to write the type of the variable before its name. :/
08:43 icwiener moritz: Thanks to pointing out my mistake.
08:44 moritz icwiener: well, p6 has a distinction between containers and values
08:44 moritz icwiener: if you say  my Int $x, then $x is a Scalar which can hold an Int
08:44 moritz if you write   my Int @x, then $x is an Array which can Int objects
08:45 moritz *can hold
08:46 jnthn r: class Str { }; say "foo".flip
08:46 p6eval rakudo d9fd17: OUTPUT«===SORRY!===␤This type cannot box a native string␤»
08:46 jnthn That's also what I'd expect.
08:46 icwiener moritz: Yes. As such it does not seem like a distinction. The type bevore the name describes what can be inside. And the "is Foo" declares the type of the variable ... No?
08:46 jnthn I guess I could go with the CORE interpretation too; it just seems inconsistent with the way we generally do things in Perl 6.
08:46 moritz jnthn: in World.pm, how do I construct a Bool::True?
08:46 jnthn And CORE:: feels really wrong.
08:46 jnthn moritz: You don't. You look up the one that's already there.
08:47 moritz jnthn: how do I do that then?
08:47 jnthn moritz: Do you need the object or a PAST node that gets it?
08:47 jnthn self.find_symbol(['Bool', 'True']) # finds it
08:47 jnthn Then to get a PAST node to reference it self.get_ref(...) around it
08:47 moritz I'm pretty sure that  is sometrait  should put a True in :$sometrait
08:47 jnthn sorear: At least it should be SETTING::
08:48 jnthn moritz: I think that dates back to a time before we had Bool::True ;)
08:48 moritz oh, and it's Actions after all, not world
08:48 moritz jnthn: sounds sensible
08:48 jnthn Oh, if you're doing the trait, you only want find_symbol
08:48 jnthn not get_ref
08:48 moritz right
08:48 jnthn As you're calling the trait immediately.
08:48 moritz because it's applied right at compile time
08:49 xenu_ joined #perl6
08:49 _Vi joined #perl6
08:50 moritz jnthn: question is, can we ever  declare a class Str with useful contents with our current semantics?
08:51 jnthn moritz: One easy way would be (though think the name lookup is a bit off at the moment) to subclass CORE::Str
08:51 jnthn Alternatively:
08:52 jnthn r: class Str { has str $!value is box_target; }; say "foo".flip
08:52 p6eval rakudo d9fd17: OUTPUT«Method 'flip' not found for invocant of class 'Str'␤  in block <anon> at /tmp/L2nptDlZQv:1␤␤»
08:52 moritz oh nice
08:52 jnthn Well, that's basically what happens in BOOTSTRAP.pm :)
08:53 sorear jnthn: Part of my logic is that names should not be very magical
08:54 sorear jnthn: You don't override the 'class' declarator by defining an object with the magic name ClassHOW
08:54 dalek specs: 0079930 | moritz++ | S14-roles-and-parametric-types.pod:
08:54 dalek specs: [S14] use :U instead of "where {!.defined}"
08:54 dalek specs: review: https://github.com/perl6/specs/commit/0079930460
08:54 jnthn sorear: It has been pondered... :)
08:54 sorear I imagine TimToady wasn't thinking at all about "what essential thing might I be shadowing?" when he wrote Regex in STD.pm6
08:54 jnthn sorear: But yeah, you do it by the EXPORTHOW mechanism.
08:55 sorear and neither was I - I lost a lot of metaphorical hair over debugging that
08:55 sorear WTF WHY IS NIECZA NOT FINDING THE REGEX IMPLEMENTATION CLASS
08:55 jnthn Hm. Would be interesting to get a TimToady ruling on this.
08:55 jnthn Maybe SETTING:: is the right compromise option.
08:56 jnthn "You can diddle things like Str, but we'll make you write your own setting"
08:56 sorear I would settle for SETTING, but I'd like to unify or harmonize it with EXPORTHOW somehow
08:56 jnthn I'm not too attached to how EXPORTHOW currently is.
08:56 jnthn Partly because I want a compositional import mechanism.
08:57 jnthn Well, maybe I do.
08:57 sorear I am interested in elaboration
08:57 noam joined #perl6
08:57 jnthn Essentially, some way you could use multiple MOP-affecting modules, each one exporting a role, and if they try to change the MOP in conflicting ways you get the usual composition failure issue.
08:57 dalek Perlito: 36fb5f3 | (Flavio S. Glock)++ | README-perlito5-js:
08:57 dalek Perlito: Perlito5 - javascript: data model update: Compile-time / Run-time interleaving
08:57 dalek Perlito: review: https://github.com/fglock/​Perlito/commit/36fb5f3912
08:58 jerome_ joined #perl6
08:59 carlin joined #perl6
09:00 dalek roast: 95257ca | moritz++ | S05-modifier/sigspace.t:
09:00 dalek roast: test ms//
09:00 dalek roast: review: https://github.com/perl6/roast/commit/95257ca452
09:01 jnthn I feel a bit odd about things like "class Str {...}; 'foo'; Str.new;" because the latter is clearly going to use the lexical class, whereas the constant would not. Not sure whether I should be so bothered on that though...
09:03 moritz is there any reason for still having . in @*INC by default?
09:04 jnthn moritz: I suspect removing it will have a similar pain level to removing lib.
09:04 moritz jnthn: I don't think so, because all our modules already are in lib/
09:04 noam joined #perl6
09:04 jnthn moritz: Good point... I guess it may surprise people who got used to things being as they are.
09:05 jnthn moritz: But I guess that argues "remove it soon", so less people get used to it :)
09:05 moritz jnthn: it certainly surprises me that an A.pm in my rakudo dir sets up my spectest runs
09:05 fridim_ joined #perl6
09:06 jnthn sets up, or upsets? :)
09:06 jnthn .oO( Somebody upset us the bomb )
09:06 moritz upsets
09:07 moritz jnthn: ok, one more question about traits
09:07 moritz in the case of   sub answer() is description('something') { 42 }
09:07 moritz and description is a role name
09:08 moritz how is trait_mod:<is> called?
09:08 jnthn In that case, 'something' goes as an extra positoinal.
09:08 frettled moritz++ – I think having . in @*INC is a bad idea.
09:08 jnthn &trait_mod:<is>(&answer, description, 'something')
09:08 NamelessTee joined #perl6
09:09 xenu joined #perl6
09:10 moritz then I have all the failing tests figured out
09:11 frettled \o/
09:11 frettled Now you need to write a new test to make the code fail again!
09:12 moritz akshually there's one new failure that I'm simply fudging
09:12 dalek rakudo/use-arglist: c2634bd | moritz++ | / (2 files):
09:12 dalek rakudo/use-arglist: pairs in traits have a Bool value, not Int
09:12 dalek rakudo/use-arglist: review: https://github.com/rakudo/rakudo/commit/c2634bdc9e
09:12 moritz but it only passed accidentally before
09:13 jnthn ok
09:13 moritz an 'is export(:MANDATORY)'
09:14 jnthn moritz: That one needs special handling, iirc.
09:14 moritz jnthn: right
09:14 jnthn moritz: It means that the thing is *always* imported.
09:14 moritz jnthn: and it only passed before because we always imported everything that was exported with any tag
09:15 jnthn ah, ok
09:15 jnthn We can fix mandatory later.
09:16 moritz aye
09:17 moritz I don't think anybody uses it out there
09:17 moritz anyway, doing a final spectest now with a local merge
09:17 jnthn Doubt it.
09:17 jnthn \o/
09:17 jnthn moritz++ # improving our malice
09:18 moritz :-)
09:18 moritz actually I like the translation "deceitfulness" better
09:18 moritz where's phenny?
09:19 moritz the "list" in "arglist" means something like "trick" or "subterfuge"
09:28 * jnthn wonders if it's at all related to the English use of "list" as in "the boat listed"
09:28 moritz is that, like, capsized?
09:29 frettled almost!
09:29 jnthn no, it's what happens before that :)
09:29 jnthn More like "leaning to one side" or so
09:29 moritz ah
09:29 moritz german "kraengen"
09:29 moritz no, I don't think it's related
09:30 jnthn It was a stretch :)
09:31 dalek rakudo/nom: ff4843a | moritz++ | src/Perl6/Grammar.pm:
09:31 dalek rakudo/nom: preparations for use with arglist
09:31 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ff4843a557
09:31 dalek rakudo/nom: 3b5d78c | moritz++ | src/Perl6/ (3 files):
09:31 dalek rakudo/nom: move make_simple_code_object to World, rename it to start with create_
09:31 frettled In Norwegian, "list" can mean "cunning"
09:32 moritz frettled: that's closer to the german "list"
09:32 dalek joined #perl6
09:32 moritz meh, dalek didn't detect that merge
09:32 moritz ah well, double karma for jnthn++ and me :-)
09:32 frettled hehe
09:35 * sorear sleep
09:36 jferrero joined #perl6
09:36 drschumtzenberg joined #perl6
09:37 xenu_ joined #perl6
09:40 dalek roast: 17368d0 | moritz++ | / (3 files):
09:40 dalek roast: fix up traits and importing tests
09:40 dalek roast: review: https://github.com/perl6/roast/commit/17368d04f0
09:43 noam joined #perl6
09:45 tadzik o/
09:45 tadzik \o/
09:46 moritz \o tadzik
09:46 tadzik now I can make all my modules use arglists :)
09:46 tadzik as in use Term::ANSIColor :constants
09:47 moritz I'm testing the :MANDATORY fix
09:47 moritz right now
09:47 xenu_ joined #perl6
09:48 frettled tadzik: ooh?
09:49 tadzik hoo! :)
09:49 moritz note that only pairs in arglists are supported right now
09:49 moritz use lib 'lib'; # not yet :(
09:49 tadzik but how about use lib dir => 'lib'?
09:50 moritz hope
09:50 noam joined #perl6
09:50 moritz erm
09:50 moritz nope
09:50 moritz :-)
09:50 jnthn We just don't ahve a dynamic exportation mechanism yet.
09:51 moritz the value of the pairs is ignored
09:51 moritz use Test :!DEFAULT; # also imports DEFAULT :-)
09:51 jnthn The way it's really meant to work is thing not used as a tag gets passed on to an &EXPORT in UNIT, iiuc.
09:51 jnthn *things
09:51 jnthn Which could be a macro but I guess could be a sub also...
09:52 jnthn We could do the sub case now and it'd be enough for "use lib".
09:52 moritz oh by the way
09:52 moritz $ ./perl6 -Ilib -e 'use Test (); ok 1; done'
09:52 moritz ===SORRY!===
09:52 moritz CHECK FAILED:
09:52 moritz Undefined routine '&ok' called (line 1)
09:52 moritz Undefined routine '&done' called (line 1)
09:52 moritz but that imports MANDATORY
09:52 moritz in contrast to  need Test;  which does not import :MANDATORY
09:52 jnthn Sounds good.
09:56 xenu_ joined #perl6
09:56 dalek rakudo/nom: e51b93b | moritz++ | src/Perl6/Grammar.pm:
09:56 dalek rakudo/nom: always import MANDATORY exports
09:56 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e51b93bf3a
09:56 dalek rakudo/nom: b6fe916 | moritz++ | src/Perl6/Grammar.pm:
09:56 dalek rakudo/nom: die when trying to import a tag that is not exported
09:56 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b6fe916e1f
09:56 dalek roast: 86459a9 | moritz++ | S11-modules/importing.t:
09:56 dalek roast: test that non-existent export tags die on importing
09:56 dalek roast: review: https://github.com/perl6/roast/commit/86459a98dd
09:58 colomon joined #perl6
09:59 * jnthn wonders if we'll get some unfudges from this
10:00 moritz I've included two unfudges in the roast commit before
10:00 jnthn nice
10:01 jnthn S10-packages/export.t may be worth a look
10:02 jnthn S11-modules/import-tag.t too
10:04 moritz both need quite some review first, I fear
10:04 moritz dies_ok { bop() }, 'bop() not imported';
10:05 jnthn eek
10:05 dalek roast: cecf9d0 | moritz++ | S11-modules/import-tag.t:
10:05 dalek roast: eval around compile-time lookup failures
10:05 dalek roast: review: https://github.com/perl6/roast/commit/cecf9d0ed9
10:05 moritz both pugs and rakudo had quite a tradition of letting us get away with that
10:06 moritz iirc it was only this year that we started detecting it at compile time
10:06 jnthn Right.
10:06 jnthn Well, within the last year
10:06 jnthn Was when the optimizer landed, last autumn.
10:07 dalek rakudo/nom: 64c2fdb | moritz++ | t/spectest.data:
10:07 dalek rakudo/nom: run S11-modules/import-tag.t
10:07 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/64c2fdb694
10:10 drbean joined #perl6
10:11 noam joined #perl6
10:12 noam joined #perl6
10:14 moritz ok, I have a crude version of  use lib 'lib'  working
10:14 moritz though, of course, you first need to -Ilib because it's in lib/lib.pm :-)
10:15 jnthn Well, if we install it it's fine :)
10:15 jnthn moritz: How'd you made it work?
10:16 moritz jnthn: if there are non-pairs in the use arglist, it tries to call our sub EXPORT in the module
10:16 moritz jnthn: and passes all positional arguments to it
10:16 jnthn moritz: OK. I think the spec says it should pass unused nameds too.
10:16 jnthn moritz: That is, if we find ones that don't map to tags, then die if there's no &EXPORT, otherwise pass them along.
10:17 moritz jnthn: that's not hard to do, but probably leads to worse error messages
10:17 moritz r: sub f() { }; say f(:foo)
10:17 p6eval rakudo 64c2fd: OUTPUT«Unexpected named parameter 'foo' passed␤  in sub f at /tmp/XyTRUmRtEq:1␤  in block <anon> at /tmp/XyTRUmRtEq:1␤␤»
10:17 moritz hm, maybe not
10:17 moritz I should read the specs at some point :-)
10:18 moritz waiting for a spectest run to finish, then I'll push
10:19 jnthn moritz: We can give as we do today if there's no EXPORT sub.
10:19 jnthn So it's only worse for modules doing dynamic exportation stuff.
10:19 moritz $ ./perl6 -Ilib -e 'use Test "foo";'
10:19 moritz ===SORRY!===
10:19 moritz Error while importing from 'Test': no EXPORT sub, but you provided positional argument in the 'use' statement
10:19 moritz that could be changed a little
10:20 noam joined #perl6
10:20 moritz n: use lib 'lib';
10:20 p6eval niecza v17-2-gb8fcf85: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤'use' with arguments NYI at /tmp/O1G8OAg8Uc line 1:â�¤------> [32muse lib 'lib'[33mâ��[31m;[0mâ�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.setting line 1364 (die @ 3) â�¤  at /home/p6eval/niecza/s…
10:25 dalek rakudo/nom: 6bd95b3 | moritz++ | / (3 files):
10:25 dalek rakudo/nom: first crude shot at importing with positional args
10:25 dalek rakudo/nom:
10:25 dalek rakudo/nom: Also crude implementation of lib.pm
10:25 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6bd95b3bdc
10:25 dalek rakudo/nom: 72358bd | moritz++ | docs/ChangeLog:
10:25 dalek rakudo/nom: update changelog
10:25 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/72358bd52b
10:26 xenu joined #perl6
10:27 moritz http://blogs.perl.org/users/brad_​gilbert/2012/05/perl6-and-d.html nice
10:27 noam joined #perl6
10:27 moritz though I wouldn't call Go a toy
10:29 birdwindupbird joined #perl6
10:31 * jnthn wonders if we can have green on "use" in features yet :)
10:33 jnthn nqp: (-> $a, $b { say($a ~ $b) })('h', 'i')
10:33 p6eval nqp: OUTPUT«hi␤»
10:38 xenu_ joined #perl6
10:40 NamelessTee joined #perl6
10:44 carlin joined #perl6
10:44 dalek rakudo/nom: 81d88d8 | jnthn++ | src/Perl6/Actions.pm:
10:44 dalek rakudo/nom: Avoid a huge if ladder by replacing it with a hash lookup.
10:44 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/81d88d878a
10:58 xenu_ joined #perl6
11:12 xenu joined #perl6
11:18 dalek perl6-examples: dde18a0 | (Gerhard R)++ | shootout/revcomp.p6.pl:
11:18 dalek perl6-examples: [shootout/revcomp.p6.pl] replace loop with for
11:18 dalek perl6-examples: no idea why looping didn't work
11:18 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/dde18a09be
11:18 dalek perl6-examples: ccbd2c0 | (Gerhard R)++ | other/revcomp.pl:
11:18 dalek perl6-examples: add alternative version of revcomp problem
11:18 dalek perl6-examples: ~18x faster by avoiding .trans() and bulk output
11:18 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/ccbd2c0efe
11:23 xenu_ joined #perl6
11:26 noam joined #perl6
11:31 snearch joined #perl6
11:33 dalek perl6-examples: dd8202a | (Gerhard R)++ | other/revcomp.pl:
11:33 dalek perl6-examples: [other/revcomp.pl] fix whitespace
11:33 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/dd8202af2d
11:34 moritz removing . from @*INC breaks some tests
11:34 moritz I guess we either need to fix them or the harness
11:35 jnthn Um
11:35 jnthn What do flip-flop operators evaluate to?
11:36 moritz n: say (3 ff 4)
11:36 p6eval niecza v17-2-gb8fcf85: OUTPUT«1␤»
11:36 moritz n: say (0 ff 4)
11:36 p6eval niecza v17-2-gb8fcf85: OUTPUT«␤»
11:36 jnthn The tests seem to expect them to count how many items they've seen in that state, not just give true or false...
11:37 moritz n: say (3 ff 4) for ^5
11:37 p6eval niecza v17-2-gb8fcf85: OUTPUT«1␤1␤1␤1␤1␤»
11:37 jnthn Spec doesn't seem to say muchon this...
11:37 moritz probably 'same as p5' applies
11:37 moritz n: say (3 ff 0) for ^5
11:37 p6eval niecza v17-2-gb8fcf85: OUTPUT«1␤2␤3␤4␤5␤»
11:37 noam joined #perl6
11:38 moritz or "same as niecza" :-)
11:38 xenu_ joined #perl6
11:38 JimmyZ joined #perl6
11:38 jnthn n: for ^5 { say $_, ($_ == 2 ff $_ == 3) }
11:38 p6eval niecza v17-2-gb8fcf85: OUTPUT«0␤1␤21␤32␤4␤»
11:39 jnthn I never understood these darn ops in Perl 5 anyway. :)
11:41 jnthn n: for ^5 { say $_, ($_ == 2 ^ff $_ == 3) }
11:41 p6eval niecza v17-2-gb8fcf85: OUTPUT«0␤1␤2␤32␤4␤»
11:41 jnthn n: for ^5 { say $_, ($_ == 2 ^ff $_ == 3).WHAT }
11:41 p6eval niecza v17-2-gb8fcf85: OUTPUT«0Str()␤1Str()␤2Str()␤3Int()␤4Str()␤»
11:41 jnthn Str?!
11:42 JimmyZ r: for ^5 { say $_, ($_ == 2 ^ff $_ == 3).WHAT }
11:42 p6eval rakudo 81d88d: OUTPUT«0Bool()␤1Bool()␤2Bool()␤3Bool()␤4Bool()␤»
11:48 benabik joined #perl6
11:53 xenu_ joined #perl6
12:03 dalek tablets: 07a09e4 | (Herbert Breunung)++ | docs/appendix-g-glossary.txt:
12:03 dalek tablets: expanded on sigil , added interpolation dummy
12:03 dalek tablets: review: https://github.com/perl6/tablets/commit/07a09e489e
12:04 drschumtzenberg joined #perl6
12:05 dalek perl6-examples: 7a64336 | (Gerhard R)++ | / (4 files):
12:05 dalek perl6-examples: move some files from other/ to shootout/
12:05 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/7a64336c58
12:07 kborer joined #perl6
12:09 dalek tablets: e57de33 | (Herbert Breunung)++ | docs/report.pl:
12:09 dalek tablets: report writes now also a todo
12:09 dalek tablets: review: https://github.com/perl6/tablets/commit/e57de33dc5
12:11 not_gerd joined #perl6
12:12 xenu joined #perl6
12:12 dalek tablets: 2950112 | (Herbert Breunung)++ | docs/report.pl:
12:12 dalek tablets: report todo also minds faq
12:12 dalek tablets: review: https://github.com/perl6/tablets/commit/29501120f4
12:13 not_gerd regex-dna.p6.pl from perl6-examples/shootout panics with Out of mem!
12:14 not_gerd could someone verify if that's true for other platforms?
12:17 carlin joined #perl6
12:18 noam joined #perl6
12:18 _Vi joined #perl6
12:27 xenu_ joined #perl6
12:27 noam joined #perl6
12:39 phenny joined #perl6
12:39 moritz not_gerd: I'm trying it now
12:44 pernatiy joined #perl6
12:45 PacoAir joined #perl6
12:45 moritz it sure takes some time
12:45 moritz erm
12:46 moritz especially if it reads from STDIN, and I don't provide any input
12:46 moritz ok, OOMs here too
12:50 alvis joined #perl6
12:51 not_gerd moritz: 32bit or 64bit architecture?
12:51 xenu_ joined #perl6
12:51 moritz not_gerd: 64bit linux
12:53 dalek roast: e63e982 | jnthn++ | S03-operators/flip-flop.t:
12:53 dalek roast: Fudge flip-flop.t for Rakudo.
12:53 dalek roast: review: https://github.com/perl6/roast/commit/e63e982b4c
12:53 dalek rakudo/nom: 5d601c7 | jnthn++ | src/Perl6/Grammar.pm:
12:53 dalek rakudo/nom: Parse the fff variants of the flip-flop operators (though still NYI).
12:53 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5d601c7fdc
12:53 dalek rakudo/nom: e5d47e5 | jnthn++ | src/ (2 files):
12:53 dalek rakudo/nom: Redo the flip-flop implementation. This also covers the fff from, doesn't suffer the scoping issues in the previous version and passes all but the final two tests in flip-flop.t (which seem to run into scoping issues that aren't the flip-flop operators fault anyway).
12:53 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e5d47e5d7e
12:53 dalek rakudo/nom: ad47906 | jnthn++ | t/spectest.data:
12:53 dalek rakudo/nom: Turn on flip-flop.t.
12:53 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ad4790605e
12:54 not_gerd moritz: I was wondering if teh script just exhausted the 32-bit address-space
12:55 dalek features: 0146fa6 | jnthn++ | features.json:
12:55 dalek features: Rakudo now supports the fff form of the flip-flop operators.
12:55 dalek features: review: https://github.com/perl6/f​eatures/commit/0146fa6179
12:56 moritz not_gerd: I've set a ulimit of 1GB, so it won't go over 3GB anyway
12:56 not_gerd it took ~3GB here before dying, so it might have actually reached that limit here
12:56 dalek rakudo/nom: 30c0796 | jnthn++ | docs/ChangeLog:
12:56 dalek rakudo/nom: ChangeLog update.
12:56 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/30c0796448
12:58 dalek tablets: 2aa4b00 | (Herbert Breunung)++ | docs/ (2 files):
12:58 dalek tablets: polish and operation
12:58 dalek tablets: review: https://github.com/perl6/tablets/commit/2aa4b00c2a
13:02 dalek rakudo/nom: b09c6f8 | moritz++ | / (5 files):
13:02 dalek rakudo/nom: remove . from default @*INC
13:02 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b09c6f8cda
13:02 not_gerd arguably, this makes the Rakudo of ~2009 more useful for real-world tasks
13:02 not_gerd I'm guessing the more feature-complete regex engine is to blame?
13:02 moritz not_gerd: only for those involving lots of regexes, I think
13:03 moritz well, it's more feature complete but still not quite mature enough, I think
13:04 lorn_ joined #perl6
13:05 JimmyZ moritz: your commit lost something?
13:06 moritz JimmyZ: you're right, I delete the wrong line :(
13:06 JimmyZ hehe
13:07 * jnthn was just looking at it and noticed the same...
13:07 moritz JimmyZ++, jnthn++ # reviewing my commits
13:07 moritz ok, spectesting with the correct fix now
13:12 dalek rakudo/nom: 632b1f9 | moritz++ | src/core/terms.pm:
13:12 dalek rakudo/nom: actually remove . from @*INC
13:12 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/632b1f9898
13:22 xenu joined #perl6
13:25 dalek tablets: 248f42b | (Herbert Breunung)++ | docs/appendix-g-glossary.txt:
13:25 dalek tablets: repair and add some links
13:25 dalek tablets: review: https://github.com/perl6/tablets/commit/248f42ba0e
13:33 tokuhirom joined #perl6
13:33 moritz p6: say 'foobar'.rindex('o')
13:33 p6eval pugs, rakudo b09c6f, niecza v17-2-gb8fcf85: OUTPUT«2␤»
13:33 moritz p6: say 'foobar'.rindex('o', 0)
13:33 p6eval niecza v17-2-gb8fcf85: OUTPUT«Num()␤»
13:33 p6eval ..rakudo b09c6f: OUTPUT«2␤»
13:33 p6eval ..pugs: OUTPUT«-1␤»
13:33 mdupont joined #perl6
13:34 moritz 3 compilers, 3 answers
13:36 tyatpi joined #perl6
13:37 moritz jnthn: I thought a bit about 'is export' needing to walk outer packages
13:37 moritz jnthn: I see two possibilities: an outer_package pointer in Stash (or maybe in the package itself)
13:37 lorn_ joined #perl6
13:37 moritz jnthn: or we could keep a stack of package in a dynamic variables at compile time
13:38 moritz jnthn: which one would you prefer?
13:39 noam joined #perl6
13:43 jnthn moritz: I'd been thinking about the stack
13:43 jnthn Guess the other way works too though and makes the info introspectable at runtime...
13:44 lorn_ joined #perl6
13:45 moritz so, any preference? :-)
13:47 jnthn moritz: Well, I'm looking at S02 and seeing:
13:47 jnthn PARENT      # Symbols in this package's parent package (or lexical scope)
13:47 jnthn (That's a pseudo-package.)
13:48 jnthn Since those can be done indirectly like ::('PARENT')::<$x> we'll need a way to walk that chain at runtime.
13:48 moritz doesn't every package except UNIT has a parent package?
13:48 jnthn Well, and UNIT is really a lexical scope and thus a pseudo-package
13:49 jnthn I guess other lexical packages don't have a parent package though
13:49 jnthn my module Foo { }
13:50 jnthn Depends if you expect Bar's PARENT pointing to Foo to imply that Foo::Bar also works out.
13:51 moritz it's not clear to me if PARENT and the outer packages that 'is export' needs are the same chain
13:52 gfldex o.0 what happend to startup time over night?
13:52 skids joined #perl6
13:52 gfldex well, i know what happend, it is less then halve now
13:52 gfldex but why?
13:52 moritz it happened in February, actually :-)
13:52 moritz the bounded serialization branch brought that
13:53 moritz we don't construct our full type hierarchy at startup anymore, we "simply" deserialize it
13:53 jnthn moritz: It's not clear to me either.
13:54 jnthn moritz: I'm +1 to going with an @*PACKAGES stack.
13:54 xenu_ joined #perl6
14:00 xenu_ joined #perl6
14:00 lorn_ joined #perl6
14:08 not_gerd left #perl6
14:08 moritz $ ./perl6 -e 'module A { class B { BEGIN { say nqp::atkey(@*PACKAGES, 0).gist } } }'
14:08 moritz A()
14:08 moritz $ ./perl6 -e 'module A { class B { BEGIN { say nqp::atkey(@*PACKAGES, 1).gist } } }'
14:08 moritz ===SORRY!===
14:08 moritz Method 'gist' not found for invocant of class 'B'
14:08 moritz the dangers of working with uncomposed classes :-)
14:08 moritz anyway, it seems that @*PACKAGES works-ish
14:09 moritz ... except that it retains B even after the closing curly :(
14:11 lorn joined #perl6
14:12 alester joined #perl6
14:13 lorn left #perl6
14:21 xenu joined #perl6
14:22 kaare_ joined #perl6
14:25 fhelmberger joined #perl6
14:27 spaceships joined #perl6
14:29 tokuhirom joined #perl6
14:31 [Coke] /away
14:31 * [Coke] wonders how he did that.
14:31 moritz [Coke]: in irssi there are ctrl+somechar control sequences for that
14:32 moritz ctrl+b for bold
14:32 geekosaur ctrl+u is mIRC spec for underline
14:32 geekosaur (styles were initially defined by mIRC and somehow became standard....)
14:34 dalek Perlito: 1b4e7ee | (Flavio S. Glock)++ | TODO-perlito5:
14:34 dalek Perlito: Perlito5 - TODO update: typeglobs
14:34 dalek Perlito: review: https://github.com/fglock/​Perlito/commit/1b4e7eed4a
14:35 alim joined #perl6
14:36 zby_home_ joined #perl6
14:36 xenu_ joined #perl6
14:38 dalek rakudo/nom: 40547d6 | moritz++ | src/Perl6/Grammar.pm:
14:38 dalek rakudo/nom: track current packages in @*PACKAGES
14:38 dalek rakudo/nom:
14:38 dalek rakudo/nom: we will need it for exporting from nested packages
14:38 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/40547d68e1
14:45 goraki_ joined #perl6
14:45 dalek Perlito: f0f0aef | (Flavio S. Glock)++ | TODO-perlito5:
14:45 dalek Perlito: Perlito5 - TODO update: context
14:45 dalek Perlito: review: https://github.com/fglock/​Perlito/commit/f0f0aefd14
14:45 lorn joined #perl6
14:46 xenu_ joined #perl6
14:59 fgomez joined #perl6
15:03 alim joined #perl6
15:18 JimmyZ joined #perl6
15:24 xenu joined #perl6
15:26 gfldex but why?
15:26 gfldex sorry WH
15:26 TimToady .oO(wrong house?)
15:27 goraki_ That's what I was wondering?
15:27 PerlJam wrong human
15:28 goraki_ joined #perl6
15:28 moritz wrong Higgs boson :-)
15:33 spider-mario joined #perl6
15:34 spider-mario hello
15:34 moritz \o spider-mario
15:35 spider-mario n: (1 ... 10).map: &say
15:35 p6eval niecza v17-2-gb8fcf85:  ( no output )
15:35 JimmyZ joined #perl6
15:35 spider-mario p: (1 ... 10).map: &say
15:35 p6eval pugs: OUTPUT«*** ␤    Unexpected "10"␤    expecting operator or ")"␤    at /tmp/sMAJPqeSp0 line 1, column 8␤»
15:35 spider-mario r: (1 ... 10).map: &say
15:35 p6eval rakudo 40547d:  ( no output )
15:36 spider-mario what I get with my local copy of rakudo is:
15:36 spider-mario This type cannot unbox to a native integer
15:36 spider-mario is that a bug?
15:36 spider-mario it works with {.say} or {say $_} instead of &say
15:37 moritz it's a known bug
15:37 moritz related to &say having a slurpy in its siganture
15:37 moritz *signature
15:37 spider-mario oh, ok
15:37 moritz the correct thing to do is to pass all arguments straight to say
15:37 spider-mario thanks
15:37 moritz which is not what you'd expect
15:39 xenu_ joined #perl6
15:40 dalek rakudo/nom: 397cafd | jnthn++ | docs/ROADMAP:
15:40 dalek rakudo/nom: Remove a completed ROADMAP item; moritz++.
15:40 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/397cafd989
15:41 JimmyZ moritz++ indeed
15:42 moritz exporting from nested packages is a bit more complicated
15:42 jnthn moritz: What makes it so?
15:43 moritz jnthn: it seems I have to create an EXPORT package inside each package we create
15:43 moritz r: say EXPORT.WHAT
15:43 p6eval rakudo 40547d: OUTPUT«EXPORT()␤»
15:43 jnthn moritz: yes.
15:43 moritz r: say OUR<EXPORT>.WHAT
15:43 p6eval rakudo 40547d: OUTPUT«Any()␤»
15:44 moritz r: say MY<EXPORT>.WHAT
15:44 p6eval rakudo 40547d: OUTPUT«Method 'postcircumfix:<{ }>' not found for invocant of class 'Perl6::Metamodel::ModuleHOW'␤  in block <anon> at /tmp/1wgo_SzN2n:1␤␤»
15:44 moritz r: say ::MY<EXPORT>.WHAT
15:44 p6eval rakudo 40547d: OUTPUT«Method 'postcircumfix:<{ }>' not found for invocant of class 'Perl6::Metamodel::ModuleHOW'␤  in block <anon> at /tmp/3euzNd1o_B:1␤␤»
15:44 jnthn r: say MY::<EXPORT>.WHAT
15:44 p6eval rakudo 40547d: OUTPUT«EXPORT()␤»
15:44 jnthn :)
15:44 moritz ok :-)
15:44 jnthn moritz: But it should be possible to create it on demand.
15:44 jnthn $module.WHO<EXPORT> = anon package EXPORT { };
15:44 jnthn Or so.
15:45 moritz jnthn: does that mean that $*EXPORT is going away?
15:45 jnthn moritz: $*EXPORT is always the one in UNIT.
15:45 jnthn moritz: Thing is that we actually create that up front...since it lives in a lexpad.
15:46 moritz but the other EXPORTs only live in the package. Got it.
15:46 jnthn Yeah.
15:46 TimToady also, packages don't promise export, only modules, and things that think they're modules
15:46 TimToady if it's easier to implement export everywhere, I suppose that's okay
15:46 moritz I can see how that might be slightly confusing, but then again if you muck with EXPORT yourself, you should be familiar with the system
15:47 jnthn TimToady: I currently would have to add something to make that distinction, fwiw.
15:47 jnthn TimToady: The current factoring just works everywhere.
15:47 TimToady well, if we ever get P5 packages, they won't have EXPORT...
15:47 jnthn True :)
15:48 TimToady that was the original intended meaning of package
15:48 smash joined #perl6
15:48 noam_ joined #perl6
15:49 Psyche^ joined #perl6
15:50 jnthn I've kinda stolen it to mean "something that doesn't care if you redeclare it with a module/class/role later"
15:50 jnthn Well, I think the spec hints at that meaning too anyway though.
15:50 TimToady some kind of liskov going on there...
15:52 TimToady well, it's really just mixins
15:54 xenu_ joined #perl6
16:01 am0c joined #perl6
16:02 TimToady re Regex shadowing, the current regex language used in compiling should be in the $~Regex slang, which doesn't have much to do with the current definition of Regex, and in fact is largely anonymous by necessity, since it might be a derived language
16:03 TimToady how this relates to single-dispatch types like Str is unclear though
16:04 TimToady if you're calling a compiler routine that has been defined elsewhere, it depends only on its Str definition at the point it was compiled
16:06 TimToady so something macro-y has to be involved to get this kind of confusion
16:07 jnthn Aye; NQP has a Regex type, but that doesn't get confused with the Regex type defined in CORE.setting.
16:07 TimToady more caffiene is a necessary but not necessarily sufficient condition for further progress...
16:07 jnthn :)
16:07 PZt joined #perl6
16:08 bbkr joined #perl6
16:08 TimToady we probably want to have our cake and eat it too, and this is one of those areas that you can't always get away with it...
16:09 xenu_ joined #perl6
16:11 TimToady basically the issue is to what extent types used by the compiler runtime are lifted into the compiling scope; we want to be able to do that to change the current language, but in this case we get burnt
16:12 jnthn Rakudo keeps a very clear idea of the symbols in the program its compiling and the program that's currently running.
16:12 jnthn The issue is where it should find things like Str when making e.g. a string constant.
16:12 jnthn At present, it just looks up what Str means in the scope it is currently compiling.
16:13 TimToady well, maybe a first approximation is not to allow shadowing of critical compiler classes outside of MONKEY_TYPING
16:13 jnthn Where would it look? CORE or SETTING?
16:14 TimToady I mean blow up if it sees "class Str"
16:14 noam_ joined #perl6
16:15 TimToady maybe we need a slang for the current type system of the compiler
16:15 PerlJam as far as I've read through this conversation just now, "blow up on 'class Str'" gets my vote  :)
16:15 TimToady so you have to be a bit more intentional about overriding it
16:16 jnthn TimToady: I'm struggling a bit with where we draw the line.
16:16 TimToady well, me too :)
16:16 jnthn :)
16:18 sudokode joined #perl6
16:19 TimToady part of what's going on here is that we've considered the current language to be defined lexically, and mostly tried to keep the type system orthogonal to that, on the assumption that any polymorphism will just work under liskovian rules, but clobbering Str like that is violating some kind of contract somewhere
16:21 TimToady so suppose as a thought experiment we define a "string" slang, $~Str or some such.  What's the next type that blows up this way?
16:21 jnthn The numerics.
16:22 TimToady so suppose we define other slangs for those types.  what's the next failure mode?  failure to convert from compiler types to user types?
16:24 jnthn There's no "compiler types" issue, so far as I can see.
16:24 jnthn The compiler expects the types to obey certain contracts.
16:24 jnthn Those contracts are things like, "knows how to box this native type" or "has a new method that looks like this" and so forth.
16:25 jnthn For Code objects, the relations get a bit intimate...
16:25 jnthn It goes poking at attributes and so forth.
16:25 jnthn Then, the guts in various places expect code objects to be laid out in a certain way.
16:25 TimToady and the contract evolves over time too
16:26 jnthn Yeah.
16:26 TimToady maybe the conservative thing is to make a list of "reserved types", and you can't define those without MONKEY_TYPING, and then if you do, expect weird failure modes
16:26 jnthn It's all kind of a meta-model to me. There are places we've picked an interface, contract etc. and already expose it. There's others where things are considered "internals" still.
16:27 masak lol hai #perl6
16:27 jnthn ohhai, masaksan
16:28 moritz lolshark masak!
16:28 * masak backsharks
16:28 xenu joined #perl6
16:29 masak r: package A { class Str {}; our sub foo() { return Str.new } }
16:29 p6eval rakudo 397caf: OUTPUT«===SORRY!===␤This type cannot box a native string␤»
16:29 masak inneresting.
16:29 jnthn masak: See discussion in ticket and also during the day :)
16:30 snearch joined #perl6
16:31 masak nodnod
16:32 thou joined #perl6
16:32 fgomez joined #perl6
16:35 zby_home_ joined #perl6
16:39 thelazydeveloper joined #perl6
16:40 masak p6: my $x = (); say $x.WHAT
16:40 p6eval rakudo 397caf, niecza v17-2-gb8fcf85: OUTPUT«Parcel()␤»
16:40 p6eval ..pugs: OUTPUT«Array␤»
16:45 dalek rakudo/nom: 9cdfbfa | moritz++ | src/core/traits.pm:
16:45 dalek rakudo/nom: is export() now installs tags in the current and outer packages, not just in UNIT
16:45 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/9cdfbfaccf
16:47 jnthn \o/
16:47 jnthn moritz++
16:47 * jnthn has some patches too :)
16:48 dalek rakudo/nom: d2e01f1 | jnthn++ | src/ (2 files):
16:48 dalek rakudo/nom: Give enums the capability to produce a role based on themselves.
16:48 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d2e01f1d1c
16:48 dalek rakudo/nom: 80416be | jnthn++ | src/core/operators.pm:
16:48 dalek rakudo/nom: Get does and but operators to handle turning non-composable types into composable ones, or dying helpfully.
16:48 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/80416bef52
16:48 dalek rakudo/nom: 423b292 | jnthn++ | t/spectest.data:
16:48 dalek rakudo/nom: Run S12-enums/as-role.t.
16:48 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/423b2924a6
16:48 dalek rakudo/nom: 97d2c72 | jnthn++ | .gitignore:
16:48 dalek rakudo/nom: Add lib/lib.pir to .gitignore.
16:48 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/97d2c72e97
16:48 moritz and I think I know what ails the import statement
16:48 jnthn moritz: Partly what you just fixed, no? :)
16:48 jnthn .oO( I prefer alements to ailments... )
16:51 dalek rakudo/nom: 0a5caa9 | jnthn++ | docs/ROADMAP:
16:51 dalek rakudo/nom: Remove another completed ROADMAP item.
16:51 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0a5caa9634
16:53 xenu_ joined #perl6
16:58 xenu_ joined #perl6
16:59 dalek rakudo/nom: c95b593 | moritz++ | src/Perl6/Grammar.pm:
16:59 dalek rakudo/nom: fix import thinko
16:59 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c95b59336c
17:00 dalek roast: 65f0631 | jnthn++ | S02-magicals/file_line.t:
17:00 dalek roast: Unfudge a couple of passing tests.
17:00 dalek roast: review: https://github.com/perl6/roast/commit/65f0631b49
17:01 moritz $ ./perl6 -e 'module A { sub f is export { say "SHARK" } }; import A; f'
17:01 moritz SHARK
17:03 jnthn \o/
17:04 birdwindupbird joined #perl6
17:05 PacoAir joined #perl6
17:10 jnthn r: END { say 42 }; exit
17:10 p6eval rakudo 397caf:  ( no output )
17:12 dalek rakudo/nom: 4b16cae | moritz++ | / (2 files):
17:12 dalek rakudo/nom: coerce arglist to import to an RPA
17:12 dalek rakudo/nom:
17:12 dalek rakudo/nom: now import Type :DEFAULT; works the same as a bare import Type
17:12 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4b16cae462
17:13 mspaulding joined #perl6
17:14 mspaulding left #perl6
17:16 dalek roast: fe93c85 | jnthn++ | S04-phasers/end.t:
17:16 dalek roast: Test that exit runs END phasers.
17:16 dalek roast: review: https://github.com/perl6/roast/commit/fe93c85fb5
17:16 dalek rakudo/nom: 1b5ab32 | jnthn++ | src/core/control.pm:
17:16 dalek rakudo/nom: Run END phasers when exit terminates a program.
17:16 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1b5ab32107
17:17 fgomez joined #perl6
17:17 erkan joined #perl6
17:17 erkan joined #perl6
17:18 masak interesting backlog. moritz++ jnthn++ TimToady++
17:21 * colomon now feels bad for ignoring #perl6 for the last six hours...
17:22 masak ignoring #perl6 is always worth regretting :P
17:22 goraki joined #perl6
17:24 masak TimToady: this feels a bit like the Steele PDF we talked about once: http://clojure.com/blog/2012/05/08/reducers-a-l​ibrary-and-model-for-collection-processing.html
17:25 masak (the one about parallelism in Fortress)
17:28 xenu joined #perl6
17:30 dalek roast: df8cc85 | jnthn++ | S14-traits/package.t:
17:30 dalek roast: Update a test for current spec; doesn't actually run yet, but at least it's not utterly wrong anymore.
17:30 dalek roast: review: https://github.com/perl6/roast/commit/df8cc85307
17:30 derrazo joined #perl6
17:31 moritz eeks, it seems that use + import collide :/
17:31 sorear good * #perl6
17:31 derrazo left #perl6
17:31 masak sorear! \o/
17:32 jnthn moritz: collide?
17:32 jnthn o/ sorear
17:33 dalek rakudo/nom: 7a9b1e5 | jnthn++ | docs/ChangeLog:
17:33 dalek rakudo/nom: Couple of extra ChangeLog items.
17:33 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7a9b1e5e54
17:33 jnthn moritz: I'd kinda expect them to ignore the imported symbols since they're identical.
17:34 jnthn moritz: Guess there's always a chance it's something silly like containers getting in the way of NQP's =:= check.
17:35 preflex_ joined #perl6
17:35 moritz jnthn: it's something even more silly. It's that if I do a 'use Test;', then the module inside my test file exports &plan, and not the symbol it should export
17:36 moritz maybe that   anon package EXPORT { } gets reused or so
17:36 jnthn moritz: er
17:36 jnthn d'oh
17:36 jnthn yes. :)
17:36 jnthn Let's do Metamodel::PackageHOW.new_type(:name('EXPORT')) instead :)
17:36 jnthn jnthn--
17:36 moritz ... and compose it, no?
17:37 jnthn Yeah.
17:37 jnthn Though compose on a PackageHOW is a noop I guess.
17:37 moritz jnthn: it sets $!composed to 1 :-)
17:37 jnthn yeah, just noticed that ;)
17:39 masak std: sub circumfix:<#{ }>(*@elems) { set @elems }; #{ 1, 2, 3 }; two terms in a row
17:39 p6eval std fab64fc: OUTPUT«Possible attempt to put comments in qw() list at (eval 247) line 87.â�¤Potential difficulties:â�¤  Embedded comment seems to be missing backtick at /tmp/kFfUh3zg9S line 1:â�¤------> [32m}>(*@elems) { set @elems }; #{ 1, 2, 3 }[33mâ��[31m; two terms in a row[0mâ�¤ok 00:00 4…
17:39 moritz std: qw()
17:39 p6eval std fab64fc: OUTPUT«[31m===[0mSORRY![31m===[0m�Undeclared routine:� 'qw' used at line 1�Check failed�FAILED 00:00 40m�»
17:39 masak agreed. not ideal.
17:39 masak TimToady: ^^^
17:39 moritz it shouldn't say 'qw() list' when qw() is not a quoting construct
17:41 daxim joined #perl6
17:41 tyatpi joined #perl6
17:43 xenu_ joined #perl6
17:44 TimToady um, that seems to be a Perl 5 error
17:45 TimToady the string 'qw()' does not occur in the std directory
17:46 TimToady n: sub circumfix:<#{ }>(*@elems) { set @elems }; #{ 1, 2, 3 }; two terms in a row
17:46 p6eval niecza v17-2-gb8fcf85: OUTPUT«Potential difficulties:â�¤  Embedded comment seems to be missing backtick at /tmp/l03KYU5PIZ line 1:â�¤------> [32m}>(*@elems) { set @elems }; #{ 1, 2, 3 }[33mâ��[31m; two terms in a row[0mâ�¤  &circumfix:<#{ }> is declared but not used at /tmp/l03KYU5PIZ line …
17:47 TimToady so it's really an artifact of STD using translation at a spot where emulation might be a bit more correct and considerably slower
17:49 masak ah.
17:49 TimToady translation is used heavily in STD, note that we're already up to (eval 247)
17:49 benabik left #perl6
17:49 benabik joined #perl6
17:49 TimToady and STD is pushing the limits of P5 very hard already
17:52 fglock joined #perl6
17:55 dalek roast: e81414b | moritz++ | S11-modules/import.t:
17:55 dalek roast: fix and expand import.t
17:55 dalek roast:
17:55 dalek roast: the old version used wrong scoping in eval_dies_ok, and importing by wrong names. Adds some tag exporting tests
17:55 dalek roast: review: https://github.com/perl6/roast/commit/e81414b4dd
17:56 moritz jnthn: does file_line.t actually pass for you?
17:58 dalek roast: 461a624 | moritz++ | S02-magicals/file_line.t:
17:58 dalek roast: fix file_line.t
17:58 dalek roast: review: https://github.com/perl6/roast/commit/461a624640
17:58 dalek tablets: cb768a4 | (Herbert Breunung)++ | docs/ (3 files):
17:58 dalek tablets: found better memorizer term for appendix h
17:58 dalek tablets: review: https://github.com/perl6/tablets/commit/cb768a43b7
17:58 cogno joined #perl6
17:58 moritz removing a fudge directive changes the line number :-)
17:58 adu joined #perl6
17:59 dalek rakudo/nom: 4fd2558 | moritz++ | src/core/traits.pm:
17:59 dalek rakudo/nom: fix export bug
17:59 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4fd2558db7
17:59 dalek rakudo/nom: 3c92ea2 | moritz++ | t/spectest.data:
17:59 dalek rakudo/nom: run import.t
17:59 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/3c92ea2792
17:59 HarryS joined #perl6
17:59 adu hi
17:59 moritz hello adu
18:00 adu perl6 is hard to learn
18:00 TimToady yeah, we've been trying for 11 years now...
18:00 adu heh
18:00 PerlJam adu: because there aren't enough learning resources?
18:01 PerlJam adu: because it's intrinsically difficult?
18:01 masak hi adu.
18:01 sisar PerlJam: aye. #lck of learning reources
18:01 adu no because, I try and read code after reading part of the spec
18:01 sisar *lack
18:01 masak could we make Perl 6 easier to learn for you in some way?
18:01 adu I'm trying to grok STD.pm6
18:01 masak heh.
18:02 TimToady maybe you should start with something easier...  :)
18:02 masak STD.pm6 is quite a huge program to try to grok.
18:02 adu and so far the only thing I've been able to glean is that numbers can have underscores
18:02 PerlJam adu: that's like trying to understand a person by looking at their innards
18:02 diakopte1 ++
18:02 masak p6: say 45_123
18:02 p6eval pugs, rakudo c95b59, niecza v17-2-gb8fcf85: OUTPUT«45123␤»
18:02 masak \o/
18:02 PerlJam adu: are you familiar with perl 5?
18:02 adu PerlJam: nope
18:03 PerlJam okie
18:03 TimToady what languages are you familiar with?
18:03 adu I'm coming from a Python/Haskell background
18:03 TimToady you might find rosettacode.org a better way, then
18:03 adu ok
18:03 TimToady you can compare P6 snippets with those languages
18:03 gfldex adu: http://rosettacode.org/wiki/Category:Perl_6
18:04 TimToady also, feel free to ask questions here
18:05 jnthn moritz: (file_line.t) yes, it passed, thus why I unfudged :)
18:05 dalek Perlito: 62d9c24 | (Flavio S. Glock)++ | / (3 files):
18:05 dalek Perlito: Perlito5 - javascript: add GLOB ref infrastructure
18:05 dalek Perlito: review: https://github.com/fglock/​Perlito/commit/62d9c24800
18:06 PerlJam It would be neat if rosettacode had a side-by-side comparison thing
18:07 icwiener joined #perl6
18:07 TimToady that's what windows are for
18:12 adu so I've been looking at things like: something:sym<!@#$>
18:12 spider-mario I think Perl 6 is what made me learn Perl 5
18:12 spider-mario not sure what made me learn Perl 6
18:12 spider-mario maybe Haskell
18:12 adu and I think it would be useful for operator expressions
18:13 adu but I can't figure out how
18:14 moritz adu: what are you trying to achieve?
18:14 adu I'd like to write a go compiler to parrot
18:15 moritz cool
18:15 sisar joined #perl6
18:15 adu I'm not sure how goroutines would work, tho
18:15 moritz adu: http://perlgeek.de/en/articl​e/mutable-grammar-for-perl-6 explains the :sym<> stuff
18:16 moritz me neither. Maybe #parrot on irc.perl.org has some ideas
18:16 xenu_ joined #perl6
18:16 adu another thing I'm not sure about is automatic semicolon insertion
18:17 adu it would best be a stage inserted between tokenization and the rule grammer, but I'm not sure how to do that in perl6
18:17 adu or NQP that is
18:18 adu also, what's the difference between { <…> } and {*}?
18:18 TimToady we do something like that with line-ending } assuming the end of statement
18:19 TimToady <...> is kind of a fossil, probably
18:19 TimToady if it's being used as a proto placeholder
18:19 adu yes
18:19 TimToady {*} is the new syntax
18:19 adu ok
18:19 adu good to know
18:20 TimToady which works for rules because the * would otherwise be illegal there
18:20 asdfqwerty joined #perl6
18:20 TimToady we used to use ... in normal protos, but that means something else in regexes
18:20 adu well, from what I gather it parses as a single token "{*}" not 3 tokens
18:21 TimToady STD does, not sure about rakudo
18:21 moritz I think rakudo parses it as a block containing a Whatever
18:21 moritz not as a single token
18:21 TimToady not in a regex it doesn't :)
18:21 moritz well, yes :-)
18:21 jnthn Think as a single token in regexes.
18:21 adu so does that mean { * } is equivalent?
18:22 jnthn Rakudo still supports the old syntax too, iirc.
18:22 * TimToady would prefer that to be written { {*} } if you really want whitespace
18:22 TimToady {*} at the outer block level is really just sugar for that
18:23 adu so how do I insert a stage between tokenization and rule parsing?
18:24 adu or is there another way to simulate ASI
18:24 benabik adu: nqp doesn't really separate out those stages.
18:25 TimToady adu: the curlycheck rule in STD basically supplies an implicit ; after a line-ending }
18:25 moritz adu: just parse a statementlist, and each statement goes until either a semicolon or a newline
18:25 benabik I _think_ it could be done by requiring something like [ ';' | $ ] at the end of statements.  But I don't recall if $ matches EOL or EOS
18:25 TimToady $$ for EOL
18:25 moritz benabik: EOS
18:26 adu that might work
18:26 TimToady note how the curlycheck rule does it
18:26 TimToady <?before \h* $$>
18:26 adu is that a positive lookahead?
18:27 moritz yes
18:27 adu what is \h?
18:27 TimToady there is a fancier alternative with <.unv> that allows for embedded comments and "unspace"
18:27 moritz adu: horizontal whitespace
18:27 TimToady horizontal ws
18:28 moritz adu: http://perlcabal.org/syn/S05.html is the p6 regex bible :-)
18:28 TimToady \v is vertical, of course
18:28 adu hmm ok
18:30 TimToady when curlycheck finds one, it sets a memo on the position in the input that can be used by any rule that is interested in statement termination at that point
18:32 adu so what does sigil:sym<@> do, does it assign the @ token to <sym>?
18:32 TimToady that's one of the things it does
18:33 moritz adu: did my first link not explain that?
18:33 adu I didn't understand that link
18:33 TimToady it also check for an endsym rule associated with the sigil syntactic category
18:34 moritz adu: which part did you not understand?
18:34 TimToady (though sigil doesn't have an endsym rule)
18:34 adu so could I use the rule with that syntax? like { <sigil:sym<@>> }
18:34 moritz adu: I'm always happy to improve my articles based on feedback
18:34 TimToady adu: you don't generally want to
18:34 moritz no, you use <sigil>
18:35 PerlJam moritz: I think he may be thinking of the link to S05
18:35 moritz and it matches all sigil:sym<somthing> rules as alternatives
18:35 TimToady think of syntactic categories as alternations without |
18:35 adu is it closed?
18:35 TimToady extensible
18:35 TimToady in derived languages
18:35 adu like <sigil> won't match something that's not in it's definition list?
18:36 TimToady depends on which language you're in; it's polymorphic
18:36 adu ok
18:36 TimToady that's how we extend P6
18:36 cogno joined #perl6
18:36 TimToady perl6: sub postfix:<!> ($x) { [*] 2..$x }; say 42!
18:37 p6eval pugs, rakudo 3c92ea, niecza v17-2-gb8fcf85: OUTPUT«140500611775287989854314​2606244511569936384000000000␤»
18:37 TimToady there, just added a token to <infix>
18:37 adu so would it be possible to extend perl6 to look like Go without compiling to parrot?
18:37 TimToady apples and oranges
18:37 TimToady but yes
18:38 TimToady Perl 6 thinks of all other languages as mere sub-dialects of Perl 6
18:38 adu right, that question might have made more sense either without extend or compile in it
18:38 alim joined #perl6
18:38 TimToady which backend is in use should be immaterial, eventually
18:39 TimToady nqp is currently bound to parrot, but the plan is to make that retargetable as well
18:40 asfqwerty_ hello. I was reading some problem today in a forum. I don't know much perl6 but for what i've read on the perl6 article in wikipedia, i think it might be done with junctions and/or lazy lists ....
18:40 TimToady also, there are still plenty of doctorate-level questions in the exact interplay of the current language with newly-minted languages; we were just thrashing out some of that earlier
18:41 moritz asfqwerty_: what problem are you pondering?
18:41 asfqwerty_ http://pastebin.ca/2145769
18:41 TimToady asfqwerty_: There's More Than One Way To Do It, generally
18:42 asfqwerty_ i'm not an expert programmer, but i have the feeling that those perl6 constructs might help to make such algorithms simpler...
18:42 adu moritz: I'll try giving the article another read
18:42 moritz asfqwerty_: they might. But if you're not an expert programmer, first you should find a correct solution at all, and only then worry about making it look neat
18:42 TimToady this looks like a bin-packing problem
18:43 adu what does category:mul_op mean?
18:44 TimToady asfqwerty_: see http://rosettacode.org/wiki/Knapsack_problem for possible algorithms
18:44 asfqwerty_ thanks TimToady :) i'll look into that and the "bin-packing" thing
18:44 TimToady category is itself a syntactic category that defines other categories
18:45 TimToady hence we bootstrap with category:category
18:45 adu ok
18:46 adu kind of mind bending
18:46 TimToady though STD only uses <category> in one spot, which might be a design smell
18:46 moritz and I might not need the category: thing in that article
18:47 TimToady adu: well, most people try to learn a new language by starting at the small end, not the large end... :)
18:47 diakopter asfqwerty_: that reminds me of a Google interview question someone told me they had
18:47 tadzik 'evening
18:47 adu subshortname?
18:47 adu TimToady: which end am I starting at?
18:48 TimToady not the small end :)
18:48 asfqwerty_ oh... so it must be a really hard problem
18:48 dalek rakudo/nom: ad3a7b6 | moritz++ | src/core/Str.pm:
18:48 dalek rakudo/nom: add native str concatenation op
18:48 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ad3a7b6403
18:48 alim joined #perl6
18:48 moritz asfqwerty_: not necessarily. There's not enough to solve really hard problems in interviews
18:48 kboga joined #perl6
18:49 TimToady in fact, subshortname is what allows us to have names like infix:<+>
18:49 adu ya, <category> is used in <subshortname> which is used in <sublongname> which is used in a lot of places
18:51 TimToady but oddly, not in method declarations, which is probably, as I say, a design smell
18:52 adu so is there a difference between categories and protos?
18:53 TimToady categories are a specialized kind of proto that takes longest token matching into account
18:53 TimToady most protos are merely doing multiple dispatch
18:54 sisar if someone can take a look: http://irclog.perlgeek.de/​perl6/2012-05-07#i_5555441
18:54 TimToady when you talk about lexer vs parser, this is something that is implicit in Perl 6
18:54 TimToady you just write the grammar, and Perl 6 derives a lexer for you from it
18:55 adu fascinating
18:55 TimToady and basically, every time you tweak the current language, it writes a new lexer
18:55 TimToady (hopefully reusing the reusable bits for efficiency)
18:55 PerlJam adu: magic is a common ingredient in Perl 6  ;)
18:55 TimToady so when I defined a new postfix above, it wrote a new lexer with a different set of tokens for the postfix rule
18:56 moritz sisar: nothing obvious
18:57 sisar moritz: maybe you can try it on your side? should I wait more than 3min ?
18:57 TimToady we're still trying to figure out how to do that efficiently, but it's the right way to do it from the viewpoint of allowing extensibility
18:57 moritz phenny: ask arnsholt if anything is blocking the merge of the cstr branches
18:57 phenny moritz: I'll pass that on when arnsholt is around.
18:57 moritz sisar: no need to wait that long
18:57 TimToady sorear++ likes to call this "wishful thinking", and it is
18:57 TimToady but to me, wishful thinking is another name for "vision"
18:57 sisar moritz: yeah, i figured.
18:58 moritz sisar: it seems to hang when passing a single value to merge_sort
19:01 TimToady and if language immutability is what turns out to make optimization possible, then I'd just point out that all the immutable languages are also sub-dialects of Perl 6...  :)
19:01 moritz sisar: ah, changing it to @a[ $m ..^ +@a ] fixes it
19:01 moritz known bug in the range op, iir
19:01 moritz c
19:02 sisar moritz: :) thanks for clearing that up. I was stumped for a while.
19:03 TimToady masak: yes, that paper is definitely in the same mindspace as Steele's, and where we want to head with the internals of hyper context.
19:03 moritz sisar: trying a fix now
19:04 sisar wow !
19:04 sisar today moritz++ and jnthn++ are on a roll :)
19:04 TimToady crumb, it's already lunchtime...how'd that happen?
19:05 diakopter mmm picnic
19:07 moritz r: say <jnthn moritz>.roll
19:07 p6eval rakudo 3c92ea: OUTPUT«jnthn␤»
19:07 TimToady adu: actually, what I'd really like to see is a Go backend for Perl 6 :)
19:07 moritz that would rock, yes
19:07 diakopter I thought perlito had one
19:08 adu well, I'm very familiar with Go
19:08 adu not sure what's involved in making a backend tho
19:09 TimToady jnthn++ has been thinking about that a lot lately
19:09 TimToady in a general way
19:09 adu would it compile Perl6 to Go code?
19:09 moritz yes
19:10 TimToady or to whatever Go compiles to, if there's some lower-level form
19:10 moritz "Perl 6 to go" -- "did you mean 'to take away?'"
19:10 adu TimToady: there are 3 lower-level forms
19:10 TimToady .oO(and then?)
19:10 diakopter I thought Go didn't have a runtime "eval" or code loading facility
19:10 jnthn .oO( I figure TimToady means I've been thinking about backends a lot more than Go a lot... :) )
19:11 TimToady so, to a low-level form that maximizes the product of portability and cleanliness
19:11 PerlJam jnthn: but whose backend?
19:11 jnthn PerlJam: ouch :P
19:11 TimToady diakopter: one would presumably have to include an interpreter of some sort in that case
19:11 Chillance joined #perl6
19:12 TimToady but hopefully an interpreter than can interact with compiled code as well
19:12 adu (1) C (which is a slightly nonstandard C which 6c/8c parses) (2) .s (which is an assembly language incompatible with gas), and (3) .o (which is a static library format incompatible with all linkers)
19:12 TimToady every VM is going to have emulate/translate decisions
19:13 isBEKaml joined #perl6
19:13 TimToady diakopter: and I'll note that Perl 5 is written in C, and yet provides 'eval'...it just doesn't do the compiling to C part very well yet...  :)
19:14 adu TimToady: then I would recommend just compiling to pure Go
19:14 TimToady the main problem with compiling to another high-level languages is where to do name-mangling
19:15 TimToady and how does the source language distinguish names that need to be mangled form those that don't
19:15 adu right, then maybe Go's C
19:15 TimToady same problem, slightly different keywords
19:15 birdwindupbird joined #perl6
19:16 TimToady but basically, same problem that STD has translating bits to P5, when P5 doesn't know about names like infix:<**>
19:17 adu well Go's C-naming convention is package(center dot)funcname
19:17 TimToady and P6 is probably just Go:: on the front of the name, or some such
19:17 TimToady otherwise we assume sufficient mangling to avoid collisions
19:18 adu TimToady: for example: runtime·memmove()
19:18 adu gcc doesn't accept the center dot, but 6c/8c do
19:18 TimToady we tend to be more specific about our "other language" since there may be other target languages than C
19:19 TimToady much like we use .perl where, say, Pything uses .repl
19:19 TimToady we assume there are many repls :)
19:19 adu you might do something like P6·say
19:19 TimToady you mean in the generated code?
19:19 adu yes
19:20 TimToady okay, that makes sense
19:21 adu but I feel like it would be possible to bring all of the Go runtime to parrot
19:21 TimToady we'll teach everyone how to use a Compose key yet...
19:21 adu lo
19:21 adu l
19:22 adu on mac it's shift-opt-9
19:22 TimToady how...mnemonic...
19:22 uniejo joined #perl6
19:22 adu heh
19:22 adu as in plan9?
19:22 TimToady compose . -  here
19:23 TimToady though why - I dunno.
19:24 TimToady CTRL+SHIFT u b 7 also works here under Gnome
19:24 TimToady I keep wishing for the vim digraphs under my compose key though...
19:25 TimToady I guess that's ^K . M in vim
19:27 TimToady perl6: sub don't-know ($x) { say "I dunno about $x." }; don't-know 'the details of Go identifiers'
19:27 p6eval pugs, rakudo ad3a7b, niecza v17-2-gb8fcf85: OUTPUT«I dunno about the details of Go identifiers.␤»
19:28 TimToady but I doubt it'd like that one
19:31 TimToady must...eat...lunch...
19:32 adu Haskell people would like that
19:33 xenu joined #perl6
19:39 tadzik 2 ***   other S02 data types -- KeySet, KeyBag
19:39 tadzik (ROADMAP) do we have something remaning here?
19:40 moritz tadzik: I think .Str is still not passing tests; otherwise it's implemented
19:40 tadzik I'll just assign myself to it and take care
19:41 moritz ++tadzik
19:41 dalek rakudo/nom: cc19e25 | moritz++ | src/core/Range.pm:
19:41 dalek rakudo/nom: make a range with Real min coerce the max to to Real too
19:41 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/cc19e25e2e
19:41 moritz sisar: that commit should fix the mergesort example from rosettacode
19:42 araujo joined #perl6
19:42 araujo joined #perl6
19:42 moritz sisar++ # bringing it to my attention
19:42 dalek rakudo/nom: 5ccbf3a | tadzik++ | docs/ROADMAP:
19:42 dalek rakudo/nom: Add myself to some ROADMAP things
19:42 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5ccbf3a757
19:43 tadzik KeySets remind me of some Roles things we couldn't agree upon on GPW
19:44 tadzik S14: a private attribute declared using has is private to the class, not to the role.
19:44 moritz ah right
19:44 moritz I think we agreed to change that
19:44 moritz but rakudo currently does neither/nor
19:44 tadzik yeah
19:45 jnthn What did we decide?
19:45 moritz r: role R { has $!a }; class A does R { has $!a };
19:45 p6eval rakudo ad3a7b: OUTPUT«===SORRY!===␤Attribute '$!a' already exists in the class 'A', but a role also wishes to compose it␤»
19:45 jnthn I agree the current situation is sub-optimal
19:45 tadzik something I've found lying around:
19:45 tadzik r: https://gist.github.com/2638792
19:45 p6eval rakudo ad3a7b: OUTPUT«Can not get non-existent attribute '$!a' on class 'MyRole'␤  in submethod BUILD at /tmp/yIypOHPuWo:8␤  in method BUILDALL at src/gen/CORE.setting:605␤  in method bless at src/gen/CORE.setting:590␤  in method new at /tmp/yIypOHPuWo:5␤  in block <anon> at /tmp/yIypOH…
19:45 moritz r: role R { has $!a }; class A does R { method x() { $!a } };
19:45 p6eval rakudo ad3a7b: OUTPUT«===SORRY!===␤Attribute $!a not declared in class A␤at /tmp/CG6sCOWzx4:1␤»
19:45 bbkr1 joined #perl6
19:45 raiph joined #perl6
19:46 moritz jnthn: I think we agreed to make the attributes private to the role
19:46 moritz so that two roles using attributes of the same name wouldn't conflict
19:46 jnthn moritz: OK
19:46 jnthn I like that.
19:46 jnthn I wonder how to make it happen. :)
19:46 moritz at least that's what I remember
19:46 tadzik yeah, something of this sort
19:46 jnthn I think it's easy until...it becomes uneasy :)
19:46 moritz and masak++'s bright face while talking about the encapsulation aspects of it :-)
19:47 tadzik you can resolve methods in the class consuming the roles, but it's not possible with attributes
19:49 * masak shows the bright face again, just to make sure that's how it happens
19:50 masak :D
19:50 * tadzik hears "hi hi" in the back of his head
19:50 tadzik the masak of Cheshire
19:53 jnthn Oh, I remember where things got messy.
19:54 jnthn The naive approach is to say "well, we just use the role as the lookup handle for attributes, rather than have the ::?CLASS type var and use its reification in the lookup"
19:54 jnthn Then you find that you have class A does R { }; class B is A does R { }
19:55 jnthn And oops, how the two compositions of the role are sharing storage slots.
19:55 jnthn s/how/now/
19:55 moritz hm, that's kinda consistent with the "roles never conflict with themselves" doctrine
19:55 jnthn moritz: Apart from they kinda are
19:56 moritz though not sure if that's desirable though
19:56 jnthn I suspect it ain't :)
19:57 masak that second role composition looks like a complete no-op to me.
19:57 jnthn Anyway, it seems you still need some genericity; it's probably that you somehow want the attribute lookups to have a type var other than ::?CLASS, that is mapped to the concrete role, but I think there may be an awkward circularity there..
19:57 jnthn masak: Flattening composition.
19:57 jnthn Do drive it home, we don't even need attributes:
19:57 * masak .oO( flattening will get you nowhere )
19:57 jnthn role R { method m() { 1 } }
19:57 jnthn class A does R { }
19:58 fglock re Go backend: perlito6 was bootstrapped in Go, but then Go changed (it was very new back then)
19:58 jnthn class B is A { method m() { 2 } }
19:58 jnthn class C is A does R { }
19:58 jnthn C.m
19:58 jnthn masak: Output of above?
19:58 masak 2
19:58 jnthn o.O
19:58 masak no?
19:58 TimToady fglock: Perl 6 changed too, I suspect.  :)
19:58 masak was that wrong? :)
19:59 masak jnthn: surely any method from the class hierarchy (even if not from that actual class) wins over a method from a role?
19:59 jnthn masak: You're saying that C's local decision to compose a role can result in that becoming a no-op because a parent class also composed it?
19:59 fglock that too :)
19:59 masak jnthn: oh wait!
19:59 masak sorry, I saw wrong. C doesn't inherit from B.
19:59 jnthn masak: You seem to think roles are invovled in dispatch...
19:59 jnthn argh
19:59 jnthn I meant for it to as well :(
19:59 jnthn I meant
19:59 jnthn class C is B does R { }
19:59 jnthn :)
19:59 jnthn And I still want "1"
19:59 masak jnthn: but you're saying that the R in C wins over B?
20:00 jnthn masak: Of ocurse it has to.
20:00 jnthn That's what flattening composition means.
20:00 fgomez joined #perl6
20:00 jnthn "Copy the role's declarations into the class"
20:00 masak r: role R { method m { 1 } }; class A does R {}; class B is A { method m { 2 } }; class C is B does R {}; say C.new.m
20:00 p6eval rakudo ad3a7b: OUTPUT«1␤»
20:00 masak jnthn: you're right.
20:00 moritz :-)
20:01 masak and I should know better than to argue with you about these things. ;)
20:01 fgomez joined #perl6
20:01 masak but yeah, that makes it more "interesting".
20:01 moritz p6: role R { method m { 1 } }; class A does R {}; class B is A { method m { 2 } }; class C is B does R {}; say C.new.m
20:01 p6eval pugs, rakudo ad3a7b, niecza v17-2-gb8fcf85: OUTPUT«1␤»
20:01 masak \o/
20:01 masak three compilers, one cup.
20:01 masak er. answer.
20:01 diakopter eek
20:01 tadzik argh
20:01 jnthn It was only *two* :P
20:01 moritz some people, when faced with a problem, think "Oh, I know, I'll use junctions". Now they have any(1, 2) problems
20:01 jnthn :D
20:01 masak moritz: autopun :P
20:02 moritz masak: you win a cookie
20:02 jnthn I'll make a branch in the next day or so to explore changing the role things, anyways.
20:03 jnthn I'm pretty optimistic P6opaque is up to the challenge, we just need to feed it the right info with regard to attribute lookups.
20:03 mdupont joined #perl6
20:04 masak \o/
20:17 TimToady btw, rosettacode is down, so if anyone here has su access there, help would be appreciated
20:17 kboga oh haai p6!
20:17 moritz \o kboga
20:17 masak kboga! \o/
20:17 moritz long time no see
20:19 moritz and back with a patch \o/
20:19 jnthn kboga: omgz...just saw your pull request!
20:19 kboga is it bad?
20:19 jnthn kboga: no, it's totally awesome that you've shown up with a patch for it :)
20:19 jnthn Wasn't expecting that :)
20:20 moritz we had a branch for that, real-trouble :-)
20:20 moritz it had some... trouble :-)
20:20 jnthn Right :)
20:20 * moritz spectests the patch
20:22 masak kboga++ # showing up with a patch
20:23 jnthn moritz: Patch looks good to me, after a read through.
20:23 jnthn +1 to apply if spectests are clean
20:23 jnthn kboga++
20:23 moritz it's a "I fixed your numbers" patch :-)
20:23 jnthn Real good!
20:24 kboga haha
20:25 moritz it passes the Torvalds tests 0 and 1, looks good and compilers
20:25 moritz *compiles
20:27 birdwind1pbird joined #perl6
20:28 benabik That's one more test than Linus uses for patches he sends to the git list.
20:28 TimToady which one?
20:29 benabik Compiles.
20:29 benabik I assume he's somewhat more rigorous about Linux patches.
20:35 dalek std: f4748eb | larry++ | STD.pm6:
20:35 dalek std: improve message on .meth (stuff)
20:35 dalek std:
20:35 dalek std: old message would point to the paren and say you needed parens...
20:35 dalek std: review: https://github.com/perl6/std/commit/f4748eb9ba
20:36 dalek rakudo/nom: 4157918 | kboga++ | / (10 files):
20:36 dalek rakudo/nom: Made Real a role, fixed the trouble with log & exp multi's that gave, fixed the num cmp's to return Order enum stuff, added missing round multi sub to Num, added missing methods to Real, added missing subs, enabled real-bridge.t which now passes.
20:36 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/415791868b
20:37 jnthn There's 200 more tests... o.O
20:37 jnthn kboga++ again
20:37 jnthn Probably tipped us over the 22,000 mark.
20:38 masak that... is impressive.
20:58 adu joined #perl6
21:02 Tedd1 joined #perl6
21:08 moritz [Coke]: FYI when smoking rakudo with t/spec/test_summary you now need  PERL6LIB=lib:.
21:08 moritz though in the long run I should really fix the tests and not require the .
21:11 adu Coke is smoking rakudo?
21:11 diakopter the rest of us get it second-hand
21:11 adu lol
21:12 masak smoked rakudo tastes the best.
21:13 moritz 22048 passes on my machine
21:13 moritz "total",     22048,     0,   709,  1887, 24644, 24117
21:15 jnthn \o/
21:15 wolfman2000 joined #perl6
21:18 tadzik kboga++
21:19 masak r: 24_117 - 22_048
21:19 p6eval rakudo 415791:  ( no output )
21:19 masak r: say 24_117 - 22_048
21:19 p6eval rakudo 415791: OUTPUT«2069␤»
21:20 masak we're running low on failing tests :P
21:20 tadzik weird, I have Tests=24102
21:20 moritz so, 15 difference
21:20 tadzik or those are passed+skipped?
21:20 masak oh!
21:20 masak r: say 24_644 - 22_048
21:20 p6eval rakudo 415791: OUTPUT«2596␤»
21:21 masak a bit better.
21:21 diakopter r: say delimit 241025348275725, "_"
21:21 p6eval rakudo 415791: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&delimit' called (line 1)␤»
21:23 masak r: sub delimit($_, $sep) { .flip.comb(/..?.?/).join($sep).flip }; say delimit 241025348275725, "_"
21:23 p6eval rakudo 415791: OUTPUT«241_025_348_275_725␤»
21:23 adu is this right? { '{' ~ '}' [ <element> ** ',' ] ','? }
21:23 masak adu: no, not anymore.
21:24 masak <element> ** ',' turned into <element>+ % ','
21:24 masak and those [] look superfluous to me.
21:24 adu ok
21:25 diakopter masak++ # delimit
21:26 moritz depends on which tool adu uses
21:26 masak troo
21:26 moritz nqp has the current syntax, nqp-rx still the old one
21:26 adu right now I'm using nqp
21:29 diakopter r: sub delimit($_, $sep) { .flip.comb(/..?.?/).join($sep).flip }; say delimit 241025348275725.3352, "_" # masak... I don't get it <-
21:29 p6eval rakudo 415791: OUTPUT«241_025_348_164_334␤»
21:29 diakopter brb
21:31 masak hm.
21:31 masak r: .say for 241025348275725.3352.flip.comb
21:31 p6eval rakudo 415791: OUTPUT«4␤3␤3␤4␤6␤1␤8␤4␤3␤5␤2␤0␤1␤4␤2␤»
21:31 masak r: .say for 241025348275725.3352.flip.comb(/..?.?/)
21:31 p6eval rakudo 415791: OUTPUT«433␤461␤843␤520␤142␤»
21:32 masak o.O
21:32 masak r: say 241025348275725.3352
21:32 p6eval rakudo 415791: OUTPUT«241025348164334␤»
21:32 masak ah.
21:32 masak bug?
21:32 pernatiy joined #perl6
21:33 colomon absolutely
21:33 colomon n: say 241025348275725.3352
21:33 p6eval niecza v17-2-gb8fcf85: OUTPUT«241025348275725.31␤»
21:34 * masak submits rakudobug
21:35 jnthn r: say (241025348275725.3352).WHAT
21:35 p6eval rakudo 415791: OUTPUT«Rat()␤»
21:35 jnthn Is it not just different levels of precision when the Rat is converted to a Num for printing?
21:35 jnthn Niecza normally gets a few more digits than Rakudo.
21:35 masak r: say 241025348275725.3352.nude
21:36 p6eval rakudo 415791: OUTPUT«301281685344656669 1250␤»
21:36 masak jnthn: seems you're right.
21:36 masak $ dc
21:36 masak 4k
21:37 masak 301281685344656669 1250/ p
21:37 masak 241025348275725.3352
21:37 * jnthn wonders if Rakudo can't get itself a bit more precision somehow though.
21:42 Chillance joined #perl6
21:45 * masak adds these new findings to the ticket
21:48 TimToady maybe it's a mistake to use Num as an intermediate form in Str conversion
21:50 jferrero joined #perl6
21:50 TimToady certainly it's easy to write the direct conversion, if you don't need E notation
21:51 dalek tablets: d29cec5 | (Herbert Breunung)++ | docs/ (2 files):
21:51 dalek tablets: linkfixes
21:51 dalek tablets: review: https://github.com/perl6/tablets/commit/d29cec5093
21:57 xenu joined #perl6
21:59 masak 'night, #perl6
22:02 xenu_ joined #perl6
22:05 dalek tablets: 69038e7 | (Herbert Breunung)++ | README.md:
22:05 dalek tablets: restructure the readme a bit
22:05 dalek tablets: review: https://github.com/perl6/tablets/commit/69038e7204
22:08 TimToady n: https://gist.github.com/2639796
22:08 p6eval niecza v17-2-gb8fcf85: OUTPUT«241025348275725.3352␤18446744​073709551616.33333333333333333333␤»
22:08 TimToady r: https://gist.github.com/2639796
22:08 p6eval rakudo 415791: OUTPUT«241025348164334.1113913352␤18446​744073709551616.33333333333333333333␤»
22:09 TimToady hm, almost works under rakudo
22:10 TimToady p: https://gist.github.com/2639796
22:10 p6eval pugs: OUTPUT«241025348275725.3352␤18446744​073709551616.33333333333333333333␤»
22:10 diakopter rat to string?
22:10 TimToady yes
22:11 TimToady except rakudo doesn't seem to handle the front integer well
22:12 TimToady oddly, it works right on my machine under rakudo
22:13 TimToady maybe I need to "upgrade"
22:13 diakopter which integer is the front one
22:14 TimToady 241025348275725
22:14 diakopter oh heh
22:21 _ilbot joined #perl6
22:21 Topic for #perl6 is now »ö« Welcome to Perl 6! | http://perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: http://irc.perl6.org/ | UTF-8 is our friend!
22:21 TimToady still works fine after recompile; is p6eval on a 32-bit machine?
22:21 * diakopter looks
22:22 diakopter no
22:22 TimToady strangeness
22:24 TimToady and we're running the same version...
22:24 diakopter p6eval@feather3:~/rakudo/parrot$ ./parrot -V
22:24 diakopter This is Parrot version 3.6.0-devel built for i386-linux.
22:24 TimToady well it's the same git hash as mine
22:25 TimToady can you have the same githash and be running a different branch?
22:25 diakopter is your parrot 64-bit?
22:26 noam_ joined #perl6
22:27 TimToady iv=long, intvalsize=8, intsize=4, opcode_t=long, opcode_t_size=8,
22:27 TimToady ptrsize=8,  byteorder=12345678,
22:27 TimToady nv=double, numvalsize=8, doublesize=8, longdoublesize=16
22:28 diakopter how'd you get that
22:28 TimToady these parameters are not terribly well named...
22:29 TimToady parrot/myconfig
22:29 diakopter iv=long, intvalsize=4, intsize=4, opcode_t=long, opcode_t_size=4,
22:29 diakopter ptrsize=4,  byteorder=1234,
22:29 diakopter nv=double, numvalsize=8, doublesize=8, longdoublesize=12
22:29 TimToady well, there you have it
22:30 TimToady parrot has wordsize dependencies...who'da thunk it?
22:30 diakopter all arithmetic should be arbitrary precision!!!
22:31 diakopter transcendentals should be used to their furthest known precision!!!
22:32 TimToady do I detect a note of sarcasm?
22:32 diakopter three triple-negating exclamation notes
22:33 ponbiki joined #perl6
22:33 * jnthn blaught: http://6guts.wordpress.com/20​12/05/08/since-the-hackathon/
22:33 TimToady "All music is folk music.  Ain't never heard no horse sing no song..."  --Louis Armstrong
22:33 jnthn :P
22:33 TimToady quadruple negative there
22:33 jnthn Teaching tomorrow so...sleep & o/
22:33 diakopter o/
22:33 TimToady \o
22:35 TimToady still and all, .floor shouldn't be limited by the integer word size, if the numerator is arbitrarily big
22:35 TimToady so I call rakudobug
22:35 diakopter Rodents of Unusual Size
22:36 TimToady now what gives me the idea that Unusual usually means Big there...
22:37 diakopter in the Fire Swamp, you hear a popping noise before the flames shoot up from the ground
22:37 TimToady well, yes, and I have a cat that keeps using the word "meow"
22:37 TimToady I don't think that word means what she thinks it means.
22:38 huf i think it always means what she wants it to mean :)
22:38 TimToady actually, right now, I think it means "I want to be slept under."
22:39 TimToady so nap &
22:39 huf hehe
22:42 skids joined #perl6
22:47 diakopter r: say 3875928375982735.383854792874359827349682.floor
22:47 p6eval rakudo 415791: OUTPUT«3875928375982729␤»
22:48 diakopter phenny: tell TimToady try  3875928375982735.383854792874359827349682.floor  on p6eval
22:48 phenny diakopter: I'll pass that on when TimToady is around.
22:57 spaceships joined #perl6
22:59 fgomez joined #perl6
23:03 xenu joined #perl6
23:15 xenu_ joined #perl6
23:25 fgomez joined #perl6
23:38 xenu joined #perl6
23:39 NamelessTee joined #perl6

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

Perl 6 | Reference Documentation | Rakudo