Camelia, the Perl 6 bug

IRC log for #perl6, 2010-04-21

Perl 6 | Reference Documentation | Rakudo | Niecza | Specs

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

All times shown according to UTC.

Time Nick Message
00:00 ruoso joined #perl6
00:01 jnthn lue: Yeah, there was a new monthly release today.
00:01 jnthn lue: We'll do a Rakudo monthly on Thursday that builds against it.
00:02 lue R* is coming!
00:02 jnthn Yes, but it's not this release. ;-)
00:02 lue ...
00:02 lue :(
00:02 jnthn lue: Rakudo * will not be one of the normal monthly releases.
00:03 lue oh.
00:03 lue :)
00:03 jnthn lue: The regularly monthly releases are just "compiler releases".
00:03 lue so when is R*
00:03 jnthn Rakudo * when it comes will be more than that - also some modules, module install tool, etc.
00:03 lue so it's been bumped to after April I take it ;)
00:04 jnthn lue: We didn't set exactly yet. It was planned for April originally, but we had to re-plan a bit; see http://use.perl.org/~Jonath​anWorthington/journal/40258
00:04 cognominal rakudo: my %e = enum < ook! ook. ook? >; %e<souk>++
00:04 p6eval rakudo cdb2b8:  ( no output )
00:05 jnthn cognominal: :-)
00:05 jnthn cognominal: Well, the anonymous enum constructor is just spec'd as giving you a Hash.
00:05 jnthn Well, last I checked it was anyway. :-)
00:07 * jnthn wonders if he can find the anonymous role bug before his beer runs out
00:07 jnthn ...not that I feel remotely tired, even though it's 2am. :-/
00:09 lue I don't know the situation concerning Pm, but from the several things I've seen, it's certainly valid (I want to use a word with a more positive connotation than valid actually)
00:09 elmex joined #perl6
00:09 lue I have noticed he's missing, though.
00:10 lue jnthn: you can do it! Stay up until 4! It's in you!!! :)
00:11 jnthn lue: I'm quite sure it is, my problem isn't actually tomorrow. It's more like, when I find out that on Thursday or Friday I'm meant to attend a meeting in another city that starts at 9am. ;-)
00:12 jnthn I try not to let my body clock skew too far; I'm actually employed now, and now and then have to suffer such annoyances as morning meetings. :-)
00:12 lue jnthn: just for you http://xkcd.com/361/
00:12 lue :)
00:12 jnthn lol :-)
00:13 lue I'm actually scared that you _do_ stay up 'til 3 every night. ( That guy has your name written all over himself :) )
00:14 jnthn On the upside, I think I found the bug...
00:16 lue \o/
00:16 Liig joined #perl6
00:16 * lue is uploading /dev/beer.h to CamelTorrent for jnthn
00:17 jnthn Oh, I went to the store today, the fridge is pretty loaded now. :-)
00:17 jnthn Also, why on earth do you have C header files in /dev?!
00:17 jnthn :-)
00:18 spreadsheet His /dev stands for development
00:18 spreadsheet ^_^
00:19 jnthn :-)
00:19 lue I made that goof a long time ago when I meant /usr/include
00:19 lue check the backlogs, I ended up making my /usr/include /dev and vice versa
00:19 lue (not in real life, although that would be awesome)
00:20 jnthn oh hey I fixed it.
00:20 jnthn > my $x = 42 but role { method omg { "wtf" } }; say $x.omg
00:20 jnthn wtf
00:22 lue resolution: <a href="example.com/patch.zip">patch.zip</a> [rated PG-13]
00:31 clkao joined #perl6
00:31 liig joined #perl6
00:32 lue I'm slightly more interested in making things to go with rakudo that coding rakudo itself :)
00:36 jnthn lue: That's fine. Do it. :-)
00:37 colomon lue: Anything you code using Rakudo will probably entertain you and help us find a few bugs.  :)
00:37 lue alright :)
00:37 jnthn colomon: I got sucked in to anonymous classes and roles this evening after fixing the earlier multi bug. I'll look at the next round of them tomorrow. :-)
00:37 colomon fair enough!
00:38 colomon I like seeing anonymous roles working too.  Though I admit as a programmer I'm not quite clear on why I'd want to use them.  ;)
00:38 lue why would you? They haven't revealed themselves yet :)
00:39 colomon woah!  lots of files changed by moritz_++, eh?
00:39 jnthn colomon: Yeah it's cool!
00:40 colomon groan.
00:40 lue ooh, separate Date.pm! (although I get the feeling its been around for a while)
00:41 colomon lue: nah, it doesn't date that far back.
00:42 jnthn groan.
00:42 colomon ;)
00:42 jnthn > my $x = 0 but role { method Bool { True } }; say $x; if ?$x { say "yay" }
00:42 jnthn 0
00:42 jnthn yay
00:42 jnthn Unfortunately, doesn't work without the ? :-/
00:43 colomon huh.  does if not call ? implicitly?
00:43 jnthn Seems not :-(
00:43 lue colomon: so it uses the epoch? :)
00:43 jnthn Ah well, that's another day's problem.
00:43 colomon I certainly don't have the time for it.
00:44 colomon oh wait, have we stopped with the Date puns?
00:45 lue .now() we have (sorry, really stopping)
00:45 jnthn Stop it this Instance!
00:45 jnthn *Instant
00:46 jnthn ETYPINGSPOILEDPUN
00:46 lue rakudo: die("Instance not yet implemented")
00:46 p6eval rakudo 07fd77: OUTPUT«Instance not yet implemented␤current instr.: '&die' pc 17238 (src/builtins/Junction.pir:400)␤»
00:47 jnthn rakudo: my $x = class { method lol { say "oh hai" } }; $x.lol
00:47 p6eval rakudo 07fd77: OUTPUT«oh hai␤»
00:47 jnthn \o/
00:47 jnthn Now that's what I call first class.
00:47 lue *hearty seaman's laugh*
00:48 lue .oO(jnthn must be getting week. It's ~2AM where he is)
00:48 colomon rakudo: my $x = class { method lol { say "oh hai" } };  my $a = $x.new; say $a.lol;
00:48 p6eval rakudo 07fd77: OUTPUT«oh hai␤1␤»
00:49 colomon \o/
00:49 lue :D
00:49 colomon rakudo: my $x = class does Real { method lol { say "oh hai" } };  my $a = $x.new; $a.lol;
00:49 p6eval rakudo 07fd77: OUTPUT«Malformed package declaration at line 11, near "Real { met"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
00:49 jnthn colomon: It takes does as the class name
00:50 jnthn colomon: STD does similar
00:50 jnthn colomon: You can do that, but you need to write :: in place of a name.
00:50 colomon rakudo: my $x = class :: does Real { method lol { say "oh hai" } };  my $a = $x.new; $a.lol;
00:50 p6eval rakudo 07fd77: OUTPUT«oh hai␤»
00:50 baisong joined #perl6
00:50 colomon jnthn++
00:50 colomon rakudo++
00:57 lue buubot: karma rakudo
00:57 buubot lue: rakudo has karma of 48
00:57 jnthn buubot: karma jnthn
00:57 buubot jnthn: jnthn has karma of 771
00:57 jnthn buubot: karma jonathan
00:57 buubot jnthn: jonathan has karma of 352
00:57 jnthn rakudo: say 771 + 352
00:57 p6eval rakudo 07fd77: OUTPUT«1123␤»
00:58 jnthn jnthn-- # flaunting karma wealth
00:58 lue buubot: karma jnthn
00:58 buubot lue: jnthn has karma of 770
00:58 lue 1122
00:59 dalek rakudo: ee9c308 | jonathan++ | src/builtins/Failure.pir:
00:59 dalek rakudo: Fix bug in error reporting of unknown subs (and attempts to invoke other fails).
00:59 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/e​e9c30830c78a58a6d391f93a41e46f4db025b45
00:59 dalek rakudo: 483a9da | jonathan++ | src/Perl6/Compiler/Role.pm:
00:59 dalek rakudo: The next step in unbreaking anonymous roles; still some issues, but this gets the basics actually working.
00:59 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/4​83a9da322ab24c20e868f71ae997ad6d368d8ef
01:01 lue http://xkcd.com/488/ ought to be put on a sticker and passed out amongst the crowd
01:05 jnthn sleep time for me, night all o/
01:05 TimToady o
01:05 TimToady /
01:06 jnthn .oO( Great, now I'll have a nightmare about being beheaded )
01:06 jnthn ;-)
01:06 * jnthn s.eeps
01:06 colomon o/
01:08 lue good night
01:36 gfx joined #perl6
01:46 lue afk
01:53 agentzh joined #perl6
01:57 gurjeet joined #perl6
01:58 Psyche^ joined #perl6
02:33 snarkyboojum joined #perl6
02:33 nihiliad joined #perl6
02:51 plobsing_ joined #perl6
02:56 ash__ joined #perl6
02:57 Sarten-X joined #perl6
03:18 petdance joined #perl6
03:31 molaf joined #perl6
03:31 Khisanth joined #perl6
03:37 lisppaste3 colomon pasted "Help needed from PIR experts..." at http://paste.lisp.org/display/98077
03:42 sorear colomon: the LHS of find_lex *must* be a P register
03:42 sorear lexicals are always PMCs
03:43 sorear incidentally, 'self' is a valid P register name
03:43 sorear it's implicitly .local'd by IMCC in every :method
03:44 sorear so assign %r, self  is probably fine
03:48 Sarten-X joined #perl6
03:48 sorear pmichaud, ping
03:49 ingy morning...
03:49 ingy for 10 more mins in .tw, anyway
03:53 yinyin joined #perl6
04:05 Sarten-X joined #perl6
04:12 meppl joined #perl6
04:19 snarkyboojum joined #perl6
04:49 jaldhar joined #perl6
04:55 gfx joined #perl6
04:57 kaare joined #perl6
05:00 ReiniUrban joined #perl6
05:13 jaldhar joined #perl6
05:25 snarkyboojum joined #perl6
05:44 ilogger2 joined #perl6
05:58 colomon joined #perl6
05:59 sorear 20:42 < sorear> colomon: the LHS of find_lex *must* be a P register
05:59 sorear 20:42 < sorear> lexicals are always PMCs
05:59 sorear 20:43 < sorear> incidentally, 'self' is a valid P register name
05:59 sorear 20:43 < sorear> it's implicitly .local'd by IMCC in every :method
05:59 sorear 20:44 < sorear> so assign %r, self  is probably fine
05:59 diakopter :)
06:12 meppl joined #perl6
06:13 * sorear tries to avoid pinging
06:14 snarkyboojum rakudo: say Nil.end
06:14 p6eval rakudo 483a9d: OUTPUT«-1␤»
06:18 uniejo joined #perl6
06:19 sorear rakudo: class X { method postcircumfix:<( )>() { say "Hi!"; }; }; (X.new)();
06:19 p6eval rakudo 483a9d: OUTPUT«Too many positional parameters passed; got 2 but expected 1␤current instr.: 'perl6;X;postcircumfix:<( )>' pc 392 (EVAL_1:170)␤»
06:19 sorear whaaat
06:26 eternaleye rakudo: class X { method postcircumfix:<( )>() { say "Hi!"; }; }; my $foo = X.new; $foo.();
06:26 p6eval rakudo 483a9d: OUTPUT«Too many positional parameters passed; got 2 but expected 1␤current instr.: 'perl6;X;postcircumfix:<( )>' pc 420 (EVAL_1:176)␤»
06:27 mberends joined #perl6
06:27 mberends \o
06:27 eternaleye o/
06:27 mberends made a bit of progress in proto :-)
06:27 sorear yay
06:29 TimToady ʎɐʎ
06:30 diakopter mberends: yoyoyoyo
06:32 sorear where do you get all those fancy characters?
06:33 TimToady .u turned
06:33 TimToady well, I have a program that scans the Unicode descriptions
06:33 sorear is \N unique to P6?
06:34 TimToady so far :)
06:34 TimToady so are \h and \v, I think
06:34 sorear I'm not really a big fan of reading \U0001013E in source code
06:35 TimToady well, AEGEAN MEASURE SECOND SUBUNIT isn't much better...
06:35 TimToady sorear: are you confusing p6's \N with p5's \N?
06:35 TimToady p6's has nothing to do with Unicode
06:35 TimToady it's "not a newline"
06:36 TimToady rakudo: say "\c[AEGEAN MEASURE SECOND SUBUNIT]"
06:36 p6eval rakudo 483a9d: OUTPUT«𐄾␤»
06:36 sorear I thought \N{AEGEAN MEASURE SECOND SUBUNIT} was used in double quotey strings
06:36 sorear that's the p5 one?
06:37 TimToady yes
06:37 TimToady was combined with \c in p6
06:37 TimToady so \N could be any character that isn't at a \n match
06:38 sorear does \n match more than just \u000A ?
06:38 Cristina_ joined #perl6
06:38 TimToady hmm
06:38 TimToady std: /\N{AEGEAN MEASURE SECOND SUBUNIT}/  # should complain about undefineds
06:38 iblechbot joined #perl6
06:38 p6eval std 30424: OUTPUT«[31m===[0mSORRY![31m===[0m␤Undeclared names:␤        'AEGEAN' used at line 1␤  'MEASURE' used at line 1␤ 'SECOND' used at line 1␤  'SUBUNIT' used at line 1␤Check failed␤FAILED 00:01 110m␤»
06:38 TimToady good
06:39 spinclad diakopter: (syntax for continuations): i like    cont_1234(params): ...   and   goto cont_1234(args);   along with passing them around as args and params
06:39 TimToady sorear: yes, \n matches any logical newline for common OSes
06:39 TimToady in p6, not in p5
06:40 spinclad after all, '(calling) a continuation is just a goto with arguments'
06:40 diakopter spinclad: params?
06:40 diakopter what arguments/params?
06:42 `snarkyboojum joined #perl6
06:42 `snarkyboojum left #perl6
06:42 spinclad (1) a continuation is a label with parameters, you goto it with arguments;  (2) as first-class things, continuations can get passed around
06:42 Bzek joined #perl6
06:42 diakopter what are the parameters? (where do they go)
06:43 diakopter I mean, where do the arguments go
06:43 spinclad (two separate things really; having both cases of params/args in one line was confusing things i suppose)
06:44 spinclad not sure of yourr question
06:44 diakopter cont_1234(5)  where does the 5 go
06:44 spinclad the arguments go:   goto $c(args);
06:45 diakopter where does the 5 end up:
06:45 diakopter ?
06:45 spinclad it gets bound to   cont(int $i):
06:45 diakopter and where does $i end up
06:45 sorear mberends: I was looking at vill the other day, very neat
06:46 spinclad and the code after the cont(...): label will see it bound
06:46 scottamatot joined #perl6
06:46 mberends sorear: :-) vill is on ice until Rakudo * is out
06:46 spinclad a label with parameters, a goto with  arguments
06:46 diakopter ok; I haven't thought of it that way
06:47 diakopter I didn't see the need for parameters/arguments, but I can see how that would be useful.
06:47 spinclad that's what i was playing with yesterday and the day before
06:48 spinclad that's how you can translate loops and conditionals down to 'assembly' code
06:49 sorear Where do anonymous methods fit into the Spectrum of Language Feature Insanity?
06:50 spinclad well, especially loops: variables updated per iteration can just be bound at entry
06:50 sorear SSA and CPS make a /beautiful/ combination
06:51 spinclad sorear: along with anonymous first-class values of other types, /me thinks
06:51 spinclad sorear: agreed
06:51 _jaldhar joined #perl6
06:51 sorear in the context where I am speaking, methods are not values
06:52 sorear they are names
06:52 sorear method $method () { ... }   # overrides the method defined with name $method in a superclass
06:52 sorear could be implemented with a gensym
06:52 spinclad in the context i'm speaking from, they are values you can get to by name
06:54 spinclad /get to by any means in the language
06:55 spinclad including the name-to-method namespace hash in the class metaobject
06:55 spinclad (aka vtable)
06:56 spinclad (or rather, the vtable may be its runtime residue)
06:57 spinclad but never mind me; just another ivory tower nutcake
07:01 scottamatot there are no just ivory tower nutcakes
07:03 sorear the ivory tower is something that they invented to stop people from daring to dream
07:06 snarkyboojum those "they" people - incorrigible
07:07 spinclad but these nuts taste just dreamy
07:08 spinclad crunchy, too -- i think they may be showing some promise
07:12 scottamatot promising nuts, o' all tings!
07:15 jaldhar_ joined #perl6
07:16 * sorear prepares to be shot down
07:16 * moritz_ takes up his shot gun
07:17 moritz_ rakudo: say Date.new('0000-01-01').daycount
07:17 p6eval rakudo 483a9d: OUTPUT«-678940␤»
07:17 scottamatot I'm convinced ivory towers were invented by elephants. Who else has the capital?
07:18 moritz_ each country has a capital :-)
07:19 mberends alpha: my @a=<2 3>;my @b=@a.map({$_ xx 2});@b.perl.say
07:19 p6eval alpha 30e0ed: OUTPUT«["2", "2", "3", "3"]␤»
07:20 mberends rakudo: my @a=<2 3>;my @b=@a.map({$_ xx 2});@b.perl.say
07:20 p6eval rakudo 483a9d: OUTPUT«[["2", "2"], ["3", "3"]]␤»
07:20 sorear hey, I never noticed t/spec/S01-perl-5-integration before
07:20 sorear this is *awesome*
07:20 mberends ^^ which is correct, alpha or rakudo?
07:21 moritz_ mberends: probably alpha
07:21 mberends it was bugging proto
07:21 moritz_ assignment to an Array flattens out the parcels returned from each map
07:22 moritz_ or s/parcel/capture/ # not quite sure
07:22 sorear (I don't actually understand how list context works in Perl6)
07:22 spinclad mberends: hm... should be (('2', '2'), ('3', '3')) as Parcels i think, which should flatten to alpha's version
07:22 spinclad (what moritz_ said)
07:23 mberends my workaround is not to use map :-/
07:25 sorear what does \%h mean in Perl 6?
07:26 * sorear needs somebody to sit down and explain t/spec/S01-perl-5-integration at some point
07:26 sorear this is a wonderful mine of prefabricated decisions but I'm not sure how it all works
07:27 moritz_ what do you mean by "prefabricated decisions"?
07:28 sorear I don't like having to decide interface issues
07:28 moritz_ I'm sure they need some work, especially those tests involving wantarray()
07:31 moritz_ sorear++ # methodicals
07:31 sorear you like them?
07:32 moritz_ I'm of two minds, actually
07:32 moritz_ I think it's very useful for HLL interop
07:32 spinclad (procedurals, functionals ...)
07:32 moritz_ and I think it's dangerous if overused as a pseudo-OO paradigm
07:36 sorear can't say I'm enthusiastic about all aspects myself
07:36 sorear hmm, eval_lex.t looks nasty to implement
07:36 moritz_ oh yes
07:38 sorear hrm, pugs had full 5/6 interop?
07:39 moritz_ no
07:41 moritz_ nothing in Perl 6 world has ever had anything "full" :/
07:41 hg joined #perl6
07:56 fridim joined #perl6
07:59 sorear how did pugs 5/6 work?  did it implement most of the spectests?
08:00 spinclad btw, should i expect t/spec/S05-mass/rx.rakudo to run a long time?  running spectests, it's been sitting there for about 8 minutes runtime (5m utime, 3m stime), which is several hours on my undermemoried box (256MB real, so this 275-350M process is getting 170-200M to live in).  i'm letting it run for now...
08:01 spinclad sorear: the spectests only test Perl 6, not 5
08:01 mberends spinclad: yes, noticed the same here also
08:02 sorear spinclad: S01 tests both.
08:03 spinclad mberends: ok, i'll just check on it now and then for progress then
08:04 spinclad sorear: ok, my error
08:06 spinclad in its day it ran all of the spectests (fudged for todo, skip, and such much like now), being the seed implementation for them
08:11 * spinclad to bed &  o/
08:16 sorear it's amazing how much the cultural difference between perl6 and parrot is
08:16 sorear here, we aim for the moon
08:16 sorear there, it's "what do we need *right now*"
08:16 mberends yes, it's amazing
08:17 mberends as Q2 (the launch window for Rakudo *) draws to a close, expect some more urgency here too.
08:18 sorear if Pugs really did pass all the non-fudged tests in S01, it was /quite remarkable/
08:19 moritz_ I'm nearly sure it did not pass them all
08:19 sorear it could run XS code, intermix Perl 5 and 6 without eval, and share lexicals between domains
08:19 sorear :(
08:21 mberends when you look at Pugs like that, it had so much going for it, and only the bus number against
08:22 moritz_ yes
08:23 moritz_ sadly the bus number is a fairly hard criterion
08:23 * mberends hopes to learn Haskell one day
08:24 sorear Haskell does not lend itself well to high bus numbers
08:25 * sorear knows it well, but still has trouble dealing with big projects
08:26 masak joined #perl6
08:26 masak oh hai, #perl6
08:26 mberends oh hai, masak
08:28 mathw lolitsmasak o/
08:32 * masak backlogs
08:35 * moritz_ isn't convinced that changing Date.daycount to a specified epoch is actually a win
08:35 * sorear studies the Pugs perl5 implementation
08:36 sorear it is... vastly smaller than Blizkost
08:36 masak moritz_: I'm not convinced that it's an overall win for the method to be public. seems to lead to quite some bikeshedding, for one. :)
08:37 dakkar joined #perl6
08:39 moritz_ masak: you're probably right
08:39 moritz_ masak: which is why I marked the whole section as conjectural... might just as well remove it
08:40 masak +1
08:40 masak going Solomonian on bikeshedders has proven to work well in the past. :)
08:43 masak TimToady: 'has constant' still makes me happy. what's my best solution if I want to do something similar with an enum? (i.e. share it between a class and all its descendents.) enum is also a type declarator, but the name doesn't have a twigil...
08:43 meppl joined #perl6
08:43 moritz_ I'm not quite sure I can remove the public method from the implementation yet
08:43 moritz_ due to limitations in core scoping stuff
08:44 masak that's fine, as long as it's evident that it's not by spec.
08:45 slavik joined #perl6
08:52 Trashlord joined #perl6
08:52 masak I know some people have reported similar things lately, but here goes: I'm getting 'Null PMC access in invoke()' when compiling src/Perl6/Grammar.pm
08:52 masak is this known?
08:52 masak will it be fixed before the release tomorrow?
08:52 moritz_ masak: git pull please
08:53 moritz_ it should have been fixed yesterday
08:53 masak I'm on latest.
08:53 moritz_ you are? that's bad...
08:54 pugssvn r30425 | moritz++ | [S32::Temporal] remove .daycount method - use $date - $start_of_epoch to obtain a day count starting from a fix epoch
08:54 masak though my Parrot revision is 45845, as opposed to the 45822 in PARROT_REVISION.
08:54 masak I'll try building with the recommended Parrot.
08:54 moritz_ masak: there were branch merges after the parrot release
08:54 masak ah.
08:55 moritz_ including the immutable strings, for which a separate rakudo branch exists
08:55 masak that would explain it, then. thanks.
08:59 Khisanth joined #perl6
09:04 * moritz_ wonders how much painting a bike shed can bare before collapsing under the weight
09:06 frettled moritz_: "bear", perhaps?
09:07 moritz_ probably not many bears :-)
09:07 frettled (bare = strip off)
09:07 moritz_ but yes, "bear"
09:07 frettled I suspect the answer is Mu³
09:08 moritz_ anyway, I'd like to propose a change in our Temporal discussions: anybody who proposes anything more complicated than the current status has to implement an at least partially working prototype in Perl 6 first
09:11 moritz_ "For example, in Russia there are two concurrent calendars (the secular and religious) and they are a fixed number of days apart. Hence Christmas - December 25 in both calendars - occurs on December 25 in the secular calendar, but on Jan 5 (I think) according to the secular calendar, but December 25 according to the religious calendar."
09:12 moritz_ I don't understand it at all. How can Christmas be both Dec 25 and Jan 5 int he secular calendar?
09:12 masak usually, the bikeshed doesn't collapse, because the paint is only hypothetical and a matter of discussion. :)
09:12 finanalyst joined #perl6
09:14 finanalyst hi. sorry to have dumped my proposal without warning
09:14 finanalyst just back logged. you wonder about old and new Christmas in Russia. Its quite simple really
09:15 moritz_ I wonder how a day can be two different days.
09:16 finanalyst new Christmas is 25 December, old Christmas is 5 January
09:16 moritz_ ah
09:16 moritz_ so you're really talking about two different days
09:16 moritz_ which wasn't obvious from your mail at all :-)
09:16 finanalyst but "old Christmas" is 25 Dec in the calendar that was in Russia at the time of the revolution
09:16 masak [backlog] turns out that `[+];` still works. yay!
09:17 moritz_ rakudo: say [+]
09:17 p6eval rakudo 483a9d: OUTPUT«Unable to parse postcircumfix:sym<[ ]>, couldn't find final ']' at line 11␤current instr.: 'perl6;Regex;Cursor;FAILGOAL' pc 1664 (ext/nqp-rx/src/stage0/Regex-s0.pir:907)␤»
09:17 moritz_ std: say [+]
09:17 p6eval std 30425: OUTPUT«[31m===[0mSORRY![31m===[0m␤Prefix requires an argument at /tmp/GdOz8bDh3D line 1 (EOF):␤------> [32msay [+][33m⏏[31m<EOL>[0m␤Parse failed␤FAILED 00:01 110m␤»
09:17 finanalyst i was trying to be as concise as possible
09:17 masak well, not in Rakudo or STD.pm6, but in pure Perl 6 :P
09:17 moritz_ ok :-)
09:27 moritz_ rakudo: class A  { }; A::foo
09:27 p6eval rakudo 483a9d: OUTPUT«Can not find sub A::foo␤current instr.: 'perl6;Perl6Exception;throw' pc 14763 (src/builtins/Seq.pir:38)␤»
09:27 moritz_ rakudo: class A  { }; A::foo(:bar)
09:28 p6eval rakudo 483a9d: OUTPUT«Can not find sub A::foo␤current instr.: 'perl6;Perl6Exception;throw' pc 14763 (src/builtins/Seq.pir:38)␤»
09:37 moritz_ finanalyst: your proposal on p6l sounds like you want to have an Instant, then apply a day filter, then a month filter...
09:37 moritz_ finanalyst: if that's what you want to do, I'm afraid it doesn't work
09:37 finanalyst moritz_: why is that?
09:38 moritz_ finanalyst: becaue leap seconds and DST changes are day dependent, so you need to map to the exact date in the first place
09:38 finanalyst moritz_: exactly.
09:38 finanalyst the day filter handles the leap seconds DST
09:39 finanalyst the month filter handles the leap days
09:39 moritz_ I don't understand that
09:39 moritz_ the day filter needs to determine the full date already
09:39 moritz_ like 2010-02-28
09:39 finanalyst no.
09:39 moritz_ it must
09:39 moritz_ because a day isn't uniform in length
09:40 finanalyst the day filter only provides a day_of_week and an offset from start of epoch
09:40 finanalyst 2010-02-28 is a calendar name consisting of calendar dependent year and month names
09:41 finanalyst so to get to 2010-02-28 from an Instant, you need to know time-zone, and calendar information\
09:41 moritz_ and dst, right
09:41 finanalyst yes
09:41 moritz_ but you need to information already to map an Instant to a day
09:42 moritz_ s/to/that/
09:42 moritz_ so in your scheme you need to supply that information twice
09:42 finanalyst so there are two processes: 1) going from instant to yy-mm-dd and 2) going from yy-mm-dd to instant
09:47 finanalyst moritz_: i dont see why information is supplied twice.
09:47 yinyin joined #perl6
09:47 moritz_ finanalyst: once while mapping from instant to day, once while mapping from day to year-month-dayOfMonth
09:48 finanalyst the idea is to had dst and leap second information encapsulated in the time-zone day fiter
09:48 finanalyst month filter is dependent on day fitler
09:48 finanalyst year on month
09:49 finanalyst so dst and leap second are incorporated in day filter and so transparent to month filter
09:49 moritz_ maybe there's nothing wrong with it after all
09:49 finanalyst but month filter handles leap days
09:50 moritz_ it's just that upon first reading I thought that each of these filters would be relatively simple
09:50 moritz_ now I've realized that the day filter needs to handle the full DateTime complexity
09:50 finanalyst not the time complexity
09:51 moritz_ and after having identified the day, the rest is trivial
09:52 finanalyst i would say that by isolating the exceptions to the correct filters, the complexity of DateTime becomes more manageable
09:52 finanalyst then moving from time-zone to another, or to another calendar, requires using a different filter at the appropriate level
09:53 finanalyst also filters such as quarter, decades, centuries can be added on over the months and years streams
09:54 moritz_ finanalyst: I only believe it makes things easier when you actually implement it, and find it to be easier
09:54 moritz_ finanalyst: to me it sounds like Instant => day is the hard part, and all the reset is just a SMOP compared to it, how ever you structure it
09:54 finanalyst moritz_: that is very profound wisdom and i can only agree
09:55 jnthn o/
09:55 * moritz_ doesn't feel wise at all, rather like a jerk
09:56 clintongormley joined #perl6
09:59 jnthn sorear: (methodicals) If an object has a method foo, do we call that one, and we only go looking for methodicals if we get a failed dispatch?
09:59 * jnthn is trying to get his head around the proposal
10:00 jnthn I think we've already in the past had some method-dispatch-falls-back-to-sub-dispatch-ish semantics and they got removed for various reasons.
10:01 moritz_ right; the new thing about this proposal is that the sub fallback is not for ordinary subs, but for things especially written for that purpose
10:02 jnthn Yeah, that's the reason I'm kinda curious about it.
10:02 jnthn I'm not sure it's different enough.
10:02 jnthn But maybe.
10:03 rgrau` joined #perl6
10:04 broquaint joined #perl6
10:11 sorear jnthn: I was thinking that methodicals take precedence over methods.
10:11 sorear It's only 80% baked idea.
10:12 meteorjay joined #perl6
10:13 jnthn sorear: Then potentially every method dispatch we do has to check for methodicals first. Though depending on how it's formulated we could maybe figure that out at compile time, but I'm not convinced yet.
10:21 sorear They are designed *specifically* to be compile time checkable
10:22 sorear $o.foo generates a subish call iff there is a methodical operator named foo in the lexical environment
10:22 sorear I'm not sold on 'our' methodicals
10:22 moritz_ sorear: uhm... didn't you write about type constraints?
10:22 sorear this is actually a good reason to ditch them
10:22 moritz_ sorear: the types in variables isn't generally known at compile time
10:23 sorear the type constraints are to allow for subclasses to be associated with more specific definitions
10:23 sorear like what we have for postcircumfix
10:23 sorear es
10:24 moritz_ uhm, what do we have for postcircumfixes? not sure I follow
10:24 sorear postcircumfix:<[ ]> needs to be overridden by any class that implements Positional
10:25 sorear methodicals are multis to support that
10:25 sorear however, if there is a methodical operator in scope and multi dispatch fails, the entire dotty fails
10:25 sorear (and now I need to sleep)
10:25 moritz_ but postcircumfix:<[ ]> isn't restricted to Positional
10:33 broquaint joined #perl6
10:39 masak rakudo: class BracketsGrumpy { method postcircumfix:<[ ]>($x) { die "Waah! I don't like brackets!" }; say BracketsGrumpy.new[42]
10:39 p6eval rakudo 483a9d: OUTPUT«Unable to parse blockoid, couldn't find final '}' at line 11␤current instr.: 'perl6;Regex;Cursor;FAILGOAL' pc 1664 (ext/nqp-rx/src/stage0/Regex-s0.pir:907)␤»
10:39 masak rakudo: class BracketsGrumpy { method postcircumfix:<[ ]>($x) { die "Waah! I don't like brackets!" } }; say BracketsGrumpy.new[42]
10:39 p6eval rakudo 483a9d: OUTPUT«Waah! I don't like brackets!␤current instr.: '&die' pc 17240 (src/builtins/Junction.pir:400)␤»
10:45 JimmyZ joined #perl6
10:56 jnthn masak: :-)
10:57 masak might interest someone to see how Boo does macros: http://boo.codehaus.org/Syntactic+Macros
11:02 pmurias joined #perl6
11:05 jaldhar_ joined #perl6
11:09 masak interesting to read all the comments on http://news.ycombinator.com/item?id=1279238
11:10 masak I feel the tone is much more hopeful and positive than only a few months ago.
11:10 masak possibly thanks to the excellent article that led to this discussion. leont++
11:11 colomon must be it, I greatly doubt the average HN reader is following what we're doing here...
11:12 jaldhar_ joined #perl6
11:14 colomon sorear++
11:14 pmurias joined #perl6
11:15 masak finanalyst: just saw your massive email on p6l about calendars. will reply after reading it all.
11:15 masak and after mulling a bit.
11:15 masak hopefully in the next few days.
11:16 masak but for now, please be aware that to the extent that 'tightly focused on the Christian Gregorian calendar' is a trap, it's one we've been walking into, not falling into.
11:18 masak I've been wanting to steer clear of premature generalization of the kind that leads to having to wield names like Calendar::Gregorian just to get the time of day.
11:19 masak (and I've been saying this so much lately that I feel I'm repeating myself when I restate it now.)
11:22 envi^home joined #perl6
11:31 moritz_ masak: http://irclog.perlgeek.de/​perl6/2010-04-21#i_2248424 should take care of that :-)
11:32 masak oh right, that was in relation to finanalyst's post.
11:34 masak I'm all for people matching up non-trivial proposals with implementation. that should weigh down most of the astronauts out there.
11:35 finanalyst masak: agree. silly to have long calendar names for simple things
11:35 masak (not necessarily talking about finanalyst here, whose email I haven't digested yet)
11:35 finanalyst but that can be handled by aliasing
11:35 masak aliasing?
11:35 masak you mean doing Short ::= Long::Name::Which::I::Can't::​Bear::Typing::All::The::Time?
11:35 finanalyst yes
11:36 masak meh
11:36 moritz_ that only hides the symptoms of the complexity
11:36 masak if you need to do that, you're covering up the deeper problem.
11:36 masak right.
11:36 finanalyst not sure
11:36 finanalyst some things are inherently complex
11:37 finanalyst but they show up in corner cases
11:37 finanalyst most people dont care about different time zone
11:37 finanalyst but if they do, they need to be able to have a consistent way to deal with it
11:37 masak finanalyst: 'some things are inherently complex' is quite a silly thing for the one proposing to parameterize over all the world's calendar systems to say. :P
11:37 finanalyst similarly, different calendars
11:38 masak I'm prepared to go quite far to protect the inherent simplicity of the current Temporal.
11:38 finanalyst doesnt really look simple to me
11:39 masak that said, being able to plug in other calendar systems and make them look native would be quite OK.
11:39 masak just not core.
11:39 finanalyst and it hides the complexity of dst and leap seconds
11:40 finanalyst doesnt matter if core or not, just that it can be done easily
11:40 moritz_ well, Instant is already core
11:40 moritz_ so as long as you can round-trip Instant and DateTime, you can very easily integrate it with custom date/time implementations
11:40 finanalyst if you want some time in perl6, something has to be core
11:41 masak indeed.
11:41 masak file modifications are times, for example.
11:42 finanalyst the measurement paradigm, a term i invented to avoid saying DateTime, is not specified currently
11:42 finanalyst there is just a blank space for semi-internal
11:42 pmurias why do we need date handling in the setting?
11:43 moritz_ pmurias: we don't, really. I was mostly following Dave Rolsky's advice
11:43 finanalyst may be the algorithm / method for 'round-tripping' that you intend is similar to the methodology i describe
11:44 moritz_ pmurias: but it does make it easier to provide convient conversion methods between DateTime and Date
11:44 finanalyst to what extent is Setting considered 'core'
11:45 finanalyst and how can you make a distinction between Date and Time? What is 10 hours after 31 Dec 2010 , 21.40
11:45 moritz_ well, you can look at dates in isolation
11:46 moritz_ time in isolation is much harder
11:46 pmurias finanalyst: setting contains the things which are loaded into your lexical scope at program start
11:46 pmurias i don't think there are any core modules in perl 6
11:46 finanalyst but are the settings not considered a part of the implementation?
11:46 moritz_ currently Test.pm has this status implicitly
11:47 finanalyst sorry core/non-core is a distraction.
11:47 pmurias finanalyst: the setting used to be called the prelude
11:47 finanalyst the first Setting library will probably carry to all implementations of perl6.
11:48 finanalyst pmurias: i followed some of the discussion before prelude was changed to settings
11:48 finanalyst i am a long-term troll
11:48 * pmurias is confused
11:49 finanalyst pmurias: sorry to be confusing.
11:51 pmurias finanalyst: what's the think you don't know
11:51 pmurias s/think/thing/
11:51 finanalyst pmurias: sorry got to go for a bit - newspaper interview
12:02 masak audreyt++ # http://pugs.blogs.com/pugs/2010/04/​how-to-implement-perl-6-in-10.html
12:04 masak I'm seeing uncanny parallels in the Haskell 2010 announcement to the Perl 6 process.
12:04 masak "Haskell 2010 is a small but significant step on the road that was started by the Haskell' committee 4 years ago, The process has not been a smooth one, and there have been several changes of direction, but the current process is actually producing concrete results that let us move the language forward in positive steps, so I feel we're on the right track."
12:04 masak ^_^
12:05 mathw Well as I understood it when Haskell' kicked off, they weren't really sure what they needed to do anyway
12:06 mathw Other than everyone agreeing that Haskell 98 was now too old and they needed to produce an updated standard
12:10 pmichaud good morning, #perl6
12:10 moritz_ good morning
12:10 masak pmichaud: \o
12:14 jaldhar_ joined #perl6
12:16 Associat0r joined #perl6
12:16 Associat0r left #perl6
12:23 colomon yow, my infix:<+> to .Numeric patch caused 1366 failures in the spectest.  :(
12:23 colomon *prefix:<+>
12:24 moritz_ lemme guess, it interacts with get_number vtable?
12:24 colomon I don't know yet.
12:25 colomon set_pmc() not implemented in class 'Array'
12:25 colomon current instr.: 'perl6;Any;Numeric' pc 372996 (src/gen/core.pir:30000)
12:25 colomon called from Sub 'prefix:<+>' pc 288268 (src/gen/perl6-actions.pir:21177)
12:26 colomon Hmmm... I guess for Positional (Iterable?) .Numeric should forward to .elems.
12:27 moritz_ colomon: currently Rakudo has a kind of weird scheme for prefix:<+>
12:28 colomon rakudo: my Iterable $a = 1..10; say $a.Num.WHAT
12:28 p6eval rakudo 483a9d: OUTPUT«Int()␤»
12:28 moritz_ afaict prefix:<+> does a numeric coercion in PIR
12:28 moritz_ which boils down to a get_number vtable call
12:28 colomon :pirop<set N*>
12:28 colomon is what it says.
12:28 moritz_ so Mu has a get_number override
12:29 moritz_ which calls .Num
12:29 colomon .me is puzzled by that
12:29 moritz_ it may have to do with with HLL interop
12:29 moritz_ not sure
12:29 mariano__ joined #perl6
12:29 masak http://blogs.perl.org/users/jt_smith​/2010/04/the-second-age-of-perl.html
12:30 colomon you're totally right about the get_number thing.
12:30 masak "...and it has nothing to do with Perl 6!" -- I feel that's both true and false :)
12:30 [particle] joined #perl6
12:30 masak but I'm probably biased.
12:31 moritz_ he even mentions Class::MOP specifically
12:31 moritz_ but it has nothing to do with perl.
12:31 moritz_ erm, Perl 6
12:31 moritz_ sure
12:31 moritz_ colomon: so did you change Mu.pir to call .Numeric instead of .Num?
12:31 colomon I didn't.
12:31 moritz_ so what was it you changed?
12:32 moritz_ (that would be thing I'd try first)
12:32 colomon I changed prefix:<+> to not have a PIR implementation, then wrote a prefix:<+> which calls .Numeric
12:32 colomon what I don't understand: Mu.get_number calls .Num.  Str.Num calls prefix:<+> to do the conversion.
12:32 colomon how is that not an endless loop?
12:32 moritz_ because Str has a separate get_number from PIR/parrot
12:33 colomon ah!
12:33 colomon okay, will strike my patch and try your approach.
12:34 moritz_ not sure if that works if .Numeric returns something that's not a parrot number
12:34 iblechbot joined #perl6
12:35 colomon rakudo: say "45".get_number
12:35 p6eval rakudo 483a9d: OUTPUT«Method 'get_number' not found for invocant of class 'Perl6Str'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
12:35 moritz_ vtable != ordinary method
12:36 colomon I think you're right about the parrot number thing: $N0 = self.'Numeric'()
12:36 colomon On the other hand, a working .Numeric patch using it will be more correct than the current version, even if it's still not completely correct.
12:36 broquaint joined #perl6
12:37 * CokeBot9000 points out to sorear that he is seeing a snapshot of nearly 10 years of parrot activity.
12:40 pmichaud (get_number)   The standard mechanism to obtain a numeric value of an object in Parrot is to use the get_number vtable
12:41 * jnthn back from errands
12:41 pmichaud so Rakudo tries to map that into Perl space as best it can, so that we can obtain numbers from other objects in the Parrot ecosystem that won't have a '.Numeric' method.
12:42 pmichaud or, put another way, it's important to remember that not all objects at runtime are subclasses of Any, or even of Mu :-)
12:42 masak HLL interoperability is hard!
12:43 colomon let's go shopping!
12:43 * colomon 's first attempt at changing Mu.get_number fails horribly.
12:45 mariano__ joined #perl6
12:46 smash_ joined #perl6
12:46 smash_ hello everyone
12:46 colomon In the longer run, wouldn't it make more sense to hard-wire .Numeric to call get_number for things outside Perl 6 space?  Otherwise prefix:<+> and .Numeric will never "be the same"....
12:46 masak smash_: \o
12:46 colomon smash_: o/
12:47 masak colomon: sounds sane to me.
12:47 moritz_ colomon: but where would you hard-wire it?
12:47 colomon moritz_: darned if I know.
12:47 moritz_ you can't do that in the object, because it's not in the (non-Perl 6) object
12:47 moritz_ so you'd have to do it in the dispatcher
12:47 moritz_ which just feels oh-so-wrong
12:48 jnthn Yeah, I'm not keen on that one either.
12:48 jnthn OTOH, there could be a last gasp "oh no, we found no method, look in this language interop namespace"
12:49 moritz_ jnthn: which would fail for autoloaded methods
12:49 pmichaud no, not necessarily
12:49 jnthn moritz_: In what sense?
12:49 jnthn (Yes I can see how things maybe could go awry there...)
12:49 pmichaud "oh no, we found no method even after autoloading, look ..."
12:49 jnthn pmichaud: Yeah, that'd perhaps work.
12:50 moritz_ jnthn: consider a foreign $obj that responds to all methods
12:50 moritz_ jnthn: then it would respond to .Numeric, but in a generic, wrong way
12:50 moritz_ not in the get_number way
12:52 moritz_ anyway, the current get_number mess seems less wrong to me than hard-coding .Numeric in a dispatcher
12:52 colomon Changing Mu.get_number to call .Numeric is resulting in an infinite recursion.  :\
12:52 moritz_ colomon: for what kind of objects?
12:53 colomon not sure, that's while compiling Test.pmn
12:53 colomon *pm
12:53 moritz_ you can try +1 without having compiled Test.pm
12:54 pmichaud colomon: what are you trying to achieve, here, ooc?
12:54 colomon ....um... actually that's what happens when you invoke perl6
12:54 moritz_ colomon: my guess is that if .Numeric return something which is not a parrot number, then the assignment to $N0 will trigger a call to get_number
12:55 colomon pmichaud: by spec, prefix:<+> calls .Numeric.  I'm just trying to make that happen.
12:56 pmichaud colomon: I suspect the spec will ahve to change on that point, if Perl 6 is to have language interoperability
12:56 pmichaud otherwise   +$python_obj   is never going to work, because $python_obj doesn't have a .Numeric method.
12:59 colomon Even if it does change, I would imagine it will change to prefix:<+> calls .Numeric for p6 objects...
12:59 pmichaud sure, that's likely.
12:59 moritz_ which is what Rakudo currently does, excepth it's spelled .Num atm
13:00 pmichaud well, Rakudo does it by passing through the get_number vtable interface, though.
13:00 moritz_ right
13:00 pmichaud prefix:<+> doesn't call .Num directly, it calls get_number which then calls .Num on p6 objects
13:00 ReiniUrban joined #perl6
13:00 pmurias joined #perl6
13:00 colomon rakudo: my Complex $c = 1i; say +$c
13:01 p6eval rakudo 483a9d: OUTPUT«You can only coerce a Complex to Num if the imaginary part is zero␤current instr.: 'perl6;Perl6Exception;throw' pc 14763 (src/builtins/Seq.pir:38)␤»
13:02 colomon Does get_number require you to return a Parrot number type, or is that just a "feature" of our current implementation?
13:03 pmichaud at the moment, it requires a Parrot native number, which IMO is a design failure on Parrot's part. (more)
13:04 pmichaud See the long discussion in http://trac.parrot.org/parrot/ticket/1445 for why.
13:04 pmichaud and http://trac.parrot.org/parrot/ticket/1470 shows how it's proposed that Parrot's get_number be able to return things other than native numbers.
13:04 masak rakudo: say +(2i * 2i)
13:04 p6eval rakudo 483a9d: OUTPUT«-4␤»
13:04 masak \o/
13:10 PerlJam greetings
13:11 CokeBot9000 PerlJam: yo.
13:11 CokeBot9000 PerlJam: you secede yet?
13:11 PerlJam not that I know of
13:12 pmichaud ...secede?
13:12 CokeBot9000 pmichaud: lame regional humor!
13:12 CokeBot9000 now you make a joke about wall street.
13:13 pmichaud oh, I get it.  I actually live in that region.
13:13 PerlJam there's a wall street in plano?
13:13 PerlJam :)
13:13 pmichaud and, alas, I live in the subregion where we appear to routinely elect and support the people in favor of secession
13:14 CokeBot9000 pmichaud: makes you feel any better, I live near the capital, so I hear about everybody that gets elected in these parts.
13:14 pmichaud (which means that at some point I can start organizing actually vote the idiots out of office, as opposed to the situation I used to have where all I could do was look from afar and say "I wish I could do something to get those people out of office"
13:15 PerlJam I'm not sure how well the "idiots out of office" campaign will fare.
13:15 PerlJam remember: some group of idiots voted them *in* in the first place
13:16 CokeBot9000 "don't be idiots". great slogan!
13:16 CokeBot9000 I'd vote for that. =-)
13:16 pmichaud PerlJam: yes, but it's easier to have an impact when you're in the same precinct/district with the idiots
13:16 pmichaud when I lived in CRP, for example, I would've loved to have worked to get Tom Delay out of office
13:17 jnthn .oO( that'd make a great name for a beaurocrat...they love to delay crap )
13:18 pmichaud in my case, I was soooooo happy to actually be able to vote Don McLeroy off of the State Board of Education  (apologies to all for obscure regional political reference)
13:19 pmichaud (short answer:  McLeroy is one of those who is pushing to change state curriculum standards to support Intelligent Design theory.)
13:19 [particle] i know about mcleroy....
13:19 pmichaud (although they no longer refer to it as "Intelligent Design" )
13:19 PerlJam what's the new moniker?
13:20 pmichaud I don't know that there's a new moniker.
13:20 pmichaud I think they explicitly wanted to avoid any sort of label.
13:20 PerlJam yeah, that's a subtle win for them
13:21 pmichaud Anyway, McLeroy lost in the primary (yay!), so I can feel that my vote did something useful.  :)
13:21 PerlJam I don't mind if they teach ID in  the classroom as long as it's given proper context.  "There are lots of theories, some have evidence, others are just wishful thinking; here are some examples of each ... "   :-)
13:22 moritz_ well, as long as they also teach the religion of the Flying Spaghetti Monster, I'm fine
13:22 rgrau joined #perl6
13:23 colomon rakudo: say (+(5/4)).WHAT
13:23 ive joined #perl6
13:23 p6eval rakudo 483a9d: OUTPUT«Num()␤»
13:24 moritz_ hm. Maybe for now it would be sane-ish workaround to try .Numeric first in prefix:<+> and only fall back to the vtable method if that fails
13:24 pmichaud colomon: if you want to change prefix:<+>, you probably need logic like
13:24 pmichaud ...what moritz++ said
13:24 moritz_ (despite the downsides which I explained above)
13:24 pmichaud actually, I would suggest testing the argument for Mu-ness, use .Numeric if ~~ Mu and get_number otherwise
13:25 pmichaud one could also let Parrot multimethods take care of it, if you're willing to leave prefix:<+> out of the p6-setting
13:25 jnthn Ouch, then every numification needs an isa check. :|
13:25 pmichaud jnthn: not every numification, only those using prefix:<+>
13:26 jnthn Well, true.
13:26 pmichaud and there actually aren't that many of those.
13:26 moritz_ jnthn: c'mon, every numification needs with prefix:<+> needs two multi dispatches right now anyway
13:26 moritz_ s/needs//
13:26 pmichaud ...it does?
13:26 colomon So this would mean taking the pirop back out of prefix:<+>, and coding it as an operator.
13:26 moritz_ pmichaud: sure, to prefix:<+> and then to .Num
13:26 pmichaud colomon: yes.
13:27 moritz_ well, not every, but many
13:27 pmichaud moritz_: oh, right.  (I misread.)
13:27 moritz_ I don't think a type check is so much more expensive
13:27 pmichaud actually, it is.  :-(
13:27 moritz_ even when not implemented as smart match?
13:27 CokeBot9000 joined #perl6
13:28 pmichaud even then.  Parrot type checking is much worse than you might otherwise expect
13:28 pmichaud especially for deeply nested classes
13:28 moritz_ ouch
13:28 pmichaud it ends up being an O(n^2) operation, where n is the depth of the derivation.
13:28 colomon :\
13:28 moritz_ that's *really* ouch
13:28 moritz_ is there a ticket for that?
13:29 pmichaud at least we fixed it so it's not  O(n^2)  of string comparisons.  :)
13:29 PerlJam where's chromatic with his +10 wand of optimization?
13:29 pmichaud PerlJam: that's the optimized version, actually.  :-(
13:30 moritz_ so.. how much of our total execution time is spent in type checking code?
13:30 moritz_ 10%?
13:30 pmichaud oh no, not nearly that much.
13:30 colomon errr.... I just started writing our multi prefix:<+>(Mu $a)
13:30 colomon Do I still need to check against Mu if I do that?
13:30 slavik I have researched this, but how can I get rakudo to compile perl6 to pbc?
13:30 pmichaud type checking is slow compared to what you expect it would likely be, not slow relative to overall execution time
13:31 pmichaud I'm just saying that type checking might not be faster than a method call.
13:31 moritz_ pmichaud: well, afaict type checking needs to be done for every multi dispatch...
13:31 pmichaud colomon: note that   prefix:<+>(Mu $a)  won't work for any objects that aren't Mu.
13:31 pmichaud (unless that case is hotpathed somewhere in the dispatch)
13:32 colomon so how can I say prefix:<+>(any conceivable object $a)?
13:32 pmichaud colomon: I don't know the answer to that one, which is why prefix:<+> is still in PIR.  1/2 :-)
13:32 moritz_ colomon: maybe with prefix:<+>(\$x) ?
13:33 jnthn Note that for Perl 6 multi subs we have a type-ID-based cache.
13:33 jnthn If we can get a good enough answer from that, we don't do any type checks other than on the first dispatch.
13:33 moritz_ though you can't store the result of unpacking in a variable if its not ~~ Mu
13:33 jnthn That's why it's ~10% faster to call a multi sub in Perl 6 than a non-multi.
13:33 moritz_ ah, ok
13:34 jnthn s/Perl 6/Rakudo/
13:34 [particle] multi prefix:<+>($a) won't work?
13:34 pmichaud [particle]: that's actually  prefix:<+>(Any $a)
13:34 [particle] rats. makes sense, but rats.
13:35 pmichaud no, Rats are a subclass of Any.  :-P
13:35 jnthn I thought they were Cool now?
13:35 jnthn :-)
13:35 [particle] no, rats are elected in texas :P
13:35 colomon They're Real, at any rate.
13:35 pmichaud jnthn: I didn't say "immediate subclass"  :-P
13:35 jnthn ;-)
13:35 pmichaud Rats are a subclass of Mu, also.  :)
13:36 jnthn So we have Real Cool Rats in Perl 6.
13:36 moritz_ aye
13:36 pmichaud while the rats in texas are definitely Not Cool.
13:36 moritz_ imaginary rats often indicate phobias
13:37 jnthn subset TexasRat of Rat where * !~~ Cool;
13:39 pmichaud colomon: my suggestion would be to write prefix:<+> in src/cheats/num-ops.pir
13:41 jnthn oh no, we'd moved it out of cheats I thought
13:41 masak would 'subset TexasRat of Rat where none(Cool);` do the same thing?
13:41 pmichaud no
13:41 pmichaud prefix:<+>  has always been :pirop<set__NP>  iirc
13:42 pmichaud which means that prefix:<+> has been limited to floating point values
13:42 pmichaud which is what colomon++ is trying to fix, iiuc
13:42 pmichaud anyway, it'd be similar in this respect to   prefix:<~>, which is also done as a PIR cheat.
13:43 colomon any quick hints on how to write $a ~~ Mu in PIR?
13:44 colomon Mu.'ACCEPTS' somehow?
13:44 jnthn $P0 = get_hll_global 'Mu'
13:44 jnthn $P0.'ACCEPTS'(...)
13:44 pmichaud ick, don't go through ACCEPTS for this
13:44 pmichaud use 'isa'
13:44 jnthn Where ... is the register holding $a
13:44 pmichaud as it is, we're turning a vtable call into a subroutine dispatch :-(
13:44 jnthn Aye, what pmichaud said for this case. :-)
13:45 pmichaud $I0 = isa ..., ['Mu']
13:45 pmichaud oh, just a sec....
13:46 pmichaud http://nopaste.snit.ch/20321
13:47 colomon pmichaud++
13:47 pmichaud I suppose we could also do it as a Parrot multi
13:47 pmichaud I'm not sure which would be faster, there -- an explicit check in the sub or letting Parrot figure out the correct sub to dispatch
13:48 colomon building now.
13:48 pmichaud as a multi, it would look like:  http://nopaste.snit.ch/20322
13:49 colomon I'll try the first version first.
13:50 pmichaud don't forget to remove the :pirop<> from Grammar.pm
13:50 colomon and define Mu.Numeric.  :)
13:51 pmichaud ...?
13:51 pmichaud why would one define Mu.Numeric?
13:51 molaf joined #perl6
13:51 colomon prefix:<+> is calling it....
13:51 pmichaud not every object has a .Numeric
13:52 moritz_ Cool should have .Numeric
13:52 pmichaud prefix:<+> calls the .Numeric of whatever object gets passed, not Mu.Numeric
13:52 moritz_ it's fine for +$thing to fail if $thing is not Cool
13:52 pmichaud it's fine for +$thing to fail if $thing doesn't have a .Numeric
13:52 pmichaud defining Mu.Numeric defeats that.
13:53 colomon well, at the moment nothing at all has .Numeric defined.  Sticking it in Mu is a quick way to check the change.  It just forwards to .Num at the moment, so (at least in theory) it will have the same behavior as before, no?
13:54 moritz_ yes, but it kinda defeats the purpose of the patch :-)
13:54 moritz_ so good for testing, bad for pushing
13:54 pmichaud actually, I think it won't have the same behavior.
13:54 pmichaud but it's reasonable to use it for testing
13:54 colomon I promise I won't check it in like that.
13:55 pmichaud keep in mind that you're fundamentally altering the flow of control of the base types
13:55 pmichaud so the old rules about what happens when no longer apply
13:55 pmichaud it's similar in kind (but not degree) to the same sorts of problems we experience when we change the organization of list/array/iterator.  It has profound effects.
13:56 pmichaud the "same behavior as before"  didn't involve Numeric at all for Int/Num/Str.
13:56 colomon compiles okay, +"45" still works, and one of the test files that crashed before works again.
13:56 pmichaud er, rephrase
13:56 pmichaud the "same behavior as before" didn't involve .Num at all for Int/Num/Str
13:56 pmichaud now it will.
13:57 colomon right.
13:57 pmichaud I would probably prototype Cool.Numeric as
13:58 pmichaud method numeric() { pir::set__NP(self); }
13:58 pmichaud s/numeric/Numeric/
13:59 colomon thank you!
14:03 colomon ah, with the current version S03-operators/numeric-context.t blows up badly.  Time for Cool.Numeric...
14:08 colomon That fixes that test file.
14:14 tylerni7 joined #perl6
14:19 tylerni7 joined #perl6
14:37 tylerni7 joined #perl6
14:37 tylerni7 joined #perl6
14:40 justatheory joined #perl6
14:44 moritz_ colomon: does it fix the rest of the spectest too?
14:51 ash_ joined #perl6
15:02 constant joined #perl6
15:02 constant joined #perl6
15:02 masak Alias: ping
15:03 diakopter :|
15:03 diakopter :||
15:04 rv2733 joined #perl6
15:08 masak diakopter: why the straight face?
15:09 diakopter heh
15:09 masak you should get a mouth with positive curvature, like this :)
15:09 jnthn :]
15:09 masak :>
15:09 diakopter oh, that's a MOUTH!?!??!?   I always thought the ), |, (  represented the shape of the eyebrows.
15:10 masak no, the eyebrows go above the eyes.
15:10 diakopter yeah.
15:10 diakopter above is to the right
15:10 avar Perlito is interesting KP6 risen from the ashes I see
15:10 jnthn IRC. Where we all have unibrows.
15:10 PerlJam diakopter: depends on which direction gravity is coming from
15:10 pmurias avar: it evolved from mp6
15:10 ash__ joined #perl6
15:11 colomon moritz_: not quite.  but it's close...
15:11 avar pmurias: But similar ideas as kp6 or? What's it aiming for?
15:11 colomon +Mu is failing.
15:12 CokeBot9000 diakopter: your ways are strange and confusing to me.
15:12 rv2733 joined #perl6
15:14 pmurias avar: you should talk with fglock about that
15:15 pmurias avar: it's implementing a subset of Perl 6 efficiently on many backends
15:16 avar Yeah, I worked a bit on it when it was called mp6 and kp6, released it on cpan :)
15:18 diakopter masak: I was kidding.
15:18 diakopter heh?
15:19 pmurias avar: i remember
15:19 masak diakopter: the possibility occured to me.
15:19 arthur-_ joined #perl6
15:20 avar Just wondering if it's likely to get any further, as it were. This time. KP6 stalled because of some grammar issues IIRC
15:21 avar Or if it's just explicitly a really small perl 6 (why?)
15:23 mberends ./perl6 -e'DateTime.now.strftime("year %Y").say' # year 2010
15:23 masak \o/
15:23 masak mberends: you have it working locally?
15:23 mberends yup :)
15:24 PerlJam why call it "strftime"  ?  just because of history?
15:24 masak mberends++
15:24 PerlJam (why not call it .fmt ?)
15:24 avar If it's going to be .fmt maybe it shouldn't be DateTime :)
15:24 mberends PerlJam: Least Surprise. Yes, history. libc and p5 DateTime
15:25 mberends afk # nom, bbl
15:25 masak .fmt *is* nicer. but people will likely expect .strftime
15:26 PerlJam .strftime is least surprise from outside Perl 6, but I would have actually expected .fmt
15:26 PerlJam (.fmt is the "normal" formatting method)
15:26 masak ...with a completely different set of formats...
15:26 PerlJam true. :)
15:27 PerlJam it's all polymorphic on the object being formatted
15:30 masak I'm having a hard time arguing with you, because I like .fmt as well :)
15:30 PerlJam now that I meta-think about it, the "time" part of .strftime triggered my useless-redundancy detector.
15:30 PerlJam and .strftime is so last century  :)
15:31 PerlJam anyway, I don't mean to bikeshed and since I'm not the one doing the work ...
15:31 PerlJam oh, and mberends++
15:32 [particle] PerlJam: so, now you're suggesting .strf? ;)
15:32 masak well, 'str' is kinda redundant too. maybe .f ? :P
15:33 PerlJam no matter what color you make it, the bikeshed is still blue in my mind  :)
15:33 [particle] it's grue, you only saw it after the switch.
15:35 wolverian what other things respond to .fmt?
15:35 masak Any
15:35 masak Hash
15:35 masak Array
15:35 masak Pair
15:35 masak (or probably Mapping and List, rather than Hash and Array)
15:36 masak and among these, all .fmt methods have the same format string, namely the sprintf one.
15:36 wolverian right, I was thinking along the lines of liskov.
15:37 masak it would break Liskov.
15:37 masak in some sense.
15:37 PerlJam Liskov is about inheritance.  Where's that at?
15:37 PerlJam It would break "different things should look different"
15:38 masak well, since the format of the format string in strftime is completely different, DateTime objects will not purely extend the behaviour of Any.
15:38 wolverian surely DateTime inherits Any?
15:38 masak it does.
15:40 arnsholt joined #perl6
15:40 PerlJam rakudo:  my $s = "foo"; say $s.fmt(':%7s:');
15:40 p6eval rakudo 483a9d: OUTPUT«:    foo:␤»
15:41 PerlJam rakudo:  my $s = "foo"; say $s.fmt(':%7s:%7s:');
15:41 p6eval rakudo 483a9d:  ( no output )
15:41 PerlJam rakudo: my %h = foo => "bar";  say %h.fmt(':%7s:');
15:41 p6eval rakudo 483a9d: OUTPUT«:    foo:␤»
15:41 PerlJam rakudo: my %h = foo => "bar";  say %h.fmt(':%7s:%7s:');
15:41 p6eval rakudo 483a9d: OUTPUT«:    foo:    bar:␤»
15:42 PerlJam I'll claim Liskov is already broken then  :)
15:42 masak hm. probably so.
15:42 jnthn oh noes min liskov e kass
15:42 masak then I retreat to the 'different things should look different' argument and hold my position from there! :)
15:42 jnthn I guess it depends if you interpret it as "has a method with the same name"
15:42 jnthn Or "has a method with the same name and <mad hand waving> the same semantics"
15:43 masak jnthn: I might just put up "Min Liskov e kass" on the door to our office. :P
15:45 colomon on noes, babelfish doesn't do Swedish!
15:45 moritz_ colomon: it's fine for +Mu to fail
15:45 jnthn masak: It isn't the classiest of Swedish expressions.
15:45 jnthn colomon: Google Language does
15:45 masak no, it's quite kass.
15:45 colomon moritz_: there's actually a test that +Mu should be 0 in the spec tests.
15:46 moritz_ CokeBot9000: that doesn't mean it's right :-)
15:46 moritz_ erm, meant colomon, sorry
15:48 colomon I've fudged it for the moment, then.
15:48 masak wonder if it would be possible to write an IRC bot that detected tab completion failures as they happened, with a high accuracy...
15:49 iblechbot joined #perl6
15:49 riffraff joined #perl6
15:50 colomon moritz_: and the next issue is another spectest: my $foo = 0; ok $foo == 0
15:50 moritz_ that one should work :-)
15:52 colomon I'm very tempted to just say Mu.Numeric { 0; }
15:52 moritz_ Mu is an extraordinary value these days
15:53 moritz_ colomon: want to push your changes to a branch?
15:53 pmurias avar: kp6 stalled when it turned out to be very slow (the bootstraped version was sluggish)
15:55 colomon moritz_: will do in a bit.
15:55 jnthn pmurias: huh, that never stalled Rakudo. ;-)
15:55 avar :)
15:55 diakopter jnthn: XXNSNSNGGG
15:55 masak mberends: have you seen cpanminus? it's a wonderful application to be inspired by. miyagawa++
15:56 masak diakopter: are those eyebrows, too?
15:56 diakopter probably
15:59 Tene perl6: say (<foo bar baz> >>xx<< (3,4,2)).perl
15:59 p6eval elf 30425: OUTPUT«Undefined subroutine &GLOBAL::xx called at (eval 130) line 3.␤ at ./elf_h line 5881␤»
15:59 p6eval ..rakudo 483a9d: OUTPUT«["foo", "foo", "foo", "bar", "bar", "bar", "bar", "baz", "baz"]␤»
15:59 p6eval ..pugs: OUTPUT«(("foo", "foo", "foo"), ("bar", "bar", "bar", "bar"), ("baz", "baz"))␤»
16:00 TimToady masak: testing a patch for 'has enum $.meth <foo bar>'
16:00 masak TimToady: \o/
16:01 masak would that generalize further, to ordinary non-attr variables?
16:01 jnthn uff
16:01 TimToady presumably
16:01 jnthn TimToady: Does this act like some kind of named enum?
16:01 jnthn Or just sugar for the anon enum syntax and store the constructed hash in $.meth ?
16:01 TimToady haven't decided
16:02 jnthn OK
16:02 jaldhar_ joined #perl6
16:02 TimToady but perhaps there's an easy way to install a missing orthogonality; perhaps not
16:03 * jnthn is glad he didn't get around to much enums stuff in Rakudo
16:03 masak jnthn: the former alternative is the richer one, but perhaps there's some technical difficulty?
16:03 jnthn masak: Yeah, I'm kinda not sure how it'd work out implementation wise.
16:04 TimToady in any case, $.meth<foo> would get you the enums value as an ordinary hash lookup
16:04 TimToady *enum's
16:04 masak jnthn: I do hope that named enums are still slated for Rakudo Star, though. :/
16:04 jnthn mumble
16:04 TimToady I'm thinking that Bool<True> might be the correct way to write that rather than Bool::True
16:04 masak 'correct'?
16:05 masak don't both work by the current spec?
16:05 TimToady correcter
16:05 masak this *is* Perl we're talking about, right? :P
16:05 masak TimToady: TIMTOWTDI
16:05 masak (oh the irony)
16:05 TimToady I'm thinking whether enums really need to imply storage of names in a subpackage
16:06 astrojp joined #perl6
16:06 masak seems that bare names lend themselves better to static checks.
16:07 TimToady if you know a hash is constant, there's no difference
16:07 masak troo.
16:07 TimToady and that's why we distinguish constant from readonly; we know constants at compile time
16:07 TimToady and enum makes a constant hash
16:08 masak so, Bool<True> and True, but not Bool::True ?
16:08 masak still feels kinda funny.
16:09 TimToady if you can tell me why it feels funny, that would be useful :)
16:09 masak I guess because I think of the True as being exported from Bool::True, and now you tell me it doesn't exist anymore.
16:09 masak :)
16:09 moritz_ it's inside out
16:10 arnsholt masak: I guess you'll just have to 'Bool::True := True' =)
16:11 masak arnsholt: I'll create a module that gives me Bool::True and all corresponding enum values back :)
16:11 masak personally, I think Bool::True makes a lot of sense. it's the True constant in the Bool package.
16:15 REPLeffect joined #perl6
16:17 TimToady I need to work out the policy on second-class imports though
16:17 TimToady traditionally, if two enums collide, neither of them works
16:18 TimToady we could also throw deduced imports into that pot
16:18 TimToady er, deduced needs
16:18 masak where can I read up on the terms 'second-class import' and 'deduced import'?
16:18 TimToady right here
16:18 masak great :)
16:18 masak what are they?
16:19 TimToady I just explained how enums traditionally work
16:20 masak the none-of-them-works-on-collision. yes.
16:20 masak it's in S12.
16:20 TimToady when we see an unknown name like Sun, we provisionally guess that it means Day<Sun> (or Day::Sun)
16:20 TimToady I actually first saw that policy in Ada, and thought it was sane
16:20 masak *nod*
16:21 * PerlJam is interested in how the guessing works
16:21 TimToady but if it could mean either Day<Sun> or Star<Sun>, then neither gets it
16:21 moritz_ so enum Day <Sun Mon ...> installs a provisional Sun symbol that does the guessing?
16:21 TimToady that would be one way to work it
16:21 moritz_ and when anything else touches Sun, that guessing goes away?
16:21 masak then the Sun blows up!
16:21 TimToady or Day advertises it contains second-class names in a CANDO-ish kind of way
16:22 TimToady the latter might lend itself better to guessing auto-uses
16:22 PerlJam and we query all enums of their CANDOness
16:22 PerlJam ?
16:22 moritz_ doesn't sound quite straightforward
16:22 moritz_ (Perl 6 isn't straight forward, I know... :)
16:22 TimToady so the recent discussion wrt whether Date is in core could use that, perhaps
16:23 TimToady if you say Date, and it's unambiguous because only the Date module has made its name available provisionally, you get auto-use of Dat
16:23 TimToady *Date
16:23 TimToady but if it's ambiguous, you don't, and the compile blows up
16:23 ab5tract joined #perl6
16:24 masak for some reason, the prospect doesn't seem as enticing for classes as for enum values...
16:24 TimToady problems with this: only gets you the most recent version
16:24 TimToady but typenames are also constants of a sort
16:24 TimToady they're even parsed the same, more or less
16:24 PerlJam std:  class Sun { ... }; enum Day <Sun Mon>;
16:24 xinming_ joined #perl6
16:24 p6eval std 30425: OUTPUT«ok 00:01 110m␤»
16:25 PerlJam rakudo:  class Sun { ... }; enum Day <Sun Mon>;
16:25 p6eval rakudo 483a9d:  ( no output )
16:25 TimToady std doesn't check that yet
16:25 PerlJam right, but  that's my gauge on how much thought you've given things ;)
16:25 TimToady though that might be lhf
16:26 TimToady in that case, class Sun would take precedence, and you never even see the enum
16:26 moritz_ so Mon wouldn't work either?
16:27 TimToady Mon would work, by the usual reckoning
16:27 TimToady it's only Sun that collides
16:27 TimToady and only one of them is second-class, so it just disappears
16:28 TimToady an argument can be made for treating them all as first class, though
16:28 PerlJam std: package Foo; class Foo { ... }
16:28 p6eval std 30425: OUTPUT«[31m===[0mSORRY![31m===[0m␤Illegal redeclaration of symbol 'Foo' (see line 1) at /tmp/iQtUecrk8E line 1:␤------> [32mpackage Foo; class Foo[33m⏏[31m { ... }[0m␤Check failed␤FAILED 00:01 107m␤»
16:28 TimToady in a sense, though, we already get second class anything by putting it into an outer lexical scope
16:29 PerlJam Everything leans lexical these days, right?   enum Foo ... ;  makes a lexical Foo ?
16:30 masak ah, so 'second class' means 'shadowable by more real names'?
16:30 TimToady that's part of it
16:31 TimToady but the 'collisions disappear rather than complaining' is a bit more than that
16:31 TimToady if you tried defining conflicting names in an outer scope, either one would win, or you'd get an error
16:31 TimToady second-class names shadow each other
16:31 cdarroch joined #perl6
16:31 cdarroch joined #perl6
16:31 TimToady which you can't do with lexical nesting
16:32 TimToady I'll need to think about this more
16:32 pmurias TimToady: is postcircumfix:<[ ]> lexical?
16:33 TimToady all operator macros are lexical
16:33 TimToady it's only sort of an accident that the INVOKE method is named with postcircumfix:<( )>
16:35 TimToady I've been thinking about breaking that for a while now
16:36 TimToady it causes lots of confusion when () too many things at too many levels
16:36 TimToady foo() is a multi-method dispatch, not an INVOKE, though it turns into IN
16:36 TimToady one or more INVOKES underneath
16:37 TimToady possibly with intervening method calls
16:37 TimToady dispatchers really call INVOKE, not .()
16:38 jnthn ...
16:38 REPLeffect joined #perl6
16:38 pmurias is that specced somewhere?
16:38 jnthn Well. I guess we essentially do something like that in Rakudo.
16:38 * jnthn decides it's close enough :-)
16:39 TimToady it might be possible to unify them again, but only if all multis are really INVOKEing the proto first
16:39 TimToady which I'm also thinking about hard
16:39 jnthn That's decidedly not the way we're doing it in Rakudo.
16:39 IllvilJa joined #perl6
16:39 jnthn I'm quite skeptical about going that way, fwiw.
16:39 TimToady there's a serious mismatch between how protos work currently
16:40 jnthn I'm probably not convinced enough of the value of protos in general.
16:40 TimToady the regex proto is only a cousin to the ordinary proto, and this bothers me
16:41 jnthn In Rakudo so far it's only a "nothing else worked" fallback.
16:41 PerlJam cousins should have different names.
16:41 jnthn I guess by the spec, any traits declared on the proto are meant to get distributed onto the individual candidates too.
16:42 TimToady yes, but you'll notice the flow of that is the opposite direction from use as a fallback
16:42 pmurias TimToady: why does the spec mention method postcircumfix:<[ ]> {...} ?
16:42 TimToady I'm thinking use as a fallback is 180° wrong
16:42 pmurias * postcircumfix:<( )> {...} ?
16:42 TimToady pmurias: because the spec was written by an idiot
16:42 jnthn TimToady: :/
16:43 jnthn TimToady: In that case, maybe the best thing for Rakudo * is to toss support for proto on subs/methods alltogether while we work out the right semantics.
16:44 TimToady in my current thinking, () only ever calls an "only" sub, but some "only" subs happen to be protos that govern a set of candidates and allow multies to be declared in their scope
16:44 PerlJam jnthn: you mean omit from R* or toss now with the intent of having it worked out and implemented for R*?
16:44 TimToady that's pretty much how they already work in regexes
16:44 pmurias only subs and multis have to have the same interface as it's possible to do my &foo := cond() ?? &some_multi :: &some_sub
16:44 jnthn PerlJam: I don't think we have resources to re-work what TimToady is thinking of in time for R*
16:45 _jaldhar_ joined #perl6
16:45 jnthn *to do the re-work that...
16:45 PerlJam jnthn: okay.  Conservativism is best then.
16:45 TimToady I don't think we have to rework it for R*, this is just a heads up
16:45 jnthn I'm not saying it's inherently wrong or bad; the better unification with protoregexes strikes me as a good thing.
16:46 jnthn Just that I don't feel it's something I can sit down and attack in an afternoon.
16:47 TimToady though interestingly, I think this is closer to Dan's original design for multi dispatch
16:47 jnthn Well, the way we have it in Rakudo right now is a kind of double-dispatch anyway.
16:47 jnthn We vtable_invoke the multi-dispatcher which in turn vtable_invokes the candidate that it chose
16:48 jnthn But the problem is that there's no Perl 6 level thingy that corresponds to being between the two.
16:48 TimToady basically, we'd say that inside a proto, something like ... means to call the actual mutli dispatcher on the protos candidates
16:48 TimToady and the point being that the proto that only contains ... can be optimized away eventually
16:49 TimToady the signature constraint naturally falls out of the call to the proto directly
16:49 jnthn Well, that's the other thing. If this isn't going to give us a bunch of extra cost, we need to know enough at compile time to do that. And that means building a bit more infrastructure that tells us so.
16:49 TimToady it doesn't have to be artificially propagated to the candidates
16:49 jnthn What about traits?
16:49 TimToady traits can set dynamic vars for the subcalls
16:49 jaldhar joined #perl6
16:50 jnthn If I have an "is rw" trait on the proto, what does that imply for the multi candidates?
16:50 TimToady think my $*trait = whatever; inside the body of the proto, before the ...
16:50 jnthn Should we apply "is rw" to each of them too?
16:50 jnthn huh.
16:50 jnthn But traits are things we apply once at compile time.
16:50 TimToady not all traits would have to work the same way
16:51 jnthn Either we're going to apply those that are on the proto to the multi-candidates too, or we're not going to.
16:51 TimToady different traits can propagate differently, including being copied to multis
16:51 TimToady or both
16:51 jnthn OK, there's a few compiler-handled traits that needs some special treatment, eys.
16:51 jnthn *yes
16:51 TimToady it's not an either/or thing
16:51 PerlJam How is the programmer to know which?
16:52 jnthn But in general a trait application is a dispatch to a trait_mod routine.
16:52 TimToady why it the programmer to care?
16:52 TimToady that's encapsulated in the trait
16:52 TimToady the trait_mod can modify anything it likes
16:53 TimToady traits have never been specced as well-behaved
16:53 TimToady there are just certain conventions
16:53 TimToady but trait_mods have all the power of BEGIN
16:53 TimToady since they run at compile time
16:54 ruoso TimToady, the "methodicals" thread on p6l seems to ask for a spec on how to override the default method dispatcher...
16:54 TimToady they can rewrite the body of a proto to wrap a my $*VALUE = mumble around the ...
16:54 PerlJam I  think I'd like to know if a particular trait on the proto is copied to the multis or not
16:54 TimToady they can mix in a role if the like
16:54 TimToady PerlJam: then read the docs :P
16:55 TimToady anyway, this can all be post R*
16:56 ruoso TimToady, I replied to the thread with some assumptions about that matter taken mostly from IRC discussion, but largely undocumented... it would be nice if you could take a look at that just to see if I'm thinking sideways in the correct axis...
16:57 TimToady ruoso: I'll try, but I have many distractions today
16:58 PerlJam TimToady: IRC tends to do that :)
16:58 REPLeffect joined #perl6
16:58 TimToady yes, well, I was planning to start fighting termites before this, sigh...
16:58 TimToady later &
16:59 jnthn Ooh, yay...I have to meetings this week. I need not worry about fixing my body clock. \o/
16:59 jnthn *no
17:07 mberends masak: yes, I'd read the App::cpanminus docs( "Are you on drugs?" ;) and like its design. Definitely inspiring. Almost off-topic Pyrus (PHP's next-gen installer) is also nice: http://pear.php.net/manual/hu/pyrus.commands.php
17:08 masak not at all off-topic. will look it up.
17:13 colomon moritz_: I just got all tests passing, so instead of making a branch, I'm just going to push it to master.
17:14 moritz_ colomon++
17:15 colomon Done.
17:15 jnthn colomon++
17:16 moritz_ colomon: remember to commit the spectest changes too, if you have any :-)
17:17 colomon Ha!  No spectest changes for this patch, but when I did svn diff I found two changes I should have committed weeks ago.  :)
17:20 dalek rakudo: 56120b7 | (Solomon Foster)++ | src/ (4 files):
17:20 dalek rakudo: Change prefix:<+> to dispatch to .Numeric for all types which descend from Mu.  Define Mu.Numeric to return 0, Cool.Numeric to call the pir function to convert to a Num.
17:20 dalek rakudo: Still need to define Numeric.Numeric.
17:20 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/5​6120b7b5511a79643218f050a12d4321bd878b7
17:22 pugssvn r30426 | colomon++ | [t/spec] Add tests for Fibonacci series starting with 0.  (Sounds crazy, but we didn't handle that case properly at one point.)
17:28 pugssvn r30427 | colomon++ | [t/spec] Tests for Real.ceiling, Real.floor, Real.truncate, and Real.round.
17:32 masak colomon++
17:37 ash_ joined #perl6
17:38 * jnthn -> nomshop
18:07 hudnix joined #perl6
18:11 ShaneC joined #perl6
18:11 ShaneC left #perl6
18:12 ash_ joined #perl6
18:13 colomon > say +(4+3i)
18:13 colomon 4 + 3i
18:17 Jedai joined #perl6
18:17 dalek rakudo: 3e3a934 | (Solomon Foster)++ | src/core/Numeric.pm:
18:17 dalek rakudo: Add Numeric.Numeric.
18:17 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/3​e3a934143923cd2d7e79ca57efb2bfc30acfef8
18:18 pugssvn r30428 | colomon++ | [t/spec] Simple tests for prefix:<+> on Rat and Complex.
18:23 dalek rakudo: 1f638cc | moritz++ | docs/ChangeLog:
18:23 dalek rakudo: [docs] another ChangeLog entry
18:23 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/1​f638cc342c1b54d7ecfe1936aa1bb5f80ebfb0a
18:23 dalek rakudo: e329a94 | moritz++ | src/core/Date.pm:
18:23 dalek rakudo: [Date] move private subs inside the class
18:23 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/e​329a94e905bc43fc5b2dc11a099b6e82140025b
18:30 ramf joined #perl6
18:40 _jaldhar joined #perl6
18:40 gurjeet joined #perl6
19:18 pmichaud colomon: ping
19:18 colomon pong
19:19 pmichaud why a Mu.Numeric?  I still think that's wrongish
19:19 * moritz_ too
19:19 colomon We have spectests that assume Mu.Numeric and Any.Numeric return 0.
19:20 pmichaud then I think those tests are wrong.
19:20 colomon Apparently Any() definitely should return 0.
19:20 moritz_ Mu.Numeric == 0 is certainly wrong
19:20 moritz_ that makes more sense, yes
19:20 colomon I'm agnostic about Mu.
19:20 pmichaud why should Any() return 0?
19:20 colomon my $foo;  $foo == 0
19:20 moritz_ pmichaud: so that my $x; $x == 0; returns true
19:20 pmichaud that should act like a failure
19:21 pmichaud and the failure object should return 0.
19:21 pmichaud i.e., it's not Any that returns 0, but the protoobject.
19:21 pmichaud (because it's undefined)
19:21 pmichaud basically it's a "use of uninitialized value..."
19:22 colomon so something like
19:22 colomon fail "use of uninitialized value"
19:22 pmichaud that's better, but I basically disagree that all objects should have a Numeric() method defined.
19:23 pmichaud that's.... wrong.
19:23 pmichaud and it's certainly wrong that     class XYZ { ... };   say +XYZ.new;  # 0 is wrong.
19:23 jnthn pmichaud: I guess the real answer is that it should be a method Numeric(Any:U :) { 0 }
19:24 pmichaud jnthn: except it should be a failure, not an integer.
19:24 jnthn That is, only on (undefined) proto-objects.
19:24 jnthn pmichaud: Ah, OK
19:24 pmichaud it's a use of an uninitialized value.
19:24 jnthn pmichaud: Yes, agree.
19:24 cdarroch joined #perl6
19:24 cdarroch joined #perl6
19:24 pmichaud which should return a failure, which should throw an exception unless it's "handled" first.
19:24 jnthn pmichaud: Sorry, was being too focused on the signature. :-)
19:24 pjcj joined #perl6
19:25 jnthn method Numeric(Any:U :) { fail 'Use of uninitialized value in numeric context' } or some such.
19:25 colomon I certainly have no stake in Mu or Any .Numeric, just trying to update what the Numeric types do without breaking existing functionality.
19:26 pmichaud in the meantime, if you wish to do
19:27 pmichaud method Numeric() { $.defined ?? (die "Can't take numeric value") !! fail "Use of uninitalized value" }
19:27 pmichaud or something like that, I'd feel better.
19:27 colomon On Any or Mu?
19:28 moritz_ Any
19:28 pmichaud well, what would we expect from
19:28 CokeBot9000 (.Muneric)
19:28 pmichaud my Mu $x;   say $x == 0;
19:28 moritz_ die
19:28 pyrimidine joined #perl6
19:28 jnthn OTOH, things like .list do live in Mu, or at least iirc.
19:29 pmichaud hmmm, I'm still thinking of .list living in Any
19:29 jnthn Ah, OK
19:29 pmichaud I guess it could go in Mu.  Still have to work that out (this weekend, hopefully)
19:29 jnthn I don't feel strongly either way.
19:29 jnthn I would prefer that they're all consistently in one or the other though.
19:29 pmichaud I'm not sure they can be.
19:29 pmichaud There's different expected behaviors for each, so it makes sense for them to be in different places.
19:30 pmichaud put another way, "consistently in one or the other" might be a false (foolish?) consistency :)
19:30 jnthn Maybe.
19:30 pmichaud I'm fine with it going for Any for now.  It's easily moved.
19:30 jnthn Maybe I'll be happier if I distinguish structural contexts from value ones. :-)
19:31 pmichaud oh, wait.
19:31 pmichaud nm.  Any is fine.
19:31 jnthn (that is, .list, .item and .hash should live together, and .Numeric, .String, etc also should, and I'd like to see the two groups of 'em together)
19:31 pmichaud I agree that .list, .item, .hash belong in similar places.
19:32 jnthn That is, it'd not feel weird if .list and .Numeric were in different places, but it'd feel odd to me if .list and .item were, or .Numeric and .Stringy were.
19:32 pmichaud I agree that .Numeric, .String belong in similar places.
19:32 pmichaud I'm not sure it's all the same place :)
19:32 jnthn OK
19:32 pmichaud (we're agreeing :)
19:32 jnthn Yes. :-)
19:32 colomon fair enough.
19:32 jnthn My initial discomfort was a little too broad. :-)
19:32 colomon and I just put .Numeric next to .Str in Any.
19:32 colomon :)
19:32 pmichaud somehow I'm comforted to hear you say that. :-)
19:33 pmichaud Should be .Stringy, yes?  ;-)
19:33 pmichaud I mean, if you want to fix them.... :)
19:33 colomon I think redoing the Numeric world is enough for me today.... ;)
19:33 pmichaud and the world is better off for it.
19:33 jnthn I think it's .Stringy rather than .String.
19:33 pmichaud However, the AnonymousMonks of the world will totally unappreciate you for it.  :)
19:34 * colomon considers how much $work he has to do, and reckons avoiding changing Str to Stringy this week is a Good Thing.
19:34 pmichaud sure, .Stringy can wait.
19:34 colomon sure, if we weren't all lazy we'd just have a couple of 24 hour hacking sessions and finish Rakudo.
19:34 * jnthn should probably use his Perl 6 time today to continue worrying about multis and roles and the like.
19:35 * colomon should probably be using his remaining time today to hack in C++.  :(
19:36 ash_ joined #perl6
19:36 colomon > my $x; say $x == 0
19:36 colomon Use of uninitalized value
19:36 jnthn Wait, is that an exception?
19:36 moritz_ in numeric context
19:36 jnthn I *think* it should just warn...
19:36 jnthn Granted fail won't give that semantic. D'oh.
19:36 moritz_ aye
19:36 ash_ rakudo: my $x; say $x == 0;
19:36 p6eval rakudo 1f638c: OUTPUT«1␤»
19:37 jnthn Aye, I expect the 1 + a warning.
19:37 colomon my $x; say +$x
19:37 colomon doesn't return anything at all -- say just silently fails.
19:38 jnthn Oh.
19:39 iblechbot joined #perl6
19:39 ohhai joined #perl6
19:39 colomon Is there a way to get a graceful exception?
19:40 finanalyst joined #perl6
19:42 jnthn I can't immediately thing of how you construct a lazily-thrown warning in Perl 6.
19:42 jnthn *think
19:42 moritz_ but it's better to omit the warning than to fail
19:43 moritz_ from an early adopters point of view
19:43 jnthn Well, there's always a cheat
19:44 jnthn Which is instead of to "fail" then call "warn" then evaluate to 0
19:44 wasy joined #perl6
19:44 jnthn (always die in the case $.defined is treu though)
19:45 pmichaud alpha  had a Failure object, it would return a numeric value of 0 but also issued a warning when it wasn't handled
19:45 ohhai left #perl6
19:45 pmichaud because
19:46 pmichaud my $x;  $x.defined; say +$x;   # no warning.
19:46 jnthn Ah
19:46 jnthn That's far righter
19:46 jnthn pmichaud++
19:46 wasy left #perl6
19:46 pmichaud which points to the fact that $x *cannot* simply be Any.
19:47 pmichaud my $y;  say +$y;  # warning
19:47 pmichaud my $x;  $x.defined;  say +$x;  # no warning
19:47 pmichaud unless using .defined on protoobjects doesn't have the same semantics as it would for failure objects
19:47 sundar joined #perl6
19:47 pmichaud which I suppose is entirely possible.
19:48 pmichaud I guess it would make sense if +Any always threw a warning.
19:48 pmichaud i.e.,   using .Numeric on a protoobject might always generate the warning
19:48 pmichaud (and then return 0)
19:49 colomon wait, you guys just completely lost me there.
19:49 jnthn pmichaud: I disagree with:
19:49 jnthn my $x;  $x.defined;  say +$x;  # no warning
19:50 pmichaud jnthn: okay, works for me.
19:50 jnthn pmichaud: I would however exepct:
19:50 pmichaud in other words, protoobjects always warn when used, and don't act like Failures in this respect
19:50 jnthn my $x;  my $y = +$x; $y.defined;  say $y;  # no warning
19:50 pmichaud I expect the +$x to give a warning.
19:51 pmichaud It's "use of an uninitialized value."
19:51 jnthn Ah, OK
19:51 jnthn I guess I'd expected my $y = +$x; to mean that $y is now a Failure
19:51 pmichaud No
19:51 pmichaud I'd expect $y to still be a 0 at this point.
19:52 pmichaud Because $y *is* initialized.
19:52 jnthn In the case of:
19:52 ash_ my $x; my $y = +$x; # warning?
19:52 jnthn my $x;  my $y = +$x;
19:52 jnthn Which step do we get the warning emitted?
19:52 pmichaud at the point of attempting to take the numeric value of $x.
19:52 ash_ i'd expect a use of uninitialized variable at y =
19:52 ash_ (personally)
19:53 pmichaud the difference is something like this:
19:53 pmichaud sub foo() { fail "Bzzt"; };   my $y = foo();   say $y;  # warns
19:54 jnthn OK, so it's *different* to that case.
19:54 jnthn OK.
19:54 pmichaud sub foo() { fail "Bzzt"; };   my $y = foo();  $y.defined;  say $y;  # no warn
19:54 pmichaud i.e., the thing that fail() returns is a Failure object, which has the magic .Bool/.defined behavior on it
19:54 pmichaud but protoobjects always warn.
19:55 pmichaud (when used as values)
19:55 jnthn *nod*
19:55 jnthn OK, agree.
19:55 pmichaud colomon: still lost?
19:56 colomon pmichaud: less so.  but I've no idea how to implement what you guys are talking about now...
19:56 pmichaud colomon: just a sec
19:56 pugssvn r30429 | lwall++ | [STD] allow enum names to be variables so that an enum can have an accessor
19:56 pmichaud method Numeric() { $.defined or warn "Use of undefined value in numeric context"; 0;
19:56 pmichaud }
19:57 ash_ whats the difference between that $.defined and doing my $x; $x.defined ?
19:57 pmichaud or, more likely
19:58 pmichaud method Numeric() { die "Numeric not implemented for $.WHAT()" if $.defined;  warn "..."; 0; }
19:58 pmichaud ash:  $.defined is the same as self.defined
19:59 pmichaud jnthn: what's blocking implementation of :U and :D again?
19:59 ash_ but... why does my $x; $x.defined; say +$x; not warn then?
19:59 moritz_ ash_: it does
19:59 pmichaud ash_: because $x is a protoobject (Any)
19:59 colomon pmichaud: my only problem there is that I've been trying to make different versions of that work while you and jnthn have been talking, and so far none of them do.
19:59 pmichaud and it does warn.
19:59 ash_ oh
19:59 ash_ okay, i was confused on that bit
19:59 pmichaud (i.e., I have to retract what I claimed earlier... sorry about that)
19:59 TimToady phone
20:00 jnthn pmichaud: Nothing is *really* blocking it in a sense.
20:00 colomon warn "..."  followed by 0 doesn't seem to actually return the 0.
20:00 lichtkind joined #perl6
20:00 colomon > my $x; say +$x
20:00 colomon Use of uninitalized value
20:00 jnthn pmichaud: Mostly I didn't immediately know the clean way to extract the adverb after the type name.
20:00 colomon no zero.
20:00 pmichaud jnthn: I don't think it's an adverb, technically.
20:01 pmichaud It looks to me more like a longname.
20:01 jnthn pmichaud: It is
20:01 * pmichaud checks STD.pm6
20:01 jnthn pmichaud: Let me say it better
20:01 lichtkind pmichaud: hej wb
20:01 moritz_ colomon: maybe note() instead of warn (as another evil hack)
20:01 jnthn pmichaud: I don't know what the general meaning of those colonpairs after a longname are.
20:01 pmichaud colomon: I'm fine if we just print something to $*ERR for now, then.
20:02 pmichaud $*ERR.say("Use of undefined value ...");  0;
20:02 colomon trying note at the moment.
20:02 PerlJam jnthn: glad it's not just me  :)
20:02 takadonet joined #perl6
20:03 moritz_ note is basically $*ERR.say()
20:03 pmichaud jnthn: I think it depends on the longname
20:03 jnthn pmichaud: That is, I wanted to work out something general, rather than a hack.
20:03 jnthn pmichaud: Ah.
20:03 takadonet joined #perl6
20:03 pmichaud jnthn: but I'll look at STD's parsing and see if I can tease anything out
20:03 jnthn pmichaud: Suggestions welcome.
20:04 jnthn pmichaud: I'm open to Just Making It Work, but I wanted to at least try and get a sense of a good approach first. :-)
20:04 m6locks joined #perl6
20:04 hghgd_ joined #perl6
20:05 colomon > my $a; say +$a
20:05 colomon Use of uninitalized value
20:05 colomon 0
20:06 jnthn \o/
20:06 Spreadsheet_ joined #perl6
20:06 jnthn colomon: Maybe add "in numeric context"
20:06 moritz_ s\o/ccess
20:06 colomon > class Tree { has $.leaf; }; my $x = Tree.new; say +$x
20:06 colomon Can't take numeric value for Tree()
20:07 moritz_ s/for/of/ maybe?
20:07 CokeBot9000 joined #perl6
20:07 colomon does it make sense to have Tree() instead of Tree there?  This is the case where Tree is defined...
20:08 moritz_ "for object of type Tree"
20:08 jnthn Yeah, that's quite nice
20:08 jnthn .WHAT.perl gets it without the ()
20:10 colomon er?
20:11 colomon rakudo: say 5.WHAT
20:11 p6eval rakudo 1f638c: OUTPUT«Int()␤»
20:11 masak joined #perl6
20:11 colomon rakudo: my  $a = 5/4; say "hello $a.WHAT.perl"
20:11 p6eval rakudo 1f638c: OUTPUT«hello 1.25.WHAT.perl␤»
20:12 colomon rakudo: my  $a = 5/4; say "hello $a.WHAT"
20:12 p6eval rakudo 1f638c: OUTPUT«hello 1.25.WHAT␤»
20:12 masak ahojte, alle Lambda-Leute!
20:12 masak colomon: you need parens at the end.
20:12 jnthn Language Score: 3
20:12 jnthn masak++
20:12 colomon rakudo: my  $a = 5/4; say "hello $a.WHAT.perl()"
20:12 p6eval rakudo 1f638c: OUTPUT«hello Rat␤»
20:13 user2387153 joined #perl6
20:14 pugssvn r30430 | moritz++ | [t/spec] test that subset type checks perform the nominal type check first
20:14 Spreadsheet_ Are there any Perl interactive prompts?
20:15 moritz_ rakudo has one, but it's not quite awesome yet
20:15 masak Spreadsheet_: if you just type 'perl6', you get one.
20:15 Spreadsheet_ masak: thanks
20:15 masak it's still suffering from 'every line is its own block' disease.
20:15 masak which makes it less useful.
20:16 Spreadsheet_ I only have Perl 5 so I don't know about Perl6
20:16 Spreadsheet_ I have some suggestions for a possible Perl6 prompt
20:16 masak great!
20:16 Spreadsheet_ Or prompts in general, I'm going to paste it
20:16 masak let's hear them.
20:16 masak nopaste it.
20:16 masak (see /topic)
20:16 * Spreadsheet_ still has to write it, but has thought of most of it at school
20:17 masak we like hearing suggestions. sometimes we like realizing them as well :)
20:17 Spreadsheet_ I mean write the suggestion, I have no coding ability :(
20:17 moritz_ that you can learn :-)
20:18 masak I might implement a REPL for Yapsi at some point, but I haven't really tried to figure out how to use ReadLine from Rakudo.
20:19 moritz_ rakudo: "foo\123bar"
20:19 p6eval rakudo 1f638c: OUTPUT«Unrecognized backslash sequence: '\1' at line 11, near "23bar\""␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
20:20 _buno_ joined #perl6
20:21 moritz_ rakudo: use Test; plan 1; eval_dies_ok q{"\123"}, '"\123" is now illegal';
20:21 p6eval rakudo 1f638c: OUTPUT«1..1␤ok 1 - "\123" is now illegal␤»
20:21 moritz_ rakudo: use Test; plan 1; eval_dies_ok q{"\023"}, '"\023" is now illegal';
20:21 p6eval rakudo 1f638c: OUTPUT«1..1␤not ok 1 - "\023" is now illegal␤# Looks like you failed 1 tests of 1␤»
20:22 masak test development on-channel :) moritz_++
20:22 moritz_ std: "\023"
20:22 p6eval std 30428: OUTPUT«ok 00:01 109m␤»
20:22 jnthn moritz_: \0 is a valid escape sequence.
20:22 jnthn For NULL
20:22 masak yeah.
20:22 masak we realized that the other week :)
20:22 moritz_ that explains why the tests fail
20:22 masak Rakudo++
20:23 moritz_ rakudo: say "\040".perl
20:23 p6eval rakudo 1f638c: OUTPUT«"\x[0]40"␤»
20:23 jnthn \0NOES
20:24 pugssvn r30431 | moritz++ | [t/spec] \0 is a valid escape sequence
20:27 masak Spreadsheet_: Pugs has a decent REPL, if I recall correctly.
20:28 hghgd joined #perl6
20:28 moritz_ masak: you do
20:28 jnthn It even had pretty ascii art at startup. :-)
20:29 jnthn And beat the Rakudo one in other aspects.
20:30 jnthn *beats
20:30 masak I blame the Haskell. it's just so magical and awesome.
20:30 * jnthn looks forward to Rakudo having a good one. :-)
20:30 * jnthn builds Rakudo with http://paste.lisp.org/display/98066 to find out how it explodes
20:30 diakopter Haskell is the terrorist of programming languages
20:31 masak and Parsec. Parsec was allegedly a big reason Pugs could grow so fast so quickly.
20:31 pugssvn r30432 | moritz++ | [t/spec] test for RT #67932
20:32 kensanata joined #perl6
20:33 kfo_ joined #perl6
20:33 pmichaud ...are we adding .abs to Numeric?  If so, why?
20:33 masak I've been picking up GGE this evening. trying to get grammars to work.
20:33 pmichaud I figured .abs belonged in Cool, and that's about it.
20:34 jnthn pmichaud: fwiw, I'm investigating why it makes the role composer explode.
20:34 jnthn pmichaud: Rather than planning to apply it.
20:34 pmichaud okay, that's fine with me.
20:34 jnthn pmichaud: Though I think colomon++ may have been planning to apply it once I fix that bug.
20:34 jnthn So perhaps still a good question anyway. :-)
20:35 masak pmichaud: .abs is spec'd as a method on Numeric, returning a Numeric.
20:35 moritz_ pmichaud: because the spec says .abs should be in Numeric
20:35 pmichaud that feels wrongish to me.
20:35 masak rakudo: say Complex ~~ Numeric
20:35 p6eval rakudo 1f638c: OUTPUT«1␤»
20:36 pmichaud I guess I need to refresh my memory on what Numeric represents.
20:37 masak S02: "For instance all the numeric types perform the C<Numeric> role [...]"
20:37 pmichaud sure, but that doesn't mean that all of the numeric methods belong there.
20:37 pmichaud especially if they're just going to say "you need to overload this"
20:37 masak *nod*
20:39 pyrimidine left #perl6
20:40 pugssvn r30433 | moritz++ | [t/spec] calling a non-existing sub in a namespace should mention that sub in the error message
20:41 moritz_ it took me quite some time to find the appropriate test file for this test
20:44 lisppaste3 Spreadsheet pasted "Interactive Perl suggestion" at http://paste.lisp.org/display/98106
20:45 * masak looks
20:45 mariano__ joined #perl6
20:46 masak Spreadsheet_: I fully agree.
20:46 masak and I've been advocating that line for over a year :)
20:46 masak see the first part of http://use.perl.org/~masak/journal/38279
20:47 masak Spreadsheet_: admittedly, your proposal is more detailed. I'd really like to see something like that for Perl 6.
20:47 pmichaud So would I.  I hope someone who knows more about editors than I can implement it.  :)
20:48 Spreadsheet_ oo my bad
20:48 pmichaud I know how to do grammars and regexes and compilers.  Interactive editing is well out of my comfort zone at the moment.
20:48 Spreadsheet_ hehe the line 2 of broken.p6 does have a semicolon
20:48 pmichaud (and the few times I tried writing an editor many many many years ago, I failed miserably)
20:48 ash_ pmichaud: is anyone working on the interactive terminal?
20:48 pmichaud s/failed miserably/gave up and said "not worth the trouble"
20:48 moritz_ pmichaud: well, start with the RPL part, then :-)
20:49 pmichaud ash_: I plan to fix the REPL so that it remembers lexical declarations from one line to the next
20:49 masak \o/
20:49 pmichaud I *might* be able to fix it so that it detects "oh, you're in the middle of a block, I'll grab more input until you're done"
20:49 masak Spreadsheet_: yes, variable names can have numbers in them.
20:49 masak Spreadsheet_: they can also have dashes and apostrophes in Perl 6.
20:50 rurban I tried to add a readline repl to scsh (scheme shell) and found out that it's very hard to do. with the perl5 Readline lib it's easier. see perl5db.pl
20:50 pmichaud I'm definitely not planning to do "hit the up-arrow a couple of times and you get a full-screen editor display of your function".  Someone else gets to do that part.
20:50 jnthn pmichaud: fwiw, I think STD has some hook for getting more input.
20:50 pmichaud Rakudo already has a readline repl.  The tricky part is handling declarations.
20:50 jnthn pmichaud: May be a place to take inspiration.
20:50 pmichaud jnthn: yes, I've seen it.
20:51 jnthn OK, cool.
20:51 masak pmichaud: in which file does Rakudo pull in readline? I guess somewhere in PCT, yes?
20:51 ash_ how hard would it be to keep a buffer of the output, then with like double up arrow you pipe it into env EDITOR or something?
20:51 pmichaud what would be really useful is to see if STD actually made use of that hook interactively (perhaps it does already and I just haven't noticed?)
20:51 ash_ then on close of that, evaluate and start where you left off?
20:51 pmichaud masak: readline is Parrot core
20:52 rurban one trick is to add run-time declared subs and types to the completion table
20:52 TPF|Coke Spreadsheet_: rakudo's repl already has readline. no?
20:52 pmichaud masak: it's built into the I/O PMCs already
20:52 masak pmichaud: yes, I know. my line of questioning will lead up to 'can I use it in my Perl 6 program in Rakudo'.
20:52 ash_ yeah, it will use readline if you have it
20:52 ash_ if the up arrow works for you, it has readline
20:52 Spreadsheet_ TPF|Coke: if it does, then good, because no one likes seeing ^[[D when they press <
20:53 pmichaud masak: I don't see why one couldn't use it in a Rakudo program; we just need to define the appropriate classes and methods for it
20:53 Spreadsheet_ That is what it does right?
20:53 TPF|Coke I definitely want the ability to add some of those customizations for partcl.
20:53 masak pmichaud: ok, that sounds promising.
20:53 pmichaud masak: I can probably write a proof-of-concept
20:53 masak \o/
20:53 masak ++pmichaud
20:54 * pmichaud builds rakudo trunk to see if he can prove that readline works.
20:54 moritz_ works here
20:54 moritz_ (the built-in one)
20:54 pmichaud moritz_: from P6?
20:54 masak Spreadsheet_: anyway, good work. it's proposals like that that fuel good work around here.
20:54 moritz_ pmichaud: nope
20:54 pmichaud oh.
20:55 rurban my $<tab> => files
20:55 * pmichaud searches for #perl6 discussions on .Numeric
20:55 rurban su<tab> => subs starting with su not files
20:56 masak or types. or enum values.
20:56 masak or constants.
20:56 rurban or hashes and classes, ...
20:56 masak or builtins.
20:57 rurban clisp has all this
20:57 pmichaud I really wish the perlgeek.de search knew how to include punctuation
20:57 * moritz_ hides
20:57 rurban clisp even detects if you want a file or string completion
20:57 rurban (inside a string)
20:58 moritz_ so... it can read minds?
20:58 ash_ is there a place we can write about the features that could be useful for REPL? so we don't forget? or can figure out a prioirty on them so we know which ones are more or less important?
20:59 masak Perl 5's $\ has been replaced by $*OUT.output-line-separator, yes?
20:59 pmichaud the priority is going to be set by whoever implements them.  Almost any other form of priority is probably not useful.  :-)
20:59 moritz_ std: $\
20:59 p6eval std 30433: OUTPUT«[31m===[0mSORRY![31m===[0m␤Unsupported use of $\ variable; in Perl 6 please use the filehandle's :ors attribute at /tmp/gwgEmpUNbp line 1:␤------> [32m$\[33m⏏[31m<EOL>[0m␤Parse failed␤FAILED 00:01 109m␤»
20:59 jnthn rakudo: $\
20:59 p6eval rakudo 1f638c: OUTPUT«Confused at line 11, near "$\\"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
20:59 masak ash_: you could write a blog post about it.
21:00 jnthn aww
21:00 moritz_ it's one of those I haven't ported, it seems
21:00 masak :ors?
21:00 ReiniUrban joined #perl6
21:00 moritz_ output-record-separator
21:00 masak yesyes.
21:00 masak but
21:00 ReiniUrban But I think a string starting with a / also triggers pathname completion
21:00 ash_ true, then i could try implementing it too, if i am feeling special, but i am a bit busy... so i probably wouldn't get a chance till school ends for the summer
21:00 moritz_ rakudo: $\
21:00 p6eval rakudo 1f638c: OUTPUT«Confused at line 11, near "$\\"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
21:01 masak moritz_: I don't see an 'ors' attribute in the spec.
21:01 moritz_ it's there in src/Perl6/Grammar.pm line 673 (detection of $\)
21:01 masak I'm sure it is.
21:01 masak I'm just pointing out the mis-alignment between STD.pm6 and the spec.
21:02 masak S32/IO talks about an output-line-separator method.
21:02 moritz_ s/the spec/the rest of the spec/ :-)
21:02 masak right. the synopses.
21:02 cotto_work joined #perl6
21:03 pmichaud note that TimToady++ has commented in the past that STD.pm is also "spec"  :-)
21:03 pmichaud (which is what moritz_++'s comment indicates :)
21:03 masak yes.
21:03 masak in that case, I call spec self-contradiction.
21:03 pmichaud indeed.  We should resolve it.
21:04 masak I was thinking about how to port the first example of http://www.catonmat.net/blog/per​l-one-liners-explained-part-one/ to Perl 6.
21:04 masak thinking about it, I'd rather write $*OUT.ors than $*OUT.output-line-separator :P
21:04 moritz_ pmichaud: re editor in REPL, the most promising feature would be to shell out to $EDITOR
21:05 masak both are much longer than $\, but one is absurdly longer.
21:05 moritz_ pmichaud: because everybody has their favorite one, and doesn't like any variation of it
21:05 pmichaud moritz_: kind of like shells do, then?
21:05 moritz_ pmichaud: yes
21:05 moritz_ no idea if that's actually a good idea in the long run...
21:05 pmichaud moritz_: I'm in favor of that.  I hope someone implements it.  :) :)
21:06 masak 'night.
21:06 * jnthn going to read for a bit, then more hacking
21:07 jnthn colomon: Got a fix for the role bug you were hitting when trying to pop abs in Numeric.
21:07 jnthn rakudo: my $x = 42 but role { method omg { say 'lol' } }; say $x; say $x.omg
21:07 p6eval rakudo 1f638c: OUTPUT«42␤lol␤1␤»
21:07 jnthn \o/
21:08 arnsholt Kewl.
21:08 jnthn Going to read for a bit, and then will try and fix the stuff that keeps us from passing S14-role/anonymous.t, even though the above works.
21:09 dalek rakudo: fadb800 | moritz++ |  (2 files):
21:09 dalek rakudo: make reduce() a bit more usable, and test it
21:09 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/f​adb800ab8a8a9d5d39e5f9a1ee1f24d769dfa61
21:10 pmichaud our multi reduce(&op, $list) { $list.reduce(&op)
21:10 pmichaud }
21:10 pmichaud looks wrong to me
21:11 pmichaud the one moritz_++ looks correct (and should probably be the only one)
21:11 pmichaud *moritz_++ did
21:12 moritz_ pmichaud: istr it's needed for the meta ops because some of the iterators don't do Positional yet
21:12 moritz_ but I agree that it's probably wrong
21:12 pmichaud okay.  If possible, I prefer that known probably wrong things go in src/cheats/  somewhere.
21:13 pmichaud so maybe  src/cheats/metaops.pm
21:15 dalek rakudo: 205d9d3 | moritz++ | src/Perl6/Grammar.pm:
21:15 dalek rakudo: properly carp on $\ usage
21:15 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/2​05d9d3f167b22792681d5a0a67652cd93dab074
21:15 * moritz_ -> bed
21:18 sahadev left #perl6
21:19 CokeBot9000 there's a readline standard for exiting out to your editor already, no?
21:20 pmichaud to me, the hard part is knowing what to send to the editor.
21:20 CokeBot9000 current line so far?
21:21 pmichaud well, if you're going to an editor, usually you want more than just the current line
21:21 pmichaud i.e., you want the current sub or block or class or something like that
21:22 colomon jnthn: \o/
21:22 wknight8111 joined #perl6
21:25 gbacon joined #perl6
21:25 sundar pmichaud: do you mean multiple lines may have been input at the REPL and they might all need to be passed? Is multiple line input going to be supported?
21:26 pmichaud sundar: yes, I'd hope so
21:26 pmichaud sundar: so one can do
21:26 pmichaud > sub foo() {
21:26 pmichaud >   ...
21:26 pmichaud > }
21:27 pugssvn r30434 | colomon++ | [t/spec] Remove +Mu == 0 test.
21:27 pmichaud that's certainly implied by Spreadsheet_++'s nopaste, if I'm reading it correctly.
21:27 Spreadsheet_ Hmm, what?
21:28 lisppaste3 pmichaud pasted "readline in p6, for masak" at http://paste.lisp.org/display/98110
21:29 pmichaud phenny:  tell masak  readline in p6 at http://paste.lisp.org/+23PA
21:29 pmichaud argh.
21:29 pmichaud phenny: tell masak  readline in p6 at http://paste.lisp.org/+23PA
21:29 pmichaud enophenny?
21:29 diakopter phenny no workie
21:30 diakopter not for a week at least?
21:30 diakopter I think.
21:32 sbp oh, sorry
21:32 phenny joined #perl6
21:32 sbp dunno what happened there!
21:35 pugssvn r30435 | mberends++ | [spec/S32-temporal/DateTime.t] renamed from Temporal.t, add 2 strftime tests
21:42 snarkyboojum joined #perl6
21:42 diakopter phenny: tell pmurias this is quite interesting to me.  http://research.microsoft.com​/pubs/121449/techreport2.pdf  particularly:
21:42 phenny diakopter: I'll pass that on when pmurias is around.
21:43 diakopter phenny: tell pmurias  ... As Figure 1 shows, we actually have both X86 and CIL versions of the Bartok runtime code and the JavaScript runtime code available at runtime. Having the CIL form may seem unnecessary at first as we can just call directly into the X86 form.
21:43 phenny diakopter: I'll pass that on when pmurias is around.
21:44 diakopter phenny: tell pmurias ... However, in order to optimize traces that span calls into the runtime, we use the CIL of runtime methods and dynamically compile them into a form that contains profiling counters or callbacks to our trace recorder.
21:44 phenny diakopter: I'll pass that on when pmurias is around.
21:44 diakopter phenny: tell pmurias  ... This way, the recorded trace contains CIL instructions of any inlined runtime methods along with CIL instructions from compiled JavaScript code.
21:44 phenny diakopter: I'll pass that on when pmurias is around.
21:44 diakopter phenny: tell pmurias ... This is crucial in order to optimize traces that span runtime code, in particular for the JavaScript runtime, as its methods contain most of the specialization opportunities.
21:44 phenny diakopter: I'll pass that on when pmurias is around. I'll have to use a pastebin, though, so your message may get lost.
21:44 diakopter heh
21:44 szabgab moritz_, do you already know if you'll be able to attend LinuxTag Berlin?
21:44 diakopter moritz_ went to sleep I think
21:45 szabgab it is not even midnight for him :-)
21:45 szabgab but then maybe I should too...
21:49 diakopter wth
21:57 pugssvn r30436 | mberends++ | [t/spec/S32-temporal/Temporal.t] really remove, it is now called DateTime.t
22:06 dalek rakudo: 2a93f45 | (Martin Berends)++ |  (2 files):
22:06 dalek rakudo: [core/Temporal.pm] add a fairly large subset of strftime() and some tests for it
22:06 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/2​a93f45678dd56b76e109f9998d99a1fd6405fd0
22:06 dalek rakudo: c778995 | (Solomon Foster)++ | src/core/ (2 files):
22:06 dalek rakudo: Remove Mu.Numeric.  Add Any.Numeric, and make it both pickier and more informative.
22:06 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/c​778995d56729d79a8bcfc5ef9e128b88ce18992
22:09 pmurias diakopter: the paper seems interesting, i'll read it tommorow
22:09 phenny pmurias: 21:42Z <diakopter> tell pmurias this is quite interesting to me.  http://research.microsoft.com​/pubs/121449/techreport2.pdf  particularly:
22:09 phenny pmurias: 21:43Z <diakopter> tell pmurias  ... As Figure 1 shows, we actually have both X86 and CIL versions of the Bartok runtime code and the JavaScript runtime code available at runtime. Having the CIL form may seem unnecessary at first as we can just call directly into the X86 form.
22:09 phenny pmurias: 21:44Z <diakopter> tell pmurias ... However, in order to optimize traces that span calls into the runtime, we use the CIL of runtime methods and dynamically compile them into a form that contains profiling counters or callbacks to our trace recorder.
22:09 phenny pmurias: 21:44Z <diakopter> tell pmurias  ... This way, the recorded trace contains CIL instructions of any inlined runtime methods along with CIL instructions from compiled JavaScript code.
22:09 phenny [Sorry, some messages were elided and lost...]
22:15 astrojp left #perl6
22:19 hercynium joined #perl6
22:20 lichtkind mberends: hai
22:20 mberends lichtkind: rehai
22:21 diakopter jae
22:21 lichtkind :)
22:21 mberends 'k
22:21 lichtkind mberends: whazzup buddy?
22:21 nihiliad joined #perl6
22:22 mberends lichtkind: making progress on DateTime and proto
22:22 sundar Where does rakudo read parrot's current revision number from?
22:25 mberends rakudo: %*VM<config><revision>.say
22:25 p6eval rakudo 205d9d: OUTPUT«45822␤»
22:28 avar rakudo %*ENV<shell>
22:28 avar rakudo: %*ENV<SHELL>
22:28 p6eval rakudo 205d9d:  ( no output )
22:29 mberends rakudo: %*ENV<SHELL>.say
22:29 p6eval rakudo 205d9d: OUTPUT«/bin/bash␤»
22:30 lue Hello there!
22:30 mberends hellue there!
22:30 * jnthn back
22:33 sundar mberends: thanks.. but I phrased my question dumbly. What I wanted to know was, where does rakudo's Configure.pl read the existing parrot's revision number from? does it use svn info or something else?
22:34 mberends sundar: it runs parrot_install/bin/parrot_config
22:35 dalek rakudo: 0b67c52 | jonathan++ | src/metamodel/RoleToRoleApplier.nqp:
22:35 dalek rakudo: Should check definedness rather than truth when looking if a method exists in the role composer; this is because .Bool method may not be defined so early in the bootstrap in places we'd want it to be, so we exploded if roles were used in a certain way in the setting.
22:35 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/0​b67c526dc774ab1d14743a3328616d4138dbf6c
22:35 jnthn Another cut with the circularity saw. :-)
22:37 lue your startup grammar talk hertz my brain /o\
22:37 jnthn Mine too. ;-)
22:38 lue ah, you're checking if it exists rather than how good its character is.
22:40 ShaneC joined #perl6
22:40 ShaneC left #perl6
22:42 krakan joined #perl6
22:44 meppl joined #perl6
22:50 Kyril joined #perl6
22:51 jnthn lue: Yes. :-)
22:59 lue rakudo: 51-38
22:59 p6eval rakudo c77899:  ( no output )
22:59 lue rakudo: say 51-38
22:59 p6eval rakudo c77899: OUTPUT«13␤»
22:59 lue you're 13 minutes late :)
23:02 jnthn jnthn is never late. He replies exactly when he intends. :-)
23:02 spreadsheet left #perl6
23:10 snarkyboojum left #perl6
23:11 * lue wonders if A0 is what all the cool posters are printed on
23:13 jnthn No, just the big ones.
23:13 sorear CokeBot9000: 10 years of Parrot?  Where?
23:15 lue I'm just wondering what most posters (i.e. seen in school halls) are sized. ~1m each side seems a bit huge
23:15 orafu joined #perl6
23:16 CokeBot9000 sorear: I was rounding for effect. the project's been around since 2001.
23:17 CokeBot9000 runtime/parrot/library/SQLite3.pir
23:17 lue it's only an off-by-one error :)
23:17 CokeBot9000 bah.
23:17 CokeBot9000 runtime/parrot/library/SQLite3.pir
23:17 CokeBot9000 bah!
23:18 CokeBot9000 8/29/01
23:22 mberends rakudo: DateTime.now.strftime("It is now %k.%M%p on %A").say
23:22 p6eval rakudo 0b67c5: OUTPUT«It is now 23.06pm on Wednesday␤»
23:22 * sorear finishes backlog
23:22 CokeBot9000 just thought that might offer some insight into why parrot may appear more conservative than rakudo.
23:26 * jnthn is 2 tests of passing all of S14-role/anonymous.t :-)
23:26 jnthn *off
23:29 lue .u hand
23:29 phenny U+270C VICTORY HAND (✌)
23:30 CokeBot9000 .u degree
23:30 phenny U+00B0 DEGREE SIGN (°)
23:30 CokeBot9000 yay.
23:35 awwaiid joined #perl6
23:36 ingy joined #perl6
23:36 awwaiid joined #perl6
23:40 * sorear wonders what ruoso is trying to accomplish
23:41 colomon jnthn: \o/
23:41 jnthn colomon: I've got it working but...we get intermittent failures. I've a good idea why though.
23:42 colomon jnthn++
23:42 colomon 30837 passing tests here, wonder if we can squeeze out another 163 by release tomorrow...
23:42 colomon which reminds me, what was that test with .Numeric that you had to fudge the other day?
23:43 jnthn erm
23:43 jnthn something entirely unrelated to Numeric
23:43 * jnthn tries to remember
23:43 colomon methods.t ?
23:43 jnthn Oh
23:43 colomon anonymous.t
23:43 jnthn S12-methods/multi.t iirc.
23:43 jnthn Oh
23:43 jnthn or S12-class/anonymous.t more likely.
23:43 jnthn Yes, the last I think.
23:44 jnthn Was Numeric and Stringy.
23:44 pugssvn r30437 | colomon++ | [t/spec] Unfudge .Numeric test that now works.
23:44 jnthn But you can probably unfudge part of it with Numeric.
23:46 pugssvn r30438 | colomon++ | [t/spec] Unfudge .Numeric test that now works.
23:46 colomon both anonymous.t and methods.t had one.  :)
23:46 colomon two down, 161 to go.  ;)
23:46 gurjeet joined #perl6
23:47 colomon afk # pub

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

Perl 6 | Reference Documentation | Rakudo | Niecza | Specs