Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-03-25

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:08 cdg joined #perl6
00:08 notostraca joined #perl6
00:09 hahainternet joined #perl6
00:09 timotimo very nice talk
00:09 BenGoldberg joined #perl6
00:10 timotimo i need constant reminders that perl6 is actually quite neat
00:10 Ulti neat even on my super ancient VM my tests now take 4s to run I think about 5 years ago it took ten minutes
00:10 timotimo it's really hard to not forget all those neat features because you're so used to them
00:13 boegel joined #perl6
00:19 MadcapJake so Robert via RT doesn't want to give me an email 😢
00:21 timotimo hm?
00:22 MadcapJake I was going to use an email address from perl.org to send in RT tickets from my issue submitter, but Robert (the webmaster at perl.org) says no
00:23 AlexDaniel timotimo: just try other languages to realize how much they suck ;)
00:23 MadcapJake He claims that it would just lead to spam and that I'd be forging the from field.  So I replied that I would be writing something just like a mail client but only sending via logging in to the perl.org SMTP server, so how is that forged? then I'd include a captcha on the page.  Hopefully he comes around
00:23 diakopter but I thought threre already was one
00:24 MadcapJake If someone else would like to email to provide some pressure and further perspectives, please send to webmaster@perl.org
00:24 diakopter pressure for what?!
00:25 MadcapJake getting an email address! :P
00:25 MadcapJake for my issue submitter
00:25 diakopter to send *as*??
00:25 diakopter or send *to*?
00:25 MadcapJake right, because the only other option would be to just write a long mailto URL
00:26 MadcapJake to send *as*
00:26 diakopter why not use one of yours
00:26 diakopter invent an email address at any domain
00:26 MadcapJake yes I could do that
00:26 CurtisOvidPoe joined #perl6
00:27 MadcapJake but I just wanted something to look nice when you open the ticket, you'd see sixbug@perl.org instead of perlsixbugsubmitter@gmail.com
00:27 diakopter don't bother Robert; he has very linited time
00:28 MadcapJake ok, I guess I'll just go the gmail route then
00:28 diakopter you may actually have to send through gmail though
00:29 diakopter because of SPF and such
00:30 diakopter (instead of smtp to perl.org directly)
00:31 MadcapJake how does an email client work then?
00:32 diakopter what
00:32 diakopter could you possibly be asking
00:32 MadcapJake how come I can't just do what an email client does?
00:33 diakopter that is what an email client does
00:33 teatime Is there a parseInt() or similar that could xform 'deadbeef' ₁₆→ Int,  '0755' ₈→ Int  ?
00:33 diakopter it sends through its organization's mail servers
00:33 MadcapJake but what about Outlook, Thunderbird, etc.
00:33 diakopter exactly
00:33 MadcapJake they don't do that, they ask for the smtp server
00:34 [Coke] please don't "pressure" webmaster@perl.org
00:34 BenGoldberg m: use experimental :macros; macro foo(AST $expr) { return quasi { {{{$expr}}} } }; say foo(3)
00:34 camelia rakudo-moar 8df1a6: OUTPUT«Weird node visited: QAST::BVal␤3␤»
00:34 teatime ooo, m: say :16('deadbeef')
00:34 diakopter yes, if you add a gmail account to those clients, it emails through gmail's smtp servers
00:34 teatime m: say :16('deadbeef')
00:34 camelia rakudo-moar 8df1a6: OUTPUT«3735928559␤»
00:34 diakopter [Coke]: I already said that
00:35 BenGoldberg m: use experimental :macros; macro circumfix:<< ⌊ ⌋ >>(AST $expr) { return quasi { {{{$expr}}} } }; say ⌊ 3 ⌋
00:35 camelia rakudo-moar 8df1a6: OUTPUT«5===SORRY!5=== Error while compiling /tmp/EPxVPVgJd3␤Calling circumfix:<⌊ ⌋>(Int) will never work with declared signature (AST $expr)␤at /tmp/EPxVPVgJd3:1␤------> 3) { return quasi { {{{$expr}}} } }; say 7⏏5⌊ 3 ⌋␤»
00:35 BenGoldberg m: use experimental :macros; macro circumfix:<< ⌊ ⌋ >>($expr) { return quasi { {{{$expr}}} } }; say ⌊ 3 ⌋
00:35 camelia rakudo-moar 8df1a6: OUTPUT«Type check failed in unquote evaluation; expected AST but got Int (3)␤  in macro circumfix:<⌊ ⌋> at /tmp/KPv6iEVoom line 1␤  in block <unit> at /tmp/KPv6iEVoom line 1␤␤»
00:35 MadcapJake [Coke]: This was the suggested route I take to doing this from people here in #perl6 so I just thought that if more people were to ask, it might happen, I wasn't trying to imply that we storm his mail account...
00:35 [Coke] suggested by... whom?
00:36 BenGoldberg m: use experimental :macros; macro circumfix:<< ⌊ ⌋ >>($expr) { return quasi { $expr } }; say ⌊ 3 ⌋
00:36 camelia rakudo-moar 8df1a6: OUTPUT«AST.new␤»
00:36 teatime MadcapJake: You would have to use their SMTP server; you can't just send email from random hosts anymore, they need to be in SPF records etc. because spam; otherwise your mail will just get rejected 90% of the time.
00:36 MadcapJake I don't recall :P but it was suggested that I contact the perl.org and I did some searching on issues and in one it said "for a new mail account contact webmaster@perl.org"
00:36 BenGoldberg m: use experimental :macros; macro circumfix:<< ⌊ ⌋ >>($expr) { return quasi { floor {{{$expr}}} } }; say ⌊ 3 ⌋
00:36 camelia rakudo-moar 8df1a6: OUTPUT«Type check failed in unquote evaluation; expected AST but got Int (3)␤  in macro circumfix:<⌊ ⌋> at /tmp/W1dNfj37N3 line 1␤  in block <unit> at /tmp/W1dNfj37N3 line 1␤␤»
00:37 BenGoldberg m: use experimental :macros; macro circumfix:<< ⌊ ⌋ >>($expr) { return quasi { floor $expr } }; say ⌊ 3 ⌋
00:37 camelia rakudo-moar 8df1a6: OUTPUT«AST.new␤»
00:37 diakopter I'll say it again: don't bother that guy
00:38 diakopter MadcapJake: why do you want a new bug submitter form?
00:38 MadcapJake Ok seriously, I'm just trying to help build something for Perl 6 that seemed a hot button issue and a good way to help build my perl 6 programming ability...I don't understand why I'm getting all this anger thrown my way. I'm done bothering the guy, now I just need to set up my smtp client to use gmail's smtp details and get a gmail email address
00:39 [Coke] I'm not angry.
00:39 MadcapJake diakopter: check the perl6 user experience issues
00:39 diakopter what does that mean?
00:39 diakopter where would one check such a list
00:40 BenGoldberg m: sub circumfix:<< ⌊ ⌋ >> { floor $^n  }; say ⌊ 3.5 ⌋; # how do I make something like this work, but turning ⌊ ⌋ into floor() at parse time?
00:40 camelia rakudo-moar 8df1a6: OUTPUT«3␤»
00:40 MadcapJake diakopter: https://github.com/perl6/user-experience/issues/8
00:42 [Coke] BenGoldberg: a macro?
00:43 diakopter yeah. useless thread
00:43 [Coke] which are basically experimental at this point.
00:43 [Coke] I agree with the premise that our bug reporting process is in need of improvement.
00:44 timotimo AlexDaniel: whenever i try another language, its execution speed is faster :P
00:44 diakopter RT is junk, junk, and more junk, and so is bitcard, despite the ancient despots who luck into having it "work"
00:44 timotimo well, usually ...
00:44 timotimo but developing in perl6 as compared to other languages is rather enjoyable
00:44 MadcapJake I'm trying to help alleviate that, some people (Robert included) don't think I should send the email for people though...I don't really agree, if all it does it build an elaborate mailto url, it just seems kind of wasteful, the user then has to wait for their mail client to open and it's just generally annoying
00:45 AlexDaniel timotimo: true, yeah, but not much. YMMV
00:45 teatime BenGoldberg: this works for me: sub circumfix:<⟦ ⟧>(Str:D $s) { $s.comb.permutations».join }
00:45 timotimo well, i just tried a bit of C++ development
00:45 diakopter I agree with Robert; you shouldn't have an unauthenticated form emailing rakudobug
00:45 MadcapJake it begs the question, why not just open your mail client in the first place
00:45 timotimo :P
00:45 teatime BenGoldberg: I don't see why yours doesn't.
00:46 AlexDaniel MadcapJake: is there any simpler solution?
00:46 sortiz joined #perl6
00:47 MadcapJake AlexDaniel: two solutions, mailto url builder and actually logging into an SMTP server and emailing the bug.  No API to do this (and Robert said even if one was developed it would be a huge pain trying to integrate it in their current instance)
00:47 diakopter MadcapJake: the original complaint is correct; it's the documentation that needs improving
00:47 tmch joined #perl6
00:48 MadcapJake diakopter: well, (un)fortunately, I've spent a fair number of hours working on this issue submitter and others have put forth that it's a good idea, so I'm going to continue, please respect that.
00:48 diakopter I mean, making an email form is admirable and all, but it shouldn't be unauthenticated
00:48 MadcapJake how would I authenticate it?
00:48 diakopter use github login like someone suggests
00:48 AlexDaniel MadcapJake: e.g. here's a random idea: make a small page titled “Quick Bug Reports”. Anyone is allowed to write anything there (it's just a huge bin of user complaints). Then anybody else can move these reports to appropriate repos. This will make it harder for developers (someone has to manage these reports), but perhaps will make it easier for users to file reports.
00:50 MadcapJake diakopter: ok i'll look into that.
00:50 AlexDaniel if we are going to use github login to authenticate then perhaps we can simply use github…
00:51 MadcapJake AlexDaniel: currently seems like that might be a tall order, plus I think it's generally safe to say that most people don't want to do this kind of work :) Also, it really seems silly to not just automate the whole process, why make an extra human step here?
00:51 diakopter MadcapJake: but at that point you might as well just accept github issues into a separate repo
00:51 MadcapJake well that's really not up for debate (at least the general consensus is that we are not going that route) however a separate repo is an interesting idea
00:52 diakopter it's ridiculous if perl6 doesn't accept github issues
00:52 AlexDaniel MadcapJake: I don't think that bug reporting is a thing that can be automated
00:52 diakopter MadcapJake: it's the general consensus by moritz I suspect
00:53 MadcapJake diakopter: that's an unfair generalization, many others have stated similar viewpoints
00:54 AlexDaniel .oO( I really think that we should make it TIMTOWTDI-ish for users. That is, just allow issues to be filed on github as well )
00:54 MadcapJake AlexDaniel: plenty of games/IDEs and others would disagree, bug reporting can totally be automated, the question is *how* automated
00:54 diakopter well, propose a system that doesn't require THEM maintaining something.. and isn't unauthenticated
00:54 diakopter AlexDaniel: agreed, of course
00:55 MadcapJake Ok, I'm currently sticking to my guns a bit, I will set up a gmail, add a robust Captcha of some kind, and then propose to a wider audience whether going full-authentication is the preferred route.
00:56 * diakopter bows out of this conversation which is 15 years too late (still)
00:56 BenGoldberg This might be bikeshedding, but I think we should have a 'perl6bug' program, which opens up the users browser to the appropriate page.  The benefit of this is that the program can append Rakudo's current version, and some of the environment, to a query string, which then becomes part of the bug report.
00:57 MadcapJake There are many who have voiced quite different opinions on the matter that aren't currently here discussing this.  Look back in the IRC log even for more than is in that thread.
00:58 cdg joined #perl6
00:58 diakopter MadcapJake: this topic is ten years old
00:58 MadcapJake BenGoldberg: the intent is for this webapp to not only ask users for the language version, compiler version, and environment but also to redirect the user to the thread once it has been created actually.  But I do agree that a CLI app would also be useful!
00:59 MadcapJake diakopter: only goes to show that it's an important thing to discuss
00:59 * MadcapJake is off to RL stuff, ciao!
01:00 dvinciguerra joined #perl6
01:02 perlawhirl joined #perl6
01:35 jack_rabbit joined #perl6
01:40 timotimo hm
01:40 timotimo i'm wondering why my code isn't executing lazily :\
01:41 timotimo but removing the indirection via a variable made it work all right
01:42 xinming oops, sorry, wrong channel. :-)
01:42 timotimo huh?
01:44 Actualeyes joined #perl6
01:50 guest666_ joined #perl6
01:56 johndau joined #perl6
02:03 cdg_ joined #perl6
02:05 skids .oO(autopun?)
02:07 molaf joined #perl6
02:13 colomon joined #perl6
02:14 eyck joined #perl6
02:19 BenGoldberg joined #perl6
02:23 BenGoldberg joined #perl6
02:29 manchicken joined #perl6
02:33 manchicken So, I'm having build failures for moarvm on my VM, and my searches seem to indicate that compiling moarvm requires up to 2GiB. I've also had trouble building on the Raspberry Pi, but not on OSX... so I'm wondering if it really does take 2GiB of RAM in order to build moar. Does anybody know?
02:36 molaf_ joined #perl6
02:38 AlexDaniel manchicken: I'm not sure about memory consumption, but you on RPi you can install rakudo from debian unstable
02:38 colomon I think I got it built once on a PowerPC Mac with 512MB?  Never got Rakudo built, however.
02:38 AlexDaniel s/you//
02:38 colomon and that was a few years back.
02:38 manchicken Are there x86_64 images for Debian/Ubuntu?
02:39 manchicken I keep getting this: make: *** [CORE.setting.moarvm] Error 137
02:39 manchicken And then the build fails.
02:40 geekosaur hm. 137 *could* be a segfault (sadly error codes are not sufficiently expressive especially when filtered through a shell)
02:46 manchicken This looks like it may be relevant to what I've got going on: http://www.nntp.perl.org/group/per​l.perl6.users/2015/12/msg2361.html
02:46 geekosaur ohg right, math wrong 137 = 128+9
02:46 geekosaur that would be OOM
02:46 * geekosaur should not math late at night
02:46 geekosaur that is, you ran out of swap and the out-of-memory killer nuked it
02:46 manchicken Wee...
02:46 manchicken Gonna check launchpad...
02:47 bobby_ joined #perl6
02:48 perlawhirl joined #perl6
02:48 geekosaur basically there's only 3 ways to get "Killed" (signal 9): sending it explicitly, OOM killer, or a dynamically loaded symbol going unexpectedly missing after dlsym() found it
02:48 bobby_ 'p6: say 3;'
02:49 geekosaur the latter is hard to accomplish without doing some really evil things with dynamically loaded code, and I think you'd need to be abusing NativeCall to trigger it with perl6
02:49 geekosaur so OOM is most likely
02:50 geekosaur bobby_, the 's are not part of the bot command
02:50 manchicken Yeah, that's what I though.
02:51 bobby_ @geekosaur...was hoping nobody saw that fail :) lol, thanks for the tip though....I wonder how many times i have to try before getting it lol
02:51 bobby_ just no apostraphe's right?
02:52 geekosaur right
02:52 geekosaur m: 4.say
02:52 camelia rakudo-moar 8df1a6: OUTPUT«4␤»
02:52 bobby_ p6: say 3;
02:52 camelia rakudo-moar 8df1a6: OUTPUT«3␤»
02:52 geekosaur ("p6" would run all supported backends, which currently is rakudo-moarvm because rakudo-jvm is broken
02:52 bobby_ m: 4.say
02:52 camelia rakudo-moar 8df1a6: OUTPUT«4␤»
02:53 bobby_ what does the "m" mean? method call?
02:53 kalkin-_ joined #perl6
02:53 bobby_ ah gotcha
02:56 geekosaur m is short for "moar" which is short for rakudo-moar
02:56 geekosaur camelia: help
02:56 camelia geekosaur: Usage: <(nqp-parrot|pugs|debug-cat|star-m|star-j|nqp-j​s|prof-m|p5-to-p6|rakudo-jvm|std|nqp-jvm|nqp-mo​arvm|niecza|rakudo-moar|rakudo-MOAR|sm|nqp-q|p5​6|nqp-p|sj|n|Pnr|r-jvm|nPr|perl6|m|rj|r|rn|j|nq​p-m|p6|r-m|rnP|star|nqp|rakudo|M|nrP|nom|nqp-mv​m|nr|rPn|rm|P|nqp-j|r-j|Prn)(?^::\s(?!OUTPUT))
02:56 camelia ..$perl6_program>
02:58 geekosaur many of those are not currently functional: parrot backend is essentially dead, jvm is broken (they're working on it), std (basically a parse tester working against the spec) bitrotted when rakudo-moar started using a parser based on the spec instead of the original ad hoc one
02:59 geekosaur pugs is still there but massively bitrotted, niecza is almost as badly bitrotted now
03:00 dalek DBIish/mysql-prepare-t2: 7c8c93f | (Salvador Ortiz)++ | lib/DBDish/mysql/Native.pm6:
03:00 dalek DBIish/mysql-prepare-t2: Cleanup, use our blob common functions
03:00 dalek DBIish/mysql-prepare-t2:
03:00 dalek DBIish/mysql-prepare-t2: Noted by abraxxa++
03:00 dalek DBIish/mysql-prepare-t2: review: https://github.com/perl6/DBIish/commit/7c8c93f64a
03:00 dalek DBIish/mysql-prepare-t2: ec3de60 | (Salvador Ortiz)++ | lib/DBDish/mysql/StatementHandle.pm6:
03:00 dalek DBIish/mysql-prepare-t2: Don't leak the binding structures
03:00 dalek DBIish/mysql-prepare-t2: review: https://github.com/perl6/DBIish/commit/ec3de60c4f
03:05 bobby_ thanks @geekosaur....yea i found it interesting it referenced pugs, parrot, and niecza
03:05 geekosaur it's still sometimes useful to refer back to them
03:05 bobby_ Is there ever any discussion on having both a JVM backend and the standard C bytecode moar vm is too much?
03:06 bobby_ understood
03:06 bobby_ I don't see a problem with that
03:06 geekosaur multiple targets is good, there's even a javascript backend in development although it's not part of the main project (yet)
03:07 geekosaur keep in mind that much of perl 6 is written in itself and another chunk is written in nqp which is a sort of mini-perl6 that abstracts over the backend to some extent
03:08 geekosaur the biggest problems tend to be not so much getting thinsg working, as doing so in a way that will play nicely with other stuff on the target (so for example making rakudo-java able to work with existing java stuff)
03:08 bobby_ Read Zoffix's artitcle mentioning JS today lol
03:10 manchicken Sadface. I can't find any suggestions on how to build with less RAM.
03:11 manchicken I was going to port the Net::AMQP::RabbitMQ natives over...
03:12 geekosaur (and if I understood correctly, the current JVM issue is actually 2 bugs, because moarvm should *also* be crashing... meaning there's also a moarvm bug somewhere)
03:14 bobby_ thanks geekosaur, do you know who is planning on using the JVM backend?
03:15 bobby_ if Moar-VM ends up being pretty fast w/ the JIT, is the backend mainly for cooperating w/ the JVM kind of like how you can call Java libraries like Swing with Clojure?
03:15 geekosaur not offhand but people are actively working on it and that usually means they have plans to use it for something
03:15 manchicken Are people commonly using Java libs rather than porting Perl5 stuff over?
03:15 bobby_ I suppose that is logical :)
03:16 geekosaur perl6 compileable to java certainly has use casesd. none that I would be interested in, but then that's because I don't have much use for java in general
03:16 manchicken Well, RabbitMQ has a rather commonly used Java interface.
03:17 manchicken I help maintain the Net::AMQP::RabbitMQ module in Perl5 which uses XS to talk to librabbitmq-c.
03:17 bobby_ hmmmm manchicken...interesting thought....i guess having a JVM backend would give you access to thousands of modules? it wouldn't be nearly as fast as real java (guessing from Clojure, Scala, Groovy, Kotlin speeds which i hear are less optimized)
03:17 manchicken Do you still think it's a worthwhile endeavor to make a perl6 version?
03:17 manchicken I wanted to play with some of the new native stuff.
03:18 manchicken I suppose there may be many a perl5 XS developer asking themselves the same question.
03:18 dalek DBIish: dddfba3 | (Salvador Ortiz)++ | / (2 files):
03:18 dalek DBIish: Use .dispose when needed
03:18 dalek DBIish: review: https://github.com/perl6/DBIish/commit/dddfba3ae3
03:18 dalek DBIish: eb3dc55 | (Salvador Ortiz)++ | lib/DBDish/Connection.pm6:
03:18 dalek DBIish: Support for .execute method at Connection level
03:18 manchicken I know Perl5 isn't going anywhere, but still...
03:19 dalek joined #perl6
03:23 perlawhirl hi perler6, lil help
03:23 perlawhirl m: my %foo; %foo<bar>.push: 'this'; %foo<bar>.push: 'that'; say "#$_" for %foo<bar>;
03:23 camelia rakudo-moar 8df1a6: OUTPUT«#this that␤»
03:23 perlawhirl i expects '#this' and '#that'
03:23 perlawhirl where did i go wrong
03:29 noganex_ joined #perl6
03:31 perlawhirl ok it works if i .say for |%foo<bar>... but i don't understand why it's needed when %foo<bar> is an (Array) with 2 elems
03:31 sortiz m: my %foo; %foo<bar>.push: 'this'; %foo<bar>.push: 'that'; say "#$_" for @(%foo<bar>);
03:31 camelia rakudo-moar 8df1a6: OUTPUT«#this␤#that␤»
03:33 sortiz perlawhirl, If %foo<bar> is an Array and want to iterate it you can use @( )  ^^^
03:36 sortiz m: my $a = <a b c d>; say "List: $_" for $a; say "Elem: $_" for @$a; # In general
03:36 camelia rakudo-moar 8df1a6: OUTPUT«List: a b c d␤Elem: a␤Elem: b␤Elem: c␤Elem: d␤»
03:40 nowan joined #perl6
03:42 perlawhirl got it... i suppose i could just for %foo<bar>.list as well
03:42 sortiz perlawhirl, Remember that Hash (and Array) elements are Scalar "items", so in a for you need some expression to de-itemize them.
03:42 sortiz Yep
03:43 perlawhirl got it
03:43 perlawhirl thanks
04:19 tmch joined #perl6
05:02 telex joined #perl6
05:14 vendethiel joined #perl6
05:48 Cabanossi joined #perl6
05:48 aindilis joined #perl6
05:50 dalek joined #perl6
06:01 CIAvash joined #perl6
06:06 solarbunny joined #perl6
06:07 dalek joined #perl6
06:08 mojca joined #perl6
06:09 Cabanossi joined #perl6
06:10 MadcapJake is there a way to do a subset of a sub with a certain signature?
06:27 pmurias joined #perl6
06:27 buharin joined #perl6
06:28 Hotkeys I feel like it should be as easy as doing 'subset Foo of Sub where *.signature ~~ :( ... )'
06:28 Hotkeys but it doesn't seem to be
06:31 Hotkeys m: sub Foo (Int $a) { $a * 2 }; subset IntSub of Sub where *.signature ~~ :(Int $); say &Foo.signature ~~ :(Int $); my IntSub &qux = &Foo;
06:31 camelia rakudo-moar 8df1a6: OUTPUT«True␤Type check failed in assignment to &qux; expected Callable[IntSub] but got Sub (sub Foo (Int $a) { #`...)␤  in block <unit> at /tmp/34eaNv09uV line 1␤␤»
06:34 cdg joined #perl6
06:37 perlawhirl joined #perl6
06:40 perlawhirl Hotkeys: it sounds like you just need a multi? what is the subset of a sub (subsub?) for?
06:40 Hotkeys perlawhirl: I was responded to MadcapJake
06:40 Hotkeys responding*
06:41 perlawhirl so you were!
06:42 Hotkeys No idea what it'd be fore
06:42 Hotkeys for
06:46 [particle] joined #perl6
06:49 cpage_ joined #perl6
07:02 timotimo the error above is because "my IntSub &qux" is syntax for "a sub that returns IntSub"
07:03 timotimo m: sub Foo (Int $a) { $a * 2 }; subset IntSub of Sub where *.signature ~~ :(Int $); my &qux where IntSub = &Foo
07:03 camelia rakudo-moar 8df1a6: OUTPUT«Type check failed in assignment to &qux; expected Callable[<anon>] but got Sub (sub Foo (Int $a) { #`...)␤  in block <unit> at /tmp/uJiIqMnMjN line 1␤␤»
07:03 timotimo hm.
07:13 buharin joined #perl6
07:14 jdv79 how is that "low hanging fruit" moarvm config issue not fixed yet
07:16 matiaslina joined #perl6
07:24 timotimo doesn't seem like many people feel comfortable contributing to moarvm
07:27 mojca joined #perl6
07:31 [particle] joined #perl6
07:34 wamba joined #perl6
07:40 domidumont joined #perl6
07:41 [particle] joined #perl6
07:45 domidumont joined #perl6
07:46 nadim joined #perl6
07:47 buharin joined #perl6
07:56 moritz jdv79: because you didn't fix it :-)
07:58 nadim joined #perl6
07:59 timotimo fish: “sudo dnf update” terminated by signal SIGBUS (Misaligned address error)
07:59 timotimo *sigh*
08:00 isBEKaml joined #perl6
08:00 firstdayonthejob joined #perl6
08:01 jdv79 moritz: i think it might come down to that soon
08:02 timotimo huh, it looks like my tmpfs may be completely full?
08:04 timotimo oh, no, my / is just ... b0rked?
08:05 moritz time to take a backup, and reboot?
08:05 rindolf joined #perl6
08:06 timotimo it could be something went belly-up with my sata and thus the filesystem has effectively become read-only?
08:08 timotimo like, is this serious or just some random debugspam? [725331.903386] ACPI Error: [DSSP] Namespace lookup failure, AE_NOT_FOUND (20150930/psargs-359)
08:08 timotimo [725331.903390] ACPI Error: Method parse/execution failed [\_SB.PCI0.SAT0.SPT4._GTF] (Node ffff88040e0c96e0), AE_NOT_FOUND (20150930/psparse-542)
08:11 abraxxa joined #perl6
08:12 musiKk_ joined #perl6
08:15 timotimo well, the system came back up again
08:18 dalek joined #perl6
08:18 darutoko joined #perl6
08:20 [particle] joined #perl6
08:22 fireartist joined #perl6
08:28 ely-se joined #perl6
08:29 dalek joined #perl6
08:46 dalek DBIish: 7d6ed34 | (Salvador Ortiz)++ | lib/DBDish/ (2 files):
08:46 dalek DBIish: Keep last $dbh.rows after $sth.dispose
08:46 dalek DBIish: review: https://github.com/perl6/DBIish/commit/7d6ed345d0
08:46 dalek DBIish: 9186dd5 | (Salvador Ortiz)++ | lib/DBDish/Connection.pm6:
08:46 dalek DBIish: Connection.do dispose the sth after execute it
08:46 dalek DBIish:
08:46 dalek DBIish: As Connection.do should not be used for SELECT statements
08:46 dalek DBIish: warn if the passed statement produced rows
08:46 dalek DBIish: review: https://github.com/perl6/DBIish/commit/9186dd50fc
08:46 dalek DBIish: 12b19b7 | (Salvador Ortiz)++ | lib/DBDish/StatementHandle.pm6:
08:46 dalek DBIish: $sth.execute arity check centralized in role
08:46 dalek DBIish:
08:46 dalek DBIish: !enter-execute common method now can report inconsistencies between
08:46 dalek DBIish: expected and received parameters.
08:46 dalek DBIish: review: https://github.com/perl6/DBIish/commit/12b19b7a07
08:46 dalek DBIish: 5dea4e4 | (Salvador Ortiz)++ | lib/DBDish/Pg/ (3 files):
08:46 dalek DBIish: Pg: Add support for unprepared $dbh.execute
08:46 dalek DBIish: review: https://github.com/perl6/DBIish/commit/5dea4e46df
08:46 dalek DBIish: 81de0cb | (Salvador Ortiz)++ | lib/DBDish/ (3 files):
08:46 dalek DBIish: Adopt changed !enter-exectute + minor cleanup
08:46 dalek DBIish: review: https://github.com/perl6/DBIish/commit/81de0cb317
08:46 dalek DBIish: 2c54b9a | (Salvador Ortiz)++ | / (2 files):
08:46 dalek DBIish: Make panda's users happy, now version 0.5.1
08:46 dalek DBIish: review: https://github.com/perl6/DBIish/commit/2c54b9a5fd
08:48 * sortiz And dalek survived!
08:54 [particle] joined #perl6
09:03 kaare_ joined #perl6
09:07 nine sortiz: not many pushes this time of day :)
09:08 maybekoo2 joined #perl6
09:09 sortiz nine, indeed :)
09:37 musca` joined #perl6
09:38 masak hi ok yeah so
09:38 masak what's the state of Heroku and Perl 6 these days?
09:39 masak is https://github.com/pnu/heroku-buildpack-rakudo still state-of-the-bleeding-edge?
09:39 masak has anyone tried it recently and wants to discuss it a bit? :)
09:39 eyck joined #perl6
09:43 boegel joined #perl6
09:44 maybekoo3 joined #perl6
09:46 Exodist joined #perl6
09:47 eyck_ joined #perl6
09:48 solarbunny joined #perl6
09:48 pnu masak, should work but i'd be glad to hear & help if it doesn't. I'm a bit offline few days, though. Need to write some automated tests, really.
09:48 pnu I have work in progress to combine perl and rakudo buildpacks here https://github.com/pnu/heroku-​buildpack-perl/tree/christmas
09:49 masak pnu: you rock. thanks.
09:50 masak pnu: I'm going to try it today -- will report back with any pain points and stuff.
09:50 Woodi_ joined #perl6
09:50 masak I just have this feeling that what I want to do -- expose a small simple board game -- should be doable in a day or so of focused work.
09:51 masak just TDD up a minimal system, then expose it as REST through Bailador, then serve it through heroku.
09:53 solarbunny joined #perl6
09:55 pmurias joined #perl6
09:56 BooK joined #perl6
09:58 masak anyone else still use `expert PERL6LIB=lib` while developing?
09:58 nine I use alias prove6='prove -e '\''perl6 -Ilib'\'''
09:59 masak I keep hearing that it's gonna be removed and stuff, and that we'll transfer control to some futuristic module data store instead
09:59 nine nonsense
09:59 masak but to me, setting that env variable remains the easiest way to configure my dev environment
09:59 masak I confess to doing ^R on prove the whole time -- which probably means I should have an alias too :)
09:59 * masak makes one
10:02 nine The futuristic module data store is for installed modules. Development trees are find and just SHOULD use a "lib" directory for module source code
10:03 masak don't worry, I've been through this situation before :) the low-level, pragmatic, "dirty" solution tends to be quite tenacious. I'm not worried.
10:04 masak heh. never done a Spoonerism in a Unix command before. but I just did `mkdit r`. go home, brain, you're sleepy.
10:04 virtualsue_ joined #perl6
10:08 FROGGS joined #perl6
10:09 solarbunny joined #perl6
10:11 pnu joined #perl6
10:16 * moritz constantly types "gi tpull" and stuff like that, and has a shell function that autocorrects it for him
10:17 pmurias speaking of shells it would be awesome to one day replace bash with a Perl 6 REPL running a slang ;)
10:19 masak bash (and alikes) are a wonderful example of "worse is better". no-one actually *enjoys* the interpolation rules. but they're very hard to displace because they do a decent job and people are used to them.
10:25 arnsholt Inertia is a powerful thing
10:28 gflohr joined #perl6
10:28 RabidGravy joined #perl6
10:30 pnu joined #perl6
10:30 solarbunny joined #perl6
10:30 pnu joined #perl6
10:30 RabidGravy marnin!
10:31 pmurias masak: the space for potential improvement seems small
10:31 virtualsue_ joined #perl6
10:31 masak pmurias: that's probably part of it too, yes.
10:31 masak but the interpolation rules are objectively horrible.
10:32 arnsholt And the error handling when you're scripting >.<
10:33 perlawhirl joined #perl6
10:33 masak right. shells haven't been updated to the async vision of this decade, either.
10:33 masak promises and channels in the shell: a killer app.
10:33 masak quick poll: do people tend to write `sub foo {}` or `sub foo() {}`, or is it kinda inconsistent what you tend to write?
10:34 masak I think I'm kinda inconsistent.
10:34 FROGGS I write the latter
10:35 FROGGS because it makes clear that there wont be any placeholder params in the sub body, so the potential reader dont need to scan for it
10:35 FROGGS does not need*
10:35 wtw joined #perl6
10:35 RabidGravy mostly the latter, but it depends on the context
10:36 wtw_ joined #perl6
10:38 masak I'm asking because I just found that when I add `is export`, then I also want to put in the empty parens for some reason.
10:40 jnthn Maybe a visual pilling effect or something
10:42 masak I suspect it's psychological
10:43 * masak .oO( "the `is export` goes after the parameter list -- but there's no parameter list! let's add one" )
10:43 Ven joined #perl6
10:43 Ven o/, #perl6
10:43 Ven masak: hey, do you have a full list of your talk slides?
10:43 Ven looking for the one you did at SPW15 :).
10:44 wtw joined #perl6
10:45 vendethiel joined #perl6
10:46 masak I used to have a full list
10:46 pmurias Ven: \o
10:46 masak but I think it was on some pugs server, so that list is gone...
10:46 Ven masak: I tried masak.org/carl, and your blog, with no success
10:46 masak right.
10:47 masak Ven: http://masak.org/carl/yapc-eu-2​015-interesting-times/talk.pdf
10:47 Ven masak: thanks :)
10:48 masak this is practically the same version as happened in SPW2015.
10:51 solarbunny joined #perl6
10:51 pnu joined #perl6
10:51 pnu joined #perl6
10:52 masak looking back at those slides, that slide stack is probably the closest to jnthn's esthetic I've ever produced :>
10:57 timotimo jnthn: btw, writing $file.slurp.lines instead of $file.lines makes the heap analyzer come up like 1000x faster :)
10:58 jnthn timotimo: Wow. Then I sure better debug the perf issue in the first :)
10:59 * timotimo measures it properly
11:01 timotimo 2.30 instead of 1:44
11:01 Ven .oO( who measures the measurer? )
11:01 jnthn I was happy it could do the BFS on a graph with hundreds of thousands of vertices and probably around half a million edges in just a few seconds. Would be nice to get it sub-second of course. :)
11:01 Ven (I was about to say "who rules the ruler", but I guess "ruler" can be different things :P)
11:02 timotimo we're probably trying to read the file byte-by-byte?
11:02 timotimo so that we don't read more than we need for a single line?
11:02 jnthn timotimo: No, we grab it in chunks, but given where you said the hotspot is I think it's something silly about looking for separators.
11:02 timotimo hmm
11:02 timotimo right
11:03 timotimo 32768 bytes per read call
11:03 jnthn It's unusual to have files with 10MB long lines :)
11:03 jnthn But should fix it :)
11:04 jnthn This is exactly the reason I wrote this thing in Perl 6, though. To show up some weak spots
11:04 solarbunny joined #perl6
11:06 timotimo right
11:07 jnthn I was pondering throwing off that BFS compuation in the background as soon as the Snapshot is constructed, so it'll be ready by the first path query :)
11:07 timotimo yeah, i'd like that
11:08 timotimo * we do not encounter it, returns 9. This may mean more input buffers are needed
11:08 timotimo ^- something tells me that 9 is wrong :)
11:11 * jnthn looks at his keyboard and sees 9 is right next to 0 :)
11:11 virtualsue_ joined #perl6
11:13 masak that is the worst excuse ever :P
11:13 masak "the key's, they're right next to each other!" :P
11:13 masak keys*
11:14 pnu joined #perl6
11:16 wtw joined #perl6
11:20 wtw_ joined #perl6
11:26 TeamBlast joined #perl6
11:29 masak m: sub foo::bar() { say "OH HAI"; }; foo::bar()
11:29 camelia rakudo-moar 8df1a6: OUTPUT«Could not find symbol '&bar'␤  in block <unit> at /tmp/0zSiX9x7Qk line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/0zSiX9x7Qk line 1␤␤»
11:29 masak the fact that I'm able to declare `foo::bar` is a bit weird.
11:29 sivoais joined #perl6
11:29 masak is there a reason this is not disallowed?
11:30 masak m: say (sub foo::bar() { say "OH HAI"; }).name
11:30 camelia rakudo-moar 8df1a6: OUTPUT«foo::bar␤»
11:31 masak I can think of evil uses for this :>
11:31 jnthn m: sub foo::bar() { say "OH HAI"; }; &('foo::bar')()
11:31 camelia rakudo-moar 8df1a6: OUTPUT«No such method 'CALL-ME' for invocant of type 'Str'␤  in block <unit> at /tmp/1DkHoUdOsy line 1␤␤»
11:31 jnthn oh, duh
11:31 jnthn m: sub foo::bar() { say "OH HAI"; }; ::('&foo::bar')()
11:31 camelia rakudo-moar 8df1a6: OUTPUT«No such symbol '&foo::bar'␤  in block <unit> at /tmp/ayOM8k79yY line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/ayOM8k79yY line 1␤␤»
11:31 jnthn hmm
11:32 jnthn m: sub foo::bar() { say "OH HAI"; }; say MY::
11:32 camelia rakudo-moar 8df1a6: OUTPUT«PseudoStash.new(("!UNIT_MARKER" => !UNIT_MARKER,"\$!" => Nil,"\$/" => Nil,"\$=finish" => Mu,"\$=pod" => [],"\$?PACKAGE" => GLOBAL,"\$_" => Any,"\$¢" => Nil,"\&foo::bar" => sub foo::bar () { #`(Sub|68241352) ... },"::?PACKAGE" => GLOBAL,:EXPORT(EXPORT),:GL…»
11:32 jnthn m: sub foo::bar() { say "OH HAI"; }; ::<&foo::bar>()
11:32 camelia rakudo-moar 8df1a6: OUTPUT«OH HAI␤»
11:32 jnthn hah!
11:32 masak :D
11:32 jnthn Yeah, I'm pretty sure that's not right ;)
11:32 * masak .oO( you say you can't call it? look, it's EASY! ) :P
11:40 perlawhirl been playing with the markov. chain module... now you can experience the glory of #perl6 irc even if your internet goes down: http://hastebin.com/utiyokijup
11:40 perlawhirl it builds a markov chain for each users input
11:41 perlawhirl my favourite one i've seen so far is this one: [ jnthn: .oO( "The streets still smell like compact structs) ]
11:42 jnthn *lol*
11:44 RabidGravy years ago the #london.pm channel had a markov bot, it got quite scary at times
11:46 TeamBlast joined #perl6
11:47 musiKk_ joined #perl6
11:48 perlawhirl was reading about the taytweets thing earlier. scary... and disappointing, in a "this is why we can't have nice things" kinda way
11:50 gflohr I'm trying to understand how to use attributes: http://hastebin.com/xuyarigare.vhdl
11:51 gflohr why does p6 tell me that I did not provide a value for '$!template' here?
11:52 RabidGravy gflohr, because it has no accessor you can't set it from the constructor
11:52 RabidGravy either change the ! to a '.' or provide a  "submethod BUILD($!template) { }"
11:53 jnthn Wants to be :$!template in the BUILD there
11:53 RabidGravy yeah
11:54 gflohr hm, is that explained somewhere? I know that the $.template helps me but I want the variable to remain private.
11:54 gflohr s/variable/attribute/
11:55 RabidGravy http://doc.perl6.org/langu​age/classtut#Constructors may help
11:56 RabidGravy but you are basically limited to the BUILD alternative in that case
11:58 gflohr so, if I understand it correctly, the default constructor picks those named arguments that belong to an attribute with an accessor and silently ignores the rest?
11:58 RabidGravy yes
12:00 jnthn Generally, the principle is that you could be able to refactor any $!foo without having to care about code outside of the current class body.
12:00 jnthn Whereas $.foo is part of the public interface already, so we can offer some constructor convenience also
12:01 gflohr unless I provide a BUILD() submethod which I will have to do in 99 % of my uses cases. ;)
12:01 vendethiel joined #perl6
12:01 jnthn Well, if you have something that the consumer of a class gave you in the first place, it might be worth asking why you'd like to try and hide it ;)
12:02 kid51 joined #perl6
12:04 gflohr it could change over time and be something else, when the consumer wants it back
12:04 RabidGravy well in that case you can provide your own accessor
12:05 RabidGravy if you create a method with the same name as an attribute then the default accessor isn't created
12:06 jnthn True...it depends if you're seeding mutable state or throwing in something immutable I guess :)
12:08 gflohr At the moment that looks pretty weird and surprising to me.  Maybe time will tell me. ;)
12:08 stmuk_ private in "is private" shock :)
12:11 gflohr atm I'm trying to figure out something useful that I could do in a constructor, when all my attributes are private but I can't see anything.
12:12 RabidGravy a quick survey reveals that only half of my modules have a BUILD and those with :$!foo because the BUILD does something more complicated
12:12 rudi_s How can I use a regex in a string and match something against it? like /$foo/ in perl5? AFAIK /$foo/ in perl6 matches the string verbatim.
12:13 jnthn /<$foo>/
12:13 rudi_s jnthn: Thanks!
12:13 m0ltar Anyone building a web framework yet?)
12:14 RabidGravy there are several
12:14 m0ltar Anything similar to catalyst?
12:14 jnthn lunch &
12:15 RabidGravy not really, mostly more similar to Dancer
12:15 RabidGravy there is room for more if you have time on your hands
12:16 m0ltar Any plans for orm comparable to DBIC?
12:17 RabidGravy I'm sure someone has thought of it, not sure if anyone is actually working on it though
12:17 m0ltar Ok, thank you
12:17 RabidGravy it's sorta kinda on my todo list but in a next year or so kind of way
12:19 RabidGravy someone needs to make an sql abstraction thing first to bootstrap that
12:20 dalek star: e5e742e | (Naoum Hankache)++ | docs/perl6intro.pdf:
12:20 dalek star: update perl6intro
12:20 dalek star: review: https://github.com/rakudo/star/commit/e5e742ea66
12:20 dalek star: 55c7d9f | lizmat++ | docs/perl6intro.pdf:
12:20 dalek star: Merge pull request #66 from hankache/master
12:20 dalek star:
12:20 dalek star: update perl6intro
12:20 dalek star: review: https://github.com/rakudo/star/commit/55c7d9fc84
12:20 m0ltar I see. That's hairy stuff.
12:21 nine RabidGravy: visitor macros may be very, very useful for an SQL abstraction
12:30 stmuk_ in the sense of https://gist.github.com/masak/13210c51f034f931af0c ?
12:32 jnthn gflohr: https://github.com/jnthn/p6-app-moar​vm-heapanalyzer/blob/master/lib/App/​MoarVM/HeapAnalyzer/Model.pm6#L303 is an example of a more interesting BUILD that I wrote recently :)
12:33 vendethiel joined #perl6
12:36 El_Che_ puckish!
12:37 El_Che_ wrong channel: learning a new english word each day :)
12:40 rudi_s Can I die without a stacktrace, like die "...\n" in perl5?
12:41 lizmat rudi_s: not afaik, closest thing is: note "foo"; exit
12:41 perlawhirl El_Che: As someone who's has only spoken English for his 30-something years, I don't think I've ever used the word puckish :D
12:41 jnthn rudi_s: Usual pattern is note "..."; exit 1 or so.
12:41 El_Che perlawhirl: :)
12:41 rudi_s lizmat: jnthn. Thanks.
12:42 * jnthn had to look up puskish too :)
12:42 jnthn *puckish
12:42 El_Che it's a fun word :)
12:42 lizmat yes, very playful  :-)
12:44 perlawhirl could someone point me in the direction of how to alias the .grep method. I'd like to play with an idea of calling it something else...
12:44 perlawhirl this actually comes from a language proposal (read: pipedream) i had: https://gist.github.com/0r​acle/ea0523759e2da15758d4
12:44 perlawhirl but if I can modularise it for now, I'd be happy with that.
12:46 perlawhirl i was looking at Any-iterable-methods.pm, is that a good place to start? should i just augment Any class? but honestly it kinda goes over my head a bit
12:47 gflohr1 joined #perl6
12:48 rudi_s lizmat: jnthn: Hm, that still prints the location. I guess I'll have to use $*ERR.say "..."; exit 1;
12:49 lizmat note prints the location ???
12:49 lizmat m: note "foo:
12:49 camelia rakudo-moar 8df1a6: OUTPUT«5===SORRY!5=== Error while compiling /tmp/cw0aHNu8im␤Unable to parse expression in double quotes; couldn't find final '"' ␤at /tmp/cw0aHNu8im:1␤------> 3note "foo:7⏏5<EOL>␤    expecting any of:␤        argument list␤        double quo…»
12:49 lizmat m: note "foo"
12:49 camelia rakudo-moar 8df1a6: OUTPUT«foo␤»
12:49 lizmat m: note "foo"; exit 1
12:49 camelia rakudo-moar 8df1a6: OUTPUT«foo␤»
12:51 rudi_s lizmat: Ah, damn. I'm stupid. I used warn instead of note. Sorry for the confusion.
12:54 andreoss joined #perl6
12:54 dalek doc: e8e4479 | (Simon Ruderich)++ | doc/Language/5to6-perlfunc.pod:
12:54 dalek doc: 5to6-perlfunc: document die "...\n" replacement
12:54 dalek doc: review: https://github.com/perl6/doc/commit/e8e44791b6
12:55 jnthn rudi_s++ # docing it
12:55 rudi_s ;-)
12:56 RabidGravy perlawhirl, I've used "puckish" - but there again I studied Shakespeare for a literature degree :)
12:57 perlawhirl Good old Will... He was great with adjectives
12:58 lizmat .oO( loop :puckish { } )
12:58 perlawhirl though i've only read macbeth, tho seen a handful of plays
12:58 perlawhirl double use of though... take that Wil!
12:58 RabidGravy nine, I'm sure they would be if I knew what they were ;-)
13:00 perlawhirl so, there seems to be a common theme when i ask about aliasing the grep method, in that i get no replies.
13:00 perlawhirl is a method as overarching as grep too much hassle to alias?
13:00 lizmat perlawhirl: there is currently an issue with augmenting core classes
13:00 perlawhirl so in the future it may be easier
13:00 lizmat if you augment a core class, its subclasses don't know about the augment
13:01 lizmat that's because children know about their parents in rakudo Perl 6, but parents don't know of their children
13:01 andreoss can i call class .new method inside of role which class will implement?
13:01 lizmat so when an augment is done to Any, only objects of type Any proper will see the augment
13:01 perlawhirl riiight. ok. that kinda squashes things.
13:02 lizmat which in practice means nobody sees it
13:02 lizmat you could probably augment the necessary subclasses manually, jnthn, any idea about that ?
13:03 RabidGravy I've got at least one augment (of DateTime) in a module, but that is for private purposes
13:03 RabidGravy and IO::Path::Mode kinda relies on it
13:04 jnthn lizmat: Even just a plain augment TheSubclass { } without putting the method in there will get it to recompute the cache
13:04 jnthn lizmat: uh, augment class TheSubclass { }
13:05 lizmat perlawhirl: ^^
13:07 stmuk_ hmmm I suppose a crude activerecord type orm could be based in Slang::SQL
13:07 perlawhirl alright, i mean... i think doing this is still over my head, but i can keep poking around.
13:08 perlawhirl i'm still kinda feeling my way around the core... where else is the implementation of grep defined, other than Any-iterable-methods.pm
13:09 RabidGravy I've actually got the basic design of an ORM in my head but I think I'd actually wait until I'm writing an application with such a thing
13:09 lizmat perlawhirl: ack 'method grep' src/core
13:09 perlawhirl alright, ta
13:10 RabidGravy I was kept awake for a few hours thinking about a framework-less framework for REST applications
13:10 Ulti is there an example of using NativeCall with C++ classes anywhere?
13:11 skids joined #perl6
13:11 RabidGravy Ulti : https://github.com/jonathanstowe/Audio-Soundtouch - may get you started, not finished as I blocked on working out how to test it :)
13:12 Ulti excellent thanks
13:13 RabidGravy I actually started making it with a C wrapper the the lovely FROGGS++ implemented the C++ stuff so I started again
13:14 Ulti so 'is cpp-symbol' for a class with the CPPStruct representation means symbols from that class rather than something global or in another one?
13:15 RabidGravy oh that's not part of nativecall I made it for this because of the funny way the soundtouch uses namespace to avoid ugly class names
13:16 Ulti oh so its normally just symbol
13:16 RabidGravy it's just an enhanced 'symbol' trait that knows about CPP namespaces
13:16 Ulti hmm the multi sub trait_mod is a tricky thing to notice the relationship between the trait name
13:18 Ulti yup got it
13:18 Ulti 13:16 < RabidGravy> it's just an enhanced 'symbol' trait that knows about CPP namespaces
13:18 Ulti oops
13:18 Ulti multi sub trait_mod:<is> ( Routine $r, Str :$cpp-symbol!)  <--- not so obvious cpp-symbol is the important thing to relate to the rest of the code
13:19 Ulti guess thats where macros come in :)
13:26 RabidGravy to be honest my brain would scan for trait definitions differently
13:27 RabidGravy looking for the definition of an is trait -> find " sub trait_mod:<is>" -> find the one with the second named argument the trait in question
13:31 vendethiel joined #perl6
13:33 Ulti thats because you know how traits are defined already
13:33 Ulti anything is intuitive if you already know how to do it :P
13:35 RabidGravy well that would be either a fault with the documentation or hubris on your part ;-p
13:41 Ulti I'd go with the hubris
13:41 Ulti also chatting direct with the author and then reading the code was enough to learn :P which is my preference to documentation
13:41 Ulti sure I stole some of your time, but I'll pay it forwards promise
13:42 RabidGravy :)  You could write a digest authentication thingy
13:42 dvinciguerra joined #perl6
13:43 RabidGravy there are loads of things that I surprised that people haven't made
13:43 RabidGravy or they have made perhaps and kept secret
13:44 Ulti in Perl 6 land or more generally
13:44 RabidGravy in perl 6
13:45 Ulti might be its not so obvious how to get things into the ecosystem, I'll check the docs ;P
13:45 mst "but but but why didn't some already write this?" is one of the best motivators for writing stuff, I find
13:45 Ulti or checking stack overflow for a complete implementation that no one bothered to put anywhere else
13:45 skids .oO(or they made it and it broke and they haven't gotten to fix it)
13:47 RabidGravy mst, that's how I ended making 7% of the ecosystem
13:47 RabidGravy (and afaik they all still work :)
13:49 Ulti I find I rarely need stuff outside of core, which is fairly incredible.. I think perhaps a lot of people dont realise quite how much comes baked in when looking at the ecosystem
13:52 DrForr It's a huge core, stuffing all of that in your head takes effort.
13:52 Ulti yup
13:53 pmurias RabidGravy: hopefully you don't unpublish them just to cause chaos ;)
13:53 andreoss m: class Foo[::E] { }
13:53 camelia rakudo-moar f220a5: OUTPUT«5===SORRY!5=== Error while compiling /tmp/xxbG5yWg1O␤Unable to parse class definition␤at /tmp/xxbG5yWg1O:1␤------> 3class Foo7⏏5[::E] { }␤    expecting any of:␤        generic role␤»
13:53 andreoss m: role Foo[::E] { }
13:53 camelia rakudo-moar f220a5: ( no output )
13:54 skids classes cannot be paramaterized (except through MOP black magic)
13:54 andreoss why there's no generic classes only roles?
13:54 gflohr1 Is there something like a forward declaration for a type? http://hastebin.com/ejawesejuc.rb
13:54 skids I don't know the answer to "why" though.
13:55 mst andreoss: surely you just do 'class with <parameterized role>'
13:55 skids gflohr1: Yes, a yada stub.
13:55 mst andreoss: a class is generally expected to be something you can and do instantiate
13:56 gflohr1 skids: what is a yada stub?
13:56 andreoss but i can instantiate roles too?
13:56 skids m: class C {...}; class D { has C $.d; }; class C { };
13:56 camelia rakudo-moar f220a5: ( no output )
13:56 andreoss m: role Foo[::E] ; my $x = Foo[Str].new; say $x.perl
13:56 camelia rakudo-moar f220a5: OUTPUT«5===SORRY!5=== Error while compiling /tmp/AAiqHC4zpV␤Semicolon form of 'role' without 'unit' is illegal.  You probably want to use 'unit role'␤at /tmp/AAiqHC4zpV:1␤------> 3role Foo[::E] ;7⏏5 my $x = Foo[Str].new; say $x.perl␤»
13:56 andreoss m: role Foo[::E] { }; my $x = Foo[Str].new; say $x.perl
13:56 camelia rakudo-moar f220a5: OUTPUT«Foo[Str].new␤»
13:57 skids properly said you pun the role to a class and instantiate that.
13:57 andreoss what can classes do that roles don't?
13:57 mst andreoss: yeah, that's basically doing exactly what I said
13:57 RabidGravy pmurias, nah.  MInd you I'm not convinced anyone actually uses them
13:57 mst andreoss: it turns it into a class and instantiates that
13:58 gflohr1 skids: is there a working example for that? I get a "Redeclaration of symbol …"
13:58 mst andreoss: roles can't be instantiated, that doesn't make any sense
13:58 andreoss mst: it looks like they can
13:58 skids gflohr1: more working than the one that worked above?
13:58 andreoss especially when i .new on them
13:58 RabidGravy gflohr1, the '...' there is important
13:58 mst andreoss:  skids> properly said you pun the role to a class and instantiate that.
13:59 skids The ... is the "yada"
13:59 mst andreoss: so, no, it doesn't, and you were already told what was happening instead :)
13:59 andreoss >you pun
13:59 andreoss not me, perl
13:59 skids Of note is that you are punning exactly Foo[Str] not Foo[whatever you want here].
13:59 gflohr1 skids: thanks, got it now
14:00 andreoss skids: Foo[Str] would be the class then?
14:00 RabidGravy Thing of it as doing " (class {} but Foo[Str]).new"
14:00 skids yes.
14:02 mst almost like what I said in the first place :)
14:02 skids As to what roles can do that classes cannot: they can stub interfaces and be incomplete.
14:02 andreoss m: role Z[::E] { } Z[Str].WHAT.say
14:02 camelia rakudo-moar f220a5: OUTPUT«5===SORRY!5=== Error while compiling /tmp/rBUj48N2YO␤Missing infix inside S␤at /tmp/rBUj48N2YO:1␤------> 3role Z[::E] { } Z[S7⏏5tr].WHAT.say␤    expecting any of:␤        bracketed infix␤        infix␤        infix stopper␤»
14:02 andreoss m: role Z[::E] { } ; Z[Str].WHAT.say
14:02 camelia rakudo-moar f220a5: OUTPUT«Method 'shortname' not found for invocant of class 'Perl6::Metamodel::CurriedRoleHOW'␤  in block <unit> at /tmp/bB1ASui4oZ line 1␤␤»
14:03 skids m: role Z[::E] { } ; Z[Str].new.WHAT.say
14:03 camelia rakudo-moar f220a5: OUTPUT«(Z[Str])␤»
14:03 andreoss m: role Z[::E] { } ; (class :: does Z[Str]).WHAT.say
14:03 camelia rakudo-moar f220a5: OUTPUT«5===SORRY!5=== Error while compiling /tmp/1E7vPXzYZe␤Unable to parse class definition␤at /tmp/1E7vPXzYZe:1␤------> 3role Z[::E] { } ; (class :: does Z[Str]7⏏5).WHAT.say␤»
14:03 mst hence why roles are not instantiable directly, but perl6 will convert them into an empty class with that role if it can
14:03 andreoss m: role Z[::E] { } ; (class :: does Z[Str] { }).WHAT.say
14:03 camelia rakudo-moar f220a5: OUTPUT«(<anon|79295984>)␤»
14:04 andreoss m: class Z { } ; Z.WHAT.say
14:04 camelia rakudo-moar f220a5: OUTPUT«(Z)␤»
14:04 jameslenz joined #perl6
14:04 skids m: role Z[::E] { } ; Z[Str].^pun.WHAT.say
14:04 camelia rakudo-moar f220a5: OUTPUT«(Z[Str])␤»
14:05 skids m: role Z[::E] { } ; Z[Str].^pun.HOW.WHAT.say
14:05 camelia rakudo-moar f220a5: OUTPUT«(ClassHOW)␤»
14:05 skids m: role Z[::E] { } ; Z[Str].HOW.WHAT.say
14:05 camelia rakudo-moar f220a5: OUTPUT«(CurriedRoleHOW)␤»
14:05 RabidGravy what larks
14:08 andreoss so if i need a parametric class, i use role instead
14:08 mullagain joined #perl6
14:09 RabidGravy yes
14:09 andreoss and i could use roles everywhere instead of classes
14:09 mst just like if you thought you wanted an abstract base class, you should use a role instead
14:09 gflohr1 skids: But my classes are defined in different files.  When I put the stub into the parent, I get an "insufficiently type-like", when the stub is in the child, I get "the following packages were stubbed but not defined".
14:09 mst er, no, you're still using classes, as we've explained
14:09 mst you're just letting perl6 auto-create a class that consumes the role for you
14:09 mst rather than doing so explicitly
14:10 RabidGravy gflohr1, correct.  It only works in the same file
14:10 skids Though NativeCall and a few other spots use deep MOP magic to have paremeterized types for some (probably-REPR-related) reason.
14:12 skids gflohr1: A pattern that relieves that is to use a role that defines an interface in a third file, and only restrict types to things that "do" that role.
14:12 gflohr1 skids, RabidGravy: thanks! The role should do the job.
14:13 RabidGravy yeah, someone ought to write something up about that as it keeps coming up
14:15 andreoss `method foo(A:B:)` what is the name of this notation in signature?
14:18 moritz andreoss: the trailing : is the invocant marker
14:18 moritz and the :D or :U is a type smiley
14:18 moritz (at least that's what I call it)
14:20 skids I think that name has pretty much stuck at this point.
14:24 wtw joined #perl6
14:26 pmurias jnthn: a QAST::Var with a scope of typevar is allowed to have a compile time value?
14:28 SmokeMachine____ m: say Int ~~ Int:U
14:28 camelia rakudo-moar f220a5: OUTPUT«True␤»
14:28 pmurias jnthn: it's set on $?CLASS and from reading the code it only seems like it's used for the hint
14:29 jnthn pmurias: iirc, it behaves entirely like lexical in everything other than saying that the implementation is allowed to assume that for a given type of the first argument it will always resolve to the same thing
14:29 RabidGravy m: (proto sub (|) foo { * }; ); # Hmmm
14:29 camelia rakudo-moar f220a5: OUTPUT«===SORRY!===␤Cannot find method 'Str'␤»
14:29 SmokeMachine____ m: say Int:D ~~ Int:U
14:29 camelia rakudo-moar f220a5: OUTPUT«True␤»
14:29 jnthn pmurias: If you don't have use for that information you can compile it just like lexical
14:29 jnthn pmurias: On Moar we emit a different lookup instruction
14:30 SmokeMachine____ m: say Int:U.isa(Int)
14:30 camelia rakudo-moar f220a5: OUTPUT«Too many positionals passed; expected 2 arguments but got 3␤  in block <unit> at /tmp/KHfP4p0il3 line 1␤␤»
14:30 wtw joined #perl6
14:30 jnthn pmurias: We actually don't interpret it any differently from a normal lexical lookup, but spesh will use it if it specializes on the first argument.
14:31 jnthn It means that when producing specialized versions of code inside of roles, it can specialize attribute access and method dispatch
14:31 jnthn Hm, it could get dispatch anyway I guess. But not attr access :)
14:35 cdg joined #perl6
14:35 Actualeyes joined #perl6
14:37 MadcapJake is there a way to do a subset of a sub with a certain signature?
14:39 moritz m: subset Intish of Code where { .signature ~~ :(Int --> Int) }; say sub (Int --> Int) {} ~~ Intish; say sub (){} ~~ Intish
14:39 camelia rakudo-moar f220a5: OUTPUT«True␤Cannot call 'shift' on an immutable 'List'␤  in block <unit> at /tmp/1EtshWMyzC line 1␤␤»
14:40 moritz looks like a bug to me
14:40 moritz presumably in the signature smart-matchin code
14:40 RabidGravy I think I reported that one a while back
14:42 MadcapJake m: subset BinInt of Sub where *.signature ~~ :(Int, Int --> Int); sub adder(Int $a, Int $b) { $a + $b }; say &adder ~~ BinInt;
14:42 camelia rakudo-moar f220a5: OUTPUT«False␤»
14:42 masak m: say :($foo) ~~ :($foo)
14:42 camelia rakudo-moar f220a5: OUTPUT«True␤»
14:43 masak m: sub x($foo) {}; say &x.signature ~~ :($foo)
14:43 camelia rakudo-moar f220a5: OUTPUT«True␤»
14:43 MadcapJake why is that false?
14:43 masak MadcapJake: because `adder` doesn't declare a return type?
14:43 MadcapJake I tried that too, same False
14:44 MadcapJake m: subset BinInt of Sub where *.signature ~~ :(Int, Int --> Int); sub adder(Int $a, Int $b) returns Int { $a + $b }; say &adder ~~ BinInt;
14:44 camelia rakudo-moar f220a5: OUTPUT«False␤»
14:44 RabidGravy I've got a workaround for testing a signature against a possible empty one in some module
14:45 RabidGravy oh yes, " subset ValidateCallback of Callable where { $_.signature.params && $_.signature ~~ :(Object --> Bool) };"
14:46 RabidGravy https://github.com/jonathanstowe/T​inky/blob/master/lib/Tinky.pm#L758
14:48 skids m: subset BinInt of Sub where { *.signature ~~ :(Int, Int --> Int) }; sub adder(Int $a, Int $b) returns Int { $a + $b }; say &adder ~~ BinInt;
14:48 camelia rakudo-moar f220a5: OUTPUT«False␤»
14:48 skids m: subset BinInt of Sub where { $_.signature ~~ :(Int, Int --> Int) }; sub adder(Int $a, Int $b) returns Int { $a + $b }; say &adder ~~ BinInt;
14:48 camelia rakudo-moar f220a5: OUTPUT«True␤»
14:49 MadcapJake oh so its the WhateverStar that doesn't work here
14:49 RabidGravy yeah
14:49 skids Or some precedence thing.
14:50 MadcapJake cool! That's pretty sweet that subset can work on function signatures!
14:51 bjz_ joined #perl6
14:53 sno joined #perl6
14:55 MadcapJake is there any way to indicate in a signature that a sub returns nothing (aka void)
14:55 jnthn --> Nil
14:56 MadcapJake cool!
14:59 Juerd No, not --> Cool :P
14:59 vendethiel joined #perl6
15:00 * moritz want's a Whenever star
15:00 Juerd What does that mean?
15:00 moritz just like a Whatever star, only temporal :-)
15:00 cdg_ joined #perl6
15:00 Juerd whenever * { ... }
15:01 jnthn oh man, what on earth would that mean... :P
15:01 moritz whenever you feel like, execute this for me, will you? :-)
15:01 moritz like, an idle ticker
15:02 Juerd jnthn: Currently it seems to mean "do this now" :)
15:02 Juerd Once
15:02 jnthn m: (*).Supply.tap(&say)
15:02 camelia rakudo-moar f220a5: ( no output )
15:02 keix joined #perl6
15:03 jnthn m: my $x = *; $x.Supply.tap(&say)
15:03 camelia rakudo-moar f220a5: OUTPUT«*␤»
15:03 jnthn hah :)
15:03 jnthn 'cus any item turned into a Supply will make a 1-item supply... :)
15:05 skids m:  my $x = *; $x.Supply.tap(*.say) # might as well pile it on :-)
15:05 camelia rakudo-moar f220a5: OUTPUT«*␤»
15:12 MadcapJake how can I get whether I'm on linux or windows? $*DISTRO prints "ubuntu ..."
15:13 mst it is extremely useful to be able to do the equivalent of 'execute this for me in a minute'
15:13 mst in single threaded stuff, 'handle all currently outstanding I/O events then call this after'
15:13 MadcapJake oh $*KERNEL, what will $*KERNEL print for Windows?
15:15 jnthn m: say $*KERNEL.is-win
15:15 camelia rakudo-moar f220a5: OUTPUT«Method 'is-win' not found for invocant of class 'Kernel'␤  in block <unit> at /tmp/WihUCmuA8s line 1␤␤»
15:15 jnthn m: say $*DISTRO.is-win
15:15 camelia rakudo-moar f220a5: OUTPUT«False␤»
15:15 jnthn There's that
15:15 labster joined #perl6
15:15 masak m: class Whenever {}; sub term:<★>() { Whenever.new }; say ★; # moritz: here you go
15:15 camelia rakudo-moar f220a5: OUTPUT«Whenever.new␤»
15:15 MadcapJake oh ok that'll do, thanks!
15:15 jnthn $*KERNEL.name says win32 on Windows though
15:16 jnthn Even when it's 64 bit :)
15:16 MadcapJake strange, why is that?
15:16 jnthn History or something :)
15:17 jnthn I suspect 'cus it's really a reference to the API though
15:17 abaugher joined #perl6
15:17 * masak .oO( seems to be the kind of history that repeats itself, probably because we don't know it well enough )
15:19 mohae joined #perl6
15:22 nowan joined #perl6
15:30 gflohr1 how do I check whether an instance does a certain role? $instance.does($role-name) does not seem to work.
15:31 gflohr1 Found it, while typing the question. ;) I have to pass the type object. Logical.
15:33 jnthn Can also smart-match: $instance ~~ Role
15:34 gflohr1 good to know
15:38 ptolemarch joined #perl6
15:39 virtualsue_ joined #perl6
15:40 masak frustration: when the test frameworks outputs 'got' and 'expected' values, and they're *exactly the same*
15:40 masak framework*
15:42 kid51 joined #perl6
15:44 masak ah. except for a single space. that was hard to see.
15:44 * masak ponders some sort of diffing
16:01 arnsholt My first port of call in those cases is vimdiff
16:01 arnsholt The plain diff tool can probably be made to highlight only the differences too, not just changed lines
16:01 arnsholt But those are super-annoying, yeah
16:11 kurahaupo joined #perl6
16:13 rudi_s What is the difference between sub foo() is native(...) { * } and without the *, it seems to work fine without the * as well.
16:14 dvinciguerra joined #perl6
16:17 masak arnsholt: thanks for the tip.
16:17 masak arnsholt: I think I want it as part of my test results.
16:17 FROGGS rudi_s: the * indicates that "somebody else is doing the work for this sub", like in a proto
16:18 timotimo right, diff has a "--word-diff" flag, or at least a mode that is called that
16:18 timotimo well, git diff does anyway
16:18 rudi_s FROGGS: But it works without it too?
16:18 FROGGS rudi_s: yes
16:18 timotimo and git diff, of course, has the --no-index flag to use it on regular files
16:18 FROGGS rudi_s: in fact, you can put anything in the sub body and it will work I guess...
16:18 jnthn rudi_s: It's just convention/documentation
16:18 rudi_s FROGGS: Ok. But it's still recommended to use the *?
16:18 FROGGS rudi_s: it wont reach that code
16:18 FROGGS rudi_s: aye
16:19 rudi_s Ok. Then I'll fix the example in the docs.
16:19 FROGGS rudi_s++
16:20 rudi_s I think I asked this already, but why exactly is there not "native_int" type in NativeCall? It feels problematic to call a C function foo(int) as foo(int32).
16:21 jnthn It's called cint, no?
16:21 jnthn m: use NativeCall; say cint
16:21 camelia rakudo-moar f220a5: OUTPUT«5===SORRY!5=== Error while compiling /tmp/oJDeXMve2U␤Undeclared routine:␤    cint used at line 1␤␤»
16:21 jnthn m: use NativeCall :types; say cint
16:21 camelia rakudo-moar f220a5: OUTPUT«5===SORRY!5=== Error while compiling /tmp/3_ryPzrhFn␤Undeclared routine:␤    cint used at line 1␤␤»
16:21 jnthn m: use NativeCall :types; say ::MY.keys
16:21 camelia rakudo-moar f220a5: OUTPUT«()␤»
16:21 jnthn m: use NativeCall :types; say ::MY
16:21 camelia rakudo-moar f220a5: OUTPUT«(MY)␤»
16:22 jnthn m: use NativeCall :types; say ::MY::.keys
16:22 camelia rakudo-moar f220a5: OUTPUT«(Pointer ulonglong $=pod CArray bool !UNIT_MARKER void ulong EXPORT $_ $! &postcircumfix:<[ ]> long ::?PACKAGE GLOBALish $¢ OpaquePointer size_t $=finish longlong $/ $?PACKAGE)␤»
16:22 jnthn hm
16:22 FROGGS rudi_s: use int32
16:22 rudi_s I haven't looked at the code, just the documentation and there int32 is explicitly mentioned to be used for int.
16:22 rudi_s Well, it's not the same.
16:22 jnthn Technically.
16:22 FROGGS rudi_s: do you know of any arch that has a 16bit int?
16:22 rudi_s Architectures can use a 2 byte int for exampple.
16:22 jnthn Pragmatically though... :)
16:23 * masak .oO( Designing for Fantasy Architectures )
16:23 rudi_s Yes, micro controllers do, for example atmels.
16:24 jnthn Right, and the chances of us running on those is...? :)
16:24 timotimo oh, it'd be amazing if we ever get to run on such a small thing as an atmel
16:24 rudi_s (Not sure I'd want to use perl6 on them, but still. Doesn't feel right.)
16:24 masak how much memory does such a microcontroller have avaiable? :)
16:24 timotimo couple of megabytes
16:25 masak yeah, good luck with that
16:25 rudi_s ;-)
16:25 masak that sounds like a small fraction of the setting
16:25 masak or the parser, even
16:25 rudi_s Anyway, another thing. Can somebody explain the explicitly-manage example in the docs to me? I don't see a reason to use explicitly-manage for const char *.
16:26 rudi_s *functions taking.
16:26 rudi_s Isn't this more about the fact, that the function stores the pointer somewhere and will free it later (which conflicts with the const).
16:27 rudi_s Oh, and are unsigned values supported? The examples mix unsigned and signed which also seems problematic.
16:27 timotimo they are supported
16:28 firstdayonthejob joined #perl6
16:32 stmuk_ could nqp run on v low spec h/w if not p6 itself?
16:33 timotimo that'd be much easier at least, but we'd still have stuff like wanting to do filesystem access and stuff via libuv
16:35 rudi_s timotimo: Any docs available?
16:35 rudi_s doc.perl6.org's NativeCall doesn't list it under available types.
16:36 timotimo hm, don't know
16:36 rudi_s Any examples available. Or should I look at the code?
16:36 sue joined #perl6
16:37 timotimo perl6 itself supports unsigned native and non-native unsigned ints, too
16:37 timotimo and nativecall attempts to support it as good as it can
16:38 vendethiel joined #perl6
16:46 Upasaka joined #perl6
16:52 rurban joined #perl6
16:53 rurban left #perl6
16:54 sue joined #perl6
17:05 khw joined #perl6
17:08 jack_rabbit joined #perl6
17:14 buharin joined #perl6
17:16 MadcapJake rudi_s: I think explicitly-manage has to do with the fact that const means "this function will not be doing anything but reading the string" and thus we want to make sure that it's not inadvertently freed after the function is called
17:17 MadcapJake anyone know if my assumption is right? :P
17:18 wtw joined #perl6
17:19 rudi_s MadcapJake: But a function like strcmp() is also const char * and I see no reason to do anything special with the string. After it was used by the function in be freed.
17:20 rudi_s s/in be/it can be/
17:22 arnsholt explicitly-manage is to handle the case where the C-level string needs to be freed at some later point than after the C function it is passed to returns
17:22 MadcapJake then in that case, maybe you don't need to explicitly-manage it, but what if you intend to do something else with that string?
17:22 arnsholt So strcmp doesn't need it
17:23 arnsholt It originally came up with one of the DBD drivers (Postgres?) where you bind values when executing one by one through function calls, but the C strings need to remain alive until after the *execute* has returned
17:23 arnsholt It's also a horrible, horrible hack, and should probably not be used unless you have it in legacy code
17:24 MadcapJake explicitly-manage is?
17:24 arnsholt The correct solution would be to decode the string into a CArray
17:25 rudi_s Maybe we should remove it from the docs then or at least make it less visible (and not talk about const char *).
17:25 MadcapJake explicitly-manage is listed in the docs as "if you get const char *, then you need to use this)
17:25 * MadcapJake doesn't know why he started with a double quote and ended with a parenthesis :P
17:25 andreoss joined #perl6
17:26 rudi_s MadcapJake: Yes. Which is incorrect (or at least confusing).
17:26 arnsholt I'm not sure why it talks about const there. It's about lifetime, not constness
17:26 rudi_s Yeah.
17:26 RabidGravy the const char * thing could be somewhat of a red herring, it's used both ways surely
17:27 MadcapJake I think it's because const on an argument means the function isn't going to mess with it
17:27 arnsholt Of course, if the C code modifies the buffer you're gonna have *terrible* time, since the Perl string will be unchanged, while the C buffer has something else in it
17:28 MadcapJake arnsholt: doesn't const specifically guard against that kind of thing?
17:30 orion7273 joined #perl6
17:30 arnsholt Yeah, so Str should only be used for const arguments in NativeCall
17:30 rudi_s arnsholt: Could you provide a minimal example how to decode the string into a CArray with a correct lifetime?
17:31 arnsholt Well, then it's simply a question of keeping the reference to your CArray alive until it can be freed
17:31 arnsholt I think there's a library with helpers that can do the decoding directly from Str to CArray. NativeHelpers::Buf?
17:31 arnsholt 'Sec
17:33 arnsholt NativeHelpers::Blob
17:33 arnsholt And it only does the copying of Blobs
17:33 arnsholt So first you Str.decode which can then be passed to NativeHelpers::Blob's functions to get a CArray
17:33 arnsholt https://github.com/salortiz/NativeHelpers-Blob
17:34 RabidGravy but in the general case it boils down to  CArray[uint8].new($str.encode.list)
17:40 perturbation joined #perl6
17:41 rudi_s arnsholt: How can I guarantee that the reference isn't freed?
17:43 arnsholt Stick it in a variable that doesn't go out of scope until the last function needing it to be alive has been called
17:43 arnsholt (And don't overwrite it with something else, obv.)
17:46 cognominal joined #perl6
17:46 ChristopherBotto joined #perl6
17:47 ChristopherBotto joined #perl6
17:50 gflohr joined #perl6
17:52 colomon joined #perl6
17:56 nadim joined #perl6
17:58 rudi_s arnsholt: Untested patch: https://pbot.rmdir.de/t9yIXNEHK8mtJ3QO5xxfSA <- what do you think?
17:59 arnsholt Looks good!
18:00 MadcapJake is there a way to do an #if directive style thing in Perl 6? I need some top-level things per OS
18:00 [Coke] use if.
18:01 timotimo [Coke]: i think the problem about that is having curlies introduces an extra lexical scope
18:01 ChristopherBotto I didn't find a test in roast for symlink. Is is correctly implemented as symlink($new, $original) as mentioned at https://doc.perl6.org/routine/symlink or is it supposed to be symlink($original,$new) as suggested by https://doc.perl6.org/lang​uage/5to6-perlfunc#symlink ?
18:01 timotimo oh, you mean the module "if" :)
18:01 [Coke] no, I just meant if
18:01 timotimo oh, ok
18:01 timotimo well, you can use "use if" if you don't want to have curlies
18:03 MadcapJake so two questions then, (1) can I use an if to introduce special OS-specific class attributes? and (2) will classes pass down into the top-levle scope from an if's scope?
18:05 rudi_s arnsholt: Looks like I need to use "sub set_foo(CArray[uint8]) is native('./foo') { * }" <- is the Carray[uint8] part correct?
18:07 MadcapJake m: if $*DISTRO.is-win { class Foo { has $.a = 12 } }; my Foo $f .= new; say $f.a; # why is this class passing into the outer scope?
18:07 camelia rakudo-moar f220a5: OUTPUT«12␤»
18:08 timotimo could this "abizy.com" thing go die in a fire? :\
18:08 timotimo classes always do that
18:08 timotimo for classes you'd need "my class foo" to get the opposite
18:08 MadcapJake so I can't use a conditional to introduce OS-specific classes?
18:08 MadcapJake but then it will be stuck in the scope!
18:09 timotimo then just return it from teh scope :)
18:09 MadcapJake how do you mean?
18:09 domidumont joined #perl6
18:09 timotimo m: constant Foo := do if $*DISTRO.is-win { my class Foo { has $.a = 12 } } else { my class Foo { has $.a = 99 } }; say Foo.new()
18:09 camelia rakudo-moar f220a5: OUTPUT«Foo.new(a => 99)␤»
18:09 dalek doc: da14965 | (Simon Ruderich)++ | doc/Language/5to6-perlfunc.pod:
18:09 dalek doc: 5to6-perlfunc: fix typo
18:09 dalek doc: review: https://github.com/perl6/doc/commit/da14965263
18:09 dalek doc: 2daee8b | (Simon Ruderich)++ | doc/Language/operators.pod:
18:09 dalek doc: operators: fix typo in comment
18:09 dalek doc: review: https://github.com/perl6/doc/commit/2daee8bb16
18:09 dalek doc: 52daa5d | (Simon Ruderich)++ | doc/Language/nativecall.pod:
18:09 dalek doc: nativecall: replace explicitly-manage hack with better example
18:09 dalek doc: review: https://github.com/perl6/doc/commit/52daa5d47a
18:10 MadcapJake so you have to set it to a constant
18:10 timotimo yeah, it really should be compile-time evaluated
18:10 timotimo otherwise you can't use it for most things you'd want to use a class for
18:10 timotimo like type constraints
18:11 MadcapJake right that's specifically what I'm looking for
18:11 MadcapJake so do you mean it won't be compile-time evaluated?
18:11 timotimo what won't be?
18:12 MadcapJake you mean the constant declarator will mean it is compile-time evaluated?
18:12 timotimo that's right
18:12 MadcapJake ok gotcha
18:12 timotimo the RHS of a constant's = is CTE'd
18:13 MadcapJake is constant in the docs anywhere?
18:14 MadcapJake oh it's in language/terms
18:14 gflohr joined #perl6
18:15 timotimo we really don't seem to have any mention of unsigned ints and stuff in doc.p6.org
18:15 * MadcapJake wishes there was a way to do something similar to C/C++ #if constructs
18:16 Begi joined #perl6
18:16 timotimo you can do things in your custom BUILD.pl or whatever
18:16 MadcapJake true, I could also place stuff in a module and then use that if module, that would work right?
18:17 timotimo yeah
18:19 ChristopherBotto m: shell("touch junk.txt"); symlink("junk2.txt","junk.txt");
18:19 camelia rakudo-moar f220a5: OUTPUT«shell is disallowed in restricted setting␤  in sub restricted at src/RESTRICTED.setting line 1␤  in sub shell at src/RESTRICTED.setting line 15␤  in block <unit> at /tmp/BWKBNsjAHB line 1␤␤»
18:20 vendethiel joined #perl6
18:23 ChristopherBotto m: run('touch','junk.txt"); symlink('junk2.txt','junk.txt');
18:23 camelia rakudo-moar f220a5: OUTPUT«5===SORRY!5=== Error while compiling /tmp/5YTIP4GeeE␤Unable to parse expression in argument list; couldn't find final ')' ␤at /tmp/5YTIP4GeeE:1␤------> 3run('touch','junk.txt"); symlink('7⏏5junk2.txt','junk.txt');␤    expecting any of:␤…»
18:24 ChristopherBotto m: run('touch','junk.txt'); symlink('junk2.txt','junk.txt');
18:24 camelia rakudo-moar f220a5: OUTPUT«run is disallowed in restricted setting␤  in sub restricted at src/RESTRICTED.setting line 1␤  in sub run at src/RESTRICTED.setting line 14␤  in block <unit> at /tmp/l5jDlwI6yC line 1␤␤»
18:24 timotimo camelia won't let you do stuff with the FS so easily
18:24 MadcapJake m: class Boz { has $.a = 1; if $*DISTRO.is-win { has $.b = 2 } else { has $.c = 2 } }; my Boz $b .= new; say $b; # so I can't use conditional for class attributes either :(
18:24 camelia rakudo-moar f220a5: OUTPUT«Boz.new(a => 1, b => 2, c => 2)␤»
18:24 MadcapJake could I put that conditional inside the BUILD submethod?
18:24 timotimo touch junk.txt; perl6 -e 'symlink "junk2.txt", "junk.txt"'; ls -lisah junk*
18:25 timotimo => 8646806 4.0K lrwxrwxrwx. 1 timo timo 8 Mar 25 19:24 junk2.txt -> junk.txt
18:25 timotimo 8646791    0 -rw-r--r--. 1 timo timo 0 Mar 25 19:24 junk.txt
18:25 bloop joined #perl6
18:25 timotimo MadcapJake: you can create the class with the MOP
18:25 bloop hi
18:25 itaipu joined #perl6
18:25 bloop is anyone alive?
18:25 timotimo hello bloop!
18:26 timotimo we're mostly managing the staying alive thing
18:26 MadcapJake Guest58846: nope, I'm undead
18:26 MadcapJake timotimo: how do you do that?
18:26 timotimo i dunno, it comes naturally to me to eat, breathe, and drink
18:26 MadcapJake don't forget sleep!
18:27 RabidGravy MadcapJake, if you want to do something like that at runtime consider a role
18:27 ChristopherBotto timotimo: thanks
18:27 RabidGravy or roles
18:27 Guest58846 who needs sleep when we have perl?
18:27 timotimo you can't apply roles to a type object, though
18:27 timotimo like, after the class has been composed, i mean
18:27 MadcapJake RabidGravy: you can conditionally apply a role? do you mean with but/does?
18:27 timotimo what you can of course do is write a slang that'll let you write #?if windows or somethinglike that
18:28 RabidGravy timotimo, can't you?
18:28 timotimo m: class Test { }; role Test2 { }; Test does Test2
18:28 camelia rakudo-moar f220a5: OUTPUT«Cannot use 'does' operator with a type object.␤  in block <unit> at /tmp/_JIzAZcfcL line 1␤␤»
18:28 timotimo m: use MONKEY-TYPING; class Test { }; role Test2 { }; augment Test { also does Test2 }
18:28 camelia rakudo-moar f220a5: OUTPUT«5===SORRY!5=== Error while compiling /tmp/YSw0de87l_␤Malformed augment␤at /tmp/YSw0de87l_:1␤------> 3s Test { }; role Test2 { }; augment Test7⏏5 { also does Test2 }␤»
18:28 timotimo m: use MONKEY-TYPING; class Test { }; role Test2 { }; augment class Test { also does Test2 }
18:28 camelia rakudo-moar f220a5: ( no output )
18:29 gflohr1 joined #perl6
18:29 timotimo ^- only with monkey typing, but that's not something you can put into an if statement
18:29 RabidGravy m: class Foo {}; say (Foo but role { }).new
18:29 camelia rakudo-moar f220a5: OUTPUT«Foo+{<anon|59662320>}.new␤»
18:29 timotimo that doesn't change the class Foo :)
18:29 timotimo Guest58846: how can we help you today?
18:30 Guest58846 tell me please, for what purpose do you usually use perl?
18:30 RabidGravy writing software
18:31 timotimo i quite enjoy using it to do one-off jobs like bulk renaming, transforming files in-place when i need more than just a little regex
18:31 timotimo also grabbing values, like statistics, out of a random weirdly-formatted file (usually printf debug output)
18:32 Guest58846 RabidGravy: yeah, but what type of software exactly?
18:32 Guest58846 cool
18:32 timotimo exploratory programming is fun with perl6. like, to play with new concepts
18:33 Guest58846 seems interesting
18:34 Guest58846 timotimo: which book can you suggest to learn perl from complete zero?
18:34 Guest58846 reading documentation is a bit hard for me
18:34 timotimo there's not a book like that, sadly. not for perl6, at least
18:35 Guest58846 oh :(
18:35 Guest58846 so in which way it's better to get into perl6 for nowice?
18:36 timotimo there's this concept of "baby perl", which i think is about perl being very useful already if you're a beginner
18:36 AlexDaniel joined #perl6
18:36 timotimo like, it's able to grow with you as you learn
18:37 RabidGravy well in the past week or so I've written a midi sequencer, an audio streaming application and management tools for other software
18:38 AlexDaniel Guest58846: perhaps you can try this: https://learnxinyminutes.com/docs/perl6/
18:39 timotimo i don't think that's "from zero"; i expect our guest really hasn't programmed much before
18:41 AlexDaniel m: my @a; @a[0..10] = 5, 6; say @a
18:41 camelia rakudo-moar f220a5: OUTPUT«[5 6 (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu) (Mu)]␤»
18:41 AlexDaniel m: my @a; @a[0..∞] = 5, 6; say @a
18:41 colomon joined #perl6
18:41 camelia rakudo-moar f220a5: OUTPUT«[]␤»
18:41 AlexDaniel this is not right, right?
18:41 spider-mario joined #perl6
18:42 timotimo i'd expect the latter to have 5, 6 in it and no Mu afterwards
18:43 AlexDaniel I'd also accept an error
18:44 cpage_ joined #perl6
18:44 Guest58846 timotimo and AlexDaniel, thank you for answer :)
18:45 timotimo the learnxinyminutes document is nice, the perl6intro is maybe a bit nicer for this use case, but i think both still assume the reader knows a bit of programming
18:48 RabidGravy when I was first taught programming we started with a made up assembler like thing somewhat like MIX
18:48 RabidGravy didn't actually touch a computer for several weeks
18:49 timotimo i don't know what MIX is
18:50 RabidGravy It's a didactic language invented by Knuth
18:51 RabidGravy all the examples in the "Art of Computer Programming" use it
18:52 timotimo oh, interesting
18:52 RabidGravy or did, dunno about the latter two volumes
18:52 timotimo i have yet to actually read those books
18:52 timotimo i have access to them, though
18:53 diakopter MMIX
18:54 timotimo THIS IS THE REMIX!!
18:56 vendethiel joined #perl6
18:58 MadcapJake so what are my options for conditionaly included OS specific class attributes? (Is there anything outside of MONKEY-TYPING?)
18:59 nadim joined #perl6
18:59 timotimo expose methods that just die if the wrong OS is selected?
19:01 timotimo mix in the right role in the constructor to hold the extra attributes?
19:01 RabidGravy that's what I'd do
19:03 MadcapJake So I can mixin a role inside the BUILD method?
19:03 kentnl joined #perl6
19:03 kentnl joined #perl6
19:03 timotimo i'd rather do that in "new"
19:04 timotimo because new returns the thing that'll get used, whereas in BUILD you'll have to use "does" rather than "but"
19:04 timotimo hm, but that complaint is kind of moot
19:04 MadcapJake how would that look?
19:04 MadcapJake method new(...) { return Class does Role }
19:04 timotimo method new(blah) { self.bless(blah) but select_right_role_for_os
19:05 MadcapJake oh but for new and does for BUILD :P
19:05 timotimo yeah
19:11 RabidGravy or if you want totally bonkers it's create a new subclass of your class and add the methods/attributes to it like https://github.com/jonathanstowe/p6-Linux-C​puinfo/blob/master/lib/Linux/Cpuinfo.pm#L94
19:13 papillon joined #perl6
19:16 RabidGravy gosh, that module's nearly a year old
19:17 RabidGravy so will I be able to finish six modules before the 8th of April?  50 seems like a nice round figure
19:23 pmurias RabidGravy: starting beginners with MIX seems like a good way to weed out the less determined
19:26 timotimo bah, subclasses ;)
19:30 vendethiel joined #perl6
19:30 kid51 joined #perl6
19:56 RabidGravy But hey I've just worked out why my gdbm binding segfaults
20:05 RabidGravy But how to actually do what is required eludes me at the moment
20:10 RabidGravy that is it passes a struct "flat" and not as a pointer
20:11 labster joined #perl6
20:13 yqt joined #perl6
20:13 geekosaur you'll need a C wrapper
20:14 geekosaur interafces based on the original BSD -ldbm interface pass structs around directly; NativeCall doesn't support that (nor do many other FFIs)
20:19 RabidGravy I already knew all of the above
20:21 RabidGravy can't be bothered to make a wrapper
20:30 TEttinger joined #perl6
20:32 kjs_ joined #perl6
20:32 geekosaur I think trying to fake it is going to get into a rat's nest of nonportability
20:34 RabidGravy yeah, I think it's set it aside for another few months until I have the motivation
20:37 RabidGravy people keep thinking they want it, but nowadays I'd probably just use an sqlite db with a very simple schema ;-)
20:38 geekosaur it's still useful, mostly for interfacing with existing (old) stuff
20:39 cdg joined #perl6
20:39 geekosaur (of course, being an (ex-) database type, I'd sooner reach for sqlite anyway >.> )
20:40 * masak likes ex-databases too! :P
20:41 RabidGravy it is actually quite amazing how many things still use dbm style things
20:42 masak they make up a very wide sweet spot
20:50 jameslenz joined #perl6
20:55 skids m: multi sub f(4) { "four!" }; multi sub f(UInt:D $a) { "UInt" }; my UInt $a = 3; $a.say; f($a).say;
20:55 camelia rakudo-moar 81558b: OUTPUT«3␤Invocant requires an instance of type Int, but a type object was passed.  Did you forget a .new?␤  in any accepts_type at gen/moar/m-Metamodel.nqp line 3426␤  in block <unit> at /tmp/3FKxys2AT0 line 1␤␤»
20:55 skids m: multi sub f(UInt:D $a) { "UInt" }; my UInt $a = 3; $a.say; f($a).say;
20:55 camelia rakudo-moar 81558b: OUTPUT«3␤UInt␤»
20:56 musiKk_ joined #perl6
20:58 gtodd joined #perl6
20:58 kjs_ joined #perl6
20:59 gtodd is there a way to slide along a string or a list with returning a "window" of chars or items in perl6?
21:00 gtodd I mean in the "base" without adding List::Util ?
21:00 teatime you can iterate over N items at a time
21:00 RabidGravy rotor
21:00 gtodd oh right
21:01 teatime like doesn't `for @list -> $a, $b, $c {}` take items 3 at a time from th elist
21:01 gtodd ok so the window function from the module is not needed to make life simple .
21:01 RabidGravy my @a = 1 .. 20;   for @a.rotor(3) -> $a { say $a }
21:01 RabidGravy m: my @a = 1 .. 20;   for @a.rotor(3) -> $a { say $a }
21:01 camelia rakudo-moar 81558b: OUTPUT«(1 2 3)␤(4 5 6)␤(7 8 9)␤(10 11 12)␤(13 14 15)␤(16 17 18)␤»
21:02 RabidGravy teatime yes, you can do that as well
21:02 ilmari m: my @a = 1 .. 12;   for @a.rotor(3 => -2) -> $a { say $a }
21:02 camelia rakudo-moar 81558b: OUTPUT«(1 2 3)␤(2 3 4)␤(3 4 5)␤(4 5 6)␤(5 6 7)␤(6 7 8)␤(7 8 9)␤(8 9 10)␤(9 10 11)␤(10 11 12)␤»
21:02 ilmari for sliding window
21:02 gtodd rotor is an odd name :-)
21:02 gtodd slide is better :-D
21:02 gtodd only because I'm used to outboard motors heheh
21:03 gtodd thanks
21:03 RabidGravy please feel free to invent a time machine and implement it with the name you would like ;-)
21:03 teatime I have had more fun playing with perl6 than I have had in years.
21:04 teatime perl syntax has always felt natural and accessible to me.  I guess I have whatever disease causes that.
21:04 gtodd ilmari: the 3 => -2 "grabs 3 and slides it back 2"
21:05 ilmari gtodd: the rhs of the pair is the gap between each chunk
21:05 ilmari negative gap means overlap
21:06 * gtodd tried to do it with @array.rotor(5 ,  -4)  ... got error ...
21:06 gtodd NICE ERROR!
21:07 gtodd error message ++
21:08 ilmari arrow and comma are not synonymous in perl6
21:08 RabidGravy m:  say ( f => 1).WHAT;  say (1,2).WHAT
21:08 camelia rakudo-moar 81558b: OUTPUT«(Pair)␤(List)␤»
21:09 ilmari m: say (f => 1, g => 2).WHAT
21:09 camelia rakudo-moar 81558b: OUTPUT«(List)␤»
21:09 ilmari m: say (f => 1, g => 2).WHAT.of
21:09 camelia rakudo-moar 81558b: OUTPUT«(Mu)␤»
21:10 RabidGravy the of isn't formed by inspecting the contents, just from a declaration afaik
21:12 ilmari m: my Pair @a = (f => 1, g => 2); say @a.WHAT.of
21:12 camelia rakudo-moar 81558b: OUTPUT«(Pair)␤»
21:12 * masak .oO( .WHAT.of.it )
21:20 Sgeo__ joined #perl6
21:21 frithnanth joined #perl6
21:24 * AlexDaniel .oO( do we have a bug report for time travel? )
21:25 dvinciguerra joined #perl6
21:27 AlexDaniel m: DateTime.now.travel
21:27 camelia rakudo-moar 81558b: OUTPUT«Method 'travel' not found for invocant of class 'DateTime'␤  in block <unit> at /tmp/URC38NO0bt line 1␤␤»
21:28 * AlexDaniel .oO( this should probably say “Sorry, time travel is NYI” )
21:40 * masak .oO( but will it having had been *being* invented? )
21:40 * masak .oO( Q: What do we want? A: Time travel! Q: When do we want it? A: It... doesn't really matter when )
21:52 teatime "\na\n\n" ~~ token { ^ [ ^^ <[a]>* $$  ]* $ }  <-- hrm, this seems to run forever.
21:59 teatime so does this:  "\na\n\n" ~~ token { [ <[a]>* ['\n'|$] ]+ }
21:59 gtodd m: my $a = "a b c d" ; $a.subst-mutate(/\s/, '', :g); $a.say
21:59 camelia rakudo-moar 81558b: OUTPUT«abcd␤»
22:01 gtodd why doesn't that work with vars assigned from a loop like:  for @arr -> $a {  }
22:01 gtodd are loops variables readonlly?
22:01 gtodd Cannot call subst-mutate(List: Regex, Str, :g); none of these signatures match ... (Cool:D $self is rw: $matcher, $replacement, *%named)
22:02 geekosaur gtodd, -> is read-only
22:02 geekosaur use <-> to get the aliasing version
22:02 gtodd ok hehe well subst-mutate sounds weird :-)  so I'm just going to assign to another var :-P
22:02 gtodd until I get used to it :)
22:03 gtodd ahh wait so it works in the repl because the repl is less strict?
22:03 * gtodd groks
22:06 Timbus i wouldnt thinnk so
22:07 teatime non-mutating version: my @A = ['a b c d', 'x y z']; @A».subst(/\s/, '', :g)
22:07 timotimo oh hey timbus
22:07 Timbus hello
22:07 teatime mutating: my @A = ['a b c d', 'x y z']; @A».subst-mutate(/\s/, '', :g); say @A
22:09 Timbus teatime, matching a zero width regex with a + or * quantifier causes infinite loops, if you didnt know
22:09 Timbus the second one  seems like it would have been safe? hmm
22:10 Timbus oh i guess the $
22:10 Timbus so that would match the end of the string infinitely
22:12 teatime Timbus: oh, duh, that makes sense.
22:12 teatime thank you.
22:18 masak a lot of those zero-width-with-quantifier regex fragments are statically discoverable
22:19 masak but I guess (as usual) there are arguments both for and against actually detecting them at compile time
22:19 wtw joined #perl6
22:20 wtw joined #perl6
22:21 wtw joined #perl6
22:23 Timbus i have trouble triggering the same thing in perl5. im sure it can be done if i get fancy, but something like (.|$)+ is not an issue
22:24 masak that... rings a bell
22:24 masak well, because the other thing you can do is detect those loops and (instead of failing at compile time) just removing them
22:25 labster joined #perl6
22:25 Timbus yeah, i think this conversation has happened a few times in here. maybe we're stuck in a loop
22:25 timotimo Timbus: i'm interested in Net::Irc::Bot getting more stuff, especially getting ported to async sockets and such ... but sadly i'm not interested or needy enough to do it myself :\
22:25 masak $ perl -Mstrict -we'"foo" =~ /f(?:)+oo/'
22:25 masak (?:)+ matches null string many times in regex; marked by <-- HERE in m/f(?:)+ <-- HERE oo/ at -e line 1.
22:25 masak in this particular case, Perl 5 dies at compile time
22:26 Timbus timotimo, i ported it while you weren't looking
22:26 Timbus :P
22:26 timotimo is that true?
22:26 timotimo oh, wait
22:26 Timbus yeah, i just swapped in ::Async
22:26 timotimo does it also handle shooting back data to the irc from an async worker or something?
22:26 Timbus start() just calls start-async() and waits on the promise
22:27 Timbus ah
22:27 Timbus workers aren't async, but you can easily spawn a thread and return things top the socket
22:27 Timbus to* the socket
22:28 Timbus that wording still sucks. let's try again: you can use $e.say from another thread that your event spawned :P
22:28 timotimo OK, that's good
22:35 skids joined #perl6
22:37 ZoffixLappy joined #perl6
22:38 ZoffixLappy Hey. Are all hyper operators potentially use multiple cores or is it only the ».method calls? Like, does this have a potential to be threaded: (1, 2, 3, 4) <<+>> (1, 2)
22:42 timotimo we want to turn those into multi-threaded stuff or vectorized calls
22:43 timotimo potentially operations with hypers could be turned into a OpenCL Compute Shader, too
22:44 ZoffixLappy Is that already planned or are you just thinking aloud?
22:44 * ZoffixLappy points out he is currently at a bar... thinking is hard :P
22:44 mojca joined #perl6
22:45 ZoffixLappy I'm just writing my talk and wanted to know whether I should include stuff like (1, 2, 3, 4) <<+>> (1, 2) in the slide about multi-threaded ops, like the ». method stuff
22:46 RabidGravy I was thinking about fiddling with getting some stuff to run on an FPGA then got distracted about something else
22:48 timotimo nobody has written it yet
22:48 timotimo and our implementation of .hyper and .race is currently a bit b0rked
22:48 ZoffixLappy Alright.
23:00 Begi joined #perl6
23:05 matiaslina joined #perl6
23:09 masak 'night, #perl6
23:13 ZoffixLappy night
23:22 dalek perl6-most-wanted: 585ad05 | Emeric54++ | most-wanted/modules.md:
23:22 dalek perl6-most-wanted: Add a WIP
23:22 dalek perl6-most-wanted: review: https://github.com/perl6/perl6​-most-wanted/commit/585ad0536e
23:22 dalek perl6-most-wanted: cd98fb2 | labster++ | most-wanted/modules.md:
23:22 dalek perl6-most-wanted: Merge pull request #22 from Emeric54/patch-1
23:22 dalek perl6-most-wanted:
23:22 dalek perl6-most-wanted: Add a WIP
23:22 dalek perl6-most-wanted: review: https://github.com/perl6/perl6​-most-wanted/commit/cd98fb2e2e
23:29 dalek doc: 5c1c677 | (Simon Ruderich)++ | doc/Language/nativecall.pod:
23:29 dalek doc: nativecall: clarify C types and add unsigned variants
23:29 dalek doc:
23:29 dalek doc: Also use int32 consistently for C's int and fix getpwuid(3) to take an
23:29 dalek doc: uint32.
23:29 dalek doc: review: https://github.com/perl6/doc/commit/5c1c677481
23:29 dalek doc: 07334fd | (Simon Ruderich)++ | doc/Language/nativecall.pod:
23:29 dalek doc: nativecall: use consistent indentation
23:29 dalek doc: review: https://github.com/perl6/doc/commit/07334fd3d1
23:29 dalek doc: 3d074ed | (Simon Ruderich)++ | doc/Language/nativecall.pod:
23:29 dalek doc: nativecall: consistently use { * } as function body
23:29 dalek doc: review: https://github.com/perl6/doc/commit/3d074ed762
23:29 dalek doc: 6684f95 | (Simon Ruderich)++ | doc/Language/nativecall.pod:
23:29 dalek doc: nativecall: fix typos
23:29 dalek doc: review: https://github.com/perl6/doc/commit/6684f95d30
23:30 wamba joined #perl6
23:31 ZoffixLappy :/ I'm struggling to find a good example that uses ». even though I wrote chains using multiple of them many times :/
23:34 rudi_s ZoffixLappy: What exactly do you need? The "iterate over hash keys in a sorted order" trick in the docs use »
23:35 guest666_ joined #perl6
23:36 ZoffixLappy rudi_s, just trying to find a good example for my talk explaining ». I may have spent the last half hour figuring out a good example lol.
23:37 ZoffixLappy I'm not sure whether I should start panicing that I took too long a break from Perl 6 and will now sound like an idiot during my talk or.... to order another beer :)
23:37 ZoffixLappy rudi_s, "docs use".. Would you link me to those docs, please?
23:37 rudi_s ;-) - well I think at least as a simple example the iterate over hash keys should work. It's a nice trick and needs »
23:37 rudi_s Sure.
23:38 rudi_s ZoffixLappy: https://doc.perl6.org/type/Hash#L​ooping_over_hash_keys_and_values
23:38 rudi_s Last code block in this section.
23:39 rudi_s (Sort returns pairs, so you need to use » to extract the key/value of each pair.)
23:39 ZoffixLappy Thanks!
23:40 rudi_s np
23:41 rudi_s Will the slides of your talk be available somewhere? I'm always interesting in learning more stuff about perl6.
23:42 ZoffixLappy rudi_s, yes, they should be available at http://tpm2016.zoffix.com/ next Wednesday.
23:44 rudi_s Nice, looking forward to it (DNS doesn't resolve at the moment.)
23:44 ZoffixLappy Yeah. It will on Wednesday :)
23:45 kjs_ joined #perl6
23:45 rudi_s ;-)
23:47 guest666_ .sort: +* ascending; -* descending;  ~* ascending lex; What I can use for descending lex instead of .reverse ?
23:56 BenGoldberg joined #perl6
23:56 manchicken joined #perl6
23:57 manchicken Does anybody have experience deploying Perl6 apps in AWS? I'm trying to decide if an EC2 is my only option.

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

Perl 6 | Reference Documentation | Rakudo