»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by moritz on 25 December 2014.
00:11 Ven joined 00:22 Ven left 00:24 spider-mario left 00:28 kjs_ left
raydiak back 00:44
00:44 Ven joined 00:48 davido_ left 00:49 davido_ joined 00:53 telex left 00:54 telex joined 01:04 PZt joined 01:05 dayangkun joined 01:08 yeahnoob joined
tadzik not sure how complicated would that be 01:16
01:25 dayangkun left
raydiak still investigating, looking at p5's git::pureperl (which is only 1600 lines of p5 for a complete implementation, less 1 dependency I'm not sure about) 01:35
but gotta run again...busy day, I guess
adu tadzik: I wonder how much better everyone's life would be if the zip part of tarball was a Content-Encoding header so that the file you downloaded was technically a .tar 01:38
tadzik adu: harder for our Perl 6 HTTP client :) 01:39
01:39 yeahnoob left
japhb So this afternoon I hit for about the sixth time the type discontinuity between < foo bar > and < foo >, which comes up often when I am inspecting or iterating over some configuration and finding that suddenly it no longer binds to Positional. 01:44
Is this something that will be addressed in the GLR, or is there an idiom I can use to ensure that the list always stays a list, even as elements are added and removed? 01:45
(I use 'list' in lowercase to mean any list-like thing, not necessarily a List or Array or whatever.)
For now, I'm using [< foo >], but that's kinda ugly and feels redundant. 01:46
TimToady, pmichaud: ^^
TimToady I doubt that's gonna change, since we specifically call out <1/2> as a Rat literal, for instance 01:47
and (1) is not a list either 01:48
and @foo<bar> is not a slice
er, %foo
in general we make up for it by treating Any as a list of 1 element 01:49
so I think you're stuck with [< >] for composition
if you want it mutable 01:50
it's not like <foo bar> should really be considered mutable either... 01:51
m: my @a := <foo bar>; push @a, 'baz'; say @a
+camelia rakudo-moar 80b912: OUTPUT«Cannot call 'push'; none of these signatures match:␤:(Any:U \SELF: *@values, *%_)␤ in sub push at src/gen/m-CORE.setting:9364␤ in block <unit> at /tmp/gU7YwumWPG:1␤␤»
Ven I agree I always get surprised when <foo> doesn't return a list 02:05
japhb: you can <foo>.flat, though 02:06
japhb TimToady: I wasn't really looking for mutability, just for things like: my %config := { monster_filter => < large green > }; my @filter_keys := %config<monster_filter>; # works, but remove 'green' and it doesn't. 02:07
02:07 grondilu_ left 02:18 mickcy_ca joined 02:20 rmgk_ joined, rmgk left, rmgk_ is now known as rmgk
TimToady japhb: otoh it'd work if you used = instead of := 02:36
people who use := are expected to think harder :)
(2nd := I mean) 02:37
and anyway, you probably want monster_filter => < large green >.any 02:39
and that would work too
or .all
anyway, you don't have to work very hard to make an item behave as a list 02:41
02:41 yeahnoob joined
TimToady and I suspect the opposite behavior would produce even more WATs 02:42
02:50 tinyblak_ left
ugexe raydiak: there will be soon 02:50
02:50 tinyblak joined
ugexe we are addressing all of those problems 02:53
mickcy_ca Hello Perl6 02:54
raydiak ugexe: nice, good to know 02:59
hi mickcy_ca
mickcy_ca Alas ... I am getting frustrated with this grammar I have been hacking at for the last couple of days. 03:03
I keeps hanging when I attempt to add + to a term ... even though it matches when I duplicate the line manually. Very frustrating. 03:04
03:04 dayangkun joined
mickcy_ca Will post a gist if anyone wants to look at it. 03:05
Ven mickcy_ca: have you tried running the debugger? 03:07
mickcy_ca Noob here ... there is a debugger? 03:08
03:09 Mso150 joined
raydiak Grammar::Debugger 03:10
mickcy_ca Thanks ... just picked it up through panda. 03:11
OK, looking at the debugger and I am wondering why any line that starts line #include ends up on two lines, first one '#' and the second one 'include' 03:15
<err> ... starts like $include ...
Not a big deal for me, even though I would like to be able to find #include directly. 03:16
Actulally, '/' and '*' also do the same thing. 03:17
03:20 sirdancealot left 03:21 yeahnoob left 03:35 hagirikan joined 03:36 hagirikan is now known as hagiri
raydiak might have more luck by just pasting a (short) gist than waiting for someone to ask for it :) 03:36
mickcy_ca Found part of my problem ... working through it now. 03:38
03:38 xinming_ joined
raydiak nice...debugger helps 03:39
03:41 xinming left 03:45 tinyblak_ joined, noganex joined 03:48 tinyblak left, noganex_ left
mickcy_ca It does ... very much so. 03:52
03:52 Mso150 left 03:56 tinyblak_ left 04:04 raiph joined 04:07 kaare_ joined
mickcy_ca OK ... it turns out I don't know how to figure this issue out ... see pastebin.com/JqepMjQ9 and check out the offender at line 11 ... do [<sp><enumerated>]+.*? and the whole thing fails. Help would be appreciated. 04:12
aargh ... shortened to the actual routines that I am testing and it is blowing up on me. 04:18
raydiak try changing .*? on that line to <-[}]>* 04:21
afk
04:30 dayangkun left 04:35 Ven left
raydiak back...and no that's not what you're trying to do I see now 04:35
mickcy_ca YAY ... got it to work! 04:36
It was my definition of <define> that mucked me up for the evening. 04:37
raydiak congrats 04:39
mickcy_ca Now, would someone be able to elucidate me on why the apparently grammar chops non word characters off the beginning of a line. See pastebin.com/JE2SNfZy for an example ... this one does match what I want, but still strips the leading '#' off of all lines. 04:41
04:48 adu left 04:50 Rounin left
TimToady mickcy_ca: what are you expecting <-[\n\s]> to do? It seems wrong to me several ways 04:57
in the first place, \n is a subset of \s, so is meaningless 04:58
secondly, you're always matching it first, so it's always going to match unless there's whitespace 04:59
and it will eat that first character
and exclude all the other possibilities because of the ||, even if they were a longer token match
generally you should let your rules soak up whitespace, and otherwise not be trying to match it negatively 05:01
otoh, if you're doing line-oriented parsing, it's usually a mistake to use rules at all 05:02
unless you redefine ws to just mean \h* 05:03
because any implicit call to <.ws> is going to chew through your line delimiter
and any leading whitespace on the next line 05:04
05:04 hagiri left
TimToady I can see why you're trying to mix them, though, since C preprocessor is line-oriented and C isn't 05:05
if you're going to try to do this, you have to be very picky about what can or cannot match newline though 05:06
TimToady would probably try to handle all line-oriented stuff inside a custom ws rule, whenever it sees a \n 05:07
then again, if I were doing this, I'd write a full parser, and not try to second-guess the formatting conventions, because there are always violations of conventions 05:09
05:09 kaare_ left
TimToady (you can really only get away with the convention approach if you define the conventions in advance, as we did with the test fudger) 05:10
mickcy_ca TimToady: I do not know the difference between the convention approach and what a full parser would be. 05:14
05:14 yeahnoob joined
mickcy_ca Basically, I thought that I was writing a parser ... :-/ 05:17
05:22 raiph left
mickcy_ca The <-[\n\s]> to shortcut out blank lines ... if it eats char 1 ... then out it goes. 05:24
05:24 BenGoldberg left
mickcy_ca As far as the || goes ... I am not looking for the "longest" match, but the best match. That said, if you look closely, in rule lines, I am looking for <definition> and in rule enumerated I am also looking for <definition>. If I didn't use the exclusive or it would always match the longest ... not what I intended. 05:26
05:36 kaare_ joined
TimToady if you want to shortcut a blank line, that's just $$, or maybe \h*$$ 05:39
mickcy_ca That does the trick! 05:40
TimToady: So, if I were to give up on this approach, and go ahead to just write a parser for C-header files ... I can see some other ways of going about it ... but I can only see grammars as the most efficient way. I there an alternative to this that you could point me towards? 05:46
TimToady grammars is also how you write a full parser, so just keep developing this, and eventually you'll get one :) 05:50
mickcy_ca I have found that the beauty of the line by line approach in this case, is that each rule / token / regex can automagially eat up subsequent lines if needed. 05:53
raydiak pretty sure more than one c grammar has been toyed with, you might find a link to a gist or something in the irclog with some searching, if you wanted to build on existing work or use ideas from it 05:57
mickcy_ca Why didn't I think of that ... P5 solution ... Parse-RecDescent-1.967_010 on C-Pan. 05:58
06:04 adu joined
mickcy_ca GCC socket.h -fdump-translation-unit will produce a socket.h.pth file ... Does anybody know what that is? Perhaps and how to peruse it in P6? 06:04
raydiak should I be using EXPR and/or other stuff from the P6 grammar in my own expression grammars? if so, is there anything helpful/related to read about how to go about that? 06:05
I'm sure Math::Symbolic contains a very suboptimal reimplementation of these things :) 06:06
06:07 raiph joined
mickcy_ca OK ... giving up on c header parsing ... close to 800 lines of parser at gist.github.com/andydude/5268163 06:09
06:12 sunnavy left
raydiak nice, maybe that one will suit your purposes? 06:13
mickcy_ca Looking at it ...
It is much more than I need ... but if I am correct, everything that is in a header file is valid in a C program, is it not? 06:14
06:14 sunnavy joined, raiph left
mickcy_ca If I use that code ... "all" I have to do is write the action class to pull out the matches. 06:15
+dalek ast: 64c0122 | TimToady++ | / (3 files):
remove inadvertent shape declarations from tests

Postcircumfixes on parameter variables are reserved for shape declarations. Generally whitespace or a colon is needed to disambiguate.
06:23
raydiak what is the problem you're trying to solve? are you trying to parse one specific file, or any c header? 06:24
b/c if you're trying to solve the general case, then yeah it's a fairly extensive undertaking, though I certainly don't mean to dissuade you 06:25
+dalek kudo/nom: dd5687c | TimToady++ | src/Perl6/Grammar.nqp:
Give meaningful redirects on NYI shape declartions

Sloppy subsigs or functions with sigs are no longer allowed, since declaring a variable with an immediately following postcircumfix is construed as a shape.
06:26
raydiak if you're just trying to one-off something, then it's not unreasonable to expect to be able to hack something together that could accomplish the specific task at hand, as long as your input is fairly clean
mickcy_ca The end result I am going for is the general case ... although I can see that my original tact would have been very insufficient to the task. 06:28
And re-inventing the wheel is not my idea of fun. 06:29
Does anyone know how to get that those files included in my project? 06:30
raydiak ah...if you're not wanting to write a c parser from scratch, then I'd just use what you found, personally...don't know that the action class would be all that bad to write, for the subset you need 06:31
mickcy_ca That was my thought indeed.
raydiak maybe send him a message on github or something? 06:32
don't know who that is, myself
mickcy_ca Planning to do that.
TimToady or get someone to translate it to P6 for you :) 06:33
mickcy_ca ??
raydiak it is p6
TimToady oh, that is a P6 parser already 06:34
mickcy_ca Exactly ... now back to getting that into my project without adding all those lines to my part of the project. 06:35
TimToady yeah, we should get that into the ecosystem somehow
mickcy_ca Without a github sign in ... is there a way to send anyone a message on github? 06:37
xiaomiao mickcy_ca: unlikely 06:38
mickcy_ca That is what I thought ...
06:38 skids left
mickcy_ca With a github account ... how to send message to a specific user? 06:42
06:42 skids joined
raydiak dug up an e-mail: andjrob [at] gmail.com 06:42
mickcy_ca Thanks. 06:43
raydiak you're welcome 06:44
adu what
that's me
raydiak oh we love your C parser and want it in the ecosystem :)
adu raydiak: sweet
can I help? 06:45
raydiak adu: interested in maintaining it as a module?
adu I just wish it was better/faster/stronger
06:45 dayangkun joined
adu raydiak: yes, what do I do? 06:45
raydiak I think doc.perl6.org/language/modules is most of what you need to know 06:46
adu I haven't spent much time on it lately, but I would imagine to make it a module I would have to separate out the parser from the DROXActions 06:47
raydiak: just to be sure, are you talking about github.com/andydude/droxtools/tree...erl6/lib/C 06:48
raydiak we were looking at gist.github.com/andydude/5268163 that we dug up from the irclogs somewhere :) 06:49
adu oh
that's super old
raydiak well, we don't have a C parser in the ecosystem, so in whatever form, if you'd like to package your work up into a module, it'd be cool to have 06:51
adu raydiak: yeah, I can separate it out from the drox stuff, what should it be called?
raydiak hmmm 06:52
most of the ones I see are Something::Parse/Parser/Parsing 06:53
adu Language::C::Parser?
raydiak is not really all that familiar with the conventions tbh 06:54
not sure if we have any really settled yet anyway, so sure why not? 06:55
06:56 dayangkun left
adu nah, C::Parser is good 06:57
pmichaud m: $_ = 'xyz'; say 'abc' ~~ m/.../; 07:08
+camelia rakudo-moar 80b912: OUTPUT«「abc」␤␤»
07:08 yeahnoob left
pmichaud m: $_ = 'xyz'; say m/.../; 07:08
+camelia rakudo-moar 80b912: OUTPUT«「xyz」␤␤»
adu raydiak: like this? github.com/andydude/p6-c-parser
07:08 skids left
pmichaud m: $_ = 'xyz'; say 'abc' !~~ m/.../; 07:09
+camelia rakudo-moar 80b912: OUTPUT«False␤»
raydiak adu: looks good, lemme try it out
adu raydiak: it's slow and incomplete, just a warning 07:10
pmichaud m: $_ = 'wxyz'; say 'abc' !~~ m/..../; 07:12
+camelia rakudo-moar 80b912: OUTPUT«True␤»
raydiak adu: nice, builds and installs fine here
mickcy_ca raydiak: how do you do that? 07:14
Got the source package, how do I compile and install? 07:15
raydiak mickcy_ca: 'panda install .' iirc
mickcy_ca OK.
07:16 sven_123 left
mickcy_ca Worked here to. 07:17
adu raydiak: best not to throw the linux kernel at it, it's still having trouble with "int main() { return 0; }"
raydiak adu: yeah I don't have a specific use for it atm, was originally just answering questions :) though I did earlier this year want to use p6 to autogen ffi bindings for luajit 07:18
adu that sounds fun
07:19 jluis joined
mickcy_ca adu: Was looking at implement a parser for header files ... turns out I was re-inventing the wheel. 07:19
I get "undeclared routine" when I do use "C::Parser" 07:20
raydiak yeah I had one problem or another with every binding I tried...think it was for 0mq, ended up one-offing a script w/a bunch of regex to do it iirc, but would much rather have a reuasable solution obviously 07:21
pmichaud m: $_ = 'wxyz'; say abc !~~ m/{ .say } ./
+camelia rakudo-moar 80b912: OUTPUT«===SORRY!=== Error while compiling /tmp/Dxp9Qf0EW1␤Undeclared routine:␤ abc used at line 1. Did you mean 'abs'?␤␤»
07:21 yeahnoob joined
pmichaud m: $_ = 'wxyz'; say 'abc' !~~ m/{ .say } ./ 07:21
+camelia rakudo-moar 80b912: OUTPUT«abc␤False␤»
mickcy_ca Ah.
Anyway, it has been a hoot. Good Night Perl 6 07:22
07:22 mickcy_ca left 07:25 darutoko joined
adu github.com/andydude/p6-c-parser/bl.../cdump.pl6 07:25
that's the tool I usually test with
raydiak ah nice 07:26
be aware that things in bin get installed by panda, theoretically into the user's $PATH 07:27
adu is cdump a common name? 07:28
raydiak *shrug*
adu or are you saying that it shouldn't have an extension? 07:30
raydiak not really saying anything specific, just letting you know...I'm not completely sure the place they all get installed to is automatically added to the PATH yet anyway 07:31
I am not an expert, if this wasn't already apparent :) 07:32
adu raydiak: well, that's for the nudge :)
s/that's/thanks/
raydiak you're welcome, thanks for the awesome work, it's kinda intimidating-looking when I came across it 07:33
adu I hope to make it less intimidating with ASTs and PODs, assuming I learn how they work
raydiak adu: a little bit in the README goes a long way too 07:34
adu I should put an experimental warning
raydiak oh and when you have time, a basic front end in C/Parser.pm6, even if it's just a passthrough to .parse like you have in that script, would be cool so people can just "use C::Parser;" 07:35
adu raydiak: I'm not sure I understand 07:36
07:37 sven_123 joined
adu oh, so you can call C::Parse(...) instead of that long thing? 07:37
raydiak much of the time people will expect to be able to load your module simply by passing the namde of your module to 'use'...so making "use C::Parser" do something useful w/out the additional ::StdWhatever part might be worthwhile 07:38
adu oh 07:39
raydiak just prettyness of the API for your users, basically...potentially less to have to remember to type or look up
07:41 bjz joined
raydiak adu: oh anyway, to make this actually part of the ecosystem, you can either ask around when more people are active (next few hours usually) to get added to the perl6 github org, then you'll be abel to commit to the ecosystem list 07:42
adu I'm actually already a member
raydiak oh nice
adu I just haven't done much 07:43
raydiak you can commit to the ecosystem list then
adu where is it?
raydiak github.com/perl6/ecosystem/blob/ma.../META.list
+dalek p: ccb0ef3 | TimToady++ | Configure.pl:
slightly saner default build order
07:44
kudo/nom: 66309df | TimToady++ | Configure.pl:
tweak default build order a bit

I got tired of building the jvm version by accident when I left out the m- bit. :) This way the fast one builds first, and then you can ^C if you don't want the slower platforms.
07:46 skids joined 07:47 sirdancealot joined
raydiak adu: once you've added your module to the ecosystem, in roughly the next hour or two it will appear in the list that panda uses at ecosystem-api.p6c.org/projects.json 07:47
then you can "panda update" followed by "panda install C::Parser", and the rest of us can too 07:48
pmichaud TimToady++ # another island of sanity 07:49
raydiak ( I'd suggest a test or two if you feel like it, too...even just one that 'use's your module and makes sure it loads successfully ) 07:50
07:50 kaleem joined
adu raydiak: I'm on team nqp, I can't make changes to ecosystem 07:53
07:53 lsm-desktop left
raydiak someone get this man a commit bit! (andydude on github) if nobody does by the time I'm back from afk in a few minutes I can add it for you if you like 07:56
moritz commit bit for whom? 07:57
\o #perl6
adu moritz: I'm already a member of nqp, but I'm trying to add my project to the ecosystem
moritz adu: what's your github ID?
adu and apparently you need to be an owner for that
"andydude"
moritz adu: no, it's a separate team; invitation sent 07:58
or added; it seems invitations are only for first joining an organization 07:59
+dalek osystem: e5ea4e9 | (Andrew Robbins)++ | META.list:
Added p6-c-parser to META.list
08:00
adu :)
moritz: thanks 08:01
08:01 skids left
adu I guess I have to write some tests now 08:01
08:03 lsm-desktop joined
TimToady adu++ 08:03
08:03 skids joined
raydiak \o/ adu++ 08:04
adu :) 08:05
raydiak adu: you might want a .gitignore for those .DS_Store files among other things 08:06
adu raydiak: already done
raydiak nice
08:13 mephinet left
raydiak alright past my bedtime...g'night #perl6 08:15
TimToady o/
08:30 virtualsue joined
adu I just updated it 08:30
08:31 Psyche^ joined, mephinet joined, Psyche^ is now known as Psyche 08:32 Psyche is now known as Patterner
+dalek c: b7c434d | moritz++ | lib/Language/regexes.pod:
Be consistent in use of <.ws> (not <ws>)
08:34
08:38 kjs_ joined 08:39 kjs_ left 08:48 avalenn joined 08:49 adu left 08:50 kjs_ joined 08:54 kjs_ left 09:04 Sir_Ragnarok joined
+dalek c: 5607c3d | moritz++ | lib/Language/regexes.pod:
Examples for overriding ws
09:05
09:10 Mso150 joined 09:24 bjz_ joined 09:26 xfix joined, rindolf joined, clkao left 09:27 clkao joined, bjz left
Woodi hallo today :) 09:32
just found: Wolfram Language (ex Mathematica ?) www.youtube.com/watch?v=_P9HqHVPeik 09:33
why that damn thing is not open source ? or at list it's database... :) 09:34
we should do some perl6 interpreter embaded in SDL "display" window...
09:35 mickcy_ca joined
mickcy_ca Has there been any progress on memoization of user subs? 09:35
Woodi also: I think that when someone works with datas separated by \n then using .lines should be first try. not grammar... 09:36
09:48 rurban joined, Guest46108 joined 09:49 Guest46108 is now known as CurtisOvidPoe
CurtisOvidPoe Trying to figure out parsing command line args: gist.github.com/Ovid/8dda7820aca6aec60124 09:49
09:56 yeahnoob left 09:58 mickcy_ca left 10:01 denis_boyun joined 10:03 skids left
FROGGS_ CurtisOvidPoe: we have the same issue when you put Str in the MAIN's signature, and you pass something that looks like an Int but can happily be a Str (because everything you pass could be) 10:07
CurtisOvidPoe So signature handling isn’t very robust yet? 10:08
FROGGS_ RT #119001
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=119001
10:10 rurban1 joined
FROGGS_ I think the problem is that when you call a multi sub from P6, the type of the args are pretty clear, and args from your shell get qualified later, and perhaps wrongish 10:10
and we cannot say that an arg is a Str|Int|Num at the same time
so, it is robust but it does not do what you mean 10:11
CurtisOvidPoe FROGGS_: thank you. Working on a P6 talk and I think I might leave the argument handling out then (not sure).
lue FROGGS_: we could if things like IntStr were implemented :) .
10:12 kjs_ joined 10:13 camelia left, nine left
FROGGS_ CurtisOvidPoe: that kinda works: 10:14
-sub MAIN(Real $num where { 0 <= $_ < 1 }, Int :$bits = 32) {
+sub MAIN($num as Num where { 0 <= $_ < 1 }, :$bits = 32) {
though if you pass something that cannot be turned into a Num: 10:15
$ perl6-m gistfile1.pl a
Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏a' (indicated by ⏏)
CurtisOvidPoe That at least makes sense :)
So, how would I add a “> 0” constraint to $bits and still have a default? Is that possible? 10:16
moritz m: subset Positive of Cool where * > 0; sub with-default(Positive :$bits = 32) { say $bits }; with-defaults; with-defaults bits => '64'; 10:19
huh, where's camelia?
10:19 camelia joined 10:20 virtualsue left
moritz m: subset Positive of Cool where * > 0; sub with-default(Positive :$bits = 32) { say $bits }; with-defaults; with-defaults bits => '64'; 10:20
$ perl6-m -e 'subset Positive of Cool where * > 0; sub MAIN(Positive :$bits = 32) { say $bits }' 10:21
32
10:22 ChanServ sets mode: +v camelia
+camelia rakudo-moar 80b912: OUTPUT«(timeout)» 10:22
moritz m: say 42
+camelia rakudo-moar 80b912: OUTPUT«42␤»
moritz hthe server has a load of 17
*the 10:23
FROGGS_ std: sub MAIN($num as Num where { 0 <= $_ < 1 }, Int :$bits is rw where ( $bits ||= 32 > 0 )) { } # does not work in rakudo 10:24
+camelia std f9b7f55: OUTPUT«===SORRY!===␤Unable to parse signature at /tmp/Oq63vY_n20 line 1:␤------> sub MAIN⏏($num as Num where { 0 <= $_ < 1 }, Int ␤Couldn't find final ')'; gave up at /tmp/Oq63vY_n20 line 1:␤------> sub MAIN($num …»
CurtisOvidPoe Why would I use Cool instead of Int? 10:25
Oh, I guess that was just an example.
moritz CurtisOvidPoe: I was unsure how well MAIN coerces types automatically
CurtisOvidPoe: but it seems Int also works here
10:28 mvuets joined
FROGGS_ std: sub MAIN ($num as Num) { } # is std broken? 10:28
+camelia std f9b7f55: OUTPUT«===SORRY!===␤Unable to parse signature at /tmp/dRrjFPStyS line 1:␤------> sub MAIN ⏏($num as Num) { } # is std broken?␤Couldn't find final ')'; gave up at /tmp/dRrjFPStyS line 1:␤------> sub MAIN ($num ⏏…»
CurtisOvidPoe Thanks! That works great. Also, what’s the difference between using * and $_ in a subtype?
FROGGS_ $_ can be used in a block as a closure, and * in a ( ) makes a closure for you 10:29
m: say <a b c>.grep(* eq 'b')
+camelia rakudo-moar 80b912: OUTPUT«b␤»
FROGGS_ m: say <a b c>.grep({$_ eq 'b'}) # it turns into that
+camelia rakudo-moar 80b912: OUTPUT«b␤»
CurtisOvidPoe So in the subset moritz wrote, the () was implicit? 10:31
FROGGS_ I think so 10:32
well, the ( ) is needed for invoking the grep... it is not needed per se
m: say * * 42 10:33
+camelia rakudo-moar 80b912: OUTPUT«WhateverCode.new()␤»
FROGGS_ m: my &foo = * * 42; say foo 11 10:34
+camelia rakudo-moar 80b912: OUTPUT«462␤»
mvuets m: say (* * *)(2, 3)
+camelia rakudo-moar 80b912: OUTPUT«6␤»
FROGGS_ aye, there you need the parens for parsing * * * as a statement of its own 10:35
moritz CurtisOvidPoe: the * is just a short way to write a closure, where the * stands for a parameter
CurtisOvidPoe: so * > 0 is basically the same as { $_ > 0 } or -> $x { $x > 0 }
FROGGS_ or { $^a > 0 } 10:36
CurtisOvidPoe Thanks all :)
FROGGS_ pleasure :o)
CurtisOvidPoe Trying to write a Perl 6 talk for FOSDEM showing that Perl 6 is easy to use and safer than most dynamic languages. Mostly this seems true, but some implementation gotchas are tripping me up. 10:38
moritz CurtisOvidPoe: please report them (rakudobug@perl.org) so that we have a chance to fix them 10:39
:q
hugme hugs moritz, good vi(m) user!
moritz EWRONGWINDOW 10:40
CurtisOvidPoe Just want to touch base here, first, to make sure I’m not being an idiot :)
And it looks like the command line issue is already known.
moritz that's fine too
FROGGS_ to be fair, the 'as Type' trait seems a pretty sane way to do it 10:41
CurtisOvidPoe Is there a difference between “Num $foo” and “$foo as Num”?
FROGGS_ m: sub foo($a as Num) { }; sub foo(Str $s) { }; say foo("bar") 10:42
+camelia rakudo-moar 80b912: OUTPUT«===SORRY!=== Error while compiling /tmp/ZuvzzEOrq5␤Redeclaration of routine foo␤at /tmp/ZuvzzEOrq5:1␤------> foo($a as Num) { }; sub foo(Str $s) { }⏏; say foo("bar")␤ expecting any of:␤ horizontal…»
FROGGS_ m: multi foo($a as Num) { }; multi foo(Str $s) { }; say foo("bar")
+camelia rakudo-moar 80b912: OUTPUT«Nil␤»
FROGGS_ hmmm
ahh, it is fine in this case because the second foo is preferred over the first with the implicit Any 10:43
Num $foo will really only be considered if you pass something that is Num (or something that has Num as a parent)... 10:44
$foo as Num really is 'Any $foo as Num', so depending on your other multi candidates the 'Any' will matter 10:45
I'm not sure I can come up with a good example though 10:46
moritz CurtisOvidPoe: 'as Num' is a coercion (and deprecated in favor for a syntax not yet impelemented), 'Num $x' is a type constraint
CurtisOvidPoe Thank you. 10:47
pnu NativeCall test is failing [ testers.perl6.org/report/recent/5100 ] So... just adding a whitespace is the correct fix? github.com/pnu/zavolaj/commit/f8f4...e32dda2738 .. broken since a recent change in Grammar. Sorry, I'm just guessing the syntax to get my tests run ok. ;-)
moritz the new thing is sub foo(Any(Num) $x) { } where Any is the type that is accpeted, and Num the type being coerced to
CurtisOvidPoe Why is “as Num” being deprecated. I thought that syntax was there for a long time. The Any(Num) $x seems strange 10:49
(At least to me)
moritz CurtisOvidPoe: the Any(Num) exposes coercions as first-class objects (at least that's the reason I can remember) 10:50
10:53 Mso150 left 10:55 Alula left, Alula joined, camelia left 10:56 camelia joined 10:57 ChanServ sets mode: +v camelia 11:01 dakkar joined 11:02 psch joined
psch hi #perl6 \o 11:02
moritz \p psch 11:04
pnu: yes, I think that fix is correct 11:05
.tell nine I've moved the camelia.service to camelia@.service (template) and have started two instances, one for freenode, one for magnet 11:06
+yoleaux moritz: I'll pass your message to nine.
dakkar what's the idiomatic way to import a sub across packages? package One { our sub foo {...} }; package Two { our sub foo(|x) { One::foo(|x) } } ? 11:07
11:07 spider-mario joined
dakkar or something with binding? 11:07
moritz m: package One { sub foo is export { } }; import One; foo() 11:08
+camelia ( no output )
dakkar yes
I may have written my question badly
moritz m: module A { our sub b { say 42 } }; constant &alias = &A::b; alias()
+camelia rakudo-moar 80b912: OUTPUT«42␤»
dakkar aha! yes, that's the answer I was looking for 11:09
moritz dakkar: 'our' subs are nearly always unidiomatic in Perl 6
dakkar hm
moritz exporting/importing exists, and is lexical, and much sane
*saner
and analyzable at compile time
and more understanble wrt shadowing
and so on
dakkar I'm porting a js library, I'd like to keep the function names, and many of them are very short ("header","authorize") 11:10
they're functions, not methods, there's no state anywhere
so I thought of requiring them to be called with the full package name, to make the names non ambiguous 11:11
moritz does it make sense for them to be function in Perl 6 land? 11:13
dakkar what else could they be? class methods? methods on stateless singleton objects? 11:15
+dalek volaj: f8f4e1b | (Panu Ervamaa)++ | t/08-callbacks.t:
use whitespace to define subsignature for unpacking

see rakudo/rakudo@dd5687cc9fb96ce175799090675fcb6bdc3dd067
volaj: e102c8e | moritz++ | t/08-callbacks.t:
Merge pull request #54 from pnu/master

use whitespace to define subsignature for unpacking
moritz dakkar: class methods, or ordinary methods (if you change the interface a bit)
psch o/ moritz
moritz dakkar: though if functions make sense, then by all means, go for functions
dakkar I'm never sure what the conceptual difference is, between class methods, methods on singletons, and namespaced functions 11:16
they're all the same thing to me…
psch m: module Foo { module Bar is export { sub baz { } } }; use Foo; Bar::baz
+camelia rakudo-moar 80b912: OUTPUT«===SORRY!===␤Could not find Foo in any of: /home/camelia/rakudo-inst-1/languages/perl6/lib, /home/camelia/rakudo-inst-1/languages/perl6␤»
psch m: module Foo { module Bar is export { sub baz { } } }; import Foo; Bar::baz
+camelia rakudo-moar 80b912: OUTPUT«Could not find symbol '&baz'␤ in method <anon> at src/gen/m-CORE.setting:13871␤ in any find_method_fallback at src/gen/m-Metamodel.nqp:2737␤ in any find_method at src/gen/m-Metamodel.nqp:988␤ in block <unit> at /tmp/Ht4cVaH3vl:1␤␤» 11:17
psch oh our of course
m: module Foo { module Bar is export { our sub baz { } } }; import Foo; Bar::baz
+camelia ( no output )
moritz dakkar: the difference between subs and methods is that methods fall back to parent classes
m: class A { method x() { 42 }; class B is A { }; B.x
+camelia rakudo-moar 80b912: OUTPUT«===SORRY!=== Error while compiling /tmp/MSmOsJQcc3␤Unable to parse expression in block; couldn't find final '}' ␤at /tmp/MSmOsJQcc3:1␤------> method x() { 42 }; class B is A { }; B.x⏏<EOL>␤ expecting any of…»
dakkar yes, obvs 11:18
moritz m: class A { method x() { 42 }; class B is A { }; B.x()
+camelia rakudo-moar 80b912: OUTPUT«===SORRY!=== Error while compiling /tmp/TqwyD6fxsA␤Unable to parse expression in block; couldn't find final '}' ␤at /tmp/TqwyD6fxsA:1␤------> thod x() { 42 }; class B is A { }; B.x()⏏<EOL>␤ expecting any of…»
moritz too dumb
m: class A { method x() { 42 } ]; class B is A { }; B.x()
+camelia rakudo-moar 80b912: OUTPUT«===SORRY!=== Error while compiling /tmp/SlvJexee0u␤Unable to parse expression in block; couldn't find final '}' ␤at /tmp/SlvJexee0u:1␤------> class A { method x() { 42 } ⏏]; class B is A { }; B.x()␤ expecti…»
moritz m: class A { method x() { 42 } }; class B is A { }; B.x()
+camelia ( no output )
moritz and the difference between singleton methods and class methods is that in the latter case, the type object it the singleton object 11:19
dakkar when I started porting this thing, to p5, the functions were ported to methods on normal objects, and all dependencies were on default-constructed attributes (i.e. DI all the way)
then I realised that this is a cryptographic authentication library 11:20
I really don't want people swapping the crypto implementation inside my authentication objects
not trivially, at least
11:20 sirdancealot left 11:22 virtualsue joined
pnu moritz: ok, thanks! 11:27
BTW, I patched Panda::Tester to capture the prove stderr (for the reports posted to testers.perl6.org). Is there a better way to do this: pipe("... 2>&1", :r) ... since that depends on shell etc.
psch m: sub f { @_[0] = "baz" }; say f "foo"
+camelia rakudo-moar 80b912: OUTPUT«baz␤»
11:28 skids joined
psch (that's #71112, fyi) 11:28
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...l?id=71112
sergot hi o/
psch o/ sergot
pnu I couldn't find any documentation about that stderr capture thing, except a comment on S32 .. XXX how to specify "2>&1"?
11:28 sirdancealot joined 11:34 telex left, bjz_ left 11:36 telex joined
moritz pnu: I think everybody wants a better way, and nobody has designed and implemented a better way 11:37
pnu ah, ok. :)
11:41 lue left 11:43 bjz joined
+dalek kudo/nom: e9ea2dc | usev6++ | src/ (2 files):
Add typed exception X::Syntax::AddCategorial::MissingSeparator

would be used in test for RT #86906
11:45
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...l?id=86906
+dalek kudo/nom: 84ed035 | FROGGS++ | src/ (2 files):
Merge pull request #343 from usev6/nom

Add typed exception X::Syntax::AddCategorial::MissingSeparator
11:51 andreoss joined 11:54 lue joined 11:56 virtualsue left, jk_ joined 12:09 rurban1 left 12:12 virtualsue joined 12:13 rurban left 12:16 mr-foobar left 12:20 spider-mario left 12:23 bjz left 12:27 fhelmberger joined 12:30 bjz joined, BenGoldberg joined 12:32 bjz left 12:48 spider-mario joined 12:49 xfix left 12:54 BenGoldberg left 12:55 Ven joined 12:58 xfix joined 13:03 Ven left 13:06 jk_ left 13:08 skids left 13:18 rindolf left 13:24 hugme left, Ven joined 13:25 synopsebot left, [Coke] left, [Coke] joined, Juerd left 13:27 Juerd joined, kaare_ left 13:28 synopsebot joined 13:29 hugme joined, ChanServ sets mode: +v hugme 13:32 kjs_ left 13:40 skids joined 13:49 fhelmberger left, DarthGandalf left
+dalek ast/glr: 0b78b09 | moritz++ | S (6 files):
start to get rid of Parcel
13:56
ast/glr: 5374215 | moritz++ | S (6 files):
Remove more mentions of Parcel
13:56 kjs_ joined 13:59 DarthGandalf joined
moritz m: say ((1, 2), (3, 4)).elems 14:00
+camelia rakudo-moar 80b912: OUTPUT«2␤»
moritz m: say elems((1, 2), (3, 4))
+camelia rakudo-moar 80b912: OUTPUT«Cannot call 'elems'; none of these signatures match:␤:(Any $a)␤ in block <unit> at /tmp/hcqxIPd_Xu:1␤␤»
moritz m: say elems ((1, 2), (3, 4))
+camelia rakudo-moar 80b912: OUTPUT«2␤»
14:00 hugme left 14:01 synopsebot left
moritz m: say 3.join('|') 14:02
+camelia rakudo-moar 80b912: OUTPUT«3␤»
14:04 synopsebot joined, kjs_ left 14:05 hugme joined, ChanServ sets mode: +v hugme
+dalek ast/glr: b92b2f1 | moritz++ | S02-lists/flattening.t:
Tests for list (non-)flattening
14:07
14:12 andreoss left
FROGGS_ moritz: you are changing the tests according to pmichaud++'s blog post? 14:15
moritz FROGGS_: in a branch, yes 14:16
FROGGS_: at least a few of them :-)
FROGGS_ were there news about glr recentish?
moritz no
+dalek Iish: d9cbfa8 | moritz++ | / (3 files):
Switch from .map to .for

  .map will change its behavior to not flatten, while .for will stay
as it is now. See pmthium.com/2014/10/apw2014/ for reference
FROGGS_ k
moritz .ask pmichaud if there's anything I can do to help get the GLR started? 14:17
+yoleaux moritz: I'll pass your message to pmichaud.
colomon moritz++: big patch there for ABC! 14:18
14:18 yubimusubi is now known as Possum
moritz colomon: just the result of git grep -l '\.map' | xargs perl -i -pe 's/\.map/.for/g' 14:18
... + review
colomon how long has .for been working? 14:19
moritz colomon: a few months; checking... 14:20
2014-10-25
colomon oooo, I think I can use the patch then! 14:21
colomon will be very happy when rakudo's pre-comp issues are fixed
merged and functional. moritz++ 14:30
14:45 raiph joined
+dalek kudo/nom: 7104f00 | moritz++ | src/core/Range.pm:
Add eqv operator for ranges

previously, eqv of two ranges fell back to reifying the ranges, which could be rather big waste of resources
14:45
psch argh 14:46
14:46 kjs_ joined
psch i have a case of "it works with debug output" in P6Regex :/ 14:46
ohh 14:47
no
i have a stupid instead :)
14:53 kaare_ joined 14:55 sirdancealot left
[Coke] .u ¬ 14:58
+yoleaux U+00AC NOT SIGN [Sm] (¬)
14:58 kjs_ left
lizmat ,ask jnthn what's the difference between nqp::queuepoll($!queue) and nqp::atpos($!queue,0) ? 15:00
.ask jnthn what's the difference between nqp::queuepoll($!queue) and nqp::atpos($!queue,0) ?
+yoleaux lizmat: I'll pass your message to jnthn.
15:01 kjs_ joined
colomon m: my $a = ""; $a .= "hello" 15:02
+camelia rakudo-moar 80b912: OUTPUT«===SORRY!=== Error while compiling /tmp/gpkuNf8Gxi␤Quoted method name requires parenthesized arguments. If you meant to concatenate two strings, use '~'.␤at /tmp/gpkuNf8Gxi:1␤------> my $a = ""; $a .= "hello"⏏<EOL>…»
colomon m: my $a = ""; $a .= "N"
+camelia rakudo-moar 80b912: OUTPUT«===SORRY!=== Error while compiling /tmp/J64KjNHb6M␤Quoted method name requires parenthesized arguments. If you meant to concatenate two strings, use '~'.␤at /tmp/J64KjNHb6M:1␤------> my $a = ""; $a .= "N"⏏<EOL>␤»
colomon huh. not getting that error message in my code.
oh well, at least I figured out the problem.
lizmat m: my $a = ""; $a .= "hello"() # just curious 15:03
+camelia rakudo-moar 80b912: OUTPUT«No such method '' for invocant of type 'Str'␤ in method dispatch:<.=> at src/gen/m-CORE.setting:1322␤ in block <unit> at /tmp/wcmIPMGnEf:1␤␤»
15:03 kjs_ left
moritz shouldn't it complain about method 'hello' not existing? 15:03
m: my $a = 'ab'; $a .= 'uc'(); say $a
+camelia rakudo-moar 80b912: OUTPUT«No such method '' for invocant of type 'Str'␤ in method dispatch:<.=> at src/gen/m-CORE.setting:1322␤ in block <unit> at /tmp/emkubaseXS:1␤␤»
moritz this looks rather broken to me 15:04
colomon that's closer to the error I was getting
15:05 kaleem left
moritz p: my $a = 'ab'; $a .= 'uc'(); say $a 15:07
+camelia rakudo-parrot 80b912: OUTPUT«No such method '' for invocant of type 'Str'␤ in method dispatch:<.=> at gen/parrot/CORE.setting:1325␤ in block <unit> at /tmp/FMjhQM0mZV:1␤␤»
lizmat .tell jnthn please ignore: at_pos blocks, queuepoll doesn't
+yoleaux lizmat: I'll pass your message to jnthn.
lizmat just noticed mixed usage of "multi sub" vs "multi" in the settings 15:13
fwiw, I would prefer "multi sub" for easier greppability
moritz too 15:18
colomon +1 15:21
lizmat will then do so in a mo 15:22
15:22 zakharyas joined 15:24 kjs_ joined 15:28 rindolf joined
+dalek kudo/nom: 5fe1f4d | lizmat++ | src/core/Channel.pm:
Change unlimited map back to a gather/take

Should be the same with less overhead
15:28
15:30 kjs_ left 15:33 integral left 15:34 kjs_ joined
moritz huh? I always thought map had less overhead than gather/take? 15:38
nwc10 to the batmobile^Wprofiler? 15:39
15:40 mr-foobar joined 15:41 carlin_ left
lizmat moritz: that was an unlimited map, as in (1..Inf).map(&code) 15:42
lumimies What does the * in 'earliest { more *' mean?
lizmat whatever, as in any queue 15:43
15:43 integral joined, integral left, integral joined
lizmat moritz: is there a difference between 'my &foo := -> | { ... }' and 'sub foo(|) {...}' ? 15:48
I can't think of any, so wonder why that idiom is used in the setting 15:49
TimToady Block vs Routine
lizmat aha... hmmm... performance reasons, or "return" behaviour ? 15:50
TimToady or possibly immutable vs wrappable
lizmat I see that 'take' on the JVM is implemented as a my &foo ->, and as a sub anywhere else
hmmm... maybe related to #122732 15:51
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=122732
15:52 jluis left
lizmat ok, won't touch that then 15:52
TimToady CurtisOvidPoe: coercion is not really what we're aiming for with the command line in any case; instead, we want certain kinds of text (such as command line arguments) to automatically become allomorphic 16:00
basically, anywhere you're forced to represent numbers as text, we'd assume it might be either of those that you intend 16:01
CurtisOvidPoe @TimToady: OK, thanks for the clarification!
TimToady so instead of always coming in as Str, you might get an IntStr, or a RatStr, or a NumStr
or even a ComplexStr
so this applies not just to command-line args, but also to what you get from a prompt, or what you get from < 1 2.3 22/3 foo > 16:02
16:02 dakkar left
TimToady with the weights set up such that an IntStr would prefer to dispatch to an Int, but can act like a Str at need, and reproduce the original string 16:03
CurtisOvidPoe Just to be clear, that won’t result in cases where “7apples” +1 gives 8, will it? 16:04
TimToady and there's supposed to be a val() function that produces these things 16:05
no, that's still an error
CurtisOvidPoe Cool!
TimToady n: .WHAT.say for < 1 2.3 1+2i foo > 16:06
+camelia niecza v24-109-g48a8de3: OUTPUT«(IntStr)␤(RatStr)␤(ComplexStr)␤(Str)␤»
TimToady niecza implements this already
n: .WHAT.say for < 1 2.3 1+2i foo 7apples >
+camelia niecza v24-109-g48a8de3: OUTPUT«(IntStr)␤(RatStr)␤(ComplexStr)␤(Str)␤(Str)␤»
pnu moritz: thanks, Task::Star tests run now without failures .. full panda smoke log still gives 20 references to "Shape declaration with () is reserved".. I'll try to hunt them down, at least for cases where that is the only error. 16:15
psch m: say "Ab" ~~ /A :i B/ # RT #77064 16:21
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...l?id=77064
+camelia rakudo-moar 80b912: OUTPUT«Nil␤» 16:22
psch what i have found out is that Regex.subtype gets lost somewhere
i'm not sure if it's in P6Regex.termish or in qbuildsub though
TimToady: do you have a hint re that? ^^^
TimToady dunno offhand 16:23
definitely looks like a bug though
moritz I wonder if it's some literal optimization 16:24
psch n: say "Ab" ~~ /A :i B/ # RT #77064
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...l?id=77064
+camelia niecza v24-109-g48a8de3: OUTPUT«「Ab」␤␤»
psch moritz: i'd think so. concat is involved
moritz m: say 'Ab' ~~ /[A|A] :i [B|B]/
+camelia rakudo-moar 80b912: OUTPUT«「Ab」␤␤»
psch m: say "Ab" ~~ /A [:i B]/ # works too
+camelia rakudo-moar 80b912: OUTPUT«「Ab」␤␤»
TimToady probably a scoping issue with %*RX or some such
psch from what i can see, :i alone doesn't produce a Regex.node 16:25
err, QAST::Regex that is
TimToady: i don't think so, dumping %*RX<i> looks as it should
TimToady well, have the apppriate amount of fun :D 16:26
*pprop 16:27
psch right :) 16:28
moritz yes, it creates an QAST::Regex(:rxtype<scan>) with child 'AB'
TimToady oh, the literal concat optimization is ignoring :i I guess
you can't really concat if there's a policy shift in the middle 16:29
moritz: but you said that already :)
moritz $ ./nqp-m -e 'say("Ab" ~~ /A :i B/)' 16:30
Substring length (-3) cannot be negative
TimToady psch: and so did you
TimToady: go get some more coffee...
16:32 mvuets left
+dalek kudo/nom: 310efb2 | lizmat++ | src/core/ (24 files):
multi -> multi sub for easier grep/ackability
16:33
moritz ok, the bug is in NQP too 16:36
and I can't seem to find the code that does the concat optimization :( 16:41
16:41 davido_ left
+dalek p: 614f229 | moritz++ | src/QRegex/P6Regex/Actions.nqp:
Fix indention
16:42
16:42 davido_ joined
moritz and the code that adds the literal to the nqp::scan opcode already gets the wrong one 16:43
psch moritz: method atom adds the correct subtype, that much i could find out 16:48
nevermind that, i just checked if %*RX<i> is set there 16:49
at least that's what my current code does, i've lost track a bit the last few moments
anyway, gtg. will have another look later though, if neccessary o/ 16:51
TimToady oh, lue++ for pointing out the IntStr in the backlog already 16:52
16:55 psch left 16:57 ptc_p6 joined
TimToady moritz: the coercion syntax is Num(Any), not Any(Num). it looks just like a normal Num($x) coercion, except you put the incoming type inside instead of the incoming data 16:58
moritz TimToady: I guess I'll only start remembering it when I can use it
TimToady or another way to think of it is that the type outside the parens is the actual type of the variable 16:59
my Num() $x = $stuff;
$x is really a Num, not a Cool or Any
the parens say "oh, btw, I'll also accept this type", which is why it makes sense to default to something like Any or Cool 17:00
TimToady doesn't remember offhand which we picked 17:01
+dalek kudo/nom: 63875df | lizmat++ | src/core/ (73 files):
Remove trailing whitespace

Clean with git diff --ignore-space-at-eol
17:02
17:02 ptc_p6 left
TimToady I guess we picked Any 17:02
on the assumption that the user might define a coercion that goes from Any to MyType 17:03
and we already coerce Cool in a lot of places implicitly, though not in binding
moritz ok, I have a fix for the regex concat bug
TimToady \o/ 17:04
lizmat hmmm....Inline::Perl5 no longer builds 17:05
Shape declaration with () is reserved;
FROGGS_ also missing whitespace? 17:06
moritz probably
I have a commit bit, so should be able to fix pretty quickly
TimToady likelier than a missing colon, since that is NYI
lizmat &free_p6_object⏏(Int)) # so yes, I think missing whitespace? 17:07
FROGGS_ std: sub MAIN ($num as Num) { }
+camelia std f9b7f55: OUTPUT«===SORRY!===␤Unable to parse signature at /tmp/fHMnzEQDuK line 1:␤------> sub MAIN ⏏($num as Num) { }␤Couldn't find final ')'; gave up at /tmp/fHMnzEQDuK line 1:␤------> sub MAIN ($num ⏏as Num) { }[…»
FROGGS_ TimToady: is that known to fail?
TimToady that one would be a :(Int)
FROGGS_ or... does std already know the new syntax?
moritz FROGGS_: the 'as' coercion syntax is deprecated
lizmat m: sub foo {}; &foo(Int)
+camelia rakudo-moar 80b912: OUTPUT«Too many positionals passed; expected 0 arguments but got 1␤ in sub foo at /tmp/O_0BShoJ0q:1␤ in block <unit> at /tmp/O_0BShoJ0q:1␤␤»
moritz std: sub f(Int(Any) $x) { }
+camelia std f9b7f55: OUTPUT«Potential difficulties:␤ $x is declared but not used at /tmp/JE5pkfa9MG line 1:␤------> sub f(Int(Any) ⏏$x) { }␤ok 00:00 139m␤»
FROGGS_ ahh, now I understand
lizmat m: sub foo {}; &foo (Int) 17:08
+camelia rakudo-moar 80b912: OUTPUT«===SORRY!=== Error while compiling /tmp/1EEEeMOq3w␤Two terms in a row␤at /tmp/1EEEeMOq3w:1␤------> sub foo {}; &foo ⏏(Int)␤ expecting any of:␤ infix stopper␤ infix or meta-infix␤ …»
TimToady that one wahts &foo:(Int)
*n
+dalek p: b924e93 | moritz++ | / (2 files):
Fix over-eager regex concat optimization
TimToady oh, depends on what you mean
if you really want to call &foo, the &foo(Int) 17:09
but that syntax is reserved in a signature now
lizmat I was just pasting the place of the error in Inline::Perl5
moritz uhm, Inline-Perl5 passes all tests there
*here 17:10
lizmat with latest rakudo ?
moritz This is perl6 version 2014.12-46-g7fca945 built on MoarVM version 2014.12
too old?
seems we are at 60
lizmat 2014.12-60-g7104f00 b
yup
and that change was done by TimToady like yesterday ? 17:11
dd5687cc9fb96ce175799090675fcb6bdc3dd067 if I'm not mistaken ?
moritz ok, rebootstrapping
17:12 kjs_ left
TimToady intentionally broke the omelette eggs last night because &foo(stuff) is terribly ambiguous in a signature 17:13
moritz just adding the colon breaks stuff :( 17:14
Type check failed in binding $sig; expected 'Signature' but got 'Any'
TimToady if it was a subsignture, you want space instead 17:15
moritz it was meant as a type declaration of a callback
TimToady then it should be :, and we should fix it if it's busted
moritz then I fixed nativecall incorrectly 17:16
(added spaces)
but when I fix it, I get the same error 17:17
17:18 denis_boyun left
TimToady m: sub foo (&bar:(Int)) { say bar(-42) }; sub baz(Int $i) { abs $i }; foo(&baz) 17:18
+camelia rakudo-moar 80b912: OUTPUT«42␤»
TimToady seems to work here
m: sub foo (&bar(Int)) { say bar(-42) }; sub baz(Int $i) { abs $i }; foo(&baz) 17:19
+camelia rakudo-moar 80b912: OUTPUT«Too few positionals passed; expected 1 argument but got 0 in sub-signature of parameter &bar␤ in sub foo at /tmp/1NYvUYnMkh:1␤ in block <unit> at /tmp/1NYvUYnMkh:1␤␤»
17:19 virtualsue left
moritz TimToady: NativeCall.pm6 explicitly checks for subsignatures 17:19
my $info := param_list_for($p.sub_signature, :with-typeobj)
how do I access the : thingy?
TimToady m: sub foo (&bar(Int $i)) { say bar(-42) }; sub baz(Int $i) { abs $i }; foo(&baz) 17:21
+camelia rakudo-moar 80b912: OUTPUT«Too few positionals passed; expected 1 argument but got 0 in sub-signature of parameter &bar␤ in sub foo at /tmp/Z8exoseBcu:1␤ in block <unit> at /tmp/Z8exoseBcu:1␤␤»
TimToady I guess camelia is still the old version
moritz yes, it's old 17:22
does the : thingy compile to a subset constraint?
TimToady it should be considered part of the longname for parsing purposes 17:23
moritz because that's not introspectable
nativecall needs to introspect the thing to find out how to compile the callback
and that works for subsignatures, but not for cod-y type constraints 17:24
17:25 andreoss joined
andreoss i wanna do something like my @x := [1, @x] 17:26
how is it done?
moritz @x.unshift: 1 17:27
@x = 1, @x
TimToady maybe andreoss is asking for a recursive structure
moritz unless you want something else, in which case you should say verbally what you want
for something recursive, you must take care that @x on the RHS doesn't get flattened out, so [1, $@x] 17:28
TimToady or do something like: @x[1] := @x; 17:29
but note that .perl doesn't handle recursion yet 17:30
andreoss moritz: in haskell ones = 1 : ones is called a list, no special name
TimToady m: constant foo = 1, foo; # supposed to work, but doesn't yet 17:31
geekosaur haskell is lazy by default; perl 6 isn't
+camelia rakudo-moar 80b912: OUTPUT«===SORRY!===␤Cannot invoke null object␤»
TimToady perl6 lists are lazy by default 17:32
hopefully this is one of the things that gets fixed in the GLR 17:33
the pseudo-assignment of a constant needs to be definitional, not operational
moritz andreoss: constant ones = 1 xx *; 17:34
TimToady that's not really the point :P
we ought to be able to use this for hamming numbers 17:35
moritz my point is to Perl 6 tools for solutions in Perl 6 space
and that's usually the series operator for these kinds of problems
but in this case, xx is enough
TimToady constant hamming = 1, squish hamming »*» 2 M hamming »*» 3 M hamming »*» 5; 17:39
assuming M is a suitably defined merge infix
well, except hypers are eager, oops 17:40
so instead:
constant hamming = 1, squish (hamming X* 2) M (hamming X* 3) M (hamming X* 5); 17:41
moritz m: say squish 1, 2, 3 17:42
+camelia rakudo-moar 80b912: OUTPUT«1 2 3␤»
moritz m: say squish 1, 2, 3, 1
+camelia rakudo-moar 80b912: OUTPUT«1 2 3 1␤»
moritz m: say squish 1, 2, 3, 1, 1
+camelia rakudo-moar 80b912: OUTPUT«1 2 3 1␤»
TimToady where "suitably define" means monotonic, but not strictly so 17:43
so squish is sufficient to remove dups 17:44
but our list implementation is assuming it already knows the length of the list somewhere where it shouldn't be assuming that 17:45
one of those introspection-is-wrong things, probably, rather than just asking for the next value 17:46
or it's cloning something that shouldn't be cloned
or it's cloning it without maintaining the lazy bits correctly
TimToady goes back to thinking about callback sigs 17:50
stealing the subsig syntax for callback sigs is kind of wrongish, since we could conceiably have a type that is both Callable and Positional 17:51
m: say &foo:(Int) 17:53
+camelia rakudo-moar 80b912: OUTPUT«===SORRY!=== Error while compiling /tmp/KjZdU7aras␤You can't adverb that␤at /tmp/KjZdU7aras:1␤------> say &foo:(Int)⏏<EOL>␤»
TimToady n: say &foo:(Int)
+camelia niecza v24-109-g48a8de3: OUTPUT«===SORRY!===␤␤Action method fakesignature not yet implemented at /tmp/sPu5elhHbg line 1:␤------> say &foo:(Int⏏)␤␤Action method sigterm not yet implemented at /tmp/sPu5elhHbg line 1 (EOF):␤------> [3…»
17:54 andreoss left 17:55 andreoss joined
TimToady so I guess it parses under the fakesignature rule 17:56
we "just" need to copy that out into the function's attributions somehow
well, it wants to be considered part of the function type, really 17:57
and NativeCall wants to be introspecting the function type, not the signature 17:58
though as a temporary expedient we could poke the fakesignature into the subsig till we can do it right 17:59
+dalek kudo/nom: 31210cb | lizmat++ | src/core/CompUnitRepo/Locally.pm:
Add path-spec convenience method
18:03
18:05 fhelmberger joined 18:06 Ven left, lue left, Ven joined
andreoss paste.fedoraproject.org/164354/96280614 18:07
is it possible to run this function on infinite list?
when |@x is applied as argument a list is eagerly evaluated ? 18:08
+dalek rl6-roast-data: b7c8336 | coke++ | / (5 files):
today (automated commit)
18:10
[Coke] looks like moar-jit died on osx today.
+dalek kudo/nom: f283710 | TimToady++ | src/Perl6/Grammar.nqp:
allow &foo:(Int) param to parse as subsig for now
18:11
TimToady moritz: ^^^ temporary workaround if we add colon
[Coke] re-running the build to see what failed. 18:12
18:12 Mso150 joined
andreoss m: sub foo(*@x) {@x[^3].perl.say}; my @x := 1...*; foo(|@x); 18:13
+camelia rakudo-moar 80b912: OUTPUT«()␤»
18:14 hagiri joined
andreoss m: my @x := 1...*; say(|@x); 18:16
+camelia rakudo-moar 80b912: OUTPUT«␤»
18:16 sqirrel_ joined
TimToady btw, this is perhaps a good argument to include NativeCall with the compiler, so we can test it in roast 18:16
18:17 dg joined
TimToady m: say 1...* 18:17
+camelia rakudo-moar 80b912: OUTPUT«1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 8…»
TimToady andreoss: looks like a bug 18:18
18:18 dg left, dg joined
andreoss TimToady: what if i want to pass a lazy list (possibly infinite) as a list of argument to function? 18:18
TimToady if NativeCall had been in roast, I wouldn't have made that omelette last night in quite that way 18:19
andreoss: it's supposed to work
I don't know why it didn't
n: my @x := 1...*; say(|@x); 18:20
probably too eager...
+camelia niecza v24-109-g48a8de3: OUTPUT«(signal SEGV)»
TimToady yeah
lizmat so what would be a reason not to include NativeCall in core ?
18:20 lue joined
[Coke] "I never use it, why is it bundled?" 18:22
TimToady might make it easier to have a POSIX module in core...
18:24 raiph left
TimToady if that's an argument for, rather than against :) 18:24
CurtisOvidPoe Night all … 18:25
TimToady o/
CurtisOvidPoe And thanks for the help!
18:25 CurtisOvidPoe left
TimToady m: sub foo(*@stuff) { say @stuff }; my @x := 1...*; foo(|@x) 18:26
+camelia rakudo-moar 80b912: OUTPUT«␤»
TimToady m: sub foo(*@stuff) { say @stuff }; my @x := 1...*; foo(@x)
+camelia rakudo-moar 80b912: OUTPUT«1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 8…»
TimToady m: my @x := 1...*; say(@x);
+camelia rakudo-moar 80b912: OUTPUT«1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 8…»
TimToady andreoss: I guess the short answer is: don't use | there
m: sub foo(@stuff) { say @stuff }; my @x := 1...*; foo(@x) 18:27
+camelia rakudo-moar 80b912: OUTPUT«1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 8…»
TimToady works with or without the *
but | gives up on infinite lists, I guess
since parcels are defined to be finite, at least until the GLR 18:28
18:28 hagiri left, hagiri joined 18:29 davido_ left 18:30 kjs_ joined, kjs_ left 18:32 hagiri left, adu joined 18:33 denis_boyun_ joined
andreoss m: my @x; @x <== 1...*; say @x.perl; 18:34
+camelia rakudo-moar 80b912: OUTPUT«Array.new()␤»
andreoss m: my @x; @x <== 1...10; say @x.perl;
+camelia rakudo-moar 80b912: OUTPUT«Array.new(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)␤»
andreoss same problem i guess? 18:35
TimToady yes, .perl is going to give up on an infinite list
.gist, on the other hand, gives up after 100 elements
m: my @x; @x <== 1...*; say @x 18:36
+camelia rakudo-moar 80b912: OUTPUT«␤»
TimToady hmm, or maybe something else is going on
m: my @x <== 1...*; say @x
+camelia rakudo-moar 80b912: OUTPUT«␤»
TimToady m: my @x <== 1...*; say @x.elems
+camelia rakudo-moar 80b912: OUTPUT«0␤»
TimToady m: my @x <== 1..*; say @x.elems 18:37
+camelia rakudo-moar 80b912: OUTPUT«0␤»
TimToady m: my @x <== 1..*; say @x[10]
+camelia rakudo-moar 80b912: OUTPUT«(Any)␤»
18:37 xfix left
TimToady bug maybe 18:37
18:37 xfix joined
TimToady m: my @x <== flat 1..*; say @x[10] 18:38
+camelia rakudo-moar 80b912: OUTPUT«(Any)␤»
TimToady m: 1...* ==> my @x; say @x[10]
+camelia rakudo-moar 80b912: OUTPUT«(Any)␤»
[Coke] moar failure is not reproducable. annoynig.
TimToady m: 1,2,3,4,5,6,7,8,9,10,11,12 ==> my @x; say @x[10]
+camelia rakudo-moar 80b912: OUTPUT«11␤»
nwc10 [Coke]: what failed for you (once)?
TimToady m: 1..100 ==> my @x; say @x[10] 18:39
18:39 fhelmberger left
+camelia rakudo-moar 80b912: OUTPUT«11␤» 18:39
TimToady looks like ==> is giving up on infinite too
TimToady suspects that .gimme started returning 0 instead of Inf at some point, because something similar happened to infinite slices 18:40
raydiak is anyone able to test io::socket::ssl on a recent rakudo under linux? reported a test failure, but sergot can't reproduce it, and I want to make sure it's not just me before I waste more of his time 18:41
looks like the only cpandatesters run for it since 2014.10, was OS X 18:42
( and g'mornin #perl6 o/ ) 18:43
18:46 dylanwh left, dylanwh joined
japhb Anyone know what's the current state of the GLR? I haven't seen any obviously relevant commits, so I'm guessing either the work is happening in a private branch/fork, or it's still in design. 18:47
lizmat japhb: only pmichaud can tell, really, afaik
lizmat suppresses the joke about 'which Thanksgiving?' 18:49
+dalek kudo/nom: 68987f5 | lizmat++ | src/core/CompUnitRepo.pm:
Fix bug in PARSE-INCLUDE-SPEC

For some reason, the $class was pass by reference instead of value. Which caused all of the entries to have the final class found, not the actual class active at the moment of pushing. Not sure if this is a bug in general, a bug in the setting, or a bug in my head.
18:51
lizmat dinner&
18:54 mvuets joined 18:55 sqirrel_ left
[Coke] nwc10: perl6-m didn't build with jit enabled. rebuild in same dir worked fine. 18:57
19:04 rindolf left 19:05 FROGGS[tab] joined 19:07 denis_boyun_ left
FROGGS[tab] b2gills: re v5: I'll fix it soon, thank you :o) 19:07
moritz j 19:09
japhb: I've done some test reworkings in roast in a branch
19:10 sirdancealot joined 19:12 skids left
moritz and I'd love to contribute some code too, but I don't think I can get very far without guidance from pmichaud++ 19:20
I mean, I can start making .map not flatten, and some other routines too, but I guess I'll break much more in the process without any real benefit
hoelzro o/ #perl6 19:21
moritz \o hoelzro
colomon o/ 19:22
19:23 dakkar joined
hoelzro is there a way to get the integer FD associated with an IO::Socket? 19:24
nwc10 [Coke]: Oh, odd. I've never seen that. 19:25
how frustrating
moritz hoelzro: I'm not sure, but iirc the HTTP::UserAgent-module also needed that for SSL
hoelzro moritz: ok, I'll have a look 19:26
hmm...from first glance it just uses the host/port combination and supplies it to IO::Socket::SSL 19:27
moritz ok, changing .map to not flattening is easy, and there are some spectest files that still pass after that 19:28
hoelzro: and what does IO::Socket::SSL do?
hoelzro it calls a helper routine from a native library 19:29
client_connect
I should clarify; I ask because I'm implementing a new XMPP library, and the XMPP spec says when you upgrade a connection to use SSL, it *must* be the same TCP connection
so I need to add a feature to IO::Socket::SSL to accept an existing socket to use for communication, and OpenSSL seems to operate purely on the file descriptor level 19:31
moritz hoelzro: I guess a good case can be made for exposing the fh for such things, but in the end moar uses libuv to manage its IO, and I don't know how gracefully it will deal with OpenSSL taking over 19:35
hoelzro hmm
good point
I would assume (perhaps wrongfully) that as long as nothing else is using that socket after it's been wrapped by SSL, it should be fine 19:36
I'm guessing there's *some* proper way to wrap a libuv tcp stream in an SSL library 19:38
but libuv's on my naughty list right now, because of a bug I found in MoarVM that's going to be hard to fix due to libuv's design
19:38 kjs_ joined
hoelzro hmm, it seems you *can* use OpenSSL without filenos, as long as you're willing to push the bytes through yourself 19:44
19:45 andreoss left 19:46 denis_boyun_ joined, kjs_ left 19:51 denis_boyun___ joined, denis_boyun_ left 19:54 breinbaas left 19:56 telex left 19:58 telex joined, denis_boyun___ left 20:00 Mso150 left 20:01 raiph joined 20:03 Mso150 joined
adu how do I redirect stdout to a file for just one function? 20:12
colomon thinks my $*OUT = whatever 20:13
adu why would my grammar work with Grammar::Debugger, but not without it? 20:14
20:19 muixirt joined
colomon adu: Heisenbug somewhere? 20:22
20:24 FROGGS__ joined, dakkar left 20:25 kjs_ joined, Sqirrel_ joined 20:26 Sqirrel left 20:27 darutoko left, FROGGS_ left, FROGGS[tab] left
muixirt $ strace -c perl6 -e '1' 20:27
23835 wait4 calls?
44 clone calls? Wat? 20:28
adu colomon: Heisenbug? 20:31
20:32 kjs_ left
raydiak adu: en.wikipedia.org/wiki/Heisenbug 20:34
20:34 davido_ joined
adu that's an apt description, yes 20:34
20:35 zakharyas left 20:36 FROGGS[tab] joined 20:37 kjs_ joined
+dalek ast: d84f6bc | usev6++ | S06-operator-overloading/sub.t:
Add test for RT #86906
20:44
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...l?id=86906
20:44 kjs_ left 20:46 raiph left 20:54 kjs_ joined
masak good evening, #perl6 20:56
20:58 sqirrel__ joined 21:01 Khisanth left, Sqirrel_ left 21:03 kjs_ left, cbk1090 joined, Khisanth joined
masak Mouq++ # improving 007 in a way I had tried and failed to do 21:04
all y'all should follow Mouq's excellent example and pull-request 007 ;)
remember, pull requests are made of love.
adu raydiak: I think it's failing on a proto rule 21:06
with options a and b, a is failing, but it never tries b 21:07
masak psch: re irclog.perlgeek.de/perl6/2014-12-28#i_9860925 , I'm pretty sure I had a valid use case for anonymous named parameters once. 21:10
psch: the thing that people forget is that code gets refactored, and in the transitions between states it's more important that refactors work and give a consistent result than it is to protect someone's notion of what is sane. 21:11
21:11 kjs_ joined
masak it's a point I have not yet quite figured out how to make in a blog post: Perl 6 feels like a solid language when you refactor. 21:15
I don't quite know why that is, either.
moritz maybe it's the sweet spot between catching many typical refactoring mistakes at compile time, and still offering enough freedom that for example type changes don't automatically percolate through the whole application 21:18
masak mebbe 21:19
the things I've observed that weigh into it:
raydiak adu: like your bug, /me is not really here atm if you look too close :) I know you're not working on a small grammar, but if you can reduce the problem area to a demonstrable failure in a gist, someone can likely help you, or I can check it out when I'm back, or you might figure it out in the process 21:20
masak (a) Perl 6 offers many ways, and at different "scales"
(b) often refactors are about "upgrading" from a simpler way to a more involved way, due to some perceived benefit
21:20 camelia left, kjs_ left
masak (c) doing so feels very natural, for some reason, at least to an experienced Perl 6 developer who already knows the idioms 21:21
21:21 Mso150 left
masak one upgrade I do quite a lot in a lot of projects is to keep things as ad-hoc hashes for a bit, and then "upgrade" them to being classes/objects. 21:21
21:22 Mso150 joined 21:28 xfix left
bartolin .tell FROGGS looks like I'm ready to run 'PANDA_SUBMIT_TESTREPORTS=1 panda smoke' on a daily basis. do you want to get all those data at testers.perl6.org? 21:33
+yoleaux bartolin: I'll pass your message to FROGGS.
[Coke] masak: I have gone the other way with my perl6 project; I started out making EVERYTHING classes. need to step back, and throw out a few of the lower level ones to simplify the objects I actually need to work with. 21:35
21:37 camelia joined
masak I dunno why. I like to work like that. bottom-up, YAGNI complexity. 21:38
21:38 ChanServ sets mode: +v camelia, Ven left 21:39 davido_ left 21:40 davido_ joined 21:41 kjs_ joined
raydiak usually starts with a small .p6 script, grows it to several hundred lines of globals and overlapping scopes in a short creative explosion which looks to the mind's eye like a man playing paintball with himself (and losing), then re-writes it (relatively) carefully from scratch with a much more thorough understanding of the problem space 21:49
masak yeah.
21:49 sqirrel__ left
masak for me, tests and the TDD cycle plays an integral role, too. 21:49
I can do The Simplest Thing as a way to get tests to pass.
knowing that if I need to, I can come back and prop them up later using more imposing Perl 6 features. 21:50
often, I'm glad I deferred a bit in choosing how to do that upgrade step.
[Coke] lizmat: looks like my attempt to cancel the install of xcode 6.1.1 failed, and I'm using it already. whoops. 21:52
lizmat [Coke]: are you still on Mavericks 21:53
?
adu is there a debugger?
21:54 avalenn left
adu [Coke]: are you on mac? 21:54
lizmat masak: wrt to using hashes during development: maybe we need an auto-accessor/mutator generating type of hash ?
so you wouldn't have to change the code much after you've made it a proper object? 21:55
masak lizmat: oh, I thought you were going to say "maybe we need an editor refactor that can do the upgrade (semi-)automatically?" :)
'night, #perl6
21:55 colomon left
lizmat gnight masak 21:55
22:03 kjs_ left
lizmat m: class H is Hash { method FALLBACK($name,*@rest) { @rest ?? self{$name} = @rest !! self{$name} } }; my $h = H.new; $h.foo(42); say $h.foo # the above idea 22:06
+camelia rakudo-moar 80b912: OUTPUT«42␤»
lizmat m: class H { has %!h; method FALLBACK($name,*@rest) { @rest ?? %!h{$name} = @rest !! %!h{$name} } }; my $h = H.new; $h.foo(42); say $h.foo # perhaps better 22:09
+camelia rakudo-moar 80b912: OUTPUT«42␤»
22:16 adu left 22:17 colomon joined 22:24 Mso150 left 22:26 Ven joined
Ven moritz: I think you have the right idea (WRT masak's discussion on "why refactoring in p6 feels strong/sane") 22:27
also, I've come to realize dynamic scoping can be your dependency injection :-)
(or rather, the other way around) 22:28
22:29 kjs_ joined 22:32 leont joined
+dalek kudo/nom: eaaf541 | lizmat++ | src/core/Inc.pm:
Add support for RAKUDO_PRECOMP_WITH

The idea being that we can force an @*INC on an externally starting perl6, so that the CompUnit.precomp method can take an :INC parameter. This should do away with kludges such as setting PERL6LIB to add CompUnitRepo's for creating a precomp version of a file.
22:33
lizmat and on that thought: good night, #perl6!
jnthn good night, lizmat :) 22:34
+yoleaux 15:00Z <lizmat> jnthn: what's the difference between nqp::queuepoll($!queue) and nqp::atpos($!queue,0) ?
15:07Z <lizmat> jnthn: please ignore: at_pos blocks, queuepoll doesn't
jnthn ...well, that was an easy day for the messages :) 22:35
Ven :D 22:47
22:58 colomon left, kaare_ left 23:11 mvuets left 23:15 kjs_ left 23:22 nine joined
nine m: say 'server upgraded to openSUSE 13.2' 23:22
+yoleaux 11:06Z <moritz> nine: I've moved the camelia.service to camelia@.service (template) and have started two instances, one for freenode, one for magnet
+camelia rakudo-moar 80b912: OUTPUT«server upgraded to openSUSE 13.2␤»
nine and camelia obviously survived :) 23:24
23:26 raiph joined 23:28 adu joined 23:31 Rounin joined, colomon joined 23:32 Ven left 23:34 Khisanth left
raydiak m: say $*DISTRO 23:35
+camelia rakudo-moar 80b912: OUTPUT«opensuse (13.2.Harlequin)␤»
23:36 Khisanth joined, Ven joined
adu has anyone here used perl6-debug? 23:38
jnthn TimToady: About "my @x := 1...*; say(|@x);" - given the flattening happens as part of argument handling at the VM level, everywhere, making that work is going to be *extremely* painful. 23:39
adu: A bit ;)
Not for a while, mind.
TimToady: To expand a bit: the VM expects to be given a VM-level array of arguments that it can index into without causing any kind of code execution. 23:40
adu jnthn: so let me get this straight, all I need to do is run perl6-debug, I don't need github.com/jnthn/rakudo-debugger/ ? 23:41
jnthn TimToady: And the only way to provide that is being eager on the caller side.
adu: perl6-debug is only the driver; you need a frontend installed, the only one of which I know of at the moment is the github module you linked to (though the design is such there could be others). 23:42
adu: So you'd need to install that module with Panda, then you should be good to go.
adu so I do need both 23:43
I can't use panda
jnthn Rakudo Star comes with the module (and its dependency), so anyone installing that gets all that's needed.
OK, then you're left to manually copying the module somewhere sensible and also Term::ANSIColor 23:44
Why can't you use panda, ooc?
23:46 stux|RC-only left
adu pastie.org/9805888 23:46
I looks like it's a bug in macosx
jnthn wtf... 23:47
adu it looks like macosx's "sh" is using the first line of file B to execute file A
FROGGS__ I'd try: perl6-m /Users/ajr/.local/bin/panda install ...
jnthn macosx does some weird sh.. 23:48
jnthn is a little surprised he ain't heard about this problem before, thoguh, given the fairly sizable OSX-using population on the channel. 23:49
geekosaur I... don't think that kind of chained interpreter is technically supported anywhere, although it may happen to work on linux 23:50
FROGGS__ chained interpreter? 23:51
geekosaur a #! line ponting to something with a #! line
adu jnthn: I'm on Yosemite, that's the only thing I can guess
FROGGS__ geekosaur: you... can't run a script with a script? that seems weird 23:52
jnthn We'll end up with perl6-m being a binary in the not too distant future anyways, which would solve it, provided that's what the issue is.
geekosaur (technically all executables have interpreters. the interpreter for a script is specified in the #! line. the interpreter for a program is the system's ld.so equivalent, although for a static executable it can be itself as a special case)
jnthn I know patches were worked on, I just was too snowed under to get to them.
geekosaur #! started out as a hack and mostly is one :)
relying on that working is not portable 23:53
jnthn Seems my battery's nearly out, which probably means sleep time...
'night
adu night
geekosaur iirc 4.2bsd would fail exec if the target of a #! was itself a script, and some later *BSDs supported limited nesting 23:54