»ö« 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]
.oO("for advanced capabilities, we recommend re_glob(), which matches files the P6 Regex Way™")
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
.oO(there are variant adverbs in the P5 File::Glob, so that's not unheard-of.)
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: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
.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
dalek ecs: c148eb9 | Mouq++ | S32-setting-library/Callable.pod:
Further update S32::Callable
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
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
.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.)
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 :-)
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" :)
.oO( there is no excuse for cuteness )
10:06 daxim_ joined
.oO( cuteness is the cause of all kinds of things... :P )
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
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
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
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)
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
(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
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
.oO(patch and git merge, reinvented, probably poorly)
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