»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg camelia perl6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by sorear on 25 June 2013.
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
huf of the shape glob "foo/*" or glob "{a,b}c"
lue Oh! because P5 has ${a} instead of {$a}, right? 00:01
diakopter right
huf: I was answering as if the p6 glob, I guess :P
huf yes, i guessed
i was saying as if p6's glob would be similar to shell's or perl5's. 00:02
i dont know if that's true
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
diakopter lue: well, glob has its own low-level type in p5 00:03
diakopter waits for someone to castigate me for calling SV variants "types" 00:04
00:04 avuserow left
huf is that the same glob? 00:04
isnt that the other glob?
glob() or certain kinds of <> VS ref \*FOO 00:05
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 davec` left
diakopter lue: okay, but how would the compiler know to use it as a glob 00:06
00:07 davec` joined, salv0 left
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..?
er, iterated 00:09
00:09 tobyink left
lue I see &glob as "expand into a series of filenames". Essentially, just like `ls` 00:09
[ At least based on my first glance at it just now :) ] 00:10
huf it also expands {}{} even if no such files exist, i think 00:11
but not for the other patterns, * and [] and such
because hate, i suppose :) 00:12
(well, sh)
geekosaur because csh did {} expansion separately from filename generation 00:13
technically so does bash; I think it was perl that first mashed them together
huf ah, {} is not an sh feature?
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?
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)
geekosaur posix brought in a bunch of ksh and then jettisoned it again
huf geekosaur: ah!
dash does not do {} expansion
00:14 dmol left
huf and dash is i think more posix than bash 00:14
geekosaur yes, ksh originally added it
lue geekosaur: $ ls S0{2,3,5}*
S02-bits.pod S03-operators.pod S05-regex.pod
(I believe I'm using bash, unless I'm severely mistaken)
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
there's a detailed explanation in the bash docs
00:15 Psyche^ left
geekosaur and the ksh docs for that matter 00:15
lue huf: I get "ab ac\na*" in STDOUT
huf oh, yours doesnt abort if the thing didnt match. 00:16
well anyway.
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
(actually I think bash might have a shell option hidden away somewhere for that)
lue $ ls S0{2,3,5,foo}*
ls: cannot access S0foo*: No such file or directory
S02-bits.pod S03-operators.pod S05-regex.pod
geekosaur: ^^^ ls complains, but not fatally
geekosaur there you go then. separate step
00:18 Psyche^ joined
geekosaur lue, not the test I'm looking for; I mean is bash is set to error on no match 00:18
*if bash...
if it just passes it through, you would get that behavior
huf forget ls, use echo
filename expansion still happens the same way
lue huf: $ echo S0{2,3,5,foo}* 00:19
S02-bits.pod S03-operators.pod S05-regex.pod S0foo*
huf that should be fun to reproduce...
also this is why i hate glob :)
lue the man page for bash makes [ ] seem unwieldy :| 00:21
00:22 salv0 joined
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
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]
lue
.oO("for advanced capabilities, we recommend re_glob(), which matches files the P6 Regex Way™")
00:25
geekosaur: I'll look up the POSIX glob stuff, and use that as reference instead of bash :)
geekosaur if someone wants bash globbing, maybe including brace expansion, there can be a module for it 00:26
00:27 salv0 left
lue
.oO(there are variant adverbs in the P5 File::Glob, so that's not unheard-of.)
00:28
Mouq Oh 00:38
Mouq wasn't paying attention to the irc discussion: gist.github.com/Mouq/7328659
lue I wonder if L<man:glob(7)> works in POD like in Pod6 ... 00:42
Mouq p: gist.github.com/Mouq/7328659 00:59
camelia rakudo-parrot 215ba6: OUTPUT«//usr/bin␤»
01:01 jeffreykegler left 01:10 jnap joined, jnap left
dalek ecs: 955852e | lue++ | S32-setting-library/IO.pod:
[S32::IO] Add starting definition of &glob

Most likely needs quite a bit of improvement by others; this is just a first stab at things.
01:29
01:30 ingy^ joined
Mouq is somewhat surprised there isn't a Q:glob[] 01:32
01:34 ingy^ is now known as ingy^diakopter
Mouq p:glob{} would work (L<S16>) 01:34
lue Mouq: hah, that flashed across my mind too, while writing the thing :D
p:glob// would require either a IO::Glob object or similarity to qw// (the latter to replicate my definition of &glob) 01:36
01:40 pdurbin joined
Mouq is worried about the quantum superposition ingy&diakopter seem to have gotten themselves into 01:42
TimToady it's an XOR, so it's probably fine 01:44
01:45 ingy^diakopter left
TimToady
.oO(I'm not sure if Heisenberg was here, but if he was I'm sure Pauli wasn't with him...)
01:46
01:51 ingy^ joined
dalek ecs: c148eb9 | Mouq++ | S32-setting-library/Callable.pod:
Further update S32::Callable
02:00
ecs: 27d04b5 | Mouq++ | S32-setting-library/Rules.pod:
Restore `{...}`s elided in c0115ab
02:05 benabik joined
ingy Mouq: s/&/^/ 02:06
Mouq: wanna ride? 02:07
Mouq is uncertain 02:08
ingy you'll need to be braver 02:09
Mouq 's braveness could be measured, but then you wouldn't be able to measure his charisma as accurately 02:11
02:12 ingy^ left
ingy I need to know whether to fire this thing up 02:12
engines take 3-4 minutes to warm up
brainfuck-js huh? 02:13
Mouq Micro-verse fuel, I presume? What's the mileage
ingy sounds fun
Mouq doesn't remember why he forked that
ingy you got 10 mins?
Mouq yes 02:14
ingy ok, tuning it over
brb
tiny hiccup but recover nicely 02:16
Mouq: /join #pairup 02:17
02:18 ingy^ joined 02:19 ingy^ is now known as ingy^Mouq 02:21 jnap joined 02:22 Shellcat left 02:31 ingy^Mouq is now known as ingy^ 02:34 ingy^ left 02:44 wbill joined 02:54 jnap left 02:57 rurban joined 03:28 raiph left 03:33 raiph joined 03:40 davec` left
lue Question: do I need to do self.bless(*, :$param, ...) still or is that * unnecessary? 04:01
04:05 toebu joined
Mouq The * is actually deprecated now AFAIK 04:07
r: class Bla { method new { self.bless(*, |%_) } }
ugh jvm
camelia rakudo-jvm 882e33: OUTPUT«(timeout)»
( no output )
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␤␤»
lue wonders if there will still be a way for anybody who ever didn't use the * 04:13
04:14 toebu left 04:15 baest_ joined
Mouq std: my :($foo = 123); # STD & Rakudo & Niecza ^ Spec bug S03:5003 04:15
synopsebot Link: perlcabal.org/syn/S03.html#line_5003
camelia std 8adbc60: OUTPUT«===SORRY!===␤Malformed my at /tmp/uzhO79h22t line 1:␤------> my ⏏:($foo = 123); # STD & Rakudo & Niecza ^␤ expecting any of:␤ name␤ scoped declarator␤Parse failed␤FAILED 00:01 120m␤»
04:15 kst` joined 04:16 PZt left, [Sno]_ joined, PZt joined, sizz_ joined 04:19 gabriel joined, Gothmog__ joined
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␤»
Mouq p: sub foo :($a,$b) { "Odd, since this is fine $a$b (in STD)"}
camelia rakudo-parrot 215ba6: OUTPUT«===SORRY!=== Error while compiling /tmp/IRIc9tDUX8␤Variable '$a' is not declared␤at /tmp/IRIc9tDUX8:1␤------> o :($a,$b) { "Odd, since this is fine $a⏏$b (in STD)"}␤ expecting any of:␤ postfix␤»
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, crazed- joined 04:23 djanatyn left, [Sno] left, sizz left, baest left, odoacre left, crazedpsyc left, revdiablo left, Colby` is now known as Pleiades`, [Sno]_ is now known as [Sno], Gothmog__ is now known as Gothmog_ 04:24 crazed- is now known as crazedpsyc, revdiablo joined 04:25 diakopter joined 04:26 preflex_ joined, ChanServ sets mode: +v preflex_ 04:28 preflex left, preflex_ is now known as preflex 04:29 odoacre joined 04:30 djanatyn joined 04:31 toebu joined 04:35 Mouq left 04:36 Mouq joined 04:39 crab2313 joined 04:41 xenoterracide left 04:44 kaleem joined 04:51 xenoterracide joined 04:53 btyler left 04:59 johnny5_ left 05:00 johnny5_ joined 05:03 cognominal left 05:10 SamuraiJack joined 05:24 [Sno] left 05:25 btyler joined
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…»
lue p: say "*a*" ~~ /\* ~ \* [<( a )>]/
camelia rakudo-parrot 215ba6: OUTPUT«「a」␤␤»
lue I almost want to say <( )> shouldn't need surrounding [ ] in that case. Almost. 05:37
05:41 colomon left
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
TimToady <( and )> have nothing to do with each other 05:42
you can use one without the other
lue oh?
makes sense though :) 05:43
TimToady p: say "*a*" ~~ /\* ~ \* [<( a ]
camelia rakudo-parrot 215ba6: OUTPUT«===SORRY!=== Error while compiling /tmp/zvI8lQrRPH␤Regex not terminated␤at /tmp/zvI8lQrRPH:1␤------> say "*a*" ~~ /\* ~ \* [<( a ]⏏<EOL>␤ expecting any of:␤ postfix␤ infix stopper␤ …»
TimToady p: say "*a*" ~~ /\* ~ \* [<( a ] /
camelia rakudo-parrot 215ba6: OUTPUT«「a*」␤␤»
TimToady p: say "*a*" ~~ /\* ~ \* [a )> ] /
camelia rakudo-parrot 215ba6: OUTPUT«「*a」␤␤»
TimToady see
lue yep.
But then I think it would be less of a WAT if <( didn't screw up ~ 05:44
p: say "*a*" ~~ /\* ~ \* <( a/
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…»
lue p: say "*a*" ~~ /\* ~ \* a )>/
camelia rakudo-parrot 215ba6: OUTPUT«「*a*」␤␤»
TimToady n: say "*a*" ~~ /\* ~ \* <( a )>/
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…»
TimToady that is rather odd 05:46
lue I'd like to know what ~ thinks <( could match there 05:47
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:49
p: say "**a" ~~ /\* ~ \* <( a/ 05:50
camelia rakudo-parrot 215ba6: OUTPUT«「*a」␤␤»
lue TimToady: So, /technically/ rakudo and parrot are right, but not right by DWIM.
p: say "**a" ~~ /\* ~ \* )> a/ 05:51
camelia rakudo-parrot 215ba6: OUTPUT«「*」␤␤»
05:57 rurban left 05:58 rindolf joined
lue wonders what benefits <( / )> ~~ <?> brings 05:59
06:03 rindolf left 06:07 fridim_ left
moritz lue: fwiw <( and )> are very handy when it comes to substitutions 06:08
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:09
06:10 FROGGS left
lue in that they don't match as <?> or anything else on their own, to be precise. 06:11
p: say "**a" ~~ /\* ~ \* <?> a/ 06:13
camelia rakudo-parrot 215ba6: OUTPUT«「**a」␤␤»
moritz doesn't see what <( and )> got to do with ~ 06:16
oh, further up in the backlog
lue The mess-up with ~ is why I don't like the sound of <( and )> considered matching as <?> 06:19
p: class Foo { method gist { "hello" } }; say Foo; # I thought this was something I could do. 06:28
camelia rakudo-parrot 215ba6: OUTPUT«hello␤»
lue Apparently my rakudo is out of date?
06:28 rurban joined
lue Apparently I mess up pretty easily :) 06:29
06:32 rurban left 06:33 daniel-s_ joined 06:34 crab2313 left 06:37 daniel-s left 06:49 [Sno] joined, btyler left 06:53 szbalint joined, bakedb joined, japhb___ joined 06:54 dansamo joined, DrEeevil joined, genehack_ joined, cognominal joined 06:55 avarab joined, szbalint_ left, japhb__ left
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:58
diakopter lue: well, the stack trace should provide the context..? 06:59
lue diakopter: I didn't share the second half of the error : "in sub warn at gen/parrot/CORE.setting:674" 07:00
retupmoca p: if "#asdf" ~~ /^\#.*$/ { say 1; } 07:01
camelia rakudo-parrot 215ba6: OUTPUT«===SORRY!=== Error while compiling /tmp/KNmtQ8z54x␤Unspace not allowed in regex␤at /tmp/KNmtQ8z54x:1␤------> if "#asdf" ~~ /^\#⏏.*$/ { say 1; }␤»
retupmoca ^ why doesn't that work? 07:02
and how do I match that string?
07:04 FROGGS joined
retupmoca p: if "#asdf" ~~ /^'#'.*$/ { say 1; } 07:04
camelia rakudo-parrot 215ba6: OUTPUT«1␤»
retupmoca well, that works. Still not sure why \# doesn't 07:05
FROGGS morning 07:06
lue n: say 1 if "#asdf" ~~ /^\#.*$/
camelia niecza v24-98-g473bd20: OUTPUT«===SORRY!===␤␤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:␤------> say 1 if "#asdf" ~~ /^\[3…»
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:07
p: say 1 if " " ~~ /\ / 07:08
camelia rakudo-parrot 215ba6: OUTPUT«===SORRY!=== Error while compiling /tmp/JPq4oSdfz0␤Unspace not allowed in regex␤at /tmp/JPq4oSdfz0:1␤------> say 1 if " " ~~ /\ ⏏/␤»
lue diakopter: please tell me my "uninitialized value" problem is the compiler's fault, and not mine :)
♘ everybody o/
retupmoca oh, ok. That seems slightly confusing, but I understand it 07:09
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
or something like metacpan.org/pod/HTML::TreeBuilder::XPath
(for perl 6) 07:19
07:20 BenGoldberg left 07:34 darutoko joined, hummeleB1 left 07:50 raiph left 07:55 virtualsue joined 08:15 nnunley left
jnthn morning, #perl6 08:17
say "*a*" ~~ /\* ~ \* [ <( a )> ]/ 08:18
p: say "*a*" ~~ /\* ~ \* [ <( a )> ]/
camelia rakudo-parrot 215ba6: OUTPUT«「a」␤␤»
jnthn Precedence! :P
08:20 ingy1 joined 08:21 zakharyas joined 08:29 ingy1 left 08:31 virtualsue left
arnsholt o/ 08:34
08:35 virtualsue joined
FROGGS o/ 08:36
08:46 virtualsue left
FROGGS jnthn: ahh, before it get lost... would be cool if you could review it when you have time :o) gist.github.com/FROGGS/6f8989611659551dae1f 08:48
(that is about lax mode)
08:50 dmol joined 08:53 denis_boyun joined 08:57 nnunley joined 08:58 rindolf joined 09:02 nnunley left 09:05 tobyink joined 09:07 toebu left 09:09 markov left
FROGGS tries his hands on defterm 09:12
09:16 toebu joined
diakopter *hand at 09:20
09:21 markov joined 09:38 dakkar joined
jnthn diakopter: no no, he's petting defterm 09:39
09:40 denis_boyun__ joined 09:41 denis_boyun left 09:42 lizmat joined 09:49 [particle] left
jnthn FROGGS: Why does sub container_type_info become our-scoped? 09:52
lizmat is just awake 09:53
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)
and if there is no difference, why don't we call them Queues?
09:56 fhelmberger joined
jnthn A channel is more an application of a queue... 09:57
It's not just a queue 'cus of the fail/last stuff it also provides.
Which is important for the channel/supply/promise paradigm coercions. 09:58
lizmat ok, so it's a queue with open/close semantics added 09:59
jnthn Plus error stuff
lizmat I don't see anything about channels being able to fail ?
jnthn $channel.fail(...)
I hope nobody removed that. :) 10:00
Otherwise you break the paradigm coercing. :)
lizmat I'm not sure it was ever there >
?
jnthn um
OK, it's there int he implementation :)
Maybe I forgot it in the sepc.
Certainly, it's used.
lizmat ok, so how would you spot a fail on a channel? 10:01
jnthn If you receive on a channel with a fail, then it throws. 10:02
lizmat ack
jnthn Strangely consistent with .result on a Promise
If we still call them that :P
lizmat promise still stands :-)
afaik
jnthn Though so; it's result I was less sure about
It's funny, cause became excuse. 10:03
I once called it that and was like, "no, that's too cute" :)
lizmat
.oO( there is no excuse for cuteness )
10:06 daxim_ joined
jnthn
.oO( cuteness is the cause of all kinds of things... :P )
10:07
10:09 darutoko- joined 10:12 darutoko left 10:17 ssutch left, toebu left 10:20 woosley left 10:21 toebu joined
FROGGS jnthn: to use it as Perl6::Actions::container_type_info in the Grammar 10:28
nqp-p: class A { our sub foo() { } }; A::foo() 10:30
camelia ( no output )
FROGGS nqp-p: class A { sub foo() { } }; A::foo()
camelia nqp-parrot: OUTPUT«invoke() not implemented in class 'NQPMu'␤current instr.: '' pc 101 ((file unknown):62) (/tmp/Q7yW6edeok:1)␤»
10:42 baest_ is now known as baest 10:45 nnunley joined 10:49 pecastro left 10:50 nnunley left
FROGGS term:<inator> # *groan* 10:54
10:57 tobyink left 11:08 denis_boyun__ left, xdbr left 11:09 dbr joined, denisboyun joined
FROGGS nr: class B { constant \a = 3; }; say B::a 11:12
camelia rakudo-jvm 882e33: OUTPUT«(timeout)»
..rakudo-parrot 215ba6, niecza v24-98-g473bd20: OUTPUT«3␤»
FROGGS j: say 1
camelia rakudo-jvm 882e33: OUTPUT«(timeout)»
dalek ast: cd4acfc | (Tobias Leich)++ | S04-declarations/constant.t:
added test for RT #119751
11:13
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=119751
jnthn FROGGS: That sounds like a wrong thing to be doing...but will have to look mroe at the patch 11:18
FROGGS k 11:21
bbl
11:25 iSlug joined 11:32 woolfy1 joined, woolfy left 11:33 denisboyun left 11:37 lizmat left, telex left 11:45 nine left, telex joined 11:51 iSlug left 11:52 tobyink joined 11:56 xinming left, xinming joined 12:05 lizmat joined, Mouq left 12:08 markov left 12:16 tobyink left 12:24 mtk left, lizmat left, markov joined, lizmat joined 12:26 j-4 joined 12:27 mtk joined 12:32 j-4 left
dalek ast: c3bfab8 | (Tobias Leich)++ | S05-metasyntax/repeat.t:
added test for RT #119513
12:33
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=119513
12:34 nnunley joined
FROGGS 728 to go \o/ 12:35
-.-
jnthn argh
12:35 xinming left
jnthn so many tikkits 12:35
nwc10 728 of what?
jnthn nwc10: RT tickets I assume
12:36 xinming joined
FROGGS correct 12:36
jnthn: would should have a serious talk with masak about that ;o)
12:38 nnunley left
jnthn Well, he's just the messenger, so we shouldn't shoot him too much... ;) 12:42
12:42 denis_boyun joined
FROGGS gah, you only say that because you like him :o) 12:44
12:47 kaleem_ joined, kaleem left 12:48 denis_boyun left 12:50 mls_ joined 12:54 SamuraiJack left 13:03 Timbus|Away joined, Timbus left, Timbus|Away is now known as Timbus 13:04 toebu left
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
13:08 denisboyun joined
moritz tipdbmp: there are two possible stringification modes 13:09
tipdbmp: say() uses .gist, and "" uses .Str
FROGGS because "$what" calls $what.Str, where the other one csalls .gist
tipdbmp Ah, okay.
moritz .gist is more for debugging, and .Str closer to what Perl 5 does
13:12 denisboyun left 13:15 raiph joined 13:19 denisboyun joined 13:20 lizmat left, avarab is now known as avar 13:23 denis_boyun joined, lizmat joined, denisboyun left 13:25 Mouq joined
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
13:30 Mouq left, salv0 joined 13:33 mls_ is now known as mls 13:34 ajr joined, ajr is now known as Guest66615 13:35 denis_boyun left 13:36 Guest66615 is now known as ajr_ 13:37 daniel-s__ joined 13:38 denisboyun joined 13:40 daniel-s_ left 13:41 odoacre left, denisboyun left, odoacre joined 13:42 denisboyun joined
[Coke] belatedly points at github.com/coke/rakudo-star-daily 13:42
moritz no target 'install'. That sucks. 13:43
13:44 kaleem_ left, kaleem joined
FROGGS make: *** No rule to make target `rakudo-test'. Stop 13:44
github.com/coke/rakudo-star-daily/...figure.log 13:45
13:46 denisboyun left
dalek kudo-star-daily: 1ea206b | coke++ | log/version.log:
today (automated commit)
13:47
rakudo-star-daily: 5515919 | coke++ | log/version.log:
rakudo-star-daily: today (automated commit)
13:47 dalek left 13:48 dalek joined, ChanServ sets mode: +v dalek, denisboyun joined 13:49 pdurbin left
[Coke] it seems to have been failing since the last change to R-* makefiles. 13:50
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
s/libraries/modules/
(the current version is using (apparently old) build targets to build some bits, then manually update the modules, then run the tests)
13:54 denisboyun left
moritz what I don't understand is: Configure.pl is launched from within the directory that was created from the tar ball 13:54
why does it complain about a .git dir then?
FROGGS I'd guess that this directory is the rakudo-star-daily repo 13:55
moritz I've just downloaded the star.sh, ran it, and it didn't complain the same way 13:56
maybe the cd failed?
[Coke] entirely possible. I'll make time to suss this out this week, post-$dayjob madness. 13:58
speaking of which, once more unto the status meeting.
13:59 Ulti left
moritz [Coke]: do you log the output of star.sh itself? 13:59
14:05 PacoAir joined 14:08 [particle] joined
raiph hi #perl6 14:10
14:12 toebu joined, jnap joined, daxim_ left
raiph will there ever be a `use foo:from<c>`? # knows and likes NativeCall; just trying to understand 14:13
FROGGS raiph: I tend to say yes 14:14
dalek ar: 2bfd3b7 | moritz++ | tools/lib/NQP/Configure.pm:
import NQP::Configure from NQP
14:15
Timbus is foo a function call or a library.
14:15 nnunley joined
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
you can't just use a function out of thin air
14:16 denisboyun joined
FROGGS you don't have to know its parameters since there are no multis in C 14:17
just call & die :o)
you have to know the exported symbols though 14:18
everything else (constants?) is sugar
hoelzro you *might* be able to something like use printf:from<stdio.h>;
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
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
arnsholt OTOH, without the headers you don't know the signature, which leaves very little room for error reporting
On the whole, I'm not sure use :from<c> is a good idea 14:21
14:21 denisboyun left
FROGGS the :from is the languaga ("C" probably), the name should be the library 14:21
and since you can add other adverbs as you wish you could have a :header
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
a :header adverb would probably be better
arnsholt Via header imposes a *ridiculous* amount of work in the compiler though
FROGGS rp: use QRegex:from<NQP>:header<hurz.h>
camelia ( no output )
arnsholt Extracting information from header files is hard
Timbus th header needs to be preprocessed possibly, as well. 14:22
FROGGS arnsholt: true :o)
14:22 rurban joined, denisboyun joined
diakopter jnthn: not all the rt tickets are [WEIRD], either ;) 14:22
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:23
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>?
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
hoelzro raiph: the whole use bar:from<c>:header<something.h> is more of a thought experiment to me
I think arnsholt is right in that header parsing would be too hard
FROGGS it would be, yes
just think of macros and other header includes... 14:26
it is just like with Perl, you can't treat it like a bunch of text
14:26 kaleem left
raiph all makes sense. thanks guys. 14:27
diakopter otoh, luajit does a more-than-decent job with such headers 14:28
14:28 toebu left, denisboyun left 14:31 denisboyun joined
tipdbmp How can I make a multi sub MAIN decalred inside a module MyModule { ... } execute only when the module is a "scripted main": rosettacode.org/wiki/Scripted_main#Perl_6 ? 14:32
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 johnny5_ left
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 14:37 denisboyun left, btyler joined 14:38 johnny5_ joined, daxim_ joined 14:39 denisboyun joined 14:41 ltv204 joined 14:42 denisboyun left 14:43 ltv204 left 14:46 bluescreen10 joined
moritz [Coke]: fwiw you could add a line like exec >$LOG_DIR/control.log 2>&1 14:50
[Coke]: ... to star.sh to capture output from star.sh itself
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:56
FROGGS jnthn: true 14:57
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
jnthn Or know what encoding you can pass to something wanting a char* 14:58
I think we should build C header => Perl 6 things, BUT they are a draft, to be filtered through a programmer. 14:59
15:09 denis_boyun joined 15:10 rurban left 15:11 denisboyun left
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
[compile-time or otherwise]
jnthn diakopter: Could be useful, then you can re-apply your tweaks each time you update to a later version. 15:12
15:13 Mouq joined
TimToady
.oO(patch and git merge, reinvented, probably poorly)
15:13
15:14 odoacre left
TimToady well, at least there's usually an identifier to look for 15:14
jnthn :P
15:14 odoacre_ joined
jnthn There is that. 15:14
TimToady one wonders how many home-grown string types we can recognize... 15:16
gee, here's a pointer to something with a char* and an integer...
diakopter jnthn: what do you mean by "manage memory"? 15:17
TimToady will the program blow up if I realloc this char*? 15:18
15:18 Mouq left
diakopter I don't see the problem 15:18
[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
s/string/piece of memory/
FROGGS well, these problems arn't new
diakopter I don't see how that's any more of a problem than any other C program..
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
geekosaur you say that like C *has* a type system....
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
moritz geekosaur: of course it has one :-)
diakopter moritz: that's impossible
moritz diakopter: it's totally possible to *expect* that :-)
TimToady diakopter: just discussing general tendencies here
diakopter moritz: yes, but it's delusional to expect it "no matter what" 15:22
(or simply misinformed)
TimToady delusion is the general tendency, yes
15:22 rindolf left, rindolf joined
jnthn But we can probably implement mide-reading. 15:22
*mind
:P
TimToady first, write an IRC agent to use it :) 15:23
15:23 risou_awy is now known as risou
TimToady ^ close to an unintentional autopun 15:23
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
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
15:25 denis_boyun left
diakopter .. and also no easier 15:25
15:26 [Sno] left, denisboyun joined
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:27
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 Khisanth left
jnthn
.oO( Maybe we should say that instead of "Confused" :P )
15:29
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
(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.
diakopter why wouldn't it expose the same marshalling parameters/signatures as NativeCall's handwritten wrappers do 15:32
(CStr and such)
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?
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 :)
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
(the simple marshalling)
argh. marshaling.
argh. marshalling.
TimToady English orthography is the suxor. 15:38
(So's American orthography.)
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 :)
just like both traveling and travelling are correct 15:40
15:40 bluescreen10 left
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
ruit of that dev is usable)
japhb___
.oO( travailing )
15:41 [particle] left 15:42 jnap left
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 :)
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
TimToady communication achieved is a good thing, except when it's a bad thing :) 15:43
FROGGS >.< 15:44
15:44 odoacre_ left
japhb___ TimToady: Is Damian still involved in Perl 6 design these days? 15:44
I haven't heard much from him in ages, but maybe I'm just looking in the wrong places.
TimToady not much
15:46 denis_boyun joined
jnthn raiph: I think that stuff is largely done, yes. Probablhy arnsholt++ knows best :) 15:47
15:47 jnap joined, denisboyun left, odoacre_ joined
dalek kudo/nom: 1d15c6e | (Tobias Leich)++ | src/core/Mu.pm:
hand off $/ another level, fixes RT #119201
15:50
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=119201
15:52 fridim_ joined, risou is now known as risou_awy, risou_awy is now known as risou
arnsholt raiph: NativeCall also handles ints and floats of different sizes, these days 15:53
So you can wrap many libraries, but some of the more advanced functionality is still missing 15:54
Most notably structs and arrays that have non-pointer struct/array members (like struct { int foo[8]; })
jnthn decommute 15:56
&
raiph jnthn, arnsholt: thx 15:57
arnsholt I'm decommuting now as well, but I'll be back in a few hours 15:59
16:02 denisboyun joined 16:04 denis_boyun left 16:06 tobyink joined 16:07 denisboyun left
dalek ast: b023bb0 | (Tobias Leich)++ | S05-substitution/subst.t:
test for RT #119201 ($/ in `.= subst`)
16:08
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=119201
16:09 risou is now known as risou_awy, rurban joined
FROGGS 727 left :o) 16:10
16:10 pmurias joined 16:13 denisboyun joined 16:19 btyler left 16:20 btyler joined 16:21 fridim_ left 16:25 ingy left, ingy joined 16:27 FROGGS_ joined 16:28 FROGGS left, FROGGS_ is now known as FROGGS, rurban left 16:36 kaleem joined 16:39 iSlug joined 16:44 rurban joined, thou joined 16:46 [Sno] joined 16:54 tobyink left 16:56 kaleem left 17:01 Mouq joined
diakopter this might inform the subject a bit.. msdn.microsoft.com/en-us/library/61...10%29.aspx 17:01
(FROGGS the Valiant)++ 17:03
17:03 fhelmberger_ joined 17:07 Mouq left, fhelmberger left, fhelmberger_ left 17:22 pecastro joined 17:33 ajr joined, ajr_ left 17:34 ajr is now known as Guest86946, Guest86946 is now known as ajr_ 17:45 ajr_ left 17:53 risou_awy is now known as risou 17:56 SamuraiJack joined 17:57 dakkar left
dalek Heuristic branch merge: pushed 59 commits to rakudo/moar-support by jnthn 18:06
18:06 denisboyun left 18:09 risou is now known as risou_awy 18:10 thou left 18:12 zakharyas left 18:19 darutoko- left 18:20 iSlug left 18:22 iSlug joined 18:23 Rotwang joined 18:24 btyler left, SamuraiJack left, thou joined 18:26 pmurias left, sqirrel joined 18:27 xinming left 18:28 xinming joined 18:31 ssutch joined 18:34 xinming left, daxim_ left 18:35 xinming joined 18:37 btyler joined 18:46 ajr joined, ajr is now known as Guest93398 18:49 Mouq joined 18:52 rindolf left 18:54 Mouq left 19:00 denisboyun joined 19:07 denysonique left 19:09 Guest26798 joined
masak evenin', #perl6 19:22
arnsholt o/
japhb___ o/ 19:23
19:23 ktrout joined 19:24 ktrout left
FROGGS o/ 19:25
moritz \o masak, arnsholt, japhb___, FROGGS, * 19:28
japhb___ o/ 19:30
19:33 pernatiy joined
lue hello world o/ 19:34
FROGGS hi all :o) 19:35
19:36 Timbus left
ssutch jello 19:38
FROGGS O.o 19:39
19:43 [particle] joined
masak is apparently experimenting with mixtures of $dayjob saturation and sleep deprivation 19:45
not as pleasant as I had hoped.
japhb___ No kidding.
19:46 iSlug left
jnthn masak: Yeah, it doesn't work too well 19:48
19:49 sqirrel left 19:53 tobyink joined, mls left 19:54 risou_awy is now known as risou 19:57 iSlug joined 19:58 p5eval_ joined 20:00 mls joined 20:03 ponbiki_ joined
dalek p: 04bcb40 | (Arne Skjærholt)++ | src/vm/jvm/runtime/org/perl6/nqp/ (3 files):
CArray of strings on JVM.
20:07
20:07 Bucciarati_ joined, zakalwe_ joined, zakalwe_ left, zakalwe_ joined
japhb___ masak: The worst part comes when $dayjob saturation and sleep deprivation lead to being sick, or RSI flare-ups, or both. 20:08
20:09 mls_ joined, p5eval left, mls_ left, Bucciarati left, ponbiki left 20:10 risou is now known as risou_awy
masak japhb___: well, I'm currently nursing a cold -- clearly the biggest sign that I should slow down, or sleep more, or both. 20:15
arnsholt Definitely both =) 20:16
jnthn masak: You teaching all 5 days this week too? 20:18
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.
The dangers of taking a night off beer! o.O
japhb___ jnthn: So clearly, don't do that. :-) 20:21
jnthn Apparently :) 20:22
dalek p: 7d97990 | (Arne Skjærholt)++ | src/vm/jvm/runtime/org/perl6/nqp/sixmodel/reprs/CArray (2 files):
CArray of CPointers and CArrays on JVM.

Also simplifies the logic of at_pos_boxed a bit.
20:23
arnsholt There, that's CArray mostly done I think
20:23 Mouq joined
arnsholt A chunk of the corresponding test file still doesn't run, but that depends on CStruct 20:23
jnthn arnsholt++ :D
20:33 iSlug left
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:40
Mouq
.oO( an unfortunate combination )
20:41
jnthn lue: Me either :P 20:43
lue votes it for most aggravating error message ever though >:(
20:43 rurban left
lue p: say Array.new() 20:43
camelia rakudo-parrot 1d15c6: OUTPUT«␤»
Mouq »multi sub warn(*@msg) is hidden_from_backtrace {« the hidden_from_backtrace trait mod is what makes it annoying 20:44
20:44 btyler_ joined
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...
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
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 btyler left
Mouq Though, really, something shouldn't be passing undefined values to warn 20:46
lue gist.github.com/lue/f191ed73a18ed9bf3ad1 <-- my current .new 20:49
Reading the string values with .perl shuts up the error, but I'm somehow not setting anything. 20:50
(reading empty @array never causes the error)
20:51 ponbiki_ is now known as ponbiki
Mouq lue: I've been getting the same error, somewhere betwixt a method new and a method gist 20:51
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
dalek rl6-Acme-Addslashes: e7582c7 | (Konrad Borowski)++ | LICENSE (2 files):
Convert license to markdown.
20:54
GlitchMr oop
s
I forgot to disable it for this repository.
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.
TimToady trying to set priate vars?
*v
lue TimToady: yes. Wasn't until I posted the gist that I remembered some weirdness about it. Can't recall what though. 20:57
TimToady if they're private, they're not part of the public interface. only $.foo variables are part of the public interface 20:58
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. ? 20:59
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 !
timotimo oh! 21:01
TimToady ! variables are ! visible outside the class
timotimo so if you have any $!vars that you need to have initialised, you'd have to do it in BUILD?
TimToady or declare them with .
which only makes them readonly outside the class 21:02
timotimo righto.
TimToady but then you can pass in a named arg to init them automatically
lue Hey guess what $. works fine so that was some needless frustration
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
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
called to lunch &
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:05
21:06 kaare_ left, Timbus joined
jnthn lue: It used to. We changed it not to because if you have *private* things then they're, well, private. 21:08
masak is there a known implementation of $*TICK with no overhead for people who are not using it? 21:09
if not, I officially don't like it.
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...
timotimo is that something from our new parallelism synopsis?
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"
.oO[ maybe an in-between $: access level? :) ]
masak jnthn: you didn't spec it? that makes me feel better. 21:11
$*TICK feels like the $` and $' of S17.
penalizing everyone for the benefit of the very few.
jnthn masak: No, I spec'd sane semantics with awkward syntax. :)
lue masak: I thought $*BACKTICK was the $` :P
jnthn And overlong names. :)
timotimo ... please explain for people who don't know what all that means? 21:12
masak seems lizmat spec'd $*TICK in a6275dfa. 21:13
jnthn Oh, ok
Yeah, I don't like it, I don't think... 21:14
masak that makes two of us.
jnthn Not for the reason you stated though
masak oh, I have other reasons, too.
one second feels arbitrary.
21:14 rurban joined
jnthn Proxy is enough to implement it without penalizing everyone. 21:14
masak right.
jnthn The real problem is that it supposes there's one true scheduler.
masak ooh, fair point. 21:15
jnthn Note that what $*TICK does is already available as Publish.interval(1)
Which uses $*SCHEDULER to arrange it.
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
masak so I'd better wait until we've talked about it first...
jnthn Supply.interval
Sure
masak .oO( don't want to $*TICK her off... )
jnthn Well, no need to kill it right off, but I think it's better left to Supply.interval...
masak agreed. 21:17
jnthn Also, that reads much nicer than Publish.interval.
Oh, and subscribe is tap...hm :)
Did TimToady do these names so I can give beer-themed async programming talks?
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
'night, #perl6
jnthn 'nigt, masak 21:19
21:19 rurban left
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...
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...
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.
jnthn: (and, obviously, making new names in -Ofun)
s/in/is/
segomos makisg new names 21:23
lue s:nth/in/is/ then :)
p: say "foo foo" ~~ s:nth/foo/bar/
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…»
segomos ouch
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
*one 21:24
21:24 risou_awy is now known as risou
lue p: my $a = "foo foo"; say $a ~~ s:nth/foo/bar/ 21:24
camelia rakudo-parrot 1d15c6: OUTPUT«True␤»
lue p: my $a = "foo foo"; $a ~~ s:nth/foo/bar/; say $a
camelia rakudo-parrot 1d15c6: OUTPUT«bar foo␤»
dalek ecs: a049841 | jnthn++ | S17-concurrency.pod:
Fix indento.
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...
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)
TimToady jnthn: I'd be fine with that. 21:27
segomos lue: looks like cant use negative offsets with nth either? s:nth(-1) ? 21:28
p: my $a = "foo foo"; $a ~~ s:nth(2)/foo/bar/; say $a
camelia rakudo-parrot 1d15c6: OUTPUT«foo bar␤»
segomos p: my $a = "foo foo"; $a ~~ s:nth(-1)/foo/bar/; say $a
camelia rakudo-parrot 1d15c6: OUTPUT«foo foo␤»
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
FROGGS p: my $a = "foo foo"; $a ~~ s:nth(*-1)/foo/bar/; say $a
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…»
timotimo hahaha
lue :D
FROGGS *g*
segomos lol
TimToady one could put a where * > 0 on the parameter declaration for nth
lue Unfortunately, we were all dead wrong.
Mouq was about to do *-1 too
preflex Mouq: you have 1 new message. '/msg preflex messages' to read it.
FROGGS lue: or the spec :o)
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
camelia rakudo-parrot 1d15c6: OUTPUT«===SORRY!=== Error while compiling /tmp/o7lGIeENKE␤Adverb last not allowed on substitution␤at /tmp/o7lGIeENKE:1␤------> my $a = "foo foo"; $a ~~ s:last/foo/bar/⏏; say $a␤»
rakudo-parrot 1d15c6: OUTPUT«foo bar␤»
segomos oops
p: my $a = "foo foo"; $a ~~ s:-1nth/foo/bar/; say $a
camelia rakudo-parrot 1d15c6: OUTPUT«===SORRY!=== Error while compiling /tmp/7QbcMdlnwJ␤Colons may not be used to delimit quoting constructs␤at /tmp/7QbcMdlnwJ:1␤------> my $a = "foo foo"; $a ~~ s:⏏-1nth/foo/bar/; say $a␤ expecting any of:…»
segomos the :nth(2) worked, it was nicer looking
TimToady : my $a = "foo foo"; $a ~~ s:2rd/foo/bar/; say $a
p: my $a = "foo foo"; $a ~~ s:2rd/foo/bar/; say $a
camelia rakudo-parrot 1d15c6: OUTPUT«foo bar␤»
21:31 stevan_ left
dalek ecs: c45281d | jnthn++ | S17-concurrency.pod:
Promise.in/Promise.at.
21:32
21:33 kst` is now known as kst
jnthn TimToady: Feel free to tweak those :) 21:33
...hm, I don't have to tell you that, though. P
diakopter feel freer 21:34
dalek ecs: a42c74b | jnthn++ | S17-concurrency.pod:
Re-de-confuse Thread start/run.
21:36 risou is now known as risou_awy 21:37 risou_awy is now known as risou
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
dalek ecs: 9209af6 | jnthn++ | S17-concurrency.pod:
$lock.run => $lock.protect

The lock doesn't run anything, after all. It was named as such in a vague attempt at consistency with Promise.run and Thread.run (as in,
  "run this under the lock"), but those two are now .start, and having
  $lock.start({ ... }) is most certainly wrong-sounding.
21:39
jnthn TimToady: OK, fair call.
21:39 rurban left, rurban joined
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
(Something strikes me as not-quite-right about it, but I can't put my finger on it...)
TimToady because it should be spelled "moar" instead :) 21:42
jnthn :P
dalek ecs: 0d03b52 | (Elizabeth Mattijsen)++ | S17-concurrency.pod:
Some more s/alarm/in/
TimToady actually had it that way briefly
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?
lock and unlock
jnthn TimToady: No
uh
timotimo: No
lizmat masak, jnthn, TimToady: wrt to $*TICK, I don't have a very deep feelings about it
jnthn timotimo: You shoudln't use them.
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 :)
timotimo: Lock exists for implementing primitives we expect normal people to use.
lizmat *but* I think we should provide a standard way for getting an Instant at the top of the second
jnthn lizmat: Oh, I see what you mean.
lizmat otherwise people will just need to reinvent it
timotimo ah, rather than "in one second", precisely on the clock 21:44
as precisely as possible, anyway
jnthn lizmat: Are you worried about drift or are you actually wanting it to hit the exact second-top?
TimToady Supply.at(Instant.ceiling) :)
jnthn lizmat: They way I have Supply.interval(1) now, it will not drift.
TimToady er, now.ceiling :)
lizmat drift is one worry
21:45 BenGoldberg joined
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:45
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
in that situation I would need to check the int(current time) to see if it was changed 21:47
which is wasteful
especially if you're doing that 1000 times / second
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.
TimToady Supply.interval(:at(now.ceiling),:every(1)) 21:49
jnthn oh
:)
TimToady assuming something originally scheduled absolutely stays at absolute times going forward
21:50 Timbus left
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
timotimo p: <assuming something originally scheduled absolutely>>>.chars.say
camelia rakudo-parrot 1d15c6: OUTPUT«8 9 10 9 10␤»
lizmat and that it would therefore require special treatment to access that functionality, hence $*TICK
jnthn lizmat: The JVM API, afaik, doesn't give me "top of the second" ticker
lizmat: It does give me a choice of drift-safe or not 21:51
lizmat ok
well, I hope it's clear now what I would use $*TICK for :-)
jnthn Yes, thanks. I think that's the wrong way to design it, but I can agree on a need for it. 21:52
21:52 raiph left
TimToady Supply.tick(:snapto(1), :every(1)) 21:52
timotimo can we have "align to cache line boundaries" options for native arrays? :P 21:53
21:53 risou is now known as risou_awy
TimToady my int @foo[10]:snapto :) 21:53
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 ‰?
jnthn ? 21:56
timotimo no, wait, that's supposed to be in the percents
lue
.oO(‱?)
jnthn That looked like a drunk % sign :P
timotimo wow, lue, that looks very broken on my terminal. what *is* thit? 21:57
TimToady ‰02030PER MILLE SIGN
lue p: say "\c[PER TEN THOUSAND]"
camelia rakudo-parrot 1d15c6: OUTPUT«===SORRY!=== Error while compiling /tmp/x0br6a3A_w␤Unrecognized character name PER TEN THOUSAND␤at /tmp/x0br6a3A_w:1␤------> say "\c[PER TEN THOUSAND⏏]"␤»
lue p: say "\c[PER MYRIAD]"
camelia rakudo-parrot 1d15c6: OUTPUT«===SORRY!=== Error while compiling /tmp/MjaYre82jP␤Unrecognized character name PER MYRIAD␤at /tmp/MjaYre82jP:1␤------> say "\c[PER MYRIAD⏏]"␤»
lue bah
(if only we had a bot with .u capabilities...) 21:58
21:58 Eily joined
lue timotimo: it's the permyriad sign, in any case. 10.4 % -> 104 ‰ -> 1040 ‱ IIRC 21:58
timotimo thanks :)
it fleowed into the ? *and* the )
geekosaur momma duck and ducklings :) 21:59
lue (financial wizards know it as "basis points")
22:00 lestrrat left 22:02 lestrrat joined 22:08 BenGoldberg left 22:11 colomon left 22:12 xinming_ joined 22:13 Timbus joined, dmol left, colomon joined 22:15 lizmat left, lizmat joined 22:16 xinming left 22:20 xenoterracide left 22:21 BenGoldberg joined
BenGoldberg join #moarvm 22:21
22:24 woolfy1 left 22:26 woolfy joined 22:30 xenoterracide joined 22:31 FROGGS left 22:32 tomaw joined
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
22:35 Guest93398 left, corecatcher joined
dwarring saw that in the backlog at 18:15 22:36
ssutch thanks dwarring 22:37
22:38 woolfy left, lizmat left 22:39 lizmat joined
[Coke] moritz: I have been capturing the output. 22:46
22:46 Rotwang left
[Coke] moritz: gist.github.com/coke/7345600 22:48
I see a failure in the modules that is kind of hidden. probably has a different type of URL path specified.
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" ?
(is .WHAT a macro now?)
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…»
..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) ␤…»
..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/…»
TimToady lue: well, it ain't a method
at best it's a postfix operator 22:52
lue I just defined it as a method though, and still errors
diakopter well, the same thing that checks for methods with raw syntax named WHAT can check for constant strings WHAT
TimToady nr: sub postfix:<.perl>($x) { say 'Life, the Universe, and Everything' }; say 42.perl 22:54
22:54 woolfy joined
camelia rakudo-parrot 1d15c6, rakudo-jvm 882e33: OUTPUT«Life, the Universe, and Everything␤True␤» 22:54
..niecza v24-98-g473bd20: OUTPUT«Potential difficulties:␤ $x is declared but not used at /tmp/tLVG49Cm0M line 1:␤------> sub postfix:<.perl>(⏏$x) { say 'Life, the Universe, and Every␤␤Life, the Universe, and Everything␤True␤»
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?)
TimToady see, postfix takes precedence over method
lue How's it tighter than /method/ postfix though? 22:55
nvm, I think
I just wish I knew how CustomObject.WHAT was breaking :/
[Coke] timotimo: a while ago, I've been distracted. 22:57
[Coke] fanishes back to dayjob. 22:59
*vanishes. and more of a nightjob at this point.
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
there we go! jnthn++ 23:05
diakopter nr: sub postfix:<.> { say $^a }; say 3.3..... 23:06
camelia niecza v24-98-g473bd20: OUTPUT«3.3␤True␤True␤True␤»
..rakudo-parrot 1d15c6, rakudo-jvm 882e33: OUTPUT«3.3␤True␤True␤True␤True␤True␤»
lue nr: sub postfix:<.> { say $^a.WHAT }; say 3.3..... 23:08
camelia niecza v24-98-g473bd20: OUTPUT«(Rat)␤(Bool)␤(Bool)␤True␤»
..rakudo-parrot 1d15c6, rakudo-jvm 882e33: OUTPUT«(Rat)␤(Bool)␤(Bool)␤(Bool)␤(Bool)␤True␤»
23:10 davecc joined 23:21 lizmat left, woolfy left, lizmat joined
[Coke] wow, that connection is horribly slow. back to perl6 for a bit. ;) 23:21
colomon perl6++ 23:22
23:23 woolfy joined
[Coke] so, [submodule "modules/shell-command"] and [submodule "modules/file-find"] were added with git@ urls, not git:// urls. 23:28
(in rakudo-star) - I'm going to swap those.
jnthn 'night, #perl6 23:29
23:30 leapingfrog joined
[Coke] night. 23:30
23:30 PacoAir left 23:31 leapingfrog left
dalek ar: 3763be7 | coke++ | .gitmodules:
update gitmodules to use git:// style URLs
23:31
23:37 risou_awy is now known as risou
dalek ar: 1e8c5b4 | coke++ | .gitmodules:
update gitmodules to use git:// style URLs

except better this time
23:40
23:41 thou left
dalek ar: 8fe0f38 | coke++ | .gitmodules:
update gitmodules to use git:// style URLs

I'll get it right soon!
23:42
[Coke] Oy.
there we go. build occurring. 23:43
now I'm getting to the point where "hey, where's nqp" because of the recent moritz++ changes. 23:44
has star been updated for those at all yet?
... 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
wait. I'm putting it in the same place.
anyone have some coffee? or beer? ;)
ok. looks like star needs to be smarter about building in general. 23:48
23:52 btyler_ left
[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. 23:52
23:54 denisboyun left, risou is now known as risou_awy