Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2009-02-21

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:03 alester joined #perl6
00:04 pugs_svn r25469 | lwall++ | rm some fossils from quasi
00:07 Limbic_Region joined #perl6
00:20 justatheory joined #perl6
00:33 SamB joined #perl6
00:35 TimToady joined #perl6
00:41 fridim_ joined #perl6
00:41 pugs_svn r25470 | lwall++ | [STD] suppress name checking inside quasi:COMPILING
00:45 zostay joined #perl6
00:49 TimToady irc should have a /clown directive to put a ☺ in front of your name instead of an @
00:50 eternaleye joined #perl6
00:52 zostay joined #perl6
00:58 fridim_ joined #perl6
01:02 Tene joined #perl6
01:04 shinobi-cl joined #perl6
01:17 nihiliad joined #perl6
01:39 samlh_ joined #perl6
01:40 pugs_svn r25471 | lwall++ | [STD] don't complain on CALLER or CONTEXT; don't complain on vars declared explicitly in import list
01:49 eternaleye joined #perl6
01:49 skids in SXX pod, what's the '*' in =item * -- the bullet? -- can't find that documented in S26.
01:50 skids in SXX pod, what's the '*' in =item * -- the bullet? -- can't find that documented in S26.
01:50 skids joined #perl6
01:50 * skids is a gemini, can you tell?
01:53 dukeleto joined #perl6
01:57 alester joined #perl6
01:57 TimToady yes, it's a bullet
01:58 dukeleto perl6: say 42
01:58 p6eval elf 25471, pugs, rakudo f23eda: OUTPUT«42␤»
01:58 dukeleto yay
01:58 dukeleto perl6: say log10(0), log(0)
01:58 p6eval pugs: OUTPUT«-Inf-Inf␤»
01:58 p6eval ..elf 25471: OUTPUT«Undefined subroutine &GLOBAL::log10 called at (eval 121) line 3.␤ at ./elf_h line 4346␤»
01:58 p6eval ..rakudo f23eda: OUTPUT«-InfCan't take log of 0␤␤»
01:59 dukeleto TimToady: why does perl not return what ieee754 and libm think log(0) is, i.e. -Inf ?
02:00 dukeleto i understand that it is somewhat like the "Illegal division by zero" exception, but i think -Inf is more useful because it is easier to catch and do something useful with it
02:00 dukeleto currently rakduo gives log10(0) = -Inf, I guess it is not exported by default or something
02:01 TimToady I'm fine with -Inf for that
02:01 dukeleto TimToady: cool, I have the diff in my github
02:01 TimToady looks like pugs has it that way too
02:01 dukeleto TimToady: do I sent a pull request to rakudo?
02:01 dukeleto TimToady: I made the tests that way already :)
02:01 Limbic_Region it is amazing how much of pugs still is correct given how long since it has been actively developed
02:01 TimToady I haven't tried installing either parrot of rakudo after the big move
02:01 Limbic_Region nor have I
02:02 dukeleto TimToady: http://github.com/leto/rakudo/commit/e68af54f8f8f8a007039e9ac95760004a288c8b2
02:02 aindilis joined #perl6
02:03 skids does the pod->html generator have a way to spit out unrendered <a name="">'s other than the line number ones?  some of those sections are vast.
02:04 skids i.e. a pod directive
02:04 dukeleto TimToady: i just submitted that diff (called a pull request on github) to everyone else that has forked Rakudo on github
02:04 TimToady I try to stay out of politics :)
02:07 TimToady decommuting &
02:15 samlh joined #perl6
02:20 dukeleto perl6: say (42).log
02:20 p6eval pugs: OUTPUT«3.7376696182833684␤»
02:20 p6eval ..elf 25471, rakudo f23eda: OUTPUT«3.73766961828337␤»
02:20 dukeleto perl6: say (42,100).log
02:20 p6eval pugs: OUTPUT«0.6931471805599453␤»
02:20 p6eval ..rakudo f23eda: OUTPUT«0.693147180559945␤»
02:20 p6eval ..elf 25471: OUTPUT«Useless use of a constant in void context at (eval 120) line 3.␤4.60517018598809␤»
02:21 dukeleto pugs and rakudo are taking the log of the length of the list, is this the desired behavior?
02:21 dukeleto it seems that threading over the list would be much more useful
02:22 skids dukeleto: that would be ()>>.log but it's not yet implemented.
02:23 WootKit joined #perl6
02:23 dukeleto skids: interesting, where could I start ?
02:23 skids (but that doesn't guarantee order)
02:23 dukeleto what is ">>" called ?
02:23 skids I have no idea, to be honest.
02:23 skids Texas quote.  It's actually just longhand for a french quote.
02:24 skids http://www.perlfoundation.org/perl6/index.cgi?witch_lfrench
02:26 dukeleto it's the "unary hyperoperator" in t/spec/S03-operators/hyper.t
02:27 dukeleto i think I will call it the threading operator
02:27 eternaleye joined #perl6
02:29 dukeleto perl6: say (1,2,3) >> log
02:29 p6eval elf 25471: OUTPUT«Undefined subroutine &GLOBAL::log called at (eval 122) line 3.␤ at ./elf_h line 4346␤»
02:29 p6eval ..pugs: OUTPUT«*** ␤    Unexpected ">>"␤    expecting operator, ":" or ","␤    at /tmp/OlqIGFcFe9 line 1, column 13␤»
02:29 p6eval ..rakudo f23eda: OUTPUT«Statement not terminated properly at line 1, near ">> log"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
02:29 dukeleto perl6: say (1,2,3) >>.log
02:29 p6eval rakudo f23eda: OUTPUT«Statement not terminated properly at line 1, near ">>.log"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
02:29 p6eval ..pugs: OUTPUT«*** ␤    Unexpected ">>."␤    expecting operator, ":" or ","␤    at /tmp/FJFtqVYq1L line 1, column 13␤»
02:29 p6eval ..elf 25471: OUTPUT«Use of uninitialized value in concatenation (.) or string at ./elf_h line 3849.␤Use of uninitialized value in concatenation (.) or string at ./elf_h line 3849.␤syntax error at (eval 122) line 3, near ",->log"␤ at ./elf_h line 4346␤»
02:30 dukeleto perl6: say (1,2,3)>>++
02:30 p6eval rakudo f23eda: OUTPUT«Statement not terminated properly at line 1, near ">>++"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
02:30 p6eval ..pugs: OUTPUT«<Error><Error><Error>␤»
02:30 p6eval ..elf 25471: OUTPUT«Useless use of a constant in void context at (eval 119) line 3.␤Can't modify constant item in postincrement (++) at (eval 119) line 3, near ")++"␤Too many arguments for postincrement (++) at (eval 119) line 3, near ")++"␤ at ./elf_h line 4346␤»
02:30 skids dukeleto: You'll have better luck with the infix hyperoperators.
02:31 skids rakudo: (1,2,3) >>+>> 2
02:31 p6eval rakudo f23eda: RESULT«[3, 4, 5]»
02:31 dukeleto nice
02:32 skids rakudo: (1,2,3) >>+<< (2,3,4)
02:32 p6eval rakudo f23eda: RESULT«[3, 5, 7]»
02:32 dukeleto but I am looking for things to work on, so it seems like unary hyperoperators need some lovin'
02:33 skids My understanding is that is complicated by I think maybe parsing stuff.
02:34 skids Do you already know PIR or just want to work in perl6?
02:34 dukeleto skids: I am somewhat comfortable in PIR
02:35 dukeleto skids: I did a bunch of stuff in asmutils (cross platform unix assembly), so PIR reminds me of a friendlier more feature-rich version of that
02:36 dukeleto are there any decent beginner guides for PIR? I usually just read source, but sometimes one well-written example goes a long way
02:37 skids Hrm, well you can look at the RT bugs I guess.  IIRC one thing I noticed not working was "div" but that may involve parsing too.
02:38 skids There's the parrot docs, and also some guide on using a syntax tree parser.
02:38 dukeleto yes, I have been reading the POD that comes with parrot, it helps a lot
02:41 skids http://www.parrotblog.org/2008/03/targeting-parrot-vm.html
02:42 skids and johnathan's posts on rakudo.org blog can give you some inside baseball
02:43 dukeleto sweet
02:50 abra joined #perl6
02:52 aindilis` joined #perl6
03:03 hercynium joined #perl6
03:19 abra joined #perl6
03:23 shinobi-cl joined #perl6
03:23 shinobi-cl left #perl6
03:25 abra joined #perl6
03:27 abra joined #perl6
03:35 dukeleto I get :Null PMC access in isa()
03:35 dukeleto current instr.: '!EXPORT' pc 17844 (src/builtins/guts.pir:39)
03:35 dukeleto when I try to add namespacing to math.pir
03:35 dukeleto what exactly does that mean?
03:42 Avada joined #perl6
03:43 abra joined #perl6
04:01 abra joined #perl6
04:09 justatheory joined #perl6
04:20 skids dukeleto: you mean what is NULL PMC generically?  It's following a null pointer expecting a PMC I think.
04:23 pugs_svn r25472 | lwall++ | [thorough.t] an enum may not be used as a listop
04:23 pugs_svn r25473 | lwall++ | [STD] hack in rudimentary support for enums
04:27 abra joined #perl6
04:28 abra left #perl6
05:05 justatheory_ joined #perl6
05:14 meppl joined #perl6
05:17 samlh joined #perl6
05:32 SamB joined #perl6
06:05 chrisdolan joined #perl6
06:06 chrisdolan What's the recommended Parrot for Rakudo today?  0.9.1?  Head?
06:09 Entonian joined #perl6
06:12 mberends joined #perl6
06:16 pugs_svn r25474 | lwall++ | [STD] parse anonymous enums correctly
06:27 justatheory joined #perl6
06:31 masak joined #perl6
06:56 meppl joined #perl6
07:10 Entonian joined #perl6
07:55 sparc_ joined #perl6
08:22 pugs_svn r25475 | lwall++ | [CORE] add &make
08:40 masak interested question: what is time_t, and why must it die? :)
08:40 masak ah, I see now. Mark J. Reed gave a summary.
08:41 iblechbot joined #perl6
08:45 masak it would be interesting if someone would pick five or so popular CPAN modules known to handle time in some way, analyze all the ways time is treated in those modules, and propose a syntax/API for doing it the Perl 6 way.
08:45 masak a perfect topic for a blog post, if you ask me.
08:46 pugs_svn r25476 | masak++ | [u4x/TODO] added Instant/Duration
08:46 ejs joined #perl6
08:54 frioux joined #perl6
08:59 bacek joined #perl6
09:00 ZuLuuuuuu joined #perl6
09:03 frioux joined #perl6
09:07 frioux joined #perl6
09:09 zophy joined #perl6
09:14 ZuLuuuuuu left #perl6
09:16 barney joined #perl6
09:26 iblechbot_ joined #perl6
09:43 iblechbot joined #perl6
09:44 zophy joined #perl6
09:48 zophy joined #perl6
09:58 zophy joined #perl6
10:11 bacek perl6: undef <=> 42
10:11 bacek perl6: say undef <=> 42
10:11 p6eval rakudo f23eda: OUTPUT«Multiple Dispatch: No suitable candidate found for 'cmp_num', with signature 'PP->I'␤current instr.: 'infix:<=>' pc 15995 (src/builtins/cmp.pir:74)␤»
10:11 p6eval ..elf 25476: OUTPUT«Parse error in: /tmp/Do1wfPPQOf␤panic at line 1 column 0 (pos 0): Can't understand next input--giving up␤WHERE: undef <=> 42␤WHERE:/\<-- HERE␤  STD_red/prelude.rb:99:in `panic'␤  STD_red/std.rb:76:in `scan_unitstopper'␤  STD_red/std.rb:224:in `comp_unit'␤  STD_red/std.rb:210:in
10:11 p6eval ..`...
10:11 p6eval ..pugs: RESULT«-1»
10:11 p6eval rakudo f23eda: OUTPUT«Multiple Dispatch: No suitable candidate found for 'cmp_num', with signature 'PP->I'␤current instr.: 'infix:<=>' pc 15995 (src/builtins/cmp.pir:74)␤»
10:11 p6eval ..elf 25476: OUTPUT«Parse error in: /tmp/xwdiUNt6Ea␤panic at line 1 column 0 (pos 0): Can't understand next input--giving up␤WHERE: say undef <=> 42␤WHERE:/\<-- HERE␤  STD_red/prelude.rb:99:in `panic'␤  STD_red/std.rb:76:in `scan_unitstopper'␤  STD_red/std.rb:224:in `comp_unit'␤
10:11 p6eval ..STD_red/std.rb:210:...
10:11 p6eval ..pugs: OUTPUT«-1␤»
10:11 bacek perl6: say 42 <=> undef
10:11 p6eval pugs: OUTPUT«1␤»
10:11 p6eval ..elf 25476: OUTPUT«Use of uninitialized value $b in numeric comparison (<=>) at ./elf_h line 4246.␤1␤»
10:11 p6eval ..rakudo f23eda: OUTPUT«Use of uninitialized value␤1␤»
10:31 zophy joined #perl6
11:12 pmurias joined #perl6
11:19 DemoFreak joined #perl6
11:32 pmurias perl6: my @foo;say @foo.shift;
11:32 p6eval rakudo f23eda: OUTPUT«Undefined value shifted from empty array␤␤»
11:32 p6eval ..elf 25476, pugs: OUTPUT«␤»
11:33 pmurias rakudo: my @foo;say @foo.shift;say "hello\n";
11:33 p6eval rakudo f23eda: OUTPUT«Undefined value shifted from empty array␤␤hello␤␤»
11:45 pugs_svn r25477 | pmurias++ | [mildew] t/array.t - added tests for shift
11:49 bacek good evening
11:56 bacek perl6: my $bool = Bool::False; say ++$bool; say ++$bool;
11:56 p6eval rakudo f23eda: OUTPUT«1␤1␤»
11:56 p6eval ..pugs: OUTPUT«1␤2␤»
11:56 p6eval ..elf 25477: OUTPUT«No viable candidate for call to multimethod prefix__43_43($) at (eval 122) line 4␤ at ./elf_h line 4346␤»
12:02 pugs_svn r25478 | bacek++ | [t/spec] Add prefix:++ and prefix:-- tests for Bool.
12:02 bacek_ joined #perl6
12:03 bacek_ perl6: my $bool = Bool::False; say --$bool; say $bool == Bool::False;
12:03 p6eval pugs: OUTPUT«-1␤␤»
12:03 p6eval ..rakudo f23eda: OUTPUT«0␤1␤»
12:03 p6eval ..elf 25477: OUTPUT«No viable candidate for call to multimethod prefix__45_45($) at (eval 121) line 4␤ at ./elf_h line 4346␤»
12:03 mikehh I built rakudo but over half the coretests fail
12:04 mikehh most of the spectests skip or fail
12:04 fridim_ joined #perl6
12:06 bacek_ mikehh: dont use parrot after r36866. It's broken...
12:06 mikehh parrot seemed to build ok - r36921 - http://smolder.plusthree.com/app/public_projects/report_details/18224
12:07 bacek_ mikehh: but Rakudo on this version doesn't work.
12:07 mikehh ok - will go back to my earlier build
12:10 mikehh Any idea what has broken - and what needs to be fixed
12:22 bacek_ mikehh: something wrong with parrot's string.
12:23 bacek_ perl6: say Bool ~~ Any; say Bool ~~ Object; class A {}; say A ~~ Any; say A ~~ Object;
12:23 p6eval pugs: OUTPUT«1␤1␤␤1␤»
12:23 p6eval ..elf 25478: OUTPUT«␤␤␤␤»
12:23 p6eval ..rakudo f23eda: OUTPUT«1␤1␤1␤1␤»
12:23 bacek_ interesting...
12:31 baest joined #perl6
12:38 jnthn bacek_: Rakudo hsa it right there.
12:40 bacek_ jnthn: it is. But I trying to understand what happening when I try to move Bool::succ/pred into Setting.
12:40 jnthn bacek_: Ah, that ain't going to work out too well.
12:40 jnthn Since they are also :vtable'd.
12:41 bacek_ jnthn: they are. But I've implemented succ/pred for Rakudo few month ago :) So I should be able to fix it.
12:43 bacek_ jnthn: btw, there are few patches waiting to review :) Do you have spare 15-20 minutes?
12:43 jnthn Not right now, but maybe later...
12:44 * jnthn has various $real_life chores to do ATM...
12:45 bacek_ jnthn: no worries. All of them in RT.
12:46 bacek_ (not your $real_life chores I hope :)
12:47 * bacek dreaming about RT for $real_life. And git.
12:48 bacek git reset --hard master@{2006-01-01} will be handful
12:50 bacek std:my @list; @list.first():{ ($_ == 4) }
12:50 bacek std: my @list; @list.first():{ ($_ == 4) }
12:50 p6eval std 25478: OUTPUT«ok 00:02 34m␤»
12:50 bacek std: my @list; @list.first(): { ($_ == 4) }
12:50 p6eval std 25478: OUTPUT«ok 00:02 34m␤»
12:56 jan_ joined #perl6
13:19 akulkis joined #perl6
13:43 pmurias joined #perl6
13:43 pmurias mildew: say "works"
13:43 p6eval mildew: OUTPUT«Use of uninitialized value in numeric gt (>) at ../../src/perl6/Cursor.pm line 189.␤can't create lex/STD/statementlist_01.store: Permission denied at ../../src/perl6/Cursor.pm line 551␤»
13:46 pmurias moritz_: shouldn't "and made evalbot run as the user who also own the environment" change fixed all the permission problems?
13:46 alanhaggai_ joined #perl6
13:48 pmurias mildew: say "works"
13:48 p6eval mildew: OUTPUT«Use of uninitialized value in numeric gt (>) at ../../src/perl6/Cursor.pm line 189.␤Loader.load: CORE.mildew.so: cannot open shared object file: No such file or directory␤»
13:50 pmurias mildew: say "works"
13:50 p6eval mildew: OUTPUT«Use of uninitialized value in numeric gt (>) at ../../src/perl6/Cursor.pm line 189.␤works␤»
13:54 pugs_svn r25479 | pmurias++ | [STD] hide a use of undefined value warning in Cursor.pmc
13:54 pmurias mildew: say "works"
13:54 p6eval mildew: OUTPUT«Use of uninitialized value in numeric gt (>) at ../../src/perl6/Cursor.pm line 189.␤works␤»
14:00 Muixirt joined #perl6
14:02 WootKit joined #perl6
14:33 pugs_svn r25480 | masak++ | [u4x/TODO] added 'texas' and 'french' (quotes)
14:35 shinobi-cl joined #perl6
14:39 aindilis joined #perl6
14:56 meppuru joined #perl6
14:58 ZuLuuuuuu joined #perl6
15:08 pmurias mildew: say "works"
15:08 p6eval mildew: OUTPUT«works␤»
15:09 diakopter pmurias: cool
15:09 pmurias diakopter: hi
15:09 diakopter hi
15:11 pmurias diakopter: how far did you get in try to get mildew to run on your box?
15:14 diakopter pmurias: it ran, sorta kinda
15:14 diakopter let me try to remember
15:14 diakopter oh yeah, a DLL exported name discrepancy
15:15 diakopter I gave up
15:15 diakopter (for then)
15:15 diakopter the exported function names had some prefix
15:15 diakopter in smop.dll (if I recall correctly)
15:18 diakopter pmurias: but anyway, I gave up for windows/strawberry, but I'd be glad to try it on my ubuntu/jaunty VM anytime
15:22 Whiteknight joined #perl6
15:24 pmurias diakopter: getting it compile on a debian-like machine should be a matter of apt-get'ing a bunch of packages and installing a bunch of modules from CPAN
15:36 diakopter pmurias: what's the status of smop/mildew? is it current on TPF's perl6 wiki?
15:41 pmurias diakopter: ruoso recently submitted a grant report on the TPF website
15:41 pmurias s/on/, it's avalible somewhere on
15:45 pmurias diakopter: re status smop development slowed down a bit lately but i plan to spend more time on it in the near future
15:51 shinobi-cl joined #perl6
15:52 diakopter pmurias: neat. I read the status report.
16:03 jeremiah joined #perl6
16:05 Tene_ joined #perl6
16:11 cspencer joined #perl6
16:12 cspencer hrmmmm....is anybody else having issues building the latest commit of rakudo on the latest commit of parrot? :)
16:14 sparc_ joined #perl6
16:16 Limbic_Region joined #perl6
16:23 jnthn cspencer: I've heard that mentioned by someone else...
16:24 cspencer jnthn: i'm re-checking out parrot and rebuilding right now, i'll let you know how it goes
16:24 jnthn cspencer: I've got a slightly older Parrot...
16:24 jnthn Though head Rakudo.
16:24 cspencer it was segfaulting in some of the final compilation steps
16:24 jnthn I'm at Parrot 36866.
16:25 cspencer ok, if this doesn't work, i'll check out that version :)
16:26 jnthn Yeah, there is discussion now on #parrot about it...
16:26 jnthn Apparnetly some change in Parrot relating to strings broke it.
16:26 cspencer ok, i'll revert back to 36866 then :)
16:26 cspencer thanks!
16:27 cspencer actually, while i've got your attention, how much of p6 is intended to be implemented in the setting?
16:27 cspencer ie) is the end goal to get a good part of the builtins written in perl6?
16:27 jnthn Yes.
16:27 cspencer ok, great
16:27 jnthn I want for sure Array, List, Mapping and Hash to be entirely in Perl 6.
16:28 jnthn (That said, they will use Parrot's hash and array PMCs for actual storage.)
16:28 masak joined #perl6
16:28 cspencer i've got a couple large-ish patches somewhere implementing a bunch of things that were waiting around for the point at which we were bootstrapping
16:28 jnthn In fact, getting those ones done in Perl 6 is fairly high priority for me.
16:28 cspencer so i'll pull those out and polish them up
16:28 nihiliad joined #perl6
16:28 jnthn OK, great!
16:28 TimToady in theory we'd like to write all of it as a circular definition and then take a "circularity saw" to it for specific implementations for bootstrapping and efficiency
16:29 TimToady but different implementations could break the circularity in different places
16:29 jnthn Aye.
16:29 TimToady as long as semantics are preserved
16:29 cspencer alright, that sounds reasonable :)
16:29 TimToady which, of course, they never quite are :)
16:30 TimToady but the short of it is that there's no reason not to attempt to write any particular part of it
16:31 jnthn cspencer: We also - though we can't do it just yet - want to be implemenitng the operators in Perl 6 too. There may be a little embedded PIR within them, but it'll be inside a normal-looking method/sub definition.
16:32 cspencer i was going to ask about that, i'd noticed that it wasn't quite working yet
16:32 jnthn That means our op dispatch will then be using the Perl 6 dispatch algorithm. :-)
16:32 cspencer that's coming soon though, i take it? :)
16:32 jnthn And, since the Rakudo MMD dispatcher has a cache and the Parrot MMD dispatcher doesn't, we *may* even get a minor speed win.
16:32 jnthn Yes.
16:32 cspencer that sounds great
16:33 jnthn But it's the correct semantics that are the more interesting bit. :-)
16:33 cspencer i have to say it will be nice to not have to write a lot of confusing PIR methods anymore :)
16:33 jnthn It was fun moving a few over. The size of the codebase shrunk notably.
16:33 cspencer i imagine so
16:34 cspencer if i'm going to be sending in a patch for a method (say "grep") that's written in p6, should the patch also remove the previous definition?
16:34 cspencer though i suppose that might be needed for compilation of some bits in the first stage
16:34 jnthn Yes, that would be best.
16:34 jnthn Well, there *can* be issues like this.
16:35 cspencer but you'd prefer to add the p6, remove the PIR, and fix any issues that come up?
16:35 TimToady depends on which circularity saw you pick, but grep is unlikely to be in the bootstrap
16:35 jnthn Though the real issue is only if you take out something the compiler itself uses.
16:35 cspencer right, ok
16:35 jnthn Right. I would be rather surprised it grep was something that caused such an issue.
16:36 TimToady grep should be fairly trivial though, given it's just a ~~ over a list
16:36 jnthn TimToady: While you're around, do you see Callable as a parametric role? So "sub foo(Int $x) of Str { ... }" does Callable[Str]?
16:37 jnthn Where we define callable as something like role Callable[::T = Object] { ... }
16:37 TimToady It seems likely that we'd want to expose the return type to the optimizer at least
16:37 TimToady so could well be
16:38 TimToady but maybe the param is the whole sig including -->
16:38 jnthn Well, it means that things like sub bar(Int &x) { ... } work Just Right.
16:38 jnthn Ah, hmm.
16:39 TimToady but maybe it should also depend on how generic we want the types to match when we do type matching, dunno
16:39 TimToady I guess we need to see use cases to decide
16:39 jnthn Aye.
16:40 jnthn Having the return type in there feels at least consistent to me, but useful and consistent are different things. :-)
16:40 TimToady certainly return type is more like the typical array
16:40 jnthn Right.
16:40 TimToady but it seems like the shape of an array is like a sig
16:41 TimToady and that's part of the parameters, it would seem
16:41 jnthn Yeah, there's a parallel there...
16:41 TimToady for matching purposes, you'd almost like to know how to wildcard the params that were defaulted
16:41 jnthn Really though part of it depends on what we want to matter in multi-dispatch.
16:42 TimToady which also says you want to have wildcards on matching defaulted params
16:43 ZuLuuuuuu Hello is there a plan to start a book like Parrot's (/docs/book/), while release date of 1.0 is getting closer?
16:43 ZuLuuuuuu for Perl 6
16:43 TimToady you'd probably want to ask that on #parrot
16:44 TimToady oh, for p6, we're certainly thinking about books
16:44 jnthn I meant more like, if you have a Callable[::T] that is parameterized on the return type, then that plays rather differently under multiple dispatch than if we parameterize it on the whole signature.
16:44 TimToady but p6.0.0 happens some time after parrot 1.0
16:44 ZuLuuuuuu I'm very eager to get my hands on p6 but don't have time to go through synopsises etc :(
16:45 jnthn ZuLuuuuuu: There is already a Wiki book being written on Perl 6...
16:45 TimToady well, everyone here is so impatient that they're working on it  :)
16:45 TimToady whether or not they have time...
16:45 masak ZuLuuuuuu: also, you'll find that people on this channel are very helpful and like to answer questions.
16:45 ZuLuuuuuu yeah I see, thanks
16:45 jnthn OH HAI masak
16:45 jnthn :-)
16:45 masak and we have bots who know Perl 6 here. :)
16:45 masak jnthn: HAI.
16:46 TimToady mind, some of like to answer snidely :)
16:46 masak rakudo: say "snide today?"
16:46 p6eval rakudo f23eda: OUTPUT«snide today?␤»
16:46 masak see? no politeness at all. :)
16:46 ZuLuuuuuu the wikibook is at wikibooks?
16:46 jnthn TimToady: Did you think at all about interaction between parameterized types and candidate ordering?
16:46 masak ZuLuuuuuu: http://en.wikibooks.org/wiki/Perl_6_Programming
16:46 ZuLuuuuuu I ouldn't find it
16:47 TimToady jnthn: of course not, I'm not that smart :)
16:47 ZuLuuuuuu masak: thanks
16:47 jnthn TimToady: Yeah right. :-P
16:47 masak ZuLuuuuuu: np.
16:47 TimToady I thought I'd just wait and read the book :P
16:47 jnthn TimToady: OK, maybe I'll propose some answers in still annoyingly non-existent S14...
16:48 jnthn Then you can hate^Wcritique them. ;-)
16:49 masak ZuLuuuuuu: be warned that the code examples in that wikibook contain more parentheses than is necessary.
16:49 * jnthn will maybe get around to working a bit on S14 while he's in Odessa and mostly offline and undistracted...apart from by whatever distractions Odessa has to offer.
16:49 TimToady just thinking along the lines that $array ~~ Array[$ret,$shape] can wildcard match when $ref or $shape are defaulted
16:49 TimToady and maybe Callable works the same
16:50 ZuLuuuuuu masak: thanks, I will keep that in mind
16:50 jnthn TimToady: That could work...
16:50 masak I did some edits to remove them, but the edits haven't been approved, it seems.
16:50 TimToady so all code matches Callable, and less matches Callable[Int], and even less mathes Callable[Int,:()]
16:51 jnthn I like that, and it falls out very neatly.
16:51 TimToady or maybe we do something explicit with Callable[Int,*] when we want that
16:51 TimToady anyway, something to thunk about
16:52 jnthn I was thinking that it'd be like role Callable[::T = Ojbect, $sig = *] { }
16:52 jnthn The bigger problem is if this should work:
16:52 jnthn my @array = 1,2,3; sub foo(Int @x) { say "ok"; }; foo(@array);
16:52 jnthn Exception, or ok?
16:53 TimToady seems ripe for autocoercion of some sort, but how to define it?
16:53 jnthn That's what worries me. I don't know...
16:54 jnthn Thing is, for different types, we care about different thingies.
16:54 jnthn So types need a way of saying "you can also if the nominal type-check fails try me this way".
16:54 TimToady this reminds me a bit of the problem of letting a literal remain generic until we see what type it's used as
16:55 M_o_C joined #perl6
16:55 TimToady and certainly Perl has the notion of Any --> Int autocoercion built in philosophically
16:56 jnthn Aye, I agree that it *should* work, it's just deciding on the mechanism.
16:56 TimToady but there needs to be some distribution of that notion over composite types, and that depends on the container
16:56 jnthn Right.
16:56 jnthn So AFAICS the container needs a way of saying how that distribution happens.
16:57 jnthn And we should make it a mechanism that people can use when writing their own parametric types, rather than it being some magic for Hash and Array, IMO.
16:57 TimToady much like a sig could specify how much latitude there is in matching a parameter that it can handle
16:57 TimToady certainly
16:57 justatheory joined #perl6
17:01 * jnthn will let it all circulate in this brain for a while...
17:01 jnthn s/this/his/
17:01 TimToady Array[Any as Int] or some such, but specified in the sig
17:01 TimToady so you get it automatically when you say Array[Int]
17:02 TimToady maybe a property attached to Int
17:02 dukeleto joined #perl6
17:02 jnthn Hmm...
17:02 TimToady but I like your idea of noticing it at the point you'd fail the type check otherwise
17:03 jnthn I don't like there being a *coercion* unless you ask for it.
17:03 TimToady but maybe that's the wrong way to think of it
17:03 shinobi-cl left #perl6
17:03 TimToady @a = "1","2","3"?
17:03 lambdabot Maybe you meant: activity activity-full admin all-dicts arr ask . ? @ v
17:04 jnthn In the case I mentioned, the issue isn't that we need a co-ercion. It's just that the array being passed in is not labeled as being an Array[Int]
17:04 jnthn TimToady: To me that's a different case.
17:04 jnthn I'd expect my $x = "a"; sub foo(Int $x) { } to fail
17:04 jnthn Though my $x = "a"; sub foo($x as Int) { } to coerce.
17:05 * skids re-mentions %h<k1 k2>.delete since folks are now around to tell him to shut up
17:05 TimToady that can't work
17:05 TimToady not without making .delete a macro
17:05 TimToady that's why we spell it %h<k1 k2>:delete now
17:06 skids How would that be made to dwim?  Some sort of evanescent type that acts like a normal hash value but can remember its source hash and key?
17:06 TimToady that's another approach, but we decided to just make it a modifier on the subscripting operation
17:06 TimToady likewise :exists
17:06 skids Oh Ok a parse-side "fix" :-)
17:07 TimToady is potentially less overhead as well
17:07 TimToady and <k1 k2> is a slice, if you were asking
17:07 TimToady or even if you weren't...
17:08 TimToady so it would delete both keys
17:08 skids Yeah that was the intent.
17:10 |MoC| joined #perl6
17:18 tejat joined #perl6
17:22 tejat evalbot: perl6: say "Howdy";
17:22 masak tejat: howdy.
17:22 masak just 'perl6: ' is enough.
17:22 masak (and necessary, if you want to talk to the evalbots)
17:23 tejat aha. thanks, I'll try again at a later time
17:24 masak rakudo: say 'this works too'
17:24 p6eval rakudo f23eda: OUTPUT«this works too␤»
17:24 sri_kraih joined #perl6
17:25 diakopter (anthropomorphization of p6eval responders)++
17:25 sri_kraih joined #perl6
17:25 masak anthropomorphization of bots is our only hope.
17:27 sri_kraih joined #perl6
17:27 TimToady someone should write a boticelli
17:27 jnthn So we support anthropomorphizationalism?
17:27 masak well, I'm certainly an antidisanthropomorphizationism!
17:28 masak s/ism/ist/, dang :)
17:28 TimToady the secret is out, you're actually a bot
17:28 tejat misanthropomorphist
17:28 masak TimToady: I am. but so is everyone.
17:30 TimToady I wonder how sort and hypers will suppress "use of undef" exceptions...
17:30 masak aye, that's a tricky one.
17:30 tejat left #perl6
17:30 masak as is the case where for loop values don't add up.
17:31 masak rakudo: for 1..10 -> $a, $b, $c { say $c }
17:31 p6eval rakudo f23eda: OUTPUT«3␤6␤9␤StopIteration␤current instr.: '_block14' pc 125 (EVAL_19:56)␤»
17:32 masak the current behavior feels a bit... harsh.
17:33 Avada joined #perl6
17:34 alester joined #perl6
17:39 TimToady well, that one we could conceivably handle with -> $a, $b?, $c? {...}
17:40 masak rakudo: for 1..10 -> $a, $b?, $c? { say $c }
17:40 sri_kraih joined #perl6
17:40 p6eval rakudo f23eda: OUTPUT«3␤6␤9␤StopIteration␤current instr.: '_block14' pc 125 (EVAL_19:56)␤»
17:40 * masak submits rakudobug
17:48 sri_kraih joined #perl6
17:50 zophy joined #perl6
17:52 ejs joined #perl6
17:58 ZuLuuuuuu left #perl6
17:58 masak perl.org is down. :(
17:58 jnthn use.perl.org also
17:59 jnthn Guess it's the same servers.
17:59 masak and RT just bounced my bug mail, although rt.perl.org is up...
17:59 jnthn widespread fail
17:59 Limbic_Region yeah, apparently the domain registrars suspended perl.org with no explanation
17:59 Limbic_Region at least that's what I am hearing over on #perl
18:00 masak those silly registrars!
18:00 jnthn Gah, I need regex foo { }; &foo.perl to work in Rakudo. :-|
18:00 Limbic_Region [12:56] <drforr> ask_> Looks like DirectI/resellerclub (the domain registrar) decided to  suspend perl.org!  I've no idea why.  They're not a communicative  bunch.  Also, nice touch doing it on a Saturday.
18:01 * jnthn is actually writing some Perl 6 finally...
18:01 masak jnthn: it's quite a nice language.
18:01 jnthn I figured it was about time I ate the dog food I contribute to making. ;-)
18:02 masak that reminds me, I should try getting November to work locally...
18:18 dukeleto joined #perl6
18:18 Tene joined #perl6
18:22 * skids curses the amount of time it takes firefox "find text" to figure out a string is not in a synopsis.  And the fact it re-searches on every keystroke when deleting.
18:22 IllvilJa joined #perl6
18:23 Psyche^ joined #perl6
18:23 eternaleye joined #perl6
18:26 dukeleto what is the deal with src/gen_setting.pir ?
18:27 masak skids: most of us here do local searches of the pod files in the Pugs repository.
18:27 masak and when buubot's here, we can query it.
18:27 dukeleto my latest github master branch dies when building perl6 because that file is included but not there. Everything works fine if I comment it out
18:27 masak buu: speaking of which, where's buubot?
18:27 dukeleto it came in on 325cc2e2 (jnthn
18:27 skids Yeah well there's no accounting for taste :-)
18:28 masak skids: just saying there's different ways. :)
18:28 jnthn dukeleto: make realclean and re-configure if you did not already - there were makefile changes to generate it.
18:28 dukeleto jnthn: thanks!
18:29 jnthn It's what should hold the PIR result of compiling the things in src/setting/
18:29 skids masak: yeah but firfox is a damn UI and darned if I don;t expect to be interfaced when I use it :-)
18:29 masak apparently you were.
18:34 jnthn mwaha...Perl 6 rocks.
18:34 TimToady I think of "interface" as a kind of barrier with holes in it, in general
18:34 TimToady it does?
18:34 masak jnthn: 哈哈
18:34 Psyche^ joined #perl6
18:35 * jnthn is working on his first Perl 6 module
18:35 masak jnthn: wot's it do?
18:35 TimToady darn, now I'll have to figger out how importing is supposed to work...
18:35 jnthn masak: Not much yet ;-)
18:35 jnthn masak: But the aim is to make grammars generative. :-)
18:36 TimToady o_O
18:36 masak that sounds vaguely pleasant.
18:36 jnthn multi method walk_regex(PGE::Exp::Concat $node) {
18:36 jnthn return [~] $node.map({ self!walk_regex($^child) });
18:36 jnthn }
18:36 jnthn The awesome. :-)
18:36 masak indeed!
18:36 masak jnthn++
18:36 masak the number of times I've wanted to walk the regex...
18:37 jnthn masak: I don't know if this is actually gonna work yet... :-)
18:37 masak jnthn: I know, I've written Perl 6 modules. :P
18:37 jnthn Though it gets past the parser, which means it recognizes PGE::Exp::Concat as a type...
18:37 jnthn Which may be a bad thing, but hey... :-)
18:38 masak :)
18:38 jnthn Hopefully in the future I work out an implementation-independent way...but that'll only happen if there's an implementation-independent AST for regexes.
18:38 jnthn Otherwise subtypes and an abstraction layer will do it...
18:39 jnthn ...no, aliasing...not subtypes...they make the dispatch expensive...
18:39 masak I'm scared by the thought of there not being an implementation-independent AST for regexes.
18:39 masak that sounds like a bad thing to make implementation-dependent. :/
18:40 dukeleto perl6: say (1+i).polar
18:40 p6eval rakudo f23eda: OUTPUT«Could not find non-existent sub i␤current instr.: '_block14' pc 59 (EVAL_16:40)␤»
18:40 p6eval ..pugs: OUTPUT«*** No such subroutine: "&i"␤    at /tmp/fzLr4LcLed line 1, column 6-9␤»
18:40 p6eval ..elf 25480: OUTPUT«Undefined subroutine &GLOBAL::i called at (eval 121) line 3.␤ at ./elf_h line 4346␤»
18:40 jnthn masak: It's a desriable thing, I agree.
18:40 TimToady well, viv can spit out regex AST
18:40 jnthn Hey, the implementations agree.
18:40 dukeleto perl6: say (1+2*i).polar
18:40 p6eval rakudo f23eda: OUTPUT«Could not find non-existent sub i␤current instr.: '_block14' pc 65 (EVAL_16:42)␤»
18:40 p6eval ..pugs: OUTPUT«*** No such subroutine: "&i"␤    at /tmp/vz4EmB2o9X line 1, column 6-11␤»
18:40 p6eval ..elf 25480: OUTPUT«Permission denied at ./elf_h line 315.␤»
18:41 jnthn TimToady: Do you expect we'll reach some common AST between implementations at some point?
18:41 TimToady std: say (1+2*i).polar
18:41 p6eval std 25480: OUTPUT«ok 00:02 33m␤»
18:41 TimToady I expect that STD will take over the world eventually :)
18:42 jnthn .oO( Beats STDs taking over the world... )
18:42 dukeleto TimToady: polar() should always return an angle between 0 <= theta < 2*pi, correct ?
18:42 masak soon, STD will be endemic!
18:42 dukeleto currently it is using -pi < theta < pi
18:42 TimToady pandemic, we hope
18:43 masak hm, polar isn't in S29 :(
18:43 TimToady I'm not enough of a math wonk to have an opinion on that
18:43 masak dukeleto: please file a bug.
18:44 TimToady most of that stuff has moved to S32
18:45 masak oh, right.
18:45 dukeleto masak: I have a patch to src/classes/Complex.pir that I will send to github in a sec
18:45 masak dukeleto: nice.
18:45 masak but it might help to make it a ticket as well.
18:45 masak ...I think.
18:46 dukeleto masak: do you have a url?
18:46 masak mailto:rakudobug@perl.org
18:47 TimToady dukeleto: it is currently specced to -π ..^ π
18:48 TimToady so it's not a bug until the spec changes
18:49 dukeleto TimToady: ok. so some functions return angles between (-pi,pi) and some (0,2*pi) ?
18:49 [particle] joined #perl6
18:50 masak dukeleto: which ones currently do the latter?
18:52 dukeleto masak: i seem to remember some, but I don't have a concrete example right now. I will look
18:52 masak dukeleto: suddenly this sounds like a matter for p6l.
18:53 TimToady it has certainly been discussed there before
18:54 shinobi-cl joined #perl6
18:55 masak oh, it has? and was the conclusion to let some ranges be (-pi,pi) and some (0,2*pi)?
18:55 masak that sounds doubleplusungood.
18:58 * jnthn -> dinner
18:58 jeremiah mmm dinner
19:00 TimToady the point made in the thread was that it becomes easy to find the quadrant if you know the sign of both the real and the imaginary parts
19:03 masak there's something to be said for that, I guess.
19:03 TimToady and presumably easily normalized the other way with %2*pi
19:03 TimToady er
19:04 TimToady %(2*pi)
19:05 TimToady 'course, -pi would give you the quadrant in the other case, so it's not a biggie either way, as far as I'm concerned
19:06 TimToady but it seems like something p6l would like to haggle over^W^Wvote on
19:06 masak I'm just asking myself if there's an overwhelming reason to avoid consistency in this case.
19:06 TimToady (again) :)
19:07 TimToady well, we could always say the funcitons can return whatever they like, and you have to do your own % (2*pi)  :)
19:08 dukeleto it can generate incorrect answers if developers do not constantly check the returned branch
19:08 TimToady I bet everyone would hate that
19:08 dukeleto TimToady: yes
19:08 TimToady the alternative would be to have multiple versions of the function, or a parameter
19:09 masak still, it seems to me the default ought to be the same range everywhere.
19:09 TimToady clobber the namespace, or clobber the performance :)
19:09 dukeleto masak: +1
19:09 TimToady there's something to be said for a foolish consistency
19:09 masak indeed.
19:10 TimToady anyhoo, I don't profess to speak for the mathematicians
19:10 masak neither do I, actually.
19:10 dukeleto TimToady: I don't think performance will be clobbered if all underlying functions are changed to return in the same interval, than no interval checking needs to be done
19:10 masak I should review that thread.
19:10 TimToady but somehow I doubt the mathematicians could find a single spokesperson they'd agree on :)
19:11 dukeleto indeed
19:12 TimToady the number of opinions on the subject you'll get on p6l will approximate 2*pi, I believe, because there are about pi mathematicians there, and about pi non-mathematicians who will have an opinion anyway.
19:13 dukeleto TimToady: but how many submit patches?
19:15 masak well, we like patches, but we like to conform to the spec as well. :)
19:17 dukeleto which spec defines the trig functions?
19:17 masak S32/Numeric, it seems.
19:18 dukeleto masask: thanks!
19:18 masak np.
19:18 masak well, time to go home.
19:18 * masak waves
19:56 Sepheebear joined #perl6
20:47 pugs_svn r25481 | lwall++ | [Cursor] suppress warnings on malformed utf8
21:00 bacek good morning
21:01 bacek perl6: say ~ [\==] (1,2,2,1)
21:01 p6eval rakudo f23eda: OUTPUT«say requires an argument at line 1, near " ~ [\\==] ("␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
21:01 p6eval ..elf 25481: OUTPUT«pre without a prefix is unimplemented at ./elf_h line 2148␤»
21:01 p6eval ..pugs: OUTPUT«␤»
21:04 jan_ joined #perl6
21:04 bacek perl6: say ~([\==] (1,2,2,1))
21:04 p6eval elf 25481: OUTPUT«pre without a prefix is unimplemented at ./elf_h line 2148␤»
21:04 p6eval ..rakudo f23eda: OUTPUT«say requires an argument at line 1, near " ~([\\==] ("␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
21:04 p6eval ..pugs: OUTPUT«␤»
21:05 jnthn rakudo: ~([\==] (1,2,2,1))
21:05 p6eval rakudo f23eda: OUTPUT«Syntax error at line 1, near "~([\\==] (1"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
21:05 jnthn Hmm.
21:06 bacek jnthn: my patch isn't applied yet :)
21:06 zophy joined #perl6
21:07 jnthn bacek: Aye, I'm leaving that one for pmichaud to review. :-)
21:07 bacek jnthn: :)
21:08 bacek Looks like I've made mistake in triangle version of chained metaops.
21:08 zophy joined #perl6
21:09 bacek TimToady: Last result for [\==] (1,2,2,1) is (False, False, True, False), isn't it?
21:10 bacek jnthn: But you can review my other patches :)
21:11 zophy joined #perl6
21:17 zophy joined #perl6
21:18 zophy joined #perl6
21:20 zophy joined #perl6
21:21 zophy joined #perl6
21:24 fridim_ joined #perl6
21:29 kst joined #perl6
21:38 pugs_svn r25482 | rhr++ | [CORE] paste error for make
21:43 bacek perl6: sub formalize($text, :case($case), :justify($justify)) {...}; say "hi"
21:43 p6eval pugs: OUTPUT«*** ␤    Unexpected "case"␤    expecting space or ")"␤    at /tmp/Ejqow2uVrv line 1, column 23␤»
21:43 p6eval ..elf 25482: OUTPUT«Parse error in: /tmp/OAHiZMHWqM␤panic at line 1 column 56 (pos 56): Missing right brace␤WHERE: ($case), :justify($justify)) {...}; say "hi"␤WHERE:                              /\<-- HERE␤  STD_red/prelude.rb:99:in `panic'␤  STD_red/std.rb:255:in `_block_rest'␤
21:43 p6eval ..STD_red/std.rb:242...
21:43 p6eval ..rakudo f23eda: OUTPUT«Unable to parse multisig; couldn't find final ')' at line 1, near ":case($cas"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
21:43 bacek std: sub formalize($text, :case($case), :justify($justify)) {...}; say "hi"
21:44 p6eval std 25482: OUTPUT«ok 00:04 34m␤»
21:48 TimToady bacek: first one should be True
21:49 bacek TimToady: ah, ok.
21:52 bacek TimToady: 'is (~ [\<]  1, 3, 2, 4), "1 1 0 0", "[\\<] works (2)";' looks incorrect for me
21:52 bacek True, True, False, True?
21:54 jan__ joined #perl6
21:56 TimToady I can argue it both ways
21:56 burmas joined #perl6
21:57 zophy joined #perl6
21:58 TimToady the fundamental question is whether [\op] treats comparisons as short circuit or as independent tests that are only anded at the end
21:59 TimToady and beyond that, which interpretation is more useful for any purpose at all :)
22:00 pugs_svn r25483 | bacek++ | [t/spec] Fix reduce metaops tests. TimToady++ for clarification.
22:01 bacek TimToady: I suppose that "[op] $a,$b,$c," is shortcut for "[&&] (undef op $a), ($a op $b), ($b op $c)".
22:02 TimToady or * op $a
22:02 bacek whatever :)
22:03 TimToady by that interpretation, the anding should latch off as soon as it's false
22:03 gravity joined #perl6
22:03 TimToady that's probably what people will expect
22:03 bacek yes, but for triangle version it should evaluate full list
22:04 TimToady the list could be infiinte
22:04 bacek then it will produce infinite triangle
22:04 viklund joined #perl6
22:04 viklund @seen masak
22:04 lambdabot I saw masak leaving #perl6 2h 46m 4s ago, and .
22:04 bacek [\<] 1..*
22:04 TimToady the question is whether it will always be of the form 1,1,1...0,0,0,0,0....
22:05 TimToady I'm thinking of various "find first" algorithms
22:05 bacek TimToady: for triangle version?
22:10 TimToady if we go with the 110000000 interpretation, then what I said earlier about [\!=] is wrong
22:10 bacek for ([\<] @list) -> $a{ if ($a[*-1] ff $a[*-1]) { return $a } }
22:10 TimToady because it should use the identity value for &&, not 1=
22:11 TimToady *!=
22:11 bacek I preferably dislike 110000 approach.
22:11 zophy joined #perl6
22:12 bacek It's automatically prohibit multithreaded evaluation.
22:12 TimToady chained comparisons are specced to short-circuit
22:13 TimToady 1 > 2 > die("this is never reached");
22:13 bacek ([\op] @list)[10][*-1]
22:14 TimToady only for [\,]
22:14 bacek I don't understand. What do you mean?
22:15 TimToady you can't subscript a scalar with [*-1]
22:15 TimToady only [\,] returns list or list
22:15 TimToady *of
22:16 bacek pugs: say ([\==] 1,1,2,2).perl
22:16 p6eval pugs: OUTPUT«Bool::False␤»
22:16 bacek oh.
22:16 bacek [\==] should not produce list of list???
22:16 TimToady it should produce a list of Bool
22:17 TimToady pugs: say [\+] 1..10
22:17 p6eval pugs: OUTPUT«13610152128364555␤»
22:18 TimToady pugs: say ([\+] 1..12)[10]
22:18 p6eval pugs: OUTPUT«66␤»
22:18 TimToady pugs: say ([\+] 1..12)[10][*-1]
22:18 p6eval pugs: OUTPUT«66␤»
22:18 TimToady pugs: say ([\+] 1..12)[10][*-1][*-1]
22:18 p6eval pugs: OUTPUT«66␤»
22:18 TimToady pugs: say ([\+] 1..12)[10][*-1][*-1][0]
22:18 p6eval pugs: OUTPUT«66␤»
22:18 TimToady pugs: say ([\+] 1..12)[10][*-1][*-1][0][0]
22:18 p6eval pugs: OUTPUT«66␤»
22:19 bacek TimToady vs pugs :)
22:19 burmas left #perl6
22:21 TimToady on the other hand, [op] 1,2,die doesn't short circuit
22:22 TimToady in the sense of suppressing the die
22:23 TimToady in only short circuits in the sense that it in [==] 1,2,3 it doesn't have to test 2==3
22:24 TimToady I think that still argues that [\==] 1,2,3 should return 1,0,0,0
22:24 bacek how that?
22:24 TimToady and [\!=] 1,2,3 should probably return 1,1,1,1
22:25 aindilis joined #perl6
22:25 bacek if I understand you right, than [\==] 1,2,3 should return 1,0,0
22:25 bacek and [\!=]  1,2,3 returns 1,1,1
22:25 TimToady yes, i can't count
22:26 bacek (Bool::True and Bool::False for 1 and 0 of cause)
22:26 TimToady *nod*
22:26 bacek :)
22:26 TimToady we need to be careful to return Bool when we mean that so we can multidispatch on it right
22:27 bacek indeed
22:27 TimToady that is, +$bool returns 0 and 1, while ?$num returns False and True
22:28 bacek I'm going to revert my last commit in t/spec...
22:28 bacek Let's stick with 11000.
22:28 TimToady sorry 'bout that, my fault
22:28 bacek no worries :)
22:30 TimToady I'd better go mangle the semantics of my Honda instead before it rains...
22:30 pugs_svn r25484 | bacek++ | [t/spec] Revert previous commit for reduce metaops.
22:30 bacek TimToady: I did it with my Honda couple of days ago :)
22:31 TimToady funny thing is there are two completely unrelated things wrong with it that require door panels to be removed
22:31 TimToady unfortunately, different panels...
22:32 TimToady power windows controller on one side, mirror on the other...
22:32 bacek oh.
22:32 TimToady car hacking &
22:33 jnthn Sometimes I wonder if having sufficiently bad eyesight to be unable to drive - and thus not owning a car - is a kind of blessing...
22:33 jnthn (Does mean I need to live in places with decent public transport, mind...)
22:34 bacek jnthn: I have very bad eyesight. But it doesn't count... Public transport in Sydney suck all the time :(
22:37 jnthn Ugh. :-(
22:37 jnthn I got *so* fed up of the UK railway network.
22:44 bacek rakudo: say undef // 1;
22:44 p6eval rakudo f23eda: OUTPUT«1␤»
22:44 bacek rakudo: say 42 // 1;
22:44 p6eval rakudo f23eda: OUTPUT«42␤»
22:45 bacek rakudo: say undef orelse 1;
22:45 jnthn rakudo: sub x { say "awww, we fail it" }; my $x = 42 // x;
22:45 p6eval rakudo f23eda: OUTPUT«Use of uninitialized value␤␤Could not find non-existent sub infix:orelse␤current instr.: '_block14' pc 82 (EVAL_15:42)␤»
22:45 p6eval rakudo f23eda: RESULT«42»
22:45 jnthn rakudo: sub x { say "awww, we fail it" }; my $x = 42; $x //= x;
22:45 p6eval rakudo f23eda: OUTPUT«awww, we fail it␤»
22:45 jnthn fail
22:46 bacek summon masak?
22:48 bacek rakudo: say 1 => 2
22:48 p6eval rakudo f23eda: OUTPUT«1  2␤»
22:48 M_o_C joined #perl6
22:49 bacek rakudo: say 1 => 2 => 3
22:49 p6eval rakudo f23eda: OUTPUT«1  2       3␤»
22:49 bacek rakudo: say (1 => 2 => 3).perl
22:49 p6eval rakudo f23eda: OUTPUT«1 => 2 => 3␤»
23:00 bacek is => right associative?
23:00 bacek rakudo: say (1 => (2 => 3)).perl
23:00 p6eval rakudo f23eda: OUTPUT«1 => 2 => 3␤»
23:00 bacek rakudo: say ((1 => 2) => 3).perl
23:00 p6eval rakudo f23eda: OUTPUT«1 => 2 => 3␤»
23:00 bacek yak...
23:01 bacek pugs: say (1 => 2 => 3).perl
23:01 p6eval pugs: OUTPUT«\(1, \(2, 3))␤»
23:01 bacek pugs: say ((1 => 2) => 3).perl
23:01 p6eval pugs: OUTPUT«\(\(1, 2), 3)␤»
23:04 jferrero joined #perl6
23:24 dukeleto joined #perl6
23:52 Ariens_Hyperion joined #perl6
23:53 fridim_ joined #perl6

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

Perl 6 | Reference Documentation | Rakudo