»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend!
Set by sorear on 4 February 2011.
rjbs But S32 says: 00:00
method seek(Int $position, Int $whence --> Bool)
00:00 adu left 00:01 adu joined
[Coke] our impl has the args backwards? whoops. 00:02
00:02 adu left
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
Wait, "make test" did nearly nothing. Do I want spectest or something?
00:04 adu joined
[Coke] test is core and some rakudo-only stuff. spectest runs roast. 00:04
(so yes, you usually want to run spectest)
rjbs Is roast the perl6 spec test?
It's cloning now... 00:05
"seek" does not appear in the spec tests.
I'm just going to provide a patch, I guess.
00:06 chee left 00:09 tokuhiro_ joined 00:11 chee joined, tokuhiro_ left 00:15 bluescreen10 joined 00:18 tokuhiro_ joined
[Coke] yes, roast == perl6 spec test suite (shared over all impls.) 00:18
(no seek) ok. a seek test patch to roast would also be awesome. :)
rjbs I'll start with getting my silly p5 program ported. :) 00:22
00:28 donaldh left, alester left
rjbs I have a subroutine x(Int $y) 00:31
I am passing calling it: x(4 / 1) which fails because that's a Rat.
How do I put the work of conversion into the signature rather than the invocation?
sorear Int() $y is ther current syntax, I think 00:33
TimToady but NYI
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) }
er, multi sub
rjbs Oh, that makes sense.
Rakduo accept pull requests? 00:35
TimToady dunno, they mostly work through rakudobug 00:36
rjbs I see others, filing github.com/rakudo/rakudo/pull/103 so I can wander off and bathe a small child!
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
rjbs Nah, using a multi makes me feel like I'm living in the future! 00:37
(as I port my little z-machine assembler to p6)
TimToady rjbs++ on the seek thing 00:38
sorear infocom?
rjbs sorear: Infocom
TimToady wasn't parrot gonna interpret those codes directly at one point?
rjbs Yeah, Dan S. and I talked about it. 00:39
way back when Dan S. was the guy who'd be talking about it
What's the constraint on buf elements? Posints?
TimToady depends on what you instantiate the Buf role with, in theory 00:40
sorear parrot interpreting z-machine codes? why?
TimToady don't think rakudo supports other than buf8
which I believe is unsigned
rjbs sorear: Presumably because it would be awesome.
Z-machine is a cute little mess, though. 00:41
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:42
+< is a cute-looking operator 00:48
sorear looks like something out of perldoc -f open 00:49
rjbs Ugh, don't remind me of open documenation!
sorear ? 00:50
rjbs Oh, bathtime. Back later, but I think I can get a z-machine hello world working tonight.
sorear: There's been a *lot* of mail about it lately, not all hug-laden.
sorear *makes up missing hugs, if wanted* 00:51
00:51 vaelxon left
rjbs gets kicked out of the bathroom by a five year-old, goes back to Vim. 00:52
00:56 jac50 left 00:57 jerome left
rjbs $str.chars returns an Int. $str.lines returns a List. I don't see how to do split ''. 01:02
How do I get a list of the characters in a string?
comb?
Yes, thanks, rjbs.
diakopter yw 01:04
01:06 baest left 01:07 tokuhiro_ left
rjbs spends several minutes unsure what the heck is going on with this code before realizing that | isn't a bitwise operator anymore. 01:07
01:10 anuby joined, jerome joined 01:17 colomon left, jerome left 01:18 hypolin joined 01:28 tokuhiro_ joined 01:31 jerome joined 01:34 adu left 01:40 hypolin left 01:41 hypolin joined 01:47 adu joined
rjbs rakudo: [1,2].^methods.sort 01:55
p6eval rakudo 5101a5: ( no output )
rjbs rakudo: [1,2].^methods.sort.say
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…
rjbs Why does "elems" appear twice (along with Str and some others) 01:56
?
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…
TimToady that's why
we autocoerce lists of one element to behave like lists 02:02
r: say 42.elems
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
rjbs Aha
thanks.
TimToady r: say [1,2].^mro
p6eval rakudo 5101a5: OUTPUT«Array() List() Iterable() Cool() Any() Mu()␤»
TimToady well, maybe it's not buggy
you're maybe just getting both Array and List .elems 02:04
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)␤»
TimToady errr
r: say [1,2].^methods».name.grep(* eq 'elems') 02:06
p6eval rakudo 5101a5: OUTPUT«elems elems␤»
TimToady r: say [1,2].^methods(:all)».name.grep(* eq 'elems')
p6eval rakudo 5101a5: OUTPUT«elems elems elems␤»
TimToady yeah, your'e just getting Array and List 02:07
rjbs Thanks.
02:09 census left
TimToady r: say [1,2].^methods(:local)».name.grep(* eq 'elems') 02:12
p6eval rakudo 5101a5: OUTPUT«␤»
TimToady or maybe it's List and Iterable
02:13 lustlife joined
TimToady r: say List.^methods».name.grep(* eq 'elems') 02:15
p6eval rakudo 5101a5: OUTPUT«elems elems␤»
TimToady yeah
r: say Iterable.^methods».name.grep(* eq 'elems')
p6eval rakudo 5101a5: OUTPUT«elems␤»
rjbs I have a hash in which the values are lists. I am mapping like this: my @zchars <== map { %for{ $_ } } <== $string.comb; 02:29
How do I flatten the entries into zchars? 02:30
02:30 tokuhiro_ left
rjbs I see unary | operator in S06, but Rakudo complains that &prefix:<|> is undefined. 02:32
TimToady use = instead of <== maybe?
unless it's returning arrays (you said lists) 02:33
rjbs They're probably Arrays, I'll add more says!
TimToady %for{ $_ }.list in that case
maybe
r: say flat ((1,2),(3,4)).lol 02:34
p6eval rakudo 5101a5: OUTPUT«1 2 3 4␤»
TimToady or maybe just use flat :)
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 ␤»
rjbs ^ surprises me.
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␤␤»
rjbs just found .^name! 02:41
diakopter n: my $x = 1; say "x is $x but \$x isa { $x.WHAT }"
TimToady rakudo: my $x = 1; say "x is $x but \$x isa { $x.WHAT.^name }"
p6eval niecza v24-23-g0520c7c: OUTPUT«x is 1 but $x isa Int()␤»
rakudo 5101a5: OUTPUT«x is 1 but $x isa Int␤»
rjbs Sorry, I'm not really *trying* to fill #perl6 with inane gropings tonight…
TimToady yes, remember that WHAT returns an "undef"
diakopter niecza doens't mind it 02:42
rjbs Okay, and .list solved the previous problem.
Woo!!
02:44 grondilu joined
rjbs dl.dropbox.com/u/88746/p6-z5.z5 02:45
grondilu just found out about github.com/perl6/perl6-most-wanted
rjbs This exciting Z-Machine program built with Perl 6.
grondilu what does WIP stands for in github.com/perl6/perl6-most-wanted ?
rjbs work in progress, usually
grondilu why SHA-256 is in the most wanted perl6 module list? There is an implementation in RosettaCode! 02:47
02:48 adu left
grondilu (which is also here: github.com/grondilu/libdigest-perl6) 02:48
02:51 FROGGS_ joined 02:53 FROGGS left
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:55
japhb notices the highlight 02:56
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:57
Which means, grondilu, that I invite you to *fix* the lists. :-) 02:58
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:00
03:01 erkan left
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:01
*were not at* 03:02
japhb returns to reading the day's backlog ... 03:03
03:07 adu joined 03:16 Targen joined
dalek rl6-most-wanted: 95e477f | grondilu++ | most-wanted/modules.md:
Update most-wanted/modules.md

added link to a pure implementation of SHA-256
03:17
03:25 vaelxon joined 03:29 orafu left, orafu joined 03:35 Fuad joined
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:42
[Coke] wonders if "two".chars could be optimized away at compile time. 03:45
TimToady it can if Str hasn't been declared to remain open by CHECK time 03:53
benabik And .chars is marked pure? Wouldn't want "foo".IO.open to happen at compile time. 03:54
(Or really just "foo".IO, now that I think of it.)
grondilu japhb: indeed. I hadn't noticed that. 03:57
04:06 xenoterracide left 04:07 mikemol left, vitaminmoo left, vitaminmoo joined 04:08 vitaminmoo is now known as Guest8774, mikemol joined 04:10 arlinius left 04:11 xenoterracide joined 04:13 Fuad left 04:44 census joined 04:47 preflex left, preflex_ joined 04:48 preflex_ is now known as preflex 04:56 census left 05:05 SamuraiJack joined 05:20 ilogger2 joined, ChanServ sets mode: +v ilogger2 05:21 _sri joined
TimToady looks like something is being done in UTF-32 05:21
05:22 baest joined, bloonix joined
lue that's what I was thinking, but I have no clue what. 05:22
s/what/why that is/
TimToady and my bug looks like it's trying to do something with UTF-8
well, David Warring, who's asking on p6u 05:23
05:23 Gothmog_ joined
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:24
lue Am I thinking wrong or is that UTF-32 printed little-endian? 05:29
geekosaur interestingly, the first character is not getting utf32'd 05:30
05:30 avar joined, avar left, avar joined
geekosaur hm, or I',m eading it backwards and it is but unexpetced endian, yeg 05:30
need to see the whole thing
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...
TimToady looks bigendian to me, 3 nulls and then a char 05:32
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
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
3 nulss and a [, that's big endian
*nulls
geekosaur leading char is esc
esc, nul, nul, nul, '[', ...
TimToady there's no escape there
lue in my window i see the box with 001B in it
TimToady just a left double-angle
geekosaur has ctrl chars visibilized, there is an <ESC> 05:35
lue r: say "OUTPUT«␀␀␀".ords;
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
TimToady u « 05:36
.u «
phenny U+00AB LEFT-POINTING DOUBLE ANGLE QUOTATION MARK («)
TimToady that's part of the OUTPUT quoting, not part of the data
geekosaur but immediately following that is an ESC
TimToady no escape shows up here 05:37
oh, maybe I just can't see it
geekosaur which my script is making visible as \u{241b} because it's not part of an ansi color escape
TimToady okay, then you're right, it's little-endian 05:38
geekosaur (being followed by NUL which is showing as \u{2400})
lue r: say ༺is it just the colon equals? (These brackets: 0F3A,0F3B)༻
p6eval rakudo 5101a5: OUTPUT«===SORRY!===␤Two terms in a row␤at /tmp/973maIJYKV:1␤------> say ⏏༺is it just the colon equals? (These bra␤ expecting any of:␤ argument list␤ prefix or term␤ prefix or meta-prefix␤ postfix␤ …
FROGGS morning
TimToady is occasionally the smartest person you'll ever meet, but not tonight... :)
lue I get the sneaking suspicion rakudo isn't handling the bidi-mirroring part of bracketing characters. 05:39
(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:40
TimToady well, the UTF-32 might be some kind of bot damage 05:45
05:49 census left
TimToady but yes, it seems to be a rakudobug, dunno if it's known 05:54
moritz it is 05:57
TimToady the bidi or the UTF-32? 05:59
06:10 hypolin joined
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:10
bonsaikitten rindolf: are you part of the tautology club too? ;) 06:19
rindolf bonsaikitten: I am a proud member of the tautology club on every day-of-the-month whose modulo with 1 is 0. 06:20
06:23 quester joined
labster would join the paradox club if this statement is false. 06:25
moritz the UTF-32 06:28
sorear is it a day ending in y?
TimToady they were asking about the bidi chars not working as quotes 06:29
sorear: not where moritz++ lives :) 06:30
06:31 kaleem joined 06:41 FROGGS joined, domidumont joined 06:44 sqirrel joined
lue testing I did on bidi brackets: gist.github.com/lue/4983621 06:45
good ♞, #perl6 o/ 06:46
TimToady o/
inside-out brackets are supposed to fail 06:48
07:12 domidumont left, fhelmberger joined 07:13 domidumont joined, fgomez joined
cotto We'll be resuming #parrotsketch tomorrow at 1930 UTC. Feel free to drop by. 07:18
07:21 b1rkh0ff joined 07:25 domidumont left
TimToady r: sub postfix:<!> ($n) { [*] 2..$n }; eval 'say 42!' 07:34
p6eval rakudo 5101a5: OUTPUT«1405006117752879898543142606244511569936384000000000␤»
diakopter nice
07:34 rindolf joined
diakopter r: { sub postfix:<!> ($n) { [*] 2..$n }; eval 'say 42!'; }; eval 'say 42!' 07:35
p6eval rakudo 5101a5: OUTPUT«1405006117752879898543142606244511569936384000000000␤===SORRY!===␤Two terms in a row␤at eval_1:1␤------> say 42!⏏<EOL>␤ expecting any of:␤ infix or meta-infix␤ infix stopper␤»
diakopter cool
TimToady r: my $nonconstant = 42; sub postfix:<!> ($n) { [*] 2..$n }; eval 'say $nonconstant!'; # just checking 07:36
p6eval rakudo 5101a5: OUTPUT«1405006117752879898543142606244511569936384000000000␤»
TimToady \o/
was worried that constant folding was helping, though our routine isn't declared pure, I guess
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()
p6eval rakudo 5101a5: OUTPUT«1405006117752879898543142606244511569936384000000000␤» 07:38
TimToady current language *should* be lexically scoped
but it's a good test :)
fortunately, current language is carried in the parser cursor, so it's unlikely to get lost 07:39
in theory one could 'use Ruby;' at the top and then eval would assume Ruby code 07:40
in essence, the lexical scope surround an eval serves as the eval's "setting" 07:41
07:41 rindolf left, rindolf joined
TimToady so it's really the same thing as saving the YOU_ARE_HERE 07:41
07:43 ObseLeTe joined 07:49 rindolf left, quester left, rindolf joined 07:52 hypolin left 07:58 rindolf left, rindolf joined 08:06 domidumont joined, hypolin joined 08:07 domidumont left 08:08 domidumont joined, rindolf left 08:09 rindolf joined 08:16 rindolf left, rindolf joined
FROGGS jnthn: would it be okay if I put that sequential-matching-switch-feature in nqp too? 08:23
08:26 rindolf left, rindolf joined 08:34 fgomez left 08:35 rindolf left 08:36 rindolf joined 08:38 kresike joined
kresike hello all you happy perl6 people 08:39
08:41 am0c joined 08:43 fgomez joined
FROGGS hi kresike 08:52
kresike hello FROGGS o/ 08:53
rindolf Hi kresike
FROGGS: hi.
FROGGS, kresike : what's up?
kresike rindolf, the ceiling, airplanes, a bunch of air, clouds ... that sort of things ☺ 08:56
rindolf kresike: www.shlomifish.org/humour/fortunes/...t-chuck-35
FROGGS hi rindolf 08:57
rindolf FROGGS: what's new?
kresike lucky you're not CN then ☺
08:57 rindolf left, rindolf joined 08:59 marloshouse joined
FROGGS rindolf: this gist.github.com/FROGGS/4984189 09:00
rindolf FROGGS: ah, Rakudo? 09:02
FROGGS and nqp, yes 09:03
09:08 Chillance joined
rindolf FROGGS: ok. 09:08
FROGGS: nice.
09:12 domidumont left, domidumont joined 09:17 labster joined
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:33
moritz Rakudo is the only Perl 6 compiler usin nqp or pir 09:36
09:36 spider-mario joined
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
but I guess that's obvious, so maybe I misunderstood your question?
diakopter I think he's asking if someone could emulate all the nqp:: and pir:: ops 09:37
via a package
timotimo yes, that's it
i mean stuff like sub nqp::existskey(%h, $k) { return %h{$k} :exists } and so on 09:38
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
because nqp:: stuff are low level operations
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
timotimo well, all i wondered was if nqp is, besides the nqp:: and pir:: packages, a strict subset of perl6
i admit the question was weird
diakopter all the nqp ops *are* the nqp runtime 09:41
moritz no, it's not a strict subset
for example arithmetic with large integers will give you overflows 09:42
but Perl 6 specs bigint behavior
diakopter also it has funny things calls knowhows with "is repr"
*called
moritz and it's missing stuff like automatic *% in method signatures 09:43
FROGGS nr: my @a = <x xxxxxx xxx>; say "xxxxxxxxx" ~~ / @a /
p6eval niecza v24-23-g0520c7c: OUTPUT«「xxxxxx」␤␤»
..rakudo 5101a5: OUTPUT«#<failed match>␤»
FROGGS n: my @a = <x xxxxxx xxx>; say "xxxxxxxxx" ~~ / | @a / 09:44
p6eval niecza v24-23-g0520c7c: OUTPUT«「xxxxxx」␤␤»
FROGGS n: my @a = <x xxxxxx xxx>; say "xxxxxxxxx" ~~ / || @a /
p6eval niecza v24-23-g0520c7c: OUTPUT«「xxxxxx」␤␤»
diakopter nqp: knowhow foo is repr('P6int') { say(4) }
p6eval nqp: OUTPUT«4␤»
diakopter std: knowhow foo is repr('P6int') { say(4) }
p6eval std 7551b8f: OUTPUT«ok 00:00 44m␤»
FROGGS n: say 'foobar' ~~ /@( <a b c o> )+/
p6eval niecza v24-23-g0520c7c: OUTPUT«「ooba」␤␤»
diakopter urp
09:45 bbkr joined
diakopter ohh.. didn't know std and rakudo knew about knowhows 09:45
moritz knowhows are specced, iirc
ruoso++'s influence, at least in part 09:46
09:51 daxim joined
timotimo "and it's missing stuff like automatic *% in method signatures" - how would that violate the "subset" thing, though? 09:51
a friend is wondering why the rakudo team doesn't strive to make perl6 self-host
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
timotimo either of us is confused at the moment. i'm not 100% convinced it's me
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
er.
arnsholt s/not //
moritz self-hosting is necessary, which is why we do so much stuff in NQP
arnsholt Two different ways to say the same thing collided I think 09:58
moritz but that's just partial self-hosting
one problem is really speed
Perl 6 code compiled by rakudo simply isn't fast enough to self-host more
arnsholt Yeah. Self-hosting compilers are cool and everything, but it's only useful as far as it makes the developers' life easier
FROGGS this project might be interesting there, right? github.com/swarley/nqp-go
moritz FROGGS: it surely is
FROGGS is go as fast as C ? 09:59
moritz and compiling rakudo's setting is already painfully slow (IMHO)
diakopter moritz: personal question, I guess - will you use rakudo-jvm when it exists?
moritz diakopter: I guess I will 10:00
I use niecza and rakudo-on-parrot, there's no reason not to use rakudo-on-jvm
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
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
and toying with the optimizer was just way too much fun :-) 10:02
timotimo have you ended up doing more than compile-time evaluation? 10:04
perl6 disappeared from my attention for a few days 10:05
10:06 hypolin left
arnsholt I was pondering the "unicode character names" thing before falling asleep last night 10:06
Think I might do it =) 10:07
timotimo does that mean a regex on the name of a unicode character? :D
arnsholt Nah. A simple trie class that does the <String, Character> map, essentially 10:08
nwc10 does ICU offer "unicode character name" lookup?
if so, how?
arnsholt And a bit of logic to build the DB and store/load to disk
Yeah, Parrot pulls in ICU to do Unicode processing, so that's how NQP-parrot does it 10:09
But jnthn said yesterday that he'd rather not pull in all of ICU just for the lookup tables
moritz timotimo: well, compile time warnings and code elimintation
nwc10 OK, but I meant, can you steal the approach ICU uses?
moritz r: my $x = 42; $x; say $x;
p6eval rakudo 5101a5: OUTPUT«WARNINGS:␤Useless use of variable $x in sink context (line 1)␤42␤»
nwc10 in particular
arnsholt That's probably a good idea, yeah =) 10:10
nwc10 there are about 24,000 individually named code points
timotimo moritz: that does sound nice
arnsholt The name database is distributed via unicode.org AFAIK
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
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
and those aren't in the file UnicodeData.txt 10:12
nwc10 has been looking at where Perl 5 does it
arnsholt Interesting
10:12 dakkar joined
nwc10 lib/unicode/Name.pm 10:12
arnsholt I'll go look at ICU when I get a chance, in that case. Thanks!
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
arnsholt Also, Perl 5
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;
p6eval rakudo 5101a5: OUTPUT«===SORRY!===␤Variable '$principle' is not declared. Did you mean '$principal'?␤at /tmp/RrQA1u1pEP:1␤------> ipal = 327.68; my $interest = $principle⏏ * $rate;␤ expecting any of:␤ postfix␤»
tadzik could someone with blogs.perl.org account comment on blogs.perl.org/users/brian_wisti/20...6-02.html? 10:14
diakopter what kind of comment do you want? [note: I don't have an account there] 10:19
tadzik explain our " 10:20
(damnit, return key)
explain our "did you mean $principal" feature 10:21
timotimo > '2' - 1' # whoops? 10:25
but yes, that feature should be pointed out at him (said the implementor with a bit of pride in his voice^Wfingers) 10:26
tadzik well volunteered! 10:27
timotimo i don't have such an account either
arnsholt An excellent time to create one! =) 10:28
timotimo oh, i can login with openid
i think a google account gives one an openid, too
arnsholt Yup 10:29
I can never remember how to actually -use- it, but Google provides OpenID
timotimo tries to figure out 10:30
10:30 wk joined 10:35 domidumont left
timotimo big meh. 10:36
10:38 domidumont joined 11:07 erkan joined, erkan left, erkan joined 11:33 brrt joined 11:39 colomon joined
colomon o/ 11:39
11:43 labster left
FROGGS hi colomon 11:43
11:43 kaleem left 11:45 xinming_ joined
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:53
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
that may be the right thing for you?
11:56 fireartist joined
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:56
fireartist rakudo: DateTime.now.delta( 15, seconds ); 11:57
p6eval rakudo 5101a5: ( no output )
FROGGS colomon: in case you are a windows guy, dell workstations and tower servers might be a good option 11:58
www.dell.com/content/topics/segtopi...amp;s=soho
fireartist is DateTime.delta() working on rakudo? it gives me an error "Undeclared routine: seconds"
timotimo he did say "linux boxes"
FROGGS ohh, yeah
-.-
timotimo :)
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;
p6eval rakudo 5101a5: OUTPUT«===SORRY!===␤Variable '$principle' is not declared. Did you mean '$principal'?␤at /tmp/EAOgulOT4b:1␤------> ipal = 327.68; my $interest = $principle⏏ * $rate;␤ expecting any of:␤ postfix␤»
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
Like building Rakudo. ;)
12:00 SmokeMachine joined
timotimo oh, whoops :) 12:00
FROGGS colomon: I'd buy the parts separately, you get a lot for 500€
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
FROGGS there are mainboards with 12 SATA ports, and two or more NICs
r: say 500 * 1.3 ~ '$' 12:02
p6eval rakudo 5101a5: OUTPUT«650$␤»
FROGGS timotimo: € is just a unit :o)
timotimo :) 12:05
at that point where you get "lots of ram", you might want to start thinking about ECC
FROGGS depends if "lots of ram" is more than eight or sixteen 12:06
the problem with ECC is mainboard and ram prizes 12:07
timotimo indeed
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:28
colomon is old enough that putting together a machine from pieces to save $1000 no longer seems like a win. 12:29
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:31
12:32 domidumont left
colomon FROGGS: I've built several in the past, but it always seemed like a PITA 12:32
12:32 domidumont joined 12:33 pmurias joined
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:34
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:36
moritz even for people who earn a salary, 1k dollars is a still a lot of money 12:37
brrt well, not for everyone's salary apparantly ;-) 12:38
moritz right, just for the average and the median :-)
brrt but assembling is fun isn't it?
diakopter kids are exhausting
moritz they can be, totally :-)
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 ... >_<
moritz in NUMA systms, RAM swaps you! :-) 12:40
brrt ~10 kids :-o wow
(go figure many mammals have that many kids every year)
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:42 pmurias left
FROGGS colomon: true 12:43
colomon should perhaps note that the contract bringing in that sort of money is nowhere near fulltime
brrt yeah, thats an important point
diakopter colomon: but that also means you must value your #perl6 at greater than $100/hr :)
*#perl6 time 12:44
brrt otherwise you'd make over 200k a year
FROGGS colomon: I can send you my CV if you want *g*
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
12:48 kcwu joined 12:49 Naamah joined, Naamah left
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:51
12:53 sqirrel left
brrt bleh, that becomes difficult fast 12:55
guess we use heuristics for a reason
timotimo brrt: those were obviously not my own kids ;) - i did the mandatory civil service in a kindergarten 12:56
brrt that probably wouldn't fly where i live, they would go 'hey whatcha doing with all those kids' 12:57
was it fun? i can imagine it being fun
timotimo it was challenging and exhausting ;) 12:58
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
i remember coming home every day after work and not being capable of doing any activity that was remotely non-passive
brrt well, you live and you learn
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:00
diakopter timotimo: where do you live that you must do civil service? 13:02
FROGGS germany
timotimo yes, either military or civil service
FROGGS but that's past
diakopter only 2 months?
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
and 10 months civil service, it got reduced and then cancelled
diakopter it's 2/3 years (F/M) in Israel 13:04
FROGGS wow
diakopter 2 years for women, 3 years for men
brrt pff 13:05
in the netherlands we only have military service
but
timotimo yeah, it was before 2011, so i believe i did 9 months
diakopter only military in Israel
brrt you don't actually have to shift
show up
moritz well, Israel is in a peculiar situation
brrt unless there is a war or something
which is obviously constant for israel
(sadly, i might add) 13:06
13:06 pmurias joined
brrt do you really have to go and enter the military in {germany, israel}? 13:07
diakopter en.wikipedia.org/wiki/Israel_Defens...ar_service
FROGGS brrt: no, there is no duty anymore to do that in germany since 2011 13:08
arnsholt Norway still has military service (sort of) 13:09
Although relatively few people are chosen every year to actually go do it
brrt should look it up 13:10
for the netherlands, i recall getting a scary looking letter
diakopter USA 18-y.o. males are required to sign up for military conscription in case it becomes 'necessary'
brrt that is similar to the dutch case; since 1997 we don't have to show up anymore 13:11
although we are officially conscripted
civil service was never implemented 13:12
13:20 fireartist left 13:25 huf joined 13:45 benabik joined 13:49 ObseLeTe left 13:50 kaleem joined
pmurias jjjjjjjjjjjjjk 13:53
hoelzro Vim user? ;) 13:54
timotimo well, nowadays a crapton of programs support hjkl navigation 13:57
most of the google web-apps, for instance
14:00 uvtc joined 14:02 brrt left
uvtc colomon: if you're in the States, maybe look at laclinux.com/gnu/GNU_Linux_Computers . I've nothing to do with them, but bought a laptop from them a while back. 14:02
Would buy from them again. 14:03
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
timotimo may i present to you: git push -n? 14:10
arnsholt Right, that'll work
timotimo well, not quite the solution i suppose
[Coke] moritz: git rev-parse --symbolic-full-name @{u} ?
14:11 PacoAir joined
sjn moritz: would it help to graph the git log? 14:11
timotimo haha, yikes, that's quite a mouthful (of keys?)
sjn moritz: e.g. git log --graph --decorate --pretty=oneline --abbrev-commit --all
14:11 baramine joined
moritz [Coke]: thanks 14:12
sjn: only if the local and the remote branch are in sync 14:13
(afaict)
14:15 PacoAir left, PacoAir joined 14:21 Psyche^ joined 14:22 bluescreen10 joined 14:23 Psyche^ is now known as Patterner 14:24 cogno joined
[Coke] moritz: lucky find on stack overflow. 14:26
14:26 benabik left
[Coke] ... shoudl have upvoted it while I was there. 14:26
gah, meetings begin. 14:27
14:27 benabik joined, domidumont left
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:28
14:28 cogno left
dalek rl6-most-wanted: 433f358 | (John Gabriele)++ | README.md:
Added editing tip to README
14:31
14:32 baramine left 14:33 domidumont joined, domidumont left 14:35 domidumont joined
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:39 benabik left 14:44 b1rkh0ff left 14:45 b1rkh0ff joined 14:49 benabik joined 14:51 benabik_ joined, benabik left, benabik_ is now known as benabik
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:53
14:53 rindolf left
moritz that's also interesting, yes 14:55
FROGGS Local branch configured for 'git pull':
nom merges with remote nom
nice
14:57 stopbit joined 14:58 JimmyZ joined 14:59 rindolf joined 15:01 skids joined
FROGGS phenny: ask jnhtn for his +1/-1 to gist.github.com/FROGGS/4984189 15:02
phenny FROGGS: I'll pass that on when jnhtn is around.
15:02 FROGGS left 15:04 domidumont left, domidumont joined 15:08 bluescreen10 left 15:09 bluescreen10 joined
dalek rlito: c03fefd | (Flavio S. Glock)++ | TODO-perlito5:
Perlito5 - update syntax TODO
15:09
15:10 FROGGS[mobile] joined, brrt joined 15:14 kaleem left 15:15 FROGGS[mobile] left 15:20 benabik left
moritz masak: this might interest you: twistedoakstudios.com/blog/Post2540...sion-trees real world usage of codegen through AST-like API ("expression trees") 15:22
15:23 Tedd1 joined
brrt deep perl6 hackers, i was wondering about something 15:25
suppose sixparrot / jvm / whatever rakudo rakudo gets to run on gets to have a 'release' instruction
or 'free' if that is more familiar :-) 15:26
timotimo oooh those links to blizzard crypto are amusing
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?
i.e. i have a routine: sub foo { my $bar = quix(); $bar.quam(42); return $bar.baz } 15:27
15:28 fgomez left
brrt even though $bar wouldn't be 'created' in the routine, suppose quix() did create a new one 15:28
we could free $bar right away
JimmyZ doesn't think it would be 15:31
brrt hmm 15:33
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
free bar is no object of course
to bad
15:35 benabik joined
JimmyZ But, I think freeing object is what GC is doing 15:36
brrt yes, but
a): most objects die young
JimmyZ I.E generation GC
brrt b): generational gcs are ehm, usually, compacting GC, and that is / can be a problem in multithreaded enviroments 15:37
15:37 cogno joined
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
timotimo don't know if it applies here.
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.
It's just that generational collection is useful for compacting.
brrt but that surely also depends on whether a global reference is taken
benabik, i guess that is true 15:39
JimmyZ brrt: pdf.aminer.org/000/546/121/a_concur...ion_of.pdf
brrt they tend to be hilariously complex
i'll look the article up 15:40
JimmyZ GC is always fun topic
benabik Copying/compacting GCs add a significant amount of complexity, since they have to update references. Multithreaded GC adds complexity as well.
Although the easiest solution to concurrent GC is "don't".
Create points for every thread to stop, do GC, then let everyone start again. 15:41
15:41 xinming_ left
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
brrt but a): it lets object lives for at least two generations and b): it is mark and sweep
but thanks for that article :-) 15:43
JimmyZ saws a nice pdf: Very Concurrent Mark-&-Sweep Garbage Collection without Fine-Grain Synchronization doc.cat-v.org/inferno/concurrent_gc...ent_gc.pdf 15:44
brrt exactly that one
brilliant idea, came to it via whiteknight++
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
15:45 FROGGS joined
brrt you assign to each thread a color based on an epoch 15:45
the mutator allocates data and tags it with COLOR(epoch)
the marker traces all reachable data and changes the tag from COLOR(epoch-1) to COLOR(epoch) 15:46
the sweeper cleans all data tagged with COLOR(epoch-2)
benabik Mark has to finish before updating the epoch?
brrt every so often, you sync up and update epoch
yes
benabik Fascinating.
brrt it is brilliant 15:47
it is just not very fast
mostly due to the fact that a): garbage lives for 2 generations and b): it is mark and sweep
thus, i was wondering if escape analysis could help it out somewhat :-)
FROGGS phenny: ask jnthn for his +1/-1 to gist.github.com/FROGGS/4984189 15:48
phenny FROGGS: I'll pass that on when jnthn is around.
15:48 colomon_ joined
FROGGS moritz: from you too? # I'm always a bit nervous about these commits... Can't wait to push ó.ò 15:49
colomon_ 's MBP is booting again! o/ 15:51
GlitchMr .u ć
phenny U+0107 LATIN SMALL LETTER C WITH ACUTE (ć)
benabik I've always found Immix GC interesting, but it's not concurrent. cs.anu.edu.au/techreports/2007/TR-CS-07-04.pdf
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
15:53 xinming joined
brrt obviously you can always optimise and what not 15:53
the jvm has a hilariously complex machine called G1
moritz FROGGS: that code is by far not my area of expertise, so I'd like to defer to jnthn
FROGGS moritz: k, np 15:54
pmurias brrt: have you seen the various tricky types Rust uses to reduce the amount of gc? 15:56
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
moritz benabik: you mean, besides "head explodes"? :-)
brrt i have heard that gc is optional
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
upgrade.www.toshibadirect.com/td/b2c/cdetla...2000044488
phenny ggoebel: I'll pass that on when colomon is around.
15:58 mtk joined
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
moritz: Head exploding is a general issue of GC implementation as far as I can tell.
colomon_ ggoebel: thanks!
brrt :-)
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 15:59
15:59 cogno left 16:02 daxim left, kresike left, xinming left 16:07 xinming joined 16:16 kresike joined, shinobicl joined 16:17 JimmyZ left 16:18 Tedd1 left, Tedd1 joined 16:20 ggoebel_ joined 16:21 xinming_ joined, xinming left
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
ggoebel colomon: sorry in my excitement to share... I overlooked the headless and linux parts :-( 16:28
brrt off 16:29
16:30 brrt left 16:31 bluescreen10 left 16:33 wk left 16:34 colomon_ left 16:36 Yappocall_ left 16:37 krunen joined 16:39 domidumont left
kresike bye folks 16:40
16:40 kresike left 16:41 bloonix left
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:42
timotimo anything in particular you had in mind? 16:47
FROGGS ya, tell us
shinobicl well... for starting... having a similar interface for packages on perl6 (or perl5) like a "translator" for maven artifacts to CPAN, 16:51
or just taking maven's specification completely and using it on perl6
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:52
16:53 benabik left
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
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
shinobicl i thogth about that also, so, why not take maven's approach and use it on perl6? 16:56
16:59 Tedd1 left
jlaire someone's actually recommending maven? I'm amazed :) 16:59
16:59 Tedd1 joined
[Coke] if you're coming from a java shop, it makes sense. 17:01
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.)
shinobicl well... i'm somewhat new in java. I prefer perl... always
[Coke] (same way we might end up with something that can speak junit)
shinobicl: anyway, tuits are tight. I'm not sure anyone is going to put them into maven at the moment. 17:03
shinobicl oh well.. i was just wondering if someone had plans for META.info 17:05
17:06 pmurias left
FROGGS well, I had and have, but only add one or two fields to fulfil the spec 17:06
17:07 uvtc left 17:08 SunilJoshi joined
[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
17:09 dukeleto joined 17:15 cogno joined 17:18 cogno_ joined 17:20 cogno left 17:22 domidumont joined 17:23 Yappocall_ joined 17:26 SunilJoshi left
[Coke] realizes we can call the new trek move STD. 17:26
FROGGS trek movie?
17:27 bloonix joined 17:30 cogno_ left
jnthn evening, #perl6 17:30
phenny jnthn: 15:48Z <FROGGS> ask jnthn for his +1/-1 to gist.github.com/FROGGS/4984189
FROGGS stra trek into darkness?
hmmm
hi jnthn
17:31 am0c left 17:32 aMiloia joined
jnthn r: say Capture ~~ Positional 17:33
p6eval rakudo 5101a5: OUTPUT«False␤»
jnthn FROGGS: It ended up as a fairly small patch :) 17:35
17:36 aMiloia left, aMiloia joined
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 perl6: say 3;
17:36 SunilJoshi joined
p6eval rakudo 5101a5, niecza v24-23-g0520c7c: OUTPUT«3␤» 17:36
jnthn FROGGS: The one comment added is valid, but not a big deal :) 17:37
dalek p/target-pbc: 679cac2 | (Gerhard R)++ | src/HLL/Compiler.pm:
Migrate to new PackfileView API
17:38
p/target-pbc: b7d0122 | (Gerhard R)++ | src/NQP/World.pm:
Rename $main to $mainline to avoid confusion
shinobicl rakudo: my @a; my Int @b; say @a ~~ @b;
p6eval rakudo 5101a5: OUTPUT«True␤»
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;
p6eval rakudo 5101a5: OUTPUT«False␤»
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:40
shinobicl rakudo: my Int @a = (1,2); my Str @b = (1,2); say @a ~~ @b; 17:41
p6eval rakudo 5101a5: OUTPUT«True␤»
shinobicl ok, i see. How do i check the types instead? besides comparing the output of .WHAT ? 17:42
17:42 aMiloia left, aMiloia joined
jnthn Note that typed arrays are not 100% there implementation wise yet. 17:42
The .of property tells you what I think you're after.
r: my Int @a; say @a.of 17:43
p6eval rakudo 5101a5: OUTPUT«Int()␤»
jnthn r: my @a; say @a.of
p6eval rakudo 5101a5: OUTPUT«Mu()␤»
17:43 dukeleto left, dukeleto joined
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
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, shlomif left
shinobicl and stuff like this: 17:47
rakudo: my Int @a = <1 2>; say @a.perl;
p6eval rakudo 5101a5: OUTPUT«Array+{TypedArray}.new("1", "2")␤»
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
[Coke] I'm not sure if I would expect an error, or a coercian if one was possible. 17:52
*coercion
17:55 kaare_ joined
[Coke] colomon: still getting a bunch of failures in niecza's daily run, FYI. 17:55
colomon: gist.github.com/coke/4988227 17:56
17:58 cogno left 17:59 am0c joined
skids std: my Int(Str) @a; 18:00
p6eval std 7551b8f: OUTPUT«ok 00:00 42m␤»
skids That I would expect to coerce. The other perhaps not.
18:05 cognominal joined 18:11 marloshouse left 18:14 xinming_ left 18:16 xinming joined 18:19 mtk left 18:25 dakkar left, dukeleto left, dukeleto joined 18:27 wk joined, gdey joined, SunilJoshi left 18:32 mtk joined 18:41 jaldhar joined 18:42 xenoterracide joined, fhelmberger left 18:44 awwaiid joined
colomon [Coke]: thanks for the heads up 18:47
18:49 census joined 18:56 benabik joined, jaldhar left 18:57 proller joined 18:59 jaldhar joined 19:00 dukeleto left, dukeleto joined
[Coke] blogs.perl.org/users/brian_wisti/20...l6-02.html - hey, something else showed up in my perl6 google news filter. 19:06
(usually it's one link a day, to this backlog)
19:07 rindolf left, rindolf joined
dvj perl6: class b { has $.a; method a() {say "hello"; } }; b.new.a 19:07
p6eval niecza v24-23-g0520c7c: OUTPUT«===SORRY!===␤␤Two definitions of method a (see line 1) at /tmp/C2c4X6Ej7w line 1:␤------> class b { has $.a; method a⏏() {say "hello"; } }; b.new.a␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/C… 19:08
..rakudo 5101a5: OUTPUT«hello␤»
dvj who is correct? :)
19:08 shinobicl left
FROGGS dvj: I believe niecza 19:08
because has $.a gives you a public method too 19:09
[Coke] perl6 gives suggestions on variable names, but not in the REPL.
er, rakudo.
pmichaud Rakudo is correct there, I think. 19:10
19:10 shinobicl joined, shinobicl left
pmichaud The accessor method is generated only if there's not an explicitly declared one. 19:10
19:11 Harzilein joined
Harzilein hi 19:11
FROGGS ahh, there is the missing piece of the puzzle :o)
pmichaud: thanks!
Harzilein how can i add type constraints for a slurpy parameter?:
pmichaud Harzilein: it has to be done with a where clause, I believe.
19:12 sdvsedfav joined
GlitchMr git is so fun 19:17
Or rather, GitHub
I've pressed "Fork" on some repository, waited 5 minutes and it's still forking. 19:18
FROGGS hehe
GlitchMr github.com/GlitchMr/fish-shell
Here is the repository
19:19 cognominal left
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:19
19:19 sdvsedfav left
GlitchMr oh... lol 19:20
I've used Automatic Page Generator to generate gh-pages branch.
After doing that, the repository was forked successfully.
Harzilein guess there's a nicer way to write this, which would also work, this here doesn't:
sub mySub($scalar, @array, *@theRest where { $_ ~~ Int for 0..(@_.elems-1) }) { say "the rest were: " ~ @theRest; }
19:20 dfvevbeb joined
benabik Fish's documentation points to fishshell.org, which appears to be a Japanese domain holding page. 19:20
GlitchMr Try fishshell.com/ 19:21
fishshell.org isn't working anymore.
grondilu jnthn: can NativeCall be used with C++? 19:26
(assuming not too complicated classes I guess) 19:27
19:27 cognominal joined
GlitchMr I think it works with extern "C" {} 19:27
But I'm not sure
19:27 ElDiabolo joined, dfvevbeb left 19:28 dvba joined 19:29 dvba left
dalek p: f8a37df | (Tobias Leich)++ | / (4 files):
add sequential array interpolation switch

Arrays in regexes will match sequential if preceded by ||.
19:31
19:32 dvba joined 19:33 japhb_ joined, shinobicl joined 19:37 fgomez joined
dvj does perl6 have loop labels, for example - first: while (expr) { for (expr) { redo first; } } 19:37
?
PerlJam dvj: Perl 6 does, but I don't think any of the implementations do. 19:38
dvj ok
moritz n: foo: for <a b c> { last foo if /b/; .say }
p6eval niecza v24-23-g0520c7c: OUTPUT«a␤»
moritz niecza++ does
[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␤»
PerlJam sorear++ 19:41
19:41 dukeleto left, dukeleto joined, dvba left 19:42 fvfddgb joined 19:52 fvfddgb left, asdfghjk joined 19:57 am0c left
Harzilein hmm 19:59
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
cp: cannot stat `obj/Run.MAIN.exe': No such file or directory
[...]
20:03 asdfghjk left
Harzilein oops 20:03
no, that's actually right. 20:04
20:04 cwDVCWE joined
Harzilein ah, it works if i specify --obj-dir 20:04
:)
hmm 20:09
or it doesn't... argh
20:10 aMiloia joined, aMiloia left 20:13 cognominal left
Harzilein paste.debian.net/235684 20:15
moritz Harzilein: try providing an absolute path to the object dir 20:17
20:17 cognominal joined
dalek kudo/nom: 8e6fa0b | (Tobias Leich)++ | / (3 files):
add array in regex interpolation feature

Arrays withinn regex will be treated as alternations of its elements. Preceding | or || will change its behaviour, || means sequential alt- ernation and | LTM, while the LTM is just a basic approach and needs tweeking.
20:18
Harzilein moritz: MAIN.exe _does_ get created now, i just can't run it
moritz Harzilein: any reason not to try it with an absolute path? 20:19
Harzilein i did, same result
moritz ok
Harzilein the exe is not missing, it just lacks an entry method as per the error message
dalek ast: f7dd35f | (Tobias Leich)++ | S05-metasyntax/longest-alternative.t:
array interpolation support was added to rakudo
20:21
20:21 benabik left
Harzilein boiled it down to two lines now: 20:22
harzi@relax:~/niecza$ mono run/Niecza.exe --obj-dir "$PWD/obj" -c -e 'say "Hello World"'
harzi@relax:~/niecza$ mono obj/MAIN.exe
results in
The entry point method could not be loaded 20:23
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 cwDVCWE left, fjtryjyjryjrxtht joined 20:25 benabik joined 20:28 domidumont left
dalek kudo/agressive-sink-warnings: 80f788b | moritz++ | src/Perl6/Optimizer.pm:
Warn when pure expressions are used in sink context

even if the arguments are not constant, or the expression warns. By explicit request from TimToady++ at
  irclog.perlgeek.de/perl6/2013-02-18#i_6469204
20:32
kudo/agressive-sink-warnings: 2f210be | moritz++ | src/Perl6/Optimizer.pm:
awesomify sink context warning text
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
dalek ast: c8c32d7 | (Tobias Leich)++ | S05-interpolation/regex-in-variable.t:
array interpolation support added to rakudo
moritz [Coke]: I usually warn that I'm agressive towards teletubbies
[Coke] "One day, in teletubby land, it was Po's turn to wear the skirt." -actual line of dialog.
hurm. not dialog. monologue/voiceover close enough. :) 20:35
swarley lol 20:36
The baby sun from that show always scared me
Harzilein :D
benabik That show always scares me. Had a friend whose baby brother regressed to baby talk after watching that show for a while. 20:37
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?
diakopter has for many years. Windows 8 Enterprise and Server 2012, today. just enable the "Subsystem for UNIX-based Applications" 20:40
dism.exe /Online /Enable-Feature /Featurename:SUA 20:41
20:42 census_ joined, colomon left, census left 20:43 colomon joined
colomon std: $/ = "hellO" 20:43
p6eval std 7551b8f: OUTPUT«===SORRY!===␤Unsupported use of $/ variable as input record separator; in Perl 6 please use the filehandle's :irs attribute at /tmp/py4EckVAqX line 1:␤------> $/⏏ = "hellO"␤Parse failed␤FAILED 00:00 41m␤»
colomon rn: $/ = "hello"
p6eval niecza v24-23-g0520c7c: OUTPUT«===SORRY!===␤␤Unsupported use of $/ variable as input record separator; in Perl 6 please use the filehandle's :irs attribute at /tmp/1WvR4tBoKu line 1:␤------> $/⏏ = "hello"␤␤Parse failed␤␤»
..rakudo 5101a5: ( no output )
colomon should that work or not? subst.t is assigning to $/ and it makes niecza very unhappy. 20:44
dalek ast: 4cf643f | (Tobias Leich)++ | S05-metasyntax/litvar.t:
hashes not allowed in regexes
20:45
ast: 7f3ef46 | (Tobias Leich)++ | S05-metasyntax/litvar.t:
subscript of @var[0] is treated as regex

So @var[0] is two regex rules, an alternation of the array elements, and another alternation [0].
diakopter [Coke]: Microsoft bought Interix in 1999; it's been free for Windows since 2002, and bundled with Windows since 2005
dalek ast: 94bdf51 | (Tobias Leich)++ | S05-metasyntax/litvar.t:
array in regex does work now
20:45 dvb joined
diakopter [Coke]: was originally named OpenNT in 1996 20:46
20:46 Yappocall_ left
moritz std: $/ = "foo"; 20:46
p6eval std 7551b8f: OUTPUT«===SORRY!===␤Unsupported use of $/ variable as input record separator; in Perl 6 please use the filehandle's :irs attribute at /tmp/KdiIjJynCF line 1:␤------> $/⏏ = "foo";␤Parse failed␤FAILED 00:00 41m␤»
FROGGS [Coke]: already Windows NT 3.51 had a perl on the tools CD AFAIK
moritz [Coke]: seems that niecza is correct
colomon moritz: you mean colomon, and I already knew STD didn't like it. I'm just trying to confirm STD is correct. :) 20:48
20:48 fjtryjyjryjrxtht left 20:49 dvb left
dalek ast: e452149 | (Tobias Leich)++ | S05-metasyntax/litvar.t:
test for junctive/sequential semantics
20:51
ast: abc7725 | (Tobias Leich)++ | S05-metasyntax/litvar.t:
test for array contextualizer
ast: 0c6083f | (Tobias Leich)++ | S05-metasyntax/sequential-alternation.t:
unfudged seq.-array tests
20:53
PerlJam had forgotten just how long a "make spectest" can take 20:57
FROGGS seven minutes? 20:58
PerlJam longer on my system.
colomon n: "-" ~~ /.*/; say $/.perl
p6eval niecza v24-23-g0520c7c: OUTPUT«#<match from(0) to(1) text(-) pos([].list) named({}.hash)>␤»
colomon n: "-" ~~ /.*/; say ~$/;
p6eval niecza v24-23-g0520c7c: OUTPUT«-␤»
FROGGS nr: say "-" ~~ /.*/ 20:59
p6eval rakudo 5101a5, niecza v24-23-g0520c7c: OUTPUT«「-」␤␤»
FROGGS I like these edges
colomon rn: "a".subst(/a/, "b"); say $/; 21:00
p6eval rakudo 5101a5: OUTPUT«「a」␤␤»
..niecza v24-23-g0520c7c: OUTPUT«Any()␤»
21:01 rindolf left
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…
..rakudo 5101a5: OUTPUT«Cannot assign to a non-container␤ in sub infix:<=> at src/gen/CORE.setting:12440␤ in block at /tmp/y6rbXFH9Qi:1␤␤»
colomon rn: my $a = "a"; $a ~~ s/a/b/; say $/
p6eval rakudo 5101a5, niecza v24-23-g0520c7c: OUTPUT«「a」␤␤» 21:06
21:06 rindolf joined 21:07 rindolf left
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:07
FROGGS well, $/ gives you the last regex match, and since .subst(Regex, Str) does that... 21:08
there was an RT ticket about that
21:08 SmokeMachine left 21:09 rindolf joined
jnthn back 21:09
21:09 rindolf left 21:11 rindolf joined
colomon FROGGS: .subst always does a match, whether it's a Regex there or not. 21:11
21:12 rindolf left, rindolf joined, rprajapa joined
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 @ …
..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␤␤␤»
colomon rn: say "test".subst(/\w+/, { "$/$/" }); 21:14
p6eval rakudo 5101a5, niecza v24-23-g0520c7c: OUTPUT«testtest␤»
colomon rn: say "test".subst("test", { "$/$/" }); 21:15
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␤␤␤»
..niecza v24-23-g0520c7c: OUTPUT«testtest␤»
21:16 donaldh joined 21:21 cognominal left
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.
FROGGS jnthn: thats why some (most?) c++ libs provide C bindings 21:23
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.
colomon FROGGS: to my mind, methods don't normally have side-effects
rn: say "this is a test".match(/.\s./); say $/ 21:26
p6eval rakudo 8e6fa0, niecza v24-23-g0520c7c: OUTPUT«「s i」␤␤「s i」␤␤»
benabik Oh, except when a function call is calling a function pointer inside the object. :-D
FROGGS colomon: I believe I would be the one to blame if this is handled wrong
colomon FROGGS: though I can see argument that .subst should be consistent with .match
FROGGS ya, if match should set $/ then .subst should do too
PerlJam It would seem really weird if $/ were set when there was no regex involved. 21:27
colomon to me it seems weird to set $/ when you do a method call. 21:28
21:29 cognominal joined
colomon put another way, I think of the method calls as a nice, more "functional" approach to the old m// & s/// operators. 21:29
discovering the method calls have side-effects strikes me as weird
benabik m/$regex/ ~~> $/ = $regex.match($_) e.g. The operator does match _and_ the side effect. 21:31
Or at least that's a reasonable view. :-)
(May not be the correct view.)
colomon benabik++ 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 :)
benabik Or $_.match($regex), however that's spelled. :-D
Harzilein if anyone is interested in my bisection of the method for building standalone exes in the niecza docs failing: paste.debian.net/235707 is the failing revision, paste.debian.net/235709 is the testniecza script i used 21:35
benabik The phrase "build is quite shot" in that revision makes me very unsurprised that it breaks things. 21:36
21:37 sevin joined 21:38 sevin left, sevin joined
colomon Isn't @strings>>.match(/pat/) going to take a significant performance hit from assigning each match to $/? 21:44
21:45 benabik left
colomon just got Art of Computer Programming: Volume 4 Fascicle 3 "Generating All Combinations and Partitions" in the mail. :) 21:46
FROGGS colomon: maybe, but that's not the question IMO 21:47
21:48 dukeleto left 21:49 dukeleto joined
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
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
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:52
.match already returns the Match. Assigning it to $/ is a completely unnecessary side-effect. 21:54
afk # need to rescue my in-laws from my son
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 $/
21:56 kaare_ left 22:05 skids left 22:08 shinobicl left 22:16 crab2313 joined, ElDiabolo left 22:17 wk left 22:24 proller left
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:␤------> say my ⏏$file = qp{/tmp/dafile};␤␤"/tmp/dafile".IO␤»
..rakudo 8e6fa0: OUTPUT«===SORRY!===␤Two terms in a row␤at /tmp/QDq4Ab33JU:1␤------> say my $file = qp{/tmp/⏏dafile};␤ expecting any of:␤ postfix␤ infix or meta-infix␤ infix stopper␤ statement end␤ statement modifi…
FROGGS r: say my $file = q:p{/tmp/dafile}; 22:31
p6eval rakudo 8e6fa0: OUTPUT«===SORRY!===␤Unrecognized adverb: :p␤at /tmp/hY1cWTHw7f:1␤------> say my $file = q:p⏏{/tmp/dafile};␤ expecting any of:␤ colon pair (restricted)␤»
jnthn if it's just menat to .IO the quoted thing, then that shouldn't be too hard to implement 22:32
22:40 sevin left, PacoAir left 22:45 crab2313 left 22:56 stopbit left 22:58 Tedd1 left 22:59 Tedd1 joined, cognominal left 23:00 cognominal joined, nebuchadnezzar left
rjbs is looking for information about how or whether the topic in Perl 6 is lexical. 23:11
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 23:20 cognominal left 23:23 cognominal joined
sorear rjbs: generally, no 23:23
benabik Do some calls default to something like CALLER::$_ ? 23:24
rjbs sorear: Can you elaborate on that or point me to something? 23:25
23:25 dukeleto left, dukeleto joined
benabik Actually, most things that defaulted to $_ now complain that you should use .foo, don't they? 23:26
rjbs: Hard to point to lack of something. Where does it propagate? 23:28
rjbs: Places where it used to tend not to anymore. 23:30
std: split
p6eval std 7551b8f: OUTPUT«===SORRY!===␤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:␤------> split⏏<EOL>␤Check failed␤FAILED 00:00 41m␤»
23:31 benabik left
rjbs Okay. I'm trying to determine the state of things that I probably knew better several years ago. 23:35
Perl 5 added a lexical $_ in 5.10, but it led to many complications. We planned to remove it.
There has been a late-minute call for a pardon.
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
It is of course possible that I'm misremembering something.
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:37
geekosaur would imagine p5 has a problem p6 does not: massive amounts of bad existing code 23:38
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:39
23:52 spider-mario left
grondilu $ perl6 --target=pir -e 'constant primes = grep &is-prime, 2 .. *;' 23:53
===SORRY!===
Serialization Error: Unimplemented object type 'QRPA' passed to write_ref
23:53 skids joined 23:54 rindolf left
rjbs sorear: It was a big "given" issue, but now given localizes rather than lexicalizing. 23:55
sorear: Now the question is just: can the two live together happily?