Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2013-02-19

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:00 rjbs But S32 says:
00:00 rjbs method seek(Int $position, Int $whence --> Bool)
00:01 adu joined #perl6
00:02 [Coke] our impl has the args backwards? whoops.
00:03 rjbs I'll see about making a patch once I'm home.  I doubt the test suite will finish before my bus arrives.
00:03 rjbs Wait, "make test" did nearly nothing.  Do I want spectest or something?
00:04 adu joined #perl6
00:04 [Coke] test is core and some rakudo-only stuff. spectest runs roast.
00:04 [Coke] (so yes, you usually want to run spectest)
00:04 rjbs Is roast the perl6 spec test?
00:05 rjbs It's cloning now...
00:05 rjbs "seek" does not appear in the spec tests.
00:05 rjbs I'm just going to provide a patch, I guess.
00:09 tokuhiro_ joined #perl6
00:11 chee joined #perl6
00:15 bluescreen10 joined #perl6
00:18 tokuhiro_ joined #perl6
00:18 [Coke] yes, roast == perl6 spec test suite (shared over all impls.)
00:18 [Coke] (no seek) ok. a seek test patch to roast would also be awesome. :)
00:22 rjbs I'll start with getting my silly p5 program ported. :)
00:31 rjbs I have a subroutine x(Int $y)
00:31 rjbs I am passing calling it: x(4 / 1) which fails because that's a Rat.
00:31 rjbs How do I put the work of conversion into the signature rather than the invocation?
00:33 sorear Int() $y is ther current syntax, I think
00:33 TimToady but NYI
00:34 rjbs Okay.  So for now I will need to x((4/1).Int) ?
00:34 TimToady usually it gets faked around with a a sub x(Any $y) { x($y.Int) }
00:34 TimToady er, multi sub
00:34 rjbs Oh, that makes sense.
00:35 rjbs Rakduo accept pull requests?
00:36 TimToady dunno, they mostly work through rakudobug
00:36 rjbs I see others, filing https://github.com/rakudo/rakudo/pull/103 so I can wander off and bathe a small child!
00:36 TimToady for the moment you could say floor 4/1, to be explicit about the semantics,if you don't wanna go the multi route
00:37 rjbs Nah, using a multi makes me feel like I'm living in the future!
00:37 rjbs (as I port my little z-machine assembler to p6)
00:38 TimToady rjbs++ on the seek thing
00:38 sorear infocom?
00:38 rjbs sorear: Infocom
00:38 TimToady wasn't parrot gonna interpret those codes directly at one point?
00:39 rjbs Yeah, Dan S. and I talked about it.
00:39 rjbs way back when Dan S. was the guy who'd be talking about it
00:39 rjbs What's the constraint on buf elements?  Posints?
00:40 TimToady depends on what you instantiate the Buf role with, in theory
00:40 sorear parrot interpreting z-machine codes?  why?
00:40 TimToady don't think rakudo supports other than buf8
00:40 TimToady which I believe is unsigned
00:40 rjbs sorear: Presumably because it would be awesome.
00:41 rjbs Z-machine is a cute little mess, though.
00:42 rjbs I only ask about bufs because in theory Z-machine uses a ten-bit charset.  Characters over 255 are never used, though, so you could represent them as octets unless you're working with an abuse.  (And there are plenty of abuses.)
00:48 rjbs +< is a cute-looking operator
00:49 sorear looks like something out of perldoc -f open
00:49 rjbs Ugh, don't remind me of open documenation!
00:50 sorear ?
00:50 rjbs Oh, bathtime.  Back later, but I think I can get a z-machine hello world working tonight.
00:50 rjbs sorear: There's been a *lot* of mail about it lately, not all hug-laden.
00:51 sorear *makes up missing hugs, if wanted*
00:52 * rjbs gets kicked out of the bathroom by a five year-old, goes back to Vim.
01:02 rjbs $str.chars returns an Int.  $str.lines returns a List.  I don't see how to do split ''.
01:02 rjbs How do I get a list of the characters in a string?
01:02 rjbs comb?
01:02 rjbs Yes, thanks, rjbs.
01:04 diakopter yw
01:07 * rjbs spends several minutes unsure what the heck is going on with this code before realizing that | isn't a bitwise operator anymore.
01:10 anuby joined #perl6
01:10 jerome joined #perl6
01:18 hypolin joined #perl6
01:28 tokuhiro_ joined #perl6
01:31 jerome joined #perl6
01:41 hypolin joined #perl6
01:47 adu joined #perl6
01:55 rjbs rakudo: [1,2].^methods.sort
01:55 p6eval rakudo 5101a5:  ( no output )
01:55 rjbs rakudo: [1,2].^methods.sort.say
01:55 p6eval rakudo 5101a5: OUTPUT«ACCEPTS Bool Capture DUMP FLATTENABLE_HASH FLATTENABLE_LIST Int Int Num Numeric Numeric PARAMETERIZE_TYPE Parcel REIFY REIFY STORE STORE_AT_POS STORE_AT_POS Str Str at_pos at_pos bind_pos categorize chrs classify delete eager elems elems end exists flat flattens fl…
01:56 rjbs Why does "elems" appear twice (along with Str and some others)
01:56 rjbs ?
02:01 TimToady rakudo: Any.^methods.sort.say
02:01 p6eval rakudo 5101a5: OUTPUT«ACCEPTS Array FLATTENABLE_HASH FLATTENABLE_LIST all any at_key at_pos classify eager elems end first flat grep hash infinite join keys kv list lol map max min minmax none one pairs pick postcircumfix:<[ ]> postcircumfix:<{ }> push reduce reverse roll sort tree uniq…
02:01 TimToady that's why
02:02 TimToady we autocoerce lists of one element to behave like lists
02:02 TimToady r: say 42.elems
02:02 p6eval rakudo 5101a5: OUTPUT«1␤»
02:03 TimToady also, because of a non-spec-ness, since .^methods is supposed to leave out Any by default
02:03 rjbs Aha
02:03 rjbs thanks.
02:03 TimToady r: say [1,2].^mro
02:03 p6eval rakudo 5101a5: OUTPUT«Array() List() Iterable() Cool() Any() Mu()␤»
02:03 TimToady well, maybe it's not buggy
02:04 TimToady you're maybe just getting both Array and List .elems
02:05 TimToady r: say [1,2].^methods.grep(*.name eq elems)
02:05 p6eval rakudo 5101a5: OUTPUT«===SORRY!===␤CHECK FAILED:␤Calling 'elems' will never work with no arguments (line 1)␤    Expected any of:␤    :($a)␤»
02:05 TimToady errr
02:06 TimToady r: say [1,2].^methods».name.grep(* eq 'elems')
02:06 p6eval rakudo 5101a5: OUTPUT«elems elems␤»
02:06 TimToady r: say [1,2].^methods(:all)».name.grep(* eq 'elems')
02:06 p6eval rakudo 5101a5: OUTPUT«elems elems elems␤»
02:07 TimToady yeah, your'e just getting Array and List
02:07 rjbs Thanks.
02:12 TimToady r: say [1,2].^methods(:local)».name.grep(* eq 'elems')
02:12 p6eval rakudo 5101a5: OUTPUT«␤»
02:12 TimToady or maybe it's List and Iterable
02:13 lustlife joined #perl6
02:15 TimToady r: say List.^methods».name.grep(* eq 'elems')
02:15 p6eval rakudo 5101a5: OUTPUT«elems elems␤»
02:15 TimToady yeah
02:15 TimToady r: say Iterable.^methods».name.grep(* eq 'elems')
02:15 p6eval rakudo 5101a5: OUTPUT«elems␤»
02:29 rjbs I have a hash in which the values are lists.  I am mapping like this: my @zchars <== map { %for{ $_ } } <== $string.comb;
02:30 rjbs How do I flatten the entries into zchars?
02:32 rjbs I see unary | operator in S06, but Rakudo complains that &prefix:<|> is undefined.
02:32 TimToady use = instead of <== maybe?
02:33 TimToady unless it's returning arrays (you said lists)
02:33 rjbs They're probably Arrays, I'll add more says!
02:33 TimToady %for{ $_ }.list in that case
02:33 TimToady maybe
02:34 TimToady r: say flat ((1,2),(3,4)).lol
02:34 p6eval rakudo 5101a5: OUTPUT«1 2 3 4␤»
02:34 TimToady or maybe just use flat :)
02:39 rjbs rakudo: my $x = 1; say "x is $x but \$x isa { $x.WHAT }"
02:39 p6eval rakudo 5101a5: OUTPUT«use of uninitialized value of type Int in string context  in block  at /tmp/FmCMHENcpz:1␤␤x is 1 but $x isa ␤»
02:39 rjbs ^ surprises me.
02:40 TimToady rakudo: my $x = 1; say "x is $x but \$x isa { $x.WHAT.name }"
02:40 p6eval rakudo 5101a5: OUTPUT«No such method 'name' for invocant of type 'Int'␤  in block  at /tmp/6v2u9wJJM4:1␤␤»
02:41 * rjbs just found .^name!
02:41 diakopter n: my $x = 1; say "x is $x but \$x isa { $x.WHAT }"
02:41 TimToady rakudo: my $x = 1; say "x is $x but \$x isa { $x.WHAT.^name }"
02:41 p6eval niecza v24-23-g0520c7c: OUTPUT«x is 1 but $x isa Int()␤»
02:41 p6eval rakudo 5101a5: OUTPUT«x is 1 but $x isa Int␤»
02:41 rjbs Sorry, I'm not really *trying* to fill #perl6 with inane gropings tonight…
02:41 TimToady yes, remember that WHAT returns an "undef"
02:41 diakopter niecza doens't mind it
02:42 rjbs Okay, and .list solved the previous problem.
02:42 rjbs Woo!!
02:44 grondilu joined #perl6
02:45 rjbs https://dl.dropbox.com/u/88746/p6-z5.z5
02:45 * grondilu just found out about https://github.com/perl6/perl6-most-wanted
02:45 rjbs This exciting Z-Machine program built with Perl 6.
02:45 grondilu what does WIP stands for in https://github.com/perl6/perl6-most-wanted ?
02:45 rjbs work in progress, usually
02:47 grondilu why SHA-256 is in the most wanted perl6 module list?  There is an implementation in RosettaCode!
02:48 grondilu (which is also here:  https://github.com/grondilu/libdigest-perl6)
02:51 FROGGS_ joined #perl6
02:55 benabik grondilu: Because while japhb put a lot of work into the list, he didn't do an exhaustive search for every P6 module in existence.
02:56 * japhb notices the highlight
02:57 japhb Right.  I thought the list needed doing, but only had so much energy for the task.  So I did as much research as I could without going crazy, and tried to get it in a state that was at least good enough for enterprising editors to pick up the work on.
02:58 japhb Which means, grondilu, that I invite you to *fix* the lists.  :-)
03:00 japhb And yes, WIP was to note work-in-progress modules that got partway to fulfilling a particular need, so that people wouldn't accidentally duplicate work (someone complained about this while I was still working on the list, even).
03:01 japhb I had started trying to analyze which modules were complete and which weren't, but I realized almost all of them were at a quality/completeness level that perl5'ers would expect, so I eventually just decided to mark them all WIP without judgement, and expect that module owners will correct that when they are willing to stand by a module as "production ready".  :-)
03:02 japhb *were not at*
03:03 * japhb returns to reading the day's backlog ...
03:07 adu joined #perl6
03:16 Targen joined #perl6
03:17 dalek perl6-most-wanted: 95e477f | grondilu++ | most-wanted/modules.md:
03:17 dalek perl6-most-wanted: Update most-wanted/modules.md
03:17 dalek perl6-most-wanted:
03:17 dalek perl6-most-wanted: added link to a pure implementation of SHA-256
03:17 dalek perl6-most-wanted: review: https://github.com/perl6/perl6-most-wanted/commit/95e477fb7c
03:25 vaelxon joined #perl6
03:29 orafu joined #perl6
03:35 Fuad joined #perl6
03:42 japhb grondilu, note that I had marked your module also as "Digest (unified interface)" at the top of the digest modules list.  Is that correct?
03:45 * [Coke] wonders if "two".chars could be optimized away at compile time.
03:53 TimToady it can if Str hasn't been declared to remain open by CHECK time
03:54 benabik And .chars is marked pure?  Wouldn't want "foo".IO.open to happen at compile time.
03:54 benabik (Or really just "foo".IO, now that I think of it.)
03:57 grondilu japhb: indeed. I hadn't noticed that.
04:07 vitaminmoo joined #perl6
04:08 mikemol joined #perl6
04:11 xenoterracide joined #perl6
04:13 Fuad left #perl6
04:44 census joined #perl6
04:47 preflex_ joined #perl6
05:05 SamuraiJack joined #perl6
05:10 mathw joined #perl6
05:13 sweet_kid joined #perl6
05:14 rafl joined #perl6
05:15 rindolf joined #perl6
05:16 jfried joined #perl6
05:16 TimToady nr: /<[\xE000..\xFFFD]>/
05:16 mathw joined #perl6
05:16 p6eval niecza v24-23-g0520c7c:  ( no output )
05:16 p6eval ..rakudo 5101a5: OUTPUT«===SORRY!===␤Invalid character for UTF-8 encoding␤␤»
05:16 rindolf Hi all.
05:16 lue rnp: say q≔bidi-mirrored chars, IIUC≕ # known rakudobug?
05:16 p6eval niecza v24-23-g0520c7c, pugs: OUTPUT«bidi-mirrored chars, IIUC␤»
05:16 p6eval ..rakudo 5101a5: OUTPUT«���[���3���1���m���=���=���=������[���0���m���S���O���R���R���Y���!������[���3���1���m���=���=���=������[���0���m�������C���o���u���l���d���n���'���t��� ���f
05:16 TimToady someone on p6users is asking about that
05:17 Bucciarati joined #perl6
05:17 jnthn joined #perl6
05:17 lue (my rakudo's old, so I wasn't expecting the NULs to show up like they did)
05:17 bonsaikitten joined #perl6
05:18 yx joined #perl6
05:19 groky joined #perl6
05:20 ilogger2 joined #perl6
05:21 _sri joined #perl6
05:21 TimToady looks like something is being done in UTF-32
05:22 baest joined #perl6
05:22 bloonix joined #perl6
05:22 lue that's what I was thinking, but I have no clue what.
05:22 lue s/what/why that is/
05:22 TimToady and my bug looks like it's trying to do something with UTF-8
05:23 TimToady well, David Warring, who's asking on p6u
05:23 Gothmog_ joined #perl6
05:24 TimToady well, looks like something is trying to handle non-ASCII by changing to UTF-32, then feeding it to something expecting UTF-8
05:29 lue Am I thinking wrong or is that UTF-32 printed little-endian?
05:30 geekosaur interestingly, the first character is not getting utf32'd
05:30 avar joined #perl6
05:30 geekosaur hm, or I',m eading it backwards and it is but unexpetced endian, yeg
05:30 geekosaur need to see the whole thing
05:30 lue geekosaur: I think it is, hence the little endian thing (1b000000 instead of what it should be, 0000001b)
05:31 * geekosaur might be too tired to type right...
05:32 TimToady looks bigendian to me, 3 nulls and then a char
05:33 TimToady ASCII lives at the small end of a UTF-32 integer
05:33 lue OUTPUT«���[���3���1��� # unless the escape's NULs are chopped off, that's little-endian
05:34 geekosaur ^^ or unless the esc is coming out before it switches
05:34 TimToady no, the big end of the 32 bit number is coming out first
05:34 TimToady 3 nulss and a [, that's big endian
05:34 TimToady *nulls
05:34 geekosaur leading char is esc
05:34 geekosaur esc, nul, nul, nul, '[', ...
05:34 TimToady there's no escape there
05:34 lue in my window i see the box with 001B in it
05:34 TimToady just a left double-angle
05:35 * geekosaur has ctrl chars visibilized, there is an <ESC>
05:35 lue r: say "OUTPUT«���".ords;
05:35 p6eval rakudo 5101a5: OUTPUT«79 85 84 80 85 84 194 171 27 226 65533 8364 226 65533 8364 226 65533 8364␤»
05:35 census joined #perl6
05:36 TimToady u «
05:36 TimToady .u «
05:36 phenny U+00AB LEFT-POINTING DOUBLE ANGLE QUOTATION MARK («)
05:36 TimToady that's part of the OUTPUT quoting, not part of the data
05:36 geekosaur but immediately following that is an ESC
05:37 TimToady no escape shows up here
05:37 TimToady oh, maybe I just can't see it
05:37 geekosaur which my script is making visible as \u{241b} because it's not part of an ansi color escape
05:38 TimToady okay, then you're right, it's little-endian
05:38 geekosaur (being followed by NUL which is showing as \u{2400})
05:38 lue r: say ༺is it just the colon equals? (These brackets: 0F3A,0F3B)༻
05:38 p6eval rakudo 5101a5: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Two terms in a rowâ�¤at /tmp/973maIJYKV:1â�¤------> [32msay [33mâ��[31m༺is it just the colon equals? (These bra[0mâ�¤    expecting any of:â�¤        argument listâ�¤        prefix or termâ�¤        prefix or meta-prefixâ�¤        postfixâ�¤        â€¦
05:38 FROGGS morning
05:38 * TimToady is occasionally the smartest person you'll ever meet, but not tonight...  :)
05:39 lue I get the sneaking suspicion rakudo isn't handling the bidi-mirroring part of bracketing characters.
05:40 lue (My local copy of rakudo (2012.11-70-ga03049e) didn't go all UTF-32 (AFAICT) on the colon equals and worked fine with TIBETAN MARKs I just ran)
05:45 TimToady well, the UTF-32 might be some kind of bot damage
05:54 TimToady but yes, it seems to be a rakudobug, dunno if it's known
05:57 moritz it is
05:59 TimToady the bidi or the UTF-32?
06:10 hypolin joined #perl6
06:10 rindolf * TimToady is occasionally the smartest person you'll ever meet, but not tonight...  :) ==> I pride myself on being the smartest person typing on this keyboard at the moment.
06:19 bonsaikitten rindolf: are you part of the tautology club too? ;)
06:20 rindolf bonsaikitten: I am a proud member of the tautology club on every day-of-the-month whose modulo with 1 is 0.
06:23 quester joined #perl6
06:25 * labster would join the paradox club if this statement is false.
06:28 moritz the UTF-32
06:28 sorear is it a day ending in y?
06:29 TimToady they were asking about the bidi chars not working as quotes
06:30 TimToady sorear: not where moritz++ lives :)
06:31 kaleem joined #perl6
06:41 FROGGS joined #perl6
06:41 domidumont joined #perl6
06:44 sqirrel joined #perl6
06:45 lue testing I did on bidi brackets: https://gist.github.com/lue/4983621
06:46 lue good ♞, #perl6 o/
06:46 TimToady o/
06:48 TimToady inside-out brackets are supposed to fail
07:12 fhelmberger joined #perl6
07:13 domidumont joined #perl6
07:13 fgomez joined #perl6
07:18 cotto We'll be resuming #parrotsketch tomorrow at 1930 UTC.  Feel free to drop by.
07:21 b1rkh0ff joined #perl6
07:34 TimToady r: sub postfix:<!> ($n) { [*] 2..$n }; eval 'say 42!'
07:34 p6eval rakudo 5101a5: OUTPUT«1405006117752879898543142606244511569936384000000000␤»
07:34 diakopter nice
07:34 rindolf joined #perl6
07:35 diakopter r: { sub postfix:<!> ($n) { [*] 2..$n }; eval 'say 42!'; }; eval 'say 42!'
07:35 p6eval rakudo 5101a5: OUTPUT«1405006117752879898543142606244511569936384000000000â�¤[31m===[0mSORRY![31m===[0mâ�¤Two terms in a rowâ�¤at eval_1:1â�¤------> [32msay 42![33mâ��[31m<EOL>[0mâ�¤    expecting any of:â�¤        infix or meta-infixâ�¤        infix stopperâ�¤Â»
07:35 diakopter cool
07:36 TimToady r: my $nonconstant = 42; sub postfix:<!> ($n) { [*] 2..$n }; eval 'say $nonconstant!';  # just checking
07:36 p6eval rakudo 5101a5: OUTPUT«1405006117752879898543142606244511569936384000000000␤»
07:36 TimToady \o/
07:36 TimToady was worried that constant folding was helping, though our routine isn't declared pure, I guess
07:37 TimToady and I doubt that eval is considered pure, ever...
07:37 diakopter r: my $aa; { sub postfix:<!> ($n) { [*] 2..$n }; $aa = sub () { eval 'say 42!';}; }; $aa()
07:38 p6eval rakudo 5101a5: OUTPUT«1405006117752879898543142606244511569936384000000000␤»
07:38 TimToady current language *should* be lexically scoped
07:38 TimToady but it's a good test :)
07:39 TimToady fortunately, current language is carried in the parser cursor, so it's unlikely to get lost
07:40 TimToady in theory one could 'use Ruby;' at the top and then eval would assume Ruby code
07:41 TimToady in essence, the lexical scope surround an eval serves as the eval's "setting"
07:41 rindolf joined #perl6
07:41 TimToady so it's really the same thing as saving the YOU_ARE_HERE
07:43 ObseLeTe joined #perl6
07:49 quester left #perl6
07:49 rindolf joined #perl6
07:58 rindolf joined #perl6
08:06 domidumont joined #perl6
08:06 hypolin joined #perl6
08:08 domidumont joined #perl6
08:09 rindolf joined #perl6
08:16 rindolf joined #perl6
08:23 FROGGS jnthn: would it be okay if I put that sequential-matching-switch-feature in nqp too?
08:26 rindolf joined #perl6
08:36 rindolf joined #perl6
08:38 kresike joined #perl6
08:39 kresike hello all you happy perl6 people
08:41 am0c joined #perl6
08:43 fgomez joined #perl6
08:52 FROGGS hi kresike
08:53 kresike hello FROGGS o/
08:53 rindolf Hi kresike
08:53 rindolf FROGGS: hi.
08:53 rindolf FROGGS, kresike : what's up?
08:56 kresike rindolf, the ceiling, airplanes, a bunch of air, clouds ... that sort of things ☺
08:56 rindolf kresike: http://www.shlomifish.org/humour/fortunes/show.cgi?id=shlomif-fact-chuck-35
08:57 FROGGS hi rindolf
08:57 rindolf FROGGS: what's new?
08:57 kresike lucky you're not CN then ☺
08:57 rindolf joined #perl6
08:59 marloshouse joined #perl6
09:00 FROGGS rindolf: this https://gist.github.com/FROGGS/4984189
09:02 rindolf FROGGS: ah, Rakudo?
09:02 FROGGS and nqp, yes
09:08 Chillance joined #perl6
09:08 rindolf FROGGS: ok.
09:08 rindolf FROGGS: nice.
09:12 domidumont joined #perl6
09:17 labster joined #perl6
09:33 timotimo if someone built a nqp:: package (and, i suppose a pir:: package, too) for perl6, would it be possible to make nqp code run in any perl6 compiler without changes? i seem to recall that that wouldn't be possible due to some semantic changes in lists/arrays at least?
09:36 moritz Rakudo is the only Perl 6 compiler usin nqp or pir
09:36 spider-mario joined #perl6
09:36 moritz so, whenever a module uses anything related to nqp or pir, it can't run in any Perl 6 compiler except Rakudo
09:36 moritz but I guess that's obvious, so maybe I misunderstood your question?
09:37 diakopter I think he's asking if someone could  emulate all the nqp:: and pir:: ops
09:37 diakopter via a package
09:37 timotimo yes, that's it
09:38 timotimo i mean stuff like sub nqp::existskey(%h, $k) { return %h{$k} :exists } and so on
09:39 diakopter yes, one could do that, but it would effectively be reimplementing the nqp "vm" thoroughly enough that it could bootstrap its own NQP compilation without too much more effort.. at least as soon as the last bits of pir:: are converted to nqp::
09:39 moritz that's, like, totally the wrong approach, IMHO
09:39 moritz because nqp:: stuff are low level operations
09:40 diakopter (moritz is right)
09:40 moritz so if you want to reuse code that uses nqp::, it should be written to use the high-level equivalents instead
09:40 timotimo well, all i wondered was if nqp is, besides the nqp:: and pir:: packages, a strict subset of perl6
09:40 timotimo i admit the question was weird
09:41 diakopter all the nqp ops *are* the nqp runtime
09:41 moritz no, it's not a strict subset
09:42 moritz for example arithmetic with large integers will give you overflows
09:42 moritz but Perl 6 specs bigint behavior
09:42 diakopter also it has funny things calls knowhows with "is repr"
09:42 diakopter *called
09:43 moritz and it's missing stuff like automatic *% in method signatures
09:43 FROGGS nr: my @a = <x xxxxxx xxx>; say "xxxxxxxxx" ~~ / @a /
09:43 p6eval niecza v24-23-g0520c7c: OUTPUT«「xxxxxx」␤␤»
09:43 p6eval ..rakudo 5101a5: OUTPUT«#<failed match>␤»
09:44 FROGGS n: my @a = <x xxxxxx xxx>; say "xxxxxxxxx" ~~ / | @a /
09:44 p6eval niecza v24-23-g0520c7c: OUTPUT«「xxxxxx」␤␤»
09:44 FROGGS n: my @a = <x xxxxxx xxx>; say "xxxxxxxxx" ~~ / || @a /
09:44 p6eval niecza v24-23-g0520c7c: OUTPUT«「xxxxxx」␤␤»
09:44 diakopter nqp: knowhow foo is repr('P6int') { say(4) }
09:44 p6eval nqp: OUTPUT«4␤»
09:44 diakopter std: knowhow foo is repr('P6int') { say(4) }
09:44 p6eval std 7551b8f: OUTPUT«ok 00:00 44m␤»
09:44 FROGGS n: say 'foobar' ~~ /@( <a b c o> )+/
09:44 diakopter urp
09:44 p6eval niecza v24-23-g0520c7c: OUTPUT«「ooba」␤␤»
09:45 bbkr joined #perl6
09:45 diakopter ohh.. didn't know std and rakudo knew about knowhows
09:45 moritz knowhows are specced, iirc
09:46 moritz ruoso++'s influence, at least in part
09:51 daxim joined #perl6
09:51 timotimo "and it's missing stuff like automatic *% in method signatures" - how would that violate the "subset" thing, though?
09:51 timotimo a friend is wondering why the rakudo team doesn't strive to make perl6 self-host
09:56 moritz timotimo:  if   class A { method x() } }; A.x(a => 1)  works in Perl 6 but not in NQP, NQP isn't a strict subset of Perl 6
09:56 arnsholt I can't say anything for the people actually working on the compiler, but it's probably not a worthwhile use of time yet
09:56 timotimo either of us is confused at the moment. i'm not 100% convinced it's me
09:57 arnsholt I'm sure there'll be a self-hosting compiler at some point, but not right now I'm not sure it's really necessary
09:57 timotimo 210:56 < arnsholt> I'm sure there'll be a self-hosting compiler at some point, but not right now I'm not sure it's really necessary
09:57 timotimo er.
09:57 arnsholt s/not //
09:57 moritz self-hosting is necessary, which is why we do so much stuff in NQP
09:58 arnsholt Two different ways to say the same thing collided I think
09:58 moritz but that's just partial self-hosting
09:58 moritz one problem is really speed
09:58 moritz Perl 6 code compiled by rakudo simply isn't fast enough to self-host more
09:58 arnsholt Yeah. Self-hosting compilers are cool and everything, but it's only useful as far as it makes the developers' life easier
09:58 FROGGS this project might be interesting there, right? https://github.com/swarley/nqp-go
09:58 moritz FROGGS: it surely is
09:59 FROGGS is go as fast as C ?
09:59 moritz and compiling rakudo's setting is already painfully slow (IMHO)
09:59 diakopter moritz: personal question, I guess - will you use rakudo-jvm when it exists?
10:00 moritz diakopter: I guess I will
10:00 moritz I use niecza and rakudo-on-parrot, there's no reason not to use rakudo-on-jvm
10:01 diakopter do you have a strong opinion on openjdk vs oracle jvm?
10:01 moritz and if there'll be a good reason to use it (like, faster), I'll surely will use it
10:01 moritz I occasionally toyed with the idea of helping jnthn++'s npq-jvm work, but so far it doesn't seem to fall into my area of expertise
10:02 moritz and toying with the optimizer was just way too much fun :-)
10:04 timotimo have you ended up doing more than compile-time evaluation?
10:05 timotimo perl6 disappeared from my attention for a few days
10:06 arnsholt I was pondering the "unicode character names" thing before falling asleep last night
10:07 arnsholt Think I might do it =)
10:07 timotimo does that mean a regex on the name of a unicode character? :D
10:08 arnsholt Nah. A simple trie class that does the <String, Character> map, essentially
10:08 nwc10 does ICU offer "unicode character name" lookup?
10:08 nwc10 if so, how?
10:08 arnsholt And a bit of logic to build the DB and store/load to disk
10:09 arnsholt Yeah, Parrot pulls in ICU to do Unicode processing, so that's how NQP-parrot does it
10:09 arnsholt But jnthn said yesterday that he'd rather not pull in all of ICU just for the lookup tables
10:09 moritz timotimo: well, compile time warnings and code elimintation
10:09 nwc10 OK, but I meant, can you steal the approach ICU uses?
10:09 moritz r: my $x = 42; $x; say $x;
10:09 p6eval rakudo 5101a5: OUTPUT«WARNINGS:␤Useless use of variable $x in sink context (line 1)␤42␤»
10:09 nwc10 in particular
10:10 arnsholt That's probably a good idea, yeah =)
10:10 nwc10 there are about 24,000 individually named code points
10:10 timotimo moritz: that does sound nice
10:10 arnsholt The name database is distributed via unicode.org AFAIK
10:11 arnsholt So my idea was to build the DB from that, and make sure we can round-trip it for verification
10:11 nwc10 and I can't remember how many more that are algorithmically named. /^CJK (?:COMPATIBILITY|UNIFIED) IDEOGRAPH [0-9A-F]{4,5}$/ are fairly easy
10:11 nwc10 but /HANGUL SYLLABLE (|B|BB|C|D|DD|G|GG|H|J|JJ|K|M|N|P|R|S|SS|T)(A|AE|E|EO|EU|I|O|OE|U|WA|WAE|WE|WEO|WI|YA|YAE|YE|YEO|YI|YO|YU)(B|BS|C|D|G|GG|GS|H|J|K|L|LB|LG|LH|LM|LP|LS|LT|M|N|NG|NH|NJ|P|S|SS|T)?/ far less so
10:12 nwc10 and those aren't in the file UnicodeData.txt
10:12 * nwc10 has been looking at where Perl 5 does it
10:12 arnsholt Interesting
10:12 dakkar joined #perl6
10:12 nwc10 lib/unicode/Name.pm
10:12 arnsholt I'll go look at ICU when I get a chance, in that case. Thanks!
10:12 timotimo i wrote code once to make boxes with existinginonexisting subboxes and double and single borders and it was a pain to create those names
10:12 arnsholt Also, Perl 5
10:13 nwc10 the Perl 5 approach is fairly ugly and brute force for the non-generated names.
10:13 tadzik r: my $principal = 327.68; my $interest = $principle * $rate;
10:13 p6eval rakudo 5101a5: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Variable '$principle' is not declared. Did you mean '$principal'?â�¤at /tmp/RrQA1u1pEP:1â�¤------> [32mipal = 327.68; my $interest = $principle[33mâ��[31m * $rate;[0mâ�¤    expecting any of:â�¤        postfixâ�¤Â»
10:14 tadzik could someone with blogs.perl.org account comment on http://blogs.perl.org/users/brian_wisti/2013/02/think-perl6-02.html?
10:19 diakopter what kind of comment do you want? [note: I don't have an account there]
10:20 tadzik explain our "
10:20 tadzik (damnit, return key)
10:21 tadzik explain our "did you mean $principal" feature
10:25 timotimo > '2' - 1'  # whoops?
10:26 timotimo but yes, that feature should be pointed out at him (said the implementor with a bit of pride in his voice^Wfingers)
10:27 tadzik well volunteered!
10:27 timotimo i don't have such an account either
10:28 arnsholt An excellent time to create one! =)
10:28 timotimo oh, i can login with openid
10:28 timotimo i think a google account gives one an openid, too
10:29 arnsholt Yup
10:29 arnsholt I can never remember how to actually -use- it, but Google provides OpenID
10:30 * timotimo tries to figure out
10:30 wk joined #perl6
10:36 timotimo big meh.
10:38 domidumont joined #perl6
11:07 erkan joined #perl6
11:07 erkan joined #perl6
11:33 brrt joined #perl6
11:39 colomon joined #perl6
11:39 colomon o/
11:43 labster left #perl6
11:43 FROGGS hi colomon
11:45 xinming_ joined #perl6
11:53 colomon anyone know about buying headless linux boxes?  I need a machine with lots of CPU, RAM, and disk, don't care about graphics, etc.  I used to just run to Best Buy and grab a cheap gaming box, but it doesn't seem like they are keeping up with the march of time very well.
11:56 timotimo at least in germany there's lots of shops where you can assemble parts and they will even assemble it for you and send it finished to your home
11:56 timotimo that may be the right thing for you?
11:56 fireartist joined #perl6
11:56 timotimo if you get a "lots of cpu" from intel, you'll have decent integrated graphics as well, so you won't have a need to get a graphics card at all - but i'm not sure how to find out which motherboards will boot without a monitor and keyboard plugged in
11:57 fireartist rakudo: DateTime.now.delta( 15, seconds );
11:57 p6eval rakudo 5101a5:  ( no output )
11:58 FROGGS colomon: in case you are a windows guy, dell workstations and tower servers might be a good option
11:58 FROGGS http://www.dell.com/content/topics/segtopic.aspx/landing/first-server-solutions?c=us&amp;cs=ussoho1&amp;l=en&amp;s=soho
11:58 fireartist is DateTime.delta() working on rakudo? it gives me an error "Undeclared routine: seconds"
11:58 timotimo he did say "linux boxes"
11:58 FROGGS ohh, yeah
11:58 FROGGS -.-
11:58 timotimo :)
11:59 colomon yes, I'm looking for a nice Linux box which will live in the basement and get ssh'd into.
11:59 raiph_ r: my $principal = 327.68; my $interest = $principle * $rate;
11:59 p6eval rakudo 5101a5: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Variable '$principle' is not declared. Did you mean '$principal'?â�¤at /tmp/EAOgulOT4b:1â�¤------> [32mipal = 327.68; my $interest = $principle[33mâ��[31m * $rate;[0mâ�¤    expecting any of:â�¤        postfixâ�¤Â»
12:00 colomon The one I've got now is long in the tooth, and dies about 50% of the time when I give it a hard task.
12:00 colomon Like building Rakudo.  ;)
12:00 SmokeMachine joined #perl6
12:00 timotimo oh, whoops :)
12:00 FROGGS colomon: I'd buy the parts separately, you get a lot for 500€
12:01 FROGGS especially when you use the onboard/onchip HD3000 gfx
12:01 timotimo in places where best buy exists, you don't usually have stores that accept euros, though! :P
12:01 FROGGS there are mainboards with 12 SATA ports, and two or more NICs
12:02 FROGGS r: say 500 * 1.3 ~ '$'
12:02 p6eval rakudo 5101a5: OUTPUT«650$␤»
12:02 FROGGS timotimo: € is just a unit :o)
12:05 timotimo :)
12:05 timotimo at that point where you get "lots of ram", you might want to start thinking about ECC
12:06 FROGGS depends if "lots of ram" is more than eight or sixteen
12:07 FROGGS the problem with ECC is mainboard and ram prizes
12:07 timotimo indeed
12:28 * colomon is pondering just buying a pogolinux machine.  $2100 for i7 and 32 gigs ram isn't great, but having an assembled and known linux-friendly machine seems like a big win.
12:29 * colomon is old enough that putting together a machine from pieces to save $1000 no longer seems like a win.
12:31 FROGGS colomon: that was going to be my next question, since I know the brother of my sister, who isnt really capable of assembling such a thing
12:32 colomon FROGGS: I've built several in the past, but it always seemed like a PITA
12:32 domidumont joined #perl6
12:33 pmurias joined #perl6
12:34 FROGGS hmm, I've enjoyed it every time... last thing I built is my media server, which 14 slots for hard drives :o)   (even if only two drives á 2TB are inside)
12:36 timotimo wow, saving 1000 dollar for assembling something as simple as a desktop computer seems like a huge win for me, especially if it's 50%. then again, i don't really earn any kind of salary ...
12:37 moritz even for people who earn a salary, 1k dollars is a still a lot of money
12:38 brrt well, not for everyone's salary apparantly ;-)
12:38 moritz right, just for the average and the median :-)
12:38 brrt but assembling is fun isn't it?
12:38 diakopter kids are exhausting
12:38 moritz they can be, totally :-)
12:39 brrt i recently swapped a RAM, and i was thrilled
12:39 * timotimo knows how exhausting ~10 kids in one room 5 days a week for a couple of month are ... >_<
12:40 moritz in NUMA systms, RAM swaps you! :-)
12:40 brrt ~10 kids :-o wow
12:40 brrt (go figure many mammals have that many kids every year)
12:40 moritz but they require far less care than human kids, and are much faster to mature
12:41 colomon moritz: 1k dollars is 10 hours work for me at the moment.  I'm really doubting I can research what parts I need, order, assemble, and trouble-shoot a new machine in less than 10 hours.
12:43 FROGGS colomon: true
12:43 * colomon should perhaps note that the contract bringing in that sort of money is nowhere near fulltime
12:43 brrt yeah, thats an important point
12:43 diakopter colomon: but that also means you must value your #perl6 at greater than $100/hr :)
12:44 diakopter *#perl6 time
12:44 brrt otherwise you'd make over 200k a year
12:44 FROGGS colomon: I can send you my CV if you want *g*
12:47 brrt anyway, rationally, you'd have to weigh the actual cost of your hours by the fraction of full-time employable hours you have at all
12:48 kcwu joined #perl6
12:49 Naamah joined #perl6
12:49 Naamah left #perl6
12:51 diakopter you can say it's worth spending the additional $1000 to save 10 hours of work by that rationale if you're actively accepting an additional 10 hours of work as a result of the decision - .. or making time for some other activity you value as much or more (like leisure or family time)
12:55 brrt bleh, that becomes difficult fast
12:55 brrt guess we use heuristics for a reason
12:56 timotimo brrt: those were obviously not my own kids ;) - i did the mandatory civil service in a kindergarten
12:57 brrt that probably wouldn't fly where i live, they would go 'hey whatcha doing with all those kids'
12:57 brrt was it fun? i can imagine it being fun
12:58 timotimo it was challenging and exhausting ;)
12:59 timotimo but the kids were mostly very sweet and nice. lots of things i should have done differently in order to have enjoyed it more or done better overall, but it was all right
12:59 timotimo i remember coming home every day after work and not being capable of doing any activity that was remotely non-passive
12:59 brrt well, you live and you learn
13:00 timotimo indeed. i was the first civil servant they ever had and they asked the city for someone to replace me when my time was over, so i suppose i did good in some way
13:02 diakopter timotimo: where do you live that you must do civil service?
13:02 FROGGS germany
13:02 timotimo yes, either military or civil service
13:02 FROGGS but that's past
13:02 diakopter only 2 months?
13:03 timotimo it felt more like 6 when i did it
13:03 FROGGS 9 months military service, 10 years ago when I had to do it
13:03 FROGGS and 10 months civil service, it got reduced and then cancelled
13:04 diakopter it's 2/3 years (F/M) in Israel
13:04 FROGGS wow
13:04 diakopter 2 years for women, 3 years for men
13:05 brrt pff
13:05 brrt in the netherlands we only have military service
13:05 brrt but
13:05 timotimo yeah, it was before 2011, so i believe i did 9 months
13:05 diakopter only military in Israel
13:05 brrt you don't actually have to shift
13:05 brrt show up
13:05 moritz well, Israel is in a peculiar situation
13:05 brrt unless there is a war or something
13:05 brrt which is obviously constant for israel
13:06 brrt (sadly, i might add)
13:06 pmurias joined #perl6
13:07 brrt do you really have to go and enter the military in {germany, israel}?
13:07 diakopter http://en.wikipedia.org/wiki/Israel_Defense_Forces#Regular_service
13:08 FROGGS brrt: no, there is no duty anymore to do that in germany since 2011
13:09 arnsholt Norway still has military service (sort of)
13:09 arnsholt Although relatively few people are chosen every year to actually go do it
13:09 * brrt should look it up
13:10 brrt for the netherlands, i recall getting a scary looking letter
13:10 diakopter USA 18-y.o. males are required to sign up for military conscription in case it becomes 'necessary'
13:11 brrt that is similar to the dutch case; since 1997 we don't have to show up anymore
13:11 brrt although we are officially conscripted
13:12 brrt civil service was never implemented
13:25 huf joined #perl6
13:45 benabik joined #perl6
13:50 kaleem joined #perl6
13:53 pmurias jjjjjjjjjjjjjk
13:54 hoelzro Vim user? ;)
13:57 timotimo well, nowadays a crapton of programs support hjkl navigation
13:57 timotimo most of the google web-apps, for instance
14:00 uvtc joined #perl6
14:02 uvtc colomon: if you're in the States, maybe look at http://laclinux.com/gnu/GNU_Linux_Computers . I've nothing to do with them, but bought a laptop from them a while back.
14:03 uvtc Would buy from them again.
14:09 moritz stupid git question: is there a command that shows the me the upstream for a branch (or the current branch)?
14:09 arnsholt Hmm. Good question
14:10 timotimo may i present to you: git push -n?
14:10 arnsholt Right, that'll work
14:10 timotimo well, not quite the solution i suppose
14:10 [Coke] moritz: git rev-parse --symbolic-full-name @{u} ?
14:11 PacoAir joined #perl6
14:11 sjn moritz: would it help to graph the git log?
14:11 timotimo haha, yikes, that's quite a mouthful (of keys?)
14:11 sjn moritz: e.g. git log --graph --decorate --pretty=oneline --abbrev-commit --all
14:11 baramine joined #perl6
14:12 moritz [Coke]: thanks
14:13 moritz sjn: only if the local and the remote branch are in sync
14:13 moritz (afaict)
14:15 PacoAir joined #perl6
14:21 Psyche^ joined #perl6
14:22 bluescreen10 joined #perl6
14:23 cogno joined #perl6
14:26 [Coke] moritz: lucky find on stack overflow.
14:26 [Coke] ... shoudl have upvoted it while I was there.
14:27 [Coke] gah, meetings begin.
14:27 benabik joined #perl6
14:28 timotimo moritz: i don't know if it's actually what you meant, but i like using gitk --all to get an overview; you can ever rearrange your local branches with it quite comfortably i find.
14:31 dalek perl6-most-wanted: 433f358 | (John Gabriele)++ | README.md:
14:31 dalek perl6-most-wanted: Added editing tip to README
14:31 dalek perl6-most-wanted: review: https://github.com/perl6/perl6-most-wanted/commit/433f358c99
14:33 domidumont joined #perl6
14:35 domidumont joined #perl6
14:36 moritz timotimo: not really. I'm preparing an internal git training, and I noticed that I knew the CLI command for setting an upstream, but not for finding out what the upstream is
14:36 timotimo oh, right
14:45 b1rkh0ff joined #perl6
14:49 benabik joined #perl6
14:51 benabik_ joined #perl6
14:53 timotimo moritz: did you see git remote show origin (or other)? it's not "remote for a branch", but it gives you an overview over all branches of that remote at least (after some network traffic)
14:55 moritz that's also interesting, yes
14:55 FROGGS Local branch configured for 'git pull':
14:55 FROGGS nom merges with remote nom
14:55 FROGGS nice
14:57 stopbit joined #perl6
14:58 JimmyZ joined #perl6
14:59 rindolf joined #perl6
15:01 skids joined #perl6
15:02 FROGGS phenny: ask jnhtn for his +1/-1 to https://gist.github.com/FROGGS/4984189
15:02 phenny FROGGS: I'll pass that on when jnhtn is around.
15:04 domidumont joined #perl6
15:09 bluescreen10 joined #perl6
15:09 dalek Perlito: c03fefd | (Flavio S. Glock)++ | TODO-perlito5:
15:09 dalek Perlito: Perlito5 - update syntax TODO
15:09 dalek Perlito: review: https://github.com/fglock/Perlito/commit/c03fefd5a8
15:10 FROGGS[mobile] joined #perl6
15:10 brrt joined #perl6
15:22 moritz masak: this might interest you: http://twistedoakstudios.com/blog/Post2540_optimizing-just-in-time-with-expression-trees real world usage of codegen through AST-like API ("expression trees")
15:23 Tedd1 joined #perl6
15:25 brrt deep perl6 hackers, i was wondering about something
15:25 brrt suppose sixparrot / jvm / whatever rakudo rakudo gets to run on gets to have a 'release' instruction
15:26 brrt or 'free' if that is more familiar :-)
15:26 timotimo oooh those links to blizzard crypto are amusing
15:26 brrt could we use for example, the origin of objects in a QAST tree as well as escape analysis to determine whether objects should be released on scope exit?
15:27 brrt i.e. i have a routine: sub foo { my $bar = quix(); $bar.quam(42); return $bar.baz }
15:28 brrt even though $bar wouldn't be 'created' in the routine, suppose quix() did create a new one
15:28 brrt we could free $bar right away
15:31 * JimmyZ doesn't think it would be
15:33 brrt hmm
15:34 * nwc10 worries about the consequences of a free bar :-)
15:34 brrt i agree, any calls to $bar's methods could end up creating a global reference
15:34 brrt free bar is no object of course
15:34 brrt to bad
15:35 benabik joined #perl6
15:35 JimmyZ But, I think freeing object is what GC is doing
15:36 brrt yes, but
15:36 brrt a): most objects die young
15:36 JimmyZ I.E generation GC
15:37 brrt b): generational gcs are ehm, usually, compacting GC, and that is / can be a problem in multithreaded enviroments
15:37 cogno joined #perl6
15:37 timotimo one optimisation that can be done with escape analysis is creating objects on the stack instead of the heap (pypy does this when it compiles rpython to C and they call it "malloc removal")
15:37 brrt c): multithreaded enviroments are Highly Desirable
15:37 timotimo don't know if it applies here.
15:38 brrt this is similar
15:38 benabik Parrot has a generational GC and isn't compacting.  You can store generations as lists instead of separate memory spaces.
15:38 benabik It's just that generational collection is useful for compacting.
15:38 brrt but that surely also depends on whether a global reference is taken
15:39 brrt benabik, i guess that is true
15:39 JimmyZ brrt: http://pdf.aminer.org/000/546/121/a_concurrent_generational_garbage_collector_for_a_multithreaded_implementation_of.pdf
15:39 brrt they tend to be hilariously complex
15:40 brrt i'll look the article up
15:40 JimmyZ GC is always fun topic
15:40 benabik Copying/compacting GCs add a significant amount of complexity, since they have to update references.  Multithreaded GC adds complexity as well.
15:40 benabik Although the easiest solution to concurrent GC is "don't".
15:41 benabik Create points for every thread to stop, do GC, then let everyone start again.
15:41 brrt there is a very elegant solution to concurrent gc called very concurrent gc
15:41 benabik If you can ensure that references don't escape the threads, it can be easier.  Erlang/Actor concurrency models make this easier by simply not sharing data.  :-D
15:41 brrt but a): it lets object lives for at least two generations and b): it is mark and sweep
15:43 brrt but thanks for that article :-)
15:44 * JimmyZ saws a nice pdf: Very Concurrent Mark-&-Sweep Garbage Collection without Fine-Grain Synchronization  http://doc.cat-v.org/inferno/concurrent_gc/concurrent_gc.pdf
15:44 brrt exactly that one
15:44 brrt brilliant idea, came to it via whiteknight++
15:44 brrt the idea is: you have 3 threads (or more), one  for a marker, one for a sweeper, and one or more for mutators
15:45 FROGGS joined #perl6
15:45 brrt you assign to each thread a color based on an epoch
15:45 brrt the mutator allocates data and tags it with COLOR(epoch)
15:46 brrt the marker traces all reachable data and changes the tag from COLOR(epoch-1) to COLOR(epoch)
15:46 brrt the sweeper cleans all data tagged with COLOR(epoch-2)
15:46 benabik Mark has to finish before updating the epoch?
15:46 brrt every so often, you sync up and update epoch
15:46 brrt yes
15:46 benabik Fascinating.
15:47 brrt it is brilliant
15:47 brrt it is just not very fast
15:47 brrt mostly due to the fact that a): garbage lives for 2 generations and b): it is mark and sweep
15:47 brrt thus, i was wondering if escape analysis could help it out somewhat :-)
15:48 FROGGS phenny: ask jnthn for his +1/-1 to https://gist.github.com/FROGGS/4984189
15:48 phenny FROGGS: I'll pass that on when jnthn is around.
15:48 colomon_ joined #perl6
15:49 FROGGS moritz: from you too? # I'm always a bit nervous about these commits... Can't wait to push ó.ò
15:51 * colomon_ 's MBP is booting again!  o/
15:51 GlitchMr .u ć
15:51 phenny U+0107 LATIN SMALL LETTER C WITH ACUTE (ć)
15:51 benabik I've always found Immix GC interesting, but it's not concurrent. http://cs.anu.edu.au/techreports/2007/TR-CS-07-04.pdf
15:53 brrt i'm mentally compiling it all, hoping to see some point there, but vcgc is the start as far as i'm concerned
15:53 xinming joined #perl6
15:53 brrt obviously you can always optimise and what not
15:53 brrt the jvm has a hilariously complex machine called G1
15:53 moritz FROGGS: that code is by far not my area of expertise, so I'd like to defer to jnthn
15:54 FROGGS moritz: k, np
15:56 pmurias brrt: have you seen the various tricky types Rust uses to reduce the amount of gc?
15:57 benabik Although I suppose there's no particular reason you couldn't mix the tricolor concurrent thing with something like Immix.
15:57 brrt pmurias, haven't looked at rust at all
15:57 moritz benabik: you mean, besides "head explodes"? :-)
15:57 brrt i have heard that gc is optional
15:57 ggoebel phenny: tell colomon regarding new dev machine... I picked up a toshiba qosmio x870-bt3g23 quad I7-3630qm w/ nVidia GeForce x670m and 32GB ram before xmas for $1260. I skipped the $600 upcharge for 32GB RAM and instead picked up 32GB ram from crucial.com for less than $200. Toshibadirect.com deals come and go. Looks like it'd currently cost you $1299 + ~$200 for the 32GB ram
15:57 ggoebel upgrade.http://www.toshibadirect.com/td/b2c/cdetland.to?poid=2000044488
15:57 phenny ggoebel: I'll pass that on when colomon is around.
15:58 mtk joined #perl6
15:58 benabik moritz: Immix specifies how to do marking and sweeping.  No reason that couldn't occur concurrently using the tricolor marking instead of just bits.
15:58 benabik moritz: Head exploding is a general issue of GC implementation as far as I can tell.
15:58 colomon_ ggoebel: thanks!
15:58 brrt :-)
15:59 ggoebel colomon: memory upgrade on it requires one screw on bottom for 2 slots, and popping the keyboard off for the other 2... good luck with your search
16:07 xinming joined #perl6
16:16 kresike joined #perl6
16:16 shinobicl joined #perl6
16:18 Tedd1 joined #perl6
16:20 ggoebel_ joined #perl6
16:21 xinming_ joined #perl6
16:27 colomon Test to see if my MBP is actually running or just displaying the last valid screen...
16:27 phenny colomon: 15:57Z <ggoebel> tell colomon regarding new dev machine... I picked up a toshiba qosmio x870-bt3g23 quad I7-3630qm w/ nVidia GeForce x670m and 32GB ram before xmas for $1260. I skipped the $600 upcharge for 32GB RAM and instead picked up 32GB ram from crucial.com for less than $200. Toshibadirect.com deals come and go. Looks like it'd currently cost you $1299 + ~$200 for the 32GB ram
16:28 ggoebel colomon: sorry in my excitement to share... I overlooked the headless and linux parts :-(
16:29 * brrt off
16:29 brrt left #perl6
16:37 krunen joined #perl6
16:40 kresike bye folks
16:42 shinobicl Hi... are there any plans for improving the META.info file on p6 packages? To emulate something like java's Maven, for example?
16:46 timotimo anything in particular you had in mind?
16:47 FROGGS ya, tell us
16:51 shinobicl well... for starting... having a similar interface for packages on perl6 (or perl5) like a "translator" for maven artifacts to CPAN,
16:51 shinobicl or just taking maven's specification completely and using it on perl6
16:52 timotimo maven's specification is huge unwieldy xml files and maven has 1000x more features than panda does; what would be the benefit of adopting maven's format?
16:53 timotimo also, the startup time of panda is already annoying, would only get worse if there were 100 lines of XML for each and every project in the ecosystem ;)
16:53 shinobicl i've been using recently a continous integration tool (Hudson) it uses maven's pom.xml for doing the testing and other static code analysis stuff. All based from the info on pom.xml
16:54 shinobicl you just point it to the pom.xml in your proyect and hudson does the rest
16:54 pmurias shinobicl: as Rakudo is being ported to the JVM it's likely people will work on integration with the JVM ecosystem
16:56 shinobicl i thogth about that also, so, why not take maven's approach and use it on perl6?
16:59 jlaire someone's actually recommending maven? I'm amazed :)
16:59 Tedd1 joined #perl6
17:01 [Coke] if you're coming from a java shop, it makes sense.
17:02 shinobicl it does not have to be Maven... but something similar. For example in maven files you an use variables for specifying library versions. Also the address repositories directly in it. I found this functionality very useful
17:02 [Coke] but I suspect we might end up with panda generate maven files for it to use. (rather than switching full on to maven.)
17:02 shinobicl well... i'm somewhat new in java. I prefer perl... always
17:02 [Coke] (same way we might end up with something that can speak junit)
17:03 [Coke] shinobicl: anyway, tuits are tight. I'm not sure anyone is going to put them into maven at the moment.
17:05 shinobicl oh well.. i was just wondering if someone had plans for META.info
17:06 FROGGS well, I had and have, but only add one or two fields to fulfil the spec
17:07 uvtc left #perl6
17:08 SunilJoshi joined #perl6
17:09 [Coke] something that could use panda's infrastructure as a source to generate stuff for maven to read would be a good way to go, if you've got tuits, though.
17:09 dukeleto joined #perl6
17:15 cogno joined #perl6
17:18 cogno_ joined #perl6
17:22 domidumont joined #perl6
17:23 Yappocall_ joined #perl6
17:26 * [Coke] realizes we can call the new trek move STD.
17:26 FROGGS trek movie?
17:27 bloonix joined #perl6
17:30 jnthn evening, #perl6
17:30 phenny jnthn: 15:48Z <FROGGS> ask jnthn for his +1/-1 to https://gist.github.com/FROGGS/4984189
17:30 FROGGS stra trek into darkness?
17:30 FROGGS hmmm
17:30 FROGGS hi jnthn
17:32 aMiloia joined #perl6
17:33 jnthn r: say Capture ~~ Positional
17:33 p6eval rakudo 5101a5: OUTPUT«False␤»
17:35 jnthn FROGGS: It ended up as a fairly small patch :)
17:36 aMiloia left #perl6
17:36 jnthn FROGGS: I'm happy with it. It isn't the whole solution but it's a lot better than the complete NYIness we have of this feature now. :)
17:36 aMiloia joined #perl6
17:36 SunilJoshi joined #perl6
17:36 aMiloia perl6: say 3;
17:36 p6eval rakudo 5101a5, niecza v24-23-g0520c7c: OUTPUT«3␤»
17:37 jnthn FROGGS: The one comment added is valid, but not a big deal :)
17:38 dalek nqp/target-pbc: 679cac2 | (Gerhard R)++ | src/HLL/Compiler.pm:
17:38 dalek nqp/target-pbc: Migrate to new PackfileView API
17:38 dalek nqp/target-pbc: review: https://github.com/perl6/nqp/commit/679cac29b2
17:38 dalek nqp/target-pbc: b7d0122 | (Gerhard R)++ | src/NQP/World.pm:
17:38 dalek nqp/target-pbc: Rename $main to $mainline to avoid confusion
17:38 dalek nqp/target-pbc: review: https://github.com/perl6/nqp/commit/b7d0122e8c
17:38 shinobicl rakudo: my @a; my Int @b; say @a ~~ @b;
17:38 p6eval rakudo 5101a5: OUTPUT«True␤»
17:39 jnthn shinobicl: That's asking about the contents of the arrays, fwiw.
17:39 shinobicl rakudo: my Str $a; my Int $b; say $a ~~ $b;
17:39 p6eval rakudo 5101a5: OUTPUT«False␤»
17:40 jnthn @a and @b are array objects - that is, instances. $a and $b on the other hand are empty scalars so you're comparing the type objects there.
17:41 shinobicl rakudo: my Int @a = (1,2); my Str @b = (1,2); say @a ~~ @b;
17:41 p6eval rakudo 5101a5: OUTPUT«True␤»
17:42 shinobicl ok, i see. How do i check the types instead? besides comparing the output of .WHAT ?
17:42 aMiloia left #perl6
17:42 aMiloia joined #perl6
17:42 jnthn Note that typed arrays are not 100% there implementation wise yet.
17:42 jnthn The .of property tells you what I think you're after.
17:43 jnthn r: my Int @a; say @a.of
17:43 p6eval rakudo 5101a5: OUTPUT«Int()␤»
17:43 jnthn r: my @a; say @a.of
17:43 p6eval rakudo 5101a5: OUTPUT«Mu()␤»
17:43 dukeleto joined #perl6
17:44 shinobicl rakudo: my Int @a = (1,2); my Str @b = (1,2); say @a.perl, @b.perl; say @a.of,  @b.of; say @a[0].WHAT; say @b[0].WHAT;
17:44 p6eval rakudo 5101a5: OUTPUT«Array+{TypedArray}.new(1, 2)Array+{TypedArray}.new(1, 2)␤Int()Str()␤Int()␤Int()␤»
17:45 shlomif joined #perl6
17:46 jnthn dinner etc, bbl &
17:46 shinobicl i guess that @b should contain "1" and "2" instead of 1 and 2, right?
17:47 cogno joined #perl6
17:47 shinobicl and stuff like this:
17:47 shinobicl rakudo: my Int @a = <1 2>; say @a.perl;
17:47 p6eval rakudo 5101a5: OUTPUT«Array+{TypedArray}.new("1", "2")␤»
17:48 shinobicl should give a type-checking error?
17:48 FROGGS jnthn: right, so I'll commit something like that in a bit, and then NFA can come >.<
17:49 aMiloia left #perl6
17:52 [Coke] I'm not sure if I would expect an error, or a coercian if one was possible.
17:52 [Coke] *coercion
17:55 kaare_ joined #perl6
17:55 [Coke] colomon: still getting a bunch of failures in niecza's daily run, FYI.
17:56 [Coke] colomon: https://gist.github.com/coke/4988227
17:59 am0c joined #perl6
18:00 skids std: my Int(Str) @a;
18:00 p6eval std 7551b8f: OUTPUT«ok 00:00 42m␤»
18:00 skids That I would expect to coerce.  The other perhaps not.
18:05 cognominal joined #perl6
18:16 xinming joined #perl6
18:25 dukeleto joined #perl6
18:27 wk joined #perl6
18:27 gdey joined #perl6
18:32 mtk joined #perl6
18:41 jaldhar joined #perl6
18:42 xenoterracide joined #perl6
18:44 awwaiid joined #perl6
18:47 colomon [Coke]: thanks for the heads up
18:49 census joined #perl6
18:56 benabik joined #perl6
18:57 proller joined #perl6
18:59 jaldhar joined #perl6
19:00 dukeleto joined #perl6
19:06 [Coke] http://blogs.perl.org/users/brian_wisti/2013/02/think-perl6-02.html - hey, something else showed up in my perl6 google news filter.
19:06 [Coke] (usually it's one link a day, to this backlog)
19:07 rindolf joined #perl6
19:07 dvj perl6: class b { has $.a; method a() {say "hello"; } }; b.new.a
19:08 p6eval niecza v24-23-g0520c7c: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Two definitions of method a (see line 1) at /tmp/C2c4X6Ej7w line 1:â�¤------> [32mclass b { has $.a; method a[33mâ��[31m() {say "hello"; } }; b.new.a[0mâ�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/C…
19:08 p6eval ..rakudo 5101a5: OUTPUT«hello␤»
19:08 dvj who is correct? :)
19:08 shinobicl left #perl6
19:08 FROGGS dvj: I believe niecza
19:09 FROGGS because has $.a gives you a public method too
19:09 [Coke] perl6 gives suggestions on variable names, but not in the REPL.
19:09 [Coke] er, rakudo.
19:10 pmichaud Rakudo is correct there, I think.
19:10 shinobicl joined #perl6
19:10 shinobicl left #perl6
19:10 pmichaud The accessor method is generated only if there's not an explicitly declared one.
19:11 Harzilein joined #perl6
19:11 Harzilein hi
19:11 FROGGS ahh, there is the missing piece of the puzzle :o)
19:11 Harzilein how can i add type constraints for a slurpy parameter?:
19:11 FROGGS pmichaud: thanks!
19:11 pmichaud Harzilein: it has to be done with a where clause, I believe.
19:12 sdvsedfav joined #perl6
19:17 GlitchMr git is so fun
19:17 GlitchMr Or rather, GitHub
19:18 GlitchMr I've pressed "Fork" on some repository, waited 5 minutes and it's still forking.
19:18 FROGGS hehe
19:18 GlitchMr https://github.com/GlitchMr/fish-shell
19:18 GlitchMr Here is the repository
19:19 benabik Probably an issue with too many jobs...  Forking on github itself should be very little work, since IIRC, they share the object database.
19:20 GlitchMr oh... lol
19:20 GlitchMr I've used Automatic Page Generator to generate gh-pages branch.
19:20 GlitchMr After doing that, the repository was forked successfully.
19:20 Harzilein guess there's a nicer way to write this, which would also work, this here doesn't:
19:20 Harzilein sub mySub($scalar, @array, *@theRest where { $_ ~~ Int for 0..(@_.elems-1) }) { say "the rest were: " ~ @theRest; }
19:20 dfvevbeb joined #perl6
19:20 benabik Fish's documentation points to fishshell.org, which appears to be a Japanese domain holding page.
19:21 GlitchMr Try http://fishshell.com/
19:21 GlitchMr fishshell.org isn't working anymore.
19:26 grondilu jnthn: can NativeCall be used with C++?
19:27 grondilu (assuming not too complicated classes I guess)
19:27 cognominal joined #perl6
19:27 GlitchMr I think it works with extern "C" {}
19:27 GlitchMr But I'm not sure
19:27 ElDiabolo joined #perl6
19:28 dvba joined #perl6
19:31 dalek nqp: f8a37df | (Tobias Leich)++ | / (4 files):
19:31 dalek nqp: add sequential array interpolation switch
19:31 dalek nqp:
19:31 dalek nqp: Arrays in regexes will match sequential if preceded by ||.
19:31 dalek nqp: review: https://github.com/perl6/nqp/commit/f8a37dfcd7
19:32 dvba joined #perl6
19:33 japhb_ joined #perl6
19:33 shinobicl joined #perl6
19:37 fgomez joined #perl6
19:37 dvj does perl6 have loop labels, for example - first: while (expr) { for (expr) { redo first; } }
19:37 dvj ?
19:38 PerlJam dvj: Perl 6 does, but I don't think any of the implementations do.
19:38 dvj ok
19:38 moritz n: foo: for <a b c> { last foo if /b/; .say }
19:38 p6eval niecza v24-23-g0520c7c: OUTPUT«a␤»
19:38 moritz niecza++ does
19:39 [Coke] p: foo: for <a b c> { last foo if /b/; .say }
19:39 p6eval pugs: OUTPUT«*** No such subroutine: "&foo"␤    at /tmp/CA2pSH_V8n line 1, column 20-29␤»
19:41 PerlJam sorear++
19:41 dukeleto joined #perl6
19:42 fvfddgb joined #perl6
19:52 asdfghjk joined #perl6
19:59 Harzilein hmm
20:03 Harzilein harzi@relax:~/niecza$ LANG=C ; fgrep '$' docs/making-standalone-exes.txt | while read a b ; do if [ "$b" = "cat > foo.pl" ] ; then echo 'say "Hello, World"' > foo.pl ; else eval "$b" ; fi ; done
20:03 Harzilein cp: cannot stat `obj/Run.MAIN.exe': No such file or directory
20:03 Harzilein [...]
20:03 Harzilein oops
20:04 Harzilein no, that's actually right.
20:04 cwDVCWE joined #perl6
20:04 Harzilein ah, it works if i specify --obj-dir
20:04 Harzilein :)
20:09 Harzilein hmm
20:09 Harzilein or it doesn't... argh
20:10 aMiloia joined #perl6
20:10 aMiloia left #perl6
20:15 Harzilein http://paste.debian.net/235684
20:17 moritz Harzilein: try providing an absolute path to the object dir
20:17 cognominal joined #perl6
20:18 dalek rakudo/nom: 8e6fa0b | (Tobias Leich)++ | / (3 files):
20:18 dalek rakudo/nom: add array in regex interpolation feature
20:18 dalek rakudo/nom:
20:18 dalek rakudo/nom: Arrays withinn regex will be treated as alternations of its elements.
20:18 dalek rakudo/nom: Preceding | or || will change its behaviour, || means sequential alt-
20:18 dalek rakudo/nom: ernation and | LTM, while the LTM is just a basic approach and needs
20:18 dalek rakudo/nom: tweeking.
20:18 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/8e6fa0b562
20:18 Harzilein moritz: MAIN.exe _does_ get created now, i just can't run it
20:19 moritz Harzilein: any reason not to try it with an absolute path?
20:19 Harzilein i did, same result
20:19 moritz ok
20:19 Harzilein the exe is not missing, it just lacks an entry method as per the error message
20:21 dalek roast: f7dd35f | (Tobias Leich)++ | S05-metasyntax/longest-alternative.t:
20:21 dalek roast: array interpolation support was added to rakudo
20:21 dalek roast: review: https://github.com/perl6/roast/commit/f7dd35f8e3
20:22 Harzilein boiled it down to two lines now:
20:22 Harzilein harzi@relax:~/niecza$ mono run/Niecza.exe --obj-dir "$PWD/obj" -c -e 'say "Hello World"'
20:22 Harzilein harzi@relax:~/niecza$ mono obj/MAIN.exe
20:22 Harzilein results in
20:23 Harzilein The entry point method could not be loaded
20:23 Harzilein the MAIN.exe does get recreated, i.e. the file is present when i rm obj/MAIN.exe and then run above line
20:24 fjtryjyjryjrxtht joined #perl6
20:25 benabik joined #perl6
20:32 dalek rakudo/agressive-sink-warnings: 80f788b | moritz++ | src/Perl6/Optimizer.pm:
20:32 dalek rakudo/agressive-sink-warnings: Warn when pure expressions are used in sink context
20:32 dalek rakudo/agressive-sink-warnings:
20:32 dalek rakudo/agressive-sink-warnings: even if the arguments are not constant, or the expression warns.
20:32 dalek rakudo/agressive-sink-warnings: By explicit request from TimToady++ at
20:32 dalek rakudo/agressive-sink-warnings: http://irclog.perlgeek.de/perl6/2013-02-18#i_6469204
20:32 dalek rakudo/agressive-sink-warnings: review: https://github.com/rakudo/rakudo/commit/80f788bbd7
20:32 dalek rakudo/agressive-sink-warnings: 2f210be | moritz++ | src/Perl6/Optimizer.pm:
20:32 dalek rakudo/agressive-sink-warnings: awesomify sink context warning text
20:32 dalek rakudo/agressive-sink-warnings: review: https://github.com/rakudo/rakudo/commit/2f210bea17
20:33 moritz with this branch, $_ + 2; say 42  now warns  Useless use of "+" in expression "$_ + 1" in sink context (line 1)
20:33 [Coke] *aggressive-tub-warnings
20:33 dalek roast: c8c32d7 | (Tobias Leich)++ | S05-interpolation/regex-in-variable.t:
20:33 dalek roast: array interpolation support added to rakudo
20:33 dalek roast: review: https://github.com/perl6/roast/commit/c8c32d75ac
20:34 moritz [Coke]: I usually warn that I'm agressive towards teletubbies
20:34 [Coke] "One day, in teletubby land, it was Po's turn to wear the skirt." -actual line of dialog.
20:35 [Coke] hurm. not dialog. monologue/voiceover close enough. :)
20:36 swarley lol
20:36 swarley The baby sun from that show always scared me
20:36 Harzilein :D
20:37 benabik That show always scares me.  Had a friend whose baby brother regressed to baby talk after watching that show for a while.
20:39 diakopter aw; Windows 8/2012 are the last Windows that will come with the Microsoft distribution/build of perl
20:39 [Coke] ... windows comes with perl?
20:40 diakopter has for many years. Windows 8 Enterprise and Server 2012, today. just enable the "Subsystem for UNIX-based Applications"
20:41 diakopter dism.exe /Online /Enable-Feature /Featurename:SUA
20:42 census_ joined #perl6
20:43 colomon joined #perl6
20:43 colomon std: $/ = "hellO"
20:43 p6eval std 7551b8f: OUTPUT«[31m===[0mSORRY![31m===[0m�Unsupported use of $/ variable as input record separator; in Perl 6 please use the filehandle's :irs attribute at /tmp/py4EckVAqX line 1:�------> [32m$/[33m�[31m = "hellO"[0m�Parse failed�FAILED 00:00 41m�»
20:43 colomon rn: $/ = "hello"
20:43 p6eval niecza v24-23-g0520c7c: OUTPUT«[31m===[0mSORRY![31m===[0m��Unsupported use of $/ variable as input record separator; in Perl 6 please use the filehandle's :irs attribute at /tmp/1WvR4tBoKu line 1:�------> [32m$/[33m�[31m = "hello"[0m��Parse failed��»
20:43 p6eval ..rakudo 5101a5:  ( no output )
20:44 colomon should that work or not?  subst.t is assigning to $/ and it makes niecza very unhappy.
20:45 dalek roast: 4cf643f | (Tobias Leich)++ | S05-metasyntax/litvar.t:
20:45 dalek roast: hashes not allowed in regexes
20:45 dalek roast: review: https://github.com/perl6/roast/commit/4cf643f0ec
20:45 dalek roast: 7f3ef46 | (Tobias Leich)++ | S05-metasyntax/litvar.t:
20:45 dalek roast: subscript of @var[0] is treated as regex
20:45 dalek roast:
20:45 dalek roast: So @var[0] is two regex rules, an alternation of the array elements,
20:45 dalek roast: and another alternation [0].
20:45 dalek roast: review: https://github.com/perl6/roast/commit/7f3ef46ab5
20:45 diakopter [Coke]: Microsoft bought Interix in 1999; it's been free for Windows since 2002, and bundled with Windows since 2005
20:45 dalek roast: 94bdf51 | (Tobias Leich)++ | S05-metasyntax/litvar.t:
20:45 dalek roast: array in regex does work now
20:45 dalek roast: review: https://github.com/perl6/roast/commit/94bdf51c9a
20:45 dvb joined #perl6
20:46 diakopter [Coke]: was originally named OpenNT in 1996
20:46 moritz std: $/ = "foo";
20:46 p6eval std 7551b8f: OUTPUT«[31m===[0mSORRY![31m===[0m�Unsupported use of $/ variable as input record separator; in Perl 6 please use the filehandle's :irs attribute at /tmp/KdiIjJynCF line 1:�------> [32m$/[33m�[31m = "foo";[0m�Parse failed�FAILED 00:00 41m�»
20:46 FROGGS [Coke]: already Windows NT 3.51 had a perl on the tools CD AFAIK
20:46 moritz [Coke]: seems that niecza is correct
20:48 colomon moritz: you mean colomon, and I already knew STD didn't like it.  I'm just trying to confirm STD is correct.  :)
20:51 dalek roast: e452149 | (Tobias Leich)++ | S05-metasyntax/litvar.t:
20:51 dalek roast: test for junctive/sequential semantics
20:51 dalek roast: review: https://github.com/perl6/roast/commit/e45214959c
20:51 dalek roast: abc7725 | (Tobias Leich)++ | S05-metasyntax/litvar.t:
20:51 dalek roast: test for array contextualizer
20:51 dalek roast: review: https://github.com/perl6/roast/commit/abc7725cb0
20:53 dalek roast: 0c6083f | (Tobias Leich)++ | S05-metasyntax/sequential-alternation.t:
20:53 dalek roast: unfudged seq.-array tests
20:53 dalek roast: review: https://github.com/perl6/roast/commit/0c6083f2d0
20:57 * PerlJam had forgotten just how long a "make spectest" can take
20:58 FROGGS seven minutes?
20:58 PerlJam longer on my system.
20:58 colomon n: "-" ~~ /.*/; say $/.perl
20:58 p6eval niecza v24-23-g0520c7c: OUTPUT«#<match from(0) to(1) text(-) pos([].list) named({}.hash)>␤»
20:58 colomon n: "-" ~~ /.*/; say ~$/;
20:58 p6eval niecza v24-23-g0520c7c: OUTPUT«-␤»
20:59 FROGGS nr: say "-" ~~ /.*/
20:59 p6eval rakudo 5101a5, niecza v24-23-g0520c7c: OUTPUT«「-」␤␤»
20:59 FROGGS I like these edges
21:00 colomon rn: "a".subst(/a/, "b"); say $/;
21:00 p6eval rakudo 5101a5: OUTPUT«「a」␤␤»
21:00 p6eval ..niecza v24-23-g0520c7c: OUTPUT«Any()␤»
21:05 colomon rn: "a" ~~ s/a/b/; say $/
21:05 p6eval niecza v24-23-g0520c7c: OUTPUT«Unhandled exception: Writing to readonly scalar␤  at /home/p6eval/niecza/lib/CORE.setting line 593 (Cool.subst @ 88) ␤  at /tmp/Hw4_IjsC51 line 1 (mainline @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4233 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/C…
21:05 p6eval ..rakudo 5101a5: OUTPUT«Cannot assign to a non-container␤  in sub infix:<=> at src/gen/CORE.setting:12440␤  in block  at /tmp/y6rbXFH9Qi:1␤␤»
21:05 colomon rn: my $a = "a"; $a ~~ s/a/b/; say $/
21:05 p6eval rakudo 5101a5, niecza v24-23-g0520c7c: OUTPUT«「a」␤␤»
21:06 rindolf joined #perl6
21:07 colomon subst.t seems to be assuming that subst(Str, Str) does not set $/ but subst(Regex, Str) does.  I don't see any support either way in the spec.
21:08 FROGGS well, $/ gives you the last regex match, and since .subst(Regex, Str) does that...
21:08 FROGGS there was an RT ticket about that
21:09 rindolf joined #perl6
21:09 * jnthn back
21:11 rindolf joined #perl6
21:11 colomon FROGGS: .subst always does a match, whether it's a Regex there or not.
21:12 rindolf joined #perl6
21:12 rprajapa joined #perl6
21:13 colomon rn: say "test".subst(/\w+/, "$/$/");
21:13 p6eval niecza v24-23-g0520c7c: OUTPUT«Use of uninitialized value in string context␤  at /home/p6eval/niecza/lib/CORE.setting line 1290 (warn @ 5) ␤  at /home/p6eval/niecza/lib/CORE.setting line 266 (Mu.Str @ 15) ␤  at <unknown> line 0 (ExitRunloop @ 0) ␤  at /tmp/9Ii3aPyClv line 1 (mainline @ …
21:13 p6eval ..rakudo 5101a5: OUTPUT«use of uninitialized value of type Any in string context  in block  at /tmp/zNX8Y1L945:1␤␤use of uninitialized value of type Any in string context  in block  at /tmp/zNX8Y1L945:1␤␤␤»
21:14 colomon rn: say "test".subst(/\w+/, { "$/$/" });
21:14 p6eval rakudo 5101a5, niecza v24-23-g0520c7c: OUTPUT«testtest␤»
21:14 colomon rn: say "test".subst("test", { "$/$/" });
21:14 p6eval rakudo 5101a5: OUTPUT«use of uninitialized value of type Any in string context  in block  at /tmp/kZ_QCRps5w:1␤␤use of uninitialized value of type Any in string context  in block  at /tmp/kZ_QCRps5w:1␤␤␤»
21:14 p6eval ..niecza v24-23-g0520c7c: OUTPUT«testtest␤»
21:16 donaldh joined #perl6
21:22 FROGGS colomon: when reading the spec and sentences like ".subst is the method form of s///" I'd say it should always set $/
21:22 jnthn grondilu: As far as I know, C++ does a bunch of name mangling, which I guess is a problem for knowing how to find the symbols. Also classes are probably...not going to work out to well given it only really knows about function calls.
21:23 FROGGS jnthn: thats why some (most?) c++ libs provide C bindings
21:24 jnthn In which case those can be used ;)
21:24 benabik IIRC, at the ABI level a C++ method call is a function call with a very funny name and a this parameter.  It's generally saner to rely on extern "C" stuff.
21:24 colomon FROGGS: to my mind, methods don't normally have side-effects
21:25 colomon rn: say "this is a test".match(/.\s./); say $/
21:25 p6eval rakudo 8e6fa0, niecza v24-23-g0520c7c: OUTPUT«「s i」␤␤「s i」␤␤»
21:25 benabik Oh, except when a function call is calling a function pointer inside the object.  :-D
21:25 FROGGS colomon: I believe I would be the one to blame if this is handled wrong
21:26 colomon FROGGS: though I can see argument that .subst should be consistent with .match
21:26 FROGGS ya, if match should set $/ then .subst should do too
21:27 PerlJam It would seem really weird if $/ were set when there was no regex involved.
21:28 colomon to me it seems weird to set $/ when you do a method call.
21:29 cognominal joined #perl6
21:29 colomon put another way, I think of the method calls as a nice, more "functional" approach to the old m// & s/// operators.
21:29 colomon discovering the method calls have side-effects strikes me as weird
21:31 benabik m/$regex/ ~~>  $/ = $regex.match($_)   e.g. The operator does match _and_ the side effect.
21:31 benabik Or at least that's a reasonable view.  :-)
21:31 benabik (May not be the correct view.)
21:32 colomon benabik++
21:32 benabik Or $_.match($regex), however that's spelled.  :-D
21:32 PerlJam Iwas just thinking of the "rules" the programmer has to remember.  In one universe, it's "$/ only changes when you match against regex"; in another universe it's "$/ changes whenever you match against a regex, or call this set of methods".   I like that first universe best :)
21:35 Harzilein if anyone is interested in my bisection of the method for building standalone exes in the niecza docs failing: http://paste.debian.net/235707 is the failing revision, http://paste.debian.net/235709 is the testniecza script i used
21:36 benabik The phrase "build is quite shot" in that revision makes me very unsurprised that it breaks things.
21:37 sevin joined #perl6
21:38 sevin joined #perl6
21:44 colomon Isn't @strings>>.match(/pat/) going to take a significant performance hit from assigning each match to $/?
21:46 * colomon just got Art of Computer Programming: Volume 4 Fascicle 3 "Generating All Combinations and Partitions" in the mail.  :)
21:47 FROGGS colomon: maybe, but that's not the question IMO
21:49 dukeleto joined #perl6
21:50 PerlJam colomon: it only *has to* do the assignment if the operation can do something with $/ en passant.  In this case, it can't so ... as an optimization, it can only do the assignment once  :)
21:50 PerlJam colomon: but given that the order in which the matches are executed is unknown, whatever is assigned to $/ may not be the most useful result anyway  :)
21:51 benabik joined #perl6
21:52 colomon PerlJam: right, each call to .match in that hyper is going to have to get a lock on $/ but the end result will be random.
21:54 colomon .match already returns the Match.  Assigning it to $/ is a completely unnecessary side-effect.
21:54 colomon afk # need to rescue my in-laws from my son
21:55 tadzik or is it the othner way around? :P
21:55 PerlJam oh ... /$pat/  doesn't do any pattern matching  (no, m//, nor a call to .match) so no assignment to $/
22:08 shinobicl left #perl6
22:16 crab2313 joined #perl6
22:30 grondilu rn: say my $file = qp{/tmp/dafile};
22:30 p6eval niecza v24-23-g0520c7c: OUTPUT«Potential difficulties:â�¤  $file is declared but not used at /tmp/dr7uh8vWlm line 1:â�¤------> [32msay my [33mâ��[31m$file = qp{/tmp/dafile};[0mâ�¤â�¤"/tmp/dafile".IOâ�¤Â»
22:30 p6eval ..rakudo 8e6fa0: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Two terms in a rowâ�¤at /tmp/QDq4Ab33JU:1â�¤------> [32msay my $file = qp{/tmp/[33mâ��[31mdafile};[0mâ�¤    expecting any of:â�¤        postfixâ�¤        infix or meta-infixâ�¤        infix stopperâ�¤        statement endâ�¤        statement modifi…
22:31 FROGGS r: say my $file = q:p{/tmp/dafile};
22:31 p6eval rakudo 8e6fa0: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Unrecognized adverb: :pâ�¤at /tmp/hY1cWTHw7f:1â�¤------> [32msay my $file = q:p[33mâ��[31m{/tmp/dafile};[0mâ�¤    expecting any of:â�¤        colon pair (restricted)â�¤Â»
22:32 jnthn if it's just menat to .IO the quoted thing, then that shouldn't be too hard to implement
22:40 sevin left #perl6
22:56 stopbit left #perl6
22:58 Tedd1 joined #perl6
23:00 cognominal joined #perl6
23:11 * rjbs is looking for information about how or whether the topic in Perl 6 is lexical.
23:11 rjbs My understanding is that while $_ is lexical, it is handled magically in a way that propagates its value across subroutine calls, somehow.
23:13 robinsmidsrod joined #perl6
23:23 cognominal joined #perl6
23:23 sorear rjbs: generally, no
23:24 benabik Do some calls default to something like CALLER::$_ ?
23:25 rjbs sorear: Can you elaborate on that or point me to something?
23:25 dukeleto joined #perl6
23:26 benabik Actually, most things that defaulted to $_ now complain that you should use .foo, don't they?
23:28 benabik rjbs: Hard to point to lack of something.  Where does it propagate?
23:30 benabik rjbs: Places where it used to tend not to anymore.
23:30 benabik std: split
23:30 p6eval std 7551b8f: OUTPUT«[31m===[0mSORRY![31m===[0m�Unsupported use of bare 'split'; in Perl 6 please use .split if you meant $_, or use an explicit invocant or argument at /tmp/d1j4jhcyQd line 1:�------> [32msplit[33m�[31m<EOL>[0m�Check failed�FAILED 00:00 41m�»
23:35 rjbs Okay.  I'm trying to determine the state of things that I probably knew better several years ago.
23:35 rjbs Perl 5 added a lexical $_ in 5.10, but it led to many complications.  We planned to remove it.
23:35 rjbs There has been a late-minute call for a pardon.
23:36 rjbs I remember discussing it briefly with TimToady and Damian, both of whom pointed at how the design of Perl 6 obviated the need for a global topic by propagating else down more usefully.
23:36 rjbs It is of course possible that I'm misremembering something.
23:37 rjbs I'm trying to determine whether Perl 5 *can* have a lexical $_ without leading to great confusion, and to see whether we can learn much from how Perl 6 does it.
23:38 * geekosaur would imagine p5 has a problem p6 does not:  massive amounts of bad existing code
23:39 sorear is this a "given" issue (people not expecting lexical $_ getting it), or a code complexity issue, or a "people use 'my $_' and it doesn't always work" issue?
23:53 grondilu $ perl6 --target=pir -e 'constant primes = grep &is-prime, 2 .. *;'
23:53 grondilu ===SORRY!===
23:53 grondilu Serialization Error: Unimplemented object type 'QRPA' passed to write_ref
23:53 skids joined #perl6
23:55 rjbs sorear: It was a big "given" issue, but now given localizes rather than lexicalizing.
23:55 rjbs sorear: Now the question is just: can the two live together happily?

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

Perl 6 | Reference Documentation | Rakudo