Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2013-11-06

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 huf i think glob is far too complicated for anything but the _most_ basic literal arguments :)
00:00 diakopter lue: no, the { have to be characters in the resulting string after the compiler does any interpolation
00:00 huf of the shape glob "foo/*" or glob "{a,b}c"
00:01 lue Oh! because P5 has ${a} instead of {$a}, right?
00:01 diakopter right
00:01 diakopter huf: I was answering as if the p6 glob, I guess :P
00:01 huf yes, i guessed
00:02 huf i was saying as if p6's glob would be similar to shell's or perl5's.
00:02 huf i dont know if that's true
00:02 lue I feel like taking a couple of minutes to write up a glob spec in S32::IO, at least a start.
00:03 salv0 joined #perl6
00:03 diakopter lue: well, glob has its own low-level type in p5
00:04 * diakopter waits for someone to castigate me for calling SV variants "types"
00:04 huf is that the same glob?
00:04 huf isnt that the other glob?
00:05 huf glob() or certain kinds of <>  VS  ref \*FOO
00:06 lue diakopter: I'll not worry about that yet, and say it either returns a Str or array of Str, or always an array.
00:06 * lue leans towards always array of Str
00:06 diakopter lue: okay, but how would the compiler know to use it as a glob
00:07 davec` joined #perl6
00:08 lue glob("stuff") -> array of filenames that you use. glob("stuff")».slurp and stuff. I don't see where a Glob object becomes necessary, so perhaps my "don't trust myself" from earlier should be heeded :) ?
00:08 diakopter I thought the glob did a search everytime it's read..?
00:09 diakopter er, iterated
00:09 lue I see &glob as "expand into a series of filenames". Essentially, just like `ls`
00:10 lue [ At least based on my first glance at it just now :) ]
00:11 huf it also expands {}{} even if no such files exist, i think
00:11 huf but not for the other patterns, * and [] and such
00:12 huf because hate, i suppose :)
00:12 huf (well, sh)
00:13 geekosaur because csh did {} expansion separately from filename generation
00:13 geekosaur technically so does bash; I think it was perl that first mashed them together
00:13 huf ah, {} is not an sh feature?
00:14 geekosaur not sure if brace expansion is currently posix or not
00:14 huf it came later (into the sh strain) with ksh? or bash?
00:14 lue Specifically, the "you get a static list from ls, and if you want an updated list, run ls again." part. That's how I'm writing this initial stab anyway. (FWIW, I see no "glob" object in File::Glob or glob perldocs)
00:14 geekosaur posix brought in a bunch of ksh and then jettisoned it again
00:14 huf geekosaur: ah!
00:14 huf dash does not do {} expansion
00:14 huf and dash is i think more posix than bash
00:14 geekosaur yes, ksh originally added it
00:14 lue geekosaur: $ ls S0{2,3,5}*
00:14 lue S02-bits.pod  S03-operators.pod  S05-regex.pod
00:14 lue (I believe I'm using bash, unless I'm severely mistaken)
00:15 huf lue: echo a{b,c}; echo a*
00:15 geekosaur right, first it brace-expands to S02* S03* S05* and then it does filename generation on that
00:15 geekosaur there's a detailed explanation in the bash docs
00:15 geekosaur and the ksh docs for that matter
00:15 lue huf: I get "ab ac\na*" in STDOUT
00:16 huf oh, yours doesnt abort if the thing didnt match.
00:16 huf well anyway.
00:17 geekosaur I don't recall if bash complains or not if one of the brace expansions produces no results; ancient csh used to
00:17 geekosaur (actually I think bash might have a shell option hidden away somewhere for that)
00:17 lue $ ls S0{2,3,5,foo}*
00:17 lue ls: cannot access S0foo*: No such file or directory
00:17 lue S02-bits.pod  S03-operators.pod  S05-regex.pod
00:17 lue geekosaur: ^^^ ls complains, but not fatally
00:17 geekosaur there you go then. separate step
00:18 Psyche^ joined #perl6
00:18 geekosaur lue, not the test I'm looking for; I mean is bash is set to error on no match
00:18 geekosaur *if bash...
00:18 geekosaur if it just passes it through, you would get that behavior
00:18 huf forget ls, use echo
00:18 huf filename expansion still happens the same way
00:19 lue huf: $ echo S0{2,3,5,foo}*
00:19 lue S02-bits.pod S03-operators.pod S05-regex.pod S0foo*
00:19 huf that should be fun to reproduce...
00:19 huf also this is why i hate glob :)
00:21 lue the man page for bash makes [ ] seem unwieldy :|
00:22 salv0 joined #perl6
00:22 lue I wonder if it would be (ok^terrible) to not support [ ] as bash has it on the grounds that we don't regex that way in P6...
00:22 geekosaur and then there's the question of whether you want to support various shells' extensions, and if so which
00:24 huf perhaps it should die "it is unclear what people expect glob to do, perhaps try x, y, z" where those three are sensible functions you can describe in a sentence
00:24 geekosaur personally, if you're supporting shell glob, you should support all of POSIX shell glob. * ? [x-z] [!x-z] [xyv]
00:25 lue .oO("for advanced capabilities, we recommend re_glob(), which matches files the P6 Regex Way™")
00:25 lue geekosaur: I'll look up the POSIX glob stuff, and use that as reference instead of bash :)
00:26 geekosaur if someone wants bash globbing, maybe including brace expansion, there can be a module for it
00:28 lue .oO(there are variant adverbs in the P5 File::Glob, so that's not unheard-of.)
00:38 Mouq Oh
00:38 * Mouq wasn't paying attention to the irc discussion: https://gist.github.com/Mouq/7328659
00:42 lue I wonder if L<man:glob(7)> works in POD like in Pod6 ...
00:59 Mouq p: https://gist.github.com/Mouq/7328659
00:59 camelia rakudo-parrot 215ba6: OUTPUT«//usr/bin␤»
01:10 jnap joined #perl6
01:29 dalek specs: 955852e | lue++ | S32-setting-library/IO.pod:
01:29 dalek specs: [S32::IO] Add starting definition of &glob
01:29 dalek specs:
01:29 dalek specs: Most likely needs quite a bit of improvement by others; this is just a
01:29 dalek specs: first stab at things.
01:29 dalek specs: review: https://github.com/perl6/specs/commit/955852e867
01:30 ingy^ joined #perl6
01:32 * Mouq is somewhat surprised there isn't a Q:glob[]
01:34 Mouq p:glob{} would work (L<S16>)
01:34 lue Mouq: hah, that flashed across my mind too, while writing the thing :D
01:36 lue p:glob// would require either a IO::Glob object or similarity to qw// (the latter to replicate my definition of &glob)
01:40 pdurbin joined #perl6
01:42 * Mouq is worried about the quantum superposition ingy&diakopter seem to have gotten themselves into
01:44 TimToady it's an XOR, so it's probably fine
01:46 TimToady .oO(I'm not sure if Heisenberg was here, but if he was I'm sure Pauli wasn't with him...)
01:51 ingy^ joined #perl6
02:00 dalek specs: c148eb9 | Mouq++ | S32-setting-library/Callable.pod:
02:00 dalek specs: Further update S32::Callable
02:00 dalek specs: review: https://github.com/perl6/specs/commit/c148eb989f
02:00 dalek specs: 27d04b5 | Mouq++ | S32-setting-library/Rules.pod:
02:00 dalek specs: Restore `{...}`s elided in c0115ab
02:00 dalek specs: review: https://github.com/perl6/specs/commit/27d04b57d0
02:05 benabik joined #perl6
02:06 ingy Mouq: s/&/^/
02:07 ingy Mouq: wanna ride?
02:08 * Mouq is uncertain
02:09 ingy you'll need to be braver
02:11 * Mouq 's braveness could be measured, but then you wouldn't be able to measure his charisma as accurately
02:12 ingy I need to know whether to fire this thing up
02:12 ingy engines take 3-4 minutes to warm up
02:13 ingy brainfuck-js huh?
02:13 Mouq Micro-verse fuel, I presume? What's the mileage
02:13 ingy sounds fun
02:13 * Mouq doesn't remember why he forked that
02:13 ingy you got 10 mins?
02:14 Mouq yes
02:14 ingy ok, tuning it over
02:14 ingy brb
02:16 ingy tiny hiccup but recover nicely
02:17 ingy Mouq: /join #pairup
02:18 ingy^ joined #perl6
02:21 jnap joined #perl6
02:44 wbill joined #perl6
02:57 rurban joined #perl6
03:33 raiph joined #perl6
04:01 lue Question: do I need to do self.bless(*, :$param, ...) still or is that * unnecessary?
04:05 toebu joined #perl6
04:07 Mouq The * is actually deprecated now AFAIK
04:07 Mouq r: class Bla { method new { self.bless(*, |%_) } }
04:07 Mouq ugh jvm
04:07 camelia rakudo-jvm 882e33: OUTPUT«(timeout)»
04:07 camelia ..rakudo-parrot 215ba6: ( no output )
04:08 Mouq p: class Bla { method new { self.bless(*, |%_) } }; Bla.new
04:08 camelia rakudo-parrot 215ba6: OUTPUT«Passing an object candidate to Mu.bless is deprecated  in method bless at gen/parrot/CORE.setting:809␤␤»
04:13 * lue wonders if there will still be a way for anybody who ever didn't use the *
04:15 baest_ joined #perl6
04:15 Mouq std: my :($foo = 123); # STD & Rakudo & Niecza ^ Spec bug S03:5003
04:15 synopsebot Link: http://perlcabal.org/syn/S03.html#line_5003
04:15 camelia std 8adbc60: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Malformed my at /tmp/uzhO79h22t line 1:â�¤------> [32mmy [33mâ��[31m:($foo = 123); # STD & Rakudo & Niecza ^[0mâ�¤    expecting any of:â�¤       nameâ�¤   scoped declaratorâ�¤Parse failedâ�¤FAILED 00:01 120mâ�¤Â»
04:15 kst` joined #perl6
04:16 [Sno]_ joined #perl6
04:16 PZt joined #perl6
04:16 sizz_ joined #perl6
04:19 gabriel joined #perl6
04:19 Gothmog__ joined #perl6
04:20 Mouq std: sub foo :($a,$b) { "Odd, since this is fine $a$b (in STD)"}
04:20 camelia std 8adbc60: OUTPUT«ok 00:01 127m␤»
04:20 Mouq p: sub foo :($a,$b) { "Odd, since this is fine $a$b (in STD)"}
04:20 camelia rakudo-parrot 215ba6: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/IRIc9tDUX8â�¤Variable '$a' is not declaredâ�¤at /tmp/IRIc9tDUX8:1â�¤------> [32mo :($a,$b) { "Odd, since this is fine $a[33mâ��[31m$b (in STD)"}[0mâ�¤    expecting any of:â�¤        postfixâ�¤Â»
04:21 Mouq n: sub foo :($a,$b) { "Odd, since this is fine $a$b (Rakudobug)"}; say foo(1,2)
04:21 camelia niecza v24-98-g473bd20: OUTPUT«Odd, since this is fine 12 (Rakudobug)␤»
04:22 Colby` joined #perl6
04:22 crazed- joined #perl6
04:24 revdiablo joined #perl6
04:25 diakopter joined #perl6
04:26 preflex_ joined #perl6
04:29 odoacre joined #perl6
04:30 djanatyn joined #perl6
04:31 toebu joined #perl6
04:36 Mouq joined #perl6
04:39 crab2313 joined #perl6
04:44 kaleem joined #perl6
04:51 xenoterracide joined #perl6
05:00 johnny5_ joined #perl6
05:10 SamuraiJack joined #perl6
05:25 btyler joined #perl6
05:36 lue p: say "*a*" ~~ /\* ~ \* <( a )>/
05:36 camelia rakudo-parrot 215ba6: OUTPUT«Unable to parse expression in ; couldn't find final \* ␤  in any FAILGOAL at gen/parrot/stage2/QRegex.nqp:1094␤  in regex  at /tmp/TpnBUayg__:1␤  in method ACCEPTS at gen/parrot/CORE.setting:12294␤  in method ACCEPTS at gen/parrot/CORE.setting:75…»
05:36 lue p: say "*a*" ~~ /\* ~ \* [<( a )>]/
05:36 camelia rakudo-parrot 215ba6: OUTPUT«「a」␤␤»
05:37 lue I almost want to say <( )> shouldn't need surrounding [ ] in that case. Almost.
05:41 lue p: say "*a*" ~~ /\* ~ \* <( [a] )>/ # this is where I start crying foul on the interaction between ~ and <()>
05:41 camelia rakudo-parrot 215ba6: OUTPUT«Unable to parse expression in ; couldn't find final \* ␤  in any FAILGOAL at gen/parrot/stage2/QRegex.nqp:1094␤  in regex  at /tmp/SqlVqdYnwK:1␤  in method ACCEPTS at gen/parrot/CORE.setting:12294␤  in method ACCEPTS at gen/parrot/CORE.setting:75…»
05:41 colomon joined #perl6
05:42 TimToady <( and )> have nothing to do with each other
05:42 TimToady you can use one without the other
05:42 lue oh?
05:43 lue makes sense though :)
05:43 TimToady p: say "*a*" ~~ /\* ~ \* [<( a ]
05:43 camelia rakudo-parrot 215ba6: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/zvI8lQrRPHâ�¤Regex not terminatedâ�¤at /tmp/zvI8lQrRPH:1â�¤------> [32msay "*a*" ~~ /\* ~ \* [<( a ][33mâ��[31m<EOL>[0mâ�¤    expecting any of:â�¤        postfixâ�¤        infix stopperâ�¤    â€¦Â»
05:43 TimToady p: say "*a*" ~~ /\* ~ \* [<( a ] /
05:43 camelia rakudo-parrot 215ba6: OUTPUT«「a*」␤␤»
05:43 TimToady p: say "*a*" ~~ /\* ~ \* [a )> ] /
05:43 camelia rakudo-parrot 215ba6: OUTPUT«「*a」␤␤»
05:43 TimToady see
05:43 lue yep.
05:44 lue But then I think it would be less of a WAT if <( didn't screw up ~
05:44 lue p: say "*a*" ~~ /\* ~ \* <( a/
05:44 camelia rakudo-parrot 215ba6: OUTPUT«Unable to parse expression in ; couldn't find final \* ␤  in any FAILGOAL at gen/parrot/stage2/QRegex.nqp:1094␤  in regex  at /tmp/bFv0oOqVju:1␤  in method ACCEPTS at gen/parrot/CORE.setting:12294␤  in method ACCEPTS at gen/parrot/CORE.setting:75…»
05:44 lue p: say "*a*" ~~ /\* ~ \* a )>/
05:44 camelia rakudo-parrot 215ba6: OUTPUT«「*a*」␤␤»
05:44 TimToady n: say "*a*" ~~ /\* ~ \* <( a )>/
05:44 camelia niecza v24-98-g473bd20: OUTPUT«Unhandled exception: Unable to parse anonymous regex␤Couldn't find final '*'; gave up␤  at /home/p6eval/niecza/lib/CORE.setting line 1536 (die @ 5) ␤  at /home/p6eval/niecza/lib/CORE.setting line 2950 (Cursor.FAILGOAL @ 6) ␤  at /tmp/rvyj_pfqlZ…»
05:46 TimToady that is rather odd
05:47 lue I'd like to know what ~ thinks <( could match there
05:49 lue S05: "A <( token indicates the start of the match's overall capture, ... When matched, these behave as assertions that are always true," So, the answer to my question is that ~ sees <?> when coming across <( , right?
05:50 lue p: say "**a" ~~ /\* ~ \* <( a/
05:50 camelia rakudo-parrot 215ba6: OUTPUT«「*a」␤␤»
05:50 lue TimToady: So, /technically/ rakudo and parrot are right, but not right by DWIM.
05:51 lue p: say "**a" ~~ /\* ~ \* )> a/
05:51 camelia rakudo-parrot 215ba6: OUTPUT«「*」␤␤»
05:58 rindolf joined #perl6
05:59 * lue wonders what benefits <( / )> ~~ <?> brings
06:08 moritz lue: fwiw <( and )> are very handy when it comes to substitutions
06:09 lue moritz: I'm not saying anything bad about <( )>, just whether or not they should be matching as anything (unless explained otherwise, I say no; should be just like +, *?, [], (), etc.)
06:11 lue in that they don't match as <?> or anything else on their own, to be precise.
06:13 lue p: say "**a" ~~ /\* ~ \* <?> a/
06:13 camelia rakudo-parrot 215ba6: OUTPUT«「**a」␤␤»
06:16 * moritz doesn't see what <( and )> got to do with ~
06:16 moritz oh, further up in the backlog
06:19 lue The mess-up with ~ is why I don't like the sound of <( and )> considered matching as <?>
06:28 lue p: class Foo { method gist { "hello" } }; say Foo; # I thought this was something I could do.
06:28 camelia rakudo-parrot 215ba6: OUTPUT«hello␤»
06:28 lue Apparently my rakudo is out of date?
06:28 rurban joined #perl6
06:29 lue Apparently I mess up pretty easily :)
06:33 daniel-s_ joined #perl6
06:49 [Sno] joined #perl6
06:53 szbalint joined #perl6
06:53 bakedb joined #perl6
06:53 japhb___ joined #perl6
06:54 dansamo joined #perl6
06:54 DrEeevil joined #perl6
06:54 genehack_ joined #perl6
06:54 cognominal joined #perl6
06:55 avarab joined #perl6
06:58 lue .oO(use of uninitialized value of type Any in string context  is getting to be the most annoying error I've ever come across, if only because it doesn't help you *at all* with finding the problem.)
06:59 diakopter lue: well, the stack trace should provide the context..?
07:00 lue diakopter: I didn't share the second half of the error : "in sub warn at gen/parrot/CORE.setting:674"
07:01 retupmoca p: if "#asdf" ~~ /^\#.*$/ { say 1; }
07:01 camelia rakudo-parrot 215ba6: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/KNmtQ8z54x�Unspace not allowed in regex�at /tmp/KNmtQ8z54x:1�------> [32mif "#asdf" ~~ /^\#[33m�[31m.*$/ { say 1; }[0m�»
07:02 retupmoca ^ why doesn't that work?
07:02 retupmoca and how do I match that string?
07:04 FROGGS joined #perl6
07:04 retupmoca p: if "#asdf" ~~ /^'#'.*$/ { say 1; }
07:04 camelia rakudo-parrot 215ba6: OUTPUT«1␤»
07:05 retupmoca well, that works. Still not sure why \# doesn't
07:06 FROGGS morning
07:06 lue n: say 1 if "#asdf" ~~ /^\#.*$/
07:06 camelia niecza v24-98-g473bd20: OUTPUT«[31m===[0mSORRY![31m===[0m��No unspace allowed in regex; if you meant to match the literal character, please enclose in single quotes ('#') or use a backslashed form like \x23 at /tmp/1bzjaMN6hX line 1:�------> [32msay 1 if "#asdf" ~~ /^\[3…»
07:07 lue retupmoca: # always means a comment unless you're in a quoting language (e.g. "" or qqx//) . \ in front of whitespace is always "unspace". Comments are whitespace. Which means \# is considered unspace, even in regexes.
07:08 lue p: say 1 if " " ~~ /\ /
07:08 camelia rakudo-parrot 215ba6: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/JPq4oSdfz0�Unspace not allowed in regex�at /tmp/JPq4oSdfz0:1�------> [32msay 1 if " " ~~ /\ [33m�[31m/[0m�»
07:08 lue diakopter: please tell me my "uninitialized value" problem is the compiler's fault, and not mine :)
07:08 lue ♘ everybody o/
07:09 retupmoca oh, ok. That seems slightly confusing, but I understand it
07:17 ssutch does there exist, or is anyone currently working on a HTML DOM / CSS selector library like BeautifulSoup (python) or lxml (c/python/etc)
07:17 ssutch or something like https://metacpan.org/pod/HTML::TreeBuilder::XPath
07:19 ssutch (for perl 6)
07:34 darutoko joined #perl6
07:55 virtualsue joined #perl6
08:17 jnthn morning, #perl6
08:18 jnthn say "*a*" ~~ /\* ~ \* [ <( a )> ]/
08:18 jnthn p: say "*a*" ~~ /\* ~ \* [ <( a )> ]/
08:18 camelia rakudo-parrot 215ba6: OUTPUT«「a」␤␤»
08:18 jnthn Precedence! :P
08:20 ingy1 joined #perl6
08:21 zakharyas joined #perl6
08:34 arnsholt o/
08:35 virtualsue joined #perl6
08:36 FROGGS o/
08:48 FROGGS jnthn: ahh, before it get lost... would be cool if you could review it when you have time :o) https://gist.github.com/FROGGS/6f8989611659551dae1f
08:48 FROGGS (that is about lax mode)
08:50 dmol joined #perl6
08:53 denis_boyun joined #perl6
08:57 nnunley joined #perl6
08:58 rindolf joined #perl6
09:05 tobyink joined #perl6
09:12 * FROGGS tries his hands on defterm
09:16 toebu joined #perl6
09:20 diakopter *hand at
09:21 markov joined #perl6
09:38 dakkar joined #perl6
09:39 jnthn diakopter: no no, he's petting defterm
09:40 denis_boyun__ joined #perl6
09:42 lizmat joined #perl6
09:52 jnthn FROGGS: Why does sub container_type_info become our-scoped?
09:53 * lizmat is just awake
09:54 * jnthn too, though I've been concious for some hours :)
09:54 lizmat hmmm...  thinking a bit more about Channels...  what makes them different from a Queue (such as implemented in P5)
09:54 lizmat and if there is no difference, why don't we call them Queues?
09:56 fhelmberger joined #perl6
09:57 jnthn A channel is more an application of a queue...
09:57 jnthn It's not just a queue 'cus of the fail/last stuff it also provides.
09:58 jnthn Which is important for the channel/supply/promise paradigm coercions.
09:59 lizmat ok, so it's a queue with open/close semantics added
09:59 jnthn Plus error stuff
09:59 lizmat I don't see anything about channels being able to fail ?
09:59 jnthn $channel.fail(...)
10:00 jnthn I hope nobody removed that. :)
10:00 jnthn Otherwise you break the paradigm coercing. :)
10:00 lizmat I'm not sure it was ever there >
10:00 lizmat ?
10:00 jnthn um
10:00 jnthn OK, it's there int he implementation :)
10:00 jnthn Maybe I forgot it in the sepc.
10:00 jnthn Certainly, it's used.
10:01 lizmat ok, so how would you spot a fail on a channel?
10:02 jnthn If you receive on a channel with a fail, then it throws.
10:02 lizmat ack
10:02 jnthn Strangely consistent with .result on a Promise
10:02 jnthn If we still call them that :P
10:02 lizmat promise still stands  :-)
10:02 lizmat afaik
10:02 jnthn Though so; it's result I was less sure about
10:02 jnthn It's funny, cause became excuse.
10:03 jnthn I once called it that and was like, "no, that's too cute" :)
10:03 lizmat .oO( there is no excuse for cuteness )
10:06 daxim_ joined #perl6
10:07 jnthn .oO( cuteness is the cause of all kinds of things... :P )
10:09 darutoko- joined #perl6
10:20 woosley left #perl6
10:21 toebu joined #perl6
10:28 FROGGS jnthn: to use it as Perl6::Actions::container_type_info in the Grammar
10:30 FROGGS nqp-p: class A { our sub foo() { } }; A::foo()
10:30 camelia nqp-parrot: ( no output )
10:30 FROGGS nqp-p: class A { sub foo() { } }; A::foo()
10:30 camelia nqp-parrot: OUTPUT«invoke() not implemented in class 'NQPMu'␤current instr.: '' pc 101 ((file unknown):62) (/tmp/Q7yW6edeok:1)␤»
10:45 nnunley joined #perl6
10:54 FROGGS term:<inator> # *groan*
11:09 dbr joined #perl6
11:09 denisboyun joined #perl6
11:11 FROGGS nr: class B { constant \a = 3; }; say B::a
11:12 camelia rakudo-jvm 882e33: OUTPUT«(timeout)»
11:12 camelia ..rakudo-parrot 215ba6, niecza v24-98-g473bd20: OUTPUT«3␤»
11:12 FROGGS j: say 1
11:12 camelia rakudo-jvm 882e33: OUTPUT«(timeout)»
11:13 dalek roast: cd4acfc | (Tobias Leich)++ | S04-declarations/constant.t:
11:13 dalek roast: added test for RT #119751
11:13 dalek roast: review: https://github.com/perl6/roast/commit/cd4acfceb4
11:13 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=119751
11:18 jnthn FROGGS: That sounds like a wrong thing to be doing...but will have to look mroe at the patch
11:21 FROGGS k
11:21 FROGGS bbl
11:25 iSlug joined #perl6
11:32 woolfy1 joined #perl6
11:45 telex joined #perl6
11:52 tobyink joined #perl6
11:56 xinming joined #perl6
12:05 lizmat joined #perl6
12:24 markov joined #perl6
12:24 lizmat joined #perl6
12:26 j-4 joined #perl6
12:27 mtk joined #perl6
12:32 j-4 left #perl6
12:33 dalek roast: c3bfab8 | (Tobias Leich)++ | S05-metasyntax/repeat.t:
12:33 dalek roast: added test for RT #119513
12:33 dalek roast: review: https://github.com/perl6/roast/commit/c3bfab8996
12:33 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=119513
12:34 nnunley joined #perl6
12:35 FROGGS 728 to go \o/
12:35 FROGGS -.-
12:35 jnthn argh
12:35 jnthn so many tikkits
12:35 nwc10 728 of what?
12:35 jnthn nwc10: RT tickets I assume
12:36 xinming joined #perl6
12:36 FROGGS correct
12:36 FROGGS jnthn: would should have a serious talk with masak about that ;o)
12:42 jnthn Well, he's just the messenger, so we shouldn't shoot him too much... ;)
12:42 denis_boyun joined #perl6
12:44 FROGGS gah, you only say that because you like him :o)
12:47 kaleem_ joined #perl6
12:50 mls_ joined #perl6
13:03 Timbus|Away joined #perl6
13:08 tipdbmp How come: 1.WHAT.say # prints (Int), but my $what = 1.WHAT; "$what".say; # use of uninitialized value of type Int in string context
13:08 denisboyun joined #perl6
13:09 moritz tipdbmp: there are two possible stringification modes
13:09 moritz tipdbmp: say() uses .gist, and "" uses .Str
13:09 FROGGS because "$what" calls $what.Str, where the other one csalls .gist
13:09 tipdbmp Ah, okay.
13:09 moritz .gist is more for debugging, and .Str closer to what Perl 5 does
13:15 raiph joined #perl6
13:19 denisboyun joined #perl6
13:23 denis_boyun joined #perl6
13:23 lizmat joined #perl6
13:25 Mouq joined #perl6
13:29 tipdbmp How do you get the privae methods out of .^methods? obj.^methods(:private) # doesn't seem to work, obj.^methods(:all) does though
13:30 salv0 joined #perl6
13:34 ajr joined #perl6
13:37 daniel-s__ joined #perl6
13:38 denisboyun joined #perl6
13:41 odoacre joined #perl6
13:42 denisboyun joined #perl6
13:42 * [Coke] belatedly points at https://github.com/coke/rakudo-star-daily
13:43 moritz no target 'install'. That sucks.
13:44 kaleem joined #perl6
13:44 FROGGS make: *** No rule to make target `rakudo-test'.  Stop
13:45 FROGGS https://github.com/coke/rakudo-star-daily/blob/master/log/configure.log
13:47 dalek rakudo-star-daily: 1ea206b | coke++ | log/version.log:
13:47 dalek rakudo-star-daily: today (automated commit)
13:47 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/1ea206b7b5
13:47 dalek rakudo-star-daily: 5515919 | coke++ | log/version.log:
13:47 dalek rakudo-star-daily: today (automated commit)
13:48 dalek joined #perl6
13:48 denisboyun joined #perl6
13:49 pdurbin left #perl6
13:50 [Coke] it seems to have been failing since the last change to R-* makefiles.
13:51 [Coke] if we had a make target that was "do the build, but pull in the -latest- version of all the libraries", that would be awesome.
13:51 [Coke] s/libraries/modules/
13:51 [Coke] (the current version is using (apparently old) build targets to build some bits, then manually update the modules, then run the tests)
13:54 moritz what I don't understand is: Configure.pl is launched from within the directory that was created from the tar ball
13:54 moritz why does it complain about a .git dir then?
13:55 FROGGS I'd guess that this directory is the rakudo-star-daily repo
13:56 moritz I've just downloaded the star.sh, ran it, and it didn't complain the same way
13:56 moritz maybe the cd failed?
13:58 [Coke] entirely possible. I'll make time to suss this out this week, post-$dayjob madness.
13:58 [Coke] speaking of which, once more unto the status meeting.
13:59 Ulti left #perl6
13:59 moritz [Coke]: do you log the output of star.sh itself?
14:05 PacoAir joined #perl6
14:08 [particle] joined #perl6
14:10 raiph hi #perl6
14:12 toebu joined #perl6
14:12 jnap joined #perl6
14:13 raiph will there ever be a `use foo:from<c>`? # knows and likes NativeCall; just trying to understand
14:14 FROGGS raiph: I tend to say yes
14:15 dalek star: 2bfd3b7 | moritz++ | tools/lib/NQP/Configure.pm:
14:15 dalek star: import NQP::Configure from NQP
14:15 dalek star: review: https://github.com/rakudo/star/commit/2bfd3b7fad
14:15 Timbus is foo a function call or a library.
14:15 nnunley joined #perl6
14:15 FROGGS one would "just" need to use NativeCall + gobject introspection or something similar
14:15 Timbus how do you determine its parameters
14:16 FROGGS a library
14:16 FROGGS you can't just use a function out of thin air
14:16 denisboyun joined #perl6
14:17 FROGGS you don't have to know its parameters since there are no multis in C
14:17 FROGGS just call & die :o)
14:18 FROGGS you have to know the exported symbols though
14:18 FROGGS everything else (constants?) is sugar
14:18 hoelzro you *might* be able to something like use printf:from<stdio.h>;
14:19 hoelzro if Perl 6 comes with a header parser ;)
14:19 arnsholt If we do use :from<cstuff> the cstuff has to be a library name, not a header I think
14:20 arnsholt There's no uniform mapping from header files to which library you want to look for
14:20 Timbus you.. you do need to know its parameters... floats are passed on the stack, so are objects unless they're only 8 bytes.. otherwise registers are used.. am I missing something here
14:20 arnsholt OTOH, without the headers you don't know the signature, which leaves very little room for error reporting
14:20 arnsholt On the whole, I'm not sure use :from<c> is a good idea
14:21 FROGGS the :from is the languaga ("C" probably), the name should be the library
14:21 FROGGS and since you can add other adverbs as you wish you could have a :header
14:21 hoelzro you would need to tell the importer the signature (either manually, or via header), as well as the library in which it can be found
14:21 hoelzro a :header adverb would probably be better
14:21 arnsholt Via header imposes a *ridiculous* amount of work in the compiler though
14:21 FROGGS rp: use QRegex:from<NQP>:header<hurz.h>
14:21 camelia rakudo-parrot 215ba6: ( no output )
14:21 arnsholt Extracting information from header files is hard
14:22 Timbus th header needs to be preprocessed possibly,  as well.
14:22 FROGGS arnsholt: true :o)
14:22 rurban joined #perl6
14:22 denisboyun joined #perl6
14:22 diakopter jnthn: not all the rt tickets are [WEIRD], either ;)
14:23 tipdbmp If I have a module that exports a sub (sub suby is export { ... } ) and I use the module with the empty parens: use MyModule ()); How can I still use the sub as in MyModule::suby?
14:24 FROGGS tipdbmp: make it an our-sub?
14:24 raiph FROGGS, Timbus, hoelzro, arnsholt: thx. would I be right in saying that the longer term vision is that, for calls between P6 and C, use bar:from<c> will be what most folk use/see rather than NativeCall? Will NativeCall be used under the hood to implement use foo:from<c>?
14:25 tipdbmp FROGGS: that worked, thanks.
14:25 FROGGS raiph: I am not sure if :from<C> will be more popular than NativeCall, but it would at least use it under the hood
14:25 hoelzro raiph: the whole use bar:from<c>:header<something.h> is more of a thought experiment to me
14:25 hoelzro I think arnsholt is right in that header parsing would be too hard
14:25 FROGGS it would be, yes
14:25 FROGGS just think of macros and other header includes...
14:26 FROGGS it is just like with Perl, you can't treat it like a bunch of text
14:27 raiph all makes sense. thanks guys.
14:28 diakopter otoh, luajit does a more-than-decent job with such headers
14:31 denisboyun joined #perl6
14:32 tipdbmp How can I make a  multi sub MAIN decalred inside a module MyModule { ... } execute only when the module is a "scripted main": http://rosettacode.org/wiki/Scripted_main#Perl_6 ?
14:33 tipdbmp I.e when it's imported it should not execute.
14:33 moritz tipdbmp: that's how it should be; if it isn't, it's a bug.
14:34 tipdbmp Don't know, I'm using the 2013.05 rakudo star.
14:34 FROGGS diakopter: clearly we should steal from the best implementation :o)
14:35 kaare_ joined #perl6
14:37 btyler joined #perl6
14:38 johnny5_ joined #perl6
14:38 daxim_ joined #perl6
14:39 denisboyun joined #perl6
14:41 ltv204 joined #perl6
14:46 bluescreen10 joined #perl6
14:50 moritz [Coke]: fwiw you could add a line like   exec >$LOG_DIR/control.log 2>&1
14:50 moritz [Coke]: ... to star.sh to capture output from star.sh itself
14:56 jnthn I suspect a :from<c> has so many ways to do it, it'll be hard to get sane, widely useful default semantics.
14:57 FROGGS jnthn: true
14:58 jnthn Even if you have teh header file, you don't know how to manage memory.
14:58 FROGGS but it would be nice if it is done right... ("right" eq "the way I wanna have it :o)")
14:58 denisboyun joined #perl6
14:58 jnthn Or know what encoding you can pass to something wanting a char*
14:59 jnthn I think we should build C header => Perl 6 things, BUT they are a draft, to be filtered through a programmer.
15:09 denis_boyun joined #perl6
15:11 diakopter jnthn: what if that draft was an in-memory data structure (instead of some text output), so the programmer can interact with it with an api?
15:11 diakopter [compile-time or otherwise]
15:12 jnthn diakopter: Could be useful, then you can re-apply your tweaks each time you update to a later version.
15:13 Mouq joined #perl6
15:13 TimToady .oO(patch and git merge, reinvented, probably poorly)
15:14 TimToady well, at least there's usually an identifier to look for
15:14 jnthn :P
15:14 odoacre_ joined #perl6
15:14 jnthn There is that.
15:16 TimToady one wonders how many home-grown string types we can recognize...
15:16 TimToady gee, here's a pointer to something with a char* and an integer...
15:17 diakopter jnthn: what do you mean by "manage memory"?
15:18 TimToady will the program blow up if I realloc this char*?
15:18 diakopter I don't see the problem
15:19 diakopter [why would you need to realloc the char*]
15:19 moritz diakopter: whether a particular string must be freed by the caller, or will be freed by the library
15:19 moritz s/string/piece of memory/
15:19 FROGGS well, these problems arn't new
15:19 diakopter I don't see how that's any more of a problem than any other C program..
15:20 TimToady there are a whole bunch of things that are done by convention in C rather than by the type system
15:20 moritz diakopter: the big difference is that C programmers are used to reading such things in the docs
15:20 geekosaur you say that like C *has* a type system....
15:21 moritz diakopter: but Perl 6 programmers aren't, and they expect things to Just Work[tm], no matter what
15:21 TimToady sure, didn't say it was a *good* type system :P
15:21 moritz geekosaur: of course it has one :-)
15:21 diakopter moritz: that's impossible
15:21 moritz diakopter: it's totally possible to *expect* that :-)
15:21 TimToady diakopter: just discussing general tendencies here
15:22 diakopter moritz: yes, but it's delusional to expect it "no matter what"
15:22 diakopter (or simply misinformed)
15:22 TimToady delusion is the general tendency, yes
15:22 rindolf joined #perl6
15:22 jnthn But we can probably implement mide-reading.
15:22 jnthn *mind
15:22 jnthn :P
15:23 TimToady first, write an IRC agent to use it :)
15:23 TimToady ^ close to an unintentional autopun
15:24 diakopter my point is that if the library you're using is expecting you to maintain some state across calls into it, but where that state is mutable by the library directly as well, that's a poor design, and needs a compatibility layer to hide the "danger" if you want the "JWNMW"
15:24 TimToady I don't think anyone is disputing that
15:25 diakopter but it won't be any more difficult to write such protection than in luajit, or in .NET/mono, or JVM/JNI with Unsafe
15:25 diakopter .. and also no easier
15:26 denisboyun joined #perl6
15:27 diakopter so I think it's impossible to provide the "don't ever crash" promise if you're using native code in the general case
15:28 TimToady sure, moritz wasn't claiming that it is possible, only that people expect it irrationally
15:28 diakopter why wouldn't the message then be "sorry, that's irrational.."
15:29 jnthn .oO( Maybe we should say that instead of "Confused" :P )
15:30 diakopter instead of "crashes aren't impossible with NativeCall, so we can't provide it via from:<C> because from:<lang> never crashes"
15:30 moritz diakopter: I don't think anybody said that in the backlog
15:31 moritz (at least I didn't :-)
15:31 jnthn diakopter: Nobody said that. Teh point is that mapping from whatever :from<c> accesses to the code you would write with NativeCall is a "more than one way to do it" situation.
15:32 diakopter why wouldn't it expose the same marshalling parameters/signatures as NativeCall's handwritten wrappers do
15:32 diakopter (CStr and such)
15:33 moritz because when you hand-write wrappers, you make choices about encoding and memory management
15:33 jnthn diakopter: ah, maybe we have different understandings of what we're thinking :from<c> does?
15:34 diakopter probably.. I was imagining it to do something like luajit's
15:34 * TimToady also thinks there's more than one way to do it when it comes to telling the user something is irrational...C's usual method is to SEGV :)
15:37 diakopter moritz: you're combining the wrapper with the simple marshalling.. I was thinking of just converting to the basic NativeCall types, raw (pointers raw and everything)
15:37 diakopter (the simple marshalling)
15:37 diakopter argh. marshaling.
15:37 diakopter argh. marshalling.
15:38 TimToady English orthography is the suxor.
15:38 TimToady (So's American orthography.)
15:39 diakopter moritz: so you'd still be responsible for handling encoding and accounting for memory ownership
15:39 TimToady diakopter: btw, the online dict here has both as correct :)
15:40 TimToady just like both traveling and travelling are correct
15:40 raiph jnthn or arnsholt: the Zavolaj readme says "It is constrained to only working with machine-size integers, doubles and strings at the moment; the sized numeric types, arrays of pointers, arrays of structs and arrays of arrays are in development." Am I right in saying that some of that development has now happened? (ie it's still under dev but some f
15:40 raiph ruit of that dev is usable)
15:40 japhb___ .oO( travailing )
15:42 diakopter moritz: the thing I was imagining jnthn was referring to (that would need programmer tweaking) would be the type/model autogenerated from those headers, one layer above the raw nativecall types..
15:42 TimToady someone should really throw a .oO method into Any and make it means something before Damian does :)
15:42 diakopter (..using the names from the C headers)
15:43 moritz diakopter: now your statements make much more sense to me, in retrospect :-)
15:43 Khisanth joined #perl6
15:43 TimToady communication achieved is a good thing, except when it's a bad thing :)
15:44 FROGGS >.<
15:44 japhb___ TimToady: Is Damian still involved in Perl 6 design these days?
15:44 japhb___ I haven't heard much from him in ages, but maybe I'm just looking in the wrong places.
15:44 TimToady not much
15:46 denis_boyun joined #perl6
15:47 jnthn raiph: I think that stuff is largely done, yes. Probablhy arnsholt++ knows best :)
15:47 jnap joined #perl6
15:47 odoacre_ joined #perl6
15:50 dalek rakudo/nom: 1d15c6e | (Tobias Leich)++ | src/core/Mu.pm:
15:50 dalek rakudo/nom: hand off $/ another level, fixes RT #119201
15:50 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1d15c6e8dd
15:50 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=119201
15:52 fridim_ joined #perl6
15:53 arnsholt raiph: NativeCall also handles ints and floats of different sizes, these days
15:54 arnsholt So you can wrap many libraries, but some of the more advanced functionality is still missing
15:54 arnsholt Most notably structs and arrays that have non-pointer struct/array members (like struct { int foo[8]; })
15:56 jnthn decommute
15:56 jnthn &
15:57 raiph jnthn, arnsholt: thx
15:59 arnsholt I'm decommuting now as well, but I'll be back in a few hours
16:02 denisboyun joined #perl6
16:06 tobyink joined #perl6
16:08 dalek roast: b023bb0 | (Tobias Leich)++ | S05-substitution/subst.t:
16:08 dalek roast: test for RT #119201 ($/ in `.= subst`)
16:08 dalek roast: review: https://github.com/perl6/roast/commit/b023bb0070
16:08 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=119201
16:09 rurban joined #perl6
16:10 FROGGS 727 left :o)
16:10 pmurias joined #perl6
16:13 denisboyun joined #perl6
16:20 btyler joined #perl6
16:25 ingy joined #perl6
16:27 FROGGS_ joined #perl6
16:36 kaleem joined #perl6
16:39 iSlug joined #perl6
16:44 rurban joined #perl6
16:44 thou joined #perl6
16:46 [Sno] joined #perl6
17:01 Mouq joined #perl6
17:01 diakopter this might inform the subject a bit.. http://msdn.microsoft.com/en-us/library/61aax4kh%28v=vs.110%29.aspx
17:03 diakopter (FROGGS the Valiant)++
17:03 fhelmberger_ joined #perl6
17:22 pecastro joined #perl6
17:33 ajr joined #perl6
17:56 SamuraiJack joined #perl6
18:06 dalek Heuristic branch merge: pushed 59 commits to rakudo/moar-support by jnthn
18:22 iSlug joined #perl6
18:23 Rotwang joined #perl6
18:24 thou joined #perl6
18:26 sqirrel joined #perl6
18:28 xinming joined #perl6
18:31 ssutch joined #perl6
18:35 xinming joined #perl6
18:37 btyler joined #perl6
18:46 ajr joined #perl6
18:49 Mouq joined #perl6
19:00 denisboyun joined #perl6
19:09 Guest26798 joined #perl6
19:22 masak evenin', #perl6
19:22 arnsholt o/
19:23 japhb___ o/
19:23 ktrout joined #perl6
19:25 FROGGS o/
19:28 moritz \o masak, arnsholt, japhb___, FROGGS, *
19:30 japhb___ o/
19:33 pernatiy joined #perl6
19:34 lue hello world o/
19:35 FROGGS hi all :o)
19:38 ssutch jello
19:39 FROGGS O.o
19:43 [particle] joined #perl6
19:45 * masak is apparently experimenting with mixtures of $dayjob saturation and sleep deprivation
19:45 masak not as pleasant as I had hoped.
19:45 japhb___ No kidding.
19:48 jnthn masak: Yeah, it doesn't work too well
19:53 tobyink joined #perl6
19:57 iSlug joined #perl6
19:58 p5eval_ joined #perl6
20:00 mls joined #perl6
20:03 ponbiki_ joined #perl6
20:07 dalek nqp: 04bcb40 | (Arne Skjærholt)++ | src/vm/jvm/runtime/org/perl6/nqp/ (3 files):
20:07 dalek nqp: CArray of strings on JVM.
20:07 dalek nqp: review: https://github.com/perl6/nqp/commit/04bcb40f66
20:07 Bucciarati_ joined #perl6
20:07 zakalwe_ joined #perl6
20:07 zakalwe_ joined #perl6
20:08 japhb___ masak: The worst part comes when $dayjob saturation and sleep deprivation lead to being sick, or RSI flare-ups, or both.
20:09 mls_ joined #perl6
20:15 masak japhb___: well, I'm currently nursing a cold -- clearly the biggest sign that I should slow down, or sleep more, or both.
20:16 arnsholt Definitely both =)
20:18 jnthn masak: You teaching all 5 days this week too?
20:19 jnthn masak: Hope cold gets better soon, anyway.
20:19 * jnthn is still recovering from his 2-hours-of-sleep-due-to-headache night in Salzburg.
20:19 jnthn The dangers of taking a night off beer! o.O
20:21 japhb___ jnthn: So clearly, don't do that.  :-)
20:22 jnthn Apparently :)
20:23 dalek nqp: 7d97990 | (Arne Skjærholt)++ | src/vm/jvm/runtime/org/perl6/nqp/sixmodel/reprs/CArray (2 files):
20:23 dalek nqp: CArray of CPointers and CArrays on JVM.
20:23 dalek nqp:
20:23 dalek nqp: Also simplifies the logic of at_pos_boxed a bit.
20:23 dalek nqp: review: https://github.com/perl6/nqp/commit/7d97990237
20:23 arnsholt There, that's CArray mostly done I think
20:23 Mouq joined #perl6
20:23 arnsholt A chunk of the corresponding test file still doesn't run, but that depends on CStruct
20:23 jnthn arnsholt++ :D
20:40 lue jnthn: I can't tell if "use of uninitialized value of type Any in string context  in sub warn at gen/parrot/CORE.setting:674" is my fault or rakudo's.
20:41 Mouq .oO( an unfortunate combination )
20:43 jnthn lue: Me either :P
20:43 * lue votes it for most aggravating error message ever though >:(
20:43 lue p: say Array.new()
20:43 camelia rakudo-parrot 1d15c6: OUTPUT«␤»
20:44 Mouq »multi sub warn(*@msg) is hidden_from_backtrace {« the hidden_from_backtrace trait mod is what makes it annoying
20:44 btyler_ joined #perl6
20:44 Mouq (src/core/control.pm:139)
20:44 jnthn Well, the point of that is so it skips that frame so you get told about the place the problem actually is, or so I thought...
20:45 Mouq Yeah, but that's a problem if you throw another error inside your error reporter
20:45 lue Especially annoying when you're dealing with an array of values and can't tell what precisely triggers it :P
20:46 Mouq L141, could that be »@msg.grep(*.defined).join('')« instead?
20:46 lue Hm. I'm starting to think my .new isn't DWIMming.
20:46 Mouq Though, really, something shouldn't be passing undefined values to warn
20:49 lue https://gist.github.com/lue/f191ed73a18ed9bf3ad1 <-- my current .new
20:50 lue Reading the string values with .perl shuts up the error, but I'm somehow not setting anything.
20:50 lue (reading empty @array never causes the error)
20:51 Mouq lue: I've been getting the same error, somewhere betwixt a method new and a method gist
20:52 lue I defined my own .gist for this, but the problem's not limited to that method.
20:52 TimToady in theory you can get a stacktrace by fatalizing the warning in a CONTROL block
20:54 dalek perl6-Acme-Addslashes: e7582c7 | (Konrad Borowski)++ | LICENSE (2 files):
20:54 dalek perl6-Acme-Addslashes: Convert license to markdown.
20:54 dalek perl6-Acme-Addslashes: review: https://github.com/GlitchMr/perl6-Acme-Addslashes/commit/e7582c7079
20:54 GlitchMr oop
20:54 GlitchMr s
20:54 GlitchMr I forgot to disable it for this repository.
20:55 lue TimToady: I think I just realized that my constructor isn't constructing things with what it's being given. Which is more confounding than the originating error :)
20:55 GlitchMr Should be removed now.
20:55 TimToady trying to set priate vars?
20:55 TimToady *v
20:57 lue TimToady: yes. Wasn't until I posted the gist that I remembered some weirdness about it. Can't recall what though.
20:58 TimToady if they're private, they're not part of the public interface.  only $.foo variables are part of the public interface
20:59 lue TimToady: would setting the vars $a = 1 style and self.bless() (not necessarily in that order) work, or would I need to muck about with BUILD etc. ?
21:00 timotimo all i know is BUILD will take the named parameters to bless and put them in the same-named private attributes
21:00 TimToady timotimo: but only if declared with . instead of !
21:01 timotimo oh!
21:01 TimToady ! variables are ! visible outside the class
21:01 timotimo so if you have any $!vars that you need to have initialised, you'd have to do it in BUILD?
21:01 TimToady or declare them with .
21:02 TimToady which only makes them readonly outside the class
21:02 timotimo righto.
21:02 TimToady but then you can pass in a named arg to init them automatically
21:02 lue Hey guess what $. works fine so that was some needless frustration
21:03 lue And I just figured out /why/ self.bless won't play with private attributes. And it feels almost design-smelly
21:03 TimToady you can declare $.foo and still use $!foo inside the class to refer to the storage rather than the accessor
21:04 lue yeah, I just want to not create accessor methods.
21:04 TimToady then you'd have to work harder, and use a custom BUILD
21:04 TimToady called to lunch &
21:05 lue Like I said, now that I realize why self.bless is the one thing that won't play with private attrs, I really don't like how self.bless won't play with private attrs.
21:06 Timbus joined #perl6
21:08 jnthn lue: It used to. We changed it not to because if you have *private* things then they're, well, private.
21:09 masak is there a known implementation of $*TICK with no overhead for people who are not using it?
21:09 masak if not, I officially don't like it.
21:09 jnthn lue: If you're letting the user of an object set something during construction, letting them see what they already gave you seems reasonable...
21:09 timotimo is that something from our new parallelism synopsis?
21:10 jnthn wtf is $*TICK... :)
21:10 lue jnthn: it's another one of those things where my conceptualization is apparently wrong. In my head, $! == "Just like $. except I don't want to create accessor methods"
21:10 lue .oO[ maybe an in-between $: access level? :) ]
21:11 masak jnthn: you didn't spec it? that makes me feel better.
21:11 masak $*TICK feels like the $` and $' of S17.
21:11 masak penalizing everyone for the benefit of the very few.
21:11 jnthn masak: No, I spec'd sane semantics with awkward syntax. :)
21:11 lue masak: I thought $*BACKTICK was the $` :P
21:11 jnthn And overlong names. :)
21:12 timotimo ... please explain for people who don't know what all that means?
21:13 masak seems lizmat spec'd $*TICK in a6275dfa.
21:13 jnthn Oh, ok
21:14 jnthn Yeah, I don't like it, I don't think...
21:14 masak that makes two of us.
21:14 jnthn Not for the reason you stated though
21:14 masak oh, I have other reasons, too.
21:14 masak one second feels arbitrary.
21:14 rurban joined #perl6
21:14 jnthn Proxy is enough to implement it without penalizing everyone.
21:14 masak right.
21:14 jnthn The real problem is that it supposes there's one true scheduler.
21:15 masak ooh, fair point.
21:15 jnthn Note that what $*TICK does is already available as Publish.interval(1)
21:15 jnthn Which uses $*SCHEDULER to arrange it.
21:16 masak anyway, I'd nuke it immediately, but I fear if I do lizmat will finally conclude I have a personal vendetta against her. :P
21:16 jnthn Oh
21:16 masak so I'd better wait until we've talked about it first...
21:16 jnthn Supply.interval
21:16 jnthn Sure
21:16 * masak .oO( don't want to $*TICK her off... )
21:16 jnthn Well, no need to kill it right off, but I think it's better left to Supply.interval...
21:17 masak agreed.
21:17 jnthn Also, that reads much nicer than Publish.interval.
21:17 jnthn Oh, and subscribe is tap...hm :)
21:17 jnthn Did TimToady do these names so I can give beer-themed async programming talks?
21:17 masak hehe, a6275dfa reads like "there is no event loop... but for some reason, there's an annoying grandfather clock in the corner" :P
21:18 masak 'night, #perl6
21:19 jnthn 'nigt, masak
21:19 diakopter tick for tap
21:19 jnthn TimToady: I'm a little surprised we ended up with more/done rather than keeping next/last, which I'd done for consistency with the names of the loop thingies...
21:20 jnthn TimToady: Was that strange consistency just too strange? :)
21:20 arnsholt jnthn: As an addendum to the CArray stuff, I think I'm going to try to refactor the Parrot version a bit. That be some gnarly code...
21:21 arnsholt And a bit inconsistent I think
21:21 lue jnthn: I may only be saying this on account of not having really ever worked with threads, but in my mind threading is a special enough topic to warrant fancy new names.
21:21 lue jnthn: (and, obviously, making new names in -Ofun)
21:21 lue s/in/is/
21:23 segomos makisg new names
21:23 lue s:nth/in/is/ then :)
21:23 lue p: say "foo foo" ~~ s:nth/foo/bar/
21:23 camelia rakudo-parrot 1d15c6: OUTPUT«Cannot modify an immutable value␤  in sub infix:<=> at gen/parrot/CORE.setting:16097␤  in block  at /tmp/ve7BEFJToK:1␤  in any  at /tmp/ve7BEFJToK:1␤  in any  at gen/parrot/stage2/NQPHLL.nqp:1146␤  in any eval at gen/parrot/stage2/NQPHLL.nqp:11…»
21:23 segomos ouch
21:23 jnthn lue: It's a kinda fair point. otoh, once of the nice things is that you can define grep, map etc. on a supply
21:24 jnthn *one
21:24 lue p: my $a = "foo foo"; say $a ~~ s:nth/foo/bar/
21:24 camelia rakudo-parrot 1d15c6: OUTPUT«True␤»
21:24 lue p: my $a = "foo foo"; $a ~~ s:nth/foo/bar/; say $a
21:24 camelia rakudo-parrot 1d15c6: OUTPUT«bar foo␤»
21:24 dalek specs: a049841 | jnthn++ | S17-concurrency.pod:
21:24 dalek specs: Fix indento.
21:24 dalek specs: review: https://github.com/perl6/specs/commit/a049841f32
21:25 lue I'm kinda sad :nth doesn't default to the last occurrence :/
21:25 jnthn TimToady: Wonder if we should change my $kept_in_10s = Promise.alarm(10); to my $kept_in_10s = Promise.in(10); ? To match .cue's naming choices...
21:26 jnthn TimToady: I originally had it as Promise.sleep, but lizmat wasn't keen on that...I can kinda see why-ish...
21:26 lue .oO(Promise.irq(10) to be technical *and* confusing)
21:27 TimToady jnthn: I'd be fine with that.
21:28 segomos lue: looks like cant use negative offsets with nth either?  s:nth(-1) ?
21:28 segomos p: my $a = "foo foo"; $a ~~ s:nth(2)/foo/bar/; say $a
21:28 camelia rakudo-parrot 1d15c6: OUTPUT«foo bar␤»
21:28 segomos p: my $a = "foo foo"; $a ~~ s:nth(-1)/foo/bar/; say $a
21:28 camelia rakudo-parrot 1d15c6: OUTPUT«foo foo␤»
21:29 timotimo p: my $a = "foo foo"; $a ~~ s:nth(*-1)/foo/bar/; say $a
21:29 lue p: my $a = "foo foo"; $a ~~ s:nth(*-1)/foo/bar/; say $a
21:29 FROGGS p: my $a = "foo foo"; $a ~~ s:nth(*-1)/foo/bar/; say $a
21:29 camelia rakudo-parrot 1d15c6: OUTPUT«Cannot call 'Real'; none of these signatures match:␤:(Mu:U \v: Mu *%_)␤  in any  at gen/parrot/BOOTSTRAP.nqp:1218␤  in any  at gen/parrot/BOOTSTRAP.nqp:1209␤  in method Real at gen/parrot/CORE.setting:990␤  in sub infix:<<> at gen/parrot/CORE.s…»
21:29 camelia rakudo-parrot 1d15c6: OUTPUT«Cannot call 'Real'; none of these signatures match:␤:(Mu:U \v: Mu *%_)␤  in any  at gen/parrot/BOOTSTRAP.nqp:1218␤  in any  at gen/parrot/BOOTSTRAP.nqp:1209␤  in method Real at gen/parrot/CORE.setting:990␤  in sub infix:<<> at gen/parrot/CORE.s…»
21:29 camelia rakudo-parrot 1d15c6: OUTPUT«Cannot call 'Real'; none of these signatures match:␤:(Mu:U \v: Mu *%_)␤  in any  at gen/parrot/BOOTSTRAP.nqp:1218␤  in any  at gen/parrot/BOOTSTRAP.nqp:1209␤  in method Real at gen/parrot/CORE.setting:990␤  in sub infix:<<> at gen/parrot/CORE.s…»
21:29 timotimo hahaha
21:29 lue :D
21:29 FROGGS *g*
21:29 segomos lol
21:29 TimToady one could put a where * > 0 on the parameter declaration for nth
21:29 lue Unfortunately, we were all dead wrong.
21:29 * Mouq was about to do *-1 too
21:29 preflex Mouq: you have 1 new message. '/msg preflex messages' to read it.
21:29 FROGGS lue: or the spec :o)
21:30 lue p: my $a = "foo foo"; $a ~~ s:2nth/foo/bar/; say $a
21:30 segomos p: my $a = "foo foo"; $a ~~ s:last/foo/bar/; say $a
21:30 camelia rakudo-parrot 1d15c6: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/o7lGIeENKE�Adverb last not allowed on substitution�at /tmp/o7lGIeENKE:1�------> [32mmy $a = "foo foo"; $a ~~ s:last/foo/bar/[33m�[31m; say $a[0m�»
21:30 camelia rakudo-parrot 1d15c6: OUTPUT«foo bar␤»
21:30 segomos oops
21:30 segomos p: my $a = "foo foo"; $a ~~ s:-1nth/foo/bar/; say $a
21:30 camelia rakudo-parrot 1d15c6: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/7QbcMdlnwJâ�¤Colons may not be used to delimit quoting constructsâ�¤at /tmp/7QbcMdlnwJ:1â�¤------> [32mmy $a = "foo foo"; $a ~~ s:[33mâ��[31m-1nth/foo/bar/; say $a[0mâ�¤    expecting any of:…»
21:30 segomos the :nth(2) worked, it was nicer looking
21:30 TimToady : my $a = "foo foo"; $a ~~ s:2rd/foo/bar/; say $a
21:30 TimToady p: my $a = "foo foo"; $a ~~ s:2rd/foo/bar/; say $a
21:30 camelia rakudo-parrot 1d15c6: OUTPUT«foo bar␤»
21:32 dalek specs: c45281d | jnthn++ | S17-concurrency.pod:
21:32 dalek specs: Promise.in/Promise.at.
21:32 dalek specs: review: https://github.com/perl6/specs/commit/c45281df37
21:33 jnthn TimToady: Feel free to tweak those :)
21:33 jnthn ...hm, I don't have to tell you that, though. P
21:34 diakopter feel freer
21:34 dalek specs: a42c74b | jnthn++ | S17-concurrency.pod:
21:34 dalek specs: Re-de-confuse Thread start/run.
21:34 dalek specs: review: https://github.com/perl6/specs/commit/a42c74b7a6
21:38 TimToady jnthn: re next/last, I deemed them a bit too confusing to people who expect them to always do flow control, especially if we ever actually implement loop labels
21:38 FROGGS ohh, we already parse loop lables :o)
21:39 rurban joined #perl6
21:39 dalek specs: 9209af6 | jnthn++ | S17-concurrency.pod:
21:39 dalek specs: $lock.run => $lock.protect
21:39 dalek specs:
21:39 dalek specs: The lock doesn't run anything, after all. It was named as such in a
21:39 dalek specs: vague attempt at consistency with Promise.run and Thread.run (as in,
21:39 dalek specs: "run this under the lock"), but those two are now .start, and having
21:39 dalek specs: $lock.start({ ... }) is most certainly wrong-sounding.
21:39 dalek specs: review: https://github.com/perl6/specs/commit/9209af625c
21:39 jnthn TimToady: OK, fair call.
21:39 rurban joined #perl6
21:41 jnthn TimToady: I'm pretty sure "done" will work. I think I'll have to do the conversion and see what it looks like to see it "more" feels right...
21:41 jnthn (Something strikes me as not-quite-right about it, but I can't put my finger on it...)
21:42 TimToady because it should be spelled "moar" instead :)
21:42 jnthn :P
21:42 dalek specs: 0d03b52 | (Elizabeth Mattijsen)++ | S17-concurrency.pod:
21:42 dalek specs: Some more s/alarm/in/
21:42 dalek specs: review: https://github.com/perl6/specs/commit/0d03b52034
21:42 * TimToady actually had it that way briefly
21:42 timotimo should perl6 get an ordering for locks automatically, so that you can lock multiple locks "at the same time" without having the order matter for deadlocking?
21:42 timotimo lock and unlock
21:42 jnthn TimToady: No
21:42 jnthn uh
21:42 jnthn timotimo: No
21:42 lizmat masak, jnthn, TimToady: wrt to $*TICK, I don't have a very deep feelings about it
21:42 jnthn timotimo: You shoudln't use them.
21:43 timotimo ah. that's fine then
21:43 jnthn lizmat: OK, then I'm tempting to unspec it in so far as Supply.interval(1) gets you the semantics already :)
21:43 jnthn timotimo: Lock exists for implementing primitives we expect normal people to use.
21:43 lizmat *but* I think we should provide a standard way for getting an Instant at the top of the second
21:43 jnthn lizmat: Oh, I see what you mean.
21:43 lizmat otherwise people will just need to reinvent it
21:44 timotimo ah, rather than "in one second", precisely on the clock
21:44 timotimo as precisely as possible, anyway
21:44 jnthn lizmat: Are you worried about drift or are you actually wanting it to hit the exact second-top?
21:44 TimToady Supply.at(Instant.ceiling)  :)
21:44 jnthn lizmat: They way I have Supply.interval(1) now, it will not drift.
21:44 TimToady er, now.ceiling :)
21:44 lizmat drift is one worry
21:44 BenGoldberg joined #perl6
21:45 lizmat but I've had to work in situations where it was needed that after a second was done, it would process the data of the previous second asap
21:46 jnthn lizmat: Sure, but was it tied to the system clock's idea of second?
21:46 lizmat if you just use interval, you might be almost 1 second too late
21:47 lizmat in that situation I would need to check the int(current time) to see if it was changed
21:47 lizmat which is wasteful
21:47 lizmat especially if you're doing that 1000 times / second
21:48 lizmat having the system just tell you a new second just started, would be very helpful
21:48 jnthn OK. It feels like a method on Supply. Maybe even Supply.ticks or something.
21:49 TimToady Supply.interval(:at(now.ceiling),:every(1))
21:49 jnthn oh
21:49 jnthn :)
21:49 TimToady assuming something originally scheduled absolutely stays at absolute times going forward
21:50 TimToady Supply.tick(:at(now.ceiling),:every(1))
21:50 lizmat I was thinking some OSes might be able to supply such a ticker at the OS level
21:50 timotimo p: <assuming something originally scheduled absolutely>>>.chars.say
21:50 camelia rakudo-parrot 1d15c6: OUTPUT«8 9 10 9 10␤»
21:50 lizmat and that it would therefore require special treatment to access that functionality, hence $*TICK
21:50 jnthn lizmat: The JVM API, afaik, doesn't give me "top of the second" ticker
21:51 jnthn lizmat: It does give me a choice of drift-safe or not
21:51 lizmat ok
21:51 lizmat well, I hope it's clear now what I would use $*TICK for :-)
21:51 jnthn Yes, thanks. I think that's the wrong way to design it, but I can agree on a need for it.
21:52 TimToady Supply.tick(:snapto(1), :every(1))
21:53 timotimo can we have "align to cache line boundaries" options for native arrays? :P
21:53 TimToady my int @foo[10]:snapto  :)
21:55 jnthn Bah, so I go to my fridge to grab a beer...there thankfully, post-vacation, are some. But the *weakest* one is 10.4%. O.O
21:55 timotimo ‰?
21:56 jnthn ?
21:56 timotimo no, wait, that's supposed to be in the percents
21:56 lue .oO(‱?)
21:56 jnthn That looked like a drunk % sign :P
21:57 timotimo wow, lue, that looks very broken on my terminal. what *is* thit?
21:57 TimToady ‰02030PER MILLE SIGN
21:57 lue p: say "\c[PER TEN THOUSAND]"
21:57 camelia rakudo-parrot 1d15c6: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/x0br6a3A_w�Unrecognized character name PER TEN THOUSAND�at /tmp/x0br6a3A_w:1�------> [32msay "\c[PER TEN THOUSAND[33m�[31m]"[0m�»
21:57 lue p: say "\c[PER MYRIAD]"
21:57 camelia rakudo-parrot 1d15c6: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/MjaYre82jP�Unrecognized character name PER MYRIAD�at /tmp/MjaYre82jP:1�------> [32msay "\c[PER MYRIAD[33m�[31m]"[0m�»
21:57 lue bah
21:58 lue (if only we had a bot with .u capabilities...)
21:58 Eily joined #perl6
21:58 lue timotimo: it's the permyriad sign, in any case. 10.4 % -> 104 ‰ -> 1040 ‱ IIRC
21:58 timotimo thanks :)
21:58 timotimo it fleowed into the ? *and* the )
21:59 geekosaur momma duck and ducklings :)
21:59 lue (financial wizards know it as "basis points")
22:02 lestrrat joined #perl6
22:12 xinming_ joined #perl6
22:13 Timbus joined #perl6
22:13 colomon joined #perl6
22:15 lizmat joined #perl6
22:21 BenGoldberg joined #perl6
22:21 BenGoldberg join #moarvm
22:26 woolfy joined #perl6
22:30 xenoterracide joined #perl6
22:32 tomaw joined #perl6
22:35 dwarring ssutch: Best thing at the moment for XPath style queries is probably JSON::Path. Might do the job if you can massage your data into the right format authors moritz++ jnthn++ masak++
22:35 corecatcher joined #perl6
22:35 * dwarring saw that in the backlog at 18:15
22:37 ssutch thanks dwarring
22:39 lizmat joined #perl6
22:46 [Coke] moritz: I have been capturing the output.
22:48 [Coke] moritz: https://gist.github.com/coke/7345600
22:48 [Coke] I see a failure in the modules that is kind of hidden. probably has a different type of URL path specified.
22:49 timotimo when did rakudo-star-daily start having only "no rule to make target 'foo-bar'. stop." in the log files?
22:49 lue Is there a reason why calling say NotTypeObject.WHAT on my object calls .gist and then errs on "Cannot look up attributes in a type object" ?
22:49 lue (is .WHAT a macro now?)
22:51 TimToady nr: 42.'WHAT'()
22:51 camelia rakudo-jvm 882e33: OUTPUT«No such method 'WHAT' for invocant of type 'Int'␤  in block  at /tmp/anu2R92K30:1␤  in any eval at gen/jvm/stage2/NQPHLL.nqp:1086␤  in any evalfiles at gen/jvm/stage2/NQPHLL.nqp:1292␤  in any command_eval at gen/jvm/stage2/NQPHLL.nqp:1196␤  in any…»
22:51 camelia ..niecza v24-98-g473bd20: OUTPUT«Unhandled exception: Unable to resolve method WHAT in type Int␤  at /tmp/bYUHfZ4yOw line 1 (mainline @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4583 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4584 (module-CORE @ 576) ␤…»
22:51 camelia ..rakudo-parrot 1d15c6: OUTPUT«No such method 'WHAT' for invocant of type 'Int'␤  in block  at /tmp/JQHyHdLMoy:1␤  in any  at /tmp/JQHyHdLMoy:1␤  in any  at gen/parrot/stage2/NQPHLL.nqp:1146␤  in any eval at gen/parrot/stage2/NQPHLL.nqp:1133␤  in any evalfiles at gen/parrot/…»
22:51 TimToady lue: well, it ain't a method
22:52 TimToady at best it's a postfix operator
22:52 lue I just defined it as a method though, and still errors
22:52 diakopter well, the same thing that checks for methods with raw syntax named WHAT can check for constant strings WHAT
22:53 TimToady nr: sub postfix:<.perl>($x) { say 'Life, the Universe, and Everything' }; say 42.perl
22:54 woolfy joined #perl6
22:54 camelia rakudo-parrot 1d15c6, rakudo-jvm 882e33: OUTPUT«Life, the Universe, and Everything␤True␤»
22:54 camelia ..niecza v24-98-g473bd20: OUTPUT«Potential difficulties:â�¤  $x is declared but not used at /tmp/tLVG49Cm0M line 1:â�¤------> [32msub postfix:<.perl>([33mâ��[31m$x) { say 'Life, the Universe, and Every[0mâ�¤â�¤Life, the Universe, and Everythingâ�¤Trueâ�¤Â»
22:54 lue (not a game-breaking issue, just surprised is all. Is there a way to fix it, or should I just not care about it?)
22:54 TimToady see, postfix takes precedence over method
22:55 lue How's it tighter than /method/ postfix though?
22:55 lue nvm, I think
22:55 lue I just wish I knew how CustomObject.WHAT was breaking :/
22:56 [Coke] timotimo: a while ago, I've been distracted.
22:59 * [Coke] fanishes back to dayjob.
22:59 [Coke] *vanishes. and more of a nightjob at this point.
23:01 jnthn lue: If you override gist, write a multi method gist(CustomObject:D:) { ... } so you don't override type-object gistification.
23:01 * lue tries it
23:05 lue there we go! jnthn++
23:06 diakopter nr: sub postfix:<.> { say $^a }; say 3.3.....
23:06 camelia niecza v24-98-g473bd20: OUTPUT«3.3␤True␤True␤True␤»
23:06 camelia ..rakudo-parrot 1d15c6, rakudo-jvm 882e33: OUTPUT«3.3␤True␤True␤True␤True␤True␤»
23:08 lue nr: sub postfix:<.> { say $^a.WHAT }; say 3.3.....
23:08 camelia niecza v24-98-g473bd20: OUTPUT«(Rat)␤(Bool)␤(Bool)␤True␤»
23:08 camelia ..rakudo-parrot 1d15c6, rakudo-jvm 882e33: OUTPUT«(Rat)␤(Bool)␤(Bool)␤(Bool)␤(Bool)␤True␤»
23:10 davecc joined #perl6
23:21 lizmat joined #perl6
23:21 [Coke] wow, that connection is horribly slow. back to perl6 for a bit. ;)
23:22 colomon perl6++
23:23 woolfy joined #perl6
23:28 [Coke] so, [submodule "modules/shell-command"] and [submodule "modules/file-find"] were added with git@ urls, not git:// urls.
23:28 [Coke] (in rakudo-star) - I'm going to swap those.
23:29 jnthn 'night, #perl6
23:30 leapingfrog joined #perl6
23:30 [Coke] night.
23:31 dalek star: 3763be7 | coke++ | .gitmodules:
23:31 dalek star: update gitmodules to use git:// style URLs
23:31 dalek star: review: https://github.com/rakudo/star/commit/3763be7ed0
23:40 dalek star: 1e8c5b4 | coke++ | .gitmodules:
23:40 dalek star: update gitmodules to use git:// style URLs
23:40 dalek star:
23:40 dalek star: except better this time
23:40 dalek star: review: https://github.com/rakudo/star/commit/1e8c5b418b
23:42 dalek star: 8fe0f38 | coke++ | .gitmodules:
23:42 dalek star:     update gitmodules to use git:// style URLs
23:42 dalek star:
23:42 dalek star: I'll get it right soon!
23:42 dalek star: review: https://github.com/rakudo/star/commit/8fe0f38345
23:42 [Coke] Oy.
23:43 [Coke] there we go. build occurring.
23:44 [Coke] now I'm getting to the point where "hey, where's nqp" because of the recent moritz++ changes.
23:44 [Coke] has star been updated for those at all yet?
23:45 [Coke] ... ah. because you bundle nqp, it's different. on the daily, I'm grabbing nqp and building it, will need to install it first and then then star to use it, if I can.
23:45 [Coke] wait. I'm putting it in the same place.
23:45 [Coke] anyone have some coffee? or beer? ;)
23:48 [Coke] ok. looks like star needs to be smarter about building in general.
23:52 [Coke] once that's done, the daily builds will start reporting useful info again (running against latest rakudo/nqp (but using the old version of parrot),and the latest versions of all the modules.

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

Perl 6 | Reference Documentation | Rakudo