»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
dha FWIW, it appears, on my system to find said secondary p6doc under /install/share/perl6/site/resources/ 00:00
BenGoldberg Funny. 00:01
Does it cache the found location somewhere?
Herby__ Is there any sort of Learning Perl 6 book in the works?
or is the Perl6Intro website still the best resource for newbies 00:02
ZoffixWin m: say time 00:03
camelia rakudo-moar 0e95cd: OUTPUT«1459814626␤»
ZoffixWin m: say time()
camelia rakudo-moar 0e95cd: OUTPUT«5===SORRY!5=== Error while compiling /tmp/NQnkkYQ4V1␤Undeclared routine:␤ time used at line 1␤␤»
ZoffixWin Wat?
dha I have heard rumors that books... may be in the initial stages of being sort of worked on. :-) 00:04
BenGoldberg - doesn't look like it.
BenGoldberg What happens if you have two instances of p6doc, and both are the type which searches for other p6docs? Does it infinite loop? 00:06
dha In fact, it *looks* like there can be multiple secondary p6doc programs, and the one in bin may give you multiple possibilities if there isn't one that matches your "criteria"
00:06 Xliff joined
dha I'm a little unclear on what the "criteria" are. 00:06
Xliff \o #perl6 00:07
Herby__ o/
ZoffixWin [o]
Xliff -[o]? 00:08
ZoffixWin, that's a new one. ;)
ZoffixWin :D
sortiz dha, the files in site/bin are the standard CURI wrappers, the basic "criteria" are :$auth and :$ver 00:11
Xliff Hrm. WinCompose is not working all of a sudden. :( 00:12
dha Ah. Clearly my problem is that I don't know what a CURI wrapper is. :-)
sortiz CURI = CompuUnit::Repository::Installable. Part of perl6 repositories magic. 00:13
Xliff Weird. X-Ming was blocking WinCompose.
00:15 vendethiel left
dha All right then. So, to fix the problem of stuff turning up in p6doc -l that shouldn't (well, at least the ones I've noticed), it looks like a simple .d test in the wrapped p6doc will do. 00:16
00:16 TreyHarris left
sortiz dha, It is supposed that you can have more than one module with the same name installed and in a filesystem independent way. 00:16
00:16 chrisdotcode joined
dha The question is, where would one put it so that it would reliably exist in an installation? 00:16
sortiz You can't, these wrappers are template based and created at install time. 00:18
dha i. e. in github.com/perl6/doc/blob/master/bin/p6doc#L107 you could put C<next if $file.d> after line 111, and you'd no longer get X or the extra instance of Backtrace, which are caused because it's currently listing directories as well as modules. 00:19
Ok, but the fix needs to go into the program the wrapper calls, not the wrapper itself.
sortiz Yep, the file you need to patch is the one in perl6/doc/bin 00:20
dha so, could it be put in github.com/perl6/doc/blob/master/bin/p6doc and then when people install it, it would work?
sortiz Yes. 00:21
dha Aha. Ok. I guess I'll do a pull request at some point.
00:22 yqt joined 00:23 tardisx joined 00:24 leont left 00:25 perlawhirl joined, nadim left 00:26 TreyHarris joined, johndau joined 00:33 chrisdotcode left 00:35 frobisher joined, dha left 00:36 frobisher is now known as dha 00:38 colomon joined
dha Ok, pull request submitted. Hopefully it will be somehow useful. 00:40
00:52 telex left
Xliff ACK! 00:53
Trying to convert an object with a self-referential method in NativeCall is borking my mind. I can't find a decent example, either.
00:56 telex joined
lucs Looking at some roast tests: EVAL q{ goto SKIP5; }; 01:05
Is that how 'goto' is meant to be used? 01:06
01:06 colomon left, colomon joined
lucs Oh, searching in the IRC backlogs, it appears that labeled goto is not yet implemented. 01:09
Tough luck for me. 01:10
Xliff OK. Assuming I have the following C construct: struct A { B (*next)(Struct A *a) }
How would I handle that in NativeCall?
This doesn't work: class A is repr<CStruct> { has Pointer $!next; method next { my &func = nativecast(:(Pointer[A] --> B), $!next); ... } } 01:12
sortiz Xliff, Try: class A is repr<Struct> { has Pointer $!next; method next { my &func = nativecast(:(A --> B), $!next); func(self); } ... } 01:16
lucs m: printf $*ERR: "%.4f", pi 01:17
camelia rakudo-moar 0e95cd: OUTPUT«Method 'printf' not found for invocant of class 'IO::Handle'␤ in block <unit> at /tmp/o3uzFlVchU line 1␤␤»
lucs Really?
sortiz Xliff, In NC all CStruct are passed by reference, when used in a signature, you don't need 'Pointer[Foo]', only 'Foo'. 01:19
01:20 dha left, cdg joined
Xliff sortiz: Yes. That's what I thought. However, I am getting weird results or segfaults in some places that I am not expecting. 01:21
Thanks. I will putter on.
ugexe tbh a CUR implementation should declare its doc store itself. alternatively a CUR for docs
01:21 vendethiel joined
ugexe uninstall should be able to remove those afterall 01:23
01:42 vendethiel left 01:48 Actualeyes joined 01:56 yqt left 02:03 perlawhirl left 02:04 perlawhirl joined 02:11 vendethiel joined 02:17 kid511 left 02:21 dvinciguerra_ left 02:24 Ben_Goldberg joined 02:26 BenGoldberg left, Ben_Goldberg is now known as BenGoldberg 02:29 Actualeyes left 02:33 vendethiel left 02:39 noganex_ joined 02:42 noganex left
Xliff Well, my test code worked, but I am still getting this from the actual implementation. 02:55
Cannot locate symbol '' in native library ''
When trying to execute a nativecast() function pointer returned from a C shared lib.
I don't get it.
02:58 Actualeyes joined
ugexe because guess_library_name() in NativeCall.pm is a mess is my guess 03:05
03:08 Herby__ left 03:14 Ben_Goldberg joined 03:17 BenGoldberg left, Ben_Goldberg is now known as BenGoldberg, geekosaur left 03:18 geekosaur joined 03:21 molaf joined 03:27 pecastro left, perlawhirl left 03:29 perlawhirl joined
Xliff I wonder if I can actually use the mangled name in this instance instead of using nativecast on an unknown pointer. 03:33
0040b8c0 T _ZN23XQillaXQCImplementation21create_empty_sequenceEP20XQC_Implementation_sPP14XQC_Sequence_s
Xliff searches.
03:34 pecastro joined
Xliff sub create_empty_sequence(XQC_Implementation_s, XQC_Sequence_s) 03:41
is native('xqilla')
is symbol('_ZN23XQillaXQCImplementation21create_empty_sequenceEP20XQC_Implementation_sPP14XQC_Sequence_s')
returns uint32
{ * };
Worked.... I think.
Xliff now has something else to try.
The only problem here is how volatile that symbol name is. 03:44
BenGoldberg Inside of native(...) and symbol(...) can be expressions, not just strings. 03:51
AlexDaniel Xliff: It looks like you went through a lot of stuff with NativeCall. Please consider contributing to documentation, it will be useful to others.
BenGoldberg So, instead of writing that big huge string out, write some function which generates that string, perhaps by doing evil stuff with the compiler. 03:52
03:53 BenGoldberg left 03:56 cdg left 04:02 vendethiel joined 04:04 perlawhirl left 04:18 skids left
Xliff .tell BenGoldberg I'd have to figure out how C++ mangles its functions. That's a task for another day. 04:23
yoleaux Xliff: I'll pass your message to BenGoldberg.
04:24 vendethiel left
Xliff AlexDaniel: I am keeping notes, but so far I haven't found anything -REALLY- compelling to contribute. Once I have completed this task, I will definitely write something on lessons learned. 04:24
gfldex Xliff: that depends on the compiler you use, and there is no stable interface. You have to wrap stuff in extern "C" { ... } to get c-style symbole names.
04:25 geekosaur left, AlexDaniel left, geekosaur joined
Xliff gfldex, these are pointers to functions, not stable functions. That's why I am having to deal with the mangled names. 04:27
Trying to use nativecast() on the returned function pointers gives me this error: Cannot locate symbol '' in native library '' 04:28
Although I have had success with a simplistic example which does the same thing.
The issue here is that this is a C-lib that wraps CPP classes.
04:32 khw left
Xliff I may end up having to give this up and properly wrap the C++ classes. But that's at least an order of magnitude more work than trying to wrap these function structs. 04:35
(There are -way- more classes)
04:37 molaf left, Cabanossi left 04:41 Cabanossi joined 04:43 vendethiel joined 04:44 cyberviking joined, cyberviking left
Xliff *sigh* 04:50
Rethinking entire idea, now. :/
04:55 ZoffixWin_ joined 04:58 ZoffixWin left 05:05 vendethiel left 05:17 labster left 05:19 labster joined 05:26 znpy joined 05:30 CIAvash joined 05:35 nadim joined 05:41 johndau left 05:45 domidumont joined 05:49 domidumont left 05:50 domidumont joined 05:54 wamba joined 05:57 domidumont left 06:08 domidumont joined 06:11 nadim left, nadim joined 06:12 abraxxa joined 06:14 tardisx left 06:16 znpy left 06:18 darutoko joined 06:30 tardisx joined 06:32 nakiro joined 06:34 firstdayonthejob joined 06:42 tardisx left 06:43 vendethiel joined 06:44 nadim left 06:47 fireartist joined 06:48 nadim joined 06:55 djbkd joined 06:57 cdg joined 07:00 tardisx joined 07:01 cdg left 07:07 jvcakg joined 07:08 znpy joined, znpy left
jvcakg ot: is there a mailing list for this channel? 07:09
moritz jvcakg: there are several Perl 6 related mailing lists 07:10
jvcakg: see perl6.org/community/
jvcakg moritz: thanks
moritz jvcakg: pro tip: don't start discussions on perl6-language :-) 07:11
jvcakg =]
bbl
07:11 jvcakg left
teatime So guys, can I be totally off-topic and ask for your aesthetic opinion on something: Are the 6x6x6 color cubes on the left side of this screenshot (xterm defaults), aesthetically superior or more useful, than the ones on the right (evenly spaced)? i.imgur.com/wyRpPJp.png 07:13
(I am trying to get to the "why" of why this palette was chosen as the default, and at this point I am suspecting it was an aesthetic choice.) 07:14
moritz teatime: well, for backgrounds I prefer the lighter colors, so the left palette; otherwise I prefer the right-hand side 07:15
teatime I tried to ask ##design, and ended up in an argument w/ one guy who insisted 0 - 255 ≠ 0x00 - 0xFF 07:16
nine teatime: could they just be gamma corrected? 07:17
teatime nine: yeah, I think that may be what it comes down to.
07:18 vendethiel left
moritz gamma rays! 07:18
teatime nine: basically, the default/left set is {00, 5F, 87, AF, D7, FF}³ and the equal-spacing/right set is {00, 33, 66, 99, CC, FF}³
Timbus its hard to tell though; our monitors are calibrated entirely differently. but for me the right palette is oversaturated and some of the reds blur together too much
07:18 zakharyas joined
teatime so the default/left set is spaced by {5F, 28, …, 28} and the right set is spaced evenly by 33 07:19
(all number in hex)
so, the left palette is just shifted to be lighter, basically. but I see the same as Timbus, so I'm thinking the point is for there to be more visually-distinct colors.
nine teatime: colors and brightness work non-linear. 0x66 is not twice as bright as 0x33
teatime nine: right.
nine The default/left just seems to take this into account 07:20
teatime nine: in fact, you could probably come up w/ an even better cube if you use different spacings for the 3 components; maybe based on CIElab space... but my actual/intuitive understanding of the details is very tenuous/non-existent.
nine: I'm pretty sure now that's exactly what was going on. 07:21
moritz also take into account that output devices had much worse quality back then
teatime (I should have compared them side-by-side long ago)
ufobat morning perl6 07:23
could anyone maybe give me a hind what i did wrong, travis-ci.org/tadzik/Bailador/jobs...7667#L1146
but i have got Digest in github.com/ufobat/Bailador/blob/ma...TA.info#L5
moritz ufobat: 64.77s$ panda install URI Template::Mojo HTTP::Easy Template::Mustache 07:25
ufobat: that's probably an old travis recipe
07:25 djbkd left
moritz ufobat: if you use instead panda installdeps . 07:25
ufobat ah fuck! 07:26
moritz (in the travis.yml) you don't have to update it whnever dependencies change
ufobat thanks a lot
moritz you're welcome
when we started to use travis, docs.travis-ci.com/user/languages/perl6 didn't contain the installdeps command
ufobat to be honest, i never looked at the travis.yml file :-( i just assumed it's correct 07:27
moritz it used to be :-) 07:30
ufobat yeah! but the benefit of it, i learned how to sqash in git :D 07:35
moritz \o/ learn something new every day 07:38
ufobat exactly! :D 07:39
and we're green! :D yay
07:40 Guest16914 left 07:42 sjoshi joined
moritz ufobat: green computing FTW! 07:44
07:47 RabidGravy joined 07:49 tardisx left 07:50 domidumont left 07:51 dakkar joined, domidumont joined 08:06 vytas` left
RabidGravy Harr! 08:13
psch \o
teatime heh, I made a "better" comparison image; it's much harder to see any difference between them now. 08:21
i.imgur.com/WOaOMOr.png
which, just means I can happily stop concerning myself with it
08:29 vytas joined 08:31 telex left 08:36 xinming left
Woodi hmm, github is not loading... someone put panama papers there or what ? :) 08:38
RabidGravy it's all unicorns here 08:40
"We are experiencing connectivity issues and are currently investigating." 08:41
08:42 telex joined 08:49 xinming joined 08:50 leont joined 08:53 espadrine_ left 08:55 telex left 09:00 Khisanth left
psch hrm, for some reason D5min is a special chord 09:05
as in, it's the one that sometimes falls through this Mode.next-chord method i've been trying to get working /o\
09:08 telex joined
teatime interesting. heh, psch, it took me quite a few moments to figure out the correct context for that (music theory) :) 09:08
at first I thought perhaps it was emacs.
psch oh 09:10
yeah, i suppose chord probably goes more towards emacs here, although i don't know what D5min would mean for emacs :)
teatime mode and chord made sense for emacs, but yeah D5min was throwing me :) 09:11
RabidGravy It's quite blues too
09:12 rindolf joined 09:14 Khisanth joined
psch well, my notation is not quite standard there. the number is the octave, which usually isn't mentioned iirc 09:15
but hey, at least it's not overspecific and only fails for D5min, it's apparently every Dmin in any inversion... /o\
but of course only in the mainline, and not an isolated test case 09:16
RabidGravy oh I see 09:17
teatime If I want to, given an input 24-bit RGB color, choose the closest from a set of 24-bit RGB colors, does anyone know a better way than xforming all of the colors to CIELab, and computing the CIELab distance between the input and each of the set of cantidates? Specifically, is there a better color space I should be using than CIELab, before I go to the effort of coding this. 09:40
09:49 arcetera left
psch ah, found it. apparently i didn't generate enough chords 09:49
see, from D5min i wanted to pick a new chord which has a root either m3, M3 or P4 away from the current one 09:50
that is, F, F# or A
but i only generated chords spanning exactly one octave...
jast teatime: depends. do you need to run the whole absolute colour space gauntlet in your use case?
psch so of course there's no chord on F or A (never mind F#, black keys are hard :P ) because the fifth and third respectively don't fit in the scale anymore 09:51
teatime jast: hrm, I don't understand? (I don't know much about this stuff.)
jast okay
teatime jast: but I do want the most accurate (visually) results, w/ no consideration toward performance.
jast basically colour spaces like RGB and CMYK are device-dependent 09:52
teatime right; presumably I can make some kind of reasonable assumption about which RGB space though?
jast depends on where your values are coming from 09:53
teatime I don't think I can make any assumptions about that.
jast many sources are just simply 'RGB'. if there's no definite mention of a colour profile in the source data, assuming sRGB or something like that probably isn't the best choice
and in that case you could simply convert to another device-dependent colour space like YUV/YCrCb for easier perceptual comparisons 09:54
sorry, that's YCbCr. I never remember the acronyms. :} 09:55
09:55 g4 joined
jast YUV or something comparable is used by most video and image codecs these days 09:58
09:59 leont left
teatime so that would be your recommendation? 09:59
over CIELab?
10:00 espadrine_ joined
jast with no knowledge of the source it seems more sensible 10:00
teatime thanks 10:01
10:02 KatsWhoSayNi left 10:05 espadrine_ left, espadrine joined 10:13 pecastro left 10:15 pecastro joined 10:28 TEttinger left 10:31 ZoffixWin_ is now known as ZoffixWin
hahainternet a question, when generating a sequence, if you have a sequence function with arity of one, and you generate a number previously generated, would it be ludicrous to assume the sequence is cyclical? i think probably it's not provable 10:37
it'd be nice if where clauses / sequence blocks were a restricted subset so they could be more easily introspected without halting problems lol 10:38
arnsholt Not a good idea, I think
Consider for example a function that returns a random number each time
timotimo anything that has state, really
hahainternet arnsholt: indeed, hence why it'd have to be an introspectable subset of perl
arnsholt Basically, yeah
hahainternet you'd have to be able to know for sure it was going to repeat again, rather than having state or randomness
arnsholt In this context, introspectable subset would have to be "not Turing complete" 10:39
hahainternet indeed
timotimo the thing is, when you stumble outside that subset (or into!) of perl6 without noticing, you'll get unexpected behavior
10:39 Begi joined
hahainternet timotimo: perhaps, i personally feel it wouldn't be a bad idea to have a special block syntax for it, and then use normal blocks / function pointers for the rest 10:39
anyway i'm just blindly speculating, no real purpose :) 10:40
timotimo k 10:41
nine -win 41 10:42
xinming top 10:47
moritz bottom 10:54
jnthn charm 10:55
nine strange 10:57
10:58 dvinciguerra_ joined
timotimo interesting 11:00
xinming I'm in a wrong window... :-) 11:01
wish to see the top output. :-)
11:02 cpage_ left 11:03 cpage_ joined, cpage_ left 11:12 arc__ joined, arc__ is now known as arcetera, arcetera left, arcetera joined 11:26 mr-fooba_ left 11:27 mr-foobar joined 11:28 mr-foobar left 11:29 perlawhirl joined, pmurias joined, mr-foobar joined 11:31 kaare_ joined 11:36 kid51 joined
dalek c: f80ef79 | (Steve Mynott)++ | bin/p6doc:
don't list directories as pod just files as reported by dha++
11:44
11:46 labster left
dalek c: 15613f4 | (Steve Mynott)++ | bin/p6doc:
remove dha++
11:48
c: 2ecffb7 | (Steve Mynott)++ | bin/p6doc:
comment broken code
11:54
c: ad3906b | (Steve Mynott)++ | META.info:
add Shell::Command to deps to make zef happier #442
12:04 kid51 left 12:09 pmurias left, eugen joined 12:11 eugen left 12:16 eugen joined 12:17 pmurias joined 12:22 kentnl joined, kentnl left, kentnl joined, kent\n left 12:26 kentnl is now known as kent\n
Ulti so I just timed a tight read/split/print loop on a file and rakudo was over 80x slower than perl5, in the profile there are two deoptimizations for nearly every line of the file is that a likely reason for a chunk of the difference? 12:47
jnthn They surely won't be helping 12:48
Ulti for "3000line.tsv".IO.lines -> $line { my @fields = $line.split(/\s/); say @fields[0] } vs my $fh, "<", "3000line.tsv"; while (my $line = <$fh>) { my @fields = split /\s/, $line; say $fields[0] } 12:49
12:49 CIAvash left
jnthn Tab separated, I'm guessing? 12:50
ooh, how much faster is $line.split("\t") if that also works?
Ulti mattoates.co.uk/files/perl6/readspl...ofile.html 12:51
jnthn: one sec will try
jnthn: a LOT faster
12:51 thtgs joined
Ulti down to 16x slower 12:51
12:52 cdg joined
Ulti 0.353 seconds vs 1.81 for that regex to char split change 12:52
that actually impresses me a lot given where rakudo was only a couple of years ago 12:54
or even months ago 12:55
12:55 sQuEE` is now known as sQuEE
jnthn Yeah, but we should do better still ;) 12:56
12:56 sjoshi left
jnthn Is the file just "abc\tdef\tghi\jkl" or so? 12:56
timotimo can has the file? :)
yeah
jnthn With lines like that?
perlawhirl is there a something eqv to p5's quotemeta function?
timotimo there's no need for quotemeta 12:57
thtgs here a similar benchmark takes only 3x the time of perl5; five months ago it was incredibly slower
Ulti jnthn its actually an NHS labs records of a load of mutatiosn they've seen ;3 so I can't give you the file I'm playing with but its just a basic TSV behind the extra format
jnthn Man we've some room for improvement, looking at that profile :) 12:58
Ulti this would be an extreme example of the same sort of file ftp://ftp.ncbi.nlm.nih.gov/pub/clinvar/vcf_GRCh37/clinvar_20160302.vcf.gz 12:59
jnthn thats good news :D
perlawhirl m: rx'this \s+ kinda⏏-string' 13:02
camelia rakudo-moar 0e95cd: OUTPUT«5===SORRY!5===␤Unrecognized regex metacharacter ⏏ (must be quoted to match literally)␤at /tmp/_hgb5qG7i4:1␤------> 3rx'this \s+ kinda7⏏5⏏-string'␤Couldn't find terminator +␤at /tmp/_hgb5qG7i4:1␤------> 3rx'this \s+ kinda⏏7⏏…»
perlawhirl timmotimo^^
psch m: rx/'this \s+ kinda⏏-string'/ 13:03
camelia ( no output )
perlawhirl the string will come from a external file, i want to convert it to a regex to match agains
so it may nt be a '-', but some other metacharacter
MadcapJake how do I implement a class/object that behaves like a hash? method postcircumfix:<{ }> {...}? or is there something like CALL-ME? 13:04
perlawhirl which is where a quotemeta would come in handy... unless there's another solution i'm unsure off
Ulti thtgs yeah there have been certain numeric things where I've had to double take on rakudo speed now its faster than perl5 in some instances especially around bigger integer type things in lists
jnthn MadcapJake: AT-KEY (and EXISTS-KEY and DELETE-KEY)
moritz MadcapJake: it's documented somewhere in perl6/doc
MadcapJake: something with subscripts I believe
MadcapJake: doc.perl6.org/language/subscripts#Custom_types 13:05
13:06 xinming_ joined
psch m: my $x = 'this \s+ kinda⏏-string'; say Q{ i have this \s+ kinda⏏-string and it's hard to match! } ~~ /$x/ 13:06
camelia rakudo-moar 0e95cd: OUTPUT«「this \s+ kinda⏏-string」␤»
psch perlawhirl: no quotemeta
MadcapJake wow, somehow have managed never to read this language pod :P didn't realize "subscripts" was what this kind of thing was called
sortiz \o #perl6 13:07
psch perlawhirl: given $x = "foo", /$x/ is the same as /'foo'/ and /<$x>/ is the same as /foo/
perlawhirl: to me this reads more like you might get Regexen from the outside that aren't valid 13:08
well, that's the one concern i actually see there
timotimo jnthn: i measure 9% time spent in utf8_decodestream for ulti's benchmark 13:09
13:09 cpage_ joined, geekosaur left
psch i also just learned that using githubs README rendering to check markdown syntax is kind of not-so-great as a workflow 13:10
timotimo haha
psch github.com/peschwa/p6-Music-Helper...its/master
well vOv
either those few commits will eventually be drowned in a see of useful commits or i forget about this again and let it rot... :) 13:11
timotimo jey
13:11 geekosaur joined 13:12 Xliff_ joined
psch unfortunately i'm too lazy to set up an icecast server, so no live demo what that code produces :P 13:13
jnthn timotimo: That's not *bad*, but may be improvable :)
thtgs Ulti agreed but I'm mostly interested in IO and array performance
13:13 ocbtec joined
timotimo how good is MVM_string_substrings_equal_nocheck for the special case where length-of-substring is 1? 13:13
jnthn timotimo: I noticed that we malloc/free a load
timotimo: With the buffers
(for decoding)
But I also noticed we're running up some code dupe in the decode_stream impls that's starting to bother me. 13:14
I don't like premature abstraction, but I'd like to clean up the dupe across those things at some point :)
Or at least, that of it that makes sense. :) 13:15
timotimo you're thinking of a few static inline functions?
13:15 clkao_ joined
psch hm, something went weird during setting up the repo... :l 13:16
ooh, no
i just had two instances of clock.pl6 running
13:17 krunen_ joined, kst` joined, BuildTheRobots_ joined
jnthn timotimo: maybe, or pulling some checks out into run_decode inside of decodestream.c 13:19
I dunno. Abstractions are hard. :)
13:19 xinming left, xinming_ left
thtgs I notice today that just using perl6 as `cat` is almost as fast as perl5. Instead splitting and STORE-ITERABLE make a difference 13:19
13:20 lnr joined 13:22 g4 left, rindolf left, vytas left, Xliff left, |Tux| left, clkao left, avenj left, parisba left, BuildTheRobots left, boegel left, pmurias left, Begi left, dakkar left, zakharyas left, polyfloyd left, [Tux] left, perigrin left, mindos left, mithaldu_ left, simcop2387 left, _notbenh is now known as notbenh, lnr is now known as lnrdo 13:23 notbenh is now known as 5EXAAIF31 13:24 romrador joined, boegel|quassel joined, pmurias joined, Begi joined, dakkar joined, zakharyas joined, polyfloyd joined, [Tux] joined, perigrin joined, mindos joined, mithaldu_ joined, simcop2387 joined, JimmyZ joined, integral joined, ilmari joined, notbenh joined
timotimo only 1.5s out of 6s are spent printing the output 13:24
(might also partially be that output in general makes things slower
but let me time cat to see)
OK, cut -f 1 only takes 0.2s 13:25
13:25 clkao_ is now known as clkao 13:26 sufrostico joined, ggherdov left 13:27 |Tux| joined 13:28 vytas joined, skids joined, rindolf joined 13:31 wamba left 13:32 parisba joined, parisba is now known as Guest19532 13:35 BuildTheRobots_ is now known as BuildTheRobots
hoelzro .oO( time cat? d.gr-assets.com/books/1348818430l/822630.jpg ) 13:38
timotimo huh? 13:39
what is that? :D
[Coke] ovid on Perl6 "But we're not gonna rush it." 13:40
13:40 ab6tract joined
ab6tract o/ #perl6 13:40
a colleague of mine just pointed out multi line brackets. i was wondering what they are called and what they are for? 13:41
jnthn ab6tract: Example?
perlpilot "multi line brackets"?
hoelzro timotimo: a book my sister had =)
jnthn 13:42
MadcapJake how can I get a list of symbols that a module exports? 13:43
perlpilot ab6tract: as written I think of either multi-line comments or here-docs.
(FYI)
psch m: use Test; say Test::EXPORT::DEFAULT::.keys # MadcapJake
camelia rakudo-moar 600eb5: OUTPUT«(&isnt &plan &pass &cmp-ok &flunk &does-ok &subtest &unlike &like &use-ok &todo &skip-rest &eval-dies-ok &is-deeply &throws-like &ok &is &diag &done-testing &is-approx &skip &dies-ok &lives-ok &eval-lives-ok &MONKEY-SEE-NO-EVAL &nok &is_approx &isa-ok &can…»
ab6tract m: my $a = 'aaa'; my $b = 'bbb'; use MONKEY-SEE-NO-EVAL; say (EVAL "/ $a \\n\ $b /")
camelia rakudo-moar 600eb5: OUTPUT«/ aaa \n bbb /␤»
ab6tract hrmm 13:44
MadcapJake psch: thanks!
13:44 ggherdov joined
ab6tract nevermind, the bastard was trolling 13:44
jnthn hah
Was gonna say, do you simply mean that strings and regexes can be laid out of multiple lines? :) 13:45
*over
dalek rl6-most-wanted: 8d79a28 | (Zoffix Znet)++ | most-wanted/modules.md:
Remove IRC::Client WIP: Already in Ecosystem
rl6-most-wanted: 3a1e155 | (Zoffix Znet)++ | most-wanted/modules.md:
List Twitter API WIP
13:46
perlpilot Are perl people easier to troll? I mean, you could say "Perl has rainbows and unicorns" and people familiar with Perl wouldn't be surprised if it were true. *Especially* when we're talking about Perl 6. 13:47
13:47 BuildTheRobots left
jnthn .u rainbow 13:47
yoleaux U+1F308 RAINBOW [So] (🌈)
jnthn .u unicorn
yoleaux No characters found
perlpilot so close :)
jnthn Bah, get on it, Unicode consortium!
psch .u knight 13:48
yoleaux U+2658 WHITE CHESS KNIGHT [So] (♘)
U+265E BLACK CHESS KNIGHT [So] (♞)
U+1F0AC PLAYING CARD KNIGHT OF SPADES [So] (🂬)
ab6tract perlpilot: that's exactly how it went :)
psch .u combining acute
yoleaux U+0301 COMBINING ACUTE ACCENT [Mn] (◌́)
13:48 Technaton joined
yoleaux U+030B COMBINING DOUBLE ACUTE ACCENT [Mn] (◌̋) 13:48
U+0317 COMBINING ACUTE ACCENT BELOW [Mn] (◌̗)
ab6tract then that is used as further evidence that perl is a bad language (even the experts don't know what's in it!)
psch .u grave
yoleaux U+0060 GRAVE ACCENT [Sk] (`)
U+00C0 LATIN CAPITAL LETTER A WITH GRAVE [Lu] (À)
U+00C8 LATIN CAPITAL LETTER E WITH GRAVE [Lu] (È)
psch .u combining grave
yoleaux U+0300 COMBINING GRAVE ACCENT [Mn] (◌̀)
U+030F COMBINING DOUBLE GRAVE ACCENT [Mn] (◌̏)
U+0316 COMBINING GRAVE ACCENT BELOW [Mn] (◌̖)
psch there, sorry for the brief spam :S
jnthn ab6tract: I'm more surprised when a language *doesn't* support that, tbh. 13:49
Or have a way to.
perlpilot ab6tract: that doesn't make it "bad" just bigger than you can wrap your mind around. :)
MadcapJake psch: what about when you're module name isn't known?
jnthn ES just added one. C# has had one forever.
psch m: say "\c[WHITE CHESS KNIGHT]\c[COMBINING GRAVE ACCENT]" # unicorn-ish
camelia rakudo-moar 600eb5: OUTPUT«♘̀␤»
jnthn It's the languages where I try to have multi-line literals and can't that annoy me :P 13:50
*try to use
13:51 BuildTheRobots joined
psch MadcapJake: uh, no idea. i'd guess you can find the package itself in UNIT:: somewhere, but you won't recognize it, 'cause you don't know its name... 13:51
perlpilot the languages that really annoy me and the ones that have support for regex, but they're shoe-horned into strings
perlpilot looks at PHP and Python
13:52 brrt joined, brrt left, brrt joined
MadcapJake psch: ok I technically know the name but it's in a variable, it's not known at compile-time (will need to use require, I assume but I can't figure out how to locate the package after you require it, is there no way to discover what symbols a package provides?) 13:52
s/package/module/ :P 13:53
perlpilot MadcapJake: read the source ;)
psch hm, i don't really know about require or runtime module loading in general 13:54
13:54 brrt left
perlpilot MadcapJake: If you're sussing out P^'s introspecting abilities, it would be good to document what you discover (or write a blog post to make the info more widely accessible) 13:55
er, P6's
b2gills m: say term:<time>() 13:56
camelia rakudo-moar 600eb5: OUTPUT«1459864598␤»
psch m: my \Test := EVAL 'require Test'; say Test::.keys
camelia rakudo-moar 600eb5: OUTPUT«(&todo_output EXPORT &failure_output &output)␤»
psch but reaching the EXPORT there seems weird..
m: my \Test := EVAL 'require Test'; say Test::EXPORT::.keys
camelia rakudo-moar 600eb5: OUTPUT«Could not find symbol '&EXPORT'␤ in block <unit> at /tmp/5ZJkjZk8U_ line 1␤␤Actually thrown at:␤ in block <unit> at /tmp/5ZJkjZk8U_ line 1␤␤»
psch m: my \Test := EVAL 'require Test'; say Test::<EXPORT> 13:57
camelia rakudo-moar 600eb5: OUTPUT«(EXPORT)␤»
MadcapJake well I just have a situation where I want to place things in a module and then have another module save those exported symbols to a hash table
my \Test := EVAL 'require Test'; say Test::<EXPORT>::.keys 13:58
m: my \Test := EVAL 'require Test'; say Test::<EXPORT>::.keys
camelia rakudo-moar 600eb5: OUTPUT«5===SORRY!5=== Error while compiling /tmp/zA_Wg3_LzR␤Confused␤at /tmp/zA_Wg3_LzR:1␤------> 3EVAL 'require Test'; say Test::<EXPORT>:7⏏5:.keys␤ expecting any of:␤ colon pair␤»
13:58 sufrostico left 13:59 sufrostico joined, yqt joined
MadcapJake my $mod = 'Test'; require ::($mod); say ::($mod)::.keys; 13:59
m: my $mod = 'Test'; require ::($mod); say ::($mod)::.keys;
camelia rakudo-moar 600eb5: OUTPUT«()␤»
MadcapJake m: my $mod = 'Test'; require ::($mod); say ::($mod)::.keys.say;
camelia rakudo-moar 600eb5: OUTPUT«()␤True␤»
skids m: "Your unicorn consolation prize is { <兕 🦏 犀>.pick }".say 14:00
camelia rakudo-moar 600eb5: OUTPUT«Your unicorn consolation prize is 兕␤»
MadcapJake m: my $mod = 'Test'; require ::($mod); say ::($mod).^methods 14:01
camelia rakudo-moar 600eb5: OUTPUT«Method 'methods' not found for invocant of class 'Perl6::Metamodel::ModuleHOW'␤ in block <unit> at /tmp/e9T9uAAyQm line 1␤␤»
sortiz m: my \mod = (require ::('Test')); say mod::.keys 14:02
camelia rakudo-moar 600eb5: OUTPUT«(&todo_output EXPORT &failure_output &output)␤»
14:04 ilmari left 14:07 sufrostico left 14:08 ab6tract left 14:09 sufrostico joined 14:12 ilmari joined 14:19 sufrostico left
ugexe MadcapJake: have you looked at CompUnit::Util? 14:20
14:21 sufrostico joined 14:29 yqt left
MadcapJake ugexe: a little, I'm not sure what I would need from there. Also, seems weird that I can't just see what a module exports 14:31
ugexe MadcapJake: heh, i was just assuming it would be in CompUnit::Util :(
MadcapJake well it could be, but I'm not sure which of get-unit, get-lexpad, get-lexical I would use and how :P 14:35
jnthn get-unit, then lookup EXPORT, at a guess 14:36
That's how the import logic inside the compiler does it
14:41 buharin joined, fireartist left
MadcapJake m: my $module = 'Test'; ::($module)::EXPORT::DEFAULT::.keys.say; Test::EXPORT::DEFAULT::.keys.say; # why doesn't the first one work? 14:46
camelia rakudo-moar 600eb5: OUTPUT«0..0␤Could not find symbol '&DEFAULT'␤ in block <unit> at /tmp/24Bay51sg9 line 1␤␤Actually thrown at:␤ in block <unit> at /tmp/24Bay51sg9 line 1␤␤»
MadcapJake m: Test::EXPORT::DEFAULT::.keys.say; 14:47
camelia rakudo-moar 600eb5: OUTPUT«Could not find symbol '&DEFAULT'␤ in block <unit> at /tmp/o0wkidJ47j line 1␤␤Actually thrown at:␤ in block <unit> at /tmp/o0wkidJ47j line 1␤␤»
14:47 buharin left
MadcapJake m: use Test; Test::EXPORT::DEFAULT::.keys.say; 14:47
camelia rakudo-moar 600eb5: OUTPUT«(&isnt &plan &pass &cmp-ok &flunk &does-ok &subtest &unlike &like &use-ok &todo &skip-rest &eval-dies-ok &is-deeply &throws-like &ok &is &diag &done-testing &is-approx &skip &dies-ok &lives-ok &eval-lives-ok &MONKEY-SEE-NO-EVAL &nok &is_approx &isa-ok &can…»
14:47 buharin joined
MadcapJake is there anyway to do that at runtime? 14:49
I think the problem is that ::('SOMESTRING') creates an anonymous module 14:50
14:50 sufrostico left
jnthn MadcapJake: You'd have to bring in the test module somehow, like with require 14:51
sortiz my \mod = (require ::('Test')); my \exps = ::mod::('EXPORT::DEFAULT'); say exps::.keys
m: my \mod = (require ::('Test')); my \exps = ::mod::('EXPORT::DEFAULT'); say exps::.keys
camelia rakudo-moar 600eb5: OUTPUT«(&isnt &plan &pass &cmp-ok &flunk &does-ok &subtest &unlike &like &use-ok &todo &skip-rest &eval-dies-ok &is-deeply &throws-like &ok &is &diag &done-testing &is-approx &skip &dies-ok &lives-ok &eval-lives-ok &MONKEY-SEE-NO-EVAL &nok &is_approx &isa-ok &can…»
MadcapJake oh hmm is it because it's sigilless? 14:52
jnthn Well, you have to require Test so the symbol even exists
stmuk ugexe: I can only get "zef install" p6doc to work if I specify Panda::Installer (as used in Build.pm) rather than Panda in the META.info
jnthn But then you have to force a late-bound lookup also, yes
pmurias jnthn: on of your goals in the performance grant is to improve the code gen for grammars, are there any plans for high level changes or just tweaks in how the native code is emitted? 14:55
* one
14:56 TreyHarris left
spintronic m: 1+1; 14:57
camelia rakudo-moar 600eb5: OUTPUT«WARNINGS for /tmp/3p6aLvDBlX:␤Useless use of "+" in expression "1+1" in sink context (line 1)␤»
spintronic m: 1+1
camelia rakudo-moar 600eb5: OUTPUT«WARNINGS for /tmp/3Tqs9IHwZS:␤Useless use of "+" in expression "1+1" in sink context (line 1)␤»
spintronic m: print(1+1);
camelia rakudo-moar 600eb5: OUTPUT«2»
jnthn pmurias: Both 14:58
pmurias: A number of really simple "regexes" don't really need the prelude/postlude etc. we have today. 14:59
15:00 cognominal joined 15:01 TreyHarris joined, eugen left
pmurias jnthn: seems like something I should steal for nqp-js 15:02
15:02 xinming joined, sufrostico joined
jnthn pmurias: Well, those pieces I'll try and do in a way that all backends get them "for free" 15:03
masak today's autopun: bash.org/?3936 15:05
moritz masak: that's *quite* old :-) 15:08
nevertheless classy
perlpilot That's like IRC every day.
15:12 sufrostico left, nakiro left 15:13 avenj joined 15:16 tinita joined
dalek c: 4498d72 | (Steve Mynott)++ | bin/p6doc:
remove awful -IFakeDir workaround for precomp issue now fixed
15:17
masak .oO( several years ago's autopun )
15:19 ocbtec left
ufobat what does |$/.list mean? 15:20
i am just talking about that |
perlawhirl i think it flattens 15:21
masak ufobat: "turn the list into its elements" (flattening)
perlpilot masak: in that bash.org link, what if Chistin1 was aware of the irony in what they were saying and were doing so for humorous effect? Is it still an autopun?
masak perlpilot: good question.
perlawhirl docs.perl6.org/language/operators#prefix_|
jnthn If making an autopun were to disqualify it as an autopun, then there'd be no autopuns... :)
masak perlpilot: I don't think the autopun discovery process factors in irony or self-awareness 15:22
perlpilot: what jnthn said :)
perlpilot: the important aspect is that the brain goes "oh, so the thing you do is the thing you... ah!"
perlpilot Then why aren't you making up autopuns all the time? ;-) 15:23
masak we aren't? :P
ufobat so both expressions are equal $/.list.flat |$/.list
masak I guess because a little bit like with puns, if you start mass-producing them, most of them end up being forced and not so innovative
perlpilot so, wild autopuns are more precious than artificial ones? 15:24
Hotkeys Such is life
jnthn ufobat: No, | means "slip this into the surrounding context"
ufobat: If that's an argument list for a sub/method call, then it's like passing each item in the list as an argument
ufobat it is a argument for a method 15:25
jnthn OK, so that's what it's doing
m: sub foo($a, $b) { say $a + $b }; my @a = 3, 5; foo(|@a)
camelia rakudo-moar 600eb5: OUTPUT«8␤»
perlpilot waits for the contrast against .flat ... 15:26
;)
perlawhirl well... ufobots question specifically showed a Match obj... the docs say 'Flattens objects of type Capture, Pair, List Map and Hash into an argument list.'
it also adds 'Outside of argument lists, it returns a Slip, which makes it flatten into the outer list.' 15:27
ufobat if your method has no signature, its basically of no meaning?
wait ill figure that out myself
the hint is enough
thinking of masaks pun ;)
15:29 vendethiel joined 15:31 SWH joined
masak perlpilot: yes, the wild ones are the good ones 15:31
15:40 xinming left 15:41 ZoffixW joined
ZoffixW Weren't there a URL module for manipulating URLs? Not in the Ecosystem :/ 15:41
Oh, there's URI 15:42
And that's the one I don't like :/ 15:43
15:43 kst` is now known as kst
ZoffixW Also.. exciting news: today, for the first time ever, I've used Perl 6 professionally :) Most of the heavy-lifting was done by Perl 5 via Inline::Perl5, but I think it still counts :) 15:44
15:50 SWH left, thtgs left
perlpilot ZoffixW++ 15:52
15:52 vendethiel left
perlpilot ZoffixW: I've actually talked about doing that at $work myself. Still looking for the right opportunity though. 15:53
masak ok, camelia isn't enough to confirm this, so if I could ask someone to double-check my (now-golfed) bug: 15:54
the program `use DBIish; DBIish.connect("Pg")` gives the error `No such method 'trans' for invocant of type 'Any'` (which is correct as far as that goes)
but `use DBIish; use lib "lib"; DBIish.connect("Pg")` gives `===SORRY!=== Could not locate compile-time value for symbol DBError` 15:55
I have DBIish installed very normally, via panda
ZoffixW masak, yup: fpaste.scsys.co.uk/509608 15:56
masak ZoffixW++
masak submits rakudobug
this also immediately suggests a temporary workaround: I just need to inline my module from lib/ :/
15:58 domidumont left
masak also, ZoffixW++ for using Perl 5 and Perl 6 and Inline::Perl5 15:59
ZoffixW :)
masak and yes, of course Inline::Perl5 counts.
in fact, it counts *more*, because it shows that you're a pragmatist
gregf_ m: sub foo(Int $a, Str $b) { say $a ~ " - " ~ $b }; my @a = 3, "foo"; foo(|@a) 16:01
camelia rakudo-moar 600eb5: OUTPUT«3 - foo␤»
16:02 perlawhirl left, perlawhirl joined
jnthn masak: Does putting the "use lib" *first* help? 16:02
masak: Note you probably should anyway, 'cus putting "use lib" *after* modules have been loaded forces pre-comp to be disabled, iirc 16:03
masak jnthn: yes, putting `use lib` before `use DBIish` makes the bug go away 16:05
so that's the workaround if I don't like speed... :)
jnthn masak: uh, no, you want use lib first if you *do* want speed 16:06
masak .oO( don't worry, it's only a web application )
oh!
perhaps the bug is even related to precompilation being forced off?
jnthn masak: It's doing use lib *after* loading other things that is bad
Perhaps, dunno
dalek Iish: 2de753f | (Salvador Ortiz)++ | lib/DBDish/Pg.pm6:
Pg: Don't try to quote-and-scape a missing param

Fix "No such method 'trans' for invocant of type 'Any'"
jnthn nine++ has been taking care of that area of things, I'm not really up on the latest :) 16:07
masak sortiz++ :)
ZoffixW sortiz++ that was fast :D 16:08
16:08 wtw left 16:09 lizmat joined, wamba joined 16:10 abraxxa1 joined, abraxxa left 16:13 teatime left, teatime joined, Khisanth left
sortiz About the lib change, is a more complicated problem, DBIish try to load its drivers dynamically, but if the current repo changes, all the Roles loaded can't be found by the loaded driver. 16:13
ZoffixW Is there a way to coerce a value into a type? 16:14
m: subset T of Int where { $_ == any(1 | 2) ?? True !! $_ = 2 }; my T $x = 3; say $x
camelia rakudo-moar 600eb5: OUTPUT«Cannot assign to a readonly variable or a value␤ in block <unit> at /tmp/wKsgi0MSiN line 1␤␤»
ZoffixW I guess `where` is not where you should be doing it... 16:17
16:18 wtw joined 16:19 abraxxa1 left, abraxxa joined
psch hm, COERCE was supposed to be a thing somewhen iirc 16:20
m: class ModInt is Int { has $!max = 5; has $!value; submethod BUILD(:$!value, :$!max) { $!value = $!value % $!max }; method COERCE(Int $x) { ModInt.new($x, self.max) } }; my $x = ModInt(5); say $x.WHAT # i think this is what it was supposed to look like
camelia rakudo-moar 600eb5: OUTPUT«Cannot find method 'ModInt'␤ in block <unit> at /tmp/ElGpkBSewq line 1␤␤»
lucs m: printf $*ERR: "%.4f", pi # :/ 16:21
camelia rakudo-moar 600eb5: OUTPUT«Method 'printf' not found for invocant of class 'IO::Handle'␤ in block <unit> at /tmp/zgvb62Pe2o line 1␤␤»
lizmat m: say 42.Int # ZoffixW: coercing to type ?
camelia rakudo-moar 600eb5: OUTPUT«42␤»
lizmat m: say 42.WHAT # ZoffixW: coercing to type ?
camelia rakudo-moar 600eb5: OUTPUT«(Int)␤»
16:22 pmurias left
ZoffixW No, I have an object that I want to take a URL as a Str for the attribute and automagically convert it into a URI object 16:22
[Coke] when calling a function, yes, you can do that. 16:23
psch m: class A { has Rat $.x; submethod BUILD(Rat(Int) :$!x) { } }; say A.new(:x(5)).perl
camelia rakudo-moar 600eb5: OUTPUT«A.new(x => 5.0)␤»
lizmat create an .URI method on that object?
sortiz masak, If you need to change lib, use the following workarround: "use DBIish; BEGIN DBIish.install-driver("Pg"); use lib "lib"; DBIish.connect("Pg");"
lucs Hullo?
[Coke] psch++
16:24 perlawhirl left, telex left
masak sortiz: oh! 16:24
sortiz That way the driver is loaded before the repo is changed and works well.
masak sortiz: well, first I'm going to try and put `use lib` first, as jnthn++ suggested
[Coke] lucs: yes? 16:25
lucs [Coke]: Um, the 'Hullo?' was for the lag (I hadn't noticed). The ':/' is for, no printf on $*ERR: ? 16:26
16:26 Khisanth joined
ZoffixW m: $*ERR.put: sprintf "%.4f", pi # :/ 16:26
camelia rakudo-moar 600eb5: OUTPUT«3.1416␤»
lucs ZoffixW: Sure :( 16:27
16:27 abraxxa left
sortiz masak, Yes, change lib first works. Is the dynaloader that broke if the REPO change in between, dunno why. 16:28
16:29 pmurias joined
ZoffixW lucs, seems Perl 6's printf doesn't take filehandles: github.com/rakudo/rakudo/blob/1037...ol.pm#L365 16:29
the 5to6 docs likely needs to be updated 16:30
psch printf on IO::Handle doesn't seem particularly objectionable
m: put "foo"
camelia rakudo-moar 600eb5: OUTPUT«foo␤»
16:31 adrusi left 16:32 telex joined, adrusi joined
ZoffixW Yeah, it can probably be simply done by changing line 365 to multi and also adding multi printf(IO::Handle $fh, Cool $format, *@args) { $fh.print: sprintf $format, @args } 16:33
psch m: class A { method foo(A: $bar) { say "baz" } }; foo A: "bar"
camelia rakudo-moar 600eb5: OUTPUT«baz␤»
psch ZoffixW: no, that invocation looks for a method on the first arg 16:34
ZoffixW: hence the invocant marker :
+)
but i don't think the printf method would be much harder... :) 16:35
ZoffixW Yeah, I guess I was just thinking of the mention of filehandle for printf in 5to6 16:36
m: say is-prime 31337:
camelia rakudo-moar 600eb5: OUTPUT«True␤»
ZoffixW mother of god :o
hm 16:37
psch m: class A { method f { [1,2,3] } }; say pop f A: :
camelia rakudo-moar 600eb5: OUTPUT«3␤»
ZoffixW m: say Rat 31337:
camelia rakudo-moar 600eb5: OUTPUT«5===SORRY!5=== Error while compiling /tmp/6HcBY2sF3x␤Two terms in a row␤at /tmp/6HcBY2sF3x:1␤------> 3say Rat7⏏5 31337:␤ expecting any of:␤ infix␤ infix stopper␤ postfix␤ statement end␤ stat…»
ZoffixW chucks this into "avoid using" mental bin
16:38 Guest59844 joined
psch RabidGravy: what'd you suggest for sending SysEx of arbitrary size via Audio::PortMIDI? writing a patch? :) 16:39
16:40 kerframil joined
psch m: class A { method B { "meth b" } }; say B A: 16:41
camelia rakudo-moar 600eb5: OUTPUT«meth b␤»
psch m: class A { method B { "meth b" } }; class B { }; say B A:
camelia rakudo-moar 600eb5: OUTPUT«5===SORRY!5=== Error while compiling /tmp/OPrlVUxZpe␤Two terms in a row␤at /tmp/OPrlVUxZpe:1␤------> 3hod B { "meth b" } }; class B { }; say B7⏏5 A:␤ expecting any of:␤ infix␤ infix stopper␤ postfix␤ …»
psch that is LTA
ZoffixW m: my Int|Rat $x = 4.4 16:42
camelia rakudo-moar 600eb5: OUTPUT«5===SORRY!5=== Error while compiling /tmp/_pawmz_tPI␤Malformed my␤at /tmp/_pawmz_tPI:1␤------> 3my Int7⏏5|Rat $x = 4.4␤»
ZoffixW I wish stuff like this worked.
It's possible in Perl 5 with modules.
jnthn m: my $x where Int|Rat = 4.4 16:43
camelia ( no output )
[Coke] jnthn++
jnthn will be doing Perl 6 / MoarVM stuff all day tomorrow o/
If I've energy I'll try and write up the bits I did last week this evening, also :)
dinner time now :) &
ZoffixW Damn. That's aweseome jnthn++
psch m: constant \T = Rat|Int; my T $x = 5 16:44
camelia rakudo-moar 600eb5: OUTPUT«Type check failed in assignment to $x; expected Junction but got Int (5)␤ in block <unit> at /tmp/fZtp9YQ_zZ line 1␤␤»
lizmat ++jnthn
psch can't have junction-types /o\
lizmat psch: if you could, then allomorphs would have been much easier to implement :-)
ZoffixW m: subset IntRat of Any where Int|Rat; my IntRat $x = 4.4
camelia ( no output )
16:45 dakkar left
lizmat m: say <a>.WHAT 16:45
camelia rakudo-moar 600eb5: OUTPUT«(Str)␤»
lizmat m: say <a b>[0].WHAT
camelia rakudo-moar 600eb5: OUTPUT«(Str)␤»
16:45 zakharyas left
[Coke] m: say <1.2>.WHAT 16:45
camelia rakudo-moar 600eb5: OUTPUT«(RatStr)␤»
lizmat m: say <42>.WHAT
camelia rakudo-moar 600eb5: OUTPUT«(IntStr)␤»
psch lizmat: yeah, at least on the front. there's still at least one borky hack around somewhere in nqp.Ops.java.getBI or so...
psch RT'd that 'B A:' thingy 16:48
ZoffixW m: class A { has Rat $.x; submethod BUILD( :$x where Int|Rat ) { $!x = $x.Rat } }; A.new(:x<4>).perl.say
camelia rakudo-moar 600eb5: OUTPUT«A.new(x => 4.0)␤»
ZoffixW This will do what I want. psch++
(where Int|Rat are Str|URI)
psch ZoffixW: your Str have a .URI method? :) 16:49
psch is nitpicky :P
ZoffixW No, the $x.Rat would become $x ~~ URI ?? $x !! URI.new: $x;
psch ah 16:50
[Coke] I would probably just have two multis, one for each type, rather than junction the types.
ZoffixW Also a good idea.
[Coke] (or use a Role if all I cared about was a method or two that both had.)
ugexe stmuk: ah thanks! i was able to find out why, will fix shortly 16:53
17:07 domidumont joined, domidumont left, domidumont joined 17:10 ZoffixW left
gregf_ m: class Foo { submethod BUILD(*%args){ say "foo-bar"; } }; Foo.new 17:12
camelia rakudo-moar 600eb5: OUTPUT«foo-bar␤»
17:13 espadrine left 17:23 sufrostico joined, grondilu left 17:29 lizmat_ joined, lizmat left 17:31 _z joined 17:32 kerframil left 17:33 raiph left 17:34 raiph joined 17:37 raiph left, raiph joined 17:41 lizmat_ is now known as lizmat 17:45 raiph left, raiph joined 17:47 raiph left, raiph joined 17:49 raiph left 17:50 raiph joined
masak gregf_: even if you don't capture the named arguments explicitly with *%args, they still get captured implicitly in %_ 17:50
m: class Foo { submethod BUILD(){ say %_.perl; } }; Foo.new(:foo, :bar(42), :!baz) 17:51
camelia rakudo-moar 600eb5: OUTPUT«{:bar(42), :!baz, :foo}␤»
17:52 spider-mario joined
masak m: say []; say {} 17:59
camelia rakudo-moar 600eb5: OUTPUT«[]␤␤»
masak right now, arrays .gist with their brackets (nice!), but hashes don't .gist with their curlies (aww!) 18:00
18:02 cdg left 18:06 Actualeyes left 18:08 kurahaupo joined 18:11 Khisanth left
lizmat masak: one could argue that the array.gist is wrong :-) 18:16
sortiz m: say ().WHAT, ().gist; # And List.gist ? ;-) 18:17
camelia rakudo-moar 600eb5: OUTPUT«(List)()␤»
18:19 chrisdotcode joined
sortiz lizmat, imo Array.gist should include [], but dunno if the current behavior is spectested. 18:20
lizmat m: my @a = 1,2,3; say @a
camelia rakudo-moar 600eb5: OUTPUT«[1 2 3]␤»
lizmat m: my %a = a => 42, b => 666; say @a 18:21
camelia rakudo-moar 600eb5: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ZSbaNbt8Vd␤Variable '@a' is not declared. Did you mean '%a'?␤at /tmp/ZSbaNbt8Vd:1␤------> 3my %a = a => 42, b => 666; say 7⏏5@a␤»
lizmat m: my %a = a => 42, b => 666; say %a
camelia rakudo-moar 600eb5: OUTPUT«a => 42, b => 666␤»
sortiz lizmat, sorry, thinking about Hash.
And wrote Array :-)
18:22 Actualeyes joined
lizmat tries a patch 18:22
and spectests 18:24
18:25 Khisanth joined
sortiz m: say {}.perl , {}.gist 18:26
camelia rakudo-moar 600eb5: OUTPUT«{}␤»
sortiz seem interchanged, though 18:27
lizmat $ 6 'my %a = a => 42, b => 666; say %a' 18:29
{a => 42, b => 666}
breaks a few spectests :-(
sortiz :-( 18:30
lizmat well, basically the tests are testing on the gist of a data structure 18:32
like: is((produce(&foo, flat $hash, <a b c>)).gist, '(a => b => c => 42 b => c => 42 c => 42 42)'
18:35 Khisanth left, rindolf left 18:38 FROGGS joined 18:39 vendethiel joined, xiaomiao joined 18:40 rindolf joined 18:43 xiaomiao left 18:49 Khisanth joined, molaf joined, xiaomiao joined
masak I for one would welcome our new curly-braces-on-gist-of-Hash overlords. 18:53
18:56 ZoffixW joined
masak m: enum Player (Player1 => +1, Player2 => -1); sub opponent(Player $p --> Player) is export { Player(-$p) }; my $player = Player1; $player .= &opponent; say $player 18:57
camelia rakudo-moar 600eb5: OUTPUT«Player2␤»
ZoffixW m: my Int:U $x; say $x
camelia rakudo-moar 600eb5: OUTPUT«Method 'shortname' not found for invocant of class 'Perl6::Metamodel::DefiniteHOW'␤ in block <unit> at /tmp/QkztpZprNy line 1␤␤»
masak <3 Perl 6
ZoffixW Is that supposed to happen?
masak ZoffixW: no, doesn't look like something desirable
ZoffixW k, I'll rakudobug 18:58
masak ZoffixW++ 18:59
ZoffixW Done: rt.perl.org/Ticket/Display.html?id=127841 19:00
Well. This was weird. Came in to ask a question. Found possibly-bug while making a sample code. Rakudobugged. Found the answer to my question on my own :P 19:02
masak well done! 19:04
jnthn Yeah, DefiniteBug :) 19:05
hoelzro: rt.perl.org/Ticket/Display.html?id=127832 isn't a bug in that you get the error, though the stack trace is a bit LTA 19:06
hoelzro: Role parameterization with [...] is syntactic
hoelzro: As in, only SomeTypeName[...] will do SomeTypeName.^parameterize(...)
hoelzro jnthn: so .^parameterize is the only way to do what I want? 19:07
jnthn Correct
hoelzro ok
want me to change the subject of the ticket to reflect the LTA error?
jnthn Yeah...well, is it LTA error or LTA stack trace with MOP bits in? :)
It blows up 'cus we try to pun the role to call .AT-POS on it, fwiw 19:08
19:12 domidumont left
ZoffixW m: sub foo returns Int:D { my Int $x; $x }; foo; 19:13
camelia rakudo-moar 600eb5: OUTPUT«Type check failed for return value; expected Int but got Int␤ in sub foo at /tmp/lc1l0M22mt line 1␤ in block <unit> at /tmp/lc1l0M22mt line 1␤␤»
ZoffixW Rakudobug: rt.perl.org/Ticket/Display.html?id=127842
masak realization: because private methods are namespaced differently from public ones, I don't have to come up with a prefix (like 'internal-') or a suffix (like '-helper') when I name the internal private helper method :)
19:13 yqt joined
huf there's no namespacing when you grep :) 19:13
masak then you can grep for '!themethod' 19:14
jnthn Right, 'cus it's on callee and caller ends :)
huf oh, built in prefix :) that solves it then :)
masak I think we all love private methods at this point 19:15
I for one didn't expect to use them as much as I do
too bad they don't multi, though ;)
moritz now if they could be mul... what masak said :-)
jnthn Yeah. Especially when I reach for them in ES6 and...oh... :)
Yeah, I want them to be multi-able
masak jnthn: in TypeScript, you can basically have your multis
...kind of 19:16
jnthn I was talking about my privates, not my multis... :P
masak .oO( eww! )
jnthn o.O
It sounded like a cute play on your comment until I read it :P 19:17
I guess I hit upon missing private methods in ES6 'cus I was refactoring from code not using the class syntax. 19:18
Which would fake up private in various ways :)
But yeah, I'm very glad of private methods in Perl 6 :)
nadim Good evening everyone. is there a way to get the size of an object, like Devel::Size in P5?
jnthn nadim: It's very early and rough and ready, but you can use heap snapshots :) 19:19
And github.com/jnthn/p6-app-moarvm-heapanalyzer/ to query them
timotimo has a fork of that tool with more features also... 19:20
nadim I read your post about them but I mean at run time, not in a post analysis, except if snapshots do that and I didn't get it
hoelzro jnthn: I figured; I tried to add AT-POS to the punning exceptions list, which resulted in LTA behavior =)
jnthn hoelzro: yeah ;) 19:21
nadim jnthn: I mean to add it as an option to Data::Dump::Tree
jnthn nadim: Ah, then no
nadim Id there a Devel size in th epipeline?
jnthn Not from me, at least 19:22
nadim Then I'll find another thing to work on, I think I have alist of modules that i should write ... somewhere
jnthn Though in working on heap snapshots we'll probably have done all the hard work to have such a feature :) 19:23
Since we're adding ways to query object's memory use as part of that
It's Moar-specific though 19:24
ZoffixW Is there a list of what sort of native types there are in Perl 6? (I need it for an article)
I guess a better question is how to get a list of types not listed on docs.perl6.org/type.html ? I don't see int32 nor UInt in the list. 19:26
masak ZoffixW: S09 19:27
ZoffixW masak++
jnthn In terms of what's implemented, it's u?int[8|16|32|64], num32, num64, and int/uint/num
19:28 Actualeyes left
ZoffixW Thanks 19:28
19:29 hankache joined
sortiz ZoffixW, btw, UInt isn't a native type, is a subset 19:30
ZoffixW sortiz, is it the only subset or are there more?
hankache good evening #perl6
moritz m: say Int:U.WHAT
camelia rakudo-moar 600eb5: OUTPUT«Method 'shortname' not found for invocant of class 'Perl6::Metamodel::DefiniteHOW'␤ in block <unit> at /tmp/mWDRv2dA0o line 1␤␤»
sortiz ZoffixW, ups, good question, I dunno. 19:31
moritz m: say Int:U
camelia rakudo-moar 600eb5: OUTPUT«Method 'shortname' not found for invocant of class 'Perl6::Metamodel::DefiniteHOW'␤ in block <unit> at /tmp/u68WF60mQW line 1␤␤»
ZoffixW m: my UInt64 $x = 42
camelia ( no output )
Juerd Oh, heh. I wonder if anyone will ever be confused between uint and Int:U :) 19:32
perlpilot Juerd: no. no one will ever be confused. ;) 19:33
sortiz moritz, about the error show, see the discussion in github.com/rakudo/rakudo/pull/701 19:34
moritz sortiz: oh, I just basically re-implemented your pull request :-) 19:35
sortiz: maybe we should do both :-)
sortiz moritz, I did not pursue the original one because I think it is a better option the one annotated in the comment. 19:38
ZoffixW How many bits are int/uint/num? 19:39
moritz ZoffixW: platform dependent, afaict
ZoffixW Cool. Thanks. 19:40
moritz ZoffixW: but typically 64
nadim jnthn: I think Moar-specific is quite nice already 19:41
kaare_ pmurias: I passed by here some weeks when there was some talk that you'd start blogging about the grant work.
Any progress? 19:42
19:43 Actualeyes joined, buharin left
jnthn nadim: I was pondering putting a method onto $*VM to properly expose forcing a GC run, I wonder if I could do an object-size at the same time... 19:45
19:48 cdg joined, ZoffixW left, cdg left 19:49 buharin joined, cdg joined
dalek osystem: 8d26bcb | Emeric54++ | META.list:
Update META.list
19:53
osystem: 52706b7 | moritz++ | META.list:
Merge pull request #189 from Emeric54/patch-2

Update META.list
19:53 mohae left
masak is there any way I can install an older version of a module with panda? 19:55
or, alternatively... pnu, help! :) 19:56
kmwallio masak: Sync the repo to the version you want and specify the local path to panda? 19:57
sortiz masak, you can use 'panda install .' from any checkout-ed version. 19:58
moritz masak: you can git clone + checkout and then panda install .
masak ooh
19:58 darutoko left
masak yes, that's probably what I should do, then 19:58
jnthn If 3 people suggest it, it must be right! :)
masak within seconds of each other! :D 19:59
(it seems I need to downgrade my DBIish to the one the heroku rakudo buildpack is using)
because some method names have changed in the intervening period
kmwallio does rakudo/rakudobrew compile on Ubuntu 14.04?
masak I would assume so 20:00
kaare_ kmwallio: I installed Perl 6 thru rakudobrew @ work
Where I have 14.04
20:01 labster joined
kmwallio kaare_, did you have to do anything special, I tried using Vagrant to setup a box, and hit some issues? I just installed git and build-essential 20:02
pnu masak, doesn't the buildpack install the latest version (on heroku) for you if you declare it as a dependency?
sortiz masak, I have not changed the legacy methods to kebab-case precisely to maintain back compatibility, what methods names has problems? 20:03
masak pnu: oh, seems I'm missing that bit, yes. 20:04
kaare_ kmwallio: Nope. It's a little while ago, so I don't remember any specifics about it. Just following a recipe
masak pnu: I had Bailador as a dependency, but not DBIish. trying that. pnu++
sortiz: allrows
20:05 buharin left, espadrine joined
sortiz masak, 'allrows' hasn't changed as far as I know!? What is heroku expecting? 20:08
masak sortiz: I don't understand the question. under heroku, there's a DBIish without allrows. it works locally. 20:10
pnu: nope, declaring the dependency didn't help :(
pnu: actually, I don't see that it's installing either Bailador or DBIish during the push to heroku. maybe because they're part of Star already or something?
pnu: anyway, it's been a breeze to use the buildpack so far! great work! 20:11
MadcapJake got really distracted these last few days and is in the midst of writing a Forth in Perl 6 :)
masak now I only wish it had a newer version of DBIish so I didn't have to downgrade locally in order to continue... :)
pnu Oh no, the current buildpack runs just 'panda install .' in the project root.. Should be installdeps, but I had some issues with the repo locations at that time. 20:13
I can update the base package. 20:14
sortiz masak, So the version used in heroku is an ancient one, and will have other problems.
jnthn Just a short progress report from me about last week's work: 6guts.wordpress.com/2016/04/05/sma...ome-fixes/
masak pnu++ # updating the base package is the easiest from my perspective :) 20:16
jnthn++ # blag
pnu masak: do you have `echo "2016.03.38.g.8.df.1.a.69" >.rakudo-version` ... or are you using the default version? 20:17
masak pnu: I'm just using the buildpack as-is 20:21
pnu: but the rakudo version shoudln't be connected to the DBIish version, should it?
20:22 pmurias left
jnthn Time to rest up before tomorrow's Perl 6 hackery :) 'night o/ 20:23
masak 'night, jnthn
lizmat nigh jnthn
20:24 pmurias joined
pmurias kaare_: in short nqp-js compiles itself on passes it's tests, I'm now working on compiling rakudo to js 20:25
hoelzro pmurias++
20:26 lizmat left
pmurias kaare_: I should really start bloging, will try to post something today, and then try to post regularly even without a laundry list of things building up 20:26
kaare_ pmurias: Thanks a lot. 20:29
It's just coz it's hard to follow only by irc with only 5 minutes here and 3 there.
20:30 hankache left 20:31 spider-mario left, spider-mario joined 20:32 spider-mario left 20:33 buharin joined
MadcapJake can you call methods on % containers holding objects that do the associative role? 20:37
pnu masak: true, but the image for the specified version is bundled with the latest DBIish and Task::Star modules at that time. Latest is 2016.03.86.g.0.e.95.cde. You should get all the latest modules if you set that to .rakudo-version.
MadcapJake m: class Foo does Associative { method bar { 'baz'.say } }; my Foo %f .= new; %f.bar; 20:38
camelia rakudo-moar c8ec5a: OUTPUT«Method 'bar' not found for invocant of class 'Hash[Foo]'␤ in block <unit> at /tmp/ElNIddOAmB line 1␤␤»
perlpilot MadcapJake: %f is a Hash, not a Foo. 20:39
20:39 FROGGS left
skids m: class Foo does Associative { method bar { 'baz'.say } }; my %f := Foo.new; %f.bar; 20:40
camelia rakudo-moar c8ec5a: OUTPUT«baz␤»
masak pnu: ok. sounds good. 20:41
pnu: what, concretely, do I need to set where?
pnu masak: `echo "2016.03.86.g.0.e.95.cde" >.rakudo-version` in your project root. add and commit. :-) 20:42
20:44 pmurias left 20:45 buharin left
masak ah. excellent. 20:46
pnu++
MadcapJake skids: ahh, I have to bind it to work 20:47
skids Right, "TypeName %f" is a Hash with TypeName values. 20:48
MadcapJake oh yeah! I've done that with arrays, just was thinking it would work like a scalar. 20:50
perlpilot nah, you either bind as skids showed or ... use a scalar :) 20:51
20:54 rindolf left 20:56 Begi1 joined 20:57 Begi left, Begi1 is now known as Begi, skids left
masak pnu: now I'm getting "Could not find Bailador in: [places]", despite heroku installing Bailador as part of the push... 21:03
ZoffixWin m: ' ́yo􏿽xCC􏿽x81'.comb>>.uniname.say 21:04
camelia rakudo-moar c8ec5a: OUTPUT«(SPACE LATIN SMALL LETTER Y LATIN SMALL LETTER O WITH ACUTE)␤»
ZoffixWin Why the acute on Y doesn't show up in the uniname?
m: ' ́yo􏿽xCC􏿽x81'.comb[0].say 21:05
camelia rakudo-moar c8ec5a: OUTPUT« ́␤»
ZoffixWin m: ' ́yo􏿽xCC􏿽x81'.comb[0].uniname.say 21:06
camelia rakudo-moar c8ec5a: OUTPUT«SPACE␤»
ZoffixWin :S
geekosaur ZoffixWin, fwiw that shows up here as a space with a combining acute 21:09
then a bare y
21:10 Khisanth left
pnu masak: oh, true.. didn't test it. Let me bisect the latest working one. 2016.03.38.g.8.df.1.a.69 is the latest I know works. Something has changed in repo stuff since. 21:10
ZoffixWin geekosaur, I see this: i.imgur.com/blAaoqn.png 21:11
Still, regardless of where the first acute is on, shouldn't it still be mentioned in uninames?
m: "\N[COMBINING ACCUTE ACCENT]y".say
camelia rakudo-moar c8ec5a: OUTPUT«5===SORRY!5=== Error while compiling /tmp/4ytcDiQMHl␤Unrecognized backslash sequence: '\N'␤at /tmp/4ytcDiQMHl:1␤------> 3"\7⏏5N[COMBINING ACCUTE ACCENT]y".say␤ expecting any of:␤ double quotes␤ term␤»
ZoffixWin What's the Perl 6 way to type these? 21:12
perlpilot m: "\c[COMBINING ACCUTE ACCENT]y".say
camelia rakudo-moar c8ec5a: OUTPUT«5===SORRY!5=== Error while compiling /tmp/nQJTGasKhK␤Unrecognized character name COMBINING ACCUTE ACCENT␤at /tmp/nQJTGasKhK:1␤------> 3"\c[COMBINING ACCUTE ACCENT7⏏5]y".say␤»
geekosaur m: "\c[COMBINING ACUTE ACCENT]y".say
camelia rakudo-moar c8ec5a: OUTPUT«́y␤»
perlpilot ah ... spelling 21:13
ZoffixWin Ah, it must be the sideeffect of .comb
m: say uninames ' ́yo􏿽xCC􏿽x81'
camelia rakudo-moar c8ec5a: OUTPUT«(SPACE COMBINING ACUTE ACCENT LATIN SMALL LETTER Y LATIN SMALL LETTER O WITH ACUTE)␤»
sjn m: "y\c[COMBINING ACUTE ACCENT]".say
camelia rakudo-moar c8ec5a: OUTPUT«ý␤»
21:14 awwaiid joined
ZoffixWin Thanks 21:14
m: " \c[COMBINING ACUTE ACCENT]".comb>>.uniname.say; " \c[COMBINING ACUTE ACCENT]".comb>>.uninames.say 21:16
camelia rakudo-moar c8ec5a: OUTPUT«(SPACE)␤((SPACE COMBINING ACUTE ACCENT))␤»
21:17 TEttinger joined
ZoffixWin k, I cracked the puzzle. .uniname only tells you about the first char. And it tells about acute on the y, because it does that magic where combining char and letter can mean the same as the letter with the mark as single char 21:17
ZoffixWin pats self on the back
21:23 Khisanth joined
sjn should .uniname give a warning if it "has something left" in the string it got passed? 21:26
pnu masak: 2016.03.52.gae.3.a.791 works too: gist.github.com/pnu/46d6eeb177d01b...5708e48633 21:27
masak pnu: ok, trying that
MadcapJake how come the language/list pod doesn't show how to get the last element of a list?
21:31 Begi left
masak pnu: yay! it works now \o/ 21:32
masak celebrates by going to bed 21:33
'night, #perl6
ZoffixWin night
MadcapJake, maybe it's just not written yet? If you have time, just add it :)
sortiz gnight masak. 21:36
ZoffixWin m: role Foo { method bar{ say $!foo } }; class Bar does Foo { has $!foo = 'foobar'; }; Bar.new.bar
camelia rakudo-moar c8ec5a: OUTPUT«5===SORRY!5=== Error while compiling /tmp/kM8OkRX_SG␤Attribute $!foo not declared in role Foo␤at /tmp/kM8OkRX_SG:1␤------> 3role Foo { method bar{ say $!foo } }7⏏5; class Bar does Foo { has $!foo = 'foob␤ expecting any of:␤ ho…»
ZoffixWin I don't suppose there's a way to make $!foo available in my roles, but not in the public interface of Bar, is there?
m: role Foo { method bar ($self:) { say $self!foo } }; class Bar does Foo { has $!foo = 'foobar'; method !foo { $!foo } }; Bar.new.bar; 21:39
camelia rakudo-moar c8ec5a: OUTPUT«foobar␤»
ZoffixWin Good 'nuf for me
Juerd You can have 'self' without $ even if it's not in the signature. 21:40
Also, your method !foo could "is rw" if you like :)
ZoffixWin m: role Foo { method bar { say self!foo } }; class Bar does Foo { has $!foo = 'foobar'; method !foo { $!foo } }; Bar.new!foo;
camelia rakudo-moar c8ec5a: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Gg_sqwswMi␤Private method call to foo must be fully qualified with the package containing the method␤at /tmp/Gg_sqwswMi:1␤------> 3r'; method !foo { $!foo } }; Bar.new!foo7⏏5;␤ expecting any of…»
ZoffixWin Oh, oops. Wrong code
Works. Thanks, Juerd 21:41
m: class Bar { has $!foo = 'foobar'; method !foo { $!foo } }; my $x = Bar.new; say $x!foo;
camelia rakudo-moar c8ec5a: OUTPUT«5===SORRY!5=== Error while compiling /tmp/EDasbMYHrH␤Private method call to foo must be fully qualified with the package containing the method␤at /tmp/EDasbMYHrH:1␤------> 3{ $!foo } }; my $x = Bar.new; say $x!foo7⏏5;␤ expecting any of…»
ZoffixWin So what does this mean "fully qualified"? Does it mean there's actually a way to call !foo in this case?
Juerd $x!Bar::foo gives another interesting error message. 21:43
sortiz ZoffixWin, yes, if the class 'trust' you.
ZoffixWin Ahhh 21:44
Thanks, all.
21:44 RabidGravy left 21:47 kerframil joined 21:48 chrisdotcode left 21:49 Technaton left, sunnavy left, chrisdotcode joined, sunnavy joined 21:50 telex left, telex joined 21:54 nadim left, nadim joined 21:56 mkz_ joined 21:57 Khisanth left 22:03 dvinciguerra__ joined 22:05 dvinciguerra_ left 22:09 _z left, nienacko__ joined 22:10 Khisanth joined 22:11 kid51 joined 22:24 _z joined 22:25 spintronic_ joined 22:26 Guest19532 is now known as parisba_ 22:31 Khisanth left 22:34 skids joined 22:38 spintronic_ left 22:43 _ramix_ joined 22:44 Khisanth joined 22:45 romrador is now known as rodarmor
_ramix_ Hi. I need to know if the threads that can create IO :: Socket :: Async in a react can be killed from the process table after closing the connection. Is supported IPC in Perl 6? 22:48
thanks!
ZoffixWin _ramix_, you call done to exit the react block. That should probably do the trick. 22:51
22:51 cpage_ left
ZoffixWin Hm. In my code here, I see I call .close on the socket to end it: github.com/zoffixznet/perl6-IRC-Cl...t.pm6#L122 22:52
22:53 spintronic_ joined, vendethiel left 22:55 spintronic_ left
_ramix_ the react is a infinite loop. If I put a exit, the program finish. My intention is to implement a simple web server. Close the connection is not enough to kill the thread. 22:58
23:00 grondilu joined
skids m: react { sleep 1; done }; say "here" 23:00
camelia rakudo-moar c8ec5a: OUTPUT«here␤»
23:00 nadim left
_ramix_ ok, I will try... 23:00
grondilu I vaguely remember someone having written a neat way to test the type of the elements of an Array. I wanted to do *.all ~~ Type but that does not work.
m: my @a = rand xx 3; say @a.all ~~ Real; 23:01
camelia rakudo-moar c8ec5a: OUTPUT«True␤»
grondilu jeez I thought that would fail
m:subset Vector of Array where *.all ~~ Real; say [1, 4] ~~ Vector; 23:02
m: subset Vector of Array where *.all ~~ Real; say [1, 4] ~~ Vector;
camelia rakudo-moar c8ec5a: OUTPUT«False␤»
b2gills you can't do *.all ~~ Type because ~~ can't be in a WhateverCode closure
{.all ~~ Type} should work
grondilu ok 23:03
m: subset Vector of Array where {.all ~~ Real}; say [1, 4] ~~ Vector; # just checking
camelia rakudo-moar c8ec5a: OUTPUT«True␤»
ZoffixWin Check it out. Possible the first ever Tweet by a Perl 6 script: twitter.com/zoffix/status/717487486281388032
b2gills Now all we need is an irc bot that also does twittery things 23:04
23:04 arcetera left, lizmat joined
ZoffixWin Like what? 23:05
We do have a Perl 6 irc bot that almost works :)
grondilu now say I want to make a module which exports such Vector subset. Can this module be named "Vector" as well?
23:07 leont joined
ZoffixWin 114 lines of code among 6 files for that tweet. And I had to do OAuth 1.0 signature stuff on my own. Not bad at all. 23:07
grondilu m: module A { subset A of Int is export where * %% 5&7 }; import A; say 5 ~~ A;
camelia rakudo-moar c8ec5a: OUTPUT«5===SORRY!5=== Error while compiling /tmp/kC_K3tK3zO␤Cannot import symbol A from A, because it already exists in this lexical scope␤at /tmp/kC_K3tK3zO:1␤------> 3Int is export where * %% 5&7 }; import A7⏏5; say 5 ~~ A;␤»
23:07 arc__ joined, arc__ is now known as arcetera
grondilu that's slightly annoying 23:08
23:08 arcetera left, arcetera joined
ZoffixWin Well, it kinda haveta work like that :) 23:08
m: class Foo {}; my $x = Foo; say $x ~~ Foo;
camelia rakudo-moar c8ec5a: OUTPUT«True␤»
23:09 _ramix_ left
b2gills m: module A { subset A of Int is export where * %% 5&7 }; say 5 ~~ A::A; 23:12
camelia rakudo-moar c8ec5a: OUTPUT«True␤»
ZoffixWin :o
23:17 cpage_ joined 23:22 MilkmanDan joined
japhb MadcapJake: From a *long* time ago, but: broadwell.org/perl/index.html#interpreters (ANS-style Forth in Perl 5) 23:22
23:24 mohae joined 23:28 wamba left
ZoffixWin m: sub foo returns 2 {}; say foo 23:35
camelia rakudo-moar c8ec5a: OUTPUT«5===SORRY!5=== Error while compiling /tmp/wRi3QPRhYo␤Malformed trait␤at /tmp/wRi3QPRhYo:1␤------> 3sub foo returns7⏏5 2 {}; say foo␤»
ZoffixWin What was the trick to return something concrete with a trait, rather than the sub body? I thought I saw something.
ilmari m: sub foo (-->3) {}; say foo 23:37
camelia rakudo-moar c8ec5a: OUTPUT«3␤»
ZoffixWin Thanks. 23:38
23:41 cpage_ left