Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-04-05

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:00 dha FWIW, it appears, on my system to find said secondary p6doc under /install/share/perl6/site/resources/
00:01 BenGoldberg Funny.
00:01 BenGoldberg Does it cache the found location somewhere?
00:01 Herby__ Is there any sort of Learning Perl 6 book in the works?
00:01 Herby__ or is the Perl6Intro website still the best resource for newbies
00:03 ZoffixWin m: say time
00:03 camelia rakudo-moar 0e95cd: OUTPUT«1459814626␤»
00:03 ZoffixWin m: say time()
00:03 camelia rakudo-moar 0e95cd: OUTPUT«5===SORRY!5=== Error while compiling /tmp/NQnkkYQ4V1␤Undeclared routine:␤    time used at line 1␤␤»
00:03 ZoffixWin Wat?
00:04 dha I have heard rumors that books... may be in the initial stages of being sort of worked on. :-)
00:04 dha BenGoldberg - doesn't look like it.
00:06 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 #perl6
00:06 dha I'm a little unclear on what the "criteria" are.
00:07 Xliff \o #perl6
00:07 Herby__ o/
00:07 ZoffixWin [o]
00:08 Xliff -[o]?
00:08 Xliff ZoffixWin, that's a new one. ;)
00:08 ZoffixWin :D
00:11 sortiz dha, the files in site/bin are the standard CURI wrappers, the basic "criteria" are :$auth and :$ver
00:12 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. :-)
00:13 sortiz CURI = CompuUnit::Repository::Installable. Part of perl6 repositories magic.
00:13 Xliff Weird. X-Ming was blocking WinCompose.
00:16 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 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 chrisdotcode joined #perl6
00:16 dha The question is, where would one put it so that it would reliably exist in an installation?
00:18 sortiz You can't, these wrappers are template based and created at install time.
00:19 dha i. e. in https://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 dha Ok, but the fix needs to go into the program the wrapper calls, not the wrapper itself.
00:20 sortiz Yep, the file you need to patch is the one in perl6/doc/bin
00:20 dha so, could it be put in https://github.com/perl6/doc/blob/master/bin/p6doc and then when people install it, it would work?
00:21 sortiz Yes.
00:21 dha Aha. Ok. I guess I'll do a pull request at some point.
00:22 yqt joined #perl6
00:23 tardisx joined #perl6
00:25 perlawhirl joined #perl6
00:26 TreyHarris joined #perl6
00:26 johndau joined #perl6
00:35 frobisher joined #perl6
00:38 colomon joined #perl6
00:40 dha Ok, pull request submitted. Hopefully it will be somehow useful.
00:53 Xliff ACK!
00:53 Xliff 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 #perl6
01:05 lucs Looking at some roast tests:  EVAL q{ goto SKIP5; };
01:05 lucs Is that how 'goto' is meant to be used?
01:06 colomon joined #perl6
01:09 lucs Oh, searching in the IRC backlogs, it appears that labeled goto is not yet implemented.
01:10 lucs Tough luck for me.
01:10 Xliff OK. Assuming I have the following C construct: struct A { B (*next)(Struct A *a) }
01:10 Xliff How would I handle that in NativeCall?
01:12 Xliff This doesn't work: class A is repr<CStruct> { has Pointer $!next; method next { my &func = nativecast(:(Pointer[A] --> B), $!next); ... } }
01:16 sortiz Xliff, Try: class A is repr<Struct> { has Pointer $!next; method next { my &func = nativecast(:(A --> B), $!next); func(self); }  ... }
01:17 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␤␤»
01:17 lucs Really?
01:19 sortiz Xliff, In NC all CStruct are passed by reference, when used in a signature, you don't need 'Pointer[Foo]', only 'Foo'.
01:20 cdg joined #perl6
01:21 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 Xliff Thanks. I will putter on.
01:21 ugexe tbh a CUR implementation should declare its doc store itself. alternatively a CUR for docs
01:21 vendethiel joined #perl6
01:23 ugexe uninstall should be able to remove those afterall
01:48 Actualeyes joined #perl6
02:03 perlawhirl joined #perl6
02:11 vendethiel joined #perl6
02:24 Ben_Goldberg joined #perl6
02:39 noganex_ joined #perl6
02:55 Xliff Well, my test code worked, but I am still getting this from the actual implementation.
02:55 Xliff Cannot locate symbol '' in native library ''
02:55 Xliff When trying to execute a nativecast() function pointer returned from a C shared lib.
02:55 Xliff I don't get it.
02:58 Actualeyes joined #perl6
03:05 ugexe because guess_library_name() in NativeCall.pm is a mess is my guess
03:14 Ben_Goldberg joined #perl6
03:18 geekosaur joined #perl6
03:21 molaf joined #perl6
03:29 perlawhirl joined #perl6
03:33 Xliff I wonder if I can actually use the mangled name in this instance instead of using nativecast on an unknown pointer.
03:33 Xliff 0040b8c0 T _ZN23XQillaXQCImplementation21create_empty_sequenceEP20XQC_Implementation_sPP14XQC_Sequence_s
03:33 * Xliff searches.
03:34 pecastro joined #perl6
03:41 Xliff sub create_empty_sequence(XQC_Implementation_s, XQC_Sequence_s)
03:41 Xliff is native('xqilla')
03:41 Xliff is symbol('_ZN23XQillaXQCImplementation21create_empty_sequenceEP20XQC_Implementation_sPP14XQC_Sequence_s')
03:41 Xliff returns uint32
03:41 Xliff { * };
03:41 Xliff Worked.... I think.
03:41 * Xliff now has something else to try.
03:44 Xliff The only problem here is how volatile that symbol name is.
03:51 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.
03:52 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.
04:02 vendethiel joined #perl6
04:23 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 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 joined #perl6
04:27 Xliff gfldex, these are pointers to functions, not stable functions. That's why I am having to deal with the mangled names.
04:27 Xliff Trying to use nativecast() on the returned function pointers gives me this error: Cannot locate symbol '' in native library ''
04:28 Xliff Although I have had success with a simplistic example which does the same thing.
04:28 Xliff The issue here is that this is a C-lib that wraps CPP classes.
04:35 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 Xliff (There are -way- more classes)
04:41 Cabanossi joined #perl6
04:43 vendethiel joined #perl6
04:44 cyberviking joined #perl6
04:50 Xliff *sigh*
04:50 Xliff Rethinking entire idea, now. :/
04:55 ZoffixWin_ joined #perl6
05:19 labster joined #perl6
05:26 znpy joined #perl6
05:30 CIAvash joined #perl6
05:35 nadim joined #perl6
05:45 domidumont joined #perl6
05:50 domidumont joined #perl6
05:54 wamba joined #perl6
06:08 domidumont joined #perl6
06:11 nadim joined #perl6
06:12 abraxxa joined #perl6
06:18 darutoko joined #perl6
06:30 tardisx joined #perl6
06:32 nakiro joined #perl6
06:34 firstdayonthejob joined #perl6
06:43 vendethiel joined #perl6
06:47 fireartist joined #perl6
06:48 nadim joined #perl6
06:55 djbkd joined #perl6
06:57 cdg joined #perl6
07:00 tardisx joined #perl6
07:07 jvcakg joined #perl6
07:08 znpy joined #perl6
07:09 jvcakg ot: is there a mailing list for this channel?
07:10 moritz jvcakg: there are several Perl 6 related mailing lists
07:10 moritz jvcakg: see http://perl6.org/community/
07:10 jvcakg moritz: thanks
07:11 moritz jvcakg: pro tip: don't start discussions on perl6-language :-)
07:11 jvcakg =]
07:11 jvcakg bbl
07:13 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)?  http://i.imgur.com/wyRpPJp.png
07:14 teatime (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:15 moritz teatime: well, for backgrounds I prefer the lighter colors, so the left palette; otherwise I prefer the right-hand side
07:16 teatime I tried to ask ##design, and ended up in an argument w/ one guy who insisted 0 - 255  ≠  0x00 - 0xFF
07:17 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 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}³
07:18 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 #perl6
07:19 teatime so the default/left set is spaced by {5F, 28, …, 28} and the right set is spaced evenly by 33
07:19 teatime (all number in hex)
07:19 teatime 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.
07:19 nine teatime: colors and brightness work non-linear. 0x66 is not twice as bright as 0x33
07:19 teatime nine: right.
07:20 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.
07:21 teatime 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
07:21 teatime (I should have compared them side-by-side long ago)
07:23 ufobat morning perl6
07:23 ufobat could anyone maybe give me a hind what i did wrong, https://travis-ci.org/tadzik/Bailador/jobs/120827667#L1146
07:23 ufobat but i have got Digest in https://github.com/ufobat/Bailador/blob/master/META.info#L5
07:25 moritz ufobat: 64.77s$ panda install URI Template::Mojo HTTP::Easy Template::Mustache
07:25 moritz ufobat: that's probably an old travis recipe
07:25 moritz ufobat: if you use instead  panda installdeps .
07:26 ufobat ah fuck!
07:26 moritz (in the travis.yml) you don't have to update it whnever dependencies change
07:26 ufobat thanks a lot
07:26 moritz you're welcome
07:26 moritz when we started to use travis, https://docs.travis-ci.com/user/languages/perl6 didn't contain the installdeps command
07:27 ufobat to be honest, i never looked at the travis.yml file :-( i just assumed it's correct
07:30 moritz it used to be :-)
07:35 ufobat yeah! but the benefit of it, i learned how to sqash in git :D
07:38 moritz \o/ learn something new every day
07:39 ufobat exactly! :D
07:39 ufobat and we're green! :D yay
07:40 Guest16914 left #perl6
07:42 sjoshi joined #perl6
07:44 moritz ufobat: green computing FTW!
07:47 RabidGravy joined #perl6
07:51 dakkar joined #perl6
07:51 domidumont joined #perl6
08:13 RabidGravy Harr!
08:13 psch \o
08:21 teatime heh, I made a "better" comparison image; it's much harder to see any difference between them now.
08:21 teatime http://i.imgur.com/WOaOMOr.png
08:21 teatime which, just means I can happily stop concerning myself with it
08:29 vytas joined #perl6
08:38 Woodi hmm, github is not loading... someone put panama papers there or what ? :)
08:40 RabidGravy it's all unicorns here
08:41 RabidGravy "We are experiencing connectivity issues and are currently investigating."
08:42 telex joined #perl6
08:49 xinming joined #perl6
08:50 leont joined #perl6
09:05 psch hrm, for some reason D5min is a special chord
09:05 psch 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 #perl6
09:08 teatime interesting.  heh, psch, it took me quite a few moments to figure out the correct context for that (music theory) :)
09:08 teatime at first I thought perhaps it was emacs.
09:10 psch oh
09:10 psch yeah, i suppose chord probably goes more towards emacs here, although i don't know what D5min would mean for emacs :)
09:11 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 #perl6
09:14 Khisanth joined #perl6
09:15 psch well, my notation is not quite standard there.  the number is the octave, which usually isn't mentioned iirc
09:15 psch but hey, at least it's not overspecific and only fails for D5min, it's apparently every Dmin in any inversion... /o\
09:16 psch but of course only in the mainline, and not an isolated test case
09:17 RabidGravy oh I see
09:40 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:49 psch ah, found it.  apparently i didn't generate enough chords
09:50 psch 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 psch that is, F, F# or A
09:50 psch but i only generated chords spanning exactly one octave...
09:50 jast teatime: depends. do you need to run the whole absolute colour space gauntlet in your use case?
09:51 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.)
09:51 jast okay
09:51 teatime jast: but I do want the most accurate (visually) results, w/ no consideration toward performance.
09:52 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?
09:53 jast depends on where your values are coming from
09:53 teatime I don't think I can make any assumptions about that.
09:53 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
09:54 jast and in that case you could simply convert to another device-dependent colour space like YUV/YCrCb for easier perceptual comparisons
09:55 jast sorry, that's YCbCr. I never remember the acronyms. :}
09:55 g4 joined #perl6
09:58 jast YUV or something comparable is used by most video and image codecs these days
09:59 teatime so that would be your recommendation?
09:59 teatime over CIELab?
10:00 espadrine_ joined #perl6
10:00 jast with no knowledge of the source it seems more sensible
10:01 teatime thanks
10:05 espadrine joined #perl6
10:15 pecastro joined #perl6
10:37 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:38 hahainternet 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
10:38 arnsholt Consider for example a function that returns a random number each time
10:38 timotimo anything that has state, really
10:38 hahainternet arnsholt: indeed, hence why it'd have to be an introspectable subset of perl
10:38 arnsholt Basically, yeah
10:38 hahainternet you'd have to be able to know for sure it was going to repeat again, rather than having state or randomness
10:39 arnsholt In this context, introspectable subset would have to be "not Turing complete"
10:39 hahainternet indeed
10:39 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 #perl6
10:39 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:40 hahainternet anyway i'm just blindly speculating, no real purpose :)
10:41 timotimo k
10:42 nine -win 41
10:47 xinming top
10:54 moritz bottom
10:55 jnthn charm
10:57 nine strange
10:58 dvinciguerra_ joined #perl6
11:00 timotimo interesting
11:01 xinming I'm in a wrong window... :-)
11:01 xinming wish to see the top output. :-)
11:03 cpage_ joined #perl6
11:12 arc__ joined #perl6
11:12 arcetera joined #perl6
11:27 mr-foobar joined #perl6
11:29 perlawhirl joined #perl6
11:29 pmurias joined #perl6
11:29 mr-foobar joined #perl6
11:31 kaare_ joined #perl6
11:36 kid51 joined #perl6
11:44 dalek doc: f80ef79 | (Steve Mynott)++ | bin/p6doc:
11:44 dalek doc: don't list directories as pod just files as reported by dha++
11:44 dalek doc: review: https://github.com/perl6/doc/commit/f80ef79c4b
11:48 dalek doc: 15613f4 | (Steve Mynott)++ | bin/p6doc:
11:48 dalek doc: remove  dha++
11:48 dalek doc: review: https://github.com/perl6/doc/commit/15613f4761
11:54 dalek doc: 2ecffb7 | (Steve Mynott)++ | bin/p6doc:
11:54 dalek doc: comment broken code
11:54 dalek doc: review: https://github.com/perl6/doc/commit/2ecffb77f4
11:54 dalek doc: ad3906b | (Steve Mynott)++ | META.info:
11:54 dalek doc: add Shell::Command to deps to make zef happier #442
11:54 dalek doc: review: https://github.com/perl6/doc/commit/ad3906b3bc
12:09 eugen joined #perl6
12:16 eugen joined #perl6
12:17 pmurias joined #perl6
12:22 kentnl joined #perl6
12:22 kentnl joined #perl6
12:47 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:48 jnthn They surely won't be helping
12:49 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:50 jnthn Tab separated, I'm guessing?
12:50 jnthn ooh, how much faster is $line.split("\t") if that also works?
12:51 Ulti http://mattoates.co.uk/files/perl6/readsplit_profile.html
12:51 Ulti jnthn: one sec will try
12:51 Ulti jnthn: a LOT faster
12:51 thtgs joined #perl6
12:51 Ulti down to 16x slower
12:52 cdg joined #perl6
12:52 Ulti 0.353 seconds vs 1.81 for that regex to char split change
12:54 Ulti that actually impresses me a lot given where rakudo was only a couple of years ago
12:55 Ulti or even months ago
12:56 jnthn Yeah, but we should do better still ;)
12:56 jnthn Is the file just "abc\tdef\tghi\jkl" or so?
12:56 timotimo can has the file? :)
12:56 timotimo yeah
12:56 jnthn With lines like that?
12:56 perlawhirl is there a something eqv to p5's quotemeta function?
12:57 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
12:57 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
12:58 jnthn Man we've some room for improvement, looking at that profile :)
12:59 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 Ulti jnthn thats good news :D
13:02 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⏏…»
13:02 perlawhirl timmotimo^^
13:03 psch m: rx/'this \s+ kinda⏏-string'/
13:03 camelia rakudo-moar 0e95cd: ( no output )
13:03 perlawhirl the string will come from a external file, i want to convert it to a regex to match agains
13:03 perlawhirl so it may nt be a '-', but some other metacharacter
13:04 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
13:04 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
13:04 jnthn MadcapJake: AT-KEY (and EXISTS-KEY and DELETE-KEY)
13:04 moritz MadcapJake: it's documented somewhere in perl6/doc
13:04 moritz MadcapJake: something with subscripts I believe
13:05 moritz MadcapJake: http://doc.perl6.org/language/subscripts#Custom_types
13:06 xinming_ joined #perl6
13:06 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」␤»
13:06 psch perlawhirl: no quotemeta
13:06 MadcapJake wow, somehow have managed never to read this language pod :P didn't realize "subscripts" was what this kind of thing was called
13:07 sortiz \o #perl6
13:07 psch perlawhirl: given $x = "foo", /$x/ is the same as /'foo'/ and /<$x>/ is the same as /foo/
13:08 psch perlawhirl: to me this reads more like you might get Regexen from the outside that aren't valid
13:08 psch well, that's the one concern i actually see there
13:09 timotimo jnthn: i measure 9% time spent in utf8_decodestream for ulti's benchmark
13:09 cpage_ joined #perl6
13:10 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
13:10 psch https://github.com/peschwa/p6-Music-Helpers/commits/master
13:10 psch well vOv
13:11 psch 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 #perl6
13:12 Xliff_ joined #perl6
13:13 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 :)
13:13 thtgs Ulti agreed but I'm mostly interested in IO and array performance
13:13 ocbtec joined #perl6
13:13 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
13:13 jnthn timotimo: With the buffers
13:13 jnthn (for decoding)
13:14 jnthn But I also noticed we're running up some code dupe in the decode_stream impls that's starting to bother me.
13:14 jnthn I don't like premature abstraction, but I'd like to clean up the dupe across those things at some point :)
13:15 jnthn 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 #perl6
13:16 psch hm, something went weird during setting up the repo... :l
13:16 psch ooh, no
13:16 psch i just had two instances of clock.pl6 running
13:17 krunen_ joined #perl6
13:17 kst` joined #perl6
13:17 BuildTheRobots_ joined #perl6
13:19 jnthn timotimo: maybe, or pulling some checks out into run_decode inside of decodestream.c
13:19 jnthn I dunno. Abstractions are hard. :)
13:19 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:20 lnr joined #perl6
13:24 romrador joined #perl6
13:24 boegel|quassel joined #perl6
13:24 pmurias joined #perl6
13:24 Begi joined #perl6
13:24 dakkar joined #perl6
13:24 zakharyas joined #perl6
13:24 polyfloyd joined #perl6
13:24 [Tux] joined #perl6
13:24 perigrin joined #perl6
13:24 mindos joined #perl6
13:24 mithaldu_ joined #perl6
13:24 simcop2387 joined #perl6
13:24 JimmyZ joined #perl6
13:24 integral joined #perl6
13:24 ilmari joined #perl6
13:24 notbenh joined #perl6
13:24 timotimo only 1.5s out of 6s are spent printing the output
13:24 timotimo (might also partially be that output in general makes things slower
13:24 timotimo but let me time cat to see)
13:25 timotimo OK, cut -f 1 only takes 0.2s
13:26 sufrostico joined #perl6
13:27 |Tux| joined #perl6
13:28 vytas joined #perl6
13:28 skids joined #perl6
13:28 rindolf joined #perl6
13:32 parisba joined #perl6
13:38 * hoelzro .oO( time cat? http://d.gr-assets.com/books/1348818430l/822630.jpg )
13:39 timotimo huh?
13:39 timotimo what is that? :D
13:40 [Coke] ovid on Perl6 "But we're not gonna rush it."
13:40 ab6tract joined #perl6
13:40 ab6tract o/ #perl6
13:41 ab6tract 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?
13:41 perlpilot "multi line brackets"?
13:41 hoelzro timotimo: a book my sister had =)
13:42 jnthn .oO( http://www.kittenswhiskers.com/wp-content/uploads/sites/48/2014/11/cat-with-clock-640x426.jpg )
13:43 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.
13:43 perlpilot (FYI)
13:43 psch m: use Test; say Test::EXPORT::DEFAULT::.keys # MadcapJake
13:43 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…»
13:43 ab6tract m: my $a = 'aaa'; my $b = 'bbb'; use MONKEY-SEE-NO-EVAL; say (EVAL "/ $a \\n\ $b /")
13:43 camelia rakudo-moar 600eb5: OUTPUT«/ aaa \n bbb /␤»
13:44 ab6tract hrmm
13:44 MadcapJake psch: thanks!
13:44 ggherdov joined #perl6
13:44 ab6tract nevermind, the bastard was trolling
13:44 jnthn hah
13:45 jnthn Was gonna say, do you simply mean that strings and regexes can be laid out of multiple lines? :)
13:45 jnthn *over
13:45 dalek perl6-most-wanted: 8d79a28 | (Zoffix Znet)++ | most-wanted/modules.md:
13:45 dalek perl6-most-wanted: Remove IRC::Client WIP: Already in Ecosystem
13:45 dalek perl6-most-wanted: review: https://github.com/perl6/perl6-most-wanted/commit/8d79a281a4
13:46 dalek perl6-most-wanted: 3a1e155 | (Zoffix Znet)++ | most-wanted/modules.md:
13:46 dalek perl6-most-wanted: List Twitter API WIP
13:46 dalek perl6-most-wanted: review: https://github.com/perl6/perl6-most-wanted/commit/3a1e155549
13:47 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 jnthn .u rainbow
13:47 yoleaux U+1F308 RAINBOW [So] (🌈)
13:47 jnthn .u unicorn
13:47 yoleaux No characters found
13:47 perlpilot so close :)
13:47 jnthn Bah, get on it, Unicode consortium!
13:48 psch .u knight
13:48 yoleaux U+2658 WHITE CHESS KNIGHT [So] (♘)
13:48 yoleaux U+265E BLACK CHESS KNIGHT [So] (♞)
13:48 yoleaux U+1F0AC PLAYING CARD KNIGHT OF SPADES [So] (🂬)
13:48 ab6tract perlpilot: that's exactly how it went :)
13:48 psch .u combining acute
13:48 yoleaux U+0301 COMBINING ACUTE ACCENT [Mn] (◌́)
13:48 Technaton joined #perl6
13:48 yoleaux U+030B COMBINING DOUBLE ACUTE ACCENT [Mn] (◌̋)
13:48 yoleaux U+0317 COMBINING ACUTE ACCENT BELOW [Mn] (◌̗)
13:48 ab6tract then that is used as further evidence that perl is a bad language (even the experts don't know what's in it!)
13:48 psch .u grave
13:48 yoleaux U+0060 GRAVE ACCENT [Sk] (`)
13:48 yoleaux U+00C0 LATIN CAPITAL LETTER A WITH GRAVE [Lu] (À)
13:48 yoleaux U+00C8 LATIN CAPITAL LETTER E WITH GRAVE [Lu] (È)
13:48 psch .u combining grave
13:48 yoleaux U+0300 COMBINING GRAVE ACCENT [Mn] (◌̀)
13:48 yoleaux U+030F COMBINING DOUBLE GRAVE ACCENT [Mn] (◌̏)
13:48 yoleaux U+0316 COMBINING GRAVE ACCENT BELOW [Mn] (◌̖)
13:48 psch there, sorry for the brief spam :S
13:49 jnthn ab6tract: I'm more surprised when a language *doesn't* support that, tbh.
13:49 jnthn Or have a way to.
13:49 perlpilot ab6tract: that doesn't make it "bad" just bigger than you can wrap your mind around.  :)
13:49 MadcapJake psch: what about when you're module name isn't known?
13:49 jnthn ES just added one. C# has had one forever.
13:49 psch m: say "\c[WHITE CHESS KNIGHT]\c[COMBINING GRAVE ACCENT]" # unicorn-ish
13:49 camelia rakudo-moar 600eb5: OUTPUT«♘̀␤»
13:50 jnthn It's the languages where I try to have multi-line literals and can't that annoy me :P
13:50 jnthn *try to use
13:51 BuildTheRobots joined #perl6
13:51 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
13:51 * perlpilot looks at PHP and Python
13:52 brrt joined #perl6
13:52 brrt joined #perl6
13:52 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:53 MadcapJake s/package/module/ :P
13:53 perlpilot MadcapJake: read the source ;)
13:54 psch hm, i don't really know about require or runtime module loading in general
13:55 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 perlpilot er, P6's
13:56 b2gills m: say term:<time>()
13:56 camelia rakudo-moar 600eb5: OUTPUT«1459864598␤»
13:56 psch m: my \Test := EVAL 'require Test'; say Test::.keys
13:56 camelia rakudo-moar 600eb5: OUTPUT«(&todo_output EXPORT &failure_output &output)␤»
13:56 psch but reaching the EXPORT there seems weird..
13:56 psch m: my \Test := EVAL 'require Test'; say Test::EXPORT::.keys
13:56 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␤␤»
13:57 psch m: my \Test := EVAL 'require Test'; say Test::<EXPORT>
13:57 camelia rakudo-moar 600eb5: OUTPUT«(EXPORT)␤»
13:57 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
13:58 MadcapJake my \Test := EVAL 'require Test'; say Test::<EXPORT>::.keys
13:58 MadcapJake m: my \Test := EVAL 'require Test'; say Test::<EXPORT>::.keys
13:58 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:59 sufrostico joined #perl6
13:59 yqt joined #perl6
13:59 MadcapJake my $mod = 'Test'; require ::($mod); say ::($mod)::.keys;
13:59 MadcapJake m: my $mod = 'Test'; require ::($mod); say ::($mod)::.keys;
13:59 camelia rakudo-moar 600eb5: OUTPUT«()␤»
13:59 MadcapJake m: my $mod = 'Test'; require ::($mod); say ::($mod)::.keys.say;
13:59 camelia rakudo-moar 600eb5: OUTPUT«()␤True␤»
14:00 skids m: "Your unicorn consolation prize is { <兕 🦏 犀>.pick }".say
14:00 camelia rakudo-moar 600eb5: OUTPUT«Your unicorn consolation prize is 兕␤»
14:01 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␤␤»
14:02 sortiz m: my \mod = (require ::('Test')); say mod::.keys
14:02 camelia rakudo-moar 600eb5: OUTPUT«(&todo_output EXPORT &failure_output &output)␤»
14:09 sufrostico joined #perl6
14:12 ilmari joined #perl6
14:20 ugexe MadcapJake: have you looked at CompUnit::Util?
14:21 sufrostico joined #perl6
14:31 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 :(
14:35 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:36 jnthn get-unit, then lookup EXPORT, at a guess
14:36 jnthn That's how the import logic inside the compiler does it
14:41 buharin joined #perl6
14:46 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␤␤»
14:47 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 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 #perl6
14:49 MadcapJake is there anyway to do that at runtime?
14:50 MadcapJake I think the problem is that ::('SOMESTRING') creates an anonymous module
14:51 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
14:51 sortiz m: my \mod = (require ::('Test')); my \exps = ::mod::('EXPORT::DEFAULT'); say exps::.keys
14:51 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:52 MadcapJake oh hmm is it because it's sigilless?
14:52 jnthn Well, you have to require Test so the symbol even exists
14:52 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
14:52 jnthn But then you have to force a late-bound lookup also, yes
14:55 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 pmurias * one
14:57 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)␤»
14:57 spintronic m: 1+1
14:57 camelia rakudo-moar 600eb5: OUTPUT«WARNINGS for /tmp/3Tqs9IHwZS:␤Useless use of "+" in expression "1+1" in sink context (line 1)␤»
14:57 spintronic m: print(1+1);
14:57 camelia rakudo-moar 600eb5: OUTPUT«2»
14:58 jnthn pmurias: Both
14:59 jnthn pmurias: A number of really simple "regexes" don't really need the prelude/postlude etc. we have today.
15:00 cognominal joined #perl6
15:01 TreyHarris joined #perl6
15:02 pmurias jnthn: seems like something I should steal for nqp-js
15:02 xinming joined #perl6
15:02 sufrostico joined #perl6
15:03 jnthn pmurias: Well, those pieces I'll try and do in a way that all backends get them "for free"
15:05 masak today's autopun: http://bash.org/?3936
15:08 moritz masak: that's *quite* old :-)
15:08 moritz nevertheless classy
15:08 perlpilot That's like IRC every day.
15:13 avenj joined #perl6
15:16 tinita joined #perl6
15:17 dalek doc: 4498d72 | (Steve Mynott)++ | bin/p6doc:
15:17 dalek doc: remove awful -IFakeDir workaround for precomp issue now fixed
15:17 dalek doc: review: https://github.com/perl6/doc/commit/4498d728fd
15:17 * masak .oO( several years ago's autopun )
15:20 ufobat what does |$/.list mean?
15:20 ufobat i am just talking about that |
15:21 perlawhirl i think it flattens
15:21 masak ufobat: "turn the list into its elements" (flattening)
15:21 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?
15:21 masak perlpilot: good question.
15:21 perlawhirl http://docs.perl6.org/language/operators#prefix_|
15:21 jnthn If making an autopun were to disqualify it as an autopun, then there'd be no autopuns... :)
15:22 masak perlpilot: I don't think the autopun discovery process factors in irony or self-awareness
15:22 masak perlpilot: what jnthn said :)
15:22 masak perlpilot: the important aspect is that the brain goes "oh, so the thing you do is the thing you... ah!"
15:23 perlpilot Then why aren't you making up autopuns all the time?  ;-)
15:23 masak we aren't? :P
15:23 ufobat so both expressions are equal $/.list.flat   |$/.list
15:23 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
15:24 perlpilot so, wild autopuns are more precious than artificial ones?
15:24 Hotkeys Such is life
15:24 jnthn ufobat: No, | means "slip this into the surrounding context"
15:24 jnthn 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
15:25 ufobat it is a argument for a method
15:25 jnthn OK, so that's what it's doing
15:25 jnthn m: sub foo($a, $b) { say $a + $b }; my @a = 3, 5; foo(|@a)
15:25 camelia rakudo-moar 600eb5: OUTPUT«8␤»
15:26 * perlpilot waits for the contrast against .flat ...
15:26 perlpilot ;)
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.'
15:27 perlawhirl 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?
15:27 ufobat wait ill figure that out myself
15:27 ufobat the hint is enough
15:27 ufobat thinking of masaks pun ;)
15:29 vendethiel joined #perl6
15:31 SWH joined #perl6
15:31 masak perlpilot: yes, the wild ones are the good ones
15:41 ZoffixW joined #perl6
15:41 ZoffixW Weren't there a URL module for manipulating URLs? Not in the Ecosystem :/
15:42 ZoffixW Oh, there's URI
15:43 ZoffixW And that's the one I don't like :/
15:44 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:52 perlpilot ZoffixW++
15:53 perlpilot ZoffixW: I've actually talked about doing that at $work myself.   Still looking for the right opportunity though.
15:54 masak ok, camelia isn't enough to confirm this, so if I could ask someone to double-check my (now-golfed) bug:
15:54 masak 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)
15:55 masak but `use DBIish; use lib "lib"; DBIish.connect("Pg")` gives `===SORRY!=== Could not locate compile-time value for symbol DBError`
15:55 masak I have DBIish installed very normally, via panda
15:56 ZoffixW masak, yup: http://fpaste.scsys.co.uk/509608
15:56 masak ZoffixW++
15:56 * masak submits rakudobug
15:56 masak this also immediately suggests a temporary workaround: I just need to inline my module from lib/ :/
15:59 masak also, ZoffixW++ for using Perl 5 and Perl 6 and Inline::Perl5
15:59 ZoffixW :)
15:59 masak and yes, of course Inline::Perl5 counts.
15:59 masak in fact, it counts *more*, because it shows that you're a pragmatist
16:01 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 joined #perl6
16:02 jnthn masak: Does putting the "use lib" *first* help?
16:03 jnthn masak: Note you probably should anyway, 'cus putting "use lib" *after* modules have been loaded forces pre-comp to be disabled, iirc
16:05 masak jnthn: yes, putting `use lib` before `use DBIish` makes the bug go away
16:05 masak so that's the workaround if I don't like speed... :)
16:06 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 )
16:06 masak oh!
16:06 masak perhaps the bug is even related to precompilation being forced off?
16:06 jnthn masak: It's doing use lib *after* loading other things that is bad
16:06 jnthn Perhaps, dunno
16:06 dalek DBIish: 2de753f | (Salvador Ortiz)++ | lib/DBDish/Pg.pm6:
16:06 dalek DBIish: Pg: Don't try to quote-and-scape a missing param
16:06 dalek DBIish:
16:06 dalek DBIish: Fix "No such method 'trans' for invocant of type 'Any'"
16:06 dalek DBIish: review: https://github.com/perl6/DBIish/commit/2de753fc45
16:06 jnthn nine++ has been taking care of that area of things, I'm not really up on the latest :)
16:07 masak sortiz++ :)
16:08 ZoffixW sortiz++ that was fast :D
16:09 lizmat joined #perl6
16:09 wamba joined #perl6
16:10 abraxxa1 joined #perl6
16:13 teatime joined #perl6
16:13 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:14 ZoffixW Is there a way to coerce a value into a type?
16:14 ZoffixW m: subset T of Int where { $_ == any(1 | 2) ?? True !! $_ = 2 }; my T $x = 3; say $x
16:14 camelia rakudo-moar 600eb5: OUTPUT«Cannot assign to a readonly variable or a value␤  in block <unit> at /tmp/wKsgi0MSiN line 1␤␤»
16:17 ZoffixW I guess `where` is not where you should be doing it...
16:18 wtw joined #perl6
16:19 abraxxa joined #perl6
16:20 psch hm, COERCE was supposed to be a thing somewhen iirc
16:20 psch 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
16:20 camelia rakudo-moar 600eb5: OUTPUT«Cannot find method 'ModInt'␤  in block <unit> at /tmp/ElGpkBSewq line 1␤␤»
16:21 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␤␤»
16:21 lizmat m: say 42.Int # ZoffixW: coercing to type ?
16:21 camelia rakudo-moar 600eb5: OUTPUT«42␤»
16:21 lizmat m: say 42.WHAT # ZoffixW: coercing to type ?
16:21 camelia rakudo-moar 600eb5: OUTPUT«(Int)␤»
16:22 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:23 [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
16:23 camelia rakudo-moar 600eb5: OUTPUT«A.new(x => 5.0)␤»
16:23 lizmat create an .URI method on that object?
16:23 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");"
16:23 lucs Hullo?
16:23 [Coke] psch++
16:24 masak sortiz: oh!
16:24 sortiz That way the driver is loaded before the repo is changed and works well.
16:24 masak sortiz: well, first I'm going to try and put `use lib` first, as jnthn++ suggested
16:25 [Coke] lucs: yes?
16:26 lucs [Coke]: Um, the 'Hullo?' was for the lag (I hadn't noticed). The ':/' is for, no printf on $*ERR: ?
16:26 Khisanth joined #perl6
16:26 ZoffixW m:  $*ERR.put: sprintf "%.4f", pi  # :/
16:26 camelia rakudo-moar 600eb5: OUTPUT«3.1416␤»
16:27 lucs ZoffixW: Sure :(
16:28 sortiz masak, Yes, change lib first works. Is the dynaloader that broke if the REPO change in between, dunno why.
16:29 pmurias joined #perl6
16:29 ZoffixW lucs, seems Perl 6's printf doesn't take filehandles: https://github.com/rakudo/rakudo/blob/10378163b007267f80e488477d9b6bd305104880/src/core/Cool.pm#L365
16:30 ZoffixW the 5to6 docs likely needs to be updated
16:30 psch printf on IO::Handle doesn't seem particularly objectionable
16:30 psch m: put "foo"
16:30 camelia rakudo-moar 600eb5: OUTPUT«foo␤»
16:32 telex joined #perl6
16:32 adrusi joined #perl6
16:33 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"
16:33 camelia rakudo-moar 600eb5: OUTPUT«baz␤»
16:34 psch ZoffixW: no, that invocation looks for a method on the first arg
16:34 psch ZoffixW: hence the invocant marker :
16:34 psch +)
16:35 psch but i don't think the printf method would be much harder... :)
16:36 ZoffixW Yeah, I guess I was just thinking of the mention of filehandle for printf in 5to6
16:36 ZoffixW m: say is-prime 31337:
16:36 camelia rakudo-moar 600eb5: OUTPUT«True␤»
16:36 ZoffixW mother of god :o
16:37 ZoffixW hm
16:37 psch m: class A { method f { [1,2,3] } }; say pop f A: :
16:37 camelia rakudo-moar 600eb5: OUTPUT«3␤»
16:37 ZoffixW m: say Rat 31337:
16:37 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…»
16:37 * ZoffixW chucks this into "avoid using" mental bin
16:38 Guest59844 joined #perl6
16:39 psch RabidGravy: what'd you suggest for sending SysEx of arbitrary size via Audio::PortMIDI?  writing a patch? :)
16:40 kerframil joined #perl6
16:41 psch m: class A { method B { "meth b" } }; say B A:
16:41 camelia rakudo-moar 600eb5: OUTPUT«meth b␤»
16:41 psch m: class A { method B { "meth b" } }; class B { }; say B A:
16:41 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␤       …»
16:41 psch that is LTA
16:42 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␤»
16:42 ZoffixW I wish stuff like this worked.
16:42 ZoffixW It's possible in Perl 5 with modules.
16:43 jnthn m: my $x where Int|Rat = 4.4
16:43 camelia rakudo-moar 600eb5: ( no output )
16:43 [Coke] jnthn++
16:43 * jnthn will be doing Perl 6 / MoarVM stuff all day tomorrow o/
16:43 jnthn If I've energy I'll try and write up the bits I did last week this evening, also :)
16:43 jnthn dinner time now :) &
16:43 ZoffixW Damn. That's aweseome jnthn++
16:44 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␤␤»
16:44 lizmat ++jnthn
16:44 psch can't have junction-types /o\
16:44 lizmat psch: if you could, then allomorphs would have been much easier to implement  :-)
16:44 ZoffixW m: subset IntRat of Any where Int|Rat; my IntRat $x = 4.4
16:44 camelia rakudo-moar 600eb5: ( no output )
16:45 lizmat m: say <a>.WHAT
16:45 camelia rakudo-moar 600eb5: OUTPUT«(Str)␤»
16:45 lizmat m: say <a b>[0].WHAT
16:45 camelia rakudo-moar 600eb5: OUTPUT«(Str)␤»
16:45 [Coke] m: say <1.2>.WHAT
16:45 camelia rakudo-moar 600eb5: OUTPUT«(RatStr)␤»
16:45 lizmat m: say <42>.WHAT
16:45 camelia rakudo-moar 600eb5: OUTPUT«(IntStr)␤»
16:45 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...
16:48 * 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
16:48 camelia rakudo-moar 600eb5: OUTPUT«A.new(x => 4.0)␤»
16:48 ZoffixW This will do what I want. psch++
16:48 ZoffixW (where Int|Rat are Str|URI)
16:49 psch ZoffixW: your Str have a .URI method? :)
16:49 * psch is nitpicky :P
16:49 ZoffixW No, the $x.Rat would become $x ~~ URI ?? $x !! URI.new: $x;
16:49 psch ah
16:50 [Coke] I would probably just have two multis, one for each type, rather than junction the types.
16:50 ZoffixW Also a good idea.
16:50 [Coke] (or use a Role if all I cared about was a method or two that both had.)
16:53 ugexe stmuk: ah thanks! i was able to find out why, will fix shortly
17:07 domidumont joined #perl6
17:07 domidumont joined #perl6
17:12 gregf_ m: class Foo { submethod BUILD(*%args){ say "foo-bar"; } }; Foo.new
17:12 camelia rakudo-moar 600eb5: OUTPUT«foo-bar␤»
17:23 sufrostico joined #perl6
17:29 lizmat_ joined #perl6
17:31 _z joined #perl6
17:34 raiph joined #perl6
17:37 raiph joined #perl6
17:45 raiph joined #perl6
17:47 raiph joined #perl6
17:50 raiph joined #perl6
17:50 masak gregf_: even if you don't capture the named arguments explicitly with *%args, they still get captured implicitly in %_
17:51 masak 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 #perl6
17:59 masak m: say []; say {}
17:59 camelia rakudo-moar 600eb5: OUTPUT«[]␤␤»
18:00 masak right now, arrays .gist with their brackets (nice!), but hashes don't .gist with their curlies (aww!)
18:08 kurahaupo joined #perl6
18:16 lizmat masak: one could argue that the array.gist is wrong  :-)
18:17 sortiz m: say ().WHAT, ().gist; # And List.gist ? ;-)
18:17 camelia rakudo-moar 600eb5: OUTPUT«(List)()␤»
18:19 chrisdotcode joined #perl6
18:20 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
18:20 camelia rakudo-moar 600eb5: OUTPUT«[1 2 3]␤»
18:21 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␤»
18:21 lizmat m: my %a = a => 42, b => 666; say %a
18:21 camelia rakudo-moar 600eb5: OUTPUT«a => 42, b => 666␤»
18:21 sortiz lizmat, sorry, thinking  about Hash.
18:21 sortiz And wrote Array :-)
18:22 Actualeyes joined #perl6
18:22 * lizmat tries a patch
18:24 lizmat and spectests
18:25 Khisanth joined #perl6
18:26 sortiz m: say {}.perl , {}.gist
18:26 camelia rakudo-moar 600eb5: OUTPUT«{}␤»
18:27 * sortiz seem interchanged, though
18:29 lizmat $ 6 'my %a = a => 42, b => 666; say %a'
18:29 lizmat {a => 42, b => 666}
18:29 lizmat breaks a few spectests  :-(
18:30 sortiz :-(
18:32 lizmat well, basically the tests are testing on the gist of a data structure
18:32 lizmat like: is((produce(&foo, flat $hash, <a b c>)).gist, '(a => b => c => 42 b => c => 42 c => 42 42)'
18:38 FROGGS joined #perl6
18:39 vendethiel joined #perl6
18:39 xiaomiao joined #perl6
18:40 rindolf joined #perl6
18:49 Khisanth joined #perl6
18:49 molaf joined #perl6
18:49 xiaomiao joined #perl6
18:53 masak I for one would welcome our new curly-braces-on-gist-of-Hash overlords.
18:56 ZoffixW joined #perl6
18:57 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␤»
18:57 ZoffixW m: my Int:U $x; say $x
18:57 camelia rakudo-moar 600eb5: OUTPUT«Method 'shortname' not found for invocant of class 'Perl6::Metamodel::DefiniteHOW'␤  in block <unit> at /tmp/QkztpZprNy line 1␤␤»
18:57 * masak <3 Perl 6
18:57 ZoffixW Is that supposed to happen?
18:57 masak ZoffixW: no, doesn't look like something desirable
18:58 ZoffixW k, I'll rakudobug
18:59 masak ZoffixW++
19:00 ZoffixW Done: https://rt.perl.org/Ticket/Display.html?id=127841
19:02 ZoffixW 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:04 masak well done!
19:05 jnthn Yeah, DefiniteBug :)
19:06 jnthn hoelzro: https://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 jnthn hoelzro: Role parameterization with [...] is syntactic
19:06 jnthn hoelzro: As in, only SomeTypeName[...] will do SomeTypeName.^parameterize(...)
19:07 hoelzro jnthn: so .^parameterize is the only way to do what I want?
19:07 jnthn Correct
19:07 hoelzro ok
19:07 hoelzro want me to change the subject of the ticket to reflect the LTA error?
19:07 jnthn Yeah...well, is it LTA error or LTA stack trace with MOP bits in? :)
19:08 jnthn It blows up 'cus we try to pun the role to call .AT-POS on it, fwiw
19:13 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␤␤»
19:13 ZoffixW Rakudobug: https://rt.perl.org/Ticket/Display.html?id=127842
19:13 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 #perl6
19:13 huf there's no namespacing when you grep :)
19:14 masak then you can grep for '!themethod'
19:14 jnthn Right, 'cus it's on callee and caller ends :)
19:14 huf oh, built in prefix :) that solves it then :)
19:15 masak I think we all love private methods at this point
19:15 masak I for one didn't expect to use them as much as I do
19:15 masak too bad they don't multi, though ;)
19:15 moritz now if they could be mul... what masak said :-)
19:15 jnthn Yeah. Especially when I reach for them in ES6 and...oh... :)
19:15 jnthn Yeah, I want them to be multi-able
19:15 masak jnthn: in TypeScript, you can basically have your multis
19:16 masak ...kind of
19:16 jnthn I was talking about my privates, not my multis... :P
19:16 * masak .oO( eww! )
19:16 jnthn o.O
19:17 jnthn It sounded like a cute play on your comment until I read it :P
19:18 jnthn I guess I hit upon missing private methods in ES6 'cus I was refactoring from code not using the class syntax.
19:18 jnthn Which would fake up private in various ways :)
19:18 jnthn But yeah, I'm very glad of private methods in Perl 6 :)
19:18 nadim Good evening everyone. is there a way to get the size of an object, like Devel::Size in P5?
19:19 jnthn nadim: It's very early and rough and ready, but you can use heap snapshots :)
19:19 jnthn And https://github.com/jnthn/p6-app-moarvm-heapanalyzer/ to query them
19:20 jnthn 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
19:20 hoelzro jnthn: I figured; I tried to add AT-POS to the punning exceptions list, which resulted in LTA behavior =)
19:21 jnthn hoelzro: yeah ;)
19:21 nadim jnthn: I mean to add it as an option to Data::Dump::Tree
19:21 jnthn nadim: Ah, then no
19:21 nadim Id there a Devel size in th epipeline?
19:22 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
19:23 jnthn Though in working on heap snapshots we'll probably have done all the hard work to have such a feature :)
19:23 jnthn Since we're adding ways to query object's memory use as part of that
19:24 jnthn 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)
19:26 ZoffixW I guess a better question is how to get a list of types not listed on http://docs.perl6.org/type.html ? I don't see int32 nor UInt in the list.
19:27 masak ZoffixW: S09
19:27 ZoffixW masak++
19:27 jnthn In terms of what's implemented, it's u?int[8|16|32|64], num32, num64, and int/uint/num
19:28 ZoffixW Thanks
19:29 hankache joined #perl6
19:30 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?
19:30 hankache good evening #perl6
19:30 moritz m: say Int:U.WHAT
19:30 camelia rakudo-moar 600eb5: OUTPUT«Method 'shortname' not found for invocant of class 'Perl6::Metamodel::DefiniteHOW'␤  in block <unit> at /tmp/mWDRv2dA0o line 1␤␤»
19:31 sortiz ZoffixW, ups, good question, I dunno.
19:31 moritz m: say Int:U
19:31 camelia rakudo-moar 600eb5: OUTPUT«Method 'shortname' not found for invocant of class 'Perl6::Metamodel::DefiniteHOW'␤  in block <unit> at /tmp/u68WF60mQW line 1␤␤»
19:31 ZoffixW m: my UInt64 $x = 42
19:31 camelia rakudo-moar 600eb5: ( no output )
19:32 Juerd Oh, heh. I wonder if anyone will ever be confused between uint and Int:U :)
19:33 perlpilot Juerd: no.  no one will ever be confused.    ;)
19:34 sortiz moritz, about the error show, see the discussion in https://github.com/rakudo/rakudo/pull/701
19:35 moritz sortiz: oh, I just basically re-implemented your pull request :-)
19:35 moritz sortiz: maybe we should do both :-)
19:38 sortiz moritz, I did not pursue the original one because I think it is a better option the one annotated in the comment.
19:39 ZoffixW How many bits are int/uint/num?
19:39 moritz ZoffixW: platform dependent, afaict
19:40 ZoffixW Cool. Thanks.
19:40 moritz ZoffixW: but typically 64
19:41 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.
19:42 kaare_ Any progress?
19:43 Actualeyes joined #perl6
19:45 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:48 cdg joined #perl6
19:49 buharin joined #perl6
19:49 cdg joined #perl6
19:53 dalek ecosystem: 8d26bcb | Emeric54++ | META.list:
19:53 dalek ecosystem: Update META.list
19:53 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/8d26bcb288
19:53 dalek ecosystem: 52706b7 | moritz++ | META.list:
19:53 dalek ecosystem: Merge pull request #189 from Emeric54/patch-2
19:53 dalek ecosystem:
19:53 dalek ecosystem: Update META.list
19:53 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/52706b70f6
19:55 masak is there any way I can install an older version of a module with panda?
19:56 masak or, alternatively... pnu, help! :)
19:57 kmwallio masak: Sync the repo to the version you want and specify the local path to panda?
19:58 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 .
19:58 masak ooh
19:58 masak yes, that's probably what I should do, then
19:58 jnthn If 3 people suggest it, it must be right! :)
19:59 masak within seconds of each other! :D
19:59 masak (it seems I need to downgrade my DBIish to the one the heroku rakudo buildpack is using)
19:59 masak because some method names have changed in the intervening period
19:59 kmwallio does rakudo/rakudobrew compile on Ubuntu 14.04?
20:00 masak I would assume so
20:00 kaare_ kmwallio: I installed Perl 6 thru rakudobrew @ work
20:00 kaare_ Where I have 14.04
20:01 labster joined #perl6
20:02 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?
20:03 sortiz masak, I have not changed the legacy methods to kebab-case precisely to maintain back compatibility, what methods names has problems?
20:04 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
20:04 masak pnu: I had Bailador as a dependency, but not DBIish. trying that. pnu++
20:04 masak sortiz: allrows
20:05 espadrine joined #perl6
20:08 sortiz masak, 'allrows' hasn't changed as far as I know!? What is heroku expecting?
20:10 masak sortiz: I don't understand the question. under heroku, there's a DBIish without allrows. it works locally.
20:10 masak pnu: nope, declaring the dependency didn't help :(
20:10 masak 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?
20:11 masak 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 :)
20:11 masak now I only wish it had a newer version of DBIish so I didn't have to downgrade locally in order to continue... :)
20:13 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:14 pnu 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.
20:14 jnthn Just a short progress report from me about last week's work: https://6guts.wordpress.com/2016/04/05/small-but-welcome-fixes/
20:16 masak pnu++ # updating the base package is the easiest from my perspective :)
20:16 masak jnthn++ # blag
20:17 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:21 masak pnu: I'm just using the buildpack as-is
20:21 masak pnu: but the rakudo version shoudln't be connected to the DBIish version, should it?
20:23 jnthn Time to rest up before tomorrow's Perl 6 hackery :) 'night o/
20:23 masak 'night, jnthn
20:23 lizmat nigh jnthn
20:24 pmurias joined #perl6
20:25 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 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:29 kaare_ pmurias: Thanks a lot.
20:29 kaare_ It's just coz it's hard to follow only by irc with only 5 minutes here and 3 there.
20:31 spider-mario joined #perl6
20:33 buharin joined #perl6
20:37 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.
20:38 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␤␤»
20:39 perlpilot MadcapJake: %f is a Hash, not a Foo.
20:40 skids m: class Foo does Associative { method bar { 'baz'.say } }; my %f := Foo.new; %f.bar;
20:40 camelia rakudo-moar c8ec5a: OUTPUT«baz␤»
20:41 masak pnu: ok. sounds good.
20:41 masak pnu: what, concretely, do I need to set where?
20:42 pnu masak: `echo "2016.03.86.g.0.e.95.cde" >.rakudo-version` in your project root. add and commit. :-)
20:46 masak ah. excellent.
20:46 masak pnu++
20:47 MadcapJake skids: ahh, I have to bind it to work
20:48 skids Right, "TypeName %f" is a Hash with TypeName values.
20:50 MadcapJake oh yeah! I've done that with arrays, just was thinking it would work like a scalar.
20:51 perlpilot nah, you either bind as skids showed or ... use a scalar  :)
20:56 Begi1 joined #perl6
21:03 masak pnu: now I'm getting "Could not find Bailador in: [places]", despite heroku installing Bailador as part of the push...
21:04 ZoffixWin m: ' ́yó'.comb>>.uniname.say
21:04 camelia rakudo-moar c8ec5a: OUTPUT«(SPACE LATIN SMALL LETTER Y LATIN SMALL LETTER O WITH ACUTE)␤»
21:04 ZoffixWin Why the acute on Y doesn't show up in the uniname?
21:05 ZoffixWin m: ' ́yó'.comb[0].say
21:05 camelia rakudo-moar c8ec5a: OUTPUT« ́␤»
21:06 ZoffixWin m: ' ́yó'.comb[0].uniname.say
21:06 camelia rakudo-moar c8ec5a: OUTPUT«SPACE␤»
21:06 ZoffixWin :S
21:09 geekosaur ZoffixWin, fwiw that shows up here as a space with a combining acute
21:09 geekosaur then a bare y
21:10 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:11 ZoffixWin geekosaur, I see this: http://i.imgur.com/blAaoqn.png
21:11 ZoffixWin Still, regardless of where the first acute is on, shouldn't it still be mentioned in uninames?
21:11 ZoffixWin m: "\N[COMBINING ACCUTE ACCENT]y".say
21:11 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␤»
21:12 ZoffixWin What's the Perl 6 way to type these?
21:12 perlpilot m: "\c[COMBINING ACCUTE ACCENT]y".say
21:12 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␤»
21:12 geekosaur m: "\c[COMBINING ACUTE ACCENT]y".say
21:12 camelia rakudo-moar c8ec5a: OUTPUT«́y␤»
21:12 perlpilot ah ... spelling
21:13 ZoffixWin Ah, it must be the sideeffect of .comb
21:13 ZoffixWin m: say uninames ' ́yó'
21:13 camelia rakudo-moar c8ec5a: OUTPUT«(SPACE COMBINING ACUTE ACCENT LATIN SMALL LETTER Y LATIN SMALL LETTER O WITH ACUTE)␤»
21:13 sjn m: "y\c[COMBINING ACUTE ACCENT]".say
21:13 camelia rakudo-moar c8ec5a: OUTPUT«ý␤»
21:14 awwaiid joined #perl6
21:14 ZoffixWin Thanks
21:16 ZoffixWin 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 #perl6
21:17 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 #perl6
21:26 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: https://gist.github.com/pnu/46d6eeb177d01b1e2949d25708e48633
21:27 masak pnu: ok, trying that
21:27 MadcapJake how come the language/list pod doesn't show how to get the last element of a list?
21:32 masak pnu: yay! it works now \o/
21:33 * masak celebrates by going to bed
21:33 masak 'night, #perl6
21:33 ZoffixWin night
21:33 ZoffixWin MadcapJake, maybe it's just not written yet? If you have time, just add it :)
21:36 sortiz gnight masak.
21:36 ZoffixWin m: role Foo { method bar{ say $!foo } }; class Bar does Foo { has $!foo = 'foobar'; }; Bar.new.bar
21:36 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…»
21:36 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?
21:39 ZoffixWin 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␤»
21:39 ZoffixWin Good 'nuf for me
21:40 Juerd You can have 'self' without $ even if it's not in the signature.
21:40 Juerd Also, your method !foo could "is rw" if you like :)
21:40 ZoffixWin m: role Foo { method bar { say self!foo } }; class Bar does Foo { has $!foo = 'foobar'; method !foo { $!foo } }; Bar.new!foo;
21:40 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…»
21:40 ZoffixWin Oh, oops. Wrong code
21:41 ZoffixWin Works. Thanks, Juerd
21:41 ZoffixWin m: class Bar { has $!foo = 'foobar'; method !foo { $!foo } }; my $x = Bar.new; say $x!foo;
21:41 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…»
21:41 ZoffixWin So what does this mean "fully qualified"? Does it mean there's actually a way to call !foo in this case?
21:43 Juerd $x!Bar::foo gives another interesting error message.
21:43 sortiz ZoffixWin, yes, if the class 'trust' you.
21:44 ZoffixWin Ahhh
21:44 ZoffixWin Thanks, all.
21:47 kerframil joined #perl6
21:49 chrisdotcode joined #perl6
21:49 sunnavy joined #perl6
21:50 telex joined #perl6
21:54 nadim joined #perl6
21:56 mkz_ joined #perl6
22:03 dvinciguerra__ joined #perl6
22:09 nienacko__ joined #perl6
22:10 Khisanth joined #perl6
22:11 kid51 joined #perl6
22:24 _z joined #perl6
22:25 spintronic_ joined #perl6
22:34 skids joined #perl6
22:43 _ramix_ joined #perl6
22:44 Khisanth joined #perl6
22:48 _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 _ramix_ thanks!
22:51 ZoffixWin _ramix_, you call done to exit the react block. That should probably do the trick.
22:52 ZoffixWin Hm. In my code here, I see I call .close on the socket to end it: https://github.com/zoffixznet/perl6-IRC-Client/blob/master/lib/IRC/Client.pm6#L122
22:53 spintronic_ joined #perl6
22:58 _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:59 grondilu joined #perl6
23:00 skids m: react { sleep 1; done }; say "here"
23:00 camelia rakudo-moar c8ec5a: OUTPUT«here␤»
23:00 _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.
23:01 grondilu m: my @a = rand xx 3; say @a.all ~~ Real;
23:01 camelia rakudo-moar c8ec5a: OUTPUT«True␤»
23:01 grondilu jeez I thought that would fail
23:02 grondilu m:subset Vector of Array where *.all ~~ Real; say [1, 4] ~~ Vector;
23:02 grondilu m: subset Vector of Array where *.all ~~ Real; say [1, 4] ~~ Vector;
23:02 camelia rakudo-moar c8ec5a: OUTPUT«False␤»
23:02 b2gills you can't do *.all ~~ Type because ~~ can't be in a WhateverCode closure
23:02 b2gills {.all ~~ Type} should work
23:02 grondilu ok
23:03 grondilu m: subset Vector of Array where {.all ~~ Real}; say [1, 4] ~~ Vector; # just checking
23:03 camelia rakudo-moar c8ec5a: OUTPUT«True␤»
23:03 ZoffixWin Check it out. Possible the first ever Tweet by a Perl 6 script: https://twitter.com/zoffix/status/717487486281388032
23:04 b2gills Now all we need is an irc bot that also does twittery things
23:04 lizmat joined #perl6
23:05 ZoffixWin Like what?
23:05 ZoffixWin We do have a Perl 6 irc bot that almost works :)
23:05 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 #perl6
23:07 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;
23:07 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 #perl6
23:08 grondilu that's slightly annoying
23:08 arcetera joined #perl6
23:08 ZoffixWin Well, it kinda haveta work like that :)
23:08 ZoffixWin m: class Foo {}; my $x = Foo; say $x ~~ Foo;
23:08 camelia rakudo-moar c8ec5a: OUTPUT«True␤»
23:12 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␤»
23:12 ZoffixWin :o
23:17 cpage_ joined #perl6
23:22 MilkmanDan joined #perl6
23:22 japhb MadcapJake: From a *long* time ago, but: http://broadwell.org/perl/index.html#interpreters (ANS-style Forth in Perl 5)
23:24 mohae joined #perl6
23:35 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␤»
23:35 ZoffixWin What was the trick to return something concrete with a trait, rather than the sub body? I thought I saw something.
23:37 ilmari m: sub foo (-->3) {}; say foo
23:37 camelia rakudo-moar c8ec5a: OUTPUT«3␤»
23:38 ZoffixWin Thanks.

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

Perl 6 | Reference Documentation | Rakudo